Tutorial 10: Mobility Management and Mobile IP

Table of Contents

Learning Objectives

Upon completion of this extended tutorial, students will be able to:

Overview

Mobility management is a critical function in modern networks, allowing mobile devices to change their point of attachment while maintaining ongoing communications. This tutorial focuses on the fundamental protocols that enable IP mobility: Mobile IP (MIPv4 and MIPv6) and its variants. We begin by examining the architectural components—Home Agent, Foreign Agent, and Care‑of Address—and the mechanisms for agent discovery and registration. We delve into tunneling (IP‑in‑IP) and the inefficiency of triangular routing, along with route optimization. We then cover Mobile IPv6, which simplifies the architecture by integrating mobility support into IPv6, and Proxy Mobile IP (PMIPv6), a network‑based mobility solution. We also discuss alternative approaches like Multipath TCP (MPTCP) and application‑layer mobility. Through detailed explanations, examples, and case studies, this tutorial provides a comprehensive understanding of mobility management in IP networks.

1. Detailed Technical & Theoretical Content

10.1 Introduction to Mobility Management

Mobility management encompasses the mechanisms that allow a mobile node (MN) to change its location while preserving network connectivity. Key functions:

In IP networks, mobility is challenging because IP addresses are tied to the network topology (subnet). Changing the IP address would break ongoing TCP connections. Mobile IP solves this by providing a permanent home address (HoA) and a temporary care‑of address (CoA) that reflects the current location.

10.2 Mobile IP (MIPv4) Architecture

Mobile IPv4 (RFC 5944) defines three main components:

The MN is assigned a permanent home address (HoA). When away, it obtains a CoA (either from a FA or via DHCP on the visited network) and registers this CoA with its HA.

10.3 MIPv4 Agent Discovery and Registration

10.3.1 Agent Discovery

MN discovers HA and FA by listening to Agent Advertisement messages (extensions to ICMP Router Advertisement) that contain mobility agent information. Alternatively, the MN can send an Agent Solicitation to trigger an advertisement.

10.3.2 Registration

When the MN detects it is on a foreign network (i.e., receives a different network prefix), it obtains a CoA (from the FA or via DHCP) and sends a Registration Request (RRQ) to the HA (via the FA). The RRQ contains the HoA, CoA, and a lifetime. The HA validates the request, creates a binding (HoA ↔ CoA), and replies with a Registration Reply (RRP). The MN then receives the RRP (through the FA) confirming the registration. The binding is soft‑state and must be refreshed periodically.

10.4 Tunneling and Encapsulation (IP-in-IP)

Once the binding is established, packets destined for the MN's HoA are intercepted by the HA. The HA tunnels these packets to the CoA using IP‑in‑IP encapsulation (or GRE, etc.). The outer header has source = HA, destination = CoA. The inner header is the original packet (source = correspondent node, destination = HoA).

At the foreign network, the FA (or the MN itself, if using co‑located CoA) receives the encapsulated packet, strips the outer header, and delivers the inner packet to the MN. For packets sent by the MN, they are sent directly to the correspondent node (no tunneling), using the HoA as source address (or they can be tunneled back to HA if reverse tunneling is enabled).

10.5 Triangular Routing and Route Optimization

In basic MIPv4, packets from the CN to the MN go through the HA (triangular routing). This introduces extra latency and inefficient use of bandwidth. Route optimization (RFC 5825, not widely deployed) allows the CN to cache the MN's CoA and send packets directly to the CoA, bypassing the HA. This requires the CN to have a binding cache and to be capable of processing mobile IP signalling. Security is a concern, as route optimisation opens the door for denial‑of‑service (binding updates can be spoofed).

In practice, many deployments use reverse tunneling where the MN also tunnels packets back to the HA (for ingress filtering and security).

10.6 Mobile IPv6 (MIPv6) Overview

Mobile IPv6 (RFC 6275) simplifies the architecture by eliminating the need for a Foreign Agent. Key features:

10.7 Proxy Mobile IP (PMIPv6)

PMIPv6 (RFC 5213) is a network‑based mobility solution that does not require the MN to participate in mobility signalling. The network (mobile access gateway – MAG) detects the MN's movement and performs the mobility management on behalf of the MN. The MN is not aware of mobility; it sees a constant IP address (home network prefix) even as it moves. The MAGs exchange signalling with the Local Mobility Anchor (LMA), which is similar to the HA. PMIPv6 is widely used in 3GPP networks (e.g., LTE S‑GW, P‑GW) and enterprise Wi‑Fi.

10.8 Comparison of Mobility Protocols

Protocol MIPv4 MIPv6 PMIPv6
Host involvement Client‑based Client‑based Network‑based
Foreign Agent Required (or co‑located) Not needed Not needed (MAG acts as proxy)
Route optimization Optional, limited Built‑in Not directly (LMA anchors)
IPv6 support No (native IPv4) Yes Yes (IPv6)
Security IPsec (optional) IPsec mandatory IPsec between MAG and LMA
Use cases Legacy General IPv6 mobility LTE, Wi‑Fi offload

10.9 Alternative Approaches: MPTCP, SIP, and Application-layer Mobility

Besides network‑layer mobility, other approaches exist:

10.10 Case Studies: Mobility in Real Networks

Case Study 1: MIPv4 in Enterprise WLAN

An enterprise uses MIPv4 to allow laptops to roam across subnets without dropping TCP connections. HA is deployed on the core router, and FAs are integrated into the WLAN controllers. The MN registers with the HA via the FA, and traffic is tunneled.

Case Study 2: PMIPv6 in LTE Networks

LTE uses PMIPv6 (or GTP) for mobility. The MME and SGW coordinate handover; the PGW serves as the LMA, and the eNodeB (or SGW) acts as the MAG. The UE's IP address remains constant across handovers.

Case Study 3: MPTCP for Smartphone Multihoming

A smartphone with both Wi‑Fi and LTE uses MPTCP to combine the two paths for a video streaming application. If one interface drops, the connection continues, providing seamless mobility.

Quiz: 25 Questions

Test your understanding of mobility management and Mobile IP.

Q1. What is the primary purpose of Mobile IP?

Show Answer

To allow a mobile node to change its point of attachment to the Internet while maintaining ongoing communications (i.e., keeping its IP address).

Q2. What are the three main entities in Mobile IPv4?

Show Answer

Mobile Node (MN), Home Agent (HA), and Foreign Agent (FA).

Q3. What is a Care‑of Address (CoA) in Mobile IP?

Show Answer

A temporary IP address that identifies the MN's current location on the foreign network. It is used to tunnel packets to the MN.

Q4. What is the difference between a Home Address (HoA) and a Care‑of Address?

Show Answer

The HoA is the permanent IP address of the MN on its home network; the CoA is a temporary address on the visited network.

Q5. How does the Mobile Node discover the presence of a Foreign Agent?

Show Answer

By listening to Agent Advertisement messages (ICMP Router Advertisement extensions) broadcast by the FA. It can also send an Agent Solicitation to request an advertisement.

Q6. Describe the registration process in MIPv4.

Show Answer

The MN sends a Registration Request (RRQ) to the HA (via FA), including HoA, CoA, and lifetime. The HA creates a binding and sends a Registration Reply (RRP) back to the MN. The binding is soft‑state and must be refreshed.

Q7. What is the purpose of tunneling in Mobile IP?

Show Answer

To forward packets destined for the MN's HoA from the HA to the CoA, encapsulating the original packet with a new outer header (destination = CoA).

Q8. What is the encapsulation protocol commonly used in MIPv4 for tunneling?

Show Answer

IP‑in‑IP encapsulation (RFC 2003), where the outer header is IP and the inner header is the original packet.

Q9. What is triangular routing in Mobile IP?

Show Answer

The path where packets from a correspondent node to the MN go through the HA first, then to the MN, forming a triangle. This is inefficient compared to direct routing.

Q10. How does route optimization improve Mobile IP performance?

Show Answer

Route optimization allows the CN to learn the MN's CoA and send packets directly to the CoA, bypassing the HA, reducing latency and bandwidth waste.

Q11. What is the main security concern with route optimization?

Show Answer

Binding updates to the CN could be spoofed, leading to denial‑of‑service or redirection attacks. Mobile IPv6 uses IPsec or return routability to authenticate bindings.

Q12. How does Mobile IPv6 simplify the architecture compared to MIPv4?

Show Answer

It eliminates the Foreign Agent; the MN obtains a CoA directly on the visited network, and the HA is the only anchor. Route optimization is built in.

Q13. What is the role of the Binding Update message in MIPv6?

Show Answer

It is sent by the MN to the HA (or CN) to inform them of its current CoA, allowing them to update their binding cache.

Q14. What is Proxy Mobile IPv6 (PMIPv6)?

Show Answer

A network‑based mobility protocol where the network (MAG) performs mobility signalling on behalf of the MN, so the MN does not need to be Mobile IP‑aware.

Q15. In PMIPv6, what are the roles of the MAG and LMA?

Show Answer

MAG (Mobile Access Gateway) detects the MN's attachment and sends Proxy Binding Updates to the LMA (Local Mobility Anchor), which is the anchor point for the MN's traffic.

Q16. What is the advantage of PMIPv6 over MIPv6?

Show Answer

The MN does not need to be involved in mobility signalling, reducing protocol overhead and making it compatible with unmodified clients.

Q17. What is Multipath TCP (MPTCP) and how does it provide mobility?

Show Answer

MPTCP allows a single TCP connection to use multiple paths simultaneously. When one path (IP address) becomes unavailable, the connection continues over another, providing seamless mobility.

Q18. How does SIP support mobility for VoIP calls?

Show Answer

SIP can use a re‑INVITE request to update the contact address of the user, redirecting the media stream to the new IP address.

Q19. What is the Host Identity Protocol (HIP) and how does it solve mobility?

Show Answer

HIP separates the identifier (Host Identity) from the locator (IP address). Mobility is achieved by updating the mapping between the identifier and the current IP address without changing the identifier used by applications.

Q20. In MIPv4, what is a "co‑located" Care‑of Address?

Show Answer

A CoA that is assigned directly to the MN's interface (e.g., via DHCP) rather than being provided by a Foreign Agent. The MN itself performs de‑tunneling.

Q21. What is the purpose of the lifetime field in a registration request?

Show Answer

It specifies the duration for which the binding is valid. The MN must re‑register before the lifetime expires to maintain the binding.

Q22. What is the difference between home network and foreign network in Mobile IP?

Show Answer

The home network is the subnet where the MN's HoA is assigned. The foreign network is any other subnet where the MN is currently located.

Q23. Why is reverse tunneling sometimes used in Mobile IP?

Show Answer

To avoid ingress filtering (where packets with a source address not on the subnet are dropped). The MN tunnels packets back to the HA, which then forwards them with the correct source address.

Q24. In MIPv6, how does the MN communicate its CoA to a correspondent node?

Show Answer

By sending a Binding Update (BU) to the CN, which then creates a binding cache entry and can send packets directly to the CoA using a routing header.

Q25. What are the key differences between MIPv6 and PMIPv6 in terms of handover latency?

Show Answer

MIPv6 handover may involve longer latency due to the MN's signalling and IPsec setup. PMIPv6 handover is network‑controlled and can be faster because the MN does not participate, and the MAG can pre‑establish the binding with the LMA.

Exercises (12 Practical Problems)

Apply your knowledge to mobility scenarios.

Exercise 1: Draw a diagram illustrating the triangular routing path in MIPv4 when a correspondent node (CN) sends a packet to a mobile node (MN) that is away from home. Label the packets and the encapsulation.

Show Solution

CN → HA (packet destined to HoA). HA encapsulates the packet (outer header: src=HA, dst=CoA) and tunnels to FA. FA decapsulates and delivers to MN. The return path: MN → CN directly (or via reverse tunneling).

Exercise 2: A mobile node has a Home Address 192.168.1.100 and is visiting a foreign network where it obtains a CoA 10.0.0.200. The Home Agent is at 192.168.1.1, and the Foreign Agent is at 10.0.0.1. Describe the IP header fields for a packet sent from CN (203.0.113.10) to the MN when the MN is away. Include both the outer and inner headers.

Show Solution

Original packet (inner): src=203.0.113.10, dst=192.168.1.100. After HA tunneling, outer header: src=192.168.1.1, dst=10.0.0.200 (CoA). The FA decapsulates and forwards inner packet to MN.

Exercise 3: Why is the binding in Mobile IP considered "soft state"? What happens if the MN does not refresh the binding before the lifetime expires?

Show Solution

Soft state means the binding is temporary and expires unless refreshed. If not refreshed, the HA removes the binding, and packets destined to the MN will be dropped or delivered to the home network.

Exercise 4: A mobile node moves from one foreign network to another. Describe the sequence of events for the MN to update its registration with the Home Agent.

Show Solution

1. MN detects it is on a new foreign network (via Agent Advertisement). 2. MN obtains a new CoA. 3. MN sends a Registration Request to HA with the new CoA. 4. HA updates the binding (replaces old CoA with new CoA) and sends a Registration Reply. 5. The old binding is replaced.

Exercise 5: What are the advantages and disadvantages of route optimization in Mobile IPv4?

Show Solution

Advantages: reduced latency, less HA load, better path efficiency. Disadvantages: security risks (binding updates can be spoofed), requires CN support, increases complexity.

Exercise 6: In PMIPv6, how does the MN obtain an IP address, and how does the network ensure the address remains constant across handovers?

Show Solution

The MN obtains an address via DHCP or SLAAC. The MAG and LMA maintain a binding; when the MN moves to a new MAG, the new MAG updates the LMA, and the LMA continues to anchor the same prefix, so the MN's IP address does not change.

Exercise 7: Compare the handover latency of MIPv6 and PMIPv6. What factors contribute to the latency in each?

Show Solution

MIPv6: handover involves MN discovering new network, obtaining CoA, and sending Binding Update to HA/CN, which adds latency. PMIPv6: network detects handover, MAG sends PBU to LMA, and the LMA updates; the MN is not involved, so handover can be faster.

Exercise 8: A smartphone uses both Wi‑Fi and cellular (LTE) with MPTCP. Explain how MPTCP ensures session continuity if one interface loses connectivity.

Show Solution

MPTCP establishes subflows over each interface. If the Wi‑Fi interface drops, the subflow is terminated, but the other subflow (over cellular) continues, and the TCP connection remains active. The MPTCP scheduler can also shift data to the available path.

Exercise 9: What is the role of the "return routability" procedure in MIPv6 route optimization?

Show Solution

Return routability (RR) is a security mechanism that allows the CN to verify that the MN is actually reachable at its claimed CoA and HoA, preventing binding update spoofing. It involves exchanging test messages via both the CoA and HoA.

Exercise 10: How does the Home Agent in MIPv6 handle packets when it receives traffic for the MN's HoA while the MN is away?

Show Solution

The HA intercepts packets destined for the HoA, encapsulates them (using IPv6 encapsulation) with a destination of the MN's CoA, and tunnels them to the MN.

Exercise 11: Describe the differences in security between MIPv4 and MIPv6.

Show Solution

MIPv4 security is optional and relies on IPsec or authentication extensions (RFC 3344). MIPv6 mandates IPsec for HA-MN communication and uses return routability for CN-MN, providing stronger security out‑of‑the‑box.

Exercise 12: In a corporate network, employees roam between subnets using MIPv4. The HA is deployed on the core router. What happens if the HA fails? How can redundancy be provided?

Show Solution

If the HA fails, MNs lose their bindings and cannot receive packets. Redundancy can be provided by deploying multiple HAs with state synchronisation (e.g., using VRRP or a dedicated HA failover mechanism), so that if one fails, another takes over.

Homework (12 Assignments)

Independent research and advanced analysis.

HW1. Derive the encapsulation overhead for IP‑in‑IP tunneling in MIPv4. Calculate the total packet size for a 1500‑byte payload plus 20 bytes of IP header (inner) and 20 bytes of outer IP header. Include the impact on MTU and fragmentation.

Show Sample Answer

Total packet size = 1500 (payload) + 20 (inner IP) + 20 (outer IP) = 1540 bytes. If the underlying link MTU is 1500 bytes, the packet must be fragmented, reducing efficiency. This is why MIPv6 uses IPv6 extension headers to reduce overhead.

HW2. Research and compare the handoff latency in Mobile IPv6 using the standard procedure versus using Fast Handovers for Mobile IPv6 (FMIPv6). How does FMIPv6 reduce handover latency?

Show Sample Answer

FMIPv6 reduces latency by performing handover preparation (layer‑2 and layer‑3) before the MN moves, allowing the MN to obtain a new CoA and establish a tunnel with the previous access router (PAR) for packet forwarding, reducing the disruption time.

HW3. Explain the concept of "mobility support in 5G" using the network functions (AMF, SMF, UPF). How does the 5GC maintain session continuity during handover?

Show Sample Answer

In 5G, the AMF handles mobility, the SMF manages sessions, and the UPF anchors the user plane. During handover, the gNB triggers AMF, which coordinates with SMF to update the UPF's tunnel information, ensuring the UE's IP address remains and data is forwarded without loss.

HW4. Analyse the trade‑offs between network‑layer mobility (Mobile IP) and transport‑layer mobility (MPTCP). Which is more suitable for mobile broadband, and why?

Show Sample Answer

Mobile IP provides seamless mobility at the IP layer, but requires network support and may suffer from triangular routing. MPTCP works at the transport layer and is transparent to applications, does not require network support, but only works for TCP connections. For mobile broadband, MPTCP is gaining traction because it can aggregate multiple interfaces and handle heterogeneous networks.

HW5. Describe the key differences between Mobile IPv4 and Mobile IPv6 with respect to route optimization, security, and address configuration.

Show Sample Answer

MIPv4 route optimization is not widely used due to security and complexity; MIPv6 has built‑in route optimization. MIPv4 uses IPsec optionally; MIPv6 mandates IPsec for HA‑MN and uses return routability for CN. MIPv6 has stateless autoconfiguration, simplifying CoA acquisition.

HW6. Research the concept of "make‑before‑break" handover. How does it differ from "break‑before‑make" in the context of Mobile IP?

Show Sample Answer

Make‑before‑break establishes the new connection (e.g., new CoA registration) before breaking the old one, reducing packet loss. Break‑before‑make breaks the old connection first, causing a brief outage. MIPv6 can support make‑before‑break with simultaneous bindings.

HW7. Analyse the security implications of PMIPv6. What are the threats, and how are they mitigated?

Show Sample Answer

Threats include spoofing of MAGs, replay attacks, and interception of traffic. PMIPv6 uses IPsec for secure communication between MAG and LMA. Additionally, the network authenticates the MN (via EAP) during attachment.

HW8. Compare the mobility approaches in the 3GPP LTE/EPC (using GTP) with PMIPv6. What are the architectural differences?

Show Sample Answer

LTE uses GTP for tunneling between eNodeB, SGW, and PGW, with the PGW as the anchor. PMIPv6 uses MAG and LMA with IPsec. Both provide network‑based mobility, but GTP is more tightly integrated with the cellular core, while PMIPv6 is more generic and can be used for heterogeneous access (Wi‑Fi, WiMAX).

HW9. Write a critical evaluation of the statement: "Mobile IPv6 is obsolete because of the widespread use of network‑based mobility solutions." Discuss the contexts where MIPv6 is still relevant.

Show Sample Answer

MIPv6 is less used in cellular networks (which use PMIPv6 or GTP) but remains relevant in environments where host‑based mobility is needed (e.g., some enterprise VPNs, military networks, or where network support is lacking). However, its adoption has been limited due to complexity and the availability of simpler alternatives.

HW10. Explain how the Host Identity Protocol (HIP) enables mobility. How does it differ from Mobile IP in terms of the namespace and security?

Show Sample Answer

HIP introduces a new namespace (Host Identity) based on public key cryptography, separating identifier from locator. Mobility is achieved by updating the mapping between the HI and the current IP address. HIP provides strong security (authenticated with public keys) and is more resilient to some attacks, but requires changes to the network stack.

HW11. Analyse the impact of mobility on TCP performance. How does Mobile IP (with triangular routing) affect TCP throughput and congestion control?

Show Sample Answer

Triangular routing increases the RTT, which affects TCP's congestion window growth and may reduce throughput. Packet loss during handover can cause TCP to misinterpret it as congestion, leading to unnecessary backoff. Solutions include using SACK, TCP timestamps, and TCP‑optimized handover mechanisms.

HW12. Design a mobility management strategy for a fleet of autonomous delivery robots operating in a city. Consider the requirements (low latency, high reliability, continuous connectivity) and propose a solution (e.g., 5G with edge computing, MPTCP, or Mobile IP). Justify your choice.

Show Sample Answer

Use 5G network with URLLC slice and edge computing. The robots have modems that connect to 5G; the network provides seamless handover via the 5GC (UPF anchoring). Edge computing reduces latency. Additionally, MPTCP could be used if the robots have multiple radios (5G and Wi‑Fi) for redundancy.

Summary

This extended tutorial covered mobility management and Mobile IP, including:

Understanding these protocols is essential for designing networks that support seamless mobility for users and devices. The next tutorial will explore Wireless Sensor Networks and the Internet of Things.

© COMP347 – Unit 7: Wireless and Mobile Networks (Extended Tutorial 10)