RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1415886 - Need to set "fqdn.server-update" and "fqdn.encoded on" in dhclient-<nic>.conf off?
Summary: Need to set "fqdn.server-update" and "fqdn.encoded on" in dhclient-<nic>.conf...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: sushil kulkarni
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: glusterfs-3.10.0
TreeView+ depends on / blocked
 
Reported: 2017-01-24 01:21 UTC by Jonathan Maxwell
Modified: 2020-04-15 15:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-06 23:33:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jonathan Maxwell 2017-01-24 01:21:13 UTC
Description of problem:

Recently this functionality:

# cat /var/lib/NetworkManager/dhclient-ens256.conf
# Created by NetworkManager

send fqdn.fqdn "www.test.com"; # added by NetworkManager
send fqdn.encoded on;
send fqdn.server-update on;

Was added as per:

https://bugzilla.redhat.com/show_bug.cgi?id=1255507

Quoting the customer:

"With RHEL 6, I was able to add these lines to /etc/dhcp/dhclient-eth0.conf:

send fqdn.fqdn "servername.example.com";
send fqdn.server-update off;

There is a section in the dhclient.conf man page on Dynamic DNS. It's not very clear, but setting these two settings does the trick.

With RHEL 7, I'd like to configure the network using NetworkManager. I tried setting:

nmcli con mod "System eth0" ipv4.dhcp-fqdn servername.example.com

This adds the send fqdn.fqdn line in /var/lib/NetworkManager/dhclient-eth0.conf, but sets "send fqdn.encoded on" and "send fqdn.server-update on". I'd like both of these settings to be set to off.

Any ideas if this can be done?"

Version-Release number of selected component (if applicable):

RHEL7.3.
NetworkManager-1.4.0-14.el7_3.x86_64

How reproducible:

Always:

# nmcli con mod ens256 ipv4.dhcp-fqdn www.test.com
# nmcli connection up ens256

Actual results:

# cat /var/lib/NetworkManager/dhclient-ens256.conf
# Created by NetworkManager

send fqdn.fqdn "www.test.com"; # added by NetworkManager
send fqdn.encoded on;
send fqdn.server-update on;

Expected results:

Is there a way to change "fqdn.encoded" and "fqdn.server-update" to off from NetworkManager? 

Additional info:

Looking at the source code this seems to be hard coded and only the fqdn name seems variable, which is why I added this request:

dhcp-manager/nm-dhcp-dhclient-utils.c

 58 add_hostname4 (GString *str, const char *hostname, const char *fqdn)↩
 59 {↩
 60 ▹       char *plain_hostname, *dot;↩
 61 ↩
 62 ▹       if (fqdn) {↩
 63 ▹       ▹       g_string_append_printf (str, FQDN_FORMAT "\n", fqdn);↩
 64 ▹       ▹       g_string_append (str,↩
 65 ▹       ▹                        "send fqdn.encoded on;\n"↩
 66 ▹       ▹                        "send fqdn.server-update on;\n");↩
 67 ▹       } else if (hostname) {↩

Assuming I have not missed a configuration option, can these be made configurable as they were on RHEL6?

Comment 1 Beniamino Galvani 2017-01-24 08:30:08 UTC
(In reply to Jonathan Maxwell from comment #0)
> Is there a way to change "fqdn.encoded" and "fqdn.server-update" to off from
> NetworkManager? 

The "fqdn.fqdn" option is always overridden by NetworkManager to honor the "ip4v.dhcp-fqdn" property of the active connection. The "fqdn.encoded" and "fqdn.server-update" options can be set by users directly in /etc/dhcp/dhclient-*.conf and they will be added at the end of the generated configuration file:

# nmcli con mod ens256 ipv4.dhcp-fqdn www.test.com

# cat > /etc/dhcp/dhclient-ens256.conf << EOF
send fqdn.encoded off;
send fqdn.server-update off;
EOF

# nmcli connection up ens256

# cat /var/lib/NetworkManager/dhclient-ens256.conf
 # Created by NetworkManager
 # Merged from /etc/dhcp/dhclient-ens256.conf

 send fqdn.fqdn "www.test.com"; # added by NetworkManager
 send fqdn.encoded on;
 send fqdn.server-update on;

 option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
 option ms-classless-static-routes code 249 = array of unsigned integer 8;
 option wpad code 252 = string;

 also request rfc3442-classless-static-routes;
 also request ms-classless-static-routes;
 also request static-routes;
 also request wpad;
 also request ntp-servers;

 # FQDN options from /etc/dhcp/dhclient-ens256.conf
 send fqdn.encoded off;
 send fqdn.server-update off;

Comment 3 Jonathan Maxwell 2017-01-25 22:35:39 UTC
(In reply to Beniamino Galvani from comment #1)
> (In reply to Jonathan Maxwell from comment #0)
> > Is there a way to change "fqdn.encoded" and "fqdn.server-update" to off from
> > NetworkManager? 
> 
> The "fqdn.fqdn" option is always overridden by NetworkManager to honor the
> "ip4v.dhcp-fqdn" property of the active connection. The "fqdn.encoded" and
> "fqdn.server-update" options can be set by users directly in
> /etc/dhcp/dhclient-*.conf and they will be added at the end of the generated
> configuration file:
> 
> # nmcli con mod ens256 ipv4.dhcp-fqdn www.test.com
> 
> # cat > /etc/dhcp/dhclient-ens256.conf << EOF
> send fqdn.encoded off;
> send fqdn.server-update off;
> EOF
> 
> # nmcli connection up ens256
> 
> # cat /var/lib/NetworkManager/dhclient-ens256.conf
>  # Created by NetworkManager
>  # Merged from /etc/dhcp/dhclient-ens256.conf
> 
>  send fqdn.fqdn "www.test.com"; # added by NetworkManager
>  send fqdn.encoded on;
>  send fqdn.server-update on;
> 
>  option rfc3442-classless-static-routes code 121 = array of unsigned integer
> 8;
>  option ms-classless-static-routes code 249 = array of unsigned integer 8;
>  option wpad code 252 = string;
> 
>  also request rfc3442-classless-static-routes;
>  also request ms-classless-static-routes;
>  also request static-routes;
>  also request wpad;
>  also request ntp-servers;
> 
>  # FQDN options from /etc/dhcp/dhclient-ens256.conf
>  send fqdn.encoded off;
>  send fqdn.server-update off;

Thanks for the suggestion. We tried this and found:

"I tried what you suggested and it did the right thing by adding those entries to the end of /var/lib/NetworkManager/dhclient-ethX.conf, but the dhclient still does not perform dynamic DNS updates.

I suspect it's not working because the config file has two entries for these settings, and that it's picking up the first one."

The customer is going to run a test on RHEL6 which was working and see if duplicate parameters causes the same behaviour. We will let you know the result of that test.

Regards

Jon

Comment 4 Jonathan Maxwell 2017-02-06 23:33:08 UTC
I am closing this bz as the customer confirmed that dhclient works RHEL6. A workaround was provided to update the dhclient-ethX.conf file on RHEL7. But on RHEL7 even with the same /var/lib/NetworkManager/dhclient-ethX.conf file as RHEL6, dynamic DNS fails. They stopped NetworkManager and got the same behaviour on RHEL7. So this looks like a dhclient issue. 

Thanks for your help.


Note You need to log in before you can comment on or make changes to this bug.