Data Link Layer: Framing & Flow Control
Data Link Layer: Framing & Flow Control
Data link layer: Design issues, Framing: fixed size framing, variable size framing, flow control,
error control, error detection and correction codes, CRC, Checksum: idea, one’s complement
internet checksum, services provided to Network Layer, Elementary Data Link Layer protocols:
simplex protocol, Simplex stop and wait, Simplex protocol for Noisy Channel.
Sliding window protocol: One bit, Go back N, Selective repeat-Stop and wait protocol, Data link
layer in HDLC: configuration and transfer modes, frames, control field, point to point protocol
(PPP): framing transition phase, multiplexing, multi link PPP.
Data-link layer is the second layer after the physical layer. The data link layer is responsible for
maintaining the data link between two hosts or nodes.
The data link layer is divided into two sub-layers :
1. Logical Link Control Sub-layer (LLC) –
Provides the logic for the data link, Thus it controls the synchronization, flow control, and error
checking functions of the data link layer. Functions are –
• (i) Error Recovery.
• (ii) It performs the flow control operations.
• (iii) User addressin
2. Media Access Control Sub-layer (MAC) –
It is the second sub-layer of data-link layer. It controls the flow and multiplexing for transmission
medium. Transmission of data packets is controlled by this layer. This layer is responsible for
sending the data over the network interface card.
Functions are –
• (i) To perform the control of access to media.
• (ii) It performs the unique addressing to stations directly connected to LAN.
• (iii) Detection of errors.
The data link layer is supposed to carry out many specified functions. It is responsible for
effective data communication between two directly connected transmitting and receiving
stations.
The data link layer has to carry out several specific functions and the following are the main
design issues of data link layer:
• Data transfer
• Frame synchronization
• Flow control
• Error control
• Addressing
• Link management.
Provide Services to the Network Layer
The data link layer provides a well -defined service interface to the network layer. The
principle of services is to transfer data from the network layer on the source machine to the
network layer on the destination machine.
The transfer is done through DDL(Dynamic -link layer). The data link layer takes services
from the physical layer and provides well -defined services to the network layer.
Frame synchronization is one form the design issues of data link layer. The source machine
sends data in a block called frame to the destination machine. The starting and ending of
each frame must be recognized by the destination machine.
For frame recognition, every frame comprises three parts, such as frame header, payload
field (contains data packet from the network layer) and trailer.
Flow Control
The source machine should not send a data frame at a fast data rate as compared to the
destination machine receiving data rate. When the sender sends the data at a high speed, the
slow receiver cannot able to handle it and the frame can lose in such cases.
There are two types of techniques that are used for flow control as follows.
The errors made in bits during transmission from source to destination machines must be
detected and corrected. The data link layer ensures error -free data transmission. For this,
two types of error control techniques are used in the data link layer are as follows.
Addressing is also one of the design issues of data link layer. On a multipoint line, the
identity of the individual machines must be specified while transmitting the data frames.
Each frame comprises a header in which the source and destination addresses are placed.
Link Management
The initiation, maintenance and termination of the link between the source and destination is
required for the effective exchange of data. The data link layer of the OSI Model handles
proper link management of connected devices.
Framing
In the physical layer, data transmission involves synchronized transmission of bits from the source to the
destination. The data link layer packs these bits into frames.
Data-link layer takes the packets from the Network Layer and encapsulates them into frames. If the frame
size becomes too large, then the packet may be divided into small sized frames. Smaller sized frames makes
flow control and error control more efficient.
Then, it sends each frame bit-by-bit on the hardware. At receiver’s end, data link layer picks up signals from
hardware and assembles them into frames.
Parts of a Frame
A frame has the following parts −
• Frame Header − It contains the source and the destination addresses of the frame.
• Payload field − It contains the message to be delivered.
• Trailer − It contains the error detection and error correction bits.
• Flag − It marks the beginning and end of the frame.
Types of Framing
Framing can be of two types, fixed sized framing and variable sized framing.
Fixed-sized Framing
Here the size of the frame is fixed and so the frame length acts as delimiter of the frame. Consequently, it
does not require additional boundary bits to identify the start and end of the frame.
Example − ATM cells.
• Drawback: It suffers from internal fragmentation if the data size is less than the frame size
• Solution: Padding
Variable – Sized Framing
In this, there is a need to define the end of the frame as well as the beginning of the next frame to
distinguish. This can be done in two ways:
1. Length field – We can introduce a length field in the frame to indicate the length of the frame. Used
in Ethernet(802.3). The problem with this is that sometimes the length field might get corrupted.
2. End Delimiter (ED) – We can introduce an ED(pattern) to indicate the end of the frame. Used
in Token Ring. The problem with this is that ED can occur in the data. This can be solved by:
1. Character/Byte Stuffing: Used when frames consist of characters. If data contains ED then, a byte
is stuffed into data to differentiate it from ED.
Let ED = “$” –> if data contains ‘$’ anywhere, it can be escaped using ‘\O’ character.
–> if data contains ‘\O$’ then, use ‘\O\O\O$'($ is escaped using \O and \O is escaped using \O).
Flow control is a technique that allows two stations working at different speeds to
communicate with each other. It is a set of measures taken to regulate the amount of data
that a sender sends so that a fast sender does not overwhelm a slow receiver. In data link
layer, flow control restricts the number of frames the sender can send before it waits for an
acknowledgment from the receiver.
Feedback based Flow Control: In these protocols, the sender sends frames after it has
received acknowledgments from the user. This is used in the data link layer.
Rate based Flow Control :These protocols have built in mechanisms to restrict the rate of
transmission of data without requiring acknowledgment from the receiver. This is used in
the network layer and the transport layer.
Flow Control Techniques in Data Link Layer
Data link layer uses feedback based flow control mechanisms. There are two main techniques −
Sliding Window
This protocol improves the efficiency of stop and wait protocol by allowing multiple frames to be
transmitted before receiving an acknowledgment.
The working principle of this protocol can be described as follows −
• Both the sender and the receiver has finite sized buffers called windows. The sender and the receiver
agrees upon the number of frames to be sent based upon the buffer size.
• The sender sends multiple frames in a sequence, without waiting for acknowledgment. When its
sending window is filled, it waits for acknowledgment. On receiving acknowledgment, it advances
the window and transmits the next frames, according to the number of acknowledgments received.
• For every frame that is sent, there needs to be an acknowledgment, which takes a similar amount of
propagation time to get back to the sender.
• Only one frame can be in transmission at a time. This leads to inefficiency if propagation delay is much
longer than the transmission delay
• Advantages of Stop and Wait:
• It’s simple and each frame is checked and acknowledged well.
• Disadvantages of Stop and Wait:
• Only one frame can be in transmission at a time.
• It is inefficient, if the distance between devices is long. Reason is propagation delay is much longer
than the transmission delay.
• The time spent for waiting acknowledgements between each frame can add significant amount to the
total transmission time
Error Control: Error control in the data link layer is based on ARQ (automatic repeat request), which is the
retransmission of data.
• The term error control refers to methods of error detection and retransmission.
• Anytime an error is detected in an exchange, specified frames are retransmitted. This process is called
ARQ Automatic Repeat Request).
To ensure reliable communication, there needs to exist flow control (managing the amount of data the sender
sends), and error control (that data arrives at the destination error free).
Error Detection
When bits are transmitted over the computer network, they are subject to get corrupted due to interference
and network problems. The corrupted bits leads to spurious data being received by the receiver and are
called errors.
Error detection techniques are responsible for checking whether an error has occurred or not in the frame
that has been transmitted via the network. It does not take into account the number of error bits and the type
of error.
For error detection, the sender needs to send some additional bits along with the data bits. The receiver
performs necessary checks based upon the additional redundant bits. If it finds that the data is free from
errors, it removes the redundant bits before passing the message to the upper layers.
There are three main techniques for detecting errors in data frames: Parity Check, Checksum and Cyclic
Redundancy Check (CRC).
Parity Bits
The parity check is done by adding an extra bit, called parity bit, to the data to make the number of 1s either
even or odd depending upon the type of parity. The parity check is suitable for single bit error detection
only.
The two types of parity checking are
• Even Parity − Here the total number of bits in the message is made even.
• Odd Parity − Here the total number of bits in the message is made odd.
Receiver’s End − On receiving a frame, the receiver counts the number of 1s in it. In case of even parity
check, if the count of 1s is even, the frame is accepted, otherwise, it is rejected. In case of odd parity check,
if the count of 1s is odd, the frame is accepted, otherwise, it is rejected.
Example
Suppose that a sender wants to send the data 1001101 using even parity check method. It will add the parity
bit as shown below.
The receiver will decide whether an error has occurred by counting whether the total number
of 1s is even.
Cyclic Redundancy Check (CRC):
• CRC is based on binary division.
• A sequence of redundant bits called CRC or the CRC remainder is appended to the end of a data unit, so
that the resulting data unit becomes exactly divisible by a second, predetermined binary number.
• At its destination, the incoming data unit is divided by the same number. If at this step there is no
remainder, the data unit is assumed to be intact and therefore is accepted.
Following are the steps used in CRC for error detection:
o In CRC technique, a string of n 0s is appended to the data unit, and this n number is less than the
number of bits in a predetermined number, known as division which is n+1 bits.
o Secondly, the newly extended data is divided by a divisor using a process is known as binary
division. The remainder generated from this division is known as CRC remainder.
o Thirdly, the CRC remainder replaces the appended 0s at the end of the original data. This newly
generated unit is sent to the receiver.
o The receiver receives the data followed by the CRC remainder. The receiver will treat this whole unit
as a single unit, and it is divided by the same divisor that was used to find the CRC remainder.
If the resultant of this division is zero which means that it has no error, and the data is accepted.
If the resultant of this division is not zero which means that the data consists of an error. Therefore, the data
is discarded.
Example
CRC Generator
o A CRC generator uses a modulo-2 division. Firstly, three zeroes are appended at the end of the data
as the length of the divisor is 4 and we know that the length of the string 0s to be appended is always
one less than the length of the divisor.
o Now, the string becomes 11100000, and the resultant string is divided by the divisor 1001.
o The remainder generated from the binary division is known as CRC remainder. The generated value
of the CRC remainder is 111.
o CRC remainder replaces the appended string of 0s at the end of the data unit, and the final string
would be 11100111 which is sent across the network.
CRC Checker
o The functionality of the CRC checker is similar to the CRC generator.
o When the string 11100111 is received at the receiving end, then CRC checker performs the modulo-2
division.
o A string is divided by the same divisor, i.e., 1001.
o In this case, CRC checker generates the remainder of zero. Therefore, the data is accepted.
Checksum
• There are two algorithms involved in this process, checksum generator at sender end and checksum
checker at receiver end.
Error Detection by Checksums
For error detection by checksums, data is divided into fixed sized frames or segments.
• Sender’s End − The sender adds the segments using 1’s complement arithmetic to get the sum. It
then complements the sum to get the checksum and sends it along with the data frames.
• Receiver’s End − The receiver adds the incoming segments along with the checksum using 1’s
complement arithmetic to get the sum and then complements it.
If the result is zero, the received frames are accepted; otherwise they are discarded.
Example
Suppose that the sender wants to send 4 frames each of 8 bits, where the frames are 11001100, 10101010,
11110000 and 11000011.
The sender adds the bits using 1s complement arithmetic. While adding two numbers using 1s complement
arithmetic, if there is a carry over, it is added to the sum.
After adding all the 4 frames, the sender complements the sum to get the checksum, 11010011, and sends it
along with the data frames.
The receiver performs 1s complement arithmetic sum of all the frames including the checksum. The result is
complemented and found to be 0. Hence, the receiver assumes that no error has occurred.
Error Correction:
• Error correction in data link layer is implemented simply anytime.
• An error is detected in an exchange, a negative acknowledgement NAK is returned and the specified
frames are retransmitted. This process is called Automatic Repeat Request (ARQ).
• Retransmission of data happens in three Cases: Damaged frame, Lost frame and Lost acknowledgement.
1. Stop-and-Wait ARQ : Stop-and-Wait ARQ is also known as alternating bit protocol. It is
one of simplest flow and error control techniques or mechanisms. This mechanism is
generally required in telecommunications to transmit data or information among two
connected devices. Receiver simply indicates its readiness to receive data for each frame. In
these, sender sends information or data packet to receiver. Sender then stops and waits for
ACK (Acknowledgment) from receiver. Further, if ACK does not arrive within given time
period i.e., time-out, sender then again resends frame and waits for ACK. But, if sender
receives ACK, then it will transmit the next data packet to receiver and then again wait for
ACK from receiver. This process to stop and wait continues until sender has no data frame
or packet to send.
2. Sliding Window ARQ : This technique is generally used for continuous transmission error
control. It is further categorized into two categories as given below :
• Go-Back-N ARQ : Go-Back-N ARQ is form of ARQ protocol in which transmission process
continues to send or transmit total number of frames that are specified by window size even without
receiving an ACK (Acknowledgement) packet from the receiver. It uses sliding window flow control
protocol. If no errors occur, then operation is identical to sliding window.
Piggybacking Protocol
In some protocols data frames flow in only one direction although control information such as ACK and
NAK frames can travel in the other direction. In real life, data frames are normally flowing in both
directions, from node A to node B and from node B to node A. This means that the control information also
needs to flow in both directions.
A technique called piggybacking is used to improve the efficiency of the bidirectional protocols.
When a frame is carrying data from A to B, it can also carry control information about arrived (or lost)
frames from B; when a frame is carrying data from B to A, it can also carry control information about the
arrived (or lost) frames from A.
The design for a Go-Back-N ARQ using piggybacking is in the following figure.
• Selective Repeat ARQ : Selective Repeat ARQ is also form of ARQ protocol in which only
suspected or damaged or lost data frames are only retransmitted. This technique is similar to Go -
Back-N ARQ though much more efficient than the Go-Back-N ARQ technique due to reason that it
reduces number of retransmission. In this, the sender only retransmits frames for which NAK is
received. But this technique is used less because of more complexity at sender and receiver and each
frame must be needed to acknowledged individually.
We know that the bits 0 and 1 corresponding to two different range of analog voltages. So, during
transmission of binary data from one system to the other, the noise may also be added. Due to this, there may
be errors in the received data at other system.
That means a bit 0 may change to 1 or a bit 1 may change to 0. We can’t avoid the interference of noise. But,
we can get back the original data first by detecting whether any errors s present and then correcting those
errors. For this purpose, we can use the following codes.
• Error detection codes
• Error correction codes
• Error detection codes − are used to detect the errors s present in the received data bitstream. These
codes contain some bits s, which are included appended appended to the original bit stream. These
codes detect the error, if it is occurred during transmission of the original data bitstream
Example − Parity code, Hamming code.
• Error correction codes − are used to correct the errors s present in the received data bitstream so
that, we will get the original data. Error correction codes also use the similar strategy of error
detection codes. Example − Hamming code.
• Therefore, to detect and correct the errors, additional bits s are appended to the data bits at the time of
transmission.
Parity Code
It is easy to include append one parity bit either to the left of MSB or to the right of LSB of original bit
stream. There are two types of parity codes, namely even parity code and odd parity code based on the type
of parity being chosen.
000 0 0000
001 1 0011
010 1 0101
011 0 0110
100 1 1001
101 0 1010
110 0 1100
111 1 1111
Here, the number of bits present in the even parity codes is 4. So, the possible even number of ones in these
even parity codes are 0, 2 & 4.
• If the other system receives one of these even parity codes, then there is no error in the received data.
The bits other than even parity bit are same as that of binary code.
• If the other system receives other than even parity codes, then there will be an errorss in the received
data. In this case, we can’t predict the original binary code because we don’t know the bit
positionss of error.
Therefore, even parity bit is useful only for detection of error in the received parity code. But, it is not
sufficient to correct the error.
Odd Parity Code
The value of odd parity bit should be zero, if odd number of ones present in the binary code. Otherwise, it
should be one. So that, odd number of ones present in odd parity code. Odd parity code contains the data
bits and odd parity bit.
The following table shows the odd parity codes corresponding to each 3-bit binary code. Here, the odd
parity bit is included to the right of LSB of binary code.
Binary Odd Odd
Code Parity bit Parity
Code
000 1 0001
001 0 0010
010 0 0100
011 1 0111
100 0 1000
101 1 1011
110 1 1101
111 0 1110
Here, the number of bits present in the odd parity codes is 4. So, the possible odd number of ones in these
odd parity codes are 1 & 3.
• If the other system receives one of these odd parity codes, then there is no error in the received data.
The bits other than odd parity bit are same as that of binary code.
• If the other system receives other than odd parity codes, then there is an errors s in the received data.
In this case, we can’t predict the original binary code because we don’t know the bit positions s of
error.
Therefore, odd parity bit is useful only for detection of error in the received parity code. But, it is not
sufficient to correct the error.
Hamming code
Hamming code is a set of error-correction codes that can be used to detect and correct the errors that
can occur when the data is moved or stored from the sender to the receiver. It is a technique developed by
R.W. Hamming for error correction. Redundant bits – Redundant bits are extra binary bits that are
generated and added to the information-carrying bits of data transfer to ensure that no bits were lost during
the data transfer. The number of redundant bits can be calculated using the following formula:
2^r ≥ m + r + 1
where, r = redundant bit, m = data bit
Suppose the number of data bits is 7, then the number of redundant bits can be calculated using: = 2^4 ≥ 7
+ 4 + 1 Thus, the number of redundant bits= 4 Parity bits. A parity bit is a bit appended to a data of
binary bits to ensure that the total number of 1’s in the data is even or odd. Parity bits are used for error
detection. There are two types of parity bits:
1. Even parity bit: In the case of even parity, for a given set of bits, the number of 1’s are counted. If
that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1’s an even
number. If the total number of 1’s in a given set of bits is already even, the parity bit’s value is 0.
2. Odd Parity bit – In the case of odd parity, for a given set of bits, the number of 1’s are counted. If that
count is even, the parity bit value is set to 1, making the total count of occurrences of 1’s an odd
number. If the total number of 1’s in a given set of bits is already odd, the parity bit’s value is 0.
General Algorithm of Hamming code: Hamming Code is simply the use of extra parity bits to allow the
identification of an error.
1. Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc).
2. All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc).
3. All the other bit positions are marked as data bits.
4. Each data bit is included in a unique set of parity bits, as determined its bit position in binary
form. a. Parity bit 1 covers all the bits positions whose binary representation includes a 1 in the least
significant position (1, 3, 5, 7, 9, 11, etc). b. Parity bit 2 covers all the bits positions whose binary
representation includes a 1 in the second position from the least significant bit (2, 3, 6, 7, 10, 11,
etc). c. Parity bit 4 covers all the bits positions whose binary representation includes a 1 in the third
position from the least significant bit (4–7, 12–15, 20–23, etc). d. Parity bit 8 covers all the bits
positions whose binary representation includes a 1 in the fourth position from the least significant bit
bits (8–15, 24–31, 40–47, etc). e. In general, each parity bit covers all bits where the bitwise AND of
the parity position and the bit position is non-zero.
5. Since we check for even parity set a parity bit to 1 if the total number of ones in the positions it checks
is odd.
6. Set a parity bit to 0 if the total number of ones in the positions it checks is even.
Determining the position of redundant bits – These redundancy bits are placed at positions that
correspond to the power of 2.
As in the above example:
• The number of data bits = 7
• The number of redundant bits = 4
• The total number of bits = 11
• The redundant bits are placed at positions corresponding to power of 2- 1, 2, 4, and 8
• Suppose the data to be transmitted is 1011001, the bits will be placed as follows:
• To find the redundant bit R1, we check for even parity. Since the total number of 1’s in all the bit
positions corresponding to R1 is an even number the value of R1 (parity bit’s value) = 0
• R2 bit is calculated using parity check at all the bits positions whose binary representation includes a 1
in the second position from the least significant bit. R2: bits 2,3,6,7,10,11
• To find the redundant bit R2, we check for even parity. Since the total number of 1’s in all the bit
positions corresponding to R2 is odd the value of R2(parity bit’s value)=1
• R4 bit is calculated using parity check at all the bits positions whose binary representation includes a 1
in the third position from the least significant bit. R4: bits 4, 5, 6, 7
1. To find the redundant bit R4, we check for even parity. Since the total number of 1’s in all the bit
positions corresponding to R4 is odd the value of R4(parity bit’s value) = 1
2. R8 bit is calculated using parity check at all the bits positions whose binary representation includes a 1
in the fourth position from the least significant bit. R8: bit
8,9,10,11
• To find the redundant bit R8, we check for even parity. Since the total number of 1’s in all the bit
positions corresponding to R8 is an even number the value of R8(parity bit’s value)=0. Thus, the data
transferred is:
Error detection and correction: Suppose in the above example the 6th bit is changed from 0 to 1 during
data transmission, then it gives new parity values in the binary number:
The bits give the binary number 0110 whose decimal representation is 6. Thus, bit 6 contains an error. To
correct the error the 6th bit is changed from 1 to 0.
Data transfer is only in one direction, consider separate sender and receiver, finite processing capacity and
speed at the receiver, since it is a noisy channel, errors in data frames or acknowledgement frames are
expected. Every frame has a unique sequence number.
After a frame has been transmitted, the timer is started for a finite time. Before the timer expires, if the
acknowledgement is not received , the frame gets retransmitted, when the acknowledgement gets corrupted
or sent data frames gets damaged, how long the sender should wait to transmit the next frame is infinite.
The Simplex Protocol for Noisy Channel is diagrammatically represented as follows −
Data link layer in HDLC
HDLC (High-Level Data Link Control) is a bit-oriented protocol that is used for communication over
the point-to-point and multipoint links. This protocol implements the mechanism of ARQ(Automatic
Repeat Request). With the help of the HDLC protocol,full-duplex communication is possible.
HDLC is the most widely used protocol and offers reliability, efficiency, and a high level of Flexibility.
In order to make the HDLC protocol applicable for various network configurations, there are three types of
stations and these are as follows:
• Primary Station This station mainly looks after data like management. In the case of the
communication between the primary and secondary station; it is the responsibility of the primary
station to connect and disconnect the data link. The frames issued by the primary station are
commonly known as commands.
• Secondary Station The secondary station operates under the control of the primary station. The
Frames issued by the secondary stations are commonly known as responses.
• Combined Station The combined station acts as both Primary stations as well as Secondary stations.
The combined station issues both commands as well as responses.
Types of Configurations :
HDLC generally explains different types of configurations for different types of stations
i.e., Primary station, Secondary station, and Combined station. Configuration simply means
relationship among various hardware devices on a link. These different configurations are
given below :
1. Unbalanced Configuration :
Unbalanced Configuration is generally required for Primary stations. In this configuration, one station
is primary and all stations are secondary. This configuration mainly arises due to reason that Primary
Stations are basically used as controlling stations that control secondary station on data link. It also
consists of two or more secondary stations. It supports the following operations :
• Both mode of transmission i.e., Full duplex and Half-duplex
• Both mode of networks i.e., Point-to-Point and Multi-Point networks
Example –
2. Balanced Configuration:
Balanced Configuration is generally required for Combined stations. This configuration consists of two
combined stations that have equal and complementary responsibilities to enhance and emphasize the
working and qualities of each other as shown below in the diagram. It supports only specific operations as
given below :
• Both mode of transmission i.e. Full duplex and half-duplex, or
• One mode of network i.e. Point-to-Point
Example –
[Link]:
Symmetrical Configuration is generally required for Secondary stations that are usually combined with
Primary stations. This configuration consists of exactly two nodes i.e. two independent point-to-point
unbalanced station configurations.
Sometimes, it is also a combination of balanced and unbalanced configurations. This configuration is
rarely used in present technologies. Each of stations in network has basically two different kinds of status
out of which one is Primary status and other one is Secondary status. Even each of station is generally
considered as two stations logically.
Example –
The HDLC protocol offers two modes of transfer that mainly can be used in different configurations. These
are as follows:
In this mode, the configuration of the station is unbalanced. There are one primary station and multiple
secondary stations. Where the primary station can send the commands and the secondary station can only
respond.
In this mode, the configuration of the station is balanced. In this mode, the link is point-to-point, and each
station can function as a primary and as secondary.
In order to provide the flexibility that is necessary to support all the options possible in the modes and
Configurations that are just described above. There are three types of frames defined in the HDLC:
• Information Frames(I-frames) These frames are used to transport the user data and the control
information that is related to the user data. If the first bit of the control field is 0 then it is identified
as I-frame.
• Supervisory Frames(S-frames) These frames are only used to transport the control information. If
the first two bits of the control field are 1 and 0 then the frame is identified as S-frame
• Unnumbered Frames(U-Frames) These frames are mainly reserved for system [Link]
frames are used for exchanging control information between the communicating devices.
1. Flag Field
This field of the HDLC frame is mainly a sequence of 8-bit having the bit pattern 01111110 and it is used to
identify the beginning and end of the frame. The flag field mainly serves as a synchronization pattern for the
receiver.
2. Address Field
It is the second field of the HDLC frame and it mainly contains the address of the secondary station. This
field can be 1 byte or several bytes long which mainly depends upon the need of the network. In case if the
frame is sent by the primary station, then this field contains the address(es) of the secondary stations. If the
frame is sent by the secondary station, then this field contains the address of the primary station.
3. Control Field
This is the third field of the HDLC frame and it is a 1 or 2-byte segment of the frame and is mainly used for
flow control and error control. Bits interpretation in this field mainly depends upon the type of the frame.
4. Information Field
This field of the HDLC frame contains the user's data from the network layer or the management
information. The length of this field varies from one network to another.
5. FCS Field
FCS means Frame check sequence and it is the error detection field in the HDLC protocol. There is a 16 bit
CRC code for error detection.
Point-to-Point Protocol
PPP(Point-To-Point) protocol is a protocol used in the data link layer. The PPP protocol is mainly used to
establish a direct connection between two nodes.
• This protocol defines how two devices can authenticate with each other.
• PPP protocol also defines the format of the frames that are to be exchanged between the devices.
• This protocol also defines how the data of the network layer are encapsulated in the data link frame.
• The PPP protocol defines how the two devices can negotiate the establishment of the link and then
can exchange the data.
• This protocol provides multiple services of the network layer and also supports various network-layer
protocols.
• This protocol also provides connection over multiple links.
Some services that are not offered by the PPP protocol are as follows:
1. This protocol does not provide a flow control mechanism. Because when using this protocol the
sender can send any number of frames to the receiver one after the other without even thinking about
overwhelming the receiver.
2. This protocol does not provide any mechanism for addressing in order to handle the frames in the
multipoint configuration.
3. The PPP protocol provides a very simple mechanism for error control. There is a CRC field that
detects the errors. In case if there is a corrupted frame then it is discarded silently.
In the PPP protocol, the framing is done using the byte-oriented technique.
The PPP frame mainly starts and ends with a 1-byte flag field that has the bit pattern: 01111110. It is
important to note that this pattern is the same as the flag pattern used in HDLC. But there is a difference too
and that is PPP is a byte-oriented protocol whereas the HDLC is a bit-oriented protocol.
2. Address
The value of this field in PPP protocol is constant and it is set to 11111111 which is a broadcast address. The
two parties can negotiate and can omit this byte.
3. Control
The value of this field is also a constant value of 11000000. We have already told you that PPP does not
provide any flow control and also error control is limited to error detection. The two parties can negotiate
and can omit this byte.
4. Protocol
This field defines what is being carried in the data field. It can either be user information or other
information. By default, this field is 2 bytes long.
5. Payload field
This field carries the data from the network layer. The maximum length of this field is 1500 bytes. This can
also be negotiated between the endpoints of communication.
6. FCS
As we have told you that the major difference between PPP and HDLC is that PPP is a byte-oriented
protocol. It means that the flag in the PPP is a byte and it is needed to be escaped wherever it appears in the
data section of the frame.
The escape byte is 011111101 which means whenever the flag-like pattern appears in the data then the extra
byte is stuffed that mainly tells the receiver that the next byte is not a flag.
The PPP protocol has to go through various phases and these are shown in the diagram given below;
Dead
In this phase, the link is not being [Link] active carrier is there at the physical layer and the line is simply
quiet.
Establish
If one of the nodes starts the communication then the connection goes into the established phase. In this
phase, options are negotiated between the two parties. In case if the negotiation is done successfully then the
system goes into the Authenticate phase (in case if there is the requirement of authentication otherwise goes
into the network phase.)
Authenticate
This is an optional phase. During the establishment phase, the two nodes may decide not to skip this phase.
If the two nodes decide to proceed with the authentication then they send several authentication packets.
If the result of this is successful then the connection goes into the networking phase otherwise goes into the
termination phase.
Network
In this phase, the negotiation of the protocols of the network layer takes place. The PPP protocol specifies
that the two nodes establish an agreement of the network layer before the data at the network layer can be
exchanged. The reason behind this is PPP supports multiple protocols at the network layer.
In case if any node is running multiple protocols at the network layer simultaneously then the receiving node
needs to know that which protocol will receive the data.
Open
In this phase the transfer of the data takes place. Whenever a connection reaches this phase, then the
exchange of data packets can be started. The Connection remains in this phase until one of the endpoints in
the communication terminates the connection.
Terminate
In this phase, the connection is terminated. There is an exchange of several packets between two ends for
house cleaning and then closing the link.
Multiplexing
Multiplexing is a technique by which different analog and digital streams of transmission can be
simultaneously processed over a shared link. Multiplexing divides the high capacity medium into low
capacity logical medium which is then shared by different streams.
Communication is possible over the air (radio frequency), using a physical media (cable), and light (optical
fiber). All mediums are capable of multiplexing.
When multiple senders try to send over a single medium, a device called Multiplexer divides the physical
channel and allocates one to each. On the other end of communication, a De-multiplexer receives data from
a single medium, identifies each, and sends to different receivers.
Frequency Division Multiplexing
When the carrier is frequency, FDM is used. FDM is an analog technology. FDM divides the spectrum or
carrier bandwidth in logical channels and allocates one user to each channel. Each user can use the channel
frequency independently and has exclusive access of it. All channels are divided in such a way that they do
not overlap with each other. Channels are separated by guard bands. Guard band is a frequency which is not
used by either channel.
Further, on each wavelength time division multiplexing can be incorporated to accommodate more data
signals.
Code Division Multiplexing
Multiple data signals can be transmitted over a single frequency by using Code Division Multiplexing. FDM
divides the frequency in smaller channels but CDM allows its users to full bandwidth and transmit signals all
the time using a unique code. CDM uses orthogonal codes to spread signals.
Each station is assigned with a unique code, called chip. Signals travel with these codes independently,
inside the whole [Link] receiver knows in advance the chip code signal it has to receive.
What is MLPPP?
MLPPP (Multilink Point-to-Point Protocol) is the protocol that bundles multiple serial wan links into a
one Logical Bundle. As a name, PPP Multilink, MLP and MP are also used for MLPPP (Multilink Point-
to-Point Protocol).
There can be multiple PPP serial links between two nodes. With MLPPP, these links are
bundled and become a single logical link.
In PPP Multilink, Load Balancing is used between the member links of the Logical Link. The traffic is
shared between each link of these links. Load Balancing is used with fragmentation in MLPPP.
MLPPP provide Fault Tolerance with multiple links to the same destination. If one of the links between the
nodes fails, the link stays up and the communication continues. With this mechanism, MLPPP also
provide redundacy between links.
Easiness in Layer 3
The Layer 3 configuration, IP configurations and Routing Protocol configurations are done on the Logical
interface of PPP Multilink. So, MLPPP provides also a Layer 3 configuration easiness.
MLPPP Fragmentation
In MLPPP (PPP Multilink) , packet fragmentation is also supported beside load balancing. With packet
fragmentation, the packets that are fragmented are sent at the same time in different members of the Logical
Bundle.
Here, if the coming packet has MLPPP Header, it is fragmented and sequenced and at the
other end it is reassembled. If it is not, the packet is not sequenced and send only as first
come first sent.
In TCP/IP Model, PPP Multilink works in the Network Interface Layer like PPP. But it is above the PPP
in the hierarchy.