NetworkManager is the default network management service on RHEL 9, and it provides a powerful command-line tool called nmcli for configuring network interfaces. Assigning a static IP address is a common requirement for servers that need a predictable, stable address on the network. This tutorial walks through every method available on RHEL 9 to configure a static IP — from the command line to the connection file on disk — so you understand exactly what is happening at each layer. By the end you will have a working static IP configuration that survives reboots.

Prerequisites

  • A RHEL 9 server with a non-root user that has sudo privileges, or a root shell
  • NetworkManager installed and running (systemctl status NetworkManager)
  • The name of the network interface you want to configure (e.g. ens3, eth0)
  • The desired static IP, subnet prefix, gateway, and DNS server addresses for your network

Step 1 — List Existing Network Connections

Before making any changes, review the current connections that NetworkManager is managing. This tells you the connection name, UUID, type, and which device it is bound to.

nmcli con show

The output lists every connection profile. Note the NAME column — you will use this name in subsequent commands. On a fresh RHEL 9 installation the default wired connection is often named after the device (e.g. ens3). You can also check the currently active connection and its IP with:

nmcli con show --active
ip addr show ens3

Step 2 — Modify the Connection to Use a Static IP

Use nmcli con mod to change the IPv4 method from auto (DHCP) to manual and supply your static address, gateway, and DNS servers. Substitute your own values for the IP address, prefix length, gateway, and interface name.

sudo nmcli con mod "ens3" 
  ipv4.method manual 
  ipv4.addresses "192.168.1.100/24" 
  ipv4.gateway "192.168.1.1" 
  ipv4.dns "8.8.8.8,8.8.4.4" 
  ipv4.dns-search "example.com" 
  connection.autoconnect yes

Each parameter is written to the connection profile file stored in /etc/NetworkManager/system-connections/. The changes are not applied to the live interface until you bring the connection down and back up.

Step 3 — Apply the Changes

Deactivate and reactivate the connection so NetworkManager applies the new static configuration to the interface.

sudo nmcli con down "ens3"
sudo nmcli con up "ens3"

If you are connected over SSH, running con down will drop your session. Either use a local console, run both commands on a single line with &&, or use the nmcli device reapply ens3 command which applies changes without fully tearing down the connection for minor edits.

Step 4 — Verify the Static IP Configuration

Confirm the interface has picked up the static address and the default route is correct.

# Check the assigned IP address
ip addr show ens3

# Check the routing table
ip route show

# Verify DNS resolution is working
nmcli general status
ping -c 4 8.8.8.8
dig google.com

You should see 192.168.1.100/24 on ens3 and a default route via 192.168.1.1 in the routing table.

Step 5 — Inspect the Connection File Directly

NetworkManager stores each connection profile as an INI-style file under /etc/NetworkManager/system-connections/. Viewing or editing this file directly gives you the full picture of every setting.

sudo cat /etc/NetworkManager/system-connections/ens3.nmconnection

A correctly configured static connection file looks similar to this:

[connection]
id=ens3
uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
type=ethernet
autoconnect=true

[ethernet]
mac-address-blacklist=

[ipv4]
address1=192.168.1.100/24,192.168.1.1
dns=8.8.8.8;8.8.4.4;
dns-search=example.com;
method=manual

[ipv6]
addr-gen-mode=stable-privacy
method=auto

After editing the file directly you must reload it with sudo nmcli con reload followed by sudo nmcli con up "ens3".

Step 6 — Use nmtui as a Text UI Alternative

If you prefer a menu-driven interface, nmtui (NetworkManager Text User Interface) is included with the NetworkManager-tui package and provides the same functionality in a navigable terminal UI.

# Install if not already present
sudo dnf install -y NetworkManager-tui

# Launch the TUI
sudo nmtui

Select Edit a connection, choose your interface, and navigate to the IPv4 configuration section. Change the method from Automatic to Manual, add your address, gateway, and DNS servers, then select OK and Quit. Activate the connection via Activate a connection in the main menu or with nmcli con up "ens3" from the shell.

Conclusion

You have configured a static IP address on RHEL 9 using NetworkManager via the nmcli command line, verified connectivity with ip addr and ip route, inspected the underlying connection file, and explored the nmtui text UI. Your configuration is persistent across reboots because it is stored in the NetworkManager connection profile. Static addressing is essential for servers hosting services that other machines need to reach reliably by IP.

Next steps: How to Set Up a DNS Server with BIND9 on RHEL 9, How to Install and Configure Postfix Mail Server on RHEL 9, and How to Configure a Firewall with firewalld on RHEL 9.