取消
顯示結果 
搜尋替代 
您的意思是: 

如何偵測網卡status

如何偵測網卡status

我有兩張網卡

tu0 and tu1

我把tu1 的線拔掉後

用ifconfig -a 去看tu1 的status 還是up的,ping也Ping的到tu1的ip

請問有什麼指令可以確定我的網卡狀態呢?



# ifconfig -a

lo0 flags=100c89 UP,LOOPBACK,NOARP,MULTICAST,SIMPLEX,NOCHECKSUM

inet 127.0.0.1 netmask ff000000 ipmtu 4096



sl0 flags=10 POINTOPOINT



tu0 flags=c63 UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST,SIMPLEX inet 10.10.13.11 netmask ffff0000 broadcast 10.10.255.255 ipmtu 1500



tu1

lags=c63 UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST,SIMPLEX inet 192.168.0.1 netmask ffff0000 broadcast 192.168.255.255 ipmtu 1500
2 回覆

如何偵測網卡status

Hi Joey,



Please see the example from the online manual "man niffconfig" description.



# ps -e

..

524754 ?? I 0:00.01 /usr/sbin/niffd

..

# niffconfig -v

Interface: tu0, description: , status: UP, event: UP

, state: GREEN

t1: 10.000, dt: 5.000, t2: 30.000, time to dead: 10.000, current inter

val: 10.000, next time: 10.000

#



Best regards,

Richard.

如何偵測網卡status

hi Joey:

我剛才試了一下,你說的還能ping通tu1的IP的情況應該是在本機上吧,如果從其他機器上ping是ping不通的.

另外,感謝Richard Kuo提供的監測方法!非常實用!