OpenVZ Forum


Home » General » Support » [Answered] How to allocate ip addresses from ISP via DHCP .....
Re: How to allocate ip addresses from ISP via DHCP ..... [message #34798 is a reply to message #34793] Tue, 03 February 2009 08:45 Go to previous messageGo to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

you don't have to generate MAC addresses with easy-mac.sh script because vzctl should generate them automatically.

The following scenario should work (it's a compilation from wiki page http://wiki.openvz.org/Veth )

(on the HN)
# 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

Then ip address should appear on br0 interface and then

(inside CT)
# dhclient eth0


If this scenario doesn't work then:
- use tcpdump utility on the HN and inside the container when dhclient is running inside CT
- make sure that you don't have to register MAC addresses inside your CTs because of your network policy rules.
 
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: [solved] /proc/self/loginuid missing on HN on el5.028stab060.2 causing auditd to fail?
Next Topic: 2 Digit IDs - Updated
Goto Forum:
  


Current Time: Mon Sep 16 20:35:16 GMT 2024

Total time taken to generate the page: 0.04793 seconds