Results 1 to 7 of 7

Thread: Command to retrieve dhcp lease information?

  1. #1
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    1,273

    Default Command to retrieve dhcp lease information?

    Hi All,

    Wondering if there is a command that shows the relevant dhcp lease info in openSUSE (lease time, which dhcp server gave the lease, etc).

    It's one thing to look at the dhclient-xxx.lease files in /var/run but I was hoping there is a command that shows a summary on all cards.

    Thanks for your input,
    Wj
    Have a lot of fun!

  2. #2
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: Command to retrieve dhcp lease information?

    Here's my drive-by thought:
    Have a look in the file /etc/dhclient.conf
    Mine has 3600 in there for lease time. I don't know what that means or whether that's relevant in your case.
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  3. #3
    Join Date
    Jun 2008
    Location
    Australia
    Posts
    103

    Default Re: Command to retrieve dhcp lease information?

    No answer for you Magic31. But this is a common request. A DHCP plugin akin to the M$ Server plugin. An ability to easily veiw current leases and their default times etc.

    It would only need to be a front end for the .conf file. But a handy one at that.

    Some of the info is available in the YAST>DHCP Server module...but more would be nice....
    if it aint broken...dont let me near it

  4. #4
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    1,273

    Default Re: Command to retrieve dhcp lease information?

    Hi Two,

    Thanks for your replies. I'll give some more searches on this but I think your comment is on the money saltyp & sorry swerdna, not totally what I meant.
    Guess it's one of those things that might pop up one of these days now Linux is getting a stronger user base. *wish mode*

    Now if only I had those programing skills...

    Like your signature btw saltyp! What a little self-knowledge can do!! lol

    Cheers,
    Wj
    Have a lot of fun!

  5. #5

    Default Re: Command to retrieve dhcp lease information?

    dhcpcd -T eth(n)

    Will ouput some stuff like LEASETIME='86400

    then
    dhclient

    will give renewal in
    bound to 192.168.0.0 -- renewal in 12345 seconds

    Some time maths and a little scripting I guess its possible. I'm presuming both commands are on Suse.
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

  6. #6
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    1,273

    Default Re: Command to retrieve dhcp lease information?

    Hi FeatherMonkey,

    The commands are on (open)suse, the 'dhcpdc -T' command is a nice option to list dhcp options you would be getting, but does not retrieve the current values.
    Nevertheless an interesting option.

    As for the dhclient... I think running this disturbs the current link configuration, something I want to avoid in this case.

    Thanks for the feedback,
    Wj
    Have a lot of fun!

  7. #7

    Default Re: Command to retrieve dhcp lease information?

    Ok after this I step out I'm no networking guru it all confuses me. It seems you're correct from reading the man but this lead to this on my system

    cat /var/state/dhcp/dhclient.leases

    Perhaps this helps.
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •