cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
883
Views
5
Helpful
4
Replies

Dual DHCP in router running HSRP - Loadsharing not working

GabSCHPro
Level 1
Level 1

Hello everyone,

 

I'm asking a question that has already thousand threads, but I found a strange behaviour at some point.

 

Here is the situation: two routers configured with HSRP (Virtual IP), they have the same DHCP pool, but one router excludes the first half of the range, and the second router excludes the second half of the range:

 

ROUTER A:

ip dhcp excluded-address vrf GUEST 172.16.122.1 172.16.122.10 (HSRP reserved IP)

ip dhcp excluded-address vrf GUEST 172.16.123.1 172.16.123.255
!
ip dhcp pool GUEST
vrf GUEST
network 172.16.122.0 255.255.254.0
default-router 172.16.122.1
dns-server 8.8.8.8
lease 0 12
!

ROUTER B:

ip dhcp excluded-address vrf GUEST 172.16.122.1 172.16.122.255
!
ip dhcp pool GUEST
vrf GUEST
network 172.16.122.0 255.255.254.0
default-router 172.16.122.1
dns-server 8.8.8.8
lease 0 12
!

However, even if DHCP broadcast has nothing to do with HSRP Active router, I noticed that it is always the same router leasing the IP, the router with the HSRP Active state.

Once the pool of the Active router went full, the second router's DHCP pool didn't take over !

If HSRP is disbaled, DHCP can work properly on both routers.

 

Is it possible that, one router being more "fast" than the other, always answer first ?

Is it possible that this fastest router, once full, reply first with a DHCP NAK message to the client, that give up the DHCP process ?

 

Any help would be really appreciated.

 

Thanks !!

 

 

 

 

 

 

2 Accepted Solutions

Accepted Solutions

Hello


@GabSCHPro wrote:

Hi @paul driver,

Can you detail what's wrong with my exclusion scopes ?

 


I think it should look like this:

router A
ip dhcp excluded-address vrf GUEST 172.16.122.1 172.16.122.10
ip dhcp excluded-address vrf GUEST 172.16.123.0 172.16.123.254

router B
ip dhcp excluded-address vrf GUEST 172.16.122.1 172.16.122.255

 

Note: Whatever server answers first should allocate addressing, if one of the scopes is exhausted then addressing SHOULD still be allocated via the other scope if ips are available


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

Hello @paul driver 

 

Sorry for this late reply.

 

Your configuration is the correct one.

 

However, we had a bad configuration on the WLC too:

WLC had SVI with ip helper-address to the HSRP VIP.

This was useless as it is a L2 VLAN between WLC and DHCP routers.

So each DHCP request were sent to the active HSRP router, and load balancing was not working.

After deleting the ip helper-address, everything works fine.

 

Weirdly, we already used the ip helper-address with AirOS WLC (3504, 5508, etc.) and it was working correctly...

 

Again thanks for your help !

 

 

View solution in original post

4 Replies 4

Hello

@GabSCHPro wrote:

Once the pool of the Active router went full, the second router's DHCP pool didn't take over !

Your exclusion scopes do not look correct, you need to exclude the each other dhcp pool active scope.


Also a
pply the following and test again.

conf t
ip dhcp smart-relay 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi @paul driver,

Many thanks for your reply !

 

Can you detail what's wrong with my exclusion scopes ?

ROUTER A:

ip dhcp excluded-address vrf GUEST 172.16.122.1 172.16.122.10 (HSRP reserved IP)

ip dhcp excluded-address vrf GUEST 172.16.123.1 172.16.123.255
!
ip dhcp pool GUEST
network 172.16.122.0 255.255.254.0
!

ROUTER B:

ip dhcp excluded-address vrf GUEST 172.16.122.1 172.16.122.255
!
ip dhcp pool GUEST
network 172.16.122.0 255.255.254.0

 

Router A has pool 172.16.122.10 - 172.16.122.255 while Router B has pool 172.16.123.1 172.16.123.255

 

Also, regarding the option "ip dhcp smart-relay" , it seems to be only useful when you have two DHCP servers located in different subnets, using the command "ip helper-address" on your SVI interface.

 

In my case, I have two DHCP servers (my routers) in a single subnet using HSRP.

 

Anyway, I will try to reproduce the issue with this command as soon as possible.

 

Thanks !

 

 

Hello


@GabSCHPro wrote:

Hi @paul driver,

Can you detail what's wrong with my exclusion scopes ?

 


I think it should look like this:

router A
ip dhcp excluded-address vrf GUEST 172.16.122.1 172.16.122.10
ip dhcp excluded-address vrf GUEST 172.16.123.0 172.16.123.254

router B
ip dhcp excluded-address vrf GUEST 172.16.122.1 172.16.122.255

 

Note: Whatever server answers first should allocate addressing, if one of the scopes is exhausted then addressing SHOULD still be allocated via the other scope if ips are available


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello @paul driver 

 

Sorry for this late reply.

 

Your configuration is the correct one.

 

However, we had a bad configuration on the WLC too:

WLC had SVI with ip helper-address to the HSRP VIP.

This was useless as it is a L2 VLAN between WLC and DHCP routers.

So each DHCP request were sent to the active HSRP router, and load balancing was not working.

After deleting the ip helper-address, everything works fine.

 

Weirdly, we already used the ip helper-address with AirOS WLC (3504, 5508, etc.) and it was working correctly...

 

Again thanks for your help !

 

 

Review Cisco Networking products for a $25 gift card