OpenVZ Forum


Home » General » Support » SIOCADDRT: Network is unreachable message
SIOCADDRT: Network is unreachable message [message #25138] Sat, 15 December 2007 15:57 Go to next message
tomp is currently offline  tomp
Messages: 64
Registered: August 2007
Member
Hi

I am getting SIOCADDRT: Network is unreachable errors when I add an IP address or restart the network from inside a VE.

I am running a centos 5 VE based on the meta data from this forum.

I have narrowed the problem down to the entry in /etc/sysconfig/network that says:

GATEWAY="192.0.2.1"


If I remove/comment that line out, all errors go away and everything works perfectly. Smile

This is because the default routes are also added using the /etc/sysconfig/network-scripts/route-venet0

The problem is that every time I restart the VE that GATEWAY line is re-added to the network file!

Can someone explain why it is being re-added, or whether there is a better way to solve this problem.

Cheers!

[Updated on: Sat, 15 December 2007 15:58]

Report message to a moderator

Re: SIOCADDRT: Network is unreachable message [message #25139 is a reply to message #25138] Sat, 15 December 2007 16:50 Go to previous messageGo to next message
ugob is currently offline  ugob
Messages: 271
Registered: March 2007
Senior Member
I think you should not configure network from inside the VE. I think everything should be managed using vzctl or the $VEID.conf file.

Regards,

Ugo


Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: SIOCADDRT: Network is unreachable message [message #25141 is a reply to message #25138] Sat, 15 December 2007 17:00 Go to previous messageGo to next message
tomp is currently offline  tomp
Messages: 64
Registered: August 2007
Member
Hi

Yes i realise that, I have been adding IP addresses using vzctl, but if i restart the network (after adding some extra routes) from within the VE then I get these errors.

I have fixed the issue by commeting out the line in /etc/vz/dists/scripts/redhat-add_ip.sh:

#put_param $NETFILE GATEWAY ${FAKEGATEWAY}

This was what was putting the fake gateway in each time.

Now I don't get any errors. Smile
Re: SIOCADDRT: Network is unreachable message [message #30326 is a reply to message #25141] Wed, 21 May 2008 11:05 Go to previous messageGo to next message
sachin is currently offline  sachin
Messages: 27
Registered: September 2007
Junior Member
Hi,

I cant find this file which you metioned.

were is the location I have Cpanel on my system.

Plz update on this.

Thanks
Re: SIOCADDRT: Network is unreachable message [message #30335 is a reply to message #30326] Wed, 21 May 2008 18:36 Go to previous message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

@sachin:

Please post which os template is used, seems that you use a non-rpm distro.
Previous Topic: RTNETLINK answers: File exists
Next Topic: download centos5 template
Goto Forum:
  


Current Time: Sun Jul 14 22:44:04 GMT 2024

Total time taken to generate the page: 0.02306 seconds