我正在寻找一个解释,这些命令ip link
和输出ip addr
在Linux机器上的确切含义是什么。
# ip link
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
link/ether 00:a1:ba:51:4c:11 brd ff:ff:ff:ff:ff:ff
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
link/ether 00:a1:ba:51:4c:12 brd ff:ff:ff:ff:ff:ff
LOWER_UP
,NO-CARRIER
和其他标志到底是什么?我在http://download.vikis.lt/doc/iproute-doc-2.6.32/ip-cref.ps上找到了参考,但是它不包含完整的信息,并且手册页不够详细。
这些是接口的标志。它们记录在netdevice(7)
手册页中。以下是相关部分(按字母顺序重新排列):
IFF_ALLMULTI Receive all multicast packets.
IFF_AUTOMEDIA Auto media selection active.
IFF_BROADCAST Valid broadcast address set.
IFF_DEBUG Internal debugging flag.
IFF_DORMANT Driver signals dormant (since Linux 2.6.17)
IFF_DYNAMIC The addresses are lost when the interface goes down.
IFF_ECHO Echo sent packets (since Linux 2.6.25)
IFF_LOOPBACK Interface is a loopback interface.
IFF_LOWER_UP Driver signals L1 up (since Linux 2.6.17)
IFF_MASTER Master of a load balancing bundle.
IFF_MULTICAST Supports multicast
IFF_NOARP No arp protocol, L2 destination address not set.
IFF_NOTRAILERS Avoid use of trailers.
IFF_POINTOPOINT Interface is a point-to-point link.
IFF_PORTSEL Is able to select media type via ifmap.
IFF_PROMISC Interface is in promiscuous mode.
IFF_RUNNING Resources allocated.
IFF_SLAVE Slave of a load balancing bundle.
IFF_UP Interface is running.
因此,这LOWER_UP
意味着在物理级别存在信号(即,网络接口中插入了活动的信号)。NO-CARRIER
恰恰相反:在物理级别上未检测到信号。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句