Re: dhclient-${IFNAME}.conf stopped working after upgrade FC32 -> FC34


First of all, as always: enable level=TRACE logging and look at the
logs and have them ready for inspection. Read [1] for hints about


1) you already found the [main].dhcp setting. See `man
NetworkManager.conf`. So, this probably does not apply to you. Still:

If you configure [main].dhcp=dhclient, then NetworkManager uses
dhclient DHCP plugin. That involves reading files from /etc/dhcp and
merging them. This was, the user can hack the behavior of dhclient.

This did not change between Fedora 32 and Fedora 34.

What might have changed, is the default setting for [main].dhcp. Since
NetworkManager 1.18, the default changed from [main].dhcp=dhclient to
[main].dhcp=internal. But that did not happen in Fedora 32. So it's not
clear why this would behave different. Also, you might have had another
application that dropped a configuration snippet to
/{usr/lib,run,etc}/NetworkManager/conf.d, which is now gone? Anyway,
check that the desired right DHCP plugin is used.

2) what might have changed is how certain options get merged from
/etc/dhcp. Enable `level=TRACE` logging. See how dhclient gets spawned.
Note the configuration file that NetworkManager generated. Check what
differs or what is missing (if anything).


  $ nmcli c m $UUID 'DHCP4.OPTION+=supersede domain-name-servers=(' 

this does not work. The upper case optoins are not settings of the
profile. Instead these are run-time information of the device (display
only). The way to configure NetworkManager is by configuring settings
of the connection profile, that is the lower case options in nmcli
Except, bypassing that API by instructing dhclient in /etc/dhcp
directly as you did earlier.

4) I did try :
   'set ipv4.dns
    save persistant

I think you would still the the DNS settings form DHCP. Disable that

  nmcli connection modify "$PROFILE" 
    ipv4.ignore-auto-dns yes ipv6.ignore-auto-dns yes

Of course, if all you want is and this is a very static
configuration, then there is no problem with telling NetworkManager not
to configure /etc/resolv.conf. The best way is to make /etc/resolv.conf
as symlink to /etc/my-resolv.conf. That automatically tells
NetworkManager to stay away. Otherwise, configure [main].dns=unmanaged.
See the [main].dns, [main].rc-manager and [main].systemd-resolved
options in `man NetworkManager.conf`.


On Mon, 2021-05-31 at 16:17 +0100, Jason Vas Dias via networkmanager-
list wrote:
I did try :
   'set ipv4.dns
    save persistant
in  'nmcli c e $uuid', but this did not work either after an up / down
/etc/resolv.conf was not updated to contain only '' - it did
ALSO contain '', but as a suffix, not a prefix - this is not
what I want .
This did used to work with my old setup on FC32, but not on FC34 .
Is there any custom dhclient.conf file that is included in the current
implementation anymore ?
Thanks, Jason

On 31/05/2021, Jason Vas Dias <jason vas dias gmail com> wrote:

Good day -

  On an FC32 x86_64 box, which I just successfully upgraded to FC34 ,
  now running NM 1.30.4-1.fc34.x86_64 :
  I had some custom dhclient configuration files, which used to be
  by NM - ie. they took effect before upgrade, but not after:


  which contain:

dhclient.ens1u2u4.conf :

interface "ens1u2u4" {
 send dhcp-client-identifier 34:48:ed:a8:7c:be;
 send host-name "";
 supersede domain-name-servers;

dhclient.wlp59s0.conf :
interface "wlp59s0" {
 send dhcp-client-identifier 5c:80:b6:72:cb:7b;
 send host-name "";
 supersede domain-name-servers;

  There are links to these files in /etc/dhclient-
{ens1u2u4,wlp59s0}.conf ,
  /etc/dhclient.{ens1u2u4,wlp59s0}.conf .

  These files used to be merged in to the effective DHCP client
  configuration , on FC32, and all prior FC & RHEL releases I've
used, in:
  , in use for each interface, which is written for each 'up'
  but no longer.

  I have in /etc/NetworkManager/NetworkManager.conf:


  I want to run my own ISC BIND caching nameserver,
  which serves some authoritative zones and some RPZ (response
policy) zones
  and also tell any Dynamic DNS configured DHCP servers what I
  my domain name to be.

  I already had to disable systemd-resolved service after the
upgrade, which
  broke using my own nameserver.

  Please can anyone suggest how I can get this custom DHCP option
  included in the effective ISC dhclient (v4) options , without
  hacking the source and building my own NetworkManager to write
  its dhclient.conf differently,  which would be my logical next step

  The command:

  $ nmcli c m $UUID 'DHCP4.OPTION+=supersede

  does not let me add a 'DHCP4.OPTION[32]', though DHCP4.OPTION[0 ...
  is listed in

  $ nmcli c s $UUID

  output - none of them are my custom dhclient-${ifname}.conf options

  It would be nice if there was some way to run a script to output
  the superseded domain-name-servers list to a file like:
  /etc/named-dns-forwarders.conf, which contains a named.conf
  'forwarders {  $domain_name_server ; }; ' statement, for
  my caching-only-nameserver, which has 'recursion' enabled,
  which I could include in my /etc/named.conf, but since my
  forwarders list does not change often, I can live with this.

Thanks in Advance for any helpful replies, Best Regards,

networkmanager-list mailing list
networkmanager-list gnome org

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]