[RndTbl] dhclient-exit-hooks

Adam Thompson athompso at athompso.net
Thu Jan 2 17:38:49 CST 2014


On 14-01-02 01:15 AM, Trevor Cordes wrote:
> Yet another obscure problem.  /etc/dhcp/dhclient-exit-hooks is supposed to
> run (if it exists) after dhclient has accepted a new DHCP IP from your ISP
> and done all its stuff.  One would assume that would include setting the
> IP on your actual interface.
RTFM:  dhclient-script(8).
The exit hooks are supposed to get called at every step of the DHCP 
process, and you should examine - at least - ${OPERATION} to determine 
what stage you're at before assuming that the new IP has already been 
assigned and bound to the interface.

In other words, what you're seeing is the expected (i.e. correct) behaviour.

> Secondly, debug testing this will be very difficult because our Shaw IP's
> change so infrequently.  I suppose I could "trick it" by switching NICs
> and/or changing my NIC's MAC.  I've never done that before, is that easy
> and safe?

...or just put a DHCP server of your own in front of the system you're 
testing.  Changing the MAC address will cause the cable modem (usually) 
to stop forwarding packets after the 2nd change, at least until you 
reboot the cable modem.

-- 
-Adam Thompson
  athompso at athompso.net
  Cell: +1 204 291-7950
  Fax: +1 204 489-6515



More information about the Roundtable mailing list