Quick bit of advice regarding the IPV6 minefield

So, I know it's a noob question, I am sorry in advance.

I've got myself a raspberry pi4, I've used imagebuilder and got myself an image, I got my pi booted up and am now setting it up... It only had a lan interface so I've added a wan, set it up via pppoe and now have working internet.

All the IPV6 stuff is completely blank at the minute and I'm not sure how to set it up.

My ISP gave me this instruction...

We recommend you configure IPv6 using DHCPv6

Prefix (/64): 2A02:390:FEED:818A::/64

Routed (/48): 2A02:390:818A::/48

DNS Servers:

2a02:390:1:0:5b95:891a:32e:4462
2a02:390:2:0:a07c:9cca:e377:1c57
DNS over TLS: 212.69.36.23 and 212.69.40.23 tcp port 853

How do I configure this lot out? Can I set the IPV6 static like the ipv4 so I know what device is what??

In the end I want my DNS to pass through my pihole first too..

I only had a WAN port configured but when I connected to the internet a new "virtual interface" appeared... Do I need to delete this one, and create a WAN6 dhcpv6 client version?

Router advertisement service - ?
DHCPv6 service - server
NDP proxy - Disabled

DHCPv6 mode - stateful? I'd like to keep track of what's connected so I assume stateful is more the option i need??

In Network-WAN-Advanced Settings there is an option Obtain IPv6-Address. If you set it to Automatic it will create a WAN_6 interface and should work fine with your ISP.
Verify that wan_6 belongs to wan firewall zone.
Router advertisement service and DHCPv6 service server
DHCPv6 mode stateful and stateless

Cheers very much trendy, my next question will be I want to run my system stateful, so I can allocate ipv6 addresses to my local devices like my static ipv4 addresses.

But I'm struggling to find how to do this in the wiki.

My ULA is fdd2:504b:565d::/48
I believe I need each device to have a UDID? But lots of devices don't list one, can I just make my own up??
What's the suffix hex? Is that part I allocate to identify the device?

Just guessing here, not familiar with dropbear: Yes, you need the DUID, it's basically what you use to map Device<=>IPv6 address. Most PC operating systems should display that (Win: ipconfig /all, others you need to Google).
And the IPv6 suffix hex is probably the host portion of the IPv6 address (last 64 bit. So your IPv6 address will be Network-prefix+IPv6-suffix.

I'm curious as to why you need static IPs locally, normally it's easier to use hostname.

We share files between devices, so set static addresses for certain programs.

With ipv4 I can easily say the RPi4 server is @ 192.168.1.35 and point devices too it... And it's always there... But since starting the ipv6 server, it's got an address today, but tomorrow it's something totally different...

FYI Android devices work with SLAAC only.

It is needed to use DHCPv6

If you can make the device create one and use it.

Kind of.
In my case:

config host
        option name 'rockpi'
        option dns '1'
        option mac 'XX:XX:XX:XX:XX:XX'
        option ip '10.0.2.5'
        option leasetime '1d'
        option hostid '5'
        option duid '0004cc5b42c'

I am giving a hostid 5, same as the 4th octet of IPv4. The device acquires IPv6 fd00:bbbb::5 (ULA prefix) and a similar one with the GUA prefix.

2 Likes

You could use hostname instead, e.g. to connect to your RPi4 server, you could use RPi4 hostname, e.g. instead of scp file username@192.168.1.35:/home/username/ , you could do scp file username@RPi4hostname:/home/username/ (you can use hostname command to find out what the hostname is, you can change it too), this way you don't need to care about the IP address of your devices in the same way that you usually memorize the domain name of websites instead of the IP addresses, e.g. you can access your router web interface using http://openwrt.lan instead of http://192.168.1.1