hope someone can help, this would be excellent. I’ve ubuntu DHCP server (10.04), which works great (many thanks to everyone who helped me in this excellent forum).
This server has 2 cards, eth0 for DHCP (172.20.32.11) and the other one eth1 (10.0.19.11), it’s basically a Vlan, but acts as access to the internet, the gateway for this Vlan is 10.0.19.5. As mentioned, it works really great, no issues with it.
Anyway, in my HDCP config I had to use eth1 as gateway for eht0, this means in clients devices the e.g ipconfig shows the ip of ethe 1 as gateway (10.0.19.11).
We have over 40 devices which have (must have) static IPs, so the gateway in those devices has to be the IP-address of eth1 (10.0.19.11), which is no problem. Now I need to configure a second ubuntu DHCP, and run them in failover / backup mode. The second server is configured but has to have different IP-Addresses, I use for eth 0 (for DHCP) 172.20.32.12 and for eth 1 10.0.19.12 (like the first one, it’s the same Vlan and acts as access to the internet, the gateway for this Vlan is 10.0.19.5.
The problem is, in case server 1 goes down then all devices with static IPs lose the access to the internet, and that’s logical because they look for eth 1 in server 1 which is down, so I would have to change the gateway in all devices with static IPs to the IP-address of eth1 in the second server.
I’ve tried to use the gateway of the Vlan (10.0.19.5) in DHCP config instead of the ip addresses of the eth 1 but no success.
If I could use the same gateway for both servers (which would be 10.0.19.5) then my problem is solved. I’ve been searching in the net for an idea or solution but really nothing
So, please is there anyway to do this, maybe in the iptables?
The Iptable I am using at the moment is as follows:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
I would appreciate any help, this would be great
Madona