Skip to content

Network vocabulary for Linux users

Module
Basic Connectivity and Remote Access
Difficulty
Easy
Updated
Tested on
Ubuntu 24.04.5 LTS (lab container), GNU Bash 5.2.21
On this page

You have a server name and an instruction to connect to it. When the connection fails, “the network is broken” does not tell you what to inspect. The name, the path to the machine, and the program accepting connections are separate parts of the task.

By the end, you can describe those parts and choose which question to ask first. You do not need a networking course to follow the connection.

Finish Practice: Processes and System Information. Keep the B04 practice directory, ~/lab. This lesson changes no files or network settings. Its final directory check is recorded in the lab.

Later recordings in this module connect two containers, rootvolt and labserver, through the lab’s private Docker bridge network. That is a network between two isolated Linux environments, not a recording of a home network. The name labserver belongs to that prepared lab; it will not automatically resolve on your Ubuntu VM.

Imagine a laptop connecting to an SSH service on a server. SSH, Secure Shell, provides an encrypted connection for remote terminal work. The laptop runs the client, the program requesting the connection. The server runs a program waiting to accept it.

The laptop begins with a hostname: labserver. It needs an IP address for that name, a route toward that address, and a destination port identifying the service. These are different pieces of information.

From a laptop to an SSH listener Simplified model: the laptop resolves labserver to documentation address 192.0.2.20, uses a route to reach that IP, and connects to the server listening on TCP port 22. Laptop: SSH client Interface sends traffic 1. Resolve labserver DNS returns 192.0.2.20 2. Reach the server IP Route chooses the next hop 3. Connect to TCP port 22 Server: SSH listener
From a laptop to an SSH listener Simplified model: the laptop resolves labserver to documentation address 192.0.2.20, uses a route to reach that IP, and connects to the server listening on TCP port 22. Laptop: SSH client Interface sends traffic 1. Resolve labserver DNS returns 192.0.2.20 2. Reach the server IP Route chooses the next hop 3. Connect to TCP port 22 Server: SSH listener
Simplified model. A laptop resolves labserver, reaches the server IP, and connects to its SSH listener on TCP port 22.

Read the numbered stages in order. First, name resolution supplies an address. Second, routing selects where to send traffic. Third, the connection targets a listening service at that address and port. The drawing uses 192.0.2.20, a documentation address, rather than a captured address. Do not type it as the lab server’s address.

This is a simplified model. It leaves out link details, return traffic, firewalls, and how name-resolution requests themselves travel. Real connections need a working return path too. The picture separates the questions you can investigate rather than describing every packet.

An interface is a network attachment that Linux can use to send or receive traffic. It may represent an Ethernet adapter, Wi-Fi, or a virtual connection. A container’s interface can be virtual even though ordinary networking tools inspect it.

An IP address identifies an endpoint at the network layer. An interface can have several addresses, including IPv4 and IPv6 addresses. Its name is not its address. An interface named eth0 does not imply a particular IP address, and another machine may use an entirely different name.

Linux also has a loopback interface, normally called lo. Loopback addresses such as 127.0.0.1 refer back to the same machine. On the laptop, that address points to the laptop. On the server, it points to the server. It does not mean “the other computer.”

You will also see a MAC address, a link-layer identifier, in interface listings. It has a different role from an IP address. You do not need to change or copy it for this module. The next lesson shows how to locate the relevant IP address without confusing these fields.

A route tells Linux how to send traffic toward a destination or group of destinations. It can select an interface and a next-hop router. A gateway is a router used as that next hop.

A directly connected destination may be reachable through an interface without passing through the default gateway. A default route is the fallback when no more specific route matches. Having one does not prove the destination is reachable; it records the system’s forwarding choice.

For example, two containers on the same private bridge can communicate on their connected network. The same machine may also have a default route toward Docker’s gateway. You should not read that default line as proof that every connection crosses the gateway.

DNS, the Domain Name System, maps names to information such as IP addresses. Name resolution is the broader process an application uses to look up a name. Linux can also use local configuration such as /etc/hosts; not every successful lookup is a public DNS query.

The prepared container lab uses Docker’s DNS to resolve labserver. A public name and a private lab name need not be known to the same resolver. A name-resolution failure therefore does not establish that the destination machine has stopped running. The name could be misspelled or unavailable to the current resolver.

Likewise, a successful lookup establishes only that you obtained an address. It does not prove a service is listening there or that your traffic can reach it.

A port is a numeric transport endpoint used by protocols such as TCP or UDP. A TCP connection names both an address and a port. The SSH service in this lab listens on TCP port 22; its web service listens on TCP port 80.

A listening socket is an endpoint a server program has opened to accept connections. Listening is local state on that server. Firewalls or other network conditions can still prevent a client from reaching it. A port number is not a process identifier, and TCP port 22 and UDP port 22 are different transport endpoints.

The client also uses a local port, usually chosen automatically. You normally select the server’s destination port and let the client handle its own source port. A server can provide several services at one IP address because they use different listening endpoints.

Predict before the directory check: does returning to ~/lab test any of these network stages?

Run it, then compare with your guess

No. It checks your local working directory only. An observation about a local path cannot establish name resolution, network reachability, or a remote listener.

Treating a hostname as an address. A name needs resolution before the client can use an IP destination. Keep a lookup problem separate from a connection problem.

Treating a reachable machine as a working service. A host can answer a reachability probe while its SSH server is stopped. The next lesson separates those observations.

Reading the diagram’s address as recorded output. It is a documentation example in a labeled model. Later recordings preserve the real private-container addresses and explain their scope.

Goal: Explain why a working web page on a server does not prove SSH is accepting connections on the same server.

Hint

Identify what the two connections share and what destination field differs.

Solution

They can share a hostname, IP address, and route while targeting different services. The web listener on TCP port 80 and SSH listener on TCP port 22 are separate endpoints. Success at one port does not establish success at the other.

No network settings, files, or services were changed. Return to the local practice directory and verify it:

Terminal window
cd ~/lab
pwd
Recorded output from pwd
/home/learner/lab

Both commands complete successfully in the capture. This leaves the original directory as the working directory; there is nothing to remove.

  • An interface is a network attachment; its IP addresses are separate information.
  • A route chooses the path, with a default route as a fallback.
  • Name resolution supplies an address for a hostname.
  • A listening service accepts connections at an address, transport protocol, and port.

Next, Inspecting local connectivity collects interface, route, and listener evidence.