Skip to Content

How are networking configurations managed in Red Hat Enterprise Linux 9?

In my experience with RHEL 9, I’ve found it to be an incredibly robust platform for managing networking configurations.

One of the standout features is NetworkManager, which I’ve relied on extensively. This system service effectively oversees all network devices and connections, making my life much easier.

What I appreciate most is the variety of methods available for configuring these connections. Whether I prefer command-line utilities for quick adjustments, text-based interfaces for detailed configurations, or graphical user interfaces for a more visual approach, RHEL 9 has me covered.

I’ve also explored using APIs and automation frameworks, which have been particularly useful for streamlining my workflows and ensuring consistency across multiple systems.

Get Your Free Linux training!

Join our free Linux training and discover the power of open-source technology. Enhance your skills and boost your career! Learn Linux for Free!

NetworkManager Configuration Methods

NetworkManager supports the configuration of Ethernet connections through these methods:

  • Command-Line Tools: nmcli offers a versatile command-line interface to interact with NetworkManager. It’s used to manage network connections, devices, and settings.
  • Text-Based User Interface: nmtui presents a text-based user interface for NetworkManager, suitable for environments without graphical interfaces.
  • Graphical User Interfaces: The GNOME Settings menu and nm-connection-editor provide graphical interfaces to configure network connections. nm-connection-editor, in particular, is used to configure a variety of network connections, including bonds, teams, bridges, and VLAN tagging.
  • Nmstate API: The nmstatectl utility interacts with the Nmstate API, offering a declarative way to manage NetworkManager. It uses YAML or JSON-formatted instructions to define the desired networking state.
  • RHEL System Roles: Ansible, in conjunction with network RHEL system roles, automates the configuration of network connections across multiple hosts, improving consistency and reducing manual effort.

Consistent Network Interface Naming

udev, the device manager, implements consistent network interface naming in RHEL 9. By default, it assigns predictable names to network interfaces based on factors such as firmware, topology, and location information. RHEL 9 supports various naming schemes, and administrators can switch schemes or customize interface names using udev rules or systemd link files.

Ethernet Connection Configuration

NetworkManager automatically generates a connection profile for each network adapter present in the host. These profiles, typically configured to use DHCP for both IPv4 and IPv6, can be modified to incorporate custom settings or use static IP addresses.

Verification and Troubleshooting

After configuring a network connection, it’s essential to verify its functionality and troubleshoot any potential problems. Verification often involves displaying the interface’s IP address settings using the ip command, confirming the connection’s status using nmcli, and testing connectivity using the ping utility.

Troubleshooting network connectivity issues might involve verifying the physical network cable connection, checking for link failures on the host and switch, and conducting hardware diagnostics to rule out faulty cables or network interface cards.

Advanced Networking Features

RHEL 9 provides robust support for advanced networking features, including:

  • Network Bonding: This feature combines multiple network interfaces to create a logical interface with increased throughput or redundancy.
  • VLAN Tagging: VLAN tagging enables logical network separation within a physical network by tagging packets with a VLAN ID.
  • Network Bridging: Bridging connects multiple networks at Layer 2, allowing devices on different networks to communicate directly.

These advanced features can be configured using various tools, such as nmcli, nmtui, nm-connection-editor, nmstatectl, the RHEL web console, and RHEL system roles.

Additional Tools and Resources

  • ethtool: allows for the configuration of network driver and hardware settings, including offload features, coalesce settings, and ring buffer sizes. These settings can be configured persistently within NetworkManager connection profiles.
  • The nmstate API, accessed through the nmstatectl utility, offers a declarative way to manage NetworkManager. It utilizes YAML or JSON-formatted instructions to describe the desired networking state and ensures the system achieves that state.
  • For in-depth information on specific tools and features, consult resources such as man pages, the Red Hat Knowledgebase, and project wikis.

RHEL 9 provides a comprehensive suite of tools for managing network configurations, ranging from basic settings to advanced features like VPNs and traffic shaping. These tools cater to diverse needs and skill levels, enabling administrators to configure and manage networking effectively in various scenarios.

Please let me know if you have any more questions.

FAQ: nmcli cheat sheet

General Commands
nmcli general hostname [HOSTNAME]: Displays or changes the system hostname.

Device Management
nmcli device status: Shows the status of network devices.
nmcli device set managed no: Sets a device to unmanaged, preventing NetworkManager from managing it.

Connection Management
nmcli connection show: Lists all NetworkManager connection profiles.
nmcli connection show : Shows details of a specific connection profile.
nmcli connection add con-name ifname type ethernet: Adds a new Ethernet connection profile.
nmcli connection add type ...: Adds a new connection profile of a specific type. The available types include bond, bridge, dummy, ethernet, ip-tunnel, team, vlan, vrf. Additional options can be specified to configure the connection.
nmcli connection modify : Modifies a setting of a connection profile.
nmcli connection modify +ipv4.routes "NETWORK/MASK GATEWAY": Adds an IPv4 static route.
nmcli connection modify +ipv6.routes "NETWORK/MASK GATEWAY": Adds an IPv6 static route.
nmcli connection up : Activates a connection profile.
nmcli connection delete : Deletes a connection profile.
nmcli connection migrate : Migrates connection profiles from the ifcfg to the keyfile format.

Wi-Fi
nmcli device wifi connect : Connects to a Wi-Fi network.
nmcli connection modify 802-1x.eap : Sets the EAP method for 802.1X authentication.

Bonding and Teaming
nmcli connection add type bond ...: Creates a bond connection.
nmcli connection add type team ...: Creates a team connection (deprecated in RHEL 9).

VLAN
nmcli connection add type vlan ...: Creates a VLAN connection.

Bridging
nmcli connection add type bridge ...: Creates a bridge connection.

IPSec VPN
Please note that the sources provide information on configuring IPSec VPN connections using nmstatectl. They do not contain examples using nmcli for this purpose.

WireGuard VPN
nmcli connection add type wireguard ...: Creates a WireGuard connection profile.

Other
nmcli general logging level domains : Sets the NetworkManager log level.