[Users] Running DHCP on VPS, ( on a router.. )

Kirill Korotaev dev at sw.ru
Fri Sep 28 07:28:53 EDT 2007


DHCP server should work fine with veth bridged to host eth0 interface.
Can you reproduce your issue when server doesn't reply?

Delegating interface to the VE is always exclusive, though you can add 2nd network
adapter connected to the same network.

Thanks,
Kirill


Dariush Pietrzak wrote:
> Hello,
>  I'm having problems with setting up a dhcp server on vps, I figured out 
> I need to create veth device, and then bridge it to the eth0.107 interface
> that I would like to serve dhcp on. 
>  And it sometimes works, but more often then not my dhcp is ignoring
> requests, not to mention - when I put up a second dhcp on way slower
> physical machine, it manages to always respond first, even though it's few
> switch hops further away..
> 
>  So I figured I'd give this VPS a physical interface to work with, but when
> I do that, that device disappears from the HN, which is not very good since
> I'm supposed to be routing packets coming from this interface.
> 
>  Is there a way to stop such physical IF from disappearing from the HN? I
> do understand security implications of such setup, I need this to work.
> 
> Here's my setup:
> on HN, debian's /etc/network/interfaces:
> 
> auto br107
> iface br107 inet static
>       bridge_ports eth0.107
>       bridge_maxwait 3
> 	    address 192.168.0.0
> 	    netmask 255.255.255.0
> 	    network 192.168.0.0
> 	    broadcast 192.168.0.255
> 
> the same on VPS:
> auto eth0
> iface eth0 inet static
>         address 192.168.0.251
> 	        netmask 255.255.255.0
> 		network 192.168.0.0
> 		broadcast 192.168.0.255
> 		gateway 192.168.0.254
> 
> 
> vps.conf:
> 
> NETIF="ifname=eth0,mac=00:18:51:6F:E6:41,host_ifname=veth107.0,host_mac=00:18:51:1C:F7:1D"
> 
> firewallOne:/home/eyck# less /etc/vz/vznet.conf 
> #!/bin/sh
> 
> EXTERNAL_SCRIPT="/etc/vz/add-bridges"
> firewallOne:/home/eyck# less /etc/vz/add-bridges 
> #!/bin/sh
> brctl addif br107 veth107.0
> ifconfig veth107.0 up
> 



More information about the Users mailing list