TCP Flow and Congestion Control Explained
TCP Flow and Congestion Control Explained
TCP uses a smart version of the sliding-window idea so sender and receiver stay in sync and the
network is not overloaded.
The receiver tells the sender how much buffer it has (the Advertised Window). The sender
never keeps more unacknowledged bytes than that.
The sender keeps bytes in a send buffer (acknowledged, unacknowledged, and not-yet-sent).
The receiver keeps bytes in a receive buffer so it can handle out-of-order arrival.
TCP also has congestion control (slow start, AIMD, fast retransmit/recovery) and congestion-
avoidance helpers like DEC bit and RED.
Flow control is the mechanism that manages the rate of data transmission between two nodes to
prevent a fast sender from overwhelming a slow receiver. In TCP, flow control is performed end-to-
end rather than across a single link.
TCP employs an adaptive flow control mechanism, which is a variant of the sliding window
technique. This mechanism guarantees the reliable and ordered delivery of data and enforces flow
control at the sender.
The flow control is primarily driven by the receiver limiting how much data the sender can transmit
at a given time:
1. Advertised Window (AdvertisedWindow): The receiver informs the sender about its current
available buffer space by using the AdvertisedWindow field in the TCP header. The sender is
prohibited from having unacknowledged data greater than this advertised window size.
2. Send Buffer: The sending TCP maintains a send buffer containing acknowledged data,
unacknowledged data, and data waiting to be transmitted. To prevent overflowing its
maximum size (MaxSendBuffer), the sender ensures that the amount of data written but not
yet acknowledged is limited by the constraint: LastByteWritten − LastByteAcked ≤
MaxSendBuffer.
3. Receive Buffer: The receiving TCP uses a receive buffer to hold incoming data, even if
segments arrive out-of-order. To prevent overflow of its maximum size (MaxRcvBuffer), the
receiver ensures the constraint: LastByteRcvd − LastByteRead ≤ MaxRcvBuffer. Data cannot
be read by the application until that byte and all preceding bytes have been received.
Silly Window Syndrome (SWS): This issue arises when either the sending application
produces data slowly (e.g., 1 byte at a time) or the receiving application consumes data
slowly, resulting in the transmission of many very small segments. This greatly reduces
operational efficiency. The solution involves forcing the sending TCP to wait and collect
enough data to send in a larger block, preventing byte-by-byte transmission.
Nagle’s Algorithm: This algorithm was introduced to solve the problem of sending small
segments, often related to SWS. It suggests introducing a timer and transmitting available
data only when the timer expires, or a sufficiently large segment (Maximum Segment Size,
MSS) is available, balancing delay with efficiency.
Congestion in a network occurs when the load (the number of packets sent) exceeds the capacity of
the network. When load exceeds capacity, routers start discarding packets as queues become full,
and throughput sharply declines. Congestion control mechanisms prevent the sender from
overloading the network and are concerned with how the host and network interact.
TCP employs a specific variable, the Congestion Window (CongestionWindow), for each connection
to manage the rate of transmission based on perceived network congestion.
AIMD is a core mechanism used to adjust the CongestionWindow based on network feedback.
The continuous increase and decrease of the CongestionWindow over the lifetime of a
connection results in a distinctive saw-tooth pattern when plotted against time.
B. Slow Start
Slow start is used to increase the CongestionWindow exponentially when a connection begins ("cold
start").
2. On successful transmission, TCP doubles the number of packets sent every Round Trip Time
(RTT). For instance, after the first ACK arrives, the CongestionWindow is incremented by 1,
and two packets are sent. When two ACKs arrive, the CongestionWindow increases by 2, and
four packets are sent, and so on.
3. Because TCP starts with no prior knowledge of network capacity, it increases the
CongestionWindow rapidly until a timeout occurs.
4. Upon a timeout, a Congestion Threshold is set to half the current CongestionWindow, and
the CongestionWindow is reset to 1. Slow start then repeats until the CongestionWindow
reaches this threshold, after which the process reverts to an additive increase pattern.
These heuristics address situations where a lost packet is detected before a full timer expiration,
thereby avoiding the costly full slow start process.
Fast Retransmit: When a packet arrives out of order, the receiving TCP resends the same
acknowledgment (a duplicate ACK) it previously sent. If the sender receives three duplicate
ACKs, it infers that the corresponding packet is lost due to congestion and immediately
retransmits that packet without waiting for the regular timeout.
Fast Recovery: When packet loss is detected via fast retransmit, the connection avoids the
initial slow start phase. Instead of setting the CongestionWindow to one packet, the method
immediately transitions to the AIMD (additive increase/multiplicative decrease) pattern,
using the ACKs already "in the pipe" to clock the sending of new packets. Slow start is
reserved only for the very beginning of a connection or following a regular timeout.
DECbit: routers set a congestion bit in packet headers when average queue length crosses a
threshold; the destination copies that bit into ACKs, and the source adjusts its sending rate
based on the fraction of ACKs with DECbit set. If ≥50% of ACKs show congestion, reduce
sending rate; otherwise increase.
RED (Random Early Detection): routers probabilistically drop/mark packets before queues fill
to give early signals to TCP senders to slow down (described in your notes as a queue-based
avoidance technique).
Flow control in TCP acts like a water dam at the receiver, ensuring incoming data (the water flow)
never exceeds the reservoir capacity (the receive buffer), preventing the system from being
overwhelmed. Meanwhile, Congestion control acts like a traffic light system distributed across the
network, automatically regulating the speed of the sender (source of traffic) based on real-time
feedback (timeouts or duplicate ACKs) about road conditions (network capacity) to prevent gridlock.
1. Purpose
2. Mechanism
Uses an adaptive sliding window.
3. Buffers
Send Buffer: Stores sent but unacknowledged data and data waiting to be sent.
Condition: LastByteWritten − LastByteAcked ≤ MaxSendBuffer
4. Efficiency Problems++++
Nagle’s Algorithm:
Send small data only if no previous unacknowledged data exists. Otherwise wait and accumulate.
1. Purpose
B. Slow Start
Stops when:
o Timeout occurs, or
Fast Retransmit
Fast Recovery
The Address Resolution Protocol (ARP) and the Reverse Address Resolution Protocol (RARP) are
crucial protocols operating within the Network Layer (Unit III) of the TCP/IP suite. Their primary
function is to facilitate the necessary address mapping between the logical addressing system (IP
addresses) used by applications and the physical addressing system (MAC addresses) required for
actual data transmission over a network.
ARP is the protocol responsible for converting a 32-bit IP address (Logical address) into a 48-bit MAC
Address (Physical address). Since computer programs use logical addresses, but actual
communication occurs over physical addresses, both are required to send a datagram over a
network.
ARP enables each host to dynamically build and maintain a table that maps IP addresses to their
corresponding physical addresses, known as the ARP cache table. ARP is fundamentally a request
and response protocol that relies on broadcast support from physical networks.
1. Cache Check: Before a host (System A) attempts to send an IP datagram, it first checks its
ARP cache table for the required IP-to-MAC address mapping.
2. ARP Query Broadcast: If the mapping is not found, System A invokes the Address Resolution
Protocol by broadcasting an ARP query onto the network. This query contains the target IP
address (e.g., System B’s IP address).
3. Host Reception and Update: Every host on the network receives the broadcast query and
checks if the target IP address matches its own. All nodes except the destination update their
own ARP table based on the source information in the query, and then discard the packet.
4. ARP Response Unicast: The destination host (System B), upon recognizing its IP address,
constructs an ARP Response packet. This response contains System B’s link-layer address
(MAC Address) and is unicast (sent directly) back to the originator (System A).
5. Cache Update: System A receives the ARP Response and stores the target Logical and
Physical address pair in its ARP table.
6. Router Intervention: If the target node does not exist on the same local network, the ARP
request is sent to the default router instead.
ARP messages are divided into two essential types that facilitate the mapping:
1. ARP Request: Sent as a broadcast message containing the target IP address, asking for the
corresponding physical address.
2. ARP Reply: Sent as a unicast message from the target host, containing its physical (MAC)
address.
RARP is the inverse of ARP, designed to solve the opposite problem of address mapping.
The primary function of RARP is to allow a host to convert its MAC address (Physical address) into
the corresponding IP address (Logical address).
RARP is typically used by diskless workstations or devices that know their own physical address
(burned into their Network Interface Card by the manufacturer) but need to acquire their necessary
network layer address (IP address) upon booting up, usually from a dedicated RARP server on the
network.
ARP and RARP, though distinct in their direction of mapping, are both fundamental to networking
because they link the logical structure of the internetwork with the physical reality of the underlying
data links.
Imagine you want to give a toy to your friend in school, but you only know their name, not their
classroom number.
1. You first check your notebook to see if you already wrote your friend’s name and classroom.
(This is the ARP cache.)
2. If you don’t find it, you shout in the school hall:
“Who is Rahul? Which classroom are you in?”
(This is the ARP Request broadcast.)
4. Rahul walks to you and quietly tells you his classroom number.
(This is the unicast ARP Reply.)
That’s ARP.
Now imagine a kid who knows their classroom number, but doesn’t know their name on the
attendance sheet.
That is RARP.
In computer terms:
ARP:
“I know your name. Tell me your home.”
(IP → MAC)
RARP:
“I know my home. Tell me my name.”
(MAC → IP)
The Internet Protocol (IP) operates within the Network Layer (also called the Internet Layer in the
TCP/IP model) and is the key protocol used to build scalable, heterogeneous internetworks. The
functions of the network layer include logical addressing, routing, and forwarding of packets from
source to destination. The two primary versions of the Internet Protocol addressed in networking
curricula are IPv4 and IPv6.
IPv4 (Internet Protocol Version 4)
IPv4 is the fourth version of the Internet Protocol and was the first version of the protocol to be
widely deployed.
1. Address Size and Space: An IPv4 address is a 32-bit address that uniquely and universally
defines a connection to the Internet. The total address space is $2^{32}$, or 4,294,967,296
(more than four billion) devices.
2. Notation: IPv4 addresses are commonly displayed using dotted-decimal notation (base 256),
where decimal points separate the four bytes (octets).
3. Hierarchy: An IPv4 address is hierarchical, divided into two parts: the prefix (Net ID) which
defines the network, and the suffix (Host ID) which defines the node.
5. Special Addresses: IPv4 defines special addresses for specific purposes, including the
limited-broadcast address ([Link]/32) and the loopback address (block
[Link]/8).
IPv6 is the next generation IP, evolved specifically to solve the address space problem caused by IPv4
depletion, while also offering a richer set of services.
1. Address Size and Space: IPv6 provides a massive 128-bit address space, allowing it to handle
up to $2^{128}$ nodes.
2. Addressing Scheme: IPv6 uses classless addressing where classification is based on the Most
Significant Bits (MSBs).
3. Notation: The standard representation uses eight groups of 16-bit hexadecimal addresses
separated by colons (x : x : x : x : x : x : x : x). To conserve space, IPv6 allows discarding leading
zeros and replacing consecutive sections of zeros with a double colon (::).
IPv6 features a restructured header format to enhance performance and functionality compared to
IPv4:
1. Header Structure: The IPv6 base header is 40 bytes long. It uses a new header format where
options are separated from the base header and inserted as Extension Headers between the
base header and the data payload. This design simplifies routing because routers generally
do not need to check most options.
2. Extension and Flexibility: IPv6 allows for extensions, ensuring the protocol can be adapted
for new technologies. It provides greater functionality through its six extension headers.
3. Resource Allocation: Unlike IPv4, IPv6 natively supports resource allocation (Quality of
Service) through two new fields: Traffic Class and Flow Label. These fields enable the source
to request special handling for packets, supporting traffic types like real-time audio and
video.
4. Fragmentation: In IPv6, only the source host can fragment packets. The source typically uses
a path MTU discovery technique to determine the smallest MTU along the path.
5. Autoconfiguration and Security: IPv6 supports autoconfiguration (plug and play), allowing
hosts to automatically configure their IP addresses without needing a DHCP server.
Furthermore, IPv6 incorporates enhanced security features, providing encryption and
authentication options for confidentiality and integrity.
Here are the key points from your IPv4 and IPv6 explanation. Clean, crisp, and exam-ready.
Addressing
Structure
Addressing Methods
[Link]/8 – loopback
Addressing
IPv6 uses a 128-bit address.
Notation
Quality of Service
Includes Traffic Class and Flow Label fields for special handling (audio, video).
Fragmentation
Based on the sources, both the Dynamic Host Configuration Protocol (DHCP) and the Internet Control
Message Protocol (ICMP) are essential protocols operating at the Network Layer (Unit III) of the
TCP/IP protocol suite.
DHCP is used to simplify the installation and maintenance of networked computers. It addresses the
need for hosts to acquire configuration information, particularly unique IP addresses, automatically
when connecting to a network.
1. Goal: The main goal of DHCP is to minimize the amount of manual configuration required
for a host. When a new computer is connected to a network, DHCP can provide it with all the
necessary information for full system integration.
2. Client/Server Model: DHCP operates based on a client/server model. DHCP clients send a
request to a DHCP server, which then responds with an IP address.
3. DHCP Server Role: The DHCP server is responsible for providing configuration information to
hosts. There must be at least one DHCP server for an administrative domain. This server
maintains a pool of available addresses that it hands out to hosts on demand.
4. Discovery Process:
o DHCP uses the concept of a relay agent, where at least one exists on each network.
The relay agent, configured with the IP address of the DHCP server, receives the
broadcast DHCPDISCOVER message and unicasts it to the DHCP server.
5. Message Transport: DHCP packets are sent using the User Datagram Protocol (UDP).
Importance
Since IP addresses must be unique on a given internetwork and reflect its structure, relying solely on
manual configuration has drawbacks, such as excessive work in large networks and the risk of two
hosts receiving the same IP address. Automated configuration via DHCP solves these issues.
ICMP messages are divided into two main categories: error-reporting messages and query
messages.
A. Error-Reporting Messages
These messages report problems encountered by a router or destination host when processing an IP
packet.
Destination Unreachable: Sent when a router cannot route a datagram, causing the
datagram to be discarded.
Source Quench: Sent to the source host when a router or host discards a datagram due to
congestion. This message acts as flow control.
Time Exceeded: Sent to the source host when a router discards a datagram because the
Time to Live (TTL) field has reached 0.
Parameter Problem: Sent to the source if a router finds an ambiguous or missing value in any
field of the datagram, causing it to discard the datagram.
Redirection: Sent by the default router to inform the source host to update its forwarding
table if the packet was routed on a wrong path.
B. Query Messages
These messages help a host or network manager obtain specific information from a router or
another host.
Echo Request & Reply: Used in combination to determine whether two systems can
communicate.
Timestamp Request & Reply: Used by two machines to determine the Round-Trip Time
(RTT).
Address Mask Request & Reply: Used by a host to obtain its subnet mask from a router.
Ping: Uses ICMP echo-request messages to determine if a host is alive and responding, and
calculates the round-trip time (RTT) by embedding the sending time in the data section.
Traceroute (or Tracert): Used to trace the path of a packet from source to destination,
finding the IP addresses of all routers visited along the path.
An ICMP message includes an 8-byte header and a variable-size data section. Key fields in the header
include:
Identifier and Sequence Number: Used to match the request with the reply.
To think of the relationship between DHCP and ICMP, consider a large office building (the network):
DHCP acts like the Building Manager who assigns each new occupant (host) a unique office number
(IP address) automatically upon arrival, ensuring no two people claim the same space and that their
mail can be correctly routed within the building.
ICMP acts like the Building's Communication System used for status reports and troubleshooting. If
an important document (datagram) fails to reach a specific office, ICMP sends a notification back to
the sender explaining why (e.g., "Destination Unreachable"). It also allows maintenance staff
(network managers) to check if an office is responding (Ping) or trace the route of an elevator
(Traceroute).
The Border Gateway Protocol (BGP) is a critical routing protocol operating in the Network Layer (Unit
IV: Routing) of the TCP/IP suite. It is fundamentally associated with inter-domain routing, which
concerns the forwarding of packets between large, independent networks.
BGP4 (Border Gateway Protocol Version 4) is the only interdomain routing protocol used in the
Internet today.
Algorithm Class: BGP is based on the Path-vector routing algorithm. Path-vector routing is
an asynchronous and distributed routing algorithm primarily designed to route packets
between Internet Service Providers (ISPs).
Routing Goal: Unlike distance vector or link state algorithms which seek the lowest-cost
path, path-vector routing is not based on least-cost routing. Instead, the best route is
determined by the source applying policies to the available paths, allowing the source to
control the path taken.
BGP views the entire Internet as a collection of Autonomous Systems (AS) interconnected arbitrarily.
1. Autonomous Systems (AS): The internet is seen as a set of interconnected AS. Each AS
contains a border router (gateway) through which packets enter and leave that AS.
2. BGP Speakers: One router within each autonomous system is designated as the BGP
speaker. These BGP speakers exchange reachability information with other BGP speakers via
an external BGP session.
o A path must be without any loop. This loop prevention is inherent because the AS
list in the path vector must be unique.
o For example, a backbone network might advertise that network 128.96 can be
reached along the path <AS1, AS2, AS4>.
5. Route Maintenance:
o If a link or node along an advertised path fails, BGP sends a negative advertisement
known as a withdrawn route to cancel the path.
o If there is no change in routing information, BGP speakers send keep alive messages
instead of repeatedly sending full route updates.
Once a BGP speaker learns routing information (prefixes and paths) from other external BGP
speakers, it needs to share this information with the routers inside its own autonomous system. This
task is handled by interior BGP (iBGP). The purpose of iBGP is to ensure that every router within the
AS is able to determine the appropriate next hop for all prefixes known externally.
The Distance Vector Multicast Routing Protocol (DVMRP) is a significant protocol within the
Network Layer (Unit IV: Routing), specifically categorized under Multicast Routing.
DVMRP is designed to facilitate the transportation of IP multicast packets among networks and
historically formed the basis of the Internet's multicast backbone. It is an extension of distance
vector routing tailored to support multicast routing.
1. Multicast Routing Protocol: DVMRP is one of the major multicast routing protocols,
alongside Protocol Independent Multicast (PIM).
2. Source-Based Trees: DVMRP is associated with the construction of Source-Based Trees for
multicast distribution. For each combination of (source, group), this involves creating a
shortest path spanning tree.
The basic multicast logic within DVMRP involves incrementally adding multicasting capabilities to
distance-vector routing through four defined stages:
A. Flooding
In the initial stage, a router that receives a multicast packet from a source ($S$) forwards the packet
on all outgoing links. The drawback of simple flooding is that it transmits packets throughout the
network, even to networks that have no members for that specific group, and can lead to duplicate
flooding.
RPF is introduced to eliminate the problem of looping that occurs during flooding. The RPF
mechanism ensures that a router only forwards a multicast packet if the packet arrived from the
specific interface that provides the shortest path from the source to the router. If the packet arrives
on any other path, it is discarded. This eliminates looping but does not fully optimize transmission
efficiency.
RPB builds upon RPF to guarantee that each destination receives one and only one copy of the
packet by creating a shortest path broadcast tree from the source to each destination.
To prevent a network from receiving multiple copies of a packet when connected to more than one
router, RPB designates one router as the parent (called the Designated Router, or DR). Only the
parent router forwards multicast packets from the source $S$ to the attached network; any other
router receiving the multicast packet that is not the parent simply drops the packet.
D. Reverse-Path Multicasting (RPM)
RPM is the final stage that adds efficiency by ensuring the multicast packet reaches only those
networks that have active members for the specific group. It achieves this by adding two dynamic
features to RPB: pruning and grafting.
1. Pruning: Routers that receive multicast traffic but have no active group members send a "prune"
message. This prunes the distribution tree and stops needless data from being sent to those
branches.
2. Grafting: Grafting is used to reinstate a pruned branch. A router sends a "graft" message if a host
within its network joins a multicast group. This message travels router-to-router until it reaches
a router that is currently active on the multicast group, thereby restoring the necessary path.
A DVMRP router forwards a packet only if the packet arrived from the link used to reach the source
of the packet and if downstream links have not pruned the tree.
Definition
DVMRP is a multicast routing protocol based on distance vector routing and is known as a
flood-and-prune protocol.
Core Features
1. Flooding
o Forward packet only if it arrived on the interface that is on the shortest path to the
source.
o Prevents loops.
1. The packet arrives on the RPF interface (correct path from source).
The OSI Model (Open System Interconnection) is a foundational reference model that describes how
information moves from a software application in one computer through a physical medium to an
application in another computer.
Developed by the International Organization for Standardization (ISO) in 1984, the OSI model is
considered an architectural model for inter-computer communications. Its core principle is protocol
layering, which divides the complex communication task into seven smaller and manageable tasks,
with each layer assigned a particular task that can be performed independently.
The OSI model consists of seven layers. The structure and function of these layers are as follows,
moving from the physical connection up to the user interface:
1. Physical Layer
The Physical Layer coordinates the functions required to transmit a bit stream over a physical
medium.
Functions: Defines the physical characteristics of interfaces and media, the representation
of bits (encoding), the Data Rate or Transmission rate (number of bits sent per second),
Synchronization of bits, Line Configuration (point-to-point or multipoint), and the
Transmission Mode (simplex, half-duplex, or full-duplex).
This layer is responsible for transmitting data units called frames from one node to the next node.
Functions:
o Framing: Divides the stream of bits into data units called frames.
o Physical Addressing: Adds a header to the frame defining the sender and receiver if
frames are distributed across different systems on the network.
o Flow control: Imposes a mechanism to control the rate of data production by the
sender versus the rate of absorption by the receiver.
o Error control: Detects and retransmits damaged or lost frames and prevents
duplication, often achieved through a trailer added to the end of the frame.
o Medium Access Control: Determines which device controls the link at any given
time.
3. Network Layer
This layer is responsible for the delivery of packets from source to destination. It determines the
best path to move data based on network conditions and other factors.
Functions:
o Routing: The major component, which determines the best optimal path out of
multiple available paths from source to destination.
4. Transport Layer
The Transport Layer is the fourth layer of the OSI model and is considered the first true end-to-end
layer, implemented in all End Systems (ES). It is responsible for Process-to-Process delivery (source-
to-destination delivery of the entire message) and ensuring the message arrives in order.
Functions:
o Port addressing / Service Point addressing: The header includes an address to get
the entire message to the correct process on that computer.
o Flow control and Error control: Both are performed end-to-end rather than across a
single link.
5. Session Layer
Functions:
6. Presentation Layer
It is concerned with the syntax and semantics of information exchanged between two systems.
Functions:
7. Application Layer
Functions: Handles issues such as network transparency and resource allocation. It provides
services such as FTAM (File Transfer, Access, Management), Mail services (email forwarding
and storage), and Directory services (accessing database information about resources).
The OSI model is a protocol-independent standard, whereas the TCP/IP model is a protocol-
dependent standard that was defined after the advent of the Internet. The TCP/IP architecture is a 4-
layer model that combines the functions of several OSI layers:
Here is a full 13-mark answer ONLY for “Flow Control Mechanism in the Data Link Layer”, written
clearly, exam-ready, and based strictly on your uploaded notes (meaning unchanged).
⭐ 13 MARK ANSWER
Flow control in the Data Link Layer is a set of procedures used to regulate the amount of data a
sender can transmit before receiving an acknowledgment. Since the receiving station has limited
processing speed and a limited buffer, it must be protected from being overwhelmed. The Data Link
Layer ensures that the sender transmits data at a rate the receiver can safely handle.
Flow control requires the presence of a buffer — a block of memory at the receiver used for
temporarily storing frames until they are processed. If the sender keeps transmitting without control,
the buffer may overflow, causing frame loss. To prevent this, the Data Link Layer uses structured flow
control mechanisms. The two main flow control methods are Stop-and-Wait and Sliding Window.
Working
After sending a frame, the sender waits for an acknowledgment (ACK) from the receiver.
Only after receiving the ACK does the sender send the next frame.
This ensures that the receiver processes each frame before receiving the next one.
Limitations
Stop-and-Wait does not efficiently use the transmission medium, especially when:
Propagation delay is high
Only one frame is on the link at any moment, leaving the channel underutilized.
Error Handling
If the sender does not receive an ACK within the timeout period, it assumes the frame or the
ACK was lost.
Retransmission occurs if the frame is damaged, the frame is lost, the ACK is lost, or the ACK is
delayed.
Sliding Window is a more efficient method that allows the sender to transmit multiple frames before
receiving an ACK.
Key Concepts
1. Sender Window
2. Receiver Window
These windows control how many frames can be in transit at the same time.
Sender Window
When an ACK arrives, the window expands to include new frames to send.
Receiver Window
Frame Numbering
Acknowledgment
The receiver sends an ACK containing the number of the next frame it expects.
When the sender receives this ACK, it knows all frames up to that number minus one have
been received correctly.
This mechanism allows for continuous flow of frames and improved channel utilization.
3. Piggybacking
To increase efficiency, piggybacking is used when both stations have data to send.
How It Works
This combines data and acknowledgment into a single frame, reducing overhead and saving
bandwidth.
Flow control in the Data Link Layer ensures that the sender does not overwhelm the receiver. Stop-
and-Wait provides simple control but is inefficient, while Sliding Window allows multiple frames in
transit for higher efficiency. Piggybacking further improves performance by combining
acknowledgments with outgoing data.
Below is your complete 13-mark answer ONLY for “Error Detection Techniques”, written using only
the content from your notes, with no outside points added, but made clear, structured, and exam-
ready.
⭐ 13 MARK ANSWER
Error detection is a major part of error control in the Data Link Layer. During data transmission, bits
can change due to noise or other impairments, resulting in single-bit errors or burst errors. To detect
these errors, additional bits are added to the data before transmission. At the receiver, these extra
bits help determine if the received data is correct or corrupted.
1. Parity Check
The parity check is the simplest and most widely used error detection method.
Mechanism
A single bit, called the parity bit, is added to every data unit.
The purpose is to make the total number of 1s in the data either even (even parity) or odd
(odd parity).
Example
Receiver Side
If the count matches the parity rule (even or odd), the data is accepted.
Notes Highlighted
It can detect single-bit errors effectively but may not detect burst errors.
Concept
6. Append this remainder to ( M(x) ) to form the final codeword for transmission.
Receiver Side
The receiver divides the received codeword by the same divisor.
Notes Highlighted
3. Internet Checksum
The checksum is another method of detecting errors by performing arithmetic on the data.
Mechanism
2. The data
Error Handling
Notes Highlighted
Parity Check, CRC, and Internet Checksum are the three key error detection techniques used in the
Data Link Layer. These techniques analyze data using extra bits, polynomial division, or arithmetic
checks to identify corrupted frames, ensuring that errors are detected before further processing.