vlan and dhcp

RobFantini

Famous Member
May 24, 2012
2,009
102
133
Boston,Mass
we've a few kvm's that have a mix of vlan tags. they are dhcp clients.

I'm trying to figure out where to put the dhcp server.

Now if I use a kvm for dhcp server with a vlan set to 20 , only other vlan20 kvm's get a dhcp address .

I wonder how others deal with this.
Does it make sense to just use a dhcp server on each vlan?

We have a layer-3 switch...

Also when I run dhcp on a physical box and that box has vlan 20 set, kvm's with vlan 30 do get an address.

The issue could be with some of the per port settings on the switch....

But in general I'd like advice on where it is best to put the dhcp server - kvm or pve host etc. Any suggestions?
 
Last edited:
Id recommend a physical box in parallel to a VM for redundancy since it sounds like you use DHCP a lot (why?). the physical box needs to be connected to a trunking port on the switch, youll need to add all the vlans to that box and give the box an IP in every vlan.

for the VM you can just give it 10 NICs and assign one nic to every vlan-bridge you got on your proxmox system.
 
Last edited:
mo_ thanks for the reply. adding an interface for each vlan works good.
we use OpenNetAdmin to help us easily manage dhcp and dns. Udo suggested trying ona. Ona has made it so office and shipping managers can easily add an ip device to our network. With a little scripting the tinydns and isc-dhcp config is updated on multiple servers. other then servers , we use dhcp for our 200+ ip devices.

we'll end up with 2 or more dhcp servers working in primary/secondary mode per isc-dhcp documentation. using 2 kvm's in a drbd high availability set up should be good enough. If our cluster were to break then dhcp would not be our biggest concern.
 
Hi, I was just curious. Using DHCP for notebooks and guests makes sense, but using dhcp for your centralized servers/services seems weird to me, thats why I was asking.
 
mo_ : after thinking about what you wrote and others advised, we'll put dns and dhcp on their own high availibility set up. tinydns and isc-dhcp have ha built in.
 
Another way of solving your problem could be to create bridges on-top of the server's nic, one bridge for each vlan, and instruct tinydns and isc-dhcp to provide services on every bridge.

If you want HA you could install a couple of identical servers. These could either be virtual or psychical. Given a highly redundant virtual setup I would prefer virtual servers but YMMV.
 
Another way of solving your problem could be to create bridges on-top of the server's nic, one bridge for each vlan, and instruct tinydns and isc-dhcp to provide services on every bridge.

If you want HA you could install a couple of identical servers. These could either be virtual or psychical. Given a highly redundant virtual setup I would prefer virtual servers but YMMV.

I agree. The good thing about dns and isc-dhcp is that HA is built in to the server software. I think a hardware node and a few vz's would work fine. Look at /etc/resolv.conf. There should always be more then one nameserver. Those 2+ nameservers are on your network at stragecic places in a smart switch or better mstp loop. Make it so a ethernet wire connecting 2 switches could be cut and ethernet still be up. Anyone who has had to deal with a cut wire knows that only occurs on the weekend and needs to be fixed then.
Something like opennetadmin or better needs to be used to keep the dhcp and dns records up to date on the servers. If doing that then opennetadmin should run in a ha kvm.

And there are probably better ways to do that.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!