Top Banner
#1 EETS 8316/NTU TC 745, Fall 2003 ENGINEERING SMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data, Part III Instructor: Jila Seraj email: [email protected] http://www.engr.smu.edu/~jseraj/ tel: 214-505-6303
87

#1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

Dec 16, 2015

Download

Documents

Julien Anne
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: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Southern Methodist University Fall 2003

EETS 8316/NTU CC745-NWireless Networks

Lecture 8: Mobile Data, Part III

Instructor: Jila Serajemail: [email protected]

http://www.engr.smu.edu/~jseraj/tel: 214-505-6303

Page 2: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#2EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Session Outline

Review of last week

Wireless LAN

Page 3: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#3EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Announcements

Answer to homework #1 is on the web

Homework #2 is on the web.

—Deadline for in-campus students October 24

—Deadline for distant students November 7

Page 4: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#4EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS - Network Architecture

GPRS makes use of existing GSM base stations

Serving GPRS support node = packet switch with mobility management capabilities

Gateway GSN = packet switch interworks with other networks

Internet or other networks

GGSNMSC/VLR

SGSN SGSN

HLR

BSC/PCU

Page 5: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#5EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS , Cont...

GSM Release’97 introduced general packet radio service (GPRS) for bursty data

Make use of existing GSM network equipment and functions

In Contrast to CDPD, it is integrated into GSM, i.e. dedicated Control channel and data channel.

Requires two new network element, GGSN and SGSN

Page 6: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#6EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS , Cont...

GGSN = Gateway GPRS Support Node

— External interfaces

— Routing

GPRS register maintains GPRS subscriber data and routing information. Normally it is integrated in GSM HLR

PCU (Packet Control Until) is collocated with BSC.

Page 7: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#7EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS , Cont...

Three class of mobile terminals

—Class A: Operates GPRS and Circuit switched service simultaneously

—Class B: Monitors the Control channels of GPRS and GSM simultaneously but can operate one set of services at a time

—Class C: Only CS or GPRS capable.

Page 8: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#8EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS , Cont...

For mobility management a new concept is defined, Routing Area

RAI = MCC +MNC + LAC + RAC

Page 9: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#9EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS Interfaces

Page 10: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#10EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS – Data Connection

GPRS data connection starts with Attach and ends with Detach.

Attach is the phase when the mobile informs the network of its intention to create a data connection

At conclusion of Attach, SGSN is ready to set up data services on behalf of the mobile user.

Page 11: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#11EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS – Data Connection, Cont…

Detach is the phase when mobile terminates the connection.

GPRS requires subscription

Page 12: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#12EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS Attach Scenario

BSS HLRSGSNBTS

IMSI, P_TMSI+OLD RAI…

Update Location

Insert Subs. Data

Insert Data Ack

Update LocationGPRS Attach Accepted

Page 13: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#13EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS – Mobile Attach Scenario

Mobile sends Attach message. This message contains P-TMSI or TMSI. It also contains NSAPI (Network Service Point Identifier)

SGSN contacts HLR to verify if the user is permitted to use the service

After authentication, SGSN send back Attach Accepted together with a TLLI (Temporary Logical Link Identity)

Page 14: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#14EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS – Mobile Attach Scenario

A database in SGSN is now populated with mobile identity and TLLI. TLLI is used by logical link controller in the SGSN.

Page 15: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#15EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, GPRS – Setting Up Packet Data

After attach the mobile is known by SGSN and have an identity there, but it is not known to the external network.

First it needs to create an identity for itself by performing a procedure called PDP Context Activation. PDP is Packet Data Protocol, which could be IP or x.25 protocol.

Page 16: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#16EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, PDP Context ActivationBSS GGSNSGSNBTS

Activate PDP ContextCreate PDP

Context RequestNASPI, PDP typePDP, QoS,APN

Create PDPContext ResponsePDP Address, QoS

Activate PDP Context AcceptedPDP Type, PDP Address, QoS

Page 17: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#17EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, PDP Context Activation, Cont..

Mobile requests PDP Context Activation

Based on the information provided, SGSN determines which GGSN to connect to. The GGSN should be capable to support the PDP requested by mobile

GGSN updates its data base and assign a TID to the mobile and SGSN

SGSN updates its data base with the GGSN address and TID. It then send PDP Context Activation Accepted message to mobile

Page 18: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#18EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, Actually Sending Data

After PDP Context Activation the mobile is known to the external packet network (PDN)

When SGSN receives data from mobile, it looks up its database and relate the TLLI to NSAPI.

SGSN and SNDPC pad the IP packet and replace the destination address with GGSN IP address and sets GTP header to TID

Page 19: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#19EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Review, Actually Sending Data, Cont…

Packets are then sent to GGSN with SGSN as sender

At GGSN, the additional information is removed to get the original packet . The packet can now be routed to its intended destination.

Page 20: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#20EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Wireless LANs

Wireless LANs are usually logical bus topology (broadcast medium)

Why wireless LANs?

—Saves trouble of rewiring a building

—Portable computing devices (laptops, PDAs) are more common

Page 21: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#21EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocols

MAC protocol is a sublayer in data link layer

For LANs, data link layer = logical link control (LLC) sublayer + MAC sublayer

data link

physical

LLC

MAC

network

- defines how stationsaccess the sharedmedium

Page 22: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#22EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocols, Cont..

—LLC sublayer builds on MAC sublayer to provide medium-independent communication service to higher layers (makes MAC sublayer transparent)

—LLC can provide appearance of connectionless or connection-oriented service

Page 23: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#23EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocols, Cont..

•Connectionless service treats each message independently. No connection setup and no sequential order

•Connection-oriented service requires connection setup and preserves sequential order of messages

Page 24: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#24EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC protocols, Token Passing

Token ring and token bus—Every station connected to the bus is given

a token—The token is passed according to order—When a station has something to send, it

keeps the token until it is done, before sending it to the next station.

It is fair and has no contention

The system encounters delays for sending the token.

Page 25: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#25EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocols: Token Passing, Cont..

Token passing is another technique to eliminate contention (collisions)

Token is short packet representing permission to transmit—Token is passed from station to station

according to an arranged order defining a logical token ring topology

—A station with the token can transmit for a limited time

—After transmission, token is sent to next station in ring

Page 26: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#26EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocols: Polling

Objective to eliminate random contention (collisions) which reduces throughput of system

Polling is centralized control

—One station will periodically poll other stations to see if they have data to transmit

—A polled station may transmit data, otherwise controller will poll next station in a list

Page 27: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#27EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocols: Polling

Polling involves exchange of control messages between stations and controller

—Efficient only if

• roundtrip propagation delay is small

•overhead due to control messages is small

•user population is not large and bursty

—As population increases with more bursty users, performance of polling degrades

Page 28: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#28EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocols: Polling

Polling is used in wired network environments but not popular in wireless networks

Page 29: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#29EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Token passing, Cont..

Commonly used in wired LANs (IEEE 802.4 token bus and 802.5 token ring), token passing has not found much adoption in wireless networks

Overhead is increased to improve throughput under heavy load

—Issue is efficiency

Page 30: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#30EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC protocols: Aloha

Aloha

—Stations starts sending when they have something to send

—Pure Aloha, no contention resolution, relies on timed-out acks, max throughput 18%

—Slotted Aloha, no contention resolution, relies on timed-out acks, only can start sending in the beginning of a slot, max through put 36%

Page 31: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#31EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Pure ALOHA, Cont..

Throughput

—Assume infinite population of stations generating frames at random times

—Each frame is transmitted in fixed time T

—Assume average number of transmission attempts is S in any interval T

Page 32: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#32EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Pure ALOHA, Cont..

Throughput

—Number of new transmission attempts in any interval t has Poisson probability distribution:

Pr(k transmissions in interval t ) = (St)ke- St /k!

—Let G = “offered load” = new transmissions and retransmissions

Page 33: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#33EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Pure ALOHA, Cont..

—In equilibrium, throughput (rate of successfully transmitted frames) = rate of new transmissions, S

S = GP0

where P0 = probability of successful transmission (no collision)

—P0 depends on “vulnerable interval” for frame, 2T

Page 34: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#34EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Pure ALOHA, Cont..

frame A

frame B

frame C

time-T 0 T

- transmission attempt at time 0

- collision if starts in interval (-T,0)- collision if starts in interval (0,T)

Page 35: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#35EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Pure ALOHA, Cont..

P0 = Pr(no other frame in 2T interval)

—Assume total number of frames in any interval t is also Poisson distributed, with average G:

Pr(k transmissions in t) = (Gt)ke-Gt/k!

then P0 = e-2G

—By substitution, throughput is

S = GP0 = Ge-2G

Page 36: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#36EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Pure ALOHA, Cont..

—This is maximum at G = 0.5, where S = 1/2e = 0.184 (frames per interval T)

•Pure ALOHA achieves low throughput

Page 37: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#37EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Slotted ALOHA

Slotted ALOHA is a modification to increase efficiency

—Time is divided into time slots = transmission time of a frame, T

—All stations are synchronized (eg, by periodic synchronization pulse)

Page 38: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#38EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Slotted ALOHA

Slotted ALOHA is a modification to increase efficiency

—Any station with data must wait until next time slot to transmit

—Any time slot with two or more frames results in a collision and loss of all frames – retransmitted after a random time

Page 39: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#39EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Slotted ALOHA, Cont..

“Vulnerable interval” is reduced by factor of 2 to just T

frame A

frame B

time-T 0 T

- transmission attempt at time 0

- collision if frame B was ready in interval (-T,0)

Page 40: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#40EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Slotted ALOHA, Cont..

Throughput

P0 = Pr(no frames ready in previous time slot) = e-G

—Now throughput is

S = GP0 = Ge-G

—This is maximum at G = 1, where S = 1/e = 0.368 (frames per interval T)

•Slotted ALOHA doubles throughput of pure ALOHA

Page 41: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#41EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Slotted ALOHA, Cont..

Note that throughput is never very high

Also, at high loads, throughput goes to 0, a general characteristic of networks with shared resources

—Number of empty time slots and successful slots decrease, number of collisions increase

Page 42: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#42EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Slotted ALOHA, Cont..

—Average number of retransmissions per frame increases

—Average delay (from first transmission attempt to successful transmission) increases

Page 43: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#43EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA

Carrier Sense Multiple Access (CSMA)

Sense the presence of carrier, sense the channel is free, send data, wait for Ack, re-send if timed-out, if busy back off and try again. Max throughput 60%

Many versions, most popular method in LAN.

Page 44: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#44EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA, Cont..

Family of CSMA protocols defined by rules for backing off with varying degrees of persistence

—1-persistent CSMA: stations are most persistent

—P-persistent CSMA: persistence increases with value of p

—Non-persistent CSMA: stations are not that persistent

Page 45: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#45EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: 1-persistent CSMA

Slotted or un-slotted versions

If channel is busy, station will transmit immediately after channel becomes idle

If collision is detected, then back off and try again after a random time

Propagation delay can effect performance – station A takes longer to detect that station B is transmitting

—Causes collisions to be more likely

Page 46: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#46EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: 1-persistent CSMA, Cont..

Even without propagation delays, collisions are possible

—Stations A has the channel, stations B and C are ready and will both transmit after station A is done

Throughput analysis is complicated

—Carrier sensing improves throughput over ALOHA

—Throughput goes to 0 under very high load

Page 47: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#47EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: P-persistent CSMA

If channel is idle, station will transmit with probability p

Otherwise, goes to next time slot and senses if channel is idle

If idle, transmits with probability p or otherwise, goes to next time slot and repeats procedure

Performance depends on choice of p

Page 48: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#48EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: Non-persistent CSMA

If channel is idle, station will transmit

If channel is busy, station will wait for random number of time slots before trying again - even if channel is idle meanwhile

Helps avoid collisions right after an active time slot

Page 49: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#49EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: MAC protocols, Cont..

Carrier Sense Multiple Access-Collision Detection (CSMA-CD)

—Send when carrier is free.

—Listen to detect collision

—If collision is detected, back off and retry

—Second order of improvement to CSMA

Page 50: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#50EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: MAC protocols, Cont..

Carrier Sense Multiple Access-Collision Detection (CSMA-CD)

—Not possible in wireless LAN environment, the same frequency for sending and receiving (unlike cellular)

—CSMA-CA is the method of choice

Page 51: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#51EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA/CD, Cont..

frame

transmission idle

frame

contention:series of time

slots for collisions

frame

time

3 alternating states: (1) transmission (2) contention (3) idle

Page 52: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#52EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA/CD, Cont..

Performance depends on time to detect collision (assume transmissions can be aborted immediately)

If D is worst-case propagation delay between any two stations, then collision detection time is 2D

station A

A begins transmit

timestation B

B begins transmit just before signal reaches B

A detects collision after 2D

signal

Page 53: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#53EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA/CD, Cont..

Assume

N = number of stations

2D = length of collision time slots

T = time to transmit frame

(T > 2D, otherwise collisions are not detected)

P = probability a station will transmit in idle time slot

Page 54: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#54EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA/CD, Cont..

After successful frame, there is contention period of series of collision time slots (multiple attempts) or idle (no attempts), ended by a successful frame (exactly one attempt)

Page 55: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#55EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA/CD, Cont..

Find P1 = Pr(exactly 1 attempt in time slot) = NP(1-P)N-1

Maximum when P = 1/N, then

Mean length of contention period:

—Pr(j slots with collisions or idle followed by one transmission) = (1 - P1)jP1

P1 1 1

N

N 1

Page 56: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#56EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA/CD, Cont..

—Mean length of contention period is

—Maximum utilization is

—Note utilization decreases for large D or small T

j(1 P1j1

) jP1 1 P1

P1

T

T 1 P1

P1

2D

(slots)

frame time

frame time + contention period=

Page 57: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#57EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA-CA

Carrier Sense Multiple Access-Collision Avoidance (CSMA-CA)

—When node A has something to send to node B, it send Request-To-Send (RTS) packet to B with the amount of data to be sent

—B responds with Clear-To-Send (CTS) packet with time of transmission and amount of transmission back to node A

Page 58: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#58EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Protocol: CSMA-CA

Carrier Sense Multiple Access-Collision Avoidance (CSMA-CA)

—When a node has something to send, it should also checks CTS before start transmitting.

—Improves CSMA performance

Page 59: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#59EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

What Is Hidden Node?

A CB

A can hear BC can hear BA can not hear CC can not hear A sending data

Page 60: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#60EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

MAC Frame Format

CRCFrameControl

Duration SequenceControl

FrameBody

Address 4Address 1 Address 2

ProtocolVersion

Type Sub type To DS

FromDS

RetryLastFragment

RSVDEPPower Mgt

2 6 6 6 2 2 0-2304 4

2 2 4 1 1 1 1 2 1 1

Page 61: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#61EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Frame type and subtypes

Three type of frames—Management

—Control

—Asynchronous data

Each type has subtypes

Control—RTS

—CTS

—ACK

Page 62: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#62EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Frame type and subtypes, Cont..

Management—Association request/ response—Re-association request/ response—Probe request/ response—privacy request/ response—Beacon (Time stamp, beacon interval, TDIM period,

TDIM count, channels sync info, ESS ID, TIM broadcast indicator)

—TIM (Traffic Indication Map) indicates traffic to a dozing node

—dissociation—Authentication

Page 63: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#63EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Power Management

AP knows the power management of each node

AP buffers packets to the sleeping nodes

AP send Traffic Delivery Information Message (TDIM) that contains the list of nodes that will receive data in that frame, how much data and when.

The node is awake when it is sending data, receiving data or listening to TDIM.

Page 64: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#64EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Authentication

Three levels of authentication

—Open: AP does not challenge the identity of the node.

—Password: upon association, the AP demands a password from the node.

—Public Key: Each node has a public key. Upon association, the AP sends an encrypted message using the nodes public key. The node needs to respond correctly using it private key.

Page 65: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#65EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Mobility Management

Access point connects other access points via backbone network

Backbone Network

Access Point

Access PointAccess Point

Page 66: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#66EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Mobility Management, Cont..

A node can associate when it enters the coverage area of an AP

It shall re-associate when it handoffs to another AP.

AP bridge function keeps track of all nodes associated with it.

Page 67: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#67EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Access Point Functions

Access point has three components

—Wireless LAN interface to communicate with nodes in its service area

—Wireline interface card to connect to the backbone network

—MAC layer bridge to filter traffic between sub-networks. This function is essential to use the radio links efficiently

Page 68: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#68EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Bridge Functions

Listen to all packets being sent.

Find out which nodes are in which sub-network by analyzing the source address. Store that data in a routing table.

If a packet is addressed to a known node, only repeat the data on that sub-network, otherwise repeat it on all networks.

Age the entries after a timer value has expired since the last communication

Page 69: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#69EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Bridge Functions, Cont..

If the timer is too long, we might send data to a node that might have left the sub-network or is turned off or even gone to coverage area of another access point.

If the timer is too short, we remove the user too early and repeat the packet destined to it in all sub-networks.

Other functions of a bridge, buffering for speed conversion, changing frame format between LANs.

Page 70: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#70EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

Routing

Building routing tables can be done as

—Source tree, keeps track where other nodes are and the best way of reaching them. When sending a packet the route is also determined. It must be done in each node and is heavy.

—Spanning tree, is built iteratively, each bridge advertises it identity and all other bridges it knows and how many hops it takes to get there. Then each bridge follows a specific algorithm to calculate how get to each bridge with least hop.

Page 71: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#71EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

IEEE 802.11 WLAN

1997 IEEE 802.11 working group developed standard for inter-working wireless LAN products for 1 and 2 Mbps data rates in 2.4 GHz ISM (industrial, scientific, and medical) band (2400-2483 MHz)

Required that mobile station should communicate with any wired or mobile station transparently (802.11 should appear like any other 802 LAN above MAC layer), so 802.11 MAC layer attempts to hide nature of wireless layer (eg, responsible for data retransmission)

Page 72: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#72EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

802.11 WLAN, Cont..

1999 IEEE 802.11a amendment for 5 GHz band operation and 802.11b amendment to support up to 11 Mbps data rate at 24 GHz

MAC sublayer uses CSMA/CA (carrier sense multiple access with collision avoidance) - very similar to CSMA/CD except collisions are detected by ACKs after entire packets are transmitted

Page 73: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#73EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

802.11 WLAN, Cont..

—Station will listen to channel if ready to transmit

—If channel is idle, begins to transmit

—If channel is busy, will wait until channel is free and transmit after a random time (to reduce collisions)

—In case of collisions, stations will try again following a random exponential back off

Page 74: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#74EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

802.11 WLAN, Cont..

Random exponential back off:

—Stations keep track of contention window parameter, CW

• Initially CW is a minimum value

—When station wants to transmit, it chooses a random (uniformly likely) value between 0 and CW

Page 75: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#75EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

802.11 WLAN, Cont..

—Waits for chosen number of time slots before transmitting

—After each collision, CW is doubled (exponential increase)

X

collisions

tries in oneof 2 slots

Example X X

tries in oneof 4 slots

tries in oneof 8 slots

Page 76: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#76EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

802.11 WLAN, Cont..

Other MAC sublayer functions:

—Optional “point coordination function”: centralized contention-free multiple access for time-sensitive data (a centralized polling mechanism)

—“Association” and “re-association” processes to dynamically establish connections between mobile stations and fixed access points

Page 77: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#77EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

802.11 WLAN, Cont..

—Optional encryption for security

—Power management to allow mobile stations to power down (sleep) without losing data (eg, access point will buffer packets for sleeping stations until requested)

Page 78: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#78EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN

WLANs have small share of LAN market now—Higher costs per station—Standards are recent (HIPERLAN, IEEE

802.11)—Rapid growth is projected

1995 ETSI technical group RES 10 (Radio Equipment and Systems) developed HIPERLAN/1 wireless LAN standards using 5 channels in 5.15-5.3 GHz frequency range—Technical group BRAN (Broadband Radio Access

Network) is standardizing HIPERLAN/2 for wireless ATM

Page 79: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#79EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

HIPERLANs with same radio frequencies might overlap

—Stations have unique node identifiers (NID)

—Stations belonging to same HIPERLAN share a common HIPERLAN identifier (HID)

—Stations of different HIPERLANs using same frequencies cause interference and reduce data transmission capacity of each HIPERLAN

—Packets with different HIDs are rejected to avoid confusion of data

Page 80: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#80EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

Data link layer = logical link control (LLC) sublayer + MAC sublayer + channel access control (CAC) sublayer

data link

physical

LLC

MAC

network

CAC

Page 81: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#81EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

MAC sublayer:—Keeps track of HIPERLAN addresses (HID

+ NID) in overlapping HIPERLANs—Provides lookup service between network

names and HIDs—Converts IEEE-style MAC addresses to

HIPERLAN addresses—Provides encryption of data for security

Page 82: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#82EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

MAC sublayer:—Provides “multi hop routing” – certain

stations can perform store-and-forwarding of frames

—Recognizes user priority indication (for time-sensitive frames)

Page 83: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#83EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

CAC sublayer:—Non-preemptive priority multiple access

(NPMA) gives high priority traffic preference over low priority

—Stations gain access to channel through channel access cycles consisting of 4 phases:

Page 84: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#84EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

CAC sublayer:1. Priority phase: if station has data with

priority N, will wait for N-1 priority slots and transmit “priority assertion” burst in Nth slot

• If it hears another station of higher priority, it will give up on this channel access cycle

•Winning stations of same priority go into next phase

Page 85: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#85EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

2. Elimination phase: each station will transmit a burst of random length (geometrically distributed number of time slots) and see if channel is idle

• If channel is idle, it will go to next phase

• If busy, it will give up on this access cycle

Page 86: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#86EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

3. Yield phase: surviving stations will listen to channel for a random number of time slots (geometrically distributed)

• If it hears another station transmitting, it will give up on this access cycle

• If channel is idle, it will begin to transmit

Page 87: #1EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU Southern Methodist University Fall 2003 EETS 8316/NTU CC745-N Wireless Networks Lecture 8: Mobile Data,

#87EETS 8316/NTU TC 745, Fall 2003 ENGINEERINGSMU

HIPERLAN, Cont..

4. Transmission phase: winning station will transmit

• CAC is designed to give each station (of same priority) equal chance to access the channel