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

Chapter 6: Wireless and Mobile Networks

Cover the following sections only:


6.3:

802.11 wireless LANs 6.5: mobility management: principles


two important (but different) new challenges
communication

over wireless link handling mobile user who changes point of attachment to network

6/2/05

CS118/Spring05

Elements of a wireless network


wireless link typically connecting mobile(s) to base station can also be used as backbone link multiaccess protocol: coordinates link access

Infrastructure mode: basestations connect mobiles to wired networks when moving mobiles change basestations to keep Internet access (handoff)
Wired network infrastructure

Wireless host: may be stationary (non-mobile) or mobile Base station: typically connected to wired network relay - responsible for sending packets between wired network and wireless host(s) in its area 6/2/05

Ad hoc mode: no basestations each node helps forward packets to other node

CS118/Spring05

Wireless Link Characteristics


communication across a point to point wireless link is much more difficult than wired link . decreased signal strength: radio signal attenuates as it propagates through matter (path loss) interference from other sources: standardized wireless network frequencies (e.g., 2.4 GHz) shared by other devices (e.g., phone); devices (motors) interfere as well multipath propagation: radio signal reflects off objects ground, arriving at destination at slightly different times Multiple wireless senders and receivers create additional problems (beyond multiple access): Hidden terminal problem
B, A hear each other B, C hear each other A, C can not hear each other means A, C unaware of their interference at B

C B
CS118/Spring05

A
6/2/05 3

IEEE 802.11 Wireless LAN


802.11b 2.4-5 GHz unlicensed radio spectrum Data rate up to 11 Mbps direct sequence spread spectrum (DSSS) in physical layer widely deployed, using base stations 802.11a 5-6 GHz range up to 54 Mbps 802.11g 2.4-2.5 GHz range up to 54 Mbps All use CSMA/CA for

multiple access All have infrastructure and ad-hoc network versions

6/2/05

CS118/Spring05

802.11 LAN architecture


802.11b: 2.4GHz-2.485GHz
Internet

spectrum divided into 11 channels at different frequencies; 3 nonoverlapping


AP BSS 1

hub, switch or router

AP admin chooses frequency for AP neighboring APs may choose same channelinterference SSID, MAC address

AP sends beacon frame periodically

AP

BSS 2

BSS: Basic Service Set SSID: Service Set Identifier


6/2/05

host: must associate with an AP scan channels, listening for beacon frames containing APs name (SSID) and MAC address selects AP to associate with; initiates association protocol typically run DHCP to get IP address in 5 CS118/Spring05 APs subnet

IEEE 802.11: multiple access


Like Ethernet, uses CSMA: random access carrier sense: dont collide with ongoing transmission Unlike Ethernet: no collision detection transmit all frames to completion acknowledgment because without collision detection, you dont know if your transmission collided or not Why no collision detection? difficult to receive (sense collisions) when transmitting due to weak received signals (fading) cant sense all collisions in any case: hidden terminal, fading Goal: avoid collisions: CSMA/C(ollision)A(voidance)

6/2/05

CS118/Spring05

IEEE 802.11 MAC Protocol: CSMA/CA (1)


802.11 sender 1 if sense channel idle for DIFS then
- transmit entire frame (no CD) 2 if sense channel busy then - start random backoff time - timer counts down while channel idle - transmit when timer expires - if no ACK, increase random backoff interval, repeat 2
sender
DIFS

receiver

data

SIFS

802.11 receiver
if frame received OK - return ACK after SIFS (ACK needed due to hidden terminal problem)

ACK

DIFS: distributed inter-frame spacing SIFS: short inter-frame spacing


6/2/05 7 CS118/Spring05

IEEE 802.11 MAC Protocol: CSMA/CA (2)


Dealing with hidden terminal: idea: allow sender to reserve channel: avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets to AP using CSMA

RTSs may still collide with each other (but theyre short)

AP broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes sender transmits data frame other stations defer transmissions

6/2/05

CS118/Spring05

Collision Avoidance: RTS-CTS exchange


A AP B

reservation collision

DATA (A)

defer

time
6/2/05 9 CS118/Spring05

802.11 frame: addressing


2 2 6 6 6 2
6

0 - 2312
payload

4
CRC

frame address address address duration control 1 2 3

seq address 4 control

Address 1: MAC address of wireless host or AP to receive this frame Address 2: MAC address of wireless host or AP transmitting this frame

Address 3: used only in ad hoc mode Address 3: MAC address of router interface to which AP is attached

6/2/05

10

CS118/Spring05

802.11 frame: addressing


Internet

H1

R1 router

AP

R1 MAC addr H1 MAC addr


dest. address source address

802.3 frame AP MAC addr H1 MAC addr R1 MAC addr


address 1 address 2 address 3

802.11 frame
6/2/05 11 CS118/Spring05

802.11 frame: more


duration of reserved transmission time (RTS/CTS) 2 2 6 6 6 2 frame seq # (for reliable ARQ) 6 0 - 2312
payload

4
CRC

frame address address address duration control 1 2 3

seq address 4 control

2
Protocol version

2
Type

4
Subtype

1
To AP

1
Retry

1
WEP

1
Rsvd

From More AP frag

Power More mgt data

frame type (RTS, CTS, ACK, data)

6/2/05

12

CS118/Spring05

802.11: mobility within same subnet


H1 detects weakening

signal from AP1, scan and find AP2 to attach to H1 remains in same IP subnet: IP address can remain same switch: which AP is associated with H1?
self-learning:

router
hub or switch BBS 1 AP 1 AP 2 H1 BBS 2

switch will see frame from H1 and remember which interface can be used to reach H1
13

6/2/05

CS118/Spring05

Mobility: Vocabulary
home network: permanent home of mobile (e.g., 128.119.40/24) home agent: entity that will perform mobility functions on behalf of mobile, when mobile is remote

wide area network

Permanent address: address in home network, can always be used to reach mobile
e.g., 128.119.40.186
correspondent

correspondent: wants to communicate with mobile


6/2/05 14 CS118/Spring05

Mobility: more vocabulary


Permanent address: remains constant (e.g., 128.119.40.186) visited network: network in which mobile currently resides
(e.g., 79.129.13/24)

Care-of-address: address in visited network. (e.g., 79,129.13.2)

wide area network

correspondent: wants to communicate with mobile


6/2/05 15

foreign agent: entity in visited network that performs mobility functions on behalf of mobile.
CS118/Spring05

Mobility: approaches
Let routing handle it: routers advertise permanent

address of mobile-nodes-in-residence via usual not routing table exchange. scalable


to millions of each mobile located tables indicate where mobiles no changes to end-systems
routing

Let end-systems handle it:


indirect

routing: correspondent sends packets to to home agent, which forwards to mobile direct routing: correspondent gets foreign address of mobile, sends directly to mobile
6/2/05 16 CS118/Spring05

Mobility: registration
home network visited network

wide area network

foreign agent contacts home agent home: this mobile is resident in my network

mobile contacts foreign agent on entering visited network

End result: Foreign agent knows about mobile Home agent knows location of mobile
6/2/05 17 CS118/Spring05

Mobility via Indirect Routing


home agent intercepts packets, forwards to foreign agent
foreign agent receives packets, forwards to mobile

visited network
3

home network
1 correspondent addresses packets using home address of mobile

wide area network


2
4

mobile replies directly to correspondent

Q: Which address will mobile use as source address?


6/2/05 18 CS118/Spring05

Mobility via Indirect Routing: further movement


visited network

home network
3

wide area network

4
2 1

Q: Will the correspondence be aware of mobile's move?


6/2/05 19 CS118/Spring05

Indirect Routing: comments


Mobile uses two addresses:

address: used by correspondent (hence mobile location is transparent to correspondent) care-of-address: used by home agent to forward datagrams to mobile foreign agent functions may be done by mobile itself triangle routing: correspondent-home-network-mobile inefficient when Correspondent & mobile are in same network

permanent

6/2/05

20

CS118/Spring05

Indirect Routing: moving between networks


suppose mobile user moves to another

network
registers

with new foreign agent new foreign agent registers with home agent home agent update care-of-address for mobile packets continue to be forwarded to mobile (but with new care-of-address)
mobility, changing foreign networks

transparent: on going connections can be maintained!


6/2/05 21 CS118/Spring05

Mobility via Direct Routing


correspondent forwards to foreign agent
foreign agent receives packets, forwards to mobile

visited network

home network
2 correspondent requests, receives foreign address of mobile 1

wide area network


3 4 mobile replies directly to correspondent

6/2/05

22

CS118/Spring05

Mobility via Direct Routing: comments


overcome triangle routing problem non-transparent to correspondent:

correspondent must get care-of-address from home agent


what

if mobile moves to another visited network?

6/2/05

23

CS118/Spring05

Accommodating mobility with direct routing


anchor foreign agent: FA in first visited network data always routed first to anchor FA when mobile moves: new FA arranges to have data

forwarded from old FA (chaining)


foreign net visited at session start

wide area network

anchor foreign agent

2 4 3
new foreign agent new foreign network

5
correspondent agent correspondent

6/2/05

24

CS118/Spring05