Link Layer Protocols

30
Link Layer Protocols Martin Weiss

description

Link Layer Protocols. Martin Weiss. 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. Review of the Last Meeting. Error detection Flow control - PowerPoint PPT Presentation

Transcript of Link Layer Protocols

Page 1: Link Layer Protocols

Link Layer Protocols

Martin Weiss

Page 2: Link Layer Protocols

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

Page 3: Link Layer Protocols

Slide 3

Review of the Last Meeting

Error detection Flow control Performance of flow control

techniques

Page 4: Link Layer Protocols

Slide 4

Data Link Layer Issues

Type Error detection and control Flow control

Page 5: Link Layer Protocols

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

Page 6: Link Layer Protocols

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

Page 7: Link Layer Protocols

Slide 7

Link Management

Connection-Oriented Connectionless

Page 8: Link Layer Protocols

Slide 8

Review of Protocol Types

Protocol Environments Byte oriented protocol Bit oriented protocol

Page 9: Link Layer Protocols

Slide 9

Kermit Protocol Structure

SOH LEN SEQ TYPE data BCC CR

Page 10: Link Layer Protocols

Slide 10

Kermit Details

SOH = Start of Header LEN = Number of Bytes in the

Frame SEQ = Sequence Number of the

Current Frame

Page 11: Link Layer Protocols

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)

Page 12: Link Layer Protocols

Slide 12

Kermit Details

Data = Contents of Frame BCC = Block Check Character CR = End of Block Marker (ASCII

CR Character)

Page 13: Link Layer Protocols

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

Page 14: Link Layer Protocols

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

Page 15: Link Layer Protocols

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

Page 16: Link Layer Protocols

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

Page 17: Link Layer Protocols

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]

Page 18: Link Layer Protocols

Slide 18

Sliding Window Protocols

Frequently assumes a peer to peer protocol

Acknowledgements can be “piggybacked”

Page 19: Link Layer Protocols

Slide 19

Bit-Oriented Protocols IBM’s Synchronous Data Link Control

(SDLC) ISO’s High-Level Data Link Control

(HDLC)– ITU’s Link Access Protocol-Balanced (LAP-B)– ITU’s Link Access Protocol for the ISDN D

channel (LAP-D)– ITU’s Link Access Protocol for Modems

(LAP-M)

Page 20: Link Layer Protocols

Slide 20

HDLC

Bit oriented protocol Can operate in several modes

– Normal Response Mode (NRM)– Asynchronous Response Mode (ARM)– Asynchronous Balanced Mode (ABM)

Page 21: Link Layer Protocols

Slide 21

HDLC Frame Types

Unnumbered frames– Used for connection establishment

and disconnection– Do not contain acknowledgements

Information frames– Carry information between nodes– Can use piggyback

acknowledgements in ARM and ABM

Page 22: Link Layer Protocols

Slide 22

HDLC Frame Types

Supervisory frames– Used for error and flow control– Contain sequence numbers

Page 23: Link Layer Protocols

Slide 23

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

Page 24: Link Layer Protocols

Slide 24

Operation of HDLC Normal mode Components

– Received frame counter (V(R))– Sent frame counter (V(S))– Contents of frame

»V(R), S(R)»Frame type»Data

– Unacknowledged list

Page 25: Link Layer Protocols

Slide 25

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))

Page 26: Link Layer Protocols

Slide 26

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

-

Page 27: Link Layer Protocols

Slide 27

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 -

Page 28: Link Layer Protocols

Slide 28

Modems Error Correction (LAPM)

DTE

Modem (DCE)

User InterfacePart(UIP)

ErrorCorr-ectingPart(ECP) Public

TelephoneNetwork

Modem (DCE)

DTE

User InterfacePart(UIP)

ErrorCorr-ectingPart(ECP)

Page 29: Link Layer Protocols

Slide 29

Point to Point Protocol (PPP)

Used as the link layer in dialup Internet access

Page 30: Link Layer Protocols

Slide 30

Summary

Description of a protocol Types of protocols Protocol primitives and

mechanisms Examples