Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 15. Configuring NetworkManager to ignore certain interfaces


To handle a network interface manually, configure it as unmanaged in NetworkManager. By default, NetworkManager manages all of them except those described in the /usr/lib/udev/rules.d/85-nm-unmanaged.rules file. You can explicitly configure other interfaces to be unmanaged to ignore them.

NetworkManager automatically activates any managed interface that detects a physical carrier signal. However, you can disable this behavior to prevent one from automatically coming online when a cable is connected. This is useful for securing or isolating unused interfaces.

Defining an interface as unmanaged sets it administratively down. If you use a device section in the configuration file for this action, you can set interfaces as unmanaged based on criteria, such as MAC address. NetworkManager does not manage these interfaces until you include them in a connection profile.

Use a device section in the configuration file to configure interfaces as unmanaged if you require flexible criteria, such as wildcards to match all wifi interfaces.

Procedure

  1. Optional: Display the list of interfaces to identify the device or MAC address you want to set as unmanaged:

    # ip link show
    ...
    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
        link/ether 52:54:00:74:79:56 brd ff:ff:ff:ff:ff:ff
    ...
  2. Create a *.conf file in the /etc/NetworkManager/conf.d/ directory, for example, /etc/NetworkManager/conf.d/99-unmanaged-devices.conf.
  3. For each interface you want to configure as unmanaged, add a section with a unique name to the file.

    Important

    The section name must begin with device-.

    • To configure a specific interface as unmanaged, add:

      [device-enp1s0-unmanaged]
      match-device=interface-name:enp1s0
      managed=0
    • To configure an interface with a specific MAC address as unmanaged, add:

      [device-mac525400747956-unmanaged]
      match-device=mac:52:54:00:74:79:56
      managed=0
    • To configure all interfaces of a specific type as unmanaged, add:

      [device-ethernet-unmanaged]
      match-device=type:ethernet
      managed=0
    • To set multiple interfaces as unmanaged, separate the entries in the unmanaged-devices parameter with a semicolon, for example:

      [device-multiple-devices-unmanaged]
      match-device=interface-name:enp1s0;interface-name:enp7s0
      managed=0

    Alternatively, you can add separate sections for each interface in this file or create additional *.conf files in the /etc/NetworkManager/conf.d/ directory.

  4. Restart the host system:

    # reboot

    The reboot clears the state in the /run/NetworkManager/devices/ directory. This prevents that NetworkManager uses an existing connection from this directory for the interface you set as unmanaged.

Verification

  • Display the list of interfaces:

    # nmcli device status
    DEVICE  TYPE      STATE      CONNECTION
    enp1s0  ethernet  unmanaged  --
    ...

    The unmanaged state next to the enp1s0 device indicates that NetworkManager does not manage this interface.

Troubleshooting

  • If the output of the nmcli device status command does not list the interface as unmanaged, display the NetworkManager configuration:

    # NetworkManager --print-config
    ...
    [device-enp1s0-unmanaged]
    match-device=interface-name:enp1s0
    managed=0
    ...

    If the output does not match the settings that you configured, ensure that no configuration file with a higher priority overrides your settings. For details on how NetworkManager merges multiple configuration files, see the NetworkManager.conf(5) man page on your system.

15.2. Temporarily configuring an interface as unmanaged by using nmcli

You can temporarily configure interfaces as unmanaged, for example, for testing purposes. This change persists a reload and restart of the NetworkManager systemd service, but not a system reboot.

Procedure

  1. Optional: Display the list of interfaces to identify the one you want to set as unmanaged:

    # nmcli device status
    DEVICE  TYPE      STATE         CONNECTION
    enp1s0  ethernet  disconnected  --
    ...
  2. Set an interface to the unmanaged state:

    # nmcli device set <interface> managed no
  3. Optional: Deactivate the interface:

    # ip link set <interface> down

Verification

  1. Display the list of interfaces:

    # nmcli device status
    DEVICE  TYPE      STATE      CONNECTION
    enp1s0  ethernet  unmanaged  --
    ...

    The unmanaged state next to the enp1s0 interface indicates that NetworkManager does not manage this device.

  2. If you have also deactivated the interface, verify that its state is down:

    # ip link show enp1s0
    2: enp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat Dokumentation

Legal Notice

Theme

© 2026 Red Hat
Nach oben