Objectives
What the exam tests
- Configure IPv4 and IPv6 addresses on network interfaces
- Configure hostname resolution using
/etc/hostsand DNS - Set and verify static and dynamic (DHCP) network configurations
- Configure the system hostname persistently
- Use NetworkManager tools (
nmcli,nmtui) to manage connections - Configure firewall rules to allow or block specific services and ports
- Use network diagnostic tools (
ss,ping,tracepath,nmap) - Configure routing — add static routes
Networking tasks appear on every RHCSA exam. Expect at least one task requiring you to configure a static IP address, set a hostname, and open a firewall port — and verify all three persist after a reboot.
Coverage weight by topic
IP addressing concepts
IPv4 addressing fundamentals
An IPv4 address is 32 bits written as four decimal octets separated by dots. A subnet mask (or CIDR prefix) determines which part identifies the network and which identifies the host.
| CIDR | Subnet mask | Hosts per network | Common use |
|---|---|---|---|
/8 | 255.0.0.0 | 16,777,214 | Class A / large private |
/16 | 255.255.0.0 | 65,534 | Class B / medium private |
/24 | 255.255.255.0 | 254 | Class C / small LAN most common |
/25 | 255.255.255.128 | 126 | Half of a /24 |
/30 | 255.255.255.252 | 2 | Point-to-point links |
/32 | 255.255.255.255 | 1 | Host route / loopback |
Private IP address ranges
| Range | CIDR | Class | Notes |
|---|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | A | Large private networks, data centers |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | B | Medium private networks |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | C | Home and small office LANs most common on exam |
| 127.0.0.0 – 127.255.255.255 | 127.0.0.0/8 | Loopback | Local host only — 127.0.0.1 is localhost |
| 169.254.0.0 – 169.254.255.255 | 169.254.0.0/16 | Link-local | APIPA — assigned when DHCP fails |
IPv6 basics for RHCSA
Network layer model — what exam tasks touch
| Layer | Function | RHCSA tools |
|---|---|---|
| Physical / Link | Hardware, MAC addresses, Ethernet | ip link, ethtool |
| Network (L3) | IP addressing, routing | nmcli, ip addr, ip route |
| Transport (L4) | TCP/UDP ports, connections | ss, firewalld port rules |
| Application (L7) | DNS, HTTP, SSH, NFS… | firewalld service rules, dig, curl |
nmcli — NetworkManager CLI
nmcli object and command structure
Configure a static IP address — full workflow
When adding a second IP to the same interface, use +ipv4.addresses (with the + prefix) to append rather than replace: nmcli con mod "ens3" +ipv4.addresses "192.168.1.101/24"
Configure DHCP
Create a new connection profile
Static routes
Routes added with ip route add are runtime-only and lost on reboot. Always use nmcli connection modify +ipv4.routes for persistent routes.
nmtui — text-based UI alternative
If you blank on nmcli syntax during the exam, nmtui provides the same functionality through a navigable menu. Both tools write to the same NetworkManager profile files.
DNS and hostname
Hostname management
Fully qualified domain names (FQDNs) use the format hostname.domain.tld. On the exam, if asked to set an FQDN, include the domain: hostnamectl set-hostname server1.example.com
/etc/hosts — local name resolution
Resolution order is controlled by /etc/nsswitch.conf. The default hosts: files dns means /etc/hosts is checked first, then DNS. Changing this is rarely needed on the exam.
DNS configuration
Never edit /etc/resolv.conf directly on RHEL 9 — NetworkManager will overwrite it. Always use nmcli to set DNS servers.
firewalld
firewalld concepts — zones
firewalld uses zones to group rules. Each network interface is assigned to a zone. Interfaces in more trusted zones get less restrictive rules.
| Zone | Trust level | Default behavior |
|---|---|---|
drop | None | All incoming dropped silently. Only outgoing allowed. |
block | None | Incoming rejected with ICMP message. Outgoing allowed. |
public | Low | Only selected incoming allowed. Default zone |
external | Low | Masquerading enabled — for internet-facing interfaces. |
dmz | Medium | Some services accessible from outside. |
work | Medium | Mostly trusted — more services allowed. |
home | Medium-high | Trusted home network. |
internal | High | Trusted internal network. |
trusted | Full | All traffic accepted. Use with care. |
firewall-cmd — essential commands
Working with zones
public) zone. Rich rules are less common but good to know for blocking specific source IPs.Common pre-defined firewalld services
| Service name | Port(s) | Protocol |
|---|---|---|
ssh | 22 | TCP |
http | 80 | TCP |
https | 443 | TCP |
ftp | 21 | TCP |
dns | 53 | TCP+UDP |
smtp | 25 | TCP |
nfs | 2049 | TCP+UDP |
samba | 139, 445 | TCP |
cockpit | 9090 | TCP |
kerberos | 88 | TCP+UDP |
ldap | 389 | TCP |
mysql | 3306 | TCP |
postgresql | 5432 | TCP |
Service definitions are stored in /usr/lib/firewalld/services/. You can create custom services in /etc/firewalld/services/.
Network diagnostics
ss — socket statistics (replaces netstat)
Connectivity and path diagnostics
Network troubleshooting workflow
Port scanning with nmap
Cheat sheet
Most-tested commands — quick reference
nmcli device statusnmcli connection showip addr showip route shownmcli con mod "ens3" ipv4.method manual ipv4.addresses "x.x.x.x/24"nmcli con mod "ens3" ipv4.gateway "x.x.x.x"nmcli con mod "ens3" ipv4.dns "8.8.8.8"nmcli con up "ens3"nmcli con mod "ens3" ipv4.method autonmcli con mod "ens3" +ipv4.routes "net/mask gw"hostnamectl set-hostname srv1.example.comhostnamectldig example.comgetent hosts example.comfirewall-cmd --list-allfirewall-cmd --permanent --add-service=http && firewall-cmd --reloadfirewall-cmd --permanent --add-port=8080/tcp && firewall-cmd --reloadfirewall-cmd --permanent --remove-service=httpfirewall-cmd --reloadss -tulnpping -c 4 8.8.8.8tracepath 8.8.8.8nmtuifirewall-cmd --get-servicesnmcli property reference
| nmcli property | Value examples | Effect |
|---|---|---|
ipv4.method | manual / auto / disabled | Static, DHCP, or disable IPv4 |
ipv4.addresses | "192.168.1.10/24" | Set IP address and prefix |
ipv4.gateway | "192.168.1.1" | Default gateway |
ipv4.dns | "8.8.8.8 1.1.1.1" | DNS nameservers (space-separated) |
ipv4.dns-search | "example.com corp.local" | DNS search domains |
ipv4.routes | "10.0.0.0/8 192.168.1.1" | Static routes |
ipv6.method | manual / auto / ignore | Static, SLAAC, or disable IPv6 |
ipv6.addresses | "2001:db8::1/64" | IPv6 address |
connection.autoconnect | yes / no | Connect automatically at boot |
connection.interface-name | ens3 | Bind profile to a device |
Static IP — exam template
Practice quiz
Question 1 of 8
You run nmcli connection modify "ens3" ipv4.method manual ipv4.addresses "192.168.1.50/24" ipv4.gateway "192.168.1.1". The address does not appear on the interface. What step is missing?
nmcli connection modify writes changes to the connection profile on disk but does not apply them to the running interface. You must then run nmcli connection down "ens3" && nmcli connection up "ens3" (or just nmcli connection up) to activate the new settings. A reboot would work but is unnecessary and slow. Restarting NetworkManager disconnects all interfaces briefly.Question 2 of 8
Which command adds a second IP address 10.0.0.5/24 to interface ens3 without removing the existing address?
+ prefix on a property name in nmcli means "append to" rather than "replace." Without the +, Option A would replace the existing address with the new one. Option C uses ip addr add which is runtime-only and lost on reboot. Option D is not valid nmcli syntax.Question 3 of 8
You add a service rule with firewall-cmd --permanent --add-service=http but HTTP traffic is still blocked immediately after the command. Why?
--permanent writes the rule to disk so it survives reboots, but does not activate it in the currently running firewall. You must follow with firewall-cmd --reload to load the permanent rules into the runtime configuration. Alternatively, add the service twice — once without --permanent (immediate, non-persistent) and once with it (persistent).Question 4 of 8
Which command shows all TCP and UDP ports that are currently listening on the system, including the process name?
ss -tulnp: -t TCP, -u UDP, -l listening only, -n numeric ports (no name lookup), -p show process/PID. This is the modern replacement for netstat -tulnp. Option C only shows ports explicitly opened in firewalld, not what's actually listening. Option A shows network link status, not sockets.Question 5 of 8
A host at 192.168.1.20 needs to reach the 10.50.0.0/24 network through gateway 192.168.1.254. Which command adds this route persistently?
nmcli connection modify +ipv4.routes adds a static route to the NetworkManager connection profile, making it persistent across reboots. After modifying, run nmcli connection up "ens3" to apply. Options A and C add runtime-only routes lost after reboot. Option D references a non-existent file.Question 6 of 8
You need the system to resolve the name devserver to 10.0.0.99 without configuring a DNS server. What is the correct approach?
/etc/hosts provides static local hostname-to-IP mappings and is consulted before DNS by default. The correct entry format is IP hostname [aliases]: 10.0.0.99 devserver. Option A — /etc/resolv.conf only accepts nameserver, search, and domain keywords, not host entries. Option D adds 10.0.0.99 as a DNS server to query, not a local mapping.Question 7 of 8
What does a 169.254.x.x address on an interface indicate?
169.254.0.0/16 range is the Automatic Private IP Addressing (APIPA) / link-local range (RFC 3927). When a system configured for DHCP cannot reach a DHCP server, it self-assigns an address from this range so it can still communicate with other hosts on the same link. Seeing a 169.254.x.x address is almost always a sign that DHCP is not working — check network connectivity and DHCP server availability.Question 8 of 8
Which firewalld zone accepts all incoming traffic without any restrictions?
trusted zone accepts all incoming traffic with no restrictions — it is the most permissive zone. The public zone (default) blocks most incoming traffic except explicitly allowed services like ssh and dhcpv6-client. The internal and home zones are more permissive than public but still apply rules. Use trusted only on completely controlled internal networks.