Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After upgrading to 11.10, my system is "forgetting" the default route to the internet every time the machine gets rebooted. It "remembers" the route to the office (on a second NIC). In my /etc/network/interfaces file I have both NICs configured as static and specify the IP, netmask AND gateway for each. But the gateway for the external NIC is no longer being set at boot time (though it worked perfectly in 11.04).

I'm wondering if it might be related to the "waiting for network configuration" problem that I and others seen. Either way, I need a solution or at least a work-around.

As requested... route -v (after I manually added the eth1 default gateway, of course -- to see it before, imagine the eth1 gateway line missing):

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         216.199.48.57.n 0.0.0.0         UG    0      0        0 eth1
default         192.168.42.1    0.0.0.0         UG    100    0        0 eth0
192.168.42.0    *               255.255.255.0   U     0      0        0 eth0
216.199.48.56   *               255.255.255.248 U     0      0        0 eth1

/etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

# Office network
auto eth0
iface eth0 inet static
        address 192.168.42.4
        netmask 255.255.255.0
        gateway 192.168.42.1

# Internet
auto eth1
iface eth1 inet static
        address 216.199.48.58
        netmask 255.255.255.248
        gateway 216.199.48.57
share|improve this question
1  
Post a route -v output in your question plz. –  Bruno Pereira Oct 24 '11 at 11:59
1  
And /etc/network/interfaces –  psusi Oct 24 '11 at 15:51
    
This question appears to be abandoned, if you are experiencing a similar issue please ask a new question with details pertaining to your problem. If you feel this question is not abandoned, please flag the question explaining that. :) –  Ringtail Feb 27 '12 at 23:21
add comment

1 Answer

By definition "Default" is a unique entity. The "gateway" statement sets the Default Gateway, thus is must be unique inside the file. This scenario requires you set a static route to your private network. Replace the eth0 gateway line with up route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.42.1.

# Office network
auto eth0
iface eth0 inet static
        address 192.168.42.4
        netmask 255.255.255.0
        up route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.42.1
share|improve this answer
    
Thanks! I wish I'd known about that back when I needed it. I'm not trying to belittle your reply, it is just that the problem went away after I went through the upgrade process to 12.04 -- with no change to my /etc/network/interfaces files. But if it returns, I'll definitely give this a try. –  Steve Valliere Jul 23 '12 at 14:03
add comment

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.