Managing Network Configurations

Nov 1, 2025

IPv4 Networking

Wikipedia -IPv4

IPv6 Networking

Wikipedia - IPv6

PurposeExampleDescription
localhost::1/128Loopback address (equivalent to 127.0.0.1 in IPv4)
unspecified::Used to refer to all ip addresses
default route::/0IPv6 default route (equivalent to 0.0.0.0/0 in IPv4)
global unicast2000::/3IPv6 addresses currently being allocated
unique localfd00::/8Addresses for internal use like 192.168.0.0
link localfe80::/10Non-routable auto assigned for internal use
multicastff00::/8Multicast addresses

NIC Naming

Red Hat - NIC naming

Show current devices

ip link show
# or, equivalently
ip link
# or, equivalently
ip l

Show current device configuration

ip addr show
# or, equivalently
ip addr
# or, equivalently
ip a

Defining Host Names and Host Name Resolution

  • The hostname is written to /etc/hostname
  • To resolve hostnames, /etc/hosts is used
    • 10.0.0.15 server2.example.com server2
  • /etc/resolv.conf contains DNS client configuration
  • The order of host name resolution is determined through /etc/nsswitch.conf

Set the system hostname

hostnamectl hostname rhel10

Add hostname to /etc/hosts for resolution

127.0.0.1 localhost rhel10 rhel10.example.com
10.0.0.15 rhel10 rhel10.example.com

Analyzing Network Configuration

  • The ip tool can be used to manage all aspects of IP networking
  • It replaces the legacy ifconfig tool, do not use it anymore
  • Use ip addr to manage address properties
    • ip addr add dev ens33 10.0.0.10/24
  • Use ip link to show link properties
    • ip -s link
  • Use ip route to manage route properties
    • ip route show
    • ip route add default via 10.0.0.1
  • Any changes made with the ip command will not be persistent

Network Manager

Wikipedia - NetworkManager

  • NetworkManager is the systemd service that manages network configuration
  • Configuration is stored in file /etc/NetworkManager/system-connections
  • Different applications are available to interface with NetworkManager
    • nmcli is a powerful command line interface
    • nmtui offers a convenient text user interface
    • GNOME offers graphical tools as well
  • In NetworkManager, devices are network interfaces
  • Connections are collections of configuration settings for a device, stored in the configuration file in /etc/NetworkManager/system-connections
  • Only one connection can be active for a device
  • Permissions to modify settings in NetworkManager are applied through dbus
  • Non-privileged users that are logged in on the console can change network settings
  • Non-privileged users that are logged through ssh cannot change network settings
  • Use nmcli general permissions for an overview of current permissions that apply

Managing Network Configuration with nmcli

Note: this is a powerful tool, but it is not on the RHCSA exam.

  • nmcli has awesome tab completion
  • nmcli con show shows current connections
  • nmcli dev status shows current network devices
  • nmcli con show {con-name} shows all connection settings
  • nmcli con mod will modify connection settings: use tab completion!
  • nmcli con reload will reload the modified connection

Adding a new connection is complex

nmcli con add con-name mynewconnection ifname ens33 ipv4.addresses 10.0.0.10/24 ipv4.gateway 10.0.0.1 ipv4.method manual type ethernet
  • Use ipv4.method manual on connections that don’t use DHCP
  • Without this setting, a DHCP server will be contacted, even if static configuration has been set

Managing Network Configuration with nmtui

  • Use nmtui to save time on the exam

Troubleshooting Networking

  • Use ping to verify connectivity
    • ping -c 4 archlinux.org sends 4 packets then stops
  • Use ping6 to ping an IPv6 address
    • When using ping6 on link-local addresses, you must include the NIC name in the command
      • e.g. ping6 ff02::1%ens33
  • ip route prints the routing table
  • ip -6 route shows the IPv6 routing table
  • tracepath example.com shows the entire networking path
  • tracepath6 example.com shows the entire IPv6 networking path
  • ss is used to analyze socket statistics
    • ss -tu
    • ss -tuna
    • ss -tunap
    • ss -tulnp

Lab Exercise

  • Set the hostname for your server to rhcsaserver.example.com
  • Set your server to a fixed IP address that matches your current network configuration
  • Also set a second IP address 10.0.0.10/24 on the same network interface
  • Enable host name resolution for your local server hostname
  • Reboot and verify your network is still working with the new settings

- Clint Jordan