RFC 3011
The IPv4 Subnet Selection Option for DHCP
RFC 3011: The IPv4 Subnet Selection Option for DHCP ๐ฆ
Okay bestie, this is RFC 3011, The IPv4 Subnet Selection Option for DHCP ๐. It was written by Glenn Waters of Nortel Networks, it's a Standards Track document, and it's dated November 2000. The title block doesn't list anything it obsoletes or updates, so it's standing on its own โจ.
Status of this Memo ๐
This is an Internet standards track protocol for the Internet community, and it's asking for discussion and suggestions for improvements ๐ฌ. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1) ๐. Distribution of this memo is unlimited ๐.
Copyright Notice ยฉ๏ธ
Copyright (C) The Internet Society (2000). All Rights Reserved.
Abstract ๐
Okay so this memo introduces a brand new DHCP option ๐ . Its whole job is picking which subnet an address gets allocated from. It overrides the DHCP server's usual way of choosing that subnet for a client, so it's kind of a big deal ๐.
Table of Contents ๐ง
1. Introduction..................................................1
1.1. Motivational Example........................................2
2. Subnet Selection Option Definition............................3
3. Intellectual Property.........................................4
4. IANA Considerations...........................................4
5. Acknowledgements..............................................5
6. Security Considerations.......................................5
7. References....................................................5
8. Editor's Addresses............................................6
9. Full Copyright Statement......................................7
1. Introduction ๐ธ
Bestie, DHCP [RFC2131] is the thing that hands configuration info out to hosts on a TCP/IP network ๐ฅ๏ธ. RFC 2132 [RFC2132] is where the DHCP option configuration info lives, the stuff that gets carried in DHCP packets going to and from the server and the client ๐ฆ. This document adds one new DHCP option, and that's the main event ๐ฆ.
So here's how the server normally picks a subnet. It works out which subnet the request came from, and then it picks an address on that originating subnet, or on a subnet that sits on the same network segment as it โจ. The originating subnet can be figured out in two ways:
- Using the subnet address of the
giaddrfield in the DHCP packet header, or if thegiaddrfield is zero; - Using the subnet address of the local interface on which the DHCP server received the packet.
This memo defines the subnet selection option ๐. It lets the DHCP client name the subnet it wants an address from, and it beats the server's own methods for choosing the subnet ๐. Iconic behavior, honestly ๐ .
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] ๐.
1.1. Motivational Example ๐ฆ
Let me give you a real example of when this option slaps ๐ฅ. Picture a device, like a RAS device, that hands out addresses for its clients ๐ป. It gets those addresses through DHCP and then manages them among its clients ๐ซถ.
Here's the setup. The device is plugged into a private "internal" network where the DHCP server lives ๐ . It's also plugged into one or more service providing "external" networks, which are the networks its clients are on ๐. The internal network is not IP connected to the external networks. There's still connectivity inside the device, though, like through the backplane ๐.
Now the tricky part ๐ญ. The device is handing out addresses on the external networks, and there's no IP connectivity between internal and external. So DHCP requests can't come from the external networks, because packets can't route between them. That means the DHCP requests have to start on the internal network. The problem is the server will allocate addresses on the internal subnet, when what's actually needed is addresses on the external subnets ๐. This option is the fix for exactly that problem ๐ง.
So the device sends its DHCP request on the internal subnet, but it also includes the subnet selection option. That option has the address of the external subnet where it needs the address โจ. The option tells the DHCP server to allocate from that requested subnet, instead of doing the normal thing and allocating from the subnet the request came from ๐.
2. Subnet Selection Option Definition ๐
The subnet selection option is a DHCP option ๐. It carries a single IPv4 address, and that address is the address of a subnet ๐ธ. To get that value, you take any IPv4 address on the subnet and AND it with the subnet mask. The network and subnet bits stay as they are, and the remaining address bits get set to zero ๐งฎ.
When the DHCP server is set up to respond to this option, it's allocating an address, and this option is present, the server MUST allocate the address on either:
- the subnet specified in the subnet selection option, or;
- a subnet on the same network segment as the subnet specified in the subnet selection option.
Here's the format of the option ๐:
Code Len IPv4 Address
+-----+-----+-----+-----+-----+-----+
| 118 | 4 | A1 | A2 | A3 | A4 |
+-----+-----+-----+-----+-----+-----+
Servers that are set up to support this option MUST return an identical copy of the option to any client that sends it ๐. That's true whether or not the client asked for the option in a parameter request list ๐. On the client side, clients using this option MUST discard any DHCPOFFER or DHCPACK packets that don't contain this option ๐๏ธ. Bestie, that's a hard rule ๐ค.
This option doesn't require the server to change anything about its operations or features, apart from picking the subnet to allocate from ๐ง . For example, the way the server handles a DHCPDISCOVER for an unknown subnet should keep working exactly the same ๐ฆ.
When this option is present and the server is set up to support it, the server MUST NOT offer an address that isn't on the requested subnet or network segment ๐ซ. Servers that don't understand this option will allocate an address using their normal algorithms, and they won't put this option in the DHCPOFFER or DHCPACK. In that case the client will discard the DHCPOFFER or DHCPACK ๐ญ.
Then there are servers that understand the option but have been administratively configured to ignore it. These servers MUST ignore the option, use their normal algorithms to allocate an address, and MUST NOT return this option in the DHCPOFFER or DHCPACK ๐. And yep, once again, the client will discard the DHCPOFFER or DHCPACK ๐ .
Heads up, bestie ๐จ: during an address renew, the DHCP server may send a DHCPACK directly to the allocated address. But packets from the DHCP server may not be routable to that address. So, in every packet that the DHCP client sends that contains the subnet selection option, the giaddr field in the BOOTP header MUST be set to an IPv4 address where the DHCP client will accept DHCP packets. An example is the address on the subnet connected to the internal network ๐ซถ.
Last thing for this part ๐. The IPv4 address that a DHCP server sends its reply to MUST be the same one it would choose when this option isn't present ๐ฏ. Everything else works the way it normally does ๐ฆ.
9. Full Copyright Statement โจ
Copyright (C) The Internet Society (2000). All Rights Reserved. ๐
okay so the copyright stuff is kinda boring but it matters, so bear with me ๐ซถ You're allowed to copy this document and hand it out to people, and you can make derivative works that comment on or explain it or help with implementing it. You can prepare, copy, publish, and distribute those, whole or in part, with no restriction of any kind, as long as the above copyright notice and this paragraph are included on all those copies and derivative works. ๐
BUT the document itself may not be modified in any way. That means no removing the copyright notice or the references to the Internet Society or other Internet organizations. The exceptions are when it's needed for developing Internet standards (then you have to follow the procedures for copyrights in the Internet Standards process) or when you're translating it into a language other than English. ๐
The limited permissions above are perpetual, so they're forever ๐ and they won't be revoked by the Internet Society or its successors or assigns. Iconic, honestly. ๐
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. ๐
Acknowledgement
Funding for the RFC Editor function is currently provided by the Internet Society. ๐ธ
๐ฆ where this page comes from
- ietf: rfc3011 2000-11
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms