data link level design issues

85
Physica l Link N etw ork Transport Session Presentation A pplication O SIR eference M odel-Seven Layers O SIR eference M odel-Seven Layers Transporting 0’sand 1’spoint-to-point O rganizing flow of0’s& 1’s Fram e form atting-error detecting and correcting codes, A R Q R outing and Flow C ontrolfrom Link-to-Link M anaging path flow over severallinks Setting up and Taking D ow n C onnections -Synchronization C haracter Form ats-A SC II, Encryption U ser Functions

Upload: arien

Post on 15-Jan-2016

58 views

Category:

Documents


0 download

DESCRIPTION

Data Link Level Design Issues. Services provided to Network Layer Framing Error control Flow control. Services provided to Network Layer. Host 1. Host 2. Layer 4. Layer 4. Layer 3. Layer 3. Actual Data Path. Layer 2. Virtual Data Path. Layer 2. Layer 1. Layer 1. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Data Link Level Design Issues

Physical

Link

Network

Transport

Session

Presentation

Application

OSI Reference Model-Seven LayersOSI Reference Model-Seven Layers

Transporting 0’s and 1’s point-to-point

Organizing flow of 0’s &1’s

Frame formatting-error detecting and correcting codes, ARQ

Routing and Flow Control from Link-to-Link

Managing path flow overseveral links

Setting up and Taking Down Connections

-Synchronization

Character Formats-ASCII, Encryption

User Functions

Page 2: Data Link Level Design Issues

Data Link Level Design Issues

• Services provided to Network Layer

• Framing

• Error control

• Flow control

Page 3: Data Link Level Design Issues

Services provided to Network Layer

Layer 4

Layer 3

Layer 2

Layer 1

Layer 4

Layer 3

Layer 2

Layer 1

Physical Medium

Host 1 Host 2

Virtual Data Path

ActualData Path

Page 4: Data Link Level Design Issues

Most Common Services

• Unacknowledged connectionless service– Very low error rate– Voice traffic

• Acknowledged connectionless service– Frame arrived safely– Good for wireless (unreliable) channels

• Acknowledged connection oriented service– Reliable stream of ordered frames– Three phases -connection, data flow, disconnect

Page 5: Data Link Level Design Issues

3 32 2 22 2

2

ROUTER

Routing Processor

Link LayerProcessor

Transmission line to a router

FramesPackets

Data link protocol

Placement of Data Link Protocol

Page 6: Data Link Level Design Issues

• Character count - obsolete

• Starting and ending characters, with character stuffing (see next slide)

• Starting and ending flags, with bit stuffing(see following slide)

• Physical layer coding violations

Framing

Page 7: Data Link Level Design Issues

Character Stuffing (Transparency to User)

DLE STX DLE ETXDLE ETXDLE

Frame

Beginningof frame

End offrame

Actual data sequence

Stuffed character

User data

The first of two DLE characters is always a stuff-delete

Page 8: Data Link Level Design Issues

Bit Stuffing (Transparency to User)

01111110 011111010

Frame

Beginningof frame

End offrame

Actual data sequence

Stuffed bit

User data

A “0” following five “1’s” is always deleted

01111110

Page 9: Data Link Level Design Issues

Error control

0 1 1 1 0 1 0 0

Violation

Physical layer coding violations

Page 10: Data Link Level Design Issues

Error Control

• Automatic Repeat Request (ARQ)– Error detecting codes– Positive acknowledgement(ACK)– Negative acknowledgement(NACK)– Timeout– Delay sensitivity

• Forward Error Correction– Error correcting codes– Delay insensitive– Much more overhead required

Page 11: Data Link Level Design Issues

Link-by-Link vs End-to-End Error Control

There’s a tradeoff

Page 12: Data Link Level Design Issues

N links p = Probability of error on a single link

M = Single message transmission time

Link-by-line acknowledgementAverage no. link retransmissions=1/(1-p)Average message transmission time per link=M/(1-p)Average message transmission time N links = NM/(1-p)

End-to-end acknowledgementProbability no error end-to-end=(1-p)N

Probability at least one error end-to-end=q=1- (1-p)N

Average no. end-to-end retransmissions=1/(1-q)= (1-p)-N

Average transmission time, end-to-end = M (1-p)-N

Assumption of negligible propagation delay

Page 13: Data Link Level Design Issues

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 110

0

101

102

103

104

Link error probability

Nor

mal

ized

tra

nsm

issi

on t

ime Link-by-link 3 links

Link-by-link 10 links

End-to-end 3 links

End-to-end 10 links

Page 14: Data Link Level Design Issues

Flow control• Closed loop controls

– Sliding window

• Open loop– Leaky bucket

Page 15: Data Link Level Design Issues

0 0

1 1

PE

PE

Encdr mod channel demod decdr1,0 1,0

Pe = probability of bit error

Binary Symmetric Channel

Fig. 1 Communica tion Syst em

DigitalS ink Demod

DigitalSourc e Modul ator

...0110...

Ch annel

Encode r

Decode r

...0110...

…11000...

…11000...

Page 16: Data Link Level Design Issues

Redundancy Encoding

• Block codes– (n,k) code n= codeword length, k=Information bits

• ASCII (8,7) code

– Parity bits• ASCII “e” 10100110 Parity bit

– Hamming distance-number of different places

• Convolutional Codes– Difference in path lengths– Viterbi decoding

Page 17: Data Link Level Design Issues

4327

3216

4315

bbbb

bbbb

bbbb

(1)

111111115

010011114

000101113

101001112

001110111

100010110

11010019

01100018

10011107

00101106

01110105

11000104

01011003

11101002

10110001

00000000

bitCodeword 7654321 bbbbbbb

(7,4) Hamming Code

Page 18: Data Link Level Design Issues

76543218 bbbbbbbb

Augmented Hamming Codeextra parity bit over all other bits

1111111115

0010011114

1000101113

0101001112

0001110111

1100010110

011010019

101100018

010011107

100101106

001110105

111000104

101011003

011101002

110110001

000000000

bitCodeword 87654321 bbbbbbbb

Page 19: Data Link Level Design Issues

Hamming Distance and Error Correction

Example-six bit codewords

Codeword 1- 001101

Codeword 2- 101001

HammingDistanceTwo

Number of places codewords differ

Page 20: Data Link Level Design Issues

Code-Distance twofour code words

Code-distance threetwo code words

-Code point

011 111

110

101

000

(3,2) code

(3,1) code

000

111

Page 21: Data Link Level Design Issues

n bit codeword - vertex on an n dimensional cube

Number of edges tranversed from one point to another=Hamming distance between codewords

Codewords

Intermediate vertices Distance = 5

Page 22: Data Link Level Design Issues

Codewords

Single Error Detecting Code-Distance two

Single-error correcting or double-error detecting Distance three

Single-error correcting and double-error detecting Distance four

Vertex

Distances and error correction and detection

Page 23: Data Link Level Design Issues

1D

12 C

Distance and Correcting and Detecting Capability

D=Number of detectable errorsC=Number of correctable errorsMinimum distance between codewords

Examples: (7,4) Hamming code =3D= 2 and C=1Augmented Hamming (8,4) code =4, D=3 and C =1

Received n bits not a codeword

Received n bits closest to one codeword

Page 24: Data Link Level Design Issues

Transmitter Channel Receiver

Feedback Channel

NACK when error detected

Automatic Repeat Request

Page 25: Data Link Level Design Issues

n,...,,,j;)P(Pj

n)nj(P jn

ej

e 2101bits in errors

Forward Error Correction

Pe=P(Single bit in error)Independence from bit to bit

n

Cj

jne

je )P(P

j

n)C(P)(P

1

1errorsbit than Moreerror decoding

Page 26: Data Link Level Design Issues

Code Data Rate,k/n Word error prob-

ability for310eP

Word error prob-

ability for610eP

(7,4) Hamming .57 51012 . 111012 .(15,11) Hamming .73 41051 . 101051 .(31,26) Hamming .84 410654 . 1010654 .(23,12) Golay .52 91068 . 211068 .

Trade between data rate and error correcting power

Page 27: Data Link Level Design Issues

Code Efficiency

n bit codeword - vertex on an n dimensional cubeAn efficient code packs the code “densely”

n nearestneigbors

Code point

Page 28: Data Link Level Design Issues

n-1 nearestneighbors of adjacentpoint

Code point

Page 29: Data Link Level Design Issues

i

nNumber of vertices at distance I from a codeword

C

i i

n

0

Number of vertices at distance C or lessVertices belong to codeword

Packing the cube efficiently

k2 Number of code points

Lower bound on number of verticesEquality for Perfect code

C

i

kn

i

n

1

22

Page 30: Data Link Level Design Issues

Implementation of Coding and Decoding

In digital hardware, naturally

Cyclic codes-every codeword a cyclic shift of another

eg Hamming code codewords 1,3,4,6,8,10 and cyclic shifts3 - 0011010 13 - 1101000

Cyclic codes represented by a polynomial

Each code has a unique generator polynomial-G(x)e.g. For (7,4) Hamming, G(x)= 123 xx

Page 31: Data Link Level Design Issues

Representing a binary sequence by a polynomiale.g., 010110101 -

Division:

3223 11

100001011101 :Addition

x)x()xx(

x x x x7 5 4 2 1

111

011100101011101 :t ionMult iplica345223

xxx)x()xx(

x x x x7 4 3 4 x x x x x x x x6 5 2 2 2 21 1 1( ) ( )

11010111110111110101

Divisor Quotient Remainder

Page 32: Data Link Level Design Issues

124567 xxxxx123 xx467 xxx

125 xx

xxx

x

34

4 1

245 xxx

124 xxx

1

123

3

xx

xx

xx 2

Divisor

Quotient

Remainder

Page 33: Data Link Level Design Issues

Forming a codeword from k information bits

1) D(x) - k-1 degree polynomial representing data2) Form xn-kD(x) (n-1 degree)3) Divide xn-kD(x) by G(x) , save remainder R(x)4) Form codeword C(x)= xn-kD(x) +R(x)

Mathematical justification

)x(R)x(G)x(Q)x(Dx kn

)x(G)x(Q)x(R)x(Dx)x(C kn

Codeword is a multiple of G(x)If not an error has occurred.

Page 34: Data Link Level Design Issues

Example 1110(14) to be transmitted-D(x)= x3+ x2+ x

Multiplication by x3 gives x6+ x5+ x4

Remainder after division by x3+ x2+1 is x

C(x)=x6+ x5+ x4+ x 1110010(14)

Error in transmission channel error 1111010 Received

x6+ x5+ x4+ x3 + x /x3+ x2+1 R(x)= x3

Page 35: Data Link Level Design Issues

++ T T Tc-Inputsequence

o-Outputsequence

s1 2s s3

Remainder 0Valid codewordno error detected

o s

s o s

s s

s o c

n n

n n n

n n

n n n

3 1

3 2 1

2 1 1

1

c s s s o1 2 3

1 1 0 0 0

1 1 1 0 0

0 0 1 1 0

1 0 0 0 1

0 0 0 0 0

1 1 0 0 0

1 1 1 0 0

0 0 1 1 0

1 0 0 0 1

0g 2g 3g

Divider circuit

Page 36: Data Link Level Design Issues

Encoder Implementation

DividerCircuit

InputSequence

Remainder - R(x)

n-k tic delay

D(x)

D(x) x n k

x n k

D(x)+ R(x)x n k

Page 37: Data Link Level Design Issues

Generating Polynomials of Cyclic Codes

Ham g x x

Ham g x x

Golay x x x x x x

min ( , )

min ( , )

( , )

7 4 1

1511 1

23 12 1

3

4

11 9 7 6 5

Standards for Error DetectionCRC -12 -

CRC 16 -

CRC 16(ANSI) -

CRC - CCITT -

CRC - 32

x x x x x x x x

x x x x x x

x x x x x x x x x

x x x x x x x x x x x

12 11 3 2 11 2

16 15 2 15

16 15 5 15 4 3 2

16 12 5 15 14 12 4 3 2

1 1 1

1 1 1

1 1 1

1 1 1

( )( )

( )( )

( )( )

( )( )

- x x x x x x x x x x x x x x32 26 23 22 16 12 11 10 8 7 5 4 2 1

Page 38: Data Link Level Design Issues

Burst Error Capabilities of CRC Codes

TransmittedC(x)

Channel errorE(x)

ReceivedC(x) + E(x)

Because of error C(x) + E(x) is not divisible by G(x)E(x)/G(x)=R(x) ModG(x)

Page 39: Data Link Level Design Issues

•If (x+1) a factor of G(x) odd number of errors

• All double errors

000

xx)x(G)x(E

ji),x(xxx)x(E ijiji 1

•All bursts of length < r+1

Page 40: Data Link Level Design Issues

Interleaving for Burst Errors

n1

k2 codewords each (n1 k1)

n1

n1

Imaginedrearrangement

n2 -

k2

n2 -

k2

Error burst

n1

Additional Storage and Processing

n1 (n2 - k2 ) parity bits

Turbo codes

n2 -

k2

Page 41: Data Link Level Design Issues

Convolutional codes

Tinput110100

Example(3,1) code

output+

T

+

111 100 010 110 011 001 000

0

0

0

0

1

2 1

3 1 2

1 2

i

i s

i s s

s sInitial state -

s1 s2

Initial state - s s1 2 0

Page 42: Data Link Level Design Issues

Trellis Representations

00

01

10

11

00

01

10

11

000111

001110

011100

010101

State Input Next state

Page 43: Data Link Level Design Issues

Viterbi Algorithm-shortest path

Trellis codes-Euclidian distance

shortest path-Hamming distance

Page 44: Data Link Level Design Issues

convencoder

blockencoder CHAN block

decoderVA

Configurations

Correction

blockencoder CHAN

Errordetection

NACK

Detection

Page 45: Data Link Level Design Issues

A B

Data Link Prototcols

Page 46: Data Link Level Design Issues

Data Link LayerSource Machine

Unrestricted SimplexTransmitter

Form Frame

Physical Layer

Packet fromNetwork Layer

Page 47: Data Link Level Design Issues

Elementary Data Link Protocols(3.3)

Flag Flag

Basic Link Level Frame

Info CKSMFrame Header

Kind Seq ACKUser DataFormed into aPacket and Passedto Network Layer

Frame headerThree fields

Page 48: Data Link Level Design Issues

Dealing with an Unreliable Channel

• Timeout routines

• Sequence number in Frames

Page 49: Data Link Level Design Issues

Unrestricted SimplexReceiver

•Wakeup•Remove frame from Physical level buffer•Form packet and Pass to Network Layer•Go back to sleep

Page 50: Data Link Level Design Issues

Simplex Stop-and Wait

•Infinite processor speed or infinite buffer not needed•Inserting maximum delay too conservative

•ACK to sender is solution (Data in one direction only)•Transmitter

•Fetch packet from network level•Form frame•Frame stored in transmit buffer until ACK received•Transmitted after ACK

•Receiver•Remove frame from Physical level buffer•Form packet and Pass to Network Layer•Return ACK

Flow Control Problem

Page 51: Data Link Level Design Issues

Stop-and Wait Simplex - Noisy Channel

Complicating Factor - ACK errorsSame frame received in succssionRemedy - sequence numbers 0 and 1

•Transmitter•Initialize sequence number•Fetch packet from network level•Form frame•Insert sequence number in frame•Timeout and resend frame•Frame stored in transmit buffer until ACK received•Invert sequence number

Page 52: Data Link Level Design Issues

Receiver•CHECKSUM to validate received frame •Remove frame from Physical level buffer•Check sequence number•Form packet and Pass to Network Layer•Invert expect sequence number•Return ACK

Page 53: Data Link Level Design Issues

Sliding Window Protocols

•Full Duplex Info and ACKs simultaneously•Piggybacking-ACK on Data Frames

-complications-ad hoc scheme• Sequence numbers - maximum 2n-1•Sending window - Number of frames allowed to send

•Receiving window - Number of frames allowed to accept

Page 54: Data Link Level Design Issues

One bit Sliding Window(Stop-and-Wait)

Link Layer A

Link Layer B

Info and piggybacked ACKs

Info and piggybacked ACKs

One process as initiatorelse duplication(See Fig 3-14b)

Page 55: Data Link Level Design Issues

A sends (0,1,A0)

A gets (0,0,B0)*A sends (1,0,A1)

A gets (1,1,B1) *A sends (0,1,A2)

A gets (0,0,B2) *A sends (1,0,A3)

B gets (0,1,A0)B sends (0,0,B0)

B gets (1,0,A1) *B sends (1,1,B1)

B gets (0,1,A2) *B sends (0,0,B2)

B gets (1,0,A3) *B sends (1,1,B3)

(Seq,ACK,Pkt #)

Time

A in Lead

Page 56: Data Link Level Design Issues

A sends (0,1,A0)

A gets (0,1,B0) *A sends (0,0,A0)

A gets (0,0,B0)A sends (1,0,A1)

A gets (1,0,B1) *A sends (1,1,A1)

B sends (0,1,B0)

B gets (0,1,A0) *B sends (0,0,B0)

B gets (0,0,A0)B sends (1,0,B1)

B gets (1,0,A1)B sends (1,1,B1)

B gets (1,1,A1)B sends (0,1,B2)Time

No leader

(Seq,ACK,Pkt #)

Page 57: Data Link Level Design Issues

Low throughput one bit window

Line FlowFrame

TransmissionTimeout interval Message

Transmission

Throughput(Line Utilization)

F T

F/(F+T)

Example: 50 kbps satellite channel, 1000 bit frame, Round trip delay 520 msec. F=20 msec

Page 58: Data Link Level Design Issues

Window = w > 1 Pipelining

1 2 3 4 5 6 7 8

Eg: w = 4

Transmit

1 2 3 4 5 6 7 8Receive

ACKs

Can be all at onceACK last in batch

Page 59: Data Link Level Design Issues

Error control

Go-back-n

1 2 3 4 5 2 3 4 5Transmit

1 2 3 4 5 2 3 4 5

Receive

Frame in error Ignored

Timeoutor NACK

Page 60: Data Link Level Design Issues

A subtlety in sequence numbering

Sequence numbers-0,1,…,MAX_SEQ

Up to MAX_SEQ frames can be outstandingnot MAX_SEQ+1

Example: w=4, MAX_SEQ=3

•Frames 0, 1, 2, 3 received correctly but ACKs lost•Frames 0, 1, 2, 3 retransmitted receiver thinks they are newRemedy: MAX_SEQ=3, w=3, receiver waiting for 3in above scenario

Page 61: Data Link Level Design Issues

Selective repeat

1 2 3 4 5 2 6 7

Transmit

1 2 3 4 5 2 6 7

Receive

Frame in error Stored

Timeoutor NACK

ACK

NACK

Careful of repeats

Page 62: Data Link Level Design Issues

A sends frames0 1 2 3 4 5 6

A times out andresends frames0 1 2 3 4 5 6

A sends frames7 0 1 2 3 4 5

Window at B0 1 2 3 4 5 6B gets 0 1 2 3 4 5 6without errorB sends ACK andAdvances window to7 0 1 2 3 4 5(empty buffers)

B gets 0 1 2 3 4 5 6without errorB sends ACK for0 1 2 3 4 5 6 Bad packets sent to network level

(Seq,ACK,Pkt #)

ACKs destroyed

Problem with SR

Page 63: Data Link Level Design Issues

A sends frames0 1 2 3

A times out andresends frames0 1 2 3

Window at B0 1 2 3B gets 0 1 2 3without errorB sends ACK forAdvances window to4 5 6 7(empty buffers)

B gets 0 1 2 3without errorB sends ACK

(Seq,ACK,Pkt #)

ACKs destroyed

Remedy: New window has no overlap with original windowi.e window half of max sequence number

Number of buffers=window sizeTimer for each bufferAuxiliary timer

Page 64: Data Link Level Design Issues

Efficiency Comparisions

F=Frame transmission time

RT=Roundtrip delay(propagation, processing)

w=Window size (sec) > RT (simplification)

PF=Probability frame error detected= 1-(1-PB)F

=1-(1-F PB)= F PB for PB<<1

TSaw , TGBn , TSR Total frame transmission times

=F/ Total frame transmission time

Page 65: Data Link Level Design Issues

Stop and Wait

1 2 2 2 3 4Transmit

1 2 2 2 3 4

Receive

Frame in error

RT RT

Tsaw=(F+RT)/(1- PF)= (1- PF)/(1+RT/F)

Page 66: Data Link Level Design Issues

Go-back-n

1 2 3 4 5 6 7 8 9 10 2 3 4 5Transmit

1 2 3 4 5 6 7 8 9 10 2 3 4 5

Receive

RT

TGBn =F /(1- PF)+RT PF /(1- PF)

= (1- PF)/(1+ PF RT/F)

Page 67: Data Link Level Design Issues

Selective Repeat

1 2 3 4 5 6 7 8 9 10 2 111213

1 2 3 4 5 6 7 8 9 10 2 111213

Receive

RT

TSR = F /(1- PF) = 1- PF

Page 68: Data Link Level Design Issues

Tsaw=(F+RT)/(1- PF)

= (1- PF)/(1+RT/F)

TGBn =F /(1- PF)+RT PF /(1- PF)

= (1- PF)/(1+ PF RT/F)

TSR = F /(1- PF) = 1- PF

Stop and Wait

Go-Back-n

Selective Repeat

Page 69: Data Link Level Design Issues

0 2 4 6 8 10 12 14 16 18 200

0.2

0.4

0.6

0.8

1

1.2

Eff

icie

ncy

Normalized round trip

SAW PF=.1SAW PF=.01

SR PF=.1

SR PF=.01

GBn PF=.1

GBn PF=.01

Page 70: Data Link Level Design Issues

Homework problems

#1 Calculate the efficiency of all three protocols for the following set of parameters:1) Frame length = 1000 bits2) Line rate = 1.544 Mbps3) Line length = 1000 km4) Bit error probability=10-4

5) Assume window larger than RT6) Assume propagation of 6 sec/km

#12, #15,#20, #24,#25

Page 71: Data Link Level Design Issues

Finite State Machine Models of Protocols

• S = Set of possible channel and process states

• M = Set of frames on channel

• I = Set of initial states

• T = Set of transitions between states

• Reachability analysis

• Deadlock state– No transition out of state– No forward progress possible

• SDL - Specification Description Protocol

Page 72: Data Link Level Design Issues

Example: Send-and-Wait Protocol

• Two sender states, 0,1

• Two receiver states, 0,1

• Four Channel states– 0 Frame in transit– 1 Frame in transit– A Ack in transit– Channel empty

Page 73: Data Link Level Design Issues

0 0 -

0 0 0

0 0 0 1 0 -1 0 1

0 1 00 1 -

1 0A

1 1 -

1 1 1

0 1 A

0 7

0

7

1

05

4 2

0

3

6

8

08 0

Tra

nsi

tion

Wh

o ru

ns?

Fra

me

acce

pte

d

Fra

me

emit

ted

To

net

wor

k la

yer

0 (Frame lost)1 R 0 A Yes2 S A 1 -3 R 1 A Yes4 S A 0 -5 R 0 A No6 R 1 A No7 S (timeout) 0 -8 S (timeout) 1 -

Stop and Wait Protocol (Sender, Receiver, Channel)

Normaloperation

Page 74: Data Link Level Design Issues

Flag Flag Data CKSMAddresses Control

Bit oriented protocols SDLC, HDLC, ADCCP, LAP, LAP

Addresses - Multiple terminals lines

Control - Sequence number, ACKs, etc (See next slide.)

Data - Transparency to User

CKSM - CRC Codes

Page 75: Data Link Level Design Issues

Types of FramesDifferences in Control FieldsInformation

0 Sequence P/F Next

Control Field

Piggybacked ACKType indicator 3 bit number Poll/Final

Supervisory

1 0 Type P/F Next

Control Field

0 -ACK , 1 - NACK, 2 - Receive not ready3 - Selective reject

Unnumbered - Control and Data (sometimes) - depends onparticular protocol

Page 76: Data Link Level Design Issues

Control Functions

• DISC(disconnect)-Machine going down

• SNRM(Set Normal Response Mode)-Machine coming back on unbalanced

• SABM(Set Asynchronous Balanced Mode)

• FRMR(Frame Reject)-Frame looks funny

• UA(Unnumbered Acknowledgement)-ACK for control frames

• Miscellaneous - Initialization, polling, status reports

Page 77: Data Link Level Design Issues

LAN

LAN

LAN

LAN

The Internet

Router

Subnet

HostsLeased Lines

Page 78: Data Link Level Design Issues

MODEM

MODEM

RO

UT

ER

Dial-up Telephone Line

TCP/IP ConnectionUsing SLIP of PPP

Access

Page 79: Data Link Level Design Issues

PPP Point-to-Point Protocol

• Framing similar to HDLC-Frame delineation, error detection

• LCP(Link Control Protocol)-line bringing up,testing, setting options, putting down

• NPC(Network Control Protocol)-Negotiating network layer options

Page 80: Data Link Level Design Issues

PPP FrameSimilar to HDLC but Character Oriented

Flag Payload CKSM Addresses Control FlagProtocol

•Character stuffing to make frame integral number of bytes•Flag - 01111110•Address - 11111111 all stations accept the frame•Control - 00000011 default, sequence number on unreliablelines•Address and control field can be omitted by negotiation•Protocol-Kind of packet in payload field•Payload variable up to some maximum•Checksum-2 bytes with 4 bytes optional

Page 81: Data Link Level Design Issues

Dead Network

Establish Authenticate

OpenTerminate

Failed

Failed

Carrier Detected Both sides agree on options Successfulauthentication

NCP configurationDoneCarrier Dropped

Page 82: Data Link Level Design Issues

ATM(Asynchronous Transfer Mode)

5 octets 48 octets

CellHeader User Data

Upper layers Upper layers

Plane managementLayer management

Control plane User Plane

ATM Adaptation layer

ATM layer

Physical layer

PMD-Physical medium dependent

TC - Transmission convergencecells bits

Page 83: Data Link Level Design Issues

5 octets 48 octets

CellHeader User Data

No error control

HEC - Checksum over headerusing generator polynomialControl bytes

ationsynchronizfor 01010101

128

)xxx(

Page 84: Data Link Level Design Issues

Non-Data Cells in ATM

• Idle cells in synchronous media

• OAM (Operations and Maintenance)– First three header bytes all zeros– Exchanges between switches– Speed matching in SONET– Framing function

Page 85: Data Link Level Design Issues

Cell ReceptionCell delineation

HUNT

PRESYNCH

SYNC

Bit-by-bitcheck

Cell-by-cellcheck

Correct HEC detected

Incorrect HEC detected

Consecutivecorrect HECs

Consecutiveincorrect HECs

Probability of random “correct” pattern = 2-8

Probability of random “correct” patterns = 2-8