Internet-Draft | intarea-dhcpv4-route4via6 | April 2025 |
Lamparter & Fiebig | Expires 25 October 2025 | [Page] |
As a result of the shortage of IPv4 addresses, installations are increasingly recovering IPv4 addresses from uses where they are not strictly necessary. One such situation is in establishing next hops for IPv4 routes, replacing this use with IPv6 addresses. This document describes how to provision DHCP-configured hosts with their routes in such a situation.¶
This draft lives at https://github.com/eqvinox/dhc-route4via6 ¶
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 25 October 2025.¶
Copyright (c) 2025 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.¶
IPv4 is currently (and will likely be for some time) in a situation where IPv4 addresses are in short supply, but services still need to be made available to users that do not yet have IPv6 connectivity. In some cases, even the service side may not have IPv6 support yet. In other cases some aspect of the service precludes using proxy-style service delivery with translation technologies on either or both sides. This leads to a need for fine-grained deployment of IPv4 connectivity with minimum wastage of addresses.¶
A particularly interesting improvement enabled by the extension described here is the complete removal of IPv4 addresses from first-hop routers acting as DHCPv4/v6 relays, while still providing IPv4 connectivity. In this scenario, the relay (assumed colocated with the router) has no IPv4 address to use to communicate with the client. An almost-working solution for this case is presented by [DHCPv6] with the [DHCP4o6] transport method. Since this mechanism encapsulates IPv4 DHCP messages, all related IPv4 configuration can be carried. However, DHCPv4 does not support a way to encode an IPv6 default gateway or other routes, which is necessary in this case.¶
If the router and relay are not co-located, the relay may have an IPv4 address while the router does not. In this case, the option described in this document could be carried in a plain IPv4 DHCP message.¶
Note that the changes described in this document are to DHCPv4, not DHCPv6.¶
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.¶
This document defines a DHCPv4 option container with 2 suboptions for use within it. The container can occur multiple times, and the suboptions can each occur zero, one, or multiple times in each container. Each container represents one "fully-filled matrix" of destination prefixes and next-hops, i.e. to be interpreted as a full cartesian combination of the two sets. In detail, this means:¶
Outlined in [IANA-IPv6], not all IPv6 addresses are valid for use when encoded as next-hop and some have specific functionality [IANA-IPv6-SPECIAL] attached to them as follows:¶
the following types/ranges of addresses are invalid and MUST NOT be used; no client behavior is specified if any are present in a container:¶
Some IPv4 prefixes, due to their function given in [IANA-IPv4], do not make sense to use with this option. DHCPv4 servers MUST NOT encode and DHCPv4 clients MUST ignore the following prefixes as well as any more-specific prefixes within them:¶
Behavior for 240.0.0.0/4 is outside the scope of this document.¶
The option described in this document is intended to be implemented on hosts supporting IPv4 routes with IPv6 nexthops as described in [v4overv6]. Hosts that do not support the behavior described there MUST NOT request and MUST ignore the option described in this document.¶
Hosts that support [v4overv6] behavior and acquire their configuration from [DHCP] SHOULD implement the option described here.¶
While not limited to this case, this option is expected and intended to be used with assigning a singular IPv4 address to a DHCPv4 client. This implies that the Subnet Mask option defined in [DHCP-OPT] will have the value 255.255.255.255.¶
DHCPv4 clients implementing the option described in this document MUST process such a Subnet Mask option value as assigning a single address. There is no network or broadcast address for this "single-sized" pseudo-subnet. No IPv4 addresses are expressed to be on-link for the purposes of [ARP] (though they MAY become so due to additional, e.g. local configuration assigning additional addresses to the interface.)¶
Whether the address is bound to the interface or host (strong vs. weak host model), and whether to perform or skip [DADv4] for the address is beyond the scope of this document.¶
[RFC3442] documents a mechanism to communicate a set of routes and their nexthops over DHCP. The original DHCP "router" option (code 3) may communicate a default router. If either of these options is used, the routes communicated may overlap.¶
To get consistent and unsurprising behavior, this document places the follwing expectations on the host: TODO: redundant paragraph/merge with text above, needs some merging/editing. ¶
The default route is expressed here as a route for 0.0.0.0/0, which is also implied by the absence of any destination prefix suboption. There is no distinct special encoding for a default gateway, any nexthop for 0.0.0.0/0 MUST be treated as if it were a default gateway.¶
(only applicable if NOT assigning a single IPv4 address as /32) TODO: determine what behavior is reasonable here. (The client is likely to be given a /32 subnet mask anyway.) ¶
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 (TBA1) | Length | Suboptions | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | : ... :¶
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 = 1 | Length | R | prefixlen | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 prefix (0 - 4 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
The route's destination prefix, encoded in as few bytes necessary for the given prefixlen value, i.e. calculate length as ceil(prefixlen / 8). TODO: maybe just ditch minimum length encoding, make it match other DHCPv4 bits?¶
Valid values are described in Section 3.2.¶
If the Length field indicates additional data past the IPv4 prefix value, clients MUST ignore it. Future documents MAY introduce other behavior here and servers MUST NOT send any such data until such a point.¶
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 = 2 | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv6 addresses (n*16 octets) | : ... : +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
One or more IPv6 addresses specifying the nexthop for this route. Refer to Section 3.1 for valid values and associated behavior. TODO: is this a list, or do we just repeat the suboption? In theory, this could have sub-suboptions, but unlikely to need? ¶
A codepoint from the "BOOTP Vendor Extensions and DHCP Options" registry is requested for use with the container option described in Section 5. Editor note: 2 places of TBA1¶
A registry is requested to be created for the sub-options in the option above. TBD: proper wording for this, and fill in values 1 & 2¶
The authors would like to acknowledge and thank Tomek Mrugalski for very extensive comments, and in particular pointing out the proper way to use DHCP options.¶
Comments and feedback has been received and appreciated from Ole Troan.¶
TBD: outdated examples removed, will be re-added¶