05-01-2016 09:31 AM - edited 03-05-2019 03:55 AM
Hi Team,
Can you guide me , how to configure the DHCP failover in cisco switch or router.
Requirement details given as below.
1. One switch will be in active mode for assigning the IP address to the connected devices on the same VLAN.
2. If that switch will go down then other DHCP configured switch will take the role to provide the IP address.
3. DHCP database should be maintained by both Switches ,So that IP conflict should not happen during the fail over ?
05-01-2016 10:49 PM
Hello,
I am not sure if this is correct solution but it should work without problems.
Configure both switches with same DHCP pool.
Cisco devices before assigning IP address at first ping it. When no answer received after 2 pings then IP address is assigned. If ping is successful, then IP address is marked in conflict database and next IP address will be assigned.
So no IP conflicts should happen.
05-02-2016 03:55 AM
05-02-2016 12:12 AM
What Milos is suggesting would work in ideal conditions. However, you can still end up with duplicate IPs as both switches might offer the same IP unused IP address at the same to two different clients.
I am not aware of an H/A/Cluster type feature for DHCP on Cisco devices. What I have done in the past is setup both devices to:
1. Advertise the same IP subnets
2. Exclude the 1st half of the subnets on device 1
3. Exclude the 2nd half of the subnet on device 2
Now, you could potentially use EEM scripts and really run an active/standby type setup but I am not sure if the benefits outweigh the complexity :)
I hope this helps!
Thank you for rating helpful posts!
05-02-2016 05:28 AM
Hi Neno,
Thanks for your reply.
Can you share with me any URL for EEM scripts. i will grateful to you.
Regards
Debadurlav
05-02-2016 10:25 AM
I haven't done the EEM solution myself but I am confident that it would work. You can check the EEM section of this community:
https://supportforums.cisco.com/community/5941/eem-scripting
I hope this helps!
Thank you for rating helpful posts!
05-05-2016 12:57 AM
Thanks neno, I have gone through the URL but unable to found the EEM script for DHCP fail over but any way that is the best URL which you have given to us .Can you have other URL which can met to my requirement. i shall be grateful to you.
Regards
Deba
05-05-2016 05:39 AM
+1 on Neno's comment. I recommend this approach too, split the pool between 2 DHCP servers.
There will be no problems if the ping check does not respond for some reason and the address IS actually already in use. Having the same DHCP pool on 2 servers is just a bit clumsy in my opinion and potentially asking for trouble sometime in the not-too-distant future.
Regards,
Ben
05-05-2016 07:48 AM
Hello
Personally even though you run can dhcp service on cisco doesn't mean you should, I would suggest give you request I would use a dedicated server(wintel/unix) for this and not burden the cisco routers/switchs on such process.
res
Paul
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