Este contenido no está disponible en el idioma seleccionado.

Chapter 16. Configuring NetworkManager to ignore certain devices


By default, NetworkManager manages all devices except the ones described in the /usr/lib/udev/rules.d/85-nm-unmanaged.rules file. To ignore certain other devices, you can configure them in NetworkManager as unmanaged.

16.1. Permanently configuring a device as unmanaged in NetworkManager

You can configure devices as unmanaged based on several criteria, such as the interface name or MAC address. If you use a device section in the configuration to set a device as unmanaged, NetworkManager does not manage the device until you start using it in a connection profile.

Procedure

  1. Optional: Display the list of devices 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
    ...
    Copy to Clipboard Toggle word wrap
  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 device 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
      Copy to Clipboard Toggle word wrap
    • To configure a device with a specific MAC address as unmanaged, add:

      [device-mac525400747956-unmanaged]
      match-device=mac:52:54:00:74:79:56
      managed=0
      Copy to Clipboard Toggle word wrap
    • To configure all devices of a specific type as unmanaged, add:

      [device-ethernet-unmanaged]
      match-device=type:ethernet
      managed=0
      Copy to Clipboard Toggle word wrap
    • To set multiple devices 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
      Copy to Clipboard Toggle word wrap

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

  4. Restart the host system:

    # reboot
    Copy to Clipboard Toggle word wrap

Verification

  • Display the list of devices:

    # nmcli device status
    DEVICE  TYPE      STATE      CONNECTION
    enp1s0  ethernet  unmanaged  --
    ...
    Copy to Clipboard Toggle word wrap

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

Troubleshooting

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

    # NetworkManager --print-config
    ...
    [device-enp1s0-unmanaged]
    match-device=interface-name:enp1s0
    managed=0
    ...
    Copy to Clipboard Toggle word wrap

    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.

16.2. Temporarily configuring a device as unmanaged in NetworkManager

You can temporarily configure devices 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 devices to identify the device you want to set as unmanaged:

    # nmcli device status
    DEVICE  TYPE      STATE         CONNECTION
    enp1s0  ethernet  disconnected  --
    ...
    Copy to Clipboard Toggle word wrap
  2. Set the enp1s0 device to the unmanaged state:

    # nmcli device set enp1s0 managed no
    Copy to Clipboard Toggle word wrap

Verification

  • Display the list of devices:

    # nmcli device status
    DEVICE  TYPE      STATE      CONNECTION
    enp1s0  ethernet  unmanaged  --
    ...
    Copy to Clipboard Toggle word wrap

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

In addition to the status of each network device, NetworkManager also tracks the reason why the devices are in their current status. You can use this feature to identify why NetworkManager does not manage certain devices.

Procedure

  • Display the status and its reason of all network devices:

    # nmcli -f GENERAL.DEVICE,GENERAL.STATE,GENERAL.REASON device show
    Copy to Clipboard Toggle word wrap

    If you pass a device name to the command, you can display the output only of the specified device.

    Example output:

    GENERAL.DEVICE:    enp1s0
    GENERAL.STATE:     10 (unmanaged)
    GENERAL.REASON:    75 (The device is unmanaged by explicit user decision (e.g. 'nmcli device set $DEV managed no'))
    
    GENERAL.DEVICE:    enp7s0
    GENERAL.STATE:     10 (unmanaged)
    GENERAL.REASON:    74 (The device is unmanaged by user decision in NetworkManager.conf ('unmanaged' in a [device*] section)
    
    GENERAL.DEVICE:    veth3
    GENERAL.STATE:     10 (unmanaged)
    GENERAL.REASON:    77 (The device is unmanaged via udev rule)
    Copy to Clipboard Toggle word wrap
    Note

    Note that the command returns the status of all devices, regardless whether they are managed or unmanaged.

Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat