11-30-2010 10:35 PM - edited 03-06-2019 02:17 PM
Hi,
Is it possible for DHCP services with same pool and range providing IP's to client in an environment where we have 2 Routers running HSRP.
As i have many client IP conflicts, as the standby router also provides IP to the client. Shouldn't the active router only provide IP addresses.
Thanks in advance.
12-01-2010 01:52 AM
Hi Ramarao,
Have you tried:
"ip helper-address x.x.x.x"
On both your routers, with x.x.x.x being your HSRP address?
Regards,
Jimmy
12-01-2010 01:56 AM
Hi James,
The client able to received IP, no problem with that. The issue is, both of the routers are giving out IP's, shouldn't the active router only giving out IP, as the HSRP is only active in the primary router.
Regards
12-01-2010 02:49 AM
ramarao wrote:
Hi James,
The client able to received IP, no problem with that. The issue is, both of the routers are giving out IP's, shouldn't the active router only giving out IP, as the HSRP is only active in the primary router.
Regards
HSRP only becomes relevant once the client has an IP. Until it does the client simply broadcasts and both routers will see the DHCP request and so both will respond.
If you want to have both routers handing out addresses for the same subnet then you must split the subnet between the routers so that thy cannot hand out the same address eg.
subnet = 192.168.5.0 255.255.255.0
router 1
======
DHCP pool = 192.168.5.1 - 192.168.5.127
subnet mask = 255.255.255.0 <- note you are splitting the subnet but the mask remains the same
default-gateway = 192.168.5.1 <-- this would be the HSRP VIP
you then need to exclude the other half of the subnet from the DHCP pool ie. 192.168.5.128 -> 192.168.5.254
router 2
======
DHCP pool = 192.168.5.128 -> 192.168.5.254
subnet mask = 255.255.255.0
default-gateway = 192.168.5.1 <-- note same dg as pool on router 1
you then have to exclude the other half of the subnet on router 1 ie. 192.168.5.1 -> 192.168.5.127
One last thing, you will also obviously have to exclude any addresses used for HSRP etc. from the relevant DHCP pool.
Jon
12-01-2010 04:23 AM
I see what your saying, I'm now wondering which takes presedence, ip-helper address or the DHCP pool on the router. I've create a thread of my own with similar questions. I thought that if you added the ip-helper address, it would force the request recieved on the standby router to send it to the active router rather than the standby router allocating out an IP address. Although Jons answer is correct, I'm wondering how to fix the issue if you had over 128 users on site but only a /24 subnet which you couldn't change. If only one of the routers was active, the reamining router would only be able to allocate 128 (approx) addresses and thus some users would be unable to be allocated an address.
12-01-2010 04:49 AM
jimmy.hardman wrote:
I see what your saying, I'm now wondering which takes presedence, ip-helper address or the DHCP pool on the router. I've create a thread of my own with similar questions. I thought that if you added the ip-helper address, it would force the request recieved on the standby router to send it to the active router rather than the standby router allocating out an IP address. Although Jons answer is correct, I'm wondering how to fix the issue if you had over 128 users on site but only a /24 subnet which you couldn't change. If only one of the routers was active, the reamining router would only be able to allocate 128 (approx) addresses and thus some users would be unable to be allocated an address.
James
ip helper-address would work only if the DHCP pools were not on the actual routers.
As for your issue there is no easy fix. You must always make sure that each DHCP server has enough addresses for the total number of clients in the subnet. Using multiple DHCP servers is more about having redudancy than spreading the load of handing out addresses.
Jon
12-01-2010 05:11 AM
James
Actually, thinking about it, with an ip helper-address it would also send out a DHCP request to the DHCP server even if there is a locally configured pool. It's just that usually the first offer is accepted so the router would always be quicker to respond than the DHCP server.
Still, the same principle applies as to needing to have enough IPs on each DHCP server for all the clients.
Jon
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