# ifconfig and IP leasing



## sKu.nK (Aug 11, 2002)

Hi all

I have struggled an awful lot to find out much about how to discover "Lease Obtained" and "Lease Expires" information on MAC OS X.

I have scoured the Internet through Google and no-one really seems to know ????? 

Where IS the Leasing information contained for an Ethernet Interface configured through DHCP ?????

I would love to find out the answer to this but am afraid no-one really knows.

Several sites say through ifconfig but none are specific.

I though the information might be contained in /var/db/ but I can't find it.

Is there a *NIX / OS X networking guru out there that knows the answer to this question ??? 

TIA


----------



## lethe (Aug 11, 2002)

> _Originally posted by sKu.nK _
> *
> I would love to find out the answer to this but am afraid no-one really knows.
> *




it s never true that noone really knows.  you just have to hope that someone who knows winds up reading this thread.

anyway, there is a file at /var/db/dhcpclient/leases/_hardware_address_
.  it seems like it should be the file you are looking for, but it only tells you the dhcp IP address, not lease time and all the other information.  i know that under linux there is such a file that contains every peice of information that the dhcp server tells you.

so i don t know where the rest of the infos are.  maybe someone who really knows will show up.


----------



## sKu.nK (Aug 12, 2002)

I have now found this on the Apple Support Site but it still does not answer my question.

There must be a file stored somewhere that contains information regarding the IP Lease and when it expires  

There also must be a command line utility for releasing the IP address???

Is there any open source program I could use?????

http://docs.info.apple.com/article.html?artnum=106879


   

HELP


----------



## lethe (Aug 12, 2002)

i suppose you could use ISC dhcp client daemon.  it is the one that linux usually uses, and i m pretty sure it compiles with no problems on OSX.  the only worry i would have was interference between having two dhcp client daemons.  i would want to disable the default daemon.  this would probably also mean that you would no longer be able to control it from the frontend; you would have to use the command line, maybe something in your rc scripts.

not an ideal solution.  but maybe you want to try it.


----------

