DHCP on a per-vlan basis?

Jan 06, 2006 3 Replies

Hi everyone -



Here's a questions thats probably easy and I'm glancing over the answer: is it possible to configure multiple DHCP pools on a router and have them had out addresses to clients on different VLANS without leaving the router?



I've read that you can accomplish this by putting in a seperate DHCP server (either *nix or Windows based) and use helper-addresses to forward to a particular interface on the server, but I was looking to see if its possible to do this on the router (one would assume so with the ability to create multiple pools and sub-interfaces for VLANS).



Any comments/feedback is greatly appreciated. Thanks for your time.



brut-



Like this, do you mean?

! ip dhcp pool net-1 network 192.168.1.0 255.255.255.0 default-router 192.168.1.254 ! ip dhcp pool net-2 network 192.168.2.0 255.255.255.0 default-router 192.168.2.254 ! interface vlan1 ip address 192.168.1.254 ! interface vlan2 ip address 192.168.2.254 !

Aha! That makes sense. I wish the cisco docs explained it a little simpler, but that does make perfect sense.

In order for a router to hand out DHCP for a network, it obviously needs an IP address in that same network to receive the broadcast, and the router would match the network the broadcast was received on with the dhcp pool's "network" statement.

Thanks for making the totally obvious appear before my eyes. Thanks a mil' mate.:)

brut

Not clear. Can you elaborate what you mean?

if i understand you correctly,...

yes

router doesn't forward broadcast by default unless you allow them to. That is why ip helper-address is needed to be configured on the interface. If dhcp request was received by the router and the router has a pool it can give, then it reply to the client without needing to relay. It will know which pool of address to give based on gi add.

Cheers, Jeff

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required