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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message