📄 rfc2002.txt
字号:
prohibition of the specification. SHOULD This word, or the adjective "recommended", means that, in some circumstances, valid reasons may exist to ignore this item, but the full implications must be understood and carefully weighed before choosing a different course. Unexpected results may result otherwise. MAY This word, or the adjective "optional", means that this item is one of an allowed set of alternatives. An implementation which does not include this option MUST be prepared to interoperate with another implementation which does include the option.Perkins Standards Track [Page 11]RFC 2002 IP Mobility Support October 1996 silently discard The implementation discards the datagram without further processing, and without indicating an error to the sender. The implementation SHOULD provide the capability of logging the error, including the contents of the discarded datagram, and SHOULD record the event in a statistics counter.1.9. Message Format and Protocol Extensibility Mobile IP defines a set of new control messages, sent with UDP [17] using well-known port number 434. Currently, the following two message types are defined: 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" [20]. In addition, for Agent Discovery, Mobile IP makes use of the existing Router Advertisement and Router Solicitation messages defined for ICMP Router Discovery [4]. 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. Each of these Extensions (with one exception) is encoded in the following Type-Length-Value format: 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 ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- 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 12]RFC 2002 IP Mobility Support October 1996 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. 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). Currently, 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 [4]. Currently, Mobile IP defines the following Types 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" [20]. 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. 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.Perkins Standards Track [Page 13]RFC 2002 IP Mobility Support October 19962. Agent Discovery Agent Discovery is the method by which a mobile node determines whether it is currently connected to its home network or to a foreign network, and by which a mobile node can detect when it has moved from one network to another. When connected to a foreign network, the methods specified in this section also allow the mobile node to determine the foreign agent care-of address being offered by each foreign agent on that network. Mobile IP extends ICMP Router Discovery [4] as its primary mechanism for Agent Discovery. An Agent Advertisement is formed by including a Mobility Agent Advertisement Extension in an ICMP Router Advertisement message (Section 2.1). An Agent Solicitation message is identical to an ICMP Router Solicitation, except that its IP TTL MUST be set to 1 (Section 2.2). This section describes the message formats and procedures by which mobile nodes, foreign agents, and home agents cooperate to realize Agent Discovery. Agent Advertisement and Agent Solicitation may not be necessary for link layers that already provide this functionality. The method by which mobile nodes establish link-layer connections with prospective agents is outside the scope of this document (but see Appendix B). The procedures described below assume that such link-layer connectivity has already been established. No authentication is required for Agent Advertisement and Agent Solicitation messages. They MAY be authenticated using the IP Authentication Header [1], which is unrelated to the messages described in this document. Further specification of the way in which Advertisement and Solicitation messages may be authenticated is outside of the scope of this document.2.1. Agent Advertisement Agent Advertisements are transmitted by a mobility agent to advertise its services on a link. Mobile nodes use these advertisements to determine their current point of attachment to the Internet. An Agent Advertisement is an ICMP Router Advertisement that has been extended to also carry an Mobility Agent Advertisement Extension (Section 2.1.1) and, optionally, a Prefix-Lengths Extension (Section 2.1.2), One-byte Padding Extension (Section 2.1.3), or other Extensions that might be defined in the future. Within an Agent Advertisement message, ICMP Router Advertisement fields of the message are required to conform to the following additional specifications:Perkins Standards Track [Page 14]RFC 2002 IP Mobility Support October 1996 - Link-Layer Fields Destination Address The link-layer destination address of a unicast Agent Advertisement MUST be the same as the source link-layer address of the Agent Solicitation which prompted the Advertisement. - IP Fields TTL The TTL for all Agent Advertisements MUST be set to 1. Destination Address As specified for ICMP Router Discovery [4], the IP destination address of an Agent Advertisement MUST be either the "all systems on this link" multicast address (224.0.0.1) [5] or the "limited broadcast" address (255.255.255.255). The subnet-directed broadcast address of the form <prefix>.<-1> cannot be used since mobile nodes will not generally know the prefix of the foreign network. - ICMP Fields Code The Code field of the agent advertisement is interpreted as follows: 0 The mobility agent handles common traffic -- that is, it acts as a router for IP datagrams not necessarily related to mobile nodes. 16 The mobility agent does not route common traffic. However, all foreign agents MUST (minimally) forward to a default router any datagrams received from a registered mobile node (Section 4.2.2). Lifetime The maximum length of time that the Advertisement is considered valid in the absence of further Advertisements. Router Address(es) See Section 2.3.1 for a discussion of the addresses that may appear in this portion of the Agent Advertisement.Perkins Standards Track [Page 15]RFC 2002 IP Mobility Support October 1996 Num Addrs The number of Router Addresses advertised in this message. Note that in an Agent Advertisement message, the number of router addresses specified in the ICMP Router Advertisement portion of the message MAY be set to 0. See Section 2.3.1 for details. If sent periodically, the nominal interval at which Agent Advertisements are sent SHOULD be 1/3 of the advertisement Lifetime given in the ICMP header. This allows a mobile node to miss three successive advertisements before deleting the agent from its list of valid agents. The actual transmission time for each advertisement SHOULD be slightly randomized [4] in order to avoid synchronization and subsequent collisions with other Agent Advertisements that may be sent by other agents (or with other Router Advertisements sent by other routers). Note that this field has no relation to the "Registration Lifetime" field within the Mobility Agent Advertisement Extension defined below.2.1.1. Mobility Agent Advertisement Extension 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).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -