0% found this document useful (0 votes)
1 views12 pages

Networking Detailed Guide

This detailed guide on networking covers fundamental concepts including types of networks, network devices, IP addressing, protocols, and Linux networking commands. It also outlines the OSI and TCP/IP models, explains the roles of various protocols like HTTP, DNS, and DHCP, and provides a learning roadmap for networking and cybersecurity. The guide serves as a comprehensive resource for understanding how devices communicate and share data over networks.

Uploaded by

3865kashifahmad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views12 pages

Networking Detailed Guide

This detailed guide on networking covers fundamental concepts including types of networks, network devices, IP addressing, protocols, and Linux networking commands. It also outlines the OSI and TCP/IP models, explains the roles of various protocols like HTTP, DNS, and DHCP, and provides a learning roadmap for networking and cybersecurity. The guide serves as a comprehensive resource for understanding how devices communicate and share data over networks.

Uploaded by

3865kashifahmad
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

NETWORKING — DETAILED GUIDE

Linux • Networking • Cybersecurity Foundation

Networking is the process of connecting two or more devices so they can communicate and share data or resources.
This guide covers networking fundamentals, devices, IP addressing, ports, protocols, OSI/TCP-IP models, Linux
networking commands, and a practical learning roadmap.

1. What is Networking?
Networking means connecting devices so they can communicate and exchange data. Examples include computer-to-
computer communication, a mobile phone connecting to Wi-Fi, a browser communicating with a web server, and a
Linux machine connecting to a remote server.

Computer A

│ Data

Switch / Router


Internet


Server

2. Network Devices
Device Purpose
NIC Connects a device to a network.
Hub Broadcasts received data to connected devices.
Switch Connects devices in a LAN and forwards frames
intelligently.
Router Connects different networks and forwards IP packets.
Modem Provides/terminates an ISP connection.
Access Point Provides wireless network access.
Firewall Allows or blocks network traffic according to rules.
Server Provides services or resources to clients.
INTERNET

Router
/ \
Switch Wi-Fi
/ \ / \
PC PC Phone Laptop

3. Types of Networks

PAN — Personal Area Network


A small personal network, such as a phone connected to Bluetooth earbuds.

Phone ─── Bluetooth ─── Earbuds

Networking — Detailed Guide | Linux • Networking • Cybersecurity


LAN — Local Area Network
A network covering a small area such as a home, school, office, or computer lab.

PC ──┐
PC ──┼── Switch ── Router
PC ──┘

MAN — Metropolitan Area Network


A network covering a city or metropolitan area.

WAN — Wide Area Network


A network covering a large geographical area. The Internet is the largest example.

4. IP Address
An IP address identifies a network interface for communication on an IP network.

IPv4 example:
[Link]

192 . 168 . 1 . 10
Each section is an octet.
IPv4 uses 32 bits.

IPv4 vs IPv6
Feature IPv4 IPv6
Address size 32-bit 128-bit
Example [Link] 2001:db8::1
Address space Limited Very large
Use Widely deployed Modern replacement/expansion

5. Public vs Private IP

Private IP
Used inside local networks. Common private IPv4 ranges are:

[Link]/8
[Link]/12
[Link]/16

Public IP
Used for communication across the public Internet. A home router commonly represents the local network to the
Internet using a public IP.

6. MAC Address
A MAC address identifies a network interface at the data-link layer.

MAC example:
00:1A:2B:3C:4D:5E

IP address → logical network address


MAC address → network-interface/data-link address
Networking — Detailed Guide | Linux • Networking • Cybersecurity
7. Network Interfaces
Linux network interfaces may have names such as eth0, ens33, enp0s3, or wlan0.

ip link
ip addr
ip a

8. Subnet Mask and CIDR


A subnet mask separates the network portion of an IPv4 address from the host portion.

IP: [Link]
Subnet: [Link]
CIDR: [Link]/24

/24 means 24 bits identify the network portion.

Subnetting is an important skill for network administration and cybersecurity.

9. Default Gateway
The default gateway is normally the router a device uses to reach destinations outside its local network.

PC
IP: [Link]
Gateway: [Link]


Router


Internet

Linux:
ip route

10. DNS — Domain Name System


DNS translates domain names into IP addresses so users can access services using names rather than numeric
addresses.

Browser

│ [Link]

DNS Server

│ IP address

Web Server

dig [Link]
dig [Link] +short
dig [Link] MX

Networking — Detailed Guide | Linux • Networking • Cybersecurity


11. DHCP — Dynamic Host Configuration Protocol
DHCP automatically provides network configuration such as IP address, subnet mask, default gateway, and DNS
server.

Client
│ DHCP Discover

DHCP Server
│ DHCP Offer

Client
│ DHCP Request

DHCP Server
│ DHCP ACK

Client gets network configuration

12. Port Numbers


A port number identifies a network service/application endpoint on a host. TCP and UDP port numbers range from 0
to 65535.

Port Protocol Service Common Use


20/21 TCP FTP File transfer
22 TCP SSH Secure remote login
23 TCP Telnet Remote login (insecure)
25 TCP SMTP Email sending
53 TCP/UDP DNS Domain name system
67/68 UDP DHCP Dynamic IP configuration
80 TCP HTTP Web traffic
110 TCP POP3 Email receiving
123 UDP NTP Time synchronization
143 TCP IMAP Email
access/synchronization
443 TCP HTTPS Secure web traffic
3306 TCP MySQL Database
3389 TCP RDP Remote desktop
[Link]:22
│ │
│ └── SSH service port
└──────── IP address

13. TCP — Transmission Control Protocol


TCP is connection-oriented and designed for reliable, ordered data delivery.

Client Server
│ │
│──── SYN ─────────────>│
│<─── SYN-ACK ──────────│
│──── ACK ─────────────>│
│ │
│ Connection │
│<──── Data ───────────>│

Networking — Detailed Guide | Linux • Networking • Cybersecurity


 Reliable delivery
 Ordered data
 Error checking
 Flow control
 Connection management

Common uses: HTTP/HTTPS, SSH, FTP, SMTP, and many other application protocols.

14. UDP — User Datagram Protocol


UDP is connectionless and has lower protocol overhead than TCP. It does not provide TCP-style delivery
guarantees.

Client ───────────> Server


UDP Data

 Connectionless
 Low overhead
 No TCP-style delivery guarantee
 Common in DNS, DHCP, streaming, voice/video, and online gaming

15. TCP vs UDP


Feature TCP UDP
Connection Connection-oriented Connectionless
Delivery Reliable/ordered No delivery guarantee
Overhead Higher Lower
Typical behavior Reliability-focused Latency/overhead-focused
Examples HTTPS, SSH, FTP DNS, DHCP, streaming

16. HTTP and HTTPS

HTTP
HTTP is the HyperText Transfer Protocol. Its traditional default port is 80/TCP.

HTTPS
HTTPS is HTTP protected by TLS. Its default port is 443/TCP.

Browser

│ HTTPS

TLS-secured connection


Web Server

17. SSH
SSH (Secure Shell) provides secure remote administration. The standard SSH service uses TCP port 22.

ssh user@[Link]

Networking — Detailed Guide | Linux • Networking • Cybersecurity


18. FTP
FTP is a file-transfer protocol. Traditional FTP uses TCP port 21 for control and commonly uses port 20 for the
traditional active-mode data connection.

For secure file transfer, SFTP or FTPS is generally preferred.

19. Firewall
A firewall controls network traffic according to configured rules.

Internet


┌───────────┐
│ Firewall │
└───────────┘


Server

Example policy:
Port 22 → ALLOW
Port 80 → ALLOW
Port 443 → ALLOW
Other → BLOCK

Linux firewall technologies include UFW, iptables, and nftables.

20. Linux Networking Commands


Command Purpose Example
ip addr Show IP addresses ip addr
ip route Show routing table ip route
ping Test connectivity ping [Link]
ss -tuln Show listening TCP/UDP ports ss -tuln
ss -tulpn Show listening ports and processes sudo ss -tulpn
curl Make HTTP requests curl [Link]
wget Download files wget [Link]
dig DNS lookup dig [Link]
traceroute Trace network path traceroute [Link]
tracepath Trace network path tracepath [Link]
ss options:

 -t = TCP
 -u = UDP
 -l = listening
 -n = numeric addresses/ports
 -p = process information

21. traceroute and Network Path


traceroute shows the sequence of network hops toward a destination.

Your PC

Networking — Detailed Guide | Linux • Networking • Cybersecurity
Router

ISP

Network 1

Network 2

Destination Server

22. Important Network Protocols


 HTTP — web communication
 HTTPS — encrypted web communication using TLS
 DNS — domain-name resolution
 DHCP — automatic network configuration
 SSH — secure remote administration
 FTP — file transfer
 SMTP — email sending
 IMAP — email access/synchronization
 TCP — reliable transport protocol
 UDP — connectionless transport protocol
 IP — addressing and routing
 ICMP — network control/diagnostic messages
 ARP — IPv4 address-to-MAC resolution on local networks

23. OSI Model


The OSI reference model divides network communication into seven layers.

7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical

Layer Name Examples/Role


7 Application HTTP, DNS, SSH
6 Presentation Encoding, encryption concepts
5 Session Session management
4 Transport TCP, UDP
3 Network IP, ICMP
2 Data Link Ethernet, MAC
1 Physical Cable, fiber, radio

24. TCP/IP Model


The practical Internet model is commonly simplified into four layers.

Application

Transport

Networking — Detailed Guide | Linux • Networking • Cybersecurity
Internet

Network Access

HTTP

TCP

IP

Ethernet / Wi-Fi

25. How a Website Opens


A simplified sequence when a user enters an HTTPS website address:

1. Browser

2. DNS lookup

3. Get server IP

4. Connect to server

5. TCP connection

6. TLS for HTTPS

7. HTTP request

8. Web server response

9. Browser displays website

┌─────────┐
│ Browser │
└────┬────┘


┌─────────┐
│ DNS │
└────┬────┘
│ IP

┌─────────┐
│ Router │
└────┬────┘


┌─────────┐
│Internet │
└────┬────┘


┌─────────┐
│ Server │
│ :443 │
└─────────┘
Networking — Detailed Guide | Linux • Networking • Cybersecurity
26. Networking Learning Roadmap
NETWORKING

├── 1. Networking Basics
│ ├── What is Network?
│ ├── Client & Server
│ ├── LAN
│ ├── WAN
│ └── Internet

├── 2. Network Devices
│ ├── NIC
│ ├── Hub
│ ├── Switch
│ ├── Router
│ ├── Modem
│ ├── Access Point
│ └── Firewall

├── 3. IP Addressing
│ ├── IPv4
│ ├── IPv6
│ ├── Public IP
│ ├── Private IP
│ ├── Subnet Mask
│ ├── CIDR
│ └── Gateway

├── 4. Protocols
│ ├── TCP
│ ├── UDP
│ ├── IP
│ ├── ICMP
│ ├── ARP
│ ├── HTTP
│ ├── HTTPS
│ ├── DNS
│ ├── DHCP
│ └── SSH

├── 5. Ports
│ ├── 22 SSH
│ ├── 53 DNS
│ ├── 80 HTTP
│ ├── 443 HTTPS
│ ├── 3306 MySQL
│ └── 3389 RDP

├── 6. OSI Model
│ ├── Application
│ ├── Presentation
│ ├── Session
│ ├── Transport
│ ├── Network
│ ├── Data Link
│ └── Physical

Networking — Detailed Guide | Linux • Networking • Cybersecurity


├── 7. Linux Networking
│ ├── ip
│ ├── ping
│ ├── ss
│ ├── curl
│ ├── wget
│ ├── dig
│ └── traceroute

└── 8. Cybersecurity Networking
├── Firewall
├── Network Monitoring
├── Packet Analysis
├── VPN
├── IDS / IPS
└── Network Security

27. Recommended Learning Order


For a Linux → Networking → Cybersecurity path, study these topics in order:

Linux Commands

IP Addressing

Subnetting

Ports

TCP / UDP

DNS / DHCP

OSI Model

Routing

Switching

Firewalls

Packet Analysis

Network Security

Networking — Detailed Guide | Linux • Networking • Cybersecurity


Networking — Detailed Guide | Linux • Networking • Cybersecurity
Networking — Detailed Guide | Linux • Networking • Cybersecurity

You might also like