OpenVZ Forum


Home » General » Support » Multiple interfaces eth0, eth1 on different subnets
Multiple interfaces eth0, eth1 on different subnets [message #9978] Thu, 01 February 2007 19:05 Go to next message
pyite is currently offline  pyite
Messages: 20
Registered: January 2007
Junior Member
Hello there. I am trying to put my OpenVZ machine on multiple networks so I can create a VPS on any of the VLAN's here.

I am running into two problems:

1) When I start a VPS, it always does the arpsend on eth0. This isn't fatal, just a warning

2) The fatal error: VPS on the eth1 interface are unable to route anywhere - they can only connect to the local network. I am assuming that this is because the default route on the machine is on eth0. Is there any way to set a default route inside of the VPS that is different from the default route outside?

Thanks,
Mark

Re: Multiple interfaces eth0, eth1 on different subnets [message #10300 is a reply to message #9978] Wed, 14 February 2007 14:46 Go to previous messageGo to next message
Reiner030 is currently offline  Reiner030
Messages: 3
Registered: December 2006
Location: Berlin
Junior Member
Hi,

it's my problem, too...

It seems, that the person on [message #7394] "Dual NIC environment" had the same problem, but the other reader didn't understand his explainations and thougt he played a joke with them...

As i found in the searches, the main problem seems the problem with the wrong interface / and even now the wrong interface used by arpsend ... even it's "only" a warning...

My config:

VHost:
eth0: a.b.c.d/255.255.255.224
eth1: 10.0.0.1/255.255.255.0

VE (with standard openvz rules):
veneth0: 127.0.0.1
veneth0:0: a.b.c.e
veneth0:1: 10.0.0.222


1) from VHost AND other server outside:
ping a.b.c.e => works
ping 10.0.0.222 => works

2) from VE to VHost:
ping a.b.c.d => works
ping 10.0.0.1 => works

3) from VE to other server outside:
ping a.b.c.g => works
ping www.heise.de, www.t-online.de and so on => works
ping 10.0.0.3 => did'nt work
but
ping -I 10.0.0.222 10.0.0.3 => work

I've used tcdump -I veneth0 on VHost to verify the packet transfer Wink

=> so the source routing for 10.0.0.222 is'nt right...

I thought "no problem", I found here the tipp to change debian-add_ip.sh ... so i change the script to add routes behind

veneth0:0
up route add -net a.b.c.a netmask 255.255.255.224 dev veneth0:0
and veneth0:1
up route add -net 10.0.0.0 netmask 255.255.255.0 dev veneth0:1

now all pings and my webinterface connection to the mysql server on 10.0.0.3 works correctly ...
BUT
the dns server could'nt be queried Sad((

I tried to change the default route from the VE FAKEGATEWAY to my Gateway:
up route del default gw 191.255.255.1
up route add default dev venet0:0
but it didnt help either.

If I remove theses routes, dns works / use of 10.0.0.222 is wrong again...


==>
Is it possible to change the arpsend command and when yes, where? I grepped the /etc/vz/ files for arpsend, but didn't find it...
Or is there an easier way to get the right routing?

Thanks.


Reiner
Re: Multiple interfaces eth0, eth1 on different subnets [message #10351 is a reply to message #9978] Thu, 15 February 2007 14:56 Go to previous message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Please, take a look at this article https://wiki.openvz.org/Source_based_routing
I hope it will help to solve your problems with routing.


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: *SOLVED* is it possible to control what /proc/cpuinfo says?
Next Topic: *SOLVED* 32bit vs. x86-64bit ?
Goto Forum:
  


Current Time: Thu Apr 18 15:49:48 GMT 2024

Total time taken to generate the page: 0.01777 seconds