📄 rfc2002.txt
字号:
The Mobility Agent Advertisement Extension follows the ICMP Router
Advertisement fields. It is used to indicate that an ICMP Router
Advertisement message is also an Agent Advertisement being sent by a
mobility agent. The Mobility Agent Advertisement Extension is
defined as follows:
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 | Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Registration Lifetime |R|B|H|F|M|G|V| reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| zero or more Care-of Addresses |
| ... |
Type 16
Length (6 + 4*N), where N is the number of care-of addresses
advertised.
Sequence Number
The count of Agent Advertisement messages sent since the
agent was initialized (Section 2.3.2).
Perkins Standards Track [Page 16]
RFC 2002 IP Mobility Support October 1996
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. Registration with this foreign
agent (or another foreign agent on this link) is required
rather than using a co-located care-of address.
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. This agent implements receiving
tunneled datagrams that use minimal encapsulation [15].
G GRE encapsulation. This agent implements receiving
tunneled datagrams that use GRE encapsulation [8].
V Van Jacobson header compression. This agent supports use
of Van Jacobson header compression [10] over the link
with any registered mobile node.
reserved
Sent as zero; ignored on reception.
Care-of Address(es)
The advertised foreign agent care-of address(es) provided
by this foreign agent. An Agent Advertisement MUST
include at least one care-of address if the 'F' bit
is set. The number of care-of addresses present is
determined by the Length field in the Extension.
A home agent MUST always be prepared to serve the mobile nodes for
which it is the home agent. A foreign agent may at times be too busy
to serve additional mobile nodes; even so, it must continue to send
Agent Advertisements, so that any mobile nodes already registered
with it will know that they have not moved out of range of the
foreign agent and that the foreign agent has not failed. A foreign
Perkins Standards Track [Page 17]
RFC 2002 IP Mobility Support October 1996
agent may indicate that it is "too busy" to allow new mobile nodes to
register with it, by setting the 'B' bit in its Agent Advertisements.
An Agent Advertisement message MUST NOT have the 'B' bit set if the
'F' bit is not also set, and at least one of the 'F' bit and the 'H'
bit MUST be set in any Agent Advertisement message sent.
When a foreign agent wishes to require registration even from those
mobile nodes which have acquired a co-located care-of address, it
sets the 'R' bit to one. Because this bit applies only to foreign
agents, an agent MUST NOT set the 'R' bit to one unless the 'F' bit
is also set to one.
2.1.2. Prefix-Lengths Extension
The Prefix-Lengths Extension MAY follow the Mobility Agent
Advertisement Extension. It is used to indicate the number of bits
of network prefix that applies to each Router Address listed in the
ICMP Router Advertisement portion of the Agent Advertisement. Note
that the prefix lengths given DO NOT apply to care-of address(es)
listed in the Mobility Agent Advertisement Extension. The Prefix-
Lengths Extension is defined as follows:
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 | ....
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Type 19 (Prefix-Lengths Extension)
Length N, where N is the value of the Num Addrs field in
the ICMP Router Advertisement portion of the Agent
Advertisement.
Prefix Length(s)
The number of leading bits that define the network number
of the corresponding Router Address listed in the ICMP
Router Advertisement portion of the message. The prefix
length for each Router Address is encoded as a separate
byte, in the order that the Router Addresses are listed
in the ICMP Router Advertisement portion of the message.
See Section 2.4.2 for information about how the Prefix Lengths
Extension MAY be used by a mobile node when determining whether it
has moved. See Appendix E for implementation details about the use
of this Extension.
Perkins Standards Track [Page 18]
RFC 2002 IP Mobility Support October 1996
2.1.3. One-byte Padding Extension
Some IP protocol implementations insist upon padding ICMP messages to
an even number of bytes. If the ICMP length of an Agent
Advertisement is odd, this Extension MAY be included in order to make
the ICMP length even. Note that this Extension is NOT intended to be
a general-purpose Extension to be included in order to word- or
long-align the various fields of the Agent Advertisement. An Agent
Advertisement SHOULD NOT include more than one One-byte Padding
Extension and if present, this Extension SHOULD be the last Extension
in the Agent Advertisement.
Note that unlike other Extensions used in Mobile IP, the One-byte
Padding Extension is encoded as a single byte, with no "Length" nor
"Data" field present. The One-byte Padding Extension is defined as
follows:
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
| Type |
+-+-+-+-+-+-+-+-+
Type 0 (One-byte Padding Extension)
2.2. Agent Solicitation
An Agent Solicitation is identical to an ICMP Router Solicitation
with the further restriction that the IP TTL Field MUST be set to 1.
2.3. Foreign Agent and Home Agent Considerations
Any mobility agent which cannot be discovered by a link-layer
protocol MUST send Agent Advertisements. An agent which can be
discovered by a link-layer protocol SHOULD also implement Agent
Advertisements. However, the Advertisements need not be sent, except
when the site policy requires registration with the agent (i.e., when
the 'R' bit is set), or as a response to a specific Agent
Solicitation. All mobility agents SHOULD respond to Agent
Solicitations.
The same procedures, defaults, and constants are used in Agent
Advertisement messages and Agent Solicitation messages as specified
for ICMP Router Discovery [4], except that:
- a mobility agent MUST limit the rate at which it sends broadcast
or multicast Agent Advertisements; a recommended maximum rate is
once per second, AND
Perkins Standards Track [Page 19]
RFC 2002 IP Mobility Support October 1996
- a mobility agent that receives a Router Solicitation MUST NOT
require that the IP Source Address is the address of a neighbor
(i.e., an address that matches one of the router's own addresses
on the arrival interface, under the subnet mask associated with
that address of the router).
- a mobility agent MAY be configured to send Agent Advertisements
only in response to an Agent Solicitation message.
If the home network is not a virtual network, then the home agent for
any mobile node SHOULD be located on the link identified by the
mobile node's home address, and Agent Advertisement messages sent by
the home agent on this link MUST have the 'H' bit set. In this way,
mobile nodes on their own home network will be able to determine that
they are indeed at home. Any Agent Advertisement messages sent by
the home agent on another link to which it may be attached (if it is
a mobility agent serving more than one link), MUST NOT have the 'H'
bit set, unless the home agent also serves as a home agent (to other
mobile nodes) on that other link.
If the home network is a virtual network, the home network has no
physical realization external to the home agent itself. In this
case, there is no physical network link on which to send Agent
Advertisement messages advertising the home agent. Mobile nodes for
which this is the home network are always treated as being away from
home.
On a particular subnet, either all mobility agents MUST include the
Prefix-Lengths Extension or all of them MUST NOT include this
Extension. Equivalently, it is prohibited for some agents on a given
subnet to include the Extension but for others not to include it.
Otherwise, one of the move detection algorithms designed for mobile
nodes will not function properly (Section 2.4.2).
2.3.1. Advertised Router Addresses
The ICMP Router Advertisement portion of the Agent Advertisement MAY
contain one or more router addresses. Thus, an agent MAY include one
of its own addresses in the advertisement. A foreign agent MAY
discourage use of this address as a default router by setting the
preference to a low value and by including the address of another
router in the advertisement (with a correspondingly higher
preference). Nevertheless, a foreign agent MUST route datagrams it
receives from registered mobile nodes (Section 4.2.2).
Perkins Standards Track [Page 20]
RFC 2002 IP Mobility Support October 1996
2.3.2. Sequence Numbers and Rollover Handling
The sequence number in Agent Advertisements ranges from 0 to 0xffff.
After booting, an agent MUST use the number 0 for its first
advertisement. Each subsequent advertisement MUST use the sequence
number one greater, with the exception that the sequence number
0xffff MUST be followed by sequence number 256. In this way, mobile
nodes can distinguish reductions in sequence numbers that result from
reboots, from reductions that result in rollover of the sequence
number after it attains the value 0xffff.
2.4. Mobile Node Considerations
Every mobile node MUST implement Agent Solicitation. Solicitations
SHOULD only be sent in the absence of Agent Advertisements and when a
care-of address has not been determined through a link-layer protocol
or other means. The mobile node uses the same procedures, defaults,
and constants for Agent Solicitation as specified for ICMP Router
Solicitation messages [4], except that the mobile node MAY solicit
more often than once every three seconds, and that a mobile node that
is currently not connected to any foreign agent MAY solicit more
times than MAX_SOLICITATIONS.
The rate at which a mobile node sends Solicitations MUST be limited
by the mobile node. The mobile node MAY send three initial
Solicitations at a maximum rate of one per second while searching for
an agent. After this, the rate at which Solicitations are sent MUST
be reduced so as to limit the overhead on the local link. Subsequent
Solicitations MUST be sent using a binary exponential backoff
mechanism, doubling the interval between consecutive Solicitations,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -