Ask Your Question

Roger's profile - activity

2014-01-02 10:52:25 -0500 received badge  Taxonomist
2012-07-05 13:32:21 -0500 received badge  Famous Question (source)
2012-05-15 16:26:47 -0500 received badge  Notable Question (source)
2012-04-19 22:30:10 -0500 received badge  Student (source)
2012-04-17 16:32:02 -0500 received badge  Popular Question (source)
2012-02-22 04:52:39 -0500 received badge  Editor (source)
2012-02-17 08:23:36 -0500 asked a question Configuring Static Routes

Hi all,

I need configure my VM with static route

Following the guide

I create the /etc/sysconfig/network-scripts/route-eth0 file with the content

default 172.16.16.2 dev eth0
172.16.0.0/16 via 172.16.16.2 dev eth0
169.254.0.0/16 via 172.16.16.2 dev eth0

When I restart the network, I still without internet access in my box

Any idea?

Update

[root@ol56-oim9-db ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
172.16.0.0      0.0.0.0         255.255.0.0     U     0      0        0 eth0
[root@ol56-oim9-db ~]#

network card

[root@ol56-oim9-db ~]# dmesg | grep eth
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
e1000: eth0 NIC Link is Down
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
e1000: eth0 NIC Link is Down
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None

Disable the script

[root@ol56-oim9-db ~]# mv /etc/sysconfig/network-scripts/route-eth0 route-eth0-bak
[root@ol56-oim9-db ~]# service network restart
Shutting down interface eth0:  [  OK  ]
Shutting down loopback interface:  [  OK  ]
Bringing up loopback interface:  [  OK  ]
Bringing up interface eth0:  [  OK  ]

try add manually

[root@ol56-oim9-db ~]# route add -net 172.16.0.0/16 gw 172.16.16.2
[root@ol56-oim9-db ~]# route add -net 169.254.0.0/16 gw 172.16.16.2
[root@ol56-oim9-db ~]# ping www.google.com
connect: Network is unreachable

try add manually - 2

[root@ol56-oim9-db ~]# route add default gw 172.16.16.2
[root@ol56-oim9-db ~]# ping www.google.com
PING www.l.google.com (74.125.234.115) 56(84) bytes of data.
64 bytes from gru03s08-in-f19.1e100.net (74.125.234.115): icmp_seq=1 ttl=128 time=9.22 ms
64 bytes from gru03s08-in-f19.1e100.net (74.125.234.115): icmp_seq=2 ttl=128 time=8.57 ms
64 bytes from gru03s08-in-f19.1e100.net (74.125.234.115): icmp_seq=3 ttl=128 time=11.5 ms