17.1 Configure IPv4 and IPv6 Addresses

Key Takeaways

  • On RHEL 10, configure persistent interface addressing primarily with nmcli (or nmtui) against NetworkManager connection profiles—not by hand-editing temporary runtime-only settings.
  • Use nmcli connection modify (or add) for IPv4/IPv6 method, addresses, gateway, and DNS; apply with nmcli connection up; verify with ip addr, ip route, and nmcli device/connection show.
  • Static IPv4 uses ipv4.method manual with ipv4.addresses and usually ipv4.gateway; IPv6 uses ipv6.method manual or auto/disabled as the task requires.
  • ip addr and ip link show live state; they do not by themselves replace a saved NetworkManager profile that must survive reboot.
  • EX200 success is correct addressing after reboot: connection enabled, profile applied, interface up, and routes/DNS matching the task.
Last updated: August 2026

17.1 Configure IPv4 and IPv6 Addresses

Quick Answer: Prefer NetworkManager with nmcli. Set addresses on a connection profile (nmcli connection modify or add), then nmcli connection up. Verify with ip addr, ip route, and nmcli -f all connection show NAME. Runtime-only ip addr add without a saved profile usually fails after reboot.

Official skill and exam framing

Under Manage basic networking, Red Hat expects you to configure IPv4 and IPv6 addresses. Lab wording looks like:

  • “Configure the primary interface with static IPv4 172.25.250.11/24 and gateway 172.25.250.254.”
  • “Ensure the host has a static IPv6 address 2001:db8:0:1::11/64.”
  • “Use NetworkManager so the configuration persists across reboot.”

You are graded on end state after reboot: correct address on the right interface (or connection), gateway if required, and a profile NetworkManager will reapply. Memorize tools, not just temporary CLI tricks.

NetworkManager is the RHEL path

On modern RHEL (including RHEL 10), NetworkManager owns interface configuration. Connection profiles store method, addresses, routes, and DNS. Devices (NICs) are bound to profiles.

ConceptMeaning
DeviceHardware or virtual NIC (eth0, ens192, enp1s0)
ConnectionNamed profile NetworkManager applies to a device
Active connectionProfile currently applied
systemctl is-active NetworkManager
nmcli general status
nmcli device status
nmcli connection show
nmcli connection show --active

If NetworkManager is stopped or disabled, fix that first (see Section 17.3). Do not fight NetworkManager by only editing legacy ifcfg files unless a task forces an unusual path—nmcli is the reliable EX200 skill.

Inspect before you change

ip link show
ip -br addr
ip addr show
ip route
nmcli device show
nmcli -f NAME,UUID,TYPE,DEVICE,FILENAME connection show

Identify:

  1. Which device is the exam interface (often the only non-lo NIC, or the one already on the lab network).
  2. Which connection name is bound to it (may match the device name or a friendly name like Wired connection 1).
  3. Whether addressing is currently auto (DHCP) or manual.
nmcli device show ens192 | egrep 'GENERAL|IP4|IP6|CONNECTION'
nmcli connection show ens192
# or:
nmcli connection show "Wired connection 1"

Tip: Quote connection names that contain spaces.

Static IPv4 with nmcli connection modify

Assume device ens192 already has connection profile ens192:

sudo nmcli connection modify ens192 \
  ipv4.method manual \
  ipv4.addresses 172.25.250.11/24 \
  ipv4.gateway 172.25.250.254 \
  ipv4.dns 172.25.250.254 \
  connection.autoconnect yes

sudo nmcli connection up ens192
PropertyRole
ipv4.method manualStatic IPv4 (not DHCP)
ipv4.addressesAddress/prefix (a.b.c.d/nn)
ipv4.gatewayDefault gateway
ipv4.dnsDNS servers (space-separated if multiple)
ipv4.dns-searchSearch domains when required
connection.autoconnect yesActivate at boot when device is available

Multiple addresses on one connection:

sudo nmcli connection modify ens192 \
  ipv4.addresses "172.25.250.11/24,172.25.250.12/24"

Or append:

sudo nmcli connection modify ens192 +ipv4.addresses 172.25.250.12/24

Create a new connection profile

When you need a clean profile or the task says “create a connection”:

sudo nmcli connection add type ethernet con-name lab ifname ens192 \
  ipv4.method manual \
  ipv4.addresses 172.25.250.11/24 \
  ipv4.gateway 172.25.250.254 \
  ipv6.method ignore

sudo nmcli connection up lab

ifname binds the profile to a device. Bring the intended profile up so it becomes active (only one ethernet profile typically active per device).

DHCP / automatic IPv4

sudo nmcli connection modify ens192 ipv4.method auto
sudo nmcli connection up ens192

auto is NetworkManager’s DHCP (and related automatic) method for IPv4. Use when the task requires dynamic addressing rather than a fixed IP.

IPv6 configuration

MethodMeaning
ipv6.method autoAutomatic configuration (SLAAC/DHCPv6 as applicable)
ipv6.method manualStatic IPv6
ipv6.method disabled / ignoreDo not configure IPv6 on this connection (wording varies by NM version; use what nmcli accepts on the exam host)

Static IPv6 example:

sudo nmcli connection modify ens192 \
  ipv6.method manual \
  ipv6.addresses 2001:db8:0:1::11/64 \
  ipv6.gateway 2001:db8:0:1::1

sudo nmcli connection up ens192

Combined dual-stack (common exam pattern):

sudo nmcli connection modify ens192 \
  ipv4.method manual \
  ipv4.addresses 172.25.250.11/24 \
  ipv4.gateway 172.25.250.254 \
  ipv6.method manual \
  ipv6.addresses 2001:db8:0:1::11/64 \
  ipv6.gateway 2001:db8:0:1::1 \
  connection.autoconnect yes

sudo nmcli connection up ens192

If the task only mentions IPv4, leave IPv6 as-is unless it conflicts; if it requires IPv6 static, set ipv6.method manual explicitly.

Apply changes: connection up vs device reapply

nmcli connection modify updates the stored profile. Runtime may lag until you re-activate:

sudo nmcli connection up ens192
# equivalent idea:
sudo nmcli device reapply ens192   # when supported and profile already active

Prefer connection up after address changes so you know the profile reapplied cleanly. Watch for errors (wrong syntax, address conflict, missing device).

Verify with ip and nmcli

ip -br addr show ens192
ip addr show ens192
ip -4 route
ip -6 route
ping -c 2 172.25.250.254
ping -c 2 -6 2001:db8:0:1::1

nmcli -f ipv4.method,ipv4.addresses,ipv4.gateway,ipv6.method,ipv6.addresses connection show ens192
nmcli device show ens192 | egrep 'IP4.ADDRESS|IP4.GATEWAY|IP6.ADDRESS'

Confirm prefix length (/24 not forgotten), gateway on the correct subnet, and that the address appears on the correct device.

Runtime ip commands vs persistence

# Temporary only — useful for diagnosis, not full EX200 persistence:
sudo ip addr add 172.25.250.11/24 dev ens192
sudo ip route add default via 172.25.250.254

These change live kernel state. Without a matching NetworkManager (or other persistent) configuration, they disappear on reboot or when NM reapplies a different profile. Use ip to verify and to understand state; use nmcli to configure for the exam.

ip link set ens192 up
ip link set ens192 down   # careful: may cut remote access

nmtui (optional UI)

sudo nmtui

Text UI: Edit a connection → IPv4/IPv6 Configuration → Manual → addresses/gateway/DNS → OK → Activate a connection. Same persistence model as nmcli. Use if you prefer menus under time pressure, but still verify with ip addr.

Hostname is not an IP address

Setting the system hostname (hostnamectl) does not assign IPv4/IPv6. Addressing is this section; name resolution is Section 17.2. Tasks often require both—do not stop after only setting a pretty hostname.

Exam workflows

Workflow A — Static IPv4 on existing profile

nmcli device status
nmcli connection show
sudo nmcli connection modify ens192 \
  ipv4.method manual \
  ipv4.addresses 172.25.250.11/24 \
  ipv4.gateway 172.25.250.254 \
  connection.autoconnect yes
sudo nmcli connection up ens192
ip -br addr show ens192
ip route | grep default

Workflow B — New named connection

sudo nmcli connection add type ethernet con-name static-lab ifname ens192 \
  ipv4.method manual ipv4.addresses 172.25.250.11/24 \
  ipv4.gateway 172.25.250.254 ipv6.method ignore
sudo nmcli connection up static-lab
nmcli connection show --active

Workflow C — Static IPv6 only addition

sudo nmcli connection modify ens192 \
  ipv6.method manual \
  ipv6.addresses 2001:db8:0:1::11/64 \
  ipv6.gateway 2001:db8:0:1::1
sudo nmcli connection up ens192
ip -6 addr show ens192

Workflow D — Prove persistence mindset

nmcli -g connection.autoconnect connection show ens192
nmcli -g ipv4.method,ipv4.addresses connection show ens192
# After any allowed reboot in practice:
ip -br addr; ip route

Common traps

  1. ip addr add only — works now, gone after reboot or NM reapply.
  2. Forgetting ipv4.method manual — leftover auto may fight or ignore your static intent.
  3. Missing prefix172.25.250.11 without /24 is incomplete for NM addressing.
  4. Wrong connection name — modifying a profile not bound to the active device.
  5. modify without connection up — disk profile correct, live address stale.
  6. Gateway on wrong subnet — no default route reachability.
  7. Cutting your only remote IP mid-change without console access—change carefully on SSH sessions.
  8. Disabling IPv6 when the task requires an IPv6 address.
  9. Assuming hostname equals DNS or IP configuration.
  10. Leaving autoconnect no so the profile does not return after reboot.

Relationship to other sections

SkillSection
IPv4/IPv6 addresses17.1 (this)
Hostname, hosts, resolver17.2
NetworkManager at boot17.3
firewalld restrict access17.4

Section checkpoint

You should list devices and connections, set static or automatic IPv4 and IPv6 with nmcli connection modify/add, reapply with nmcli connection up, verify with ip addr and ip route, keep connection.autoconnect yes when the address must return after boot, and treat NetworkManager profiles—not one-off ip commands—as the EX200 source of truth for addressing on RHEL 10.

Test Your Knowledge

Which approach best configures a persistent static IPv4 address on RHEL 10 for EX200?

A
B
C
D
Test Your Knowledge

You ran nmcli connection modify ens192 ipv4.addresses 10.0.0.5/24 but ip addr still shows the old DHCP address. What is the most likely missing step?

A
B
C
D
Test Your Knowledge

Which nmcli property pair is appropriate for a static IPv6 host address on a connection?

A
B
C
D
Test Your Knowledge

What is the main exam risk of configuring an address only with ip addr add and ip route add?

A
B
C
D