Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?

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 ~]#

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  ]

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