using IPv6 HoA without using MIPv6 - there is no need to tunnel as the MN is at home. Step 2 illustrates MN movement to a visited network and establishment of a tunnel to the HA. In step 2 the MN can continue using HA for reachability and mobility services, but all packets sent using HoAs have to be routed via the HA. Any sessions that the MN had ongoing during step 1 will continue working after step 2, as the traffic using HoA is switched to using the tunnel. To allow creation of advanced MIPv6-aware applications and user-space implementations, MIPv6 specifies extensions to the socket API in RFC 4584 [122]. We will not look at the details of this API here, but instead recommend interested readers to look at the reference. 3.7.3 Network-based Mobile IP One reason why the host-based Mobile IP has faced deployment challenges is the requirement for explicit support on hosts. In order to alleviate that concern, IETF standardized a network-based IPv6 mobility solution called Proxy Mobile IPv6 Correspondent Internet Visited agent router Visited network network Mobile Mobile Figure 3.17 MIPv6 illustration. Case 1 shows data flow for the mobile node at home, and case 2 for the mobile node on a visited network. Introduction to IPv6 Network MAG 1 MAG 2 Access Access link 1 link 2 Mobile Mobile Figure 3.18 Illustration of PMIPv6 and an MN moving while retaining HNP. (PMIPv6) [123], and extended that to also support mobility for IPv4 [124]. The essence of PMIPv6 is the idea of placing routers with Mobile Access Gateway (MAG) roles into access networks for serving moving hosts with the same Home Network Prefix (HNP) at each point of network attachment. MAGs are controlled and coordinated by a Local Mobility Anchor (LMA), which acts as an anchor and a tunnel endpoint very much like the Home Agent (HA) in MIPv6. Figure 3.18 illustrates the PMIPv6 setup by showing one LMA and two access networks, both having an MAG. Initially, MAG '1' obtains an HNP from the LMA and advertises that for the MN. When the MN moves from the first ac