Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHCP info

Status
Not open for further replies.

redwhip

Technical User
Apr 29, 2003
96
GB
Hi

Would someone please tell me how I can display DHCP information on a RedHat client. When I use ifconfig it only gives the ip address status and gateway address. I need to display lease and DNS server info as well.

Thanks
 
Depending on if you are using [tt]dhclient[/tt] rather than the old [tt]dhcpcd[/tt], the lease files are by default contained in [tt]/var/lib/dhcp[/tt].

//Daniel
 
Ok this ones a guess, I'll test on my dev box shortly, but in the meantime:

A good place to start is in the /proc "virtual" file system. You understand what /proc is about?

Ok /proc is a virtual file system of all the running process of your server, it is dynamically built as the system runs up, you (as root) can modify the files within /proc but any mods will be lost on re-boot.

But getting back to your question try: more /proc/net/* and see what's recorded there?

Good Luck
Laurie.
 
The DNS info is stored in /etc/resolv.conf

Also look in /etc/sysconfig/networking/profiles/default/


All the dhcp lease information should be in those files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top