How to see the Assighned IP addresses by RHEL LINUX DHCP Server

RAMU CH
RAMU CH used Ask the Experts™
on
HI,

We have configured Linux DHCP server in RHEL 5.3.
We need to see the assigned IP addresses to the Hosts and
trouble shoot document related to DHCP issues
DHCP leases etc

Regards
Ramu
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
have you tried this - # grep dhcp /var/log/messages
or this - cd /var/lib/dhcpd

this command will show you  -  cat dhcpd.leases

or this command will edit  -  nano dhcpd.leases

Author

Commented:
Quick replies..

That what we looking from you..

Thanks , will try and confirm you

Regards
Ramu
Software Developer
Commented:
There's a utility dhcpstatus which might be just what you want. Here is some sample output
06:59:49$ dhcpstatus -s 192.168.0.0|egrep -v 'FREE|^$'
DHCP Subnet Information:  
Subnet: 192.168.0.0
Netmask:        255.255.255.0
Broadcast:      192.168.0.255
Router: 192.168.0.120
DNS servers:    192.168.0.120
WINS servers:
IP range:       192.168.0.1 - 192.168.0.254
IP address: 192.168.0.1
IP address: 192.168.0.2
IP address: 192.168.0.3
IP address: 192.168.0.4
IP address: 192.168.0.7    Lease status: Active    Lease start: 16/08/2011 19:42:04
Lease end: 23/08/2011 19:42:04    Mac address: 00:1a:4d:95:5b:0b
WINS name: hamishquad
IP address: 192.168.0.120
IP address: 192.168.0.214    Lease status: Active    Lease start: 22/08/2011 19:42:52
Lease end: 29/08/2011 19:42:52    Mac address: 1c:6f:65:c5:19:2a
WINS name: Hamish-Comp2
IP address: 192.168.0.219    Lease status: Active    Lease start: 22/08/2011 10:56:17
Lease end: 29/08/2011 10:56:17    Mac address: 00:24:be:d8:97:89
WINS name: JoeRoe-VAIO
IP address: 192.168.0.220    Lease status: Active    Lease start: 22/08/2011 18:35:38
Lease end: 29/08/2011 18:35:38    Mac address: 6c:f0:49:76:2d:8a    WINS name: Andrew-PC
07:00:43$ 

Open in new window

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial