[IPv6/dnsmasq/pihole]How to setup ULA address distribution?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
i0ntempest
DD-WRT Novice


Joined: 26 Jul 2019
Posts: 17

PostPosted: Sun Nov 15, 2020 2:48    Post subject: [IPv6/dnsmasq/pihole]How to setup ULA address distribution? Reply with quote
Hi all,
I've had this problem for a really long time without finding a good enough solution. My ISP uses prefix delegation and therefore my devices can't get stable IPv6 addresses, and this is causing problems with my Raspberry Pi running pihole DNS server. I need it to have a stable IPv6 address so I can point my router to it for DNS.
The closest setup I currently have is this dnsmasq config:
Code:

dhcp-range=set:gua6,::1,::ffff,constructor:br0,ra-stateless,64,1440m
dhcp-range=set:ula6,fd00:d:e:f::1,fd00:d:e:f::ffff,64,1440m
enable-ra
dhcp-host=DC:A6:32:07:61:55,raspberry-pi,192.168.0.8,[fd00:d:e:f::8],infinite

and in firewall script, setup IPv6 and manually add a ULA address into br0:
Code:

ip -6 addr add fd00:d:e:f::1/64 dev br0
ip6tables -I INPUT 3 -i br0 -j ACCEPT
ip6tables -I FORWARD 2 -p icmpv6 --icmpv6-type echo-request -j ACCEPT

And now devices on the network indeed get both GUA and ULA addresses (and the pi indeed gets the ::8 address I set), but then after some time they all lose IPv6 internet connectivity, even though they still have the addresses and are pingable locally.
Can anyone please advise? Thanks for any help.
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sun Nov 15, 2020 10:04    Post subject: Reply with quote
Is the prefix from the ISP changing?

I have had the same prefix from my ISP for several years.

Here is my DHCP6C Config:

Code:
interface eth0 {
 send ia-pd 0;
 send rapid-commit;
 request domain-name-servers;
 script "/sbin/dhcp6c-state";
};
id-assoc pd 0 {
     prefix ::/48 infinity;
     prefix-interface br0 {
          sla-id 0;
         sla-len 16;
     };
     prefix-interface br1 {
          sla-id 1;
         sla-len 16;
     };
     prefix-interface eth1.3 {
          sla-id 2;
         sla-len 16;
     }; 
      prefix-interface br2 {
          sla-id 16;
         sla-len 16;
     }; 
};
id-assoc na 0 {  };


Note the "infinity" on the prefix delegation.
i0ntempest
DD-WRT Novice


Joined: 26 Jul 2019
Posts: 17

PostPosted: Mon Nov 16, 2020 7:02    Post subject: Reply with quote
Thanks for the info. I change my WAN MAC every so often to get a new IP so I guess I can't rely on a infinite lease time like you do. Even if I don't change my WAN MAC my public addresses still randomly change sometimes.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Mon Nov 16, 2020 19:57    Post subject: Reply with quote
The ULA addresses can only be used locally. That's why you lose Internet when the GUA address is invalidated.
You must find out why the connection to your ISP get broken.
i0ntempest
DD-WRT Novice


Joined: 26 Jul 2019
Posts: 17

PostPosted: Wed Nov 18, 2020 4:16    Post subject: Reply with quote
You're saying my ISP does not allow ULAs and if they detect me using them in my network they invalidate my GUAs? Hmmm I guess I'll need to talk to them.

Also interestingly right now I have my ULAs distributed for like more than a day and GUAs still work.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Thu Nov 19, 2020 17:06    Post subject: Reply with quote
I didn't say that the ULA is causing the connection problems. That must be something going on between the router and modem. Perhaps you should reboot the modem instead of changing MAC.
i0ntempest
DD-WRT Novice


Joined: 26 Jul 2019
Posts: 17

PostPosted: Tue Nov 24, 2020 15:50    Post subject: Reply with quote
Thanks, I now have a somewhat stable setup when the GUAs don't get screwed. It's pretty random and I need to do more troubleshooting.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum