1.
linux老方式查看ip地址
/sbin/ifconfig
linux新方式查看ip地址
/sbin/ip addr
新方式更准确
2
老方式查看网卡
[root@cncln auto]# /sbin/mii-tool eth1
eth1: negotiated 100baseTx-FD, link ok
新方式查看网卡
[root@cncln auto]# /sbin/ethtool eht1
Settings for eht1:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available
新方式更准确
3.查看路由
老方式
[root@cncln auto]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.30.50 172.16.32.1 255.255.255.255 UGH 0 0 0 eth1
172.16.153.63 172.16.32.1 255.255.255.255 UGH 0 0 0 eth1
172.16.153.64 172.16.32.1 255.255.255.255 UGH 0 0 0 eth1
新方式
[root@cncln auto]# /sbin/ip route show
172.16.30.50 via 172.16.32.1 dev eth1
172.16.153.63 via 172.16.32.1 dev eth1
172.16.153.64 via 172.16.32.1 dev eth1