Prof Madhumita Tamhane
SDLC
SYNCHRONOUS DATA LINK
COMMUNICATION
DATA LINK CONTROL
COMMUNICATION
Prof Madhumita Tamhane
SDLC
✓ Synchronous Bit Oriented Protocol by IBM.
✓ Simplex/half duplex/full duplex.
✓ Sliding window protocol.
✓ Language EBCDIC.
✓ Data frame 256 characters long.
✓ All data link control functions performed by a single
control field.
✓ Master-slave environment only.
Prof Madhumita Tamhane
SDLC
✓ The primary station controls data exchange on the
communication channel and issues command.
✓ The secondary station receives commands and returns
responses to the primary.
✓ Three transmission states:-
✓ Transient state:-before and after the initial
transmission and after each line turnaround.
✓ Idle state:- after 15 or more consecutive 1s have been
received.
✓ Active state:- whenever either primary or secondary
station is transmitting information or control signals.
Prof Madhumita Tamhane
SDLC
✓ General frame structure:
Flag Address Control Data… FCS Flag
8 bits 8 bits 8 bits Variable
multiple
of 8
16 bits 8 bits
Prof Madhumita Tamhane
SDLC - Flag
✓ 7EH binary or “=“ in EBCDIC.
✓ For synchronization and indication of limits of frame.
✓ Multiple frames can have following variations:
✓ Beginning and ending flag of a frame.
✓ FCS 01111110 01111110 address …
✓ Ending flag of a frame can be common with beginning
flag of next frame.
✓ FCS 01111110 address control…
✓ Ending ‘0’ of ending flag of a frame can be common with
beginning ‘0’ of beginning flag of next frame.
✓ FCS 011111101111110 address control…
✓ Can be sent continuously to indicate idle line 1s.
Flag Flag
01111110 01111110
Prof Madhumita Tamhane
SDLC - Address
✓ 256 addresses possible.
✓ 00H null or void address, used for network testing.
✓ FFH is broadcast address.
✓ 254 unique station addresses or group addresses.
✓ No address given to primary as…
✓ Primary to secondary frame has destination secondary
address.
✓ Secondary to primary frame has source secondary
address.
Address
8 bits
Prof Madhumita Tamhane
Control Field
!
!
!
!
✓ 8 bit long.
✓ Used for polling, acknowledging previously received
frames and other data link management functions.
✓ Defined in three different frame formats.
✓ Information frame
✓ Control frame
✓ un-numbered frame
Control
8 bits
Prof Madhumita Tamhane
Control Field – Information frame
!
!
!
!
!
✓ LSB b7 – “0” identifies information frame.
✓ Information frame is used for transmitting sequenced
information.
✓ Packet numbered using 3-bit scheme.
!
P/P
Or
F/F
b0 b1 b2 b3 b4 b5
nr
0
b6 b7
ns
Prof Madhumita Tamhane
Control Field – Information frame
✓ ns =b4, b5, b6 - number of frame being sent.
✓ From 000 to 111 and repeats.
✓ nr =b0, b1, b2 - acknowledgement.
✓ It is number of next frame it expects to receive.
✓ Indicates all frames before nr are received correctly.
✓ Uses piggybacking as it is I frame.
✓ nr and ns together used for flow control and error
control ARQ.
P/P
Or
F/F
b0 b1 b2 b3 b4 b5
nr
0
b6 b7
ns
Prof Madhumita Tamhane
Control Field – Information frame
✓ Primary keeps track of ns and nr of all secondaries
while secondary keeps track of its own ns and nr.
✓ A station can not send more than 7 frames together
before receiving an acknowledgement to avoid
ambiguity in received frame number.
✓ Say 8 frames, 0 - 7 are sent and ACK0 is received.
✓ There is ambiguity whether
✓ receiver received all correctly and expecting new
frame “0” or
✓ frame “0” had error and receiver aborted and
expecting retransmission from old frame “0”.
✓ No ambiguity if max, only 7 frames, 0 - 6 are sent.
Prof Madhumita Tamhane
Control Field – Information frame
✓ Example:
!
Primary ns:
Primary nr :
!
Secondary ns:
Secondary nr:
!
!
!
!
!
!
0 1 2
0 0 0
3 4
2 2
0 1
3 3
2 3 4
4 4 4
4 5 6 7 0
5 5 5 5 5
5
1
Prof Madhumita Tamhane
Control Field – Information frame
✓ Bit b3 is poll/not-a-poll (1/0) and sent from primary to
secondary.
✓ Bit b3 is sending final /not-a-final frame(1/0) when sent from
secondary to primary.
✓ A secondary can not transmit unless it receives a frame
addressed to it with P bit set.
✓ With I frame, primary can select a secondary station, send
formatted information, confirm previously received I frame,
and poll with a single transmission.
P/P
Or
F/F
b0 b1 b2 b3 b4 b5
nr
0
b6 b7
ns
Prof Madhumita Tamhane
Excercise
✓ Determine bit pattern for the control field of a frame
sent from the primary to a secondary for following
conditions..
✓ Primary is sending frame 3.
✓ It is a poll.
✓ Primary is confirming the correct reception of frames
2,3,4 from secondary.
!
!
✓ Solution: 10110110 = B6H
Prof Madhumita Tamhane
Control Field – Supervisory frame
✓ Information sending is not allowed.
✓ Frame is used to :
✓ 1. Confirm previously received I-frames.
✓ 2. Convey ready or busy condition.
✓ 3. Reports missing or error frames.
✓ Hence used for flow and error control and Poll/Select
when I frame not available.
Prof Madhumita Tamhane
Control Field – Supervisory frame
✓ Frame identified by 01 in b6, b7 position.
✓ nr =b0, b1, b2 -- frame expected
✓ acknowledgement of correct reception.
✓ sequence number of frame in error
✓ b3 is Poll/Not Poll or Final/Not final .
✓ Bits b4 and b5 are indicate receive status of transmitting
stations, request transmission or retransmission of
sequenced information frames.They can be…
P/P
Or
F/F
b0 b1 b2 b3 b4 b5
nr
1
b6 b7
X X 0
Prof Madhumita Tamhane
Control Field – Supervisory frame
b b Receive Status
0 0 Ready to receive RR
Positive acknowledgement when I frame not available.
0 1 Ready Not to receive RNR
1 0 REJ(Reject) Go back N ARQ
1 1 Not Used in SDLC
Prof Madhumita Tamhane
Control Field – Supervisory frame 

Options
✓ RR with P set.
✓ Polling.
✓ Ack when primary wants secondary to send more frames.
✓ RR with F set.
✓ EOT after poll
✓ Positive Ack to selection
✓ Negative response to polling
✓ RNR with P set.
✓ Selection
✓ RNR with F set.
✓ Negative Ack to selection
✓ RR with F = 0.
✓ ARQ REJ of nr (only FD)
Prof Madhumita Tamhane
Excercise
✓ Determine bit pattern for the control field of a frame
sent from the a secondary to primary for following
conditions..
✓ Secondary is ready to receive.
✓ It is a final frame.
✓ Secondary is confirming the correct reception of
frames 3,4,5 from secondary.
!
!
✓ Solution: 11010001 = D1H
Prof Madhumita Tamhane
Excercise
✓ Determine bit pattern for the control field of a frame
sent from the a secondary to primary for following
conditions..
✓ Secondary is ready to receive.
✓ It is not a final frame.
✓ Secondary is conveying correct reception of frames
2,3,4.
✓ Secondary is conveying that frame 5 is in error.
!
!
✓ Solution: 10100001 = D1H
Prof Madhumita Tamhane
Control Field – Un-numbered Frame
!
!
!
!
✓ Used for network management operations.
✓ Un-numbered Management Information sending is
allowed.
✓ Frame identified by 11 in b6, b7 position.
✓ b3 is Poll/Not Poll or Final/Not final
✓ b0, b1, b2 , b4, b5 – 32 command/responses possible.
P/P
Or
F/F
b0 b1 b2 b3 b4 b5
1
b6 b7
X X 1
X X X
Prof Madhumita Tamhane
Control Field – Un-numbered Frame
✓ Possible modes of secondary
✓ The Initialization mode:System specific
✓ Normal Response mode:A secondary can not initiate
unsolicited transmission.
✓ Can transmit only in response to a frame received
with P bit set.
✓ Normal Disconnect mode: Secondary is off-line.
✓ Secondary can receive only a TEST, XID, CFGR,
SNRM, or SIM command from primary and can
respond only if P bit is set.
Prof Madhumita Tamhane
Control Field – Some Un-numbered commands
✓ Un-numbered Information (UI)
✓ 000 P/F 0011
✓ Higher level status, operational interruptions, time of day,
link initialization parameters etc.
✓ Set Initialization Mode (SIM)
✓ 000 P 0111
✓ SIM resets nr and ns counter at primary and
secondary.
✓ Secondary Responses by UA.
✓ Used if network management error noted.
✓ To bring a station out of disconnect mode.
Prof Madhumita Tamhane
Control Field – Some Un-numbered commands
✓ Request Initialization Mode (RIM)
✓ 000 F 0111 Response
✓ Request sent by secondary for SIM from primary if
error noted or needs to come out of DISC.
✓ Set Normal Response Mode (SNRM)
✓ 100 P 0011 Command
✓ Primary places secondary in normal response mode.
✓ Resets nr and ns counter at primary and secondary.
✓ Secondary responses by UA.
Prof Madhumita Tamhane
Control Field – Some Un-numbered commands
✓ Request disconnect mode (RD)
✓ 010 F 0011 Response
✓ Disconnect (DISC)
✓ 010 P 0011 Command
✓ In this mode secondary can not receive/send I frames.
✓ Can receive only SIM, SNRM.
✓ Secondary responses by UA.
✓ Disconnect mode (DM)
✓ 000 F 1111 Response
✓ Disconnected secondary reminds primary about its status if later
tries to send un-numbered frame.
✓
Prof Madhumita Tamhane
Control Field – Some Un-numbered commands
✓ Un-numbered acknowledgement (UA)
✓ 011 F 0011 Response
✓ In response to SIM, SNRM, DISC
✓ TEST 111 P 0011
✓ Command/Response to solicit/reply TEST response.
✓ Secondary returns back information field.
✓ Exchange for link testing purpose.
Prof Madhumita Tamhane
Control Field – Some Un-numbered commands
✓ Exchange Station Identification (XID)
✓ 101 P 1111 Command/Response
✓ XID solicits identification of secondary station.
✓ I field can be included in the frame to convey
identification data of either primary or secondary
station.
✓ EX- In dial-up circuits, it is necessary that secondary
station identifies itself before primary will exchange
information frames with it.
!
Prof Madhumita Tamhane
Control Field – Some Un-numbered commands
✓ Frame Reject (FRMR) 100 F 0111 Response
✓ Reasons:
✓ Control field has invalid command.
✓ Data exceeds buffer .
✓ Information sent in frame that doesn't allow it.
✓ ns and nr do not match.
✓ Secondary keeps sending FRMR till it receives SNRM,
DISC or SIM
Prof Madhumita Tamhane
Control Field – Some Un-numbered commands

I field of FRMR
!
!
!
✓ W = 1, Invalid command
✓ X = 1, Prohibited information field received.
✓ Y = 1, Buffer overrun.
✓ Z = 1, Received nr disagrees with transmitted ns.
XXXXXXXX 0XXX0XXX WXYZ 0 0 0 0
C field of rejected
command
ns nr
secondary’s present ns and nr
Prof Madhumita Tamhane
Frame Check Sequence
!
!
!
!
✓ CRC-16
✓ g(x) = x16 + x12 + x5 + x1
16 bits
FCS
Prof Madhumita Tamhane
Transparency
✓ Flag 01111110 should be avoided in data.
✓ Using zero-bit-insertion or zero stuffing.
✓ In Data, after every five 1’s, a zero is inserted.
✓ Hence, if we get six 1’s, it is a valid flag.
✓ Example:
✓ 01111110 01101111 11010011
Flag Address Control
✓ 1110001100110101 00101011 01111110
Data FCS Flag
Prof Madhumita Tamhane
Transparency
✓ Transmitted:
✓ 01111110 01101111 101010011
Flag Address Control
✓ 11100001100110101 00101011 01111110
Data FCS Flag
!
✓ Received:
✓ 01111110 01101111 11010011
Flag Address Control
✓ 1110001100110101 00101011 01111110
Data FCS Flag
Prof Madhumita Tamhane
Message Abort
✓ Used to permanently terminate a frame.
✓ Generally done to accommodate high-priority message
such as emergency link recovery procedure,…
✓ Message abort is occurrence of 7-14 consecutive 1s.
✓ Zeros are nor inserted in message abort.
✓ Terminates an existing frame and immediately begins
a high priority frame.
✓ If more than 14 consecutive 1s occur in succession, it
places into idle line condition.
✓
Prof Madhumita Tamhane
HDLC
HIGH LEVEL DATA LINK
CONTROL
DATA LINK CONTROL
COMMUNICATION
Prof Madhumita Tamhane
HDLC
✓ In SDLC - ISO defines high order bit as bo.
✓ In HDLC - ISO defines low order bit as bo.
✓ Hence all patterns are reversed in HDLC.
b0 b1 b2 b3 b4 b5 b6 b7
SDLC
b7 b6 b5 b4 b3 b2 b1 b0
HDLC
Prof Madhumita Tamhane
HDLC - Modes
✓ Normal Response mode NRM:
✓ One primary, rest secondary.
✓ Primary polls/selects secondary.
✓ Unsolicited responses are not allowed.
!
✓ Asynchronous Response mode ARM :
✓ A secondary may initiate a transmission without permission
from primary if channel in idle.
✓ Primary-secondary relationship otherwise not altered.
✓ Secondary to secondary through primary only.
Prof Madhumita Tamhane
HDLC - Modes
✓ Asynchronous Balance mode ABM :
✓ Special arrangement.
✓ If point to point link between two secondaries is present then
Peer to peer is allowed.
✓ Mode to be invoked when desired.
✓ Primary brings a secondary in ABM mode.
Prof Madhumita Tamhane
HDLC - Frame
!
!
!
!
✓ General frame structure as defined by
✓ ISO 3309 – 1976 E (Frame structure, Flag and transparency
mechanism.)
✓ ISO 4335 – 1979 E (Control, I, S and U fields)
!
✓ Flag same as SDLC.
Flag Address Control Data… FCS Flag
8 bits extended extended Variable
multiple of 8
16 bits 8 bits
Prof Madhumita Tamhane
HDLC - Address
!
!
!
!
!
!
✓ 8 bit or extended.
✓ If bo = 0, next byte is also a part of address.
✓ If bo = 1, end of address.
Address
extended
b7 b6 b5 b4 b3 b2 b1 b0
Prof Madhumita Tamhane
HDLC - Address
✓ Example:
!
✓ 01111110 XXXXXXX0 XXXXXXX1
Flag Byte1 Byte2 -end of address
!
✓ Can extend up to n number of bytes.
Prof Madhumita Tamhane
HDLC - Control – Information Frame

Normal Mode
!
!
!
!
!
!
Control
normal
P/P
Or
F/F
b7 b6 b5 b4 b3 b2
ns
b1 b0
0
nr
Prof Madhumita Tamhane
HDLC - Control – Information Frame
Extended Mode
!
!
!
!
!
!
Control
extended
ns
0
P/
F nr
Prof Madhumita Tamhane
HDLC - Control – Supervisory Frame

Normal Mode
!
!
!
!
!
!
Control
normal
P/F
b7 b6 b5 b4 b3 b2 b1 b0
1
nr
0 X X
Prof Madhumita Tamhane
HDLC - Control – Supervisory Frame

Extended Mode
!
!
!
!
!
!
Control
extende
d
1
P/
F nr
0 X X 0 0 0 0
Prof Madhumita Tamhane
HDLC - Control – Supervisory Frame

Normal Mode
!
!
!
!
!
!
b b Receive Status
0 0 Ready to receive RR
Positive acknowledgement when I frame not available.
0 1 REJ(Reject) Go back N ARQ
1 0 RNR
1 1 SREJ (selective reject)
Prof Madhumita Tamhane
HDLC - Control – Supervisory Frame

✓ OPTIONS with RR:
✓ RR with ACK
✓ RR with P = 1
✓ RR with F = 1
✓ RR with F = 1
!
✓ OPTIONS with RNR:
✓ RNR with ACK
✓ RNR with P = 1
✓ RNR with F = 1
Prof Madhumita Tamhane
HDLC - Control – Un-numbered Frame

!
!
!
!
!
!
✓ No extended field available.
✓ Control 5 bits are reversed vis-a-vis SDLC
✓ SIM – 10000
✓ SNRM - 00001
Control
normal
P/F
b7 b6 b5 b4 b3 b2 b1 b0
1 X1 X X X X
Prof Madhumita Tamhane
Draw poll response sequence frames for HDLC

✓
Main A
Flag Flag
F
C
S A
S - Frame
0 P = 1 RR
Flag Flag
A
F
C
S
I - Frame
0 F = 0 0
Data
Flag Flag
A
F
C
S
I - Frame
1 F = 1 0
Data
Flag Flag
F
C
S A
S - Frame
2 P = 0 RNR
Prof Madhumita Tamhane
Draw select response sequence frames for
HDLC

✓
Main A
Flag Flag
F
C
S A
S - Frame
0 P = 1 RNR
Flag FlagA
FC
S
S - Frame
RR F = 1 0
Flag FlagA
F
C
S
I - Frame
0P = 00
Data
Flag FlagA
FC
S
S - Frame
RR F = 1 1
Prof Madhumita Tamhane
Peer to peer communication using

HDLC

✓
A B
Flag FlagB
F
C
S
I - Frame
00
Data
Flag FlagB
F
C
S
U - Frame
11P = 1100
Data
Flag Flag
A
F
C
S
U - Frame
00 F = 1 110
Data
Flag FlagB
F
C
S
I - Frame
10
Data
Prof Madhumita Tamhane
Contd.
✓
A B
Flag Flag
A
F
C
S
I - Frame
0 2
Data
Flag Flag
A
F
C
S
I - Frame
1 2
Data
Flag Flag
A
F
C
S
I - Frame
2 2
Data
Flag Flag
F
C
S B
S - Frame
3 RR
Prof Madhumita Tamhane
Peer to peer communication with error
✓
A B
Flag Flag
A
F
C
S
I - Frame
0 2
Data
Flag Flag
A
F
C
S
I - Frame
1 2
Data
Flag Flag
A
F
C
S
I - Frame
2 2
Data
Error
Flag Flag
F
C
S B
S - Frame
1 REJ
Prof Madhumita Tamhane
Contd.
✓
A B
Flag Flag
A
F
C
S
I - Frame
1 2
Data
Flag Flag
A
F
C
S
I - Frame
2 2
Data
Flag Flag
F
C
S B
S - Frame
3 RR

Data Link Synchronous Protocols - SDLC, HDLC

  • 1.
    Prof Madhumita Tamhane SDLC SYNCHRONOUSDATA LINK COMMUNICATION DATA LINK CONTROL COMMUNICATION
  • 2.
    Prof Madhumita Tamhane SDLC ✓Synchronous Bit Oriented Protocol by IBM. ✓ Simplex/half duplex/full duplex. ✓ Sliding window protocol. ✓ Language EBCDIC. ✓ Data frame 256 characters long. ✓ All data link control functions performed by a single control field. ✓ Master-slave environment only.
  • 3.
    Prof Madhumita Tamhane SDLC ✓The primary station controls data exchange on the communication channel and issues command. ✓ The secondary station receives commands and returns responses to the primary. ✓ Three transmission states:- ✓ Transient state:-before and after the initial transmission and after each line turnaround. ✓ Idle state:- after 15 or more consecutive 1s have been received. ✓ Active state:- whenever either primary or secondary station is transmitting information or control signals.
  • 4.
    Prof Madhumita Tamhane SDLC ✓General frame structure: Flag Address Control Data… FCS Flag 8 bits 8 bits 8 bits Variable multiple of 8 16 bits 8 bits
  • 5.
    Prof Madhumita Tamhane SDLC- Flag ✓ 7EH binary or “=“ in EBCDIC. ✓ For synchronization and indication of limits of frame. ✓ Multiple frames can have following variations: ✓ Beginning and ending flag of a frame. ✓ FCS 01111110 01111110 address … ✓ Ending flag of a frame can be common with beginning flag of next frame. ✓ FCS 01111110 address control… ✓ Ending ‘0’ of ending flag of a frame can be common with beginning ‘0’ of beginning flag of next frame. ✓ FCS 011111101111110 address control… ✓ Can be sent continuously to indicate idle line 1s. Flag Flag 01111110 01111110
  • 6.
    Prof Madhumita Tamhane SDLC- Address ✓ 256 addresses possible. ✓ 00H null or void address, used for network testing. ✓ FFH is broadcast address. ✓ 254 unique station addresses or group addresses. ✓ No address given to primary as… ✓ Primary to secondary frame has destination secondary address. ✓ Secondary to primary frame has source secondary address. Address 8 bits
  • 7.
    Prof Madhumita Tamhane ControlField ! ! ! ! ✓ 8 bit long. ✓ Used for polling, acknowledging previously received frames and other data link management functions. ✓ Defined in three different frame formats. ✓ Information frame ✓ Control frame ✓ un-numbered frame Control 8 bits
  • 8.
    Prof Madhumita Tamhane ControlField – Information frame ! ! ! ! ! ✓ LSB b7 – “0” identifies information frame. ✓ Information frame is used for transmitting sequenced information. ✓ Packet numbered using 3-bit scheme. ! P/P Or F/F b0 b1 b2 b3 b4 b5 nr 0 b6 b7 ns
  • 9.
    Prof Madhumita Tamhane ControlField – Information frame ✓ ns =b4, b5, b6 - number of frame being sent. ✓ From 000 to 111 and repeats. ✓ nr =b0, b1, b2 - acknowledgement. ✓ It is number of next frame it expects to receive. ✓ Indicates all frames before nr are received correctly. ✓ Uses piggybacking as it is I frame. ✓ nr and ns together used for flow control and error control ARQ. P/P Or F/F b0 b1 b2 b3 b4 b5 nr 0 b6 b7 ns
  • 10.
    Prof Madhumita Tamhane ControlField – Information frame ✓ Primary keeps track of ns and nr of all secondaries while secondary keeps track of its own ns and nr. ✓ A station can not send more than 7 frames together before receiving an acknowledgement to avoid ambiguity in received frame number. ✓ Say 8 frames, 0 - 7 are sent and ACK0 is received. ✓ There is ambiguity whether ✓ receiver received all correctly and expecting new frame “0” or ✓ frame “0” had error and receiver aborted and expecting retransmission from old frame “0”. ✓ No ambiguity if max, only 7 frames, 0 - 6 are sent.
  • 11.
    Prof Madhumita Tamhane ControlField – Information frame ✓ Example: ! Primary ns: Primary nr : ! Secondary ns: Secondary nr: ! ! ! ! ! ! 0 1 2 0 0 0 3 4 2 2 0 1 3 3 2 3 4 4 4 4 4 5 6 7 0 5 5 5 5 5 5 1
  • 12.
    Prof Madhumita Tamhane ControlField – Information frame ✓ Bit b3 is poll/not-a-poll (1/0) and sent from primary to secondary. ✓ Bit b3 is sending final /not-a-final frame(1/0) when sent from secondary to primary. ✓ A secondary can not transmit unless it receives a frame addressed to it with P bit set. ✓ With I frame, primary can select a secondary station, send formatted information, confirm previously received I frame, and poll with a single transmission. P/P Or F/F b0 b1 b2 b3 b4 b5 nr 0 b6 b7 ns
  • 13.
    Prof Madhumita Tamhane Excercise ✓Determine bit pattern for the control field of a frame sent from the primary to a secondary for following conditions.. ✓ Primary is sending frame 3. ✓ It is a poll. ✓ Primary is confirming the correct reception of frames 2,3,4 from secondary. ! ! ✓ Solution: 10110110 = B6H
  • 14.
    Prof Madhumita Tamhane ControlField – Supervisory frame ✓ Information sending is not allowed. ✓ Frame is used to : ✓ 1. Confirm previously received I-frames. ✓ 2. Convey ready or busy condition. ✓ 3. Reports missing or error frames. ✓ Hence used for flow and error control and Poll/Select when I frame not available.
  • 15.
    Prof Madhumita Tamhane ControlField – Supervisory frame ✓ Frame identified by 01 in b6, b7 position. ✓ nr =b0, b1, b2 -- frame expected ✓ acknowledgement of correct reception. ✓ sequence number of frame in error ✓ b3 is Poll/Not Poll or Final/Not final . ✓ Bits b4 and b5 are indicate receive status of transmitting stations, request transmission or retransmission of sequenced information frames.They can be… P/P Or F/F b0 b1 b2 b3 b4 b5 nr 1 b6 b7 X X 0
  • 16.
    Prof Madhumita Tamhane ControlField – Supervisory frame b b Receive Status 0 0 Ready to receive RR Positive acknowledgement when I frame not available. 0 1 Ready Not to receive RNR 1 0 REJ(Reject) Go back N ARQ 1 1 Not Used in SDLC
  • 17.
    Prof Madhumita Tamhane ControlField – Supervisory frame 
 Options ✓ RR with P set. ✓ Polling. ✓ Ack when primary wants secondary to send more frames. ✓ RR with F set. ✓ EOT after poll ✓ Positive Ack to selection ✓ Negative response to polling ✓ RNR with P set. ✓ Selection ✓ RNR with F set. ✓ Negative Ack to selection ✓ RR with F = 0. ✓ ARQ REJ of nr (only FD)
  • 18.
    Prof Madhumita Tamhane Excercise ✓Determine bit pattern for the control field of a frame sent from the a secondary to primary for following conditions.. ✓ Secondary is ready to receive. ✓ It is a final frame. ✓ Secondary is confirming the correct reception of frames 3,4,5 from secondary. ! ! ✓ Solution: 11010001 = D1H
  • 19.
    Prof Madhumita Tamhane Excercise ✓Determine bit pattern for the control field of a frame sent from the a secondary to primary for following conditions.. ✓ Secondary is ready to receive. ✓ It is not a final frame. ✓ Secondary is conveying correct reception of frames 2,3,4. ✓ Secondary is conveying that frame 5 is in error. ! ! ✓ Solution: 10100001 = D1H
  • 20.
    Prof Madhumita Tamhane ControlField – Un-numbered Frame ! ! ! ! ✓ Used for network management operations. ✓ Un-numbered Management Information sending is allowed. ✓ Frame identified by 11 in b6, b7 position. ✓ b3 is Poll/Not Poll or Final/Not final ✓ b0, b1, b2 , b4, b5 – 32 command/responses possible. P/P Or F/F b0 b1 b2 b3 b4 b5 1 b6 b7 X X 1 X X X
  • 21.
    Prof Madhumita Tamhane ControlField – Un-numbered Frame ✓ Possible modes of secondary ✓ The Initialization mode:System specific ✓ Normal Response mode:A secondary can not initiate unsolicited transmission. ✓ Can transmit only in response to a frame received with P bit set. ✓ Normal Disconnect mode: Secondary is off-line. ✓ Secondary can receive only a TEST, XID, CFGR, SNRM, or SIM command from primary and can respond only if P bit is set.
  • 22.
    Prof Madhumita Tamhane ControlField – Some Un-numbered commands ✓ Un-numbered Information (UI) ✓ 000 P/F 0011 ✓ Higher level status, operational interruptions, time of day, link initialization parameters etc. ✓ Set Initialization Mode (SIM) ✓ 000 P 0111 ✓ SIM resets nr and ns counter at primary and secondary. ✓ Secondary Responses by UA. ✓ Used if network management error noted. ✓ To bring a station out of disconnect mode.
  • 23.
    Prof Madhumita Tamhane ControlField – Some Un-numbered commands ✓ Request Initialization Mode (RIM) ✓ 000 F 0111 Response ✓ Request sent by secondary for SIM from primary if error noted or needs to come out of DISC. ✓ Set Normal Response Mode (SNRM) ✓ 100 P 0011 Command ✓ Primary places secondary in normal response mode. ✓ Resets nr and ns counter at primary and secondary. ✓ Secondary responses by UA.
  • 24.
    Prof Madhumita Tamhane ControlField – Some Un-numbered commands ✓ Request disconnect mode (RD) ✓ 010 F 0011 Response ✓ Disconnect (DISC) ✓ 010 P 0011 Command ✓ In this mode secondary can not receive/send I frames. ✓ Can receive only SIM, SNRM. ✓ Secondary responses by UA. ✓ Disconnect mode (DM) ✓ 000 F 1111 Response ✓ Disconnected secondary reminds primary about its status if later tries to send un-numbered frame. ✓
  • 25.
    Prof Madhumita Tamhane ControlField – Some Un-numbered commands ✓ Un-numbered acknowledgement (UA) ✓ 011 F 0011 Response ✓ In response to SIM, SNRM, DISC ✓ TEST 111 P 0011 ✓ Command/Response to solicit/reply TEST response. ✓ Secondary returns back information field. ✓ Exchange for link testing purpose.
  • 26.
    Prof Madhumita Tamhane ControlField – Some Un-numbered commands ✓ Exchange Station Identification (XID) ✓ 101 P 1111 Command/Response ✓ XID solicits identification of secondary station. ✓ I field can be included in the frame to convey identification data of either primary or secondary station. ✓ EX- In dial-up circuits, it is necessary that secondary station identifies itself before primary will exchange information frames with it. !
  • 27.
    Prof Madhumita Tamhane ControlField – Some Un-numbered commands ✓ Frame Reject (FRMR) 100 F 0111 Response ✓ Reasons: ✓ Control field has invalid command. ✓ Data exceeds buffer . ✓ Information sent in frame that doesn't allow it. ✓ ns and nr do not match. ✓ Secondary keeps sending FRMR till it receives SNRM, DISC or SIM
  • 28.
    Prof Madhumita Tamhane ControlField – Some Un-numbered commands
 I field of FRMR ! ! ! ✓ W = 1, Invalid command ✓ X = 1, Prohibited information field received. ✓ Y = 1, Buffer overrun. ✓ Z = 1, Received nr disagrees with transmitted ns. XXXXXXXX 0XXX0XXX WXYZ 0 0 0 0 C field of rejected command ns nr secondary’s present ns and nr
  • 29.
    Prof Madhumita Tamhane FrameCheck Sequence ! ! ! ! ✓ CRC-16 ✓ g(x) = x16 + x12 + x5 + x1 16 bits FCS
  • 30.
    Prof Madhumita Tamhane Transparency ✓Flag 01111110 should be avoided in data. ✓ Using zero-bit-insertion or zero stuffing. ✓ In Data, after every five 1’s, a zero is inserted. ✓ Hence, if we get six 1’s, it is a valid flag. ✓ Example: ✓ 01111110 01101111 11010011 Flag Address Control ✓ 1110001100110101 00101011 01111110 Data FCS Flag
  • 31.
    Prof Madhumita Tamhane Transparency ✓Transmitted: ✓ 01111110 01101111 101010011 Flag Address Control ✓ 11100001100110101 00101011 01111110 Data FCS Flag ! ✓ Received: ✓ 01111110 01101111 11010011 Flag Address Control ✓ 1110001100110101 00101011 01111110 Data FCS Flag
  • 32.
    Prof Madhumita Tamhane MessageAbort ✓ Used to permanently terminate a frame. ✓ Generally done to accommodate high-priority message such as emergency link recovery procedure,… ✓ Message abort is occurrence of 7-14 consecutive 1s. ✓ Zeros are nor inserted in message abort. ✓ Terminates an existing frame and immediately begins a high priority frame. ✓ If more than 14 consecutive 1s occur in succession, it places into idle line condition. ✓
  • 33.
    Prof Madhumita Tamhane HDLC HIGHLEVEL DATA LINK CONTROL DATA LINK CONTROL COMMUNICATION
  • 34.
    Prof Madhumita Tamhane HDLC ✓In SDLC - ISO defines high order bit as bo. ✓ In HDLC - ISO defines low order bit as bo. ✓ Hence all patterns are reversed in HDLC. b0 b1 b2 b3 b4 b5 b6 b7 SDLC b7 b6 b5 b4 b3 b2 b1 b0 HDLC
  • 35.
    Prof Madhumita Tamhane HDLC- Modes ✓ Normal Response mode NRM: ✓ One primary, rest secondary. ✓ Primary polls/selects secondary. ✓ Unsolicited responses are not allowed. ! ✓ Asynchronous Response mode ARM : ✓ A secondary may initiate a transmission without permission from primary if channel in idle. ✓ Primary-secondary relationship otherwise not altered. ✓ Secondary to secondary through primary only.
  • 36.
    Prof Madhumita Tamhane HDLC- Modes ✓ Asynchronous Balance mode ABM : ✓ Special arrangement. ✓ If point to point link between two secondaries is present then Peer to peer is allowed. ✓ Mode to be invoked when desired. ✓ Primary brings a secondary in ABM mode.
  • 37.
    Prof Madhumita Tamhane HDLC- Frame ! ! ! ! ✓ General frame structure as defined by ✓ ISO 3309 – 1976 E (Frame structure, Flag and transparency mechanism.) ✓ ISO 4335 – 1979 E (Control, I, S and U fields) ! ✓ Flag same as SDLC. Flag Address Control Data… FCS Flag 8 bits extended extended Variable multiple of 8 16 bits 8 bits
  • 38.
    Prof Madhumita Tamhane HDLC- Address ! ! ! ! ! ! ✓ 8 bit or extended. ✓ If bo = 0, next byte is also a part of address. ✓ If bo = 1, end of address. Address extended b7 b6 b5 b4 b3 b2 b1 b0
  • 39.
    Prof Madhumita Tamhane HDLC- Address ✓ Example: ! ✓ 01111110 XXXXXXX0 XXXXXXX1 Flag Byte1 Byte2 -end of address ! ✓ Can extend up to n number of bytes.
  • 40.
    Prof Madhumita Tamhane HDLC- Control – Information Frame
 Normal Mode ! ! ! ! ! ! Control normal P/P Or F/F b7 b6 b5 b4 b3 b2 ns b1 b0 0 nr
  • 41.
    Prof Madhumita Tamhane HDLC- Control – Information Frame Extended Mode ! ! ! ! ! ! Control extended ns 0 P/ F nr
  • 42.
    Prof Madhumita Tamhane HDLC- Control – Supervisory Frame
 Normal Mode ! ! ! ! ! ! Control normal P/F b7 b6 b5 b4 b3 b2 b1 b0 1 nr 0 X X
  • 43.
    Prof Madhumita Tamhane HDLC- Control – Supervisory Frame
 Extended Mode ! ! ! ! ! ! Control extende d 1 P/ F nr 0 X X 0 0 0 0
  • 44.
    Prof Madhumita Tamhane HDLC- Control – Supervisory Frame
 Normal Mode ! ! ! ! ! ! b b Receive Status 0 0 Ready to receive RR Positive acknowledgement when I frame not available. 0 1 REJ(Reject) Go back N ARQ 1 0 RNR 1 1 SREJ (selective reject)
  • 45.
    Prof Madhumita Tamhane HDLC- Control – Supervisory Frame
 ✓ OPTIONS with RR: ✓ RR with ACK ✓ RR with P = 1 ✓ RR with F = 1 ✓ RR with F = 1 ! ✓ OPTIONS with RNR: ✓ RNR with ACK ✓ RNR with P = 1 ✓ RNR with F = 1
  • 46.
    Prof Madhumita Tamhane HDLC- Control – Un-numbered Frame
 ! ! ! ! ! ! ✓ No extended field available. ✓ Control 5 bits are reversed vis-a-vis SDLC ✓ SIM – 10000 ✓ SNRM - 00001 Control normal P/F b7 b6 b5 b4 b3 b2 b1 b0 1 X1 X X X X
  • 47.
    Prof Madhumita Tamhane Drawpoll response sequence frames for HDLC
 ✓ Main A Flag Flag F C S A S - Frame 0 P = 1 RR Flag Flag A F C S I - Frame 0 F = 0 0 Data Flag Flag A F C S I - Frame 1 F = 1 0 Data Flag Flag F C S A S - Frame 2 P = 0 RNR
  • 48.
    Prof Madhumita Tamhane Drawselect response sequence frames for HDLC
 ✓ Main A Flag Flag F C S A S - Frame 0 P = 1 RNR Flag FlagA FC S S - Frame RR F = 1 0 Flag FlagA F C S I - Frame 0P = 00 Data Flag FlagA FC S S - Frame RR F = 1 1
  • 49.
    Prof Madhumita Tamhane Peerto peer communication using
 HDLC
 ✓ A B Flag FlagB F C S I - Frame 00 Data Flag FlagB F C S U - Frame 11P = 1100 Data Flag Flag A F C S U - Frame 00 F = 1 110 Data Flag FlagB F C S I - Frame 10 Data
  • 50.
    Prof Madhumita Tamhane Contd. ✓ AB Flag Flag A F C S I - Frame 0 2 Data Flag Flag A F C S I - Frame 1 2 Data Flag Flag A F C S I - Frame 2 2 Data Flag Flag F C S B S - Frame 3 RR
  • 51.
    Prof Madhumita Tamhane Peerto peer communication with error ✓ A B Flag Flag A F C S I - Frame 0 2 Data Flag Flag A F C S I - Frame 1 2 Data Flag Flag A F C S I - Frame 2 2 Data Error Flag Flag F C S B S - Frame 1 REJ
  • 52.
    Prof Madhumita Tamhane Contd. ✓ AB Flag Flag A F C S I - Frame 1 2 Data Flag Flag A F C S I - Frame 2 2 Data Flag Flag F C S B S - Frame 3 RR