LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 03: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, 04: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, 05:45 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 05:46 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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



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 01:31 AM
Suse 9 oracle 10g installation DHCP-assigned public IP addresses problem adurmus Linux - Server 1 11-18-2006 10: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 06:33 AM
Server assigned nameserver addresses jrdioko Linux - Newbie 6 10-03-2003 05:10 PM
How to find out my IP address on a DHCP IP Assigned machine? simonh Linux - Networking 2 12-10-2002 05:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:12 PM.

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
Open Source Consulting | Domain Registration