cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3234
Views
10
Helpful
6
Replies
Highlighted
Beginner

Dual DHCP in router running HSRP

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.

6 REPLIES 6
Highlighted
Beginner

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

Highlighted

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

Highlighted

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

Highlighted

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.

Highlighted

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

Highlighted

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

Content for Community-Ad