New Member
Posts: 2
Registered: ‎02-10-2017

IPv6 Setup

Well, after much searching this was a bit harder to come across than I thought!

 

I recently purchased an EdgeRouter X and it is simply amazing that a $50 router can perform as amazingly as it does. However, IPv6 was a bit esoteric to figure out for me, probably doesn't help that I was thinking about it as if I was using IOS (where "int g0/1; ipv6 addr :1/64 eui-64; ipv6 ena; exit; ipv6 uni" enables it all) but with a bit of combing through documentation I did get it to work, not without having to hard reset router because I didn't use commit-confirm the first time! (Which is quite a nice feature)

 

Something I would like to make a small complaint about though, the setup wizard claims it will setup IPv6-PD, but it doesn't! It will setup the generic firewall rules, but it doesn't actually go far enough that IPv6 actually works.

 

Luckily, after some research it wasn't that hard to get working (and honestly, should be done by the wizard as well)

 

set interfaces ethernet eth0 dhcpv6-pd pd 0

set interfaces ethernet eth0 dhcpv6-pd pd 0 prefix-length 60

set interfaces ethernet eth0 dhcpv6-pd rapid-commit enable

set interfaces ethernet eth0 dhcpv6-pd pd 0 interface switch0

set interfaces ethernet eth0 dhcpv6-pd pd 0 interface switch0 host-address ::1

set interfaces ethernet eth0 dhcpv6-pd pd 0 interface switch0 prefix-id :1

set interfaces ethernet eth0 dhcpv6-pd pd 0 interface switch0 service slaac

 

set interfaces switch switch0 ipv6 router-advert prefix ::/64

set interfaces switch switch0 ipv6 router-advert managed-flag true

 

commit-confirm

confirm

save

And it works beautifully, the only other thing I did was add a static address to switch0 so it is also accessible via IPv6 instead of just 192.168.1.1, but that is just set interfaces switch switch0 address fd::1/128.

 

Either way, I hope this helps someone else out there, it seems like all the other forum posts tell people to do the dhcpv6-pd setup for each ethernet interface which is crazy in my opinion when it works just fine from the switch0 interface.

 

Established Member
Posts: 1,907
Registered: ‎03-02-2016
Kudos: 465
Solutions: 146

Re: IPv6 Setup

Nice work.

I would try it without the router-advert clauses, as I don't believe it needs them if you're using SLAAC. IPv6 works fine for me on both Time Warner and Comcast that way (requesting a /56 from TWC and a /60 from Comcast).
New Member
Posts: 2
Registered: ‎02-10-2017

Re: IPv6 Setup

Well, I might be wrong, especially considering most of what I know is more Cisco related, and well, Cisco *is* known for doing things strangely sometimes, but according to Cisco (and Wikipedia) slaac uses router advertisements as a fundamental part of the protocol.

 

Cisco Ref 1

Cisco Ref 2

Wikipedia Ref

 

Highlighted
Member
Posts: 232
Registered: ‎10-12-2016
Kudos: 58
Solutions: 17

Re: IPv6 Setup

[ Edited ]

@senkd is correct. When using SLAAC a Router Advertisement (RA) is definitely needed. But, with the EdgeRouter implementation an RA is created with the service slaac command within the WAN interface DHCPv6-PD context, so strictly speaking the RA configuration under the LAN interfaces is not needed.

 

For example, the following would create an RA on the LAN switch0 interface:

set interfaces ethernet eth0 dhcpv6-pd pd 0 interface switch0 service slaac

 

 

As per the command line 'help':

smf22@erx# set interfaces ethernet eth0 dhcpv6-pd pd 0 interface switch0 service
Possible completions:
  slaac         Stateless Address Autoconfiguration (address and RA)
  dhcpv6-stateless
                IPv6 DHCP Sever with SLAAC address and RA
  dhcpv6-stateful
                IPv6 DHCP Sever with SLAAC RA

[edit]

 

With this command applied within the WAN interface context the EdgeRouter creates a basic RA configuration for the LAN interfaces specified. The basic RA contains the source link-layer address (type 1) and the IPv6 Prefix (type 3) and is sufficient for the clients to determine the IPv6 prefix. If we look at the /etc/radvd.conf created by this we see the following:

interface switch0 {
#   This section was automatically generated by the Vyatta
#   configuration sub-system.  Do not edit it.
#
#   service type [slaac]
#
    IgnoreIfMissing on;
    AdvSendAdvert on;
    AdvManagedFlag off;
    AdvOtherConfigFlag off;
    prefix ::/64 {
          AdvOnLink on;
          AdvAutonomous on;
    };
};

 

If you want the RA on the LAN to contain more than the source link-layer address and the IPv6 Prefix, then that's when you need to configure the RA within the LAN interface context. For example if you also want to include the MTU (type 4) or Recursive DNS Servers (type 25), this configuration is applied under the LAN interface configuration.

 

If you want to see Router Solicitation sent from a client and Router Advertisement sent in response, use tcpdump with the following filters:

smf22@erx:~$ sudo tcpdump -n -i switch0.104 icmp6 and ip6[40]==133 or ip6[40]==134
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on switch0.104, link-type EN10MB (Ethernet), capture size 262144 bytes
09:44:19.660335 IP6 fe80::7528:323b:c7dd:d79a > ff02::2: ICMP6, router solicitation, length 8
09:44:19.661823 IP6 fe80::46d9:e7ff:fe50:5b7e > ff02::1: ICMP6, router advertisement, length 104

 

Regards

Ubiquiti Employee
Posts: 549
Registered: ‎01-06-2017
Kudos: 193
Solutions: 20

Re: IPv6 Setup

Please note that there are some issues with explicitly configured RAs and PD service slaac used together. We have addressed them and corrections will be available in the next firmware release but until then reboot solves most of the issues if they occur.
New Member
Posts: 2
Registered: ‎10-07-2017
Kudos: 1

Re: IPv6 Setup

[ Edited ]

@smf22 wrote:

When using SLAAC a Router Advertisement (RA) is definitely needed.


Being an IPv6-noob, I've spent a lot of time figuring out why my clients aren't getting IPv6-addresses even though the Unifi USG did. Turns out IPv6 Router Advertisement (RA) is necessary for it to work when you have a prefix delegation set from the ISP with DHCPv6 (/48 in my case) - which seems to be called SLAAC! It's not configured "automatically" as far as I can tell...

Thanks for the pointer! I hope the IPV6 configuration page in the controller becomes more clear in the beta stage Man Happy