cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5690
Views
0
Helpful
8
Replies

DHCP failover Configuration in cisco Switch

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 ?

8 Replies 8

Milos Megis
Level 3
Level 3

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.

Yes. I confirm. I did so.

nspasov
Cisco Employee
Cisco Employee

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!

Hi Neno,

Thanks for your reply.

Can you share with me any URL for EEM scripts. i will grateful to you.

Regards

Debadurlav

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!

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

+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

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


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
Review Cisco Networking for a $25 gift card