Lesson 012 · Linux Administration Learning Path

RHEL Networking with NetworkManager, ip, ss and Routing

· Published · 8 min read

Labelled RHEL Linux administration path highlighting NetworkManager profiles addresses routes DNS sockets packet path evidence and rollback

A network symptom crosses several decisions: link state, NetworkManager profile, address, route, neighbor resolution, local socket, firewall, SELinux, upstream policy and application protocol. Ping answers only one narrow question and may be blocked or deprioritized. Current RHEL administration uses NetworkManager for persistent connection ownership, with ip and ss for kernel evidence.

Keep persistent configuration and runtime evidence distinct

ip address and ip route show kernel state. nmcli connection shows persistent profiles and activation. A one-off ip change may work until the profile reactivates or the host reboots. Make owned persistent changes through NetworkManager, then verify the resulting kernel state.

DNS success, TCP connection and application response are separate. Test the destination name through the configured resolver, route selection for the resolved address, local/upstream policy, TCP/TLS negotiation and application behavior.

Walk the packet path in order

LayerQuestion to answerEvidence
Link/profileWhich interface and profile own state?nmcli device and connection UUID
Address/neighborIs local addressing valid and peer resolvable?ip address, ip neigh
RouteWhich source, gateway and table are selected?ip route get and rules
Policy/socketIs traffic permitted and is a process listening?firewall/nft evidence and ss
ProtocolDoes DNS, TLS and application exchange work?resolvectl/dig, curl and service logs

Change a remote profile without losing management

  1. Record console recovery, retained session and current profile UUID.
  2. Capture addresses, routes, rules, DNS and an application test.
  3. Create or clone a candidate NetworkManager profile rather than overwriting the only path blindly.
  4. Use an approved NetworkManager checkpoint or timed rollback where supported.
  5. Activate the candidate and test gateway, resolver, management and application paths.
  6. Confirm persistent state after reconnect/reboot, then remove only the superseded profile.

Inspect profile, route and socket ownership

nmcli general status
nmcli device status
nmcli -f NAME,UUID,TYPE,DEVICE,AUTOCONNECT connection show
nmcli connection show --active
ip -brief link
ip -brief address
ip rule show
ip route show table all
ip route get 203.0.113.10
ip neigh show
ss -lntup
resolvectl status 2>/dev/null || nmcli dev show | grep -E 'DNS|DOMAIN'
tracepath 203.0.113.10
  • Documentation address 203.0.113.10 is not a live test destination; replace it with an approved endpoint.
  • ip route get predicts kernel selection, including source address; it does not prove upstream return routing.
  • A wildcard listener may still be blocked by firewall, SELinux or application access policy.
  • Packet capture can expose credentials and customer data; filter narrowly and protect evidence.

Evidence and acceptance criteria

EvidenceHealthy resultFailure meaning
ProfileExpected UUID owns the intended device and autoconnectCompeting or stale profile can reactivate
Address/routeSource, gateway and table match designAsymmetry, wrong source or default route
DNSConfigured resolver returns authoritative expected dataSearch domain, split DNS or stale answer problem
Socket/policyExact process listens and policy permits intended sourceApplication absent or local denial
End-to-endIntended client receives valid protocol responseLocal checks hide upstream/return-path failure

Worked scenario: a host is reachable but the application is not

SSH works, so the team assumes networking is healthy. The application listens only on loopback after a configuration change. Firewall rules and routes are correct, but remote clients receive connection refused. Adding a broad firewall rule cannot create a listener.

The operator uses ss to prove the bind address, checks the service configuration and changes it to the approved private address. A local request to that address and an intended remote client succeed; an unapproved source remains denied. The correction is at the application bind layer.

Practical how-to cases

Case 1: Create a static profile

Assign address, gateway and DNS to one named NetworkManager connection. Keep console access and an independent session because a correct syntax change can still remove remote reachability.

nmcli device status
sudo nmcli con add type ethernet ifname enp1s0 con-name lab-static ipv4.method manual ipv4.addresses 192.0.2.10/24 ipv4.gateway 192.0.2.1 ipv4.dns 192.0.2.53
sudo nmcli con up lab-static
ip -brief address show enp1s0
ip route
CheckpointWhat to establish
Expected resultThe intended profile owns the interface and persistent address, route and DNS.
If it failsWrong interface or gateway can end the remote session even when nmcli accepts the profile.
Safe recoveryReactivate the saved NetworkManager profile from console, restore the prior checkpoint, and confirm address, route and DNS separately.

Case 2: Add a specific route

Route one test prefix through a deliberate next hop and prove kernel selection. Keep console access and an independent session because a correct syntax change can still remove remote reachability.

sudo nmcli con mod lab-static +ipv4.routes '198.51.100.0/24 192.0.2.254'
sudo nmcli con up lab-static
ip route get 198.51.100.10
nmcli -f ipv4.routes con show lab-static
CheckpointWhat to establish
Expected resultThe route lookup selects the intended interface, source address and gateway and persists in the profile.
If it failsA route can exist yet fail due to neighbor resolution, return path or upstream policy.
Safe recoveryReactivate the saved NetworkManager profile from console, restore the prior checkpoint, and confirm address, route and DNS separately.

Case 3: Diagnose DNS separately

Compare configured resolvers, query result and raw IP reachability. Keep console access and an independent session because a correct syntax change can still remove remote reachability.

nmcli dev show enp1s0 | grep -E 'IP4.DNS|IP4.DOMAIN'
getent ahosts example.com
dig example.com A
ip route get 1.1.1.1
ping -c 2 192.0.2.53
CheckpointWhat to establish
Expected resultResolver ownership and query response are distinguished from general IP routing.
If it failsSuccessful ping to an address does not prove DNS; NXDOMAIN differs from timeout and SERVFAIL.
Safe recoveryReactivate the saved NetworkManager profile from console, restore the prior checkpoint, and confirm address, route and DNS separately.

Case 4: Trace a listening service

Move from socket to local request, firewall and remote path. Keep console access and an independent session because a correct syntax change can still remove remote reachability.

ss -lntp
ip -brief address
curl -v http://127.0.0.1:8080/
firewall-cmd --get-active-zones
tracepath 192.0.2.20
tcpdump -ni enp1s0 tcp port 8080
CheckpointWhat to establish
Expected resultThe first layer that loses the request or response is demonstrated with evidence.
If it failsNo packets, SYN without reply and completed TCP with HTTP error identify different owners.
Safe recoveryReactivate the saved NetworkManager profile from console, restore the prior checkpoint, and confirm address, route and DNS separately.

Case 5: Configure IPv6 explicitly

Add one documentation-prefix IPv6 address and route to the lab profile and verify source selection. Keep console access and an independent session because a correct syntax change can still remove remote reachability.

sudo nmcli con mod lab-static ipv6.method manual ipv6.addresses 2001:db8:10::10/64 ipv6.gateway 2001:db8:10::1
sudo nmcli con up lab-static
ip -6 address show dev enp1s0
ip -6 route
ip -6 route get 2001:db8:20::20
CheckpointWhat to establish
Expected resultThe profile owns the IPv6 address and the kernel selects the intended source and next hop.
If it failsIPv6 link-local reachability does not prove global routing, DNS AAAA or return-path policy.
Safe recoveryReactivate the saved NetworkManager profile from console, restore the prior checkpoint, and confirm address, route and DNS separately.

Independent practice tasks

  1. Create DHCP and static profiles and switch safely between them.
  2. Configure two routes with metrics and predict route selection.
  3. Diagnose duplicate address symptoms from neighbor evidence.
  4. Capture a TCP handshake and label SYN, SYN-ACK, ACK and teardown.

For this lesson on RHEL NetworkManager and Routing, complete each task without copying the worked command sequence. Record the initial state, exact change, verification, negative test and recovery command. A task is unfinished if it works now but does not survive a reboot where persistence is required.

Troubleshooting by symptom

SymptomInspect firstDefensible next action
Name fails, IP worksConfigured resolver, search domains and DNS responseCorrect DNS ownership, not routes
No route to hostRoute selection, gateway/neighbor and local policyRepair exact route/link or interpret policy response
Connection refusedDestination socket and active rejectionStart/correct application listener
TimeoutCapture both sides, firewall/upstream and return pathLocate first drop; do not assume server firewall
Change reverts after rebootPersistent NetworkManager profile and autoconnect priorityCorrect owned profile instead of runtime ip state

Unsafe operations and recovery boundaries

  • Unsafe: deleting the active profile or default route over the only SSH path can strand the server. Keep console and timed rollback.
  • Unsafe: broad packet capture can collect secrets and personal data. Filter, encrypt, restrict and retain only as authorized.
  • Unsafe: forcing speed/duplex without matching peer design can create loss; verify negotiation and both link ends.

Rewritten knowledge checks

What owns persistent networking on current RHEL?
NetworkManager profiles for the standard supported configuration path.
What does <code>ip route get</code> show?
The route and source selection the kernel would use for a destination.
Does ping prove a TCP service works?
No. ICMP reachability and application transport are separate.
What does connection refused usually indicate?
An active rejection, often no listener on that address/port, though policy can also reject.
Why inspect <code>ss</code>?
It maps listening/connected sockets to addresses, ports and processes when permitted.
What is asymmetric routing?
Forward and return traffic use different paths, sometimes conflicting with policy or stateful devices.
Why can an <code>ip</code> change disappear?
It changed runtime kernel state without updating the persistent NetworkManager profile.
What protects a remote network change?
Console, retained session, checkpoint/timed rollback, exact profile backup and acceptance tests.

Guided lab and acceptance test

  1. Create a second lab NetworkManager profile with a static private address.
  2. Capture route selection before and after activation.
  3. Run a loopback-only test listener and prove remote refusal, then bind to the approved lab address.
  4. Permit only one lab source through the firewall and test allowed and denied paths.
  5. Change DNS for the candidate profile and verify resolver ownership and answer.
  6. Reactivate/reboot, prove persistence, then remove only the lab profile.

Primary references

Advertisement