I have two ISPs on different routers for our home/small office (192.168.1.1 and 192.168.1.2) and I have been trying to figure out how to get the system to automatically failover if one of the ISPs goes down.
I took the step of setting up dhcpd on our in-house server and I can now do this with a simple 2-line change in my dhcpd.conf and then restart the dhcpd process, but I am looking for an automatic way to do this. Specifically, there are two issues I believe:
1) I need a way to have DHCPD automatically switch preferred router/DNS if one of the gateways become unreachable
2) I would also like a way to have the main server network configuration also switchover its gateway and DNS entries using the same DHCP mapping as #1
Before I write some ugly perl script that runs every minute to ping the gateway, edit the dhcpd.conf file, and restart the process and network configuration, if necessary, can someone tell me if there is a better way to do this? This sure seems to me like something Linux DHCPD should be able to do for me...
I am using RHE 3.0 and my dhcpd.conf file currently looks like this:
Code:
default-lease-time 86400;
max-lease-time 86400;
authoritative;
ddns-update-style none;
# most normal devices on our network use the cable routing by default
subnet 192.168.0.0 netmask 255.255.0.0 {
range 192.168.1.50 192.168.1.99;
# default DHCP to cable normally
# option routers 192.168.1.1;
# option domain-name-servers 192.168.1.5, 68.87.66.196;
# switch DHCP to wireless if Comcast is down
option routers 192.168.1.2;
option domain-name-servers 67.72.108.2, 67.72.111.2;
}
Thank you very much for assistance!