Welcome to the Linux Foundation Forum!

Err? - Ch 7 - Verify the Local Configuration

Using: Ubuntu 20.04.4 LTS

This directory (dhclient) does not exist:

Replacing dhclient with dhcp does work.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 916

    It indeed does not exist by default least on ubuntu -- although it does exist on all Red Hat based platforms, such as RHEL, CentOS and Fedora. There is a man page on ubuntu for dhclient.releases but the file doesn't seem to be there, at least on 22.04. Maybe someone else knows the answer to this ;)

  • Posts: 380

    The file that contains the data sent by the dcpd server used to be stored in /var/lib/dhclient/dhcpd.leases. Network Manager may have a new location.

    It seems Network Manager stores connection information in /etc/NetworkManager/system-connections/xx-001.nmconnection. The ISC-dhcp-server configuration files may not be used any more.

  • Posts: 380

    The best method to view the DHCP client information in a NetworkManager environment is to have NetworkManager show us the information.
    Step 1 find the active adaptor in your system with:
    $ nmcli connection show -a
    The output should be similar to:
    Wired connection 1 8a96df6d-993f-407d-859a-62e08dc95441 ethernet enp3s0
    Notice the connection NAME on this system is:
    "Wired connection 1"

    Now fetch the DHCP data:
    $ nmcli connection show Wired\ connection\ 1 | grep "^DHCP4"
    The output should be similar to:

    DHCP4.OPTION[1]: dhcp_lease_time = 21600
    DHCP4.OPTION[2]: dhcp_server_identifier = 192.168.0.1
    DHCP4.OPTION[3]: domain_name = onapinglake.com
    DHCP4.OPTION[4]: domain_name_servers = 192.168.0.1
    DHCP4.OPTION[5]: expiry = 1677720069
    DHCP4.OPTION[6]: ip_address = 192.168.0.216
    DHCP4.OPTION[7]: next_server = 192.168.0.1
    DHCP4.OPTION[8]: requested_broadcast_address = 1
    DHCP4.OPTION[9]: requested_domain_name = 1
    DHCP4.OPTION[10]: requested_domain_name_servers = 1
    DHCP4.OPTION[11]: requested_domain_search = 1
    DHCP4.OPTION[12]: requested_host_name = 1
    DHCP4.OPTION[13]: requested_interface_mtu = 1
    DHCP4.OPTION[14]: requested_ms_classless_static_routes = 1
    DHCP4.OPTION[15]: requested_nis_domain = 1
    DHCP4.OPTION[16]: requested_nis_servers = 1
    DHCP4.OPTION[17]: requested_ntp_servers = 1
    DHCP4.OPTION[18]: requested_rfc3442_classless_static_routes = 1
    DHCP4.OPTION[19]: requested_root_path = 1
    DHCP4.OPTION[20]: requested_routers = 1
    DHCP4.OPTION[21]: requested_static_routes = 1
    DHCP4.OPTION[22]: requested_subnet_mask = 1
    DHCP4.OPTION[23]: requested_time_offset = 1
    DHCP4.OPTION[24]: requested_wpad = 1
    DHCP4.OPTION[25]: routers = 192.168.0.1
    DHCP4.OPTION[26]: subnet_mask = 255.255.255.0

    We can see the information passed to us by the dhcp server.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training