I have an Ubuntu 11.04 server attached to multiple internet connections. My problem is that I cannot get it to reply to pings (and any other requests) from both IP-s, only for the IP I specify the gateway option in the /etc/networking/interfaces file. If I speficy multiple gateways, it seems to choose eth1 over eth3.

MS HyperV Server handles the issue fine.

(We have an IP transition and it would be good if the server had listened for more addressed for a period of time.)

  • Is the firewall blocking ICMP (pings)? Check iptables
    – Tim
    Dec 13 '11 at 3:35
  • I don't think so because I can ping any interface as long as I use one interface only (either eth1 or eth3). (btw. there's no firewall on this server)
    – Csq
    Dec 13 '11 at 3:45

You can't have two default gateways in the same routing table. If you have more than one, the kernel is always going to choose the first default gateway in the table. You are going to have to create multiple routing tables, one for each internet connection, then create rules to choose which table to use for any given packet. This is commonly referred to as "split access". The guide I recommend reading for getting this working is here on lartc.org.


Have you tried turning IP formwarding on?

echo 1 > /proc/sys/net/ipv4/ip_forward

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.