Multiple aliases with dhclient

From: Sean C. Farley <scf_at_FreeBSD.org>
Date: Thu, 30 Aug 2007 14:28:07 -0500 (CDT)
Here is a simple patch[1] that protects existing IP's on an interface
from being erased by the dhclient during the PREINIT stage.
dhclient-script (the real culprit) replaces the first IP on an interface
with this line:

ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up

My solution is to have this be declared an alias, so existing IP's will
stay even after the script replaces this entry with the obtained IP.
This is needed, at least by me, to have multiple aliases on an interface
that's primary IP is obtained by DHCP.  Also, dhclient only supports
having one alias on an interface via dhclient.conf.

I heard no complaints from net_at_ [2] and one "sounds correct" from
brooks_at_ (thank you), but I still wonder if there is something I am not
considering that would cause problems for other people.

Sean
   1. http://www.farley.org/freebsd/tmp/dhclient-script.patch
   2. http://lists.freebsd.org/pipermail/freebsd-net/2007-August/015155.html
-- 
scf_at_FreeBSD.org
Received on Thu Aug 30 2007 - 17:28:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:17 UTC