I want to setup a cisco router to be a DHCP relay but i want to answer dhcp requests locally if the DHCP Relay request won't answer.
In the other word, I want to setup a dhcp relay with fail safe(Which assign ip from its own DHCP pool)
I want to setup a cisco router to be a DHCP relay but i want to answer dhcp requests locally if the DHCP Relay request won't answer.
In the other word, I want to setup a dhcp relay with fail safe(Which assign ip from its own DHCP pool)
You can do that with an event and an ip sla to remove the commands on the failover detection. From there I'd configure conflict detection on your primary DHCP, and possibly split scope as defined in the article below.
The below example would probably need to be modified slightly but should work simply enough.
ip sla 10
icmp-echo DHCP-SERVER-IP
timeout 200
frequency 5
ip sla schedule 10 life forever start-time now
track 1 rtr 10 reachability
event manager applet PRIMARY-DHCP-OFFLINE
event track 1 state down
action 5.0 cli command "enable"
action 5.1 cli command "conf t"
action 5.3 cli command "ip dhcp excluded-address 10.10.10.1"
action 5.4 cli command "ip dhcp pool backup"
action 5.5 cli command "network 10.10.10.1 255.255.255.0"
action 5.6 cli command "default-router 10.10.10.1"
action 5.7 cli command "lease 0 12"
action 5.8 cli command "exit"
action 5.9 cli command "end"
event manager applet PRIMARY-DHCP-ONLINE
event track 1 state up
action 6.0 cli command "enable"
action 6.1 cli command "conf t"
action 6.2 cli command "no ip dhcp pool backup"
action 6.3 cli command "no ip dhcp excluded-address 10.10.10.1"
action 6.4 cli command "end"
If your primary DHCP server is windows the below article for configuring split scope which would ensure the server doesn't tromp over any IPs the DHCP
https://blogs.technet.microsoft.com/teamdhcp/2009/01/22/how-to-configure-split-scope-using-wizard/
You would also want to configure duplicate IP detection on windows just in case as well.
https://technet.microsoft.com/en-us/library/dd183587(v=ws.10).aspx