My new unifi setup worked great, but somehow I was unable to get IPV6 working. I had an edgerouter before, so I knew the system should be compatible with my ISP.

Fixing ipv6

I had setup ipv6 on the controller by setting the default configuration for the wan and the lan as:

Unfortunately, my devices refused to connect via ipv6 and ipv6-test.com was reporting all failed.

First, I got the below from the help forum info

configure 

delete interfaces ethernet eth2 dhcpv6-pd 
set interfaces ethernet eth2 pppoe 0 dhcpv6-pd prefix-only
commit
exit

release dhcpv6-pd interface pppoe0
delete dhcpv6-pd duid 
renew dhcpv6-pd interface pppoe0

This wasn’t enough. Because it was all working on my previous edgerouter lite, I decided to compare the configuration in details. I extracted the configuration by downloading a backup from the edgerouter and inspecting the config.boot file. I compared it with the config.json files extracted from the usg pro via mca-ctrl -t dump-cfg. The format being different, yaml vs json, made it a bit painful, but I found the few different in the interfaces/ethernet/eth2/pppoe/0/ config, which can be tested by running the below on the usg pro directly:

configure
set interfaces ethernet eth2 pppoe 0 dhcpv6-pd pd 0 interface eth0 no-dns
set interfaces ethernet eth2 pppoe 0 dhcpv6-pd pd 0 interface eth0 host-address ::1
set interfaces ethernet eth2 pppoe 0 dhcpv6-pd pd 0 interface eth0 service slaac   
commit

After running these, ipv6 started working on all the devices. Of course this will be lost at the next provision, but all that was then needed is to add these to the config.gateway.json on the controller, with the following :

{
  "interfaces" : {
    "ethernet" : {
      "eth2" : {
        "pppoe" : {
          "0" : {
            "dhcpv6-pd" : {
              "pd" : {
                "0" : {
                  "interface" : {
                    "eth0" : {
                      "host-address" : "::1",
                      "service" : "slaac"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },	
}