week9 wireless
TRANSCRIPT
-
7/28/2019 Week9 Wireless
1/24
6/2/05 CS118/Spring051
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
-
7/28/2019 Week9 Wireless
2/24
6/2/05 CS118/Spring052
Elements of a wireless network
Wireless host: may bestationary (non-mobile) ormobile
wireless link
typically connectingmobile(s) to base station
can also be used asbackbone link
multiaccess protocol:coordinates link access
Infrastructure mode:
basestations connect mobiles towired networks
when moving mobiles change
basestations to keep Internet
access (handoff)
Wired networkinfrastructure
Ad hoc mode:
no basestations
each node helps
forward packetsto other node
Base station:
typically connected to wired network
relay - responsible for sending packets
between wired network and wirelesshost(s) in its area
-
7/28/2019 Week9 Wireless
3/24
6/2/05 CS118/Spring053
Wireless Link Characteristicscommunication across a point to point wireless link is much more
difficult than wired link .
decreased signal strength: radio signal attenuates as it propagatesthrough matter (path loss)
interference from other sources: standardized wireless networkfrequencies (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
A B
C
-
7/28/2019 Week9 Wireless
4/24
6/2/05 CS118/Spring054
IEEE 802.11 Wireless LAN
802.11b 2.4-5 GHz unlicensed
radio spectrum
Data rate up to 11 Mbps
direct sequence spreadspectrum (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 formultiple access
All have infrastructureand ad-hoc networkversions
-
7/28/2019 Week9 Wireless
5/24
6/2/05 CS118/Spring055
802.11 LAN architecture 802.11b: 2.4GHz-2.485GHz
spectrum divided into 11 channels
at different frequencies; 3 non-
overlapping
AP admin chooses frequency for AP
neighboring APs may choose same
channelinterference
AP sends beacon frame periodically
SSID, MAC address
host: must associate with an AP
scan channels, listening forbeaconframescontaining APs name (SSID)
and MAC address
selects AP to associate with; initiates
association protocol
typically run DHCP to get IP address inAPs subnet
BSS 1
BSS 2
Internet
hub, switch
or routerAP
AP
BSS: Basic Service Set
SSID: Service Set Identifier
-
7/28/2019 Week9 Wireless
6/24
6/2/05 CS118/Spring056
IEEE 802.11: multiple access
Like Ethernet, uses CSMA:
random access
carrier sense: dont collide with ongoing transmission
Unlike Ethernet:
no collision detectiontransmit all frames to completion
acknowledgmentbecause 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)
-
7/28/2019 Week9 Wireless
7/24
6/2/05 CS118/Spring057
IEEE 802.11 MAC Protocol: CSMA/CA (1)
802.11 sender
1 if sense channel idle forDIFS then- transmit entire frame (no CD)
2 ifsense channel busy then
- start random backoff time
- timer counts down while channel idle- transmit when timer expires
- if no ACK, increase random backoffinterval, repeat 2
802.11 receiverif frame received OK
- return ACK afterSIFS (ACK needed dueto hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
DIFS: distributed inter-frame spacing
SIFS: short inter-frame spacing
-
7/28/2019 Week9 Wireless
8/24
6/2/05 CS118/Spring058
IEEE 802.11 MAC Protocol: CSMA/CA (2)
Dealing with hidden terminal:
idea: allow sender to reserve channel: avoid collisions of longdata frames
sender first transmits small request-to-send (RTS) packets to APusing 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
-
7/28/2019 Week9 Wireless
9/246/2/05 CS118/Spring059
Collision Avoidance: RTS-CTS exchange
APA B
time
DATA (A)
reservation collision
defer
-
7/28/2019 Week9 Wireless
10/246/2/05 CS118/Spring0510
frame
controlduration
address
1
address
2
address
4
address
3payload CRC
2 2 6 6 6 2 6 0 - 2312 4
seq
control
802.11 frame: addressing
Address 2: MAC addressof wireless host or APtransmitting this frame
Address 1: MAC addressof wireless host or APto receive this frame
Address 3: MAC addressof router interface towhich AP is attached
Address 3: used onlyin ad hoc mode
-
7/28/2019 Week9 Wireless
11/246/2/05 CS118/Spring0511
Internetrouter
AP
H1 R1
AP MAC addr H1 MAC addr R1 MAC addr
address 1 address 2 address 3
802.11 frame
R1 MAC addr H1 MAC addr
dest. address source address
802.3frame
802.11 frame: addressing
-
7/28/2019 Week9 Wireless
12/246/2/05 CS118/Spring0512
frame
controlduration
address
1
address
2
address
4
address
3payload CRC
2 2 6 6 6 2 6 0 - 2312 4
seq
control
TypeFrom
APSubtype
To
AP
More
fragWEP
More
data
Power
mgtRetry Rsvd
Protocol
version
2 2 4 1 1 1 1 1 11 1
802.11 frame: more
duration of reservedtransmission time (RTS/CTS)
frame seq #
(for reliable ARQ)
frame type(RTS, CTS, ACK, data)
-
7/28/2019 Week9 Wireless
13/246/2/05 CS118/Spring0513
hub orswitch
AP 2
AP 1
H1 BBS 2
BBS 1
802.11: mobility within same subnet
router
H1 detects weakeningsignal from AP1, scan and
find AP2 to attach to
H1 remains in same IP
subnet: IP address canremain same
switch: which AP is
associated with H1?self-learning: switch will
see frame from H1 and
remember which interface
can be used to reach H1
-
7/28/2019 Week9 Wireless
14/246/2/05 CS118/Spring0514
Mobility: Vocabulary
home network:
permanent home of
mobile (e.g., 128.119.40/24)
Permanent address:
address in home network,can always be used to
reach mobilee.g., 128.119.40.186
home agent: entity that
will perform mobility
functions on behalf ofmobile, when mobile is
remote
wide area
network
correspondent
correspondent: wants to
communicate with mobile
-
7/28/2019 Week9 Wireless
15/246/2/05 CS118/Spring0515
Mobility: more vocabulary
Care-of-address: address in
visited network. (e.g., 79,129.13.2)
wide area
network
visited network: network in
which mobile currently resides(e.g., 79.129.13/24)
Permanent address: remains
constant (e.g., 128.119.40.186)
foreign agent: entity in
visited network that
performs mobility
functions on behalf of
mobile.
correspondent: wants to
communicate with
mobile
-
7/28/2019 Week9 Wireless
16/246/2/05 CS118/Spring0516
Let routing handle it: routers advertise permanentaddress of mobile-nodes-in-residence via usual
routing table exchange.
routing tables indicate where each mobile located
no changes to end-systems
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
Mobility: approaches
not
scalable
to millions of
mobiles
-
7/28/2019 Week9 Wireless
17/246/2/05 CS118/Spring0517
Mobility: registration
End result:
Foreign agent knows about mobile
Home agent knows location of mobile
wide area
network
home network visited network
1
mobile contactsforeign agent onentering visitednetwork
2
foreign agent contacts homeagent home: this mobile isresident in my network
-
7/28/2019 Week9 Wireless
18/246/2/05 CS118/Spring0518
Mobility via Indirect Routing
wide area
networkhomenetwork
visited
network
3
2
41
correspondent addresses
packets using home
address of mobile
home agent interceptspackets, forwards to foreign
agent
foreign agent receives
packets, forwards to
mobile
mobile repliesdirectly tocorrespondent
Q: Which address will
mobile use as source
address?
-
7/28/2019 Week9 Wireless
19/246/2/05 CS118/Spring0519
Mobility via Indirect Routing: further movement
wide area
networkhomenetwork
visited
network
2
3
1
4
Q: Will the correspondence be aware of mobile's move?
-
7/28/2019 Week9 Wireless
20/246/2/05 CS118/Spring0520
Indirect Routing: comments
Mobile uses two addresses:
permanent address: used by correspondent (hencemobile location is transparentto 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
-
7/28/2019 Week9 Wireless
21/246/2/05 CS118/Spring0521
Indirect Routing: moving between networks
suppose mobile user moves to anothernetwork
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 (butwith new care-of-address)
mobility, changing foreign networkstransparent: on going connections can bemaintained!
-
7/28/2019 Week9 Wireless
22/246/2/05 CS118/Spring0522
Mobility via Direct Routing
wide area
network
homenetwork
visitednetwork
4
2
41correspondentrequests, receives
foreign address ofmobile
correspondent forwardsto foreign agent
foreign agentreceives packets,forwards to mobile
mobile repliesdirectly tocorrespondent
3
-
7/28/2019 Week9 Wireless
23/246/2/05 CS118/Spring0523
Mobility via Direct Routing: comments
overcome triangle routing problemnon-transparent to correspondent:
correspondent must get care-of-address from
home agentwhat if mobile moves to another visited network?
-
7/28/2019 Week9 Wireless
24/24
wide areanetwork
1
foreign net visited
at session startanchor
foreign
agent2
4
new foreign
agent
35
correspondent
agentcorrespondent
new
foreign
network
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 dataforwarded from old FA (chaining)