dhcpcd-discuss

Re: IPv6 PD and static IPv6 address is waiting for IP

Neal P. Murphy

Tue Sep 25 19:20:16 2018

On Tue, 25 Sep 2018 18:39:30 +0200
Sébastien Luttringer <seblu@xxxxxxxxx> wrote:

> On Mon, 2018-09-24 at 12:17 +0100, Roy Marples wrote:
> > Wow.  
> Hi Roy,
> > This is an edge case I'm not entirely sure I want to work around.  
> 
> My goal is quite basic. I want choose an address in the IPv6 range that my
> provider gives me.
> To give a little context, the provider in question gives a /56 per server. To
> obtain the IP, according to its documentation[1], I have to make a prefix
> request based on a given DUID. 
> 
> When I request an address, without a prefix (via ia_na), I only have one IPv6
> address (prefix + ::1). I cannot get others IP, I tried several ia_na or to
> indicate an IP (via ia_na / address). Temporary prefix didn't work either.
> 
> So far, the cleanest option, seems to ask the prefix and to choose myself the
> static address inside.
> > Firstly, you are delegating to the same interface you're requesting on and
> > dhcpcd correctly warns that your DHCPv6 server does not support this
> > (OPTION_PD_EXCLUDE is missing from it's reply).If it did, then dhcpcd would
> > assign an IPv6 address to the interface and it would fork to the background
> > correctly.  
> 
> Yes, the delegation is for the same interface I'm requesting on. Note there is
> one physical interface on the server, so there is no much options.
> I don't get what's wrong with this, and why PD_EXCLUDE should be used here.If I
> understand correctly, the PD_EXCLUDE make sense when the delegating router
> needs to use a sub prefix inside the delegated prefix (which is forbidden by
> RFC 3633). In our case, the ipv6 prefix between the delegating router (provider
> equipment) and the requesting router (my server) is done via link-local
> addresses. So, the deletaged prefix is not used by the delegating router, and
> so we don't need exclusion (PD_EXCLUDE) extension.
> Side note, I made some test this afternoon with dhclient and it worked, no
> PD_EXCLUDE warning and the prefix was correctly delegated.
> > Secondly, if you ran dhcpcd in master mode (ie not specify an interface on
> > the command line or pass the -M flag) it would also fork to the background
> > correctly.  
> Is dhcpcd, in this mode,will continue to renew/rebind the prefix? As it didn't
> take the prefix as a valid address for going to background.
> Regards,
> [1] https://documentation.online.net/en/dedicated-server/network/ipv6/prefix
> 
> Sébastien "Seblu" Luttringer

I hope I don't muddy this thread; and I hope what follows makes sense. But I've had little trouble getting and delegating prefixes using dhcpcd on Linux. (The trouble is usually with deleting delegations when dhcpcd is taken down. And with the way I 'OCDed' my scripts; I tried to be *too* explicit*. I should trust the ISP to give me the same /60 every time provided I give them the same DUID every time. But I'm only experimenting so far.)

You should always get a /128; that is the address that your ISP gives you as the gateway to all of the IPv6 addresses they assigned to you. That is, whenever they receive a packet destined for one of your delegated IPv6 addrs, your ISP sends it to the /128 they assigned to you; your router with that address must know where then to send the packet.

Using dhcpcd on my Smoothwall firewall, Comcrash assigns me a /60. dhcpcd then assigns an address from the (/60)::1/64 block to my internal LAN, an addr from the (/60)::2/64 block to my wireless LAN, and an addr from the (/60)::0/64 to my internet interface, just as I specified in my dhcpcd.conf. Thus, a packet addressed to (/60)::1* is routed to my internal LAN; a packet addressed to (/60)::0* is routed to a local process on the firewall (if I added that address to the IF) *or* is port-forwarded or deNATted to an internal host, depending on the netfilter rules in place.

It *should* work for you because the 'industry' decided that every LAN that uses IPv6 must use a /64 (well, at least as near as I can understand). Unless your ISP is doing something strange. I posted my methods to this list a while back; if you want (and a search doesn't find them), I could re-post.

N

References:
IPv6 PD and static IPv6 address is waiting for IPSébastien Luttringer
Re: IPv6 PD and static IPv6 address is waiting for IPRoy Marples
Re: IPv6 PD and static IPv6 address is waiting for IPSébastien Luttringer
Archive administrator: postmaster@marples.name