Professional Documents
Culture Documents
Ee534 DLL HDLC
Ee534 DLL HDLC
EE534
Sonali Chouhan
Dept of EEE
IITG
DLL
Physical Physical
layer layer
Data Link Protocols
Packets Packets
Examples
PPP
HDLC
Ethernet LAN
- fixed length
3) Bit oriented
protocols (flags)
Character based framing
0110111111111100
After stuffing and framing
0111111001101111101111100001111110
01111110000111011111011111011001111110
After destuffing and deframing
*000111011111-11111-110*
Framing Errors
●
All framing techniques are sensitive to errors
●
An error in a length count field causes the frame to be
terminated at the wrong point (and makes it tricky to
find the beginning of the next frame)
●
An error in DLE, STX, or ETX causes the same
problems
●
An error in a flag, or a flag created by an error causes
a frame to disappear or an extra frame to appear
●
Flag approach is least sensitive to errors because a flag
will eventually appear again to indicate the end of a next
packet
●
Only thing that happens is that an erroneous packet
was created
●
This erroneous packet can be removed through an
error detection technique
Example: Framing in Ethernet
Ethernet complies to standard IEEE
802.3
An illegal manchester coding is used
for framing.
A character count is also included in
the header.
All frames have an integral number
of bytes. If not, the frame is
considered to be received in error.
Standard Data Link Layer
Protocols:
PPP & HDLC
PPP: Point-to-Point Protocol
A data link layer protocol.
Encapsulating IP packets over point-to-point
links.
Router-router;
Dial-up to router (PC to Internet service provider
(ISP))
Functions:
Provides Framing and Error Detection
Link Control Protocols
Set up, configure, testing, maintain, terminate;
Authentication: Password Authentication Protocol,
etc.
Network Control Protocols
Configure network layer protocols
E.g., IP, IPX (Novell), Appletalk
PPP Frame Format
1 or 2 variable 2 or 4
Flag Address Control Protocol Information Flag
FCS
01111110 1111111 00000011 01111110
CRC 16 or
All stations are to
CRC 32
accept the frame
HDLC
Unnumbered frame
Respond
unilaterally
HDLC Frame Structure
•Synchronous transmission
•All transmissions in frames
•Single frame format for all data and
control exchanges
HDLC Frame Format
Supervisory Frame
1 0 S S P/F N(R)
Unnumbered Frame
1 1 M M P/F M M M
- extended mode
Information frames
●
Each I-frame contains sequence number N(S)
●
Positive ACK piggybacked
●
N(R)=Sequence number of next frame expected
acknowledges all frames up to and including N(R)-1
●
Poll/Final Bit
●
NRM: Primary polls station by setting P=1; Secondary
sets F=1 in last I-frame in response
●
Primaries and secondaries always interact via paired
P/F bits
Error Detection & Loss Recovery
●
Frames lost due to loss-of-synch or receiver
buffer overflow
●
Frames may undergo errors in transmission
●
CRCs detect errors and such frames are
treated as lost
●
Recovery through ACKs, timeouts &
retransmission
●
Sequence numbering to identify out-of-
sequence & duplicate frames
●
HDLC provides for options that implement
several ARQ methods
Supervisory frames
Used for error (ACK, NAK) and flow control
●
(Don’t Send):
●
Receive Ready (RR), SS=00
●
ACKs frames up to N(R)-1 when piggyback not available
●
REJECT (REJ), SS=01
●
Negative ACK indicating N(R) is first frame not received
correctly. Transmitter must resend N(R) and later frames
●
Receive Not Ready (RNR), SS=10
●
ACKs frame N(R)-1 & requests that no more I-frames be
sent
●
Selective REJECT (SREJ), SS=11
●
Negative ACK for N(R) requesting that N(R) be selectively
retransmitted
Unnumbered Frames
Setting of Modes:
●
●
SABM: Set Asynchronous Balanced Mode
●
UA: acknowledges acceptance of mode setting
commands
●
DISC: terminates logical link connection
Information Transfer between stations
●
●
UI: Unnumbered information
●
Recovery used when normal error/flow control
fails
Unnumbered Frames
FRMR: frame with correct FCS but impossible semantics
●
●
Examples of impossible semantics are a frame
shorter than 32 bits, an illegal control frame, and
an acknowledgement of a frame that was outside
the window, etc.
●
FRMR frames contain a 24-bit data field telling what
was wrong with the frame.
●
RSET: indicates sending station is resetting sequence
numbers
●
XID: exchange station id and characteristics
Connection Establishment &
Release
• Set Asynchronous Balanced Mode (SABM)
• Disconnect (DISC)
• Unnumbered Acknowledgment (UA)
A
SABM UA
Data UA
transfer DISC
B
HDLC Flow Control
Flow control prevents transmitter from
overrunning receiver buffers.
Receiver can control flow by delaying
acknowledgement messages.
Receiver can also use supervisory frames to
explicitly control transmitter
Receive Not Ready (RNR) & Receive Ready (RR)
I3 I4 I5 RNR5 RR6 I6
Example: HDLC using NRM
Address of secondary(polling)
Primary A Secondaries B, C
A polls B B, RR, 0, P N(S) N(R)
B, I, 0, 0
N(R) B sends 3 info
X B, I, 1, 0
frames
B, I, 2, 0,F
A rejects fr1 B, SREJ, 1
A polls C C, RR, 0, P
C, RR, 0, F C nothing to
send
A polls B, B, SREJ, 1,P
requests
selective B, I, 1, 0 B resends fr1
retrans. fr1 B, I, 3, 0 Then fr 3 & 4
B, I, 4, 0, F
A send info fr0 B, I, 0, 5
to B, ACKs up to 4
Time
Examples of Operation (1)
Examples of Operation (2)