Framing, Flow Control and Congestion Control
Framing, Flow Control and Congestion Control
Framing: Data are sent form the sending station to the receiving stations in blocks called frames.
The beginning and end of each frame must be recognizable by the receiver.
Flow control: The sending station must not overwhelm the receiving station.
Error control: Bit errors introduced in the transmission system must be detected and corrected.
Framing.
Framing makes it possible for the sender to send a set of bits that are meaningful to the
receiver. The data link layer to create and recognizes frame boundaries.
The four framing methods that are widely used are;
Character count
Byte oriented framing
Bit oriented Framing
Clock based Framing
Character Count
In this method the number of characters in the frame is specified as a field in the frame header.
The data link layer at the destination reads the character count and knows where the end of the
frame is.
The disadvantage of this method is if there is an error in the character, the receiver will lose
synchronization.
HDLC Frame
Clock-based Framing
In a clock-based framing system, a series of repetitive pulses are used to maintain a constant bit
rate. SONET (Synchronous Optical Network) is an example that uses clock based framing. .
3 2 1 0 3 2 1 0 3 2 1 0
The figure above depicts the sliding-window process. Frames are numbered sequentially from 0
to 3, and then the same numbers are reused for subsequent frames. The shaded rectangle
indicates the maximum number of frames that may be sent. Each time a frame is sent, the shaded
window shrinks; each time an acknowledgment is received, the shaded window grows.
Let’s say the sender transmits three frames, beginning with frame 0. The shaded window will
shrinks by 3. If an acknowledgment is received for two frames, the shaded window grows by 2.
The sender must buffer the unacknowledged frames in case they need to be retransmitted.
— Stop-and-wait
— Go-back-N
— Selective-reject (Selective repeat)
Stop-and-wait ARQ.
This is based on stop and wait flow control. See description of Stop and wait flow control
Go back N ARQ
This is a form of error control based on sliding-window flow control . See description of sliding
window flow control
Selective Reject
With selective-reject ARQ, the only frames retransmitted are those that receive a negative
acknowledgment or those that time out. Subsequent frames are accepted by the receiver and
buffered.
Selective reject is more efficient than go-back-N, because it minimizes the amount of
retransmission
In this case the receiver must maintain large enough buffer and requires more complex logic in
the transmitter. Selective reject is used for a satellite link because of the long propagation delay. .
Congestion control
Congestion occurs when the number of packets being transmitted through a network
approaches the capacity of the network (80% utilization considered critical). As the number
of packets in a network increases it reaches a level where the performance drops dramatically.
Congestion control aims to keep no of packets below that level.
The main difference between flow control and congestion control is that Congestion control is
a global issue in a network, that is, it involves every router, switch and host within the
network while flow control is point-to-point; it just involves the sender and receiver
Discard strategy.
This is a simple strategy in which routers or switches simply discard packets when buffers
become full. Load shedding strategies include
Backpressure
Choke packets
A choke packet is a control packet generated at a congested node and transmitted back to a
source node to restrict traffic flow.
In this method, the congested node sends a warning directly to the source node.
The source must reduce its transmission rate by a certain percentage on receiving the choke
packet
A hop by hop choke packet as opposed to destination node to source node choke packet is a
more efficient.
`An example of a choke packet is the Internet Control Message Protocol ( ICMP) Source
Quench Packet.
In explicit congestion control techniques the network alerts end systems of growing congestion
within the network and the end systems reduce the load offered to the network.
Unlike in the choke packet method, where a separate packet is used, the signal is included in
the packets that carry data.
Backward: the network notifies the source that indicates that the packets that the user
transmits on this logical connection may encounter congested resources and congestion
avoidance procedures should be initiated for traffic in the opposite direction to the received
notification.
This backward information is transmitted either in the headers of a data packets to the source or
by transmitting separate control packets to the source.
Forward: the network notifies the user that this packet, on this logical connection, has
encountered congested resources and congestion avoidance procedures should be initiated for
traffic in the same direction as the received notification.
As in the backward case this information is transmitted either in the headers of a data packets to
the source or by transmitting separate control packets to the source.
Traffic shaping
Traffic shaping controls the rate at which packets are sent to the network based on previous-hop
or next-hop information. Traffic shaping is used in ATM networks
– Leaky Bucket
– Token Bucket
Leaky Bucket
The Leaky Bucket Algorithm(LBA) is a traffic shaping mechanism that controls the amount
and the rate of the traffic sent to the network.
LBA shapes bursty traffic into fixed rate traffic by averaging the data rate.
Basically it is implemented as a single-server queue with constant service time. The leaky
bucket enforces a constant output rate
If the buffer overflows then packets are discarded.
– Unlike Leaky bucket which discards packets token bucket discards tokens
– Leaky Bucket sends packets at an average rate while Token Bucket allows for bursts
– Token Bucket allows saving of tokens for later use to send large bursts while Leaky
Bucket does not allow saving.
Further reading :
Framing- Chapter 11 of Data Communication and Networking(Fourth Edition) by
Behrouz Forouzan
Flow control and ARQ--Chapter 7 of Data and Computer Communications 8th edition
by William Stalling
Congestion Control--- Chapter 13 of Data and Computer communication 8th edition
. by William Stalling
Appendix
ASCII control characters (character code 0-31)
The first 32 characters in the ASCII-table are unprintable control codes and are used to control
peripherals such as printers.