Linucate
~ Linucate_

109.1 Fundamentals of Internet Protocols

All Levels

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/8
  • 172.16.0.0/12
  • 192.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:

  • /24 for 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, 21 FTP
  • 22 SSH
  • 23 Telnet
  • 25 SMTP
  • 53 DNS
  • 80 HTTP
  • 110 POP3
  • 123 NTP
  • 139 NetBIOS
  • 143 IMAP
  • 161, 162 SNMP
  • 389 LDAP
  • 443 HTTPS
  • 465 SMTPS
  • 514 syslog
  • 636 LDAPS
  • 993 IMAPS
  • 995 POP3S

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
  1. Run: ip -br address
  2. Look for:
    • IPv4 addresses
    • IPv6 addresses
    • loopback lo
2) Look at common services
  1. Open the services database: grep -E '^(ssh|http|https|domain|ntp)[[:space:]]' /etc/services
  2. Notice the port and protocol pairs.
3) Think through one address
  1. Take an example such as: 192.168.1.20/24
  2. Explain it in plain words:
    • host address = 192.168.1.20
    • network prefix = /24
  3. 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.