LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2012, 04:58 PM   #1
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Rep: Reputation: 0
find assigned dhcp addresses


If I am running a dhcp server, how do I find what IP addresses have been assigned to connected computers?
 
Old 03-20-2012, 05:35 PM   #2
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
Code:
arp -n
worked
 
Old 03-20-2012, 06:45 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
While that gives you a result it may not be just addresses that have been handed
out by your dhcp server; clients could have hard-coded IPs that happen to match
your subnet/netmask, and you'd see them in your arp table irrespective of how
they acquired those IPs.

Depending on which dhcp server daemon/process you're using you should be able
to parse current leases out from its log-/status files.

For the isc dhcp-server look at dhcp.leases.



Cheers,
Tink
 
Old 03-20-2012, 06:46 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,247

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
Actually, section 20.2.2 gives the answer http://www.linuxtopia.org/online_boo...lease-database
Quote:
On the DHCP server, the file /var/lib/dhcpd/dhcpd.leases stores the DHCP client lease database.
...
...
arp shows what MAC/IPs are currently cached by the arp table in the kernel http://linux.die.net/man/8/arp.

Not quite the same thing
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What two IP addresses could never be assigned to any host computer? turbomen Linux - Newbie 2 11-16-2010 02:31 AM
Suse 9 oracle 10g installation DHCP-assigned public IP addresses problem adurmus Linux - Server 1 11-18-2006 11:48 PM
eth0 ip assigned by dhcp , how would i know the ip address of the dhcp server where.. kublador Linux - Networking 14 05-16-2006 07:33 AM
Server assigned nameserver addresses jrdioko Linux - Newbie 6 10-03-2003 06:10 PM
How to find out my IP address on a DHCP IP Assigned machine? simonh Linux - Networking 2 12-10-2002 06:49 AM


All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration