我有手机,热点已开启。我通过 linux 笔记本电脑连接到那个热点。
现在在我的 linux 计算机上运行命令
$ netstat -r -n
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.43.1 0.0.0.0 UG 0 0 0 wlp3s0
192.168.43.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp3s0
我的 ip 是 192.168.43.193
$ ipconfig -a
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.43.193 netmask 255.255.255.0 broadcast 192.168.43.255
inet6 2409:4070:2201:c42b:1a38:21df:c868:7fde prefixlen 64 scopeid 0x0<global>
inet6 fe80::25ac:4aff:2683:9be8 prefixlen 64 scopeid 0x20<link>
ether ac:d1:b8:47:a4:47 txqueuelen 1000 (Ethernet)
RX packets 408640 bytes 476371745 (454.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 287073 bytes 40393931 (38.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
现在如何理解 netstat 输出。
据我了解:
Any ip with `192.168.43.0/255` does not have a gateway or gateway of `0.0.0.0`
Any ip will have a gateway of `192.168.43.1`
Any ip the gateway is 192.168.43.1
一旦我们说一遍又一遍,这没有意义Any ip with 192.168.43.0/255 does not have a gateway or gateway of 0.0.0.0