Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: dhcp address

  1. #1
    Join Date
    Dec 2010
    Beans
    211

    dhcp address

    How do I find the DHCP address that my desktop is using?

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: dhcp address

    Run this from a terminal:

    Code:
    ifconfig
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Dec 2010
    Beans
    211

    Re: dhcp address

    which one is the DHCP address?

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: dhcp address

    If you are asking about the IP address you got from DHCP, it is listed after "inet addr:"

    http://en.wikipedia.org/wiki/Ifconfig
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    Dec 2010
    Beans
    211

    Re: dhcp address

    I just want the IP address of the DHCP server.

  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: dhcp address

    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #7
    Join Date
    Dec 2010
    Beans
    211

    Re: dhcp address

    i tried this and it told me that it doesn't exist.

    i am running 12.0.4.

  8. #8
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: dhcp address

    Try this:
    Code:
    cat /var/lib/dhcp/dhclient.leases
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  9. #9
    Join Date
    Apr 2012
    Beans
    7,066

    Re: dhcp address

    I think it's now

    Code:
    /var/lib/dhcp/dhclient.<iface>.leases
    where <iface> is the interface you want to know the lease for; e.g.

    Code:
    $ tail /var/lib/dhcp/dhclient.wlan0.leases
      option subnet-mask 255.255.255.0;
      option routers 192.168.1.1;
      option dhcp-lease-time 86400;
      option dhcp-message-type 5;
      option domain-name-servers 192.168.1.1;
      option dhcp-server-identifier 192.168.1.1;
      renew 3 2013/02/20 14:15:29;
      rebind 4 2013/02/21 01:01:27;
      expire 4 2013/02/21 04:01:27;
    }

  10. #10
    Join Date
    Dec 2010
    Beans
    211

    Re: dhcp address

    Now this works with the server, but how would I find out the DHCP address that the client is contacting?

    would it be in the dhclient.conf file?
    Last edited by sniper8752; February 21st, 2013 at 05:28 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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