3

I'm configuring HSRP having scenario described in figure below. One gateway is active for one network and standby for other network and vice versa for other gateway. DHCP is configured on both Gateways and clients get automatic IPs. My question is if one Gateway (Switch A) is down other Gateway (Switch B) automatically becomes active for network for whome it is standby. Which DHCP option we need to configure on both Gateways DHCPs so that when Switch B is active and Switch a is down, and another client plugs in to network for which Switch A is active how come Switch B knows which IPs are allready assigned by Switch A and Switch B assign IPs to new clients other than IPs previously assigned by Switch A.

  • 1
    Picture is not uploading. I described scenario here. I have one switch having different VLAN and switch is connected to two gateways. One is active for some VLANs and standby for other VLANs and vice versa. – Kashif Minhas Feb 08 '20 at 14:04

1 Answers1

3

DHCP discovery messages are broadcast on the local network and thus arrive on both gateways running a DHCP server. Both DHCP servers will send an offer and the client will accept one of these. Sometimes the client will accept an offer from the DHCP server runnin on switch A, sometimes it will accept an offer from the DHCP server running on switch B. As both DHCP servers do not exchange any information between each other, two different clients can be given the same IP addresses, one from swithc A and the other from switch B.

This all happens regardless of your HSRP or VRRP configuration. If you want two DHCP servers to be responsible for the same subnet and you want both to exchange lease information with each other you should look at more feature-rich DHCP servers, e.g. Kea from ISC. This will require you to configure IP helper addresses (DHCP relays) on the two switches.

A second option is to have switch A give out IP addresses from a certain range and switch B from a different range. For example, if the subnet is 192.168.1.0/24 then switch A can assign IP addresses from 192.168.1.10-128 and switch B can assign addresses from 192.168.1.129-254.

For better assistance you should share your HSRP/VRRP configuration and your DHCP server configuration.

Tommiie
  • 5,547
  • 2
  • 11
  • 45