Loading...

Lab 61: Modern Network Management Tools

Use NetworkManager tools to inspect and modify connection profiles from the terminal and apply changes safely. Convert an existing Wi-Fi profile to static IPv4 addressing, cycle the connection, and verify activation state.

network core troubleshooting

Scenario

You are configuring a new laptop running NetworkManager. You need to review existing connection profiles and convert a Wi-Fi profile to a static IPv4 configuration for a managed network segment. Your tools are the text UI (nmtui) and the CLI (nmcli).

Operator context

In production, NetworkManager is often the source of truth for persistent networking. You need CLI-only control for remote support, break/fix work, and controlled reconfiguration.

Objective

  • Launch the text-based NetworkManager UI (nmtui).
  • List saved connections and confirm the target profile name (nmcli).
  • Switch a profile to manual IPv4 addressing.
  • Assign a static IPv4 address and default gateway.
  • Cycle the connection and confirm activation state.

Concepts

  • NetworkManager connections as persistent “profiles” independent of devices.
  • Terminal-based configuration using nmtui for interactive edits.
  • CLI-driven configuration using nmcli for repeatable changes.
  • DHCP versus static IPv4 (ipv4.method: auto vs manual).
  • Cycling connections to apply configuration changes predictably (down/up).

Walkthrough

Step 1 : Launch the text UI and confirm connection visibility.
Command
nmtui

nmtui is SSH-friendly and reliable when a full desktop is unavailable. Use it to inspect and edit profiles without depending on a graphical stack.

[ ] Edit a connection
[ ] Activate a connection
[ ] Set system hostname
Step 2 : List all saved NetworkManager profiles.
Command
nmcli connection show

This is your source of truth for profile names. Use the exact NAME value when running nmcli connection modify.

NAME                UUID                                  TYPE      DEVICE
Wired connection 1  e9b2f442-9c6f-11ee-a0e4-bb3b1a480001  ethernet  eth0
Wi-Fi Home          a3c4e210-9c6f-11ee-a0e4-bb3b1a480002  wifi      wlan0
Step 3 : Set the profile to manual IPv4 addressing.
Command
nmcli connection modify "Wi-Fi Home" ipv4.method manual

manual disables DHCP for IPv4 on the profile. From here, you must supply addressing details or the connection may activate without a usable IPv4 configuration.

Connection 'Wi-Fi Home' successfully updated.
Step 4 : Assign a static IPv4 address and default gateway.
Command
nmcli connection modify "Wi-Fi Home" ipv4.addresses 192.168.10.100/24 ipv4.gateway 192.168.10.1

This sets the IP and gateway on the profile. If the network requires explicit DNS, configure ipv4.dns and decide whether to keep or ignore automatic DNS with ipv4.ignore-auto-dns.

Connection 'Wi-Fi Home' successfully updated.
Step 5 : Cycle the connection to apply changes.
Command
nmcli connection down "Wi-Fi Home" && nmcli connection up "Wi-Fi Home"

Bringing the profile down and back up forces a clean reapply of settings. This is the fastest way to confirm the profile activates cleanly after modification.

Connection 'Wi-Fi Home' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2)
Connection 'Wi-Fi Home' successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)
Step 6 : Verify the profile and device state after activation.
Commands
nmcli connection show "Wi-Fi Home"
nmcli device status

Use nmcli connection show to confirm the intended values are stored on the profile and nmcli device status to confirm the device is connected and bound to the correct connection.

# connection show (snippets):
ipv4.method:                            manual
ipv4.addresses:                         192.168.10.100/24
ipv4.gateway:                           192.168.10.1

# device status:
DEVICE  TYPE      STATE      CONNECTION
wlan0   wifi      connected  Wi-Fi Home
Tooling note

Desktop environments may expose graphical editors for the same profiles, but the underlying objects are still NetworkManager connections. For remote work, nmcli remains the most consistent interface.

Common breakpoints

Profile name mismatch or quoting problems

If the profile name contains spaces, you must quote it. Always copy the NAME value from nmcli connection show and reuse it verbatim.

Connection activates but has no usable IPv4

A manual profile without valid addressing can still appear “up.” Confirm ipv4.addresses and ipv4.gateway are set, then re-cycle the connection.

Wrong gateway or prefix breaks routing

A bad gateway or subnet mask can isolate the host. Validate the gateway is reachable on the same L2 segment and the prefix matches the network design.

Device shows disconnected after cycling

The profile may not match the device state (wrong SSID, authentication, radio disabled). Confirm device state with nmcli device status and re-check activation in nmtui.

Cleanup checklist

If you changed addressing on a real network, revert the profile to its prior configuration or return it to DHCP to avoid leaving a stale static assignment behind.

Commands
nmcli connection modify "Wi-Fi Home" ipv4.method auto
nmcli connection down "Wi-Fi Home" && nmcli connection up "Wi-Fi Home"
Success signal

The profile activates cleanly and shows ipv4.method as auto with expected device state in nmcli device status.

Reference

  • nmtui : Text user interface for configuring and activating NetworkManager connections.
  • nmcli connection show : Lists saved connection profiles and their associated devices.
  • nmcli connection modify "<name>" ipv4.method manual : Sets a connection profile to use static IPv4 addressing.
    • ipv4.method : Controls how IPv4 settings are assigned (auto for DHCP, manual for static).
  • nmcli connection modify "<name>" ipv4.addresses <ip/prefix> ipv4.gateway <gw> : Assigns a static IPv4 address and default gateway to a profile.
    • ipv4.addresses : One or more IPv4 addresses in CIDR form.
    • ipv4.gateway : Default IPv4 gateway for the profile.
  • nmcli connection down "<name>" && nmcli connection up "<name>" : Deactivates and reactivates a connection profile to apply changes.
    • && : Runs the second command only if the first succeeds.
  • nmcli connection show "<name>" : Displays stored settings for a specific connection profile.
  • nmcli device status : Shows device state and the active connection bound to each device.