2

My main router is an EdgeRouter X from Unifi. I'd like to set up my LAN with IPv6 even though my ISP is ipv4 only, hence my use of ULA (fd00:/8) addresses. This is mostly for testing, but also I have a few devices that need ipv6 for local communication. I'd like the router to be the DNS server (AAAA and/or A6 records) with dynamic updates from the clients. I can generate a ULA prefix myself. DHCPv6 would be a helpful plus. Is there any recipe for setting this up? I've looked everywhere I can find.

My ER-X is running the latest EdgeOS v2.0.9-hotfix.7.

I could set up a RPi as a separate ipv6 DNS server if I had to but would really prefer to use the ER-X since that's already my DNS/DHCP server for ipv4.

GaryO
  • 345

1 Answers1

0

So I have written up a post to answer something like this in a thread over at Ubiquiti forums. In your case since you do not have a globally-routable IPv6 prefix from your ISP, a bunch of problems just don't exist for you.

I use dnsmasq as my DHCP and DNS server for IPv4 devices. Hence I could not use ISC DHCP server for DHCPv6 either (?). If you want to use ISC DHCP, you could :

  1. Enable the ipv6 > router-advert section of the selected interface

    ubnt@ubnt# set interfaces switch switch0 ipv6 router-advert 
    
  2. Suitably configure the router-advert to enable DHCPv6 stateful addressing:

    ubnt@ubnt# edit interfaces switch switch0 ipv6 router-advert
    [edit interfaces switch switch0 ipv6 router-advert]
    ubnt@ubnt# set managed-flag true
    ubnt@ubnt# set other-config-flag true
    ubnt@ubnt# set prefix fdXX::/64 
    ubnt@ubnt# set prefix fdXX::/64 autonomous-flag false
    ubnt@ubnt# exit
    [edit]
    
  3. Set up the ULA for the interface in question of the router (ethX or switch0) : which you do by set interfaces switch switch0 address fdXX::1/64

But you said you want DNS integration of hostnames, which you can only do with dnsmasq - note that I have not yet succeeded in this part, although this is how dnsmasq is supposed to work. I do however have dnsmasq acting as a DHCPv6 server:

  1. Use the link above to activate dnsmasq as your DHCP server (obviously)
  2. Set up the range of addresses you want to hand out (adapting this for the edgeOS framework) : set service dns forwarding options dhcp-range=fd09::9,fd09::ffff,12h, set service dns forwarding options enable-ra
  3. Of course, you must still assign a suitable address within this subnet to the router interface set interface switch switch0 address fdXX::1/64.

In either case, you obviously have to commit and save. Or do all this in the Config Tree GUI on the web interface.

Milind R
  • 907
  • 1
  • 12
  • 29