【Windows】路由表

Posted by 西维蜀黍 on 2021-04-01, Last Modified on 2021-09-21

手动路由

# windows 下
$ route add 0.0.0.0 mask 0.0.0.0 192.168.10.0

# truenas 下,看看包是不是会被正常接收到
$ tcpdump -i ix1 icmp
23:19:01.257689 IP 192.168.10.11 > dsldevice.lan: ICMP echo request, id 1, seq 211, length 40
23:19:05.871634 IP 192.168.10.11 > dsldevice.lan: ICMP echo request, id 1, seq 212, length 40
23:19:10.868335 IP 192.168.10.11 > dsldevice.lan: ICMP echo request, id 1, seq 213, length 40
23:19:15.876429 IP 192.168.10.11 > dsldevice.lan: ICMP echo request, id 1, seq 214, length 40

# truenas 下,设置路由
$ netstat -rn
$ route add -net 0.0.0.0/0 192.168.18.1

华硕路由表cxd

$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.18.1    0.0.0.0         UG        0 0          0 eth4
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
192.168.18.0    0.0.0.0         255.255.255.0   U         0 0          0 eth4
192.168.18.1    0.0.0.0         255.255.255.255 UH        0 0          0 eth4
192.168.55.0    0.0.0.0         255.255.255.0   U         0 0          0 br0
239.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 br0

Reference


TOC