Red Hat Bugzilla – Full Text Bug Listing
|Summary:||dhclient6 -P needs a way to specify prefix length|
|Product:||[Fedora] Fedora||Reporter:||H. Peter Anvin <hpa>|
|Component:||dhcp||Assignee:||Pavel Zhukov <pzhukov>|
|Status:||ASSIGNED ---||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||rawhide||CC:||amessina, cra, h.peter.anvin, i.grok, jpopelka, scott-redhat, thozza|
|Fixed In Version:||Doc Type:||Enhancement|
|Doc Text:||Story Points:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description H. Peter Anvin 2012-11-14 19:24:59 EST
When requesting a DHCPv6 prefix from some ISPs, e.g. Comcast, if one needs more than one /64 one needs to request this in the DHCPv6 query. This is done by inserting a OPTION_IAPREFIX suboption containing only a prefix length and the actual prefix all zero (see RFC 3633). Right now dhclient will include an already-delegated prefix as an OPTION_IAPREFIX, but will not allow the length to be specified nor will it issue one unless a prefix has already been delegated.
Comment 1 Fedora End Of Life 2013-04-03 11:26:25 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 2 Scott Shambarger 2014-01-13 03:56:16 EST
Update: I've tried modifying the lease file to create an empty ::/60 prefix, but dhclient appears to ignore the existing prefix then. I tested wide-dhcpv6 with a prefix of "::/60" in the "id-assoc pd" section of the config file, and it includes a prefix-option (option 26) of 0::/60 in the solicit, which works (as a "hint"). Probably need to find a way to include such a option in dhclient if there are no existing leases -- a new config option perhaps?
Comment 3 H. Peter Anvin 2014-01-14 13:07:35 EST
Created attachment 850071 [details] Proof of concept patch. Probably not for production. I have used this patch against Comcast for some time with success. It is ugly as hell and probably a bit out of date, but at least it could be used as a starting point.
Comment 4 H. Peter Anvin 2014-01-14 13:08:51 EST
The idea with the patch is that if we need a specific prefix length, we will request only existing leases that are that short or shorter, or ::/len if there are none left.
Comment 5 Scott Shambarger 2014-01-15 00:17:29 EST
FYI, tried the patch out... doesn't do anything on existing leases (different code path :), but I nuked the lease file and successfully received a /60 prefix. Looks good :)
Comment 6 Scott Shambarger 2014-01-16 02:37:10 EST
Created attachment 850891 [details] Updated patch to include config option OK, totally untested (but compiles). Updated parameter parsing (now --max-prefix), added man page text, and added a (global|per-interface) config option, that way it can be used with systems where you can't control the parameter list (eg NetworkManager :) Option: make parameter/config max-prefix6?
Comment 7 Scott Schmit 2014-01-16 23:16:13 EST
Maybe this is just me, but I'd think you'd want to be able to say (for example): "I'd love a /48, but I'll take anything between that and a /64" (whereas if you don't even mention that you'd do something with a /48, you'd get a /64). Software can then decide what to do with what it gets...if there aren't enough bits to partition the network for all the downstream interfaces, then it doesn't allocate to all the interfaces it would have, but giving addresses to some is better than none (or could be).
Comment 8 H. Peter Anvin 2014-01-16 23:34:35 EST
Well, technically speaking what you send to the server is considered a "hint", and the server may indeed return something narrower. So you may very well get a /64 back if you request a /48. What I have in my personal script that distributes the prefix to downstream interfaces is that I will assign /64 prefixes until they run out. Anything beyond that would require changes to the protocol.
Comment 9 Scott Schmit 2014-01-17 00:48:38 EST
Ah, ok. I interpreted the proposed config setting name to imply that the client would reject/release the prefix if it wasn't short enough.
Comment 10 H. Peter Anvin, Intel 2014-01-17 00:52:05 EST
That might be a valid option to have, too. "Don't accept an offer for a prefix longer than foo", but that is definitely different from "ask for a prefix at least bar".
Comment 12 Fedora Admin XMLRPC Client 2017-04-04 08:32:21 EDT
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.