Title: Data Link Control
1Data Link Control
2Framing
- Frames are the packets of information at the Data
Link Layer - Frames contain
- Data
- Source address information
- Destination address information
3Frame Size
- A frame could contain an entire data message but
this is not efficient. - An error in a large frame could require
retransmission, wasting time and bandwidth - Forward error correction is too difficult using
large frames
4Frame types
- Fixed size frames
- ATM
- Variable size frames
- Ethernet
5Frame Orientation
- Character (8-bit/single byte) oriented protocol
- Bit-oriented protocol
6Figure 11.1 A frame in a character-oriented
protocol
7Character Oriented
- Frame begins and ends with a predefined 8-bit
configuration. - Byte stuffing is required to prevent
misinterpretation of the flag pattern appearing
in the data.
8Figure 11.2 Byte stuffing and unstuffing
9Byte stuffing is the process of adding 1 extra
byte whenever there is a flag or escape character
in the text.
10Bit Oriented Protocol
- The standard start and end flag consists of these
8 bits - 01111110
11Figure 11.3 A frame in a bit-oriented protocol
12Bit stuffing is the process of adding one extra 0
whenever five consecutive 1s follow a 0 in the
data, so that the receiver does not mistake the
pattern 0111110 for a flag.
13Figure 11.4 Bit stuffing and unstuffing
1411-2 FLOW AND ERROR CONTROL
The most important responsibilities of the data
link layer are flow control and error control.
Collectively, these functions are known as data
link control.
Topics discussed in this section
Flow ControlError Control
15Flow control refers to a set of procedures used
to restrict the amount of data that the sender
can send before waiting for acknowledgment.
16Error control in the data link layer is based on
automatic repeat request, which is the
retransmission of data.
17Data Link Layer Protocols
- Categories
- Noiseless channels
- Noisy channels
18Figure 11.5 Taxonomy of protocols discussed in
this chapter
19Data Link Layer Protocols
- Noiseless channels
- No requirement for error control (no noise, no
errors) - Noisy channels
- Requires error control
20Noiseless Channel Protocols
- Simplest Protocol lt- start here
- Stop and wait
21Noiseless Simplest Protocol
- No noise, so no error control required
- No flow control is required
- Not a realistic protocol
22Figure 11.6 The design of the simplest protocol
with no flow or error control
23Algorithm 11.1 Sender-site algorithm for the
simplest protocol
24Data Link Layer Sender
- Get the data from the Network Layer
- Make the Data Link Layer Frame
- Send the Frame to the Physical Layer
25Algorithm 11.2 Receiver-site algorithm for the
simplest protocol
26Data Link Layer Receiver
- Receive the frame from the Physical Layer
- Extract the data from the Frame
- Deliver the data to the Network Layer
27Figure 11.7 Flow diagram for Example 11.1
28Noiseless Channel Protocols
- Simplest Protocol
- No flow control
- Stop and wait lt- next
29Noiseless Stop Wait Protocol
- This protocol includes flow control.
- Includes an acknowledgement frame.
- (no error control)
30Figure 11.8 Design of Stop-and-Wait Protocol
31Stop Wait Sender Side
- Get the data from the Network layer
- Make the Frame
- Send Frame to the Physical Layer
- Wait for an acknowledgement before sending the
next frame. - This is the flow control step
32Algorithm 11.3 Sender-site algorithm for
Stop-and-Wait Protocol
33Stop Wait Receiver
- Receive Frame from the Physical Layer
- Extract data from the frame.
- Deliver data to the Network Layer
- Send an acknowledgement frame back to the sender.
34Algorithm 11.4 Receiver-site algorithm for
Stop-and-Wait Protocol
35Figure 11.9 Flow diagram for Example 11.2
36Noisy Channel Protocols
- Stop Wait ARQ lt- start here
- Go Back N ARQ
- Selective Repeat ARQ
37Stop Wait ARQ Protocol
- Stop Wait ARQ
- ARQ automatic repeat request
- This protocol has flow control and error control.
38Error correction in Stop-and-Wait ARQ is done by
keeping a copy of the sent frame and
retransmitting of the frame when the timer
expires.
39In Stop-and-Wait ARQ, we use sequence numbers to
number the frames. The sequence numbers are based
on modulo-2 arithmetic.
40Frame Sequence Numbers
- The frames are numbered as the current frame and
the next frame. - Only one bit is required to number the frames.
- Zero and one are the only frame numbers.
41Figure 11.10 Design of the Stop-and-Wait ARQ
Protocol
42Figure 11.11 Flow diagram for Example 11.3
43Stop Wait ARQ Efficiency
- Stop Wait ARQ efficiency suffers because much
of the bandwidth is unused while waiting for the
acknowledgment.
44Noisy Channel Protocols
- Stop Wait ARQ
- Go Back N ARQ lt- next
- Selective Repeat ARQ
45Noisy Channel Protocols
- Go Back N ARQ
- Selective Repeat ARQ
- The above protocols will send data to fill the
connection not waiting for a response. - The sender buffers several frames and can resend
more than one frame
46Figure 11.16 Flow diagram for Example 11.6