Courseiva

LFCS · domain

Networking

The Networking domain of the LFCS exam covers configuring and troubleshooting Linux network interfaces, routing, DNS resolution, firewalling, and remote access. You will perform hands-on tasks in a live environment: setting static addresses with ip or nmcli, editing Netplan or ifcfg files, opening ports with firewalld or ufw, and verifying connectivity using ss, dig, and ping.

97 questions28 easy36 medium33 hard

Focused practice

Practice Networking questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Networking

Configure and troubleshoot interfaces with ip, nmcli, and netplan, manage routes, DNS via /etc/resolv.conf, and firewalld or ufw rules. Get the persistent config right: changes must survive reboot, not just apply at runtime.

Configure static IPv4/IPv6 addresses and routes using ip, nmcli, or Netplan

Manage hostname resolution via /etc/hosts, /etc/resolv.conf, and systemd-resolved

Control inbound traffic with firewalld zones, firewall-cmd, or ufw rules

Inspect listening sockets and connections using ss, netstat, and lsof

Watch out for

Common Networking exam traps

  • ▸Editing /etc/resolv.conf directly on systemd-resolved systems, where changes are overwritten and should instead go through resolvectl or Netplan
  • ▸Forgetting to make firewalld rules permanent with --permanent and reload, so they vanish after reboot or reload
  • ▸Using ifconfig and route from net-tools instead of the ip command, which is the expected modern toolset

Question index

All Networking questions (97)

Click any question to see the full explanation, or start a practice session above.

1

A financial firm requires all internal SSH connections to be encrypted with at least 256-bit ciphers. An administrator is configuring the SSH server. Which configuration line should be added to /etc/ssh/sshd_config?

Medium
2

A Linux server has two interfaces, ens5 (203.0.113.10/24) and ens6 (10.20.0.0/24 gateway for internal clients). Internal clients must reach the internet through ens5. The administrator has enabled net.ipv4.ip_forward=1 and configured NAT on ens5, but clients still cannot reach external hosts. Which two additional checks are most likely to resolve the problem? (Choose two.)

Hard
3

You are a senior Linux administrator for a large data center. A junior admin reports that a newly deployed application server (192.168.100.50/24, default gateway 192.168.100.1) cannot communicate with a legacy server (192.168.200.50/24, default gateway 192.168.200.1). The two subnets are connected via a router (192.168.100.1 and 192.168.200.1). From the app server, you can ping the legacy server's IP successfully. However, when you try to establish an SSH session from the app server to the legacy server, it times out. You check the legacy server's firewall (ufw) and find that it allows SSH (port 22) from the entire 192.168.0.0/16 range. You also confirm that the SSH daemon is running and listening on 0.0.0.0:22. What is the most likely cause?

Hard
4

An administrator is configuring a Linux server as a router. The server has two interfaces: eth0 (192.168.10.1/24) connected to the internal LAN and eth1 (203.0.113.2/24) connected to the internet. After enabling IP forwarding, internal clients still cannot reach external websites. Which command is required to allow the internal subnet to be translated to the external interface?

Hard
5

A storage administrator must add a persistent secondary IPv4 address 192.0.2.50/24 to interface eth1 on a RHEL 9 server using NetworkManager. The primary address is already configured. Which command adds the address so that it survives a reboot?

Medium
6

A system administrator needs to permanently configure a network interface named ens33 with a static IPv4 address of 192.168.1.100/24 and a default gateway of 192.168.1.1 on a system using NetworkManager. Which command should the administrator use to achieve this?

Easy
7

An administrator must ensure that a Linux router forwards IPv4 packets between its two interfaces, eth0 and eth1, without rebooting. Which command enables this behavior immediately?

Hard
8

A systemd-networkd managed interface enp1s0 needs to be configured with a static IP address 192.168.1.100/24 and a default gateway via 192.168.1.1. Which .network file configuration is correct?

Hard
9

You are a systems administrator for a company that runs a critical application on a Linux server with two network interfaces: eth0 (public IP 203.0.113.10/24, gateway 203.0.113.1) and eth1 (private IP 10.0.1.10/24, no gateway). The server must be accessible via SSH (port 22) from the internet, but only from a specific management subnet 198.51.100.0/24. Additionally, the server should be able to access the internet for package updates, but no other inbound traffic from the internet is allowed. The local firewall is iptables. After implementing rules, you find that the server cannot reach the internet (e.g., ping 8.8.8.8 fails), but SSH from the management subnet works. What is the most likely cause?

Hard
10

An administrator needs to temporarily assign the IPv4 address 172.16.5.20/24 to interface ens3, which is currently up but unconfigured. The change should not persist across reboots. Which command accomplishes this?

Easy
11

A technician must verify which network services are listening on TCP ports and which processes own them on a production server. Which command provides this information directly?

Easy
12

An administrator is troubleshooting name resolution on a server. Queries for internal names succeed, but every query for external names fails with 'connection timed out; no servers could be reached'. The file /etc/resolv.conf contains 'nameserver 10.20.30.40' and 'nameserver 10.20.30.41'. The internal DNS servers are reachable, and the administrator wants to test which external name servers actually respond. Which command best performs this test?

Hard
13

A Linux server has two network interfaces: eth0 (192.168.1.10/24) and eth1 (10.0.0.10/24). The administrator wants to configure the server to route traffic between the two networks. Which two actions are required? (Choose two.)

Medium
14

The command 'ss -tuln' shows port 80 is listening on a server, but a remote client cannot connect via HTTP. What is the most likely cause?

Easy
15

A system administrator needs to ensure that a Linux server can communicate with other hosts on the same subnet. Which command should be used to verify the IP address and netmask configuration?

Easy
16

A technician configured a new network interface eth1 on a CentOS 7 server but the interface does not obtain an IPv4 address via DHCP. Which of the following is the most likely cause?

Hard
17

A Linux server is unable to resolve the hostname 'app.internal.example.com' but can resolve other names. The /etc/nsswitch.conf file contains: hosts: files mdns4_minimal [NOTFOUND=return] dns. The /etc/hosts file does not list the hostname. Which configuration change would most likely resolve the issue?

Hard
18

A server has multiple IP aliases on eth0. Remote hosts cannot reach the secondary IP addresses. What should the administrator check?

Hard
19

A server uses firewalld. Which command permanently allows HTTP traffic?

Hard
20

Given the routing table, if the server sends a packet to destination 10.0.1.200, which interface will be used and what is the next hop?

Hard
21

A Linux server uses systemd-resolved for DNS resolution. Users report that queries for internal hostnames such as 'db.corp.example.com' are failing, while external names resolve correctly. The administrator runs 'resolvectl status' and sees that the interface eth0 has DNS servers 10.0.0.53 and 'DNS Domain: corp.example.com'. Which command should be used to query the internal DNS server directly and verify that it responds to the name?

Hard
22

A Linux server cannot reach the internet, but internal LAN connectivity works. The output of 'ip route' shows a default gateway of 192.168.1.1, but pinging 8.8.8.8 fails. What is the most likely cause?

Medium
23

A system administrator is managing a RHEL 8 server that requires a static IP address on interface ens192. The administrator modifies /etc/sysconfig/network-scripts/ifcfg-ens192 to set BOOTPROTO=static, IPADDR=192.168.1.100, PREFIX=24, GATEWAY=192.168.1.1, and DNS1=8.8.8.8. After saving, the administrator runs 'systemctl restart NetworkManager'. The interface obtains the correct static IP and network connectivity works. However, after a reboot of the server, the interface fails to come up with the static IP and instead obtains an IP via DHCP from the local network. The administrator verifies that the DHCP server is active and that the physical connection is good. What is the most likely cause of the issue?

Medium
24

Which bonding mode provides high availability without requiring switch configuration?

Medium
25

A system administrator needs to securely transfer files between two Linux servers using port 22. The administrator uses the following command: 'scp file.txt user@remote:/tmp/'. The transfer fails with the error 'Permission denied (publickey)'. What is the most likely cause?

Hard
26

A system administrator wants to combine two network interfaces for increased throughput and fault tolerance. The requirement is that both links are active simultaneously and the system can tolerate a failure of one link without interruption. Which bonding mode should be used?

Easy
27

A system administrator notices that a web server is not reachable from the internet but is reachable from the internal network. The server's IP is 10.0.1.10/24, and the gateway is 10.0.1.1. Which command should be used to verify the default gateway configuration?

Medium
28

Which command displays the listening UDP ports on a Linux system?

Easy
29

Which THREE statements about Linux network bonding modes are correct? (Choose three.)

Hard
30

A systems administrator is responsible for a production Linux server running CentOS 7 that provides SSH access to users. The administrator decides to tighten security by restricting SSH access to a specific management subnet 10.0.0.0/24. While connected to the server via SSH from a workstation on 10.0.0.50, the administrator adds the following iptables rule: iptables -A INPUT -p tcp --dport 22 -s 10.0.0.0/24 -j ACCEPT followed by iptables -P INPUT DROP. Immediately after the rule change, the administrator loses all connectivity to the server, including SSH. The administrator suspects that the new default policy dropped the existing SSH session. What is the most reliable method for the administrator to regain access to the server without rebooting?

Hard
31

A Linux administrator needs to configure VLAN tagging on a network bridge to isolate traffic from different virtual machines. The physical interface is eth0, and VLAN ID 100 should be accessible via the bridge br0. Which set of commands correctly creates this configuration using the ip command?

Hard
32

An administrator is diagnosing why a server cannot reach the host 198.51.100.25. The server has one interface, eth0, with address 192.0.2.10/24. Running `ip route show` returns only the default route via 192.0.2.1. Which two commands will help determine whether the problem is at layer 2 or layer 3? (Choose two.)

Hard
33

A system administrator runs 'ss -tuln' and sees that port 80 is listening. What does the 'u' option represent?

Medium
34

You need to check the default gateway on a Linux server. Which command displays the current routing table, including the default route?

Easy
35

A Linux server has a single Ethernet interface eth0. The administrator needs to assign a static IPv4 address 192.0.2.10/24 with gateway 192.0.2.1 on a system that uses systemd-networkd. Which file should be created or edited to configure this interface?

Easy
36

An administrator wants to permanently configure a static IP address on a CentOS 7 system. Which file should be edited?

Easy
37

Which TWO commands can be used to view the current routing table on a Linux system?

Medium
38

A network administrator needs to block all incoming SSH traffic (port 22) from the 192.168.2.0/24 subnet. Which iptables command accomplishes this?

Medium
39

An administrator is unable to SSH into the server from a remote host at 192.168.1.100. Based on the exhibited iptables rules, what is the most likely reason?

Medium
40

An administrator is troubleshooting intermittent connectivity issues. Running 'ping -c 100 -i 0.2 10.0.0.1' shows about 5% packet loss. What is the primary purpose of the '-i 0.2' option?

Hard
41

A Linux server has two interfaces: enp3s0 (192.168.10.5/24) and enp4s0 (10.0.0.5/24). The default route is via 192.168.10.1. A junior admin adds a static route to 10.1.0.0/16 via 10.0.0.1 using the command: ip route add 10.1.0.0/16 via 10.0.0.1. After this, users report that traffic to 10.1.1.0/24 fails. Which command should the administrator run to confirm that the kernel is selecting the correct route and interface for destination 10.1.1.10?

Medium
42

Which TWO methods can be used to set a static IPv4 address on a CentOS 7 system? (Choose two.)

Easy
43

A Linux server's primary interface is ens3. Administrators report that after a recent reboot, the server's hostname resolves to 127.0.1.1 instead of its static address 203.0.113.25. The file /etc/hosts currently contains only the default '127.0.0.1 localhost' line. Which single change will make the hostname resolve to 203.0.113.25 for local lookups while leaving DNS resolution for all other names untouched?

Medium
44

Which THREE are built-in chains in the iptables filter table? (Choose three.)

Medium
45

Refer to the exhibit. The output of 'ip addr show' reveals that eth0 is in state DOWN and has no IPv4 address. Which command is most likely to bring the interface up and obtain an IP via DHCP?

Medium
46

A Linux server acting as a VPN gateway uses an nftables ruleset in the inet filter table. The administrator wants all forwarded traffic from the 10.8.0.0/24 VPN subnet to the 192.168.50.0/24 LAN to be accepted, while dropping any other forwarded traffic. Which nftables rule should be added to the forward chain to accomplish this?

Medium
47

Which THREE conditions must be met for a Linux system to function as a router between two networks?

Hard
48

Which TWO commands can be used to display the routing table on a Linux system?

Medium
49

An administrator is configuring a bridge using iproute2. Which command correctly attaches eth0 to bridge br0?

Hard
50

A company has a server with two network interfaces: eth0 (192.168.1.10/24, gateway 192.168.1.1) and eth1 (10.0.0.10/24, gateway 10.0.0.1). The server needs to reach a remote network 172.16.0.0/16 via a VPN tunnel that terminates at 10.0.0.5 on eth1. Which command should be used to add a route for this traffic?

Medium
51

A Linux server has a single interface ens3 with address 203.0.113.10/24. The administrator runs `ss -tulnp` and sees that a service is listening on 127.0.0.1:8080 only. Remote clients on the Internet report they cannot reach the service on port 8080 even though the firewall allows the port. Which change is the most appropriate to allow remote access while preserving the service's intended exposure?

Medium
52

An administrator is diagnosing a Linux router that forwards packets between two internal subnets. Users on 10.20.30.0/24 can reach hosts on 10.20.40.0/24, but responses from 10.20.40.0/24 arrive with the router's external address as the source. The administrator wants to inspect the NAT rules without modifying them. Which command displays the current rules in the nat table with packet and byte counters?

Hard
53

Which THREE are common tools used for network troubleshooting on Linux?

Medium
54

A system administrator is troubleshooting network connectivity from a server that can reach internal resources but cannot access the internet. The server's /etc/sysconfig/network-scripts/ifcfg-eth0 file contains: BOOTPROTO=static, IPADDR=10.0.0.10, NETMASK=255.255.255.0, GATEWAY=10.0.0.1. The administrator runs 'ip route show' and sees: default via 10.0.0.1 dev eth0. However, 'ping 8.8.8.8' fails. Which is the most likely cause?

Hard
55

Which TWO are valid methods to configure a network interface on a Linux system?

Hard
56

A Linux administrator needs to display the IP addresses and netmasks of all network interfaces on a server. Which command provides this information in a concise, modern format?

Easy
57

Which tool is the recommended method for persistently configuring network interfaces in RHEL 8?

Easy
58

Which TWO commands can be used to display the routing table on a Linux system? (Choose two.)

Medium
59

You manage a Linux server that provides DHCP services to a small office network using the dhcpd daemon. The server has two network interfaces: eth0 (192.168.1.1/24) serving the internal network, and eth1 (192.168.0.1/24) connected to a DMZ. The DHCP server is configured to serve addresses only on eth0. Users on the internal network report that they are not receiving IP addresses. You check the DHCP server and find that the dhcpd service is running and listening on UDP port 67. From a client, you run tcpdump and see DHCPDISCOVER packets being sent, but no DHCPOFFER from the server. You also verify that no firewall rules are blocking DHCP traffic on either side. What is the most likely reason for the failure?

Medium
60

A system administrator is troubleshooting network connectivity from a Linux server to a remote host at 10.0.0.1. The server has a default gateway of 192.168.1.1. Running `ping 10.0.0.1` fails, but `ping 192.168.1.1` succeeds. The output of `ip route show` shows a default route via 192.168.1.1. Which additional step should the administrator take to further investigate?

Hard
61

A Linux server has an interface eth0 with IP 192.168.1.100/24. You need to temporarily add a secondary IP address 192.168.1.101/24 to the same interface for testing, and then verify that both addresses are present. Which two commands will accomplish this? (Choose two.)

Medium
62

A Linux router has two interfaces: wan0 with address 198.51.100.10/24 and lan0 with address 10.10.0.1/24. Hosts on 10.10.0.0/24 can ping the router's lan0 address but cannot reach any Internet host. The administrator has already enabled net.ipv4.ip_forward=1. Which command is required to allow the internal hosts to reach external networks?

Hard
63

A server running Ubuntu 20.04 uses netplan for network configuration. The admin wants to set a static IP address 10.0.0.100/24 on interface enp0s3 with gateway 10.0.0.1 and DNS servers 8.8.8.8 and 8.8.4.4. Which YAML configuration is correct?

Medium
64

A user reports that they can access websites by IP address but not by domain name. Which command should the administrator use to diagnose the issue?

Easy
65

A Linux server needs to resolve the hostname db.internal.example.com to an IP address. The administrator wants to query the DNS server directly without relying on the local resolver cache. Which command should be used?

Easy
66

A developer needs to temporarily allow incoming TCP connections on port 8080 for testing. Which iptables command adds a rule to the INPUT chain to accept this traffic?

Easy
67

An administrator needs to allow incoming SSH connections on port 22 from the 192.168.50.0/24 subnet while blocking all other incoming SSH traffic, without disrupting existing established connections. Which command sequence using nftables accomplishes this?

Hard
68

Based on the tcpdump output in the exhibit, what can be concluded about the TCP handshake?

Easy
69

A system administrator needs to configure a static IP address on a CentOS 7 server. Which file should be edited to set the IP address permanently?

Easy
70

A user reports that they cannot reach a remote server by hostname but can reach it by IP address. Which configuration file is most likely misconfigured?

Easy
71

A Linux server running NetworkManager has a Wi-Fi interface wlp3s0 that must connect to the corporate WPA2-Enterprise network 'CorpNet' with 802.1X PEAP authentication, using identity 'jdoe' and password 'S3cr3t!'. The administrator wants to create and activate this connection entirely from the command line without editing configuration files manually. Which sequence of commands will accomplish this?

Medium
72

A network interface eth0 is not receiving an IP address via DHCP. Which command can be used to troubleshoot the DHCP client process?

Medium
73

A Linux server has a single network interface enp3s0 that must obtain its IPv4 address automatically from a DHCP server on the local subnet. The administrator prefers to manage this connection with NetworkManager and wants the setting to persist across reboots. Which command will configure the connection profile named 'Wired connection 1' to use DHCP?

Medium
74

An administrator needs to assign a temporary IPv4 address of 10.20.30.40/24 to interface enp0s3 for immediate testing. The change should not persist after a reboot. Which command accomplishes this?

Easy
75

You administer a Linux server that acts as a network gateway. It has two network interfaces: eth0 (external, with IP 203.0.113.10/24, gateway 203.0.113.1) and eth1 (internal, with IP 192.168.1.1/24). The server is running firewalld and has IP forwarding enabled. Internal hosts (192.168.1.0/24) can access the internet through NAT, which is configured using firewalld's masquerade on the external zone. However, you need to allow a specific internal server (192.168.1.100) to be reachable from the internet on TCP port 443 (HTTPS). You add a port forwarding rule using firewall-cmd: 'firewall-cmd --zone=external --add-forward-port=port=443:proto=tcp:toport=443:toaddr=192.168.1.100'. After reloading the firewall, external users still cannot connect to 203.0.113.10:443. You verify that the internal server is running HTTPS and that its local firewall allows port 443. What is the most likely reason the port forwarding is not working?

Medium
76

A junior administrator needs to verify that the host can resolve the name db.internal.example.com to an IPv4 address before deploying a database client. The system uses systemd-resolved. Which command queries the configured resolver and displays the answer without relying on the local nsswitch.conf ordering?

Easy
77

A server must resolve internal hostnames using a DNS server at 10.0.0.53 before falling back to public resolvers. The administrator edits /etc/systemd/resolved.conf and sets DNS=10.0.0.53 and FallbackDNS=8.8.8.8. After restarting systemd-resolved, queries for internal names still fail. Which additional step is most likely required?

Medium
78

An administrator needs to view the current IPv4 addresses, link state, and interface names on a Linux server without making any changes. Which command provides this information in a single invocation?

Easy
79

A server needs to forward packets between two networks: 10.0.1.0/24 on eth0 and 10.0.2.0/24 on eth1. Which sysctl parameter must be enabled?

Medium
80

A Linux server is configured with two network interfaces: eth0 (192.168.1.10/24) and eth1 (10.0.0.10/24). The default route is via 192.168.1.1. A network administrator wants to ensure that traffic to the 10.0.0.0/24 network uses eth1 and that the source address for that traffic is 10.0.0.10. Which command will achieve this?

Hard
81

Order the steps to configure a static IP address on a CentOS/RHEL 7 system using ifcfg files.

Medium
82

A technician needs to view the current IPv4 addresses, netmasks, and interface states for all network interfaces on a Linux server. Which command displays this information in a structured, modern format?

Easy
83

A system administrator needs to check the firewall rules on a Linux server using firewalld. Which two commands can be used to list the current rules? (Choose two.)

Easy
84

Which THREE files or directories are commonly used to configure network interfaces on a RHEL/CentOS system?

Hard
85

Given the network interface configuration in the exhibit, which command should be run to apply the configuration without rebooting?

Hard
86

A Linux server uses NetworkManager and has a wired connection profile named 'Wired connection 1'. The administrator needs to set a static IPv4 address 10.20.30.40/24 with gateway 10.20.30.1, and ensure the change persists across reboots. Which sequence of commands accomplishes this?

Medium
87

An administrator is troubleshooting DNS resolution and wants to query the SOA record for a domain. Which three commands can be used? (Choose three.)

Hard
88

A server has two NICs bonded in mode 1 (active-backup). If the active NIC fails, what occurs?

Medium
89

A Linux server has a single network interface ens3. You need to assign the static address 10.10.10.5/24 with gateway 10.10.10.1 using NetworkManager. The connection profile is named 'static-ens3'. Which command correctly applies the IPv4 address, disables DHCP, and sets the gateway, all in one step?

Medium
90

A junior administrator must temporarily assign the address 172.16.5.20/24 to interface eth1 on a running server so that a migration can be tested, and the change must not survive a reboot. Which command accomplishes this?

Easy
91

A Linux server is configured as a router with IP forwarding enabled. It has two interfaces: eth0 (203.0.113.5/24) and eth1 (192.168.1.1/24). Clients on 192.168.1.0/24 need to reach the internet via eth0. The administrator has set up NAT using iptables with the rule: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE. However, clients cannot access external websites. Which two actions should the administrator take to resolve the issue? (Choose two.)

Hard
92

Match each systemd unit type to its purpose.

Medium
93

Which TWO commands can be used to resolve a hostname to an IP address?

Easy
94

Which TWO commands can be used to display listening TCP ports on a Linux system?

Easy
95

A Linux server has a DNS resolver configuration in /etc/resolv.conf. You need to add a new DNS server at 8.8.8.8 and ensure it is used before the existing server. Which line should you add to the top of /etc/resolv.conf?

Medium
96

An administrator wants to ensure that a service is listening on TCP port 8080 and accessible from remote hosts. Which command will confirm that the service is listening on the correct interface?

Easy
97

A Linux router has two interfaces: eth0 (203.0.113.10/24) connected to the internet and eth1 (10.10.0.1/24) connected to an internal network. Internal clients can ping the router's eth1 address but cannot reach external websites. IP forwarding is enabled, and no firewall rules are present. Which command will allow the internal clients to reach the internet by masquerading their traffic?

Hard

Frequently asked questions

What does the Networking domain cover on the LFCS exam?
Configure and troubleshoot interfaces with ip, nmcli, and netplan, manage routes, DNS via /etc/resolv.conf, and firewalld or ufw rules. Get the persistent config right: changes must survive reboot, not just apply at runtime.
How many questions are in this domain?
This page lists all 97 Networking questions in the LFCS question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Networking questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
lf-lfcs LF-LFCS networking Practice Questions