I have two networks on a server. One being my internal network, and the other being an external IP address. This is on Debian Lenny. Here is my /etc/network/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static

auto eth1
iface eth1 inet static
        address 24.249.hidden ipaddy
        broadcast 24.249.hidden broadcast.255
        gateway 24.249.hidden gateway

I can reboot my system and sometimes eth1 is accessible from SSH, and other times eth0 is accessible. Then sometimes eth1 will just stop being pingable alltogether. This is a fairly fresh install of Debian, and the only thing I have running is VMWare Server 2.0, bridged to both of my network connections.

  • Could you add the output of "netstat -r" (or "ip route") under both (or all) situations? The default route may have something to do with this. Running "ifconfig" on the interfaces may also give you a hint. You've included what ought to happen, but you should look at what really happens. – Bruce Ediger Mar 14 '11 at 17:03
  • gemini:~# netstat -r Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface * U 0 0 0 eth1 * U 0 0 0 eth0 default wsip-24-249-108 UG 0 0 0 eth1 – muncherelli Mar 14 '11 at 17:29
  • Where does the gateway on your internal network go? Unless the server needs outbound access beyond your internal gateway you won't need it if your on the same local network internally, but based on your output of netstat -r your routing tables look correct and shouldn't effect inbound access. When you have multiple network interfaces Linux will correctly add routes, the only issue is the default route which is correctly assigned to eth1. Also, when you say eth1 will just stop being pingable, is it that way when you boot up or does the interface drop after already being pingable? – Deleted Account Mar 15 '11 at 17:11

You've defined a gateway on both interfaces. So there is a default route through both interfaces. I'm not sure what exactly happens in this case, but I doubt this is what you intended. I suspect that only a smaller network should be accessible through eth0. You can do this by changing the corresponding stanza like this:

iface eth0 inet static
    up route add -net gw eth0

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.