8. Manage Basic Networking
πRed Hat Certified System Administrator (RHCSA β EX200)
1. Understanding IP Addresses
IPv4
- IPv4 addresses are 32-bit numbers, usually written in dotted-decimal format, e.g.,
192.168.1.10. - They consist of:
- Network part β identifies the network.
- Host part β identifies the device on that network.
- Subnet mask (e.g.,
255.255.255.0) tells which part is network and which is host.
IPv6
- IPv6 addresses are 128-bit numbers, written in hexadecimal with colons, e.g.,
2001:db8::1. - Provides a huge number of addresses for modern networks.
- Prefix (like
/64) defines the network portion. - IPv6 can be link-local (for local network only) or global (for internet communication).
2. Types of Network Configuration
RHCSA expects you to know two main ways to configure IP addresses:
- Temporary (runtime) configuration β changes last only until reboot.
- Permanent configuration β changes survive reboots.
3. Temporary Configuration (Runtime)
Temporary configuration is done using the ip command or nmcli (NetworkManager CLI).
Check current IP addresses
ip addr show
- Shows all network interfaces and their IPs.
ip ais the shorter version.
Assign an IPv4 address temporarily
sudo ip addr add 192.168.1.10/24 dev enp0s3
sudo ip link set enp0s3 up
/24= subnet mask 255.255.255.0dev enp0s3= the interface name (useip ato check).
Assign an IPv6 address temporarily
sudo ip -6 addr add 2001:db8::10/64 dev enp0s3
sudo ip link set enp0s3 up
Remove an IP address
sudo ip addr del 192.168.1.10/24 dev enp0s3
Note: These changes will not survive a reboot. After a restart, the system will revert to permanent settings.
4. Permanent Configuration
Permanent IP configuration is done by editing NetworkManager configuration files or using nmcli.
a) Using nmcli
Check existing connections:
nmcli connection show
Modify or add a connection:
nmcli connection modify "System enp0s3" ipv4.addresses 192.168.1.10/24
nmcli connection modify "System enp0s3" ipv4.gateway 192.168.1.1
nmcli connection modify "System enp0s3" ipv4.dns 8.8.8.8
nmcli connection modify "System enp0s3" ipv4.method manual
nmcli connection up "System enp0s3"
For IPv6:
nmcli connection modify "System enp0s3" ipv6.addresses 2001:db8::10/64
nmcli connection modify "System enp0s3" ipv6.gateway 2001:db8::1
nmcli connection modify "System enp0s3" ipv6.method manual
nmcli connection up "System enp0s3"
b) Using configuration files
- Files are located in:
/etc/NetworkManager/system-connections/ - Open the connection file with a text editor, e.g.,
sudo vi /etc/NetworkManager/system-connections/System\ enp0s3.nmconnection - Look for
[ipv4]or[ipv6]section and set:
[ipv4]
method=manual
addresses=192.168.1.10/24
gateway=192.168.1.1
dns=8.8.8.8;
- After editing:
sudo nmcli connection reload
sudo nmcli connection up "System enp0s3"
This is permanent and survives reboots.
5. DHCP vs Static IP
- DHCP (Dynamic Host Configuration Protocol): IP is automatically assigned by a DHCP server.
- Static IP: IP is manually assigned and does not change.
- RHCSA may require you to set both DHCP and static IPs for exam tasks.
Example of DHCP:
nmcli connection modify "System enp0s3" ipv4.method auto
nmcli connection up "System enp0s3"
6. Verifying Network Configuration
After configuration, always verify:
- Check IP address:
ip addr show
- Check connectivity:
ping 8.8.8.8 # IPv4
ping6 2001:4860:4860::8888 # IPv6
- Check default gateway:
ip route show
- Check DNS:
cat /etc/resolv.conf
7. Quick RHCSA Exam Tips
- Know the difference between runtime vs permanent configuration.
- Practice
nmclicommands; they are required in the exam. - Always verify your IP and connectivity after configuration.
- Be comfortable with both IPv4 and IPv6 syntax.
- Be ready to configure static IPs, DHCP IPs, and gateway/DNS.
β Summary Table for Quick Review
| Action | IPv4 Command | IPv6 Command |
|---|---|---|
| Temporary add IP | ip addr add 192.168.1.10/24 dev enp0s3 | ip -6 addr add 2001:db8::10/64 dev enp0s3 |
| Bring interface up | ip link set enp0s3 up | Same |
| Permanent (manual) | nmcli connection modify "System enp0s3" ipv4.method manual ... | nmcli connection modify "System enp0s3" ipv6.method manual ... |
| DHCP | nmcli connection modify "System enp0s3" ipv4.method auto | nmcli connection modify "System enp0s3" ipv6.method auto |
| Verify IP | ip addr show | Same |
| Test connectivity | ping 8.8.8.8 | ping6 2001:4860:4860::8888 |
This covers everything needed to configure IPv4 and IPv6 addresses for RHCSA in a way you can both understand and use in the exam.
