4. Proposed Internet Header using CLNP
A summary of the contents of the CLNP header, as it is proposed for use in TUBA environments, is illustrated in Figure 4-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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ........Data Link Header........ | NLP ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Header Length | Version | Lifetime (TTL)|Flags| Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Fragment Length | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Dest Addr Len | Destination Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Destination Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Destination Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Destination Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Destination Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PROTO field | Src Addr Len | Source Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Source Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Source Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Source Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... Source Address... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Source Address | Reserved | Data Unit Identifier |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Fragment Offset | Total Length of packet |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options (see Table 1) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Note that each tick mark represents one bit position.
Figure 4-1. CLNP for TUBA
Note 1: For illustrative purposes, Figure 4-1 shows Destination
and Source Addresses having a length of 19 octets,
including the PROTO/reserved field. In general, addresses
can be variable length, up to a maximum of 20 octets,
including the PROTO/reserved field.
Note 2: Due to differences in link layer protocols, it is not
possible to ensure that the packet starts on an even
alignment. Note, however, that many link level protocols
over which CLNP is operated use a odd length link
(e.g., IEEE 802.2). (In Figure 4-1, the rest of the CLNP
packet is even-aligned.)
The encoding of CLNP fields for use in TUBA environments is as follows.
4.1. Network Layer Protocol Identification (NLP ID)
This one-octet field identifies this as the ISO/IEC 8473 protocol; it MUST set to binary 1000 0001.
4.2. Header Length Indication (Header Length)
Header Length is the length of the CLNP header in octets, and thus points to the beginning of the data. The value 255 is reserved. The header length is the same for all fragments of the same (original) CLNP packet.
4.3. Version
This one-octet field identifies the version of the protocol; it MUST be set to a binary value 0000 0001.
4.4. Lifetime (TTL)
Like the TTL field of IP, this field indicates the maximum time the datagram is allowed to remain in the internet system. If this field contains the value zero, then the datagram MUST be destroyed; a host, however, MUST NOT send a datagram with a lifetime value of zero. This field is modified in internet header processing. The time is measured in units of 500 milliseconds, but since every module that processes a datagram MUST decrease the TTL by at least one even if it process the datagram in less than 500 millisecond, the TTL must be thought of only as an upper bound on the time a datagram may exist. The intention is to cause undeliverable datagrams to be discarded, and to bound the maximum CLNP datagram lifetime. [Like IP, the colloquial usage of TTL in CLNP is as a coarse hop-count.]
Unless otherwise directed, a host SHOULD use a value of 255 as the initial lifetime value.
4.5. Flags
Three flags are defined. These occupy bits 0, 1, and 2 of the Flags/Type octet:
0 1 2
+---+---+---+
| F | M | E |
| P | F | R |
+---+---+---+
The Fragmentation Permitted (FP) flag, when set to a value of one (1), is semantically equivalent to the "may fragment" value of the Don't Fragment field of IP; similarly, when set to zero (0), the Fragmentation Permitted flag is semantically equivalent to the "Don't Fragment" value of the Don't Fragment Flag of IP.
[Note: If the Fragmentation Permitted field is set to the value 0, then the Data Unit Identifier, Fragment Offset, and Total Length fields are not present. This denotes a single fragment datagram. In such datagrams, the Fragment Length field contains the total length of the datagram.]
The More Fragments flag of CLNP is semantically and syntactically the same as the More Fragments flag of IP; a value of one (1) indicates that more segments/fragments are forthcoming; a value of zero (0) indicates that the last octet of the original packet is present in this segment.
The Error Report (ER) flag is used to suppress the generation of an error message by a host/router that detects an error during the processing of a CLNP datagram; a value of one (1) indicates that the host that originated this datagram thinks error reports are useful, and would dearly love to receive one if a host/router finds it necessary to discard its datagram(s).
4.6. Type field
The type field distinguishes data CLNP packets from Error Reports from Echo packets. The following values of the type field apply:
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| flags | 1 | 1 | 1 | 0 | 0 | => Encoding of Type = data packet
+---+---+---+---+---+---+---+---+
| flags | 0 | 0 | 0 | 0 | 1 | => Encoding of Type = error report
+---+---+---+---+---+---+---+---+
| flags | 1 | 1 | 1 | 1 | 0 | => Encoding of Type = echo request
+---+---+---+---+---+---+---+---+
| flags | 1 | 1 | 1 | 1 | 1 | => Encoding of Type = echo reply
+---+---+---+---+---+---+---+---+
Error Report packets are described in Section 5.
Echo packets and their use are described in RFC 1139 [9].
4.7. Fragment Length
Like the Total Length of the IP header, the Fragment length field contains the length in octets of the fragment (i.e., this datagram) including both header and data.
[Note: CLNP also may also have a Total Length field, that contains the length of the original datagram; i.e., the sum of the length of the CLNP header plus the length of the data submitted by the higher level protocol, e.g., TCP or UDP. See Section 4.12.]
4.8. Checksum
A checksum is computed on the header only. It MUST be verified at each host/router that processes the packet; if header fields are changed during processing (e.g., the Lifetime), the checksum is modified. If the checksum is not used, this field MUST be coded with a value of zero (0). See Appendix A for algorithms used in the computation and adjustment of the checksum. Readers are encouraged to see [10] for a description of an efficient implementation of the checksum algorithm.
4.9. Addressing
CLNP uses OSI network service access point addresses (NSAPAs); NSAPAs serve the same identification and location functions as an IP address, plus the protocol selector value encoded in the IPv4 datagram header, and with additional hierarchy. General purpose
CLNP implementations MUST handle NSAP addresses of variable length up to 20 octets, as defined in ISO/IEC 8348 [11]. TUBA implementations, especially routers, MUST accommodate these as well. Thus, for compatibility and interoperability with OSI use of CLNP, the initial octet of the Destination Address is assumed to be an Authority and Format Indicator, as defined in ISO/IEC 8348. NSAP addresses may be between 8 and 20 octets long (inclusive).
TUBA implementations MUST support both ANSI and GOSIP style addresses; these are described in RFC 1237 [12], and illustrated in Figure 4-2. RFC 1237 describes the ANSI/GOSIP initial domain parts as well as the format and composition of the domain specific part. It is further recommended that TUBA implementations support the assignment of system identifiers for TUBA/CLNP hosts defined in [13] for the purposes of host address autoconfiguration as described in [14]. Additional considerations specific to the interpretation and encoding of the selector part are described in sections 4.9.2 and 4.9.4.
+-------------+
| <-- IDP --> |
+----+--------+----------------------------------+
|AFI | IDI | <-- DSP --> |
+----+--------+----+---+-----+----+-----+---+----+
| 47 | 0005 |DFI |AA |Rsvd | RD |Area |ID |Sel |
+----+--------+----+---+-----+----+-----+---+----+
octets | 1 | 2 | 1 | 3 | 2 | 2 | 2 | 6 | 1 |
+----+--------+----+---+-----+----+-----+---+----+
Figure 4-2 (a): GOSIP Version 2 NSAP structure.
+-------------+
|<-- IDP --> |
+----+--------+----------------------------------+
|AFI | IDI | <-- DSP --> |
+----+--------+----+---+-----+----+-----+---+----+
| 39 | 840 |DFI |ORG|Rsvd | RD |Area |ID |Sel |
+----+--------+----+---+-----+----+-----+---+----+
octets | 1 | 2 | 1 | 3 | 2 | 2 | 2 | 6 | 1 |
+----+--------+----+---+-----+----+-----+---+----+
Figure 4-2 (b): ANSI NSAP address format for DCC=840
Definitions:
IDP Initial Domain Part
AFI Authority and Format Identifier
IDI Initial Domain Identifier
DSP Domain Specific Part
DFI DSP Format Identifier
AA Administration Authority
ORG Organization Name (numeric form)
Rsvd Reserved
RD Routing Domain Identifier
Area Area Identifier
ID System Identifier
Sel NSAP Selector
4.9.1. Destination Address Length Indicator
This field indicates the length, in octets, of the Destination Address.
4.9.2. Destination Address
This field contains an OSI NSAP address, as described in Section 4.9. It MUST always contain the address of the final destination. (This is true even for packets containing a source route option, see Section 4.13.4).
The final octet of the destination address MUST always contain the value of the PROTO field, as defined in IP. The 8-bit PROTO field indicates the next level protocol used in the data portion of the CLNP datagram. The values for various protocols are specified in "Assigned Numbers" [15]. For the PROTO field, the value of zero (0) is reserved.
TUBA implementations that support TCP/UDP as well as OSI MUST use the protocol value (1Dh, Internet decimal 29) reserved for ISO transport protocol class 4.
4.9.3. Source Address Length Indicator
This field indicates the length, in octets, of the Source Address.
4.9.4. Source Address
This field contains an OSI NSAP address, as described in Section 4.9.
The final octet of the source address is reserved. It MAY be set to the protocol field value on transmission, and shall be ignored on reception (the value of zero MUST not be used).
4.10. Data Unit Identifier
Like the Identification field of IP, this 16-bit field is used to distinguish segments of the same (original) packet for the purposes of reassembly. This field is present when the fragmentation permitted flag is set to one.
4.11. Fragment Offset
Like the Fragment Offset of IP, this 16-bit is used to identify the relative octet position of the data in this fragment with respect to the start of the data submitted to CLNP; i.e., it indicates where in the original datagram this fragment belongs. The offset is measured in octets; the value of this field shall always be a multiple of eight (8). This field is present when the fragmentation permitted flag is set to one.
4.12. Total Length
The total length of the CLNP packet in octets is determined by the originator and placed in the Total Length field of the header. The Total Length field specifies the entire length of the original datagram, including both the header and data. This field MUST NOT be changed in any fragment of the original packet for the duration of the packet lifetime. This field is present when the fragmentation permitted flag is set to one.
4.13. Options
All CLNP options are "triplets" of the form
4.13.1. Security
The value of the parameter code field is binary 1100 0101. The length field MUST be set to the length of a Basic (and Extended) Security IP option(s) as identified in RFC 1108 [16], plus 1. Octet 1 of the security parameter value field -- the CLNP Security Format Code -- is set to a binary value 0100 0000, indicating that the remaining octets of the security field contain either the Basic or Basic and Extended Security options as identified in RFC 1108. This encoding points to the administration of the source address (e.g., ISOC) as the administration of the security option; it is thus distinguished from the globally unique format whose definition is reserved for OSI use. Implementations wishing to use a security option MUST examine the
PROTO field in the source address; if the value of PROTO indicates the CLNP client is TCP or UDP, the security option described in RFC 1108 is used.
[Note: If IP options change, TUBA implementations MUST follow the new recommendations. This RFC, or revisions thereof, must document the new recommendations to assure compatibility.]
The formats of the Security option, encoded as a CLNP option, is as follows. The CLNP option will be used to convey the Basic and Extended Security options as sub-options; i.e., the exact encoding of the Basic/Extended Security IP Option is carried in a single CLNP Security Option, with the length of the CLNP Security option reflecting the sum of the lengths of the Basic and Extended Security IP Option.
+--------+--------+--------+--------+--------+---//----+-
|11000100|XXXXXXXX|01000000|10000010|YYYYYYYY| | ...
+--------+--------+--------+--------+--------+---//----+----
CLNP CLNP CLNP BASIC BASIC BASIC OPTION OPTION FORMAT SECURITY OPTION OPTION TYPE LENGTH CODE TYPE LENGTH VALUE (197) (130)
---+------------+------------+----//-------+
... | 10000101 | 000LLLLL | |
-----+------------+------------+----//-------+
EXTENDED EXTENDED EXTENDED OPTION
OPTION OPTION VALUE
TYPE (133) LENGTH
The syntax, semantics and processing of the Basic and Extended IP Security Options are defined in RFC 1108.
4.13.2. Type of Service
[Note: Early drafts recommended the use of IP Type of Service as specified in RFC 1349. There now appears to be a broad consensus that this encoding is insufficient, and there is renewed interest in exploring the utility of the "congestion experienced" flag available in the CLNP QOS Maintenance option. This RFC thus recommends the use of the QOS Maintenance option native to CLNP.]
The Quality of Service Maintenance option allows the originator of a CLNP datagram to convey information about the quality of service requested by the originating upper layer process. Routers MAY use this information as an aid in selecting a route when more than one route satisfying other routing criteria is available and the
available routes are know to differ with respect to the following qualities of service: ability to preserve sequence, transit delay, cost, residual error probability. Through this option, a router may also indicate that it is experiencing congestion.
The encoding of this option is as follows:
+-----------+-----------+----------+
| 1100 0011 | 0000 0001 | 110ABCDE |
+-----------+-----------+----------+
CLNP QOS OPTION QOS FLAGS
TYPE (195) LENGTH
The value of the parameter code field MUST be set to a value of binary 1100 0011 (the CLNP Quality of Service Option Code point). The length field MUST be set to one (1).
Bits 8-6 MUST be set as indicated in the figure. The flags "ABCDE" are interpreted as follows:
A=1 choose path that maintains sequence over
one that minimizes transit delay
A=0 choose path that minimizes transit delay over
one that maintains sequence
B=1 congestion experienced
B=0 no congestion to report
C=1 choose path that minimizes transit delay over
over low cost
C=0 choose low cost over path that
minimizes transit delay
D=1 choose pathe with low residual error probability over
one that minimizes transit delay
D=0 choose path that minimizes transit delay over
one with low residual error probability
E=1 choose path with low residual error probability over
low cost
E=0 choose path with low cost over one with low
residual error probability
4.13.3. Padding
The padding field is used to lengthen the packet header to a convenient size. The parameter code field MUST be set to a value of binary 1100 1100. The value of the parameter length field is variable. The parameter value MAY contain any value; the contents of padding fields MUST be ignored by the receiver.
+----------+----------+-----------+
| 11001100 | LLLLLLLL | VVVV VVVV |
+----------+----------+-----------+
4.13.4. Source Routing
Like the strict source route option of IP, the Complete Source Route option of CLNP is used to specify the exact and entire route an internet datagram MUST take. Similarly, the Partial Source Route option of CLNP provides the equivalent of the loose source route option of IP; i.e., a means for the source of an internet datagram to supply (some) routing information to be used by gateways in forwarding the internet datagram towards its destination. The identifiers encoded in this option are network entity titles, which are semantically and syntactically the same as NSAPAs and which can be used to unambiguously identify a network entity in an intermediate system (router).
The parameter code for Source Routing is binary 1100 1000. The length of the source routing parameter value is variable.
The first octet of the parameter value is a type code, indicating Complete Source Routing (binary 0000 0001) or Partial Source Routing (binary 0000 0000). The second octet identifies the offset of the next network entity title to be processed in the list, relative to the start of the parameter (i.e., a value of 3 is used to identify the first address in the list). The offset value is modified by each router using a complete source route or by each listed router using a partial source route to point to the next NET.
The third octet begins the list of network entity titles. Only the NETs of intermediate systems are included in the list; the source and destination addresses shall not be included. The list consists of variable length network entity title entries; the first octet of each entry gives the length of the network entity title that comprises the remainder of the entry.
4.13.5. Record Route
Like the IP record route option, the Record route option of CLNP is used to trace the route a CLNP datagram takes. A recorded route consists of a list of network entity titles (see Source Routing). The list is constructed as the CLNP datagram is forwarded along a path towards its final destination. Only titles of intermediate systems (routers) that processed the datagram are included in the recorded route; the network entity title of the originator of the datagram SHALL NOT be recorded in the list.
The parameter code for Record Route is binary 1100 1011. The length of the record route parameter value is variable.
The first octet of the parameter value is a type code, indicating Complete Recording of Route (0000 0001) or Partial Recording of Route (0000 0000). When complete recording of route is selected, reassembly at intermediate systems MAY be performed only when all fragments of a given datagram followed the same route; partial recording of route eliminates or "loosens" this constraint.
The second octet identifies the offset where the next network entity title entry (see Source Routing) MAY be recorded (i.e., the end of the current list), relative to the start of the parameter. A value of 3 is used to identify the initial recording position. The process of recording a network entity title entry is as follows. A router adds the length of its network entity title entry to the value of record route offset and compares this new value to the record route list length indicator; if the value does not exceed the length of the list, entity title entry is recorded, and the offset value is incremented by the value of the length of the network entity title entry. Otherwise, the recording of route is terminated, and the router MUST not record its network entity title in the option. If recording of route has been terminated, this (second) octet has a value 255.
The third octet begins the list of network entity titles.
4.13.6. Timestamp
[Note: There is no timestamp option in edition 1 of ISO/IEC 8473, but the option has been proposed and submitted to ISO/IEC JTC1/SC6.]
The parameter code value 1110 1110 is used to identify the Timestamp option; the syntax and semantics of Timestamp are identical to that defined in IP.
The Timestamp Option is defined in STD 5, RFC 791. The CLNP parameter code 1110 1110 is used rather than the option type code 68 to identify the Timestamp option, and the parameter value conveys the option length. Octet 1 of the Timestamp parameter value shall be encoded as the pointer (octet 3 of IP Timestamp); octet 2 of the parameter value shall be encoded as the overflow/format octet (octet 4 of IP Timestamp); the remaining octets shall be used to encode the timestamp list. The size is fixed by the source, and cannot be changed to accommodate additional timestamp information.
+--------+--------+--------+--------+
|11101110| length | pointer|oflw|flg|
+--------+--------+--------+--------+
| network entity title |
+--------+--------+--------+--------+
| timestamp |
+--------+--------+--------+--------+
| . |
.