[NTLUG:Discuss] dhcpcd guestion

Richard Geoffrion ntlug at rain4us.net
Tue Aug 13 22:26:35 CDT 2002


Fred James wrote:
> Confirmed - not Netware
>


Ok..I've just read up through this entire thread.  phew..

Let me get this straight.  You WANT a different IP address but not
necessarily from the same DHCP server.  You want to get a work ip address at
work, and a home address at home.

DHCP clients will request the last ip address they were assigned.  So if you
shutdown the computer, the address you had at shutdown will once again be
requested next time the dhcpcd is run.

With Windows 9x clients, this can present a major boot up delay as the dhcp
client process uses previously stored information to contact what it thinks
is the dhcp server.  This can be quite frustrating.  It is best to always
release your win32 ip address before leaving a network so that the win-dhcp
client will broadcast for a dhcp server as soon as it's run.

Now....take this to the Linux world.  If you 'man dhcpcd' you will find
entries like the following two.  (they were buried in there but I knew what
I was looking for...)

<ConfigDir>/dhcpcd-<interface>.info
              file in which dhcpcd saves the host information. The word
<interface> is actually
              replaced with the network interface name like eth0 to which
dhcpcd is attached.

<ConfigDir>/dhcpcd-<interface>.cache
              Cache  file  containing the previously assigned IP address and
some other things.
              The word <interface> is actually replaced with the network
interface  name  like
              eth0 to which dhcpcd is attached.


In MY case,  I have

/etc/dhcpc/dhcpcd-eth0.cache
/etc/dhcpc/dhcpcd-eth0.info
/etc/dhcpc/dhcpcd-eth0.info.old
/etc/dhcpc/dhcpcd-eth0.exe

..... SooOOOoOooo.....

I would suggest one of two actions.  Issue a dhcpcd -k before leaving one
location, and it that doesn't work, add 'rm /etc/dhcpc/dhcpcd-ethX.*' to
your shutdown script.

(I'd try it now, but a) I have a server that has to stay live...and b)  I'm
trying to keep my stupid attbi non-business-business ip address from
changing..  So I'm actually using the '-s 11.22.33.44' option to KEEP my
"permanently assigned' dhcp'ed address.  The attbi @home dhcp server keeps
wanting to give me random numbers....and well, that just won't fly...but
that's my problem.)

Oh hey....that gets me to think'in...what if you could specify WHICH dhcpcd
script to run?  You could request each address as needed.  Well, that's a
third option...and not a very good one at that....

/dev/rtcg





More information about the Discuss mailing list