Network Working Group | T. Herbert |
Internet-Draft | Intel |
Intended status: Experimental | July 7, 2020 |
Expires: January 8, 2021 |
Attribution Option for Extension Header Insertion
draft-herbert-6man-eh-attrib-01
This document defines an "attribution option" that provides attribution for IPv6 extension headers, Hop-by-Hop options, or Destination options that are inserted by intermediate nodes in the delivery path of a packet. The purpose of this option is twofold: first it identifies the extension headers or options that have been inserted, secondly it attributes the inserted extension headers or options to the node responsible for inserting them.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 8, 2021.
Copyright (c) 2020 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 (https://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.
Extension header insertion has been proposed as a mechanism to annotate packets for transit across controlled, or limited, domains ([I-D.voyer-6man-extension-header-insertion], [I-D.ietf-ippm-ioam-ipv6-options]). These annotations are in the form of inserted Hop-by-Hop or Destination options, or other inserted extension headers (Segment Routing Header for example). Presumably, before a packet egresses a controlled domain, any inserted extension headers or options should be removed.
Extension header insertion, removal, and other non-standard modifications at intermediate nodes are currently prohibited by [RFC8200], and [I-D.smith-6man-in-flight-eh-insertion-harmful] provides the rationale for why extension header insertion is harmful and thus prohibited.
This proposal primarily addresses the attribution of packet contents problem. A solution to the attribution problem addresses or at least can mitigate the other problems with extension header insertion.
For inserting Hop-by-Hop options into a packet there are two possibilities: 1) a Hop-by-Hop Options extension header already exists in the packet, 2) no Hop-by-Hop Options extension header exist in the packet so a Hop-by-Hop extension header is inserted into the packet which contains the options being inserted.
Note that per [RFC8200] there can only be one Hop-by-Hop Options extension header in a packet, and if present it must be the first extension header after the IPv6 header. If Hop-by-Hop Options are to be inserted into a packet with an existing Hop-by-Hop Options extension header, the the options MUST be inserted into the options list for the existing extension header.
Destination options may be inserted in Destination Options before or after the routing header. If an appropriate Destination Options extension header does not exist in the packet then a new Destination Options extension header containing the inserted options is inserted in the packet. The recommended ordering of extension headers in [RFC8200] SHOULD be maintained.
When an extension header, not Hop-by-Hop or Destination, is inserted into a packet it is immediately preceded by a Destination Options extension header that includes an attribution option which describes the inserted extension header. If the extension header is being inserted immediately after an existing Destination Options extension header then the attribution option is inserted into the existing Destination Options extension header. If there is no preceding Destination Options extension header then a header is created into which the attribution options is set.
This document describes a mechanism for providing attribution in extension header insertion and insertion of Hop-by-Hop and Destination Options. With the exception of inserting Hop-by-Hop Options and Destination Options, requirements and semantics for inserting specific types of extension headers are out of scope. Similarly, security aspects, including potential leakage of inserted headers outside of a controlled domain, is not in scope.
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 [RFC2119].
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Option Type | Opt Data Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |E| Num_opts | | +-+-+-+-+-+-+-+-+ + | | ~ Identification ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The format of the Hop-by-Hop or Destination Attribution Option is:
If options are being inserted into an existing Destination Options or Hop-by-Hop extension header then the Attribution Option is inserted as the first option in the header, followed by any inserted options, and then followed by any pre-existing options. The total length of the attribution option and and any inserted options MUST be 8n; this ensures that any pre-existing options following those being inserted retain their original alignment. After the last inserted option the minimum amount of padding is added to make the total length of inserted data 8n. Pre-existing options, including padding, MUST NOT be modified other than moving them to follow the inserted options.
If a Destination or Hop-by-Hop Options extension header is being inserted in a packet then the Attribution Option is set as the first option in the header followed by an inserted options. Minimal padding MUST added make the length of the extension header 8n.
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 | 4 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |E| Num opts | Local_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Below is the short format of the Attribution Option.
Local_ID is interpreted locally. For instance, it may be used as an index to a table to map a value to an IPv6 address.
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 | 20 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |E| Num opts | Local_ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + IPv6 address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Below is the format of the Attribution Option that contains an IPv6 address for attribution of the inserted extension headers or options.
Local_ID contains supplemental identification that is interpreted by the local network. This MAY be the AS of network corresponding to the node identified by the IPv6 address.
The Attribution Option indicates both inserted Hop-by-Hop or Destination options and inserted extension headers.
Multiple extension header or options insertions may occur during the lifetime of a packet. Insertions are treated as a stack. Hop-by-Hop and Destination options MUST be inserted in an extension header before any pre-existing options including those previously inserted. Similarly, if an extension header is being inserted and a corresponding attribution option is being added to a Destination Option extension header then the inserted extension header immediately follows the Destination Options extension header and precedes any previously inserted extension headers with an attribution option in the same Destination Options extension header.
Inserted extension headers and inserted Hop-by-Hop and Destination options MUST be removed in the reverse order of insertion (i.e. inserted headers are "popped" to remove them). When an Attribution Option is removed from a packet, which is the first option in the extension header, the option, any corresponding inserted options, and any inserted trailing padding are removed. In the case of a Destination Options or Hop-by-Hop Options extension header that was inserted, the inserted extension header is removed when when the last attribution option in the extension header is removed (Num_opts in the option is equal to 127).
+-+-+-+-+-+-+-+-+-+ | IPv6 header | +-+-+-+-+-+-+-+-+-+ | Hop-by-Hop EH | +-+-+-+-+-+-+-+-+-+-+-+-+ | Attribution Opt | +-+-+-+-+-+-+-+-+-+-+ | Inserted options | +-+-+-+-+-+-+-+-+-+-+-+-+ | DestOpt EH | +-+-+-+-+-+-+-+-+-+-+-+-+ | Attribution Opt |---------+ #2 attribution option +-+-+-+-+-+-+-+-+-+-+ | | Inserted options | | +-+-+-+-+-+-+-+-+-+-+ | | Attribution Opt |----+ | #1 attribution option +-+-+-+-+-+-+-+-+-+-+ | | | Original options | | | +-+-+-+-+-+-+-+-+-+-+-+-+ | | | Inserted EH |<---------+----+ +-+-+-+-+-+-+-+-+-+ | | Inserted EH |<------+ +--+-+-+-+-+-+-+-+ | Original EHs | +-+-+-+-+-+-+-+-+-+
The logical structure of an IPv6 packet with inserted extension headers and options, and the relationship between Attribution Options and inserted extension headers and options, is demonstrated below. In this example, a Hop-by-Hop Options extension header was inserted that indicates inserted Hop-by-Hop options. There are two attribution options inserted into an existing Destination Options header: the first one (#1) indicates an inserted extension header and no options, the second (#2) indicates an inserted extension header and also inserted Destination options.
This section describes operations for extension header and options insertion and removal at intermediate nodes.
An extension header or Hop-by-Hop or Destination options MAY be inserted into a packet. The packet's size will increase, and if options are inserted into Destination or Hop-by-Hop Options the size of those extension headers will increase.
Hop-by-Hop and Destination options, including the attribution option, are inserted into a packet with the following procedures.
Errors may occur in the process of inserting extension headers in a packet. Error conditions would include the resultant packet size exceeding MTU, and the size of Hop-by-Hop Options extension header exceeding 1024 bytes (the maximum size of the Hop-by-Hop Options extension header).
If an error occurs during insertion then the node performing insertion MUST take an appropriate behavior per some configuration. The packet MAY be discarded or the unmodified packet MAY be forwarded. An error SHOULD be logged.
The top level inserted extension headers and Hop-by-Hop options, referred to by the Attribution Option, which is precisely the first option in the Hop-by-Hop Options for a packet, MAY be removed by an intermediate node.
A node performing extension header removal MUST validate packet contents.
If any of the above validations fail, or an error is otherwise encountered in the removal process, then the processing node MUST take action. The packet SHOULD be discarded and error message SHOULD be logged.
Filtering packets with inserted extension headers or Destination or Hop-by-Hop options is straightforward: a packet contains inserted options if the first option of Destination Options or Hop-by-Hop Options is the Attribution Option. A packet contains inserted extension headers if it contains an attribution option, either in Destination Options or Hop-by-Hop Options, with Num_opts equal to 127; or it contains an attribution option in Destination Options that has the E bit set.
At described in [I-D.smith-6man-in-flight-eh-insertion-harmful], it is possible for a source node to receive ICMP [RFC4443] errors caused by inserted headers, thus the source node has no recourse to address the error.
Extension headers and options MAY be inserted into a packet before an existing AH header. The inserted data is not covered in the ICV computation and if a receiving host attempts performs the ICV computation with inserted data it is expected that verification will fail and the packet will be dropped.
The simplest way to address this is to remove any inserted headers in the packet before processing the AH extension header. The assumption is that once the inserted data is removed the packet contents reflect the original contents set by the host so AH verification should succeed.
Host implementations can be modified to process the attribution option. When a packet with inserted headers or options is received by an end host the AH processing can ignore any inserted Destination or Hop-by-Hop options and any inserted extension headers. This can be done in conjunction with the existing algorithms to ignore option data in the ICV computation for modifiable options. Effectively, the algorithm is simply to remove all the inserted options and extension headers following the procedures in section 3.1.
The Attribution Option does not in itself introduce any new security considerations. The security of containing inserted extension headers within a controlled domain is out of scope for this document.
Section 3.5 describes the processing of the IP Authentication Header in the presence of inserted options or extension headers.
+-----------+---------------+-------------+---------------+ | Hex Value | Binary value | Description | Reference | | | act chg rest | | | +-----------+---------------+-------------+---------------+ | TBD | 00 0 TBD | Attribution | This document | | | | Option | | +-----------+---------------+-------------+---------------+
IANA is requested to assigned the following Destination and Hop-By-Hop option:
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC4302] | Kent, S., "IP Authentication Header", RFC 4302, DOI 10.17487/RFC4302, December 2005. |
[RFC4443] | Conta, A., Deering, S. and M. Gupta, "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification", STD 89, RFC 4443, DOI 10.17487/RFC4443, March 2006. |
[RFC8200] | Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", STD 86, RFC 8200, DOI 10.17487/RFC8200, July 2017. |
[I-D.ietf-ippm-ioam-ipv6-options] | Bhandari, S., Brockners, F., Pignataro, C., Gredler, H., Leddy, J., Youell, S., Mizrahi, T., Kfir, A., Gafni, B., Lapukhov, P., Spiegel, M., Krishnan, S. and R. Asati, "In-situ OAM IPv6 Options", Internet-Draft draft-ietf-ippm-ioam-ipv6-options-01, March 2020. |
[I-D.smith-6man-in-flight-eh-insertion-harmful] | Smith, M., Kottapalli, N., Bonica, R., Gont, F. and T. Herbert, "In-Flight IPv6 Extension Header Insertion Considered Harmful", Internet-Draft draft-smith-6man-in-flight-eh-insertion-harmful-02, May 2020. |
[I-D.voyer-6man-extension-header-insertion] | Voyer, D., Filsfils, C., Dukes, D., Matsushima, S., Leddy, J., Li, Z. and J. Guichard, "Deployments With Insertion of IPv6 Segment Routing Headers", Internet-Draft draft-voyer-6man-extension-header-insertion-09, May 2020. |
[RFC4890] | Davies, E. and J. Mohacsi, "Recommendations for Filtering ICMPv6 Messages in Firewalls", RFC 4890, DOI 10.17487/RFC4890, May 2007. |