Module 4.0: Data Link Layer - PowerPoint PPT Presentation

About This Presentation
Title:

Module 4.0: Data Link Layer

Description:

Module 4.0: Data Link Layer Ch 10- 11 The Logical Link Control (LLC) sublayer Framing Flow Control Error Control The Media Access Control (MAC) sublayer – PowerPoint PPT presentation

Number of Views:261
Avg rating:3.0/5.0
Slides: 16
Provided by: KSa94
Category:
Tags: data | forouzan | layer | link | module

less

Transcript and Presenter's Notes

Title: Module 4.0: Data Link Layer


1
Module 4.0 Data Link Layer
Ch 10- 11
  • The Logical Link Control (LLC) sublayer
  • Framing
  • Flow Control
  • Error Control
  • The Media Access Control (MAC) sublayer
  • Random Access (CSMA)
  • Token Passing

2
LLC Framing
  • Framing is partitioning a bit stream into
    discrete units or blocks of data.
  • To distinguish between same bit pattern of real
    user data and the start-stop, bit stuffing is
    employed.
  • E.g., stuff a bit after every 5th consecutive
    ones.

3
Ethernet/802.3 Frame
  • Preamble is for synchronization
  • Source and destination are 48 bits each and have
    the MAC address, e.g, 08002001D62A. The
    left 3 bytes are vendor specific, and the others
    are serial number of device assigned by Sun.
    00000C is CISCO.
  • This MAC address is different than the IP address
    !!!

4
LLC Flow Control
  • Flow Control is the process that controls the
    rate at which data is exchanged between two
    nodes. It involves a feedback mechanism.
  • Ensuring the sending entity does not overwhelm
    the receiving entity, and thus preventing buffer
    overflow.
  • Transmission time Time taken to emit all bits
    into medium
  • Propagation time Time for a bit to traverse the
    link
  • Two Protocols
  • Stop-and-Wait
  • Sliding Window

5
Stop-and-Wait
  • Source transmits frame
  • Destination receives frame and replies with
    acknowledgement
  • Source waits for ACK before sending next frame
  • Destination can stop flow by not send ACK
  • Works well for a few large frames
  • Only one frame at a time can be in transit.
  • Providing multiple ACKs for one big message is
    inadequate.

6
Sliding Window
  • Allow multiple frames to be in transit
  • Receiver has buffer W long
  • Transmitter can send up to W frames without ACK
  • Each frame is numbered
  • Sequence number bounded by size of field (k)
  • Frames are numbered modulo 2k

7
(No Transcript)
8
Sliding Window Comments
  • If the maximum window size is one, then we have
    stop-and-wait protocol.
  • If duplex, use piggybacking
  • Attach ACK with data frames.
  • If no data to send, use acknowledgement frame
  • If data but no acknowledgement to send, send last
    acknowledgement number again.

9
LLC Error Control
  • Error correction implies error detection.
  • Parity bits
  • CRC
  • Two forms of error correction
  • Autonomous error correction (e.g. CRC)
  • Transmitted frame contains redundancy bits (or
    check bits) correct bit errors without
    retransmission.
  • Using parity bits
  • Using Hamming code
  • Expensive operation, especially when having
    multiple bits.
  • Error correction through retransmission
  • Use of ACKs for lost frames
  • Use of timers for lost ACKs
  • Use of sequence number for duplicate frames. Few
    LAN DL do this sequencing.
  • The concept of error detection, ACK, and
    retransmission is called automatic repeat request
    (ARQ).
  • Stop-and-wait ARQ
  • Sliding window ARQ
  • Go-back-n ARQ
  • Selective reject ARQ

10
Stop-and-Wait ARQ
2. Lost Frames
1. Damaged Frames
3. Lost Ack
  • For identification, both data and ACK frames are
    numbered alternately 0 and 1.
  • Data 0 is acknowledged by ACK 1, meaning Receiver
    got data 0 and expecting Data 1.
  • Numbering is important in case of duplicate
    transmission of data and acks when lost or
    delayed.

11
1. Damaged Frames
2. Lost Frames
3. Lost Ack
  • Go-back-n Sliding Window ARQ
  • ACK 3 means frame 0,1, 2 are received
    correctly. NAK 3 means frame 3 is lost, in error,
    and frames 0-2 were received correctly.

12
Selective-Reject Sliding Window ARQ
  • Uses ACK as in go-back-n algorithm.
  • Only the specific damaged or lost frame is
    retransmitted. The frame is resent out of
    sequence when NAK is received.
  • Better performance
  • Retransmit only damaged or lost frames.
  • But more complex
  • Requires storage and search at the receiver.
  • Extra logic also needed at sender
  • Need to buffer
  • Must be able to send frames out of sequence

13
Cyclic Redundancy Check (CRC)
  • For a block of k bits transmitter generates n bit
    sequence
  • Transmit kn bits which is exactly divisible by
    some number
  • Receiver divides frame by that number
  • If no remainder, assume no error
  • Nice animation at http//www.mhhe.com/engcs/comps
    ci/forouzan/dcn/graphics/animations/09_09.swf

14
CRC Example
15
Standard Polynomials (Divisors)
  • CRC-16 used for various file transfers
  • CRC-CCITT serves as an international standard
  • CRC-32 used in Ethernet and token ring LANs. The
    chances of bad data being received and not
    detected is 1 in 4.3 billion (232-1)
Write a Comment
User Comments (0)
About PowerShow.com