您的位置:首页 > 理论基础 > 计算机网络

快速查看Linux网络状态

2016-05-17 01:57 330 查看
快速查看Linux网络状态

1、查看各网卡的状态

ifconfig -a包括IP,子网掩码
eth0 Link encap:Ethernet HWaddr 00:0C:29:6E:EB:AB
inet addr:192.168.232.178 Bcast:192.168.232.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe6e:ebab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:163336 errors:0 dropped:0 overruns:0 frame:0
TX packets:17220 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:218194934 (208.0 MiB) TX bytes:1780297 (1.6 MiB)

2、查看网关

route通过路由查看网关等信息,其中有default的就是本地网关
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.232.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1002 0 0 eth0
default 192.168.232.2 0.0.0.0 UG 0 0 0 eth0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: