OpenVZ Forum


Home » General » Support » Problem with DHCP supplied address with bridging
Problem with DHCP supplied address with bridging [message #34913] Thu, 12 February 2009 04:27 Go to next message
mwolfe is currently offline  mwolfe
Messages: 4
Registered: February 2009
Location: Raleigh, NC
Junior Member
Hi:
I am new to openvz. I have it running on Debian 5.0
Having a problem with getting the dynamic dhcp address into
a new VE ie 555. i have been following the openvz common
networking howto...

i created the bridge: brctl addbr br0
added eth0 to it: brctl addif br0 eth0
br0 has dynamic address 192.168.1.128 from dhcpd server
on router.
the host can ping outside.

did the vzctl set 555 netif_add eth0 mac addr veth555.0 mac addr

the mac address was generated...

veth555.0 Link encap:Ethernet HWaddr 00:16:3e:5d:65:06

not sure how to proceed when entering my VE 555??
the doc says: dhcpcd venet0:0 which doesn't do work.

template is: debian-5.0-i386-minimal.tar.gz

-- any ideas?

Michael



Re: Problem with DHCP supplied address with bridging [message #34917 is a reply to message #34913] Thu, 12 February 2009 08:22 Go to previous messageGo to next message
schjeall is currently offline  schjeall
Messages: 27
Registered: February 2009
Location: Denmark
Junior Member
Hello

When you create veth, as you did, you have to use eth0 from inside the VE.

dhcpcd eth0


I think I read that doc one time and it got me confused too.
Re: Problem with DHCP supplied address with bridging [message #34930 is a reply to message #34917] Thu, 12 February 2009 13:55 Go to previous messageGo to next message
mwolfe is currently offline  mwolfe
Messages: 4
Registered: February 2009
Location: Raleigh, NC
Junior Member
yes, i tried inside the VE

dhclient eth0

it cannot get an address...

looking at another thread it did:

# brctl addbr br0
# brctl addif br0 eth0
# vzctl set $VEID --netif_add eth0 --save
# brctl addif br0 veth$VEID.0
# ifconfig eth0 0
# ifconfig veth$VEID.0 0
# echo 1 > /proc/sys/net/ipv4/conf/veth$VEID.0/forwarding
# echo 1 > /proc/sys/net/ipv4/conf/veth$VEID.0/proxy_arp
# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
# echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
# ifconfig br0 0
# echo 1 > /proc/sys/net/ipv4/conf/br0/forwarding
# echo 1 > /proc/sys/net/ipv4/conf/br0/proxy_arp
# dhclient br0

inside VE

dhclient eth0
Re: Problem with DHCP supplied address with bridging [message #34932 is a reply to message #34930] Thu, 12 February 2009 14:09 Go to previous messageGo to next message
schjeall is currently offline  schjeall
Messages: 27
Registered: February 2009
Location: Denmark
Junior Member
Hello

Then read this:

http://wiki.openvz.org/Bridge_doesn%27t_forward_packets

Now you should get an ip address from the dhcp server.

When the ip-address is allocated and you can't access the Internet from the VE, make sure you have set a proper default gateway inside the VE. If you still can't access the Internet, turn off iptables on the hardware node.


Re: Problem with DHCP supplied address with bridging [message #34933 is a reply to message #34932] Thu, 12 February 2009 16:21 Go to previous messageGo to next message
mwolfe is currently offline  mwolfe
Messages: 4
Registered: February 2009
Location: Raleigh, NC
Junior Member

thanks for the tcpdump tip.. i used it on the VE interface
ie veth555.0 that is bridged to br0.

the problem is that each time the VE for id 555 is stopped
the VE interface veth555.0 is dropped from the bridge.

steps:

host:
- start the VE: vzctl start 555
- add VE interface: brctl addif br0 veth555.0

inside the VE
- dhclient eth0

now i am connected to the lan and outside world
eth0 was bridged at an earlier time.

it seems that i need a startup script to bridge the VE
interface to br0 after starting the VE ?!
Re: Problem with DHCP supplied address with bridging [message #34935 is a reply to message #34933] Thu, 12 February 2009 16:57 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

sorry for intrusion
useful links
http://wiki.openvz.org/Veth#Making_a_bridged_veth-device_per sistent
http://wiki.openvz.org/Veth
Re: Problem with DHCP supplied address with bridging [message #34936 is a reply to message #34935] Thu, 12 February 2009 17:09 Go to previous message
mwolfe is currently offline  mwolfe
Messages: 4
Registered: February 2009
Location: Raleigh, NC
Junior Member
ok thanks. no problem. i will check it out!
Previous Topic: disk inodes not saving, full
Next Topic: apt-get can't find fzakernel-2.6.18-686-bigmem
Goto Forum:
  


Current Time: Fri Jul 04 11:46:16 GMT 2025

Total time taken to generate the page: 0.01946 seconds