r2 itesm-02

19
The Data Link Layer Chapter 3

Upload: samuel-perez-aguilar

Post on 08-Jul-2015

146 views

Category:

Education


1 download

DESCRIPTION

enmarcado en la capa 2 protocolos de control de flujo de la capa data link

TRANSCRIPT

Page 1: R2 itesm-02

The Data Link Layer

Chapter 3

Page 2: R2 itesm-02

Data Link Layer Design Issues

Algorithms for achieving reliable, efficient communication between two adjacent machines

• Services Provided to the Network Layer

• Framing

• Error Control

• Flow Control

Page 3: R2 itesm-02

Functions of the Data Link Layer

• Provide service interface to the network layer

• Dealing with transmission errors

• Regulating data flow• Slow receivers not swamped by fast senders

Page 4: R2 itesm-02

Functions of the Data Link Layer (2)

Relationship between packets and frames.

Page 5: R2 itesm-02

Services Provided to Network Layer

(a) Virtual communication.(b) Actual communication.

Page 6: R2 itesm-02

Services Provided to Network Layer (2)

Placement of the data link protocol.

Page 7: R2 itesm-02

Framing

Data Link Layer breaks the bit stream up into discrete frames and compute the checksum for each frame

Then it Transmit the frame

When a frame arrives at the destination, the checksum is recomputed to see if there is an error.

Page 8: R2 itesm-02

Framing

Breaking up the bits to make frames– Insert time gaps (networks rarely make any guarantees about

timing)– Character count– Flag bytes with byte stuffing– Starting and ending flags, with bit stuffing– Physical Layer coding violations

Page 9: R2 itesm-02

Framing

A character stream. (a) Without errors. (b) With one error.

Page 10: R2 itesm-02

Framing (2)

(a) A frame delimited by flag bytes.(b) Four examples of byte sequences before and after stuffing.

Page 11: R2 itesm-02

Framing (3)

Bit stuffing

(a) The original data.

(b) The data as they appear on the line.

(c) The data as they are stored in receiver’s memory after destuffing.

Page 12: R2 itesm-02

Flow control

What to do with a sender that systematically wants to transmit frames faster than the receiver can accept them

a) Feedback-based flow control– receiver sends back information to the sender giving it

permission to send more data

a) Rate-based flow control (never used in data-link layer)– protocol has a built-in mechanism that limits the rate at which

senders may transmit data, without using feedback from the receiver

Page 13: R2 itesm-02

Elementary Data Link Protocols

• An Unrestricted Simplex Protocol

• A Simplex Stop-and-Wait Protocol

• A Simplex Protocol for a Noisy Channel

Page 14: R2 itesm-02

Protocol Definitions

Continued

Some definitions needed in the protocols to follow. These are located in the file protocol.h.

Page 15: R2 itesm-02

Protocol Definitions(ctd.)

Some definitions needed in the

protocols to follow. These are located in the file protocol.h.

Page 16: R2 itesm-02

Unrestricted Simplex Protocol

Page 17: R2 itesm-02

Simplex Stop-and-

Wait Protocol

Page 18: R2 itesm-02

A Simplex Protocol for a Noisy Channel

A positive acknowledgement

with retransmission protocol.

Continued

Page 19: R2 itesm-02

A Simplex Protocol for a Noisy Channel (ctd.)

A positive acknowledgement with retransmission protocol.