[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lost default gw



On Tue, 2007-05-15 at 14:40 -0700, remigio wrote:
> Hi,
> I've installed Debian Etch (KDE) and I put in rc.local the command:
> 
> ip route add via 192.168.10.254
> 
> for setting the default gw at startup.

This does not set a default route. To set the default route you would
do:

ip route add default via 192.168.10.254

> When the pc starts, using 'ip route' on a shell I can see the route is
> present, but if I wait for a minute the route disappear, likely
> something overwrote the network settings.
> What could be?

If you are using DHCP, your dhcp client is probably setting your default
route.

Assuming you really do want a default route that differs from what you
are assigned via DHCP, it's probably best to do this sort of
configuration in /etc/network/interfaces rather than in rc.local. That
way, you could do something like:

auto eth0
iface eth0 inet dhcp
	post-up ip route add default via 192.168.10.254


-davidc

-- 
gpg-key: http://www.zettazebra.com/files/key.gpg

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: