tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: dhclient-script: trying harder to set correct default route
Date: Wed, 10 Feb 2010 20:18:47 +0100
From: Christoph Badura <bad%bsd.de@localhost>
Message-ID: <20100210191847.GL99%irregular-apocalypse.k.bsd.de@localhost>
| Does anyone object to the following patch?
If what is happening is that you're updating an old lease, it is the
obvious correct thing to do, though, in theory, the old default route
should be removed before the attempt is made to install the new one anyway
(that's what I recall the script I uses doing.)
I have a slightly different problem - I have two interfaces, wired, and
wireless, and when wired is available, I generally plug it in (faster
and all that...) - but disabling wireless is too painful, so I just leave
that running as well.
I end up getting default routes from both of them - one after the other
at about the same time. Fortunately (for this patch, for me) for
whatever reason, the wireless one always seems to come first, then
dhclient is unable to install the one from the wired net (so your patch
would be just fine with me.)
If I was unlucky, and the wired one was installed first, and your patch
allowed it to be altered to the other one, I'd be less happy...
(we really need better config with a "default interface preference" or
something, so it is possible to define which interface's default route
is preferred.)
I can't just not ask for the default route from dhcp, as when I start
I have no idea which of the two links will actually work (not all locations
have wireless, not all locations have wires).
M.Drochner%fz-juelich.de@localhost said:
| A possibly related question: I've seen recommendations like this:
| route add -inet6 default ::1
| route change -inet6 default -ifp $int
| at various places (the quote is from the sixxs.net FAQ).
| Can someone explain why this is better than adding the route directly?
The theory (I believe) is that it allows you to specify which interface you
want your default route to run out of (if you have only one, you don't need
that), but then allow router advertisements to actually supply the address of
the available router(s) to use for the default route (ie: you never actually
need to configure the IPv6 (LL) address to use, but you still get to choose
which interface is the right way out of your system.)
If you mean why "route add" and then "route change" - that's just covering
up bugs in the system - route add with an interface has never worked reliably,
but route change always has.
kre
Home |
Main Index |
Thread Index |
Old Index