Download - Chapter 6
INFO 331 Chapter 6 1
INFO 331Computer Networking
Technology II
Chapter 6
Wireless Networking
Glenn Booker
INFO 331 Chapter 6 2
Wireless & Mobile Networks
The number of mobile devices has grown immensely in the last few years Over 2 billion cell phones worldwide [ITU] as of
2005, many now Internet-aware Increasing numbers of laptops, palmtops, PDAs,
and other mobile networked devices Distinguish between wireless connectivity
and the mobility that affords Some wireless devices are stationary
INFO 331 Chapter 6 3
Wireless & Mobile Networks
Challenges for this context include Establishing and maintaining a wireless
connection Handing off a wireless client from one part of the
network to another Some terminology
Wireless host is the end user’s device connected to the network
Wireless links are analogous to the wired variety
INFO 331 Chapter 6 4
Terminology
A base station communicates with the wireless hosts; e.g. cell towers for cell phones, and access points for wireless computers Base stations connect to the rest of the network,
either through wired or other wireless links Infrastructure versus ad hoc mode
When a wireless host connects in infrastructure mode, it relies on the network for address resolution, routing, etc.
In ad hoc mode, the host performs those functions
INFO 331 Chapter 6 5
Terminology
When a host changes from one base station to another, the change of attachment is a handoff
Can categorize wireless networks by the number of wireless hops (one or more), and whether it uses infrastructure (e.g. a base station) Single hop, with infrastructure – is typical of a
local wireless connection to a wired network
INFO 331 Chapter 6 6
Terminology
Single hop, no infrastructure – like Bluetooth or ad hoc 802.11 networks
Multi-hop, with infrastructure – needs a wireless relay to get to the wired world, like a wireless mesh network
Multi-hop, no infrastructure – typically has mobile nodes as well as hosts; MANETs (mobile ad hoc networks) and vehicle versions, VANETs are in this category
INFO 331 Chapter 6 7
Wireless Links
If a simple wired Ethernet link is replaced by a wireless connection The hub or switch would be replaced by an
access point The host needs a wireless network card The Ethernet cable goes in the closet
So how does this affect service?
INFO 331 Chapter 6 8
Wireless Links Problems
Key impacts of changing to wireless are Decreasing signal strength with distance from the
access point Interference from other sources in the same
frequency range Multipath propagation – signals can bounce
around, giving echoes (like talking at edge of Grand Canyon)
This results in much higher, and more variable, bit error rates for wireless links
INFO 331 Chapter 6 9
Wireless Links Problems
AB
C
Hidden terminal problem B, A hear each other B, C hear each other A, C can not hear each othermeans A, C unaware of their
interference at B
AB
C
AB
C
Hidden terminal problem B, A hear each other B, C hear each other A, C can not hear each othermeans A, C unaware of their
interference at B
A B C
A’s signalstrength
space
C’s signalstrength
Signal f ading: B, A hear each other B, C hear each other A, C can not hear each other
interfering at B
A B C
A’s signalstrength
space
C’s signalstrength
A B CA B C
A’s signalstrength
space
C’s signalstrength
Signal f ading: B, A hear each other B, C hear each other A, C can not hear each other
interfering at B
Images from Kurose’s slides
INFO 331 Chapter 6 10
CDMA
Last term we covered three approaches to sharing links (multiple access) Channel partitioning (TDM and FDM) Random access protocols (ALOHA & CSMA) Taking turns protocols (polling or token ring)
Here we need another type of multiple access protocol – Code Division Multiple Access (CDMA)
INFO 331 Chapter 6 11
CDMA
In CDMA, the original data stream is multiplied by a code which changes much faster than the data, the chipping rate In the following example, for every bit of incoming
data, the code has eight values (11101000) The data*code product is sent over the link The receiver undoes the code, and recovers the
original signal
INFO 331 Chapter 6 12
CDMA Example
slot 1 slot 0
d1 = -1
1 1 1 1
1- 1- 1- 1-
Zi,m= di.cm
d0 = 1
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 11
1-1- 1- 1-
slot 0channeloutput
slot 1channeloutput
channel output Zi,m
sendercode
databits
slot 1 slot 0
d1 = -1d0 = 1
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 11
1-1- 1- 1-
slot 0channeloutput
slot 1channeloutputreceiver
code
receivedinput
Di = Zi,m.cmm=1
M
M
slot 1 slot 0
d1 = -1
1 1 1 1
1- 1- 1- 1-
d1 = -1
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1-1- 1-1- 1-1- 1-1-
Zi,m= di.cm
d0 = 1
1 1 1 1
1- 1- 1- 1-
d0 = 1
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1-1- 1-1- 1-1- 1-1-
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1-1- 1-1- 1-1- 1-1-
1 1 11
1-1- 1- 1-
1 1 11 1 11
1-1- 1- 1-
11
1-1-1-1- 1- 1-1-1- 1-1- 1-1-
slot 0channeloutput
slot 1channeloutput
channel output Zi,m
sendercode
databits
slot 1 slot 0
d1 = -1d1 = -1d0 = 1d0 = 1
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1-1- 1-1- 1-1- 1-1-
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1-1- 1-1- 1-1- 1-1-
1 1 1 1
1- 1- 1- 1-
1 1 11
1-1- 1- 1-
1 1 1 1
1- 1- 1- 1-
1 1 1 1
1-1- 1-1- 1-1- 1-1-
1 1 11
1-1- 1- 1-
1 1 11 1 11
1-1- 1- 1-
11
1-1-1-1- 1- 1-1-1- 1-1- 1-1-
slot 0channeloutput
slot 1channeloutputreceiver
code
receivedinput
Di = Zi,m.cmm=1
M
M
Di = Zi,m.cmm=1
M
M
INFO 331 Chapter 6 13
CDMA
So how does this help?? Interfering signals add onto the signal you
want to receive If the code is chosen properly, the desired
signal can be picked out of the sum of your signal plus garbage
It’s kind of like being able to follow one conversation in a crowded room
INFO 331 Chapter 6 14
802.11 LAN Protocols
The WiFi or 802.11 protocols are used for local wireless networks
802.11a and 802.11g are most common currently Both provide service at up to 54 Mbps 802.11a operates at 5.8 GHz, 802.11g at 2.4 GHz
All use CSMA/CA as their medium access protocol, and have the same frame structure
INFO 331 Chapter 6 15
802.11 LAN Protocols
INFO 331 Chapter 6 16
802.11 LAN Protocols
All 802.11 protocols can slow themselves down for longer distances, or to deal with interference
All can use infrastructure or ad hoc mode They differ at the physical layer
INFO 331 Chapter 6 17
802.11 LAN Protocols
Both 2.4 (for .11b and g) and 5.8 GHz (.11a) frequency ranges have disadvantages 2.4 GHz has more interference from cell phones
and microwave ovens 5.8 GHz needs more power for a given distance,
and suffers more from multipath propagation Notice each band is a range of frequencies
(technically 2.4 – 2.485 and 5.1 – 5.8 GHz); typically have 11 channels in that range
INFO 331 Chapter 6 18
802.11 LAN Protocols
802.11n is being standardized Uses two or more antennae to send and receive,
and should be over 100 Mbps What wavelength are the 802.11 bands?
= c = 3E10 cm/s = c/
For 2.4 GHz, = 3E10 cm/s / 2.4E9 s-1 = 12.5 cm For 5.8 GHz, = 3E10 cm/s / 5.8E9 s-1 = 5.2 cm
INFO 331 Chapter 6 19
802.11 Architecture
A basic service set (BSS) is an access point (base station) and one or more wireless hosts
The access points for various BSSs are connected to each other via hubs, switches, or routers
Every wireless adapter has a 6 byte MAC address, and the access point has a MAC address Again, MAC addresses are managed by IEEE
INFO 331 Chapter 6 20
802.11 Architecture
BSS 1
BSS 2
I nternet
hub, switchor routerAP
AP
BSS 1
BSS 2
I nternetI nternet
hub, switchor routerAPAP
APAP
INFO 331 Chapter 6 21
802.11 Architecture
In infrastructure mode, the access points are essential elements
In ad hoc mode, there are no access points, and wireless devices communicate independently This could be used to network with another laptop
directly, for example The outside world isn’t visible in ad hoc mode
INFO 331 Chapter 6 22
Channels & Association
In infrastructure mode, need to associate with an access point before data can be sent or received
Each access point is given a Service Set Identifier (SSID), and channel The SSID is a readable name, like ‘sixflags-router’ Channels 1-11 are available, but only channels
1, 6, and 11 are non-overlapping
INFO 331 Chapter 6 23
It’s a jungle out there!
A Wi-Fi jungle is when you can choose from multiple access points (APs), possibly using the same channels Could occur downtown, where many cafés and
local networks could intersect How tell the networks (APs) apart?
Each AP sends out beacon frames periodically, with the AP’s SSID and MAC address
You choose which AP with which to associate
INFO 331 Chapter 6 24
After association
Once an AP has been selected for association, generally DHCP is used to get an IP address, find DNS servers, etc.
To be allowed to associate, might have to authenticate the host Can specify which MAC addresses are allowed
to associate May require logging into the network, which might
verify identity with a Radius or Diameter server
INFO 331 Chapter 6 25
802.11 Multiple Access Control
Ethernet has been very successful Recall it used CSMA/CD – carrier sense multiple
access with collision detection Wait for a pause in traffic before transmitting, and
sense when a collision occurs 802.11 uses a variation of this – CSMA/CA
Collision avoidance instead of detection Also adds link-layer acknowledgement &
retransmission (ARQ)
INFO 331 Chapter 6 26
802.11 Collision Avoidance
Why no collision detection? It requires ability to send and receive at the same
time - here the received signal is weak compared to the sent signal, so it’s expensive to make hardware to do this
The hidden terminal problem and fading make it impossible to detect all collisions
So 802.11 always transmits a full frame Unlike Ethernet, it won’t stop mid-transmission
INFO 331 Chapter 6 27
802.11 ARQ
To transmit data from a sender to a receiver: Sender waits a short time period DIFS (distributed
inter-frame spacing) Sender transmits the data using CSMA/CA Data gets to receiver Receiver validates integrity of data with CRC Waits a time SIFS (short inter-frame spacing) The receiver sends an ACK
INFO 331 Chapter 6 28
802.11 ARQsender receiver
DI FS
data
SI FS
ACK
sender receiver
DI FS
data
DI FSDI FS
datadata
SI FS
ACK
SI FS
ACKACK
INFO 331 Chapter 6 29
802.11 ARQ
802.11 uses CRC to check for bit errors You recall the cyclic redundancy check, right?
If channel is busy when a transmission is ready Wait a random time of idle channel, and transmit
when the channel is idle; don’t count down when the channel is busy
Why? This avoids collisions when multiple hosts are waiting for a clear channel
INFO 331 Chapter 6 30
802.11 ARQ
So in wireless communication, it’s all about AVOIDING COLLISIONS!
If the source doesn’t get an ACK within some time, it retransmits
If some number of retransmissions aren’t ACKed, discard the frame
INFO 331 Chapter 6 31
802.11 Reservation Scheme
There is an optional scheme to avoid collision even when there are hidden hosts
It’s very polite – each host asks for permission to transmit Sort of like the polling protocols
Sender sends a request to send (RTS) frame to the AP
AP broadcasts a Clear to Send (CTS) frame to reserve use of channel by that sender
INFO 331 Chapter 6 32
802.11 Reservation Scheme
Sender then transmits exclusively during that time period – other hosts know from getting the CTS to be quiet
This is very effective at avoiding collisions, but has time overhead to exchange RTS and CTS messages Often used for sending large data files May establish a threshold, so that only files larger
than threshold are allowed to use RTS/CTS
INFO 331 Chapter 6 33
802.11 point-to-point
Using directional antennae, the 802.11 protocols can be used up to 80 kilometers of distance This was done in India, for example
INFO 331 Chapter 6 34
802.11 Frames
A frame in 802.11 consists of 34 bytes of header and trailer, plus 0 to 2312 bytes of data (payload) Data generally limited to 1500 bytes due to
Ethernet limit Data is usually an IP datagram or ARP packet
INFO 331 Chapter 6 35
802.11 Frame Fields
Frame control (2 B, shown on next slide) Duration (2 B) for timeout or CTS period Address 1 (6 B) MAC of destination node Address 2 (6 B) MAC of transmitting node Address 3 (6 B) MAC of router leaving this BSS Sequence control (2 B) just like in TCP Address 4 (6 B) used only for ad hoc networks Payload (data) (0-2132 B) CRC code (4 B) [size verified here]
INFO 331 Chapter 6 36
802.11 Frames
framecontrol
durationaddress
1address
2address
4address
3payload CRC
2 2 6 6 6 2 6 0 - 2312 4
seqcontrol
TypeFromAP
SubtypeToAP
More frag
WEPMoredata
Powermgt
Retry RsvdProtocolversion
2 2 4 1 1 1 1 1 11 1
duration of reserved transmission time (RTS/ CTS)
f rame seq #(for reliable ARQ)
f rame type(RTS, CTS, ACK, data)
framecontrol
durationaddress
1address
2address
4address
3payload CRC
2 2 6 6 6 2 6 0 - 2312 4
seqcontrol
framecontrol
durationaddress
1address
2address
4address
3payload CRC
2 2 6 6 6 2 6 0 - 2312 4
seqcontrol
TypeFromAP
SubtypeToAP
More frag
WEPMoredata
Powermgt
Retry RsvdProtocolversion
2 2 4 1 1 1 1 1 11 1
TypeFromAP
SubtypeToAP
More frag
WEPMoredata
Powermgt
Retry RsvdProtocolversion
2 2 4 1 1 1 1 1 11 1
duration of reserved transmission time (RTS/ CTS)
f rame seq #(for reliable ARQ)
f rame type(RTS, CTS, ACK, data)
bits
bytes
INFO 331 Chapter 6 37
802.11 Frame Fields
The sizes for frame control parts are in bits (total 16 bits = 2 bytes) The Type field also distinguishes association
frames from normal data frames WEP is an encryption mode
The duration field can be the timeout interval, or the time for a clear to send (CTS)
Address 3 is critical for communicating across wireless networks
INFO 331 Chapter 6 38
802.11 Frame Fields
Sequence numbers are also used to tell multipath echoes apart, in addition to detecting retransmissions
Address 4 is only used for ad hoc networks The CRC field (4 B, not 2) is particularly
important, since there is a large chance of bit errors
We’ll ignore the other fields for now
INFO 331 Chapter 6 39
Mobility within subnet
If a host moves between BSS’ within the same subnet (i.e. they are not connected by a router), it’s relatively easy for the handoff from one AP to another to occur
If the BSS’ are connected by a hub, there’s no problem – the host disassociates from one AP and associates with another
INFO 331 Chapter 6 40
Mobility within subnet
If the BSS’ are connected by a switch, the self-learning features of switches is too slow to keep up well The new AP has to send a broadcast Ethernet
message to update the switch with the new association
An 802.11f standards group was working on this issue – standard was withdrawn 2/06
INFO 331 Chapter 6 41
Advanced 802.11 Features
802.11 hints at supporting added features Adapt transmission rate, depending on the SNR
(signal to noise ratio) and other channel characteristics (e.g. lost frames)
Power management, by limiting the time various functions are on; done by putting itself to sleep It can tell its access point it’s asleep, so frames aren’t
sent to it until it wakes up!
INFO 331 Chapter 6 42
802.15 WPAN
The 802.11 standards are designed for wireless communication up to 100 meters
The 802.15 wireless personal area network (WPAN) is for ad hoc wireless networking with a range of about 10 meters
Based on Bluetooth, it’s designed to handle up to eight ‘active’ local devices near a host in a piconet, controlled by a master node
INFO 331 Chapter 6 43
802.15 WPAN
The master node decides which devices are active or parked Can have up to 255 parked devices
Operates at 2.4 GHz using TDM with slot of 625 s, and 79 channels
Hops randomly across channels (frequency-hopping spread spectrum, or FHSS)
Data rates up to 721 kbps
INFO 331 Chapter 6 44
WiMAX
WiMAX is world interoperability for microwave access, IEEE 802.16
It uses a base station to coordinate sending and receiving packets, similar to 802.11 infrastructure mode, using TDM
Each frame defines the physical layer properties for later packets; hence the transmission approach can change to get the best reception possible
INFO 331 Chapter 6 45
WiMAX
The transmission time allocated to each subscriber can be controlled
WiMAX uses a connection identifier in the packet to allow quality of service (QoS) to be customized MAC addresses are mapped to the connection
identifiers WiMAX is a complex beast, and is changing
rapidly
INFO 331 Chapter 6 46
Cellular Internet Access
Since Wi-Fi is limited to about 100 meters, how do we connect to the Internet when far from an access point? Use your cell phone!
Key concerns are: Is it fast? Is it reliable? Is it going to be better than a long distance
wireless LAN?
INFO 331 Chapter 6 47
Cellular Architecture
Cellular architecture is broken into … cells Each cell is a geographic area served by a
cell tower, which routes through a mobile switching center (MSC) Acts like a switching center or central office
The center is connected to the Internet directly, and/or the phone system (Public Switched Telephone Network)
INFO 331 Chapter 6 48
Cellular Architecture
Mobile Switching
Center
Public telephonenetwork, andI nternet
Mobile Switching
Center
connects cells to wide area net manages call setup (more later!) handles mobility (more later!)
MSC
covers geographical region base station (BS) analogous to 802.11 AP mobile users attach to network through BS air-interf ace:physical and link layer protocol between mobile and BS
cell
wired network
Mobile Switching
Center
Public telephonenetwork, andI nternet
Mobile Switching
Center
Mobile Switching
Center
Mobile Switching
Center
Public telephonenetwork, andI nternet
Mobile Switching
Center
Mobile Switching
Center
connects cells to wide area net manages call setup (more later!) handles mobility (more later!)
MSC connects cells to wide area net manages call setup (more later!) handles mobility (more later!)
MSCMSC
covers geographical region base station (BS) analogous to 802.11 AP mobile users attach to network through BS air-interf ace:physical and link layer protocol between mobile and BS
cell covers geographical region base station (BS) analogous to 802.11 AP mobile users attach to network through BS air-interf ace:physical and link layer protocol between mobile and BS
cellcell
wired networkwired network
INFO 331 Chapter 6 49
Sharing Frequencies
Each cell tower handles many calls simultaneously, so multiple access protocols are needed Combined FDM and TDM CDMA (code division, not carrier sense)
INFO 331 Chapter 6 50
Cell Technology Generations
The standards used for communication between cell phones and cell towers are grouped by the generation of technology involved
First Generation (G1) was the analog FDMA phone, now essentially dead in the US
Second Generation (G2) was the start of digital phone service
INFO 331 Chapter 6 51
Second Generation
Second generation cell phones used IS-136, a combined FDM/TDM derived from
FDMA GSM, a European-initiated FDM/TDM, now widely
used in North America IS-95, a CDMA-based approach from Qualcomm
To bridge the gap to third generation, generation 2.5 was developed
INFO 331 Chapter 6 52
Generation 2.5
Generation 2.5 includes GPRS, an upgrade from GSM which uses circuit
switching (slow and inefficient for Internet); max data rate only 9.6 kbps
EDGE, was to replace GSM/GPRS and crank data rate up to 384 kbps
CDMA2000, an upgrade of IS-95 to get up to 144.4 kbps, also called 1xRTT
INFO 331 Chapter 6 53
3G
3G cell technology claims at least 2 Mbps indoors, and 384 kbps outdoors
Is really UMTS/HSDPA, but that’s too long! Runs on multiple frequencies: 850, 1900, and
2100 MHz*
* http://hspa.gsmworld.com/ and http://www.apple.com/iphone/specs.html
INFO 331 Chapter 6 54
Generations 3 and 4
Third generation cellular technology includes UMTS, a GSM upgrade by Cingular and T-mobile
to get realistic speeds of 300-400 kbps More CDMA2000 variations, such as EV-DO and
EV-DV, aiming for peak speeds of 2.4 Mbps Generation 4 might see WiMax take over the
cell phone wars, possibly in conjunction with the 3G cell standards
Next slide is c*net’s view of cell technology
INFO 331 Chapter 6 55
Cellular Internet Technologies
From cnet. See handout for definitions.
Services and speeds
Generation Technology Speeds Features
1G AMPS n/a Analog (voice only)
2G GSM CDMA iDen
Less than 20Kbps
Voice; SMS; conference calls; caller ID; push to talk
2.5G GPRS 1xRTT EDGE
30Kbps to 90Kbps
MMS; images; Web browsing; short audio/video clips; games, applications, and ring tone downloads
3G UMTS 1xEV-DO
144Kbps to 2Mbps
Full-motion video; streaming music; 3D gaming; faster Web browsing
3.5G HSDPA (upgrade for UMTS) 1xEV-DV
384Kbps to 14.4Mbps
On-demand video; videoconferencing
4G and beyond WiMax* 100Mbps to 1Gbps
High-quality streaming video; high-quality videoconferencing; Voice-over-IP telephony
*WiMax has been mentioned as a possible 4G technology, but no standards have been set.
INFO 331 Chapter 6 56
4G and Beyond
We’d like to see cell and wireless IP technologies merge so we can take the best connection speed available, keep a TCP connection when we move around, support real time voice and video over IP, and be available anywhere
Oddly enough, it isn’t that far away…
INFO 331 Chapter 6 57
Mobility Management
That concludes addressing the wireless aspect of networking
Now, how do we handle a host moving from one part of the network to another? From the network layer, a laptop that moves
around in one subnet isn’t mobile From the link layer, if they stay keep using one
access point, they aren’t mobile
INFO 331 Chapter 6 58
What is mobile?
Does a user connect separately at different parts of the network, or need to maintain a connection while moving?
Does their IP address need to be the same? What wired infrastructure is available?
INFO 331 Chapter 6 59
Mobility Terms
Your home network is the network you started in Your first hop router is a home agent
While moving, you are in a foreign or visited network Your first hop router is a foreign agent
You want to communicate with a correspondent
INFO 331 Chapter 6 60
Mobility Terms
Home agent in home network
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)
f oreign agent: entity in visited network that performs mobility f unctions on behalf of mobile.
correspondent: wants to communicate with mobile
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)
f oreign agent: entity in visited network that performs mobility f unctions on behalf of mobile.
correspondent: wants to communicate with mobile
INFO 331 Chapter 6 61
Addressing
As hinted in the previous slide, addressing is a key concern
How does the visited network indicate the home host is there? Could update routing tables to indicate that
particular address is in the visited network But what about when 1000’s of users are mobile?
Routing tables would get huge & hard to maintain
INFO 331 Chapter 6 62
Addressing
Instead, push mobility concerns to the edge of the network – the edge routers Let the home agent keep track of the permanent
(home) address, and the foreign address A care-of-address (COA) is the address of the
foreign agent of the host The COA is used to re-route datagrams to the
foreign agent, who then passes them to the host Use this via indirect or direct routing
INFO 331 Chapter 6 63
Indirect Routing
We could blindly forward datagrams to the home agent Let it change the address to the COA/foreign
agent The foreign agent sends them to the host
It works, but it’ll take a while The home agent needs to encapsulate the
datagram to get to the COA, who then unwraps it This is like tunneling for IPv6
INFO 331 Chapter 6 64
Indirect Routing
wide area network
homenetwork
3
2
41
correspondent addresses packets using home address of mobile
home agent intercepts packets, f orwards to f oreign agent
foreign agent receives packets, f orwards to mobile
mobile replies directly to correspondent
wide area network
homenetwork
333
222
444111
correspondent addresses packets using home address of mobile
correspondent addresses packets using home address of mobile
home agent intercepts packets, f orwards to f oreign agent
home agent intercepts packets, f orwards to f oreign agent
foreign agent receives packets, f orwards to mobile
foreign agent receives packets, f orwards to mobile
mobile replies directly to correspondent
mobile replies directly to correspondent
INFO 331 Chapter 6 65
Indirect Routing
So for indirect routing, we need A mobile node to foreign agent protocol A foreign agent to home agent protocol A home agent encapsulation protocol A foreign agent de-encapsulation protocol
Every time the node moves to a new foreign agent, it has to register its presence (association) and update its home agent
Is used in the mobile IP standard (RFC 3344)
INFO 331 Chapter 6 66
Direct Routing
Direct routing avoids the inefficiency inherent in indirect routing The correspondent goes through a corresponding
agent (router), who learns the COA of the node Then the corresponding agent sends data directly
to the COA Need a mobile-user location protocol, to get
the COA from the home agent
INFO 331 Chapter 6 67
Direct Routing
wide area network
homenetwork 4
2
41correspondent requests, receives f oreign address of mobile
correspondent f orwards to f oreign agent
foreign agent receives packets, f orwards to mobile
mobile replies directly to correspondent
3
wide area network
homenetwork 44
22
4411correspondent requests, receives f oreign address of mobile
correspondent f orwards to f oreign agent
foreign agent receives packets, f orwards to mobile
foreign agent receives packets, f orwards to mobile
mobile replies directly to correspondent
mobile replies directly to correspondent
33
INFO 331 Chapter 6 68
Direct Routing
But how update the corresponding agent if the node’s COA changes during a session? Use an anchor foreign agent (the first foreign
agent used) to keep track of the current COA Then if the node is out of the anchor’s network,
encapsulate it and forward to the current foreign agent
A little tedious, but probably more efficient than indirect routing
INFO 331 Chapter 6 69
Mobile IP
How mobile IP addresses can be handled is a huge topic
RFC 3344, hinted earlier, defines many allowable approaches With or without foreign agents How agents and nodes can discover each other Single or multiple COAs Many forms of encapsulation
INFO 331 Chapter 6 70
Mobile IP
The three key functions of mobile IP are Discovery - how agents and nodes advertise
their presence to each other Registration – how nodes and agents register
and deregister COAs with one’s home agent Indirect routing – how home agents can reroute
datagrams, with forwarding rules, error handling, and different forms of encapsulation
INFO 331 Chapter 6 71
Agent Discovery
A node arriving at a new network needs to identify the network This is called agent discovery
Two ways to do this are agent advertisement or agent solicitation
Agent advertisement is when the agent broadcasts its services over ICMP (type 9, router discovery)
INFO 331 Chapter 6 72
Agent Advertisement
The broadcast gives the IP address of the router (agent) and: Whether the agent is willing to act as a home
and/or foreign agent (H or F bits) If registration is needed before you can get a
COA in a foreign network (R bit) If other forms of encapsulation is needed
(M or G bits) COA data (one or more COA addresses)
INFO 331 Chapter 6 73
Agent Advertisement
RBHFMGV bits reserved
type = 16
type = 9 code = 0 = 9
checksum = 9
router address
standard ICMP fields
mobility agent advertisement
extension
length sequence #
registration lifetime
0 or more care-of-addresses
0 8 16 24
INFO 331 Chapter 6 74
Agent Solicitation
Agent solicitation is used when a node wants to find agents without waiting for advertisements Solicitations are ICMP messages with type = 10
When an agent gets a solicitation, it responds directly to the node, and registration proceeds normally from there
INFO 331 Chapter 6 75
Registration with home agent
When a mobile node gets a COA, that address must be registered with its home agent (router)
This could be done by the foreign agent, or by the node
In the former case, there are four steps
INFO 331 Chapter 6 76
Registration with home agent
1. Node sends registration message to foreign agent (over UDP, port 434)
2. Foreign agent gets message, records node’s permanent IP address, and sends registration message (UDP/434) to home agent
3. Home agent verifies the message, and connects node’s permanent IP to the COA
4. Foreign agent gets registration reply, and forwards it to the mobile node
INFO 331 Chapter 6 77
Registration with home agent
visited network: 79.129.13/ 24 home agent
HA: 128.119.40.7 f oreign agent
COA: 79.129.13.2 COA: 79.129.13.2
….
I CMP agent adv. Mobile agent
MA: 128.119.40.186
registration req.
COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification:714 ….
registration req.
COA: 79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification: 714 encapsulation format ….
registration reply
HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 encapsulation format ….
registration reply
HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 ….
time
INFO 331 Chapter 6 78
Registration with home agent
When registration is complete, the node can get data sent to its permanent address via the new COA The actual registration lifetime granted (in
seconds) is less than that requested The identification number acts like a sequence
number, to match reply with its request Deregistering a COA isn’t needed, since it
will be overwritten by a new COA
INFO 331 Chapter 6 79
Managing Cellular Mobility
For contrast to IP networks, let’s peek at how cellular networks manage handing off a connection
Look at the GSM architecture, since it’s a mature example It follows an indirect approach The home network is officially called the home
public land mobile network (PLMN) The foreign network is here a visited network
INFO 331 Chapter 6 80
Managing Cellular Mobility
The home network maintains a home location register (HLR) with your cell phone number subscriber information, and current location information
A switch in the home network, the gateway mobile services switching center (GMSC), is contacted when an outside call is placed to the cell phone Here call this switch the home MSC
INFO 331 Chapter 6 81
Managing Cellular Mobility
The visited network maintains the visitor location register (VLR), with an entry for each mobile user currently in the network The VLR and the MSC are generally colocated
So a given cellular network is the home network for its subscribers, and a visited network for phones from other providers
INFO 331 Chapter 6 82
Routing Calls to Cellular User
For a call to get to a cellular user: A correspondent places the call The call is routed to the MSC in the home network The home MSC checks the HLR to see where the
user is located It might return the mobile station roaming number
(MSRN, here just roaming number), a fake phone number which points to the user when in the network
Or it will return the VLR of the visited network; the MSC will ask the VLR for the roaming number
INFO 331 Chapter 6 83
Routing Calls to Cellular User
Given the roaming number, the MSC can now route the call to the VLR and get to the user
For this to work, the user must exchange signaling messages with the VLR, who then passes that information to the HLR
INFO 331 Chapter 6 84
Routing Calls to Cellular User
Public switched telephonenetwork
mobileuser
homeMobile
Switching Center
HLR home network
visitednetwork
correspondent
Mobile Switching
Center
VLR
1 call routed to home network
2
home MSC consults HLR,gets roaming number ofmobile in visited network
3
home MSC sets up 2nd leg of callto MSC in visited network
4
MSC in visited network completescall through base station to mobile
Public switched telephonenetwork
mobileuser
homeMobile
Switching Center
homeMobile
Switching Center
HLRHLR home network
visitednetwork
correspondent
Mobile Switching
Center
Mobile Switching
Center
VLRVLR
1 call routed to home network
11 call routed to home network
2
home MSC consults HLR,gets roaming number ofmobile in visited network
22
home MSC consults HLR,gets roaming number ofmobile in visited network
3
home MSC sets up 2nd leg of callto MSC in visited network
33
home MSC sets up 2nd leg of callto MSC in visited network
4
MSC in visited network completescall through base station to mobile
444
MSC in visited network completescall through base station to mobile
INFO 331 Chapter 6 85
Handoffs in GSM
Handoff is when a user changes association during a call Here from the old base station to the new base
station If both base stations share the same MSC,
life is easier Might need to handoff due to weak signal, or high
traffic load on the old base station
INFO 331 Chapter 6 86
Handoffs in GSM
The handoff process includes Old base station (BS) informs MSC that handoff
is needed MSC sets up path for new BS and opens channel New BS allocates resources and new channel New BS tells MSC and old BS that user should be
told what’s going on Mobile user is told it should handoff
INFO 331 Chapter 6 87
Handoffs in GSM
Mobile and new BS exchange messages to activate new channel
Mobile user sends handoff complete message to new BS
Old BS de-allocates resources So how does this process change when a
different MSC is involved?
INFO 331 Chapter 6 88
Handoffs in GSM
For handoff between MSCs, the first one is the anchor MSC
The anchor MSC stays the same regardless of where the user goes
The current user location is the visited MSC Hence the home MSC, anchor MSC, and
visited MSC are tracked throughout the call IS-41 networks maintain chains of MSCs
INFO 331 Chapter 6 89
GSM versus IP networks
Care-of-address
Routable address for telephone call segment between home MSC and visited MSC, visible to neither the mobile nor the correspondent.
Mobile Station Roaming Number (MSRN), or “roaming number”
Foreign agentVisited MSC: responsible for setting up calls to/from mobile nodes in cells associated with MSC. VLR: temporary database entry in visited system, containing subscription information for each visiting mobile user
Visited Mobile services Switching Center.Visitor Location Record (VLR)
Visited networkNetwork other than home system where mobile user is currently residing
Visited System
Home agentHome MSC: point of contact to obtain routable address of mobile user. HLR: database in home system containing permanent phone number, profile information, current location of mobile user, subscription information
Gateway Mobile Switching Center, or “home MSC”. Home Location Register (HLR)
Home networkNetwork to which the mobile user’s permanent phone number belongs
Home system
Mobile IP elementComment on GSM element GSM element
Care-of-address
Routable address for telephone call segment between home MSC and visited MSC, visible to neither the mobile nor the correspondent.
Mobile Station Roaming Number (MSRN), or “roaming number”
Foreign agentVisited MSC: responsible for setting up calls to/from mobile nodes in cells associated with MSC. VLR: temporary database entry in visited system, containing subscription information for each visiting mobile user
Visited Mobile services Switching Center.Visitor Location Record (VLR)
Visited networkNetwork other than home system where mobile user is currently residing
Visited System
Home agentHome MSC: point of contact to obtain routable address of mobile user. HLR: database in home system containing permanent phone number, profile information, current location of mobile user, subscription information
Gateway Mobile Switching Center, or “home MSC”. Home Location Register (HLR)
Home networkNetwork to which the mobile user’s permanent phone number belongs
Home system
Mobile IP elementComment on GSM element GSM element
INFO 331 Chapter 6 90
Mobile effect on higher layers
Mobile protocols clearly affect the physical, link, and often the network layers
Are the transport and application layers affected too? Mostly performance is affected Since TCP retransmits lost segments, much
worse performance can be seen under wireless The congestion window size (CongWin) is reduced
frequently, reducing efficiency, even though there may be little actual congestion
INFO 331 Chapter 6 91
Mobile effect on higher layers
Ways around this have been proposed Use ARQ methods to detect and repair bit errors Split TCP into two segments; one wired and one
wireless TCP-aware link protocols Change TCP so it handles wireless losses
differently than wired losses Applications need to consider low bandwidth,
e.g. from 3G phone, and small image sizes