Chapter 6: Wireless and Mobile Networks
Download
Report
Transcript Chapter 6: Wireless and Mobile Networks
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
1
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
2
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
A
6/2/05
3
B
CS118/Spring05
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
6/2/05
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
4
CS118/Spring05
802.11 LAN architecture
802.11b: 2.4GHz-2.485GHz
spectrum divided into 11 channels
at different frequencies; 3 nonoverlapping
Internet
hub, switch
or router
AP
AP
BSS 2
BSS: Basic Service Set
SSID: Service Set Identifier
6/2/05
AP sends beacon frame periodically
BSS 1
AP admin chooses frequency for AP
neighboring APs may choose same
channel–interference
SSID, MAC address
host: must associate with an AP
scan channels, listening for beacon
frames containing AP’s name (SSID)
and MAC address
selects AP to associate with; initiates
association protocol
typically run DHCP to get IP address in
5
CS118/Spring05
AP’s subnet
IEEE 802.11: multiple access
Like Ethernet, uses CSMA:
random access
carrier sense: don’t collide with ongoing transmission
Unlike Ethernet:
no collision detection – transmit all frames to completion
acknowledgment – because without collision detection, you don’t
know if your transmission collided or not
Why no collision detection?
difficult to receive (sense collisions) when transmitting due to weak
received signals (fading)
can’t sense all collisions in any case: hidden terminal, fading
Goal: avoid collisions: CSMA/C(ollision)A(voidance)
6/2/05
6
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
receiver
DIFS
data
SIFS
802.11 receiver
ACK
if frame received OK
- return ACK after SIFS (ACK needed due
to hidden terminal problem)
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 they’re 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
8
CS118/Spring05
Collision Avoidance: RTS-CTS exchange
A
B
AP
reservation collision
DATA (A)
defer
time
6/2/05
9
CS118/Spring05
802.11 frame: addressing
2
2
6
6
6
frame
address address address
duration
control
1
2
3
Address 1: MAC address
of wireless host or AP
to receive this frame
2
6
seq address
4
control
0 - 2312
4
payload
CRC
Address 3: used only
in ad hoc mode
Address 3: MAC address
of router interface to
which AP is attached
Address 2: MAC address
of wireless host or AP
transmitting this frame
6/2/05
10
CS118/Spring05
802.11 frame: addressing
R1 router
H1
Internet
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
frame seq #
(for reliable ARQ)
duration of reserved
transmission time (RTS/CTS)
2
2
6
6
6
frame
address address address
duration
control
1
2
3
2
Protocol
version
2
4
1
Type
Subtype
To
AP
6
2
1
seq address
4
control
1
From More
AP
frag
1
Retry
1
0 - 2312
4
payload
CRC
1
Power More
mgt
data
1
1
WEP
Rsvd
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:
switch will
see frame from H1 and
“remember” which interface
can be used to reach H1
6/2/05
13
router
hub or
switch
BBS 1
AP 1
AP 2
H1
BBS 2
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
foreign agent: entity in
visited network that
performs mobility
functions on behalf of
mobile.
correspondent: wants to
communicate with
mobile
6/2/05
15
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
visited network
home network
1
2
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
home
network
foreign agent receives
packets, forwards to
mobile
visited
network
3
wide area
network
1
2
4
correspondent addresses
packets using home
address of mobile
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
wide area
network
3
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:
permanent
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
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
home
network
4
wide area
network
2
correspondent
requests, receives
foreign address of
mobile
6/2/05
visited
network
3
1
4
mobile replies
directly to
correspondent
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
6/2/05
if mobile moves to another visited network?
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
1
2
4
5
correspondent
agent
new foreign
agent
correspondent
6/2/05
3
24
new
foreign
network
CS118/Spring05