fixunix
Tags Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

command to list assigned dhcp addresses - Networking

This is a discussion on command to list assigned dhcp addresses - Networking ; Is there a command I can use to ask the dhcp server which addresses have been assigned? Thanks!...


Fix Unix > Linux > Help > Networking > command to list assigned dhcp addresses

Reply
 
LinkBack Tools
  #1  
Old 09-30-2007, 03:22 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default command to list assigned dhcp addresses

Is there a command I can use to ask the dhcp server which addresses
have been assigned?

Thanks!

Reply With Quote
  #2  
Old 09-30-2007, 03:22 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: command to list assigned dhcp addresses

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.

--
Stéphane
Reply With Quote
  #3  
Old 09-30-2007, 03:22 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: command to list assigned dhcp addresses


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.
>
> --
> Stéphane


Thanks.

I don't seem to have those files. I only have these:

dhclient-eth0.leases dhclient.leases

Reply With Quote
  #4  
Old 09-30-2007, 03:22 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: command to list assigned dhcp addresses

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
Reply With Quote
  #5  
Old 09-30-2007, 03:22 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: command to list assigned dhcp addresses

>
> 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.


Thanks.

Actually I want to know what IP addresses the DHCP server has given out
for my whole network, not just my client machine...

Reply With Quote
  #6  
Old 09-30-2007, 03:22 PM
Junior Member
 
Join Date: Sep 2009
Posts: 0
Default Re: command to list assigned dhcp addresses

2007-01-6, 17:43(-08), anagnost68:
>>
>> 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.

>
> Thanks.
>
> Actually I want to know what IP addresses the DHCP server has given out
> for my whole network, not just my client machine...


Then, as said, look up for its lease file.

Again, look at your dhcpd server documentation and
configuration. If it's not in the standard place for your dhcpd
implementation, then its path may be specified by the
configuration, look for lease-file-name in dhcpd.conf.

--
Stéphane
Reply With Quote
Reply

Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easily save a list of addresses as a contact list? unix Mozilla 2 07-29-2008 05:27 PM
Two IP Addresses Assigned to One PC NIC unix TCP-IP 3 11-05-2007 08:51 PM
Re: Mailing list addresses forwarded to bad addresses unix VMS 0 10-10-2007 05:53 AM
Mailing list addresses forwarded to bad addresses unix VMS 0 10-10-2007 05:53 AM
How to maintain both DHCP and PPPoE assigned IP Addresses unix Programmer 2 10-04-2007 06:43 PM


All times are GMT. The time now is 09:38 AM.