ICMP Interface IDs: Extending ICMP for Interface and Next-Hop Identification
A way for routers to say, inside an ICMP error, which interface a packet came in on and where it would have gone next.
Atlas, A., Ed., Bonica, R., Ed., Pignataro, C., Ed., Shen, N., and JR. Rivers, "Extending ICMP for Interface and Next-Hop Identification", RFC 5837, DOI 10.17487/RFC5837, April 2010, <https://www.rfc-editor.org/info/rfc5837>.
@misc{rfc5837,
series = {Request for Comments},
number = 5837,
howpublished = {RFC 5837},
publisher = {RFC Editor},
doi = {10.17487/RFC5837},
url = {https://www.rfc-editor.org/info/rfc5837},
author = {A. Atlas and R. Bonica and C. Pignataro and N. Shen and JR. Rivers},
title = {{Extending ICMP for Interface and Next-Hop Identification}},
pagetotal = 18,
year = 2010,
month = apr,
} RFC text
Contents
Internet Engineering Task Force (IETF) A. Atlas, Ed.
Request for Comments: 5837 BT
Category: Standards Track R. Bonica, Ed.
ISSN: 2070-1721 Juniper Networks
C. Pignataro, Ed.
N. Shen
Cisco Systems
JR. Rivers
Consultant
April 2010
Extending ICMP for Interface and Next-Hop Identification
Abstract
This memo defines a data structure that can be appended to selected
ICMP messages. The ICMP extension defined herein can be used to
identify any combination of the following: the IP interface upon
which a datagram arrived, the sub-IP component of an IP interface
upon which a datagram arrived, the IP interface through which the
datagram would have been forwarded had it been forwardable, and the
IP next hop to which the datagram would have been forwarded.
Devices can use this ICMP extension to identify interfaces and their
components by any combination of the following: ifIndex, IPv4
address, IPv6 address, name, and MTU. ICMP-aware devices can use
these extensions to identify both numbered and unnumbered interfaces.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc5837.
Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November
10, 2008. The person(s) controlling the copyright in some of this
material may not have granted the IETF Trust the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other
than English.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conventions Used In This Document . . . . . . . . . . . . . . 5
3. Applications . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Application to Traceroute . . . . . . . . . . . . . . . . 5
3.2. Policy and MTU Detection . . . . . . . . . . . . . . . . . 6
4. Interface Information Object . . . . . . . . . . . . . . . . . 6
4.1. C-Type Meaning in an Interface Information Object . . . . 7
4.2. Interface IP Address Sub-Object . . . . . . . . . . . . . 9
4.3. Interface Name Sub-Object . . . . . . . . . . . . . . . . 10
4.4. Interface Information Object Examples . . . . . . . . . . 10
4.5. Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5. Network Address Translation Considerations . . . . . . . . . . 14
6. Security Considerations . . . . . . . . . . . . . . . . . . . 14
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15
8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 16
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 16
9.1. Normative References . . . . . . . . . . . . . . . . . . . 16
9.2. Informative References . . . . . . . . . . . . . . . . . . 16
1. Introduction
IP devices use the Internet Control Message Protocol (ICMPv4
[RFC0792] and ICMPv6 [RFC4443]) to convey control information. In
particular, when an IP device receives a datagram that it cannot
process, it may send an ICMP message to the datagram's originator.
Network operators and higher-level protocols use these ICMP messages
to detect and diagnose network issues.
In the simplest case, the source address of the ICMP message
identifies the interface upon which the datagram arrived. However,
in many cases, the incoming interface is not identified by the ICMP
message at all. Details follow:
According to [RFC1812], when a router generates an ICMPv4 message,
the source address of that message MUST be one of the following:
o one of the IP addresses associated with the physical interface
over which the ICMPv4 message is transmitted
o if that interface has no IP addresses associated with it, the
device's router-id or host-id is used instead.
If all of the following conditions are true, the source address of
the ICMPv4 message identifies the interface upon which the original
datagram arrived:
o the device sends an ICMPv4 message through the same interface upon
which the original datagram was received
o that interface is numbered
However, the incoming and outgoing interfaces may be different due to
an asymmetric return path, which can occur due to asymmetric link
costs, parallel links, or Equal Cost Multipath (ECMP).
Similarly, [RFC1122] provides guidance for source address selection
for multihomed IPv4 hosts. These recommendations, like those stated
above, do not always cause the source address of an ICMPv4 message to
identify the incoming interface.
ICMPv6 is somewhat more flexible. [RFC4443] states that for
responses to messages sent to a non-local interface, the source
address must be chosen as follows:
o the Source Address of the ICMPv6 packet MUST be a unicast address
belonging to the node. The address SHOULD be chosen according to
the rules that would be used to select the source address for any
other packet originated by the node, given the destination address
of the packet. However, it MAY be selected in an alternative way
if this would lead to a more informative choice of address
reachable from the destination of the ICMPv6 packet.
When a datagram that cannot be processed arrives on an unnumbered
interface, neither ICMPv4 nor ICMPv6 is currently capable of
identifying the incoming interface. Even when an ICMP message is
generated such that the ICMP source address identifies the incoming
interface, the receiver of that ICMP message has no way of knowing if
this is the case. ICMP extensions are required to explicitly
identify the incoming interface.
Using the extension defined herein, a device can explicitly identify
the incoming IP interface or its sub-IP components by any combination
of the following:
o ifIndex
o IPv4 address
o IPv6 address
o name
o MTU
The interface name SHOULD be identical to the first 63 octets of the
ifName, as defined in [RFC2863]. The ifIndex is also defined in
[RFC2863].
Using the same extension, an IP device can explicitly identify by the
above the outgoing interface over which a datagram would have been
forwarded if that datagram had been deliverable.
The next-hop IP address, to which the datagram would have been
forwarded, can also be identified using this same extension. This
information can be used for creating a downstream map. The next-hop
information may not always be available. There are corner-cases
where it doesn't exist and there may be implementations where it is
not practical to provide this information. This specification
provides an encoding for providing the next-hop IP address when it is
available.
The extension defined herein uses the ICMP multi-part message
framework defined in [RFC4884]. The same backward compatibility
issues that apply to [RFC4884] apply to this extension.
2. Conventions Used In This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
3. Applications
3.1. Application to Traceroute
ICMP extensions defined in this memo provide additional capability to
traceroute. An enhanced traceroute application, like older
implementations, identifies nodes that a datagram visited en route to
its destination. It differs from older implementations in that it
can explicitly identify the following at each node:
o the IP interface upon which a datagram arrived
o the sub-IP component of an IP interface upon which a datagram
arrived
o the IP interface through which the datagram would have been
forwarded had it been forwardable
o the IP next hop to which the datagram would have been forwarded
Enhanced traceroute applications can identify the above listed
entities by:
o ifIndex
o IPv4 address
o IPv6 address
o name
o MTU
The ifIndex can be utilized within a management domain to map to an
actual interface, but it is also valuable in public applications.
The ifIndex can be used as an opaque token to discern whether or not
two ICMP messages generated from the same router involve the same
interface.
3.2. Policy and MTU Detection
A general application would be to identify which outgoing interface
triggered a given function for the original packet. For example, if
an access control list (ACL) drops the packet and Dest Unreachable/
Admin Prohibited denies the packet, being able to identify the
outgoing interface might be useful. Another example would be to
support Path MTU Discovery (PMTUD), since this would allow
identification of which outgoing interface can't support a given MTU
size. For example, knowledge of the problematic interface would
allow an informed request for reconfiguration of the MTU of that
interface.
4. Interface Information Object
This section defines the Interface Information Object, an ICMP
extension object with a Class-Num (Object Class Value) of 2 that can
be appended to the following messages:
o ICMPv4 Time Exceeded
o ICMPv4 Destination Unreachable
o ICMPv4 Parameter Problem
o ICMPv6 Time Exceeded
o ICMPv6 Destination Unreachable
For reasons described in [RFC4884], this extension cannot be appended
to any of the currently defined ICMPv4 or ICMPv6 messages other than
those listed above.
The extension defined herein MAY be appended to any of the above
listed messages and SHOULD be appended whenever required to identify
an unnumbered interface and when local policy or security
considerations do not supersede this requirement.
A single ICMP message can contain as few as zero and as many as four
instances of the Interface Information Object. It is illegal if it
contains more than four instances, because that means that an
interface role is used more than once (see Section 4.5).
A single instance of the Interface Information Object can provide
information regarding any one of the following interface roles:
o the IP interface upon which a datagram arrived
o the sub-IP component of an IP interface upon which a datagram
arrived
o the IP interface through which the datagram would have been
forwarded had it been forwardable
o the IP next hop to which the datagram would have been forwarded
The following are examples of sub-IP components of IP interfaces upon
which a datagram might arrive:
o Ethernet Link Aggregation Group Member
o Multilink PPP bundle member
o Multilink frame relay bundle member
To minimize the number of octets required for this extension, there
are four different pieces of information that can appear in an
Interface Information Object.
1. The ifIndex of the interface of interest MAY be included. This
is the 32-bit ifIndex assigned to the interface by the device as
specified by the Interfaces Group MIB [RFC2863].
2. An IP Address Sub-Object MAY be included if either of the
following conditions is true: a) the eliciting datagram is IPv4
and the identified interface has at least one IPv4 address
associated with it, or b) the eliciting datagram is IPv6 and the
identified interface has at least one IPv6 address associated
with it. The IP Address Sub-Object is described in Section 4.2
of this memo.
3. An Interface Name Sub-Object, containing a string of no more than
63 octets, MAY be included. That string, as specified in
Section 4.3, is the interface name and SHOULD be the MIB-II
ifName [RFC2863], but MAY be some other human-meaningful name of
the interface.
4. A 32-bit unsigned integer reflecting the MTU MAY be included.
4.1. C-Type Meaning in an Interface Information Object
For this object, the C-Type [RFC4884] is used to indicate both the
role of the interface and the information that is included. This is
illustrated in Figure 1.
Bit 0 1 2 3 4 5 6 7
+-------+-------+-------+-------+-------+-------+-------+-------+
| Interface Role| Rsvd1 | Rsvd2 |ifIndex| IPAddr| name | MTU |
+-------+-------+-------+-------+-------+-------+-------+-------+
Figure 1: C-Type for the Interface Information Object
The following are bit-field definitions for C-Type:
Interface Role (bits 0-1): These bits indicates the role of the
interface being identified. The enumerated values are given below:
Value 0: This object describes the IP interface upon which a
datagram arrived
Value 1: This object describes the sub-IP component of an IP
interface upon which a datagram arrived
Value 2: This object describes the IP interface through which the
datagram would have been forwarded had it been
forwardable
Value 3: This object describes the IP next hop to which the
datagram would have been forwarded
Reserved 1 (bit 2): This bit is reserved for future use and MUST be
set to 0 and MUST be ignored on receipt.
Reserved 2 (bit 3): This bit is reserved for future use and MUST be
set to 0 and MUST be ignored on receipt.
ifIndex (bit 4) : When set, the 32-bit ifIndex of the interface is
included. When clear, the ifIndex is not included.
IP Addr (bit 5) : When set, an IP Address Sub-Object is present.
When clear, an IP Address Sub-Object is not present. The IP Address
Sub-Object is described in Section 4.2 of this memo.
Interface Name (bit 6): When set, an Interface Name Sub-Object is
included. When clear, it is not included. The Name Sub-Object is
described in Section 4.3 of this memo.
MTU (bit 7): When set, a 32-bit integer representing the MTU is
present. When clear, this 32-bit integer is not present.
The information included does not self-identify, so this
specification defines a specific ordering for sending the information
that must be followed.
If bit 4 (ifIndex) is set, then the 32-bit ifIndex MUST be sent
first. If bit 5 (IP Address) is set, an IP Address Sub-Object MUST
be sent next. If bit 6 (Name) is set, an Interface Name Sub-Object
MUST be sent next. If bit 7 is set, an MTU MUST be sent next. The
information order is thus: ifIndex, IP Address Sub-Object, Interface
Name Sub-Object, and MTU. Any or all pieces of information may be
present or absent, as indicated by the C-Type. Any data that follows
these optional pieces of information MUST be ignored.
It is valid (though pointless until additional bits are assigned by
IANA) to receive an Interface Information Object where bits 4, 5, 6,
and 7 are all 0; this MUST NOT generate a warning or error.
4.2. Interface IP Address Sub-Object
Figure 2 depicts the Interface Address Sub-Object:
0 31
+-------+-------+-------+-------+
| AFI | Reserved |
+-------+-------+-------+-------+
| IP Address ....
Figure 2: Interface Address Sub-Object
The IP Address Sub-Object contains the following fields:
o Address Family Identifier (AFI): This 16-bit bit field identifies
the type of address represented by the IP Address field. It also
determines the length of that field and the length of the entire
sub-object. Values for this field represent a subset of values
found in the IANA registry of Address Family Numbers (available
from <http://www.iana.org>). Valid values are 1 (representing a
32-bit IPv4 address) and 2 (representing a 128-bit IPv6 address).
o Reserved: This 16-bit field MUST be set to zero and ignored upon
receipt.
o IP Address: This variable-length field represents an IP address
associated with the identified interface.
If the eliciting datagram was IPv4, the IP Interface Sub-Object MUST
represent an IPv4 address. Likewise, if the eliciting datagram was
IPv6, the IP Interface Sub-Object MUST represent an IPv6 address.
4.3. Interface Name Sub-Object
Figure 3 depicts the Interface Name Sub-Object:
octet 0 1 63
+--------+-----------................-----------------+
| length | interface name octets 1-63 |
+--------+-----------................-----------------+
Figure 3: Interface Name Sub-Object
The Interface Name Sub-Object MUST have a length that is a multiple
of 4 octets and MUST NOT exceed 64 octets.
The Length field represents the length of the Interface Name Sub-
Object, including the length and the interface name in octets. The
maximum valid length is 64 octets. The length is constrained to
ensure there is space for the start of the original packet and
additional information.
The second field contains the human-readable interface name. The
interface name SHOULD be the full MIB-II ifName [RFC2863], if less
than 64 octets, or the first 63 octets of the ifName, if the ifName
is longer. The interface name MAY be some other human-meaningful
name of the interface. It is useful to provide the ifName for cross-
correlation with other MIB information and for human-reader
familiarity. The interface name MUST be padded with ASCII NULL
characters if the object would not otherwise terminate on a 4-octet
boundary.
The interface name MUST be represented in the UTF-8 charset [RFC3629]
using the Default Language [RFC2277].
4.4. Interface Information Object Examples
Figure 4 shows a full ICMPv4 Time Exceeded message, including the
Interface Information Object, which must be preceded by an ICMP
Extension Structure Header and an ICMP Object Header. Both are
defined in [RFC4884].
Although examples show an Interface Name Sub-Object of length 64,
this is only for illustration and depicts the maximum allowable
length.
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 | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| unused | Length | unused |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Internet Header + leading octets of original datagram |
| |
| // |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Ver=2 | (Reserved) | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length |Class-Num=2 | C-Type=00001010b |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Interface ifIndex |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Interface Name Sub-Object, 32-bit word 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Interface Name Sub-Object, 32-bit word 16 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: ICMPv4 Time Exceeded Message with Interface Information
Object
Figure 5 depicts an Interface Information Object representing an
incoming interface identified by ifIndex and Name.
Class-Num = 2
C-Type = 00001010b // Indicates incoming interface
Length = 72 (4 + 4 + 64)
0 1 2 3
+--------------+--------------+--------------+--------------+
| Interface ifIndex |
+--------------+--------------+--------------+--------------+
| Length | Name, word 1 |
+--------------+--------------+--------------+--------------+
... ...
+--------------+--------------+--------------+--------------+
| Name, word 16 |
+--------------+--------------+--------------+--------------+
Figure 5: Incoming Interface: By ifIndex and Name
Figure 6 depicts an Interface Information Object representing an
incoming interface identified by ifIndex, IPv4 Address, and Name.
Class-Num = 2
C-Type = 00001110b // Indicates incoming interface
Length = 80 (4 + 4 + 8 + 64)
0 1 2 3
+--------------+--------------+--------------+--------------+
| Interface ifIndex |
+--------------+--------------+--------------+--------------+
| AFI | Reserved |
+--------------+--------------+--------------+--------------+
| IPv4 address |
+--------------+--------------+--------------+--------------+
| Length | Name, word 1 |
+--------------+--------------+--------------+--------------+
... ...
+--------------+--------------+--------------+--------------+
| Name, word 16 |
+--------------+--------------+--------------+--------------+
Figure 6: Incoming Interface: by ifIndex, IPv4 Address, and Name
Figure 7 depicts an Interface Information Object representing an
incoming interface identified by ifIndex and IPv6 Address.
Class-Num = 2
C-Type = 00001100b // Indicates incoming interface
Length = 28 (4 + 4 + 20)
0 1 2 3
+--------------+--------------+--------------+--------------+
| Interface ifIndex |
+--------------+--------------+--------------+--------------+
| AFI | Reserved |
+--------------+--------------+--------------+--------------+
| IPv6 address, 32-bit word 1 |
+--------------+--------------+--------------+--------------+
| IPv6 address, 32-bit word 2 |
+--------------+--------------+--------------+--------------+
| IPv6 address, 32-bit word 3 |
+--------------+--------------+--------------+--------------+
| IPv6 address, 32-bit word 4 |
+--------------+--------------+--------------+--------------+
Figure 7: Incoming Interface: By ifIndex and IPv6 Address
Figure 8 depicts an Interface Information Object representing an
outgoing interface identified by ifIndex and Name.
Class-Num = 2
C-Type = 10001010b // Indicates outgoing interface
Length = 72 (4 + 4 + 64)
0 1 2 3
+--------------+--------------+--------------+--------------+
| Interface ifIndex |
+--------------+--------------+--------------+--------------+
| Length | Name, word 1 |
+--------------+--------------+--------------+--------------+
... ...
+--------------+--------------+--------------+--------------+
| Name, word 16 |
+--------------+--------------+--------------+--------------+
Figure 8: Outgoing Interface: By ifIndex and Name
4.5. Usage
Multiple Interface Information Objects MAY be included within a
single ICMP message, provided that each Interface Information Object
specifies a unique role. A single ICMP message MUST NOT contain two
Interface Information Objects that specify the same role.
ifIndex, MTU, and name information MAY be included whenever it is
available; more than one instance of each of these three information
elements MUST NOT be included per Interface Information Object.
A single instance of IP Address information MAY be included in an
Interface Information Object under the following circumstances:
o if the eliciting datagram is IPv4 and an IPv4 address is
associated with the identified interface. In this case, if an IP
Address Sub-Object is included, it must specify an IPv4 address.
o if the eliciting datagram is IPv6 and an IPv6 address is
associated with the identified interface. In this case, if an IP
Address Sub-Object is included, it must specify an IPv6 address.
In all other circumstances, IP address information MUST NOT be
included.
An ICMP message that does not conform to these rules and contains
multiple instances of the same information is considered illegal;
specifically, an ICMP message containing more than one Interface
Information Object with the same role, as well as an ICMP message
containing a duplicate information element in a given role are
considered illegal. If such an illegal ICMP message is received, it
MUST be silently discarded.
5. Network Address Translation Considerations
[RFC5508] encourages Traditional IP Network Address Translators
(Traditional NATs; see [RFC3022]) to support ICMP extension objects.
This document defines an ICMP extension that includes IP addresses
and therefore contains realm-specific information, and consequently
describes possible NAT behaviors in the presence of these extensions.
NAT devices MUST NOT translate or overwrite the ICMP extensions
described herein. That is, they MUST either remove the extension
entirely or pass it unchanged.
It is conceivable that a NAT device might translate an ICMP header
without translating the extension defined herein. In this case, the
ICMP message might contain two instances of the same address, one
translated and the other untranslated. Therefore, application
developers should not assume addresses in the extension are of the
same realm as the addresses in the datagram's header.
It also is conceivable that a NAT device might translate an ICMPv4
message into ICMPv6 or vice versa. If that were to occur,
applications might receive ICMPv6 messages that contain IP Address
Sub-Objects that specify IPv4 addresses. Likewise, applications
might receive ICMPv4 messages that contain IP Address Sub-Objects
that specify IPv6 addresses.
6. Security Considerations
This extension can provide the user of traceroute with additional
network information that is not currently available. Implementations
SHOULD provide configuration switches that suppress the generation of
this extension based upon role (i.e., incoming interface, outgoing
interface, sub-IP data). Implementations SHOULD also provide
configuration switches that conceal various types of information
(e.g., ifIndex, interface name).
It may be desirable to provide this information to a particular
network's operators and not to others. If such policy controls are
desirable, then an implementation could determine what sub-objects to
include based upon the destination IP address of the ICMP message
that will contain the sub-objects. The implementation of policy
controls could also be based upon the mechanisms described in
[TRACEROUTE-EXT] for those limited cases supported.
For instance, the IP address may be included for all potential
recipients. The ifIndex and interface name could be included as well
if the destination IP address is a management address of the network
that has administrative control of the router.
Another example use case would be where the detailed information in
these extensions may be provided to ICMP destinations within the
local administrative domain, but only traditional information is
provided to 'external' or untrusted ICMP destinations.
The intended field of use for the extensions defined in this document
is administrative debugging and troubleshooting. The extensions
herein defined supply additional information in ICMP responses.
These mechanisms are not intended to be used in non-debugging
applications.
This document does not specify an authentication mechanism for the
extension that it defines. Application developers should be aware
that ICMP messages and their contents are easily spoofed.
7. IANA Considerations
IANA has reserved 2 for the Interface Information Object from the
ICMP Extension Object Classes registry available from
<http://www.iana.org>.
From the Interface Information Object's C-Type, IANA has reserved
values as follows:
o Bit 0-1: Interface Role field
o Bit 2: Unallocated - allocatable with Standards Action
o Bit 3: Unallocated - allocatable with Standards Action
o Bit 4: ifIndex included
o Bit 5: IP Address Sub-Object included
o Bit 6: Name Sub-Object included
o Bit 7: MTU included
IANA has reserved the following values for Interface Role:
o Value 0: Incoming IP Interface
o Value 1: Sub-IP Component of Incoming IP Interface
o Value 2: Outgoing IP Interface
o Value 3: IP Next Hop
8. Acknowledgments
The authors would like to thank Sasha Vainshtein, Enke Chen, and Joe
Touch for their comments and suggestions. They would also like to
thank Dr. Ali Assefi.
9. References
9.1. Normative References
[RFC0792] Postel, J., "Internet Control Message Protocol",
STD 5, RFC 792, September 1981.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2863] McCloghrie, K. and F. Kastenholz, "The Interfaces
Group MIB", RFC 2863, June 2000.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, November 2003.
[RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet
Control Message Protocol (ICMPv6) for the Internet
Protocol Version 6 (IPv6) Specification", RFC 4443,
March 2006.
[RFC4884] Bonica, R., Gan, D., Tappan, D., and C. Pignataro,
"Extended ICMP to Support Multi-Part Messages",
RFC 4884, April 2007.
9.2. Informative References
[RFC1122] Braden, R., "Requirements for Internet Hosts -
Communication Layers", STD 3, RFC 1122,
October 1989.
[RFC1812] Baker, F., "Requirements for IP Version 4 Routers",
RFC 1812, June 1995.
[RFC2277] Alvestrand, H., "IETF Policy on Character Sets and
Languages", BCP 18, RFC 2277, January 1998.
[RFC3022] Srisuresh, P. and K. Egevang, "Traditional IP
Network Address Translator (Traditional NAT)",
RFC 3022, January 2001.
[RFC5508] Srisuresh, P., Ford, B., Sivakumar, S., and S.
Guha, "NAT Behavioral Requirements for ICMP",
BCP 148, RFC 5508, April 2009.
[TRACEROUTE-EXT] Shen, N., Pignataro, C., Asati, R., and E. Chen,
"UDP Traceroute Message Extension", Work in
Progress, June 2008.
Authors' Addresses
Alia K. Atlas (editor)
BT
EMail: alia.atlas@bt.com
Ronald P. Bonica (editor)
Juniper Networks
2251 Corporate Park Drive
Herndon, VA 20171
USA
EMail: rbonica@juniper.net
Carlos Pignataro (editor)
Cisco Systems
7200-12 Kit Creek Road
PO Box 14987
Research Triangle Park, NC 27709
USA
EMail: cpignata@cisco.com
Naiming Shen
Cisco Systems
225 West Tasman Drive
San Jose, CA 95134
USA
EMail: naiming@cisco.com
JR. Rivers
Consultant
EMail: jrrivers@yahoo.com
ISO Plain Language
On this page
§1Why the Source Address Is Not Enough
IP devices use ICMPv4 and ICMPv6 to convey control information. When a device receives a datagram it cannot process, it may send an ICMP message to the datagram's originator, and network operators and higher-level protocols use those messages to detect and diagnose network issues.
In the simplest case the source address of the ICMP message identifies the interface on which the datagram arrived. In many cases, though, the incoming interface is not identified by the ICMP message at all. According to RFC 1812, when a router generates an ICMPv4 message, the source address of that message MUST be one of the IP addresses associated with the physical interface over which the message is transmitted, or, if that interface has no IP addresses associated with it, the device's router ID or host ID is used instead.
The source address of the ICMPv4 message identifies the interface on which the original datagram arrived only if all of the following hold: the device sends the message through the same interface on which the datagram was received, and that interface is numbered. The incoming and outgoing interfaces may differ because of an asymmetric return path, which can come from asymmetric link costs, parallel links or equal cost multipath. RFC 1122 gives similar guidance for source address selection on multihomed IPv4 hosts, and those recommendations do not always make the source address identify the incoming interface either.
ICMPv6 is somewhat more flexible: for responses to messages sent to a non-local interface, the source address must be a unicast address belonging to the node, and it SHOULD be chosen by the rules used for any other packet the node originates, given the destination address, although it MAY be selected in an alternative way if that would lead to a more informative choice of address reachable from the destination.
When a datagram that cannot be processed arrives on an unnumbered interface, neither ICMPv4 nor ICMPv6 is currently able to identify the incoming interface. Even when an ICMP message is generated so that its source address identifies the incoming interface, the receiver of that message has no way of knowing that this is the case. ICMP extensions are therefore required to identify the incoming interface explicitly.
With this extension, a device can explicitly identify the incoming IP interface or its sub-IP components by any combination of ifIndex, IPv4 address, IPv6 address, name and MTU. The interface name SHOULD be identical to the first 63 octets of the ifName as defined in the Interfaces Group MIB, and the ifIndex is defined there too. The same extension can identify the outgoing interface over which the datagram would have been forwarded if it had been forwardable, and the IP next hop to which it would have been forwarded. The next-hop information can be used for creating a downstream map, but it may not always be available: there are corner cases where it does not exist, and there may be implementations where it is not practical to provide it. The specification therefore provides an encoding for the next-hop IP address when it is available.
The extension uses the ICMP multi-part message framework of RFC 4884, and the same backward compatibility issues that apply to that framework apply here.
The address in the error message comes from the outgoing interface, not the incoming one, and an interface with no address of its own cannot be named that way at all. So the router has to say it explicitly, and this document defines how that is encoded.
§3What the Extra Information Is Good For
The extensions give traceroute more to work with. An enhanced traceroute application, like older implementations, identifies the nodes a datagram visited on its way to its destination, and it differs in that it can explicitly identify at each node the IP interface on which the datagram arrived, the sub-IP component of that interface, the IP interface through which the datagram would have been forwarded had it been forwardable, and the IP next hop to which it would have been forwarded. It can identify those entities by ifIndex, IPv4 address, IPv6 address, name and MTU.
The ifIndex can be used within a management domain to map to an actual interface, and it is also valuable in public applications, where it serves as an opaque token to discern whether two ICMP messages generated by the same router involve the same interface.
A more general application is to identify which outgoing interface triggered a given function for the original packet. If an access control list drops the packet and the router answers with Destination Unreachable or Admin Prohibited, knowing the outgoing interface can be useful. Another example is supporting Path MTU Discovery, because that would allow identification of which outgoing interface cannot support a given MTU size, so that an informed request could be made to reconfigure the MTU of that interface.
Traceroute is the main use: at each hop it can now say which interface the probe came in on and which one it would have left by. The same block helps with access control lists and with finding the link that cannot carry a large enough packet.
§4The Interface Information Object
The Interface Information Object is an ICMP extension object with a Class-Num of 2, and it can be appended to the ICMPv4 Time Exceeded, ICMPv4 Destination Unreachable and ICMPv4 Parameter Problem messages, and to the ICMPv6 Time Exceeded and ICMPv6 Destination Unreachable messages. For the reasons given in RFC 4884, it cannot be appended to any other currently defined ICMPv4 or ICMPv6 message. It MAY be appended to any of the listed messages, and SHOULD be appended whenever it is required to identify an unnumbered interface and when local policy or security considerations do not supersede that requirement.
A single ICMP message can contain as few as zero and as many as four instances of the object. More than four is illegal, because that would mean an interface role was used more than once. One instance describes one interface role: the IP interface on which a datagram arrived, the sub-IP component of an IP interface on which a datagram arrived, the IP interface through which the datagram would have been forwarded had it been forwardable, or the IP next hop to which the datagram would have been forwarded. Examples of sub-IP components are an Ethernet link aggregation group member, a multilink PPP bundle member and a multilink frame relay bundle member.
To keep the number of octets small, four pieces of information can appear in the object. The ifIndex of the interface may be included, the 32-bit value assigned by the device as specified by the Interfaces Group MIB. An IP Address Sub-Object may be included if the eliciting datagram is IPv4 and the identified interface has at least one IPv4 address, or if the datagram is IPv6 and the interface has at least one IPv6 address. An Interface Name Sub-Object of no more than 63 octets may be included, which SHOULD be the MIB-II ifName but MAY be some other human-meaningful name. A 32-bit unsigned integer reflecting the MTU may be included.
The C-Type indicates both the role of the interface and which information is included. Bits 0 and 1 hold the interface role: value 0 for the IP interface on which a datagram arrived, value 1 for the sub-IP component of that interface, value 2 for the IP interface through which the datagram would have been forwarded, and value 3 for the IP next hop to which it would have been forwarded. Bits 2 and 3 are reserved for future use and MUST be set to zero and ignored on receipt. Bit 4 says that the 32-bit ifIndex is included, bit 5 that an IP Address Sub-Object is present, bit 6 that an Interface Name Sub-Object is included, and bit 7 that the 32-bit MTU is present.
The information included does not identify itself, so the specification fixes the order in which it is sent: if bit 4 is set the ifIndex MUST be sent first, then the IP Address Sub-Object if bit 5 is set, then the Interface Name Sub-Object if bit 6 is set, then the MTU if bit 7 is set. Any or all of the pieces may be present or absent as the C-Type indicates, and any data that follows these optional pieces MUST be ignored. Receiving an object with bits 4, 5, 6 and 7 all zero is valid, though pointless until more bits are assigned, and it MUST NOT generate a warning or an error.
The object has two jobs: say which interface it is talking about, and carry the details of that interface. Two bits give the role, four more say whether the index, the address, the name and the MTU are present, and the details always appear in that order so a reader knows what is what.
| Field | Name | Size | Value | Description |
|---|---|---|---|---|
ROLE | Interface Role | 2 bits | Which interface the object describes: incoming, sub-IP component, outgoing or next hop. | |
RSVD1 | Rsvd1 | 1 bits | Reserved; set to zero and ignored on receipt. | |
RSVD2 | Rsvd2 | 1 bits | Reserved; set to zero and ignored on receipt. | |
IFINDEX | ifIndex | 1 bits | The 32-bit interface index is present. | |
IPADDR | IP Addr | 1 bits | An IP Address Sub-Object is present. | |
NAME | Name | 1 bits | An Interface Name Sub-Object is present. | |
MTU | MTU | 1 bits | The 32-bit MTU value is present. |
- 0Incoming IP Interface — The interface on which the datagram arrived.
- 1Sub-IP Component — A component of the interface on which the datagram arrived.
- 2Outgoing IP Interface — The interface the datagram would have used had it been forwardable.
- 3IP Next Hop — The next hop the datagram would have been sent to.
§4.2The Address and Name Sub-Objects
The Interface IP Address Sub-Object begins with a 16-bit Address Family Identifier, which identifies the type of address in the IP Address field and determines the length of that field and of the whole sub-object. The valid values are a subset of the IANA registry of Address Family Numbers: 1 for a 32-bit IPv4 address and 2 for a 128-bit IPv6 address. The next 16 bits are reserved, MUST be set to zero and ignored on receipt. The IP Address field itself is variable length and holds an address associated with the identified interface. If the eliciting datagram was IPv4, the sub-object MUST represent an IPv4 address, and if it was IPv6, an IPv6 address.
The Interface Name Sub-Object begins with a length byte followed by the interface name octets. The length of the sub-object MUST be a multiple of 4 octets and MUST NOT exceed 64 octets, and the length field covers the length byte and the name. The limit is there to leave room for the start of the original packet and for additional information. The name SHOULD be the full MIB-II ifName if that is less than 64 octets, or the first 63 octets of the ifName if it is longer, and it MAY be some other human-meaningful name of the interface. It is useful to provide the ifName for cross-correlation with other MIB information and for human familiarity. The name MUST be padded with ASCII NULL characters if the object would not otherwise terminate on a 4-octet boundary, and it MUST be represented in the UTF-8 charset using the default language.
The address sub-object starts with a two-byte field saying whether the address is IPv4 or IPv6, then the address itself. The name sub-object starts with its length and then the name, padded so that the whole thing lands on a four-byte boundary, with a hard limit of 64 octets so that room is left for the rest of the ICMP message.
0 31
+-------+-------+-------+-------+
| AFI | Reserved |
+-------+-------+-------+-------+
| IP Address ....§4.4Worked Examples
The document shows a full ICMPv4 Time Exceeded message including an Interface Information Object, which must be preceded by an ICMP Extension Structure Header and an ICMP Object Header, both defined in RFC 4884. The example uses an Interface Name Sub-Object of length 64, which is only for illustration and shows the maximum allowable length.
Four further examples show the object on its own. One represents an incoming interface identified by ifIndex and Name, with C-Type 00001010b and Length 72, being 4 for the object header, 4 for the ifIndex and 64 for the name. A second represents an incoming interface identified by ifIndex, IPv4 address and Name, with C-Type 00001110b and Length 80. A third represents an incoming interface identified by ifIndex and IPv6 address, with C-Type 00001100b and Length 28. The last represents an outgoing interface identified by ifIndex and Name, with C-Type 10001010b and Length 72.
The examples show the same block with different pieces of information in it: an interface named by its index and name, one that also carries an IPv4 address, one that carries an IPv6 address instead, and one that describes the outgoing interface rather than the incoming one. The length in each case is the sum of the parts.
| Figure | What it identifies | C-Type | Length |
|---|---|---|---|
| Figure 5 | Incoming interface, ifIndex and Name | 00001010b | 72 |
| Figure 6 | Incoming interface, ifIndex, IPv4 address and Name | 00001110b | 80 |
| Figure 7 | Incoming interface, ifIndex and IPv6 address | 00001100b | 28 |
| Figure 8 | Outgoing interface, ifIndex and Name | 10001010b | 72 |
§4.5Rules for Using the Object
Multiple Interface Information Objects MAY be included in a single ICMP message, provided that each specifies a unique role, and a single message MUST NOT contain two objects that specify the same role.
The ifIndex, MTU and name information MAY be included whenever it is available, and more than one instance of each of those three information elements MUST NOT be included per object. A single instance of IP address information MAY be included under two circumstances: the eliciting datagram is IPv4 and an IPv4 address is associated with the identified interface, in which case an included IP Address Sub-Object must specify an IPv4 address; or the eliciting datagram is IPv6 and an IPv6 address is associated with the identified interface, in which case it must specify an IPv6 address. In all other circumstances IP address information MUST NOT be included.
An ICMP message that does not conform to these rules and contains multiple instances of the same information is considered illegal, specifically a message containing more than one Interface Information Object with the same role, and a message containing a duplicate information element in a given role. If such an illegal ICMP message is received, it MUST be silently discarded.
Each role may appear only once in a message, and each kind of detail only once per object. An address is only allowed when the datagram that caused the error and the interface address are of the same family. A message that breaks these rules is dropped without a complaint.
§6Security Considerations
The extension can give the user of traceroute additional network information that is not currently available. Implementations SHOULD provide configuration switches that suppress the generation of the extension based on role, that is the incoming interface, the outgoing interface or the sub-IP data, and SHOULD also provide configuration switches that conceal various types of information, for example the ifIndex or the interface name.
It may be desirable to provide this information to a particular network's operators and not to others. If such policy controls are wanted, an implementation could determine which sub-objects to include based on the destination IP address of the ICMP message that will contain them, or on the mechanisms described in the traceroute extension work in progress. The IP address could be included for all potential recipients, while the ifIndex and interface name could also be included if the destination IP address is a management address of the network that has administrative control of the router. Another example is providing the detailed information only to ICMP destinations inside the local administrative domain, and only traditional information to external or untrusted destinations.
Network address translation needs care as well. Because this extension includes IP addresses, it contains realm-specific information. NAT devices MUST NOT translate or overwrite the extensions described in this document: they must either remove the extension entirely or pass it unchanged. A NAT device might translate an ICMP header without translating the extension, in which case the message could contain two instances of the same address, one translated and one not, so application developers should not assume that addresses in the extension are in the same realm as the addresses in the datagram's header. A NAT device might also translate an ICMPv4 message into ICMPv6 or the reverse, in which case an application could receive an ICMPv6 message with an IPv4 address in the sub-object, or an ICMPv4 message with an IPv6 address in it.
The intended field of use is administrative debugging and troubleshooting, and the mechanisms are not intended for non-debugging applications. This document does not specify an authentication mechanism for the extension it defines, and application developers should be aware that ICMP messages and their contents are easily spoofed.
The extra detail tells a stranger more about the network than it used to, so a router should be able to switch each role off and to hide the index and the name. NAT devices must pass the block through unchanged or remove it. And because ICMP messages are easy to forge, this is for debugging rather than for applications that depend on the contents.