DHCP on a per-vlan basis?

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-

Reply to
brut
Loading thread data ...

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 !

Reply to
Martin Gallagher

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

Reply to
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

Reply to
jefflin.choi

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.