Top Banner
Medium Access Control Sublayer
86
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Medium Access Control

Medium Access ControlSublayer

Page 2: Medium Access Control

Static Channel Allocation

FDM

TDM

Wastage of resources when some of the users are idle.

What if the number of users increase

Page 3: Medium Access Control

Dynamic Channel Allocation :

Systems in which multiple users share a common channel in a way that can lead to conflicts are called contention systems.

Page 4: Medium Access Control

Basic Assumptions

1. Station model : N independent stations. Once a frame has been generated, the station is blocked, does nothing until the frame has been successfully transmitted

2. Single Channel : All channel can transmit on it and all can recv from it.

3. Collisions : when more than one station try to transmit a frame and they overlap in time, both of them are garbled and we say that a collision has occurred. Both the frames must be transmitted again.. There r no errors other than collision

Page 5: Medium Access Control

Basic assumptions contd…

4. Continous time / Discrete time

5. Carrier Sense/ No carrier sense

Page 6: Medium Access Control

Multiple Access Protocols• ALOHA (by Norman Abramson in 1970) – No

carrier Sense• Carrier Sense Multiple Access Protocols• Collision-Free Protocols• Limited-Contention Protocols• Wavelength Division Multiple Access

Protocols• Wireless LAN Protocols

Page 7: Medium Access Control

PURE ALOHA

Continuous Time

No Carrier Sense

Page 8: Medium Access Control

Pure ALOHA contd…

We assume that all the frame lengths are same because ,

it makes the study easier , and

the performance of the system is best when the frames are of fixed size.

Page 9: Medium Access Control

Pure ALOHA contd…

Let N : average number of frames created a new per frame time

G : average number of frames transmitted ( new frames + retransmission due to collision) per frame time

Let both follow Poisson distribution I.e. for eg. Pr[k] = G^k e^{-G} / k! Is the probability of

transmitting k frames in a given frame time.

Page 10: Medium Access Control

Pure ALOHA contd…

Throughput S = fraction of all the frames transmitted that escape the collision, per frame time

For eg . If the throughput is 18% and If frame time = 1/100 sec

Then though 100 frames can be transmitted in one second only (at most) 18 of them are transmittedsuccessfully.

Page 11: Medium Access Control

Pure ALOHA contd…

S = GP_0

Average number of frames transmitted X the probability that it will not suffer a collision.

Where P_0 is the probability that a frame doesn’t suffer a collision

Page 12: Medium Access Control

Pure ALOHA contd…

Page 13: Medium Access Control

Contd..

The frames that collide with the shaded frame are generated in the intervals to – to+t and to+t – to + 2t. Average number of frames generated in these two time intervals is 2G.

Probability that no frame is transmitted in these two intervals is therefore e^{-2G}

Page 14: Medium Access Control

Pure ALOHA contd…

Since Pr[k] = G^k e^-G / k!

Therefore , P_0 = e^-2G, for two frames and

S = G e^-2G

The max thruput occurs at G = 0.5 with S = 1/2e = .184

Page 15: Medium Access Control

Slotted ALOHA

S = G e^-G

Max at G =1, with S = 1/e = .368 ~ .37

Probability that a slot is idle = P_0 = 1/e ~ .37

Hence 37% idle, 37 % success and remaining 26% collisions.

Page 16: Medium Access Control

Slotted ALOHA contd…

Page 17: Medium Access Control

Slotted ALOHA

Higher values of G reduces the empty slots but increases collisions exponentially.

Page 18: Medium Access Control

CSMA : Carrier Sense Multiple Access Protocols

1 – persistent CSMA

when a station is ready to send a frame , it senses the channel :

if busy : continuously sense it and waits for it to become free

if idle : sends it (with probability 1) ..hence the name 1 -persistent

if collision : waits for random time and tries again

Page 19: Medium Access Control

CSMA contd…

Effect of propagation delay in CSMA – if signal from station A has not reached station B and station B is ready to send, it will sense the channel to be idle and send its frame.

Collision can be there even when propagation delay is zero and carrier sense is also there –

Two stations wait for a third station to finish and then transmit simultaneously.

Page 20: Medium Access Control

1-persistent contd..

Better than Pure ALOHA but would have been better if the two stations were more patient.

Page 21: Medium Access Control

Nonpersistent CSMA

Less greedy than 1 persistent , hence better channel utilization but longer delays

when a station is ready to send a frame , it senses the channel :

if busy : waits for random time rather than continuously sense it for the purpose of seizing it

if idle : sends it .

if collision : waits for random time and tries again

Page 22: Medium Access Control

p- persistent CSMA

Applies to slotted channels Senses the channel when ready If busy : waits for the next slotIf idle : sends its frame with probability p and defers

it with probability q = 1 – p to the next slot : Note that it defers even when the channel is idle

Repeats above until either it or some other station grabs the channel. In case some other channel grabs it ..it treats it like a collision I.e. waits for a random time and starts again

Page 23: Medium Access Control

Comparison

Page 24: Medium Access Control

CSMA/CD: CSMA with Collision Detection

Suppose after a station has finished sending its frame, say at time to, other stations try to sense the channel for collision. In case, collision is detected, it refrains from transmitting, waits for a random amount of time and tries again.

The above procedure is repeated until the station gets a chance to transmit its frame.

Page 25: Medium Access Control

CSMA with Collision Detection

CSMA/CD can be in one of three states: contention, transmission, or idle.

Page 26: Medium Access Control

What should be the size of the contention interval?

How long does it take for a channel to detect a collision (max time)? Let the time it takes for a signal to travel between the two

farthest stations, say A and B, is t At t0, A starts transmitting. At t-epsilon, an instant before the signal reaches B, B also

starts transmitting, collision occurs But the collided signal reaches back to A not before

additional t time .. I.e. at an instant 2t-epsilon Hence it takes about 2t time for A to detect a collision Hence the contention interval must be 2t.

Page 27: Medium Access Control

CSMA/CD contd..

If a station detects collision in the midway of generating its frame, it stops immediately rather than generating the entire frame.

Widely used

Also in Ethernet LAN.

Page 28: Medium Access Control

CSMA/CD

Collisions do not occur in CSMA/CD once a station has acquired a channel. However, the collisions can still occur during the contention periods.

Page 29: Medium Access Control

Collision-Free Protocols

Not used these days in major systems but possess some nice properties.

Page 30: Medium Access Control

Collision-Free Protocols

The basic bit-map protocol.

Page 31: Medium Access Control

Performance

Under light load, few frames and more contention slots, so overhead is high Let one time unit = time for contention bit slot Let one frame time = d time units Efficiency is roughly = d/(d+N) where N is the number

of contention slots, assuming roughly 1 frame per N contention slots

Under heavy loads, lots of frames, so overhead per frame is low, assuming N frames for every N contention slots, efficiency = dN/(dN + N) = d/(d+1)

Page 32: Medium Access Control

Collision-Free Protocols (2)

The binary countdown protocol. A dash indicates silence.

Page 33: Medium Access Control

Channel efficiency

= d/(d + log N)

Disadv :

Biased towards higher numbered stations

Page 34: Medium Access Control

A Variation of Binary countdown – by Mok and Ward(1979)

Use round-robin

A station which has been served is numbered lower (say given lower priority) and others behind it are moved up.

Page 35: Medium Access Control

Revisit p-persistent Protocol

It is symmetric .I.e each station acquires a channel with the same probability p.

Suppose k stations are contending probability that some station acquires the channel in a

given slot is k p (1 – p)^(k-1)

What should be the value of p so that this probability is maximum?

Ans : p = 1/k and the max probability is ( 1 – 1/k)^(k-1)

Page 36: Medium Access Control

Chances of success are good when k is small I.e. limited contention

Page 37: Medium Access Control

Performance Comparison

Contention Protocols Low delays, better channel efficiency at low

load Poor channel efficiency at heavy load

Collision- free Protocols High delays, poor efficiency at low load Better channel efficiency at heavy loads.

Page 38: Medium Access Control

Limited- Contention Protocols

Combine the benefits of both the strategies

Divide the number of contending stations into groups

stations in group 0 contend for slot 0 If one of them acquires, it transmits the frame Else, stations in group 1 contend for slot 1 And so on

Page 39: Medium Access Control

Assign stations to groups dynamically

Assign many stations to a group under light load ( slotted ALOHA types) Competition is more (actually light under light load)

but the bit map and hence the overhead is less

Assign few (may be one) station to a group under heavy loads ( close to bit map) Competition per slot is less but the bit map size

increases but that’s fine because overhead per frame is not much under heavy loads.

Page 40: Medium Access Control

Adaptive Tree Walk Protocol

Think of the stations as the leaves of a binary tree

Page 41: Medium Access Control

How far down the tree the search must begin?

Does it make sense to allot slot 0 to node 1 at heavy load ?

Assume that each station has a good estimate of the number of stations q contending at any point of time

Further assume that the ready stations are uniformly distributed at the leaves of the binary tree.

Page 42: Medium Access Control

At a node at level i the expected number of ready channels under it is q/2^i

Intuitively, the optimal level to begin search is the one for which q/2^i is 1

I.e. i = log q.

Page 43: Medium Access Control

WDMA: Wavelength Division Multiple access : MAC sub-layer in optical networks The spectrum is divided in to channels

(wavelength bands) Each channel is divided into groups of

time slots Each station is assigned two channels

Narrow channel – control channel Wide channel – data channel

Page 44: Medium Access Control

Contd..

There is no relation between the number of time slots in the control channel (say m), the number of time slots in the data channel (say n + 1) and the number of stations.

Each data channel has one slot as the status slot.. Which tells other stations about its free slots.

A station might use zero, one or more of the time slots in data or control channels.

Page 45: Medium Access Control

More topics for presentation(1 person each)

MAC Sublayer in Optical Networks. MAC Sublayer in WLANs (802.11) MAC Sublayer in Broadband

Wireless(802.16)

Page 46: Medium Access Control

Wavelength Division Multiple Access Protocols

Wavelength division multiple access.

Page 47: Medium Access Control

3 types of traffic

Constant data rate CO traffic variable data rate CO traffic Data-gram traffic

Page 48: Medium Access Control

Dynamic WDMA contd…

Each Station has two transmitting channels and two receiving channels as follows : Fixed wavelength receiver for listening to its own

control channel Tunable transmitter for sending on other stations’

control channels Fixed wavelength transmitter for outputting data

frames Tunable receiver for selecting a data transmitter to

listen to

Page 49: Medium Access Control

Variable Data Rate CO traffic

Connection is established to exchange control information but not for data.

“There is a frame for you in slot 3” Collision in establishing a connection in the

control slot : no problem try again Problem is : 2 stations establish connection with

B say in slots 4 and 5, but both send “There is a frame for you in slot 3” …. B chooses one of them by tuning itself to one of them and the frame from the other is discarded.

Page 50: Medium Access Control

Constant Data Rate COO

A connection is established in a data slot also

When A asks for a connection it also says something like : Is it all right if I send you a frame in every occurrence of slot 3. If A is free in that slot, a guaranteed bandwidth connection is established

Page 51: Medium Access Control

Data-gram traffic

Instead of writing a CONNECTION REQUEST message into the control slot, it writes data for you in slot 3. No connection is established even in control slot. If B is free during that slot, it accepts the frame else it is lost.

Whichever slot is found free is used to send a control message.

Page 52: Medium Access Control

MAC Sub-layer in Wireless LANs

There is a fixed base station

Page 53: Medium Access Control

Wireless LANs

(a) Bluetooth configuration (b) Wireless LAN

Page 54: Medium Access Control

WLANs contd..

Unlike cellular system, each room or LAN has only one channel, covering the entire available bandwidth and covering all stations in its cell.

It is important to know that in WLANs not all stations may be within the range of one another.

Page 55: Medium Access Control

Can we use CSMA?

Hidden Station Problem Exposed Station Problem

Page 56: Medium Access Control

Wireless LAN Protocols

A wireless LAN. (a) A transmitting. (b) B transmitting.

Page 57: Medium Access Control

Problem near the receiver

CSMA only tells problem near the sender and not near the receiver .. The point is scene near the receiver may be different from the scene near the sender.. Which was not the case in traditional wired (Ethernet type) networks.

Page 58: Medium Access Control

Simultaneous transmissions are possible in WLANs

In contrast to wired (Ethernet type of) networks.

Page 59: Medium Access Control

Wireless LAN Protocols (2)

The MACA protocol. (a) A sending an RTS to B.

(b) B responding with a CTS to A.

Page 60: Medium Access Control

MACA : Multiple Access with Collision Avoidance

A sends an RTS (Request to send) – a short frame (30 bytes long).. It contains the length of the data frame that will follow.

B sends CTS (Clear to send) – again a short frame.. Also containing the length of the data frame (copied from RTS)

On receiving CTS, A starts transmitting

Page 61: Medium Access Control

Effect of MACA on other stations

Suppose C is in the range of A, hence hears RTS .. Must wait until A receives CTS else will collide with CTS

Suppose D is in the range of B, hence hears CTS .. Must wait until B receives the data frame .. From the length of the data frame(contained in the CTS) .. the time for the data frame is estimated

Page 62: Medium Access Control

Collisions may still occur

When two stations try to send an RTS at the same time to the same station.

In case of collision, sender waits a random time and starts again later. Binary exponential backoff method is used.

Page 63: Medium Access Control

Data Link Layer Switching

• Bridges from 802.x to 802.y• Local Internetworking• Spanning Tree Bridges• Remote Bridges• Repeaters, Hubs, Bridges, Switches,

Routers, Gateways• Virtual LANs

Page 64: Medium Access Control

Data Link Layer Switching

Multiple LANs connected by a backbone to handle a total load higher than the

capacity of a single LAN.

Page 65: Medium Access Control

Why LAN of LANs?

Each deptt : own LAN Each buliding : own LAN Each discipline within a deptt : own LAN to

accommodate the load For more reliability : if there is a single LAN in the

entire organization and, at time there is a node which is generating frames continuously, it will cripple the entire LAN .. By keeping multiple LANs one can save the rest of the nodes.

Security : rather than promiscuous mode use intelligent bridges on the gateway.

Page 66: Medium Access Control

Bridges from 802.x to 802.y

Operation of a LAN bridge from 802.11 to 802.3.

Page 67: Medium Access Control

Difficulties in bridging 802.x with 802.y

Requires reformatting – takes CPU time, new checksum => possibility of errors due to bad memory bits in the bridge’s memory.

Difference in speed may lead to Swamping Different max. frame length : splitting n

assembly is generally not done in the DLL.. Frames that are too large for the next LAN to handle are dropped.

Security

Page 68: Medium Access Control

Bridges from 802.x to 802.y (2)

The IEEE 802 frame formats. The drawing is not to scale.

Page 69: Medium Access Control

Local Internetworking

A configuration with four LANs and two bridges.

Page 70: Medium Access Control

Routing in Interconnected LANs

Use MAC Address A hash table of MAC address is

maintained : (dest., outgoing LAN) Initially empty Initially flooding Learns about a node when a frame comes

from it – backward learning. Entries updated and purged from time to time

Page 71: Medium Access Control

Routing in Interconnected LANs

If destination and source are on same LAN, discard

If on different, forward If destination LAN is not known, flood

Page 72: Medium Access Control

Problem of parallel bridges between 2 LANs cycle

Two parallel transparent bridges.

Page 73: Medium Access Control

Spanning Tree Bridges (2)

(a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.

Page 74: Medium Access Control

Remote Bridges

Remote bridges can be used to interconnect distant LANs.

Page 75: Medium Access Control

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) Which device is in which layer.(b) Frames, packets, and headers.

Page 76: Medium Access Control

Repeaters and Hubs : Physical Layer

They do not understand frames, packets or headers, understand only volts.

Repeaters amplify the signal and pass it onto the next LAN .. No collision

Hubs do not amplify .. They broadcast the signal they receive to all the nodes.. If two or more nodes try to send at the same time they collide.

Page 77: Medium Access Control

Switches and Bridges : DLL

Bridges connect LANs, Switches connect individual machines.

In switched networks..no collision, each node has its own port, own buffer space etc. In Bridged networks, Collision may occur in individual LANs

Both do routing Today, there isn’t much difference between

switches and bridges and they are used interchangeably.

Page 78: Medium Access Control

Repeaters, Hubs, Bridges, Switches, Routers and Gateways (2)

(a) A hub. (b) A bridge. (c) a switch.

Page 79: Medium Access Control

Virtual LANs (2)

(a) Four physical LANs organized into two VLANs, gray and white, by two bridges. (b) The same 15 machines organized into two VLANs by switches.

Page 80: Medium Access Control

The IEEE 802.1Q Standard

Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are

VLAN aware. The empty ones are not.

Page 81: Medium Access Control

The IEEE 802.1Q Standard (2)

The 802.3 (legacy) and 802.1Q Ethernet frame formats.

Page 82: Medium Access Control

Summary

Channel allocation methods and systems for a common channel.

Page 83: Medium Access Control

MACAW (MACA for wireless) by Bhargavan et al

Some improvements over MACA. Ack for successful transmission was

introduced. Carrier sense was introduced so that if one

RTS is in progress another station abstain itself from doing so.

Page 84: Medium Access Control
Page 85: Medium Access Control
Page 86: Medium Access Control

I Acknowledge• Help from the following site

• http://www.cs.vu.nl/~ast/

• In preparing this lecture.