How do you connect a Linux server to a network so other computers can reach it, and ensure its hostname resolves correctly so people can find it by name instead of by a hard-to-remember number? Without basic network configuration, a server is just an expensive paperweight — nothing can send data to it or receive data from it. For the EX200 exam, you must know how to set up network interfaces, check routing, and test hostname resolution, because these tasks appear in nearly every network-related question.
Jump to a section
A simple way to picture Basic Network Configuration and Troubleshooting
Moving into a new shared flat means your laptop, phone, and smart TV all need to join the flat's WiFi network. You plug in the router, but nothing works yet because the router doesn't know your devices exist. That is the first problem: no connection means no communication.
The flat has a single internet cable coming in from the street. That cable is like your internet service provider (ISP) connection. The router itself is a device that hands out addresses so every device can talk to the internet. When you first set up the router, you must give it a name (SSID) and a password. This is the equivalent of configuring a network interface: you tell the router 'this is your identity on the local network'.
Now your flatmate's laptop connects. The router automatically gives it a local IP address, just like a landlord assigns a flat number. This process is DHCP (Dynamic Host Configuration Protocol). But what if your flatmate connects their own separate router? Suddenly two routers are fighting to hand out addresses, and some devices cannot reach the internet. That clash is a routing problem. To fix it, you must check each device's current address, then decide which router is the 'default gateway' — the proper door to the outside world. That is exactly how you troubleshoot a misconfigured network in IT: you check IP addresses, verify the default gateway, and, if needed, change the configuration files so every device knows the right path out.
Every computer on a network needs a unique identifier, called an IP address, so data can flow to the right machine. An IP address is like a postal address: it tells other computers where to send information. There are two main versions: IPv4, which looks like 192.168.1.10, and IPv6, which is longer and looks like 2001:db8::1. For the EX200 exam, you will primarily work with IPv4.
But an IP address alone is not enough. Computers also need to know the 'default gateway' — the router that connects their local network to the wider internet or to other networks. Without a default gateway, your server can talk to other computers in the same room but cannot reach the internet. The default gateway is usually your router's IP address, such as 192.168.1.1.
Another essential piece is the subnet mask. A subnet mask tells a computer which part of an IP address is the 'neighbourhood' (network part) and which part is the house number (host part). For example, 255.255.255.0 means the first three numbers (192.168.1) are the network, and the last number (10) is the specific device. This helps the computer decide if it should send data directly to another device on the same network or forward it to the default gateway.
In Red Hat Enterprise Linux (RHEL), network configuration is managed through configuration files stored in specific directories. The main tool for modern RHEL versions is NetworkManager, a service that manages network connections dynamically. You can interact with it using the command line tool 'nmcli' or the text-based interface 'nmtui'. For the exam, you must be comfortable with both.
To configure a static IP address (one that never changes) instead of using DHCP, you need to edit the connection settings. In older RHEL versions, you edited files in /etc/sysconfig/network-scripts/. In newer versions, you use nmcli commands like 'nmcli connection modify eth0 ipv4.addresses 192.168.1.100/24' and then set 'ipv4.method manual'. After making changes, you must restart the network interface or reload the connection for the changes to take effect.
Routing is the decision-making process a computer uses to forward packets to their destination. The kernel maintains a routing table that lists known paths. You can view it with 'ip route show'. Each route has a destination (a network IP), a gateway (where to send the packet next), and a metric (priority). The default route (destination 0.0.0.0/0) is the catch-all: if a packet does not match any more specific route, it goes to the default gateway. For instance, if your server is on 192.168.1.0/24 and you want it to send traffic to another network 10.0.0.0/8, you would add a route with 'ip route add 10.0.0.0/8 via 192.168.1.1'.
Hostname resolution is the process of converting a human-friendly name like 'webserver.example.com' into an IP address. The primary method is DNS (Domain Name System), which works like a phone book. Your server queries a DNS server, usually defined in the file /etc/resolv.conf. The line 'nameserver 8.8.8.8' tells the system to use Google's public DNS server. You can test resolution with commands like 'dig' or 'nslookup'. For local testing, you can also add entries to the file /etc/hosts, which maps names directly to IP addresses without using DNS. This file is checked before DNS by default, which is important for troubleshooting when DNS is unavailable.
Why do you need static versus dynamic configuration? DHCP is great for client machines like laptops, because they get an address automatically. But servers providing services (web servers, database servers) need a static IP so clients always know where to find them. Setting a static IP manually prevents the address from changing after a reboot or network outage.
Troubleshooting network issues involves a systematic approach. First, check the physical connection: is the cable plugged in? Is the interface up? Use 'ip link show' to see interface status. Next, check if the interface has an IP address: 'ip addr show'. Then verify the default gateway: 'ip route show'. Then test local connectivity by pinging another device on the same network: 'ping 192.168.1.50'. Then test internet connectivity: 'ping 8.8.8.8'. Finally, test name resolution: 'ping www.google.com'. If that fails, it is often a DNS issue. Each step isolates where the problem lies.
Check current network state
Run 'ip addr show' to see all interfaces and their IPs. Run 'ip route show' to see the routing table. This gives you a baseline of what is working before you change anything.
Identify the correct interface
Use 'nmcli device status' or 'ip link show' to find the interface name (e.g., enp0s3, eth0). You must know exactly which interface to configure, or you might modify the wrong one.
Configure static IP or DHCP
Use 'nmcli connection modify' to set the IP address, gateway, and DNS. If the task specifies a static IP, set 'ipv4.method manual'. If DHCP, set it to 'auto'. This step directly affects whether the server can communicate.
Activate the configuration
Run 'nmcli connection up [connection-name]' to apply the changes immediately. Without this step, the configuration exists in files but is not active on the interface.
Set the hostname
Use 'hostnamectl set-hostname [name]' to set the system hostname. Optionally, add an entry to /etc/hosts for local resolution. Hostname must be resolvable for many services to work correctly.
Verify the network
Test local connectivity by pinging another device on the same subnet. Test default gateway by pinging the gateway IP. Test internet by pinging 8.8.8.8. Test DNS by pinging a domain name. Each test isolates a potential problem layer.
Imagine you work as a junior system administrator for a small company that just acquired a branch office. Your manager says, 'We need the new office server to join our main network so employees can access the shared file server.' Your task is to configure the new server's network interface, set up routing so it can reach the internet through the main office's gateway, and ensure its hostname 'branch-fileserver' resolves correctly across the company.
You start by physically setting up the server in the branch office rack and plugging in the network cable. Next, you log in to the server and check the existing network configuration. You use 'ip addr show' and see that the interface (call it enp0s3) has no IP address — it is not configured. You know the branch office uses the subnet 10.0.2.0/24 with a gateway 10.0.2.1.
You decide to assign a static IP address so the server never changes. Using nmcli, you run: - 'nmcli connection modify enp0s3 ipv4.addresses 10.0.2.100/24' - 'nmcli connection modify enp0s3 ipv4.gateway 10.0.2.1' - 'nmcli connection modify enp0s3 ipv4.dns 8.8.8.8' - 'nmcli connection modify enp0s3 ipv4.method manual' - 'nmcli connection up enp0s3'
You then verify the configuration with 'ip addr show' and see the address 10.0.2.100/24 assigned. You test local connectivity by pinging another device on the same subnet, say a printer with IP 10.0.2.20, and it responds. Great. Then you test the default gateway by pinging 10.0.2.1, and it also responds. Next, you test internet access by pinging 8.8.8.8. It works.
Now you need to set the hostname. The company convention is to use hostnames like 'branch-fileserver'. You run 'hostnamectl set-hostname branch-fileserver' and then check with 'hostnamectl'. You also add an entry to /etc/hosts so that other servers in the main office can reach it: '10.0.2.100 branch-fileserver.branch.local branch-fileserver'.
The final step is to ensure the main office's DNS server knows about this server. Your manager asks you to register the hostname in the company's internal DNS. You contact the DNS admin to add an A record for 'branch-fileserver.branch.local' pointing to 10.0.2.100. After that, from your workstation in the main office, you type 'ping branch-fileserver.branch.local' and get a reply. The network configuration is complete.
This scenario is exactly what the EX200 exam tests: the ability to configure interfaces, set static IPs, verify routing, and manage hostname resolution. You would never encounter a question about a fictional scenario — instead, you are given a server with a broken configuration and told to fix it using the tools described.
The EX200 exam tests 'Basic Network Configuration and Troubleshooting' in both multiple-choice and performance-based (hands-on) tasks. On the hands-on section, you are given a virtual machine with a broken network configuration and need to fix it. Expect specific questions like:
'Set the IP address of interface eth0 to 192.168.1.50/24 and make it persistent.' The trap is that you must use nmcli with the 'manual' method; if you leave it as 'auto', DHCP will override your static IP after a reboot.
'Add a default gateway of 10.0.0.1.' You must use 'ip route add default via 10.0.0.1' or modify the connection profile. The trap is that people try to use 'route add default gw 10.0.0.1', which is deprecated.
'Configure the hostname of the system to 'server1.example.com'.' They check both 'hostnamectl set-hostname' and updates to /etc/hostname. The trap: you must also ensure the hostname resolves to the loopback address in /etc/hosts to avoid slow sudo commands.
Key concepts they love to test:
The difference between 'ip addr' (current IP) and 'ip link' (interface state). Questions often show a disabled interface and ask why ping fails.
The file /etc/resolv.conf: it is managed by NetworkManager. If you edit it by hand, NetworkManager overwrites it. The correct method is to set DNS through nmcli or the connection profile.
The order of name resolution is defined in /etc/nsswitch.conf under the 'hosts' line. By default it is 'files dns' meaning /etc/hosts is checked first. Questions may ask you to add a host entry to override DNS.
The use of 'nmcli connection show' and 'nmcli connection modify' versus 'ifconfig' (which is not installed by default on RHEL 8/9).
Trap patterns to watch for:
A question might present a scenario where a machine can ping an IP address but not a hostname. This isolates the problem to DNS configuration. The correct answer is to check /etc/resolv.conf and ensure there is a valid nameserver line.
They might ask you to 'make the network configuration persistent across reboots' — the trap is that some changes (like 'ip addr add') are temporary. You must use configuration files or nmcli commands that survive reboots.
They might give you a broken default gateway and ask why 'ping 8.8.8.8' fails while 'ping 192.168.1.1' works. The answer is that the default gateway is missing or incorrect.
Key definitions to memorise:
Loopback interface (lo): a virtual interface that always has the IP 127.0.0.1. Used for internal communication between processes on the same machine.
Default route: the route taken when no other route matches. Represented as 0.0.0.0/0 in IPv4.
DNS resolver: the part of the system that translates hostnames to IP addresses. Configured via /etc/resolv.conf.
ifcfg files: in /etc/sysconfig/network-scripts/, these are legacy but still known. In newer RHEL, they are auto-generated by NetworkManager.
Bonding: combining two physical interfaces into one logical interface for redundancy or speed. Not always tested but appears in advanced questions.
Use 'ip addr' not 'ifconfig' to check IP addresses in modern RHEL systems.
NetworkManager is the default service controlling network interfaces; always use nmcli or nmtui to make persistent changes.
Set a static IP using 'nmcli connection modify [connection] ipv4.method manual' and specify the address and gateway.
The default gateway is the route to 0.0.0.0/0; missing it means no internet access.
Name resolution checks /etc/hosts first, then DNS, as defined in /etc/nsswitch.conf.
The loopback interface (lo) with IP 127.0.0.1 is for internal machine-to-process communication only.
These come up on the exam all the time. Here's how to tell them apart.
Static IP Configuration
IP address never changes unless manually edited
Requires manual setup of address, gateway, and DNS
Used for servers that need a consistent address
Dynamic IP Configuration (DHCP)
IP address assigned automatically by a DHCP server
No manual setup needed; configuration is automatic
Used for client machines like laptops and desktops
IP Address (IPv4)
Numerical identifier for a network interface
Must be unique on the local network
Used by network protocols to route data
Hostname
Human-readable name for a computer
Can be shared if in different networks
Simplifies user access and administration
Default Gateway
Handles routing traffic to other networks
Typically the IP of the local router
Works at the network layer (Layer 3)
DNS Server
Resolves hostnames to IP addresses
Typically an IP address like 8.8.8.8
Works at the application layer
nmcli (NetworkManager CLI)
Manages persistent network profiles
Configures connections, not just interfaces
Integrates with NetworkManager service
ip command suite
Manages runtime network state
Works directly with network interfaces and routes
Changes are temporary unless scripted
Mistake
Editing /etc/resolv.conf directly is the best way to set DNS servers permanently.
Correct
In RHEL 7 and later, NetworkManager manages /etc/resolv.conf. Edits you make by hand are overwritten when NetworkManager restarts. You should set DNS through nmcli or the connection profile instead.
This mistake is common because older tutorials and documentation show direct editing, and beginners do not realise NetworkManager is now in control.
Mistake
Using the 'ifconfig' command is still the standard way to check IP addresses in modern RHEL.
Correct
'ifconfig' is deprecated and not installed by default in RHEL 8 and 9. The recommended command is 'ip addr' or 'ip a'.
Many beginners learn from older resources (books, forums) that still use ifconfig, so they are unfamiliar with the newer 'ip' suite.
Mistake
A hostname is automatically resolvable to the server's IP address without any extra configuration.
Correct
A hostname like 'server1' is not automatically resolved by other computers. You must register it in DNS or add it to /etc/hosts on every machine that needs to reach it.
This comes from home networks where routers often do DNS resolution automatically, but in an enterprise environment, it is not automatic.
Mistake
Setting a static IP via 'ip addr add' is enough to make the change permanent after a reboot.
Correct
The 'ip addr add' command only makes temporary changes that disappear after a reboot or network service restart. You must use nmcli or edit connection profiles for permanent configuration.
Beginners often see the IP change immediately after the command and assume it is permanent, not realising the difference between runtime and persistent configuration.
Mistake
If you can ping an IP address like 8.8.8.8, then DNS is definitely working.
Correct
Pinging 8.8.8.8 proves internet connectivity via IP, but DNS resolution is a separate service. You must test by pinging a hostname like 'www.google.com' to verify DNS is functioning.
The two concepts are easy to conflate because both use the ping command, but they involve different layers of network functionality.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
This means your internet connection and routing are fine, but DNS resolution is broken. Check /etc/resolv.conf to see if a valid nameserver is listed, or use 'nmcli connection modify' to set the correct DNS server.
Use 'nmcli connection modify [conn-name] ipv4.addresses 192.168.1.100/24', then set 'ipv4.method manual', and finally 'nmcli connection up [conn-name]'. This writes the configuration to NetworkManager profile files that persist across reboots.
The default gateway is the router on your local network that connects your computer to other networks or the internet. Without it, your computer can only talk to devices on the same subnet. You can see it in the routing table as a route to 0.0.0.0/0.
'ip addr' shows IP addresses assigned to each interface. 'ip link' shows the interface's state (up or down) and MAC address. Use 'ip link set [interface] up' to enable a disabled interface.
You probably used a temporary command like 'ip addr add' instead of configuring NetworkManager persistently. Use 'nmcli connection modify' or edit the appropriate connection file to make changes survive reboots.
Edit the file /etc/hosts and add a line with the IP address and hostname, for example '192.168.1.10 my-server'. This file is checked before DNS by default, allowing you to override DNS for testing.
You've finished Basic Network Configuration and Troubleshooting. Continue through the EX200 study guide to build a complete picture of the exam.
Done with this chapter?