· 7 years ago · Jan 03, 2018, 11:50 AM
1[root@server ~]# route -n
2Kernel IP routing table
3Destination Gateway Genmask Flags Metric Ref Use Iface
40.0.0.0 10.5.56.254 0.0.0.0 UG 0 0 0 eth0
510.5.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
6
7route add -net 192.168.1.0/24 dev eth0
8route add -host 192.168.1.1 gw 192.168.1.12 dev eth0
9
10[root@server ~]# route -n
11Kernel IP routing table
12Destination Gateway Genmask Flags Metric Ref Use Iface
130.0.0.0 10.5.56.254 0.0.0.0 UG 0 0 0 eth0
1410.5.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
15192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
16192.168.1.1 192.168.1.12 255.255.255.255 UGH 0 0 0 eth0
17
18[root@server ~]# route -n
19Kernel IP routing table
20192.168.1.1 192.168.1.12 255.255.255.255 UGH 0 0 0 eth0
2110.5.56.13 192.168.1.12 255.255.255.255 UGH 0 0 0 eth0
220.0.0.0 10.5.56.254 0.0.0.0 UG 0 0 0 eth0
2310.5.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0