0

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

2
  • IMO, the best solution is creating a cluster with your two servers. The problem is you can't setup two routes to the same target/network (default gateway or more generally any route).
    – Pyrophorus
    Aug 18, 2014 at 12:02
  • Hi Pyrophorus, thanks for your reply, what do you mean with "creating a cluster with your two servers" please? thanks
    – madona33
    Aug 18, 2014 at 12:07

1 Answer 1

0

IMO, the best solution is creating a cluster with your two servers. The problem is you can't setup two routes to the same target/network (default gateway or more generally any route).

Clustering is grouping some computers which are seen by other as a single huge one. This can be used to achieve 'high availability' which I think, is your goal. Maybe you could take a look into this introduction to clustering particularly the 'High Availability Software' section. It contains a link to Linux HA software, which probably can do exactly what you want. Other solutions exist, of course.

I can't tell you more, because I have no real experience of these configurations.

Hope this helps anyway... :-)

1
  • Many many thanks Pyrophorus, you are a star. Madona
    – madona33
    Aug 18, 2014 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .