0% found this document useful (0 votes)
11 views35 pages

W6 B - CHP4-CNS3200

The document discusses key functions of the data link layer, focusing on access control, flow control, and error control mechanisms. It outlines various MAC protocols, including channel partitioning, random access, and polling methods, as well as flow control techniques like Stop-and-Wait and Sliding Window. Additionally, it covers error control methods such as Automatic Repeat Request (ARQ) and different strategies for handling damaged or lost frames.

Uploaded by

okuwobi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views35 pages

W6 B - CHP4-CNS3200

The document discusses key functions of the data link layer, focusing on access control, flow control, and error control mechanisms. It outlines various MAC protocols, including channel partitioning, random access, and polling methods, as well as flow control techniques like Stop-and-Wait and Sliding Window. Additionally, it covers error control methods such as Automatic Repeat Request (ARQ) and different strategies for handling damaged or lost frames.

Uploaded by

okuwobi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

Cont…

Data Link Control


• Access Control
• Flow Control
Learning Outcome
• EXPLAIN THE ACCESS CONTROLS AND THEIR RELATED
PROTOCOLS (C4)
• EXPLAIN THE FLOW CONTROL MECHANISM AND THE RELATED
PROTOCOL (C4)
Introduction
 The most important functions in the data link layer are:
 Access Control – determines which who can send and when
 Flow control – coordinates the amount of data that can be sent
 Error control – perform error detection and correction
MAC Protocols: A taxonomy
Three broad classes:
• Channel Partitioning
– divide channel into smaller “pieces” (time slots,
frequency) using FDM,WDM or TDM
• Random Access
– channel not divided, allow collisions
– “recover” from collisions
• “Taking turns”/Polling
– nodes take turns, but nodes with more to send
can take longer turns
MAC = Media access control WDM = Wavelength Division Multiplexing
FDM = frequency division multiplexing TDM = Time division multiplexing
Channel Partitioning

TDMA: time division multiple access


• access to channel in "rounds"
• each station gets fixed length slot (length = pkt
trans time) in each round
• unused slots go idle
• example: 6-station LAN, 1,3,4 have pkt, slots
2,5,6 idle

36-slot 3 4
frame
1 4 1
Random Access Protocols
• When node has packet to send
– transmit at full channel data rate R.
– no a priori coordination among nodes
• two or more transmitting nodes ➜ “collision”
• random access MAC protocol specifies:
– how to detect collisions
– how to recover from collisions
– Examples protocols: slotted ALOHA, ALOHA,
CSMA, CSMA/CD, CSMA/CA
ALOHA
• Developed for packet radio nets
• When station has frame, it sends
• Then listens for a bit over max round trip time
– if receive ACK then fine
– if not, retransmit
– if no ACK after repeated transmissions, give up
• frame may be damaged by noise or collision
Figure 12.3 Frames in a pure ALOHA network
Figure 12.4 Procedure for pure ALOHA protocol
Slotted ALOHA

Assumptions: Operation:
• all frames same size • when node obtains fresh
• time divided into equal frame, transmits in next slot
size slots (time to – if no collision: node can
transmit 1 frame)
send new frame in next
• nodes start to transmit
slot
only slot beginning
• nodes are synchronized – if collision: node
retransmits frame in
• if 2 or more nodes
transmit in slot, all nodes each subsequent slot
detect collision with probability p
Slotted ALOHA

Pros Cons
• single active node can • collisions, wasting slots
continuously transmit at
• idle slots
full rate of channel
• highly decentralized: • clock synchronization
nodes decides
independently
• simple
CSMA (Carrier Sense Multiple Access)
• stations soon know transmission has started
• so first listen for clear medium (carrier sense)
• if medium idle, transmit
• if two stations start at the same instant,
collision
– wait reasonable time
– if no ACK then retransmit
CSMA/CD Description
CSMA/CD rules:
1. if medium idle, transmit
2. if busy, listen for idle, then transmit
3. if collision detected, transmit jam signal and
then stop transmission, wait random time
then retry
CSMA/CD

(2)

(1)

(3)
CSMA/CA
IEEE 802.11
MAC Protocol
IFS : Inter Frame Spacing
CSMA/CA Description
CSMA/CA rules:
1. if medium idle, wait for some interframe space
(IFS) time, then sense the channel
1. If busy – go to step 2
2. If still idle – transmit a frame
2. if busy, wait until transmission end and then
wait for some IFS time, then sense the
channel again
1. If busy – go to Step 2
2. If idle – backoff/wait for some random time and
transmit a frame
“Taking Turns” MAC protocols
Polling:
• master node data
poll
“invites” slave master
nodes to transmit data

in turn
slaves
https://www.computersciencelearn.in/taking-
turns-protocols/
“Taking Turns”
MAC protocols
T

Token passing: (nothing


to send)
• control token T
passed from one
node to next
sequentially.
https://www.computersciencelearn.in/taking-
turns-protocols/ data
Summary of Access
Control
• channel partitioning, by time, frequency or code
– Time Division, Frequency Division
• random access (dynamic),
– ALOHA, S-ALOHA, CSMA, CSMA/CD
– carrier sensing: easy in some technologies (wire),
hard in others (wireless)
– CSMA/CD used in Ethernet
– CSMA/CA used in 802.11
• taking turns
– polling from central site, token passing
– Bluetooth, FDDI, IBM Token Ring
Flow Control

 Procedures that tells the sender how much data


to transmit.

 Each receiving device has a block of memory.

 Two methods
 Stop-and-wait

 Sliding window
Stop and Wait
• source transmits frame
• destination receives frame and replies with
acknowledgement (ACK)
• source waits for ACK before sending next
• destination can stop flow by not send ACK
• works well for a few large frames
• Stop and wait becomes inadequate if large
block of data is split into small frames
Stop and Wait
Link Utilization
Sliding Windows
Flow Control
• allows multiple numbered frames to be in transit
• receiver has buffer W long
• transmitter sends up to W frames without ACK
• ACK includes number of next frame expected
• sequence number is bounded by size of field (k)
– frames are numbered modulo 2k
– giving max window size of up to 2k - 1
• receiver can ack frames without permitting
further transmission (Receive Not Ready)
• must send a normal acknowledge to resume
• if have full-duplex link, can piggyback ACks
Sliding Window Example
Error Control
- Refers to methods of error detection and
correction due to

lost frames

damaged frames
- common techniques use:

error detection (CRC,checksum)

positive acknowledgment

retransmission after timeout

negative acknowledgement & retransmission
Automatic Repeat Request
(ARQ)
• collective name for such error control
mechanisms, including:
• stop and wait
• go back N
• selective repeat (selective retransmission)
Stop and Wait

• source transmits single frame


• wait for ACK
• if received damaged frame, discard it
– no ACK received
– if no ACK within timeout, retransmit
• if ACK damaged, transmitter will not
recognize it
– transmitter will retransmit
– receiver gets two copies of frame
– use alternate numbering and ACK0 / ACK1
Stop and Wait

• see example
with both types
of errors
• pros and cons
– simple
– inefficient
Go-Back-N

• based on sliding window


• if no error, ACK as usual
• use window to control number of outstanding
frames
• if error, negative acknowledgment
– discard that frame and all future frames until error
frame received correctly
– transmitter must go back and retransmit that frame
and all subsequent frames
Damaged Frame
Lost Frame
Lost ACK
Selective Repeat
• only rejected frames are retransmitted
• subsequent frames are accepted by the
receiver and buffered
• minimizes retransmission
• receiver must maintain large enough buffer
• more complex logic in transmitter
• hence less widely used
• useful for satellite links with long
propagation delays
Selective Repeat

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy