my default gateway not able to change
anybody can help to change my default gateway permanently on my pc to be
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
[root@localhost ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
10.0.0.0 0.0.0.0 255.255.254.0 U 1 0 0 eth0
172.0.0.0 10.0.0.1 255.0.0.0 UG 0 0 0 eth0
10.0.0.0 10.0.0.1 255.0.0.0 UG 0 0 0 eth0
152.0.0.0 10.0.0.1 255.0.0.0 UG 0 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
[root@localhost ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
GATEWAYDEV=eth1
GATEWAY=192.168.1.1
also i tried to changed from this directory
[root@localhost ~]# cat /etc/sysconfig/networking/profiles/default/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
GATEWAYDEV=eth1
GATEWAY=192.168.1.1
[root@localhost ~]# service network restart
I am still getting same route
[root@localhost ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
10.0.0.0 0.0.0.0 255.255.254.0 U 1 0 0 eth0
172.0.0.0 10.0.0.1 255.0.0.0 UG 0 0 0 eth0
10.0.0.0 10.0.0.1 255.0.0.0 UG 0 0 0 eth0
152.0.0.0 10.0.0.1 255.0.0.0 UG 0 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
only one way can be work by add like below which lost it when I restart pc
route del -net 0.0.0.0/0 gw 10.0.0.1
route add -net 0.0.0.0/0 gw 192.168.1.1
Last edited by phpshell; 02-03-2014 at 12:32 PM.
|