UniFi - USG/UDM Addressing: How to Implement IPv6 with DHCPv6 and Prefix Delegation


This article will provide guidance on how to provision IPv6 on any model of UniFi Security Gateway (USG) and UniFi Dream Machine (UDM). The article will explain how DHCPv6-PD and Static IPv6 are implemented, along with explaining how LAN clients obtain an IPv6 address.

  • DHCPv6-PD will not work with the USG behind another router that does not provide prefix delegation or sub-delegation.
  • Will not work with 6RD, DS-Lite, or other non-native IPv6 technologies.
  • Find the manual configuration method used for UniFi Controller software version older than v5.7 at the end of this article.As always, we recommend staying with the newest software and firmware versions at all times.
  • Please not that VPN is not supported on IPv6.

Table of Contents

  1. Introduction
  2. Steps: How to Implement IPv6 on a USG
  3. Testing & Verification


Back to Top

Depending on how the ISP has their IPv6 environment structured, the USG will either need to be configured with a static IPv6 address or receive an address via DHCPv6 on WAN. 

On the LAN side of this configuration, the setup may vary on the factors listed in the table above. If the USG has received a prefix delegation (PD) from the ISP, it will advertise the prefix that clients will use with stateless address auto-configuration (SLAAC) and the EUI-64 process. The static IPv6 addressing assumes you know the block of addressing that the clients are supposed to be using.  

Steps: How to Implement IPv6

Back to Top

WAN Configuration:

  1. In the UniFi Controller, navigate to Settings>Networks>Edit WAN Network
  2. In the IPv6 section select whether the Connection Type will be DHCPv6 or static IPv6 addressing. Other than that, it is only necessary to select the Prefix Delegation Size. 
  3. Click Save to finish.
User Tip:If unsure about the Prefix Delegation Size, your ISP should be able to provide this information. 

LAN Configuration:

  1. Navigate to Settings > Networks > Edit network > "Configure IPv6 network" section.
  2. If DHCPv6 was selected on WAN then prefix delegation will be used for "IPv6 Interface Type". 
  3. Make sure the correct WAN interface and IPv6 router advertisement are applied. 
  4. If static was chosen on WAN, the options for IPv6 gateway/subnet must be filled in along with applying the correct DHCPv6 range if desired. 
  5. After each selection has been made click save and the USG will be provisioned. 
NOTE:Prefix ID on LAN is typically best-kept blank. Situations such as an ISP giving a static prefix delegation and wanting to keep the same subnet on a particular interface are an exception.
User Tip:Once you have selected Prefix Delegation under IPv6 Interface Type, the settings are set to work properly, leave the default settings when using DHCPv6.

Testing & Verification

Back to Top

NOTE: Theshow commands below will not work on the UniFi Dream Machine models, but the ping6 will.

1. SSH into the USG.

2. Input the following commands:

show ipv6 route : will show IPv6 connected networks for both global and link-local address types.

show interfaces : will show IPv6 addressing under the configured interfaces. 

show ipv6 neighbors : will show IPv6 Neighbor Discovery (ND) information. 

ping6 google.com : will respond with icmp6 replies if configured correctly. 

When enabled, the clients should not need intervention to complete the SLAAC process. If the clients do not have an address then disabling/enabling the NIC should bring the addressing up. A test of connectivity from a client would be to "ping6 google.com" (OS X, Linux, BSD) or "ping -6 google.com" (Windows).

See other configurations in the UniFi Routing and Switching help center section.

Manual Configuration with .JSON File (Controller Version Pre-5.7)

Back to Top

Click here to see manual configuration instructions for UniFi Controller versions prior to v5.7. We recommend upgrading to the newest version available.


This article provides guidance on provisioning a UniFi Security Gateway (USG) and internal networks with basic IPv6 functionality with UniFi version 5.4.11+ for DHCPv6 WANs with prefix delegation.

  • This can only be done with a config.gateway.json file in stable release versions. Read this article for more information on the config.gateway.json file.
  • If your ISP uses a 56 or 48 PD size, the config.gateway.json should be changed accordingly.

Table of Contents

  1. Introduction
  2. Steps - How to Implement IPv6 on a USG
  3. Related Articles


Back to Top

The USG WAN interface will be assigned an IPv6 address from DHCPv6, and the LAN will be assigned an IPv6 subnet from the ISP-provided Prefix Delegation (PD). This requires the user's ISP to have an IPv6 infrastructure as well as providing IPv6 to the user as a service, including with PD.

On the LAN side, SLAAC (Stateless Address Autoconfiguration) will be used. This enables autoconfiguration of IPv6 addresses on connected clients. Stateless autoconfiguration or SLAAC is where the host is assigned a 64-bit prefix, and then the last 64 bits of their address is obtained with help of the EUI-64 process or obtained randomly for hosts with privacy-addressing enabled.

Steps - How to Implement IPv6 on a USG

Back to Top

  1. Download the corresponding config.gateway.json files here: USG or USG Pro
  2. Make the appropriate changes to the file if needed (see note below)
  3. Copy the config.gateway.json file to the UniFi controller and force a provision on the USG. Need help? reference our Related Articles for more information.
NOTE:If you have a VLAN-tagged WAN, the WAN interface will need to be changed accordingly in the file.


Related Articles

Back to Top

Intro to Networking - How to Establish a Connection Using SSH

Was this article helpful?
7 out of 28 found this helpful
Can't find what you're looking for?
Visit our worldwide community of Ubiquiti experts for more answers
Visit the Ubiquiti Community