12-23-2021 06:45 AM
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 !!
Solved! Go to Solution.
12-24-2021 03:16 AM
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
02-02-2022 01:15 AM
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 !
12-23-2021 07:54 AM
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 apply the following and test again.
conf t
ip dhcp smart-relay
12-24-2021 12:36 AM
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 !
12-24-2021 03:16 AM
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
02-02-2022 01:15 AM
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 !
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