Suchen

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

Chapter 14. Configuring NetworkManager to ignore certain devices

download PDF

By default, NetworkManager manages all devices except the loopback (lo) device. However, you can configure NetworkManager as unmanaged to ignore certain devices. With this setting, you can manually manage these devices, for example, by using a script.

14.1. Permanently configuring a device as unmanaged in NetworkManager

You can permanently configure devices as unmanaged based on several criteria, such as the interface name, MAC address, or device type.

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
    ...
  2. Create the /etc/NetworkManager/conf.d/99-unmanaged-devices.conf file with the following content:

    • To configure a specific interface as unmanaged, add:

      [keyfile]
      unmanaged-devices=interface-name:enp1s0
    • To configure a device with a specific MAC address as unmanaged, add:

      [keyfile]
      unmanaged-devices=mac:52:54:00:74:79:56
    • To configure all devices of a specific type as unmanaged, add:

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

      [keyfile]
      unmanaged-devices=interface-name:enp1s0;interface-name:enp7s0
  3. Reload the NetworkManager service:

    # systemctl reload NetworkManager

Verification

  • Display the list of devices:

    # 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 device.

Troubleshooting

  • If the device is not shown as unmanaged, display the NetworkManager configuration:

    # NetworkManager --print-config
    ...
    [keyfile]
    unmanaged-devices=interface-name:enp1s0
    ...

    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 about how NetworkManager merges multiple configuration files, see the NetworkManager.conf(5) man page on your system.

14.2. Temporarily configuring a device as unmanaged in NetworkManager

You can temporarily configure devices as unmanaged, for example, for testing purposes.

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  --
    ...
  2. Set the enp1s0 device to the unmanaged state:

    # nmcli device set enp1s0 managed no

Verification

  • Display the list of devices:

    # 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 device.

Additional resources

  • NetworkManager.conf(5) man page on your system
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

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

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

© 2024 Red Hat, Inc.