[Users] Putting DHCP server on VENET-connected node

Dariush Pietrzak ml-openvz-eyck at kuszelas.eu
Fri Jan 30 04:29:29 EST 2009


Hi,
 the problem with DHCP and venet, is that dhcp packets are adressed to
255.255.255.255, and you can't route packets destined for 255.255.255.255
with routing tables.
 But, you sure can direct them towards venet-connected node using other means, 
here's the one:

host: # iptables -t mangle -A PREROUTING -d 255.255.255.255 -j ROUTE --gw 192.168.190.250

host: # iptables -nvL -t mangle:
12394 4069K ROUTE      0    --  *      *       0.0.0.0/0            255.255.255.255     ROUTE gw:192.168.190.250

then inside vz guest:


tcpdump -n -i venet0:0

02:31:34.337137 IP 192.168.190.138.68 > 192.168.190.250.67: BOOTP/DHCP, Request from 00:a1:3d:1d:b9:a5, length 548

08:31:35.188004 IP 192.168.190.138.68 > 192.168.190.250.67: BOOTP/DHCP, Request from 00:a1:3b:1d:b9:a5, length 548
08:31:35.188040 IP 192.168.190.250 > 192.168.190.138: ICMP 192.168.190.250 udp port 67 unreachable, length 556

 the other would be using dhcp-relay on the HN

-- 
Key fingerprint = 40D0 9FFB 9939 7320 8294  05E0 BCC7 02C4 75CC 50D9
 Total Existance Failure


More information about the Users mailing list