03-19-2012 03:28 AM - edited 03-04-2019 03:42 PM
Hi All;
Is it possible to have a DHCP server per each interface on the router? Or ability to have two DHCP Servers per router, where each DHCP to be associated with one network Interface?
From the other side, the DHCP server at the router, if I have a VLANs on the switches and there is ip helper command to send for the DHCP, this DHCP at the router (like 887-K9 router or 1941), it can give different ranges (for each VLAN, to give a range of IPs)?
Regards
Bilal
03-19-2012 03:35 AM
Yes, use different pools each with unique subnets, use exclude statements to keep the router from offering the addresses you choose.
ip dhcp excluded-address 172.16.1.100 172.16.1.103
ip dhcp excluded-address 172.16.2.100 172.16.2.103
!
ip dhcp pool 0
network 172.16.0.0 /16
domain-name cisco.com
dns-server 172.16.1.102 172.16.2.102
netbios-name-server 172.16.1.103 172.16.2.103
netbios-node-type h-node
!
ip dhcp pool 1
network 172.16.1.0 /24
default-router 172.16.1.100 172.16.1.101
lease 30
!
ip dhcp pool 2
network 172.16.2.0 /24
default-router 172.16.2.100 172.16.2.101
lease 30
Sent from Cisco Technical Support iPad App
03-19-2012 03:47 AM
Thanks alot.
And how to let these pools to be used per Interface? So if the request for IP came via the Interface 0 then to use pool 0 and if it came via Interface 1 then to use pool 1 and so on?
Regards
Bilal
03-19-2012 07:42 AM
Bilal
The use of the DHCP pool works by matching the address range of the pool with the address of the sending interface. So with helper address the router looks at the IP address of the sending interface and looks for a pool that matches that address. Or if the DHCP request is generated on a local subnet then the router looks at the IP address of the local interface which received the request.
So if a DHCP request comes to the router and the address of the interface were 172.16.0.1 then the router would use pool 0. And if the address of the interface were 172.16.1.1 then it would use pool 1. And if the address of the interface were 172.16.2.1 then it would use pool 2.
The example from Todd is nice in showing configuration of different pools that specify different combinations of parameters. One thing to clarify in his example is in pool 0. He gives this for the network
network 172.16.0.0 /16
but to work with the other pools in the example it really should be
network 172.16.0.0 /24
HTH
Rick
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide