Multiple aliases with dhclient



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@xxxxxxxxxxx
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Marvell 88E80856 switching from static to dhcp configuration all on its own
    ... This is an Etch AMD64 install, but I have added the 2.6.25-amd64 kernel as I could not get the Marvell controller to work at all with the 2.6.18 kernel. ... Then when the dhclient thinks the lease has expired, ... Especially on that interface as it was not chosen as the default interface during install, and that's the only interface I've had configured to use dhcp at any time. ...
    (Debian-User)
  • Re: dhclient and wpa_supplicant
    ... > My biggest outstanding complaint is when booting with a wired network ... > and no present wireless network, if dhclient has any recorded leases for ... which interface gets the default route. ...
    (freebsd-current)
  • Re: STEP 2, fixing dhclient behaviour with multiple interfaces
    ... > be used with one interface, ... > Too this functionality to dhclient, there is only one way to do it. ... You can get omshell working without auth over tcp/ip - I managed this ...
    (freebsd-current)
  • Re: Binding dhclient to a particular network interface
    ... I tried adding the interface line to the dhclient configuration file (and ... Entering the "sockstat -l4" command ... Then reboot or alternatively restart your network and you should finding ...
    (freebsd-questions)
  • Re: Default route doesnt change to wireless device (ath0)
    ... We've actually done away with the regex in HEAD and are using interface ... > is always run before dhclient has a change to start. ... If you want to forcably set the default route via dhclient, ... > + it really should be in the handbook. ...
    (freebsd-current)