RTNETLINK 指 Linux 内核中用于“路由/网络配置”相关消息的一类 Netlink 通信接口与消息族(常见于 ip 等工具操作网络接口、路由、地址时)。当系统提示如 “RTNETLINK answers: …” 时,通常表示内核通过 netlink 返回了错误或结果信息。
/ˌɑːr tiː ˈnɛt lɪŋk/
RTNETLINK answers: Operation not permitted.
RTNETLINK 回复:不允许的操作。
When the script tried to add a route with ip route add, RTNETLINK returned “File exists,” indicating the route was already present in the kernel table.
当脚本用 ip route add 添加路由时,RTNETLINK 返回“文件已存在”,说明该路由已在内核路由表中。
RTNETLINK 可理解为 RT (routing,路由) + netlink(内核与用户态通信机制) 的组合称呼。它源自 Linux 网络子系统:用户态工具(如 iproute2 的 ip)通过 netlink socket 向内核发送与路由、地址、链路等相关的请求,内核以 RTNETLINK 类消息进行应答。