2007-01-6, 12:48(-08), anagnost68:
>
> Stephane CHAZELAS wrote:
>> 2007-01-6, 10:43(-08), anagnost68:
>> > Is there a command I can use to ask the dhcp server which addresses
>> > have been assigned?
>> [...]
>>
>> Have a look at the lease database.
>>
>> Something like /var/lib/dhcp3/dhcpd.leases
>>
>> See dhcpd.leases(5) for details.
[...]
> I don't seem to have those files. I only have these:
>
> dhclient-eth0.leases dhclient.leases
Maybe I misunderstood what you asked. That solution I gave is,
on the machine hosting the DHCP server, a way to get the IP
addresses that the DHCP server has attributed to the clients that
requested IP addresses to it so far (and have not expired).
The full path of the lease database file should be given in the
dhcpd.leases page in the section 5 of the manual (man 5
dhcpd.lease), if not, then somewhere in your dhcp server
documentation.
If you want to know what IP addresses have been assigned to your
(client) machine by some (remote) DHCP server, then those files
(dhclientxxx) will probably do, but so will ifconfig.
--
Stéphane
|