Synchronous and Asynchronous transmission
• The action of transferring data or anything from one place to other is
referred to as transmission.
• It is a method of sharing data between two devices linked by a
network, also known as communication mode.
• Serial data transmission sends data bits one after another over a
single channel.
• Parallel data transmission sends multiple data bits at the same time
over multiple channels.
• Serial transmission occurs in one of two ways: asynchronous or
synchronous.
Asynchronous transmission:
• Asynchronous transmission is named because the timing of a signal is
unimportant.
• Data is transferred as groups of bit stream into bytes.
• Each group usually eight bits is sent along the link as a unit.
• Without a synchronizing pulse, the receiver cannot use timing to
predict when the next group will arrive.
• To alert the receiver to the arrival of a new group, therefore an extra
bit is added to the beginning of each byte.
• This bit usually a 0 is called the start bit.
• Receiver knows that the byte is finished by stop bit of 1.
• With this method, each byte is increased in size to atleast 10 bits, of
which 8 are information and 2 are signals to the receiver.
• In asynchronous transmission, we send one start bit (0) at the
beginning and one or more stop bits (1s) at the end of each byte.
• There may be gap between each byte.
• It is a form of transmission in which the transmitter and receiver have
their own internal clocks and hence don't require an external common
clock pulse.
• The data transfer rate is slow.
• It is simple and cost-effective.
• The time delay between two transmissions is random.
• Some examples of asynchronous transmission are emails, letters,
forums, etc.
Synchronous Transmission:
• Synchronous transmission is an effective and dependable method of sending
huge amounts of data.
• The data travels in a full-duplex method in the type of frames or blocks in
Synchronous Transmission.
• The transmitter and receiver must be synced so that the sender knows where to
start the new byte.
• As a result, every data block is marked with synchronization characters, and the
receiving device obtains the data until a certain ending character is found.
• It also allows connected devices to interact in real time. Synchronous
transmission can be seen in chat rooms, video conferencing,
telephonic talks, and face-to-face interactions.
Advantages
• It aids the user in transferring a huge amount of data.
• Every byte is sent without a pause before the next.
• It also helps to reduce timing errors.
• It allows connected devices to communicate in real-time.
• It is faster than asynchronous transmission.
Interfacing:
• An interface is a device and/or set of rules to match the output of one device to send
information to the input of another device.
• An interface usually requires: (i) a physical connection, (ii) the hardware (iii) rules and
procedures and last (iv) the software.
• Interfacing is the process of connecting devices together so that they can exchange
information.
• There are two terms in computer networking such as Data terminal equipment (DTE)
and Data circuit-terminating equipment (DCE).
• There are four basic functional units involved in the communication of data: a DTE and
DCE on one end and a DCE and DTE on the other end as shown in fig.
• The DTE generates the data and passes them, along with any necessary control
characters , to a DCE.
• The DCE converts the signal to a format appropriate to the transmission medium
and introduces it onto the network link.
• When the signal arrives at the receiving end, this process is reversed.
Data Terminal Equipment (DTE):
• It is equipment that works either as the source or the destination for binary digital
communication.
• This equipment resides at the physical layer generating or consuming binary
digital data.
• At the physical layer, this technique can be a computer, routers, printer, terminal,
or any other device.
• DTEs do not often communicate directly with one another, they generate and
consume information but need an intermediary to be able to communicate.
Data Circuit-Terminating Equipment (DCE)
• It includes any functional unit that transmits or receives data in the form of an
analog or digital signal through a network.
• At the physical layer, a DCE takes data generated by a DTE, converts them to an
appropriate signal and then introduces the signal onto the telecommunication link.
• Commonly used DCEs include modems (modulator/demodulator).
• In any network, a DTE generates digital data and passes them to a DCE, the DCE
converts the data to a form acceptable to the transmission medium and sends the
converted signal to another DCE on the network.
• The second DCE takes the signal off the line, converts it to a form usable by its
DTE and delivers it.
Standards:
• Standards to specify the nature of interface between DTE and DCE with four
important characteristics such as mechanical, electrical, functional and
procedural.
• of the organizations involved in DTE-DCE interface standards, the most active are
the Electronics Industries Association (EIA) and International
Telecommunication Union- Telecommunication standards committee
(ITU-T).
EIA-232 interface:
• EIA-232 defines the mechanical, electrical and fundamental characteristics of the
interface between a DTE and a DCE.
Mechanical specification:
• The mechanical specification of the EIA-232 standard defines the interface as a 25
wire cable with a male and female DB-25 pin connector attached to either end.
• A DB-25 connector is a plug with 25 pins or receptacles, each of which is attached
to a single wire with a specific function.
Electrical specification:
• EIA-232 states that all data must be transmitted as logical 1s and 0s using NRZ-L
encoding with 0 defined as a positive voltage and 1 defined as a negative voltage.
• EIA-232 defines two distinct ranges one for positive voltage and one for negative
voltage.
• To be recognized as data, the amplitude of a signal must fall between 3 and 15
volts or between -3 or -15 volts as shown in fig.
Control and Timing:
• Only 4 wires out of 25 available in an EIA-232 interface are used for data
functions.
• The remaining 21 are used for functions like control, timing, grounding and
testing.
• EIA-232 allows a maximum bit rate of 20kbps.
MODEMS:
• Modem is a type of DCE, which has two functional entities such as a signal
modulator and a signal demodulator.
• A modulator converts a digital signal into an analog signal using ASK,FSK,PSK
or QAM.
• A demodulator converts an analog-to-digital convertor.
• Fig shows the relationship of modems to a communication link.
• The two PCs at the ends are the DTEs , the modems are the DCEs .
Data Link Control:
• The three most important functions of Data link layer are line discipline, flow
control and error control.
• Line discipline(Access control) coordinates the link systems. It determines which
device can send and when it can send.
• flow control coordinates the amount of data that can be sent before receiving
acknowledgement. It also provides the receivers acknowledgement of frames
received and so is linked to error control.
• error control means error detection and correction. it allows the receiver to
inform the sender of any frames lost or damage in transmission and coordinates
the retransmission of those frames by the sender.
Line discipline:
• The line discipline functions of the data link layer oversee the establishment of
links and the right of a particular device to transmit at a given time.
• Line discipline can be done in two ways:
enquiry/acknowledgement(ENQ/ACK) and poll/select.
ENQ/ACK:
• enquiry/acknowledgement is used primarily in systems, when there is a dedicated
link between two devices so the only device capable of receiving the transmission
is the intended one.
• It coordinates which device may start a transmission.
• A session can be initiated by either station on a link as long as both are of equal
rank.
How it works?
• The initiator first transmits a frame called an enquiry(ENQ) asking if the receiver
is available to receive data.
• The receiver must answer either with an acknowledgement(ACK) frame if it is
ready to receive or with a negative acknowledgement (NAK) frame if it is not.
• If neither an ACK nor a NAK is received within a specified time limit, the initiator
assumes that the ENQ frame was lost in transit, disconnects and sends a
replacement.
• If the response to the ENQ is negative for three attempts, the initiator disconnects
and begins the process again at another time.
• If the response is positive, the initiator is free to send the data.
• Once all the data has been transmitted, the sending system finishes with an end of
transmission (EOF) frame.
Poll/Select:
• The poll/select method of line discipline works with topologies where one device
is designated as a primary station and the other devices are secondary stations.
How it works?
• Whenever a multipoint link consists of primary device and multiple secondary
devices using a single transmission line, all the exchanges must be made through
the primary device even when the ultimate destination is a secondary device.
• The primary device controls the link, and the secondary device follow its
instructions.
• The primary therefore is always the initiator of a session.
• If primary wants to receive data, it asks secondary if they have anything to send,
this function is called Pooling.
• If the primary wants to send data, it tells the target secondary to get ready to
receive , this function is called selecting.
Flow Control:
• Flow control is a set of procedures that tells the sender how much data it can
transmit before it must wait for acknowledgement from the receiver.
• Any receiving device has a limited speed at which it can process incoming data
and a limited amount of memory in which to store incoming data.
• Incoming data must be checked and processed before they can be used.
• The rate of such processing is often slower than the rate of transmission. For this
reason, receiving device has a block of memory called a buffer, reserved for
storing incoming data until they are processed.
• If the buffer begins to fill up, the receiver must be able to tell the sender to halt
transmission until it is once again able to receive.
• Two methods have been developed to control the flow of data across
communication links: Stop-and-wait, Sliding window.
Stop-and-Wait:
• In a stop-and-wait method of flow control, the sender waits for an acknowledge
ment after every frame it sends.
• Only when an acknowledgement has been received is the next frame sent.
• This process of alternatively sending and waiting repeats until the sender transmits
an end of transmission (EOT) frame.
• The advantage of stop-and-wait is simplicity, each frame is checked and
acknowledged before the next frame sent.
• The disadvantage is inefficiency: it is slow, each frame must travel all the way to
the receiver, and an acknowledgement must travel all the way back before the next
frame can be sent.
• If the distance between devices is long, the time spent waiting for ACKs between
each frame can add significantly to the total transmission time.
Sliding Window:
• In the sliding window method of flow control, the sender can transmit several
frames before needing an acknowledgement.
• The receiver acknowledges only some of the data frames, using a single ACK to
confirm the receipt of multiple data frames.
• The sliding window refers to imaginary boxes at both the sender and receiver.
• This window can hold frames at either end and provides the upper limit on the
number frames that can be transmitted before requiring an acknowledgement.
• To keep track of which frames have been transmitted and which received, sliding
window introduces an identification scheme based on the size of the window.
• If size of window n=8, the frames numbered 0,1,2,3,4,5,6,7,0,1,2,3,…
• When the receiver sends an ACK , it includes the number of the next frame it
expects to receive.
• When the sender sees an ACK with the number 5, it knows that all the
frames up through number 4 have been received.
Sender Window:
• At the beginning of a transmission, the sender’s window contains n-1 frames.
• As frames are sent out, the left boundary of the window moves inward, shrinking
the size of the window.
• Given a window size w, if three frames have been transmitted since
the last acknowledgement, then the number of frames left in the
window is w-3.
• Once an acknowledgement arrives , the window expands to allow in a
number of frames equal to the number of frames acknowledged by
that ACK.
• For example, the size of the window is 7, and if frames 0
through 4 have been sent out and no acknowledgement has
arrived, then the sender window contains only two frames,
i.e., 5 and 6.
• Now, if ACK has arrived with a number 4 which means that
0 through 3 frames have arrived undamaged and the
sender window is expanded to include the next four frames.
Therefore, the sender window contains six frames
5,6,7,0,1,2.
Receiver Window
• At the beginning of transmission, the receiver window does not contain n frames,
but it contains n-1 spaces for frames.
• When the new frame arrives, the size of the window shrinks.
• The receiver window does not represent the number of frames received, but it
represents the number of frames that may still be received before an ACK is sent.
• For example, the size of the window is w, if three frames are received then the
number of spaces available in the window is (w-3).
• Once the acknowledgement is sent, the receiver window expands by the number
equal to the number of frames acknowledged.
• Suppose the size of the window is 7 means that the receiver window contains
seven spaces for seven frames.
• If the one frame is received, then the receiver window shrinks and moving the
boundary from 0 to 1.
• In this way, window shrinks one by one, so window now contains the six spaces.
• If frames from 0 through 4 have sent, then the window contains two spaces before
an acknowledgement is sent.
Error Control:
• Error control refers to the methods of error detection and retransmission.
Automatic Repeat Request(ARQ):
• Error correction in the data link layer is implemented simply: anytime 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.
• Retransmission of data frames occurred in three cases: lost frame,
damaged frame and lost acknowledgement.
Categories of Error control:
• Stop-and-wait ARQ
• Sliding window ARQ : i) Go-back n
ii) Selective reject
Stop-and-Wait ARQ:
• It is a form of stop-and-wait flow control extended to include retransmission of
data in case of lost or damaged frames. For retransmission to work, four features
are added to the basic control flow.
• The sending device keeps copy of the last frame transmitted until it receives an
ACK for that frame.
• Alternative sequence numbers 0 and 1 given to data and ack frames. A data 0
frame is acknowledged by an ack 1 frame indicating that the receiver got frmae
0and is now expecting frame1.
• If an error is discovered in a data frame, indicating that it is corrupted in transit, a
NAK frame is returned.
• The sender device equipped with a timer. If an expected ACK is not received
within an allotted time period , the sender assumes that the last data frame was lost
in transit and sends it again.
Damaged frames:
when a frame is discovered by the receiver to contain an error, it returns
a NAK frame and sender retransmits the last frame.
Lost frame:
• The sender is equipped with a timer that starts every time a data frame is
transmitted.
• If the frame never makes it to the receiver, the receiver never acknowledge it
positively or negatively.
• The sending device waits for an ACK or NAK frame until its timer goes off. It
retransmits the last frame, restarts its times and waits for an ACK.
Lost Acknowledgement:
• In this case, the data frame made it to the receiver and has been found to be either
acceptable or not acceptable.
• But the ACK or NAK frame returned by the receiver is lost in transit.
• The sending device waits until its timer goes off, then retransmits the data frame.
Sliding Window ARQ:
• Among the several popular mechanisms for continuous transmission error control,
two protocols are the most popular: go-back-n ARQ and selective-reject ARQ.
• The sending device keeps copies of all transmitted frames until they have been
acknowledged.
• The data frames that are received without errors do not have to be acknowledged
individually.
• If the last ACK was numbered 3, an ACK 6 acknowledges the receipt of frames 3
and 4 as well as frame 5.
• Like Stop-and-wait ARQ, the sending device in sliding window ARQ is equipped
with a timer to enable it to handle lost ACKs.
•
Go-Back-n ARQ:
• In this sliding window go-back-n ARQ method, if one frame is lost or damaged,
all frames sent since the last frame acknowledged are retransmitted.
Damaged Frame:
• Fig gives an example where six frames have been transmitted before an error is
discovered in frame 3.
• In this case, an Ack3 has been returned, telling the sender that frames 0,1 and 2
have all been accepted.
• In the fig, the ACK3 is sent before data 3 has arrived. Data3 is discovered to be
damaged. So a NAK3 is sent immediately and frames 4 and 5 are discarded as
they come in.
• The sending device retransmits all three frames 3,4 and 5 sent since the last
acknowledgement.
Lost data frame:
• Sliding window protocols require that data frames be transmitted sequentially.
• If one or more are so noise corrupted that they become lost in transit. the next
frame to arrive at the receiver will be out of sequence.
• The receiver checks the identifying number on each frame, discovers that one or
more have been skipped and returns a NAK for the first missing frame.
• A NAK frame doesn’t indicate whether the frame has been lost or damaged, just
that it needs to be resent.
• The sender device then retransmits the frame indicated by the NAK, as well as any
frames that it had transmitted after the last one.
Lost Acknowledgement:
• The sender is not expecting to receive an ACK frame for every data frame it sends.
• The sending device can send as many frames as the window allows before waiting
for an ACK.
• Once that limit has been reached or the sender has no more frames to send, it must
wait.
• If the ACK sent by the receiver had been lost, after the completion of timer , the
sender retransmits every frame transmitted since the last ACK.
Selective-Reject ARQ:
• In selective-reject ARQ, only the specific damaged or lost frame is retransmitted.
• If a frame is corrupted in transit, a NAK is returned and the frame is resent out of
sequence.
• A selective reject ARQ system differs from go-back-n ARQ system in the
following ways:
• The receiving device must contain sorting logic to enable it to reorder frames
received out of sequence.
• The sending device must contain searching mechanism that allows it to find and
select only the requested frame for retransmission.
• A buffer in the receiver must keep all previously received frames on hold until all
retransmissions have been sorted and any duplicate frames have been identified
and discarded.
Damaged Frames:
• Fig shows a situation in which a damaged frame is received, as frames 0 and 1 are
received but not acknowledged.
• Data 2 arrives and is found to contain an error, so a NAK 2 is returned.
• NAK2 tells the sender that data 0 and 1 have been accepted, but that data 2 must
be resent.
• The receiver in the selective reject system continues to accept new frames while
waiting for an error to be corrected.
• Frames received after the error frame cannot be acknowledged until the
damaged frames have been retransmitted.
Lost frames:
• Although frames can be accepted out of sequence, they cannot be acknowledged
out of sequence.
• If a frame is lost, the next frame will arrive out of sequence.
• When the receiver tries to reorder the existing frames to include it, it will discover
the discrepancy and return a NAK.
• If the lost frame was the last of the transmission, the receiver does nothing and the
sender treats the silence like a lost acknowledgement.
Lost Acknowledgement:
• Lost ACK and NAK frames are treated by selective reject ARQ like as do in
go-back-n ARQ.
• If no acknowledgement arrives in the time allotted, the sender retransmits all of
the frames that remain unacknowledged.
Error Detection:
• Data can be corrupted during transmission. For reliable communication, errors
must be detected and corrected.
• When an electromagnetic signal flows from one point to another, it is subjected to
unpredictable interference from heat, magnetism and other forms of electricity.
• This interference can change the shape or timing of the signal. If the signal
carrying encoded binary data such changes can alter the meaning of the data.
• In a single-bit error, a 0 is changed to a 1 or a 1 to a 0.
• In a burst error, multiple bits are changed.
Single-bit Error:
The term single-bit error means that only one bit of a given data unit(such as a byte,
character, data unit or packet) is changed from 1 to 0 or from 0 to 1.
Burst Error:
• The term burst error means that the two or more bits in the data unit have changed
from 1 to 0 or from 0 to 1.
• Fig shows the effect of burst error on a data unit. In this case 0100010001000011
was sent, but 0101110101000011 was received.
• The length of the burst is measured from the first corrupted bit to the last
corrupted bit. Some bits in between may not have been corrupted.
Detection
Redundancy:
• one error detection mechanism used would be to send every data unit twice.
• The receiving device would then be able to do a bit-for-bit comparison between
two versions of the data.
• It is slow, transmission double.
• So instead of repeating entire data stream, a shorter group of bits may be appended
to the end of each unit.
• This technique is called redundancy because extra bits are redundant to the
information, they are discarded as soon as the accuracy of the transmission has
been determined.
• Error detection uses the concept of redundancy, which means adding extra
bits for detecting errors at the destination.
• Figure shows the process of using redundant bits to check the accuracy of a data
unit.
• Once the data stream has been generated, it passes through a device that analyzes
it and adds on an appropriately coded redundancy check.
• The data unit, now enlarged by several bits travels over the link to the receiver.
The receiver puts the entire stream through a checking function.
• If the received bit stream passes the checking criteria, the data portion of the data
unit is accepted and the redundant bits are discarded.
• Four types of redundancy checks are used in data communications: vertical
redundancy check (VRC) (also called parity check), longitudinal redundancy
check (LRC), cyclical redundancy check (CRC), and checksum.
• The first three, VRC, LRC, and CRC, are normally implemented in the physical
layer for use in the data link layer. The fourth, checksum, is used primarily by
upper layers.
Vertical Redundancy Check (VRC) (Parity check)
• In this technique, a redundant bit, called a parity bit, is appended to every data unit
so that the total number of Is in the unit (including the parity bit) becomes even.
• Suppose we want to transmit the binary data unit 1100001 [ASCII a (97)];
• Adding together the number of 1s gives us 3, an odd number. Before transmitting,
we pass the data unit through a parity generator.
• The parity generator counts the Is and appends the parity bit (a 1 in this case) to
the end.
• The system now transmits the entire expanded unit across the network link.
• When it reaches its destination, the receiver puts all eight bits through an
even-parity checking function.
• If the receiver sees 11100001, it counts four 1s, an even number, and the data unit
passes.
• Vertical redundancy check detects only single bit errors which is ver rare.
• Burst errors cannot be identified effectively.
Longitudinal Redundancy Check:
• In longitudinal redundancy check (LRC), a block of bits is organized in a table
(rows and columns).
• For example, instead of sending a block of 32 bits, we organize them in a table
made of four rows and eight columns, as shown in Figure 9.7.
• We then calculate the parity bit for each column and create a new row of eight
bits, which are the parity bits for the whole block.
• Note that the first parity bit in the fifth row is calculated based on all first bits.
• The second parity bit is calculated based on all second bits, and so on. We then
attach the eight parity bits to the original data and send them to the receiver
Performance:
• LRC increases the likelihood of detecting burst errors.
• If two bits in one data unit are damaged and two bits in exactly the same positions
in another data unit are also damaged, the LRC checker will not detect an error.
• Consider, for example, two data units: 11110000 and 11000011.
• If the first and last bits in each of them are changed, making the data units read
01110001 and 01000010, the errors cannot be detected by LRC.
Cyclic Redundancy Check:
• The third and most powerful of the redundancy checking techniques is the cyclic
redundancy check (CRC).
• In CRC, instead of adding bits together to achieve a desired parity, a sequence of
redundant bits, called the CRC or the CRC remainder.
• CRC 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 is
therefore accepted. A remainder indicates that the data unit has been damaged in
transit and therefore must be rejected.
CRC Procedure:
• First, a string of n 0’s is appended to the data unit. The number n is one less than
the number of bits in the predetermined divisor, which is n + 1 bits.
• Second, the new data unit is divided by the divisor using a process called binary
division. The remainder resulting from this division is the CRC.
• Third, the CRC of n bits derived in step 2 replaces the appended 0’s at the end of
the data unit. Note that the CRC may consist of all 0’s.
• The data unit arrives at the receiver data first, followed by the CRC. The receiver
treats the whole string as a unit and divides it by the same divisor that was used to
find the CRC remainder.
• If the string arrives without error, the CRC checker yields a remainder of zero and
the data unit passes.
• If the string has been changed in transit, the division yields a non- zero remainder
and the data unit does not pass.
Sample questions
Q1) Calculate the VRC and LRC for the following bit pattern using even
parity 0011101 1100111 1111111 0000000
Q2) A sender sends 01110001 , the receiver receives 01000001. if only
VRC is used, can the receiver detects the error?
Q3) The following block uses even parity LRC. Which bits are in error?
10010101 01001111 11010000 11011011
Q4) If a divisor is 101101, how many bits long is the CRC?
Q5) A bit stream 1101011011 is transmitted using the standard
CRC method. The generator polynomial is x4+x+1. What is the
actual bit string transmitted?
Checksum:
The error detection method used by the higher-layer protocols is called checksum.
Checksum Generator:
• In the sender, the checksum generator subdivides the data unit into equal segments
of n bits.
• These segments are added together using one's complement arithmetic in such a
way that the total is also n bits long.
• That total (sum) is then complemented and appended to the end of the original
data unit as redundancy bits, called the checksum field.
• The extended data unit is transmitted across the network. So if the sum of the data
segment is T, the checksum will be -T
Checksum Checker:
• The receiver subdivides the data unit as above and adds all segments together and
complements the result.
• If the extended data unit is intact, the total value found by adding the data
segments and the checksum field should be zero.
• If the result is not zero, the packet contains an error and the receiver rejects it .
High-level Data Link Control (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.
• 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: The primary is the device in either a point-to-point or multipoint
line configurations that has complete control of the link.
• The primary sends commands to the secondary stations.
• A primary issues commands, a secondary issues responses.
• A combined station can both command and respond. A combined station is one of
a set of connected peer devices programmed to behave either as a primary or as a
secondary depending on the nature and direction of the transmission.
Modes of communication:
• A mode in HDLC is the relationship between two devices involved in
an exchange, the mode describes who controls the link.
• HDLC supports three modes of communication between stations.
Normal response mode (NRM): In this mode, a secondary device must
have permission from the primary device before transmitting. Once
permission has been granted, the secondary may initiate a response
transmission of one or more frames containing data.
Asynchronous response mode (ARM): a secondary may initiate a
transmission without permission from the primary whenever the channel
is idle.
Asynchronous balanced mode (ABM): all stations are equal and therefore
only combined stations connected in point-to-point are used. Either combined
station may initiate transmission with the other combined station without
permission.
Frames:
• HDLC defines three types of frames: information frames (I-frames),
supervisory frames (S-frames) and Unnumbered frames (U-frames).
• I-frames are used to transport user data and control information relating to
user data.
• S-frames are used only to transport control information. It contains or
includes only an Acknowledgment number. First two bit of this frame of
control field is 10. S-frame does not have any information fields. This frame
contains send and receive sequence numbers.
• U-frames are reserved for system management. Information carried by
U-frames is intended for managing the link itself.
• Each frame in HDLC may contain up to six fields: a beginning flag
field, an address field, a control field, an information field, a frame
check sequence (FCS) field and an ending flag field.
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.
• To guarantee that a flag does not appear inadvertently anywhere else in the frame,
HDLC uses a process called bit stuffing.
• Bit stuffing is the process of adding one extra 0 whenever there are five
consecutive 1s in the data so that the receiver does not mistake the data for a
flag.
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.
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.
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.
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.