Multiple aliases with dhclient
Sean C. Farley
scf at FreeBSD.org
Thu Aug 30 12:28:34 PDT 2007
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@ [2] and one "sounds correct" from
brooks@ (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
More information about the freebsd-current
mailing list