I have a Debian 5.0 machine with linux-image-2.6.26-2-openvz-686. With 2 network cards. One is eth0 conected to the modem, the other is eth1 with a static ip (192.168.1.9) conected to an wireless acess point. At the moment i'v got in the node the DHCP Server runing because i can´t configure it in a virtual machine. What i did was: First off all stop the dhcp server in the hardware node and unconfigure eth1. [host-node]:~# ifconfig -a eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:255.255.240.0 inet6 addr: fe80::221:85ff:fe15:bedf/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5320 errors:0 dropped:0 overruns:0 frame:0 TX packets:3222 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6549594 (6.2 MiB) TX bytes:326786 (319.1 KiB) Interrupt:221 eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16 Base address:0xe800 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:2459 errors:0 dropped:0 overruns:0 frame:0 TX packets:4428 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:143700 (140.3 KiB) TX bytes:6383660 (6.0 MiB) Then add veth device to CT [host-node]:~# vzctl set 107 --netif_add eth1 --save [host-node]:~# ifconfig -a eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:255.255.240.0 inet6 addr: fe80::221:85ff:fe15:bedf/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5414 errors:0 dropped:0 overruns:0 frame:0 TX packets:3254 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6575652 (6.2 MiB) TX bytes:333920 (326.0 KiB) Interrupt:221 eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:16 Base address:0xe800 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:2503 errors:0 dropped:0 overruns:0 frame:0 TX packets:4472 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:147327 (143.8 KiB) TX bytes:6387674 (6.0 MiB) veth107.1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx inet6 addr: fe80::218:51ff:fea1:8375/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Then configure device in CT [host-node]# ifconfig veth107.1 0 [host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth107.1/forwarding [host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth107.1/proxy_arp [host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth1/forwarding [host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp # Configure device in CT107 [ve-101]# ifconfig eth1 0 [ve-101]# ip addr add 192.168.1.9 dev eth1 [ve-101]# ip route add default dev eth1 # RTNETLINK answers: File exists dhcp:/# ip route 192.0.2.1 dev venet0 scope link default via 192.0.2.1 dev venet0 [ve-101]# ip route del default via 192.0.2.1 dev venet0 [ve-101]# ip route add default dev eth1 Add route in CT0 [host-node]# ip route add 192.168.1.9 dev veth107.1 After this [ve-101]# apt-get install dhcp3-server The strange is that i can ping 192.168.1.9 but the clients can´t get any leases. Can someone help me in the configuration? Thanks.
Dear f.sivas, don't you think that something is not clear with 192.168.1.156? Doesn't the following message mean that somebody has already had that ip address? 02:19:08.269618 arp reply 192.168.1.156 is-at 00:21:6b:95:e1:f0