查看linux的 default gateway
1.$ route -nKernel IP routing tableDestinationGatewayGenmaskFlags Metric RefUse Iface0.0.0.0192.168.1.10.0.0.0UG000 wlan017
·
1.
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tap0
192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
2.
$ ip route show
default via 192.168.1.1 dev wlan0 proto static
172.20.0.0/16 dev tap0 proto kernel scope link src 172.20.0.1
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.105 metric 9
3.
$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
172.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tap0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
更多推荐
已为社区贡献1条内容
所有评论(0)