1 of 13

Chapter 3- Data Link Layer

  • “its transform the physical layer in to reliable link”

  • Functionalities:-
    • Framing- bits in to frame (units of info. Called frame)
    • Physical Addressing (header added)
    • Flow control
    • Error control how it can be detected and corrected
    • Access control
  • “reliable efficient communication”

Computer Networks

2 of 13

Data link layer designing issues

  • Providing a well-defined service interface to the network layer.
  • Dealing with transmission errors.
  • Regulating the flow of data
    • so that slow receivers are not swamped

Computer Networks

3 of 13

Computer Networks

1. Unacknowledged connectionless service.

2. Acknowledged connectionless service.

3. Acknowledged connection-oriented service.

4 of 13

Computer Networks

  1. Unacknowledged connectionless service.
    • Independent frame, no Ack, no logical conn.
    • If frame lost (noise) => no attempt (detect, recover)
    • service is appropriate when the error rate is very low
    • e.g. real-time traffic, such as voice

2. Acknowledged connectionless service.

    • reliability is acknowledged, still no logical connections
    • sender knows (frame has arrived correctly or been lost)
    • If not (time interval)=> it can be sent again.
    • e.g. wireless systems. 802.11 (Wi-Fi)

3. Acknowledged connection-oriented service.

    • establish a connection before any data are transferred.
    • guarantees that each frame

(received, exactly once, in correct order)

    • e.g. long-distance telephone circuit

5 of 13

Ethernet Frame Structure

  • Preamble:
    • 7 bytes with pattern 10101010 followed by one byte with pattern 10101011
    • Used to synchronize receiver, sender clock rates
  • Addresses: 6 bytes, frame is received by all adapters on a LAN and dropped if address does not match
  • Length: 2 bytes, length of Data field
  • CRC: 4 bytes generated using CR-32, checked at receiver, if error is detected, the frame is simply dropped
  • Data Payload: Maximum 1500 bytes, minimum 46 bytes
    • If data is less than 46 bytes, pad with zeros to 46 bytes

LAN Technologies

Length

6 of 13

Framing

  • Breaking up the bit stream into frames is more difficult
    • Byte count.
    • Flag bytes with byte stuffing.
    • Flag bits with bit stuffing.
      • Each frame begins and ends with a special bit pattern, 01111110
    • Physical layer coding violations.

Computer Networks

7 of 13

Computer Networks

8 of 13

Computer Networks

Flag bytes with byte stuffing.

9 of 13

Computer Networks

Flag bits with bit stuffing.

Each frame begins and ends with a special bit pattern, 0 1 1 1 1 1 0

10 of 13

Error control

  • Reliable connection oriented service:
    • Sender------receiver, back to sender (PACK, NACK)
    • If ack frame lost?
    • Time out mechanism, retransmission

Computer Networks

11 of 13

Computer Networks

12 of 13

�Error control� Error detection/correction

  • Flow control:
    • “Transmit frames faster than the receiver can accept them”
  • feedback-based flow control
    • the receiver sends back information to the sender giving it permission to send more data, or at least telling the sender how the receiver is doing.
  • Rate-based flow control
    • the protocol has a built-in mechanism that limits the rate at which senders may transmit data, without using feedback from the receiver.

Computer Networks

13 of 13

End of session

?

Thanks.