LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2007, 12:46 PM   #1
Richtown
Member
 
Registered: Apr 2006
Location: Portsmouth
Distribution: CentOS & Ubuntu
Posts: 49

Rep: Reputation: 15
Question DHCP Client IP


Hi,

I'm running a dhcpd server on my CentOS 4.4 system. I want to be able to write a script in PHP that will list all client IP Addressess connected to my server. I'm not to sure how to do this.

Is there a file in linux that stores the client IPs connected to the server? Or could i write a script to do this in PHP.

If any hels my dhcpd.conf file:

default-lease-time 86000;
max-lease-time 86000;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.124;
option domain-name-servers 192.168.1.124;
ddns-update-style none;
subnet 192.168.1.0 netmask 255.255.255.0{
range 192.168.1.150 192.168.1.160;

I'm wondering if there is a file storing the client IP Addresses, if so then i could simply display this file in PHP. But i'm not to sure so any advise is gratful.

Thanks Rich,
 
Old 04-20-2007, 12:59 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
The leases database should be located at:

/var/lib/dhcpd/dhcpd.leases

It has been awhile, but I don't think the contents of that file is suitable for what you are asking for. You would need to parse it a bit to get just the information you are looking for without all the other information and values cluttering it up.
 
  


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
DHCP server and DHCP client in same box Eicos Linux - Networking 3 03-03-2007 01:28 PM
dhcp client not getting IP from dhcp server jkmartha Linux - Networking 2 06-17-2005 08:12 AM
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 05:18 AM
how can a DHCP client get the DHCP server IP? AshesOfTime Linux - Networking 3 11-24-2004 06:50 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:02 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