OpenVZ Forum


Home » Mailing lists » Users » Running DHCP on VPS, ( on a router.. )
Running DHCP on VPS, ( on a router.. ) [message #20765] Wed, 26 September 2007 06:05 Go to previous message
ml-openvz-eyck is currently offline  ml-openvz-eyck
Messages: 18
Registered: August 2007
Junior Member
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

-- 
Key fingerprint = 40D0 9FFB 9939 7320 8294  05E0 BCC7 02C4 75CC 50D9
 Total Existance Failure
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fwd: boot error - unable to mount root fs on unknown-block(0, 0)
Next Topic: Load Balacing of OpenVZ VEs with LVS and Heartbeat
Goto Forum:
  


Current Time: Thu Mar 28 14:43:42 GMT 2024

Total time taken to generate the page: 0.01707 seconds