Kahibaro
Discord Login Register

Networking Fundamentals

Understanding Linux Networking at a Practical Level

This chapter gives you enough networking knowledge to be productive as a Linux admin: how IP works, how Linux participates in a network, and which tools and files you will use all the time. Detailed topics like “IP addressing”, “Subnets and routing”, and the named tools will each have their own chapters, so here we stay at the “big picture + day‑to‑day admin view”.

What “networking” means for a Linux system

On a Linux machine, “the network” basically means three things:

  1. Interfaces — the “ports” the system uses to talk to other machines
    Examples:
    • Physical: eth0, enp3s0, wlp2s0 (wired/wireless)
    • Virtual: lo (loopback), docker0, tun0, tap0, br0, VLANs like eth0.10
  2. Addresses and routes — where packets should go, and how to get there
    • IP addresses: 192.168.1.10, 10.0.0.5, 2001:db8::1
    • Default gateway: “send non-local traffic here”
    • Routing table: rules like “for 10.0.0.0/24, use this interface/gateway”
  3. Name resolution and services — usable names and listening servers
    • DNS: turning example.com into an IP
    • Local name files: /etc/hosts
    • Services: daemons listening on ports (web, SSH, database, etc.)

Most everyday network tasks on Linux are about:

The basic networking model on Linux

Linux implements a standard TCP/IP stack, so the concepts are the same across platforms. As a sysadmin, you generally think in three layers:

  1. Link layer (L2) – physical & local network:
    • Uses MAC addresses
    • Ethernet, Wi-Fi, VLANs, bridges, switches
  2. Internet layer (L3) – IP and routing:
    • IPv4: addresses like 192.168.0.10
    • IPv6: addresses like 2001:db8::1
    • Routing decisions: which next hop to use
  3. Transport layer (L4) – TCP/UDP ports:
    • TCP: reliable (used by HTTP, SSH, etc.)
    • UDP: best-effort (DNS, many streaming protocols)
    • Ports: 22 (SSH), 80 (HTTP), 443 (HTTPS), etc.

Linux tools let you inspect and manipulate each part: link (interfaces), IP addressing/routing, and ports/connections.

Network interface naming and states

Historically, network interfaces were named eth0, eth1, etc. Modern systems often use predictable names like enp3s0 or wlp2s0. Some key points:

Network managers (like NetworkManager, systemd-networkd, or classic ifupdown) typically handle bringing interfaces up/down and assigning IPs via DHCP or static configuration.

DHCP vs static configuration (conceptual view)

Linux interfaces usually get their IP configuration in one of two ways:

As an admin, you should be able to answer:

Name resolution basics: how Linux finds hosts

When you type ping example.com, Linux must turn that name into an IP.

The typical resolution order is:

  1. Check /etc/hosts for static entries.
  2. Ask a DNS resolver (IP configured via DHCP or static config).
  3. Possibly other methods (like mDNS, LDAP, etc.) depending on /etc/nsswitch.conf.

Important files you will rely on:

Modern systems may have a local stub resolver (e.g. systemd-resolved) that dynamically manages /etc/resolv.conf, so changes to that file may be overwritten unless you configure the resolver itself.

Common network services and ports

As a Linux admin, you regularly care about which services are:

You do not have to memorize all ports, but you should know some common ones:

Network tools (like ss) show you which processes listen on which ports; firewalls may allow/deny specific ports.

Typical troubleshooting workflow on Linux

Most network problems can be narrowed down by checking a few predictable things. A common, platform-agnostic workflow:

  1. Check link/interface status
    • Is the interface UP?
    • Is the cable plugged in / Wi‑Fi connected?
  2. Check IP configuration
    • Does the interface have an IP?
    • Is the subnet correct?
    • Is there a default route (gateway)?
  3. Check name resolution
    • Can you reach the target by IP?
    • Does DNS resolve the hostname?
  4. Check path and reachability
    • Can you ping the gateway and remote host?
    • Is something along the route dropping packets?
  5. Check ports and firewalls
    • Is the remote port listening?
    • Is a local or remote firewall blocking?

In later sections you will see which Linux tools (ip, ss, ping, etc.) help with which step.

Core network tools on Linux (high-level view)

Each of these tools will have its own detailed coverage later; here is how they fit in conceptually:

You rarely need to use all of them for a single issue; choice depends on what you are diagnosing.

Local vs remote problems

When something “doesn’t work” from your Linux box, it helps to quickly decide:

Your goals as an admin:

Security considerations in networking

You will see dedicated security topics later, but even basic networking work has some essential security aspects:

How networking ties into other admin tasks

Networking is interwoven with many other topics you’ll cover later:

Understanding the fundamentals in this chapter will make those later topics much easier to follow.

Views: 23

Comments

Please login to add a comment.

Don't have an account? Register now!