🌐 Enroll in Networking Course →
🌐 Free Lecture Notes

Computer Networking
— Complete DIT Notes

All 5 modules — OSI/TCP-IP, IP addressing, switching, and application-layer services — with real comparisons and every practical lab included, from cable crimping to Wireshark. Free to read — no account needed.

✓ 100% Free 5 Modules 6 Practical Labs
MODULE 01

Data Communication & Network Types

The building blocks of any network — components, categories by size, topologies, and how devices relate to each other.

Data Communication Components

Every communication needs five parts: a sender, a receiver, a message (the data), a transmission medium (cable or wireless), and a protocol — the agreed rules both sides follow so the message is understood the same way on both ends.

Network Types by Size

LAN (Local Area Network) covers a single building or campus. MAN (Metropolitan Area Network) spans a city. WAN (Wide Area Network) spans countries or continents — the internet is the largest WAN. WLAN is a wireless LAN, same coverage as a LAN but over Wi-Fi instead of cable.

Client-Server vs Peer-to-Peer
AspectClient-ServerPeer-to-Peer (P2P)
StructureCentral server, many clients request from itEvery node is both client and server
ManagementCentralized — easier to secure and administerDecentralized — no single point of control
ExampleA file server, a web app backendBitTorrent, a small office workgroup sharing files directly
Failure pointServer down = everyone affectedNo single point of failure

Network Topologies

Topology is the physical or logical layout of connections: Star (all devices connect to one central hub/switch — most common today), Bus (all devices share one backbone cable — legacy), Ring (each device connects to exactly two neighbours in a loop), Mesh (every device connects to every other — high redundancy, expensive), and Hybrid (a mix, e.g. star networks linked into a larger bus or mesh backbone).

Practical — Lab 1: Cable Crimping, Testing & Standards
# T568A and T568B wiring standards (pin order on RJ-45)
T568A:  White-Green, Green, White-Orange, Blue, White-Blue, Orange, White-Brown, Brown
T568B:  White-Orange, Orange, White-Green, Blue, White-Blue, Green, White-Brown, Brown

# Cable types built from these standards:
Straight-through cable  # same standard both ends (T568B–T568B) — PC to switch
Crossover cable          # T568A one end, T568B other end — PC to PC direct, switch to switch

# Tools: RJ-45 connectors, crimping tool, cable tester
# After crimping: always verify with a cable tester before trusting the link
Protocol
The agreed set of rules that let two devices understand each other's messages.
LAN / WAN
LAN = one site; WAN = many sites connected across distance, like the internet.
Topology
The layout pattern of how devices connect — star, bus, ring, mesh, or hybrid.
RJ-45
The standard 8-pin connector used to terminate Ethernet twisted-pair cable.
💡

Almost every modern LAN is Star topology — a central switch, one cable run per device. Bus and Ring are mostly historical at this point, but still asked about in exams because they explain why Star won (a single cable break doesn't take down the whole network).


MODULE 02

OSI & TCP/IP Models

The reference frameworks every networking concept in this course maps back to.

The OSI Reference Model

OSI splits networking into 7 layers, each handling one job and passing data to the next. From bottom to top: Physical (raw bits over a medium) → Data Link (MAC addressing, frames on the local segment) → Network (IP addressing, routing between networks) → Transport (TCP/UDP, port numbers, reliability) → Session (managing connections/sessions) → Presentation (formatting, encryption, compression) → Application (what the user-facing program actually does — HTTP, FTP, DNS). Data gets wrapped in a new header at each layer going down — this is encapsulation — and unwrapped layer by layer going up on the receiving end.

The TCP/IP Suite

TCP/IP is the model the real internet actually runs on — 4 layers instead of OSI's 7, because it merges several OSI layers together. It's more practical than OSI (which is mostly a teaching/reference tool) and is what every device on the internet actually implements.

OSI (7 layers) mapped to TCP/IP (4 layers)
OSI LayerTCP/IP LayerExamples
Application, Presentation, SessionApplicationHTTP, HTTPS, FTP, DNS, DHCP
TransportTransportTCP, UDP
NetworkInternetIP, ICMP
Data Link, PhysicalLink (Network Access)Ethernet, Wi-Fi, ARP
Encapsulation
Wrapping data in a new header at each layer as it moves down the stack for transmission.
PDU
Protocol Data Unit — the name for data at each layer: Segment (Transport), Packet (Network), Frame (Data Link), Bits (Physical).
De-encapsulation
Stripping headers off layer by layer as data moves up the stack on the receiving device.
ℹ️

Exam tip: "Please Do Not Throw Sausage Pizza Away" is the classic mnemonic for OSI top-to-bottom: Application, Presentation, Session, Transport, Network, Data Link, Physical.


MODULE 03

Physical & Data Link Layer

The cables, wireless signals, and devices that get bits from one machine to the next one physically connected to it.

Transmission Media

Guided (wired) media physically carries the signal: Twisted Pair (Cat5e/6/7 — the standard Ethernet cable, ranked by speed and shielding), Coaxial (older, used in cable internet), and Fiber-Optic (light pulses through glass — fastest, longest range, immune to electrical interference). Unguided (wireless) media uses radio waves — Wi-Fi, Bluetooth, microwave links.

Data Link Layer

This layer handles communication between two devices on the same local network segment. Every network interface has a unique MAC address burned into it. Data at this layer is organized into frames, and the layer performs basic error detection (catching corrupted frames, though not always correcting them).

Hub vs Switch vs Router — What Layer, What Job
DeviceOSI LayerWhat it does
Hub / RepeaterPhysical (L1)Blindly repeats signal to every port — no intelligence
SwitchData Link (L2)Reads MAC addresses, sends frames only to the correct port
Router / L3 SwitchNetwork (L3)Reads IP addresses, forwards packets between different networks
Practical — Lab 4: Layer-2 Switch & VLAN Configuration
# In Cisco Packet Tracer (or real switch CLI)
Switch> enable
Switch# configure terminal
Switch(config)# hostname SW1
Switch(config)# enable secret Cisco123     # set console/privileged password
Switch(config)# banner motd # Authorized Access Only #

# Create and assign a VLAN
Switch(config)# vlan 10
Switch(config-vlan)# name Sales
Switch(config-vlan)# exit
Switch(config)# interface fastEthernet 0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
MAC Address
A unique 48-bit hardware address burned into every network interface card.
Frame
The unit of data at the Data Link layer — includes MAC addresses and error-checking.
VLAN
Virtual LAN — logically separates traffic on the same physical switch into isolated broadcast domains.
💡

Simple way to remember switch vs router: a switch connects devices within one network; a router connects different networks together (like your home LAN to the internet).


MODULE 04

Network & Transport Layer

IP addressing, subnetting, and how TCP/UDP get data reliably (or quickly) from one application to another.

IPv4 Addressing

An IPv4 address is 32 bits, written as four decimal numbers (e.g. 192.168.1.10). Addresses are grouped into classes: Class A (huge networks, few of them), Class B (medium), Class C (small — most common for LANs), Class D (multicast), Class E (reserved/experimental). Private IP ranges (like 192.168.x.x, 10.x.x.x) are used inside LANs and never routed on the public internet — that's what NAT is for.

Private IPv4 Ranges by Class
ClassPrivate RangeTypical Use
A10.0.0.0 – 10.255.255.255Large enterprise networks
B172.16.0.0 – 172.31.255.255Medium-sized organizations
C192.168.0.0 – 192.168.255.255Home routers, small offices

Subnetting & IPv6

A subnet mask (e.g. 255.255.255.0) splits an IP address into a network portion and a host portion, letting one large network be divided into smaller, manageable segments. IPv6 uses 128-bit addresses written in hex (e.g. 2001:0db8::1) — introduced because IPv4's ~4.3 billion addresses ran out with the growth of the internet.

Transport Layer — TCP vs UDP

TCP is connection-oriented — it performs a handshake, guarantees delivery, and re-sends lost packets (used for web pages, email, file transfer). UDP is connectionless — no handshake, no guarantee, but much faster (used for video streaming, DNS lookups, online gaming). Both use port numbers to direct traffic to the correct application on a device (e.g. port 80 for HTTP, port 443 for HTTPS).

Practical — Lab 2: Static IP Configuration & Connectivity
# Linux — set static IP with nmcli
nmcli con mod eth0 ipv4.addresses 192.168.1.50/24
nmcli con mod eth0 ipv4.gateway 192.168.1.1
nmcli con mod eth0 ipv4.dns "8.8.8.8"
nmcli con mod eth0 ipv4.method manual
nmcli con up eth0

# Windows — set static IP via netsh
netsh interface ip set address "Ethernet" static 192.168.1.50 255.255.255.0 192.168.1.1

# Diagnostics — same intent, different command names
ping 8.8.8.8              # both OSes
ip a          / ipconfig      # Linux / Windows — show interface config
traceroute 8.8.8.8 / tracert 8.8.8.8   # Linux / Windows — trace the route hop by hop
nslookup devriston.com.pk     # both — resolve a domain to an IP
Practical — Lab 5: SOHO Router & Wireless AP Configuration
# Typical steps via the router's web portal (usually 192.168.1.1 or 192.168.0.1)
1. Log in with admin credentials
2. WAN setup      # PPPoE / DHCP / Static, per your ISP
3. DHCP pool      # e.g. 192.168.1.100 - 192.168.1.200 for LAN clients
4. Wireless       # set SSID, choose WPA2/WPA3, set a strong pre-shared key
5. Save & reboot the router to apply
Subnet Mask
Defines which part of an IP address is the network and which is the host.
Port Number
A number (0–65535) that routes traffic to the correct application on a device.
NAT
Network Address Translation — lets many private IPs share one public IP to reach the internet.
Three-way handshake
TCP's connection setup: SYN → SYN-ACK → ACK, before any real data is sent.
⚠️

Common exam trap: a /24 subnet mask (255.255.255.0) gives 254 usable host addresses, not 256 — the first address is the network address and the last is the broadcast address, neither assignable to a device.


MODULE 05

Application Layer Services & Security

The services that make a network actually useful — naming, address assignment, file transfer, the web — plus the basics of keeping it secure.

Core Network Services

DNS translates human-readable domain names (devriston.com.pk) into IP addresses computers use to connect. DHCP automatically assigns IP addresses, subnet masks, gateways, and DNS servers to devices joining a network — without it, every device would need manual configuration. FTP transfers files between a client and server.

Web Services

HTTP is the protocol web browsers and servers use to exchange pages — plain text, unencrypted. HTTPS is HTTP wrapped in SSL/TLS encryption, so data in transit (passwords, card numbers) can't be read if intercepted. Every padlock icon in a browser address bar means HTTPS is active.

Basic Network Security

A firewall filters traffic based on rules (allow/deny by port, IP, or protocol) — the first line of defense at a network's edge. NAT incidentally adds a layer of protection too, since internal private IPs are never directly reachable from the internet. An ACL (Access Control List) is a more granular rule set, often applied on routers/switches to permit or deny specific traffic.

Common Ports to Know
PortServiceProtocol
20/21FTPTCP
53DNSTCP/UDP
67/68DHCPUDP
80HTTPTCP
443HTTPSTCP
Practical — Lab 3: Workgroup Configuration & Resource Sharing
# Windows — join a workgroup (Settings → System → About → Rename this PC)
# then set the same Workgroup name on every PC that should see each other

# Share a folder with permissions
Right-click folder → Properties → Sharing tab → Advanced Sharing
→ Share this folder → Permissions → set Read / Change / Full Control

# Access a shared folder from another PC
\\192.168.1.10\SharedFolder
Practical — Lab 6: Packet Sniffing & Traffic Analysis
# Wireshark — capture and inspect live traffic
1. Select your active network interface, click Start Capture
2. Filter traffic by protocol:
   tcp                  # show only TCP packets
   udp                  # show only UDP packets
   dns                  # show only DNS lookups
   http                 # show only unencrypted HTTP traffic

# Find the TCP three-way handshake:
# Look for consecutive packets flagged [SYN] → [SYN, ACK] → [ACK]
DNS
Translates domain names into IP addresses — the internet's phone book.
DHCP
Automatically assigns IP configuration to devices joining a network.
Firewall
Filters network traffic based on rules — allowed ports, IPs, or protocols.
SSL/TLS
The encryption layer that turns HTTP into HTTPS, protecting data in transit.
💡

Try it: open Wireshark, visit any non-HTTPS site, and filter by http — you'll see form data readable in plain text. Then visit an HTTPS site and try the same filter — nothing readable shows up. That's the whole point of TLS.


🌐

Ready to go beyond reading?

The live course includes hands-on labs, Q&A sessions, and a final enterprise project for your GitHub portfolio. Same instructor who wrote these notes.

💬 Enroll via WhatsApp →

Batch info & fee on request