Link Layer Protocols
-
Upload
madaline-berger -
Category
Documents
-
view
35 -
download
1
description
Transcript of Link Layer Protocols
Link Layer Protocols
Martin Weiss
Slide 2
Objectives of this Meeting
Explain what a protocol is Compare connection-oriented with
connectionless protocol types Describe some protocol
mechanisms Describe different link layer
protocols
Slide 3
Review of the Last Meeting
Error detection Flow control Performance of flow control
techniques
Slide 4
Data Link Layer Issues
Type Error detection and control Flow control
Slide 5
OSI Reference ModelEnd User Application Process
Application Services: FTAM, MHS, EDI
Data Representation, Transfer Syntax, Data TransformationDialog Synchronization and Control
End-to-End Message TransferNetwork Routing and Addressing
Data Link Control, Error Checking, FramingMechanical and Electrical Interface
Data Communications NetworkPhysical Connection
Network Independent Message Interchange
Syntax-Independent Message Interchange
Distributed Information ServicesApplication
PresentationSession
TransportNetworkLinkPhysical
OSI Layer
Slide 6
Structure of Protocols
Source AP Desintation AP
Application Process (AP) to AP Messages
Source LinkLayer
Desintation LinkLayer
L_DATA.request L_DATA.indicationLink Layer PDU’s
Physical Transmission Medium
Slide 7
Connectionless PrimitivesDTE A DTE B
Link Layer
DATA.request
DATA.indication
DATA.indication
DATA.request
Link LayerApp. Process App. Process
Slide 8
Connection-Oriented Primitives
DTE A DTE B
Link Layer
CON.request
CON.confirm
CON.indication
Link LayerApp. Process App. Process
DATA.request
DATA.indication
DATA.indication
DATA.request
Slide 9
Kermit Protocol Structure
SOH LEN SEQ TYPE data BCC CR
Slide 10
Kermit Details SOH = Start of Header LEN = Number of Bytes in the
Frame SEQ = Sequence Number of the
Current Frame
Slide 11
Kermit Details TYPE = Type of Frame
– S: Send Initiation Parameters– F: Filename– D: File Data– Z: End of File– B: End of Transaction– Y: ACK– N: NAK– E: Error (Fatal)
Slide 12
Kermit Details Data = Contents of Frame BCC = Block Check Character CR = End of Block Marker (ASCII
CR Character)
Slide 13
Operation of Kermit
Kermit
Time
KermitUser User
Kermit KermitConnect Connect
Receive
Send (File)
Data Block [1]Sent
Call Setup
V(S) = 0 V(R) = 0
V(S) = 1I[0,S,Init]
ACK[0,Y,Init]
I[1,F,Filename]ACK[1,Y]
V(R) = 1
V(R) = 2V(S) = 2
I[2,D,data]
ACK[2,Y]V(R) = 3
V(S) = 3 Data Block [1]Received
Slide 14
Operation of Kermit (Error)
Kermit
Time
KermitUser User
Data Block [1]Sent
V(R) = 2V(S) = 2 I[2,D,data]
ACK[2,Y]V(R) = 3
V(S) = 3
Data Block [2]Sent
I[3,D,data]
NACK[3,N]V(R) = 3
V(S) = 4
I[3,D,data]ACK[3,Y]
V(R) = 4
Data Block [1]Received
Data Block [2]Received
Slide 15
Operation of Kermit (Lost Frame)
Kermit
Time
KermitUser User
Data Block [1]Sent
V(R) = 2V(S) = 2 I[2,D,data]
ACK[2,Y]V(R) = 3
V(S) = 3
Data Block [2]Sent
I[3,D,data]V(S) = 4
I[3,D,data]ACK[3,Y]
V(R) = 4
Timeout
Data Block [1]Received
Data Block [2]Received
Slide 16
Operation of Kermit (Lost ACK)
Kermit
Time
KermitUser User
Data Block [1]Sent
V(R) = 2V(S) = 2 I[2,D,data]
ACK[2,Y]V(R) = 3
V(S) = 3
Data Block [2]Sent
I[3,D,data]V(S) = 4
I[3,D,data]
ACK[3,Y] V(R) = 4
Timeout
ACK[3,Y]V(R) = 4
Data Block [1]Received
Data Block [2]Received
Slide 17
Operation of Kermit
Destination Computer
Kermit
Time
KermitUser User
Data Block [n*]Sent
EOFExit
Data Block [n*]Received
EOF
EOTExit
V(S) = n* I[n*,D,data]ACK[n*,Y]
V(R) = n*I[(n+1)*,Z]
ACK[(n+1)*,Y]
I[(n+2)*,B]
ACK[(n+2)*,Y]
Slide 18
Structure of Bisync Information Frames
SYN SYN SOH Identifier Address STX Text ETX BCCSingle Block Message
SYN SYN SOH Identifier STX Text ETB BCCIntermediate of Multiblock Message
SYN = SynchronizationSOH = Start of HeaderSTX = Start of TextETX = End of TextETB = End of Text BlockIdentifier = Sequence Number of Block
First of Multiblock MessageSYN SYN SOH Identifier Address STX Text ETB BCC
End of Multiblock MessageSYN SYN SOH Identifier STX Text ETX BCC
Slide 20
HDLC Frame Format
Flag Address Control Information FCS Flag8 8/16 8/16 0 to N 16/32 8
Frame Format
Control Field for Normal Information Frame
0 N(S) N(R)P/F
Control Field for Normal Supervisory Frame
0 N(R)P/F1 S
Control Field for Normal Information Frame
MP/FM1 0
P/F = Poll/Final BitN(S) = Send Sequence NumberN(R) = Receive Sequence Number
S: RR RNR REJ SREJ
M: Defines 9 Commands and 4 Unnumbered Responses
Slide 21
Unidirectional Data (ACK and NAK)
Sender ReceiverUnACK’edList
V(S) V(R) UnACK’edList
V(S)I(0,0)
0 1 00 0 0
N(S) = V(R) => Frame OKRR(1)-
I(1,0)
I(2,0)
2 0
3 0N(S) = V(R) => Frame OK
N(S) = V(R) => Frame OK
1
1,2
RR(2)
RR(3)
2
-
V(R)0
0 1
0 2
0 3
(N(S), N(R))
Slide 22
Unidirectional Data (With Error)
Sender ReceiverUnACK’ed V(S) V(R) UnACK’ed
ListV(S)
I(3,0)3 4 0
3 0 0
I(4,0)5 0
N(S) = V(R) => Frame OK
3,4
3,4 REJ(3)
RR(5)-
V(R)3
0 4
(N(S), N(R))
N(S) = 4 V(R) = 3 ERROR!
I(3,0)
I(4,0)N(S) = V(R) => Frame OK
0 5
-
Slide 23
Example 2: Bidirectional Data
Sender ReceiverUnACK’edList
V(S) V(R) UnACK’edList
V(S)I(0,0)
0 1 00 0 0
I(0,1)-I(1,1)
I(2,1)2 1
3 1
1
1,2
I(1,3)-
V(R)0
0 1
1 2
2 3
(N(S), N(R))
1 1 01 1
-
1 3 -
13 2
RR(2) 2 3 -
Slide 24
Modems Error Correction (LAPM)
DTE
Modem (DCE)
User InterfacePart(UIP)
ErrorCorr-ectingPart(ECP) Public
TelephoneNetwork
Modem (DCE)
DTE
User InterfacePart(UIP)
ErrorCorr-ectingPart(ECP)