Internet-Draft | IPv6 Zone IDs in UIs | February 2024 |
Carpenter & Hinden | Expires 20 August 2024 | [Page] |
This document describes how the zone identifier of an IPv6 scoped address, defined in the IPv6 Scoped Address Architecture (RFC 4007), should be entered into a user interface. It obsoletes RFC 6874.¶
This note is to be removed before publishing as an RFC.¶
Discussion of this document takes place on the 6MAN mailing list (ipv6@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/ipv6/.¶
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 20 August 2024.¶
Copyright (c) 2024 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
A number of software tools require or permit the user to enter an IPv6 address via a user interface (UI). The standard literal text format for an IPv6 address is defined by [RFC4291] and [RFC5952]. The IPv6 Scoped Address Architecture specification [RFC4007] extends the text representation of limited-scope IPv6 addresses, in particular link-local addresses, such that a zone identifier may be concatenated to an address, for purposes described in that specification. Zone identifiers are especially useful in contexts in which literal addresses are typically used, for example during fault diagnosis or device configuration, when it may be essential to specify which interface is used for sending to a link-local address. It should be noted that zone identifiers have purely local meaning within the node in which they are defined, usually being the same as IPv6 interface names. They are completely meaningless for any other node. Today, they are meaningful only when attached to link-local addresses, but it is possible that other uses might be defined in the future.¶
Examples of a link-local address qualified by a zone identifier are "fe80::1234%eth0" on a Linux host, or "fe80::4321%7" on a Windows host.¶
Such addresses are directly supported by socket API calls including "getaddrinfo()" [RFC3493].¶
Devices whose network stack does not support the RFC 4007 model of a human-readable zone identifier are out of scope for this document.¶
Some examples of use cases for entering such an address in a UI are as follows:¶
For all such use cases, it is highly desirable that a complete IPv6 link-local address can be cut and pasted from one UI (such as the output from a system command) to another. Since such addresses may include quite long hexadecimal strings, any solution except cut-and-paste is highly error prone.¶
The use cases listed above apply to relatively simple actions on end systems. The zone identifiers that can be used are limited by the host operating system, since RFC 4007 only specifies that they are coded in ASCII, without specifying a maximum length.¶
It should be noted that whereas some operating systems and network APIs support a default zone identifier as recommended by RFC 4007, others do not, and for them a solution is particularly important.¶
The RFC 4007 model assumes that the human-readable zone identifier is mapped by the operating system into a numeric interface index. Typically this mapping is performed by the socket API, e.g. by "getaddrinfo()". The mapping between the human-readable zone identifier string and the numeric value is a host-specific function that varies between operating systems. The present document is concerned only with the human-readable string that is typically displayed in an operating system's user interface. However, in most operating systems it is possible to use the underlying interface number, represented as a decimal integer, as an equivalent to the human-readable string. This is recommended by Section 11.2 of RFC 4007, but not required. This possibility does not affect the UI requirement given below.¶
As IPv6 deployment becomes widespread, the lack of a solution for handling complete link-local addresses in all tools is becoming an acute problem for increasing numbers of operational and support personnel. It will become critical as IPv6-only networks, with no native IPv4 support, appear. For example, the NMEA use case mentioned above is an immediate requirement. This is the principal reason for documenting this requirement now.¶
This document obsoletes [RFC6874] and replaces it by a generic UI requirement described below.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
A user interface (UI) that allows or requires the user to enter an IPv6 address SHOULD provide a means for entering a link-local address and selecting a zone identifer as specified by [RFC4007] (typically, an interface identifier as defined by the operating system).¶
Ideally, the UI will support the complete format specified by RFC 4007 (e.g., "fe80::1%eth0").¶
If this is impossible for practical reasons, the UI could support an alternative delimiter in place of "%". The hyphen ("-") is suggested (e.g., "fe80::1-eth0").¶
If this too is impossible for practical reasons, the UI could support two separate input fields (e.g., "fe80::1" in one box, "eth0" in another), or selection from a list of active zone identifiers.¶
The program providing the UI will then store the address and the zone identifier, converting the latter to an interface index (typically via the socket API). A faulty zone identifier will be detected when attempting to convert it and this should be reported to the user as an error. The resulting interface index will be used for any subsequent socket calls using the link-local address.¶
As explained in [RFC4007], zone identifiers are of local significance and must not be sent on the wire. In particular, see the final security consideration of RFC 4007.¶
Unfortunately there is no formal limit on the length of the zone identifier string in RFC 4007. A UI implementation should apply a reasonable length limit when inputting a zone identifier, in order to minimize the risk of a buffer overrun. For example, a limit to 16 ASCII characters would correspond to the existing limit on Linux interface names.¶
An implementation should not include ASCII NULL characters in a zone identifier string as this could cause inconsistencies in subsequent string processing.¶
This document makes no request of IANA.¶
This section is to be removed before publishing as an RFC.¶
This document owes a lot to the previous discussions that led to RFC 6874 and to the unapproved draft [I-D.ietf-6man-rfc6874bis].¶
Useful comments were received from Nick Buraglio, Martin J. Dürst, David Farmer, Nate Karstens, Eduard Metz, Gyan Mishra, Ole Troan, David Schinazi, Michael Sweet, Éric Vyncke, and other participants in the 6MAN WG.¶