Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

DHCP

1,207 bytes added, 10:11, 23 August 2011
Set up
Instructions largely borrowed [[Category: Networking]] The following article describes how to use DHCP from http://oobinside a container.freeshellNote that it requires [[veth]] device.org/nzwireless/dhcpd == Set up ==Assumes you have set up vzbr0, as described on [[Virtual Ethernet device]].html
<pre>
vzctl create 144 --ostemplate centos-4-i386-minimal
vzctl start 144
vzyum 144 install dhcp
vzctl set 144 --netif_add eth0 --save
brctl show
brctl addif vzbr0 veth144.0
ifconfig vzbr0
cat /proc/sys/net/ipv4/conf/vzbr0/forwarding
cat /proc/sys/net/ipv4/conf/vzbr0/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/vzbr0/forwarding
echo 1 > /proc/sys/net/ipv4/conf/vzbr0/proxy_arp
</pre>
Instructions largely borrowed from http://oob.freeshell.org/nzwireless/dhcpd.html == Sample DHCPD.conf==
<pre>
# Sample /etc/dhcpd.conf
}
</pre>
 
<pre>
Host$ cp /etc/sysconfig/network /vz/root/144/etc/sysconfig/network
</pre>
 
<pre>
vz144$ service dhcpd start
</pre>
 
== External links ==
* http://www.cpqlinux.com/dhcpd.html - create static IPs, debugging etc.
* http://mailman.vyatta.com/pipermail/vyatta-users/2007-September/001858.html - not configured to listen on any interfaces
* http://forum.openvz.org/index.php?t=msg&goto=22072& - diagnosis
* http://www.google.ca/search?q=DHCPDARGS+brctl - searches for help on getting a virtual bridge to work with DHCPD
* http://www.linuxfoundation.org/en/Net:Bridge - great explanation of bridging
Anonymous user