Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
        address 24.249.108.xxx
        netmask 255.255.255.224
        broadcast 24.249.108.255
        gateway 24.249.108.193

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.

Here is what my route looks like:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
24.249.108.192  *               255.255.255.224 U     0      0        0 eth1
172.16.130.0    *               255.255.255.0   U     0      0        0 eth0
default         wsip-24-249-108 0.0.0.0         UG    0      0        0 eth1
default         plumbco-router. 0.0.0.0         UG    0      0        0 eth0
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The problem here is you have two default gateways.

Unless you are using special routing protocols (BGP, OSPF, etc) then you can only have one gateway.

You will have to set up static routes to other specific networks through the interface that isn't the default.

The default gateway should be the one that connects to the majority of other networks (usually the internet connection, which I assume is eth1).

Also, on a side note, the broadcast address of eth0 is wrong - it should be ..130.. not ..120..

share|improve this answer
    
fixed, but removing the second gateway IP address does not fix it. I am still unable to reach via eth1. –  muncherelli Mar 14 '11 at 14:56
    
Is your sshd set to listen on 0.0.0.0? –  ultrasawblade Mar 14 '11 at 15:08
    
its not just SSH, its everything. I can't even ping it. –  muncherelli Mar 14 '11 at 15:10
    
Where are you pinging it from? Inside the 172.16.130.x network? –  Majenko Mar 14 '11 at 15:45
    
I can't ping the eth1 interface with the Internet Static IP from the internet. –  muncherelli Mar 14 '11 at 15:48
show 21 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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