Linux host original network card ETH0,IP for 172.19.74.X/24, add a network card eth1, configure another network segment of the IP 10.219.17.x/24, found their respective to the gateway, but the original 172.19.74.X segment of the host can not access the host.
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/7D/06/wKioL1beoAKRdhoyAAL1yYrZRoU831.jpg "title=" 12.jpg "alt=" Wkiol1beoakrdhoyaal1yyrzrou831.jpg "/>
Viewing the routing table discovery, the default route goes to the new Nic eth1 up:
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/7D/06/wKioL1ben8eQRuQpAAI5av4Dk_s296.jpg "title=" 11.jpg "alt=" Wkiol1ben8eqruqpaai5av4dk_s296.jpg "/>
To delete this default route, then add a default route to the original eth0.
Command:
Route del default GW 10.219.17.1 Dev eth1
Route add default GW 172.19.74.1 dev eth0
To view the routing table again:
[Email protected] ~]# Netstat-r
Kernel IP Routing Table
Destination Gateway genmask Flags MSS Window Irtt Iface
172.19.74.0 * 255.255.255.0 U 0 0 0 eth0
10.219.17.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth1
Default 172.19.74.1 0.0.0.0 UG 0 0 0 eth0
It's normal.
Linux Dual NIC Configuration routing