Dynamics
Message Formats and Contents $Revision: 1.5 $ State approved
Date 03-Dec-1998 Author Björn Andersson
Review date 10-Dec-1998 Reviewed by Jouni Malinen
Approval date 10-Dec-1998 Approved by Jouni Malinen
$Id: msg_frmts.html,v 1.5 1998/12/09 22:56:59 jkmaline Exp $

This document describes the exact format and contents of the ICMP Agent Advertisement Message, ICMP Agent Solicitation Message, Registration Request and Registration Reply messages.

The corresponding C-structures are defined in the file message.h.

Table of contents

  1. ICMP Agent Advertisement Message
    1. Mobility Agent Advertisement Extension
  2. ICMP Agent Solicitation Message
  3. Registration Request
    1. Registration Request Extension
    2. Mobile-Home Authentication
    3. Mobile-Foreign Authentication Extension
    4. Foreign Agent Public Key
  4. Registration Reply
    1. Registration Reply
    2. Mobile-Home Authentication
    3. Home-Mobile Key Reply
  5. References

ICMP Agent Advertisement Message

The ICMP Advertisement Message is sent by home and foreign agents to advertise their presence to mobile nodes. The message is constructed from the the ICMP Router Advertisement Message [RFC1256, sec 3]. with Mobility Agent Advertisement Extension [RFC2002, sec 2.1.1].

 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
+---------------------------------------------------------------+
.                     IP Header...                              .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type = 9    |   Code = 0    |           Checksum            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Num Addr = 1  |Addr Entry Size|           Lifetime            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Router Address                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Preference Level                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type = 16   | Length =  12  |        Sequence Number        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Registration Lifetime      |R|B|H|F|M|G|V|D|T|  reserved   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Care-of Address (Highest Foreign Agent)             | 
+---------------------------------------------------------------+

IP Fields

Source Address
An IP address belonging to the interface from which this message is sent.
Destination Address
The configured AdvertisementAddress or the IP address of a neighboring host.
Time-to-Live
1 if the Destination Address is an IP multicast address; at least 1 otherwise.

ICMP Fields

Type
9
Code
0
Checksum
The 16-bit one's complement of the one's complement sum of the ICMP message, starting with the ICMP Type. For computing the checksum, the Checksum field is set to 0.
Num Addrs
The number of router addresses advertised in this message. This implementation will always advertise just one address.
Addr Entry Size
The number of 32-bit words of information per each router address (2, in the version of the protocol described here).
Lifetime
The maximum number of seconds that the router addresses may be considered valid.
Router Address
The IP address of the sending router on the interface from which this message is sent.
Preference Level
The preferability of the Router Address. This implementation will always set it to 0.

Extensions

Mobility Agent Advertisement Extension

(see [RFC2002, sec 2.1.1])

Type
16
Length
12
Sequence Number
The count of Agent Advertisement messages sent since the agent was initialized (Section 2.3.2).
Registration Lifetime
The longest lifetime (measured in seconds) that this agent is willing to accept in any Registration Request. A value of 0xffff indicates infinity. This field has no relation to the "Lifetime" field within the ICMP Router Advertisement portion of the Agent Advertisement.
R
Registration required, always 1.
B
Busy. The foreign agent will not accept registrations from additional mobile nodes.
H
Home agent. This agent offers service as a home agent on the link on which this Agent Advertisement message is sent.
F
Foreign agent. This agent offers service as a foreign agent on the link on which this Agent Advertisement message is sent.
M
Minimal encapsulation; not supported. Always 0;
G
GRE encapsulation; not supported. Always 0.
V
Van Jacobson header compression; not supported. Always 0
D
Bi-directional tunneling supported in this network
T
Triangle routing supported in this network
reserved
Sent as zero; ignored on reception.
Care-of Address
The address of the foreign agent highest in the hierarchy.

ICMP Agent Solicitation Message

The ICMP Agent Solicitation Message is sent by mobile nodes when they need the agent information on local foreign or home agents. The message is the same as an ICMP Router Solicitation Message [RFC1256, sec. 3] but with the IP TTL always set to 1.
 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
+---------------------------------------------------------------+
.                       IP Header...                            .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Type = 10    |   Code = 0    |           Checksum            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Reserved  (0)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

IP Fields

Source Address
An IP address belonging to the interface from which this message is sent, or 0.
Destination Address
Broadcast address.
Time-to-Live
1

Registration Request

The Mobile Node sends a Registration Request when it wants to create or update a hierarchical tunnel. The message registers the Mobile Node with all the Mobility Agents between itself and up to and including the Home Agent. Each Mobility Agent receiving the request relays it to the next higher level care-of address in the hierarchy.

The message can have three extensions. One for authentication between the mobile node and the home agent, one for authentication between the mobile and foreign agents, and a third for foreign agents to send their public key.

 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
+---------------------------------------------------------------+
.                      IP + UDP Headers                         .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type = 1  |S|B|D|M|G|V|F|r|          Lifetime             |  Registration
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Request
|                         MN Home Address                       |   
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   
|                         MN Home Agent                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Care-of Address (Highest Foreign Agent)              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                         Identification                        +
|                          (Timestamp)                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type = 32  |  Length = 16  |         SPI  ....             |  Mobile-Home
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Authentication
|      ... SPI                  |       Authenticator ...       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     ... Authenticator ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type = 33  |  Length = 16  |         SPI  ....             |  Mobile-Foreign
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Authentication
|      ... SPI                  |       Authenticator ...       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     ... Authenticator ...                      
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type = 115 |            Length             |     SPI ...   |  Foreign Agent
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Public Key
|             ... SPI                           |FA Public Key ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                ...  Foreign Agent Public Key ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

IP fields

Source Address
Typically the interface address from which the message is sent.
Destination Address
Typically that of the foreign agent or the home agent.

UDP fields

Source Port
variable
Destination Port
434

Extensions

Registration Request

Type
1
S
Simultaneous bindings; will not be implemented. Set to 0.
B
Broadcast datagrams; will not be implemented. Set to 0.
D
Decapsulation by mobile node. Always set to 1.
M
Minimal encapsulation; will not be implemented. Set to 0.
G
GRE encapsulation; will not be implemented. Set to 0.
V
VanJacobson header compression; will not be implemented. Set to 0.
F
Full tunnel registration. Setting this bit to 1, forces the foreign agents to relay the message towards the home agent even if they have a prior binding with the mobile node.
r
Reserved bit; sent as zero
Lifetime
The number of seconds remaining before the registration is considered expired. A value of zero indicates a request for deregistration. A value of 0xffff indicates infinity.
MN Home Address
The IP address of the mobile node.
MN Home Agent
The IP address of the mobile node's home agent.
Care-of Address
The IP address of the highest foreign agent.
Identification
A 64-bit timestamp, constructed by the mobile node, used for matching Registration Requests with Registration Replies, and for protecting against replay attacks of registration messages. See Sections 5.4 and 5.6.

Mobile-Home Authentication

This extension is always sent by the mobile node and relayed intact by the foreign agents. The message is formatted as in [RFC2002, sec. 3.5.2])

Type
32
Length
4 plus the number of bytes in the Authenticator.
SPI
Security Parameter Index.
Authenticator
Message authenticator code. This implementation uses a MAC based on MD5.

Mobile-Foreign Authentication Extension

The purpose of this message is the authenticate the mobile node in a tunnel update. The mobile node adds the extension if it has a session key. The message is defined as in [RFC2002, sec. 3.5.3]

Type
33
Length
4 plus the number of bytes in the Authenticator.
SPI
Security Parameter Index.
Authenticator
Message authenticator code. This implementation uses a MAC based on MD5.

Foreign Agent Public Key

This extension is appended by foreign agents to pass their public key to the next higher agent. The message is formatted as defined in [REGKEY, sec. 4.3].

Type
115
Length
4 plus the length (typically larger than 255) of the foreign agent's public key
SPI
Security Parameters Index (4 bytes). An opaque identifier. The SPI is provided for the home agent to transcribe into the eventual Foreign Agent Public Key Reply extension to the Registration Reply message.
Foreign Agent's Public Key

Registration Reply

The message is sent by Foreign Agents and Home Agents to indicate the failure or success of a Registration Request. The message can have three extensions. One for authentication between the mobile node and home agent. The other two are for passing the session key to both foreign agents and the mobile node.

 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
+---------------------------------------------------------------+
.                      IP + UDP Headers                         .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Type = 3   |     Code      |           Lifetime            |  Registration 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Reply
|                          Home Address                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Home Agent                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                         Identification                        +
|                          (Timestamp)                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type = 32   |  Length = 20  |         SPI  ....             |  Mobile-Home
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Authentication
|      ... SPI                  |    Authenticator ...          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                     ... Authenticator ...                      
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type = 120  |            Length             |     SPI ...   |  Home-Mobile
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Key Reply
|             ... SPI                           | MN Enc. Key ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             ... Mobile Node Encrypted Key ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type = 121  |            Length             |     SPI ...   |  Foreign Agent
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  Key Reply
|             ... SPI                           | FA Enc. Key ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            ... Foreign Agent Encrypted Key ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

IP fields

Source Address
Copied from the destination address of the Registration Request to which the agent is replying.
Destination Address
Copied from the source address of the Registration Request to which the agent is replying

UDP fields

Source Port
variable
Destination Port
Copied from the source port of the corresponding Registration Request

Extensions

Registration Reply

Type
3
Code
A value indicating the result of the Registration Request.

The following values are defined for use within the Code field. Registration successful:

Registration denied by the foreign agent:

Registration denied by the home agent:

Lifetime
If the Code field indicates that the registration was accepted, the Lifetime field is set to the number of seconds remaining before the registration is considered expired. A value of zero indicates that the mobile node has been deregistered. A value of 0xffff indicates infinity. If the Code field indicates that the registration was denied, the contents of the Lifetime field are unspecified and MUST be ignored on reception.
Home Address
The IP address of the mobile node.
Home Agent
The IP address of the mobile node's home agent.
Identification
A 64-bit timestamp used for matching Registration Requests with Registration Replies, and for protecting against replay attacks of registration messages. The value is based on the Identification field from the Registration Request message from the mobile node.

Mobile-Home Authentication

The message is formatted as defined in [RFC2002, sec. 3.5.2].

Type
32
Length
4 plus the number of bytes in the Authenticator.
SPI
Security Parameter Index.
Authenticator

Home-Mobile Key Reply

The message is formatted as defined in [REGKEY, sec. 5.1.].

Type
120
Length
4 plus the length of the encrypted key for the mobile node
SPI
Security Parameters Index. An opaque identifier.
Mobile Node Encrypted Key
The session key, chosen by the home agent, encrypted under the mobility security association between the home agent and the mobile node.

Foreign Agent Key Reply Extension

The message is formattad as in [REGKEY, sec. 5.2].

Type
121
Length
4 plus the length of the encrypted foreign agent's key plus the length of the authenticator
SPI
Security Parameters Index. An opaque identifier.
Foreign Agent Encrypted Key
The session key, chosen by the home agent, encrypted under the mobility security association between the home agent and the foreign agent.

References

[RFC1256]
Stephen E. Deering, ICMP Router Discovery Messages
[RFC2002]
C. Perkins, RFC2002 IP Mobility Support
[REGKEY]
C. Perkins, Registration Keys for Route Optimization (work in progress)