SlideShare a Scribd company logo
1 of 49
Download to read offline
1
1
1
1 tohttps://github.com/syaifulahdan/
DATA COMMUNICATION
Error Control and Data Link Control
Data Communications and Networking
 Data Link Layer
 Framing
 Error Detection : Types of Error
 Parity Check
 Cyclic Redudancy Check
 Error Correction Prosess Diagram
 LIne Configuration
 Traditional Configuration
 Flow Control
 Model of Frame Transmission
Reading:
Book Chapter 7
Data and Computer Communications, 8th edition
By William Stallings
 Stop and Wait Flow Control
 Performance of Stop and Wait
 Stopand Wait Link Utilization
 Sliding WIndow Flow Control
 Sliding WIndow Diagram
 Example Sliding WIndow
 Performance of Sliding Window
 Error Control
 Automatic Repeat Request (ARQ)
 Stop and Wait (ARQ)
 Stop and Wait Diagram
 Go Back N (ARQ)
 Go Back N Damaged F
 Go Back N Lost Frame
 Go Back N Damage RR
 Go Back N Damage REJ
 Go Back N Diagram
 Selective Reject ARQ
 Selective Reject Diagram
 High Level Datalink Control
 Frame Structure
Data Communications and
Networking
Chapter 7
Error Control and Data Link Control
References:
Book Chapter 6 and 7
Data and Computer Communications, 8th edition,
by William Stallings
3
3
3
3 tohttps://github.com/syaifulahdan/ 3
Data Link Layer
• Objective:
— Achieving reliable communication between two adjacent machines
• Design Issues:
— Framing: data are sent in blocks called frames, the beginning and
end of each frame must be recognized by the receiver.
— Error control: bit errors introduced by the transmission system
should be detected and/or corrected.
— Flow control: the sending station must not send frames at a rate
faster than the receiving station can absorb them.
— Addressing: on a multipoint line, such as a LAN, the identity of the
two stations involved in a transmission must be specified.
— Transmit control information and data on the same line
4
4
4
4 tohttps://github.com/syaifulahdan/ 4
Framing
• Large block of data may be broken up into
small frames at the source because:
—limited buffer size at the receiver
—A larger block of data has higher probability of
error
• With smaller frames, errors are detected sooner, and only
a smaller amount of data needs to be retransmitted
—On a shared medium, such as Ethernet and
Wireless LAN, small frame size can prevent one
station from occupying medium for long periods
5
5
5
5 tohttps://github.com/syaifulahdan/ 5
Framing
• Need to indicate the start and end of a block of data
• Use preamble (e.g., flag byte) and postamble
• If the receiver ever loses synchronization, it can just search for
the flag byte.
• Frame: preamble + control info + data + postamble
• Problem: it is possible that the flag byte’s bit pattern occur in the
data
• Two popular solutions:
— Byte stuffing
• The sender inserts a special byte (e.g., ESC) just before each “accidental”
flag byte in the data (like in C language, “ is replaced with ”).
• The receiver’s link layer removes this special byte before the data are
given to the network layer.
— Bit stuffing: each frame starts with a flag byte “01111110”.
• Whenever the sender encounters five consecutive 1s in the data, it
automatically stuffs a 0 bit into the outgoing bit stream.
• When the receiver sees five consecutive incoming 1 bits, followed by a 0
bit, it automatically deletes the 0 bit.
6
6
6
6 tohttps://github.com/syaifulahdan/ 6
Byte Stuffing
Four examples of byte sequences before and after byte stuffing
7
7
7
7 tohttps://github.com/syaifulahdan/ 7
Bit Stuffing
Bit stuffing:
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in the receiver’s memory after destuffing.
8
8
8
8 tohttps://github.com/syaifulahdan/ 8
Error Detection: Types of Error
• An error occurs when a bit is altered between transmission and
reception
• Single bit errors
— One bit is altered
— Adjacent bits are not affected
— Can occur in the presence of white noise (thermal noise)
• Burst errors
— A cluster of bits with Length B
— the first and the last and a number of intermediate bits in error
(not necessarily all the bits in the cluster suffer an error)
— More common and more difficult to deal with
— Can be caused by impulse noise
9
9
9
9 tohttps://github.com/syaifulahdan/ 9
Error Detection Process
• Additional bits are added by transmitter
for error detection (called error-detecting
codes, or check bits, or checksum)
• Can be used in different network
layers
10
10
10
10 tohttps://github.com/syaifulahdan/ 10
Parity Check
• Append a parity bit to the end of a block of
data
• Value of parity bit is such that the new data
has even (even parity) or odd (odd parity)
number of ones
—E.g., original data 1110001 -> 11100011 (odd
parity)
• Even number of bit errors goes undetected
—E.g., 11100011 -> 11010011 (undetected!)
11
11
11
11 tohttps://github.com/syaifulahdan/ 11
Cyclic Redundancy Check
• For a block of k bits, transmitter generates an
(n-k)-bit sequence called Frame Check
Sequence (FCS)
• The resulting frame consisting of n bits is
exactly divisible by some predetermined
number.
• Receiver divides the incoming frame by the
predetermined number:
—If no remainder, assume no error
12
12
12
12 tohttps://github.com/syaifulahdan/ 12
Cyclic Redundancy Check
• Modulo 2 arithmetic
—Binary addition with no carries
—Binary subtraction with no carries
—The same as XOR operation
1111 + 1010 = 0101
1111 − 0101 =
1010
1010 + 1010 = 0000
13
13
13
13 tohttps://github.com/syaifulahdan/ 13
Cyclic Redundancy Check
• Define:
— T = n-bit frame to be transmitted
— D = k-bit block of data: the first k bits of T
— F = (n-k)-bit FCS: the last (n-k) bits of T
— P = pattern of (n-k+1) bits: the predetermined
divisor
• T = 2n-kD + F
• We want T/P to have no remainder.
• Problem: Given D and P, how to calculate F ?
14
14
14
14 tohttps://github.com/syaifulahdan/ 14
Cyclic Redundancy Check
P
R
Q
P
Dkn
2
quotient
remainder
Step 1:
Step 2: F = R
Verification:
Q
P
R
P
R
Q
P
R
P
D
P
RD
P
T
RDT
knkn
kn
22
2
Problem: Given D and P, how to calculate F ?
15
15
15
15 tohttps://github.com/syaifulahdan/ 15
Cyclic Redundancy Check
• Example:
—Given D = 1010001101 (10 bits)
— P = 110101 (6 bits)
—Then n = 15, k = 10, (n-k) = 5
—Multiple D by 25, yielding 101000110100000
—Divide it by P: remainder R = 01110
—Transmit D+R to the receiver: 101000110101110
—The receiver divide it by P, if no remainder, there
is no error.
16
16
16
16 tohttps://github.com/syaifulahdan/ 16
Cyclic Redundancy Check
• By choosing different P, CRC can detect
different types of errors:
—All single-bit errors if P has more than one
nonzero item
—All double-bit errors if P is a primitive polynomial
—Any odd number of errors if P contain factor 11
—……
17
17
17
17 tohttps://github.com/syaifulahdan/ 17
Error Correction
• Retransmission: correction of detected errors usually
requires data block to be retransmitted
—Retransmission may not be appropriate for some wireless
applications
• Bit error rate in wireless network is high
• Result in lots of retransmissions
—Propagation delay can be long (satellite) compared with
frame transmission time
• Result in retransmission of frame in error plus many subsequent
frames (back to this issue in next chapter)
• It would be desirable to enable the receiver to
correct errors in an incoming transmission on the
basis of the bits in that transmission.
• FEC: forward error correction
18
18
18
18 tohttps://github.com/syaifulahdan/ 18
Error Correction Process
Diagram
19
19
19
19 tohttps://github.com/syaifulahdan/ 19
Line Configuration
• Link Topology
—Physical arrangement of stations on the medium (link)
—Link has two stations: a point-to-point link
—More than two stations: a multipoint link
• local area network, satellite
• Half duplex
—Of two stations, only one station may transmit at a time
—Requires one data path
• Full duplex
—Simultaneous transmission and reception between two
stations
—Digital signaling: requires two data paths (e.g., two twisted
pairs)
—Analog signaling: can use different frequencies
20
20
20
20 tohttps://github.com/syaifulahdan/ 20
Traditional Configurations
21
21
21
21 tohttps://github.com/syaifulahdan/ 21
Flow Control
• Ensuring the sending entity does not overwhelm the
receiving entity
—Preventing buffer overflow
• Transmission time
—Time taken to emit all bits into medium at the sender’s side
—Determined by the data rate
• Propagation time
—Time for a bit to traverse the link and reach the destination
—Determined by the transmission distance
• We first assume error-free transmission.
22
22
22
22 tohttps://github.com/syaifulahdan/ 22
Model of Frame Transmission
23
23
23
23 tohttps://github.com/syaifulahdan/ 23
Stop-and-Wait Flow Control
• Source transmits a frame.
• Destination receives the frame, and replies
with a small frame called acknowledgement
(ACK).
• Source waits for the ACK before sending the
next frame.
—This is the core of the protocol !
• Destination can stop the flow by not sending
ACK (e.g., if the destination is busy …).
24
24
24
24 tohttps://github.com/syaifulahdan/ 24
Performance of Stop-and-Wait
• Assumptions
—Transmission time of the data frame is 1
—Transmission time of the ACK frame is 0
—Propagation time is a
• a is the ratio of propagation time over transmission time
—Error-free transmission
• The channel utilization ratio is 1/(1+2a)
—In a time period of 1+2a, the transmitter is only busy with 1
unit of time.
• It is not efficient for long haul transmission and high
speed transmission.
—Another type of protocol called “sliding-window” is
designed for this situation.
25
25
25
25 tohttps://github.com/syaifulahdan/ 25
Stop-and-Wait Link Utilization
26
26
26
26 tohttps://github.com/syaifulahdan/ 26
Sliding-Window Flow Control
• Idea: allow multiple frames to transmit
—Receiver has a buffer of W frames
—Transmitter can send up to W frames without
receiving ACK
• Each frame needs to be numbered: sequence
number is included in the frame header
—Sequence number is bounded by the length of
“sequence number field” in the header, e.g., k
bits
• Frames are numbered modulo 2k
• ACK includes the sequence number of the
next expected frame by the receiver
27
27
27
27 tohttps://github.com/syaifulahdan/ 27
Sliding-Window Diagram
Need to buffer
them in case of
retransmission
28
28
28
28 tohttps://github.com/syaifulahdan/ 28
Example Sliding-Window
Have been
delivered to upper
layer
More spaces for
future frames
RR3 means the receiver has
received all frames up to frame 2
and is ready to receive frame 3.
29
29
29
29 tohttps://github.com/syaifulahdan/ 29
Performance of Sliding-Window
• Assumptions
—Window size is W
—Frame transmission time is 1
—ACK transmission time is 0
—Propagation time is a
—Error-free transmission
• The channel utilization ratio is
1 2 1
2 1
2 1
W a
U W
W a
a
30
30
30
30 tohttps://github.com/syaifulahdan/ 30
Performance of Sliding-Window
≥
31
31
31
31 tohttps://github.com/syaifulahdan/ 31
Performance of Sliding-Window
32
32
32
32 tohttps://github.com/syaifulahdan/ 32
Error Control
• Error control: detection and correction of errors
• We consider two types of errors:
— Lost frames
• The receiver cannot recognize that this is a frame.
— Damaged frames
• The receiver can recognize the frame, but some bits are in error.
• Two approaches for error control
— ARQ: automatic repeat request, based on some or all of the
following ingredients:
• Error detection
• Positive acknowledgment
• Retransmission after timeout
• Negative acknowledgement and retransmission
— FEC: forward error correction
33
33
33
33 tohttps://github.com/syaifulahdan/ 33
Automatic Repeat Request
(ARQ)
• The effect of ARQ is to turn an unreliable
data link into a reliable one.
• Three versions of ARQ:
—Stop-and-wait
—Go-back-N
—Selective-reject (or, selective repeat)
34
34
34
34 tohttps://github.com/syaifulahdan/ 34
Stop-and-Wait ARQ
• Based on stop-and-wait flow control
• The source station is equipped with a timer.
• Source transmits a single frame, and waits for an ACK
• If the frame is lost…
— The timer eventually fires, and the source retransmits the frame.
• If receiver receives a damaged frame, discard it
— The timer eventually fires, and the source retransmits the frame.
• If everything goes right, but the ACK is damaged or lost, the
source will not recognize it
— The timer eventually fires, the source will retransmit the frame
— Receiver gets two copies of the same frame!
— Solution: use sequence numbers, 1 bit is enough, i.e., frame0 and
frame1, ACK0 and ACK1
35
35
35
35 tohttps://github.com/syaifulahdan/ 35
Stop-and-Wait
Diagram
Simple, but inefficient for
long distance and high
speed applications.
We can use sliding-window
technique to improve the
efficiency.
36
36
36
36 tohttps://github.com/syaifulahdan/ 36
Go-Back-N ARQ
• Based on sliding-window flow control
• Use window size to control the number of unacknowledged
frames outstanding
• If no error, the destination will send ACK as usual with next
frame expected (positive ACK, RR: receive ready)
• If error, the destination will reply with rejection (negative ACK,
REJ: reject)
— Receiver discards that frame and all future frames, until the
erroneous frame is received correctly.
— Source must go back and retransmit that frame and all succeeding
frames that were transmitted in the interim.
— This makes the receiver simple, but decreases the efficiency
37
37
37
37 tohttps://github.com/syaifulahdan/ 37
Go-Back-N: Damaged Frame
• Suppose A is sending frames to B. After each
transmission, A sets a timer for the frame.
• In Go-Back-N ARQ, if the receiver detects
error in frame i
—Receiver discards the frame, and sends REJ-i
—Source gets REJ-i
—Source retransmits frame i and all subsequent
frames
38
38
38
38 tohttps://github.com/syaifulahdan/ 38
Go-Back-N: Lost Frame (1)
• Assume receiver has received frame i-1. If
frame i is lost
—Source subsequently sends i+1
• Receiver gets frame i+1 out of order
—At data link layer, this means the lost of a frame!
• Receiver sends REJ-i
• Source gets REJ-i, and so goes back to frame
i and retransmits frame i, i+1, …
39
39
39
39 tohttps://github.com/syaifulahdan/ 39
Go-Back-N: Lost Frame (2)
• Assume receiver has received frame i-1
• Frame i is lost and no additional frame is sent
• Receiver gets nothing and returns neither
acknowledgement nor rejection
• Source times out and sends a request to
receiver asking for instructions
• Receiver responses with RR frame, including
the number of the next frame it expects, i.e.,
frame i
• Source then retransmits frame i
40
40
40
40 tohttps://github.com/syaifulahdan/ 40
Go-Back-N: Damaged RR
• Receiver gets frame i and sends RR-(i+1)
which is lost or damaged
• Acknowledgements are cumulative, so the
next acknowledgement, i.e., RR-(i+n) may
arrive before the source times out on frame i
• If source times out, it sends a request to
receiver asking for instructions, just like the
previous example
41
41
41
41 tohttps://github.com/syaifulahdan/ 41
Go-Back-N: Damaged REJ
• It is equivalent to the case of lost frame (2).
• Source times out and sends a request to
receiver asking for instructions
• Receiver responses with RR frame, including
the number of the next frame it expects
• Source then retransmits
42
42
42
42 tohttps://github.com/syaifulahdan/ 42
Go-Back-N
Diagram
Remark:
RR(P bit = 1) is a special RR which
is used by the source to ask for
instructions.
For a k-bit sequence number, the
window size can be at most 2k-1,
otherwise RR 0 is ambiguous (e.g.,
first sends frame 0 and gets back an
RR1, and then sends frames
1,…,7,0, and gets another RR1).
43
43
43
43 tohttps://github.com/syaifulahdan/ 43
Selective-Reject ARQ
• Also called selective repeat
• Pros:
—Only rejected frames are retransmitted
—Subsequent frames are accepted by the receiver
and buffered
—Minimizes the amount of retransmissions
• Cons:
—Receiver must maintain large enough buffer, and
must contain logic for reinserting the retransmitted
frame in the proper sequence
—Also more complex logic in the source
44
44
44
44 tohttps://github.com/syaifulahdan/ 44
Selective Reject -
Diagram
Remark:
For a k-bit sequence number, the window size
can be at most 2k-1, because the sending and
receiving windows overlap.
Assume k=3, and window size is 5.
1. A sends frames 0, 1, …, 4 to B.
2. B receives all 5 frames, and cumulatively
acknowledges with RR5.
3. RR5 is lost.
4. A times out, and retransmits frame 0.
5. B is expecting a new set of frames 5, 6, 7,
0, 1. So it will accept the retransmitted frame
0 and regard it as a new frame, which is
wrong.
45
45
45
45 tohttps://github.com/syaifulahdan/ 45
High-Level Data Link Control
• HDLC (ISO 33009, ISO 4335)
—Modified from SDLC (IBM)
• Used in X.25
• Basis for other data link control protocols
46
46
46
46 tohttps://github.com/syaifulahdan/ 46
Frame Structure
• Synchronous transmission
• All transmissions in frames
• Single frame format for all data and control
exchanges
47
47
47
47 tohttps://github.com/syaifulahdan/ 47
Frame Structure
•Flag: delimit frame at both ends
•Address: identify the frame receiver
•Control: specify different frame types
•FCS: frame check sequence (error detecting code)
48
48
48
48 tohttps://github.com/syaifulahdan/ 48
KEY POINTS
• Framing is performed by breaking the
information into small frames. Each frame
uses preamble and postamble to indicate the
start and end.
• Error detection is performed by calculating an
error-detecting code that is a function of the
bits being transmitted.
• Error correction operates in a fashion similar
to error detection but is capable of correcting
certain errors.
49
49
49
49 tohttps://github.com/syaifulahdan/ 49
KEY POINTS
• Data link control protocol provides functions such as
flow control, error detection, and error control.
• Flow control enables a receiver to regulate the flow
of data from a sender so that the receiver’s buffers
do not overflow.
• In a data link control protocol, error control can
achieved by retransmission of damaged frames that
have not been acknowledged or for which the other
side requests a retransmission.

More Related Content

What's hot

Programming Protocol-Independent Packet Processors
Programming Protocol-Independent Packet ProcessorsProgramming Protocol-Independent Packet Processors
Programming Protocol-Independent Packet ProcessorsOpen Networking Summits
 
Ch 09 -- ARP & IP Analysis
Ch 09 -- ARP & IP AnalysisCh 09 -- ARP & IP Analysis
Ch 09 -- ARP & IP AnalysisYoram Orzach
 
TFTP - Trivial File Transfer Protocol
TFTP - Trivial File Transfer ProtocolTFTP - Trivial File Transfer Protocol
TFTP - Trivial File Transfer ProtocolPeter R. Egli
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersYoram Orzach
 
Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCPOlivier Bonaventure
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)k33a
 
Loadbalancing In-depth study for scale @ 80K TPS
Loadbalancing In-depth study for scale @ 80K TPSLoadbalancing In-depth study for scale @ 80K TPS
Loadbalancing In-depth study for scale @ 80K TPSShrey Agarwal
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDPsangusajjan
 
Tcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerTcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerFaizan Shaikh
 

What's hot (20)

11 bgp-ethernet
11 bgp-ethernet11 bgp-ethernet
11 bgp-ethernet
 
Future Internet protocols
Future Internet protocolsFuture Internet protocols
Future Internet protocols
 
ACIT Mumbai - OSI Model
ACIT Mumbai - OSI ModelACIT Mumbai - OSI Model
ACIT Mumbai - OSI Model
 
Part 12 : Local Area Networks
Part 12 : Local Area Networks Part 12 : Local Area Networks
Part 12 : Local Area Networks
 
Programming Protocol-Independent Packet Processors
Programming Protocol-Independent Packet ProcessorsProgramming Protocol-Independent Packet Processors
Programming Protocol-Independent Packet Processors
 
Ch 09 -- ARP & IP Analysis
Ch 09 -- ARP & IP AnalysisCh 09 -- ARP & IP Analysis
Ch 09 -- ARP & IP Analysis
 
TFTP - Trivial File Transfer Protocol
TFTP - Trivial File Transfer ProtocolTFTP - Trivial File Transfer Protocol
TFTP - Trivial File Transfer Protocol
 
Wireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filtersWireshark course, Ch 03: Capture and display filters
Wireshark course, Ch 03: Capture and display filters
 
9 ipv6-routing
9 ipv6-routing9 ipv6-routing
9 ipv6-routing
 
Tcp repair
Tcp repairTcp repair
Tcp repair
 
Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCP
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
Loadbalancing In-depth study for scale @ 80K TPS
Loadbalancing In-depth study for scale @ 80K TPSLoadbalancing In-depth study for scale @ 80K TPS
Loadbalancing In-depth study for scale @ 80K TPS
 
TFTP
TFTPTFTP
TFTP
 
Sanitizing PCAPs
Sanitizing PCAPsSanitizing PCAPs
Sanitizing PCAPs
 
rip, ospf 13-14
rip, ospf 13-14rip, ospf 13-14
rip, ospf 13-14
 
10 routing-bgp
10 routing-bgp10 routing-bgp
10 routing-bgp
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
 
Hdlc
HdlcHdlc
Hdlc
 
Tcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerTcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication header
 

Similar to Dc ch07 : error control and data link control

module 2 cn new.pptx
module 2 cn new.pptxmodule 2 cn new.pptx
module 2 cn new.pptxDrPreethiD1
 
lec 3 4 Core Delays Thruput Net Arch.ppt
lec 3 4 Core Delays Thruput Net Arch.pptlec 3 4 Core Delays Thruput Net Arch.ppt
lec 3 4 Core Delays Thruput Net Arch.pptMahamKhurram4
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over WirelessFarooq Khan
 
CS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.pptCS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.pptAnandaSaikia1
 
COmputer Networks Andrew tanenbaum CHAPTER 3
COmputer Networks Andrew tanenbaum CHAPTER 3COmputer Networks Andrew tanenbaum CHAPTER 3
COmputer Networks Andrew tanenbaum CHAPTER 3MrMRajaCSESTAFF
 
Network protocols and vulnerabilities
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilitiesG Prachi
 
Networks-part17-Bridges-RP1.pptjwhwhsjshh
Networks-part17-Bridges-RP1.pptjwhwhsjshhNetworks-part17-Bridges-RP1.pptjwhwhsjshh
Networks-part17-Bridges-RP1.pptjwhwhsjshhVijayKaran7
 
Ch3datalinklayerand layeraa linkdata.ppt
Ch3datalinklayerand layeraa linkdata.pptCh3datalinklayerand layeraa linkdata.ppt
Ch3datalinklayerand layeraa linkdata.pptBlackHat41
 
Ch3.ppt
Ch3.pptCh3.ppt
Ch3.pptThirft
 
ppt presentasi kelompok data link layer
ppt presentasi kelompok  data link layerppt presentasi kelompok  data link layer
ppt presentasi kelompok data link layerrosedinda4
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layerroma bora
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by romaboraroma
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layermekind
 
Lecture 22 What inside the Router.pptx
Lecture 22 What inside the Router.pptxLecture 22 What inside the Router.pptx
Lecture 22 What inside the Router.pptxHanzlaNaveed1
 

Similar to Dc ch07 : error control and data link control (20)

module 2 cn new.pptx
module 2 cn new.pptxmodule 2 cn new.pptx
module 2 cn new.pptx
 
Unit 2 ppt 3.ppt
Unit 2 ppt 3.pptUnit 2 ppt 3.ppt
Unit 2 ppt 3.ppt
 
Data link layer
Data link layerData link layer
Data link layer
 
lec 3 4 Core Delays Thruput Net Arch.ppt
lec 3 4 Core Delays Thruput Net Arch.pptlec 3 4 Core Delays Thruput Net Arch.ppt
lec 3 4 Core Delays Thruput Net Arch.ppt
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over Wireless
 
CS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.pptCS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.ppt
 
COmputer Networks Andrew tanenbaum CHAPTER 3
COmputer Networks Andrew tanenbaum CHAPTER 3COmputer Networks Andrew tanenbaum CHAPTER 3
COmputer Networks Andrew tanenbaum CHAPTER 3
 
datalink.ppt
datalink.pptdatalink.ppt
datalink.ppt
 
Network protocols and vulnerabilities
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilities
 
Networks-part17-Bridges-RP1.pptjwhwhsjshh
Networks-part17-Bridges-RP1.pptjwhwhsjshhNetworks-part17-Bridges-RP1.pptjwhwhsjshh
Networks-part17-Bridges-RP1.pptjwhwhsjshh
 
Datalinklayer tanenbaum
Datalinklayer tanenbaumDatalinklayer tanenbaum
Datalinklayer tanenbaum
 
DLL PPT.ppt
DLL PPT.pptDLL PPT.ppt
DLL PPT.ppt
 
Ch3datalinklayerand layeraa linkdata.ppt
Ch3datalinklayerand layeraa linkdata.pptCh3datalinklayerand layeraa linkdata.ppt
Ch3datalinklayerand layeraa linkdata.ppt
 
datalink.ppt
datalink.pptdatalink.ppt
datalink.ppt
 
Ch3.ppt
Ch3.pptCh3.ppt
Ch3.ppt
 
ppt presentasi kelompok data link layer
ppt presentasi kelompok  data link layerppt presentasi kelompok  data link layer
ppt presentasi kelompok data link layer
 
Dcn ppt on data link layer
Dcn ppt on data link layerDcn ppt on data link layer
Dcn ppt on data link layer
 
Dcn ppt by roma
Dcn ppt by romaDcn ppt by roma
Dcn ppt by roma
 
Unit 4 data link layer
Unit 4 data link layerUnit 4 data link layer
Unit 4 data link layer
 
Lecture 22 What inside the Router.pptx
Lecture 22 What inside the Router.pptxLecture 22 What inside the Router.pptx
Lecture 22 What inside the Router.pptx
 

More from Syaiful Ahdan

Sertifikat EC00202128391
 Sertifikat EC00202128391 Sertifikat EC00202128391
Sertifikat EC00202128391Syaiful Ahdan
 
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...Syaiful Ahdan
 
Sertifikat ec00202059774
Sertifikat ec00202059774Sertifikat ec00202059774
Sertifikat ec00202059774Syaiful Ahdan
 
Sertifikat ec00202059775
Sertifikat ec00202059775Sertifikat ec00202059775
Sertifikat ec00202059775Syaiful Ahdan
 
Sertifikat EC00202045078
Sertifikat EC00202045078Sertifikat EC00202045078
Sertifikat EC00202045078Syaiful Ahdan
 
Sertifikat EC00202044723
 Sertifikat EC00202044723 Sertifikat EC00202044723
Sertifikat EC00202044723Syaiful Ahdan
 
Sertifikat EC00202023523
Sertifikat EC00202023523Sertifikat EC00202023523
Sertifikat EC00202023523Syaiful Ahdan
 
Sertifikat EC00201826309
Sertifikat EC00201826309Sertifikat EC00201826309
Sertifikat EC00201826309Syaiful Ahdan
 
Sertifikat EC00202023149
Sertifikat EC00202023149Sertifikat EC00202023149
Sertifikat EC00202023149Syaiful Ahdan
 
Sertifikat EC00202022868
Sertifikat EC00202022868Sertifikat EC00202022868
Sertifikat EC00202022868Syaiful Ahdan
 
Sertifikat EC00202021343
Sertifikat EC00202021343Sertifikat EC00202021343
Sertifikat EC00202021343Syaiful Ahdan
 
Sertifikat EC00202022755
Sertifikat EC00202022755Sertifikat EC00202022755
Sertifikat EC00202022755Syaiful Ahdan
 
Sertifikat EC00201987196
Sertifikat EC00201987196Sertifikat EC00201987196
Sertifikat EC00201987196Syaiful Ahdan
 
Sertifikat EC00201856484
Sertifikat EC00201856484Sertifikat EC00201856484
Sertifikat EC00201856484Syaiful Ahdan
 
Sertifikat EC00201856352
Sertifikat EC00201856352Sertifikat EC00201856352
Sertifikat EC00201856352Syaiful Ahdan
 
Sertifikat EC00201856994
Sertifikat EC00201856994Sertifikat EC00201856994
Sertifikat EC00201856994Syaiful Ahdan
 
Sertifikat EC00201856895
Sertifikat EC00201856895Sertifikat EC00201856895
Sertifikat EC00201856895Syaiful Ahdan
 
Meeting 2 introdcution network administrator
Meeting 2   introdcution network administratorMeeting 2   introdcution network administrator
Meeting 2 introdcution network administratorSyaiful Ahdan
 

More from Syaiful Ahdan (20)

Sertifikat EC00202128391
 Sertifikat EC00202128391 Sertifikat EC00202128391
Sertifikat EC00202128391
 
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
SP2JPB - Aplikasi Sistem Pelayanan Pemesanan Jasa Perbaikan Pada Bengkel Alam...
 
Sertifikat ec00202059774
Sertifikat ec00202059774Sertifikat ec00202059774
Sertifikat ec00202059774
 
Sertifikat ec00202059775
Sertifikat ec00202059775Sertifikat ec00202059775
Sertifikat ec00202059775
 
Sertifikat EC00202045078
Sertifikat EC00202045078Sertifikat EC00202045078
Sertifikat EC00202045078
 
Sertifikat EC00202044723
 Sertifikat EC00202044723 Sertifikat EC00202044723
Sertifikat EC00202044723
 
Sertifikat EC00202023523
Sertifikat EC00202023523Sertifikat EC00202023523
Sertifikat EC00202023523
 
Sertifikat EC00201826309
Sertifikat EC00201826309Sertifikat EC00201826309
Sertifikat EC00201826309
 
Sertifikat EC00202023149
Sertifikat EC00202023149Sertifikat EC00202023149
Sertifikat EC00202023149
 
Sertifikat EC00202022868
Sertifikat EC00202022868Sertifikat EC00202022868
Sertifikat EC00202022868
 
Sertifikat EC00202021343
Sertifikat EC00202021343Sertifikat EC00202021343
Sertifikat EC00202021343
 
Sertifikat EC00202022755
Sertifikat EC00202022755Sertifikat EC00202022755
Sertifikat EC00202022755
 
Sertifikat EC00201987196
Sertifikat EC00201987196Sertifikat EC00201987196
Sertifikat EC00201987196
 
Sertifikat EC00201856484
Sertifikat EC00201856484Sertifikat EC00201856484
Sertifikat EC00201856484
 
Sertifikat EC00201856352
Sertifikat EC00201856352Sertifikat EC00201856352
Sertifikat EC00201856352
 
Sertifikat EC00201856994
Sertifikat EC00201856994Sertifikat EC00201856994
Sertifikat EC00201856994
 
Sertifikat EC00201856895
Sertifikat EC00201856895Sertifikat EC00201856895
Sertifikat EC00201856895
 
Meeting 2 introdcution network administrator
Meeting 2   introdcution network administratorMeeting 2   introdcution network administrator
Meeting 2 introdcution network administrator
 
Pertemuan 5
Pertemuan 5Pertemuan 5
Pertemuan 5
 
Pertemuan 4
Pertemuan 4Pertemuan 4
Pertemuan 4
 

Recently uploaded

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 

Recently uploaded (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 

Dc ch07 : error control and data link control

  • 1. 1 1 1 1 tohttps://github.com/syaifulahdan/ DATA COMMUNICATION Error Control and Data Link Control Data Communications and Networking  Data Link Layer  Framing  Error Detection : Types of Error  Parity Check  Cyclic Redudancy Check  Error Correction Prosess Diagram  LIne Configuration  Traditional Configuration  Flow Control  Model of Frame Transmission Reading: Book Chapter 7 Data and Computer Communications, 8th edition By William Stallings  Stop and Wait Flow Control  Performance of Stop and Wait  Stopand Wait Link Utilization  Sliding WIndow Flow Control  Sliding WIndow Diagram  Example Sliding WIndow  Performance of Sliding Window  Error Control  Automatic Repeat Request (ARQ)  Stop and Wait (ARQ)  Stop and Wait Diagram  Go Back N (ARQ)  Go Back N Damaged F  Go Back N Lost Frame  Go Back N Damage RR  Go Back N Damage REJ  Go Back N Diagram  Selective Reject ARQ  Selective Reject Diagram  High Level Datalink Control  Frame Structure
  • 2. Data Communications and Networking Chapter 7 Error Control and Data Link Control References: Book Chapter 6 and 7 Data and Computer Communications, 8th edition, by William Stallings
  • 3. 3 3 3 3 tohttps://github.com/syaifulahdan/ 3 Data Link Layer • Objective: — Achieving reliable communication between two adjacent machines • Design Issues: — Framing: data are sent in blocks called frames, the beginning and end of each frame must be recognized by the receiver. — Error control: bit errors introduced by the transmission system should be detected and/or corrected. — Flow control: the sending station must not send frames at a rate faster than the receiving station can absorb them. — Addressing: on a multipoint line, such as a LAN, the identity of the two stations involved in a transmission must be specified. — Transmit control information and data on the same line
  • 4. 4 4 4 4 tohttps://github.com/syaifulahdan/ 4 Framing • Large block of data may be broken up into small frames at the source because: —limited buffer size at the receiver —A larger block of data has higher probability of error • With smaller frames, errors are detected sooner, and only a smaller amount of data needs to be retransmitted —On a shared medium, such as Ethernet and Wireless LAN, small frame size can prevent one station from occupying medium for long periods
  • 5. 5 5 5 5 tohttps://github.com/syaifulahdan/ 5 Framing • Need to indicate the start and end of a block of data • Use preamble (e.g., flag byte) and postamble • If the receiver ever loses synchronization, it can just search for the flag byte. • Frame: preamble + control info + data + postamble • Problem: it is possible that the flag byte’s bit pattern occur in the data • Two popular solutions: — Byte stuffing • The sender inserts a special byte (e.g., ESC) just before each “accidental” flag byte in the data (like in C language, “ is replaced with ”). • The receiver’s link layer removes this special byte before the data are given to the network layer. — Bit stuffing: each frame starts with a flag byte “01111110”. • Whenever the sender encounters five consecutive 1s in the data, it automatically stuffs a 0 bit into the outgoing bit stream. • When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it automatically deletes the 0 bit.
  • 6. 6 6 6 6 tohttps://github.com/syaifulahdan/ 6 Byte Stuffing Four examples of byte sequences before and after byte stuffing
  • 7. 7 7 7 7 tohttps://github.com/syaifulahdan/ 7 Bit Stuffing Bit stuffing: (a) The original data. (b) The data as they appear on the line. (c) The data as they are stored in the receiver’s memory after destuffing.
  • 8. 8 8 8 8 tohttps://github.com/syaifulahdan/ 8 Error Detection: Types of Error • An error occurs when a bit is altered between transmission and reception • Single bit errors — One bit is altered — Adjacent bits are not affected — Can occur in the presence of white noise (thermal noise) • Burst errors — A cluster of bits with Length B — the first and the last and a number of intermediate bits in error (not necessarily all the bits in the cluster suffer an error) — More common and more difficult to deal with — Can be caused by impulse noise
  • 9. 9 9 9 9 tohttps://github.com/syaifulahdan/ 9 Error Detection Process • Additional bits are added by transmitter for error detection (called error-detecting codes, or check bits, or checksum) • Can be used in different network layers
  • 10. 10 10 10 10 tohttps://github.com/syaifulahdan/ 10 Parity Check • Append a parity bit to the end of a block of data • Value of parity bit is such that the new data has even (even parity) or odd (odd parity) number of ones —E.g., original data 1110001 -> 11100011 (odd parity) • Even number of bit errors goes undetected —E.g., 11100011 -> 11010011 (undetected!)
  • 11. 11 11 11 11 tohttps://github.com/syaifulahdan/ 11 Cyclic Redundancy Check • For a block of k bits, transmitter generates an (n-k)-bit sequence called Frame Check Sequence (FCS) • The resulting frame consisting of n bits is exactly divisible by some predetermined number. • Receiver divides the incoming frame by the predetermined number: —If no remainder, assume no error
  • 12. 12 12 12 12 tohttps://github.com/syaifulahdan/ 12 Cyclic Redundancy Check • Modulo 2 arithmetic —Binary addition with no carries —Binary subtraction with no carries —The same as XOR operation 1111 + 1010 = 0101 1111 − 0101 = 1010 1010 + 1010 = 0000
  • 13. 13 13 13 13 tohttps://github.com/syaifulahdan/ 13 Cyclic Redundancy Check • Define: — T = n-bit frame to be transmitted — D = k-bit block of data: the first k bits of T — F = (n-k)-bit FCS: the last (n-k) bits of T — P = pattern of (n-k+1) bits: the predetermined divisor • T = 2n-kD + F • We want T/P to have no remainder. • Problem: Given D and P, how to calculate F ?
  • 14. 14 14 14 14 tohttps://github.com/syaifulahdan/ 14 Cyclic Redundancy Check P R Q P Dkn 2 quotient remainder Step 1: Step 2: F = R Verification: Q P R P R Q P R P D P RD P T RDT knkn kn 22 2 Problem: Given D and P, how to calculate F ?
  • 15. 15 15 15 15 tohttps://github.com/syaifulahdan/ 15 Cyclic Redundancy Check • Example: —Given D = 1010001101 (10 bits) — P = 110101 (6 bits) —Then n = 15, k = 10, (n-k) = 5 —Multiple D by 25, yielding 101000110100000 —Divide it by P: remainder R = 01110 —Transmit D+R to the receiver: 101000110101110 —The receiver divide it by P, if no remainder, there is no error.
  • 16. 16 16 16 16 tohttps://github.com/syaifulahdan/ 16 Cyclic Redundancy Check • By choosing different P, CRC can detect different types of errors: —All single-bit errors if P has more than one nonzero item —All double-bit errors if P is a primitive polynomial —Any odd number of errors if P contain factor 11 —……
  • 17. 17 17 17 17 tohttps://github.com/syaifulahdan/ 17 Error Correction • Retransmission: correction of detected errors usually requires data block to be retransmitted —Retransmission may not be appropriate for some wireless applications • Bit error rate in wireless network is high • Result in lots of retransmissions —Propagation delay can be long (satellite) compared with frame transmission time • Result in retransmission of frame in error plus many subsequent frames (back to this issue in next chapter) • It would be desirable to enable the receiver to correct errors in an incoming transmission on the basis of the bits in that transmission. • FEC: forward error correction
  • 19. 19 19 19 19 tohttps://github.com/syaifulahdan/ 19 Line Configuration • Link Topology —Physical arrangement of stations on the medium (link) —Link has two stations: a point-to-point link —More than two stations: a multipoint link • local area network, satellite • Half duplex —Of two stations, only one station may transmit at a time —Requires one data path • Full duplex —Simultaneous transmission and reception between two stations —Digital signaling: requires two data paths (e.g., two twisted pairs) —Analog signaling: can use different frequencies
  • 21. 21 21 21 21 tohttps://github.com/syaifulahdan/ 21 Flow Control • Ensuring the sending entity does not overwhelm the receiving entity —Preventing buffer overflow • Transmission time —Time taken to emit all bits into medium at the sender’s side —Determined by the data rate • Propagation time —Time for a bit to traverse the link and reach the destination —Determined by the transmission distance • We first assume error-free transmission.
  • 23. 23 23 23 23 tohttps://github.com/syaifulahdan/ 23 Stop-and-Wait Flow Control • Source transmits a frame. • Destination receives the frame, and replies with a small frame called acknowledgement (ACK). • Source waits for the ACK before sending the next frame. —This is the core of the protocol ! • Destination can stop the flow by not sending ACK (e.g., if the destination is busy …).
  • 24. 24 24 24 24 tohttps://github.com/syaifulahdan/ 24 Performance of Stop-and-Wait • Assumptions —Transmission time of the data frame is 1 —Transmission time of the ACK frame is 0 —Propagation time is a • a is the ratio of propagation time over transmission time —Error-free transmission • The channel utilization ratio is 1/(1+2a) —In a time period of 1+2a, the transmitter is only busy with 1 unit of time. • It is not efficient for long haul transmission and high speed transmission. —Another type of protocol called “sliding-window” is designed for this situation.
  • 26. 26 26 26 26 tohttps://github.com/syaifulahdan/ 26 Sliding-Window Flow Control • Idea: allow multiple frames to transmit —Receiver has a buffer of W frames —Transmitter can send up to W frames without receiving ACK • Each frame needs to be numbered: sequence number is included in the frame header —Sequence number is bounded by the length of “sequence number field” in the header, e.g., k bits • Frames are numbered modulo 2k • ACK includes the sequence number of the next expected frame by the receiver
  • 27. 27 27 27 27 tohttps://github.com/syaifulahdan/ 27 Sliding-Window Diagram Need to buffer them in case of retransmission
  • 28. 28 28 28 28 tohttps://github.com/syaifulahdan/ 28 Example Sliding-Window Have been delivered to upper layer More spaces for future frames RR3 means the receiver has received all frames up to frame 2 and is ready to receive frame 3.
  • 29. 29 29 29 29 tohttps://github.com/syaifulahdan/ 29 Performance of Sliding-Window • Assumptions —Window size is W —Frame transmission time is 1 —ACK transmission time is 0 —Propagation time is a —Error-free transmission • The channel utilization ratio is 1 2 1 2 1 2 1 W a U W W a a
  • 32. 32 32 32 32 tohttps://github.com/syaifulahdan/ 32 Error Control • Error control: detection and correction of errors • We consider two types of errors: — Lost frames • The receiver cannot recognize that this is a frame. — Damaged frames • The receiver can recognize the frame, but some bits are in error. • Two approaches for error control — ARQ: automatic repeat request, based on some or all of the following ingredients: • Error detection • Positive acknowledgment • Retransmission after timeout • Negative acknowledgement and retransmission — FEC: forward error correction
  • 33. 33 33 33 33 tohttps://github.com/syaifulahdan/ 33 Automatic Repeat Request (ARQ) • The effect of ARQ is to turn an unreliable data link into a reliable one. • Three versions of ARQ: —Stop-and-wait —Go-back-N —Selective-reject (or, selective repeat)
  • 34. 34 34 34 34 tohttps://github.com/syaifulahdan/ 34 Stop-and-Wait ARQ • Based on stop-and-wait flow control • The source station is equipped with a timer. • Source transmits a single frame, and waits for an ACK • If the frame is lost… — The timer eventually fires, and the source retransmits the frame. • If receiver receives a damaged frame, discard it — The timer eventually fires, and the source retransmits the frame. • If everything goes right, but the ACK is damaged or lost, the source will not recognize it — The timer eventually fires, the source will retransmit the frame — Receiver gets two copies of the same frame! — Solution: use sequence numbers, 1 bit is enough, i.e., frame0 and frame1, ACK0 and ACK1
  • 35. 35 35 35 35 tohttps://github.com/syaifulahdan/ 35 Stop-and-Wait Diagram Simple, but inefficient for long distance and high speed applications. We can use sliding-window technique to improve the efficiency.
  • 36. 36 36 36 36 tohttps://github.com/syaifulahdan/ 36 Go-Back-N ARQ • Based on sliding-window flow control • Use window size to control the number of unacknowledged frames outstanding • If no error, the destination will send ACK as usual with next frame expected (positive ACK, RR: receive ready) • If error, the destination will reply with rejection (negative ACK, REJ: reject) — Receiver discards that frame and all future frames, until the erroneous frame is received correctly. — Source must go back and retransmit that frame and all succeeding frames that were transmitted in the interim. — This makes the receiver simple, but decreases the efficiency
  • 37. 37 37 37 37 tohttps://github.com/syaifulahdan/ 37 Go-Back-N: Damaged Frame • Suppose A is sending frames to B. After each transmission, A sets a timer for the frame. • In Go-Back-N ARQ, if the receiver detects error in frame i —Receiver discards the frame, and sends REJ-i —Source gets REJ-i —Source retransmits frame i and all subsequent frames
  • 38. 38 38 38 38 tohttps://github.com/syaifulahdan/ 38 Go-Back-N: Lost Frame (1) • Assume receiver has received frame i-1. If frame i is lost —Source subsequently sends i+1 • Receiver gets frame i+1 out of order —At data link layer, this means the lost of a frame! • Receiver sends REJ-i • Source gets REJ-i, and so goes back to frame i and retransmits frame i, i+1, …
  • 39. 39 39 39 39 tohttps://github.com/syaifulahdan/ 39 Go-Back-N: Lost Frame (2) • Assume receiver has received frame i-1 • Frame i is lost and no additional frame is sent • Receiver gets nothing and returns neither acknowledgement nor rejection • Source times out and sends a request to receiver asking for instructions • Receiver responses with RR frame, including the number of the next frame it expects, i.e., frame i • Source then retransmits frame i
  • 40. 40 40 40 40 tohttps://github.com/syaifulahdan/ 40 Go-Back-N: Damaged RR • Receiver gets frame i and sends RR-(i+1) which is lost or damaged • Acknowledgements are cumulative, so the next acknowledgement, i.e., RR-(i+n) may arrive before the source times out on frame i • If source times out, it sends a request to receiver asking for instructions, just like the previous example
  • 41. 41 41 41 41 tohttps://github.com/syaifulahdan/ 41 Go-Back-N: Damaged REJ • It is equivalent to the case of lost frame (2). • Source times out and sends a request to receiver asking for instructions • Receiver responses with RR frame, including the number of the next frame it expects • Source then retransmits
  • 42. 42 42 42 42 tohttps://github.com/syaifulahdan/ 42 Go-Back-N Diagram Remark: RR(P bit = 1) is a special RR which is used by the source to ask for instructions. For a k-bit sequence number, the window size can be at most 2k-1, otherwise RR 0 is ambiguous (e.g., first sends frame 0 and gets back an RR1, and then sends frames 1,…,7,0, and gets another RR1).
  • 43. 43 43 43 43 tohttps://github.com/syaifulahdan/ 43 Selective-Reject ARQ • Also called selective repeat • Pros: —Only rejected frames are retransmitted —Subsequent frames are accepted by the receiver and buffered —Minimizes the amount of retransmissions • Cons: —Receiver must maintain large enough buffer, and must contain logic for reinserting the retransmitted frame in the proper sequence —Also more complex logic in the source
  • 44. 44 44 44 44 tohttps://github.com/syaifulahdan/ 44 Selective Reject - Diagram Remark: For a k-bit sequence number, the window size can be at most 2k-1, because the sending and receiving windows overlap. Assume k=3, and window size is 5. 1. A sends frames 0, 1, …, 4 to B. 2. B receives all 5 frames, and cumulatively acknowledges with RR5. 3. RR5 is lost. 4. A times out, and retransmits frame 0. 5. B is expecting a new set of frames 5, 6, 7, 0, 1. So it will accept the retransmitted frame 0 and regard it as a new frame, which is wrong.
  • 45. 45 45 45 45 tohttps://github.com/syaifulahdan/ 45 High-Level Data Link Control • HDLC (ISO 33009, ISO 4335) —Modified from SDLC (IBM) • Used in X.25 • Basis for other data link control protocols
  • 46. 46 46 46 46 tohttps://github.com/syaifulahdan/ 46 Frame Structure • Synchronous transmission • All transmissions in frames • Single frame format for all data and control exchanges
  • 47. 47 47 47 47 tohttps://github.com/syaifulahdan/ 47 Frame Structure •Flag: delimit frame at both ends •Address: identify the frame receiver •Control: specify different frame types •FCS: frame check sequence (error detecting code)
  • 48. 48 48 48 48 tohttps://github.com/syaifulahdan/ 48 KEY POINTS • Framing is performed by breaking the information into small frames. Each frame uses preamble and postamble to indicate the start and end. • Error detection is performed by calculating an error-detecting code that is a function of the bits being transmitted. • Error correction operates in a fashion similar to error detection but is capable of correcting certain errors.
  • 49. 49 49 49 49 tohttps://github.com/syaifulahdan/ 49 KEY POINTS • Data link control protocol provides functions such as flow control, error detection, and error control. • Flow control enables a receiver to regulate the flow of data from a sender so that the receiver’s buffers do not overflow. • In a data link control protocol, error control can achieved by retransmission of damaged frames that have not been acknowledged or for which the other side requests a retransmission.