Computer Networking › Section G · Wireless and mobile networks › Topic G.5
Mobility management: principles
An IP address says both who a device is and where it is attached. When a phone moves between networks mid-conversation, those two meanings pull apart, and the network needs a plan to find the device and keep its traffic flowing.
How mobile is mobile?
From the network layer's point of view, physical movement matters only in some cases. A student who shuts a laptop, walks to the library and reconnects there is not mobile at all: the laptop simply joins a new network, as any host does with DHCP. A phone that moves around one access network, staying with the same access point or cell, is not mobile either. Mobility becomes a real problem when a device changes its access network while keeping connections open, such as a video call on a moving train. It is hardest when the device also crosses between different providers' networks, which must then cooperate.
Why changing address breaks connections
A TCP connection is identified by its two IP addresses and two port numbers. If a phone moves to a network with a different subnet and gets a new IP address, segments sent to the old address no longer reach it, and segments it sends from the new address do not match the connection the server knows. The connection stalls and eventually fails. So mobility management must answer three questions. How does the network find a device's current location? How are datagrams routed there? And how is a moving device handed from one point of attachment to the next without breaking its sessions?
Home networks and visited networks
Cellular systems answer the first question with a home network. Every subscriber belongs to one operator, whose Home Subscriber Server (HSS) stores the subscriber's permanent identity (the IMSI on the SIM), service details and keys. When the phone is attached to another operator's network, it is roaming on a visited network, and the visited network tells the home network where the phone is. The home network becomes one place anyone can ask, much like a company reception desk that always knows which branch office a travelling employee is working from today. A roaming device has a permanent identifier and, in the visited network, a transient address, often a NAT one.
The idea that does not scale
One tempting approach adds nothing new: let the visited network advertise a route for the mobile device's exact 32-bit address through BGP, the routing protocol covered in "Routing among ISPs: BGP". Because routers forward on the most specific matching prefix, every datagram for the device would then flow to its visited network. It works, but it cannot scale. Every router in the internet would need an entry for every roaming device. If 2 billion devices each changed network twice a day, that would be 4 billion updates a day, about 46,000 every second, each spread across the entire internet. The practical answer pushes mobility out of the core and into the network edge.
Indirect routing through the home network
In indirect routing, a correspondent, any host that wants to reach the mobile device, simply sends to the device's permanent address, unaware of where it is. The datagram is routed normally to the home network. There, the gateway intercepts it, asks the HSS which visited network the device is in, and tunnels it: the whole original datagram is placed inside a new datagram addressed to the visited network's gateway. That gateway removes the outer header and delivers the original, translating the address if NAT is used. Replies can be tunnelled back through the home network or sent straight out of the visited network, called local breakout. Mobility stays invisible to the correspondent.
Worked example: following a tunnelled datagram
A phone's permanent address is 198.51.100.25 in its home network, 198.51.100.0/24, whose gateway is 198.51.100.1. It is roaming in 203.0.113.0/24, whose gateway is 203.0.113.1, with NAT address 10.0.0.7. Server 192.0.2.80 sends it a segment. 1. The server's datagram has source 192.0.2.80 and destination 198.51.100.25, so it reaches the home gateway. 2. The HSS says the phone is in the visited network. 3. The home gateway wraps the datagram unchanged inside an outer header from 198.51.100.1 to 203.0.113.1. 4. The visited gateway strips the outer header and translates 198.51.100.25 to 10.0.0.7. Check: the inner header never changed, so the server's TCP connection still matches.
The triangle routing problem
Indirect routing has a cost. Every datagram to the mobile device detours through its home network, even when a far shorter path exists. In the worst case, a traveller sits next to the person they are messaging, yet every datagram between them crosses an ocean to the traveller's home network and back. This is triangle routing. The extra delay is simple geometry: each additional leg adds distance divided by the signal's speed in the medium, about two-thirds of the speed of light in optical fibre. Applications such as voice calls and games, which need low delay, suffer most.
Worked example: the cost of the detour
A traveller from New York is in Tokyo, messaging a colleague in the same city. Assume the home network is about 10,800 km away by fibre, signals travel at \(2 \times 10^8\) m/s, and the local path is short enough to ignore. 1. One leg, Tokyo to New York: \(10{,}800{,}000 \div (2 \times 10^8) = 0.054\) s, or 54 ms. 2. A datagram to the traveller goes out and back: 2 × 54 = 108 ms of extra one-way delay. 3. A request and its reply each make that detour if both are routed through home: about 216 ms added to the round trip. Check: real paths are longer than great-circle distances and add queuing, so this is a lower bound.
Direct routing
Direct routing removes the triangle. The correspondent, or a mobility agent in its network, first asks the mobile device's home HSS which visited network the device is in, then tunnels datagrams straight to that network's gateway. The path is shorter, but the design is harder in two ways. A new location protocol is needed so correspondents can query the HSS. And if the device moves again, the correspondent's information goes stale, because it asked only at the start of the session; one fix is to have the first visited network act as an anchor that forwards to wherever the device goes next. Indirect routing avoids this, since only the home network must learn of each move.
Common mistakes to avoid
First, calling a device mobile just because it moves; what matters is whether its point of attachment changes while connections are open. Second, thinking indirect routing requires the correspondent to know where the device is; the correspondent only knows the permanent address. Third, believing tunnelling rewrites the original datagram; it wraps it unchanged inside another. Fourth, assuming direct routing is simply better: it shortens the path but needs a location protocol and updates on every move. Fifth, forgetting that some loss during a move is normal, and that TCP recovers from it as it does from congestion loss.
Key takeaways
Mobility matters when a device changes access network while keeping connections, and most of all across providers. An IP address names and locates a host, so a new address breaks TCP connections. A home network, through its HSS, records each device's permanent identity and current visited network. Advertising per-device routes through BGP cannot scale. Indirect routing sends datagrams to the permanent address, and the home gateway tunnels them to the visited network, invisibly to the correspondent, at the cost of triangle routing. Direct routing queries the HSS and tunnels straight to the visited network, but must handle further moves.
Flashcards
Flashcard
Changing access network while keeping connections open
Test your understanding
Question 1 of 5
Which situation raises a genuine network-layer mobility problem?
Question 2 of 5
Why is advertising every roaming device's exact IP address through BGP not used to support mobility?
Question 3 of 5
Under indirect routing, what destination address does a correspondent put on a datagram for a roaming phone?
Question 4 of 5
A roaming phone and its correspondent are in the same city; the phone's home network is 6,000 km away by fibre at 2 × 10⁸ m/s. About how much one-way delay does indirect routing add to each datagram sent to the phone?
Question 5 of 5
What extra problem does direct routing create that indirect routing avoids?
