📶
Computer Network
Computer Networks Module Test
Preparation Guide
This guide provides comprehensive, easy-to-understand technical notes for
Units 1, 2, and 3 of your Computer Networks syllabus. It includes explanations,
examples, and indications for necessary diagrams.
Unit 1: Introduction to Networking
1.1 Introduction to Computer Network, Network Application,
Network Software and Hardware Components, Network
Topology, Protocol Hierarchies, Design Issues for Layers,
Connection-Oriented and Connectionless Services
1. Computer Network
Definition: A computer network is a system of interconnected computers
and other peripheral devices (like printers, scanners) that can share
resources and information.
Purpose: Resource sharing (hardware, software, data), communication
(email, chat), data consistency, centralized management.
2. Network Applications
Computer Network 1
Examples:
Web Browsing: Accessing websites (HTTP/HTTPS).
Email: Sending and receiving messages (SMTP, POP3, IMAP).
File Sharing: Transferring files between computers (FTP, SMB).
Online Gaming: Real-time interaction with other players.
Video Conferencing: Real-time audio/video communication.
3. Network Software Components
Examples:
Network Operating Systems (NOS): Manage network resources (e.g.,
Windows Server, Linux).
Network Protocols: Rules for communication (e.g., TCP/IP, HTTP, FTP).
Network Applications: Software that uses the network (e.g., web
browsers, email clients).
Drivers: Software that allows hardware devices to communicate with
the operating system.
4. Network Hardware Components (Interconnection Networking Devices)
These devices connect computers and other network components.
Explanation:
NIC (Network Interface Card):
Purpose: Hardware component that connects a computer to a
network.
Function: Converts data into electrical signals for transmission over
the network cable and vice-versa.
Hub:
Purpose: Central connection point for multiple devices in a network.
Function: Broadcasts data received from one port to all other ports.
(Creates a single collision domain).
Characteristic: Dumb device, no intelligence.
Switch:
Computer Network 2
Purpose: Connects devices in a network, more intelligent than a
hub.
Function: Learns MAC addresses of connected devices and
forwards data only to the intended recipient. (Reduces collisions,
creates multiple collision domains).
Router:
Purpose: Connects different networks (e.g., your home network to
the Internet).
Function: Forwards data packets between computer networks,
making routing decisions based on IP addresses.
Characteristic: Operates at the Network Layer (Layer 3).
Bridge:
Purpose: Connects two LAN segments, filtering traffic based on
MAC addresses.
Function: Forwards data only if the destination MAC address is on
the other segment.
Gateway:
Purpose: Connects two networks that use different protocols.
Function: Translates protocols between disparate networks.
5. Network Topology
Computer Network 3
Definition: The physical or logical arrangement of connected devices in a
network.
Types (Diagrams needed for each type):
Star Topology:
Description: All devices are connected to a central hub or switch.
Pros: Easy to install and manage, fault isolation (failure of one
device doesn't affect others), easy to add/remove devices.
Cons: Single point of failure (if central device fails, entire network
goes down), requires more cable than bus.
Bus Topology:
Description: All devices are connected to a single main cable
(backbone).
Pros: Easy to install, less cabling than star, cost-effective.
Computer Network 4
Cons: Single point of failure (break in cable affects entire network),
difficult to troubleshoot, limited number of devices.
Ring Topology:
Description: Devices are connected in a circular fashion, with each
device connected to exactly two others.
Pros: Data flows in one direction, reduces chances of collision, high
speed.
Cons: Failure of one device affects the entire network, difficult to
add/remove devices.
Mesh Topology:
Description: Every device is connected to every other device.
Pros: Highly reliable (multiple paths), robust to failures.
Cons: Very expensive and complex to implement (many cables),
difficult to manage.
Hybrid Topology:
Description: A combination of two or more different topologies.
Example: Star-Bus topology (multiple star networks connected via a
bus backbone).
6. Protocol Hierarchies
Concept: Network communication is complex, so it's broken down into
smaller, manageable layers, each with specific functions and protocols.
This layered approach is called protocol hierarchy.
Why used: Modularity, standardization, easier troubleshooting,
independent development of layers.
7. Design Issues for the Layers
Explanation:
Addressing: How to uniquely identify devices and processes on the
network.
Error Control: Mechanisms to detect and correct errors that occur
during data transmission.
Computer Network 5
Flow Control: Mechanisms to ensure that a fast sender doesn't
overwhelm a slow receiver.
Multiplexing/Demultiplexing: Sharing a single communication channel
among multiple users (multiplexing) and separating them at the receiver
(demultiplexing).
Routing: Determining the best path for data packets to travel from
source to destination across multiple networks.
Connection Setup and Release: Establishing and terminating
communication sessions.
8. Connection-Oriented vs. Connectionless Services
Comparison:
Feature Connection-Oriented Service Connectionless Service
Requires a connection setup
Setup Phase No connection setup required.
phase before data transfer.
More reliable; guarantees Less reliable; no guarantees of
Reliability
delivery, order, and error control. delivery or order.
Uses acknowledgements for
Acknowledgement No acknowledgements.
data receipt.
Data packets are typically Data packets may arrive out of
Sequencing
sequenced. order.
Higher overhead due to
Overhead Lower overhead.
connection management.
TCP (Transmission Control
Example UDP (User Datagram Protocol)
Protocol)
File transfer, web browsing, Streaming media, online
Use Case
email (where reliability is key). gaming (where speed is key).
1.2 Reference Models: Layer Details of OSI, TCP/IP Models.
Communication Between Layers.
1. OSI (Open Systems Interconnection) Model
Computer Network 6
A conceptual framework that standardizes the functions of a
communication system into seven abstraction layers.
Layers and their Functions:
1. Physical Layer (Layer 1):
Function: Deals with the physical transmission of raw bit streams
over a physical medium. Defines electrical, mechanical, procedural,
and functional specifications for activating, maintaining, and
deactivating the physical link.
Devices: Hubs, cables, connectors.
2. Data Link Layer (Layer 2):
Function: Provides reliable data transfer across a physical link.
Handles framing, physical addressing (MAC addresses), error
detection, and flow control.
Devices: Switches, Bridges.
3. Network Layer (Layer 3):
Computer Network 7
Function: Responsible for logical addressing (IP addresses) and
routing packets across different networks. Determines the best path
for data.
Devices: Routers.
4. Transport Layer (Layer 4):
Function: Provides end-to-end communication between processes
on different hosts. Handles segmentation, reassembly, connection
management (TCP), and flow/error control.
Protocols: TCP, UDP.
5. Session Layer (Layer 5):
Function: Establishes, manages, and terminates communication
sessions between applications. Handles dialog control and
synchronization.
6. Presentation Layer (Layer 6):
Function: Deals with data format and encryption/decryption.
Ensures data is presented in a format that the application layer can
understand. Handles data compression and translation.
7. Application Layer (Layer 7):
Function: Provides network services directly to end-user
applications. Interfaces with the user.
Protocols: HTTP, FTP, SMTP, DNS.
2. TCP/IP Model
Computer Network 8
A practical and widely used protocol suite that forms the basis of the
Internet. It's typically described with four or five layers.
Layers and their Functions:
1. Network Access Layer (or Link Layer / Data Link Layer + Physical
Layer):
Function: Combines the functionalities of the Physical and Data Link
layers of the OSI model. Deals with hardware addressing and
physical transmission.
Protocols: Ethernet, Wi-Fi.
2. Internet Layer (or Network Layer):
Function: Responsible for logical addressing (IP addresses) and
routing packets across different networks.
Protocols: IP (Internet Protocol), ICMP, ARP.
3. Transport Layer:
Function: Provides end-to-end communication between
applications. Handles segmentation, reassembly, and connection
management.
Protocols: TCP, UDP.
4. Application Layer (or Process Layer):
Function: Combines the functionalities of the Session, Presentation,
and Application layers of the OSI model. Provides high-level
protocols for specific applications.
Protocols: HTTP, FTP, SMTP, DNS, SSH.
3. Comparison of OSI and TCP/IP Models
Table:
Feature OSI Model TCP/IP Model
7 layers (Physical, Data Link, 4 or 5 layers (Network
Layers Network, Transport, Session, Access, Internet, Transport,
Presentation, Application) Application)
Practical model, developed by
Development Theoretical model, developed by ISO.
DARPA.
Computer Network 9
Feature OSI Model TCP/IP Model
Reliability More rigid, less adaptable. More flexible, adaptable.
Protocols are hidden (layered Protocols are fundamental to
Protocol Dep.
approach). the model.
Reference model for understanding De facto standard for the
Standard
network communication. Internet.
Services, interfaces, and protocols Focus on interoperability and
Focus
clearly separated. practical implementation.
4. Communication Between Layers (Encapsulation and Decapsulation)
Concept (Diagram needed):
Data communication in layered models involves encapsulation at the
sender and decapsulation at the receiver.
Encapsulation (Sender): As data moves down the layers from the
Application Layer to the Physical Layer, each layer adds its own header
(and sometimes a trailer) to the data unit received from the layer above.
This added information is specific to that layer's protocol. The data unit
at each layer is often called a PDU (Protocol Data Unit).
Decapsulation (Receiver): As data moves up the layers from the
Physical Layer to the Application Layer, each layer removes the header
(and trailer) that was added by its peer layer at the sender, processes it,
and passes the remaining data up to the next higher layer.
Interfaces: Each layer communicates only with the layers immediately
above and below it through defined interfaces.
Peer-to-Peer Processes: Although data flows vertically through layers
on a single machine, each layer conceptually communicates with its
peer layer on the remote machine using its specific protocol.
Diagram (Conceptual):
Computer Network 10
Unit 2: Physical Layer
2.1 Introduction to Communication Electromagnetic Spectrum
1. Electromagnetic Spectrum
Concept: The electromagnetic (EM) spectrum is the range of all types of
EM radiation. Radiation is energy that travels and spreads out as it goes –
visible light, radio waves, microwaves, X-rays are all examples of EM
radiation.
Use in Communication (Examples needed): Different parts of the EM
spectrum are used for various communication technologies:
Radio Waves: (Low frequency, long wavelength) Used for radio
broadcasting, television, wireless communication (Wi-Fi, Bluetooth),
cellular networks.
Microwaves: (Higher frequency than radio) Used for satellite
communication, radar, microwave ovens, cellular networks.
Infrared: Used for remote controls, fiber optic communication (short-
range).
Visible Light: Used in fiber optic communication (long-range).
Computer Network 11
Higher Frequencies (UV, X-ray, Gamma Ray): Generally not used for
communication due to high energy and absorption by atmosphere.
2.2 Guided Transmission Media: Twisted Pair, Coaxial, Fiber
Optics
1. Guided Transmission Media
Definition: Physical links through which signals are guided. The signals are
confined to a solid medium.
2. Twisted Pair Cable
Description (Diagram needed): Consists of two insulated copper wires
twisted together. Twisting reduces electromagnetic interference (crosstalk)
from adjacent pairs.
Types:
UTP (Unshielded Twisted Pair): Most common, no metallic shield. Used
in Ethernet LANs.
STP (Shielded Twisted Pair): Has a metallic shield around the twisted
pairs to further reduce interference. More expensive.
Characteristics: Relatively inexpensive, easy to install, susceptible to noise
over long distances.
Applications: Telephone lines, Ethernet LANs (10Base-T, 100Base-TX,
1000Base-T).
3. Coaxial Cable
Computer Network 12
Description (Diagram needed): Consists of a central copper conductor, an
insulating layer, a braided metal shield, and an outer insulating jacket. The
shield protects the signal from external electromagnetic interference.
Characteristics: Better shielding than twisted pair, higher bandwidth over
longer distances than UTP.
Applications: Cable television (CATV), older Ethernet networks (10Base2,
10Base5).
4. Fiber Optics Cable
Computer Network 13
Description (Diagram needed): Transmits data as pulses of light through a
glass or plastic fiber. Consists of a core (light travels), cladding (reflects
light back to core), and an outer jacket.
Types:
Single-Mode Fiber (SMF): Thin core, allows only one light path, used
for long distances and high bandwidth.
Multi-Mode Fiber (MMF): Thicker core, allows multiple light paths, used
for shorter distances.
Characteristics: Very high bandwidth, long transmission distances,
immune to electromagnetic interference, very secure.
Applications: High-speed backbone networks, long-haul
telecommunications, FTTH (Fiber to the Home).
5. Comparison of Guided Transmission Media
Table:
Computer Network 14
Twisted Pair Cable
Feature Coaxial Cable Fiber Optics Cable
(UTP)
Cost Low Medium High
Up to 10 Gbps Up to 100 Mbps
Speed Terabits per second
(Cat6a) (older standards)
Short (100m for Medium (up to 500m Very Long (tens to
Distance
Ethernet) for Ethernet) hundreds of kilometers)
Moderate
High susceptibility
Interference susceptibility to Immune to EMI/RFI
to EMI/RFI
EMI/RFI
Security Low (easy to tap) Moderate High (difficult to tap)
Difficult (requires
Installation Easy Moderate
specialized tools/skills)
Unit 3: Data Link Layer
3.1 DLL Design Issues (Services, Framing, Error Control, Flow
Control), Error Detection and Correction, Elementary Data Link
Protocols (Stop and Wait, Sliding Window: Go Back N, Selective
Repeat)
1. Data Link Layer (DLL) Design Issues
Services:
Connection-Oriented Service: Establishes a logical connection,
ensures reliable, ordered delivery of frames.
Connectionless Service: No connection setup, sends frames
independently, no guarantees.
Framing (Definition + 2 methods):
Definition: The process of dividing the stream of bits from the network
layer into discrete units called frames for transmission over the physical
medium.
Methods:
Character Count: A field in the header specifies the number of
characters in the frame. (Simple but fragile if count is corrupted).
Computer Network 15
Byte Stuffing (Character Stuffing): Special flag bytes (e.g., 01111110 )
mark the beginning and end of a frame. If the flag byte appears in
the data, an "escape" byte is inserted before it.
Bit Stuffing: Similar to byte stuffing, but at the bit level. A flag
pattern (e.g., 01111110 ) marks frame boundaries. If five consecutive
'1's appear in the data, a '0' bit is "stuffed" after them.
Error Control:
Definition: Mechanisms to detect and/or correct errors that occur
during data transmission due to noise or interference.
Types: Error Detection (identifying errors) and Error Correction (fixing
errors).
Flow Control:
Definition: Mechanisms to prevent a fast sender from overwhelming a
slow receiver by regulating the rate of data transmission.
2. Error Detection and Correction
Error Detection (Explain 2 methods with basic idea):
Parity Check:
Concept: An extra bit (parity bit) is added to a block of data bits to
make the total number of '1's either even (even parity) or odd (odd
parity).
Detection: At the receiver, the parity is checked. If it doesn't match,
an error is detected.
Limitation: Can only detect an odd number of bit errors. Cannot
correct errors.
CRC (Cyclic Redundancy Check):
Concept: A mathematical algorithm that generates a fixed-length
checksum (CRC code) based on the data. Both sender and receiver
use a pre-defined polynomial.
Detection: Sender appends CRC to data. Receiver performs the
same calculation; if the result is non-zero, an error is detected.
Highly effective for detecting burst errors.
Checksum:
Computer Network 16
Concept: Sender sums up all data words (often in 16-bit segments),
complements the sum, and sends it as a checksum.
Detection: Receiver sums all data words and the received
checksum. If the result is all '1's (or zero after complementing), no
error.
Error Correction:
Hamming Code:
Concept: An error-correcting code that adds redundant bits to data
in a specific pattern. These redundant bits allow the receiver to not
only detect errors but also identify the position of the error and
correct it.
Use: Used in memory (RAM) and satellite communication.
3. Elementary Data Link Protocols
Stop-and-Wait Protocol (Diagram needed):
Working: The sender sends one frame and then waits for an
acknowledgment (ACK) from the receiver before sending the next
Computer Network 17
frame. If no ACK is received within a timeout period, the frame is
retransmitted.
Advantages: Simple to implement, ensures reliable delivery, handles
lost frames and ACKs.
Disadvantages: Very inefficient, especially over long distances or high-
latency links, as it wastes time waiting for ACKs. Low throughput.
Sliding Window Protocols (Concept only):
Concept: Improve efficiency by allowing the sender to transmit multiple
frames before waiting for acknowledgments. Both sender and receiver
maintain a "window" of frames that can be sent or received.
Go-Back-N (GBN) (Diagram needed for sender/receiver windows):
Working: The sender maintains a window of N frames that it can send
without waiting for ACKs. If an error occurs (frame lost or corrupted),
Computer Network 18
the receiver discards that frame and all subsequent out-of-order frames,
and sends an ACK for the last correctly received in-order frame. The
sender, upon receiving this ACK, retransmits all frames starting from the
one that was lost/corrupted.
Advantages: More efficient than Stop-and-Wait, simpler receiver logic
than Selective Repeat.
Disadvantages: Inefficient for high error rates, as many frames may be
retransmitted unnecessarily.
Selective Repeat (SR) (Diagram needed for sender/receiver windows):
Working: Both sender and receiver maintain a window. The sender
transmits frames within its window. The receiver accepts and buffers
out-of-order frames. If a frame is lost, only that specific lost frame is
retransmitted by the sender (upon receiving a NAK or timeout).
Advantages: Highly efficient, minimizes retransmissions, good for noisy
channels.
Computer Network 19
Disadvantages: More complex receiver logic (needs buffering and
reordering), more complex sender logic.
Comparison of Stop-and-Wait, GBN, SR:
Feature Stop-and-Wait Go-Back-N (GBN) Selective Repeat (SR)
Efficiency Very Low Moderate High
Sender: 1,
Window Size Sender: N, Receiver: 1 Sender: N, Receiver: N
Receiver: 1
Only the lost Lost frame and all
Retransmission Only the lost frame
frame subsequent frames
Buffering for out-of-
Receiver No buffering No buffering needed
order frames is
Buffering needed for out-of-order frames
required
Complexity Simple Moderate Complex
Throughput Low Moderate High
3.2 Medium Access Control Sublayer, Channel Allocation
Problem, Multiple Access Protocols (Aloha, Carrier Sense
Multiple Access (CSMA/CD))
1. Medium Access Control (MAC) Sublayer
Role: A sublayer of the Data Link Layer. It controls how devices on a shared
network medium gain access to the medium to transmit data. It handles
physical addressing (MAC addresses).
2. Channel Allocation Problem
Definition: How to efficiently share a single broadcast channel among
multiple competing users.
Types:
Static Channel Allocation: Channel is divided into fixed portions (e.g.,
FDM, TDM). Simple, but inefficient if users have varying demands.
Dynamic Channel Allocation: Channel access is managed on demand,
more complex but efficient. This is where MAC protocols come in.
3. Multiple Access Protocols
Definition: Protocols that allow multiple stations to share a single
transmission medium efficiently and fairly.
Computer Network 20
Need: To avoid collisions when multiple stations try to transmit
simultaneously on a shared medium.
4. ALOHA
Concept:
Pure ALOHA:
Working: Stations transmit data whenever they have it. If a collision
occurs (detected by lack of acknowledgment), the station waits a
random amount of time and retransmits.
Throughput: Maximum theoretical throughput is about 18.4%
(G/2e).
Advantages: Very simple.
Disadvantages: High collision rate, very inefficient.
Slotted ALOHA:
Working: Time is divided into discrete slots. Stations can only
transmit at the beginning of a slot. If a collision occurs, they wait a
random number of slots before retransmitting.
Throughput: Maximum theoretical throughput is about 36.8% (1/e).
Advantages: More efficient than Pure ALOHA.
Disadvantages: Still prone to collisions, requires global clock
synchronization.
5. CSMA/CD (Carrier Sense Multiple Access with Collision Detection)
Computer Network 21
Working (Diagram needed for collision detection):
Carrier Sense: Before transmitting, a station "listers" to the medium to
check if it's idle. If busy, it waits.
Multiple Access: Multiple stations can access the medium.
Collision Detection: If two or more stations transmit simultaneously (a
collision occurs), they detect the collision.
Collision Handling: Upon detecting a collision, stations immediately
stop transmitting, send a jamming signal (to ensure all other stations
detect the collision), and then wait a random back-off time before
attempting to retransmit.
Application: Primarily used in wired Ethernet LANs.
6. Comparison of ALOHA and CSMA/CD:
Feature ALOHA CSMA/CD
Sense Carrier No (transmit immediately) Yes (listen before transmitting)
Collision No (detects collision via Yes (detects collision during
Detection absence of ACK) transmission)
Collision Stop transmission, send jamming
Retransmit after random delay
Handling signal, then random back-off
Low (Pure: 18.4%, Slotted: Higher (up to 80-90% in ideal
Efficiency
36.8%) conditions)
Complexity Simple More complex
Computer Network 22
Feature ALOHA CSMA/CD
Early wireless networks,
Application Wired Ethernet LANs
satellite communication
Potential Exam Questions
Here's a breakdown of potential questions you might encounter, categorized by
marks:
2-Mark Questions
Define Computer Network.
List any two network applications.
Give two examples of network software components.
What is a Network Interface Card (NIC)?
Define Network Topology.
List any two types of network topologies.
What is Protocol Hierarchy?
Define Connection-Oriented Service.
Define Connectionless Service.
What is the primary function of the Physical Layer in the OSI model?
List the 7 layers of the OSI model.
List the layers of the TCP/IP model.
What is the Electromagnetic Spectrum?
Define Guided Transmission Media.
What is the main purpose of Error Control in the Data Link Layer?
Define Flow Control.
What is the concept of Sliding Window Protocols?
What is the role of the Medium Access Control (MAC) sublayer?
Define the Channel Allocation Problem.
What is the need for Multiple Access Protocols?
Computer Network 23
5-Mark Questions
Explain any three Network Hardware Components (Interconnection
Networking Devices).
Describe any two Network Topologies with their advantages and
disadvantages. (Diagrams needed)
Explain any three Design Issues for the layers in a network.
Compare Connection-Oriented and Connectionless Services.
Explain the functions of any three layers of the OSI Model.
Explain the functions of any three layers of the TCP/IP Model.
Compare the OSI and TCP/IP Reference Models.
Describe the communication process between layers using Encapsulation
and Decapsulation. (Diagram needed)
Explain the use of the Electromagnetic Spectrum in communication with
examples.
Describe Twisted Pair Cable, Coaxial Cable, and Fiber Optics Cable,
including their characteristics and applications. (Diagrams needed for each
cable type)
Compare any two Guided Transmission Media.
Explain Framing in the Data Link Layer and describe two methods of
framing.
Explain any two Error Detection methods (e.g., Parity Check, CRC,
Checksum).
Describe the working of the Stop-and-Wait Protocol. (Diagram needed)
Explain the working of the Go-Back-N (GBN) protocol. (Diagram needed for
sender/receiver windows)
Explain the working of the Selective Repeat (SR) protocol. (Diagram needed
for sender/receiver windows)
Compare Stop-and-Wait, Go-Back-N, and Selective Repeat protocols.
Explain ALOHA protocol (Pure and Slotted).
Describe the working of CSMA/CD protocol. (Diagram needed for collision
detection)
Computer Network 24
Compare ALOHA and CSMA/CD protocols.
I hope these notes are structured beautifully and are easy to learn and
understand for your Computer Networks test! Good luck!
Computer Network 25