Bug 1684595

Summary: RHEL8: dhclient sending encoded fqdn even when "send fqdn.encoded off" is set
Product: Red Hat Enterprise Linux 8 Reporter: Ravindra Patil <ravpatil>
Component: NetworkManagerAssignee: Francesco Giudici <fgiudici>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 8.0CC: atragler, bgalvani, fgiudici, lrintel, ravpatil, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-28 07:47:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ravindra Patil 2019-03-01 15:44:25 UTC
Description of problem:

When set DHCP_FQDN in /etc/sysconfig/network-scripts/ifcfg-<interface> and to set these options in /etc/dhcp/dhclient.conf:

send vendor-class-identifier "ad001";
send user-class "ad001-id";
send fqdn.encoded off;
send fqdn.server-update off;

DHCP option 81 is in fact being sent, but the name is encoded, which means send fqdn.encoded off is not being honored.

Version-Release number of selected component (if applicable):
4.3.6-29.el8.x86_64

How reproducible:
When set DHCP_FQDN in /etc/sysconfig/network-scripts/ifcfg-<interface> and to set these options in /etc/dhcp/dhclient.conf:

send vendor-class-identifier "ad001";
send user-class "ad001-id";
send fqdn.encoded off;
send fqdn.server-update off;

Steps to Reproduce:
1. Set fqdn.encoded to off in /etc/dhcp/dhclient.conf
2. Check if dhcp option 81 being sent
3.

Actual results:
the name is encoded, which means send fqdn.encoded off is not being honored

Expected results:
fqdn.encoded off should be honored and name should not be encoded

Additional info:

Comment 1 Pavel Zhukov 2019-03-04 08:21:52 UTC
Hello,

Can you please provide exact dhclient command you're using? 
# ps aux | grep dhclient

Comment 8 Thomas Haller 2019-04-10 05:53:44 UTC
Both on RHEL7 and RHEL8, NetworkManager supports two DHCP plugins: "dhclient" and "internal".

On RHEL7, the default is "dhclient".
On RHEL8, the default changed to "internal".

For reasons see bug 1571655. This is (will be) also documented as a "Known issue".

The internal client does not use dhclient, and does not honor /etc/dhcp.


There is nothing wrong with the internal client (it's just not as configurable as dhclient, which is a problem if you require that configuration).
There is also nothing particularly wrong with the dhclient plugin. Every user is welcome to explicitly configure to use "dhclient".
Only the "default" changed.


See `man NetworkManager.conf`. You can configure the used DHCP plugin via

[main]
dhcp=dhclient

via a snippet in

  (1) /etc/NetworkManager/conf.d
  (2) /var/run/NetworkManager/conf.d
  (3) /usr/lib/NetworkManager/conf.d

(the right location depends on whether you are doing user-configuration (1), generate ephemeral configuration (2), or install the configuration snippet as part of another package (3). See also `man NetworkManager.conf` for the order of how files are loaded and how they get merged together).


The main problem that the dhclient plugin has is it's flexibility (by configuring it via /etc/dhcp) that bypasses regular NetworkManager API. Optimally, all useful DHCP options are understood and exposed as API of NetworkManager, so you can configure them as part of the connection profile (instead of editing files in /etc/dhcp as root). Hence, it would be valuable to evaluate why the internal client is not sufficient for the customer and what options are missing. And then open an RFE to extend it.

Comment 9 Francesco Giudici 2019-06-28 07:47:54 UTC
Hi Ravindra,
  as explained in the above comment from Thomas, the issue here seems related to the switch of the internal dhcp client used by NetworkManager:
in RHEL8, on a fresh installation, the default dhcp client will be the "internal" one which is NOT based on dhclient.
So, all the dhclient configuration will be just ignored.
To fix the issue you need to just instruct NetworkManager to use "dhclient" as the default dhcp client, as detailed in Thomas's comment.

I'm going to close this, as seems not a bug, but just a switch in the dhcp client used. Note that when coming from an upgrade from RHEL-7, dhclient will be kept as the default client and you will not experience the issue. If this is not the case, please reopen the bug and explicitly mention you are coming from an upgrade. 

If you want to have the option to disable fqdn encoding in the (now default) internal client, I would suggest to open a new bug requesting "disable fqnd encoding" as a new feature (that would then work regardless of the dhcp client used). It will be likely added as a new option configurable just in the connection (the ifcfg-file) and would work the same way with any dhcp client.

Thanks
F.G.

Comment 10 Beniamino Galvani 2019-06-28 08:00:29 UTC
Also see bug 1649368 about the same issue. NM is going to implement new properties to make the FQDN flags configurable in the connection, also when using the internal client.