Computer Networks
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
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
1. Unacknowledged connectionless service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service.
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
LAN Technologies
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
Length
Computer Networks
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
Computer Networks
Flag bytes with byte stuffing.
Computer Networks
Flag bits with bit stuffing.
Each frame begins and ends with a special bit pattern, 01111110
Computer Networks
Error control
• Reliable connection oriented service:
– Sender------receiver, back to sender (PACK, NACK)
– If ack frame lost?
– Time out mechanism, retransmission.
• 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.
End of session
?
Thanks.