📄 rfc3344.txt
字号:
In this case, the care-of address is an IP address of the
foreign agent. In this mode, the foreign agent is the endpoint
of the tunnel and, upon receiving tunneled datagrams,
decapsulates them and delivers the inner datagram to the mobile
node. This mode of acquisition is preferred because it allows
many mobile nodes to share the same care-of address and
therefore does not place unnecessary demands on the already
limited IPv4 address space.
b) A "co-located care-of address" is a care-of address acquired by
the mobile node as a local IP address through some external
means, which the mobile node then associates with one of its
own network interfaces. The address may be dynamically
acquired as a temporary address by the mobile node such as
through DHCP [13], or may be owned by the mobile node as a
long-term address for its use only while visiting some foreign
network. Specific external methods of acquiring a local IP
address for use as a co-located care-of address are beyond the
scope of this document. When using a co-located care-of
address, the mobile node serves as the endpoint of the tunnel
and itself performs decapsulation of the datagrams tunneled to
it.
The mode of using a co-located care-of address has the advantage that
it allows a mobile node to function without a foreign agent, for
example, in networks that have not yet deployed a foreign agent. It
does, however, place additional burden on the IPv4 address space
because it requires a pool of addresses within the foreign network to
Perkins Standards Track [Page 11]
RFC 3344 IP Mobility Support for IPv4 August 2002
be made available to visiting mobile nodes. It is difficult to
efficiently maintain pools of addresses for each subnet that may
permit mobile nodes to visit.
It is important to understand the distinction between the care-of
address and the foreign agent functions. The care-of address is
simply the endpoint of the tunnel. It might indeed be an address of
a foreign agent (a foreign agent care-of address), but it might
instead be an address temporarily acquired by the mobile node (a co-
located care-of address). A foreign agent, on the other hand, is a
mobility agent that provides services to mobile nodes. See Sections
3.7 and 4.2.2 for additional details.
For example, figure 1 illustrates the routing of datagrams to and
from a mobile node away from home, once the mobile node has
registered with its home agent. In figure 1, the mobile node is
using a foreign agent care-of address, not a co-located care-of
address.
2) Datagram is intercepted 3) Datagram is
by home agent and detunneled and
is tunneled to the delivered to the
care-of address. mobile node.
+-----+ +-------+ +------+
|home | =======> |foreign| ------> |mobile|
|agent| | agent | <------ | node |
+-----+ +-------+ +------+
1) Datagram to /|\ /
mobile node | / 4) For datagrams sent by the
arrives on | / mobile node, standard IP
home network | / routing delivers each to its
via standard | |_ destination. In this figure,
IP routing. +----+ the foreign agent is the
|host| mobile node's default router.
+----+
Figure 1: Operation of Mobile IPv4
A home agent MUST be able to attract and intercept datagrams that are
destined to the home address of any of its registered mobile nodes.
Using the proxy and gratuitous ARP mechanisms described in Section
4.6, this requirement can be satisfied if the home agent has a
network interface on the link indicated by the mobile node's home
address. Other placements of the home agent relative to the mobile
node's home location MAY also be possible using other mechanisms for
intercepting datagrams destined to the mobile node's home address.
Such placements are beyond the scope of this document.
Perkins Standards Track [Page 12]
RFC 3344 IP Mobility Support for IPv4 August 2002
Similarly, a mobile node and a prospective or current foreign agent
MUST be able to exchange datagrams without relying on standard IP
routing mechanisms; that is, those mechanisms which make forwarding
decisions based upon the network-prefix of the destination address in
the IP header. This requirement can be satisfied if the foreign
agent and the visiting mobile node have an interface on the same
link. In this case, the mobile node and foreign agent simply bypass
their normal IP routing mechanism when sending datagrams to each
other, addressing the underlying link-layer packets to their
respective link-layer addresses. Other placements of the foreign
agent relative to the mobile node MAY also be possible using other
mechanisms to exchange datagrams between these nodes, but such
placements are beyond the scope of this document.
If a mobile node is using a co-located care-of address (as described
in (b) above), the mobile node MUST be located on the link identified
by the network prefix of this care-of address. Otherwise, datagrams
destined to the care-of address would be undeliverable.
1.8. Message Format and Protocol Extensibility
Mobile IP defines a set of new control messages, sent with UDP [37]
using well-known port number 434. The following two message types
are defined in this document:
1 Registration Request
3 Registration Reply
Up-to-date values for the message types for Mobile IP control
messages are specified in the most recent "Assigned Numbers" [40].
In addition, for Agent Discovery, Mobile IP makes use of the
existing Router Advertisement and Router Solicitation messages
defined for ICMP Router Discovery [10].
Mobile IP defines a general Extension mechanism to allow optional
information to be carried by Mobile IP control messages or by ICMP
Router Discovery messages. Some extensions have been specified to
be encoded in the simple Type-Length-Value format described in
Section 1.9.
Extensions allow variable amounts of information to be carried
within each datagram. The end of the list of Extensions is
indicated by the total length of the IP datagram.
Perkins Standards Track [Page 13]
RFC 3344 IP Mobility Support for IPv4 August 2002
Two separately maintained sets of numbering spaces, from which
Extension Type values are allocated, are used in Mobile IP:
- The first set consists of those Extensions which may appear
only in Mobile IP control messages (those sent to and from UDP
port number 434). In this document, the following Types are
defined for Extensions appearing in Mobile IP control messages:
32 Mobile-Home Authentication
33 Mobile-Foreign Authentication
34 Foreign-Home Authentication
- The second set consists of those extensions which may appear
only in ICMP Router Discovery messages [10]. In this document,
the following Types are defined for Extensions appearing in
ICMP Router Discovery messages:
0 One-byte Padding (encoded with no Length nor Data field)
16 Mobility Agent Advertisement
19 Prefix-Lengths
Each individual Extension is described in detail in a separate
section later in this document. Up-to-date values for these
Extension Type numbers are specified in the most recent "Assigned
Numbers" [40].
Due to the separation (orthogonality) of these sets, it is
conceivable that two Extensions that are defined at a later date
could have identical Type values, so long as one of the Extensions
may be used only in Mobile IP control messages and the other may be
used only in ICMP Router Discovery messages.
The type field in the Mobile IP extension structure can support up to
255 (skippable and not skippable) uniquely identifiable extensions.
When an Extension numbered in either of these sets within the range 0
through 127 is encountered but not recognized, the message containing
that Extension MUST be silently discarded. When an Extension
numbered in the range 128 through 255 is encountered which is not
recognized, that particular Extension is ignored, but the rest of the
Extensions and message data MUST still be processed. The Length
field of the Extension is used to skip the Data field in searching
for the next Extension.
Unless additional structure is utilized for the extension types, new
developments or additions to Mobile IP might require so many new
extensions that the available space for extension types might run
out. Two new extension structures are proposed to solve this
problem. Certain types of extensions can be aggregated, using
Perkins Standards Track [Page 14]
RFC 3344 IP Mobility Support for IPv4 August 2002
subtypes to identify the precise extension, for example as has been
done with the Generic Authentication Keys extensions [35]. In many
cases, this may reduce the rate of allocation for new values of the
type field.
Since the new extension structures will cause an efficient usage of
the extension type space, it is recommended that new Mobile IP
extensions follow one of the two new extension formats whenever there
may be the possibility to group related extensions together.
The following subsections provide details about three distinct
structures for Mobile IP extensions:
- The simple extension format
- The long extension format
- The short extension format
1.9. Type-Length-Value Extension Format for Mobile IP Extensions
The Type-Length-Value format illustrated in figure 2 is used for
extensions which are specified in this document. Since this simple
extension structure does not encourage the most efficient usage of
the extension type space, it is recommended that new Mobile IP
extensions follow one of the two new extension formats specified in
sections 1.10 or 1.11 whenever there may be the possibility to group
related extensions together.
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
| Type | Length | Data ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Figure 2: Type-Length-Value extension format for Mobile IPv4
Type Indicates the particular type of Extension.
Length Indicates the length (in bytes) of the data field within
this Extension. The length does NOT include the Type and
Length bytes.
Data The particular data associated with this Extension. This
field may be zero or more bytes in length. The format
and length of the data field is determined by the type
and length fields.
Perkins Standards Track [Page 15]
RFC 3344 IP Mobility Support for IPv4 August 2002
1.10. Long Extension Format
This format is applicable for non-skippable extensions which carry
information more than 256 bytes.
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 | Sub-Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data .....
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Long Extension format requires that the following fields be
specified as the first fields of the extension.
Type is the type, which describes a collection of extensions
having a common data type.
Sub-Type is a unique number given to each member in the aggregated
type.
Length indicates the length (in bytes) of the data field within
this Extension. It does NOT include the Type, Length and
Sub-Type bytes.
Data is the data associated with the subtype of this
extension. This specification does not place any
additional structure on the subtype data.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -