Medium Access Control (MAC)
Medium Access Control (MAC)
Medium Access Control (MAC)
Multiple Access
Data link layer divided into two functionality-
oriented sublayers
RANDOM ACCESS
In random access or contention methods,
• No station is superior to another station and none is
assigned the control over another.
• At each instance, a station that has data to send uses a
procedure defined by the protocol to make a decision
on whether or not to send.
No scheduled time for a station to transmit
• Transmission is random among the stations
No rules specify which station should send next
• Stations compete with one another to access the medium
If more than one station tries to send, access conflict-collision-and
the frames destroyed.
• ALOHA …earliest random access method
pure ALOHA
The simplest possible medium access protocol:
Just talk when you feel like it
Contention system: Multiple users share a common channel that may
lead to conflicts
• Acknowledgement is used for error detection of a frame
back-off.
• For each retransmission, a multiplier in the range 0 to
7
Slotted ALOHA
ALOHA’s problem: Long vulnerability period of a
packet
Reduce it by introducing time slots – transmissions
may only start at the start of a slot
• Slot synchronization is assumed to be “somehow”
available
Possibility of collision if two stations try to send at the
beginning of the same time slot.
8
Vulnerable time for slotted ALOHA
Carrier sensing
(Slotted) ALOHA is simple, but not satisfactory
The chance of collision can be reduced if a station
senses the medium before trying to use it.
Be a bit more polite: Listen before talk
• Sense the carrier to check whether it is idle before
transmitting
• Carrier Sense Multiple Access (CSMA)
• Abstain from transmitting if carrier not idle (some
other sender is currently transmitting)
Crucial question: How to behave in detail when
carrier is busy?
• In particular: WHEN to retry a transmission?
CSMA and propagation delay
CSMA can reduce the possibility of collision, but it cannot
eliminate it.
Possibility of collision still exists because of propagation
delay d
Suppose two stations become ready to send at time t and
t+ = t 2
• At t, the channel is completely idle
once it is idle
• Conscious attempt to be less greedy
wasteful
15
p-persistent CSMA
Combines ideas from persistent and non-persistent
CSMA
• Uses a slotted time model
• With probability 1-p, do not send and wait for the next
slot
• If channel is busy in the next slot, monitor for idleness
• Else, flip a coin again
Behavior of three persistence
methods
Collision detection – CSMA/CD
When two packets collide, lots of time is wasted by completing
their transmission
If it were possible to detect a collision when it happens,
to complete
Depending on physical layer, collisions can be detected!
collisions
However: will result in some idle time, occasionally
Not necessarily
slotted time!
Collision and abortion in
CSMA/CD
10Base2
10Base-T
Standard Ethernet …cabling
FAST ETHERNET
Fast Ethernet under the name IEEE 802.3u.
Backward-compatible with Standard Ethernet,
but it can transmit data 10 times faster at a rate
of 100 Mbps.
Topology
Fast Ethernet …cabling
GIGABIT ETHERNET
Operate at 1000 Mbps.
The IEEE 802.3z standard
Ten-Gigabit Ethernet
Ten-Gigabit Ethernet operates only in full duplex
mode
There is no need for contention; CSMA/CD is not
used in Ten-Gigabit Ethernet.
The physical layer in Ten-Gigabit Ethernet is
designed for using fiber-optic cable over long
distances.
Twisted-Pair Cabling Overview
A typical twisted-pair cable consists of four pairs
of copper wires, for a total of eight wires.
Each side of the cable is terminated using an
RJ45 connector, which has eight pins.
When the connector is crimped onto the cable,
these pins make contact with each wire
Twisted-Pair Cabling Overview
A typical twisted-pair cable consists of four pairs of copper
wires, for a total of eight wires.
Each side of the cable is terminated using an RJ45
connector, which has eight pins.
When the connector is crimped onto the cable, these pins
make contact with each wire
For communication to occur, transmit pins must connect to
the receive pins of the remote host.
Twisted-Pair Cabling Overview
The crossover can be controlled either by the cable, or an
intermediary device, such as a hub or switch.
There are three common types of twisted-pair cable:
• Straight-through cable
• Crossover cable
• Rollover cable
Twisted-Pair Cabling Overview
Straight-Through Cable
A straight-through cable is used in the following
circumstances:
From a host to a hub
From a host to a switch
From a router to a hub
From a router to a switch