OLE study materials
OLE study resources

OLE: Network Configuration and Service Management with NetworkManager and systemd

OLE · Work through your exam, one topic at a time.

All guide sections

Network Configuration and Service Management with NetworkManager and systemd

This domain tests whether you configure networking through NetworkManager rather than by editing files by hand, and whether you can manage services, dependencies, and unit overrides with systemd.

NetworkManager with nmcli

  • Create a static profile: nmcli con add type ethernet con-name lan ifname ens3 ipv4.method manual ipv4.addresses 192.0.2.10/24 ipv4.gateway 192.0.2.1 ipv4.dns 192.0.2.53.
  • Modify and reapply: nmcli con mod lan +ipv4.addresses 192.0.2.11/24, then nmcli con up lan (reactivates) or nmcli device reapply ens3 (applies where possible without a full bounce).
  • Inspect with nmcli device status, nmcli con show lan, ip addr, ip route, ss -tulpn.
  • Profiles on OL8/OL9 are keyfiles in /etc/NetworkManager/system-connections/*.nmconnection, mode 600. nmtui is the text UI; hostnamectl set-hostname sets the static hostname.

systemd service control

  • systemctl enable --now httpd, systemctl status, systemctl is-enabled, systemctl mask (stronger than disable), systemctl list-units --failed.
  • Unit search path: /etc/systemd/system beats /usr/lib/systemd/system. Use systemctl edit foo.service to create a drop-in at /etc/systemd/system/foo.service.d/override.conf, then systemctl daemon-reload.
  • Logs: journalctl -u httpd -b --since "1 hour ago".

Worked example

A web server must listen on a second address without dropping SSH. Add the address with nmcli con mod lan +ipv4.addresses 192.0.2.11/24 and apply with nmcli device reapply ens3. Reasoning: reapply avoids tearing down the whole profile, so the existing SSH session is not interrupted; a full nmcli con up lan would bounce the interface.

Traps

  • Two autoconnect profiles on one NIC produce duplicate default routes; check ip route and nmcli con show.
  • systemctl restart network does not exist on OL8/OL9 - network-scripts were removed; use NetworkManager.
  • Hand-editing ifcfg files while NetworkManager owns the device causes settings to be silently overwritten.
  • A drop-in without daemon-reload and a restart has no effect.