Subject: Re: dhclient vs. a preexisting default route - PR#22418
To: Alan Barrett <apb@cequrux.com>
From: Arnaud Lacombe <lacombar@gmail.com>
List: tech-userlevel
Date: 10/18/2006 06:38:31
On Sat, Oct 07, 2006 at 10:07:14AM +0200, Alan Barrett wrote:
> On Fri, 06 Oct 2006, Jeff Rizzo wrote:
> >  - do we want a DHCP-supplied default route to override?  Most of the
> > time it's desireable, but I could see an argument against it.
> 
> Does dhclient.conf provide enough configurability for this?  For
> example (syntax might be slightly wrong, but you get the idea):
> 
>     supersede routers 10.9.8.7; # I know better than the DHCP server
>     prepend routers 10.9.8.7;   # Try my router first.
>     append routers 10.9.8.7;    # Try my router last.
> 
> >  - if DHCP overrides, is it OK to implicitly change the behavior from
> > "first router is chosen" to "last router is chosen"?
> 
> Ideally, they should all be used in some sort of load sharing or
> failover scheme.  But, while we don't have that, I think the first one
> should win.
> 
In fact, I proposed the patch not to have to re-set manually the default
route each time I run dhclient (which is real PITA, and also a source of
trouble).

I have now at least three possible way to get access to Internet, 2
wireless, by using wpa or vpnc, and one wired, each methods use dhcp and
have a different network setup (address, mask, default route, etc).

I'm sure that other people are in my case (at least all people who runs
netbsd on their laptop and have a great mobility [yes, that's not so
much people, but anyway :)]).

I just thought at a situation where this would be a problem for more
"static" host: imagine that an host get a lease, then when it expires,
the dhcp server send a new lease with a new default router. With the
current configuation, the default router won't be updated and it might
introduce some problem.

Is there any argument to keep the current configuration ?

regards,

 - Arnaud

ps: btw, I didn't check, but resolv.conf should be updated when a new
instance of dhcp is launched, which makes the network setup quite
"inconsistent" (ie. new DNS address with old router address).