Textual Conventions for Internet Network Addresses
obsoleted by
- rfc-3291 — Textual Conventions for Internet Network Addresses
Extracted elements (25)
A generic Internet address is represented as a pair of InetAddressType and InetAddress objects rather than a single object. This allows the display characteristics of each address type to be expressed independently and keeps the set of Internet address types extensible without breaking existing MIBs.
DNS domain names are included as an InetAddress type alongside IPv4 and IPv6, allowing MIBs to represent addresses in multiple forms. MIBs using DNS type must describe when and how name resolution occurs.
The InetAddressType enumeration values are aligned with the IANA-ADDRESS-FAMILY-NUMBERS-MIB to maintain consistency across SNMP MIBs and simplify implementation.
The scope identifier field size (4 bytes, octets 17-20) was chosen to match the sin6_scope_id field of the sockaddr_in6 structure defined in RFC 2553, enabling straightforward mapping between MIB objects and BSD socket structures.
For IPv6 MIB migration, it may be valid to define separate tables for different address types rather than extending existing tables. For example, TCP-MIB kept tcpConnTable intact and added a new IPv6 table in IPV6-TCP-MIB; but even new tables SHOULD use these textual conventions.
The InetAddressType SHOULD NOT be subtyped in object type definitions, but MAY be subtyped in compliance statements so that implementations can be required to support only a subset of address types (e.g., only ipv4 and ipv6).
If multiple InetAddress objects could be configured per host and this could be an implementation or usage issue, the DESCRIPTION clause of the relevant objects MUST fully describe required behavior.
Internet addresses MUST always be represented by a pair of InetAddressType/InetAddress objects. It is not allowed to share an InetAddressType between multiple InetAddress objects, and the InetAddressType object MUST immediately precede the InetAddress object.
MIB developers SHOULD NOT use the textual conventions defined in this document to represent transport layer addresses. The SMIv2 TAddress textual convention should be used for transport layer addresses instead.
New MIB definitions which need to express network layer Internet addresses SHOULD use the textual conventions defined in this memo. New MIBs SHOULD NOT use the SMIv2 IpAddress base type anymore.
The default scope identifier value (0) SHOULD NOT be used as an easy way out in cases where the scope identifier for a non-global IPv6 address is known.
The DESCRIPTION clause of objects whose value is a DNS name SHOULD precisely define how and when any required name-to-address resolution is done, and similarly for reverse lookups.
The IMPLIED keyword MUST NOT be used for an object of type InetAddress in an INDEX clause. Instance sub-identifiers take the form T.N.O1.O2...On, where T is the InetAddressType value, N is the octet count, and O1...On are the address octets.
The InetAddressType and InetAddress objects SHOULD NOT be subtyped in object type definitions. Subtyping binds the MIB module to specific address formats, which may cause serious problems if new address formats need to be introduced.
The scope identifier (bytes 17-20 of InetAddressIPv6) MUST NOT be present for global IPv6 addresses. For non-global IPv6 addresses (link-local or site-local), the scope identifier MUST always be present.
The scope identifier MUST disambiguate identical address values. For link-local addresses, the scope identifier will typically be the interface index (ifIndex as defined in the IF-MIB, RFC 2233).
When a generic Internet address is used as a table index, both InetAddressType and InetAddress objects MUST be used, with InetAddressType MUST come immediately before InetAddress in the INDEX clause.
When InetAddress is used as an index object syntax, the OBJECT-TYPE declaration MUST include a SIZE clause to limit the number of potential instance sub-identifiers due to the SMIv2 limit of 128 sub-identifiers.
InetAddress is a generic opaque Internet address textual convention (OCTET STRING, SIZE 0..255) always interpreted in context of a paired InetAddressType object. The InetAddressType object identifier MUST be 1 less than the InetAddress object identifier.
InetAddressType is a textual convention enumerating address types: unknown(0), ipv4(1), ipv6(2), and dns(16). The unknown(0) value MUST be used when the corresponding InetAddress object is a zero-length string. Numeric values are aligned with IANA-ADDRESS-FAMILY-NUMBERS-MIB.
INET-ADDRESS-MIB is assigned OID mib-2 76 and defines the INET-ADDRESS-MIB MODULE-IDENTITY. It exports the textual conventions InetAddressType, InetAddress, InetAddressIPv4, InetAddressIPv6, and InetAddressDNS.
This module defines only textual conventions, not management objects. Meaningful security considerations can only be written in MIB modules that use these conventions to define actual management objects.
InetAddressDNS encodes a DNS domain name as an OCTET STRING of SIZE 1..255 with DISPLAY-HINT '255a'. The name SHOULD be fully qualified whenever possible.
InetAddressIPv4 encodes an IPv4 address as a 4-octet OCTET STRING in network byte order, with DISPLAY-HINT '1d.1d.1d.1d'. The corresponding InetAddressType value is ipv4(1).
InetAddressIPv6 encodes an IPv6 address as 16 or 20 octets: octets 1-16 hold the IPv6 address in network byte order, and octets 17-20 hold an optional scope identifier in network byte order. DISPLAY-HINT is '2x:2x:2x:2x:2x:2x:2x:2x%4d'.