Module: Network Protocols and Internet
Module Overview:
The "Network Protocols and Internet" course provides an in-depth understanding of the protocols and
technologies that form the foundation of modern computer networks and the Internet. Students will study
key protocols at each layer of the OSI and TCP/IP models, explore real-world networking scenarios, and
gain hands-on experience in configuring and troubleshooting network systems.
Introduction to Computer Networks and Internet Fundamentals
1.1 What is a Computer Network?
Definition and Purpose:
o A computer network consists of two or more
computers connected to share resources such as
files, applications, and peripherals (e.g.,
printers). Networks enable communication
between devices and allow them to interact and
exchange data.
o Purpose: Efficient communication, resource
sharing, remote access, and internet access.
Types of Networks:
o LAN (Local Area Network): A small network
typically confined to a single building or campus. Example: Office network.
o WAN (Wide Area Network): A large network that spans across cities, countries, or
continents. Example: The internet is the largest WAN.
o MAN (Metropolitan Area Network): A network that covers a larger area than a LAN but
is smaller than a WAN, such as a city or large campus.
o PAN (Personal Area Network): A network designed for personal devices, often within a
range of a few meters (e.g., Bluetooth between a smartphone and a laptop).
Components of a Network:
o Nodes: Devices connected to the network such as computers, smartphones, and routers.
o Links: The communication channels that connect nodes, such as cables or wireless signals.
o Protocols: The set of rules that govern the communication between devices (e.g., TCP/IP,
HTTP).
1.2 The Internet
The Internet is a global network of computers and servers that communicates using a standardized
protocol (TCP/IP). It provides a platform for sharing data, websites, and applications.
Evolution:
o ARPANET (1969): The precursor to the internet, funded by the U.S. Department of
Defense for research purposes.
o TCP/IP (Transmission Control Protocol/Internet Protocol): Became the standard for
networking in the 1980s, and the internet grew exponentially after its adoption.
Internet Architecture:
o Tiered Structure: ISPs are categorized by tiers based on their connectivity. Tier 1 ISPs own
global backbone networks, while Tier 2 and Tier 3 ISPs lease bandwidth from Tier 1
providers and serve smaller regions.
o Backbones and Peering: Backbone networks connect ISPs globally. Peering refers to the
arrangement where two ISPs agree to exchange traffic without payment, ensuring a robust
exchange of data.
1.3 Network Communication Models
OSI Model:
o The Open Systems Interconnection
(OSI) model divides networking into 7
layers, providing a framework for
understanding how different network
protocols interact.
o Layers:
Physical Layer: Deals with the
physical transmission of data
over hardware (e.g., cables,
switches).
Data Link Layer: Handles
error correction and framing of
data.
Network Layer: Responsible for logical addressing, routing, and packet forwarding
(e.g., IP).
Transport Layer: Ensures end-to-end communication and error handling (e.g., TCP,
UDP).
Session Layer: Manages sessions (persistent connections) between systems.
Presentation Layer: Transforms data into a readable format (e.g., encryption,
compression).
Application Layer: Handles application-specific communication (e.g., HTTP, FTP).
TCP/IP Model:
o The TCP/IP model is simpler, with 4 layers:
Network Interface: Combines the OSI’s Physical and Data Link layers.
Internet: Corresponds to the OSI Network layer (e.g., IP).
Transport: Similar to the OSI Transport layer (e.g., TCP, UDP).
Application: Corresponds to the OSI Application, Presentation, and Session layers.
Data Link Layer and Network Layer
2.1 Data Link Layer
Role of Data Link Layer: Ensures error-free transfer of data between devices on the same physical
network (e.g., within the same LAN). The Data Link layer organizes bits into frames and provides
mechanisms for error detection and correction.
Frame Structure:
o Header: Contains control information, such as the MAC address of the sender and receiver.
o Payload: The actual data being transmitted.
o CRC: A checksum used for error detection.
Error Detection and Correction:
o Parity: Simple error-checking method that detects single-bit errors.
o Checksums: More robust than parity, checksums sum up data bits to detect errors.
o CRC (Cyclic Redundancy Check): A sophisticated method for detecting changes to raw
data.
Protocols:
o Ethernet: The most common LAN technology. Uses MAC addresses to identify devices on
the network.
o IEEE 802.3: The standard for Ethernet.
o IEEE 802.11: The standard for wireless networks (Wi-Fi).
2.2 Network Layer
Role of Network Layer: Responsible for logical
addressing (IP addresses), packet forwarding, and
routing across different networks. This layer ensures
data gets from the sender to the receiver, potentially
through multiple intermediate routers.
Internet Protocol (IP):
o IPv4: Uses 32-bit addresses (e.g., 192.168.1.1).
Supports roughly 4.3 billion unique addresses.
o IPv6: Uses 128-bit addresses (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334), designed
to accommodate the growing number of devices on the internet.
o IP Header Structure: Contains essential information, including the source and destination
IP addresses, and routing instructions.
Routing:
o Static Routing: Routing decisions are manually configured by the network administrator.
o Dynamic Routing: Routers automatically determine the best path to forward packets based
on routing protocols.
Routing Algorithms:
o Distance Vector: Routers share information about the distance (usually in hops) to reach
other networks (e.g., RIP).
o Link-State: Routers share information about the state of their links to create a complete map
of the network (e.g., OSPF).
o Path-Vector: Used in inter-domain routing (e.g., BGP).
2.3 Addressing and Subnetting
IP Addressing:
o Public vs. Private IP Addresses: Public addresses are globally unique, while private
addresses are used within local networks and are not routable on the public internet.
Subnetting:
o The process of dividing a network into smaller subnetworks (subnets).
o Subnet Mask: Defines the boundary between the network and host portions of an IP address
(e.g., 255.255.255.0).
o CIDR (Classless Inter-Domain Routing): Replaces class-based addressing, allowing for
more flexible subnetting.
NAT (Network Address Translation):
o NAT allows multiple devices within a private network to share a single public IP address,
crucial for conserving IP address space.
Transport Layer Protocols
3.1 Overview of the Transport Layer
Role of the Transport Layer: Provides end-to-end communication and ensures data is transferred
reliably or unreliably, depending on the protocol. This layer also handles flow control,
segmentation, and error detection.
3.2 Transmission Control Protocol (TCP)
Reliability: TCP is a connection-oriented protocol, meaning it establishes a connection before data
transmission and ensures reliable delivery.
TCP Segment Structure:
o Header: Contains sequence numbers, acknowledgment numbers, flags, and window size.
o Sequence Numbers: Ensure data is delivered in the correct order.
o Acknowledgments: A receiver sends back acknowledgment numbers to confirm receipt.
Three-Way Handshake:
o SYN: Client sends a request to establish a connection.
o SYN-ACK: Server acknowledges the request.
o ACK: Client acknowledges the server's response, completing the connection.
Flow Control:
o Sliding Window: Mechanism where the receiver informs the sender how much data can be
sent at once.
Congestion Control:
o Slow Start: Initially sends a small amount of data, gradually increasing the amount until
congestion is detected.
o Congestion Avoidance: If congestion is detected, the transmission rate is reduced to avoid
network overload.
3.3 User Datagram Protocol (UDP)
Characteristics:
o Connectionless and unreliable. UDP does not establish a connection before transmitting
data and does not guarantee delivery or order.
UDP Packet Structure:
o Header: Contains source and destination ports, length, and checksum.
Use Cases:
o Real-time applications such as DNS, VoIP, and streaming use UDP because these
applications prioritize speed over reliability.
Application Layer Protocols
4.1 Overview of the Application Layer
The Application Layer deals with end-user services and communication protocols that allow
software applications to interact with the network (e.g., web browsers, email clients).
4.2 Hypertext Transfer Protocol (HTTP)
HTTP is the foundation of the World Wide Web, used to request and transfer web pages between
clients and servers.
o HTTP Methods: GET, POST, PUT, DELETE.
o HTTP Status Codes: Indicate the result of the client’s request (e.g., 404 Not Found, 200
OK).
HTTPS: An extension of HTTP that encrypts data using SSL/TLS to ensure secure
communication.
4.3 Domain Name System (DNS)
DNS translates human-readable domain names (e.g., www.example.com) into IP addresses that
computers can understand.
DNS Hierarchy:
o Root DNS Servers: Top-level DNS servers.
o Top-Level Domain (TLD) Servers: Manage the top-level domains (e.g., .com, .org).
o Authoritative DNS Servers: Responsible for specific domains.
4.4 File Transfer Protocol (FTP) and SFTP
FTP: Used to transfer files between a client and server, either in active or passive mode.
SFTP: Secure alternative to FTP, using SSH for encryption.
4.5 Email Protocols
SMTP: Protocol for sending email from a client to a server.
POP3/IMAP: Protocols for retrieving email from a server. IMAP allows accessing email from
multiple devices, while POP3 typically downloads and deletes messages from the server.
4.6 Other Protocols
Telnet: Allows remote access to devices over the network
(though not secure).
SSH: Secure alternative to Telnet, using encryption for remote
login.
SNMP: Used for managing devices on a network.
DHCP: Automatically assigns IP addresses to devices on a
network.