dhclient on a link shared with static IP addresses?

Jeff Sadowski jeff.sadowski at gmail.com
Tue Jan 15 15:28:56 UTC 2008


does ip addr del $old_ip_address dev $interface

flush the arp table?

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.

i think you need to also check if $old_ip_address is blank and do some
stuff if so.

On Jan 15, 2008 1:55 AM, Don Cohen <don-dhclient at isis.cs3-inc.com> wrote:
>
> Don Cohen writes:
>  > I'm trying to use a single link to connect to two ISPs, one of
>  > which has assigned me a static address.  For the other one I want
>  > to run dhclient.  When dhclient gets the address it deletes my
>  > static address!  Is there a way to tell it not to do that?
>  > I don't see anything in the doc about that.
>  > I can't be the first one who ever wanted to do this, can I?
>
> After downloading and reading the source I think I've found a
> solution.
>
> I've changed dhclient-script to avoid using ifconfig.
>   ifconfig $interface inet 0 down
> =>
>   ip addr del $old_ip_address dev $interface
> (I've not seen that one used yet)
>
> and the normal case that was causing me grief
>   ifconfig $interface inet $new_ip_address $new_subnet_arg $new_broadcast_arg
> => ip addr add ${new_ip_address}/$prefixlen $new_broadcast_arg dev $interface
>
> where I compute $prefixlen from $new_subnet_mask
>
> Perhaps this is how it should be in the distribution?
>
>
>


More information about the dhcp-hackers mailing list