Set6
Set6
Set6
COMPUTER NETWORKS
Data-link Layer
(The Medium Access Control Sublayer)
MAC Sublayer
Questions to be answered ?
• In broadcast networks, How the
channel is divided between competing
users?
• What is Medium Access
Control (MAC)?
• What protocols are used for
allocating a multiple access
channel ? Computer Networks 2
MAC Sublayer
What is MAC?
- Medium Access Control (MAC) is a
sublayer of the Data-link layer.
Computer Networks 5
MAC Sublayer
Static Channel Allocation:
In this scheme a Frequency Division
Multiplexing (FDM) is used for allocating a
single channel among competing users.
Example
if we have N users, the bandwidth will be
divided into N equal-size portions.
++ FDM is a simple and efficient allocation
mechanism.
- - Waste of resources when the traffic is
bursty, or the channel is lightly loaded.
Computer Networks 6
MAC Sublayer
Dynamic Channel Allocation:
Before the discussion of algorithms used for
dynamic allocation we need to consider the
following assumptions.
1) Station Model: N independent stations
generate frames for transmission.
(Generate >Block >Transmission)
2) Single channel Assumption: Single
channel is available for all communication.
3) Collision Assumption
4) Continuous Time, or Slotted Time
5) Carrier Sense, or No Carrier sense
Computer Networks 7
MAC Sublayer
Multiple Access Protocols:
- ALOHA is a system proposed for solving
the channel allocation problem.
- there are two versions of ALOHA:
1) Pure ALOHA; 2) Slotted ALOHA
Computer Networks 12
Pure ALOHA (3)
- 1-persistent CSMA
- Non-persistent CSMA
- P-persistent CSMA
- CSMA with Collision Detection (CSMA/CD)
Computer Networks 16
MAC Sublayer
Carrier Sense Multiple Access
(CSMA) Protocols
- In 1-persistent CSMA, a station prior to
send data it listen to the channel to see if
anyone else is transmitting at that moment.
- if the channel is busy, the station waits
until it becomes idle.
- If the channel is idle, the station transmits
a frame.
- If a collision occurs, the station waits a
random amount of time and starts all over
again. Computer Networks 17
MAC Sublayer
Carrier Sense Multiple Access
(CSMA) Protocols
- Although this protocol has disadvantages,
it is better than ALOHA and Slotted
ALOHA
Computer Networks 20
MAC Sublayer
Carrier Sense Multiple Access
(CSMA) Protocols
- The main advantage of persistent and
non-persistent over ALOHA is that they
ensure no station begins to transmit when
it senses the channel busy.
Computer Networks 21
MAC Sublayer
CSMA with Collision Detection
- It is important that stations should
terminate transmission as soon as they
detect a collision.
- This protocol is called CSMA/CD.
- It is widely used on LANs in the MAC
sublayer.
- It is the basis of the popular Ethernet
LAN.
Computer Networks 22
CSMA with Collision Detection
Computer Networks 24
MAC Sublayer
CSMA with Collision Detection
- Collision detection is an analog process.
Therefore, special encoding is commonly
used.
- A sending station must continually
monitor the channel, listening for noise
bursts that might indicate a collision. For
this reason, CSMA/CD with a single
channel is inherently a half-duplex system.
Computer Networks 25