[NTLUG:Discuss] Getting eth0 working with Kubuntu--- more info

Rick Cook rickcook at sbcglobal.net
Mon Jan 30 21:10:29 CST 2006


On Monday 30 January 2006 18:31, Wayne Dahl wrote:
> On Mon, 2006-01-30 at 12:11, joseph beasley wrote:
> > Verify that you have a default gateway.  The latest version of
> > ubuntu/kubuntu does not save the default gateway.  (netstat -rn will
> > show the routes.)
> >
> > Yes, I know you put the gateway in, but verify that it is there.
>
> This was it.  Checking with netstat showed no gateway.  I manually put
> it back in again with "route add default gw 192.168.1.100" and here's
> the funny part.  I'm so used to stopping and starting a service after
> making a configuration change, I did a ifdown eth0 followed by an ifup
> eth0, no change in internet access.  Checking with netstat again showed
> no gateway.  I added that gateway again, checked with netstat, now it's
> there.  Apparently, under Kubuntu, if you ifdown/up the nic card, it
> forgets the route.  Without cycling the nic card, I just checked it with
> netstat showing the gateway there and lo and behold, I now have internet
> access.
>
> Now comes the big question.  How do I make it permanent so I don't have
> to jump through this hoop every time I turn on this machine?  I have
> seen no documentation speaking to this "bug" anywhere...and you'd think
> if the latest versions of Ubuntu/Kubuntu don't save the default gateway,
> you'd have a heck of a lot of questions about it.
>

If Kubuntu/Ubuntu keep this part of their Debian heritage, you can add a 
gateway directive to the appropriate ethernet device stanza 
in /etc/network/interfaces. For instance, one of my machines at home has this 
"eth0" stanza:

auto eth0
iface eth0 inet static
        address 192.168.2.10
        netmask 255.255.255.0
        gateway 192.168.2.1





More information about the Discuss mailing list