Skip to main content
Imagine you’ve just provisioned a new Linux server. The OS boots, but users can’t reach services and network access is failing. Is the problem the network configuration, name resolution, or firewall rules? This lesson walks through practical steps to configure networking, verify connectivity, manage hostname/name resolution, and apply basic firewall controls. We’ll start with core networking concepts, verify current network state, use nmcli for managed connections, configure hostnames and DNS resolution, and introduce firewalld to control access.
A dark-themed presentation slide titled "Overview" showing a vertical list of networking topics. The list includes "Network concepts," "Checking network configuration," "Working with nmcli," "Configuring hostnames and name resolution," and "Introducing Firewalld."
By the end of this lesson you’ll be able to:
  • Inspect and change network interfaces and addresses.
  • Test reachability and trace packet paths.
  • Configure hostnames and resolver behavior.
  • Make temporary and persistent network changes with ip and NetworkManager (nmcli).
  • Apply basic firewalld rules to secure services.
Networking basics A computer network is a set of systems connected so they can exchange data. A helpful analogy is a city:
  • Roads = network links
  • Houses = computers
  • Mail/packages = network packets
When data travels across a network it’s split into packets. Each packet contains source and destination information so it can reach—and be reassembled at—the correct system. Every networked device needs a unique IP address (like a street address) so traffic goes to the right place.
A presentation slide titled "Networking Components – IP Address" showing three computer icons labeled "IP Address" connected by dotted lines to a central wireless/router icon, with text boxes reading "Unique network identifier" and "Similar to street address."
Key components:
  • Network interface: The hardware/software endpoint that connects a system to a network (like a doorway).
  • Subnet: A portion of a larger network that groups nearby hosts (like a neighborhood).
  • Default gateway: The router that forwards traffic to other subnets or the internet (like the main road out of the neighborhood).
A dark-themed infographic titled "Networking Components – Default Gateway" showing a network topology with a central default gateway and cloud branching to multiple wireless access nodes that connect to individual devices. The right side depicts a "City" view grouping homes into neighborhood clusters linked by roads to other cities.
DNS translates human-friendly names into IP addresses so you can reach services using names instead of raw addresses. Think of DNS as your phone’s contact list.
A slide titled "Networking Components – DNS" showing a diagram where DNS translates human‑readable names into IP addresses. A contact‑card graphic with a name and phone number is used as an analogy.
Hostname and name-resolution files on Linux Linux consults a few local files and services when identifying the host and resolving names. The most important ones are: Quick reference: view or change hostname persistently with:
Verifying connectivity Always verify basic connectivity before extensive troubleshooting. Common tools:
  • ping: Send ICMP echo requests to check reachability and measure latency. Some networks block ICMP—ping can fail even when TCP/UDP traffic is allowed.
  • tracepath (or traceroute): Display each hop along the path to a destination to help identify where packets are dropped or delayed.
A dark-themed slide titled "Connectivity Commands" showing two panels: "Ping" with bullets like "Check host reachability," "Sends ICMP echo requests," and "Measures network latency," and "Tracepath" with a bullet "Trace network path."
Inspecting and configuring interfaces with ip ip (from the iproute2 package) is the primary tool for inspecting and managing interfaces, addresses, and routes. Address-related commands:
  • ip addr show — display IP addresses on all interfaces
  • ip addr add 192.168.1.10/24 dev eth0 — add an address
  • ip addr del 192.168.1.10/24 dev eth0 — remove an address
Link-related commands:
  • ip link show — show interface state and metadata
  • ip link set dev eth0 up — bring interface up
  • ip link set dev eth0 down — bring interface down
  • ip link set dev eth0 address aa:bb:cc:dd:ee:ff — change MAC address
Example session (run as root or with sudo):
Many ip operations require root privileges. Prepend sudo or run as root. Changes made with ip are temporary and will be lost on reboot—use NetworkManager (nmcli) or distribute-specific network configuration files to make persistent changes.
When to use ip vs nmcli:
  • Use ip for quick, ad-hoc changes and diagnostics.
  • Use NetworkManager (nmcli) to create, edit, and persist connections on systems that run NetworkManager.
Next steps in this lesson Work through these actions to apply what you learned:
  • Inspect interfaces and addresses: ip addr show, ip link show.
  • Test reachability: ping and tracepath to verify connectivity and routing.
  • Edit /etc/hosts, /etc/hostname, and resolver configuration as needed; use hostnamectl for persistent hostnames.
  • Use nmcli for managed, persistent network settings and ip for temporary configuration.
  • Learn firewalld basics to open/close ports and restrict service access.
Links and references

Watch Video