Date: Tue, 04 Jul 2000 17:42:04 -0700 From: Doug Barton <DougB@gorean.org> To: Greg Lehey <grog@lemis.com> Cc: Samuel Tardieu <sam@inf.enst.fr>, current@FreeBSD.ORG Subject: Re: DHCP does not honor default router? Message-ID: <3962845C.F195E50D@gorean.org> References: <2000-07-04-15-42-11%2Btrackit%2Bsam@antinea.enst.fr> <20000705094217.C97425@wantadilla.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lehey wrote: > > On Tuesday, 4 July 2000 at 15:42:10 +0200, Samuel Tardieu wrote: > > My laptop gets a fixed IP address (137.194.161.7) using DHCP (so that > > I do not have to set up multiple configurations depending on the > > network). > > > > However, even when it receives router information, it does not update > > the routing table: I updated my dhclient script to handle this case, since it happens on the roadrunner network as well. I can send you the patch if you want, but I have a lot of other hacks in my script so it might be confusing. Starting right around line 106 of the default script, I have: if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then # Added: if [ -z "$old_routers"]; then # Assume worst case scenario till we know better $LOGGER "Doing worst case scenario route flush" if [ x$reason = xBOUND ]; then arp -a -d route flush fi fi # End of added stuff ifconfig $interface inet $new_ip_address $new_netmask_arg \ Prior to adding that bit I used to get hung up every time my new IP was on a different network segment, with that and a few other hacks I've had clear sailing for almost a year. FWIW, this is one area where solaris has it better than we do. I can, while telnet'ed into a solaris machine do: route add default 22.33.44.1 route delete default 22.33.55.1 and have it use the old default right up until I delete it, then the new default instantly takes effect. Assuming I have a path to the machine through the new default, I never lose connectivity. Unless I'm missing something, freebsd doesn't allow this. While I'm at it, I prefer their method of aliasing IP's to a nic as well, but I digress. :) Hope this helps, Doug -- "Live free or die" - State motto of my ancestral homeland, New Hampshire Do YOU Yahoo!? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3962845C.F195E50D>