第一生效文件:/etc/sysconfig/network-scripts/ifcfg-eth0
[root@newname ~]# grep -i gate /etc/sysconfig/network-scripts/ifcfg-eth3GATEWAY=192.168.0.1
第二生效文件:/etc/sysconfig/network
[root@newname ~]# grep -i gate /etc/sysconfig/network GATEWAY=192.168.0.1
[root@oldboy ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth3 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth3 [root@oldboy ~]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth3 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth3 [root@oldboy ~]#