Course: From Basic Science to Web Hosting
Module 05 — Networking Fundamentals
What Is a Computer Network?
Difficulty: Beginner → Intermediate
Prerequisites: Lesson 021 — Linux Storage
Estimated time: 40–50 minutes
We now move from:
INSIDE THE SERVER
CPU
↓
RAM
↓
Storage
↓
Processes
↓
Linux
to:
OUTSIDE THE SERVER
Network
↓
Internet
↓
Other computers
This is the beginning of understanding how:
https://templates.cresignsys.com
actually reaches your server.
1. The Most Basic Definition
A network is a system that allows devices to exchange data.
For example:
Computer A
│
│ data
↓
Computer B
A larger network:
Computer
↓
Switch
↓
Router
↓
Internet
↓
Server
2. Why Do We Need Networking?
Your server may be physically located somewhere else.
Your browser may be on your computer.
You need a communication system connecting them:
Your computer
↓
LAN
↓
Router
↓
Internet
↓
Cloud network
↓
Your VPS
3. Data Is Just Bits
At the deepest level, computers exchange:
0
1
For example:
10110100
But networking doesn’t simply send one enormous stream of random bits.
It organizes data into structured units.
4. Network Data Has Layers
A useful simplified model is:
Application
↓
Transport
↓
Internet
↓
Link
↓
Physical
For example, when loading a website:
HTTP
↓
TCP
↓
IP
↓
Ethernet/Wi-Fi
↓
Electrical/radio signals
For HTTPS:
HTTP
↓
TLS
↓
TCP
↓
IP
↓
Ethernet/Wi-Fi
And HTTP/3 uses a different transport architecture:
HTTP/3
↓
QUIC
↓
UDP
↓
IP
↓
Link
5. Why Layers?
Imagine one giant networking program had to understand:
Browser
TLS
TCP
IP
Ethernet
Wi-Fi
Fiber
Radio
It would become extremely complicated.
Instead, networking uses layers.
Each layer has a particular responsibility.
6. Application Layer
At the top are application protocols.
Examples:
HTTP
HTTPS
DNS
SSH
SMTP
IMAP
For your website:
Browser
↓
HTTPS
7. Transport Layer
The transport layer provides communication between applications/processes.
Important protocols include:
TCP
UDP
Later we’ll study them deeply.
8. Internet Layer
The Internet Protocol:
IP
provides addressing and packet delivery between networks.
Common versions:
IPv4
IPv6
9. Link Layer
This deals with communication over a particular local network technology.
Examples:
Ethernet
Wi-Fi
It includes concepts such as:
MAC addresses
Frames
Switching
10. Physical Layer
At the physical level, data becomes physical signals.
Depending on the technology:
Copper
↓
Electrical signals
Fiber
↓
Light
Wi-Fi
↓
Radio waves
So the complete concept is:
Bits
↓
Signals
↓
Network hardware
↓
Other network hardware
↓
Bits
11. The Network Interface
Your Ubuntu server needs a network interface.
You can inspect interfaces with:
ip link
You may see something like:
lo
ens3
The exact interface name depends on the system.
12. lo — Loopback
You will often see:
lo
This is the:
Loopback Interface
It allows a computer to communicate with itself.
Its common IPv4 address is:
127.0.0.1
13. What Is 127.0.0.1?
Suppose Nginx is listening locally.
You could access:
http://127.0.0.1
from the server itself.
The path is essentially:
Application
↓
loopback
↓
Linux network stack
↓
another local application
The traffic does not need to leave the machine through the physical network.
14. localhost
The hostname:
localhost
usually refers to the local system.
It commonly resolves to loopback addresses such as:
127.0.0.1
and/or:
::1
depending on configuration.
15. Network Interface Example
Your server might have an interface such as:
ens3
This represents a network interface exposed to the operating system.
Conceptually:
Linux
↓
ens3
↓
Virtual network
↓
Cloud network
↓
Internet
16. MAC Address
Network interfaces commonly have a:
MAC Address
MAC means:
Media Access Control
A MAC address is a link-layer identifier associated with a network interface.
Example format:
02:42:ac:11:00:02
The actual address on your server will be different.
17. MAC vs IP
These are different concepts.
MAC
Primarily used at the local link layer.
IP
Used for logical network addressing and routing between networks.
Simplified:
MAC
↓
Local network delivery
IP
↓
Network-to-network delivery
18. IPv4 Address
An IPv4 address looks like:
192.168.1.10
It contains four decimal numbers called octets.
Each ranges from:
0–255
because IPv4 uses:
32 bits
19. Binary Representation
For example:
192
in binary is:
11000000
So:
192.168.1.10
is ultimately:
11000000.10101000.00000001.00001010
This connects networking back to binary computing.
20. Private IP Addresses
Some IPv4 ranges are designated for private networks.
Common ranges include:
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
For example:
192.168.1.20
is typically a private IPv4 address.
It is not directly routable across the public Internet.
21. Public IP Address
A public IP address can be used for Internet routing, subject to network/provider configuration.
A VPS commonly has an Internet-reachable public IP or an external network path involving NAT/load balancing.
Conceptually:
Internet
↓
Public IP
↓
Cloud networking
↓
VPS
22. Your Domain Does Not Equal Your IP
This is extremely important.
You have:
templates.cresignsys.com
and your server has an IP address.
These are not the same thing.
DNS connects them.
Conceptually:
Domain name
↓
DNS
↓
IP address
23. What Is DNS?
DNS means:
Domain Name System
Its basic purpose is to translate names into network information.
For example:
templates.cresignsys.com
↓
DNS
↓
IP address
This allows humans to use names instead of memorizing IP addresses.
24. Why Not Just Use the IP?
You could theoretically visit:
https://203.0.113.10
instead of:
https://templates.cresignsys.com
But domain names provide:
Human-readable identity
Flexible infrastructure
Multiple services
Virtual hosting
TLS certificate identity
25. DNS Is Not the Internet
DNS is a naming system.
It does not carry your entire website.
Think:
DNS
↓
"What IP address belongs to this name?"
Then:
IP
↓
"Where should the network packets go?"
Then:
TCP/TLS/HTTP
↓
"What communication should happen?"
26. Subnet
An IP address normally needs to be interpreted together with a:
Subnet prefix
For example:
192.168.1.10/24
The /24 means the first 24 bits form the network prefix.
27. What Does /24 Mean?
IPv4 has:
32 bits
So:
/24
means:
24 bits = network prefix
8 bits = remaining host portion
Conceptually:
11111111.11111111.11111111.00000000
This corresponds to:
255.255.255.0
for a conventional IPv4 subnet mask representation.
28. Why Subnets?
Subnets divide networks into logical groups.
For example:
Network
↓
Subnet A
├── Computer 1
├── Computer 2
└── Computer 3
Subnet B
├── Server 1
└── Server 2
This helps with:
Routing
Address management
Security
Network organization
29. Default Gateway
Suppose your server wants to communicate with a destination outside its local subnet.
It normally sends the traffic toward a:
Default Gateway
Conceptually:
Server
↓
Default Gateway
↓
Other network
↓
Internet
30. Local vs Remote Destination
Suppose:
Server:
192.168.1.10/24
and wants:
192.168.1.20
The destination may be on the same local subnet.
But:
8.8.8.8
is outside that subnet.
So traffic goes toward the configured gateway.
31. Routing
Routing answers:
Where should this packet go next?
Conceptually:
Source
↓
Router
↓
Router
↓
Router
↓
Destination
Each router makes a forwarding decision based on its routing information.
32. Linux Has a Routing Table
You can inspect it with:
ip route
You may see something like:
default via 10.0.0.1 dev ens3
10.0.0.0/24 dev ens3 proto kernel scope link src 10.0.0.10
The exact output on your VPS will be different.
33. Understanding default
A route such as:
default via 10.0.0.1
means roughly:
For destinations that don’t match a more specific route, send traffic toward this gateway.
34. The Network Interface Has an IP
Use:
ip addr
You might see:
inet 10.0.0.10/24
This tells Linux:
IP address = 10.0.0.10
Prefix = /24
Interface = ens3
35. The Basic Linux Networking Commands
Start learning these:
ip link
Shows network interfaces.
ip addr
Shows IP addresses.
ip route
Shows routes.
ping
Tests IP reachability using ICMP, where permitted.
ss
Shows sockets and listening connections.
36. What Is a Packet?
When data travels across an IP network, it is typically divided into packets.
Conceptually:
Large data
↓
Packets
├── Packet 1
├── Packet 2
├── Packet 3
└── ...
Each packet contains control information and payload.
37. IP Packet
An IP packet contains information such as:
Source IP
Destination IP
Protocol
Payload
Conceptually:
┌────────────────────────────┐
│ IP Header │
│ │
│ Source │
│ Destination │
│ Protocol │
├────────────────────────────┤
│ Payload │
└────────────────────────────┘
38. Ethernet Frame
At the local-link level, the packet is carried inside a frame.
Conceptually:
Ethernet Frame
├── MAC destination
├── MAC source
├── payload
└── error-detection information
So:
Application data
↓
Transport segment/datagram
↓
IP packet
↓
Link-layer frame
↓
Physical signals
39. This Is Encapsulation
This is a major networking concept.
Suppose your browser sends HTTPS data.
Conceptually:
HTTP data
↓
TLS
↓
TCP
↓
IP
↓
Ethernet
↓
Electrical/radio/optical signals
Each layer adds its own control information.
This is called:
Encapsulation
40. At the Destination
The reverse happens.
Physical signal
↓
Ethernet
↓
IP
↓
TCP
↓
TLS
↓
HTTP
↓
Application
This is often called:
Decapsulation
41. Your Website Request
Now let’s connect everything to:
https://templates.cresignsys.com
The browser first needs to discover the server’s IP address.
So:
Browser
↓
DNS
↓
IP address
Then:
Browser
↓
IP network
↓
Server
Then:
TCP
↓
TLS
↓
HTTP
Then:
Nginx
42. Full Website Journey
You type:
https://templates.cresignsys.com
│
▼
Browser
│
▼
DNS
│
▼
Server IP
│
▼
IP routing
│
▼
TCP
│
▼
TLS
│
▼
HTTPS
│
▼
Nginx
│
┌──────┴──────┐
▼ ▼
Static file PHP-FPM
│
▼
WordPress
│
▼
MySQL
You have now reached the boundary between Linux administration and web hosting.
43. Network Interface to Internet
The physical/virtual path can be visualized as:
Application
↓
Linux socket
↓
TCP
↓
IP
↓
Network interface
↓
Cloud virtual network
↓
Internet gateway/router
↓
Internet
↓
Other routers
↓
Destination network
↓
Server
44. What Is a Socket?
A socket is an operating-system interface through which applications communicate over networks.
Conceptually:
Application
↓
Socket
↓
TCP/UDP
↓
IP
For example, Nginx creates listening sockets.
45. Port
An IP address identifies a network endpoint at the host level.
A:
Port
helps identify the application/service endpoint.
For example:
HTTP → 80
HTTPS → 443
SSH → 22
These are conventional/default ports.
46. IP + Port
You can think of:
IP address + port
as identifying a network endpoint.
For example:
203.0.113.10:443
means:
IP = 203.0.113.10
Port = 443
This is not the actual IP of your server; it is an illustrative example.
47. Why Does Nginx Listen on 443?
Your SSL/TLS-enabled Nginx configuration commonly contains a listener conceptually equivalent to:
listen 443 ssl;
That means:
Incoming TCP connection
↓
Port 443
↓
Nginx
↓
TLS
48. What About Port 80?
HTTP traditionally uses:
80
HTTPS traditionally uses:
443
A common configuration is:
HTTP :80
↓
redirect
↓
HTTPS :443
For example:
http://templates.cresignsys.com
↓
HTTPS redirect
↓
https://templates.cresignsys.com
49. Listening Ports
You can see listening sockets with:
sudo ss -lntup
You may see entries such as:
LISTEN
0.0.0.0:80
0.0.0.0:443
0.0.0.0:22
The exact output depends on your server.
50. What Does 0.0.0.0 Mean?
When used as a listening address:
0.0.0.0:443
generally means:
Listen on all available IPv4 interfaces.
It does not mean that 0.0.0.0 is the server’s actual public IP.
51. IPv6
Modern networking also uses:
IPv6
IPv6 addresses are 128 bits.
Example:
2001:db8::1
This is an example/documentation address.
IPv6 solves the address-space limitations of IPv4 and introduces additional architectural features.
52. IPv4 vs IPv6
IPv4
↓
32-bit address
IPv6
↓
128-bit address
Examples:
IPv4:
192.168.1.10
IPv6:
2001:db8::10
53. The Next Important Layer: TCP
We have now reached the transport layer.
For your traditional HTTPS connection:
HTTP
↓
TLS
↓
TCP
↓
IP
TCP answers a different question from IP.
IP
Which host/network should this packet reach?
TCP
How do two application endpoints establish and maintain a reliable byte stream?
54. Why TCP?
TCP provides mechanisms for:
Connection establishment
Reliable delivery
Ordering
Retransmission
Flow control
Congestion control
It does not simply mean “the Internet is reliable.” TCP implements reliability mechanisms between endpoints.
55. TCP Connection
A simplified TCP connection begins with a:
Three-Way Handshake
Conceptually:
Client Server
SYN -------------------->
<------------------- SYN-ACK
ACK -------------------->
Connection ready
This is one of the most important things we will study next.
56. Where TLS Comes In
After TCP establishes the connection for a traditional HTTPS connection:
TCP connection
↓
TLS handshake
↓
Encrypted application data
So your earlier SSL/TLS lessons now fit into the networking architecture:
DNS
↓
IP
↓
TCP
↓
TLS
↓
HTTP
57. The Complete Learning Map
You have now covered:
1. Hardware
↓
2. CPU
↓
3. RAM
↓
4. Storage
↓
5. Linux
↓
6. Filesystem
↓
7. Users
↓
8. Permissions
↓
9. Processes
↓
10. Services
↓
11. Networking
Next:
12. Ethernet
13. IP
14. Routing
15. TCP
16. UDP
17. Ports
18. Sockets
19. DNS
20. HTTP
21. TLS
22. Nginx
23. PHP-FPM
24. MySQL
25. WordPress
26. Web hosting
58. Practical Exercise
On your Ubuntu server, run these read-only commands:
ip link
Then:
ip addr
Then:
ip route
Then:
sudo ss -lntup
Then:
ping -c 4 127.0.0.1
These five commands begin to reveal:
Network interfaces
↓
IP addresses
↓
Routes
↓
Listening services
↓
Local network-stack connectivity
Do not change anything yet. The goal is observation.
Next Lesson — 023
TCP From the Deepest Basics
We will start from the physical meaning of communication and build upward:
Bits
↓
Bytes
↓
Frames
↓
Packets
↓
Ports
↓
Sockets
↓
TCP
↓
SYN
↓
SYN-ACK
↓
ACK
↓
TCP connection
↓
Data
↓
ACKs
↓
Retransmission
↓
Connection termination
Then we will trace what happens when your browser connects to:
templates.cresignsys.com:443
from the first network packet all the way to Nginx.
Leave a Reply