Introduction
This lesson is about the basic language computers use to talk over networks.
The main question is:
What do IP addresses, subnets, ports, and protocols actually mean, and how do they fit together in normal Linux networking?
What you should be able to do after this lesson:
- Understand the difference between IP addresses, hostnames, ports, and protocols.
- Tell TCP, UDP, and ICMP apart.
- Recognize IPv4 and IPv6 basics.
- Understand private vs public address space.
- Read simple CIDR notation such as
/24. - Recognize common service ports used in LPIC-1.
Big Idea: Networking Works in Layers
Beginners often mix everything together:
- the address
- the name
- the service
- the application
Keep this picture in your head instead:
IP address identifies a host -> port identifies a service -> protocol decides how traffic behaves
That one line solves a surprising number of beginner questions.
Hostnames and IP Addresses
A hostname is a human-friendly name. An IP address is the numeric address used for routing traffic.
Example:
- hostname:
server1.example.com - IPv4 address:
192.0.2.10 - IPv6 address:
2001:db8::10
Linux often turns a hostname into an IP address through:
/etc/hosts- DNS
So the hostname is not the route itself. It is the name that gets resolved into an address.
IPv4 Basics
IPv4 uses 32-bit addresses. You often see them as four decimal numbers:
192.168.1.20
Private IPv4 ranges
These are common inside home and office networks:
10.0.0.0/8172.16.0.0/12192.168.0.0/16
These are not normally routed directly across the public internet.
Loopback
127.0.0.1
This means "the local machine itself".
IPv6 Basics
IPv6 uses 128-bit addresses and looks different:
2001:db8::1
At LPIC-1 level, the main idea is:
- IPv6 is the newer protocol
- it provides a much larger address space
- Linux tools often show both IPv4 and IPv6 information
Useful examples:
- loopback:
::1 - link-local addresses often start with
fe80::
Subnets and CIDR
CIDR notation shows how much of an address is the network part.
Example:
192.168.1.20/24
Simple meaning:
- the first 24 bits describe the network
- the remaining bits describe the host part
For beginners, the most useful common values are:
/24for many small IPv4 networks/16/8
You should also recognize the dotted-decimal form of a mask. For example:
/24 = 255.255.255.0
You do not need advanced subnet math yet. You do need to understand that the prefix length changes the network boundary.
Ports
An IP address identifies the host. A port identifies the service on that host.
Examples:
- SSH on port
22 - HTTP on port
80 - HTTPS on port
443
That means:
- same host
- multiple services
- each on a different port
TCP, UDP, and ICMP
TCP
Use TCP when reliable ordered delivery matters.
Common examples:
- SSH
- HTTP
- HTTPS
- IMAP
UDP
Use UDP when lightweight delivery matters more than connection management.
Common examples:
- DNS queries
- NTP
- some streaming or voice traffic
ICMP
ICMP is used for network control and diagnostics.
Common example:
ping
So when you use ping, you are not testing TCP or UDP ports.
You are testing ICMP reachability.
Common Ports to Recognize
You do not need to become a walking port table. But LPIC-1 expects awareness of well-known services.
Important examples:
20,21FTP22SSH23Telnet25SMTP53DNS80HTTP110POP3123NTP139NetBIOS143IMAP161,162SNMP389LDAP443HTTPS465SMTPS514syslog636LDAPS993IMAPS995POP3S
Routing
If a packet is not for the local subnet, Linux sends it toward a gateway using the routing table.
That is why a network problem can come from:
- missing address
- wrong subnet
- wrong gateway
- DNS problem
- service not listening
You will use this mental model more in the next lessons.
Practice Step by Step
1) Inspect your addresses
- Run:
ip -br address - Look for:
- IPv4 addresses
- IPv6 addresses
- loopback
lo
2) Look at common services
- Open the services database:
grep -E '^(ssh|http|https|domain|ntp)[[:space:]]' /etc/services - Notice the port and protocol pairs.
3) Think through one address
- Take an example such as:
192.168.1.20/24 - Explain it in plain words:
- host address =
192.168.1.20 - network prefix =
/24
- host address =
- That is enough beginner-level interpretation for this exam.
Cheat Sheet
ip -br address
ip route
grep -E '^(ssh|http|https|domain|ntp)[[:space:]]' /etc/services
ping 127.0.0.1
ping ::1
Test Your Knowledge
Complete the quiz to assess your understanding of this course's concepts.
