On every vlan I have two ip ranges (for historical reasons). To PXE boot machines on these vlans I use ip helper/dhcp relay to relay requests onto the vlan where the dhcp server sits.

But the dhcp server only handles DHCP requests for one of the ip ranges (the one used as source address in the relayed dhcp message). How could I tell my dhcp server så accept dhcp requests for multiple subnets from one specific IP?


2 Answers 2


just try to gave your interface vlan two IPs

#vlan 10
# int vlan 10
# ip add X.X.X.X M.M.M.M
# ip add Y.Y.Y.Y M.M.M.M secondary
# ip helper address your DHCP server address

so that DHCP sever will be able to give IP to hosts in rang of X.X.X.X M.M.M.M and in range of Y.Y.Y.Y M.M.M.M , but i'm not sure which host get which IP

but it is better to configure two interface vlans instead of one with two ranges

also make use of this link about multiple range in same vlan

also i'm not understand how you put two ranges in one vlan

  • do not try to understand it. I have seen worse... segmenting VLAN1 into 10 /24 subnets.... :)
    – kaisero
    Oct 13, 2015 at 8:10
  • Yes, I already know you guys hate having multiple subnets on the same vlan, but could you for once just ignore that and concentrate on the question. The problem is that the DHCP-server just gives out leases on the same subnet as the src address from the helper. Making it i impossible to PXE-boot from the secondary ip range.
    – Peter
    Oct 13, 2015 at 10:57
  • This is how DHCP relay is supposed to work. How else could it work out which subnet you want to use? Oct 14, 2015 at 5:49

If you're on Cisco you could use static mac mapping and ip dhcp smart-relay. This will send 3 requests from the primary interface address, and if the DHCP server doesn't respond (i.e. the MAC isn't in the pool for than subnet on the server), then it will switch the giaddr in the relay request to the secondary address.

If you're not on Cisco, well, this is how DHCP relay is supposed to work.

You could create a large supernet on the DHCP server that encompasses both ranges and then use static MAC mappings for the hosts you want on the second range.

Personally though, rather than perpetuating bad designs with filthy hacks I would concentrate on removing legacy crap from your network ; )

  • Haha. We are removing them.
    – Peter
    Oct 14, 2015 at 7:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.