Re: IPv6 prefix delegation question for my pi
Roy Marples
Fri Mar 06 08:25:13 2020
Hi Torsten
On 06/03/2020 00:35, Torsten Krah wrote:
I am wrapping my head around now for some days and need some help with ipv6 pd.
I've tried isc-dhcp client and was able to request a prefix from my
upstream router (well at least with debian buster running in a vm to
see if it works at all).
Now raspian on the pi uses dhcpcd for this purpose, but I can't get
prefix delegation working.
First I am happy with the fact, that the isc one does not assign the
delegated prefix to an interface - because I want to handle that
myself, I just need dhcp to request that prefix so the upstream paket
filter does open / delegate all the traffic for that prefix to my
requesting host / router which is my pi.
How to do that? Reading the manpage it says:
dhcpcd has to be running for all the interfaces it is delegating to.
Its a wireguard virtual interface and I want to take care of assigning
addresses for the clients / server myself in the wireguard config
files - I just need the dhcpcd to request that prefix delegation, is
that possible, if so how?
The short answer is - don't delegate to any interfaces, just request the
delegation. Your below configuration is fine.
Just like in ISC dhclient, you get some env options to play with in the hook
script - here's a sample from my server:
new_dhcp6_domain_search=marples.name
new_dhcp6_ia_pd1_iaid=00000001
new_dhcp6_ia_pd1_prefix1=fd73:7808:1017::
new_dhcp6_ia_pd1_prefix1_length=64
new_dhcp6_ia_pd1_prefix1_pltime=1800
new_dhcp6_ia_pd1_prefix1_vltime=1800
new_dhcp6_ia_pd1_t1=900
new_dhcp6_ia_pd1_t2=1440
new_dhcp6_name_servers='fe80::1%xennet0'
So you could get more than one prefix in the iaid and you could also request
more than one iaid - it's all handled here.
You can then extract that and assign the addresses yourself.
And the next question is - I am unable to request the prefix at all
with dhcpcd, if I put this to the config:
interface eth0
ipv6rs
ia_na
ia_pd 1
I just get this as an answer in the log file:
eth0: DHCPv6 REPLY: no iaprefix
eth0: DHCPv6 REPLY: no prefix available
Using isc-dhcp in my test vm it works with just this:
iface eth0 inet6 auto
dhcp 1
request_prefix 1
Any hints what I can try to a) get that prefix from my upstream
"blackbox" with dhcpcd and b) don't have dhcpcd running on the
interface it is delegating to?
Well, that's a Debian config, not ISC one so it's pretty hard to guess.
The easiest way would be to run wireshark/tcpdump on the outbound interface and
match the duid(clientid) + iaid fields.
Then it will likely work fine.
Roy
Archive administrator: postmaster@marples.name