Fundamentals of Networking
1. Introduction to Networking
Networking refers to the practice of connecting computers and other devices to share resources,
exchange data, and enable communication. In modern organisations, networking forms the
backbone of all digital operations, from email communication to large-scale data analytics. The
scope of networking extends beyond traditional wired connections and encompasses wireless
communication, virtual networking, and cloud-based interconnectivity.
A network can be classified into several types based on geographical reach and functionality:
Local Area Network (LAN): Covers a small geographical area such as a single building
or office.
Wide Area Network (WAN): Spans large geographical distances and connects multiple
LANs, often through leased telecommunication lines.
Metropolitan Area Network (MAN): Serves a city or large campus.
Personal Area Network (PAN): Short-range connections for personal devices, such as
Bluetooth connections between a laptop and smartphone.
Need for Networking in Modern Enterprises:
1. Resource Sharing: Enables multiple devices to share printers, storage, and applications.
2. Centralised Data Management: Ensures consistency and security of organisational
data.
3. Scalability: Allows the network to grow with the organisation’s needs.
4. Collaboration: Facilitates team-based work in real-time, even across geographies.
Figure Suggestion 1: Diagram showing LAN, WAN, MAN, and PAN coverage with example
devices.
2. Internetworking Concepts
Internetworking refers to connecting multiple networks into a larger, cohesive system. The term
is often associated with devices and technologies that ensure smooth communication between
diverse networks.
Key Devices in Internetworking:
Hub: A basic device that broadcasts incoming data packets to all connected devices.
Switch: Operates at the data link layer (Layer 2) of the OSI model and forwards packets
only to the intended recipient.
Router: Operates at the network layer (Layer 3) and determines the best path for data
packets between networks.
Firewall: Monitors and controls incoming and outgoing network traffic based on
predefined rules.
Network Topologies:
1. Star Topology: All devices are connected to a central switch or hub.
2. Bus Topology: Devices share a single communication line.
3. Ring Topology: Each device connects to exactly two other devices, forming a ring.
4. Mesh Topology: Every device connects to every other device for maximum redundancy.
Figure Suggestion 2: Topology diagrams for Star, Bus, Ring, and Mesh networks.
3. The OSI Model
The Open Systems Interconnection (OSI) model is a conceptual framework that standardises
communication functions into seven distinct layers. Understanding the OSI model is fundamental
for diagnosing network issues, designing infrastructure, and ensuring interoperability between
products from different vendors.
The Seven Layers:
1. Physical Layer: Deals with the physical medium for data transfer (cables, connectors).
2. Data Link Layer: Handles node-to-node data transfer and error detection (MAC
addresses, switches).
3. Network Layer: Determines the path data takes (IP addressing, routers).
4. Transport Layer: Ensures complete data transfer with error recovery (TCP, UDP).
5. Session Layer: Manages sessions between applications.
6. Presentation Layer: Formats or translates data for the application layer (encryption,
compression).
7. Application Layer: Interface between applications and the network (HTTP, FTP,
SMTP).
Comparison between OSI and TCP/IP Models:
OSI Layer TCP/IP Layer Example Protocols
Application, Presentation, Session Application HTTP, FTP, DNS
Transport Transport TCP, UDP
Network Internet IP, ICMP
Data Link, Physical Network Access Ethernet, Wi-Fi
Figure Suggestion 3: Layered diagram showing OSI vs TCP/IP mapping.
4. Ethernet Technology
Ethernet is the most widely deployed technology for wired networking. It defines wiring and
signaling standards for the physical layer and data link layer protocols.
Key Features of Ethernet:
Frame Structure: Includes source and destination MAC addresses, EtherType, payload,
and error-checking fields.
CSMA/CD: Carrier Sense Multiple Access with Collision Detection, a method to control
access to the network medium.
Speeds: Evolved from 10 Mbps (Ethernet) to 400 Gbps (Gigabit Ethernet and beyond).
Duplex Modes: Half-duplex (two-way communication, but one direction at a time) and
full-duplex (simultaneous two-way communication).
5. Wireless Networking
Wireless networking allows devices to connect without physical cables, using radio waves or
infrared signals.
Standards:
802.11a/b/g/n/ac/ax: Defines different Wi-Fi generations, each offering improvements in
speed, range, and efficiency.
Frequencies: 2.4 GHz (longer range, lower speed) vs 5 GHz (shorter range, higher
speed).
Security Protocols:
WEP: Weak and outdated.
WPA2: Strong encryption using AES.
WPA3: The latest standard with stronger encryption and forward secrecy.
Figure Suggestion 4: Wi-Fi frequency band coverage and interference comparison.
Assignments for Session 1:
1. Difference between UTP and STP: Explain construction, shielding, and use cases.
2. Write categories of cables: CAT5, CAT5e, CAT6, CAT6a, CAT7, CAT8.
3. Meaning of 'e' in CAT5e: Enhanced performance.
4. List the seven layers of the OSI Model and their functions.
TCP/IP and Internet Protocols
1. Introduction to TCP/IP Model
The Transmission Control Protocol/Internet Protocol (TCP/IP) suite is the foundation of
modern internet and network communication. Unlike the OSI model, which is theoretical,
TCP/IP is a practical, protocol-driven architecture that governs how data is packaged, addressed,
transmitted, routed, and received over networks. Developed by the U.S. Department of Defense
in the late 1970s, TCP/IP enabled the interoperability of heterogeneous networks and later
became the global standard for data communications.
TCP/IP is structured into four layers, each with specific roles:
Corresponding OSI
TCP/IP Layer Functions
Layers
Application, Presentation, Provides network services to applications (HTTP,
Application
Session FTP, SMTP, DNS)
Transport Transport Ensures reliable data delivery (TCP, UDP)
Internet Network Handles logical addressing and routing (IP, ICMP)
Network Defines hardware addressing and data transmission
Data Link, Physical
Access methods (Ethernet, Wi-Fi)
Figure Suggestion 1: Side-by-side diagram comparing OSI model’s 7 layers to TCP/IP’s 4
layers.
2. Role of IP in Networking
The Internet Protocol (IP) is responsible for addressing and routing data packets so they can
travel across interconnected networks and reach the correct destination.
2.1 IPv4 Addressing
IPv4 uses a 32-bit addressing scheme, typically expressed in dotted decimal format (e.g.,
192.168.1.1). IPv4 supports approximately 4.3 billion unique addresses but faces exhaustion
due to global internet growth.
IPv4 address classes:
Class A: 1.0.0.0 to 126.0.0.0 (large networks)
Class B: 128.0.0.0 to 191.255.0.0 (medium networks)
Class C: 192.0.0.0 to 223.255.255.0 (small networks)
Class D: 224.0.0.0 to 239.255.255.255 (multicast)
Class E: 240.0.0.0 to 255.255.255.255 (experimental)
2.2 IPv6 Addressing
IPv6 is a 128-bit addressing system designed to overcome IPv4 exhaustion, capable of
supporting 3.4 × 10^38 addresses. It uses hexadecimal representation separated by colons (e.g.,
2001:0db8:85a3::8a2e:0370:7334).
Advantages of IPv6:
1. Larger address space.
2. Simplified header format.
3. Improved security through mandatory IPsec support.
4. Better support for mobile and IoT devices.
3. TCP and UDP Protocols
3.1 TCP – Transmission Control Protocol
TCP is a connection-oriented protocol that ensures reliable communication between
applications.
Key features:
Three-way handshake for connection establishment.
Error detection and retransmission.
Ordered data delivery.
Advantages: Reliable, ordered, and error-checked transmission.
Disadvantages: Higher overhead, slower than UDP.
3.2 UDP – User Datagram Protocol
UDP is a connectionless protocol used for fast, lightweight communication.
Key features:
No connection setup.
No guaranteed delivery or ordering.
Suitable for real-time applications like VoIP, online gaming, and video streaming.
Advantages: Low latency, minimal overhead.
Disadvantages: No reliability or flow control.
3.3 TCP vs UDP Comparison
Feature TCP UDP
Connection Type Connection-oriented Connectionless
Reliability Guaranteed Not guaranteed
Speed Slower Faster
Use Cases Web browsing, email, file transfer Streaming, VoIP, DNS
Figure Suggestion 2: Diagram showing TCP three-way handshake and UDP one-shot packet
sending.
4. DNS – The Domain Name System
DNS is the "phonebook of the internet," converting human-readable domain names (e.g.,
example.com) into IP addresses that machines can understand.
Process of DNS Resolution:
1. User enters a domain name.
2. DNS resolver queries root server.
3. Query proceeds to TLD (Top-Level Domain) server.
4. Authoritative server returns IP address.
5. Browser connects to the target server.
DNS Record Types:
A Record: Maps a domain to an IPv4 address.
AAAA Record: Maps a domain to an IPv6 address.
MX Record: Specifies mail server for domain.
CNAME Record: Alias for another domain.
5. HTTP/HTTPS Protocols
The Hypertext Transfer Protocol (HTTP) is used for transmitting hypermedia documents,
primarily HTML. HTTPS adds TLS encryption for security.
Advantages of HTTPS:
1. Data confidentiality.
2. Data integrity.
3. Authentication of the server.
Assignments for Session 2:
1. Define IP and its two major versions.
2. Compare TCP and UDP in a table with at least five features.
3. Write the steps of the TCP three-way handshake.
4. Explain DNS and list five DNS record types.
IP Subnetting & Variable Length Subnet Masking (VLSM)
1. Introduction to IP Subnetting
Subnetting is the process of dividing a single IP network into multiple smaller, more
manageable sub-networks (subnets). This helps optimize IP address usage, improve network
performance, and enhance security by segmenting traffic.
In IPv4, subnetting is accomplished by manipulating the subnet mask, which determines how
many bits of the IP address represent the network portion and how many bits represent the host
portion.
Example:
IP Address: 192.168.1.10
Subnet Mask: 255.255.255.0 (or /24 in CIDR notation)
Network Portion: First 24 bits (192.168.1)
Host Portion: Last 8 bits (.10)
2. Why Subnetting is Important
1. Efficient IP Utilization – Prevents wastage of IP addresses.
2. Network Performance – Reduces broadcast domain size.
3. Security – Isolates departments or user groups.
4. Simplified Management – Easier to monitor and troubleshoot.
3. Understanding the Subnet Mask
The subnet mask is a 32-bit number that indicates which part of the IP address is the network
and which part is the host.
Decimal Binary
255.0.0.0 11111111.00000000.00000000.00000000
255.255.0.0 11111111.11111111.00000000.00000000
255.255.255.0 11111111.11111111.11111111.00000000
CIDR Notation: Instead of writing the full mask, we write /n where n is the number of bits in
the network portion.
Example: /24 means the first 24 bits are network bits (mask = 255.255.255.0).
4. Determining Network and Host Portions
For an IP 192.168.5.85 /24:
Subnet Mask: 255.255.255.0
Network Portion: 192.168.5
Host Portion: 85
For an IP 10.128.240.50 /30:
Subnet Mask: 255.255.255.252
Network Portion: 10.128.240.48
Usable Hosts: 2 (50 is one of them)
5. Subnetting Step-by-Step
Let’s say we have a network 192.168.1.0/24 and we want to create smaller networks.
Step 1 – Determine Required Hosts per Subnet
Formula:
Number of Hosts = (2^HostBits) – 2
(The subtraction accounts for network & broadcast addresses)
Step 2 – Find the New Subnet Mask
Reduce the number of host bits until the formula meets the host requirement.
Step 3 – Determine the Increment
The increment tells us the range of each subnet.
6. Subnetting Example
We have 192.168.1.0/24 and we need:
Subnet 1: 28 hosts
Subnet 2: 52 hosts
Subnet 3: 15 hosts
Subnet 4: 5 hosts
Solution:
We use VLSM (explained later) because each subnet has different size needs.
Subnet 1: Needs 28 hosts → Nearest power of 2 is 32 → Host bits = 5 → Mask = /27
Range: 192.168.1.0 – 192.168.1.31
Subnet 2: Needs 52 hosts → Nearest power of 2 is 64 → Host bits = 6 → Mask = /26
Range: 192.168.1.32 – 192.168.1.95
Subnet 3: Needs 15 hosts → Nearest power of 2 is 16 → Host bits = 4 → Mask = /28
Range: 192.168.1.96 – 192.168.1.111
Subnet 4: Needs 5 hosts → Nearest power of 2 is 8 → Host bits = 3 → Mask = /29
Range: 192.168.1.112 – 192.168.1.119
7. Variable Length Subnet Masking (VLSM)
VLSM allows different subnets to have different subnet masks, maximizing IP address usage.
Advantages of VLSM:
No address wastage for small subnets.
Flexibility in network design.
Better efficiency for complex enterprise networks.
8. Practice Problem
Given: 172.16.0.0/24
Requirements:
1st subnet: 100 hosts
2nd subnet: 50 hosts
3rd subnet: 25 hosts
4th subnet: 10 hosts
Assignment: Determine the subnet masks, ranges, and broadcast addresses for each subnet.
9. Common Subnet Masks Table
CIDR Subnet Mask Usable Hosts
/30 255.255.255.252 2
/29 255.255.255.248 6
/28 255.255.255.240 14
/27 255.255.255.224 30
/26 255.255.255.192 62
/25 255.255.255.128 126
CIDR Subnet Mask Usable Hosts
/24 255.255.255.0 254
10. Assignments for Session 3
1. Define subnetting and list three benefits.
2. Determine network and host portions for:
o 192.168.5.85 /24
o 10.128.240.50 /30
3. Divide 192.168.10.0/24 into:
o 40 hosts
o 20 hosts
o 5 hosts
4. Explain VLSM and its advantages.
5. Fill in a table of CIDR notations and corresponding subnet masks.
Session 1 – Assignments (Detailed)
1) Difference between UTP & STP
UTP (Unshielded Twisted Pair)
No metallic shielding—just twisted copper pairs.
Lighter, cheaper, easier to install.
Adequate for most office LANs (CAT5e/CAT6 up to 1 Gbps/10 Gbps over short runs).
More susceptible to electromagnetic interference (EMI) than STP.
STP (Shielded Twisted Pair)
Foil/braid shielding around each pair or the whole bundle (types: F/UTP, U/FTP, S/FTP
etc.).
Better noise immunity and crosstalk suppression—useful near heavy machinery,
elevators, neon lights, RF sources.
Costs more; slightly harder to terminate (proper grounding required).
Quick table
Feature UTP STP
Shielding None Foil/braid (various forms)
EMI immunity Good (twisting only) Very good (twisting + shield)
Cost/Install Lower/easier Higher/more care (grounding)
Typical use Offices, data cabling Industrial floors, noisy environments
2) Write categories of cables
Focus on twisted-pair Ethernet categories (common in LANs):
Typical Max Speed/Distance
Category Bandwidth Notes
(copper)
CAT5 100 MHz 100 Mbps @100 m Legacy
1 Gbps @100 m (often 2.5G/5G
CAT5e 100 MHz “e” = enhanced specs
short)
CAT6 250 MHz 1 Gbps @100 m; 10 Gbps @≤55 m Tighter twist, separator
CAT6a 500 MHz 10 Gbps @100 m Better alien-crosstalk control
Proprietary connectors
CAT7 / 7a 600–1000 MHz 10+ Gbps (shielded)
common
CAT8 2000 MHz 25/40 Gbps @≤30 m Data center short runs
(You can also mention fiber: single-mode for long distance; multi-mode OM3/OM4 for 10–100
Gbps in buildings.)
3) “e” in CAT5e
“e” = enhanced. CAT5e tightens specs (NEXT/PSNEXT, return loss) over CAT5, enabling
reliable 1 Gbps at 100 m and lower error rates.
4) OSI Model (clear explanation)
L1 Physical: Bits on the wire (cables, connectors, signaling). Device: repeaters.
L2 Data Link: Frames, MAC addressing, switching, error detection (CRC). Devices:
switches, NICs.
L3 Network: Packets/routing, IP addressing, path selection. Device: routers.
L4 Transport: Segments/datagrams, reliability and flow control (TCP/UDP).
L5 Session: Starts/maintains/ends sessions (checkpoints, dialog control).
L6 Presentation: Data format/translation, compression, encryption (TLS handshake
parts, ASN.1, JSON).
L7 Application: User-facing protocols/services (HTTP, FTP, SMTP, DNS).
PDU names: bits (L1) → frames (L2) → packets (L3) → segments (TCP) / datagrams (UDP) at
L4.
Session 2 – Assignments (Detailed)
1) IP (Internet Protocol)
Purpose: Logical addressing and routing of packets across networks.
Versions: IPv4 (32-bit, dotted decimal) and IPv6 (128-bit, hex).
Key ideas:
o Connectionless, best-effort delivery.
o Fragmentation (mainly at sender in modern networks; Path MTU Discovery
minimizes it).
o Addressing scopes (private vs public).
Private IPv4 ranges: 10.0.0.0/8, 172.16.0.0–172.31.0.0/12, 192.168.0.0/16.
2) TCP/IP Model
Four layers:
Application: HTTP, HTTPS, FTP, SMTP, DNS, DHCP, SNMP.
Transport: TCP (reliable), UDP (fast/lean).
Internet: IP, ICMP, ARP/ND (ARP for IPv4, Neighbor Discovery for IPv6).
Network Access (Link): Ethernet, Wi-Fi, PPP; framing and physical media.
How it maps to OSI:
Application ↔ OSI L5–L7
Transport ↔ OSI L4
Internet ↔ OSI L3
Network Access ↔ OSI L1–L2
3) Difference between TCP & UDP (with practical angle)
Aspect TCP UDP
3-way handshake (SYN, SYN-ACK,
Connection No handshake
ACK)
Reliability ACKs, retransmissions, ordered delivery No guarantees
Overhead Higher (header 20+ bytes) Lower (8 bytes)
Latency Higher Lower
VoIP, video, gaming, DNS,
Use cases Web, email, file transfer, DB
syslog
Flow/Congestion ctrl Yes No (app handles if needed)
Session 3 – Assignments (Detailed & Worked)
1) Subnetting (definition + benefits)
Definition: Splitting a larger IP network into smaller logical networks by borrowing host bits to
extend the network prefix (changing the subnet mask/CIDR).
Benefits:
Efficient addressing (right-sized subnets).
Performance (smaller broadcast domains).
Security/segmentation (containment by department/zone).
Manageability (policy and routing per subnet).
2) Determine the network and host part
a) 192.168.5.85 /24
Mask: 255.255.255.0 → last octet is host field.
Network address: 192.168.5.0
Broadcast: 192.168.5.255
Usable range: 192.168.5.1 – 192.168.5.254
Host ID: 85 (in the last octet)
b) 10.128.240.50 /30
Mask: 255.255.255.252 → block size in last octet = 256 – 252 = 4.
Find the block that contains 50: multiples of 4 → … 40, 44, 48, 52. Since 52 > 50, the
network is 48.
Network address: 10.128.240.48
Broadcast: 10.128.240.51 (next block − 1 → 52 − 1)
Usable hosts: 10.128.240.49 and 10.128.240.50 (valid host)
3) Divide the network as per requirement: 192.168.1.0/24
Requirements:
Subnet 1 = 28 hosts
Subnet 2 = 52 hosts
Subnet 3 = 15 hosts
Subnet 4 = 5 hosts
Step 1 — Sort by size (largest first)
52, 28, 15, 5
Step 2 — Pick the smallest mask that fits each
52 hosts → /26 (64 addresses; usable 62)
28 hosts → /27 (32 addresses; usable 30)
15 hosts → /28 (16 addresses; usable 14)
5 hosts → /29 (8 addresses; usable 6)
(Rule of thumb: usable = 2^host_bits − 2)
Step 3 — Allocate contiguous blocks from 192.168.1.0 upward
1. Subnet for 52 hosts → /26 (block size 64)
Network: 192.168.1.0/26
Range: 192.168.1.0 – 192.168.1.63
Usable: 192.168.1.1 – 192.168.1.62
Broadcast: 192.168.1.63
2. Subnet for 28 hosts → /27 (block size 32)
Network: 192.168.1.64/27
Range: 192.168.1.64 – 192.168.1.95
Usable: 192.168.1.65 – 192.168.1.94
Broadcast: 192.168.1.95
3. Subnet for 15 hosts → /28 (block size 16)
Network: 192.168.1.96/28
Range: 192.168.1.96 – 192.168.1.111
Usable: 192.168.1.97 – 192.168.1.110
Broadcast: 192.168.1.111
4. Subnet for 5 hosts → /29 (block size 8)
Network: 192.168.1.112/29
Range: 192.168.1.112 – 192.168.1.119
Usable: 192.168.1.113 – 192.168.1.118
Broadcast: 192.168.1.119
Free space left: 192.168.1.120 – 192.168.1.255 (can be further subnetted later).
Summary table
Subnet Requirement CIDR Network Usable Range Broadcast
1 52 hosts /26 192.168.1.0 192.168.1.1–62 192.168.1.63
2 28 hosts /27 192.168.1.64 192.168.1.65–94 192.168.1.95
Subnet Requirement CIDR Network Usable Range Broadcast
3 15 hosts /28 192.168.1.96 192.168.1.97–110 192.168.1.111
4 5 hosts /29 192.168.1.112 192.168.1.113–118 192.168.1.119
4) Explain VLSM (clear & concise)
Variable Length Subnet Masking lets you assign different masks within the same major
network to match actual host needs.
Start with the largest required subnet, allocate the smallest mask that fits it.
Move to the next largest, and so on, ensuring blocks don’t overlap.
This maximizes address efficiency compared to using one fixed mask everywhere.
Why it matters: real networks have departments of unequal size; VLSM prevents wasting
hundreds of addresses on tiny segments.