Data Link
Data Link
Duties/services
Framing
Physical addressing
Flow control: hop-to-hop
Error control: hop-to-hop
2.1
Data Data
2.2
2
13/04/2023
Data
9F 3B 82 A3
T2 Data 9F A3
H2
2.3
Framing
Process of wrapping data with certain info before
sending out
4
13/04/2023
1.1 1.2
97 32 Network 1
Data 1.1 5.7 97 25 25
R1
B1
79 Data 1.1 5.7 79 62 Network 6
6.6 6.3 62
12
R3
R2 5.2
54
88
3.3
Data 1.1 5.7 54 74
Network 5
5.7
Network 3 74
3.8
6
13/04/2023
Noiseless channels
8
13/04/2023
10
13/04/2023
Stop-and-Wait Mechanism
11
11
Stop-and-Wait Protocol
12
13/04/2023
Sender Receiver
S=0 R=0
Deliver
S=1 R=1
Deliver
R=0
Time Time
13
13
Noisy Channel
Realistic
Error can and will happen
Require error control
Three protocols:
Stop-and-Wait ARQ
Go-Back-N ARQ
Selective Repeat ARQ
14
14
13/04/2023
Stop-and-Wait ARQ
15
15
Stop-and-Wait ARQ
16
16
13/04/2023
Sender Receiver
S=0 R=0
Deliver
S=1 R=1
Deliver
R=0
Time Time
17
17
S=0 R=0
Deliver
S=1 R=1
Timeout
Deliver
R=0
Time Time
18
18
13/04/2023
S=0 R=0
Deliver
S=1 R=1
Deliver
Timeout R=0
S=1
Frame 0 expected;
discard
R=0
S=0
Time Time
19
19
S=0 R=0
Deliver
Timeout R=1
Frame 1 expected;
discard
S=1
R=1
Timeout
Deliver
R=0
S=0
20
20
13/04/2023
Bidirectional Transmission
21
21
Go-Back-N ARQ
Allows multiple frames to be sent before waiting for
ACK
These frames must be numbered differently
Frame numbers are called Sequence numbers
Frame header contains m bits for the sequence number,
which allows up to 2m different frame numbers
Frames must be received in the correct order
If a frame is lost, the lost frame and all of the
following frames must be retransmitted
22
22
13/04/2023
23
23
24
24
13/04/2023
25
25
26
26
13/04/2023
29
29
30
13/04/2023
Thinking Corner
What is a problem if send window is
greater than 2m-1?
31
31
32
32
13/04/2023
Thinking Corner
Stop-and-Wait is a special case of Go-
Back-N.
What is the send window size in Stop-and-
Wait?
33
33
34
34
13/04/2023
35
35
36
36
13/04/2023
Receive Window
37
37
Selective-Repeat
38
38
13/04/2023
39
39
40
40
13/04/2023
HDLC
11.41
41
42
13/04/2023
43
HDLC frames
Bit stuffing: avoid a flag in data = 011111010
FLAG = 01111110
44
13/04/2023
45
S-Frame:
RR – 00, RNR – 10, REJ – 01, SREJ – 11
U-Frame:
SABM – 11 100, UA – 00 110, DISC – 00 010
46
13/04/2023
47
HDLC Operation
48
13/04/2023
49
50