Communication Networks Lecture 10 - HDLC (Read-Only)
Communication Networks Lecture 10 - HDLC (Read-Only)
Communication Networks
Dr. G. Balamurugan
Assistant Professor
Department of Electronics Engineering
MIT Campus, Anna University.
Dr. G. Balamurugan
1
Department of Electronics Engineering, MIT Campus
UNIT II DATA LINK LAYER AND NETWORK
INTERCONNECTION
Logical link control Functions:- Framing, Flow control , Error
control: CRC, LLC protocols:- HDLC, P to P. Medium access
layer:- Random access, Controlled access, Channelization,
IEEE standards:- 802.3, 802.4 and 802.5. Internetworking,
Interconnection issues, Interconnection devices:- Repeaters,
Hubs, Routers/switches and Gateways.
Dr. G. Balamurugan
2
Department of Electronics Engineering, MIT Campus
Logical Link Control protocols
Dr. G. Balamurugan
3
Department of Electronics Engineering, MIT Campus
High-Level Data Link Control
• HDLC is a Layer 2 protocol
• HDLC is a simple protocol used to connect point to point serial
devices.
– For example, you have point to point leased line connecting two
locations, in two different cities. HDLC would be the protocol with the
least amount of configuration required to connect these two locations.
– show running-config on a Cisco router
• Characteristics of HDLC
– It supports full-duplex.
– Bit-oriented Protocol.
– Used primarily in both point-to-point and multipoint (multidrop) data
links.
Dr. G. Balamurugan
4
Department of Electronics Engineering, MIT Campus
Configurations and Transfer Modes
HDLC provides two common transfer modes that can be used in different
configurations
• Normal Response Mode (NRM)
Configuration is unbalanced.
Link is both point to point & multi point.
Dr. G. Balamurugan
5
Department of Electronics Engineering, MIT Campus
HDLC Frame Structures
• Flag: 01111110, identifies both the beginning and the end of a frame
• Address: used to identify one of the terminals.
• Control: sequence number , ACK and other purposes.
• Information: contain arbitrary information.
• Frame check sequence: 16- or 32-bit CRC
Dr. G. Balamurugan
6
Department of Electronics Engineering, MIT Campus
HDLC Frame Structures
• HDLC defines three types of frame - Each type of frame serves as an
envelope for the transmission of a different type of message.
Dr. G. Balamurugan
7
Department of Electronics Engineering, MIT Campus
1. Flag Fields and Bit Stuffing
• The flag field of an HDLC frame is an 8-bit sequence with the bit pattern
01111110 that identifies both the beginning and the end of a frame and
serves as a synchronization pattern for the receiver.
• Bit stuffing used to avoid confusion with data containing flag sequence
01111110
• Transmitter inserts extra 0 after each consecutive five 1s inside the frame
• Receiver checks for five consecutive 1s
– if next bit = 0, it is removed
– if next two bits are 10, then flag is detected
– If next two bits are 11, then frame has errors
Dr. G. Balamurugan
8
Department of Electronics Engineering, MIT Campus
Bit stuffing and removal
Problem: The flag bit pattern could appear in the data portion of the frame.
Dr. G. Balamurugan
9
Department of Electronics Engineering, MIT Campus
2. Address Field
If a primary station created the frame, it contains a to address.
If secondary creates the frame, it contains a from address.
An address field can be 1 byte or several bytes long, depending on the needs of
the network.
One byte can identify up to 128 stations (l bit is used for another purpose).
Dr. G. Balamurugan
10
Department of Electronics Engineering, MIT Campus
3. Control Field Frames
The control field determines the type of frame and defines its functionality.
First 1 or 2 bits of control field identify frame type
The single bit between N(S) and N(R) is called the P/F bit.
P/F - Single bit used for dual purpose.
Supervisory frames are used for flow and error control whenever piggybacking is either
impossible or inappropriate.
First 2 bits of the control field is 10, this means the frame is an S-frame
The last 3 bits, called N(R), corresponds to the ACK or NAK.
The 2 bits called code is used to define the type of S-frame
Sub- Types Meaning
field
00 Receive ready (RR) acknowledges the receipt of a safe frame
10 Receive not ready (RNR) ACK the Rx frame, & it announces that Rx is busy and cannot Rx more
frames.
01 Reject (REJ) NAK indicating N(R) frame not received correctly. Transmitter must resend
N(R) and later frames
11 Selective reject (SREJ) Negative ACK for N(R) requesting that N(R) be selectively retransmitted
Dr. G. Balamurugan
14
Department of Electronics Engineering, MIT Campus
3. Control Field [ U –Frame ]
Sub- Types
field
00 Receive ready (RR)
01 Reject (REJ)
All the frames sent by the terminal, except the final one,
have P/F bit set to 1. Dr. G. Balamurugan
17
Department of Electronics Engineering, MIT Campus
Example 3: Selecting
Dr. G. Balamurugan
18
Department of Electronics Engineering, MIT Campus
Example 4: Peer to Peer
(Piggybacking without error)
Dr. G. Balamurugan
19
Department of Electronics Engineering, MIT Campus
Example 5: Peer to Peer
(Piggybacking without error)
Dr. G. Balamurugan
20
Department of Electronics Engineering, MIT Campus
Summary
Note:
Dr. G. Balamurugan
21
Department of Electronics Engineering, MIT Campus
Dr. G. Balamurugan
22
Department of Electronics Engineering, MIT Campus