📄 rfc2909.txt
字号:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ All attributes are 4-octets aligned.Radoslavov, et al. Experimental [Page 17]RFC 2909 The MASC Protocol September 2000 Length: The Length is the length of the entire attribute, including the length, type, and data fields. If other attributes are nested within the data field, the length includes the size of all such nested attributes. Type: This 1-octet unsigned integer indicates the type code of the attribute. The following type codes are defined: 0 = PREFIX_IN_USE (prefix is being used by the origin) 1 = CLAIM_DENIED (the claim is refused (probably by the origin's parent domain)) 2 = CLAIM_TO_EXPAND (origin is trying to expand the size of an existing prefix) 3 = NEW_CLAIM (origin is trying to claim a new prefix) 4 = PREFIX_MANAGED (parent is informing child of space available) 5 = WITHDRAW (origin is withdrawing a previous claim) Types 128-255 are reserved for "optional" attributes. If a required attribute is unrecognized, a NOTIFICATION with UPDATE Error Code and Unrecognized Required Attribute subcode will be sent. Unrecognized optional attributes are simply ignored. Reserved: This 1-octet field is reserved. MUST be set to zero by the sender, and MUST be ignored by the receiver. Types 0-3 are collectively called "CLAIMs". The message format below describes the encoding of a CLAIM, PREFIX_MANAGED and WITHDRAW.Radoslavov, et al. Experimental [Page 18]RFC 2909 The MASC Protocol September 2000 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved1 |D| AddrFam |Rol| Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Claim Timestamp | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Claim Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Claim Holdtime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Origin Domain Identifier (variable length) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Origin Node Identifier (variable length) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address (variable length) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Mask (variable length) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + (Optional Parameters) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Reserved1: This 1-octet field is reserved. MUST be set to zero by the sender, and MUST be ignored by the receiver. D-bit: DEPRECATED_PREFIX bit. If set, indicates that the advertised address prefix is Deprecated, otherwise the prefix is Active (see Section 4.3). AddrFam: This 5-bit field is the IANA-assigned address family number of the encoded prefix [IANA]. Rol: This 2-bit field indicates the relationship/role of the Origin of the message to the node sending that message: 00 = INTERNAL (originated by the sender's domain) 01 = CHILD (originated by a child of the sender's domain) 10 = SIBLING (originated by a sibling of the sender's domain) 11 = PARENT (originated by a parent of the sender's domain) Reserved2: This 2-octet field is reserved. MUST be set to zero by the sender, and MUST be ignored by the receiver.Radoslavov, et al. Experimental [Page 19]RFC 2909 The MASC Protocol September 2000 Claim Timestamp: The timestamp of the claim when it was originated. The timestamp is expressed in number of seconds since midnight (0 hour), January 1, 1970, Greenwich. Claim Lifetime: The time in seconds between the Claim Timestamp, and the time at which the prefix will become free. Claim Holdtime: The time in seconds between the Claim Timestamp, and the time at which the claim should be deleted from the local cache. For PREFIX_IN_USE and PREFIX_MANAGED claims it should be equal to Claim Lifetime; for CLAIM_TO_EXPAND, NEW_CLAIM, and CLAIM_DENIED it should be equal to [WAITING_PERIOD]. Origin Domain Identifier: The domain identifier of the claim originator. Its length and format definition are same as the Sender Domain Identifier (see Section 7.2). Origin Node Identifier: The MASC Node ID of the claim originator. Its length and format definition are same as the Sender MASC Node Identifier (see Section 7.2). Address: The address associated with the given prefix to be encoded. The length is determined based on the Address Family (e.g. 4 octets for IPv4, 16 for IPv6) Mask: The mask associated with the given prefix. The length is the same as the Address field and is determined based on the Address Family. The field contains the full bitmask. Optional Parameters: This field may contain a list of optional parameters, where each parameter is encoded using same format as the optional parameters of an OPEN message (see Section 7.2). Unrecognized optional parameters MUST be silently ignored. This document does not define any optional parameters.Radoslavov, et al. Experimental [Page 20]RFC 2909 The MASC Protocol September 20007.4. KEEPALIVE Message Format MASC does not use any transport protocol-based keep-alive mechanism to determine if peers are reachable. Instead, KEEPALIVE messages are exchanged between peers often enough as not to cause the Hold Timer to expire. A reasonable maximum time between the last KEEPALIVE or UPDATE message sent, and the time at which a KEEPALIVE message is sent, would be one third of the Hold Time interval. KEEPALIVE messages MUST NOT be sent more frequently than one per second. An implementation MAY adjust the rate at which it sends KEEPALIVE messages as a function of the Hold Time interval. If the negotiated Hold Time interval is zero, then periodic KEEPALIVE messages MUST NOT be sent. A KEEPALIVE message consists of only a message header, and has a length of 4 octets.7.5. NOTIFICATION Message Format A NOTIFICATION message is sent when an error condition is detected. Depending on the error condition, the MASC connection might or must be closed immediately after sending the message. If the sender of the NOTIFICATION decides that the connection is to be closed, it will indicate this by zeroing the O-bit in the NOTIFICATION message (see below). In addition to the fixed-size MASC header, the NOTIFICATION message contains the following fields: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |O| Error code | Error subcode | Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ O-bit: Open-bit. If zero, it indicates that the sender will close the connection. If '1', it indicates that the sender has chosen to keep the connection open. Error Code: This 7-bit unsigned integer indicates the type of NOTIFICATION. The following Error Codes have been defined:Radoslavov, et al. Experimental [Page 21]RFC 2909 The MASC Protocol September 2000 Error Code Symbolic Name Reference 1 Message Header Error Section 8.1 2 OPEN Message Error Section 8.2 3 UPDATE Message Error Section 8.3 4 Hold Timer Expired Section 8.4 5 Finite State Machine Error Section 8.5 6 NOTIFICATION Message Error Section 8.6 7 Cease Section 8.7 Error subcode: This 1-octet unsigned integer provides more specific information about the nature of the reported error. Each Error Code may have one or more Error Subcodes associated with it. If no appropriate Error Subcode is defined, then a zero (Unspecific) value is used for the Error Subcode field, and the O-bit must be zero (i.e. the connection will be closed). The notation used in the error description below is: MC = Must Close connection = O-bit is zero; CC = Can Close connection = O-bit might be zero. Message Header Error subcodes: 0 - Unspecific (MC) 1 - Bad Message Length (MC) 2 - Bad Message Type (CC) OPEN Message Error subcodes: 0 - Unspecific (MC) 1 - Unsupported Version Number (MC) 2 - Bad Peer Domain ID (MC) 3 - Bad Peer MASC Node ID (MC) 6 - Unacceptable Hold Time (MC) 7 - Invalid Parent Configuration (MC) 8 - Inconsistent Role (MC) 9 - Bad Parent Domain ID (MC) 10 - No Common Parent (MC) 13 - Unrecognized Address Family (MC)Radoslavov, et al. Experimental [Page 22]RFC 2909 The MASC Protocol September 2000 UPDATE Message Error subcodes: 0 - Unspecific (MC) 1 - Malformed Attribute List (MC) 2 - Unrecognized Required Attribute (CC) 5 - Attribute Length Error (MC) 10 - Invalid Address field (CC) 11 - Invalid Mask field (CC) 12 - Non-Contiguous Mask (CC) 13 - Unrecognized Address Family (MC) 14 - Claim Type Error (CC) 15 - Origin Domain ID Error (CC) 16 - Origin Node ID Error (CC) 17 - Claim Lifetime Too Short (CC) 18 - Claim Lifetime Too Long (CC) 19 - Claim Timestamp Too Old (CC) 20 - Claim Timestamp Too New (CC) 21 - Claim Prefix Size Too Small (CC) 22 - Claim Prefix Size Too Large (CC)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -