Double default gateway ubuntu server

Posted by Elena on Server Fault See other posts from Server Fault or by Elena
Published on 2010-01-18T15:46:51Z Indexed on 2010/03/26 5:03 UTC
Read the original article Hit count: 732

Hi, I've just installed an Ubuntu server 9.10 on an EEEBox. This is my /etc/network/interfaces

# The loopback network interface 
auto lo
iface lo inet loopback

auto wlan0 iface wlan0 inet static 
address 192.168.48.16 
netmask 255.255.248.0 
wireless-essid mynet

auto eth0
iface eth0 inet static
address xx.xx.xx.xx
netmask 255.255.255.224
gateway xx.xx.yy.yy

When I restart /etc/init.d/networking, I can access the eth0 ip address from the internet and I can ping the machines in my wifi network mynet. Everything works fine and I have one default gateway.

But after some time if I check again the route I just find two default gateways: one is correct and is the previous one, but the other is the one of the wifi network.

I have a quite low signal of mynet where my server is and sometimes the wifi just disconnect and then reconnect again. Then I think that this can be a problem and the dhcp of the wifi net, when reconnecting it also add a default gateway. Any idea on how to resolve this issue?

© Server Fault or respective owner

Related posts about ubuntu-server

Related posts about ubuntu-9.10