Daniel Washburn

Daniel Washburn

Ubiquiti EdgeOS + DHCPv6-PD Recipe

Introduction

Many residental ISPs who provide native IPv6 connectivity provide a /64 delegation to end users by default. However it is often possible to request larger prefix delegations using DHCPv6-PD. This recipe demonstrates how to configure a device running Ubiquiti EdgeOS to request a /56 delegation.


For the impatient, you may skip straight to the commands here.


Background

My ISP is Time-Warner Cable (TWC), but these instructions should be applicable to any residential ISP which supports IPv6 Prefix Delegation.

These instructions have been tested on an Ubiquiti EdgeRouter Lite 3 (ERLite3) running EdgeOS v1.8.0. However, they should also work on any EdgeRouter model which is capable of running the 1.7.0 or 1.8.0 release.


Topology

eth0: WAN

eth1: LAN

eth2: DMZ


EdgeOS Commands

set interfaces ethernet eth0 dhcpv6-pd pd 1 interface eth1 prefix-id ':1'
set interfaces ethernet eth0 dhcpv6-pd pd 1 interface eth1 host-address '::1'
set interfaces ethernet eth0 dhcpv6-pd pd 1 interface eth1 service dhcpv6-stateless

set interfaces ethernet eth0 dhcpv6-pd pd 1 interface eth2 prefix-id ':2'
set interfaces ethernet eth0 dhcpv6-pd pd 1 interface eth2 host-address '::1'
set interfaces ethernet eth0 dhcpv6-pd pd 1 interface eth2 service dhcpv6-stateless

set interfaces ethernet eth0 dhcpv6-pd pd 1 prefix-length 56
set interfaces ethernet eth0 dhcpv6-pd rapid-commit enable

set interfaces ethernet eth0 ipv6 address autoconf
set interfaces ethernet eth0 ipv6 dup-addr-detect-transmits 1


Results

I’ve had the best luck with rebooting the router after applying the new configuration. After the restart, the WAN interface should be assigned an IPv6 address (TWC assigns a /128), and a /56 prefix should be delegated to your router for assignment.


The “... dhcpv6-pd pd 1 prefix-length 56” statement instructs the router to request a 56-bit prefix delegation, as recommended by RFC 6177. Other possible prefix lengths include 64, 60, or 48.


In this example, my ISP has assigned IPv6 address 2001:db8:ffc0:b4:397d:e940:b6b7:8126/128 to eth0, and delegated the 2001:db8:9d81:d700/56 subnet to my router.


The “... interface eth1 prefix-id ':1'” statement tells dhcpv6 to assign a four-bit Site Level Aggregation ID (SLA ID, between 00 and ff) of 01 to interface eth1 . This corresponds to the final two hexadecimal digits of the /64 subnet assigned to the interface.


In this example, the 2001:db8:9d81:d701::/64 subnet is assigned to eth1.


The “... interface eth1 host-address '::1'” statement tells the router to assign an address of 2001:db8:9d81:d701::1/64 to eth1


The “... interface eth1 service dhcpv6-stateless” statement instructs the router to provide DHCPv6 and SLAAC with Router Advertisement to attached clients on eth1. Other options options are slaac and dhcpv6-stateful.


The output below shows the subnets assigned to each interface.


admin@erlite3:~$ show interfaces ethernet
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address                        S/L  Description
---------    ----------                        ---  -----------
eth0         10.20.30.40/20                    u/u  WAN
             2001:db8:ffc0:b4:397d:e940:b6b7:8126/128
eth1         2001:db8:9d81:d701::1/64          u/u  LAN
eth2         2001:db8:9d81:d702::1/64          u/u  DMZ