6 ms·
DHCPv6-PD – First Steps
- candiddevmike 2y agoWhile the article is focused on OpenBSD, implementing DHCPv6 with systemd-networkd is really slick and typically a 1-2 line config for your interfaces: Upstream: [DHCPv6] PrefixDelegationHint=::/56 Downstream: [DHCPv6PrefixDelegation] Token=::1
- tssva 2y agoI have never been able to get DHCPv6PD working with systemd-networkd on my Verizon Fios connection at home. I have using other software.
- robhlt 2y agoIt's working on my fios connection, but I remember that wasn't always the case. Verizon may have changed something recently or the issue was fixed in a recent systemd release. My config looks like this with systemd 255: wan.network: [Network] DHCP=yes IPv6AcceptRA=yes IPForward=yes [IPv6AcceptRA] UseDNS=no DHCPv6Client=yes [DHCPv6] UseDNS=no UseHostname=no UseDomains=no PrefixDelegationHint=::/56 [Link] RequiredForOnline=routable lan.network: [Network] Address=xx.xx.xx.1/24 IPForward=yes DHCPv6PrefixDelegation=yes [DHCPv6PrefixDelegation] SubnetId=0 Token=static:::1 That lan config can be re-used on other vlan interfaces too, to take full advantage of the /56 prefix. Just increment the SubnetID (hex only for some reason, so the next is 0x1).
- tssva 2y agoI haven't tried it in about 6 months using whatever version was packaged with Ubuntu 22.04. My configuration was basically the same as yours. systemd-networkd seemed to always be a moving target as far as configuration syntax but mine was mostly the same as yours syntactically and functionally the same. It is mute now. I deployed a new Ubiquiti network including cameras about 6 months ago resulting in the linux router/firewall being replaced with a Dream Machine Pro.
- 38 2y ago[flagged]
- simoncion 2y agoWhile I understand that this would not be a situation that's typical for a residential LAN, how does systemd-networkd handle assigning prefixes assigned from multiple DHCPv6-PD assignments? To make it more concrete, imagine for a moment that one's border router has multiple WAN interfaces, each with its own prefix delegated to it. I notice that there's an UplinkInterface parameter [0], but if the documentation is not silent on whether or not there's any support at all for delegating multiple prefixes to the same LAN interface, then I missed it. [0] <https://man.archlinux.org/man/systemd.network.5#%5BDHCPPREFIXDELEGATION%5D_SECTION_OPTIONS https://man.archlinux.org/man/systemd.network.5#%5BDHCPPREFI...>
- Havoc 2y agoCurious why the FRITZ!Box is necessary? I know they popular in Germany but isn’t it like just a router OS?
- sneak 2y agoThey frequently are also the DSL “modem” so you’re kinda stuck with them.
- pantalaimon 2y agoIt’s one of the few home routers that implement DHCPv6 IA_PD
- deleted 2y ago[deleted]
- miller_joe 2y agoThis is great! I’ve been using ipv6 on openbsd for a while now, starting with a hurricane electric tunnel years ago then to native v6 on Comcast and now Sonic. Configuring ipv6 PD has not been supported in base this whole time. I recall using wide-dhcp6c years ago and then switching to the dhcpcd in the article. The situation has improved, slowly, but it will be great to have this in the base system *EDIT*: dhcp6leased landed in base yesterday: https://www.undeadly.org/cgi?action=article;sid=20240604085042 https://www.undeadly.org/cgi?action=article;sid=202406040850...
- hamandcheese 2y agoDid Sonic start offering native IPv6? Last I looked, it was only covered via tunnel only.
- mikepavone 2y agoThey turned on native IPv6 end of last year, at least in some areas (including Berkeley where I live). You wouldn't know it from their help pages, but there are some post in the forum to that effect.
- hamandcheese 2y agoI checked and I indeed have an ipv6 assigned to my router! Now I just need to figure out how to make it request a prefix.
- mathsmath 2y ago[dead]
- bastard_op 2y ago"3 Because of android refusing to implement it." So, some interesting history for the not-network-engineers out there on ipv6 fun. https://issuetracker.google.com/issues/36949085 https://issuetracker.google.com/issues/36949085 Why do people hate ipv6? Google comes to mind as one place to start.
- j16sdiz 2y agoNo. In IPv6, you can get an address using RA. DHCPv6 only if you want to smuggle some unrelated metadata as options (which, of course, not widely used outside enterprise). DHCPv6-PD are used only when you need a whole prefix. If everybody implement all the specs out there, we will have two different DNS record type, 4 or 5 address allocation schemes, a handful of IPv6-over-IPv4 protocol, whole a lots of incomplete and incompatible IPv4-ovr-IPv6 protocol.... Etc... while telling everybody ipv6 is simple and ask why we haven't got there yet
- j16sdiz 2y agoI meant.... I love DHCPv6. If only RA wasn't mandatory part of IPv6, I am all for DHCPv6. It's the fault of early IPv6 designers with NIH syndrome created this mess.
- kiwijamo 2y agoOut of interest as I have found IPv6 RA to work flawlessly for my home network (alongside legacy IPv4 DHCP), what advantage (if any) is there in deploying DHCPv6 within the home LAN? Or were you meaning to say DHCPv6 is great for certain (enterprise?) use cases?
- hamandcheese 2y agoWhen I was experimenting with IPv6 on my lan, router advertisements indeed worked great! But the big loss was that I had no control to reserve a particular IPv6 address for a particular MAC address inside the DHCP server, or assign DNS names automatically, etc. since it's basically 1 way - device receives a RA then configures itself with a random address.
- ninkendo 2y agoThis article hints at what I consider to be the biggest technical drawback to IPv6 for residential use, which is that dynamic prefixes mean your internal LAN IPs are never stable. The answer to this is usually something like “duh, use DNS”, but how are you going to configure that DNS server if your whole network’s IP address range could change at any time? Yes, multicast DNS is a thing, but it’s not supported in all software (I’m looking at you, OpenBSD, which has no out of the box support for it and I’ve not figured out how to configure it.) So the real answer is to create a ULA prefix on the side that you generate randomly (or make an easy to remember one because this is residential use, who cares about collisions, it’s a private space) and use that for any use case that involves hardcoded IPs, like DNS server configuration. But it still feels like a compromise to me. I wish more software was “prefixless”, including DNS server indication and even DNS zone files, such that a lack of prefix means “prepend the prefix you are already communicating on”… Firewall configuration would be simpler, DNS zone files could survive re-prefixing, all sorts of configuration could be made to work this way, but instead you’re left with either a ton of automation to reconfigure things when the prefix changes, a bunch of manual work, or just bite the bullet and use ULA. Oh, and did I mention that in my particular setup, all my devices would keep trying to communicate on their old addresses even after a new prefix gets assigned and the new RA’s are sent? Meaning they essentially lose all connectivity if you’re using an IPv6-mostly setup like I have? Oh sure, they grab addresses on the new prefix, but they don’t drop the old one until the lifetime expires, which defaults to 4 hours in the environment I’m in (I think the rad daemon in OpenBSD inherits the lifetimes from its upstream router’s lifetimes, which makes the duration Comcast’s fault, but the proper thing to do is rescind the old RA’s when the interface changes addresses, and rad does not do this out of the box for me, or if it does it doesn’t work right.) Ok rant over. I want to like IPv6 but dynamic prefixes are really the Achilles heel for me.
- justahuman74 2y agoI wish getting and using an IPv6 subnet was like buying a domain name, and that residential ISPs would be required to use your subnet for your service, a bit like portable phone numbers. The current IP allocation/usage procedures are a bit beyond most people
- Uptrenda 2y agoPeople who advocate for IPv6 are always like 'ahhhh just plug it in and its ready to go!!!' There's even twitter accounts that shame people for how they approach IPv6. But after doing a crap load of network programming I can tell you its really not simple at all. - IPv6 has many different address types. - Depending on the type you want to bind to it needs to be handled different. - Some types need an interface ID appended to them. - This is conditional on the type of the OS. - Windows has no easy way to get the ID programmatically. - Some address types need additional bind info like the 'scope id.' - Whether you can reach a specific addr type in a con depend on the addr you bind to. - IPv6 was designed to have plenty of addresses so that NAT isn't needed. Guess what: IPv6 can still do NAT like NAT6. In which case you won't have any nice global scope addresses to bind to. Writing good network code depends on being able to list the interfaces on a machine and the addresses that they have. With IPv6 this is desirable since it lets you know if you have any global scope addresses, what your local-scope addresses are, and other kinds. But from what I've seen seen most programming languages fall back to using default routes for everything. This means that the programmer literally can't lookup the addresses and interfaces for their software. Also lastly: getting a modern router that properly supports IPv6 isn't easy at all. I literally have a cupboard filled with PoS routers that can't do IPv6 properly. Everything that Telstra and Optus tend to give customers; most Dovado routers; GL inet routers (can do NAT6 but who wants that); 'netgear nighthawk' (I found a security vuln in netgears router when testing v6); and so on. People will say 'just slap Open-wrt on something and call it a day.' But these are the kinds of people who will spend 120+ hours reading the open-wrt wiki and learning electronic basics to setup a custom router. What they think is 'easy' doesn't take into account all the time they've already spent learning such niche BS. I have better things to do than (((just waste 1 billion hours with open-wrt and end up with someone that still doesn't work.))) 'IPv6 is easy. It just works.'
- dcow 2y agoscopes are deprecated and link-local is only a thing so that the network can bootstrap itself. if you’re deploying ipv6 all you care about are global and ula, which are scope-less
- simoncion 2y agoYour "end-user routers suck ass" comment is totally true. I wish the end-user and SOHO networking gear market wasn't a fucking race to the bottom. Your other comments simply aren't a substantial concern at end-user sites in the real world. * The only scopes that end-user sites might care about are global and link-local. I expect that situation is the same at nearly all non-end-user sites. Reading through the RFCs, it looks like the other scopes are ONLY relevant in multicast [0][1]... and even then, anything other than interface-local, link-local, and global looks like it's programmed into the routers and switches of the network, rather than host computers themselves. * If you have functional IPv6 service at your site, your application software cares as much about the interface's fe80::/10 link-local address as it does about the 169.254.0.0/16 link-local address... that is, not at all. The rule is simple: "If you want to talk globally, use an interface with a global address. If there's no global address, send it to the 'default' router and hope for the best.". It's actually a better situation than in IPv4 where you pretty much never have a globally-connected address. * Yes, you can do IPv6 NAT. In that case, you're no worse off than in the usual end-user IPv4 deployment. The cool thing about IPv6 is not that NAT doesn't exist, it's that there's far, far more than enough address space to make it so that you don't HAVE to deploy NAT at end-user sites. That doesn't mean that it's impossible for stupid, frightened, currently-ignorant, or revenue-maximizing ISPs to deploy NAT. [0] <https://www.rfc-editor.org/rfc/rfc4291#section-2.7 https://www.rfc-editor.org/rfc/rfc4291#section-2.7> [1] <https://www.rfc-editor.org/rfc/rfc7346#section-2 https://www.rfc-editor.org/rfc/rfc7346#section-2>
- paul_funyun 2y agoIf you don't need ipv6, best just to turn it off and forget about it.