在Unix路由表中,“proto kernel”是什么意思?

46

我在linux-ip.net和整个互联网上搜索了这个问题,但似乎没有找到答案。

"proto kernel"在路由表中是什么意思?

只是一个例子:

[root@tristan]# ip route show table local
local 192.168.99.35 dev eth0 proto kernel scope host src 192.168.99.35
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
1个回答

49

man ip(8) 中的摘录:

  protocol RTPROTO
          the routing protocol identifier of this route.
          RTPROTO may be a number or a string from the
          file /etc/iproute2/rt_protos. If the routing
          protocol ID is not  given,  ip  assumes  protocol
          boot (i.e. it assumes the route was added by 
          someone who doesn't understand what they are doing).
          Several protocol values have a fixed interpretation.
          Namely:

             redirect - the route was installed due to an ICMP redirect.

             kernel - the route was installed by the kernel during
                   autoconfiguration.

             boot - the route was installed during the bootup sequence.
                 If a routing daemon starts, it will purge all of them.

             static - the route was installed by the administrator to
                   override dynamic routing. Routing daemon will
                   respect them and, probably, even advertise them
                   to its peers.

             ra - the route was installed by Router Discovery protocol.

          The rest of the values are not reserved and the administrator is free
          to assign (or not to assign) protocol tags.

我的Linux Debian和CentOS主机的ip手册不同。你引用的是哪个实现/操作系统? - faxmodem
@user1928764 显然查看了 man ip(8) 中的 SEE ALSO 部分。在那里,您可以找到与您正在阅读的页面相关的其他手册页(特别是 man ip-route(8))。 - dmytro.poliarush
1
我说这只是“文档”,没有实际作用,这样说对吗? - Ralph Bolton

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接