0% found this document useful (0 votes)
2 views28 pages

12. Computer Networks

The document provides an overview of computer networks, detailing concepts such as LAN, WAN, MAN, and wireless networks, along with the OSI and TCP/IP models. It explains the functions and characteristics of various layers in these models, including error control, flow control, and packet switching techniques. Additionally, it covers specific protocols like circuit switching, virtual circuit switching, and various data link layer protocols, emphasizing their roles in data transmission and network communication.

Uploaded by

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

12. Computer Networks

The document provides an overview of computer networks, detailing concepts such as LAN, WAN, MAN, and wireless networks, along with the OSI and TCP/IP models. It explains the functions and characteristics of various layers in these models, including error control, flow control, and packet switching techniques. Additionally, it covers specific protocols like circuit switching, virtual circuit switching, and various data link layer protocols, emphasizing their roles in data transmission and network communication.

Uploaded by

shrinjoyee30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Computer Networks: Detailed Concepts

• Introductory Concepts: LAN, WAN, MAN, Wireless network, OSI model,


TCP/IP model.

1.​ LAN (Local Area Network)​

○​ Definition: A computer network that interconnects computers within a limited


area such as a residence, school, laboratory, university campus, or office
building.
○​ Scope: Typically covers a single building or a small group of buildings.
○​ Ownership: Usually privately owned.
○​ Data Rates: Offers high data transfer rates (e.g., 100 Mbps, 1 Gbps, 10 Gbps
and higher).
○​ Technologies: Primarily uses Ethernet (wired) and Wi-Fi (wireless).
○​ Purpose: Resource sharing (files, printers), communication among local
users, and providing Internet access to local devices.
○​ Examples: Home networks, office networks, campus networks.
2.​ WAN (Wide Area Network)​

○​ Definition: A telecommunications network that extends over a large


geographical distance, connecting multiple LANs together.
○​ Scope: Can span across cities, countries, or even continents.
○​ Ownership: Often publicly owned or shared, utilizing services from
telecommunication carriers (ISPs).
○​ Data Rates: Generally lower data rates than LANs, but improving rapidly
(e.g., DSL, Cable, Fiber Optics).
○​ Technologies: Uses various technologies like leased lines, MPLS, fiber
optics, satellite links.
○​ Purpose: Connects geographically dispersed offices, facilitates global
communication, and provides backbone for the Internet.
○​ Examples: The Internet itself, corporate networks connecting branches in
different cities.
3.​ MAN (Metropolitan Area Network)​

○​ Definition: A computer network that interconnects users with computer


resources in a geographic area or region larger than a local area network
(LAN) but smaller than a wide area network (WAN).
○​ Scope: Typically covers a city or a large campus.
○​ Ownership: Can be privately or publicly owned, often by a municipality or a
large corporation.
○​ Data Rates: Generally provides moderate to high data rates, often optimized
for specific city-wide services.
○​ Technologies: May use fiber optics, wireless technologies (e.g., WiMAX), or
a combination.
○​ Purpose: Connects multiple LANs within a city, provides high-speed
connectivity to city institutions, and supports urban services.
○​ Examples: City-wide surveillance systems, university campus networks
connecting different campuses within a city, metropolitan broadband
networks.
4.​ Wireless Network​

○​ Definition: A computer network that uses wireless data connections between


network nodes, instead of wired connections.
○​ Connectivity: Devices communicate over electromagnetic waves (radio
waves, microwaves, infrared).
○​ Types:
■​ WLAN (Wireless LAN): Commonly known as Wi-Fi, using IEEE
802.11 standards.
■​ WPAN (Wireless Personal Area Network): Bluetooth, Zigbee
(short-range).
■​ WWAN (Wireless WAN): Cellular networks (3G, 4G, 5G), satellite
internet.
■​ WMAN (Wireless MAN): WiMAX.
○​ Advantages: Mobility, ease of installation, scalability, flexibility.
○​ Disadvantages: Security concerns (eavesdropping), lower speed/range
compared to wired, interference, susceptibility to environmental factors.
○​ Components: Access Points (APs), wireless adapters/NICs, antennas.
5.​ OSI Model (Open Systems Interconnection Model)​

○​ Definition: A conceptual framework used to understand and standardize the


functions of a telecommunication or computing system without regard to its
underlying internal technology and particular protocols. It was developed by
the International Organization for Standardization (ISO).
○​ Layers: It consists of seven distinct layers, each performing a specific
function.
■​ 1. Physical Layer: Deals with the physical transmission of raw bit
streams over a communication medium.
■​ Functions: Defines physical characteristics of hardware
(cables, connectors), voltage levels, data rates,
synchronization of bits.
■​ Units: Bits.
■​ Examples: Ethernet cables (Cat5, Cat6), Fiber optics, USB,
DSL, hubs, repeaters.
■​ 2. Data Link Layer: Provides reliable transfer of data across the
physical link.
■​ Functions: Framing (dividing data into frames), error control
(detection and correction of errors within frames), flow control
(managing data rate between sender/receiver), physical
addressing (MAC addresses).
■​ Units: Frames.
■​ Examples: Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11), PPP,
bridges, switches.
■​ 3. Network Layer: Responsible for logical addressing (IP addresses)
and routing data packets across different networks.
■​ Functions: Logical addressing, routing (determining the best
path for data), congestion control, internetworking.
■​ Units: Packets.
■​ Examples: IP (Internet Protocol), ICMP, routers.
■​ 4. Transport Layer: Provides end-to-end communication between
processes on different hosts.
■​ Functions: Segmentation/reassembly, connection
management (connection-oriented/connectionless), flow
control (end-to-end), congestion control, port addressing.
■​ Units: Segments (TCP) / Datagrams (UDP).
■​ Examples: TCP (Transmission Control Protocol), UDP (User
Datagram Protocol).
■​ 5. Session Layer: Manages communication sessions between
applications.
■​ Functions: Establishing, managing, and terminating sessions;
synchronization; dialog control (who sends/receives when).
■​ Units: Data.
■​ Examples: NetBIOS, RPC (Remote Procedure Call).
■​ 6. Presentation Layer: Translates data between the application layer
and the network format.
■​ Functions: Data format translation (e.g., ASCII to EBCDIC),
encryption/decryption, compression/decompression. Ensures
data is readable by the receiving application.
■​ Units: Data.
■​ Examples: JPEG, MPEG, ASCII, TLS/SSL (partially).
■​ 7. Application Layer: Provides network services to end-user
applications.
■​ Functions: User interface, network transparency,
authentication, and specific application functions.
■​ Units: Data.
■​ Examples: HTTP, FTP, SMTP, DNS, SSH, Telnet.
○​ Key Concept: Each layer relies on the services of the layer below it and
provides services to the layer above it.
6.​ TCP/IP Model (Transmission Control Protocol/Internet Protocol Model)​

○​ Definition: A practical, four-layer reference model used for Internet-based


communication, developed by the U.S. Department of Defense. It is the
foundation of the Internet.
○​ Layers: It consolidates some OSI layers into broader categories.
■​ 1. Network Access Layer (Host-to-Network Layer): Combines
OSI's Physical and Data Link layers.
■​ Functions: Deals with the physical aspects of sending data
over a network link, including hardware addressing, framing,
and error detection.
■​ Examples: Ethernet, Wi-Fi, PPP.
■​ 2. Internet Layer (Network Layer): Corresponds directly to OSI's
Network Layer.
■​ Functions: Responsible for logical addressing (IP addresses)
and routing packets across multiple networks.
■​ Examples: IP (Internet Protocol), ICMP, ARP.
■​ 3. Transport Layer: Corresponds directly to OSI's Transport Layer.
■​ Functions: Provides end-to-end communication services for
applications, including reliable (TCP) and unreliable (UDP)
data transfer, flow control, and congestion control.
■​ Examples: TCP, UDP.
■​ 4. Application Layer: Combines OSI's Session, Presentation, and
Application layers.
■​ Functions: Provides high-level protocols for specific
application functions and user services.
■​ Examples: HTTP, FTP, SMTP, DNS, Telnet, SSH.
○​ Key Differences from OSI:
■​ Fewer layers.
■​ More practical and widely implemented.
■​ Combines session/presentation/application into one.
■​ Combines physical/data link into one.
■​ TCP/IP is protocol-oriented, OSI is service-oriented.

• Physical Layer: Circuit switching, Virtual Circuit Switching. Packet.

1.​ Circuit Switching​

○​ Concept: A dedicated communication path (circuit) is established between


two communicating parties for the entire duration of the communication.
○​ Phases:
■​ Connection Setup: A dedicated path is reserved. Resources
(bandwidth, buffers) are allocated.
■​ Data Transfer: Data flows continuously over the established circuit.
■​ Connection Teardown: The dedicated path is released, and
resources are deallocated.
○​ Characteristics:
■​ Dedicated Bandwidth: Once established, bandwidth is guaranteed
for the duration.
■​ Constant Delay: Data experiences consistent delay after setup.
■​ No Congestion: Resources are reserved, preventing congestion on
the circuit itself.
■​ Call Setup Time: There's a delay for setting up the connection.
■​ Inefficient for Bursty Data: Resources are idle during silent periods,
leading to wasted bandwidth.
○​ Examples: Traditional telephone networks (POTS).
2.​ Virtual Circuit Switching​

○​ Concept: A connection-oriented packet-switching approach where a logical


path (virtual circuit) is established for a communication session. Packets
related to a virtual circuit follow the same path, but the path is not exclusively
reserved.
○​ Phases: Similar to circuit switching with setup, data transfer, and teardown.
○​ Characteristics:
■​ Logical Connection: Not a physically dedicated path; multiple virtual
circuits can share physical links.
■​ Packet-switched: Data is divided into packets.
■​ Sequenced Packets: Packets arrive in order because they follow the
same path.
■​ No Dedicated Bandwidth: Bandwidth is shared dynamically among
virtual circuits.
■​ Less Overhead than Datagram: Each packet doesn't need full
address information (only virtual circuit identifier).
■​ More Efficient for Bursty Data: Resources are used more efficiently
than circuit switching.
○​ Examples: Frame Relay, X.25, MPLS.
3.​ Packet (in the context of Packet Switching)​

○​ Definition: A block of data that is transmitted over a network. In


packet-switched networks (like the Internet), messages are broken down into
smaller, manageable units called packets.
○​ Structure: Each packet typically contains:
■​ Header: Contains control information like source/destination
addresses (IP addresses), packet length, sequence number, protocol
type, etc.
■​ Payload (Data): The actual user data.
■​ Trailer (Footer): Often contains error detection codes (e.g., CRC).
○​ Characteristics of Packet Switching:
■​ No Dedicated Path: Packets are routed independently; different
packets from the same message might take different paths.
■​ Store-and-Forward: Routers store an incoming packet and then
forward it.
■​ Efficient Bandwidth Usage: Shared resources, suitable for bursty
traffic.
■​ Congestion: Can experience variable delays and congestion due to
shared resources.
■​ Out-of-Order Delivery: Packets might arrive out of order, requiring
reassembly at the destination.
○​ Contrast with Circuit Switching: Packet switching is more flexible and
efficient for variable data traffic, while circuit switching provides guaranteed
quality for continuous data.

• Data Link Layer: Framing, Error control, Flow control, Error detection
and correction, Simplex protocol, Sliding Window protocols, go-back-N,
A protocol using selective repeat.
1.​ Framing​

○​ Purpose: To divide the stream of bits from the network layer into manageable
units called "frames" for transmission over the physical link. Frames allow the
receiver to identify the beginning and end of a message.
○​ Methods:
■​ Character Counting: Header specifies the number of characters in
the frame. (Less robust, susceptible to errors in the count).
■​ Byte Stuffing (Character Stuffing): Special flag bytes mark the start
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 uses a bit pattern (e.g.,
01111110). If five consecutive 1s appear in the data, a 0 is "stuffed"
after them.
■​ Physical Layer Coding Violations: Uses specific encoding schemes
(e.g., Manchester encoding) where a unique sequence not
representing data bits indicates frame boundaries.
2.​ Error Control​

○​ Purpose: To ensure reliable transmission of data across the data link, by


detecting and correcting errors that occur due to noise or interference on the
physical medium.
○​ Mechanism: Involves adding redundant information (checksums, parity bits,
etc.) to the data before transmission. The receiver uses this redundancy to
check for errors.
○​ Types: Error Detection and Error Correction.
3.​ Flow Control​

○​ Purpose: To manage the rate of data transmission between a sender and a


receiver to prevent a fast sender from overwhelming a slow receiver.
○​ Mechanism: Ensures that the sender transmits data only at a rate that the
receiver can process and store.
○​ Methods:
■​ Stop-and-Wait: Simplest form. Sender sends one frame, waits for an
acknowledgment (ACK), then sends the next. Inefficient for
high-latency links.
■​ Sliding Window Protocols: Allow the sender to transmit multiple
frames before waiting for ACKs, improving efficiency.
4.​ Error Detection and Correction​

○​ Error Detection:
■​ Concept: Adding redundant bits to data (checksums, parity bits) so
that the receiver can detect if data has been corrupted during
transmission.
■​ Methods:
■​ Parity Check (Simple Parity): Adds one bit to make the total
number of 1s either even or odd. Detects single-bit errors.
■​ Checksum: Sums up the data bits and appends the sum (or
its complement) to the data. Detects various errors but not
highly robust.
■​ Cyclic Redundancy Check (CRC): Divides data by a
predetermined binary polynomial and uses the remainder as
the CRC code. Highly effective for detecting burst errors.
○​ Error Correction:
■​ Concept: Not only detects errors but also determines the original,
uncorrupted data, allowing recovery without retransmission.
■​ Methods:
■​ Forward Error Correction (FEC): Uses highly redundant
codes (e.g., Hamming codes, Reed-Solomon codes) to allow
the receiver to deduce the original data even with errors. More
complex and adds more overhead.
■​ Automatic Repeat Request (ARQ): Combines error detection
with retransmission. If an error is detected, the receiver
requests the sender to retransmit the corrupted frame. This is
more common in data link layer.
5.​ Simplex Protocol (or Unidirectional Protocol)​

○​ Description: A very basic data link layer protocol where data flows in only
one direction (sender to receiver).
○​ Characteristics:
■​ No acknowledgments (ACKs) or retransmissions.
■​ No flow control.
■​ No error control.
○​ Use Case: Only suitable for perfectly reliable, error-free, and infinite-capacity
channels, which do not exist in reality. It's primarily a theoretical starting point
to understand more complex protocols.
6.​ Sliding Window Protocols​

○​ Concept: A class of data link layer protocols that allow a sender to transmit
multiple frames (a "window" of frames) before receiving an acknowledgment.
This significantly improves efficiency, especially over links with high latency.
○​ Key Components:
■​ Send Window: A range of sequence numbers that the sender is
permitted to transmit.
■​ Receive Window: A range of sequence numbers that the receiver is
permitted to accept.
■​ Acknowledgments (ACKs): Used by the receiver to inform the
sender which frames have been successfully received.
■​ Timers: Used by the sender to detect lost frames or ACKs.
○​ Benefits: Increased throughput compared to Stop-and-Wait.
7.​ Go-Back-N (GBN) Protocol​

○​ Type: A sliding window protocol with cumulative acknowledgments.


○​ Sender Behavior:
■​ Maintains a send window of size N.
■​ Sends frames up to N frames without waiting for individual ACKs.
■​ If an ACK for frame k is received, it implies that all frames up to k have
been received.
■​ If a timer expires for a sent frame (indicating a lost frame or ACK), the
sender retransmits that frame and all subsequent frames within its
current window (hence "Go-Back-N").
○​ Receiver Behavior:
■​ Maintains a receive window of size 1.
■​ Only accepts frames in sequential order.
■​ If it receives frame k correctly and is expecting k, it sends an ACK for
k.
■​ If it receives a frame out of order or a corrupted frame, it discards it
and continues sending ACKs for the last correctly received in-order
frame.
○​ Disadvantage: Inefficient in noisy channels because a single lost frame leads
to retransmission of many frames.
8.​ A Protocol using Selective Repeat (SR Protocol)​

○​ Type: A sliding window protocol that retransmits only corrupted or lost frames.
○​ Sender Behavior:
■​ Maintains a send window of size N.
■​ Sends frames up to N frames.
■​ Sets a timer for each unacknowledged frame.
■​ Receives individual ACKs for each frame.
■​ If a timer expires for frame k, only frame k is retransmitted.
○​ Receiver Behavior:
■​ Maintains a receive window of size N (or typically N/2 for efficiency).
■​ Accepts frames out of order if they fall within its receive window.
■​ Buffers out-of-order frames until the missing frames are received.
■​ Sends individual ACKs for each correctly received frame, whether in
order or out of order.
■​ Once a sequence of frames becomes contiguous (e.g., missing frame
k arrives), it delivers the entire contiguous block to the network layer.
○​ Advantage: Much more efficient than GBN in noisy channels as it minimizes
retransmissions.
○​ Disadvantage: Requires more complex buffering and logic at both the sender
and receiver.

• Medium Access Sublayer: ALOHA, CSMA Protocols, Wireless


protocols, Collision free protocols.

This section seems to have a typo, "WDMA" should likely be "CSMA" or


"TDMA/FDMA/CDMA" or similar. I'll cover CSMA and common wireless protocols as well as
general collision-free concepts.

1.​ Medium Access Control (MAC) Sublayer​


○​ Purpose: When multiple devices share a single physical transmission
medium (e.g., a shared cable, airwaves), the MAC sublayer determines which
device gets to transmit data at a given time to avoid collisions (when two or
more devices transmit simultaneously).
○​ Key Challenge: Managing shared access to a broadcast channel.
2.​ ALOHA​

○​ Concept: A simple, decentralized random access protocol. Devices transmit


whenever they have data to send, without checking if the channel is busy.
○​ Types:
■​ Pure ALOHA: Transmits immediately. If an acknowledgment (ACK) is
not received within a timeout period, it retransmits after a random
backoff time.
■​ Vulnerable Period: Twice the frame transmission time (if
another frame starts within one frame time before or after,
collision occurs).
■​ Throughput: Max 18% (G = 0.5)
■​ Slotted ALOHA: Divides time into discrete slots. Devices can only
transmit at the beginning of a slot.
■​ Vulnerable Period: One frame transmission time.
■​ Throughput: Max 36% (G = 1.0)
○​ Characteristics: Simple to implement, but very inefficient due to high
collision rates, especially under heavy load. No collision avoidance, only
collision detection (via ACK timeout).
3.​ CSMA Protocols (Carrier Sense Multiple Access)​

○​ Concept: An improvement over ALOHA where devices "sense" the carrier


(listen to the channel) before transmitting to try and avoid collisions.
○​ Types:
■​ 1-persistent CSMA: If the channel is idle, transmit. If busy,
continuously listen until idle, then transmit with probability 1. (High
collision probability when multiple nodes are waiting).
■​ Non-persistent CSMA: If the channel is idle, transmit. If busy, wait a
random amount of time, then sense again. (Reduces collisions, but
increases delay).
■​ p-persistent CSMA: (For slotted channels). If idle, transmit with
probability p. With probability (1−p), defer to the next slot. If busy, wait
until next slot and repeat. (Balances delay and collisions).
■​ CSMA/CD (Collision Detection): Used in wired Ethernet.
■​ Mechanism: Sense before transmit. If a collision is detected
during transmission, stop transmitting, send a jamming signal,
then wait a random backoff time before reattempting.
■​ Benefit: Reduces wasted bandwidth by aborting colliding
transmissions quickly.
■​ Limitation: Difficult to implement in wireless networks due to
"hidden terminal" and "exposed terminal" problems.
■​ CSMA/CA (Collision Avoidance): Used in wireless networks (Wi-Fi).
■​ Mechanism: Cannot reliably detect collisions, so tries to avoid
them.
■​ Methods:
■​ Carrier Sense: Listen before transmitting.
■​ Network Allocation Vector (NAV): Uses RTS/CTS
(Request To Send / Clear To Send) handshake. Sender
sends RTS, receiver responds with CTS, which
implicitly tells other nodes to defer.
■​ Acknowledgement (ACK): Receiver sends ACK upon
successful reception. If no ACK, assume collision and
retransmit after backoff.
■​ Interframe Spacing (IFS): Different waiting times
before transmission based on frame priority.
■​ Benefit: Better performance in wireless environments where
collision detection is hard.
4.​ Wireless Protocols (Commonly refer to MAC protocols in WLANs)​

○​ IEEE 802.11 (Wi-Fi): The most common standard for Wireless LANs.
■​ Core MAC Protocol: CSMA/CA.
■​ Operational Modes: Infrastructure mode (with Access Points),
Ad-hoc mode (direct device-to-device).
■​ Frame Types: Data frames, Control frames (RTS, CTS, ACK),
Management frames (beacons, association requests).
■​ Hidden Terminal Problem: Two stations are out of range of each
other but both within range of a central access point. They can't hear
each other, leading to collisions at the AP. CSMA/CA with RTS/CTS
helps mitigate this.
■​ Exposed Terminal Problem: A station wants to transmit but hears
another station transmitting, even though the receiver of its intended
transmission is not within range of the interfering transmitter. This
leads to unnecessary deferral.
5.​ Collision-Free Protocols (Controlled Access Protocols)​

○​ Concept: Protocols that aim to completely avoid collisions by coordinating


access to the shared medium. More complex to implement but offer
predictable performance, especially under heavy load.
○​ Types:
■​ Polling: A master station controls access. It polls each slave station in
turn, granting permission to transmit.
■​ Pros: No collisions, predictable.
■​ Cons: Single point of failure (master), polling overhead,
latency if a station has no data.
■​ Token Passing: A special control packet called a "token" circulates
among stations in a logical ring. Only the station holding the token can
transmit.
■​ Pros: Fair access, no collisions.
■​ Cons: Complexity, token management overhead, single point
of failure if token is lost/duplicated.
■​ Examples: Token Ring (obsolete), Token Bus.
■​ TDMA (Time Division Multiple Access): Divides time into slots, and
each station is allocated a specific, non-overlapping time slot to
transmit.
■​ Pros: No collisions, efficient for continuous traffic.
■​ Cons: Requires precise synchronization, wasted slots if a
station has no data.
■​ FDMA (Frequency Division Multiple Access): Divides the available
bandwidth into distinct frequency bands, and each station transmits on
its own allocated frequency.
■​ Pros: Simultaneous transmissions, no collisions.
■​ Cons: Requires careful frequency planning, inefficient if a
station doesn't use its full bandwidth.
■​ CDMA (Code Division Multiple Access): Allows multiple stations to
transmit simultaneously over the same frequency band by using
unique spreading codes for each station.
■​ Pros: High capacity, robust against interference.
■​ Cons: Complex to implement, "near-far" problem.

• Network Layer: Routing algorithms, Congestion Control Algorithms,


Internetworking.

1.​ Routing Algorithms​

○​ Purpose: To determine the optimal (or a good) path for data packets to travel
from a source host to a destination host across a network of interconnected
routers.
○​ Goal: Minimize metrics like hop count, delay, bandwidth, cost, etc.
○​ Types:
■​ Static Routing:
■​ Concept: Routes are manually configured by a network
administrator and remain fixed unless manually changed.
■​ Characteristics: Simple for small, stable networks. No
overhead for routing updates. Not adaptive to network changes
(failures, congestion).
■​ Dynamic Routing (Adaptive Routing):
■​ Concept: Routers use routing protocols to automatically
discover and update routes based on real-time network
conditions.
■​ Characteristics: Adaptive to network changes. More complex
to configure and manage. Introduces routing overhead.
■​ Categories:
■​ Distance Vector Routing:
■​ Concept: Each router maintains a "distance
vector" (table) to all known destinations, sharing
it with its directly connected neighbors.
Neighbors then update their tables based on the
received vectors.
■​ Examples: RIP (Routing Information Protocol).
■​ Issues: "Count-to-infinity" problem, slow
convergence.
■​ Link State Routing:
■​ Concept: Each router gathers information about
its directly connected links and their costs (link
states). It then broadcasts this information to all
other routers in the network. Each router
independently builds a complete map of the
network (graph) and runs an algorithm (e.g.,
Dijkstra's algorithm) to calculate the shortest
path to all destinations.
■​ Examples: OSPF (Open Shortest Path First),
IS-IS (Intermediate System to Intermediate
System).
■​ Benefits: Faster convergence, less prone to
loops.
■​ Disadvantages: More complex to implement,
requires more computational resources.
2.​ Congestion Control Algorithms​

○​ Purpose: To prevent the network from becoming overloaded when traffic


demand exceeds available network capacity, which can lead to increased
delay, packet loss, and reduced throughput (congestion collapse).
○​ Mechanism: Involves strategies to slow down senders or manage traffic
when congestion is detected or anticipated.
○​ Techniques:
■​ Open Loop Control:
■​ Concept: Mechanisms implemented before congestion
occurs, aiming to prevent it. They do not rely on feedback from
the network.
■​ Examples: Retransmission policies, window policies,
acknowledgment policies, admission control (preventing new
connections), routing algorithms that avoid congested paths.
■​ Closed Loop Control:
■​ Concept: Mechanisms that react to feedback from the network
about existing congestion.
■​ Examples:
■​ Backpressure: Downstream congested nodes notify
upstream nodes to slow down traffic.
■​ Choke Packets: Routers send ICMP "Source Quench"
messages to slow down senders.
■​ Implicit Signaling (TCP Congestion Control): TCP
infers congestion from packet loss (timeouts or
duplicate ACKs) and reduces its sending rate. (See
TCP Congestion Control below).
■​ Explicit Congestion Notification (ECN): Routers
mark packets to explicitly signal incipient congestion to
endpoints without dropping packets.
3.​ Internetworking​

○​ Definition: The process of connecting multiple heterogeneous networks


(LANs, WANs, etc.) to form a larger, interconnected system (an "internet").
○​ Key Devices: Routers are the primary devices that perform internetworking
by connecting different networks and forwarding packets between them.
○​ Protocols: IP (Internet Protocol) is the fundamental protocol for
internetworking, providing a universal addressing scheme and packet
forwarding mechanism.
○​ Challenges:
■​ Heterogeneity: Different networks may have different addressing
schemes, frame formats, and maximum transmission unit (MTU)
sizes.
■​ Addressing: IP addresses provide a global, unique addressing
scheme that works across different networks.
■​ Fragmentation: Routers may need to fragment (break down) large
packets into smaller ones if the MTU of the next network is smaller.
Reassembly occurs at the destination.
■​ Routing: Routers use routing algorithms to find paths across the
interconnected networks.
■​ Congestion: Managing traffic flow across disparate networks.

• Transport Layer: Flow & Congestion Control, TCP, UDP.

1.​ Transport Layer Flow Control​

○​ Purpose: To prevent an application process (sender) from overflowing the


receive buffer of another application process (receiver) on a different host.
This is end-to-end (process-to-process) flow control, distinct from data link
layer flow control (node-to-node).
○​ Mechanism (TCP):
■​ Sliding Window (Receive Window): The receiver advertises its
available buffer space (receive window size) to the sender in its
acknowledgments.
■​ Sender Adjustment: The sender adjusts its sending window size
based on the advertised receive window. It will not send more data
than the receiver can buffer.
■​ Dynamic Sizing: The receive window can shrink or grow dynamically
as the receiver processes data or its buffer fills/empties.
○​ Goal: To match the sending rate of the application to the receiving rate of the
application.
2.​ Transport Layer Congestion Control​

○​ Purpose: To prevent the entire network (not just the end hosts) from
becoming congested by excessive traffic.
○​ Mechanism (TCP): TCP uses an end-to-end approach, inferring network
congestion and reacting to it. It doesn't rely on explicit signals from
intermediate routers (though ECN helps).
○​ Key Algorithms/Phases (TCP):
■​ Congestion Window (cwnd): A sender-side variable that limits the
amount of data a TCP sender can have in flight (unacknowledged) at
any given time.
■​ Slow Start:
■​ Concept: Starts with a small cwnd (e.g., 1 or 2 segments).
■​ Growth: cwnd increases exponentially (e.g., doubles for every
ACK received) until it reaches ssthresh (slow start
threshold).
■​ Purpose: To quickly probe the network capacity.
■​ Congestion Avoidance:
■​ Concept: After cwnd reaches ssthresh, growth becomes
linear.
■​ Growth: cwnd increases by 1 segment for every Round Trip
Time (RTT).
■​ Purpose: To probe for more bandwidth cautiously, avoiding
congestion.
■​ Fast Retransmit:
■​ Concept: If the sender receives three duplicate ACKs for a
segment, it assumes that segment is lost (without waiting for a
timeout) and immediately retransmits the missing segment.
■​ Purpose: To recover from single packet losses quickly without
entering slow start.
■​ Fast Recovery:
■​ Concept: After Fast Retransmit, ssthresh is set to half of the
current cwnd, and cwnd is set to ssthresh plus three
segments. Then, cwnd continues to grow linearly.
■​ Purpose: To recover from packet loss gracefully, avoiding the
full slow start phase, assuming the loss was not due to severe
congestion.
■​ Timeout: If a timeout occurs (no ACK for a segment for a long time),
it's a strong indication of severe congestion. ssthresh is set to half
cwnd, and cwnd is reset to 1 (re-enters slow start).
○​ Goal: To optimize network utilization and prevent congestion collapse by
dynamically adjusting the sending rate based on network conditions.
3.​ TCP (Transmission Control Protocol)​

○​ Type: Connection-oriented, reliable, byte-stream protocol.


○​ Characteristics:
■​ Connection-Oriented: Establishes a logical connection (three-way
handshake: SYN, SYN-ACK, ACK) before data transfer, and
terminates it (FIN, FIN-ACK).
■​ Reliable:
■​ Sequence Numbers: Orders segments and detects missing
segments.
■​ Acknowledgments (ACKs): Receiver confirms receipt of
data.
■​ Retransmission: Sender retransmits lost segments (via
timeouts or duplicate ACKs).
■​ Checksums: Detects errors in segments.
■​ Flow Control: Uses a sliding window mechanism (receive window) to
prevent receiver buffer overflow.
■​ Congestion Control: Uses algorithms (Slow Start, Congestion
Avoidance, Fast Retransmit, Fast Recovery) to adapt to network
congestion.
■​ Byte-Stream: Treats data as a continuous stream of bytes, not
discrete messages. Applications write/read bytes, TCP handles
segmentation.
■​ Full-Duplex: Data can flow in both directions simultaneously.
■​ Multiplexing: Uses port numbers to allow multiple applications on a
single host to share the same network connection.
○​ Use Cases: Web Browse (HTTP), email (SMTP, POP3, IMAP), file transfer
(FTP), secure shell (SSH), streaming (reliable aspects).
4.​ UDP (User Datagram Protocol)​

○​ Type: Connectionless, unreliable datagram protocol.


○​ Characteristics:
■​ Connectionless: No connection establishment or termination. Each
datagram is independent.
■​ Unreliable:
■​ No sequence numbers.
■​ No acknowledgments.
■​ No retransmission.
■​ No flow control.
■​ No congestion control.
■​ Only a checksum for basic error detection (optional).
■​ Fast and Lightweight: Less overhead than TCP.
■​ Datagram-Oriented: Preserves message boundaries (applications
write/read discrete messages).
■​ Multiplexing: Uses port numbers.
○​ Use Cases:
■​ Applications where speed is more critical than reliability (e.g., real-time
streaming media, online gaming, VoIP).
■​ Applications that implement their own reliability mechanisms at the
application layer.
■​ DNS (Domain Name System), DHCP, SNMP.
○​ Why use UDP? When low latency is paramount, or when the application
handles reliability itself.

• Session, Presentation and Application Layer: Remote procedure call.


This section seems to group the Session and Presentation Layers with the Application Layer
and specifically highlights Remote Procedure Call.

1.​ Session Layer (OSI Layer 5)​

○​ Purpose: Establishes, manages, and terminates communication sessions


between applications. It provides services for dialog control and
synchronization.
○​ Functions:
■​ Dialog Control: Determines whose turn it is to transmit (full-duplex or
half-duplex).
■​ Synchronization: Inserts synchronization points (checkpoints) into
the data stream. If a failure occurs, the session can be resumed from
the last checkpoint, avoiding retransmitting all data from the
beginning.
■​ Session Management: Opening and closing of sessions, maintaining
the session state.
○​ Examples: NetBIOS, RPC (though RPC spans multiple layers, its
session-management aspects are relevant here), SQL.
○​ Note: In the TCP/IP model, these functions are often handled by the
Application Layer itself or within TCP.
2.​ Presentation Layer (OSI Layer 6)​

○​ Purpose: Translates data between the format required by the application


layer and the format required for network transmission. It ensures that data is
readable by the receiving application.
○​ Functions:
■​ Data Translation/Formatting: Handles character code conversion
(e.g., ASCII to EBCDIC), integer/floating-point representation
differences, byte ordering.
■​ Encryption/Decryption: Provides cryptographic services.
■​ Compression/Decompression: Reduces the amount of data to be
transferred.
○​ Examples: JPEG, MPEG, ASCII, EBCDIC, TLS/SSL (often seen as a
sublayer here).
○​ Note: In the TCP/IP model, these functions are typically absorbed into the
Application Layer.
3.​ Remote Procedure Call (RPC)​

○​ Concept: An interprocess communication (IPC) mechanism that allows a


program to cause a procedure (or subroutine) to execute in a different
address space (e.g., on a different computer on a shared network) without the
programmer explicitly coding the remote interaction.
○​ Analogy: It makes a remote call look and behave like a local procedure call.
○​ How it works:
■​ Client Stub: At the client side, the application calls a local "stub"
procedure.
■​ Parameter Marshalling: The stub "marshals" (packages) the
procedure name and parameters into a network-ready format.
■​ Network Transmission: The stub sends the marshaled data over the
network to the server.
■​ Server Stub: At the server side, a "server stub" receives the request,
"unmarshals" the parameters.
■​ Procedure Execution: The server stub calls the actual remote
procedure on the server.
■​ Return Value: The remote procedure executes and returns its result
to the server stub.
■​ Result Marshalling: The server stub marshals the result and sends it
back to the client stub.
■​ Client Unmarshalling: The client stub unmarshals the result and
returns it to the client application.
○​ Relevance to OSI/TCP-IP:
■​ Session Layer: RPC often has its own mechanisms for session
management, request-response handling, and error handling, which
aligns with Session layer functions.
■​ Presentation Layer: RPC handles data representation and
conversion (marshalling/unmarshalling) to ensure compatibility
between heterogeneous systems, which aligns with Presentation layer
functions.
■​ Application Layer: RPC provides a service to applications to invoke
remote functions.
○​ Benefits: Simplifies distributed programming, hides network complexities
from the developer.
○​ Examples: DCE/RPC, Sun RPC, gRPC (modern implementation).

• Presentation & Application Layer: DNS, SMTP, HTTP, FTP, Email.

This section covers specific Application Layer protocols and a re-mention of the Presentation
Layer.

1.​ DNS (Domain Name System)​

○​ Purpose: A hierarchical and decentralized naming system for computers,


services, or any resource connected to the Internet or a private network. It
translates human-readable domain names (e.g., www.example.com) into
machine-readable IP addresses (e.g., 192.0.2.1).
○​ Analogy: The "phonebook" of the Internet.
○​ How it works:
■​ When a user types a domain name, the client's DNS resolver queries
a local DNS server.
■​ If the local server doesn't have the IP address, it queries root servers,
then TLD (Top-Level Domain) servers (e.g., .com, .org), and finally
authoritative name servers for the specific domain until the IP address
is found.
■​ The IP address is returned to the client, allowing connection to the
target server.
○​ Protocol: Primarily uses UDP port 53 for queries (for speed) and TCP port 53
for zone transfers (for reliability).
○​ Importance: Essential for the functioning of the Internet, as humans
remember names, but computers need IP addresses to communicate.
2.​ SMTP (Simple Mail Transfer Protocol)​

○​ Purpose: The standard protocol for sending email across the Internet. It
defines the mechanism for sending emails from a mail client to a mail server,
and between mail servers.
○​ Client-Server Interaction: Mail client (e.g., Outlook, Gmail web interface)
sends an email to its designated SMTP server. The SMTP server then relays
the email, potentially through other SMTP servers, until it reaches the
recipient's mail server.
○​ Protocol: Uses TCP port 25 (for server-to-server and client-to-server without
authentication) or TCP port 587 (for client-to-server with authentication, often
referred to as Submission port).
○​ Limitations: SMTP is only for sending emails. Other protocols (POP3, IMAP)
are used for retrieving emails.
3.​ HTTP (Hypertext Transfer Protocol)​

○​ Purpose: The foundation of the World Wide Web, used for retrieving
resources (e.g., HTML documents, images, videos) from web servers to web
browsers.
○​ Client-Server Model: Web browser (client) sends an HTTP request to a web
server. The web server processes the request and sends back an HTTP
response containing the requested resource.
○​ Protocol: Uses TCP port 80 (HTTP) or TCP port 443 (HTTPS - HTTP
Secure, with TLS/SSL encryption).
○​ Characteristics:
■​ Stateless: Each request from a client to a server is treated as an
independent transaction; the server does not retain information about
previous requests. Cookies are used to maintain state.
■​ Request/Response Model: Client initiates request, server responds.
○​ Methods: Common HTTP methods include GET (retrieve data), POST
(submit data), PUT (update resource), DELETE (delete resource).
4.​ FTP (File Transfer Protocol)​

○​ Purpose: A standard network protocol used for transferring files between a


client and a server on a computer network.
○​ Client-Server Model: An FTP client connects to an FTP server to upload or
download files.
○​ Protocol: Uses two TCP connections:
■​ Control Connection: TCP port 21. Used for commands (e.g., LIST,
GET, PUT, DELETE), authentication, and session management. This
connection remains open during the session.
■​ Data Connection: TCP port 20 (active mode) or a random high port
(passive mode). Used for the actual transfer of file data. This
connection is opened and closed for each file transfer.
○​ Modes:
■​ Active Mode: Client opens a port for the server to connect back to.
Can be problematic with firewalls.
■​ Passive Mode: Server opens a port for the client to connect to for
data transfer, simplifying firewall traversal.
○​ Security: FTP itself is not secure as credentials and data are sent in
plaintext. SFTP (SSH File Transfer Protocol) or FTPS (FTP Secure over
SSL/TLS) are used for secure transfers.
5.​ Email (Electronic Mail)​

○​ Concept: A system for exchanging messages ("mail") between users via


computer networks. It is an asynchronous communication method.
○​ Components:
■​ Mail User Agent (MUA): The client software (e.g., Outlook, Gmail
web interface) used by end-users to compose, send, receive, and
manage emails.
■​ Mail Transfer Agent (MTA): Mail servers (e.g., Postfix, Exchange)
that transfer emails between different mail servers. SMTP is used
here.
■​ Mail Delivery Agent (MDA): A program that delivers emails from the
MTA to the user's mailbox (e.g., Dovecot, Cyrus).
■​ Mailbox: Where incoming emails are stored for a user.
○​ Protocols Involved:
■​ SMTP: For sending emails from client to server and server to server.
■​ POP3 (Post Office Protocol version 3):
■​ Purpose: For retrieving emails from a mail server to a client.
■​ Characteristic: Typically downloads emails to the local device
and deletes them from the server (though some clients allow
leaving copies). Designed for offline access.
■​ Protocol: TCP port 110.
■​ IMAP (Internet Message Access Protocol):
■​ Purpose: For retrieving and managing emails on a mail server
from a client.
■​ Characteristic: Keeps emails on the server, allowing multiple
devices to access and synchronize the same mailbox.
Designed for online access.
■​ Protocol: TCP port 143.
○​ Note: While "Email" is a service, its functionality relies heavily on the
interaction of these underlying application layer protocols (SMTP, POP3,
IMAP, DNS for finding mail servers).

Multiple Choice Questions: Computer Networks

Part 1: Introductory Concepts (15 Questions)


1.​ Which type of network typically covers a single building or a small campus, providing
high-speed connectivity? a) WAN b) MAN c) LAN d) PAN Answer: c) LAN​

2.​ The Internet is the best example of a: a) LAN b) MAN c) WAN d) Wireless network
Answer: c) WAN​

3.​ Which network type is designed to cover a city or a large metropolitan area? a) LAN
b) MAN c) WAN d) WLAN Answer: b) MAN​

4.​ Devices in a wireless network communicate using: a) Optical fiber b) Copper cables
c) Electromagnetic waves d) Telephone lines Answer: c) Electromagnetic waves​

5.​ How many layers are there in the OSI reference model? a) 4 b) 5 c) 7 d) 6 Answer:
c) 7​

6.​ Which OSI layer is responsible for logical addressing and routing? a) Physical Layer
b) Data Link Layer c) Network Layer d) Transport Layer Answer: c) Network Layer​

7.​ The Transport Layer of the OSI model is responsible for: a) Bit synchronization b)
End-to-end process-to-process communication c) Routing packets d) Data encryption
Answer: b) End-to-end process-to-process communication​

8.​ Which OSI layer provides services like data encryption and compression? a) Session
Layer b) Presentation Layer c) Application Layer d) Data Link Layer Answer: b)
Presentation Layer​

9.​ Which layer of the TCP/IP model combines the functions of the OSI Physical and
Data Link layers? a) Application Layer b) Transport Layer c) Internet Layer d)
Network Access Layer Answer: d) Network Access Layer​

10.​FTP, HTTP, and SMTP protocols operate at which layer of the TCP/IP model? a)
Transport Layer b) Internet Layer c) Application Layer d) Network Access Layer
Answer: c) Application Layer​

11.​A hub operates at which layer of the OSI model? a) Physical Layer b) Data Link
Layer c) Network Layer d) Transport Layer Answer: a) Physical Layer​

12.​A router operates at which layer of the OSI model? a) Data Link Layer b) Network
Layer c) Transport Layer d) Session Layer Answer: b) Network Layer​

13.​Which of the following is NOT a characteristic of a wireless network? a) Mobility b)


Susceptibility to interference c) Guaranteed physical connection d) Ease of
installation Answer: c) Guaranteed physical connection​

14.​What is the primary difference between the OSI and TCP/IP models regarding the
Session and Presentation layers? a) TCP/IP has more layers. b) OSI combines them
into the Application layer. c) TCP/IP combines them into the Application layer. d)
TCP/IP has no equivalent for these layers. Answer: c) TCP/IP combines them into
the Application layer.​

15.​What is the unit of data at the Data Link Layer? a) Bits b) Segments c) Packets d)
Frames Answer: d) Frames​

Part 2: Physical Layer (5 Questions)

16.​In which switching technique is a dedicated path established between two


communicating parties for the entire duration of the communication? a) Packet
Switching b) Message Switching c) Circuit Switching d) Hybrid Switching Answer: c)
Circuit Switching​

17.​Which switching technique is more efficient for bursty data traffic? a) Circuit
Switching b) Packet Switching c) Message Switching d) Both a and b Answer: b)
Packet Switching​

18.​What is the primary disadvantage of circuit switching for data communication? a)


High initial setup time b) Wasted bandwidth during idle periods c) Lower data rates d)
Increased packet loss Answer: b) Wasted bandwidth during idle periods​

19.​In Virtual Circuit Switching, packets related to a communication session: a) Follow


different arbitrary paths. b) Are delivered out of order. c) Follow the same logical path.
d) Do not require connection setup. Answer: c) Follow the same logical path.​

20.​A "packet" in a packet-switched network typically contains: a) Only data b) Only


header information c) Both header information and data (payload) d) Only routing
tables Answer: c) Both header information and data (payload)​

Part 3: Data Link Layer (20 Questions)

21.​The process of dividing the stream of bits from the network layer into discrete,
manageable units for transmission is called: a) Error Control b) Flow Control c)
Framing d) Segmentation Answer: c) Framing​

22.​Which framing method inserts an "escape byte" if the flag byte appears in the data?
a) Bit Stuffing b) Character Counting c) Byte Stuffing d) Physical Layer Coding
Violations Answer: c) Byte Stuffing​

23.​The primary goal of flow control at the data link layer is to: a) Detect corrupted
frames. b) Prevent a fast sender from overwhelming a slow receiver. c) Determine
the best path for data. d) Translate logical addresses. Answer: b) Prevent a fast
sender from overwhelming a slow receiver.​

24.​What is the main purpose of error control at the data link layer? a) To manage shared
access to the medium. b) To ensure reliable transmission of data across the physical
link. c) To convert logical addresses to physical addresses. d) To synchronize bit
streams. Answer: b) To ensure reliable transmission of data across the physical
link.​

25.​Which of the following is primarily an error detection technique? a) Hamming Code b)


Reed-Solomon Code c) Cyclic Redundancy Check (CRC) d) Forward Error
Correction (FEC) Answer: c) Cyclic Redundancy Check (CRC)​

26.​Which error control method allows the receiver to correct errors without
retransmission? a) Checksum b) Parity Check c) Automatic Repeat Request (ARQ)
d) Forward Error Correction (FEC) Answer: d) Forward Error Correction (FEC)​

27.​The Simplex protocol is purely unidirectional and lacks: a) Framing b) Physical


transmission c) Acknowledgments and retransmissions d) Bit synchronization
Answer: c) Acknowledgments and retransmissions​

28.​Which protocol allows the sender to transmit multiple frames before waiting for an
acknowledgment? a) Simplex Protocol b) Stop-and-Wait Protocol c) Sliding Window
Protocol d) Pure ALOHA Answer: c) Sliding Window Protocol​

29.​In a Go-Back-N protocol, if frame 5 is lost, what does the sender retransmit upon
timeout or receiving duplicate ACKs for frame 4? a) Only frame 5 b) Frame 5 and all
subsequent frames in its window c) All frames from the beginning d) The receiver
retransmits frame 5 Answer: b) Frame 5 and all subsequent frames in its window​

30.​The receiver in a Go-Back-N protocol typically has a receive window size of: a) 0 b) 1
c) N d) N/2 Answer: b) 1​

31.​Which sliding window protocol is more efficient in noisy channels because it


minimizes retransmissions? a) Go-Back-N b) Stop-and-Wait c) Selective Repeat d)
Simplex Answer: c) Selective Repeat​

32.​In Selective Repeat, the receiver can accept frames: a) Only in sequential order. b)
Only if they are corrupted. c) Out of order, within its receive window. d) Only one at a
time. Answer: c) Out of order, within its receive window.​

33.​What is the main disadvantage of the Stop-and-Wait protocol? a) High error rate b)
Low utilization for high-latency links c) Complex implementation d) Requires large
buffers Answer: b) Low utilization for high-latency links​

34.​A checksum is used for: a) Error correction b) Error detection c) Flow control d)
Framing Answer: b) Error detection​

35.​Parity checking can detect: a) Single-bit errors b) Burst errors c) Random errors only
d) All types of errors Answer: a) Single-bit errors​

36.​Which data link layer protocol is best suited for a perfectly reliable and error-free
channel? a) Go-Back-N b) Selective Repeat c) Simplex d) Stop-and-Wait Answer: c)
Simplex​

37.​What is the maximum number of unacknowledged frames a sender can have in flight
in a Go-Back-N protocol with a window size of N? a) 1 b) N-1 c) N d) N+1 Answer: c)
N​

38.​The use of sequence numbers in data link layer frames helps to: a) Detect errors. b)
Control the flow of data. c) Reorder out-of-order frames. d) Both b and c. Answer: d)
Both b and c. (Primarily reordering, but also implicitly assists flow control by
determining what can be sent next).​

39.​If a receiver is experiencing buffer overflow, which mechanism is primarily used by


the data link layer to address this? a) Error correction b) Flow control c) Framing d)
Error detection Answer: b) Flow control​

40.​What is a key difference in receiver behavior between Go-Back-N and Selective


Repeat? a) GBN buffers out-of-order frames, SR does not. b) SR buffers out-of-order
frames, GBN does not. c) GBN sends individual ACKs, SR sends cumulative ACKs.
d) SR only sends NAKs. Answer: b) SR buffers out-of-order frames, GBN does
not.​

Part 4: Medium Access Sublayer (15 Questions)

41.​Which sublayer is responsible for coordinating access to a shared transmission


medium? a) Logical Link Control (LLC) b) Medium Access Control (MAC) c) Network
Interface Card (NIC) d) Physical Layer Answer: b) Medium Access Control (MAC)​

42.​In Pure ALOHA, if a station transmits and does not receive an ACK, what does it do?
a) It assumes success and continues. b) It immediately retransmits. c) It retransmits
after a random backoff time. d) It gives up. Answer: c) It retransmits after a
random backoff time.​

43.​What is the "vulnerable period" for a Pure ALOHA frame? a) Half the frame
transmission time b) Equal to the frame transmission time c) Twice the frame
transmission time d) Four times the frame transmission time Answer: c) Twice the
frame transmission time​

44.​Slotted ALOHA improves upon Pure ALOHA by: a) Allowing transmission at any
time. b) Dividing time into discrete slots for transmission. c) Sensing the carrier
before transmitting. d) Detecting collisions during transmission. Answer: b) Dividing
time into discrete slots for transmission.​

45.​Which MAC protocol involves "listening before transmitting"? a) Pure ALOHA b)


Slotted ALOHA c) CSMA d) Token Passing Answer: c) CSMA​

46.​CSMA/CD is primarily used in: a) Wireless LANs (Wi-Fi) b) Traditional wired Ethernet
c) Satellite communication d) Bluetooth networks Answer: b) Traditional wired
Ethernet​

47.​What happens in CSMA/CD when a collision is detected? a) The sender immediately


retransmits. b) The sender sends a jamming signal and backs off. c) The sender
increases its transmission power. d) The receiver requests retransmission. Answer:
b) The sender sends a jamming signal and backs off.​

48.​CSMA/CA is used in wireless networks because: a) It is simpler to implement than


CSMA/CD. b) Collisions are easier to detect in wireless environments. c) It's difficult
to detect collisions reliably while transmitting wirelessly. d) It offers guaranteed
bandwidth. Answer: c) It's difficult to detect collisions reliably while transmitting
wirelessly.​

49.​The RTS/CTS (Request To Send/Clear To Send) handshake in CSMA/CA is primarily


used to mitigate which problem? a) Exposed Terminal Problem b) Hidden Terminal
Problem c) Excessive collisions d) Channel noise Answer: b) Hidden Terminal
Problem​

50.​Which of the following is a collision-free MAC protocol? a) CSMA/CD b) Pure ALOHA


c) Token Passing d) CSMA/CA Answer: c) Token Passing​

51.​In a polling-based MAC protocol, channel access is controlled by a: a) Distributed


algorithm b) Central master station c) Random backoff mechanism d) Priority queue
Answer: b) Central master station​

52.​TDMA (Time Division Multiple Access) allocates: a) Different frequencies to different


users. b) Different spreading codes to different users. c) Specific, non-overlapping
time slots to users. d) Access based on carrier sensing. Answer: c) Specific,
non-overlapping time slots to users.​

53.​Which protocol allows multiple users to transmit simultaneously over the same
frequency by using unique codes? a) TDMA b) FDMA c) CDMA d) CSMA Answer:
c) CDMA​

54.​The maximum theoretical throughput of Slotted ALOHA is approximately: a) 18% b)


36% c) 50% d) 100% Answer: b) 36%​

55.​Which of the following is a characteristic of Wireless LAN (Wi-Fi) MAC protocols? a)


They use CSMA/CD for collision detection. b) They rely on a central scheduler for all
transmissions. c) They prioritize collision avoidance over detection. d) They eliminate
the need for acknowledgments. Answer: c) They prioritize collision avoidance
over detection.​

Part 5: Network Layer (15 Questions)

56.​The primary function of the Network Layer is: a) Framing and error control. b)
End-to-end process communication. c) Logical addressing and routing. d) Data
encryption. Answer: c) Logical addressing and routing.​

57.​Which type of routing requires routes to be manually configured by an administrator?


a) Dynamic Routing b) Adaptive Routing c) Static Routing d) Distance Vector Routing
Answer: c) Static Routing​

58.​What is the main advantage of dynamic routing over static routing? a) Simplicity of
configuration b) Lower overhead c) Adaptability to network changes d) Faster initial
setup Answer: c) Adaptability to network changes​

59.​RIP (Routing Information Protocol) is an example of a: a) Link State Routing protocol.


b) Distance Vector Routing protocol. c) Static Routing protocol. d) Hybrid Routing
protocol. Answer: b) Distance Vector Routing protocol.​

60.​Which routing algorithm requires each router to build a complete map of the network
topology? a) Distance Vector Routing b) Link State Routing c) Static Routing d)
Flooding Answer: b) Link State Routing​

61.​OSPF (Open Shortest Path First) is an example of a: a) Distance Vector Routing


protocol. b) Link State Routing protocol. c) Exterior Gateway Protocol. d) Static
Routing protocol. Answer: b) Link State Routing protocol.​

62.​What is the "count-to-infinity" problem associated with? a) Link State Routing b)


Distance Vector Routing c) Static Routing d) Congestion Control Answer: b)
Distance Vector Routing​

63.​The primary goal of congestion control at the Network Layer is to: a) Prevent a single
host from sending too fast. b) Ensure reliable data transfer. c) Prevent the network
from becoming overloaded. d) Authenticate users. Answer: c) Prevent the network
from becoming overloaded.​

64.​Which congestion control technique involves preventing new connections from being
established when the network is overloaded? a) Backpressure b) Choke Packets c)
Admission Control d) Load Shedding Answer: c) Admission Control​

65.​An ICMP "Source Quench" message is an example of which type of congestion


control? a) Open Loop b) Closed Loop c) Routing-based d) Flow control Answer: b)
Closed Loop​

66.​What is the fundamental protocol used for internetworking that provides logical
addressing? a) TCP b) UDP c) IP d) ARP Answer: c) IP​

67.​What happens if a router receives a packet larger than the MTU of the next network
link? a) It discards the packet. b) It fragments the packet. c) It holds the packet until
the MTU increases. d) It sends an error message to the source. Answer: b) It
fragments the packet.​
68.​Routers are key devices for internetworking because they: a) Connect devices within
a single network. b) Manage physical connections between different networks. c)
Forward packets between different heterogeneous networks. d) Provide wireless
access. Answer: c) Forward packets between different heterogeneous
networks.​

69.​The main challenge of internetworking stems from the ________ of the


interconnected networks. a) Scalability b) Heterogeneity c) Security d) Latency
Answer: b) Heterogeneity​

70.​Which routing strategy is best suited for large, dynamic networks? a) Static Routing
b) Default Routing c) Dynamic Routing d) Policy-based Routing Answer: c)
Dynamic Routing​

Part 6: Transport Layer (15 Questions)

71.​Which transport layer protocol provides a connection-oriented, reliable service? a)


UDP b) IP c) TCP d) ICMP Answer: c) TCP​

72.​UDP is often preferred over TCP for applications like: a) Web Browse b) Email
transfer c) Online gaming and VoIP d) File transfer Answer: c) Online gaming and
VoIP​

73.​TCP's flow control mechanism uses a: a) Fixed window size. b) Sliding window
(receive window) advertised by the receiver. c) Token bucket algorithm. d)
Backpressure signal. Answer: b) Sliding window (receive window) advertised by
the receiver.​

74.​The "three-way handshake" is a connection establishment process used by: a) UDP


b) IP c) TCP d) Ethernet Answer: c) TCP​

75.​What is the primary purpose of TCP's congestion control? a) To prevent a fast sender
from overwhelming a slow receiver. b) To ensure data arrives in order. c) To prevent
the network from collapsing due to excessive traffic. d) To detect corrupted packets.
Answer: c) To prevent the network from collapsing due to excessive traffic.​

76.​In TCP's congestion control, the "slow start" phase causes the congestion window to
grow: a) Linearly b) Exponentially c) Statically d) Randomly Answer: b)
Exponentially​

77.​TCP infers network congestion primarily from: a) Explicit messages from routers. b)
Packet loss (timeouts or duplicate ACKs). c) Network Administrator warnings. d) High
CPU utilization. Answer: b) Packet loss (timeouts or duplicate ACKs).​

78.​Which of the following is NOT a feature of UDP? a) Connectionless b) Fast and


Lightweight c) Reliable data transfer d) Datagram-oriented Answer: c) Reliable data
transfer​

79.​What does TCP use to detect missing segments and ensure ordered delivery? a) IP
addresses b) Port numbers c) Sequence numbers d) MAC addresses Answer: c)
Sequence numbers​

80.​When TCP sends SYN, SYN-ACK, ACK segments, it is performing: a) Connection


termination b) Data transfer c) Connection establishment d) Congestion avoidance
Answer: c) Connection establishment​

81.​Which port number is typically used by TCP for HTTP traffic? a) 21 b) 25 c) 80 d) 443
Answer: c) 80​

82.​What is the typical default action of POP3 after downloading emails to a client? a)
Keep them on the server. b) Delete them from the server. c) Archive them on the
server. d) Mark them as unread. Answer: b) Delete them from the server.​

83.​TCP's "Fast Retransmit" mechanism is triggered by: a) A single timeout. b) Three


duplicate ACKs. c) Network congestion. d) Application layer requests. Answer: b)
Three duplicate ACKs.​

84.​If a TCP timeout occurs, what typically happens to the congestion window (cwnd)? a)
It doubles. b) It linearly increases. c) It is reset to 1. d) It remains unchanged.
Answer: c) It is reset to 1.​

85.​Why does TCP use port numbers? a) To identify specific network interfaces. b) To
identify specific applications or processes on a host. c) To provide unique IP
addresses. d) To ensure data reliability. Answer: b) To identify specific
applications or processes on a host.​

Part 7: Session, Presentation and Application Layer (15 Questions)

86.​Which OSI layer is responsible for dialog control and synchronization during a
communication session? a) Transport Layer b) Session Layer c) Presentation Layer
d) Application Layer Answer: b) Session Layer​

87.​The Presentation Layer's primary function is to: a) Establish and terminate sessions.
b) Provide logical addressing. c) Ensure data is in a readable format for the
application. d) Route packets between networks. Answer: c) Ensure data is in a
readable format for the application.​

88.​Data encryption and compression are functions primarily handled by which OSI
layer? a) Session Layer b) Presentation Layer c) Application Layer d) Transport
Layer Answer: b) Presentation Layer​

89.​Remote Procedure Call (RPC) allows a program to: a) Send email to a remote
server. b) Execute a procedure on a different machine as if it were local. c) Translate
domain names to IP addresses. d) Transfer files securely. Answer: b) Execute a
procedure on a different machine as if it were local.​

90.​The process of packaging parameters and results into a network-ready format for
RPC is called: a) Encryption b) Compressing c) Marshalling d) Routing Answer: c)
Marshalling​

91.​Which application layer protocol is responsible for translating human-readable


domain names into IP addresses? a) SMTP b) HTTP c) DNS d) FTP Answer: c)
DNS​

92.​DNS queries primarily use which transport layer protocol for speed? a) TCP b) UDP
c) SCTP d) Both TCP and UDP equally Answer: b) UDP​

93.​Which protocol is used for sending email from a mail client to a mail server? a) POP3
b) IMAP c) HTTP d) SMTP Answer: d) SMTP​

94.​Which TCP port is commonly used for standard HTTP traffic? a) 20 b) 25 c) 80 d)


443 Answer: c) 80​

95.​HTTPS uses which protocol for secure communication? a) FTP b) SMTP c) TLS/SSL
d) DNS Answer: c) TLS/SSL​

96.​Which protocol uses two TCP connections (one for control, one for data) for file
transfer? a) HTTP b) SMTP c) FTP d) DNS Answer: c) FTP​

97.​If you want to access your emails from multiple devices and keep them synchronized
on the server, which protocol is generally preferred? a) POP3 b) SMTP c) IMAP d)
HTTP Answer: c) IMAP​

98.​The World Wide Web is primarily based on which application layer protocol? a) FTP
b) SMTP c) HTTP d) Telnet Answer: c) HTTP​

99.​Which of the following is NOT a characteristic of HTTP? a) Stateless b)


Request/Response Model c) Connection-oriented (it uses TCP, which is
connection-oriented, but HTTP itself is stateless over that connection) d) Requires
dedicated session for each user Answer: d) Requires dedicated session for each
user (it's stateless, requiring cookies for session management)​

100.​ A mail user agent (MUA) is typically: a) A mail server. b) A client software for
sending and receiving emails. c) A protocol for transferring mail between servers. d)
A database for storing emails. Answer: b) A client software for sending and
receiving emails.

You might also like