Вы находитесь на странице: 1из 32

MAC Protocols for

High Speed LANs

BY: Lakhvir Singh


Parminder Singh

1
Outline

 MAC: Media Access Control


It is a sublayer of DLL. It provides interface
b/w LLC & Physical layer.
 Protocols are a set of rules
 LAN: Local Area Network

2
MAC Protocols
 ALOHA
 Slotted ALOHA
 CSMA
 CSMA/CD
 Token Ring
 Token Bus

3
ALOHA

 ALOHA developed at university of Hawaii at


Honolulu in 1970.
 This is used to solve channel allocation problem.
 Two versions of ALOHA:
Pure ALOHA
Slotted ALOHA

4
Pure ALOHA

 Pure ALOHA uses a simple idea that is to let users


transmit whenever they have data to send.
 Collisions will be there & the colliding frame will
be destroyed.
 Due to feedback, a sender can find out whether or
not its frame was destroyed.
 If no ACK received with in a time period , sender
resends after waiting.

5
Pure ALOHA

In Pure ALOHA, only about 18.4% is the


successful transmissions.
If the first bit of a frame overlaps with just the
last bit of a frame , both frames will be totally
destroyed.
Slotted ALOHA
 A sender sends a frame according to time slot.
 The total time is divided into time intervals.
 Each time interval corresponds to one frame.
 Sender sends out frame at start of slot time only.
 In case of re-transmission: sender waits for a
number of time slot and then re-sends.

7
Slotted ALOHA

 Boxes indicate frames. Shaded boxes indicate


frames which are in the same slots.
 In Slotted ALOHA, only about 36.8% is the
successful transmissions.

8
Carrier Sense Multiple Access (CSMA)

 CSMA is a protocol in which a sender verifies the


absence of other traffic before transmitting on a
shared channel.
 "Carrier Sense" describes the fact that a
transmitter uses feedback from a receiver.
 It tries to detect the presence of an signal from
another station before attempting to transmit.
 If a carrier is sensed, the station waits for the
transmission in progress to finish before starting its
own transmission. 9
Carrier Sense Multiple Access (CSMA)

 "Multiple Access" describes the fact that multiple


stations send and receive on the medium.
Transmissions by one sender are generally received
by all other stations using the medium.
 Three types: 1-persistent
p-persistent
Nonpersistent

10
1-persistent CSMA
 When the sender is ready to transmit data, it checks
the physical medium
 Station wishing to transmit listens and obeys
following:
1. If medium idle, transmit; otherwise, go to step 2
2. If medium busy, listen until idle; then transmit
immediately
 1-persistent stations are greedy
 If two or more stations waiting, collision is
guaranteed!
11
Nonpersistent CSMA

 This protocol is less greedy than 1-persistent.


1. If medium is idle, transmit; otherwise, go to 2
2. If medium is busy, wait for random time and
repeat 1
 Random delays reduces probability of collisions.
 However, capacity is wasted because medium will
remain idle following end of transmission
 Even if stations waiting to access
12
p-persistent CSMA

 When the sender is ready to send data, it checks


continually the medium.
 Station wishing to transmit listens and obeys
following:
1. If medium idle, transmit with probability p.(If the
sender chooses not to transmit,the sender waits until the next
available time slot and transmits again with the same
probability p. This process repeats until the frame is sent.)
2. If medium busy, listen until idle and repeat step 1.

13
Value of p?
 n stations waiting to send
 At end of a transmission, expected/average number of
stations attempting to transmit is:
 np
 If np > 1, higher chance of a collision
 Repeated attempts to transmit almost guaranteeing more
collisions as retries compete with new transmissions
 Eventually, all stations trying to send
 Continuous collisions  zero throughput
 So np < 1 for expected peaks of n
 If heavy load expected, p small
 However, as p made smaller, stations wait longer
14
CSMA/CD

 The CSMA/CD protocol functions somewhat like a


dinner party in a dark room.
 Everyone around the table must listen for a period
of quiet before speaking (Carrier Sense).
 Once a space occurs everyone has an equal chance
to say something (Multiple Access).
 If two people start talking at the same instant they
detect that fact, and quit speaking (Collision
Detection.)
15
CSMA/CD

 With CSMA, collision occupies medium for


duration of transmission
 With CSMA/CD, stations listen while transmitting
1. If medium idle, transmit, otherwise, step 2
2. If busy, listen for idle, then transmit
3. If collision detected, stop frame transmission and
send jam signal.
4. After jam signal, wait for random time then start
from step 1
16
IEEE 802.3 Frame Format

Ethernet is similar, but length is replaced by type


Both has min frame size = 512 bits (64 octets)
17
“Taking Turns” MAC Protocols

 Involve a controlled access


 No collision!
 A station cannot send unless been
“authorised”
 There are two main types:
 Polling
 Token-passing

18
The Polling Scheme

 The master/central
node “invites” slave
nodes to transmit in
turn
 Main concerns:
 polling overhead
 latency
 single point of
failure (master)

19
Token Ring

 Developed from IBM's commercial token ring


 Because of IBM's large presence, token ring has
gained broad acceptance
 But, never achieved popularity of Ethernet!
 Currently, large installed base of token ring
products
 Market share likely to decline

20
Ring Operation
 Each repeater connects to two others via
unidirectional transmission links
 Single closed path
 Data transferred bit by bit from one repeater to the
next
 Repeater regenerates and retransmits each bit
 Frame removed by transmitter after one trip round
ring

21
Ring Repeater States

22
IEEE 802.5 Frame Format

Data Frame

Token Frame

23
IEEE 802.5 MAC Protocol-
Token Passing
 A special frame (i.e. token) circulates continuously
 Station waits for the token
 Changes one bit in token to make it SOF for data frame
 Append rest of data frame
 Frame makes round trip and is absorbed by
transmitting station
 Inserts new token when transmission has finished
 How long to hold token – token holding time (THT)
 Under light loads, some inefficiency
 Under heavy loads, round robin 24
Token Ring
Operation

25
LAN Performance Comparison

Fig.
16.18
26
Wireless LAN Overview

 A wireless LAN uses wireless medium


 Saves installation of LAN cabling
 Eases relocation and other modifications to network
structure
 Popularity of wireless LANs has grown rapidly
 Role for the wireless LAN
 Manufacturing plants, stock exchange trading floors, warehouses
 Historical buildings
 Small offices where wired LANs not economical
 IEEE has specified this technology in 802.11
standard 27
IEEE 802.11 Wireless LAN
 802.11b  802.11a
 2.4-2.5 GHz unlicensed  5-6 GHz range
radio spectrum  up to 54 Mbps
 up to 11 Mbps  802.11g
 widely deployed, using  2.4-2.5 GHz range
base stations  up to 54 Mbps

 All use CSMA/CA for MAC protocol


 All have infrastructure and ad-hoc network
versions

28
Infrastructure Approach

 Wireless host communicates with an access point


 Basic Service Set (BSS) (a.k.a. “cell”) contains:
 wireless stations

 one access point (AP)

 BSSs combined to form a distribution system (DS)

McGraw-Hill 292004
©The McGraw-Hill Companies, Inc.,
Ad Hoc Approach

 No AP!
 Wireless stations communicate with each other
 Typical usage:
 “laptop” meeting in conference room, car

 interconnection of “personal” devices

 battlefield

 IETF MANET (Mobile Ad hoc


Networks) working group
looks into this approach
 Special needs such wireless routing, security

30
IEEE 802.11: MAC protocol

 Collision if 2 or more nodes transmit at same time as


the wireless channel is shared
 CSMA makes sense:
 get all the bandwidth if you’re the only one transmitting
 shouldn’t cause a collision if you sense another
transmission
 Thus, it uses CSMA with collision avoidance
(CSMA/CA)
 Not CD because detecting collision is difficult in wireless
environment
 Two-handshaking used
31
THANKS

32