OpenVZ Forum


Home » General » Support » Veth does not forward DHCP packages
Veth does not forward DHCP packages [message #11084] Tue, 13 March 2007 10:36 Go to next message
NTAuthority is currently offline  NTAuthority
Messages: 4
Registered: March 2007
Junior Member
I have made a VE, with a veth device. It's named eth0, and has the IP address 192.168.1.220. The real eth0, of VE0, has the IP 192.168.1.223. Now, if I try to get a IP address from the DHCP server in the VE, it does not respond. In tcpdump, I also don't see any DHCP packages. In VE0, I do see the packages, but VE0 don't respond, as there's no DHCP server running there. Wink I set up the veth device using the guide on http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_veth -device_persistent , and using option B. Adding a route for 255.255.255.255 on the VE, to eth0, or on VE0, to eth0 or even veth61.0, also does not work.

Could anyone help? Smile

-- Bas
Re: Veth does not forward DHCP packages [message #11096 is a reply to message #11084] Tue, 13 March 2007 13:19 Go to previous messageGo to next message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
If I understand you correctly you have following configuration:
VE0:
eth0 with IP 192.168.1.223
veth61.0

VE:
eth0 with IP 192.168.1.220

When you assign IP 192.168.1.220 to eth0 manually everything works ok. Right?

But you want to be able to get IP for eth0 in VE via DHCP.
In this case you will need to create bridge in VE0 and add eth0 and veth61.0 to it.
DHCP packets are dropped while routing, that is why you do not see reply from DHCP server. If you will create bridge, then all packets from VE will go directly to network without routing.


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Veth does not forward DHCP packages [message #11097 is a reply to message #11096] Tue, 13 March 2007 13:50 Go to previous messageGo to next message
NTAuthority is currently offline  NTAuthority
Messages: 4
Registered: March 2007
Junior Member
I kind of worded it incorrectly maybe. In the VE, I am running a DHCP server, and the client, is my Windows PC, with (currently) the static IP 192.168.1.100. It's on the same switch as the server, however.
Re: Veth does not forward DHCP packages [message #11101 is a reply to message #11097] Tue, 13 March 2007 14:11 Go to previous messageGo to next message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Well, in this case all DHCP requests which are delivered to VE0 are dropped while routing. And you will need to create bridge to be able to get packets in VE from network directly (without routing).

Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Veth does not forward DHCP packages [message #11105 is a reply to message #11101] Tue, 13 March 2007 15:45 Go to previous messageGo to next message
NTAuthority is currently offline  NTAuthority
Messages: 4
Registered: March 2007
Junior Member
Okay, I now made a bridge, using the following commands:

brctl addbr vzbr0
brctl addif vzbr0 veth61.0
brctl addif vzbr0 eth0

But, now eth0 won't connect to anything. Sad So I don't have an internet connection. After removing eth0, everything was correct again. If I try it with a VLan instead of eth0, I don't have an internet connection in the VE.
Re: Veth does not forward DHCP packages [message #11138 is a reply to message #11105] Wed, 14 March 2007 10:35 Go to previous message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Well, linux bridge is working in following way:
Interface become unavailable after you add it to bridge.

So, in VE0 after you add eth0 to bridge you should change all routes (change eth0 to br0 in all routes) and move IP configuration to bridge device.


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: Question on security fixes in kernel patch
Next Topic: *SOLVED* No module ata_piix and raid found error?
Goto Forum:
  


Current Time: Thu Jul 11 06:21:13 GMT 2024

Total time taken to generate the page: 0.02446 seconds