dhclient on a link shared with static IP addresses?
Don Cohen
don-dhclient at isis.cs3-inc.com
Tue Jan 15 18:54:29 UTC 2008
Jeff Sadowski writes:
> does ip addr del $old_ip_address dev $interface
> flush the arp table?
Off hand I don't know, but
- the arp table seems to be extremely short lived in linux anyway
- what harm does an extra arp entry do for a short time?
> ifconfig $interface inet down takes down the device and then when it
> comes back up it takes some switches a good 30 seconds to reconnect
> also it takes wireless some time to reconnect. I've been complaining
> about that command in the scripts for years.
> The argument for it is that it works on more systems other than just
> linux. I think that was the argument at least.
Actually the file I propose to change is specific to linux.
The source distribution contains a client/scripts directory with one
file named linux, and others named netbsd, solaris, etc.
Evidently the installation process copies one of those to
dhclient-script. On my machine I changed dhclient-script, but I
meant to suggest the corresponding change in the distribution to
the file named linux. Maybe corresponding changes for other OS's
would be worth while, but I've not even looked at the others.
> i think you need to also check if $old_ip_address is blank and do some
> stuff if so.
I think if it's blank then the ip addr del will generate an error
message and have no effect, which is probably the right thing.
More generally I agree that what I've sent is far from a patch ready
for distribution. I'm still just trying to make dhclient work for
my current situation.
The purpose of my message was
- to help other people who might have the same problem
- to suggest to those in charge of the distribution that this
would be a worth while direction. If they agree, I'll be happy to
help with the details. If not, it's probably a waste of time for
me to look into all the cases that don't actually affect me.
More information about the dhcp-hackers
mailing list