RFC 3775

Mobility Support in IPv6

๐Ÿ“… published June 2004, from ietf

RFC 3775: Mobility Support in IPv6 โœจ

Okay bestie, this one is a big deal ๐Ÿ”ฅ It's RFC 3775, and the title is Mobility Support in IPv6 ๐Ÿฆ‹

  • Authors: D. Johnson (Rice University), C. Perkins (Nokia Research Center), and J. Arkko (Ericsson) ๐Ÿ’…
  • Category: Standards Track ๐Ÿ‘‘
  • Date: June 2004 ๐ŸŒธ

Status of this Memo

So this doc is an Internet standards track protocol for the Internet community, and it's basically asking everyone for discussion and suggestions ๐Ÿซถ If you want the official standardization state and status, check the current edition of the "Internet Official Protocol Standards" (STD 1) ๐Ÿ“š Also, distribution of this memo is unlimited, so share it with everyone ๐Ÿ’–

Copyright (C) The Internet Society (2004) ๐ŸŒˆ

Abstract

Okay, the vibe here is that this protocol lets nodes stay reachable even while they're moving around the IPv6 Internet ๐Ÿงš Every mobile node is always identified by its home address, no matter where it's plugged in right now โœจ

When a mobile node is away from home, it also gets a care-of address, which tells everyone where it is at the moment ๐Ÿ“ Packets sent to the home address get transparently routed to that care-of address, so it's giving seamless ๐Ÿฆ‹

The protocol lets IPv6 nodes cache the binding between a mobile node's home address and its care-of address. After that, they can send packets straight to the care-of address ๐Ÿš€ To make this work, Mobile IPv6 defines a new IPv6 protocol and a new destination option ๐Ÿ“ And the best part is that all IPv6 nodes, whether mobile or stationary, can talk to mobile nodes ๐Ÿ’œ Iconic, periodt ๐Ÿ’…

Table of Contents

Part 1 of 38 done! ๐ŸŒˆ More parts are coming, so stay tuned bestie ๐Ÿ’–

okay bestie, this is the map of the whole RFC ๐Ÿ—บ๏ธโœจ every section lives right here, numbers and all, so you always know where you are ๐Ÿ’–

   1.     Introduction . . . . . . . . . . . . . . . . . . . . . . .   5
   2.     Comparison with Mobile IP for IPv4 . . . . . . . . . . . .   6
   3.     Terminology. . . . . . . . . . . . . . . . . . . . . . . .   7
          3.1.   General Terms . . . . . . . . . . . . . . . . . . .   8
          3.2.   Mobile IPv6 Terms . . . . . . . . . . . . . . . . .  10
   4.     Overview of Mobile IPv6. . . . . . . . . . . . . . . . . .  13
          4.1.   Basic Operation . . . . . . . . . . . . . . . . . .  13
          4.2.   New IPv6 Protocol . . . . . . . . . . . . . . . . .  15
          4.3.   New IPv6 Destination Option . . . . . . . . . . . .  17
          4.4.   New IPv6 ICMP Messages. . . . . . . . . . . . . . .  17
          4.5.   Conceptual Data Structure Terminology . . . . . . .  17
          4.6.   Site-Local Addressability . . . . . . . . . . . . .  18
   5.     Overview of Mobile IPv6 Security . . . . . . . . . . . . .  18
          5.1.   Binding Updates to Home Agents. . . . . . . . . . .  18
          5.2.   Binding Updates to Correspondent Nodes. . . . . . .  20
                 5.2.1.  Node Keys . . . . . . . . . . . . . . . . .  20
                 5.2.2.  Nonces. . . . . . . . . . . . . . . . . . .  20
                 5.2.3.  Cookies and Tokens. . . . . . . . . . . . .  21
                 5.2.4.  Cryptographic Functions . . . . . . . . . .  22
                 5.2.5.  Return Routability Procedure. . . . . . . .  22
                 5.2.6.  Authorizing Binding Management Messages . .  27
                 5.2.7.  Updating Node Keys and Nonces . . . . . . .  29
                 5.2.8.  Preventing Replay Attacks . . . . . . . . .  30
          5.3.   Dynamic Home Agent Address Discovery. . . . . . . .  30
          5.4.   Mobile Prefix Discovery . . . . . . . . . . . . . .  30
          5.5.   Payload Packets . . . . . . . . . . . . . . . . . .  30
   6.     New IPv6 Protocol, Message Types, and Destination Option .  31
          6.1.   Mobility Header . . . . . . . . . . . . . . . . . .  31
                 6.1.1.  Format. . . . . . . . . . . . . . . . . . .  32
                 6.1.2.  Binding Refresh Request Message . . . . . .  34
                 6.1.3.  Home Test Init Message. . . . . . . . . . .  35
                 6.1.4.  Care-of Test Init Message . . . . . . . . .  36
                 6.1.5.  Home Test Message . . . . . . . . . . . . .  37
                 6.1.6.  Care-of Test Message. . . . . . . . . . . .  38
                 6.1.7.  Binding Update Message. . . . . . . . . . .  39
                 6.1.8.  Binding Acknowledgement Message . . . . . .  42
                 6.1.9.  Binding Error Message . . . . . . . . . . .  44
          6.2.   Mobility Options. . . . . . . . . . . . . . . . . .  46
                 6.2.1.  Format. . . . . . . . . . . . . . . . . . .  46
                 6.2.2.  Pad1. . . . . . . . . . . . . . . . . . . .  47
                 6.2.3.  PadN. . . . . . . . . . . . . . . . . . . .  48
                 6.2.4.  Binding Refresh Advice. . . . . . . . . . .  48
                 6.2.5.  Alternate Care-of Address . . . . . . . . .  49
                 6.2.6.  Nonce Indices . . . . . . . . . . . . . . .  49
                 6.2.7.  Binding Authorization Data. . . . . . . . .  50
          6.3.   Home Address Option . . . . . . . . . . . . . . . .  51
          6.4.   Type 2 Routing Header . . . . . . . . . . . . . . .  53
                 6.4.1.  Format. . . . . . . . . . . . . . . . . . .  54
          6.5.   ICMP Home Agent Address Discovery Request Message .  55
          6.6.   ICMP Home Agent Address Discovery Reply Message . .  56
          6.7.   ICMP Mobile Prefix Solicitation Message Format. . .  57
          6.8.   ICMP Mobile Prefix Advertisement Message Format . .  59
   7.     Modifications to IPv6 Neighbor Discovery . . . . . . . . .  61
          7.1.   Modified Router Advertisement Message Format. . . .  61
          7.2.   Modified Prefix Information Option Format . . . . .  62
          7.3.   New Advertisement Interval Option Format. . . . . .  64
          7.4.   New Home Agent Information Option Format. . . . . .  65
          7.5.   Changes to Sending Router Advertisements. . . . . .  67
   8.     Requirements for Types of IPv6 Nodes . . . . . . . . . . .  69
          8.1.   All IPv6 Nodes. . . . . . . . . . . . . . . . . . .  69
          8.2.   IPv6 Nodes with Support for Route Optimization. . .  69
          8.3.   All IPv6 Routers. . . . . . . . . . . . . . . . . .  71
          8.4.   IPv6 Home Agents. . . . . . . . . . . . . . . . . .  71
          8.5.   IPv6 Mobile Nodes . . . . . . . . . . . . . . . . .  73
   9.     Correspondent Node Operation . . . . . . . . . . . . . . .  74
          9.1.   Conceptual Data Structures. . . . . . . . . . . . .  74
          9.2.   Processing Mobility Headers . . . . . . . . . . . .  75
          9.3.   Packet Processing . . . . . . . . . . . . . . . . .  76
                 9.3.1.  Receiving Packets with Home Address Option.  76
                 9.3.2.  Sending Packets to a Mobile Node. . . . . .  77
                 9.3.3.  Sending Binding Error Messages. . . . . . .  78
                 9.3.4.  Receiving ICMP Error Messages . . . . . . .  79
          9.4.   Return Routability Procedure. . . . . . . . . . . .  79
                 9.4.1.  Receiving Home Test Init Messages . . . . .  80
                 9.4.2.  Receiving Care-of Test Init Messages. . . .  80
                 9.4.3.  Sending Home Test Messages. . . . . . . . .  80
                 9.4.4.  Sending Care-of Test Messages . . . . . . .  81
          9.5    Processing Bindings . . . . . . . . . . . . . . . .  81
                 9.5.1.  Receiving Binding Updates . . . . . . . . .  81
                 9.5.2.  Requests to Cache a Binding . . . . . . . .  84
                 9.5.3.  Requests to Delete a Binding. . . . . . . .  84
                 9.5.4.  Sending Binding Acknowledgements. . . . . .  85
                 9.5.5.  Sending Binding Refresh Requests. . . . . .  86
          9.6.   Cache Replacement Policy. . . . . . . . . . . . . .  86
   10.    Home Agent Operation . . . . . . . . . . . . . . . . . . .  87
          10.1.  Conceptual Data Structures. . . . . . . . . . . . .  87
          10.2.  Processing Mobility Headers . . . . . . . . . . . .  88
          10.3.  Processing Bindings . . . . . . . . . . . . . . . .  88
                 10.3.1. Primary Care-of Address Registration. . . .  88
                 10.3.2. Primary Care-of Address De-Registration . .  92
          10.4.  Packet Processing . . . . . . . . . . . . . . . . .  94
                 10.4.1. Intercepting Packets for a Mobile Node. . .  94
                 10.4.2. Processing Intercepted Packets. . . . . . .  95
                 10.4.3. Multicast Membership Control. . . . . . . .  96
                 10.4.4. Stateful Address Autoconfiguration. . . . .  98
                 10.4.5. Handling Reverse Tunneled Packets . . . . .  98
                 10.4.6. Protecting Return Routability Packets . . .  99
          10.5.  Dynamic Home Agent Address Discovery. . . . . . . .  99
                 10.5.1. Receiving Router Advertisement Messages . . 100
          10.6.  Sending Prefix Information to the Mobile Node . . . 102
                 10.6.1. List of Home Network Prefixes . . . . . . . 102
                 10.6.2. Scheduling Prefix Deliveries. . . . . . . . 102
                 10.6.3. Sending Advertisements. . . . . . . . . . . 104
                 10.6.4. Lifetimes for Changed Prefixes. . . . . . . 105
   11.    Mobile Node Operation. . . . . . . . . . . . . . . . . . . 105
          11.1.  Conceptual Data Structures. . . . . . . . . . . . . 105
          11.2.  Processing Mobility Headers . . . . . . . . . . . . 107
          11.3.  Packet Processing . . . . . . . . . . . . . . . . . 107
                 11.3.1. Sending Packets While Away from Home. . . . 107
                 11.3.2. Interaction with Outbound IPsec Processing. 110
                 11.3.3. Receiving Packets While Away from Home. . . 112
                 11.3.4. Routing Multicast Packets . . . . . . . . . 114
                 11.3.5. Receiving ICMP Error Messages . . . . . . . 115
                 11.3.6. Receiving Binding Error Messages. . . . . . 116
          11.4.  Home Agent and Prefix Management. . . . . . . . . . 117
                 11.4.1. Dynamic Home Agent Address Discovery. . . . 117
                 11.4.2. Sending Mobile Prefix Solicitations . . . . 118
                 11.4.3. Receiving Mobile Prefix Advertisements. . . 118
          11.5.  Movement. . . . . . . . . . . . . . . . . . . . . . 120
                 11.5.1. Movement Detection. . . . . . . . . . . . . 120
                 11.5.2. Forming New Care-of Addresses . . . . . . . 122
                 11.5.3. Using Multiple Care-of Addresses. . . . . . 123
                 11.5.4. Returning Home. . . . . . . . . . . . . . . 124
          11.6.  Return Routability Procedure. . . . . . . . . . . . 126
                 11.6.1. Sending Test Init Messages. . . . . . . . . 126
                 11.6.2. Receiving Test Messages . . . . . . . . . . 127
                 11.6.3. Protecting Return Routability Packets . . . 128
          11.7.  Processing Bindings . . . . . . . . . . . . . . . . 128
                 11.7.1. Sending Binding Updates to the Home Agent . 128
                 11.7.2. Correspondent Registration. . . . . . . . . 131
                 11.7.3. Receiving Binding Acknowledgements. . . . . 134
                 11.7.4. Receiving Binding Refresh Requests. . . . . 136
          11.8.  Retransmissions and Rate Limiting . . . . . . . . . 137
   12.    Protocol Constants . . . . . . . . . . . . . . . . . . . . 138
   13.    Protocol Configuration Variables . . . . . . . . . . . . . 138
   14.    IANA Considerations. . . . . . . . . . . . . . . . . . . . 139
   15.    Security Considerations. . . . . . . . . . . . . . . . . . 142
          15.1.  Threats . . . . . . . . . . . . . . . . . . . . . . 142
          15.2.  Features. . . . . . . . . . . . . . . . . . . . . . 144
          15.3.  Binding Updates to Home Agent . . . . . . . . . . . 145
          15.4.  Binding Updates to Correspondent Nodes. . . . . . . 148
                 15.4.1. Overview. . . . . . . . . . . . . . . . . . 149
                 15.4.2. Achieved Security Properties. . . . . . . . 149
                 15.4.3. Comparison to Regular IPv6 Communications . 150
                 15.4.4. Replay Attacks. . . . . . . . . . . . . . . 152
                 15.4.5. Denial-of-Service Attacks . . . . . . . . . 152
                 15.4.6. Key Lengths . . . . . . . . . . . . . . . . 153
          15.5.  Dynamic Home Agent Address Discovery. . . . . . . . 154
          15.6.  Mobile Prefix Discovery . . . . . . . . . . . . . . 155
          15.7.  Tunneling via the Home Agent. . . . . . . . . . . . 155
          15.8.  Home Address Option . . . . . . . . . . . . . . . . 156
          15.9.  Type 2 Routing Header . . . . . . . . . . . . . . . 156
   16.    Contributors . . . . . . . . . . . . . . . . . . . . . . . 157
   17.    Acknowledgements . . . . . . . . . . . . . . . . . . . . . 157
   18.    References . . . . . . . . . . . . . . . . . . . . . . . . 158
          18.1.  Normative References. . . . . . . . . . . . . . . . 158
          18.2.  Informative References. . . . . . . . . . . . . . . 159
   Appendix A.   Future Extensions . . . . . . . . . . . . . . . . . 161
          A.1.   Piggybacking. . . . . . . . . . . . . . . . . . . . 161
          A.2.   Triangular Routing. . . . . . . . . . . . . . . . . 161
          A.3.   New Authorization Methods . . . . . . . . . . . . . 161
          A.4.   Dynamically Generated Home Addresses. . . . . . . . 161
          A.5.   Remote Home Address Configuration . . . . . . . . . 162
          A.6.   Neighbor Discovery Extensions . . . . . . . . . . . 163

1. Introduction ๐Ÿ’–

Okay bestie, so this spec is all about letting nodes stay reachable while they wander around the IPv6 Internet ๐ŸŒโœจ. Without specific mobility support in IPv6 [11], packets aimed at a mobile node couldn't reach it once it's away from its home link ๐Ÿ˜ญ. You could just give the node a new IP address every time it moves to a new link, but then it can't keep its transport and higher-layer connections alive when it changes location. Mobility support in IPv6 matters a LOT, because mobile computers are probably going to make up a majority, or at least a big chunk, of the Internet population during the lifetime of IPv6 ๐Ÿ“ฑ๐Ÿ’….

The protocol in this document is called Mobile IPv6 ๐Ÿฆ‹. It lets a mobile node hop from one link to another without changing its "home address". Packets can still be routed to the node using that address, no matter where it's plugged into the Internet. The mobile node can also keep talking to other nodes, whether they're stationary or mobile, after it moves. So moving away from its home link is totally transparent to transport and higher-layer protocols and applications. It's giving seamless ๐Ÿซถ.

Mobile IPv6 is just as happy with homogeneous media as with heterogeneous media ๐ŸŒˆ. For example, it handles moving from one Ethernet segment to another just as well as moving from an Ethernet segment to a wireless LAN cell, and the mobile node keeps the same IP address through either move ๐ŸŽ€.

Here's the big picture: Mobile IPv6 is a solution to the network-layer mobility management problem ๐Ÿ‘‘. Some mobility management jobs have already been solved with link-layer techniques, like handover between wireless transceivers that each cover only a tiny geographic area ๐Ÿ“ก. In lots of current wireless LAN products, for example, link-layer mobility mechanisms let a mobile node "hand over" from one cell to another, re-establishing link-layer connectivity to the node in each new spot ๐Ÿ“.

Mobile IPv6 does NOT try to fix every problem that comes with mobile computers or wireless networks ๐Ÿ™ˆ. Specifically, this protocol does not try to solve:

  • Handling links with unidirectional connectivity or partial reachability, such as the hidden terminal problem where a host is hidden from only some of the routers on the link.
  • Access control on a link being visited by a mobile node.
  • Local or hierarchical forms of mobility management (similar to many current link-layer mobility management solutions).
  • Assistance for adaptive applications.
  • Mobile routers.
  • Service Discovery.
  • Distinguishing between packets lost due to bit errors vs. network congestion.

2. Comparison with Mobile IP for IPv4 ๐Ÿฆ‹

Mobile IPv6 learned a lot from building Mobile IP support for IPv4 (Mobile IPv4) [22, 23, 24], and it also gets to take advantage of everything IPv6 offers ๐Ÿ’œ. So it shares lots of features with Mobile IPv4, but it's built right into IPv6 and comes with a bunch of other upgrades โœจ. Here's the tea on the major differences:

  • There's no need to deploy special routers as "foreign agents", like you would in Mobile IPv4. Mobile IPv6 works in any location without needing any special support from the local router ๐Ÿ™Œ.
  • Route optimization is a fundamental part of the protocol, not a nonstandard pile of extensions ๐Ÿ’….
  • Mobile IPv6 route optimization can work securely even without pre-arranged security associations ๐Ÿ”. It's expected that route optimization can be deployed on a global scale between all mobile nodes and correspondent nodes ๐ŸŒธ.
  • Mobile IPv6 also has built-in support so route optimization can play nicely with routers that do "ingress filtering" [26] ๐Ÿงš.
  • The IPv6 Neighbor Unreachability Detection makes sure reachability is symmetric between the mobile node and its default router in the current location ๐Ÿ’ซ.
  • Most packets sent to a mobile node while it's away from home in Mobile IPv6 use an IPv6 routing header instead of IP encapsulation. That means less overhead compared to Mobile IPv4 ๐Ÿ“‰.
  • Mobile IPv6 isn't tied to any particular link layer, since it uses IPv6 Neighbor Discovery [12] instead of ARP. This also makes the protocol more robust ๐Ÿ’ช.
  • Using IPv6 encapsulation (and the routing header) means Mobile IPv6 doesn't have to manage "tunnel soft state" ๐Ÿงน.
  • The dynamic home agent address discovery mechanism in Mobile IPv6 sends back a single reply to the mobile node. The directed broadcast approach used in IPv4 sends separate replies from each home agent ๐Ÿ“ฌ.

3. Terminology ๐ŸŽ€

Okay, the vocab section is where things get precise, so pay attention ๐Ÿค“. The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119 [2] ๐Ÿ“–.

3.1. General Terms ๐Ÿงš

IP

Internet Protocol Version 6 (IPv6).

node

A device that implements IP.

router

A node that forwards IP packets not explicitly addressed to itself.

unicast routable address

An identifier for a single interface such that a packet sent to it from another IPv6 subnet is delivered to the interface identified by that address. So, a unicast routable address has to have either a global or site-local scope, but NOT link-local ๐ŸŒ.

host

Any node that is not a router.

link

A communication facility or medium over which nodes can communicate at the link layer, such as an Ethernet (simple or bridged). A link is the layer immediately below IP ๐Ÿ”—.

interface

A node's attachment to a link ๐Ÿ”Œ.

subnet prefix

A bit string that consists of some number of initial bits of an IP address.

interface identifier

A number used to identify a node's interface on a link. The interface identifier is the remaining low-order bits in the node's IP address after the subnet prefix ๐Ÿฐ.

link-layer address

A link-layer identifier for an interface, such as IEEE 802 addresses on Ethernet links.

packet

An IP header plus payload ๐Ÿ“ฆ.

security association

An IPsec security association is a cooperative relationship formed by the sharing of cryptographic keying material and associated context ๐Ÿ”‘. Security associations are simplex. That is, two security associations are needed to protect bidirectional traffic between two nodes, one for each direction โ†”๏ธ.

security policy database

A database that specifies what security services are to be offered to IP packets and in what fashion ๐Ÿ›ก๏ธ.

destination option

Destination options are carried by the IPv6 Destination Options extension header. Destination options include optional information that need be examined only by the IPv6 node given as the destination address in the IPv6 header, not by routers in between. Mobile IPv6 defines one new destination option, the Home Address destination option (see Section 6.3) ๐Ÿ .

routing header

A routing header may be present as an IPv6 header extension, and indicates that the payload has to be delivered to a destination IPv6 address in some way that is different from what would be carried out by standard Internet routing ๐Ÿ—บ๏ธ. In this document, use of the term "routing header" typically refers to use of a type 2 routing header, as specified in Section 6.4 ๐Ÿ’œ.

"|" (concatenation)

Some formulas in this specification use the symbol | to indicate bytewise concatenation, as in A | B. This concatenation requires that all of the octets of the datum A appear first in the result, followed by all of the octets of the datum B ๐Ÿงฉ.

First (size, input)

Some formulas in this specification use a functional form First (size, input) to indicate truncation of the "input" data so that only the first "size" bits remain to be used โœ‚๏ธ.

3.2. Mobile IPv6 Terms

home address ๐Ÿ  A unicast routable address given to a mobile node, which serves as its permanent address. This address sits within the mobile node's home link. Standard IP routing mechanisms will deliver packets aimed at a mobile node's home address to its home link. A mobile node can have multiple home addresses, for instance when there are multiple home prefixes on the home link. ๐Ÿ’–

home subnet prefix ๐ŸŒธ The IP subnet prefix that corresponds to a mobile node's home address.

home link ๐ŸŽ€ The link where a mobile node's home subnet prefix is defined.

mobile node ๐Ÿฆ‹ A node that can switch its point of attachment from one link to another, and is still reachable through its home address. Main character energy, literally. โœจ

movement ๐Ÿงš A change in a mobile node's point of attachment to the Internet, so that it is no longer connected to the same link it was on before. If a mobile node isn't currently attached to its home link, it's said to be "away from home." ๐Ÿกโžก๏ธโœˆ๏ธ

L2 handover ๐Ÿ” The process where a mobile node switches from one link-layer connection to another. For example, changing wireless access points counts as an L2 handover. ๐Ÿ“ถ

L3 handover ๐ŸŒˆ After an L2 handover, a mobile node notices a change in an on-link subnet prefix that would require it to change its primary care-of address. For example, switching to a different access router after changing wireless access points typically results in an L3 handover. It's giving layers, bestie. ๐Ÿ’…

correspondent node ๐Ÿซถ A peer node that a mobile node is communicating with. The correspondent node can be mobile or stationary, so don't assume either one. ๐Ÿค

foreign subnet prefix ๐ŸŒ Any IP subnet prefix other than the mobile node's home subnet prefix. ๐Ÿ’œ

foreign link ๐Ÿ›ซ Any link other than the mobile node's home link. โœˆ๏ธ

care-of address ๐Ÿ’Œ A unicast routable address linked to a mobile node while it's visiting a foreign link. The subnet prefix of this IP address is a foreign subnet prefix. A mobile node can have several care-of addresses at once, for example with different subnet prefixes. Out of all of those, the one registered with the mobile node's home agent for a given home address is called its "primary" care-of address. The one that matters most, iykyk. ๐Ÿ‘‘

home agent ๐Ÿฐ A router on a mobile node's home link where the mobile node has registered its current care-of address. While the mobile node is away from home, the home agent intercepts packets on the home link that are destined for the mobile node's home address, encapsulates them, and tunnels them to the mobile node's registered care-of address. The loyal bodyguard of the group chat. ๐Ÿ›ก๏ธ๐Ÿ’–

binding ๐Ÿ”— The association between a mobile node's home address and a care-of address for that mobile node, along with how much lifetime that association has left. โณ

registration ๐Ÿ“ The process where a mobile node sends a Binding Update to its home agent or to a correspondent node, which causes a binding for the mobile node to get registered. โœ…

mobility message ๐Ÿ“จ A message that contains a Mobility Header (see Section 6.1). ๐ŸŽ€

binding authorization ๐Ÿ” Correspondent registration has to be authorized so the recipient can believe that the sender actually has the right to specify a new binding. No authorization, no binding, no cap. ๐Ÿ™…โ€โ™€๏ธ

return routability procedure ๐Ÿชช The return routability procedure authorizes registrations through a cryptographic token exchange. Very secure, very dramatic, very iconic. ๐Ÿ˜ญ๐Ÿ”ฅ

correspondent registration ๐Ÿค™ A return routability procedure followed by a registration, run between the mobile node and a correspondent node. ๐Ÿ’ซ

home registration ๐Ÿก A registration between the mobile node and its home agent, authorized by using IPsec. ๐Ÿ”’

nonce ๐ŸŽฒ Nonces are random numbers that the correspondent node uses internally when creating keygen tokens for the return routability procedure. They aren't specific to any one mobile node, and they're kept secret inside the correspondent node. Shh, it's a secret. ๐Ÿคซ

nonce index ๐Ÿ—‚๏ธ A nonce index shows which nonces were used when creating keygen token values, without actually revealing the nonces themselves. Clever, right? ๐Ÿง 

cookie ๐Ÿช A cookie is a random number that a mobile node uses to stop a bogus correspondent node from spoofing it in the return routability procedure. Not the snack, the security measure. ๐Ÿ™ˆ

care-of init cookie ๐Ÿช A cookie that gets sent to the correspondent node in the Care-of Test Init message, and then comes back in the Care-of Test message. ๐Ÿ”„

home init cookie ๐Ÿช A cookie that gets sent to the correspondent node in the Home Test Init message, and then comes back in the Home Test message. ๐Ÿ”„

keygen token ๐Ÿ”‘ A keygen token is a number supplied by a correspondent node during the return routability procedure. It lets the mobile node compute the binding management key it needs to authorize a Binding Update. Key energy. ๐Ÿ’œ

care-of keygen token ๐Ÿ—๏ธ A keygen token sent by the correspondent node in the Care-of Test message.

home keygen token ๐Ÿ—๏ธ A keygen token sent by the correspondent node in the Home Test message.

binding management key (Kbm) ๐Ÿ‘‘๐Ÿ” A binding management key (Kbm) is a key used to authorize a binding cache management message, such as a Binding Update or a Binding Acknowledgement. Return routability gives you a way to create a binding management key. The final boss of this whole section. ๐Ÿ†


4. Overview of Mobile IPv6 โœจ

4.1. Basic Operation

Okay so, a mobile node is always supposed to be reachable at its home address, whether it's currently sitting on its home link or wandering away from home. The "home address" is an IP address given to the mobile node inside its home subnet prefix on its home link. While the mobile node is at home, packets addressed to its home address get routed to the mobile node's home link using normal Internet routing. Simple, stable, iconic. ๐Ÿ ๐Ÿ’–

While a mobile node is attached to some foreign link away from home, it's also reachable at one or more care-of addresses. A care-of address is an IP address linked to a mobile node that has the subnet prefix of a particular foreign link. The mobile node can get its care-of address through regular IPv6 mechanisms, like stateless or stateful auto-configuration. As long as the mobile node stays in that spot, packets sent to this care-of address will be routed to the mobile node. The mobile node can also accept packets from several care-of addresses, like when it's on the move but still reachable at the previous link. Multitasking, but make it networking. ๐Ÿฆ‹โœจ

The association between a mobile node's home address and its care-of address is called a "binding" for the mobile node. While away from home, a mobile node registers its primary care-of address with a router on its home link, asking that router to act as the "home agent" for the mobile node. The mobile node does this binding registration by sending a "Binding Update" message to the home agent. The home agent replies by sending back a "Binding Acknowledgement" message. How the mobile node behaves is specified in Section 11, and how the home agent behaves is specified in Section 10. ๐Ÿ“ฎ๐Ÿ’Œ

Any node communicating with a mobile node is called a "correspondent node" of the mobile node in this document, and it can be either a stationary node or a mobile node itself. Mobile nodes can share information about their current location with correspondent nodes. This happens through the correspondent registration. As part of this procedure, a return routability test is performed to authorize setting up the binding. How the correspondent node behaves is specified in Section 9. ๐Ÿค๐Ÿซถ

There are two possible modes for communication between the mobile node and a correspondent node. The first mode, bidirectional tunneling, doesn't require Mobile IPv6 support from the correspondent node. It's also available even if the mobile node hasn't registered its current binding with the correspondent node. Packets coming from the correspondent node get routed to the home agent and then tunneled to the mobile node. Packets going to the correspondent node get tunneled from the mobile node to the home agent ("reverse tunneled") and then routed normally from the home network to the correspondent node. In this mode, the home agent uses proxy Neighbor Discovery to intercept any IPv6 packets addressed to the mobile node's home address (or home addresses) on the home link. Each intercepted packet gets tunneled to the mobile node's primary care-of address. This tunneling uses IPv6 encapsulation [15]. Tunnel vision, but make it cute. ๐Ÿš‡๐ŸŽ€

The second mode, "route optimization", requires the mobile node to register its current binding at the correspondent node. Packets from the correspondent node can be routed directly to the mobile node's care-of address. When sending a packet to any IPv6 destination, the correspondent node checks its cached bindings for an entry matching the packet's destination address. If it finds a cached binding for that destination address, the node uses a new type of IPv6 routing header [11] (see Section 6.4) to route the packet to the mobile node through the care-of address listed in that binding. Shortcut unlocked. ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ

Routing packets straight to the mobile node's care-of address gives you the shortest communications path. It also takes the load off the mobile node's home agent and home link. On top of that, the impact of any failure of the home agent, or of networks on the path to or from it, gets reduced. Less drama, more flow. ๐ŸŒŠ๐Ÿ’…

When routing packets directly to the mobile node, the correspondent node sets the Destination Address in the IPv6 header to the mobile node's care-of address. A new type of IPv6 routing header (see Section 6.4) is also added to the packet to carry the desired home address. In the same way, the mobile node sets the Source Address in the packet's IPv6 header to its current care-of address. The mobile node adds a new IPv6 "Home Address" destination option (see Section 6.3) to carry its home address. Including the home addresses in these packets makes the care-of address invisible above the network layer, like at the transport layer. The transport layer never even knows the difference. ๐Ÿซฃ๐Ÿฆ‹

Mobile IPv6 also supports multiple home agents, plus limited support for reconfiguring the home network. In these cases, the mobile node might not know the IP address of its own home agent, and the home subnet prefixes might change over time. A mechanism called "dynamic home agent address discovery" lets a mobile node find out the IP address of a home agent on its home link, even when the mobile node is away from home. Mobile nodes can also learn new information about home subnet prefixes through the "mobile prefix discovery" mechanism. These mechanisms are described starting from Section 6.5. Next up, the plot thickens. ๐Ÿ“–๐Ÿ‘€

4.2. New IPv6 Protocol โœจ

Okay so Mobile IPv6 brings in a brand-new IPv6 protocol ๐Ÿ’… that rides on the Mobility Header (see Section 6.1) ๐Ÿฆ‹. That header carries these messages:

  • Home Test Init ๐Ÿงš
  • Home Test ๐Ÿงš
  • Care-of Test Init ๐Ÿงš
  • Care-of Test ๐Ÿงš

These four are the return routability crew ๐Ÿซถ. They're used to run the return routability procedure from the mobile node to a correspondent node, and that's what makes later Binding Updates authorized, as covered in Section 5.2.5. Iconic teamwork, honestly.

  • Binding Update ๐Ÿ“ฉ: A mobile node uses this to tell a correspondent node, or its home agent, where its current binding is. The Binding Update sent to the home agent to register its primary care-of address gets marked as a "home registration" ๐Ÿ .
  • Binding Acknowledgement โœ…: This is the reply that confirms a Binding Update was received. It gets sent if an acknowledgement was asked for in the Binding Update, if the Binding Update went to a home agent, or if something went wrong ๐Ÿ’€.
  • Binding Refresh Request ๐Ÿ”„: A correspondent node sends this to ask a mobile node to set up its binding again. It's usually used when the cached binding is still being actively used but its lifetime is almost up. The correspondent node may use things like recent traffic and open transport layer connections as signs of active use, which is so smart ๐Ÿง .
  • Binding Error ๐Ÿšจ: The correspondent node uses this to flag a mobility-related error, like trying to use the Home Address destination option when there's no binding to back it up ๐Ÿ™ˆ.

4.3. New IPv6 Destination Option ๐ŸŽ€

Mobile IPv6 also adds a new IPv6 destination option, the Home Address destination option. You can read all the details in Section 6.3 ๐Ÿ’–.

4.4. New IPv6 ICMP Messages ๐Ÿ“

Mobile IPv6 introduces four brand-new ICMP message types ๐ŸŒˆ. Two are for dynamic home agent address discovery, and two are for renumbering and mobile configuration. The two discovery ones are described in Section 10.5 and Section 11.4.1:

  • Home Agent Address Discovery Request, described in Section 6.5.
  • Home Agent Address Discovery Reply, described in Section 6.6.

The next two handle network renumbering and address configuration on the mobile node, as described in Section 10.6:

  • Mobile Prefix Solicitation, described in Section 6.7.
  • Mobile Prefix Advertisement, described in Section 6.8.

4.5. Conceptual Data Structure Terminology ๐Ÿ—‚๏ธ

This document describes Mobile IPv6 using a few conceptual data structures, and they're a whole vibe ๐ŸŒธ:

  • Binding Cache ๐Ÿ’พ: A cache of bindings for other nodes. Home agents and correspondent nodes maintain it. It holds both "correspondent registration" entries (see Section 9.1) and "home registration" entries (see Section 10.1).
  • Binding Update List ๐Ÿ“: Each mobile node keeps this list. It has an item for every binding the mobile node has, or is trying to set up, with a specific other node. Correspondent and home registrations both show up here. Entries get deleted as their binding lifetimes run out. See Section 11.1.
  • Home Agents List ๐Ÿ‘‘: Home agents need to know which other home agents are on the same link, and that info lives in the Home Agents List. More detail is in Section 10.1. The list is used to inform mobile nodes during dynamic home agent address discovery.

4.6. Site-Local Addressability ๐ŸŒ

This specification requires that home and care-of addresses MUST be unicast routable addresses. Site-local addresses might be usable on networks that aren't connected to the Internet, but this specification doesn't define when that usage is safe. Mobile nodes may not even know which site they're in, it's hard to stop accidental attachment to other sites, and site-local addresses can get ambiguous and cause problems if the home and visited networks use the same ones ๐Ÿ˜ญ. So site-local addresses SHOULD NOT be used as home or care-of addresses. No cap, avoid them ๐Ÿ™…โ€โ™€๏ธ.


5. Overview of Mobile IPv6 Security ๐Ÿ”

This specification comes with a bunch of security features ๐Ÿ’œ. They protect Binding Updates going to both home agents and correspondent nodes, they protect mobile prefix discovery, and they protect the mechanisms Mobile IPv6 uses to transport data packets. Serious bodyguard energy ๐Ÿ’ช.

Binding Updates are protected by IPsec extension headers, or by the Binding Authorization Data option. That option uses a binding management key, Kbm, which can be set up through the return routability procedure ๐Ÿ—๏ธ. Mobile prefix discovery is protected by IPsec extension headers. Mechanisms for transporting payload packets, like the Home Address destination option and the type 2 routing header, were specified so that they're restricted in how attackers can use them ๐Ÿ›ก๏ธ.

5.1. Binding Updates to Home Agents ๐Ÿ 

The mobile node and the home agent MUST use an IPsec security association to protect the integrity and authenticity of the Binding Updates and Acknowledgements. Both mobile nodes and home agents MUST support the Encapsulating Security Payload (ESP) [6] header, and they SHOULD use it in transport mode. They MUST also use a non-NULL payload authentication algorithm to get data origin authentication, connectionless integrity, and optional anti-replay protection. Authentication Header (AH) [5] is possible too, but it's left out here for brevity ๐Ÿซ .

To protect messages between the mobile node and the home agent with IPsec, appropriate security policy database entries must be created. A mobile node must be stopped from using its security association to send a Binding Update on behalf of another mobile node using the same home agent. This MUST be achieved by having the home agent check that the given home address has been used with the right security association. The IPsec processing provides that check, because the security policy database entries must unequivocally identify a single security association for protecting Binding Updates between any given home address and home agent ๐Ÿ”. For this to work, the mobile node's home address has to be visible in the Binding Updates and Acknowledgements. It shows up as a source or destination, or in the Home Address destination option or the type 2 routing header.

As with all IPsec security associations in this specification, manual configuration of security associations MUST be supported. The shared secrets used MUST be random and unique for different mobile nodes, and MUST be distributed off-line to the mobile nodes ๐Ÿ”‘.

Automatic key management with IKE [9] MAY be supported โœจ. When IKE is used, either the security policy database entries or the Mobile IPv6 processing MUST unequivocally identify the IKE phase 1 credentials that can be used to authorize creating security associations for protecting Binding Updates for a particular home address. How these mappings are maintained is outside the scope of this specification, but they may be kept, for instance, as a locally administered table in the home agent ๐Ÿ“‹. If the phase 1 identity is a Fully Qualified Domain Name (FQDN), secure forms of DNS may also be used.

Section 11.3.2 explains that IKE connections to the home agent need careful handling of the addresses used to carry IKE. That's needed so a Binding Update isn't required before the IKE exchange that's supposed to secure the Binding Update. Big brain stuff ๐Ÿง .

When IKE version 1 is used with preshared secret authentication between the mobile node and the home agent, aggressive mode MUST be used.

The ID_IPV6_ADDR Identity Payload MUST NOT be used in IKEv1 phase 1 ๐Ÿšซ.

Reference [21] has a more detailed description, plus examples, of using IPsec to protect communications between the mobile node and the home agent ๐Ÿ“š.

5.2. Binding Updates to Correspondent Nodes ๐Ÿค

Protecting Binding Updates sent to correspondent nodes doesn't need security associations to be configured, and it doesn't need an authentication infrastructure between mobile nodes and correspondent nodes ๐Ÿ™Œ. Instead, a method called the return routability procedure makes sure the right mobile node is the one sending the message. This method doesn't protect against attackers who sit on the path between the home network and the correspondent node. But attackers in that spot could do the same attacks even without Mobile IPv6, so no shade there ๐Ÿซถ. The big win is that return routability limits potential attackers to people with access to one specific path in the Internet, and it blocks forged Binding Updates from anywhere else on the Internet ๐Ÿšง. For a deeper look at the security properties of return routability, see Section 15 ๐Ÿ”ฌ.

The integrity and authenticity of Binding Update messages to correspondent nodes is protected with a keyed-hash algorithm. The binding management key, Kbm, keys the hash algorithm for this ๐Ÿ”. Kbm is set up using data exchanged during the return routability procedure. That exchange uses node keys, nonces, cookies, tokens, and certain cryptographic functions ๐Ÿง. Section 5.2.5 outlines the basic return routability procedure, and Section 5.2.6 shows how the results are used to authorize a Binding Update to a correspondent node.

5.2.1. Node Keys ๐Ÿ—๏ธ

Each correspondent node has a secret key, Kcn, called the "node key". It uses this key to produce the keygen tokens it sends to mobile nodes ๐Ÿ’ซ. The node key MUST be a random number, 20 octets in length. It lets the correspondent node check that the keygen tokens a mobile node uses to authorize a Binding Update really are its own. This key MUST NOT be shared with any other entity ๐Ÿคซ.

A correspondent node MAY generate a fresh node key at any time, which avoids needing secure persistent key storage ๐ŸŒท. Procedures for optionally updating the node key are discussed later, in Section 5.2.7.

5.2.2. Nonces ๐ŸŽ€

okay so bestie, each correspondent node also generates nonces at regular intervals ๐Ÿ”โœจ and they SHOULD be generated with a random number generator that's known to have good randomness properties [1]. ngl that's the whole vibe, because predictable nonces are a total disaster ๐Ÿ’€. A correspondent node MAY use the same Kcn and nonce with all the mobiles it is in communication with ๐Ÿฆ‹.

Every nonce gets its own nonce index ๐Ÿงš. When a new nonce is generated, it MUST be associated with a new nonce index. One way to do this is by incrementing the previous nonce index, if the index is used as an array pointer into a linear array of nonces ๐ŸŒธ. BUT there is no requirement that nonces be stored that way, and the values of later nonce indices don't have to have any particular relationship to each other ๐Ÿซถ. The index gets sent in the protocol, so if a nonce gets swapped out for a new one mid-protocol, the correspondent node can tell which messages should be checked against the old nonce and which ones against the new nonce ๐Ÿ’…. Strictly speaking, the indices aren't needed for the authentication itself, but they let the correspondent node quickly find the nonce it used to make a keygen token ๐Ÿ™ˆ.

Correspondent nodes keep the current nonce plus a small set of valid previous nonces whose lifetime hasn't expired yet โญ. Expired values MUST be discarded ๐Ÿ—‘๏ธ, and messages using stale or unknown indices will be rejected ๐Ÿšซ.

The specific nonce index values can't be used by mobile nodes to figure out whether a nonce is still valid ๐Ÿ™…โ€โ™€๏ธ. The expected validity times for the nonce values, and the procedures for updating them, are covered later in Section 5.2.7 ๐Ÿ‘‘.

A nonce is an octet string of any length. The RECOMMENDED length is 64 bits ๐Ÿ’œ.


5.2.3. Cookies and Tokens ๐Ÿ“

The return routability address test procedure uses cookies and keygen tokens as opaque values inside the test init and test messages, respectively ๐ŸŒˆ.

o The "home init cookie" and "care-of init cookie" are 64 bit values sent to the correspondent node from the mobile node, and later returned to the mobile node ๐Ÿ’–. The home init cookie is sent in the Home Test Init message and returned in the Home Test message. The care-of init cookie is sent in the Care-of Test Init message and returned in the Care-of Test message ๐ŸŽ€.

o The "home keygen token" and "care-of keygen token" are 64-bit values sent by the correspondent node to the mobile node via the home agent (via the Home Test message) and the care-of address (by the Care-of Test message), respectively ๐Ÿฆ‹.

The mobile node SHOULD set the home init or care-of init cookie to a newly generated random number in every Home or Care-of Test Init message it sends ๐Ÿ”ฅ. The cookies are used to verify that the Home Test or Care-of Test message matches the Home Test Init or Care-of Test Init message, respectively ๐Ÿง. These cookies also make sure that parties who have not seen the request can't spoof responses ๐Ÿ›ก๏ธ.

Home and care-of keygen tokens are produced by the correspondent node based on its currently active secret key (Kcn) and nonces, as well as the home or care-of address (respectively) ๐Ÿ”‘. A keygen token is valid as long as both the secret key (Kcn) and the nonce used to create it are valid โœจ.


5.2.4. Cryptographic Functions ๐Ÿงช

In this specification, the function used to compute hash values is SHA1 [20] ๐Ÿฅฃ. Message Authentication Codes (MACs) are computed using HMAC_SHA1 [25, 20] ๐Ÿ’œ. HMAC_SHA1(K,m) denotes such a MAC computed on message m with key K ๐ŸŒธ.

5.2.5. Return Routability Procedure ๐Ÿฆ‹

okay bestie, this is the big one ๐Ÿ’… The Return Routability Procedure lets the correspondent node get some reasonable assurance that the mobile node is actually reachable at its claimed care-of address AND at its home address. ๐Ÿ โœจ Only once it has that assurance can the correspondent node accept Binding Updates from the mobile node, which then tell it to send that mobile node's data traffic to the claimed care-of address. Main character energy, but make it secure ๐Ÿ”

So how does it check? It tests whether packets sent to the two claimed addresses actually get routed to the mobile node ๐Ÿ“ฌ The mobile node only passes if it can prove it received certain data (the "keygen tokens") that the correspondent node sent to those addresses. The mobile node combines those pieces into a binding management key, called Kbm ๐Ÿ”‘

Here's the message flow, the four messages that make up the whole procedure ๐Ÿ‘€

   Mobile node                 Home agent           Correspondent node
        |                                                     |
        |  Home Test Init (HoTI)   |                          |
        |------------------------->|------------------------->|
        |                          |                          |
        |  Care-of Test Init (CoTI)                           |
        |---------------------------------------------------->|
        |                                                     |
        |                          |  Home Test (HoT)         |
        |<-------------------------|<-------------------------|
        |                          |                          |
        |                             Care-of Test (CoT)      |
        |<----------------------------------------------------|
        |                                                     |

The Home Test Init and Care-of Test Init messages get sent at the same time ๐Ÿš€ The whole thing needs very little work from the correspondent node, so the Home Test and Care-of Test replies can come back fast, maybe almost at the same moment โšก These four messages together are the return routability procedure, iykyk ๐Ÿซถ

Home Test Init ๐Ÿ’Œ

A mobile node sends a Home Test Init message to the correspondent node (via the home agent) to get the home keygen token. Here's the vibe of the message:

  • Source Address = home address
  • Destination Address = correspondent
  • Parameters:
    • home init cookie

The Home Test Init message tells the correspondent node the mobile node's home address ๐Ÿก It also sends along a home init cookie, which the correspondent node has to send back later ๐Ÿช This message gets reverse tunneled through the home agent. (The headers and addresses for reverse tunneling got left out of the bit above, so no stress ๐Ÿ™ˆ) The mobile node holds onto these cookie values so it can have some assurance that its protocol messages are being handled by the correspondent node it actually wants ๐ŸŽฏ

Care-of Test Init ๐Ÿงณ

The mobile node sends a Care-of Test Init message to the correspondent node (directly, NOT through the home agent) to get the care-of keygen token. The contents look like this:

  • Source Address = care-of address
  • Destination Address = correspondent
  • Parameters:
    • care-of init cookie

This one tells the correspondent node the mobile node's care-of address โœˆ๏ธ It also carries a care-of init cookie that the correspondent node must return later ๐Ÿช It gets sent straight to the correspondent node, no detours.

Home Test ๐Ÿ ๐Ÿ’œ

The Home Test message is the reply to a Home Test Init. It goes via the home agent, and the contents are:

  • Source Address = correspondent
  • Destination Address = home address
  • Parameters:
    • home init cookie
    • home keygen token
    • home nonce index

When the correspondent node gets the Home Test Init, it makes a home keygen token like this:

home keygen token :=
     First (64, HMAC_SHA1 (Kcn, (home address | nonce | 0)))

where | means concatenation. That final "0" inside the HMAC_SHA1 is a single zero octet, and its job is to tell home cookies apart from care-of cookies ๐Ÿง 

The home keygen token is made from the first 64 bits of the MAC. It checks that the mobile node can receive messages sent to its home address ๐Ÿ“ฅ Kcn goes into making the home keygen token so the correspondent node can verify that it made the home and care-of nonces itself, without having to remember a giant list of every token it's ever handed out ๐Ÿง โœจ big brain moves

The Home Test message gets sent to the mobile node through the home network, and it's assumed the home agent will tunnel it along to the mobile node ๐Ÿš‡ That means the mobile node has to have already sent a Binding Update to the home agent, so the home agent has received and authorized the new care-of address before the return routability procedure starts ๐Ÿ“ For extra security, the data moving between the home agent and the mobile node is protected so it can't be inspected or hit by passive attacks ๐Ÿ›ก๏ธ That protection comes from encrypting the home keygen token as it's tunneled from the home agent to the mobile node, as specified in Section 10.4.6. The security properties of this extra protection are talked about in Section 15.4.1 ๐Ÿ”

The home init cookie from the mobile node comes back in the Home Test message. This makes sure the message really came from a node on the route between the home agent and the correspondent node ๐Ÿ›ฃ๏ธ

The home nonce index gets delivered to the mobile node so the correspondent node can later find the nonce value it used to make the home keygen token, quickly and easily ๐Ÿ”

Care-of Test ๐Ÿงณ๐Ÿ’–

This message is the reply to a Care-of Test Init. It is NOT sent via the home agent. It goes directly to the mobile node. The contents are:

  • Source Address = correspondent
  • Destination Address = care-of address
  • Parameters:
    • care-of init cookie
    • care-of keygen token
    • care-of nonce index

When the correspondent node gets the Care-of Test Init, it makes a care-of keygen token like this:

care-of keygen token :=
   First (64, HMAC_SHA1 (Kcn, (care-of address | nonce | 1)))

Here, the final "1" inside the HMAC_SHA1 function is a single octet with the hex value 0x01, and it's there to tell home and care-of cookies apart ๐Ÿงฉ The keygen token is made from the first 64 bits of the MAC, and it gets sent directly to the mobile node at its care-of address ๐Ÿ“ฌ The care-of init cookie from the Care-of Test Init comes back too, so the message is confirmed to come from a node on the route to the correspondent node ๐Ÿ›ฃ๏ธ

The care-of nonce index tells the mobile node which nonce was used for the care-of keygen token ๐Ÿ”ข The home and care-of nonce indices MAY be the same, or they MAY be different, in the Home and Care-of Test messages. Either is totally fine ๐Ÿซถ

Once the mobile node has BOTH the Home Test and Care-of Test messages, the return routability procedure is complete ๐ŸŽ‰ At that point it has everything it needs to send a Binding Update to the correspondent node ๐Ÿ’Œ The mobile node hashes the tokens together into a 20 octet binding key, Kbm:

Kbm = SHA1 (home keygen token | care-of keygen token)

A Binding Update can also be used to delete a binding that was set up earlier (Section 6.1.7). In that case the care-of keygen token is NOT used. Instead, the binding management key gets made like this:

Kbm = SHA1(home keygen token)

One more thing, and it's a lowkey important one ๐Ÿ‘€ The correspondent node doesn't create any state for the mobile node until it gets the Binding Update from that mobile node ๐Ÿšซ๐Ÿ—‚๏ธ It also doesn't keep the value of the binding management key Kbm. It makes Kbm again whenever it's given the nonce indices and the mobile node's addresses ๐Ÿ” Stateless and iconic ๐Ÿ’…โœจ

5.2.6. Authorizing Binding Management Messages โœจ

Okay bestie, once the mobile node has made its binding management key (Kbm) ๐Ÿ”‘, it can finally send a verifiable Binding Update to the correspondent node ๐Ÿ’Œ. This section is the overview of that handshake, and the figure below shows the message flow ๐Ÿ‘‡

   Mobile node                                Correspondent node
        |                                               |
        |             Binding Update (BU)               |
        |---------------------------------------------->|
        |  (MAC, seq#, nonce indices, care-of address)  |
        |                                               |
        |                                               |
        |    Binding Acknowledgement (BA) (if sent)     |
        |<----------------------------------------------|
        |              (MAC, seq#, status)              |

Binding Update ๐Ÿ’–

To authorize a Binding Update, the mobile node creates a binding management key Kbm from the keygen tokens, just like we went over in the previous section. The Binding Update includes the following:

  • Source Address = care-of address
  • Destination Address = correspondent
  • Parameters:
    • home address (within the Home Address destination option if different from the Source Address)
    • sequence number (within the Binding Update message header)
    • home nonce index (within the Nonce Indices option)
    • care-of nonce index (within the Nonce Indices option)
    • First (96, HMAC_SHA1 (Kbm, (care-of address | correspondent | BU)))

The Binding Update has a Nonce Indices option, which tells the correspondent node which home and care-of nonces to use to recompute Kbm, the binding management key ๐Ÿงฉ. The MAC is computed as described in Section 6.2.7, using the correspondent node's address as the destination address and the Binding Update message itself ("BU" above) as the MH Data. Once the correspondent node has verified the MAC, it can create a Binding Cache entry for the mobile ๐ŸŽ‰.

Binding Acknowledgement ๐ŸŽ€

The Binding Update is in some cases acknowledged by the correspondent node. The contents of that message are as follows:

  • Source Address = correspondent
  • Destination Address = care-of address
  • Parameters:
    • sequence number (within the Binding Update message header)
    • First (96, HMAC_SHA1 (Kbm, (care-of address | correspondent | BA)))

The Binding Acknowledgement has the same sequence number as the Binding Update. The MAC is computed as described in Section 6.2.7, using the correspondent node's address as the destination address and the message itself ("BA" above) as the MH Data.

Bindings set up with correspondent nodes using keys made through the return routability procedure MUST NOT exceed MAX_RR_BINDING_LIFETIME seconds (see Section 12) โณ.

The Source Address field in the IPv6 header carrying the Binding Update is usually also the care-of address used in the binding. However, a different care-of address MAY be specified by including an Alternate Care-of Address mobility option in the Binding Update (see Section 6.2.5). When a message like that is sent to the correspondent node and the return routability procedure is the authorization method, the Care-of Test Init and Care-of Test messages MUST have been performed for the address in the Alternate Care-of Address option (not the Source Address) ๐Ÿ•ต๏ธโ€โ™€๏ธ. The nonce indices and MAC value MUST be based on information gained in this test.

Binding Updates can also be sent to delete a previously established binding ๐Ÿ—‘๏ธ. In this case, generating the binding management key depends exclusively on the home keygen token, and the care-of nonce index is ignored.


5.2.7. Updating Node Keys and Nonces โœจ

Correspondent nodes generate nonces at regular intervals ๐Ÿ”„. It is recommended to keep each nonce (identified by a nonce index) acceptable for at least MAX_TOKEN_LIFETIME seconds (see Section 12) after it has first been used to build a return routability message response. However, the correspondent node MUST NOT accept nonces beyond MAX_NONCE_LIFETIME seconds (see Section 12) after the first use. Since the difference between these two constants is 30 seconds, a convenient way to enforce the lifetimes above is to generate a new nonce every 30 seconds ๐Ÿง. The node can then keep accepting tokens that were based on the last 8 (MAX_NONCE_LIFETIME / 30) nonces. This means tokens are acceptable from MAX_TOKEN_LIFETIME to MAX_NONCE_LIFETIME seconds after they were sent to the mobile node, depending on whether the token was sent at the beginning or the end of that first 30 second period.

Note that the correspondent node may also try to generate new nonces on demand, or only if the old nonces have been used. That works, as long as the correspondent node keeps track of how long ago the nonces were first used, and it does not generate new nonces on every return routability request ๐Ÿ‘€.

Because of resource limitations, quick deletion of bindings, or reboots, the correspondent node may not always recognize the nonces the tokens were based on ๐Ÿ˜ฌ. If a nonce index is unrecognized, the correspondent node replies with an error code in the Binding Acknowledgement (either 136, 137, or 138, as discussed in Section 6.1.8). The mobile node can then retry the return routability procedure.

An update of Kcn SHOULD be done at the same time as an update of a nonce, so that nonce indices can identify both the nonce and the key ๐Ÿ”. Old Kcn values therefore have to be remembered for as long as old nonce values are.

Since the tokens are normally expected to be usable for MAX_TOKEN_LIFETIME seconds, the mobile node MAY use them beyond a single run of the return routability procedure, until MAX_TOKEN_LIFETIME expires. After that, the mobile node SHOULD NOT use the tokens. A fast moving mobile node MAY reuse a recent home keygen token from a correspondent node when it moves to a new location, and just get a new care-of keygen token to show routability in that new location ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ.

This doesn't cut the number of round-trips, since the home and care-of return routability tests are processed at the same time. But there are fewer messages exchanged, and a potentially long round-trip through the home agent is skipped. So this optimization is often useful โœจ. A mobile node with multiple home addresses MAY also use the same care-of keygen token for Binding Updates concerning all of those addresses ๐Ÿ’….


5.2.8. Preventing Replay Attacks ๐Ÿšซ

The return routability procedure also protects the participants against replayed Binding Updates, using the sequence number and a MAC. Be careful when removing bindings at the correspondent node, though ๐Ÿ™ˆ. Correspondent nodes must keep bindings and the associated sequence number information at least as long as the nonces used to authorize the binding are still valid. If memory is very tight, the correspondent node MAY invalidate the nonces that were used for the binding being deleted (or some larger group of nonces they belong to). This may, however, affect the ability to accept Binding Updates from mobile nodes that recently got keygen tokens. So this alternative is recommended only as a last measure ๐Ÿ†˜.


5.3. Dynamic Home Agent Address Discovery ๐Ÿ 

No security is required for dynamic home agent address discovery ๐ŸŒท.


5.4. Mobile Prefix Discovery ๐Ÿงš

The mobile node and the home agent SHOULD use an IPsec security association to protect the integrity and authenticity of the Mobile Prefix Solicitations and Advertisements ๐Ÿ”’. Both the mobile nodes and the home agents MUST support, and SHOULD use, the Encapsulating Security Payload (ESP) header in transport mode with a non-NULL payload authentication algorithm, to provide data origin authentication, connectionless integrity, and optional anti-replay protection ๐Ÿ’œ.


5.5. Payload Packets ๐Ÿ“ฆ

Payload packets exchanged with mobile nodes can be protected the usual way, the same way stationary hosts protect theirs ๐Ÿซถ. However, Mobile IPv6 adds the Home Address destination option, a routing header, and tunneling headers to the payload packets. Below, we define the security measures taken to protect these, and to stop them from being used in attacks against other parties ๐Ÿ›ก๏ธ.

This specification limits use of the Home Address destination option to situations where the correspondent node already has a Binding Cache entry for the given home address. This keeps the Home Address option out of the attacks described in Section 15.1 ๐Ÿ™…โ€โ™€๏ธ.

Mobile IPv6 uses a Mobile IPv6 specific type of routing header. This type gives the necessary functionality without opening up the vulnerabilities discussed in Section 15.1 ๐ŸŽ€.

Tunnels between the mobile node and the home agent are protected by making sure source addresses are used properly, plus optional cryptographic protection ๐Ÿ”. The mobile node checks that the outer IP address matches its home agent. The home agent checks that the outer IP address matches the current location of the mobile node (Binding Updates sent to the home agents are secure). The home agent identifies the mobile node through the source address of the inner packet. (Typically, this is the home address of the mobile node, but it can also be a link-local address, as discussed in Section 10.4.2. To recognize the latter type of address, the home agent requires that the Link-Local Address Compatibility (L) was set in the Binding Update.) Together, these measures protect the tunnels against the vulnerabilities discussed in Section 15.1 ๐ŸŒˆ.

For traffic tunneled via the home agent, additional IPsec ESP encapsulation MAY be supported and used ๐Ÿงฆ. If multicast group membership control protocols or stateful address autoconfiguration protocols are supported, payload data protection MUST be supported ๐Ÿšจ.


6. New IPv6 Protocol, Message Types, and Destination Option ๐Ÿ‘‘

6.1. Mobility Header ๐Ÿฆ‹

The Mobility Header is an extension header used by mobile nodes, correspondent nodes, and home agents in all the messaging related to creating and managing bindings ๐Ÿ’ฌ. The subsections in this section describe the message types that can be sent using the Mobility Header.

Mobility Header messages MUST NOT be sent with a type 2 routing header, except as described in Section 9.5.4 for Binding Acknowledgement ๐Ÿ™…โ€โ™€๏ธ. Mobility Header messages also MUST NOT be used with a Home Address destination option, except as described in Section 11.7.1 and Section 11.7.2 for Binding Update. Binding Update List or Binding Cache information (when present) for the destination MUST NOT be used when sending Mobility Header messages. That means Mobility Header messages bypass both the Binding Cache check described in Section 9.3.2 and the Binding Update List check described in Section 11.3.1, which are normally performed for all packets ๐Ÿƒโ€โ™€๏ธ. This applies even to messages sent to or from a correspondent node that is itself a mobile node ๐Ÿซ .

6.1.1. Format โœจ

okay so the Mobility Header is identified by a Next Header value of 135 in the header right before it ๐Ÿฆ‹ here's the layout:

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | Payload Proto |  Header Len   |   MH Type     |   Reserved    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           Checksum            |                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
    |                                                               |
    .                                                               .
    .                       Message Data                            .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Payload Proto ๐ŸŒธ this is an 8-bit selector that tells you what kind of header comes right after the Mobility Header. It uses the same values as the IPv6 Next Header field [11]. It's meant for a future extension (see Appendix B.1), so it's basically saving a spot for later bestie ๐Ÿงš Implementations that follow this spec SHOULD set the payload protocol type to IPPROTO_NONE (59 decimal).

Header Len ๐Ÿ’… an 8-bit unsigned integer for the length of the Mobility Header in units of 8 octets, not counting the first 8 octets. The length of the Mobility Header MUST be a multiple of 8 octets, no exceptions ๐Ÿ™ˆ

MH Type ๐Ÿ”ฅ an 8-bit selector that identifies which mobility message you're dealing with. The current values are in Section 6.1.2 and onward. If you get an MH Type value you don't recognise, an error indication gets sent back ๐Ÿ’€

Reserved ๐Ÿ“ an 8-bit field saved for future use. The sender MUST initialise the value to zero, and the receiver MUST ignore it.

Checksum ๐Ÿฆ‹ a 16-bit unsigned integer with the checksum of the Mobility Header. The checksum comes from an octet string made of a "pseudo-header" followed by the whole Mobility Header, starting at the Payload Proto field. It's the 16-bit one's complement of the one's complement sum of that string, and it's giving precision โœจ

The pseudo-header has IPv6 header fields, as specified in Section 8.1 of RFC 2460 [11]. The Next Header value used in the pseudo-header is 2. The addresses used in the pseudo-header are the ones in the Source and Destination Address fields of the IPv6 packet carrying the Mobility Header.

ngl this part is so important ๐Ÿ˜ญ the procedures for calculating upper layer checksums while away from home, described in Section 11.3.1, apply even to the Mobility Header. If a mobility message has a Home Address destination option, the checksum calculation uses the home address in that option as the value of the IPv6 Source Address field. The type 2 routing header is treated as explained in [11].

The Mobility Header counts as the upper layer protocol when you calculate the pseudo-header. The Upper-Layer Packet Length field in the pseudo-header MUST be set to the total length of the Mobility Header. And when you're computing the checksum, the checksum field is set to zero ๐ŸŒˆ

Message Data ๐ŸŽ€ a variable-length field with the data for that particular Mobility Header type.

Mobile IPv6 also defines a bunch of "mobility options" you can use inside these messages ๐Ÿ’– if you include any, they MUST appear after the fixed portion of the message data specified in this document. The Header Len field tells you they're there. When Header Len is bigger than what the message needs on its own, the leftover octets are read as mobility options. These can include padding options, which line everything up so other options are aligned properly and the total length of the message is divisible by 8. The encoding and format of the defined options are in Section 6.2.

Alignment for the Mobility Header is the same as for any IPv6 protocol header. That means it MUST be aligned on an 8-octet boundary ๐Ÿซถ

6.1.2. Binding Refresh Request Message ๐ŸŒธ

okay this one is the Binding Refresh Request (BRR) message, and it's basically asking a mobile node to update its mobility binding ๐Ÿ’œ correspondent nodes send it following the rules in Section 9.5.5. When a mobile node gets a packet with a BRR message, it handles it using the rules in Section 11.7.4.

The BRR message uses MH Type value 0. When that value is in the MH Type field, the Message Data field looks like this:

                                    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                    |          Reserved             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    .                                                               .
    .                        Mobility options                       .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Reserved ๐Ÿ“ a 16-bit field saved for future use. The sender MUST initialise it to zero, and the receiver MUST ignore it.

Mobility Options ๐Ÿฆ‹ a variable-length field, sized so the complete Mobility Header is an integer multiple of 8 octets long. It holds zero or more TLV-encoded mobility options, and the encoding and format of the defined ones are in Section 6.2. The receiver MUST ignore and skip any options it doesn't understand. There MAY be extra information attached to this BRR message that doesn't have to show up in every BRR message sent. Mobility options are how future extensions to the BRR format can get defined. This spec doesn't define any options that are valid for the BRR message ๐ŸŒˆ

If there are no actual options in this message, no padding is necessary and the Header Len field will be set to 0 โœจ

6.1.3. Home Test Init Message ๐Ÿ’…

the Home Test Init (HoTI) message is how a mobile node kicks off the return routability procedure and asks a correspondent node for a home keygen token (see Section 11.6.1). It uses MH Type value 1. When that value is in the MH Type field, the Message Data field looks like this:

                                    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                    |           Reserved            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                       Home Init Cookie                        +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    .                                                               .
    .                       Mobility Options                        .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Reserved ๐ŸŒธ a 16-bit field saved for future use. This value MUST be initialised to zero by the sender, and MUST be ignored by the receiver.

Home Init Cookie ๐Ÿ’œ a 64-bit field holding a random value, the home init cookie.

Mobility Options ๐ŸŽ€ a variable-length field, sized so the complete Mobility Header is an integer multiple of 8 octets long. It holds zero or more TLV-encoded mobility options. The receiver MUST ignore and skip any options it doesn't understand. This spec doesn't define any options that are valid for the Home Test Init message.

If there are no actual options in this message, no padding is necessary and the Header Len field will be set to 1 โœจ

โš ๏ธ this part is a big deal, bestie: a HoTI message gets tunneled through the home agent when the mobile node is away from home. That tunneling SHOULD use IPsec ESP in tunnel mode between the home agent and the mobile node. The security policy database is what says this protection is in place. Protecting HoTI messages is separate from protecting regular payload traffic, which MAY use those tunnels too ๐Ÿ”ฅ

6.1.4. Care-of Test Init Message ๐Ÿฆ‹

the Care-of Test Init (CoTI) message starts the return routability procedure and asks a correspondent node for a care-of keygen token (see Section 11.6.1). It uses MH Type value 2. When that value is in the MH Type field, the Message Data field looks like this:

                                    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                    |           Reserved            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                      Care-of Init Cookie                      +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    .                                                               .
    .                        Mobility Options                       .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Reserved ๐Ÿ“ a 16-bit field saved for future use. The value MUST be initialised to zero by the sender, and MUST be ignored by the receiver.

Care-of Init Cookie ๐Ÿงš a 64-bit field holding a random value, the care-of init cookie.

Mobility Options ๐ŸŒˆ a variable-length field, sized so the complete Mobility Header is an integer multiple of 8 octets long. It holds zero or more TLV-encoded mobility options. The receiver MUST ignore and skip any options it doesn't understand. This spec doesn't define any options that are valid for the Care-of Test Init message.

If there are no actual options in this message, no padding is necessary and the Header Len field will be set to 1 ๐Ÿ’–

6.1.5. Home Test Message ๐ŸŽ€

okay so the Home Test (HoT) message is the reply to the Home Test Init message, and it gets sent from the correspondent node back to the mobile node (see Section 5.2.5) ๐Ÿฆ‹ it uses MH Type value 3. when that value is sitting in the MH Type field, the Message Data field in the Mobility Header looks like this:

                                 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                 |       Home Nonce Index        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 +                        Home Init Cookie                       +
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 +                       Home Keygen Token                       +
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 .                                                               .
 .                        Mobility options                       .
 .                                                               .
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Home Nonce Index ๐Ÿ’–

this field gets echoed back by the mobile node to the correspondent node in a later Binding Update โœจ

Home Init Cookie ๐ŸŒธ

a 64-bit field that holds the home init cookie ๐Ÿ“

Home Keygen Token ๐Ÿงš

this field holds the 64-bit home keygen token used in the return routability procedure ๐Ÿ’œ

Mobility Options ๐Ÿซถ

this is a variable-length field, sized so the whole Mobility Header comes out to an integer multiple of 8 octets long ๐Ÿ”ฅ it holds zero or more TLV-encoded mobility options. the receiver MUST ignore and skip any options it does not understand ๐Ÿ™ˆ and this spec doesn't define any options that are valid for the Home Test message ๐Ÿ’…

if there are no actual options in this message, no padding is needed and the Header Len field gets set to 2 โœจ


6.1.6. Care-of Test Message ๐Ÿฆ‹

the Care-of Test (CoT) message is the reply to the Care-of Test Init message, and it's sent from the correspondent node to the mobile node too (see Section 11.6.2) ๐Ÿ’– it uses MH Type value 4. when that value is in the MH Type field, the Message Data field in the Mobility Header is laid out like this:

                                 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                 |      Care-of Nonce Index      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 +                      Care-of Init Cookie                      +
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 +                     Care-of Keygen Token                      +
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 .                                                               .
 .                        Mobility Options                       .
 .                                                               .
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Care-of Nonce Index ๐ŸŒˆ

this value gets echoed back by the mobile node to the correspondent node in a later Binding Update ๐Ÿงš

Care-of Init Cookie ๐Ÿ“

a 64-bit field that holds the care-of init cookie ๐ŸŒธ

Care-of Keygen Token ๐Ÿ‘‘

this field holds the 64-bit care-of keygen token used in the return routability procedure โœจ

Mobility Options ๐Ÿ’…

this is a variable-length field, sized so the whole Mobility Header is an integer multiple of 8 octets long ๐Ÿฆ‹ it holds zero or more TLV-encoded mobility options. the receiver MUST ignore and skip any options it does not understand ๐Ÿซถ and this spec doesn't define any options that are valid for the Care-of Test message ๐Ÿ’€

if there are no actual options in this message, no padding is needed and the Header Len field gets set to 2 ๐ŸŽ€


6.1.7. Binding Update Message ๐Ÿ’œ

okay bestie, the Binding Update (BU) message is how a mobile node tells other nodes about a new care-of address for itself โœจ Binding Updates get sent as described in Section 11.7.1 and Section 11.7.2 ๐Ÿ”ฅ

it uses MH Type value 5. when that value is in the MH Type field, the Message Data field in the Mobility Header looks like this:

                                 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                 |          Sequence #           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |A|H|L|K|        Reserved       |           Lifetime            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 .                                                               .
 .                        Mobility options                       .
 .                                                               .
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Acknowledge (A) ๐ŸŒธ

the Acknowledge (A) bit is set by the sending mobile node to ask for a Binding Acknowledgement (Section 6.1.8) to come back when the Binding Update is received ๐Ÿ’–

Home Registration (H) ๐Ÿ“

the Home Registration (H) bit is set by the sending mobile node to ask the receiving node to act as this node's home agent โœจ the destination of the packet carrying this message MUST be a router sharing the same subnet prefix as the mobile node's home address in the binding ๐Ÿ”ฅ

Link-Local Address Compatibility (L) ๐Ÿงš

the Link-Local Address Compatibility (L) bit is set when the home address the mobile node reports has the same interface identifier as the mobile node's link-local address ๐Ÿ’œ

Key Management Mobility Capability (K) ๐Ÿ‘‘

if this bit is cleared, the protocol used for setting up the IPsec security associations between the mobile node and the home agent does not survive movements ๐Ÿ˜ญ so it may have to be rerun ๐Ÿ’€ (the IPsec security associations themselves are expected to survive movements, though ๐Ÿซถ) if manual IPsec configuration is used, the bit MUST be cleared ๐Ÿ™ˆ

this bit is only valid in Binding Updates sent to the home agent, and it MUST be cleared in other Binding Updates ๐Ÿ’… correspondent nodes MUST ignore this bit โœจ

Reserved ๐ŸŽ€

these fields are unused ๐Ÿฆ‹ they MUST be initialized to zero by the sender and MUST be ignored by the receiver ๐ŸŒˆ

Sequence # ๐ŸŒˆ

a 16-bit unsigned integer. the receiving node uses it to sequence Binding Updates, and the sending node uses it to match a returned Binding Acknowledgement with this Binding Update ๐Ÿ’–

Lifetime ๐Ÿ’œ

16-bit unsigned integer. this is the number of time units remaining before the binding MUST be considered expired ๐Ÿ”ฅ a value of zero means the Binding Cache entry for the mobile node MUST be deleted ๐Ÿ’€ (in that case the specified care-of address MUST also be set equal to the home address ๐Ÿซถ) one time unit is 4 seconds โฑ๏ธโœจ

Mobility Options ๐Ÿ“

this is a variable-length field, sized so the whole Mobility Header is an integer multiple of 8 octets long ๐ŸŒธ it holds zero or more TLV-encoded mobility options. the encoding and format of the defined options are described in Section 6.2 ๐Ÿงš the receiver MUST ignore and skip any options it does not understand ๐Ÿ™ˆ

the following options are valid in a Binding Update:

  • Binding Authorization Data option (this option is mandatory in Binding Updates sent to a correspondent node) ๐Ÿ‘‘
  • Nonce Indices option. ๐Ÿฆ‹
  • Alternate Care-of Address option ๐Ÿ’…

if no options are present in this message, 4 octets of padding are needed and the Header Len field gets set to 1 โœจ

the care-of address is specified either by the Source Address field in the IPv6 header or by the Alternate Care-of Address option, if one is present ๐Ÿซถ the care-of address MUST be a unicast routable address ๐Ÿ”ฅ the IPv6 Source Address MUST be a topologically correct source address ๐Ÿ’… Binding Updates for a care-of address that is not a unicast routable address MUST be silently discarded ๐Ÿ˜ญ similarly, the Binding Update MUST be silently discarded if the care-of address shows up as a home address in an existing Binding Cache entry, and its current location creates a circular reference back to the home address in the Binding Update (possibly through additional entries) ๐Ÿ’€

deleting a binding can be indicated by setting the Lifetime field to 0 and setting the care-of address equal to the home address ๐ŸŒˆ for a deletion, the generation of the binding management key depends exclusively on the home keygen token, as explained in Section 5.2.5 ๐Ÿ’– (note that while senders are required to set both the Lifetime field to 0 and the care-of address equal to the home address, the Section 9.5.1 rules for receivers are more liberal, and they interpret either condition as a deletion ๐ŸŽ€)

correspondent nodes SHOULD NOT delete the Binding Cache entry before the lifetime expires if any application hosted by the correspondent node is still likely to need to communicate with the mobile node ๐Ÿซถ a Binding Cache entry that gets de-allocated early might cause later packets from the mobile node to be dropped if they contain the Home Address destination option ๐Ÿ˜ญ this situation is recoverable, since a Binding Error message is sent to the mobile node (see Section 6.1.9) ๐Ÿ’œ however, it causes unnecessary delay in the communications ๐Ÿ’€

6.1.8. Binding Acknowledgement Message โœจ

okay bestie, the Binding Acknowledgement is the reply that says "got your Binding Update, babe ๐Ÿ’Œ". It's sent as described in Section 9.5.4 and Section 10.3.1 ๐Ÿฆ‹

It uses MH Type value 6 ๐Ÿ‘‘. When that value is in the MH Type field, the Message Data field looks like this:

                                 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                 |    Status     |K|  Reserved   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |           Sequence #          |           Lifetime            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 .                                                               .
 .                        Mobility options                       .
 .                                                               .
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Key Management Mobility Capability (K) ๐Ÿ”

So if this bit is cleared, the protocol the home agent uses to set up the IPsec security associations between the mobile node and the home agent doesn't survive movements. ๐Ÿ˜ฌ It might have to be rerun. (But the IPsec security associations themselves are expected to survive movements, so there's a silver lining โœจ)

Correspondent nodes MUST set the K bit to 0. ๐Ÿ’…

Reserved ๐ŸŒธ

These fields are unused. The sender MUST initialize them to zero, and the receiver MUST ignore them. Zero drama ๐Ÿซถ

Status ๐Ÿ“ฌ

This is an 8-bit unsigned integer that tells you what happened to the Binding Update. Values less than 128 mean the Binding Update was accepted by the receiving node ๐ŸŽ‰. Values greater than or equal to 128 mean it was rejected ๐Ÿ’€. These Status values are currently defined:

  0 Binding Update accepted

  1 Accepted but prefix discovery necessary

128 Reason unspecified

129 Administratively prohibited

130 Insufficient resources

131 Home registration not supported

132 Not home subnet

133 Not home agent for this mobile node

134 Duplicate Address Detection failed

135 Sequence number out of window

136 Expired home nonce index

137 Expired care-of nonce index

138 Expired nonces

139 Registration type change disallowed

The up-to-date values of the Status field live in the IANA registry of assigned numbers [19] ๐Ÿ“š

Sequence # ๐Ÿ”ข

The Sequence Number in the Binding Acknowledgement gets copied from the Sequence Number field in the Binding Update. The mobile node uses it to match this Binding Acknowledgement with an outstanding Binding Update, so it's basically the matchmaker ๐Ÿ’˜

Lifetime โณ

This is the granted lifetime, in time units of 4 seconds, for which this node SHOULD retain the entry for this mobile node in its Binding Cache. ๐Ÿ—‚๏ธ

The value of this field is undefined if the Status field says the Binding Update was rejected ๐Ÿ™ˆ

Mobility Options ๐Ÿงฉ

This is a variable-length field, sized so the complete Mobility Header is an integer multiple of 8 octets long. It holds zero or more TLV-encoded mobility options. The encoding and format of the defined options are described in Section 6.2. The receiver MUST ignore and skip any options it doesn't understand ๐Ÿ™…โ€โ™€๏ธ

There MAY be additional information associated with this Binding Acknowledgement that doesn't need to show up in every single one. Mobility options are how future extensions to the Binding Acknowledgement format get defined, so they're giving future-proof energy โœจ The following options are valid for the Binding Acknowledgement:

  • Binding Authorization Data option (this option is mandatory in Binding Acknowledgements sent by a correspondent node, except where otherwise noted in Section 9.5.4) ๐Ÿ”‘
  • Binding Refresh Advice option ๐Ÿ”„

If there are no options in this message, you need 4 octets of padding, and the Header Len field gets set to 1. ๐Ÿงธ


6.1.9. Binding Error Message ๐Ÿšจ

The Binding Error (BE) message is how a correspondent node signals a mobility-related error. An example would be an inappropriate attempt to use the Home Address destination option without an existing binding. See Section 9.3.3 for details ๐Ÿ•ต๏ธโ€โ™€๏ธ

It uses MH Type value 7. When that value is in the MH Type field, the Message Data field looks like this:

                                 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                 |     Status    |   Reserved    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 +                                                               +
 |                                                               |
 +                          Home Address                         +
 |                                                               |
 +                                                               +
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .                                                               .
 .                        Mobility Options                       .
 .                                                               .
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Status ๐Ÿšฆ

This is an 8-bit unsigned integer that tells you why this message was sent. These values are currently defined:

   1 Unknown binding for Home Address destination option

   2 Unrecognized MH Type value

Reserved ๐ŸŒท

This is an 8-bit field reserved for future use. The sender MUST initialize the value to zero, and the receiver MUST ignore it.

Home Address ๐Ÿ 

This is the home address that was in the Home Address destination option. The mobile node uses it to figure out which binding doesn't exist, in cases where it has several home addresses ๐Ÿง 

Mobility Options ๐Ÿงฉ

This is a variable-length field, sized so the complete Mobility Header is an integer multiple of 8 octets long. It holds zero or more TLV-encoded mobility options. The receiver MUST ignore and skip any options it doesn't understand.

There MAY be additional information associated with this Binding Error message that doesn't need to be in every Binding Error message sent. Mobility options let future extensions to the format of the Binding Error message get defined. The encoding and format of the defined options are described in Section 6.2. This specification doesn't define any options valid for the Binding Error message, so no options for you, sis ๐Ÿ™ƒ

If there are no actual options in this message, no padding is needed, and the Header Len field gets set to 2. โœจ


6.2. Mobility Options ๐ŸŽ

Mobility messages can carry zero or more mobility options. This is what makes optional fields possible, even when they aren't needed in every use of a particular Mobility Header, plus it leaves room for future extensions ๐ŸŒˆ The options go in the Message Data field of the message itself, after the fixed portion of the message data described in the message subsections of Section 6.1.

The Header Len of the Mobility Header tells you whether options are present. If they're included, the Binding Authorization Data option (Section 6.2.7) MUST be the last option, and it MUST NOT have trailing padding. Otherwise, options can go in any order ๐Ÿ’…

6.2.1. Format ๐Ÿงต

Mobility options are encoded in the leftover space of the Message Data field of a mobility message, using a type-length-value (TLV) format that looks like this:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Option Type  | Option Length |   Option Data...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Option Type ๐Ÿท๏ธ

This is an 8-bit identifier for the type of mobility option. When a receiver processes a Mobility Header containing an option whose Option Type value it doesn't recognize, the receiver MUST quietly ignore and skip over that option, and handle any remaining options in the message correctly ๐Ÿซก

Option Length ๐Ÿ“

This is an 8-bit unsigned integer giving the length in octets of the mobility option. It doesn't include the Option Type and Option Length fields themselves.

Option Data ๐Ÿ“ฆ

This is a variable-length field that holds data specific to the option.

The following subsections specify the Option types that are currently defined for use in the Mobility Header ๐Ÿ“š

Implementations MUST silently ignore any mobility options they don't understand. ๐Ÿคซ

Mobility options may have alignment requirements. Following the convention in IPv6, these options are aligned in a packet so that multi-octet values within the Option Data field of each option fall on natural boundaries. In other words, fields of width n octets are placed at an integer multiple of n octets from the start of the header, for n = 1, 2, 4, or 8 [11]. ๐Ÿ“

6.2.2. Pad1 ๐Ÿซง

The Pad1 option doesn't have any alignment requirements. Its format is:

    0
    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |   Type = 0    |
   +-+-+-+-+-+-+-+-+

NOTE! The Pad1 option is a special case: it has neither Option Length nor Option Data fields. ๐Ÿ‘€

The Pad1 option is used to insert one octet of padding in the Mobility Options area of a Mobility Header. If more than one octet of padding is required, the PadN option, described next, should be used rather than multiple Pad1 options ๐Ÿฉท

6.2.3. PadN ๐Ÿงธ

The PadN option doesn't have any alignment requirements either. Its format is:

    0                   1
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
   |   Type = 1    | Option Length | Option Data
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -

The PadN option is used to insert two or more octets of padding in the Mobility Options area of a mobility message. For N octets of padding, the Option Length field contains the value N-2, and the Option Data consists of N-2 zero-valued octets. PadN Option data MUST be ignored by the receiver ๐ŸŒ™

6.2.4. Binding Refresh Advice ๐Ÿ”

Okay so this one has an alignment requirement of 2n ๐ŸŒธ Here's the format:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
                                   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                   |   Type = 2    |   Length = 2  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Refresh Interval        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Binding Refresh Advice option is only valid in the Binding Acknowledgement, and only on Binding Acknowledgements sent from the mobile node's home agent in reply to a home registration ๐Ÿ’… The Refresh Interval is measured in units of four seconds, and it tells you how much time is left until the mobile node SHOULD send a new home registration to the home agent โฐ The Refresh Interval MUST be set to indicate a smaller time interval than the Lifetime value of the Binding Acknowledgement. Smaller than the Lifetime, no exceptions, periodt ๐Ÿซถ

6.2.5. Alternate Care-of Address ๐Ÿฆ‹

This option has an alignment requirement of 8n+6. Here's the format:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
                                   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                   |   Type = 3    |  Length = 16  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                   Alternate Care-of Address                   +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

So normally, a Binding Update tells the world its desired care-of address through the Source Address field of the IPv6 header. Lowkey that doesn't always work ๐Ÿ™ˆ Sometimes the mobile node wants to name a care-of address it can't use as a topologically correct source address (see Section 6.1.7 and Section 11.7.2), or the security mechanism in use doesn't protect the IPv6 header (see Section 11.7.1). That's where this option comes in, bestie โœจ

This option is only valid in Binding Update. The Alternate Care-of Address field holds an address to use as the care-of address for the binding, instead of the Source Address of the packet. Main character energy for addresses ๐Ÿ‘‘

6.2.6. Nonce Indices ๐ŸŽ€

This option has an alignment requirement of 2n. Here's the format:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
                                   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                   |   Type = 4    |   Length = 4  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Home Nonce Index      |     Care-of Nonce Index       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Nonce Indices option is only valid in the Binding Update message sent to a correspondent node, and only when it's present together with a Binding Authorization Data option ๐Ÿ” When the correspondent node authorizes the Binding Update, it has to produce home and care-of keygen tokens from its stored random nonce values.

The Home Nonce Index field tells the correspondent node which nonce value to use when producing the home keygen token. ๐Ÿงš

The Care-of Nonce Index field is ignored in requests to delete a binding. Otherwise, it tells the correspondent node which nonce value to use when producing the care-of keygen token. Ignored for deletions, used otherwise, iykyk ๐Ÿ’œ

6.2.7. Binding Authorization Data ๐Ÿ”

Fair warning, this one doesn't have alignment requirements as such. But since this option must be the last mobility option, there's an implicit alignment requirement of 8n + 2. Here's the format:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
                                   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                   |   Type = 5    | Option Length |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                         Authenticator                         |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The Binding Authorization Data option is valid in the Binding Update and Binding Acknowledgement.

The Option Length field holds the length of the authenticator in octets.

The Authenticator field holds a cryptographic value that can be used to figure out that the message really comes from the right authority โœ… The rules for calculating this value depend on the authorization procedure being used.

For the return routability procedure, this option can appear in the Binding Update and Binding Acknowledgements. The rules for calculating the Authenticator value are these:

   Mobility Data = care-of address | correspondent | MH Data
   Authenticator = First (96, HMAC_SHA1 (Kbm, Mobility Data))

Where | denotes concatenation. The "care-of address" is the care-of address that will be registered for the mobile node if the Binding Update succeeds, or the home address of the mobile node if this option is used in de-registration. Heads up, this address might be different from the source address of the Binding Update message, if the Alternate Care-of Address mobility option is used, or when the lifetime of the binding is set to zero ๐Ÿ‘€

The "correspondent" is the IPv6 address of the correspondent node. If the message is sent to a destination that's itself mobile, the "correspondent" address may not be the address in the Destination Address field of the IPv6 header. Instead, the home address from the type 2 Routing header should be used ๐Ÿฆ‹

"MH Data" is the content of the Mobility Header, excluding the Authenticator field itself. The Authenticator value is calculated as if the Checksum field in the Mobility Header was zero. The Checksum in the transmitted packet is still calculated in the usual manner, with the calculated Authenticator being part of the packet protected by the Checksum. Kbm is the binding management key, which is typically created using nonces provided by the correspondent node (see Section 9.4). Note that while the contents of a potential Home Address destination option are not covered in this formula, the rules for calculating the Kbm do take the home address into account. This makes sure the MAC will be different for different home addresses ๐Ÿ’–

The first 96 bits from the MAC result are used as the Authenticator field.


6.3. Home Address Option ๐Ÿ 

The Home Address option is carried by the Destination Option extension header (Next Header value = 60). It's used in a packet sent by a mobile node while it's away from home, to tell the recipient the mobile node's home address ๐Ÿงณ

The Home Address option is encoded in type-length-value (TLV) format, like this:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
                                   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                   |  Option Type  | Option Length |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                          Home Address                         +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Option Type

201 = 0xC9

Option Length

8-bit unsigned integer. Length of the option, in octets, excluding the Option Type and Option Length fields. This field MUST be set to 16.

Home Address

The home address of the mobile node sending the packet. This address MUST be a unicast routable address.

The alignment requirement [11] for the Home Address option is 8n+6.

The three highest-order bits of the Option Type field are encoded to indicate specific processing of the option [11]. For the Home Address option, these three bits are set to 110. This means the following processing rules apply:

  • Any IPv6 node that does not recognize the Option Type must discard the packet, and if the packet's Destination Address was not a multicast address, return an ICMP Parameter Problem, Code 2, message to the packet's Source Address. The Pointer field in the ICMP message SHOULD point at the Option Type field. Otherwise, for multicast addresses, the ICMP message MUST NOT be sent.
  • The data within the option cannot change en route to the packet's final destination.

The Home Address option MUST be placed as follows:

  • After the routing header, if that header is present
  • Before the Fragment Header, if that header is present
  • Before the AH Header or ESP Header, if either one of those headers are present

For each IPv6 packet header, the Home Address option MUST NOT appear more than once. However, an encapsulated packet [15] MAY contain a separate Home Address option associated with each encapsulating IP header.

The inclusion of a Home Address destination option in a packet affects the receiving node's processing of only that single packet. No state is created or modified in the receiving node as a result of receiving a Home Address option in a packet. In particular, the presence of a Home Address option in a received packet MUST NOT alter the contents of the receiver's Binding Cache and MUST NOT cause any changes in the routing of subsequent packets sent by this receiving node. Hard boundary, no Binding Cache drama ๐Ÿšซ๐Ÿ’…

6.4. Type 2 Routing Header โœจ

okay so Mobile IPv6 brings in a brand new routing header variant, the type 2 routing header ๐Ÿฆ‹. Its whole job is letting a packet go straight from a correspondent to the mobile node's care-of address. The care-of address gets inserted into the IPv6 Destination Address field. Once the packet arrives at the care-of address, the mobile node grabs its home address out of the routing header, and that becomes the final destination address for the packet. it's giving direct delivery ๐Ÿ’…

The new routing header uses a different type than "regular" IPv6 source routing, which lets firewalls apply different rules to source routed packets than to Mobile IPv6 ๐Ÿ”ฅ. This type (type 2) can only carry one IPv6 address, so it's super restricted ๐ŸŽ€. All IPv6 nodes that process this routing header MUST verify that the address inside is the node's own home address, so packets can't get forwarded outside the node ๐Ÿ™ˆ. Since that address is the mobile node's home address, it MUST be a unicast routable address ๐ŸŒธ. And if the scope of the home address is smaller than the scope of the care-of address, the mobile node MUST discard the packet (see Section 4.6) ๐Ÿ’€.

6.4.1. Format

The type 2 routing header looks like this:

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Next Header  | Hdr Ext Len=2 | Routing Type=2|Segments Left=1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Reserved                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                                                               +
|                                                               |
+                         Home Address                          +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Next Header ๐ŸŽ€ 8-bit selector. Identifies the type of header immediately following the routing header. Uses the same values as the IPv6 Next Header field [11].

Hdr Ext Len ๐ŸŒธ 2 (8-bit unsigned integer); length of the routing header in 8-octet units, not including the first 8 octets.

Routing Type ๐Ÿฆ‹ 2 (8-bit unsigned integer).

Segments Left โœจ 1 (8-bit unsigned integer).

Reserved ๐Ÿ™ˆ 32-bit reserved field. The value MUST be initialized to zero by the sender, and MUST be ignored by the receiver.

Home Address ๐Ÿ‘‘ The Home Address of the destination Mobile Node.

For a type 2 routing header, the Hdr Ext Len MUST be 2. The Segments Left value describes the number of route segments remaining, i.e., the number of explicitly listed intermediate nodes still to be visited before reaching the final destination. Segments Left MUST be 1. The ordering rules for extension headers in an IPv6 packet are described in Section 4.1 of RFC 2460 [11]. The type 2 routing header defined for Mobile IPv6 follows the same ordering as other routing headers. If both a type 0 and a type 2 routing header are present, the type 2 routing header should follow the other routing header. A packet containing such nested encapsulation should be created as if the inner (type 2) routing header was constructed first and then treated as an original packet by the outer (type 0) routing header construction process. ngl that's a lot of nesting, but it's organized ๐Ÿงš

Also, the general procedures IPv6 defines for routing headers suggest that a received routing header MAY be automatically "reversed" to construct a routing header for use in any response packets sent by upper-layer protocols, if the received packet is authenticated [6]. This MUST NOT be done automatically for type 2 routing headers ๐Ÿšซ๐Ÿ’œ.


6.5. ICMP Home Agent Address Discovery Request Message ๐ŸŒˆ

The ICMP Home Agent Address Discovery Request message is used by a mobile node to kick off the dynamic home agent address discovery mechanism, as described in Section 11.4.1. The mobile node sends it to the Mobile IPv6 Home-Agents anycast address [16] for its own home subnet prefix. (Note that the currently defined anycast addresses may not work with all prefix lengths other than those defined in RFC 2373 [3, 35].) ๐Ÿ™ˆ

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |     Code      |            Checksum           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Identifier           |            Reserved           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type ๐Ÿ“ 144

Code ๐Ÿ“ 0

Checksum ๐Ÿ“ The ICMP checksum [14].

Identifier ๐Ÿ“ An identifier to aid in matching Home Agent Address Discovery Reply messages to this Home Agent Address Discovery Request message.

Reserved ๐Ÿ“ This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver.

The Source Address of the Home Agent Address Discovery Request message packet is typically one of the mobile node's current care-of addresses. At the time of performing this dynamic home agent address discovery procedure, it is likely that the mobile node is not registered with any home agent. Therefore, neither the nature of the address nor the identity of the mobile node can be established at this time. The home agent MUST then return the Home Agent Address Discovery Reply message directly to the Source Address chosen by the mobile node. ๐Ÿซถ


6.6. ICMP Home Agent Address Discovery Reply Message ๐Ÿ’–

The ICMP Home Agent Address Discovery Reply message is how a home agent responds to a mobile node that's using the dynamic home agent address discovery mechanism, as described in Section 10.5. ๐Ÿงš

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |     Type      |     Code      |            Checksum           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           Identifier          |             Reserved          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    .                                                               .
    .                      Home Agent Addresses                     .
    .                                                               .
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type ๐ŸŒธ 145

Code ๐ŸŒธ 0

Checksum ๐ŸŒธ The ICMP checksum [14].

Identifier ๐ŸŒธ The identifier from the invoking Home Agent Address Discovery Request message.

Reserved ๐ŸŒธ This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver.

Home Agent Addresses ๐ŸŒธ A list of addresses of home agents on the home link for the mobile node. The number of addresses presented in the list is indicated by the remaining length of the IPv6 packet carrying the Home Agent Address Discovery Reply message.


6.7. ICMP Mobile Prefix Solicitation Message Format ๐Ÿ”ฅ

The ICMP Mobile Prefix Solicitation Message is sent by a mobile node to its home agent while it's away from home. Its purpose is to solicit a Mobile Prefix Advertisement from the home agent, which lets the mobile node gather prefix information about its home network. That info can then be used to configure and update home address(es) when the prefix information from the home agent changes ๐Ÿ‘‘.

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |     Code      |          Checksum             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Identifier           |            Reserved           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   IP Fields:

IP Fields: ๐Ÿฆ‹

Source Address ๐Ÿฆ‹ The mobile node's care-of address.

Destination Address ๐Ÿฆ‹ The address of the mobile node's home agent. This home agent must be on the link that the mobile node wishes to learn prefix information about.

Hop Limit ๐Ÿฆ‹ Set to an initial hop limit value, similarly to any other unicast packet sent by the mobile node.

Destination Option: ๐Ÿฆ‹ A Home Address destination option MUST be included.

ESP header: ๐Ÿฆ‹ IPsec headers MUST be supported and SHOULD be used as described in Section 5.4.

ICMP Fields: ๐Ÿฆ‹

Type ๐Ÿ’œ 146

Code ๐Ÿ’œ 0

Checksum ๐Ÿ’œ The ICMP checksum [14].

Identifier ๐Ÿ’œ An identifier to aid in matching a future Mobile Prefix Advertisement to this Mobile Prefix Solicitation.

Reserved ๐Ÿ’œ This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver.

The Mobile Prefix Solicitation messages may have options. These options MUST use the option format defined in RFC 2461 [12]. This document does not define any option types for the Mobile Prefix Solicitation message, but future documents may define new options. Home agents MUST silently ignore any options they do not recognize and continue processing the message. ๐Ÿฅนโœจ

6.8. ICMP Mobile Prefix Advertisement Message Format โœจ

okay so a home agent sends a Mobile Prefix Advertisement to a mobile node ๐Ÿงš to share prefix info about the home link while the mobile node is off wandering away from home ๐Ÿฆ‹ this happens either in response to a Mobile Prefix Solicitation with an Advertisement, or as an unsolicited Advertisement that follows the rules in Section 10.6 ๐Ÿ’…

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |     Code      |          Checksum             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          Identifier           |M|O|        Reserved           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           Options ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

IP Fields:

Source Address

The home agent's address, the way the mobile node would expect to see it (aka same network prefix) ๐ŸŒธ

Destination Address

If this message is a response to a Mobile Prefix Solicitation, this field holds the Source Address field from that packet. For unsolicited messages, the mobile node's care-of address SHOULD be used. Also, unsolicited messages can only be sent if the mobile node is currently registered with the home agent ๐Ÿซถ

Routing header:

A type 2 routing header MUST be included ๐Ÿ”ฅ

ESP header:

IPsec headers MUST be supported and SHOULD be used as described in Section 5.4 ๐Ÿ”

ICMP Fields:

Type

147 โœจ

Code

0

Checksum

The ICMP checksum [14].

Identifier

An identifier that helps match this Mobile Prefix Advertisement to a previous Mobile Prefix Solicitation ๐Ÿ’œ

M

1-bit Managed Address Configuration flag. When set, hosts use the administered (stateful) protocol for address autoconfiguration, on top of any addresses they autoconfigure with stateless address autoconfiguration. The use of this flag is described in [12, 13] ๐ŸŽ€

O

1-bit Other Stateful Configuration flag. When set, hosts use the administered (stateful) protocol for autoconfiguration of other (non-address) information. The use of this flag is described in [12, 13] ๐ŸŒˆ

Reserved

This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver ๐Ÿ™ˆ

The Mobile Prefix Advertisement messages may have options, and these options MUST use the option format defined in RFC 2461 [12]. This document defines one option that can be carried in a Mobile Prefix Advertisement message, but future documents may define new options ๐Ÿงš Mobile nodes MUST silently ignore any options they do not recognize and keep on processing the message ๐Ÿ’…

Prefix Information

Each message contains one or more Prefix Information options. Each option carries the prefix(es) the mobile node should use to configure its home address(es). Section 10.6 describes which prefixes should be advertised to the mobile node ๐Ÿ“

The Prefix Information option is defined in Section 4.6.2 of RFC 2461 [12], with modifications defined in Section 7.2 of this specification. The home agent MUST use this modified Prefix Information option to send home network prefixes as defined in Section 10.6.1 ๐Ÿ‘‘

If the Advertisement is sent in response to a Mobile Prefix Solicitation, the home agent MUST copy the Identifier value from that message into the Identifier field of the Advertisement ๐Ÿซถ

The home agent MUST NOT send more than one Mobile Prefix Advertisement message per second to any mobile node โณ

The M and O bits MUST be cleared if the Home Agent DHCPv6 support is not provided. If that support is provided, they are set in concert with the home network's administrative settings ๐Ÿ’–


7. Modifications to IPv6 Neighbor Discovery ๐ŸŒธ

7.1. Modified Router Advertisement Message Format

Mobile IPv6 tweaks the format of the Router Advertisement message [12] by adding a single flag bit. That bit tells everyone the router sending the Advertisement is also acting as a home agent on this link ๐Ÿฆ‹ Here's what the format looks like:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |     Code      |          Checksum             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Cur Hop Limit |M|O|H| Reserved|       Router Lifetime         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Reachable Time                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Retrans Timer                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Options ...
   +-+-+-+-+-+-+-+-+-+-+-+-+

This format shows the following changes from the original Neighbor Discovery [12] format:

Home Agent (H)

The Home Agent (H) bit is set in a Router Advertisement to show that the router sending it is also working as a Mobile IPv6 home agent on this link ๐Ÿ 

Reserved

Shrunk from a 6-bit field to a 5-bit field to make room for the bit above โœ‚๏ธ

7.2. Modified Prefix Information Option Format

Mobile IPv6 needs to know a router's global address when it builds a Home Agents List as part of dynamic home agent address discovery ๐Ÿ”

The catch is that Neighbor Discovery [12] only advertises a router's link-local address, since that address has to be used as the IP Source Address of each Router Advertisement ๐Ÿ™ƒ

So Mobile IPv6 extends Neighbor Discovery to let a router advertise its global address too, by adding a single flag bit to the Prefix Information option format used in Router Advertisement messages ๐Ÿ’… Here's the format:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     | Prefix Length |L|A|R|Reserved1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Valid Lifetime                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Preferred Lifetime                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Reserved2                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                            Prefix                             +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This format shows the following changes from the original Neighbor Discovery [12] format:

Router Address (R)

1-bit router address flag. When set, it means the Prefix field holds a complete IP address assigned to the sending router. The indicated prefix is the first Prefix Length bits of the Prefix field. The router IP address has the same scope and follows the same lifetime values as the advertised prefix. This use of the Prefix field is compatible with how it's used to advertise the prefix itself, since Prefix Advertisement only uses the leading bits. So the meaning of this flag bit doesn't depend on the processing for the On-Link (L) and Autonomous Address-Configuration (A) flag bits ๐ŸŒŸ

Reserved1

Shrunk from a 6-bit field to a 5-bit field to make room for the bit above ๐Ÿซง

In a Router Advertisement, a home agent MUST, and all other routers MAY, include at least one Prefix Information option with the Router Address (R) bit set ๐Ÿ’– Neighbor Discovery says that if including all the options in a Router Advertisement makes it bigger than the link MTU, multiple Advertisements can be sent, each carrying a subset of the options [12]. Also, when unsolicited multicast Router Advertisements go out more often than the limit in RFC 2461 [12], the sending router doesn't need to include all options in each one. But in both of these cases, the router SHOULD include at least one Prefix Information option with the Router Address (R) bit set in each such advertisement, if that bit is set in some advertisement the router sends ๐ŸŽ€

Here's one more bit that helps mobile nodes with movement detection. Barring changes to the prefixes on the link, routers that send multiple Router Advertisements with the Router Address (R) bit set in some of the included Prefix Information options SHOULD provide at least one option and router address that stays the same across all of the Advertisements ๐Ÿงญ

7.3. New Advertisement Interval Option Format

Mobile IPv6 defines a brand new Advertisement Interval option. Routers use it in Router Advertisement messages to say how often they send unsolicited multicast Router Advertisements ๐Ÿ•ฐ๏ธ Here's the format:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |           Reserved            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Advertisement Interval                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type

7 ๐Ÿฉท

Length

8-bit unsigned integer. The length of the option (including the type and length fields) is in units of 8 octets. The value of this field MUST be 1.

Reserved

This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver ๐Ÿ™ˆ

Advertisement Interval

32-bit unsigned integer. The maximum time, in milliseconds, between successive unsolicited Router Advertisement messages sent by this router on this network interface. Using the conceptual router configuration variables defined by Neighbor Discovery [12], this field MUST be equal to the value MaxRtrAdvInterval, expressed in milliseconds โฑ๏ธ

Routers MAY include this option in their Router Advertisements. A mobile node that gets a Router Advertisement containing this option SHOULD use the specified Advertisement Interval for that router in its movement detection algorithm, as described in Section 11.5.1 ๐Ÿ”ฅ

This option MUST be silently ignored for other Neighbor Discovery messages ๐Ÿคซ

7.4. New Home Agent Information Option Format โœจ

Okay bestie, Mobile IPv6 introduces a brand new Home Agent Information option ๐Ÿ’– It rides along in Router Advertisements sent by a home agent, and it shares info about how that router is doing as a home agent ๐Ÿ  Here's the layout:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |           Reserved            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Home Agent Preference     |      Home Agent Lifetime      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Type ๐Ÿงš The value is 8.

Length ๐ŸŽ€ This is an 8-bit unsigned integer, and it's the length of the option (including the type and length fields) in units of 8 octets. The value of this field MUST be 1.

Reserved ๐ŸŒธ This field is unused. It MUST be initialized to zero by the sender and MUST be ignored by the receiver.

Home Agent Preference ๐Ÿ‘‘ This is a 16-bit unsigned integer, and it's the preference for the home agent sending this Router Advertisement. It's used to order the addresses handed to a mobile node in the Home Agent Addresses field of a Home Agent Address Discovery Reply message. Higher values mean more preferable. If this option is not included in a Router Advertisement in which the Home Agent (H) bit is set, the preference value for this home agent MUST be considered to be 0. Greater values indicate a more preferable home agent than lower values.

Manual configuration of the Home Agent Preference value is covered in Section 8.4 ๐Ÿ“ The sending home agent MAY also set the value dynamically, for example based on the number of mobile nodes it's currently serving or on its remaining resources for serving more mobile nodes. Those dynamic settings are beyond the scope of this document, though โœจ Any dynamic setting, however, MUST set the preference appropriately, relative to the default Home Agent Preference value of 0 that some home agents on this link may be using. (In other words, a home agent that doesn't include a Home Agent Information option in its Router Advertisements is considered to have a Home Agent Preference value of 0.) It's giving careful math energy ๐Ÿงฎ

Home Agent Lifetime โณ This is a 16-bit unsigned integer, and it's the lifetime of the home agent in units of seconds. The default is the same as the Router Lifetime from the main body of the Router Advertisement. The maximum value corresponds to 18.2 hours. A value of 0 MUST NOT be used. The Home Agent Lifetime only applies to this router's usefulness as a home agent. It does not apply to information in other message fields or options ๐Ÿ™ˆ

Home agents MAY include this option in their Router Advertisements. This option MUST NOT be included in a Router Advertisement in which the Home Agent (H) bit (see Section 7.1) is not set. If this option is not included in a Router Advertisement in which the Home Agent (H) bit is set, the lifetime for this home agent MUST be considered to be the same as the Router Lifetime in that Router Advertisement. If multiple Advertisements are being sent instead of a single larger unsolicited multicast Advertisement, then every one of the multiple Advertisements with the Router Address (R) bit set MUST include this option with the same contents. Otherwise, this option MUST be omitted from all Advertisements. Be consistent or be gone ๐Ÿ’…

This option MUST be silently ignored for other Neighbor Discovery messages ๐Ÿซถ

If both the Home Agent Preference and Home Agent Lifetime are set to their default values specified above, this option SHOULD NOT be included in the Router Advertisement messages sent by this home agent. Why send defaults? Iykyk ๐Ÿ’€


7.5. Changes to Sending Router Advertisements

Okay so the Neighbor Discovery protocol specification [12] limits routers to a minimum interval of 3 seconds between sending unsolicited multicast Router Advertisement messages from any given network interface (limited by MinRtrAdvInterval and MaxRtrAdvInterval). It says:

"Routers generate Router Advertisements frequently enough that hosts will learn of their presence within a few minutes, but not frequently enough to rely on an absence of advertisements to detect router failure; a separate Neighbor Unreachability Detection algorithm provides failure detection."

Honestly that's totally fine for normal hosts, but it's NOT it for mobile nodes ๐Ÿ˜ญ Mobile nodes detect their own movement by spotting new routers as they wander into wireless range of them (or plug into a new wired network), and by noticing that previous routers have gone unreachable. Mobile nodes MUST be able to quickly detect when they move to a link served by a new router, so they can get a new care-of address and send Binding Updates to register that care-of address with their home agent and to notify correspondent nodes as needed ๐Ÿฆ‹

One method that can speed up movement detection is to increase the rate at which unsolicited Router Advertisements are sent. Mobile IPv6 relaxes this limit so that routers MAY send unsolicited multicast Router Advertisements more frequently. This works where the router expects to serve visiting mobile nodes (for example, wireless network interfaces), or where it's acting as a home agent for one or more mobile nodes (who may come back home and need to hear its Advertisements) ๐ŸŒˆ

Routers supporting mobility SHOULD be able to be configured with a smaller MinRtrAdvInterval value and MaxRtrAdvInterval value, so they can send unsolicited multicast Router Advertisements more often. The minimum allowed values are:

  • MinRtrAdvInterval 0.03 seconds
  • MaxRtrAdvInterval 0.07 seconds

When the minimum intervals and delays are used, the mean time between unsolicited multicast router advertisements is 50 ms โšก Using these modified limits MUST be configurable (see also the configuration variable MinDelayBetweenRas in Section 13, which may also have to be modified accordingly). Systems where these values are available MUST NOT default to them, and SHOULD default to values specified in RFC 2461. Knowing the type of network interface and operating environment SHOULD be taken into account when configuring these limits for each network interface. This matters a lot on some wireless links, where cranking up the frequency of multicast beacons can cause considerable overhead ๐Ÿ“ก Routers SHOULD adhere to the intervals specified in RFC 2461 [12] if this overhead is likely to cause service degradation.

Also, those low possible values of MaxRtrAdvInterval can cause some problems with movement detection in some mobile nodes ๐Ÿ˜ฌ To make sure that's not a problem, Routers SHOULD add 20 ms to any Advertisement Intervals sent in RAs that are below 200 ms, to account for scheduling granularities on both the MN and the Router.

Note that multicast Router Advertisements aren't always required in certain wireless networks with limited bandwidth. Mobility detection or link changes in those networks may be handled at lower layers. Router advertisements in such networks SHOULD be sent only when solicited. In those networks it SHOULD be possible to disable unsolicited multicast Router Advertisements on specific interfaces. In that case, the MinRtrAdvInterval and MaxRtrAdvInterval can be set to some high values ๐ŸŒธ

Home agents MUST include the Source Link-Layer Address option in all Router Advertisements they send. This simplifies the process of returning home, as discussed in Section 11.5.4 ๐Ÿก

Here's one more juicy detail: according to RFC 2461 [12], AdvDefaultLifetime is by default based on the value of MaxRtrAdvInterval. AdvDefaultLifetime is used in the Router Lifetime field of Router Advertisements. Since that field is expressed in seconds, a small MaxRtrAdvInterval value can result in a zero value for this field. To prevent that, routers SHOULD keep AdvDefaultLifetime at at least one second, even if using MaxRtrAdvInterval would result in a smaller value ๐Ÿง 


8. Requirements for Types of IPv6 Nodes ๐Ÿ‘‘

Mobile IPv6 puts some special requirements on the functions provided by different types of IPv6 nodes. This section sums those requirements up and points out which functionality each one is meant to support. The requirements are set for these groups of nodes:

  • All IPv6 nodes.
  • All IPv6 nodes with support for route optimization.
  • All IPv6 routers.
  • All Mobile IPv6 home agents.
  • All Mobile IPv6 mobile nodes.

It's outside the scope of this specification to decide which of these groups are mandatory in IPv6. We only describe what's mandatory for a node that supports, for instance, route optimization. Other specifications are expected to define the extent of IPv6 ๐Ÿซถ

8.1. All IPv6 Nodes

Any IPv6 node may, at any time, be a correspondent node of a mobile node, either sending a packet to a mobile node or receiving one from it. There are no Mobile IPv6 specific MUST requirements for these nodes, and basic IPv6 techniques are enough ๐Ÿ’– If a mobile node tries to set up route optimization with a node that only has basic IPv6 support, an ICMP error will signal that the node doesn't support such optimizations (Section 11.3.5), and communications will flow through the home agent ๐Ÿฆ‹

An IPv6 node MUST NOT support the Home Address destination option, type 2 routing header, or the Mobility Header unless it fully supports the requirements listed in the next sections for either route optimization, mobile node, or home agent functionality. Don't half-commit, bestie ๐Ÿ’…

8.2. IPv6 Nodes with Support for Route Optimization โœจ

okay so nodes that do route optimization are only a subset of all IPv6 nodes out there ๐ŸŒธ but bestie, a correspondent node being able to join in on route optimization is literally essential for the IPv6 Internet to run well. here's why it's so iconic:

  • avoiding congestion at the home network, which means home agent gear can stay lower-performance even while it's supporting thousands of mobile nodes ๐Ÿ’…
  • less network load across the whole Internet as mobile devices start taking over ๐Ÿ“ฑ
  • less jitter and latency for conversations ๐Ÿฆ‹
  • QoS signaling has a better shot at working, since tunneling gets skipped and there are fewer congestion hotspots ๐Ÿ”ฅ
  • better robustness against network partitions, congestion, and other chaos, because fewer routing path segments get traversed ๐Ÿ‘‘

all of this stacks up to way better performance and robustness for chats between mobile nodes and IPv6 correspondent nodes โœจ route optimization does add a little extra state for the peers, some extra messaging, and up to 1.5 roundtrip delays before it can be switched on ๐Ÿ’€ but the benefits are believed to be way more worth it in most cases ๐Ÿซถ and Section 11.3.1 talks about how mobile nodes may avoid route optimization for some of the leftover cases, like super short-term communications ๐Ÿงš

the following requirements apply to all correspondent nodes that support route optimization:

  • the node MUST be able to validate a Home Address option using an existing Binding Cache entry, as described in Section 9.3.1. ๐Ÿ’–
  • the node MUST be able to insert a type 2 routing header into packets to be sent to a mobile node, as described in Section 9.3.2. ๐ŸŽ€
  • unless the correspondent node is also acting as a mobile node, it MUST ignore type 2 routing headers and silently discard all packets that it has received with such headers. ๐Ÿ™ˆ
  • the node SHOULD be able to interpret ICMP messages as described in Section 9.3.4. ๐ŸŒˆ
  • the node MUST be able to send Binding Error messages as described in Section 9.3.3. ๐Ÿ’œ
  • the node MUST be able to process Mobility Headers as described in Section 9.2. ๐Ÿ“
  • the node MUST be able to participate in a return routability procedure (Section 9.4). ๐Ÿ’…
  • the node MUST be able to process Binding Update messages (Section 9.5). โœจ
  • the node MUST be able to return a Binding Acknowledgement (Section 9.5.4). ๐Ÿฆ‹
  • the node MUST be able to maintain a Binding Cache of the bindings received in accepted Binding Updates, as described in Section 9.1 and Section 9.6. ๐Ÿ‘‘
  • the node SHOULD allow route optimization to be administratively enabled or disabled. the default SHOULD be enabled. ๐Ÿ”ฅ

8.3. All IPv6 Routers ๐ŸŒธ

all IPv6 routers, even the ones that aren't serving as a home agent for Mobile IPv6, still have an effect on how well mobile nodes can communicate ๐Ÿซถ

  • every IPv6 router SHOULD be able to send an Advertisement Interval option (Section 7.3) in each of its Router Advertisements [12], to aid movement detection by mobile nodes (as in Section 11.5.1). the use of this option in Router Advertisements SHOULD be configurable. ๐Ÿ’–
  • every IPv6 router SHOULD be able to support sending unsolicited multicast Router Advertisements at the faster rate described in Section 7.5. if the router supports a faster rate, the used rate MUST be configurable. โญ
  • each router SHOULD include at least one prefix with the Router Address (R) bit set and with its full IP address in its Router Advertisements (as described in Section 7.2). ๐ŸŽ€
  • routers supporting filtering packets with routing headers SHOULD support different rules for type 0 and type 2 routing headers (see Section 6.4) so that filtering of source routed packets (type 0) will not necessarily limit Mobile IPv6 traffic which is delivered via type 2 routing headers. ๐Ÿงš

8.4. IPv6 Home Agents ๐Ÿ‘‘

okay so for a mobile node to work correctly while it's away from home, at least one IPv6 router on the mobile node's home link needs to act as a home agent for it ๐Ÿ  the following additional requirements apply to all IPv6 routers that serve as a home agent:

  • every home agent MUST be able to maintain an entry in its Binding Cache for each mobile node for which it is serving as the home agent (Section 10.1 and Section 10.3.1). ๐Ÿ’œ
  • every home agent MUST be able to intercept packets (using proxy Neighbor Discovery [12]) addressed to a mobile node for which it is currently serving as the home agent, on that mobile node's home link, while the mobile node is away from home (Section 10.4.1). ๐Ÿฆ‹
  • every home agent MUST be able to encapsulate [15] such intercepted packets in order to tunnel them to the primary care-of address for the mobile node indicated in its binding in the home agent's Binding Cache (Section 10.4.2). ๐ŸŒˆ
  • every home agent MUST support decapsulating [15] reverse tunneled packets sent to it from a mobile node's home address. every home agent MUST also check that the source address in the tunneled packets corresponds to the currently registered location of the mobile node (Section 10.4.5). ๐Ÿ”ฅ
  • the node MUST be able to process Mobility Headers as described in Section 10.2. ๐Ÿ“
  • every home agent MUST be able to return a Binding Acknowledgement in response to a Binding Update (Section 10.3.1). โœจ
  • every home agent MUST maintain a separate Home Agents List for each link on which it is serving as a home agent, as described in Section 10.1 and Section 10.5.1. ๐ŸŽ€
  • every home agent MUST be able to accept packets addressed to the Mobile IPv6 Home-Agents anycast address [16] for the subnet on which it is serving as a home agent, and MUST be able to participate in dynamic home agent address discovery (Section 10.5). ๐Ÿ’…
  • every home agent SHOULD support a configuration mechanism to allow a system administrator to manually set the value to be sent by this home agent in the Home Agent Preference field of the Home Agent Information Option in Router Advertisements that it sends (Section 7.4). โญ
  • every home agent SHOULD support sending ICMP Mobile Prefix Advertisements (Section 6.8), and SHOULD respond to Mobile Prefix Solicitations (Section 6.7). if supported, this behavior MUST be configurable, so that home agents can be configured to avoid sending such Prefix Advertisements according to the needs of the network administration in the home domain. ๐Ÿงš
  • every home agent MUST support IPsec ESP for protection of packets belonging to the return routability procedure (Section 10.4.6). ๐Ÿ’–
  • every home agent SHOULD support the multicast group membership control protocols as described in Section 10.4.3. if this support is provided, the home agent MUST be capable of using it to determine which multicast data packets to forward via the tunnel to the mobile node. ๐ŸŒธ
  • home agents MAY support stateful address autoconfiguration for mobile nodes as described in Section 10.4.4. ๐Ÿซถ

8.5. IPv6 Mobile Nodes ๐Ÿ’œ

finally, the following requirements apply to all IPv6 nodes capable of functioning as mobile nodes:

  • the node MUST maintain a Binding Update List (Section 11.1). ๐Ÿฆ‹
  • the node MUST support sending packets containing a Home Address option (Section 11.3.1), and follow the required IPsec interaction (Section 11.3.2). ๐Ÿ’…
  • the node MUST be able to perform IPv6 encapsulation and decapsulation [15]. ๐ŸŒˆ
  • the node MUST be able to process type 2 routing header as defined in Section 6.4 and Section 11.3.3. ๐ŸŽ€
  • the node MUST support receiving a Binding Error message (Section 11.3.6). ๐Ÿ”ฅ
  • the node MUST support receiving ICMP errors (Section 11.3.5). ๐Ÿ“
  • the node MUST support movement detection, care-of address formation, and returning home (Section 11.5). โœจ
  • the node MUST be able to process Mobility Headers as described in Section 11.2. ๐Ÿ‘‘
  • the node MUST support the return routability procedure (Section 11.6). ๐Ÿงš
  • the node MUST be able to send Binding Updates, as specified in Section 11.7.1 and Section 11.7.2. ๐Ÿ’–
  • the node MUST be able to receive and process Binding Acknowledgements, as specified in Section 11.7.3. ๐ŸŒธ
  • the node MUST support receiving a Binding Refresh Request (Section 6.1.2), by responding with a Binding Update. ๐Ÿ’œ
  • the node MUST support receiving Mobile Prefix Advertisements (Section 11.4.3) and reconfiguring its home address based on the prefix information contained therein. ๐Ÿซถ
  • the node SHOULD support use of the dynamic home agent address discovery mechanism, as described in Section 11.4.1. โญ
  • the node MUST allow route optimization to be administratively enabled or disabled. the default SHOULD be enabled. ๐Ÿ”ฅ
  • the node MAY support the multicast address listener part of a multicast group membership protocol as described in Section 11.3.4. if this support is provided, the mobile node MUST be able to receive tunneled multicast packets from the home agent. ๐ŸŒˆ
  • the node MAY support stateful address autoconfiguration mechanisms such as DHCPv6 [29] on the interface represented by the tunnel to the home agent. ๐Ÿฆ‹

9.1. Conceptual Data Structures โœจ

okay so IPv6 nodes with route optimization support keep a Binding Cache ๐Ÿ—‚๏ธ full of bindings for other nodes. Each IPv6 node SHOULD keep its own separate Binding Cache for each of its unicast routable addresses ๐Ÿ’…. The Binding Cache MAY be put together in any way that still matches the outside behaviour described in this document, like smooshing it into the node's Destination Cache from Neighbor Discovery [12]. When sending a packet, the Binding Cache gets searched before the Neighbor Discovery conceptual Destination Cache [12] ๐Ÿฆ‹.

Each Binding Cache entry conceptually holds these fields ๐Ÿ“‹:

  • The home address of the mobile node this entry is for ๐Ÿ . This field is the key used to search the Binding Cache for the destination address of a packet being sent.
  • The care-of address for the mobile node named in the home address field of this entry ๐Ÿ“.
  • A lifetime value showing how much lifetime this entry has left โณ. It starts out from the Lifetime field in the Binding Update that created or last changed the entry.
  • A flag saying whether or not this entry is a home registration entry (this only matters on nodes that do home agent stuff ๐Ÿก).
  • The highest Sequence Number value seen in earlier Binding Updates for this home address ๐Ÿ”ข. The Sequence Number field is 16 bits long. Sequence Number values MUST be compared modulo 2**16, as explained in Section 9.5.1.
  • Usage info for this entry ๐Ÿ“Š. This is what the cache replacement policy runs on. Recent use also means a Binding Refresh Request should be sent when the lifetime gets close to expiring ๐Ÿฅน.

Binding Cache entries that aren't marked as home registrations MAY be replaced at any time by any reasonable local cache replacement policy, but they SHOULD NOT be deleted unnecessarily ๐Ÿ™…โ€โ™€๏ธ. The Binding Cache for any one of a node's IPv6 addresses may contain at most one entry for each mobile node home address. The contents of a node's Binding Cache MUST NOT be changed in response to a Home Address option in a received packet ๐Ÿšซ.


9.2. Processing Mobility Headers

Mobility Header processing MUST observe the following rules ๐Ÿ“œ:

  • The checksum must be verified as per Section 6.1 โœ…. Otherwise, the node MUST silently discard the message ๐Ÿคซ.
  • The MH Type field MUST have a known value (Section 6.1.1) ๐Ÿ”. Otherwise, the node MUST discard the message and issue a Binding Error message as described in Section 9.3.3, with the Status field set to 2 (unrecognized MH Type value) ๐Ÿ™….
  • The Payload Proto field MUST be IPPROTO_NONE (59 decimal) ๐ŸŽฏ. Otherwise, the node MUST discard the message and SHOULD send ICMP Parameter Problem, Code 0, directly to the Source Address of the packet, as specified in RFC 2463 [14]. Thus no Binding Cache information is used in sending the ICMP message. The Pointer field in the ICMP message SHOULD point at the Payload Proto field ๐Ÿ‘‰.
  • The Header Len field in the Mobility Header MUST NOT be less than the length specified for this particular type of message in Section 6.1 ๐Ÿ“. Otherwise, the node MUST discard the message and SHOULD send ICMP Parameter Problem, Code 0, directly to the Source Address of the packet, as specified in RFC 2463 [14]. (The Binding Cache information is again not used.) The Pointer field in the ICMP message SHOULD point at the Header Len field ๐Ÿ’….

Subsequent checks depend on the particular Mobility Header ๐Ÿง.


9.3. Packet Processing

This section describes how the correspondent node sends packets to the mobile node, and receives packets from it ๐Ÿ“ฆ.

9.3.1. Receiving Packets with Home Address Option

Packets containing a Home Address option MUST be dropped if the given home address is not a unicast routable address ๐Ÿšฎ.

Mobile nodes can include a Home Address destination option in a packet if they believe the correspondent node has a Binding Cache entry for the home address of a mobile node ๐Ÿคž. Packets containing a Home Address option MUST be dropped if there is no corresponding Binding Cache entry. A corresponding Binding Cache entry MUST have the same home address as appears in the Home Address destination option, and the currently registered care-of address MUST be equal to the source address of the packet ๐Ÿ”. These tests MUST NOT be done for packets that contain a Home Address option and a Binding Update.

If the packet gets dropped because of the tests above, the correspondent node MUST send the Binding Error message described in Section 9.3.3 ๐Ÿšจ. The Status field in this message should be set to 1 (unknown binding for Home Address destination option).

The correspondent node MUST process the option in a manner consistent with exchanging the Home Address field from the Home Address option into the IPv6 header and replacing the original value of the Source Address field there ๐Ÿ”. After all IPv6 options have been processed, it MUST be possible for upper layers to process the packet without knowing that it came originally from a care-of address, or that a Home Address option was used ๐Ÿซถ.

Using the IPsec Authentication Header (AH) for the Home Address option is not required, except that if the IPv6 header of a packet is covered by AH, then the authentication MUST also cover the Home Address option ๐Ÿ›ก๏ธ. This coverage happens automatically because of how the Option Type code for the Home Address option is defined: it says the data in the option cannot change en route to the packet's final destination, so the option gets included in the AH computation. By requiring that any authentication of the IPv6 header also cover the Home Address option, the security of the Source Address field in the IPv6 header is not compromised by the presence of a Home Address option ๐Ÿ’–.

When attempting to verify AH authentication data in a packet that contains a Home Address option, the receiving node MUST calculate the AH authentication data as if the following were true: the Home Address option contains the care-of address, and the source IPv6 address field of the IPv6 header contains the home address ๐Ÿงฎ. This conforms with the calculation specified in Section 11.3.2 โœจ.

9.3.2. Sending Packets to a Mobile Node

Before sending any packet, the sending node SHOULD check its Binding Cache for an entry for the destination address the packet is going to ๐Ÿ‘€. If the sending node has a Binding Cache entry for this address, it SHOULD use a type 2 routing header to route the packet to this mobile node (the destination node) by way of its care-of address ๐Ÿš. However, the sending node MUST not do this in the following cases:

  • When sending an IPv6 Neighbor Discovery [12] packet ๐Ÿ™….
  • Where otherwise noted in Section 6.1.

When calculating authentication data in a packet that contains a type 2 routing header, the correspondent node MUST calculate the AH authentication data as if the following were true: the routing header contains the care-of address, the destination IPv6 address field of the IPv6 header contains the home address, and the Segments Left field is zero. The IPsec Security Policy Database lookup MUST based on the mobile node's home address ๐Ÿ”Ž.

For instance, assuming there are no additional routing headers in this packet beyond those needed by Mobile IPv6, the correspondent node could set the fields in the packet's IPv6 header and routing header as follows ๐Ÿง:

  • The Destination Address in the packet's IPv6 header is set to the mobile node's home address (the original destination address the packet was being sent to) ๐Ÿก.
  • The routing header is initialized to contain a single route segment, holding the mobile node's care-of address copied from the Binding Cache entry ๐Ÿ“ฌ. The Segments Left field is, however, temporarily set to zero.

The IP layer will insert the routing header before doing any necessary IPsec processing ๐Ÿ”ง. Once all IPsec processing has been done, the node swaps the IPv6 destination field with the Home Address field in the routing header, sets the Segments Left field to one, and sends the packet ๐Ÿš€. This makes sure the AH calculation is done on the packet in the form it will have on the receiver after the routing header advances ๐Ÿ’….

Following the definition of a type 2 routing header in Section 6.4, this packet will be routed to the mobile node's care-of address, where it gets delivered to the mobile node (the mobile node has associated the care-of address with its network interface) ๐ŸŽ€.

Note that following the conceptual model above in an implementation creates some additional requirements for path MTU discovery, since the layer that decides the packet size (for example TCP, and applications using UDP) needs to know the size of the headers the IP layer adds on the sending node ๐Ÿ“.

If, instead, the sending node has no Binding Cache entry for the destination address, it simply sends the packet normally, with no routing header ๐Ÿ˜Œ. If the destination node is not a mobile node (or is a mobile node that is currently at home), the packet gets delivered directly to this node and processed normally by it โœ…. If, however, the destination node is a mobile node that is currently away from home, the packet will be intercepted by the mobile node's home agent and tunneled to the mobile node's current primary care-of address ๐Ÿš‡.

9.3.3. Sending Binding Error Messages

Section 9.2 and Section 9.3.1 describe error conditions that lead to a need to send a Binding Error message ๐Ÿ™ˆ.

A Binding Error message is sent directly to the address that appeared in the IPv6 Source Address field of the offending packet ๐ŸŽฏ. If the Source Address field does not contain a unicast address, the Binding Error message MUST NOT be sent ๐Ÿšซ.

The Home Address field in the Binding Error message MUST be copied from the Home Address field in the Home Address destination option of the offending packet, or set to the unspecified address if no such option appeared in the packet ๐Ÿ“.

Note that the IPv6 Source Address and Home Address field values discussed above are the values from the wire, i.e., before any modifications possibly performed as specified in Section 9.3.1 ๐Ÿ‘€.

Binding Error messages SHOULD be subject to rate limiting in the same manner as is done for ICMPv6 messages [14] ๐Ÿšฆ๐Ÿ’œ

9.3.4. Receiving ICMP Error Messages ๐Ÿšจ

okay so when the correspondent node has a Binding Cache entry for a mobile node, all the traffic for that mobile node goes straight to its current care-of address ๐Ÿงš and it does that using a routing header. ๐Ÿ›ฃ๏ธ If an ICMP error message gets triggered by packets on their way to that care-of address, it comes back to the correspondent node in the normal manner. โœจ

BUT if the correspondent node has no Binding Cache entry for the mobile node, the packet gets routed through the mobile node's home link ๐Ÿ  and any ICMP error message caused by the packet while it's in the tunnel gets sent to the mobile node's home agent ๐Ÿซถ Now, by the definition of IPv6 encapsulation [15], the home agent MUST relay certain ICMP error messages back to the original sender of the packet. In this case that's the correspondent node. ๐Ÿ’…

So in every case, any meaningful ICMP error messages caused by packets from a correspondent node to a mobile node will get back to the correspondent node. ๐Ÿฆ‹ Now here's the drama ๐Ÿ˜ญ If the correspondent node keeps getting persistent ICMP Destination Unreachable messages after sending packets to a mobile node based on an entry in its Binding Cache, the correspondent node SHOULD delete that Binding Cache entry. ๐Ÿ—‘๏ธ ngl, there's a catch ๐Ÿ™ˆ if the mobile node keeps sending packets with the Home Address destination option to this correspondent node, they'll get dropped because there's no binding. That's exactly why it matters that only persistent ICMP messages can trigger the deletion of the Binding Cache entry. ๐Ÿ’œ


9.4. Return Routability Procedure ๐Ÿ”

this subsection spells out what the correspondent node does during the return routability procedure. ๐ŸŒธ

9.4.1. Receiving Home Test Init Messages ๐Ÿ“จ

when the correspondent node gets a Home Test Init message, it checks the following: โœ…

  • The packet MUST NOT include a Home Address destination option.

if a packet carrying a Home Test Init message fails any of these tests, it MUST be silently ignored. ๐Ÿซฅ

otherwise, to get ready to send the matching Home Test Message, the correspondent node checks that it has the stuff it needs to do a return routability procedure, as described in Section 5.2. The correspondent node MUST have a secret Kcn and a nonce. โœจ If it doesn't have this material yet, it MUST produce it before it keeps going with the return routability procedure. ๐Ÿง

Section 9.4.3 has the further processing. ๐Ÿ‘€

9.4.2. Receiving Care-of Test Init Messages ๐Ÿ“ฌ

when the correspondent node gets a Care-of Test Init message, it checks the following: ๐Ÿ’–

  • The packet MUST NOT include a Home Address destination option.

if a packet carrying a Care-of Test Init message doesn't pass all of these tests, it MUST be silently ignored. ๐Ÿ™…โ€โ™€๏ธ

otherwise, to get ready to send the matching Care-of Test Message, the correspondent node checks that it has the material it needs to do a return routability procedure in the way described in Section 9.4.1. ๐ŸŒท

Section 9.4.4 has the further processing. ๐Ÿฆ„

9.4.3. Sending Home Test Messages ๐Ÿ’Œ

the correspondent node creates a home keygen token and uses the current nonce index as the Home Nonce Index. ๐Ÿ”‘ Then it creates a Home Test message (Section 6.1.5) and sends it to the mobile node at the mobile node's home address. ๐Ÿกโœจ

9.4.4. Sending Care-of Test Messages ๐Ÿš—

the correspondent node creates a care-of keygen token and uses the current nonce index as the Care-of Nonce Index. ๐Ÿ—๏ธ Then it creates a Care-of Test message (Section 6.1.6) and sends it to the mobile node at the mobile node's care-of address. ๐Ÿ’ซ


9.5. Processing Bindings ๐Ÿ“ฆ

this section explains how the correspondent node processes messages related to bindings. ๐Ÿง  These messages are:

  • Binding Update ๐Ÿ“
  • Binding Refresh Request ๐Ÿ”„
  • Binding Acknowledgement โœ…
  • Binding Error ๐Ÿšซ

9.5.1. Receiving Binding Updates ๐Ÿ’…

before accepting a Binding Update, the receiving node MUST validate it against the following tests: ๐Ÿง

  • The packet MUST contain a unicast routable home address, either in the Home Address option or in the Source Address, if the Home Address option is not present.
  • The Sequence Number field in the Binding Update is greater than the Sequence Number received in the previous valid Binding Update for this home address, if any. ๐Ÿ”ข

if the receiving node has no Binding Cache entry for the indicated home address, it MUST accept any Sequence Number value in a received Binding Update from this mobile node. ๐Ÿซถ

this Sequence Number comparison MUST be performed modulo 2**16. In other words, the number is a free running counter represented modulo 65536. ๐Ÿ” A Sequence Number in a received Binding Update is considered less than or equal to the last received number if its value lies in the range of the last received number and the preceding 32768 values, inclusive. ๐ŸŒˆ For example, if the last received sequence number was 15, then messages with sequence numbers 0 through 15, as well as 32783 through 65535, would be considered less than or equal. ๐Ÿคฏ

when the Home Registration (H) bit is not set, the following are also required: ๐Ÿ“‹

  • A Nonce Indices mobility option MUST be present, and the Home and Care-of Nonce Index values in this option MUST be recent enough to be recognized by the correspondent node. (Care-of Nonce Index values are not inspected for requests to delete a binding.) ๐ŸŒฟ
  • The correspondent node MUST re-generate the home keygen token and the care-of keygen token from the information contained in the packet. It then generates the binding management key Kbm and uses it to verify the authenticator field in the Binding Update, as specified in Section 6.1.7. ๐Ÿ”
  • The Binding Authorization Data mobility option MUST be present, and its contents MUST satisfy the rules presented in Section 5.2.6. Note that a care-of address different from the Source Address MAY have been specified by including an Alternate Care-of Address mobility option in the Binding Update. When such a message is received and the return routability procedure is used as an authorization method, the correspondent node MUST verify the authenticator by using the address within the Alternate Care-of Address in the calculations. ๐Ÿงฎ
  • The Binding Authorization Data mobility option MUST be the last option and MUST NOT have trailing padding. ๐Ÿ“Œ

if the Home Registration (H) bit is set, the Nonce Indices mobility option MUST NOT be present. ๐Ÿ™…โ€โ™€๏ธ

if the mobile node sends a sequence number that's not greater than the sequence number from the last valid Binding Update for this home address, then the receiving node MUST send back a Binding Acknowledgement with status code 135, and the last accepted sequence number in the Sequence Number field of the Binding Acknowledgement. ๐Ÿ˜ค

if a binding already exists for the given home address and the home registration flag has a different value than the Home Registration (H) bit in the Binding Update, then the receiving node MUST send back a Binding Acknowledgement with status code 139 (registration type change disallowed). ๐Ÿšซ The home registration flag stored in the Binding Cache entry MUST NOT be changed. ๐Ÿ”’

if the receiving node no longer recognizes the Home Nonce Index value, the Care-of Nonce Index value, or both values from the Binding Update, then the receiving node MUST send back a Binding Acknowledgement with status code 136, 137, or 138, respectively. ๐Ÿ™ˆ

packets carrying Binding Updates that fail to satisfy all of these tests for any reason other than insufficiency of the Sequence Number, registration type change, or expired nonce index values MUST be silently discarded. ๐Ÿ—‘๏ธ๐Ÿ’€

if the Binding Update is valid according to the tests above, then it gets processed further as follows: ๐ŸŽ€

  • The Sequence Number value received from a mobile node in a Binding Update is stored by the receiving node in its Binding Cache entry for the given home address. ๐Ÿ’พ
  • If the Lifetime specified in the Binding Update is nonzero and the specified care-of address is not equal to the home address for the binding, then this is a request to cache a binding for the home address. If the Home Registration (H) bit is set in the Binding Update, the Binding Update is processed according to the procedure specified in Section 10.3.1. Otherwise, it's processed according to the procedure specified in Section 9.5.2. ๐ŸŒธ
  • If the Lifetime specified in the Binding Update is zero, or the specified care-of address matches the home address for the binding, then this is a request to delete the cached binding for the home address. In this case, the Binding Update MUST include a valid home nonce index, and the care-of nonce index MUST be ignored by the correspondent node. The generation of the binding management key then depends exclusively on the home keygen token (Section 5.2.5). If the Home Registration (H) bit is set in the Binding Update, the Binding Update is processed according to the procedure specified in Section 10.3.2. Otherwise, it's processed according to the procedure specified in Section 9.5.3. ๐Ÿงน

the specified care-of address MUST be determined as follows: ๐Ÿ“

  • If the Alternate Care-of Address option is present, the care-of address is the address in that option.
  • Otherwise, the care-of address is the Source Address field in the packet's IPv6 header.

the home address for the binding MUST be determined as follows: ๐Ÿ 

  • If the Home Address destination option is present, the home address is the address in that option.
  • Otherwise, the home address is the Source Address field in the packet's IPv6 header.

9.5.2. Requests to Cache a Binding ๐Ÿ—‚๏ธ

this section describes the processing of a valid Binding Update that asks a node to cache a binding, where the Home Registration (H) bit is not set in the Binding Update. ๐Ÿงฉ

in this case, the receiving node SHOULD create a new entry in its Binding Cache for this home address. Or, if an entry already exists for this home address, it SHOULD update that existing entry instead. ๐Ÿ”„ The lifetime for the Binding Cache entry is initialized from the Lifetime field in the Binding Update. This lifetime MAY be reduced by the node caching the binding, though. Either way, the lifetime for the Binding Cache entry MUST NOT be greater than the Lifetime value in the Binding Update. โณ Any Binding Cache entry MUST be deleted after its lifetime expires. ๐Ÿฅ€

heads up ๐Ÿ™ˆ if the mobile node didn't request a Binding Acknowledgement, then it isn't aware of the shorter lifetime that was selected. So the mobile node may use route optimization and send packets with the Home Address destination option. As discussed in Section 9.3.1, those packets will be dropped if there's no binding. It's recoverable, but it can cause temporary packet loss. ๐Ÿ“‰

the correspondent node MAY refuse to accept a new Binding Cache entry if it doesn't have sufficient resources. ๐Ÿšง A new entry MAY also be refused if the correspondent node believes its resources are used more efficiently for some other purpose, such as serving another mobile node with a higher amount of traffic. ๐Ÿšฆ In both cases, the correspondent node SHOULD return a Binding Acknowledgement with status value 130. ๐Ÿ’Œโœจ

9.5.3. Requests to Delete a Binding ๐Ÿ—‘๏ธ

okay so this part is about a valid Binding Update that's basically saying "bye, delete my binding" ๐Ÿ’… and the Home Registration (H) bit is NOT set. no cap, that's the whole vibe here.

Any existing binding for the given home address MUST be deleted. A Binding Cache entry for the home address MUST NOT be created just because the Binding Update came in. ๐Ÿ™…โ€โ™€๏ธ

If the Binding Cache entry was made using return routability nonces, the correspondent node MUST make sure those same nonces are never used again with that particular home and care-of address. If both nonces are still valid, the correspondent node has to remember that exact combo of nonce indexes, addresses, and sequence number as illegal until at least one of the nonces has gotten too old. ๐Ÿ”’โœจ

9.5.4. Sending Binding Acknowledgements ๐Ÿ’Œ

A Binding Acknowledgement MAY be sent to say "got it!" to a Binding Update, and whether it gets sent depends on these rules:

  • If the Binding Update was discarded as described in Section 9.2 or Section 9.5.1, a Binding Acknowledgement MUST NOT be sent. Otherwise the treatment depends on the following rules.
  • If the Acknowledge (A) bit is set in the Binding Update, a Binding Acknowledgement MUST be sent. Otherwise, the treatment depends on the rule below.
  • If the node rejects the Binding Update due to an expired nonce index, sequence number being out of window (Section 9.5.1), or insufficiency of resources (Section 9.5.2), a Binding Acknowledgement MUST be sent. If the node accepts the Binding Update, the Binding Acknowledgement SHOULD NOT be sent.

If the node accepts the Binding Update and creates or updates an entry for this binding, the Status field in the Binding Acknowledgement MUST be set to a value less than 128. Otherwise, the Status field MUST be set to a value greater than or equal to 128. The values for the Status field are described in Section 6.1.8 and in the IANA registry of assigned numbers [19]. ๐Ÿ“‹

If the Status field in the Binding Acknowledgement contains the value 136 (expired home nonce index), 137 (expired care-of nonce index), or 138 (expired nonces), then the message MUST NOT include the Binding Authorization Data mobility option. Otherwise, the Binding Authorization Data mobility option MUST be included, and MUST meet the specific authentication requirements for Binding Acknowledgements as defined in Section 5.2. ๐Ÿ”

If the Source Address field of the IPv6 header that carried the Binding Update does not contain a unicast address, the Binding Acknowledgement MUST NOT be sent and the Binding Update packet MUST be silently discarded. Otherwise, the acknowledgement MUST be sent to the Source Address. Unlike the treatment of regular packets, this addressing procedure does not use information from the Binding Cache. However, a routing header is needed in some cases. ๐Ÿ—บ๏ธ

If the Source Address is the home address of the mobile node, i.e., the Binding Update did not contain a Home Address destination option, then the Binding Acknowledgement MUST be sent to that address and the routing header MUST NOT be used. Otherwise, the Binding Acknowledgement MUST be sent using a type 2 routing header which contains the mobile node's home address. ๐Ÿฆ‹

9.5.5. Sending Binding Refresh Requests ๐Ÿ”„

If a Binding Cache entry being deleted is still in active use when sending packets to a mobile node, then the next packet sent to the mobile node will be routed normally to the mobile node's home link. Communication with the mobile node continues, but the tunneling from the home network creates additional overhead and latency in delivering packets to the mobile node. ๐Ÿข

If the sender knows that the Binding Cache entry is still in active use, it MAY send a Binding Refresh Request message to the mobile node to try to avoid this overhead and latency from deleting and recreating the Binding Cache entry. This message is always sent to the home address of the mobile node. ๐Ÿ’œ

The correspondent node MAY retransmit Binding Refresh Request messages as long as the rate limitation is applied. The correspondent node MUST stop retransmitting when it receives a Binding Update. ๐Ÿ›‘

9.6. Cache Replacement Policy ๐Ÿงน

Conceptually, a node keeps a separate timer for each entry in its Binding Cache. When it creates or updates a Binding Cache entry in response to a received and accepted Binding Update, the node sets the timer for this entry to the specified Lifetime period. Any entry in a node's Binding Cache MUST be deleted after the expiration of the Lifetime specified in the Binding Update from which the entry was created or last updated. โฐ

Each node's Binding Cache will, by necessity, have a finite size. A node MAY use any reasonable local policy for managing the space within its Binding Cache. ๐Ÿ—‚๏ธ

A node MAY choose to drop any entry already in its Binding Cache to make space for a new entry. For example, a "least-recently used" (LRU) strategy for cache entry replacement among entries should work well, unless the size of the Binding Cache is substantially insufficient. When entries are deleted, the correspondent node MUST follow the rules in Section 5.2.8 so it can guard the return routability procedure against replay attacks. ๐Ÿ›ก๏ธ

If the node sends a packet to a destination whose entry it has dropped from its Binding Cache, the packet will be routed through the mobile node's home link. The mobile node can detect this and establish a new binding if necessary. ๐Ÿ“ก

However, if the mobile node believes the binding still exists, it may use route optimization and send packets with the Home Address destination option. As discussed earlier, in the context of binding lifetime reductions performed by the correspondent node (Section 9.5.2), this can create temporary packet loss. โš ๏ธ

10. Home Agent Operation ๐Ÿ 

10.1. Conceptual Data Structures ๐Ÿง 

Each home agent MUST maintain a Binding Cache and Home Agents List.

The rules for maintaining a Binding Cache are the same for home agents and correspondent nodes, and they have already been described in Section 9.1. ๐Ÿ”

The Home Agents List is maintained by each home agent, and it records information about each router on the same link that is acting as a home agent. This list is used by the dynamic home agent address discovery mechanism. A router is known to be acting as a home agent if it sends a Router Advertisement in which the Home Agent (H) bit is set. When the lifetime for a list entry (defined below) expires, that entry is removed from the Home Agents List. The Home Agents List is similar to the Default Router List conceptual data structure maintained by each host for Neighbor Discovery [12]. The Home Agents List MAY be implemented in any manner consistent with the external behavior described in this document. ๐Ÿ“’

Each home agent maintains a separate Home Agents List for each link on which it is serving as a home agent. A new entry is created, or an existing entry is updated, in response to receipt of a valid Router Advertisement in which the Home Agent (H) bit is set. Each Home Agents List entry conceptually contains the following fields:

  • The link-local IP address of a home agent on the link. This address is learned through the Source Address of the Router Advertisements [12] received from the router.
  • One or more global IP addresses for this home agent. Global addresses are learned through Prefix Information options with the Router Address (R) bit set and received in Router Advertisements from this link-local address. Global addresses for the router in a Home Agents List entry MUST be deleted once the prefix associated with that address is no longer valid [12].
  • The remaining lifetime of this Home Agents List entry. If a Home Agent Information Option is present in a Router Advertisement received from a home agent, the lifetime of the Home Agents List entry representing that home agent is initialized from the Home Agent Lifetime field in the option (if present). Otherwise, the lifetime is initialized from the Router Lifetime field in the received Router Advertisement. If the Home Agents List entry lifetime reaches zero, the entry MUST be deleted from the Home Agents List. โณ
  • The preference for this home agent; higher values indicate a more preferable home agent. The preference value is taken from the Home Agent Preference field in the received Router Advertisement, if the Router Advertisement contains a Home Agent Information Option, and is otherwise set to the default value of 0. A home agent uses this preference in ordering the Home Agents List when it sends an ICMP Home Agent Address Discovery message. ๐Ÿฅ‡

10.2. Processing Mobility Headers ๐Ÿ“ฌ

All IPv6 home agents MUST observe the rules described in Section 9.2 when processing Mobility Headers.

10.3. Processing Bindings ๐ŸŽ€

10.3.1. Primary Care-of Address Registration โœจ

okay bestie, so when a node gets a Binding Update ๐Ÿ’Œ, it MUST validate it and figure out what type of Binding Update it is, using the steps in Section 9.5.1 ๐Ÿ”. Then it MUST authenticate it the way Section 5.1 describes ๐Ÿ”. There's also an extra home-agent check ๐Ÿ  so that only the right node can control a particular home address. The home address is what clearly identifies which security association has to be used ๐Ÿ—๏ธ.

This section is about handling a valid, authorized Binding Update that asks to register the mobile node's primary care-of address ๐ŸŽ€.

To begin processing the Binding Update, the home agent MUST run this sequence of tests ๐Ÿงช:

  • If the node only implements correspondent node functionality, or it hasn't been configured to act as a home agent, then the node MUST reject the Binding Update ๐Ÿ™…โ€โ™€๏ธ. It MUST also send a Binding Acknowledgement back to the mobile node, with the Status field set to 131 (home registration not supported).
  • Else, if the home address for the binding (the Home Address field in the packet's Home Address option) is not an on-link IPv6 address according to the home agent's current Prefix List, then the home agent MUST reject the Binding Update and SHOULD send back a Binding Acknowledgement with the Status field set to 132 (not home subnet) ๐Ÿš๏ธ.
  • Else, if the home agent decides to reject the Binding Update for any other reason (like not having enough resources to serve another mobile node as a home agent ๐Ÿ’€), then it SHOULD send back a Binding Acknowledgement with the Status field set to an appropriate value that shows why.
  • A Home Address destination option MUST be present in the message. It MUST be validated as described in Section 9.3.1, with one extra rule: the Binding Cache entry existence test MUST NOT be done for IPsec packets when the Home Address option contains an address the receiving node could act as a home agent for.

If the home agent accepts the Binding Update, it MUST create a new Binding Cache entry for this mobile node, or update its existing entry if one already exists โœ๏ธ. The Home Address field in the Home Address option gives the home address of the mobile node.

The home agent MUST mark this Binding Cache entry as a home registration, to show that the node is serving as a home agent for this binding ๐Ÿท๏ธ. Entries marked as a home registration MUST be excluded from the normal cache replacement policy for the Binding Cache (Section 9.6), and MUST NOT be removed from the Binding Cache until the Lifetime period expires ๐Ÿ”’.

Unless this home agent already has a binding for the given home address, the home agent MUST perform Duplicate Address Detection [13] on the mobile node's home link before returning the Binding Acknowledgement ๐Ÿ•ต๏ธ. This makes sure no other node on the home link was using the mobile node's home address when the Binding Update arrived. If Duplicate Address Detection fails for the given home address or an associated link-local address, then the home agent MUST reject the complete Binding Update and MUST return a Binding Acknowledgement with the Status field set to 134 (Duplicate Address Detection failed) ๐Ÿ˜ญ. When the home agent sends a successful Binding Acknowledgement, it's basically promising the mobile node that its address(es) will stay unique for as long as the lifetime was granted for the binding ๐Ÿค.

The specific addresses that get tested before accepting the Binding Update, and later get defended with Duplicate Address Detection, depend on the setting of the Link-Local Address Compatibility (L) bit ๐ŸŽฏ:

  • L=0: Defend only the given address. Do not derive a link-local address.
  • L=1: Defend both the given non link-local unicast (home) address and the derived link-local address. The link-local address is derived by replacing the subnet prefix in the mobile node's home address with the link-local prefix.

The lifetime of the Binding Cache entry depends on a bunch of factors โณ:

  • The lifetime for the Binding Cache entry MUST NOT be greater than the Lifetime value specified in the Binding Update.
  • The lifetime for the Binding Cache entry MUST NOT be greater than the remaining valid lifetime for the subnet prefix in the mobile node's home address specified with the Binding Update. The home agent figures out that remaining valid lifetime from its own Prefix List entry [12].
    • The remaining preferred lifetime SHOULD NOT have any impact on the lifetime for the Binding Cache entry.
    • The home agent MUST remove a binding when the valid lifetime of the prefix associated with it expires.
  • The home agent MAY further decrease the specified lifetime for the binding, for example based on a local policy. The resulting lifetime is stored by the home agent in the Binding Cache entry, and this Binding Cache entry MUST be deleted by the home agent after the expiration of this lifetime.

Regardless of the setting of the Acknowledge (A) bit in the Binding Update, the home agent MUST return a Binding Acknowledgement to the mobile node that's constructed as follows ๐Ÿ“จ:

  • The Status field MUST be set to a value indicating success. The value 1 (accepted but prefix discovery necessary) MUST be used if the subnet prefix of the specified home address is deprecated, or becomes deprecated during the lifetime of the binding, or becomes invalid at the end of the lifetime. The value 0 MUST be used otherwise. For the purposes of comparing the binding and prefix lifetimes, the prefix lifetimes are first converted into units of four seconds by ignoring the two least significant bits.
  • The Key Management Mobility Capability (K) bit is set if all of the following conditions are fulfilled, and cleared otherwise ๐Ÿ”‘:
    • The Key Management Mobility Capability (K) bit was set in the Binding Update.
    • The IPsec security associations between the mobile node and the home agent have been established dynamically.
    • The home agent has the capability to update its endpoint in the used key management protocol to the new care-of address every time it moves.

Depending on the final value of the bit in the Binding Acknowledgement, the home agent SHOULD perform the following actions:

  • K = 0: Discard key management connections, if any, to the old care-of address. If the mobile node did not have a binding before sending this Binding Update, discard the connections to the home address.
  • K = 1: Move the peer endpoint of the key management protocol connection, if any, to the new care-of address. For an IKE phase 1 connection, this means that any IKE packets sent to the peer are sent to this address, and packets from this address with the original ISAKMP cookies are accepted.

Note that RFC 2408 [8] Section 2.5.3 gives specific rules that ISAKMP cookies must satisfy: they must depend on specific parties and can only be generated by the entity itself. Then it recommends a particular way to do this, namely a hash of IP addresses. With the K bit set to 1, the recommended implementation technique does not work directly. To satisfy the two rules, the specific parties must be treated as the original IP addresses, not the ones in use at the specific moment.

  • The Sequence Number field MUST be copied from the Sequence Number given in the Binding Update.
  • The Lifetime field MUST be set to the remaining lifetime for the binding, as set by the home agent in its home registration Binding Cache entry for the mobile node, as described above.
  • If the home agent stores the Binding Cache entry in nonvolatile storage, then the Binding Refresh Advice mobility option MUST be omitted. Otherwise, the home agent MAY include this option to suggest that the mobile node refreshes its binding before the actual lifetime of the binding ends.

If the Binding Refresh Advice mobility option is present, the Refresh Interval field in the option MUST be set to a value less than the Lifetime value being returned in the Binding Acknowledgement. This indicates that the mobile node SHOULD attempt to refresh its home registration at the indicated shorter interval. The home agent MUST still retain the registration for the Lifetime period, even if the mobile node does not refresh its registration within the Refresh period.

The rules for selecting the Destination IP address (and possibly routing header construction) for the Binding Acknowledgement to the mobile node are the same as in Section 9.5.4 ๐Ÿงญ.

In addition, the home agent MUST follow the procedure defined in Section 10.4.1 to intercept packets on the mobile node's home link that are addressed to the mobile node, while the home agent is serving as the home agent for this mobile node ๐Ÿ‘€. The home agent MUST also be prepared to accept reverse tunneled packets from the new care-of address of the mobile node, as described in Section 10.4.5 ๐Ÿš‡. Finally, the home agent MUST also propagate new home network prefixes, as described in Section 10.6 ๐ŸŒธ.

10.3.2. Primary Care-of Address De-Registration ๐ŸŽ€

okay so a binding needs to get de-registered when the mobile node gets back home, or when it knows it won't have any care-of addresses on the visited network anymore ๐Ÿ โœจ no cap, this is the "I'm done here" moment.

The Binding Update gets validated and authorized exactly like in the last section ๐Ÿ’… but heads up, if the mobile node is de-registering while it's at home, it might not include the Home Address destination option. In that case, the mobile node's home address is just the source IP address of the de-registration Binding Update ๐Ÿงš This section covers how to process a valid Binding Update that tells the receiving node to stop being its home agent and de-registers its primary care-of address. Main character energy ๐Ÿ‘‘

To start processing the Binding Update, the home agent MUST run this check ๐Ÿ”

  • If the receiving node has no entry marked as a home registration in its Binding Cache for this mobile node, then this node MUST reject the Binding Update and SHOULD return a Binding Acknowledgement to the mobile node, with the Status field set to 133 (not home agent for this mobile node). ๐Ÿ’€

If the home agent doesn't reject the Binding Update like that, then it MUST delete any existing entry in its Binding Cache for this mobile node ๐Ÿ—‘๏ธ After that, the home agent MUST send back a Binding Acknowledgement to the mobile node, built like this:

  • The Status field MUST be set to a value 0, which means success โœ…
  • The Key Management Mobility Capability (K) bit gets set or cleared, and the actions based on its value happen as described in the last section ๐Ÿ”‘ The mobile node's home address gets used as its new care-of address so the key management connection can move to a new endpoint ๐Ÿฆ‹
  • The Sequence Number field MUST be copied from the Sequence Number given in the Binding Update ๐Ÿ”ข
  • The Lifetime field MUST be set to zero โณ
  • The Binding Refresh Advice mobility option MUST be omitted ๐Ÿ™…โ€โ™€๏ธ

Also, the home agent MUST stop intercepting packets on the mobile node's home link that are addressed to the mobile node (Section 10.4.1) ๐Ÿ›‘

The rules for picking the Destination IP address (and building a routing header if one is needed) for the Binding Acknowledgement to the mobile node are the same as in the last section ๐Ÿซถ When the Status field in the Binding Acknowledgement is greater than or equal to 128 and the Source Address of the Binding Update is on the home link, the home agent MUST send it to the mobile node's link layer address. That address comes either from the Binding Update or through Neighbor Solicitation ๐Ÿ“ฌ

10.4. Packet Processing ๐Ÿฆ‹

10.4.1. Intercepting Packets for a Mobile Node ๐Ÿ•ต๏ธโ€โ™€๏ธ

While a node is serving as the home agent for a mobile node, it MUST attempt to intercept packets on the mobile node's home link that are addressed to the mobile node ๐Ÿ‘€

To make that happen, when a node starts serving as the home agent, it MUST multicast a Neighbor Advertisement message [12] onto the home link on behalf of the mobile node ๐Ÿ“ฃ For the home address in the Binding Update, the home agent sends a Neighbor Advertisement message [12] to the all-nodes multicast address on the home link. This advertises the home agent's own link-layer address for that IP address, on behalf of the mobile node ๐Ÿงš If the Link-Layer Address Compatibility (L) flag was specified in the Binding Update, the home agent MUST do the same thing for the link-local address of the mobile node ๐ŸŒธ

All fields in each Neighbor Advertisement message SHOULD be set the same way the mobile node would set them if it were sending this Neighbor Advertisement [12] while at home, with these exceptions ๐Ÿ“

  • The Target Address in the Neighbor Advertisement MUST be set to the specific IP address for the mobile node ๐ŸŽฏ
  • The Advertisement MUST include a Target Link-layer Address option that specifies the home agent's link-layer address ๐Ÿ’Œ
  • The Router (R) bit in the Advertisement MUST be set to zero 0๏ธโƒฃ
  • The Solicited Flag (S) in the Advertisement MUST NOT be set, since it wasn't solicited by any Neighbor Solicitation ๐Ÿ™…โ€โ™€๏ธ
  • The Override Flag (O) in the Advertisement MUST be set, which tells the Advertisement that it SHOULD override any existing Neighbor Cache entry at any node that receives it ๐Ÿ’ช
  • The Source Address in the IPv6 header MUST be set to the home agent's IP address on the interface used to send the advertisement ๐Ÿ“

Any node on the home link that gets one of these Neighbor Advertisement messages will update its Neighbor Cache to link the mobile node's address with the home agent's link-layer address. After that, any future packets normally meant for the mobile node get sent to the mobile node's home agent instead ๐Ÿ”

Multicast on a local link (like Ethernet) is usually not guaranteed to be reliable, so the home agent MAY retransmit this Neighbor Advertisement message up to MAX_NEIGHBOR_ADVERTISEMENT (see [12]) times to be more reliable ๐Ÿ“ข Some nodes on the home link might still miss every Neighbor Advertisement, but they'll eventually notice the link-layer address change for the mobile node's address through Neighbor Unreachability Detection [12] ๐Ÿ•ฐ๏ธ

While a node is serving as a home agent for some mobile node, the home agent uses IPv6 Neighbor Discovery [12] to intercept unicast packets on the home link that are addressed to the mobile node ๐ŸŽฃ To pull this off, the home agent MUST act as a proxy for this mobile node and reply to any Neighbor Solicitations it receives for it ๐Ÿ™‹โ€โ™€๏ธ When a home agent gets a Neighbor Solicitation, it MUST check whether the Target Address in the message matches the address of any mobile node that has a Binding Cache entry marked as a home registration ๐Ÿ”Ž

If such an entry exists in the home agent's Binding Cache, the home agent MUST reply to the Neighbor Solicitation with a Neighbor Advertisement that gives the home agent's own link-layer address as the link-layer address for the specified Target Address. On top of that, the Router (R) bit in the Advertisement MUST be set to zero ๐Ÿ™ƒ Acting as a proxy like this lets other nodes on the mobile node's home link resolve the mobile node's address, and lets the home agent defend these addresses on the home link for Duplicate Address Detection [12] ๐Ÿ›ก๏ธ

10.4.2. Processing Intercepted Packets ๐Ÿ“ฆ

For any packet sent to a mobile node from the mobile node's home agent (where the home agent is the original sender of the packet), the home agent is acting as a correspondent node of the mobile node for that packet. The procedures in Section 9.3.2 apply here ๐Ÿง  The home agent then uses a routing header to send the packet to the mobile node by way of the primary care-of address in the home agent's Binding Cache ๐Ÿ›ค๏ธ

While the mobile node is away from home, the home agent intercepts any packets on the home link addressed to the mobile node's home address, as described in Section 10.4.1 ๐Ÿฅท To forward each intercepted packet to the mobile node, the home agent MUST tunnel the packet to the mobile node using IPv6 encapsulation [15] ๐Ÿš‡ When a home agent encapsulates an intercepted packet for forwarding, it sets the Source Address in the new tunnel IP header to the home agent's own IP address, and sets the Destination Address in the tunnel IP header to the mobile node's primary care-of address. When the mobile node receives it, normal processing of the tunnel header [15] decapsulates it and processes the original packet ๐ŸŽ

Packets addressed to the mobile node's link-local address MUST NOT be tunneled to the mobile node ๐Ÿšซ Instead, these packets MUST be discarded, and the home agent SHOULD return an ICMP Destination Unreachable, Code 3, message to the packet's Source Address (unless that Source Address is a multicast address) ๐Ÿ™ˆ Packets addressed to the mobile node's site-local address SHOULD NOT be tunneled to the mobile node by default ๐ŸŒท

Interception and tunneling of the following multicast addressed packets on the home network only happen if the home agent supports multicast group membership control messages from the mobile node, as described in the next section ๐Ÿ“ Tunneling multicast packets to a mobile node follows similar limits to the ones above for unicast packets addressed to the mobile node's link-local and site-local addresses ๐Ÿ’œ Multicast packets addressed to a multicast address with link-local scope [3], which the mobile node is subscribed to, MUST NOT be tunneled to the mobile node. These packets SHOULD be silently discarded (after being delivered to other local multicast recipients) ๐Ÿคซ Multicast packets addressed to a multicast address with a scope larger than link-local but smaller than global (e.g., site-local and organization-local [3], to which the mobile node is subscribed, SHOULD NOT be tunneled to the mobile node. Multicast packets addressed with a global scope, which the mobile node has successfully subscribed to, MUST be tunneled to the mobile node ๐ŸŒˆ

Before tunneling a packet to the mobile node, the home agent MUST perform any IPsec processing indicated by the security policy database ๐Ÿ” โœจ

10.4.3. Multicast Membership Control ๐Ÿฆ‹

Okay so this section is the prerequisite for the multicast data packet forwarding we just covered in the previous section ๐Ÿ’… If this support isn't provided, multicast group membership control messages get silently ignored ๐Ÿ˜ญ

The home agent SHOULD be capable of receiving tunneled multicast group membership control information from the mobile node, so it can figure out which groups the mobile node has subscribed to. That's how multicast packets from the home network get forwarded to all the right mobile nodes ๐Ÿซถ These membership messages are Listener Report messages specified in MLD [17], or in other protocols such as [37].

The mobile node issues these messages, but they get sent through the reverse tunnel to the home agent. They go out whenever the mobile node decides to start receiving packets for a multicast group, or in response to an MLD Query from the home agent. When the mobile node is no longer interested in a particular group, it sends control messages to turn off reception of multicasts for that group ๐Ÿ™ˆ

To get the mobile node's current multicast group membership, the home agent must periodically transmit MLD Query messages through the tunnel to the mobile node. These periodic MLD transmissions keep the home agent's record accurate, even when some of the mobile node's MLD group membership messages get lost ๐Ÿ’œ

All MLD packets are sent directly between the mobile node and the home agent. Since all of these packets are destined to a link-scope multicast address and have a hop limit of 1, there is no direct forwarding of them between the home network and the mobile node. The MLD packets between the mobile node and the home agent are encapsulated within the same tunnel header used for other packet flows between the two ๐ŸŽ€

Note that at this time, even though a link-local source is used on MLD packets, no functionality depends on those addresses being unique, and they don't elicit direct responses. All MLD messages are sent to multicast destinations. To avoid ambiguity on the home agent, since mobile nodes may choose identical link-local source addresses for their MLD function, the home agent needs to identify which mobile node actually issued a particular MLD message. This can be done by noting which tunnel the MLD arrived through, which IPsec SA was used, or by other distinguishing means ๐Ÿ”ฅ

This specification puts no requirement on how the functions in this section and the multicast forwarding in Section 10.4.2 are achieved. At the time of writing, it was thought that a full IPv6 multicast router function would be necessary on the home agent. But it may be possible to achieve the same effects through a "proxy MLD" application coupled with kernel multicast forwarding. This may be the subject of future specifications ๐ŸŒธ

10.4.4. Stateful Address Autoconfiguration โœจ

This section describes how home agents support stateful address autoconfiguration mechanisms, such as DHCPv6 [29], for mobile nodes. If this support is not provided, then the M and O bits must remain cleared on the Mobile Prefix Advertisement Messages. Any mobile node that sends DHCPv6 messages to a home agent without this support won't get a response ๐Ÿ’€

If DHCPv6 is used, packets are sent with link-local source addresses, either to a link-scope multicast address or to a link-local address. Mobile nodes that want to locate a DHCPv6 service may reverse tunnel standard DHCPv6 packets to the home agent. Since these link-scope packets cannot be forwarded onto the home network, the home agent needs to either implement a DHCPv6 relay agent or a DHCPv6 server function itself ๐Ÿงš The arriving tunnel or IPsec SA of DHCPv6 link-scope messages from the mobile node must be noted, so that DHCPv6 responses can be sent back to the appropriate mobile node. DHCPv6 messages sent to the mobile node with a link-local destination must be tunneled within the same tunnel header used for other packet flows ๐Ÿ’–

10.4.5. Handling Reverse Tunneled Packets ๐ŸŒˆ

Unless a binding has been established between the mobile node and a correspondent node, traffic from the mobile node to the correspondent node goes through a reverse tunnel. Home agents MUST support reverse tunneling as follows:

  • The tunneled traffic arrives to the home agent's address using IPv6 encapsulation [15].
  • Depending on the security policies used by the home agent, reverse tunneled packets MAY be discarded unless accompanied by a valid ESP header. Supporting authenticated reverse tunneling lets the home agent protect the home network and correspondent nodes from malicious nodes pretending to be a mobile node ๐Ÿ›ก๏ธ
  • Otherwise, when a home agent decapsulates a tunneled packet from the mobile node, the home agent MUST verify that the Source Address in the tunnel IP header is the mobile node's primary care-of address. Otherwise, any node on the Internet could send traffic through the home agent and escape ingress filtering limitations ๐Ÿ˜ค This simple check forces the attacker to know the real mobile node's current location and to be able to defeat ingress filtering. This check is not necessary if the reverse-tunneled packet is protected by ESP in tunnel mode ๐Ÿ‘‘

10.4.6. Protecting Return Routability Packets ๐Ÿ’œ

The return routability procedure, described in Section 5.2.5, assumes that the confidentiality of the Home Test Init and Home Test messages is protected as they are tunneled between the home agent and the mobile node. So the home agent MUST support tunnel mode IPsec ESP for protecting packets that belong to the return routability procedure. Support for a non-null encryption transform and authentication algorithm MUST be available. It isn't necessary to distinguish between different kinds of packets during the return routability procedure ๐Ÿ”

Security associations are needed to provide this protection. When the care-of address for the mobile node changes because of an accepted Binding Update, special treatment is needed for the next packets sent using these security associations. The home agent MUST set the new care-of address as the destination address of these packets, as if the outer header destination address in the security association had changed [21] ๐Ÿฆ‹

The above protection SHOULD be used with all mobile nodes. Its use is controlled by configuration of the IPsec security policy database, both at the mobile node and at the home agent โœจ

As described earlier, the Binding Update and Binding Acknowledgement messages require protection between the home agent and the mobile node. The Mobility Header protocol carries both these messages as well as the return routability messages. From the point of view of the security policy database, these messages are indistinguishable. When IPsec is used to protect return routability signaling or payload packets, this protection MUST only be applied to the return routability packets entering the IPv6 encapsulated tunnel interface between the mobile node and the home agent. This can be achieved, for instance, by defining the security policy database entries specifically for the tunnel interface. That means the policy entries aren't generally applied to all traffic on the physical interface(s) of the nodes, but only to traffic that enters the tunnel ๐ŸŽ€

This makes use of per-interface security policy database entries [4] specific to the tunnel interface, which is the node's attachment to the tunnel [11] ๐ŸŒธ

10.5. Dynamic Home Agent Address Discovery ๐Ÿงš

This section describes how a home agent can help mobile nodes discover the addresses of the home agents. The home agent keeps track of the other home agents on the same link and responds to queries sent by the mobile node ๐Ÿซถ

10.5.1. Receiving Router Advertisement Messages โœจ

Okay bestie, so every home agent on a link keeps a Home Agents List ๐Ÿ“‹ of all the other home agents on that link. This list is what the dynamic home agent address discovery mechanism from Section 10.5 uses. ๐Ÿฆ‹ The info gets learned from the periodic unsolicited multicast Router Advertisements, kind of like how each host keeps its Default Router List for Neighbor Discovery [12]. The Router Advertisements that count are from each (other) home agent on the link, with the Home Agent (H) bit set. Iconic. ๐Ÿ’…

When a valid Router Advertisement comes in (valid as defined in the Neighbor Discovery processing algorithm [12]), the home agent does these steps on top of whatever Neighbor Discovery already makes it do: ๐ŸŒธ

  • If the Home Agent (H) bit in the Router Advertisement is not set, delete the sending node's entry in the current Home Agents List (if one exists). Skip all the following steps. ๐Ÿ™ˆ
  • Otherwise, grab the Source Address from the IP header of the Router Advertisement. That's the link-local IP address on this link of the home agent that sent it [12].
  • Figure out the preference for this home agent. If the Router Advertisement has a Home Agent Information Option, the preference comes from the Home Agent Preference field in that option. Otherwise, the default preference of 0 MUST be used. ๐Ÿ“
  • Figure out the lifetime for this home agent. If there's a Home Agent Information Option, the lifetime comes from the Home Agent Lifetime field. Otherwise, the lifetime from the Router Lifetime field in the Router Advertisement SHOULD be used. โณ
  • If the link-local address of the sending home agent is already in this home agent's Home Agents List and the received home agent lifetime is zero, immediately delete that entry. Bye bye ๐Ÿ‘‹
  • Otherwise, if the link-local address of the sending home agent is already in the receiving home agent's Home Agents List, reset its lifetime and preference to the values figured out above. โœจ
  • If the link-local address of the sending home agent is not already in the Home Agents List maintained by the receiving home agent, and the lifetime for the sending home agent is non-zero, create a new entry and set its lifetime and preference to the values figured out above. ๐ŸŽ€
  • If the Home Agents List entry for the sending home agent's link-local address wasn't deleted in the steps above, figure out any global address(es) of the home agent based on each Prefix Information option received in this Advertisement where the Router Address (R) bit is set (Section 7.2). Add all those global addresses to the list of global addresses in this Home Agents List entry. ๐ŸŒˆ

A home agent SHOULD keep an entry in its Home Agents List for each valid home agent address until that entry's lifetime expires. After that, the entry MUST be deleted. โฐ

As described in Section 11.4.1, a mobile node tries dynamic home agent address discovery by sending an ICMP Home Agent Address Discovery Request message to the Mobile IPv6 Home-Agents anycast address [16] for its home IP subnet prefix. ๐Ÿงš A home agent that gets a Home Agent Address Discovery Request for a subnet it serves SHOULD send back an ICMP Home Agent Address Discovery Reply message to the mobile node. The Source Address of that Reply packet SHOULD be set to one of the home agent's global unicast addresses. The Home Agent Addresses field in the Reply message gets built like this: ๐Ÿ’–

  • The Home Agent Addresses field SHOULD contain all global IP addresses for each home agent currently listed in this home agent's own Home Agents List (Section 10.1). ๐Ÿซถ
  • The IP addresses in the Home Agent Addresses field SHOULD be listed in order of decreasing preference values. Those values come from either the advertised preference in a Home Agent Information option, or the default preference of 0 if none is advertised (or the configured home agent preference for this home agent itself). ๐Ÿ‘‘
  • Among home agents with equal preference, their IP addresses in the Home Agent Addresses field SHOULD be listed in a randomized order, compared to other home agents with equal preference, every time this home agent returns a Home Agent Address Discovery Reply message. ๐ŸŽฒ
  • If more than one global IP address goes with a home agent, those addresses SHOULD be listed in a randomized order. ๐Ÿ”€
  • The home agent SHOULD cut down the number of home agent IP addresses so the packet fits within the minimum IPv6 MTU [11]. The home agent addresses picked for the packet SHOULD come from the complete list and have the highest preference. This keeps the Reply from getting fragmented, or from being rejected by an intermediate router with an ICMP Packet Too Big message [14]. Protect that packet, bestie! ๐Ÿ›ก๏ธ

10.6. Sending Prefix Information to the Mobile Node

10.6.1. List of Home Network Prefixes

Mobile IPv6 makes sure the mobile node gets the relevant prefix info when it's away from home ๐Ÿ โžก๏ธโœˆ๏ธ, so it can use that info for home address configuration and for network renumbering. In this mechanism, mobile nodes that are away from home receive Mobile Prefix Advertisements messages. These messages include Prefix Information Options for the prefixes configured on the home subnet interface(s) of the home agent. ๐ŸŒท

If there are multiple home agents, the advertisements from different home agents can differ, and then a mobile node might be unable to use a particular home address after switching to another home agent. ๐Ÿ˜ญ So, to make sure mobile nodes get the same info from every home agent, it is preferred that all of the home agents on the same link are configured in the same manner. ๐ŸŽ€

To support this, the home agent keeps an eye on prefixes advertised by itself and by other home agents on the home link. ๐Ÿ‘€ In RFC 2461 [12], it's acceptable for two routers to advertise different sets of prefixes on the same link. For home agents, though, the differences should be detected for a given home address, because the mobile node only talks to one home agent at a time and needs to know the full set of prefixes assigned to the home link. All other comparisons of Router Advertisements follow Section 6.2.7 of RFC 2461. ๐Ÿ’…

10.6.2. Scheduling Prefix Deliveries

A home agent serving a mobile node will schedule delivery of new prefix information to that mobile node when any of the following conditions occur: ๐Ÿ—“๏ธ

MUST:

  • The state of the flags changes for the prefix of the mobile node's registered home address. ๐Ÿšฉ
  • The valid or preferred lifetime is reconfigured or changes for any reason other than advancing real time. โŒ›
  • The mobile node requests the information with a Mobile Prefix Solicitation (see Section 11.4.2). ๐Ÿ™‹โ€โ™€๏ธ

SHOULD:

  • A new prefix is added to the home subnet interface(s) of the home agent. โœจ

MAY:

  • The valid or preferred lifetime or the state of the flags changes for a prefix that isn't used in any Binding Cache entry for this mobile node. ๐Ÿซง

The home agent uses this algorithm to decide when to send prefix information to the mobile node. ๐Ÿง 

  • If a mobile node sends a solicitation, answer right away. ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ
  • If no Mobile Prefix Advertisement has been sent to the mobile node in the last MaxMobPfxAdvInterval seconds (see Section 13), make sure a transmission is scheduled. The actual transmission time is randomized as described below. ๐ŸŽฒ
  • If a prefix matching the mobile node's home registration is added on the home subnet interface, or its information changes in any way that doesn't deprecate the mobile node's address, make sure a transmission is scheduled. The actual transmission time is randomized as described below. ๐ŸŒˆ
  • If a home registration expires, cancel any scheduled advertisements to the mobile node. ๐Ÿ™…โ€โ™€๏ธ

The list of prefixes is always sent in its entirety. ๐Ÿ“ฆ

If the home agent has already scheduled a Mobile Prefix Advertisement to the mobile node, the home agent replaces that advertisement with a new one, to be sent at the scheduled time. ๐Ÿ”

Otherwise, the home agent works out a fresh value for RAND_ADV_DELAY, which offsets from the current time for the scheduled transmission. First, calculate the maximum delay for the scheduled Advertisement:

   MaxScheduleDelay = min (MaxMobPfxAdvInterval, Preferred Lifetime),

where MaxMobPfxAdvInterval is as defined in Section 12. Then compute the final delay for the advertisement:

      RAND_ADV_DELAY = MinMobPfxAdvInterval +
            (rand() % abs(MaxScheduleDelay - MinMobPfxAdvInterval))

Here rand() returns a random integer value in the range of 0 to the maximum possible integer value. ๐ŸŽฐ This computation is expected to ease bursts of advertisements when prefix information changes. ๐ŸŒŠ On top of that, a home agent MAY further slow its packet rate by delaying individual advertisements even more, if needed to avoid overwhelming local network resources. ๐Ÿข The home agent SHOULD keep retransmitting an unsolicited Advertisement to the mobile node, periodically, until the mobile node acknowledges it by sending a Mobile Prefix Solicitation. ๐Ÿ””

The home agent MUST wait PREFIX_ADV_TIMEOUT (see Section 12) before the first retransmission, and double the retransmission wait time for every retransmission after that, until a maximum of PREFIX_ADV_RETRIES attempts (see Section 12) has been tried. โฑ๏ธ If the mobile node's bindings expire before the matching Binding Update has been received, the home agent MUST NOT attempt any more retransmissions, even if not all PREFIX_ADV_RETRIES have been sent. ๐Ÿ›‘ In the meantime, if the mobile node sends another Binding Update without returning home, the home agent SHOULD start transmitting the unsolicited Advertisement again. ๐Ÿ”„

If some condition from above happens on the home link and causes another Prefix Advertisement to be sent to the mobile node before the mobile node has acknowledged a previous transmission, the home agent SHOULD combine any Prefix Information options in the unacknowledged Mobile Prefix Advertisement into a new Advertisement. Then the home agent throws out the old Advertisement. ๐Ÿ—‘๏ธ๐Ÿ’–

10.6.3. Sending Advertisements ๐Ÿ“ฃ

Okay so when the home agent sends a Mobile Prefix Advertisement to the mobile node, it MUST build the packet like this ๐Ÿ’…

  • The Source Address in the packet's IPv6 header MUST be set to whichever home agent IP address the mobile node sent its current home registration to, or to the default global home agent address if there's no binding yet ๐Ÿ 
  • If the advertisement was solicited, it MUST be destined to the source address of the solicitation ๐Ÿ“ฌ If prefix changes or renumbering set it off instead, the destination is the mobile node's home address in the binding that triggered the rule ๐ŸŽฏ
  • A type 2 routing header MUST be included, carrying the mobile node's home address ๐Ÿ›ฃ๏ธ
  • IPsec headers MUST be supported, and SHOULD be used ๐Ÿ”
  • The home agent MUST send it just like any other unicast IPv6 packet it originates ๐Ÿ“ฎ
  • Set the Managed Address Configuration (M) flag if that flag was set in any of the Router Advertisements the prefix information was learned from (this home agent's own RAs count too) ๐Ÿท๏ธ
  • Set the Other Stateful Configuration (O) flag if that flag was set in any of the Router Advertisements the prefix information was learned from (this home agent's own RAs count too) ๐ŸŒธ

10.6.4. Lifetimes for Changed Prefixes โณ

Like we covered in Section 10.3.1, the lifetime the home agent hands back in a Binding Acknowledgement MUST not be greater than the remaining valid lifetime for the subnet prefix in the mobile node's home address. This cap is basically what stops anyone from using a home address once it's gone invalid ๐Ÿšซ๐Ÿ’€


11. Mobile Node Operation ๐Ÿ“ฑ

11.1. Conceptual Data Structures ๐Ÿ—‚๏ธ

Each mobile node MUST maintain a Binding Update List ๐Ÿ’–

The Binding Update List records info for each Binding Update this mobile node sent whose binding lifetime hasn't expired yet. It covers every binding sent to the home agent or to correspondent nodes, and it also holds Binding Updates that are waiting for the return routability procedure to finish before they can go out โœจ For multiple Binding Updates to the same destination address, though, only the most recent one (the one with the greatest Sequence Number value) stays in the list. The Binding Update List MAY be implemented in any way, as long as the external behavior matches what this document describes ๐Ÿฆ‹

Each Binding Update List entry conceptually holds these fields:

  • The IP address of the node to which a Binding Update was sent.
  • The home address for which that Binding Update was sent.
  • The care-of address sent in that Binding Update. This one matters because the mobile node needs it to tell whether it already sent a Binding Update giving its new care-of address to this destination after changing care-of addresses ๐Ÿงณ
  • The initial value of the Lifetime field sent in that Binding Update.
  • The remaining lifetime of that binding. It starts from the Lifetime value sent in the Binding Update and counts down to zero, and at that point this entry MUST be deleted from the Binding Update List โฐ
  • The maximum value of the Sequence Number field sent in previous Binding Updates to this destination. The Sequence Number field is 16 bits long, and all comparisons between Sequence Number values MUST be performed modulo 2**16 (see Section 9.5.1) ๐Ÿ”ข
  • The time at which a Binding Update was last sent to this destination, which is needed to enforce the rate limiting restriction for sending Binding Updates ๐Ÿšฆ
  • The state of any retransmissions needed for this Binding Update. This includes the time left until the next retransmission attempt and the current state of the exponential back-off mechanism ๐Ÿ”
  • A flag specifying whether future Binding Updates should be sent to this destination. The mobile node sets this flag in the entry when it receives an ICMP Parameter Problem, Code 1, error message in response to a return routability message or Binding Update sent to that destination, as described in Section 11.3.5 ๐Ÿšฉ

The Binding Update List is what decides whether a particular packet goes straight to the correspondent node or gets tunneled via the home agent (see Section 11.3.1) ๐Ÿ›ค๏ธ

The Binding Update List also conceptually holds some data for running the return routability procedure. This data is only relevant for Binding Updates sent to correspondent nodes ๐Ÿ”‘

  • The time at which a Home Test Init or Care-of Test Init message was last sent to this destination, which is needed for the rate limiting restriction on the return routability procedure โฑ๏ธ
  • The state of any retransmissions needed for this return routability procedure. This includes the time left until the next retransmission attempt and the current state of the exponential back-off mechanism ๐ŸŒ€
  • Cookie values used in the Home Test Init and Care-of Test Init messages ๐Ÿช
  • Home and care-of keygen tokens received from the correspondent node ๐Ÿ—๏ธ
  • Home and care-of nonce indices received from the correspondent node ๐ŸŽŸ๏ธ
  • The time at which each of the tokens and nonces was received from the correspondent node, which is needed to implement reuse while moving ๐Ÿงš

11.2. Processing Mobility Headers ๐Ÿ“จ

All IPv6 mobile nodes MUST observe the rules described in Section 9.2 when processing Mobility Headers ๐Ÿ‘‘

11.3. Packet Processing ๐ŸŽ

11.3.1. Sending Packets While Away from Home โœˆ๏ธ

okay so when a mobile node is away from home, it keeps using its home address ๐Ÿ  AND it can also use one or more care-of addresses ๐Ÿงณ. when it sends a packet from out there, it MAY choose between these to pick the source address, and here's how it's giving:

  • Protocols layered over IP will generally treat the mobile node's home address as its IP address for most packets ๐Ÿ’–. for packets that belong to transport-level connections set up while the mobile node was at home, the mobile node MUST use its home address ๐Ÿ”’. and for packets in transport-level connections it might still be using after moving somewhere new, it SHOULD use its home address in this way ๐ŸŒธ. if a binding exists, it SHOULD send the packets directly to the correspondent node ๐Ÿฆ‹. otherwise, if there's no binding, it MUST use reverse tunneling ๐Ÿš‡.
  • the mobile node MAY choose to directly use one of its care-of addresses as the source of the packet, without needing a Home Address option in there ๐Ÿงš. this is especially useful for short-term stuff that can easily be retried if it fails ๐Ÿ”. using the care-of address as the source for these queries usually has lower overhead than using the home address, since no extra options need to be used in either the query or its reply ๐Ÿ’…. these packets can be routed normally, straight between source and destination, without relying on Mobile IPv6 โœจ. but if the application on the mobile node doesn't know that the communication fits this general type of communication, the mobile node should not use its care-of address as the source of the packet this way ๐Ÿ™ˆ.

the choice of the most efficient communications method is application specific and outside the scope of this spec ๐Ÿ“. the APIs needed for controlling that choice are out of scope too ๐Ÿ’œ.

  • while not at its home link, the mobile node MUST NOT use the Home Address destination option when communicating with link-local or site-local peers, if the scope of the home address is larger than the scope of the peer's address ๐Ÿ˜ญ. and similarly, the mobile node MUST NOT use the Home Address destination option for IPv6 Neighbor Discovery [12] packets ๐Ÿšซ.

detailed operation of these cases is described later in this section and also discussed in [31] ๐Ÿ“–.

for packets sent by a mobile node while it's at home, no special Mobile IPv6 processing is required ๐Ÿก. likewise, if the mobile node uses any address other than one of its home addresses as the source of a packet sent while away from home, no special Mobile IPv6 processing is required either ๐ŸŒˆ. in both cases, the packet is simply addressed and transmitted like any normal IPv6 packet ๐Ÿ“ฆ.

for packets sent by the mobile node while away from home using the mobile node's home address as the source, special Mobile IPv6 processing is required ๐Ÿ‘‘. there are two ways to do this:

Route Optimization ๐Ÿฆ‹

this way of delivering packets doesn't have to go through the home network, and it typically enables faster and more reliable transmission ๐Ÿš€.

the mobile node needs to make sure a Binding Cache entry exists for its home address so the correspondent node can process the packet (Section 9.3.1 has the rules for Home Address Destination Option Processing at a correspondent node ๐Ÿ“š). the mobile node SHOULD look through its Binding Update List for an entry that meets all of these:

  • the Source Address field of the packet being sent equals the home address in the entry ๐Ÿ .
  • the Destination Address field of the packet being sent equals the address of the correspondent node in the entry ๐ŸŽฏ.
  • one of the current care-of addresses of the mobile node appears as the care-of address in the entry ๐Ÿงณ.
  • the entry shows that a binding has been successfully created โœ….
  • the remaining lifetime of the binding is greater than zero โณ.

when all of these are met, the mobile node knows the correspondent node has a suitable Binding Cache entry ๐Ÿ’–.

a mobile node SHOULD arrange to supply the home address in a Home Address option, and MUST set the IPv6 header's Source Address field to the care-of address the mobile node has registered for use with this correspondent node ๐Ÿ’…. the correspondent node then uses the address in the Home Address option to do the job the Source IP address in the IPv6 header normally does ๐Ÿง . the home address is then handed up to higher protocol layers and applications ๐Ÿซถ.

specifically, that looks like:

  • build the packet with the mobile node's home address as the packet's Source Address, just like it's at home ๐Ÿก. this includes calculating upper layer checksums using the home address as the source value ๐Ÿ”ข.
  • insert a Home Address option into the packet, with the Home Address field copied from the original value of the Source Address field in the packet ๐Ÿ“‹.
  • change the Source Address field in the packet's IPv6 header to one of the mobile node's care-of addresses ๐Ÿงณ. this is typically the current primary care-of address, but it MUST be an address assigned to the interface on the link being used ๐Ÿ”Œ.
by putting the care-of address in the IPv6 header's Source Address and the home address in the Home Address option instead, the packet can safely pass through any router doing ingress filtering [26] ๐Ÿ›ก๏ธโœจ.

Reverse Tunneling ๐Ÿš‡

this is the mechanism that tunnels packets through the home agent ๐ŸŒท. it's not as efficient as the one above, but it's needed if there's no binding yet with the correspondent node ๐Ÿฅบ.

this mechanism is used for packets that have the mobile node's home address as the Source Address in the IPv6 header, or for multicast control protocol packets as described in Section 11.3.4 ๐ŸŽ€. specifically:

  • the packet is sent to the home agent using IPv6 encapsulation [15] ๐Ÿ“ฎ.
  • the Source Address in the tunnel packet is the primary care-of address as registered with the home agent ๐Ÿงณ.
  • the Destination Address in the tunnel packet is the home agent's address ๐Ÿ .

then the home agent passes the encapsulated packet along to the correspondent node ๐Ÿ’Œ.


11.3.2. Interaction with Outbound IPsec Processing ๐Ÿ”

this section sketches how outbound Mobile IPv6 processing and outbound IP Security (IPsec) processing work together for packets sent by a mobile node while away from home ๐Ÿงฉ. an implementation MAY use algorithms and data structures other than the ones suggested here, but its processing MUST be consistent with the effect of the operation described here and with the relevant IPsec specifications ๐Ÿ’œ. the steps below assume IPsec is used in transport mode [4] and the mobile node is using its home address as the source for the packet (from the point of view of higher protocol layers or applications, as described in Section 11.3.1) ๐Ÿซถ:

  • the packet is created by higher layer protocols and applications (for example, by TCP) as if the mobile node were at home and Mobile IPv6 weren't being used ๐Ÿก.
  • determine the outgoing interface for the packet ๐Ÿ”Œ. (fun fact: choosing between reverse tunneling and route optimization may imply different interfaces, especially if tunnels count as interfaces too ๐Ÿš‡.)
  • as part of outbound packet processing in IP, the packet is compared against the IPsec security policy database to figure out what processing it needs [4] ๐Ÿ•ต๏ธโ€โ™€๏ธ.
  • if IPsec processing is required, the packet is either mapped to an existing Security Association (or SA bundle), or a new SA (or SA bundle) is created for it, following the IPsec procedures ๐Ÿ”—.
  • since the mobile node is away from home, it's using either reverse tunneling or route optimization to reach the correspondent node ๐Ÿ—บ๏ธ.

if reverse tunneling is used, the packet is built in the normal way and then tunneled through the home agent ๐Ÿš‡.

if route optimization is in use, the mobile node inserts a Home Address destination option into the packet and replaces the Source Address in the packet's IP header with the care-of address used with this correspondent node, as described in Section 11.3.1 ๐Ÿฆ‹. the Destination Options header that holds the Home Address destination option MUST appear in the packet after the routing header (if there is one) and before the IPsec (AH [5] or ESP [6]) header, so the destination node processes the Home Address destination option before it processes the IPsec header ๐ŸŽฏ.

finally, once the packet is fully put together, the necessary IPsec authentication (and encryption, if required) processing happens, initializing the Authentication Data in the IPsec header ๐Ÿ”’โœจ.

RFC 2402 treatment of destination options is extended as follows. the AH authentication data MUST be calculated as if the following were true ๐Ÿงฎ:

  • the IPv6 source address in the IPv6 header contains the mobile node's home address,
  • the Home Address field of the Home Address destination option (Section 6.3) contains the new care-of address.
  • this lets the receiver of a packet with a Home Address destination option swap the two fields of the incoming packet to reach the situation above, which simplifies processing for all the later packet headers ๐Ÿ”„. but that swap isn't required, as long as the result of the authentication calculation stays the same ๐Ÿ’….

when an automated key management protocol is used to create new security associations for a peer, it's important to make sure the peer can send the key management protocol packets to the mobile node ๐Ÿ“ฌ. this might not be possible if the peer is the mobile node's home agent and the point of those security associations is to send a Binding Update to the home agent ๐Ÿ˜ฌ. packets addressed to the mobile node's home address can't be used before the Binding Update has been processed ๐Ÿ™ƒ. for the default case of using IKE [9] as the automated key management protocol, these problems can be avoided by the following requirements when communicating with its home agent ๐Ÿซถ:

  • when the mobile node is away from home, it MUST use its care-of address as the Source Address of all packets it sends as part of the key management protocol (without using Mobile IPv6 for these packets, as suggested in Section 11.3.1) ๐Ÿงณ.
  • also, for all security associations bound to the mobile node's home address established by IKE, the mobile node MUST include an ISAKMP Identification Payload [8] in the IKE phase 2 exchange, giving the mobile node's home address as the initiator of the Security Association [7] ๐Ÿชช.

the Key Management Mobility Capability (K) bit in Binding Updates and Acknowledgements can be used to avoid needing to rerun IKE on every movement ๐ŸŒŸโœจ.

11.3.3. Receiving Packets While Away from Home โœˆ๏ธ

okay so when the mobile node is away from home, packets meant for its home address can reach it in two different ways ๐Ÿฆ‹ and honestly both are kind of iconic

  • Packets from a correspondent node that doesn't have a Binding Cache entry for the mobile node get sent to the home address ๐Ÿ“ฆ The home agent catches them, tunnels them over to the mobile node, and it's giving main character delivery ๐Ÿšš
  • Packets from a correspondent node that does have a Binding Cache entry with the mobile node's current care-of address get sent using a type 2 routing header ๐Ÿ’… The packet is addressed to the care-of address, and the last hop in the routing header points it at the home address. This last hop is handled entirely inside the mobile node, because the care-of address and the home address are both addresses of the mobile node. no cap, that's so clean โœจ

For packets that come in the first way, the mobile node MUST check that the IPv6 source address of the tunneled packet is the IP address of its home agent ๐Ÿ” Here the mobile node may also send a Binding Update to the original sender, as described in Section 11.7.2 and subject to the rate limiting in Section 11.8 ๐Ÿซถ The mobile node MUST also process the received packet the way IPv6 encapsulation [15] defines ๐ŸŽ€ That means the inner packet gets processed normally by the upper-layer protocols inside the mobile node, as if it had been addressed (only) to the mobile node's home address. ok iconic ๐Ÿ‘‘

For packets that come in the second way, the following rules make the packet get processed normally by the upper-layer protocols inside the mobile node, as if it had been addressed to the mobile node's home address ๐ŸŒธ

A node that receives a packet addressed to itself (meaning one of its addresses is in the IPv6 destination field) follows the next header chain and processes each header ๐Ÿงš When it runs into a type 2 routing header along the way, it does these checks. If any of them fail, the node MUST silently discard the packet ๐Ÿ’€

  • The length field in the routing header is exactly 2.
  • The segments left field in the routing header is 1 on the wire. (But implementations may process the routing header so the value becomes 0 after the routing header has been processed, but before the rest of the packet is processed. ๐Ÿง )
  • The Home Address field in the routing header is one of the node's home addresses, if segments left was 1. So the address field is required to be a unicast routable address ๐Ÿ’–

Once those checks pass, the node swaps the IPv6 destination field with the Home Address field in the routing header ๐Ÿ”„, decrements segments left by one from the value it had on the wire, and resubmits the packet to IP so the next header gets processed ๐Ÿฆ‹

Conceptually this is the same model as in RFC 2460 ๐ŸŒˆ But for a type 2 routing header it can be simplified, because it's known the packet won't be forwarded to a different node ๐Ÿซถ

The definition of AH requires the sender to calculate the AH integrity check value of a routing header the same way it looks at the receiver after the header has been processed ๐Ÿ” Since IPsec headers come after the routing header, any IPsec processing operates on a packet with the home address in the IP destination field and segments left set to zero ๐Ÿ’œ So the AH calculations at the sender and the receiver have an identical view of the packet. it's giving perfectly matched ๐ŸŽ€


11.3.4. Routing Multicast Packets ๐ŸŒ

A mobile node that's connected to its home link works just like any other (stationary) node ๐Ÿ  So when it's at home, it acts exactly like other multicast senders and receivers. This section is about how a mobile node behaves when it's not on its home link ๐Ÿงณ

To receive packets sent to a multicast group, a mobile node has to join that group ๐Ÿ’Œ One option, where a mobile node MAY join the group, is through a (local) multicast router on the foreign link it's visiting. In that case the mobile node MUST use its care-of address and MUST NOT use the Home Address destination option when it sends MLD packets [17] ๐Ÿ™ˆ

Another option is that a mobile node MAY join multicast groups through a bi-directional tunnel to its home agent ๐Ÿš‡ The mobile node tunnels its multicast group membership control packets (such as the ones defined in [17] or in [37]) to the home agent, and the home agent forwards multicast packets down the tunnel to the mobile node. A mobile node MUST NOT tunnel multicast group membership control packets until (1) the mobile node has a binding in place at the home agent, and (2) the home agent sends at least one multicast group membership control packet through the tunnel ๐Ÿ›‘ Once that's true, the mobile node SHOULD assume it stays that way for as long as the binding doesn't expire โณ

A mobile node that wants to send packets to a multicast group also has two options ๐ŸŽ€

  1. Send directly on the foreign link being visited.

The application knows the care-of address and uses it as the source address for multicast traffic, just like it would use a stationary address ๐Ÿงš The mobile node MUST NOT use the Home Address destination option in this traffic ๐Ÿ™…โ€โ™€๏ธ

  1. Send via a tunnel to its home agent.

Multicast routing in general depends on the Source Address in the IPv6 header of the multicast packet ๐ŸŒŠ So a mobile node that tunnels a multicast packet to its home agent MUST use its home address as the IPv6 Source Address of the inner multicast packet ๐Ÿ’œ

Direct sending from the foreign link only works while the mobile node is at that foreign link ๐Ÿ“ That's because the multicast tree is specific to that source location. If the location and source address change, the source specific tree or branch gets invalidated, and so does the application context the other group members were relying on ๐Ÿ˜ญ

This specification does NOT (sorry, not capitals, I'm just saying ๐Ÿ˜…) provide any mechanism that lets a local multicast session survive a hand-off and seamlessly continue from a new care-of address on each new foreign link. Any mechanism like that, developed as an extension to this specification, needs to take into account how fast-moving mobile nodes affect the Internet multicast routing protocols, and whether they can keep the integrity of source specific multicast trees and branches ๐ŸŒณ

Bidirectional tunneling can keep multicast trees independent of the mobile node's movement ๐Ÿซง But in some cases it can have adverse effects ๐Ÿ™ƒ The latency of certain multicast applications (like multicast based discovery protocols) gets hit when the round-trip time between the foreign subnet and the home agent is significant compared to the topology being discovered ๐Ÿข Also, the delivery tree from the home agent relies on unicast encapsulation from the agent to the mobile node, so bandwidth usage is inefficient compared to native multicast forwarding in the foreign multicast system ๐Ÿ“‰


11.3.5. Receiving ICMP Error Messages ๐Ÿšจ

Any node that doesn't recognize the Mobility header returns an ICMP Parameter Problem, Code 1, message to the sender of the packet ๐Ÿ™…โ€โ™€๏ธ If the mobile node gets an ICMP error message like that in response to a return routability procedure or a Binding Update, it SHOULD record in its Binding Update List that future Binding Updates SHOULD NOT be sent to that destination ๐Ÿ“ Those Binding Update List entries SHOULD be removed after a period of time, so the node can retry route optimization later ๐Ÿ”

New Binding Update List entries MUST NOT be created as a result of receiving ICMP error messages ๐Ÿšซ

Correspondent nodes that have taken part in the return routability procedure MUST implement the ability to correctly process received packets containing a Home Address destination option ๐Ÿ’– So correctly implemented correspondent nodes should always be able to recognize Home Address options โœจ If a mobile node receives an ICMP Parameter Problem, Code 2, message from some node saying it doesn't support the Home Address option, the mobile node SHOULD log the error and then discard the ICMP message ๐Ÿชต


11.3.6. Receiving Binding Error Messages ๐Ÿซฃ

When a mobile node receives a packet containing a Binding Error message, it should first check whether it has a Binding Update List entry for the source of that Binding Error message ๐Ÿ”Ž If there's no such entry, the mobile node MUST ignore the message. This is necessary to prevent wasting resources on things like the return routability procedure because of spoofed Binding Error messages ๐Ÿ›ก๏ธ

Otherwise, if the message Status field was 1 (unknown binding for Home Address destination option), the mobile node should do one of these two things ๐ŸŽ€

  • If the mobile node has recent upper layer progress information showing that communications with the correspondent node are progressing, it MAY ignore the message ๐Ÿซถ This can be done to limit the damage that spoofed Binding Error messages can do to ongoing communications.
  • If the mobile node has no upper layer progress information, it MUST remove the entry and route further communications through the home agent ๐Ÿ  It MAY also optionally start a return routability procedure (see Section 5.2) ๐Ÿ”

If the message Status field was 2 (unrecognized MH Type value), the mobile node should do one of these two things ๐ŸŒธ

  • If the mobile node isn't expecting an acknowledgement or response from the correspondent node, the mobile node SHOULD ignore this message ๐Ÿ™ˆ
  • Otherwise, the mobile node SHOULD cease the use of any extensions to this specification ๐Ÿ›‘ If no extensions had been used, the mobile node should cease the attempt to use route optimization ๐Ÿ’…

11.4. Home Agent and Prefix Management ๐Ÿก๐Ÿ’œ

11.4.1. Dynamic Home Agent Address Discovery โœจ

okay so sometimes the mobile node needs to send a Binding Update to its home agent to register its new primary care-of address (that's the stuff from Section 11.7.1 ๐ŸŽ€). but here's the lowkey tricky part: it might not know the address of ANY router on its home link that can be its home agent ๐Ÿ’€. why? because while it was away, some nodes on the home link got reconfigured, so the router that used to be its home agent got swapped for a different one. literally a plot twist nobody asked for.

so in this case the mobile node MAY try to discover a suitable home agent on its home link ๐Ÿฆ‹. to do that, it sends an ICMP Home Agent Address Discovery Request message to the Mobile IPv6 Home-Agents anycast address [16] for its home subnet prefix. like Section 10.5 explains, the home agent on the home link that gets this Request sends back an ICMP Home Agent Address Discovery Reply message, and that Reply gives the addresses of the home agents operating on the link ๐ŸŒธ.

once the mobile node gets that Reply, it MAY send its home registration Binding Update to any of the unicast IP addresses listed in the Home Agent Addresses field. for example, it MAY try its home registration to each address in turn until one gets accepted ๐Ÿซถ. it sends a Binding Update to an address and waits for the matching Binding Acknowledgement, moving on to the next address if there's no response. but it MUST, however, wait at least InitialBindackTimeoutFirstReg seconds (see Section 13) before sending a Binding Update to the next home agent. no skipping ahead ๐Ÿ™ˆ. and the order matters: in trying each returned home agent address, it SHOULD try them in the order they appear in the Home Agent Addresses field of the received Home Agent Address Discovery Reply message ๐Ÿ’….

if the mobile node already has a current registration with some home agent (the Lifetime for that registration hasn't expired yet), then it MUST attempt any new registration with that home agent first ๐Ÿ‘‘. if that attempt fails (timed out or rejected), it SHOULD then reattempt the registration with another home agent. and if it doesn't know any other suitable home agent, it MAY attempt the dynamic home agent address discovery mechanism described above ๐Ÿงš.

if, after the mobile node sends a Home Agent Address Discovery Request message to the Home Agents Anycast address, no corresponding Home Agent Address Discovery Reply message shows up within INITIAL_DHAAD_TIMEOUT (see Section 12) seconds, it MAY retransmit the same Request message to the same anycast address. this retransmission MAY be repeated up to a maximum of DHAAD_RETRIES (see Section 12) attempts. and each retransmission MUST be delayed by twice the time interval of the previous retransmission, so the waits keep doubling. patience is a whole aesthetic ๐Ÿ˜ญ.

11.4.2. Sending Mobile Prefix Solicitations ๐ŸŒˆ

when a mobile node has a home address that's about to become invalid, it SHOULD send a Mobile Prefix Solicitation to its home agent to try to get fresh routing prefix information ๐Ÿ“. the new info also lets the mobile node take part in renumbering operations affecting the home network, as described in Section 10.6. main character energy ๐Ÿ’œ.

the mobile node MUST use the Home Address destination option to carry its home address. it MUST support and SHOULD use IPsec to protect the solicitation. it MUST set the Identifier field in the ICMP header to a random value ๐ŸŽฒ.

as described in Section 11.7.2, Binding Updates sent by the mobile node to other nodes MUST use a lifetime no greater than the remaining lifetime of its home registration of its primary care-of address. it SHOULD further limit the lifetimes it sends on any Binding Updates so they stay within the remaining valid lifetime (see Section 10.6.2) for the prefix in its home address โญ.

when the lifetime for a changed prefix decreases, and the change would cause cached bindings at correspondent nodes in the Binding Update List to be stored past the newly shortened lifetime, the mobile node MUST issue a Binding Update to all such correspondent nodes. ๐Ÿšจ

these limits on the binding lifetime serve to stop use of a mobile node's home address after it becomes invalid. it's giving expiration date ๐Ÿ—“๏ธ.

11.4.3. Receiving Mobile Prefix Advertisements ๐Ÿฆ‹

Section 10.6 describes how a home agent supports boot time configuration and renumbering of the mobile node's home subnet while the node is away from home. the home agent sends Mobile Prefix Advertisements to the mobile node while it's away, giving "important" Prefix Information options that describe changes in the prefixes in use on the mobile node's home link ๐Ÿ“ฌ.

the Mobile Prefix Solicitation is similar to the Router Solicitation used in Neighbor Discovery [12], except it's routed from the mobile node on the visited network to the home agent on the home network by the usual unicast routing rules ๐Ÿ›ฃ๏ธ.

when a mobile node receives a Mobile Prefix Advertisement, it MUST validate it according to the following test:

  • The Source Address of the IP packet carrying the Mobile Prefix Advertisement is the same as the home agent address to which the mobile node last sent an accepted home registration Binding Update to register its primary care-of address. otherwise, if no such registrations have been made, it SHOULD be the mobile node's stored home agent address, if one exists. otherwise, if the mobile node hasn't yet discovered its home agent's address, it MUST NOT accept Mobile Prefix Advertisements ๐Ÿ™…โ€โ™€๏ธ.
  • The packet MUST have a type 2 routing header and SHOULD be protected by an IPsec header as described in Section 5.4 and Section 6.8 ๐Ÿ”.
  • If the ICMP Identifier value matches the ICMP Identifier value of the most recently sent Mobile Prefix Solicitation and no other advertisement has yet been received for this value, then the advertisement is considered to be solicited and will be processed further โœ…. Otherwise, the advertisement is unsolicited, and it MUST be discarded. in this case the mobile node SHOULD send a Mobile Prefix Solicitation ๐Ÿ”.

any received Mobile Prefix Advertisement not meeting these tests MUST be silently discarded ๐Ÿคซ.

for an accepted Mobile Prefix Advertisement, the mobile node MUST process Managed Address Configuration (M), Other Stateful Configuration (O), and the Prefix Information Options as if they arrived in a Router Advertisement [12] on the mobile node's home link. (this specification doesn't describe how to acquire home addresses through stateful protocols, so that's a different story ๐Ÿ“–.)

such processing may result in the mobile node configuring a new home address. but because preferred lifetime and valid lifetime are separate, such changes should not affect most communications by the mobile node, the same way they wouldn't for nodes that are at home. stable vibes ๐ŸŒท.

this specification assumes that any security associations and security policy entries needed for new prefixes have been pre-configured in the mobile node. note that while dynamic key management avoids the need to create new security associations, it's still necessary to add policy entries to protect the communications involving the home address(es). mechanisms for automatic set-up of these entries are outside the scope of this specification ๐Ÿ”‘.

11.5. Movement ๐Ÿšถโ€โ™€๏ธโœจ

11.5.1. Movement Detection โœจ

Okay bestie, movement detection is all about catching L3 handovers ๐Ÿ‘€ This section is NOT trying to give you one super fast algorithm that works perfectly for every app, link-layer, and deployment ๐Ÿ’… Instead it describes a generic method built on IPv6 Neighbor Discovery, including Router Discovery and Neighbor Unreachability Detection. As of writing, this method is considered well understood enough to recommend for standardization, but future versions of this spec (or other specs) may have updated movement detection algorithms with better performance ๐ŸŒธ

Generic movement detection uses Neighbor Unreachability Detection to notice when the default router is no longer bi-directionally reachable. When that happens, the mobile node must discover a new default router, usually on a new link ๐Ÿฆ‹ The catch is that this check only happens when the mobile node has packets to send. Without frequent Router Advertisements or hints from the link-layer, the mobile node might not even realize an L3 handover happened ๐Ÿ™ˆ So the mobile node should supplement this method with other information whenever it has access to it (e.g., from lower protocol layers).

When the mobile node detects an L3 handover, it performs Duplicate Address Detection [13] on its link-local address, selects a new default router through Router Discovery, and then does Prefix Discovery with that new router to form new care-of address(es), as described in Section 11.5.2. Next it registers its new primary care-of address with its home agent, as described in Section 11.7.1. Once the home registration is updated, the mobile node updates the associated mobility bindings in any correspondent nodes it's doing route optimization with, as specified in Section 11.7.2 ๐Ÿ’–

Updating bindings causes temporary packet flow disruption and signaling overhead, so the mobile node should avoid performing an L3 handover until it's strictly necessary ๐Ÿซถ Specifically, when the mobile node receives a Router Advertisement from a new router with a different set of on-link prefixes, and it detects that the currently selected default router on the old link is still bi-directionally reachable, it should generally keep using the old router on the old link instead of switching to a new default router ๐Ÿ“

Mobile nodes can use the info in received Router Advertisements to detect L3 handovers, but they need to think through these issues:

  • There might be multiple routers on the same link, so hearing a new router does not necessarily mean an L3 handover happened ๐Ÿ‘€
  • When there are multiple routers on the same link, they might advertise different prefixes. So even hearing a new router with a new prefix might not be a reliable sign of an L3 handover ๐Ÿ’€
  • Router link-local addresses are not globally unique, so after finishing an L3 handover, the mobile node might keep receiving Router Advertisements with the same link-local source address. This might be common if routers use the same link-local address on multiple interfaces. This issue can be avoided when routers use the Router Address (R) bit, since that gives a global address for the router โœจ

In addition, the mobile node should treat the following events as indications that an L3 handover may have occurred. When it gets one of these, the mobile node needs to do Router Discovery to find routers and prefixes on the new link, as described in Section 6.3.7 of RFC 2461 [12] ๐ŸŒˆ

  • If the Router Advertisements the mobile node receives include an Advertisement Interval option, the mobile node may use its Advertisement Interval field as an indication of how often it should expect future Advertisements from that router. This field specifies the minimum rate (the maximum amount of time between successive Advertisements) the mobile node should expect. If that amount of time passes without the mobile node receiving any Advertisement from this router, the mobile node can be sure that at least one Advertisement sent by the router was lost. The mobile node can then use its own policy to decide how many lost Advertisements from its current default router count as an L3 handover indication ๐Ÿ”ฅ
  • Neighbor Unreachability Detection determines that the default router is no longer reachable ๐Ÿฅฒ
  • With some types of networks, notification that an L2 handover has occurred might come from lower layer protocols or device driver software in the mobile node. Further details on handling L2 indications as movement hints are an item for further study. At the time of writing, though, the following is considered reasonable:
    • An L2 handover indication may or may not imply L2 movement, and L2 movement may or may not imply L3 movement. The correlations might depend on the type of L2, but they might also depend on the actual deployment of the wireless topology ๐Ÿงš
    • Unless it is well-known that an L2 handover indication is likely to imply L3 movement, it may be better to try verifying whether the default router is still bi-directionally reachable instead of immediately multicasting a router solicitation. This can be done by sending a unicast Neighbor Solicitation and waiting for a Neighbor Advertisement with the solicited flag set. This is similar to Neighbor Unreachability Detection, but it does not have the same state machine, such as the STALE state ๐Ÿ’œ
    • If the default router does not respond to the Neighbor Solicitation, it makes sense to go ahead and multicast a Router Solicitation ๐Ÿ’…

11.5.2. Forming New Care-of Addresses ๐ŸŽ€

After detecting that it has moved, a mobile node SHOULD generate a new primary care-of address using normal IPv6 mechanisms. This SHOULD also be done when the current primary care-of address becomes deprecated. A mobile node MAY form a new primary care-of address at any time, but a mobile node MUST NOT send a Binding Update about a new care-of address to its home agent more than MAX_UPDATE_RATE times within a second ๐Ÿ™ˆ

Also, a mobile node MAY form new non-primary care-of addresses even when it has not switched to a new default router. A mobile node can have only one primary care-of address at a time (the one registered with its home agent), but it MAY have an additional care-of address for any or all of the prefixes on its current link. Plus, since a wireless network interface may actually let a mobile node be reachable on more than one link at a time (i.e., within wireless transmitter range of routers on more than one separate link), a mobile node MAY have care-of addresses on more than one link at a time. Using more than one care-of address at a time is described in Section 11.5.3 ๐Ÿฆ‹

As described in Section 4, a mobile node MAY use either stateless [13] or stateful (e.g., DHCPv6 [29]) Address Autoconfiguration to form a new care-of address. If a mobile node needs to use a source address (other than the unspecified address) in packets sent as part of address autoconfiguration, it MUST use an IPv6 link-local address rather than its own IPv6 home address ๐Ÿซถ

RFC 2462 [13] specifies that in normal processing for Duplicate Address Detection, the node SHOULD delay sending the initial Neighbor Solicitation message by a random delay between 0 and MAX_RTR_SOLICITATION_DELAY. But delaying DAD can cause big holdups when configuring a new care-of address after the Mobile Node moves to a new link, so the Mobile Node preferably SHOULD NOT delay DAD when configuring a new care-of address ๐Ÿ˜ญ The Mobile Node SHOULD still delay according to the mechanisms specified in RFC 2462, unless its implementation has a behavior that desynchronizes the steps before DAD in case multiple nodes experience handover at the same time. Those desynchronizing behaviors might come from random delays in the L2 protocols or device drivers, or from the movement detection mechanism in use ๐ŸŒธ


11.5.3. Using Multiple Care-of Addresses ๐ŸŒˆ

As described in Section 11.5.2, a mobile node MAY use more than one care-of address at a time. Especially with many wireless networks, a mobile node might effectively be reachable through multiple links at the same time (e.g., with overlapping wireless cells), and different on-link subnet prefixes may exist on those links. The mobile node MUST ensure that its primary care-of address always has a prefix that is advertised by its current default router. After selecting a new primary care-of address, the mobile node MUST send a Binding Update containing that care-of address to its home agent. The Binding Update MUST have the Home Registration (H) and Acknowledge (A) bits set its home agent, as described on Section 11.7.1 ๐Ÿ‘‘

To help with smooth handovers, a mobile node SHOULD keep its previous primary care-of address as a (non-primary) care-of address, and SHOULD still accept packets at this address, even after registering its new primary care-of address with its home agent. This makes sense, since the mobile node could only receive packets at its previous primary care-of address if it were actually still connected to that link ๐Ÿฆ‹ If the previous primary care-of address was allocated using stateful Address Autoconfiguration [29], the mobile node may not wish to release the address right away when it switches to a new primary care-of address ๐Ÿงš

Whenever a mobile node determines that it's no longer reachable through a given link, it SHOULD invalidate all care-of addresses associated with address prefixes it discovered from routers on the unreachable link, unless those prefixes are in the current set of address prefixes advertised by the (possibly new) current default router ๐Ÿ’–

Okay that's the movement section, and honestly it's giving a whole masterclass in not switching networks for no reason ๐Ÿ’…

11.5.4. Returning Home โœจ

Okay so a mobile node knows it's back home when its movement detection (Section 11.5.1) notices that its home subnet prefix is on-link again ๐Ÿ ๐ŸŒธ. At that point it SHOULD send a Binding Update to its home agent so the home agent stops intercepting or tunneling packets for it ๐Ÿ’…. In this home registration, the mobile node MUST set the Acknowledge (A) and Home Registration (H) bits, set the Lifetime field to zero, and set the care-of address for the binding to its own home address ๐ŸŽ€. It MUST use its home address as the source address in the Binding Update ๐Ÿซถ.

When sending this Binding Update, the mobile node must be careful about how it uses Neighbor Solicitation [12] (if needed) to learn the home agent's link-layer address ๐Ÿ˜ฌ. The reason is that the home agent is currently set up to intercept packets to the mobile node's home address using Duplicate Address Detection (DAD). So the mobile node can't use its home address as the Source Address in the Neighbor Solicitation until the home agent stops defending that address ๐Ÿ™ˆ.

Neighbor Solicitation for the home agent's address usually isn't needed, because the mobile node already learned the home agent's link-layer address from a Source Link-Layer Address option in a Router Advertisement. โœจ But if there are multiple home agents, it might still be necessary to send a solicitation. In this special case of returning home, the mobile node MUST multicast the packet, and it also MUST set the Source Address of this Neighbor Solicitation to the unspecified address (0:0:0:0:0:0:0:0). The target of the Neighbor Solicitation MUST be set to the mobile node's home address. The destination IP address MUST be set to the Solicited-Node multicast address [3]. The home agent will send a multicast Neighbor Advertisement back to the mobile node with the Solicited flag (S) set to zero. Either way, the mobile node SHOULD record the information from the Source Link-Layer Address option or from the advertisement, and set the state of the Neighbor Cache entry for the home agent to REACHABLE ๐Ÿ’œ.

Next, the mobile node sends its Binding Update to the home agent's link-layer address, telling the home agent to stop acting as a home agent for it ๐Ÿ‘‘. Once the home agent processes that update, it stops defending the mobile node's home address for Duplicate Address Detection and stops responding to Neighbor Solicitations for that address. This means the mobile node is now the only node on the link receiving packets at its home address ๐Ÿฆ‹. Also, if the mobile node returns home before a current binding for its home address expires, and it configures its home address on its network interface on the home link, the mobile node MUST NOT perform Duplicate Address Detection on its own home address. That avoids confusion or a clash with the home agent using the same address. The same rule covers the derived link-local address, but only if the Link Local Address Compatibility (L) bit was set when the binding was created. If the mobile node returns home after the bindings for all of its care-of addresses have expired, then it SHOULD perform DAD ๐ŸŒˆ.

After the Mobile Node sends the Binding Update, it MUST be prepared to reply to Neighbor Solicitations for its home address. Those replies MUST be sent as a unicast Neighbor Advertisement to the sender's link-layer address ๐Ÿ’–. Replying matters because the home agent may need to do Neighbor Discovery when it sends the Binding Acknowledgement, and the mobile node may not be able to tell solicitations from the home agent apart from other solicitations. Heads up, there's a little race condition where both the mobile node and the home agent answer the same solicitations from other nodes ๐Ÿ™ˆ. It's only temporary, though, lasting until the Binding Update is accepted.

After the mobile node receives the Binding Acknowledgement for its Binding Update to the home agent, it MUST multicast a Neighbor Advertisement [12] onto the home link (to the all-nodes multicast address) ๐Ÿ“ฃ. This advertises the mobile node's own link-layer address for its own home address. The Target Address in this Neighbor Advertisement MUST be set to the mobile node's home address, and the Advertisement MUST include a Target Link-layer Address option specifying the mobile node's link-layer address. The mobile node MUST multicast such a Neighbor Advertisement for each of its home addresses, based on the current on-link prefixes. That includes its link-local address and site-local address ๐ŸŒธ. The Solicited Flag (S) in these Advertisements MUST NOT be set, since no Neighbor Solicitation asked for them. The Override Flag (O) MUST be set, which tells every node that receives them that they SHOULD override any existing Neighbor Cache entries ๐Ÿ”ฅ.

Multicasting on a local link (like Ethernet) isn't guaranteed to be reliable, so the mobile node MAY retransmit these Neighbor Advertisements [12] up to MAX_NEIGHBOR_ADVERTISEMENT times to make them more reliable ๐Ÿงš. Some nodes on the home link might still miss every one of them, but they'll eventually recover through Neighbor Unreachability Detection [12] ๐Ÿซถ.

Heads up: the tunnel via the home agent usually stops working at the same moment the home registration gets deleted ๐Ÿ’€.

11.6. Return Routability Procedure โœจ

This section lays out the rules the mobile node must follow when it performs the return routability procedure ๐Ÿ’…. Section 11.7.2 explains when that procedure needs to be started ๐Ÿฆ‹.

11.6.1. Sending Test Init Messages ๐ŸŽ€

A mobile node that starts a return routability procedure MUST send a Home Test Init message and a Care-of Test Init message at the same time, in parallel ๐Ÿš€. But if the mobile node recently received one or both home or care-of keygen tokens, plus the matching nonce indices for the addresses it wants, it MAY reuse them โ™ป๏ธ. So the procedure can sometimes finish with just one pair of messages. It can even finish with no messages at all, if the mobile node has a recent home keygen token and has already visited the same care-of address, so it also has a recent care-of keygen token ๐Ÿ™Œ. If the mobile node plans to send a Binding Update with the Lifetime set to zero and the care-of address equal to its home address (like when it's coming home), then one Home Test Init message is enough. In that case, the binding management key comes entirely from the home keygen token (Section 5.2.5) ๐Ÿ”‘.

A Home Test Init message MUST be created as described in Section 6.1.3 โœจ.

A Care-of Test Init message MUST be created as described in Section 6.1.4 โœจ. When the mobile node sends a Home Test Init or Care-of Test Init message, it MUST record the following fields from those messages in its Binding Update List ๐Ÿ“:

  • The IP address of the node the message was sent to.
  • The home address of the mobile node. This value shows up in the Source Address field of the Home Test Init message. For the Care-of Test Init message, this address isn't in the message at all, but it stands for the home address the binding is for ๐Ÿก.
  • The time each of these messages was sent โฐ.
  • The cookies used in the messages ๐Ÿช.

One Care-of Test Init message might be enough even when there are several home addresses ๐ŸŒˆ. In that case, the mobile node MAY record the same information in multiple Binding Update List entries ๐Ÿ’œ.

11.6.2. Receiving Test Messages ๐Ÿ“ฌ

When a mobile node receives a packet carrying a Home Test message, it MUST validate the packet against these tests ๐Ÿ•ต๏ธโ€โ™€๏ธ:

  • The Source Address of the packet belongs to a correspondent node that has a Binding Update List entry in the state showing a return routability procedure is in progress. There might be more than one of these entries.
  • The Binding Update List shows that no home keygen token has been received yet.
  • The Destination Address of the packet is the mobile node's home address, and the packet came through a tunnel from the home agent.
  • The Home Init Cookie field in the message matches the value stored in the Binding Update List.

Any Home Test message that doesn't pass all of these tests MUST be silently ignored ๐Ÿคซ. Otherwise, the mobile node MUST record the Home Nonce Index and home keygen token in the Binding Update List ๐Ÿ“ฅ. If that Binding Update List entry doesn't have a care-of keygen token yet, the mobile node SHOULD keep waiting for the Care-of Test message โณ.

When a mobile node receives a packet carrying a Care-of Test message, it MUST validate the packet against these tests ๐Ÿ”:

  • The Source Address of the packet belongs to a correspondent node that has a Binding Update List entry in the state showing a return routability procedure is in progress. There might be more than one of these entries.
  • The Binding Update List shows that no care-of keygen token has been received yet.
  • The Destination Address of the packet is the current care-of address of the mobile node.
  • The Care-of Init Cookie field in the message matches the value stored in the Binding Update List.

Any Care-of Test message that doesn't pass all of these tests MUST be silently ignored ๐Ÿคซ. Otherwise, the mobile node MUST record the Care-of Nonce Index and care-of keygen token in the Binding Update List ๐Ÿ“ฅ. If that Binding Update List entry doesn't have a home keygen token yet, the mobile node SHOULD keep waiting for the Home Test message โณ.

If, after receiving either the Home Test or the Care-of Test message and doing the steps above, the Binding Update List entry has both the home and care-of keygen tokens, then the return routability procedure is complete ๐ŸŽ‰. The mobile node SHOULD then go ahead and send a Binding Update as described in Section 11.7.2 ๐Ÿ’–.

Some correspondent nodes from before this specification was published might not support the Mobility Header protocol ๐Ÿ•ฐ๏ธ. Those nodes respond to Home Test Init and Care-of Test Init messages with an ICMP Parameter Problem code 1. The mobile node SHOULD treat such messages as a sign that the correspondent node can't do route optimization, and switch back to bidirectional tunneling ๐Ÿ”.

11.6.3. Protecting Return Routability Packets ๐Ÿ›ก๏ธ

The mobile node MUST support protecting Home Test and Home Test Init messages as described in Section 10.4.6 ๐Ÿ”.

When IPsec is used to protect return routability signaling or payload packets, the mobile node MUST set the source address it uses for the outgoing tunnel packets to the current primary care-of address ๐ŸŒŸ. It starts using a new primary care-of address right after it sends a Binding Update to the home agent to register that new address ๐Ÿฆ‹.

11.7. Processing Bindings ๐ŸŒธ

11.7.1. Sending Binding Updates to the Home Agent

okay so ๐Ÿงš once a mobile node decides to swap its primary care-of address (see Section 11.5.1 and Section 11.5.2), it MUST register that new care-of address with its home agent so it becomes the primary one ๐Ÿกโœจ no skipping this step bestie!!

And even if it's NOT switching addresses ๐Ÿ™ˆ if it wants the home agent to keep doing its thing past the current registration period, it should send a fresh Binding Update before that period runs out. lowkey that's just good planning ๐Ÿ’… BUT here's the tea: if the home agent sent back a Binding Acknowledgement with Status set to 1 (accepted but prefix discovery necessary) ๐Ÿซฃ, the mobile node should hold off on registering again until it has learned whether its home prefixes are still valid through mobile prefix discovery. this usually has to happen every single time that Status value shows up, because whatever it learned before may have changed ๐ŸŒธ

Now, to register a care-of address or extend an existing registration, the mobile node sends a packet to its home agent that has a Binding Update in it. the packet gets built like this ๐ŸŽ€:

  • The Home Registration (H) bit MUST be set in the Binding Update. ๐Ÿ’–
  • The Acknowledge (A) bit MUST be set in the Binding Update. โœจ
  • The packet MUST contain a Home Address destination option, giving the mobile node's home address for the binding. ๐Ÿฆ‹
  • The care-of address for the binding MUST be used as the Source Address in the packet's IPv6 header, unless an Alternate Care-of Address mobility option is included in the Binding Update. This option MUST be included in all home registrations, as the ESP protocol will not be able to protect care-of addresses in the IPv6 header. (Mobile IPv6 implementations that know they are using IPsec AH to protect a particular message might avoid this option. For brevity the usage of AH is not discussed in this document.) ๐Ÿ”ฅ
  • If the mobile node's link-local address has the same interface identifier as the home address for which it is supplying a new care-of address, then the mobile node SHOULD set the Link-Local Address Compatibility (L) bit. ๐ŸŒˆ
  • If the home address was generated using RFC 3041 [18], then the link local address is unlikely to have a compatible interface identifier. In this case, the mobile node MUST clear the Link-Local Address Compatibility (L) bit. ๐Ÿ™ƒ
  • If the IPsec security associations between the mobile node and the home agent have been established dynamically, and the mobile node has the capability to update its endpoint in the used key management protocol to the new care-of address every time it moves, the mobile node SHOULD set the Key Management Mobility Capability (K) bit in the Binding Update. Otherwise, the mobile node MUST clear the bit. ๐Ÿง 
  • The value specified in the Lifetime field MUST be non-zero and SHOULD be less than or equal to the remaining valid lifetime of the home address and the care-of address specified for the binding. โณ

Mobile nodes that use dynamic home agent address discovery should be careful with long lifetimes ๐Ÿ˜ฌ if a mobile node loses track of its binding with one home agent, registering a new binding with a different home agent may be impossible, because the previous home agent is still defending the existing binding. so to make sure these mobile nodes don't lose binding info, they SHOULD de-register before losing that info, or use small lifetimes. no cap, that's the safe move ๐Ÿ›Ÿ

The Acknowledge (A) bit in the Binding Update asks the home agent to send back a Binding Acknowledgement for this Binding Update. As described in Section 6.1.8, the mobile node SHOULD retransmit this Binding Update to its home agent until it gets a matching Binding Acknowledgement ๐Ÿ”. Once it hits a retransmission timeout period of MAX_BINDACK_TIMEOUT, the mobile node SHOULD restart the process of delivering the Binding Update, but this time try the next home agent returned during dynamic home agent address discovery (see Section 11.4.1). If there was only one home agent, the mobile node SHOULD instead keep retransmitting the Binding Update at this rate until it's acknowledged (or until it starts trying to register a different primary care-of address). See Section 11.8 for information about retransmitting Binding Updates. ๐Ÿ“ฌ

With the Binding Update, the mobile node asks the home agent to act as the home agent for the given home address. Until the lifetime of this registration runs out, the home agent considers itself the home agent for that home address ๐Ÿ‘‘

Each Binding Update MUST be authenticated as coming from the right mobile node, as defined in Section 5.1. ๐Ÿ” The mobile node MUST use its home address, either in the Home Address destination option or in the Source Address field of the IPv6 header, in Binding Updates sent to the home agent. This is necessary so the IPsec policies can be matched with the correct home address ๐ŸŽฏ

When the mobile node sends a Binding Update to its home agent, it MUST also create or update the matching Binding Update List entry, as specified in Section 11.7.2. ๐Ÿ“

The last Sequence Number value sent to the home agent in a Binding Update gets stored by the mobile node. If the sending mobile node doesn't know the correct Sequence Number value, it may start at any value. If the home agent rejects that value, it sends back a Binding Acknowledgement with status code 135 and the last accepted sequence number in the Sequence Number field of the Binding Acknowledgement. The mobile node MUST store this information and use the next Sequence Number value for the next Binding Update it sends. ๐Ÿ”ข๐Ÿ’–

If the mobile node has additional home addresses, it SHOULD send an additional packet containing a Binding Update to its home agent to register the care-of address for each of those other home addresses ๐ŸŒŸ

The home agent will only perform DAD for the mobile node's home address once the mobile node has supplied a valid binding between that home address and a care-of address. If some time passes where the mobile node has no binding at the home agent, it might be possible for another node to autoconfigure the mobile node's home address ๐Ÿ˜ฑ so the mobile node MUST treat creating a new binding with the home agent using an existing home address the same as creating a new home address. In the unlikely event that the mobile node's home address gets autoconfigured as the IPv6 address of another network node on the home network, the home agent will reply to the mobile node's next Binding Update with a Binding Acknowledgement containing a Status of 134 (Duplicate Address Detection failed). In this case the mobile node MUST NOT attempt to re-use the same home address. It SHOULD keep registering care-of addresses for its other home addresses, if it has any. (Mechanisms outlined in Appendix B.5 may in the future allow mobile nodes to acquire new home addresses to replace the one that got Status 134.) ๐Ÿ’€๐Ÿซถ

11.7.2. Correspondent Registration โœจ

Okay bestie, so once the mobile node is sure its home address is valid ๐Ÿ , it can start a correspondent registration ๐Ÿ’Œ. The whole point is letting the correspondent node cache the mobile node's current care-of address, so the two can keep talking. This procedure is a return routability procedure followed by a registration, so it's a two-step glow-up ๐Ÿ’….

This section explains when that correspondent registration gets kicked off and the rules to follow while it's happening ๐Ÿ“‹.

After the mobile node has sent a Binding Update to its home agent to register a new primary care-of address (see Section 11.7.1) ๐Ÿก, it SHOULD start a correspondent registration for every node that's already in its Binding Update List ๐Ÿ’–. These procedures can be used to either update or delete the binding information on the correspondent node ๐Ÿงน.

For nodes that aren't in the Binding Update List, the mobile node MAY start a correspondent registration whenever it wants, any time after sending the Binding Update to its home agent ๐Ÿ•ฐ๏ธ.

When (and if) to start this depends on how the mobile node moves and what its traffic looks like ๐Ÿš—๐Ÿ’จ. That stuff is outside the scope of this document, so it's a whole other tea โ˜•.

The mobile node MAY also start the correspondent registration after receiving a packet that passes ALL of these checks ๐Ÿ” (okay, not ALL caps, I'm just being dramatic ๐Ÿ’€):

  • The packet was tunneled using IPv6 encapsulation ๐Ÿ“ฆ.
  • The Destination Address in the tunnel (outer) IPv6 header is equal to any of the mobile node's care-of addresses ๐ŸŽฏ.
  • The Destination Address in the original (inner) IPv6 header is equal to one of the mobile node's home addresses ๐Ÿ .
  • The Source Address in the tunnel (outer) IPv6 header differs from the Source Address in the original (inner) IPv6 header ๐Ÿ”€.
  • The packet does not contain a Home Test, Home Test Init, Care-of Test, or Care-of Test Init message ๐Ÿ™…โ€โ™€๏ธ.

If a mobile node has multiple home addresses, picking the right one for the correspondent registration is super important ๐ŸŒธ. The home address used MUST be the Destination Address of the original (inner) packet ๐Ÿ‘‘.

The peer address used in the procedure MUST be figured out like this ๐Ÿงฉ:

  • If a Home Address destination option is present in the original (inner) packet, the address from that option is used ๐ŸŽ€.
  • Otherwise, the Source Address in the original (inner) IPv6 header of the packet is used ๐Ÿฆ‹.

Here's the thing: the validity of the original packet gets checked BEFORE the mobile node even tries to start a correspondent registration ๐Ÿ‘€. For example, if a Home Address destination option showed up in the original packet, then the rules in Section 9.3.1 get followed first ๐Ÿ“œ.

A mobile node MAY also decide to keep its topological location private from certain correspondent nodes ๐Ÿ•ต๏ธโ€โ™€๏ธ๐Ÿซฃ. In that case, it doesn't need to start the correspondent registration at all ๐ŸŒˆ.

Once the return routability procedure has been completed successfully, AND after a successful Binding Acknowledgement comes back from the Home Agent ๐ŸŽ‰, a Binding Update MAY be sent to the correspondent node ๐Ÿ’Œ.

Care-of address rule (very important!!): In ANY Binding Update sent by a mobile node, the care-of address MUST be set to one of the care-of addresses currently in use by the mobile node, or to the mobile node's home address ๐Ÿšจ. The care-of address can show up either as the Source Address in the packet's IPv6 header, or as the Care-of Address in the Alternate Care-of Address mobility option of the Binding Update ๐Ÿ“ฎ. The mobile node MAY set the care-of address differently when sending Binding Updates to different correspondent nodes ๐Ÿ”„.

A mobile node MAY also send a Binding Update to a correspondent node that tells it to delete any existing binding for the mobile node from its Binding Cache ๐Ÿ—‘๏ธ, as described in Section 6.1.7. Even in this case, a successful return routability procedure is required first ๐Ÿ™.

If the care-of address isn't the mobile node's home address, the Binding Update is asking the correspondent node to create or update an entry for the mobile node in its Binding Cache ๐Ÿ“. This is so the correspondent node knows which care-of address to use for sending future packets to the mobile node ๐Ÿ’ซ. In this case, the value in the Lifetime field of the Binding Update SHOULD be less than or equal to the remaining lifetime of the home registration AND the care-of address specified for the binding โณ. The care-of address in the Binding Update MAY be different from the mobile node's primary care-of address ๐Ÿ”.

If the Binding Update goes to the correspondent node asking it to DELETE any existing Binding Cache entry for the mobile node ๐Ÿ™…โ€โ™€๏ธ, then the care-of address is set to the mobile node's home address and the Lifetime field is set to zero 0๏ธโƒฃ. In this case, the binding management key comes ONLY from the home keygen token (Section 5.2.5) ๐Ÿ”‘. The care-of nonce index SHOULD be set to zero in this case ๐Ÿ”ข. Following the Binding Update creation rules below, the care-of address MUST be set to the home address if the mobile node is at home ๐Ÿก, or to the current care-of address if it's away from home โœˆ๏ธ.

If the mobile node wants to be sure its new care-of address actually got entered into a correspondent node's Binding Cache, it needs to ask for an acknowledgement by setting the Acknowledge (A) bit in the Binding Update ๐Ÿ™‹โ€โ™€๏ธ.

A Binding Update gets created like this ๐Ÿ› ๏ธ:

  • The current care-of address of the mobile node MUST be sent either in the Source Address of the IPv6 header, OR in the Alternate Care-of Address mobility option ๐Ÿ“ฌ.
  • The Destination Address of the IPv6 header MUST contain the address of the correspondent node ๐ŸŽฏ.
  • The Mobility Header gets built according to the rules in Section 6.1.7 and Section 5.2.6, including the Binding Authorization Data (calculated as defined in Section 6.2.7) and possibly the Nonce Indices mobility options ๐Ÿง.
  • The home address of the mobile node MUST be added to the packet in a Home Address destination option, UNLESS the Source Address is already the home address ๐Ÿ .

Each Binding Update MUST have a Sequence Number greater than the Sequence Number value sent in the previous Binding Update to the same destination address (if there was one) ๐Ÿ”ข. Sequence numbers get compared modulo 2**16, as described in Section 9.5.1 ๐Ÿงฎ. There's no requirement that the Sequence Number go up by exactly 1 each time a new Binding Update is sent or received ๐Ÿ™…โ€โ™€๏ธ, as long as the value stays within the window ๐ŸชŸ. The last Sequence Number sent to a destination in a Binding Update gets stored by the mobile node in its Binding Update List entry for that destination ๐Ÿ—‚๏ธ. If the sending mobile node doesn't have a Binding Update List entry, the Sequence Number SHOULD start at a random value ๐ŸŽฒ. The mobile node MUST NOT use the same Sequence Number in two different Binding Updates to the same correspondent node, EVEN IF those Binding Updates give different care-of addresses ๐Ÿšซ.

The mobile node is responsible for finishing the correspondent registration ๐Ÿ, along with any retransmissions that might be needed (subject to the rate limitation defined in Section 11.8) ๐Ÿ”. It's giving responsibility, honestly ๐Ÿ’…โœจ.

11.7.3. Receiving Binding Acknowledgements โœจ

Okay so when a packet carrying a Binding Acknowledgement shows up, the mobile node MUST validate it with these checks ๐Ÿ”:

  • The packet meets the authentication requirements for Binding Acknowledgements defined in Section 6.1.8 and Section 5. That is, if the Binding Update was sent to the home agent, underlying IPsec protection is used. If the Binding Update was sent to the correspondent node, the Binding Authorization Data mobility option MUST be present and have a valid value. ๐Ÿ”
  • The Binding Authorization Data mobility option, if present, MUST be the last option and MUST not have trailing padding. ๐Ÿงฉ
  • The Sequence Number field matches the Sequence Number sent by the mobile node to this destination address in an outstanding Binding Update. ๐Ÿ”ข

Any Binding Acknowledgement that doesn't pass all of these tests MUST be silently ignored. Bye bye, bestie ๐Ÿ‘‹

When a mobile node gets a packet with a valid Binding Acknowledgement, it MUST examine the Status field like this:

  • If the Status field says the Binding Update was accepted (the Status field is less than 128), then the mobile node MUST update the matching entry in its Binding Update List to show that the Binding Update has been acknowledged. The mobile node MUST then stop retransmitting the Binding Update. ๐ŸŽ‰ Also, if the Lifetime value in the Binding Acknowledgement is less than the Lifetime value sent in the Binding Update being acknowledged, the mobile node MUST subtract the difference between these two Lifetime values from the remaining lifetime for the binding, as kept in the matching Binding Update List entry (with a minimum value for the Binding Update List entry lifetime of 0). So if the Lifetime value sent in the Binding Update was L_update, the Lifetime value received in the Binding Acknowledgement was L_ack, and the current remaining lifetime of the Binding Update List entry is L_remain, then the new value for the remaining lifetime of the Binding Update List entry should be:
max((L_remain - (L_update - L_ack)), 0)

where max(X, Y) is the maximum of X and Y. โณ This step keeps the mobile node's view of the binding's remaining lifetime (as kept in the matching Binding Update List entry) accurate. It counts down from the Lifetime value given in the Binding Acknowledgement, but the timer starts at the moment the Binding Update was sent. Super precise, obsessed ๐Ÿ˜ญ

Mobile nodes SHOULD send a new Binding Update well before this period runs out so the lifetime gets extended. This helps avoid disruptions that network delays or clock drift might otherwise cause. ๐Ÿ›ก๏ธ

  • Also, if the Status field value is 1 (accepted but prefix discovery necessary), the mobile node SHOULD send a Mobile Prefix Solicitation message to update its information about the available prefixes. ๐Ÿ”Ž
  • If the Status field says the Binding Update was rejected (the Status field is greater than or equal to 128), then the mobile node can fix whatever caused the error and retransmit the Binding Update (with a new Sequence Number value). This is subject to the rate limiting restriction specified in Section 11.8. ๐Ÿšฆ If that doesn't happen or it fails, then the mobile node SHOULD record in its Binding Update List that future Binding Updates SHOULD NOT be sent to this destination. ๐Ÿšซ

How the Binding Refresh Advice mobility option inside the Binding Acknowledgement gets treated depends on where the acknowledgement came from. This option MUST be ignored if the acknowledgement came from a correspondent node. If it came from the home agent, the mobile node uses the Refresh Interval field in the option as a suggestion that it SHOULD try to refresh its home registration at the shorter interval it names. ๐Ÿ”

If the acknowledgement came from the home agent, the mobile node checks the Key Management Mobility Capability (K) bit. If this bit is not set, the mobile node SHOULD discard any key management protocol connections to the home agent. The mobile node MAY also start a new key management connection. ๐Ÿ”‘

If this bit is set, the mobile node SHOULD move its own endpoint in the key management protocol connections to the home agent, if there are any. The mobile node's new endpoint should be the new care-of address. For an IKE phase 1 connection, this means that packets sent to this address with the original ISAKMP cookies are accepted. ๐Ÿ’Œ

11.7.4. Receiving Binding Refresh Requests ๐Ÿ”„

When a mobile node receives a packet containing a Binding Refresh Request message, it has a Binding Update List entry for the source of that request, and it wants to keep its binding cache entry at the correspondent node, then the mobile node should start a return routability procedure. ๐Ÿ•ต๏ธโ€โ™€๏ธ If the mobile node wants its binding cache entry removed, it can either ignore the Binding Refresh Request and let the binding time out, or it can, at any time, delete its binding from a correspondent node by sending an explicit binding update with a zero lifetime and the care-of address set to the home address. If the mobile node doesn't know whether it needs the binding cache entry, it can decide in an implementation dependent manner, such as based on available resources. ๐Ÿง 

Note that the mobile node should be careful not to respond to Binding Refresh Requests for addresses that aren't in the Binding Update List. That way it avoids getting caught up in a denial of service attack. ๐Ÿ™…โ€โ™€๏ธ๐Ÿ’ฅ

If the return routability procedure finishes successfully, a Binding Update message SHOULD be sent, as described in Section 11.7.2. The Lifetime field in this Binding Update SHOULD be set to a new lifetime that extends any current lifetime remaining from a previous Binding Update sent to this node (as shown in any existing Binding Update List entry for this node). The lifetime SHOULD again be less than or equal to the remaining lifetime of the home registration and the care-of address specified for the binding. โฐ When sending this Binding Update, the mobile node MUST update its Binding Update List in the same way it does for any other Binding Update it sends. โœ…


11.8. Retransmissions and Rate Limiting ๐Ÿ”

The mobile node is responsible for retransmissions and rate limiting in the return routability procedure, in registrations, and in solicited prefix discovery. It's giving responsibility ๐Ÿ’…

When the mobile node sends a Mobile Prefix Solicitation, Home Test Init, Care-of Test Init, or Binding Update that it expects a response to, the mobile node has to figure out a value for the initial retransmission timer:

  • If the mobile node is sending a Mobile Prefix Solicitation, it SHOULD use an initial retransmission interval of INITIAL_SOLICIT_TIMER (see Section 12). โฑ๏ธ
  • If the mobile node is sending a Binding Update and doesn't have an existing binding at the home agent, it SHOULD use InitialBindackTimeoutFirstReg (see Section 13) as the value for the initial retransmission timer. This long retransmission interval gives the home agent enough time to finish the Duplicate Address Detection procedure that is required in this case, as detailed in Section 11.7.1. ๐Ÿ 
  • Otherwise, the mobile node should use the specified value of INITIAL_BINDACK_TIMEOUT for the initial retransmission timer. ๐ŸŽฏ

If the mobile node doesn't get a valid matching response within the initial retransmission interval it picked, the mobile node SHOULD keep retransmitting the message until a response shows up. ๐Ÿ“จ

The retransmissions from the mobile node MUST use an exponential back-off process, where the timeout period doubles with each retransmission. This continues until the node gets a response or the timeout period reaches the value MAX_BINDACK_TIMEOUT. The mobile node MAY keep sending these messages at this slower rate indefinitely. ๐Ÿข

The mobile node SHOULD start a separate back-off process for each message type, each home address, and each care-of address. On top of that, there's an overall rate limit for messages sent to a particular correspondent node. This makes sure the correspondent node has enough time to respond when bindings for multiple home addresses are registered, for example. ๐Ÿซถ The mobile node MUST NOT send Mobility Header messages of a particular type to a particular correspondent node more than MAX_UPDATE_RATE times within a second. ๐Ÿšซ

Retransmitted Binding Updates MUST use a Sequence Number value greater than the one used for the previous transmission of that Binding Update. Retransmitted Home Test Init and Care-of Test Init messages MUST use new cookie values. ๐Ÿช


12. Protocol Constants ๐Ÿ’œ

DHAAD_RETRIES                   4 retransmissions
INITIAL_BINDACK_TIMEOUT         1 second
INITIAL_DHAAD_TIMEOUT           3 seconds
INITIAL_SOLICIT_TIMER           3 seconds
MAX_BINDACK_TIMEOUT             32 seconds
MAX_NONCE_LIFETIME              240 seconds
MAX_TOKEN_LIFETIME              210 seconds
MAX_RR_BINDING_LIFETIME         420 seconds
MAX_UPDATE_RATE                 3 times
PREFIX_ADV_RETRIES              3 retransmissions
PREFIX_ADV_TIMEOUT              3 seconds

13. Protocol Configuration Variables ๐ŸŽ€

MaxMobPfxAdvInterval            Default: 86,400 seconds
MinDelayBetweenRAs              Default: 3 seconds,
                                Min: 0.03 seconds
MinMobPfxAdvInterval            Default: 600 seconds
InitialBindackTimeoutFirstReg   Default: 1.5 seconds

Home agents MUST allow the first three variables to be configured by system management, and mobile nodes MUST allow the last variable to be configured by system management. โš™๏ธ

The default value for InitialBindackTimeoutFirstReg has been calculated as 1.5 times the default value of RetransTimer [12] times the default value of DupAddrDetectTransmits [13]. ๐Ÿงฎ

The value MinDelayBetweenRAs overrides the value of the protocol constant MIN_DELAY_BETWEEN_RAS, as specified in RFC 2461 [12]. This variable SHOULD be set to MinRtrAdvInterval, if MinRtrAdvInterval is less than 3 seconds. โœจ

14. IANA Considerations โœจ

okay bestie, this part is all about registries, which are the official lists of numbers everyone agrees on so nobody gets confused ๐Ÿฆ‹

This document defines a new IPv6 protocol, the Mobility Header, described in Section 6.1. This protocol has been assigned protocol number 135 ๐Ÿ’œ

This document also creates a new name space "Mobility Header Type", for the MH Type field in the Mobility Header. The current message types are described starting from Section 6.1.2, and they are the following:

0  Binding Refresh Request

1  Home Test Init

2  Care-of Test Init

3  Home Test

4  Care-of Test

5  Binding Update

6  Binding Acknowledgement

7  Binding Error

Future values of the MH Type can be allocated using Standards Action or IESG Approval [10] ๐ŸŒธ

Furthermore, every mobility message can carry mobility options, as described in Section 6.2. This document defines a new name space "Mobility Option" to identify these options. The current mobility options are defined starting from Section 6.2.2, and they are the following:

0  Pad1

1  PadN

2  Binding Refresh Advice

3  Alternate Care-of Address

4  Nonce Indices

5  Authorization Data

Future values of the Option Type can be allocated using Standards Action or IESG Approval [10] ๐ŸŽ€

Finally, this document creates a third new name space "Status Code" for the Status field in the Binding Acknowledgement message. The current values are described in Section 6.1.8, and they are the following:

     0 Binding Update accepted

     1 Accepted but prefix discovery necessary

   128 Reason unspecified

   129 Administratively prohibited

   130 Insufficient resources

   131 Home registration not supported

   132 Not home subnet

   133 Not home agent for this mobile node

   134 Duplicate Address Detection failed

   135 Sequence number out of window

   136 Expired home nonce index

   137 Expired care-of nonce index

   138 Expired nonces

   139 Registration type change disallowed

Future values of the Status field can be allocated using Standards Action or IESG Approval [10] ๐Ÿงš

All fields labeled "Reserved" are only to be assigned through Standards Action or IESG Approval. No shortcuts, periodt ๐Ÿ’…

This document also defines a new IPv6 destination option, the Home Address option, described in Section 6.3. This option has been assigned the Option Type value 0xC9 โœจ

This document also defines a new IPv6 type 2 routing header, described in Section 6.4. The value 2 has been allocated by IANA ๐Ÿ‘‘

In addition, this document defines four ICMP message types. Two of them are used as part of the dynamic home agent address discovery mechanism, and two are used in lieu of Router Solicitations and Advertisements when the mobile node is away from the home link. These messages have been assigned ICMPv6 type numbers from the informational message range:

  • The Home Agent Address Discovery Request message, described in Section 6.5;
  • The Home Agent Address Discovery Reply message, described in Section 6.6;
  • The Mobile Prefix Solicitation, described in Section 6.7; and
  • The Mobile Prefix Advertisement, described in Section 6.8.

This document also defines two new Neighbor Discovery [12] options, which have been assigned Option Type values within the option numbering space for Neighbor Discovery messages:

  • The Advertisement Interval option, described in Section 7.3; and
  • The Home Agent Information option, described in Section 7.4.

15. Security Considerations ๐Ÿ”

okay this section is the serious one, so we're going full detective mode ๐Ÿ•ต๏ธโ€โ™€๏ธ no cap, every single threat matters.

15.1. Threats

Any mobility solution must protect itself against misuses of the mobility features and mechanisms. In Mobile IPv6, most of the potential threats are about false Bindings, which usually end up as Denial-of-Service attacks ๐Ÿ˜ญ Some of the threats also pose a potential for Man-in-the-Middle, Hijacking, Confidentiality, and Impersonation attacks. The main threats this protocol protects against are the following:

  • Threats involving Binding Updates sent to home agents and correspondent nodes. For instance, an attacker might claim that a certain mobile node is currently at a different location than it really is. If a home agent accepts such spoofed information sent to it, the mobile node might not get traffic destined to it. Similarly, a malicious (mobile) node might use the home address of a victim node in a forged Binding Update sent to a correspondent node.

These pose threats against confidentiality, integrity, and availability. That is, an attacker might learn the contents of packets destined to another node by redirecting the traffic to itself. Furthermore, an attacker might use the redirected packets in an attempt to set itself up as a Man-in-the-Middle between a mobile and a correspondent node. This would allow the attacker to impersonate the mobile node, leading to integrity and availability problems ๐Ÿ’€

A malicious (mobile) node might also send Binding Updates in which the care-of address is set to the address of a victim node. If such Binding Updates were accepted, the malicious node could lure the correspondent node into sending potentially large amounts of data to the victim. The correspondent node's replies to messages sent by the malicious mobile node will be sent to the victim host or network. This could be used to cause a Distributed Denial-of-Service attack. For example, the correspondent node might be a site that will send a high-bandwidth stream of video to anyone who asks for it. Note that the use of flow-control protocols such as TCP does not necessarily defend against this type of attack, because the attacker can fake the acknowledgements. Even keeping TCP initial sequence numbers secret does not help, because the attacker can receive the first few segments (including the ISN) at its own address, and only then redirect the stream to the victim's address. These types of attacks may also be directed at networks instead of nodes. Further variations of this threat are described elsewhere [27, 34] ๐ŸŒช๏ธ

An attacker might also attempt to disrupt a mobile node's communications by replaying a Binding Update that the node had sent earlier. If the old Binding Update was accepted, packets destined for the mobile node would be sent to its old location, as opposed to its current location.

In conclusion, there are Denial-of-Service, Man-in-the-Middle, Confidentiality, and Impersonation threats against the parties involved in sending legitimate Binding Updates, and Denial-of-Service threats against any other party ๐Ÿšจ

  • Threats associated with payload packets. Payload packets exchanged with mobile nodes are exposed to similar threats as regular IPv6 traffic. However, Mobile IPv6 introduces the Home Address destination option, a new routing header type (type 2), and uses tunneling headers in the payload packets. The protocol must protect against potential new threats involving the use of these mechanisms.

Third parties become exposed to a reflection threat via the Home Address destination option, unless appropriate security precautions are followed. The Home Address destination option could be used to direct response traffic toward a node whose IP address appears in the option. In this case, ingress filtering would not catch the forged "return address" [36, 32] ๐Ÿชž

A similar threat exists with the tunnels between the mobile node and the home agent. An attacker might forge tunnel packets between the mobile node and the home agent, making it appear that the traffic is coming from the mobile node when it is not. Note that an attacker who is able to forge tunnel packets would typically also be able to forge packets that appear to come directly from the mobile node. This is not a new threat as such. However, it may make it easier for attackers to escape detection by avoiding ingress filtering and packet tracing mechanisms. Furthermore, spoofed tunnel packets might be used to gain access to the home network ๐Ÿ 

Finally, a routing header could also be used in reflection attacks, and in attacks designed to bypass firewalls. The generality of the regular routing header would allow circumvention of IP-address based rules in firewalls. It would also allow reflection of traffic to other nodes. These threats exist with routing headers in general, even if the usage that Mobile IPv6 requires is safe ๐Ÿง

  • Threats associated with dynamic home agent and mobile prefix discovery.
  • Threats against the Mobile IPv6 security mechanisms themselves. An attacker might, for instance, lure the participants into executing expensive cryptographic operations or allocating memory for the purpose of keeping state. The victim node would have no resources left to handle other tasks ๐Ÿ˜ฉ

As a fundamental service in an IPv6 stack, Mobile IPv6 is expected to be deployed in most nodes of the IPv6 Internet. The above threats should therefore be considered as applicable to the whole Internet ๐ŸŒ

It should also be noted that some additional threats result from movements as such, even without the involvement of mobility protocols. Mobile nodes must be capable of defending themselves in the networks that they visit, as typical perimeter defenses applied in the home network no longer protect them ๐Ÿซถ

Stay safe out there, bestie ๐ŸŒˆ

15.2. Features โœจ

okay so this section is basically the security highlight reel ๐ŸŽฌ๐Ÿ’… RFC 3775 has a bunch of features built to handle the threats we just covered, and I'm obsessed with how they fit together. the main ones are:

  • Reverse Tunneling as a mandatory feature ๐Ÿ”’
  • Protection of Binding Updates sent to home agents ๐Ÿ 
  • Protection of Binding Updates sent to correspondent nodes ๐Ÿค
  • Protection against reflection attacks that use the Home Address destination option ๐Ÿชž
  • Protection of tunnels between the mobile node and the home agent ๐Ÿš‡
  • Closing routing header vulnerabilities ๐Ÿšช
  • Mitigating Denial-of-Service threats to the Mobile IPv6 security mechanisms themselves ๐Ÿ›ก๏ธ

the support for encrypted reverse tunneling (see Section 11.3.1) lets mobile nodes defeat certain kinds of traffic analysis ๐Ÿซถ๐Ÿ•ต๏ธโ€โ™€๏ธ that's giving privacy queen energy, no cap.

now, protecting Binding Updates sent to home agents and protecting the ones sent to arbitrary correspondent nodes need totally different solutions ๐Ÿ˜ญ and it makes sense once you see why. mobile nodes and home agents are naturally expected to be under the network administration of the home domain. so they can, and are supposed to, have a security association that lets them reliably authenticate the messages they exchange ๐Ÿ”โœจ see Section 5.1 for how the mechanisms work, and Section 15.3 below for how secure the result actually is.

correspondent nodes are a whole different vibe ๐ŸŒ Mobile IPv6 route optimization is expected to be used globally, between nodes in different administrative domains. building an authentication infrastructure at that scale would be a very demanding task ๐Ÿ’€ and a traditional authentication infrastructure can't be easily used to authenticate IP addresses, because IP addresses can change often ๐ŸŒช๏ธ it's also not enough to just authenticate the mobile nodes. you also need Authorization to claim the right to use an address ๐Ÿ‘‘ so an "infrastructureless" approach is necessary ๐Ÿงš the method it picks is described in Section 5.2, and Section 15.4 talks about the security level it gets and why it was designed this way.

there are also specific rules for the Home Address destination option, the routing header, and the tunneling headers in payload packets ๐Ÿ“ฆ these rules are needed to remove the vulnerabilities that come with using them without restrictions. the effects are covered in Section 15.7, Section 15.8, and Section 15.9 ๐ŸŽ€

last one: Denial-of-Service threats against the Mobile IPv6 security mechanisms themselves are mostly about the Binding Update procedures with correspondent nodes ๐Ÿ™ˆ the protocol was designed to limit how much damage those attacks can do, as described in Section 15.4.5 ๐ŸŒธ


15.3. Binding Updates to Home Agent ๐Ÿ 

signaling between the mobile node and the home agent requires message integrity ๐Ÿ” this is important because it's how the home agent knows a Binding Update is really from a legit mobile node. correct ordering and anti-replay protection are optional too ๐ŸŒˆ

IPsec ESP protects the integrity of Binding Updates and Binding Acknowledgements by securing the mobility messages between the mobile node and the home agent ๐Ÿงšโ€โ™€๏ธ

IPsec can only provide anti-replay protection if dynamic keying is used, and that might not always be the case ๐Ÿฅบ IPsec also doesn't guarantee correct ordering of packets. it only guarantees they haven't been replayed ๐Ÿ˜ค that's why the sequence numbers inside Mobile IPv6 messages are used to make sure things arrive in the right order (see Section 5.1). BUT, if the 16 bit Mobile IPv6 sequence number space gets cycled through, or the home agent reboots and loses its sequence number state, replay and reordering attacks become possible ๐Ÿ’€ dynamic keying, IPsec anti-replay protection, and the Mobile IPv6 sequence numbers can together stop those attacks โœจ it's also recommended to think about using non-volatile storage for home agents, so they don't lose their state ๐Ÿ’พ

a sliding window scheme is used for the sequence numbers ๐ŸชŸ without a key management mechanism, protection against replay and reordering attacks works as long as the attacker remembers up to a maximum of 2**15 Binding Updates.

the mechanisms above don't prove that the care-of address in the Binding Update is correct ๐Ÿ‘€ which opens the door to Denial-of-Service attacks against third parties ๐Ÿ˜ฌ however, since the mobile node and home agent share a security association, the home agent can always identify an ill-behaving mobile node ๐Ÿ•ต๏ธโ€โ™€๏ธ that lets the home agent operator shut off the mobile node's service, and maybe take further action based on the business relationship with the mobile node's owner ๐Ÿ’ผ

heads up: using a single pair of manually keyed security associations conflicts with generating a new home address [18] for the mobile node, or with adopting a new home subnet prefix โš ๏ธ that's because IPsec security associations are bound to the addresses being used. certificate-based automatic keying helps with this a bit, but a mobile node still must not be able to send Binding Updates for another mobile node's address ๐Ÿ™…โ€โ™€๏ธ usually that means putting home addresses in certificates in the Subject AltName field. and that again limits introducing new addresses without either manual or automatic procedures to set up new certificates ๐Ÿ“œ so this specification only allows new home addresses to be generated (for any reason) when a security association or certificate for the new address already exists ๐Ÿ”’ (Appendix B.4 lists better security for new addresses as one of the future developments for Mobile IPv6 ๐Ÿ”ฎ)

support for IKE is specified as optional ๐Ÿซถ and here's what you should know about manual keying:

  • as we talked about, manually keyed IPsec only gives limited protection against replay and reordering attacks ๐Ÿ˜ฉ a vulnerability shows up if the sequence number space gets cycled through, or if the home agent reboots and forgets its sequence numbers (because it stored them in volatile memory). assuming the mobile node moves continuously every 10 minutes, it takes roughly 455 days before the sequence number space gets cycled through ๐Ÿ—“๏ธ typical movement patterns rarely hit that high a frequency today ๐Ÿข
  • a mobile node and its home agent belong to the same domain. if that weren't the case, manual keying wouldn't be possible [28] ๐Ÿ™…โ€โ™€๏ธ but in Mobile IPv6, only these two parties need to know the manually configured keys ๐Ÿคซ also, Mobile IPv6 uses standard block ciphers in IPsec, so it's not vulnerable to the problems linked to stream ciphers and manual keying ๐Ÿ’…
  • the owner of the mobile node and the administrator of the home agent are expected to agree on the keys and other parameters through some off-line mechanism ๐Ÿ“ž

the use of IKEv1 with Mobile IPv6 is documented in more detail in [21] ๐Ÿ“š and here's what to keep in mind with IKEv1:

  • it's necessary to stop a mobile node from claiming another mobile node's home address ๐Ÿšซ the home agent must verify that the mobile node trying to negotiate the SA for a particular home address is authorized for that home address. so even with IKE, a policy entry needs to be configured for each home address the home agent serves ๐Ÿ—‚๏ธ

it may be possible to include home addresses in the Subject AltName field of a certificate to avoid this. however, implementations aren't guaranteed to support using a particular IP address (care-of address) while another address (home address) appears in the certificate ๐Ÿคทโ€โ™€๏ธ and in any case, even this approach would need user-specific tasks at the certificate authority ๐Ÿ˜ตโ€๐Ÿ’ซ

  • if preshared secret authentication is used, IKEv1 main mode can't be used ๐Ÿ™ƒ aggressive mode or group preshared secrets need to be used instead, and they come with their own security implications โš ๏ธ

note that this is a general IKEv1 issue tied to the ability to use different IP addresses, and it's not specifically about Mobile IPv6 ๐ŸŒ for more info, see Section 4.4 in [21].

  • because of the problems outlined in Section 11.3.2, IKE phase 1 between the mobile node and its home agent is set up using the mobile node's current care-of address ๐Ÿ“ so when the mobile node moves somewhere new, it may have to re-establish phase 1 ๐Ÿ” a Key Management Mobility Capability (K) flag exists for implementations that can update the IKE phase 1 endpoints without re-establishing phase 1, but support for this behavior is optional ๐Ÿฆ‹
  • when certificates are used, IKE fragmentation can happen, as discussed in Section 7 in [21] ๐Ÿงฉ
  • even if per-mobile node configuration is required with IKE, the big perk is that IKE automates the negotiation of cryptographic parameters, including the SPIs, cryptographic algorithms, and so on โœจ so less configuration info is needed ๐Ÿ™Œ
  • the movement frequency in some link layers or deployment scenarios might be high enough to make replay and reordering attacks possible if only manual keying is used. IKE SHOULD be used in those cases ๐Ÿšจ risky setups include continuous movement through small cells, or uncontrolled switching between available network attachment points ๐Ÿ“ถ
  • similarly, in some deployments the number of mobile nodes can be very large ๐Ÿ˜ณ in those cases it may be necessary to use automatic mechanisms to cut down the management effort for administering cryptographic parameters, even though some per-mobile node configuration is always needed. IKE SHOULD also be used in those cases too ๐Ÿ’–
  • other automatic key management mechanisms exist beyond IKEv1, but this document doesn't address the issues related to them ๐Ÿค we do note, though, that most of the discussion above also applies to IKEv2 [30], at least as it's currently specified ๐Ÿง

15.4. Binding Updates to Correspondent Nodes ๐ŸŒ

the whole reason for designing the return routability procedure was to give Mobile IPv6 enough support without creating significant new security problems ๐ŸŽฏ the goal was not to protect against attacks that were already possible before Mobile IPv6 came along ๐Ÿ™…โ€โ™€๏ธ

the next sections describe the security properties of the method we use. they look at it from two angles: on-path attackers who can see the cryptographic values that were sent in the clear (Section 15.4.2 and Section 15.4.3), and other attackers (Section 15.4.6) ๐Ÿ•ต๏ธโ€โ™€๏ธ๐Ÿ” bestie, this part gets spicy ๐ŸŒถ๏ธ

15.4.1. Overview ๐Ÿฆ‹

okay so the chosen infrastructureless method checks that the mobile node is "live" (aka it actually responds to probes) at BOTH its home and care-of addresses. Section 5.2 breaks down the return routability procedure in detail. It runs on these principles:

  • A message exchange checks that the mobile node is reachable at its addresses, i.e., it's at least able to transmit and receive traffic at both the home and care-of addresses. ๐Ÿ’…
  • The eventual Binding Update gets cryptographically bound to the tokens passed around in the exchanged messages. ๐Ÿ”
  • Symmetric exchanges are used so this protocol can't be abused for reflection attacks. In a symmetric exchange, the responses always go back to the same address the request was sent from. ๐Ÿชž
  • The correspondent node stays stateless until it gets a fully authorized Binding Update. ๐Ÿงš
  • Some extra protection comes from encrypting the tunnels between the mobile node and home agent with IPsec ESP. The tunnel also carries the nonce exchanges, so attackers have a much harder time seeing those nonces. For example, this prevents attacks from being launched from the mobile node's current foreign link, even when no link-layer confidentiality is available.

The resulting level of security is in theory the same even without this extra protection: the return routability tokens are still exposed only to one path within the whole Internet. However, mobile nodes are often found on an insecure link, like a public access Wireless LAN. So in lots of cases, this addition makes a real difference. โœจ

For further info about the design rationale of the return routability procedure, see [27, 34, 33, 32]. The mechanisms have been adopted from these documents. ๐Ÿ“š

15.4.2. Achieved Security Properties ๐Ÿ›ก๏ธ

The return routability procedure protects Binding Updates against all attackers who are unable to monitor the path between the home agent and the correspondent node. It does not defend against attackers who can monitor this path. Those attackers can mount an active attack against the mobile node when it's at its home location anyway. That possibility isn't an impediment to deploying Mobile IPv6, because these attacks are possible regardless of whether or not Mobile IPv6 is in use. ๐Ÿ™ˆ

This procedure also protects against Denial-of-Service attacks where the attacker pretends to be mobile but uses the victim's address as the care-of address. That would make the correspondent node send the victim some unexpected traffic. The procedure defends against these attacks by requiring at least the passive presence of the attacker at the care-of address or on the path from the correspondent to the care-of address. Normally, that will be the mobile node. ๐ŸŽ€

15.4.3. Comparison to Regular IPv6 Communications ๐Ÿ”

This section compares the return routability method's protection to the security of regular IPv6 communications. We'll divide vulnerabilities into three classes: (1) those related to attackers on the local network of the mobile node, home agent, or the correspondent node, (2) those related to attackers on the path between the home network and the correspondent node, and (3) off-path attackers, i.e., the rest of the Internet. ๐ŸŒ

So, the vulnerabilities of regular IPv6 communications. The on-link ones include Denial-of-Service, Masquerading, Man-in-the-Middle, Eavesdropping, and other attacks. These can be launched by spoofing Router Discovery, Neighbor Discovery and other IPv6 mechanisms. Some of them can be prevented with cryptographic protection in the packets. ๐Ÿ”“

On-path attackers are a similar situation. Without cryptographic protection, the traffic is completely vulnerable. ๐Ÿ˜ฌ

Assuming attackers haven't penetrated the security of the Internet routing protocols, attacks are much harder to launch from off-path locations. The ones that can be launched from there are mainly Denial-of-Service attacks, such as flooding and/or reflection attacks. An off-path attacker can't become a Man-in-the-Middle. ๐Ÿ™…โ€โ™€๏ธ

Next up: vulnerabilities when IPv6 is used together with Mobile IPv6 and the return routability procedure. On the local link, they're the same as in IPv6, but Masquerade and Man-in-the-Middle attacks can now also be launched against future communications, not just current ones. If a Binding Update was sent while the attacker was present on the link, its effects stick around for the lifetime of the binding. That happens even if the attacker moves away from the link. An attacker using only plain IPv6 generally has to stay on the link to keep the attack going. Also, to launch these new attacks, the victim's IP address has to be known. So it's mainly feasible with well-known interface IDs, like ones already showing up in traffic on the link or registered in the DNS. ๐Ÿ‘€

On-path attackers can exploit similar vulnerabilities as in regular IPv6. There are some minor differences, though. Masquerade, Man-in-the-Middle, and Denial-of-Service attacks can be launched with just the interception of a few packets, whereas in regular IPv6 it's necessary to intercept every packet. The effect of the attacks is the same regardless of the method, though. Either way, the hardest part for an attacker is getting on the right path. ๐Ÿ›ค๏ธ

The vulnerabilities for off-path attackers are the same as in regular IPv6. Nodes that aren't on the path between the home agent and the correspondent node won't be able to receive the home address probe messages. ๐Ÿšซ

So the main takeaways from this comparison:

  • Return routability prevents any off-path attacks beyond those already possible in regular IPv6. This is the most important result, since it stops attackers on the Internet from exploiting any vulnerabilities. ๐Ÿ‘‘
  • Vulnerabilities to attackers on the home agent link, the correspondent node link, and the path between them are roughly the same as in regular IPv6.
  • One difference: in basic IPv6, an on-path attacker must be constantly present on the link or the path, whereas with Mobile IPv6, an attacker can leave a binding behind after moving away. ๐Ÿ˜ค

For this reason, this specification limits the creation of bindings to at most MAX_TOKEN_LIFETIME seconds after the last routability check has been performed, and limits the duration of a binding to at most MAX_RR_BINDING_LIFETIME seconds. With these limitations, attackers can't take any practical advantage of this vulnerability. ๐Ÿ”’

  • There are some other minor differences, such as an effect on the Denial-of-Service vulnerabilities. These can be considered insignificant. ๐ŸŒธ
  • The path between the home agent and a correspondent node is typically easiest to attack on the links at either end, especially if those links are publicly accessible wireless LANs.

Attacks against the routers or switches on the path are typically harder to pull off. Layer 2 security of the links then plays a major role in the resulting overall network security. Similarly, the security of IPv6 Neighbor and Router Discovery on these links has a large impact. If these were secured using some new technology in the future, that could change where the easiest point of attack is. ๐Ÿ”„

For a more in-depth discussion of these issues, see [32]. ๐Ÿง 

15.4.4. Replay Attacks ๐Ÿ”

The return routability procedure also protects the participants against replayed Binding Updates. The attacker is unable to replay the same message because of the sequence number, which is part of the Binding Update. They also can't modify the Binding Update, since the MAC verification would fail after such a modification. ๐Ÿ™…โ€โ™€๏ธ

Care must be taken when removing bindings at the correspondent node, though. If a binding is removed while the nonce used in its creation is still valid, an attacker could replay the old Binding Update. The rules outlined in Section 5.2.8 make sure this can't happen. ๐Ÿซถ

15.4.5. Denial-of-Service Attacks ๐Ÿšจ

The return routability procedure has protection against resource exhaustion Denial-of-Service attacks. Correspondent nodes don't retain any state about individual mobile nodes until an authentic Binding Update arrives. This works through keygen tokens built from the nonces and node keys, which aren't specific to individual mobile nodes. The correspondent node can reconstruct the keygen tokens based on the home and care-of address information that arrives with the Binding Update. So correspondent nodes are safe against memory exhaustion attacks, except where on-path attackers are concerned. And since it uses symmetric cryptography, correspondent nodes are relatively safe against CPU resource exhaustion attacks too. ๐Ÿ’ช

Still, as [27] describes, there are situations where it's impossible for the mobile and correspondent nodes to determine whether they actually need a binding or whether they've just been fooled into believing they do by an attacker. So it's necessary to consider situations where such attacks are being made. ๐Ÿ•ต๏ธโ€โ™€๏ธ

Route optimization is a very important optimization, but it's still only an optimization. A mobile node can communicate with a correspondent node even if the correspondent refuses to accept any Binding Updates. Performance will suffer, though, because packets from the correspondent node to the mobile node get routed via the mobile's home agent instead of a more direct route. ๐Ÿข

A correspondent node can protect itself against some of these resource exhaustion attacks like this. If it's flooded with a large number of Binding Updates that fail the cryptographic integrity checks, it can stop processing Binding Updates. If a correspondent node finds it's spending more resources checking bogus Binding Updates than it's likely to save by accepting genuine ones, then it may silently discard some or all Binding Updates without performing any cryptographic operations. ๐Ÿ›‘

Layers above IP can usually provide additional information to help decide whether there's a need to establish a binding with a specific peer. For example, TCP knows if the node has a queue of data it's trying to send to a peer. An implementation of this specification isn't required to make use of information from higher protocol layers, but some implementations are likely to manage resources more effectively by using that information. ๐Ÿงšโ€โ™€๏ธ

We also require that all implementations be capable of administratively disabling route optimization. ๐ŸŽ€

15.4.6. Key Lengths ๐Ÿ”‘

Okay so attackers can try to break the return routability procedure in a bunch of ways ๐Ÿ’€. Section 15.4.2 covers the situation where the attacker can see the cryptographic values sent in the clear, and Section 15.4.3 explains what that means for IPv6 communications. This part is about whether attackers can guess the right values without seeing them ๐Ÿ‘€.

While the return routability procedure is running, 64 bit cookies protect against spoofed responses. This is believed to be sufficient, since blindly spoofing a response would mean sending a very large number of messages before success becomes probable โœจ.

The tokens used in the return routability procedure give 128 bits of information together. That info is used internally as input to a hash function, which produces a 160 bit quantity good for making the keyed hash in the Binding Update using the HMAC_SHA1 algorithm. The final keyed hash length is 96 bits. The limiting factors here are the input token lengths and the final keyed hash length. The internal hash function application does not reduce the entropy ๐Ÿง .

The 96 bit final keyed hash is of typical size and is believed to be secure ๐Ÿ”. The 128 bit input from the tokens is split into two pieces: the home keygen token and the care-of keygen token. An attacker can try to guess the correct cookie value, but again that would take a huge number of messages (on average 2**63 messages for one, or 2**127 for two) ๐Ÿ˜ณ. Plus, the cookies are only valid for a short time, so the attack would need to keep a high constant message rate to have any lasting effect. That does not appear practical ๐Ÿ™…โ€โ™€๏ธ.

When the mobile node is returning home, it's allowed to use just the home keygen token, which is 64 bits. That's less than 128 bits, but attacking it blindly would still need a large number of messages โœจ. If the attacker is on the path and able to see the Binding Update, they could conceivably break the keyed hash with brute force. However, in that case the attacker has to be on the path, and that seems to offer easier ways to do denial-of-service than preventing route optimization ๐Ÿ™„.


15.5. Dynamic Home Agent Address Discovery ๐Ÿ 

The dynamic home agent address discovery function could be used to learn the addresses of home agents in the home network ๐Ÿ—บ๏ธ.

The ability to learn addresses of nodes may be useful to attackers, because brute-force scanning of the address space is not practical with IPv6 ๐Ÿ˜ค. So they could benefit from any means that make mapping the networks easier. For example, if a security threat targeted at routers or even home agents is discovered, having a simple ICMP mechanism to easily find out possible targets may prove to be an additional (though minor) security risk ๐ŸŽฏ.

Apart from discovering the address(es) of home agents, attackers won't be able to learn much from this info, and mobile nodes cannot be tricked into using wrong home agents, since all other communication with the home agents is secure ๐Ÿ”’.

15.6. Mobile Prefix Discovery ๐Ÿ“ก

The mobile prefix discovery function may leak interesting info about network topology and prefix lifetimes to eavesdroppers ๐Ÿ‘€. For this reason, requests for this info has to be authenticated. Responses and unsolicited prefix information need to be authenticated, so mobile nodes can't be tricked into believing false info about the prefixes and possibly preventing communications with the existing addresses ๐Ÿšซ. Optionally, encryption may be applied to prevent leakage of the prefix information ๐Ÿซถ.

15.7. Tunneling via the Home Agent ๐Ÿš‡

Tunnels between the mobile node and the home agent can be protected by ensuring proper use of source addresses, plus optional cryptographic protection ๐Ÿ”. These procedures are discussed in Section 5.5.

Binding Updates to the home agents are secure ๐Ÿ’…. When receiving tunneled traffic, the home agent verifies that the outer IP address corresponds to the current location of the mobile node. This acts as a weak form of protection against spoofing packets that appear to come from the mobile node ๐Ÿ•ต๏ธ. This is particularly useful if no end-to-end security is being applied between the mobile and correspondent nodes. The outer IP address check prevents attacks where the attacker is controlled by ingress filtering. It also prevents attacks when the attacker does not know the current care-of address of the mobile node. Attackers who know the care-of address and are not controlled by ingress filtering could still send traffic through the home agent. This includes attackers on the same local link as the mobile node is currently on. But such attackers could send packets that appear to come from the mobile node without attacking the tunnel: the attacker could simply send packets with the source address set to the mobile node's home address ๐Ÿ˜…. However, this attack does not work if the final destination of the packet is in the home network, and some form of perimeter defense is being applied for packets sent to those destinations. In such cases it is recommended that either end-to-end security or additional tunnel protection be applied, as is usual in remote access situations ๐Ÿ›ก๏ธ.

Home agents and mobile nodes may use IPsec ESP to protect payload packets tunneled between themselves. This is useful for protecting communications against attackers on the path of the tunnel ๐Ÿงฑ.

When site local home addresses are used, reverse tunneling can be used to send site local traffic from another location.

Administrators should be aware of this when allowing such home addresses. In particular, the outer IP address check described above is not sufficient against all attackers. The use of encrypted tunnels is particularly useful for these kinds of home addresses ๐Ÿšจ.

15.8. Home Address Option ๐Ÿก

When the mobile node sends packets directly to the correspondent node, the Source Address field of the packet's IPv6 header is the care-of address. Therefore, ingress filtering [26] works in the usual manner even for mobile nodes, since the Source Address is topologically correct ๐Ÿ—บ๏ธ. The Home Address option is used to inform the correspondent node of the mobile node's home address.

However, the care-of address in the Source Address field does not survive in replies sent by the correspondent node unless it has a binding for this mobile node. Also, not all attacker tracing mechanisms work when packets are being reflected through correspondent nodes using the Home Address option. For these reasons, this specification restricts the use of the Home Address option. It may only be used when a binding has already been established with the participation of the node at the home address, as described in Section 5.5 and Section 6.3. This prevents reflection attacks through the use of the Home Address option. It also ensures that the correspondent nodes reply to the same address that the mobile node sends traffic from ๐Ÿชž.

No special authentication of the Home Address option is required beyond the above, but note that if the IPv6 header of a packet is covered by IPsec Authentication Header, then that authentication covers the Home Address option as well. Thus, even when authentication is used in the IPv6 header, the security of the Source Address field in the IPv6 header is not compromised by the presence of a Home Address option. Without authentication of the packet, any field in the IPv6 header, including the Source Address field or any other part of the packet and the Home Address option can be forged or modified in transit. In this case, the contents of the Home Address option is no more suspect than any other part of the packet ๐Ÿ“ฆ.

15.9. Type 2 Routing Header ๐Ÿงญ

The definition of the type 2 routing header is described in Section 6.4. This definition and the associated processing rules have been chosen so that the header cannot be used for what is traditionally viewed as source routing. In particular, the Home Address in the routing header will always have to be assigned to the home address of the receiving node; otherwise the packet will be dropped ๐Ÿšซ.

Generally, source routing has a number of security concerns. These include the automatic reversal of unauthenticated source routes (which is an issue for IPv4, but not for IPv6). Another concern is the ability to use source routing to "jump" between nodes inside, as well as outside a firewall. These security concerns are not issues in Mobile IPv6, due to the rules mentioned above ๐Ÿงฑ.

In essence the semantics of the type 2 routing header is the same as a special form of IP-in-IP tunneling where the inner and outer source addresses are the same ๐Ÿช†.

This implies that a device which implements the filtering of packets should be able to distinguish between a type 2 routing header and other routing headers, as required in Section 8.3. This is necessary in order to allow Mobile IPv6 traffic while still having the option of filtering out other uses of routing headers ๐ŸŽ€.

16. Contributors ๐ŸŒŸ

Tuomas Aura, Mike Roe, Greg O'Shea, Pekka Nikander, Erik Nordmark, and Michael Thomas worked on the return routability protocols that eventually led to the procedures used in this protocol. The procedures described in [34] were adopted in the protocol ๐Ÿ™Œ.

Significant contributions were made by members of the Mobile IPv6 Security Design Team, including (in alphabetical order) Gabriel Montenegro, Erik Nordmark and Pekka Nikander ๐Ÿ’œ.

17. Acknowledgements ๐Ÿ’–

We would like to thank the members of the Mobile IP and IPng Working Groups for their comments and suggestions on this work. We would particularly like to thank (in alphabetical order) Fred Baker, Josh Broch, Samita Chakrabarti, Robert Chalmers, Noel Chiappa, Greg Daley, Vijay Devarapalli, Rich Draves, Francis Dupont, Thomas Eklund, Jun-Ichiro Itojun Hagino, Brian Haley, Marc Hasson, John Ioannidis, James Kempf, Rajeev Koodli, Krishna Kumar, T.J. Kniveton, Joe Lau, Jiwoong Lee, Aime Le Rouzic, Vesa-Matti Mantyla, Kevin Miles, Glenn Morrow, Thomas Narten, Karen Nielsen, Simon Nybroe, David Oran, Brett Pentland, Lars Henrik Petander, Basavaraj Patil, Mohan Parthasarathy, Alexandru Petrescu, Mattias Petterson, Ken Powell, Phil Roberts, Ed Remmell, Patrice Romand, Luis A. Sanchez, Jeff Schiller, Pekka Savola, Arvind Sevalkar, Keiichi Shima, Tom Soderlund, Hesham Soliman, Jim Solomon, Tapio Suihko, Dave Thaler, Benny Van Houdt, Jon-Olov Vatn, Carl E. Williams, Vladislav Yasevich, Alper Yegin, and Xinhua Zhao, for their detailed reviews of earlier versions of this document. Their suggestions have helped to improve both the design and presentation of the protocol ๐Ÿงš.

We would also like to thank the participants of the Mobile IPv6 testing event (1999), implementors who participated in Mobile IPv6 interoperability testing at Connectathons (2000, 2001, 2002, and 2003), and the participants at the ETSI interoperability testing (2000, 2002). Finally, we would like to thank the TAHI project who has provided test suites for Mobile IPv6 ๐ŸŽ‰.

18. References ๐Ÿ“š

18.1. Normative References ๐Ÿ“šโœจ

Okay bestie, here are the must-read references, the ones the spec basically can't survive without ๐Ÿ’…

[1] Eastlake 3rd., D., Crocker, S. and J. Schiller, "Randomness Recommendations for Security", RFC 1750, December 1994.

[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[3] Hinden, R. and S. Deering, "Internet Protocol Version 6 (IPv6) Addressing Architecture", RFC 3513, April 2003.

[4] Kent, S. and R. Atkinson, "Security Architecture for the Internet Protocol", RFC 2401, November 1998.

[5] Kent, S. and R. Atkinson, "IP Authentication Header", RFC 2402, November 1998.

[6] Kent, S. and R. Atkinson, "IP Encapsulating Security Payload (ESP)", RFC 2406, November 1998.

[7] Piper, D., "The Internet IP Security Domain of Interpretation for ISAKMP", RFC 2407, November 1998.

[8] Maughan, D., Schertler, M., Schneider, M. and J. Turner, "Internet Security Association and Key Management Protocol (ISAKMP)", RFC 2408, November 1998.

[9] Harkins, D. and D. Carrel, "The Internet Key Exchange (IKE)", RFC 2409, November 1998.

[10] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.

[11] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998.

[12] Narten, T., Nordmark, E. and W. Simpson, "Neighbor Discovery for IP Version 6 (IPv6)", RFC 2461, December 1998.

[13] Thomson, S. and T. Narten, "IPv6 Stateless Address Autoconfiguration", RFC 2462, December 1998.

[14] Conta, A. and S. Deering, "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification", RFC 2463, December 1998.

[15] Conta, A. and S. Deering, "Generic Packet Tunneling in IPv6 Specification", RFC 2473, December 1998.

[16] Johnson, D. and S. Deering, "Reserved IPv6 Subnet Anycast Addresses", RFC 2526, March 1999.

[17] Deering, S., Fenner, W. and B. Haberman, "Multicast Listener Discovery (MLD) for IPv6", RFC 2710, October 1999.

[18] Narten, T. and R. Draves, "Privacy Extensions for Stateless Address Autoconfiguration in IPv6", RFC 3041, January 2001.

[19] Reynolds, J., Ed., "Assigned Numbers: RFC 1700 is Replaced by an On-line Database", RFC 3232, January 2002.

[20] National Institute of Standards and Technology, "Secure Hash Standard", FIPS PUB 180-1, April 1995, <http://www.itl.nist.gov/fipspubs/fip180-1.htm>.

[21] Arkko, J., Devarapalli, V. and F. Dupont, "Using IPsec to Protect Mobile IPv6 Signaling Between Mobile Nodes and Home Agents", RFC 3776, June 2004.

18.2. Informative References ๐ŸŒธ

Now the extra-credit reading, for when you're feeling extra curious ๐Ÿค“

[22] Perkins, C., Ed., "IP Mobility Support for IPv4", RFC 3344, August 2002.

[23] Perkins, C., "IP Encapsulation within IP", RFC 2003, October 1996.

[24] Perkins, C., "Minimal Encapsulation within IP", RFC 2004, October 1996.

[25] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.

[26] Ferguson, P. and D. Senie, "Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing", BCP 38, RFC 2827, May 2000.

[27] Aura, T. and J. Arkko, "MIPv6 BU Attacks and Defenses", Work in Progress, March 2002.

[28] Bellovin, S., "Guidelines for Mandating Automated Key Management", Work in Progress, August 2003.

[29] Droms, R., Ed., Bound, J., Volz, B., Lemon, T., Perkins, C. and M. Carney, "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", RFC 3315, July 2003.

[30] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", Work in Progress, April 2003.

[31] Draves, R., "Default Address Selection for Internet Protocol version 6 (IPv6)", RFC 3484, February 2003.

[32] Nikander, P., Aura, T., Arkko, J., Montenegro, G. and E. Nordmark, "Mobile IP version 6 Route Optimization Security Design Background", Work in Progress, April 2003.

[33] Nordmark, E., "Securing MIPv6 BUs using return routability (BU3WAY)", Work in Progress, November 2001.

[34] Roe, M., Aura, T., O'Shea, G. and J. Arkko, "Authentication of Mobile IPv6 Binding Updates and Acknowledgments", Work in Progress, March 2002.

[35] Savola, P., "Use of /127 Prefix Length Between Routers Considered Harmful", RFC 3627, September 2003.

[36] Savola, P., "Security of IPv6 Routing Header and Home Address Options", Work in Progress, December 2002.

[37] Vida, R. and L. Costa, Eds., "Multicast Listener Discovery Version 2 (MLDv2) for IPv6", RFC 3810, June 2004.


Appendix A. Future Extensions ๐Ÿงš

A.1. Piggybacking ๐ŸŽ€

Okay so this document doesn't say how to piggyback payload packets on the binding related messages, sorry not sorry ๐Ÿ™ˆ But it's envisioned that a separate doc can cover this once stuff like the interaction between piggybacking and IPsec is totally sorted out (see also Appendix A.3). Also the return routability messages can indicate support for piggybacking with a brand new mobility option. Future-you will thank us ๐Ÿ’–

A.2. Triangular Routing ๐Ÿฆ‹

Here's the tea: there are concerns about opening reflection attacks with the Home Address destination option, so this spec requires that the option gets verified against the Binding Cache. Translation: there has to be a Binding Cache entry for the Home Address and Care-of Address, no exceptions ๐Ÿ”’

Future extensions might let you use unverified Home Address destination options, as long as they don't bring in any security issues. Watch this space ๐Ÿ‘€

A.3. New Authorization Methods ๐Ÿ”

The return routability procedure is already giving a good level of security, but there are methods out there with even higher levels of security ๐Ÿ˜ค Also, as discussed in Section 15.4, future enhancements of IPv6 security might mean we need to level up the security of the return routability procedure too.

Using IPsec as the sole method for authorizing Binding Updates to correspondent nodes is also possible. Protecting the Mobility Header for this purpose is easy, though you've gotta make sure the IPsec SA was created with appropriate authorization to use the home address referenced in the Binding Update. For example, a certificate used by IKE to create the security association might contain the home address. A future specification may spell out how this is done ๐Ÿ’…

A.4. Dynamically Generated Home Addresses โœจ

A future version of this spec may include functionality that lets you generate new home addresses without needing pre-arranged security associations or certificates, even for the new addresses. Iconic behavior, honestly ๐Ÿ‘‘

A.5. Remote Home Address Configuration ๐Ÿก

The method for initializing a mobile node's home address upon power-up, or after an extended period of being disconnected from the network, is beyond the scope of this spec ๐Ÿ™ƒ Whatever procedure gets used should leave the mobile node with the same stateless or stateful (e.g., DHCPv6) home address autoconfiguration information it would have if it were attached to the home network.

Also, the home network could be renumbered while the mobile node is disconnected, so a robust mobile node would not rely solely on storing these addresses locally. Main character energy: not relying on your memory alone ๐Ÿง 

Such a mobile node could be initialized by using the following procedure:

  1. Generate a care-of address.
  2. Query DNS for an anycast address associated with the FQDN of the home agent(s).
  3. Perform home agent address discovery, and select a home agent.
  4. Configure one home address based on the selected home agent's subnet prefix and the interface identifier of the mobile node.
  5. Create security associations and security policy database entries for protecting the traffic between the selected home address and home agent.
  6. Perform a home registration on the selected home agent.
  7. Perform mobile prefix discovery.
  8. Make a decision if further home addresses need to be configured.

This procedure is restricted to those situations where the home prefix is 64 bits and the mobile node knows its own interface identifier, which is also 64 bits. ๐ŸŒˆ

A.6. Neighbor Discovery Extensions ๐ŸŒธ

Future specs may make Neighbor Discovery tasks more efficient, which could be super helpful for fast movements ๐Ÿƒโ€โ™€๏ธ One thing being looked at right now is the delay caused by the Duplicate Address Detection mechanism. Currently, Duplicate Address Detection needs to be performed for every new care-of address as the mobile node moves, and for the mobile node's link-local address on every new link. The need for, and the trade-offs of, re-performing Duplicate Address Detection for the link-local address every time the mobile node moves on to new links will need to be examined. Improvements here are generally applicable though, and they progress independently from the Mobile IPv6 specification.

Other future functional improvements may also matter for Mobile IPv6 and other applications. For instance, mechanisms that would allow recovery from a Duplicate Address Detection collision would be useful for link-local, care-of, and home addresses ๐Ÿซถ


Authors' Addresses ๐Ÿ–Š๏ธ

David B. Johnson
Rice University
Dept. of Computer Science, MS 132
6100 Main Street
Houston  TX 77005-1892
USA

EMail: dbj@cs.rice.edu
Charles E. Perkins
Nokia Research Center
313 Fairchild Drive
Mountain View  CA 94043
USA

EMail: charliep@iprg.nokia.com
Jari Arkko
Ericsson
02420  Jorvas
Finland

EMail: jari.arkko@ericsson.com

Copyright (C) The Internet Society (2004). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


Intellectual Property ๐ŸŽ€

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document, or the extent to which any license under such rights might or might not be available. Nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

Copies of IPR disclosures made to the IETF Secretariat, and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification, can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. ๐Ÿ’Œ

Acknowledgement ๐Ÿ’–

okay so this is the tiny thank-you bit at the end ๐Ÿฅน the RFC Editor function (the crew that keeps these documents organized and published) is funded right now by the Internet Society ๐Ÿซถ so like, shoutout to them for keeping the lights on โœจ

๐Ÿ“ฆ where this page comes from