---
title: IPv6 Service Configuration Guide
slug: aidc/ipv6-service-configuration-guide
description: IP Service Configuration Guide
createdAt: 2025-11-12T12:13:55.454Z
---

## <font color="#1d50a2">Introduction</font>

Internet Protocol version 6 (IPv6), also called IP Next Generation (IPng), is a second-generation network layer protocol and an upgraded version of Internet Protocol version 4 (IPv4). It is designed by the Internet Engineering Task Force (IETF).

## <font color="#1d50a2">Configure the IPv6 address of the interface</font>

<font color="#1d05a2">Table 1 Configure IPv6 address of the interface</font>

| **Purpose**                                 | **Commands**                                                                                                                                                                                      | **Description**                                                                                                                                                                         |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enter global configuration view.            | **configure terminal**                                                                                                                                                                            | -                                                                                                                                                                                       |
| Create interface configuration view.        | **interface** \{**ethernet** *interface-name*\[.*subinterface-number*] \| **link-aggregation** *lag-id*\[.*subinterface-number*] \| **vlan** *vlan-id* \| **loopback** loopback-id \| **mgmt** 0} | -                                                                                                                                                                                       |
| Configure an IPv6 address of the interface. | **ip address** *A\::B/M*                                                                                                                                                                          | IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed. |

:::hint{type="success"}
**NOTE:**
For the Ethernet ports, LAGIFs and VLANIFs, the ipv6 use-link-local attribute will be enabled automatically after configuring an IPv6 address, that is, the IPv6 link-local address will be generated automatically.
:::

## <font color="#1d50a2">Enable auto-generation of IPv6 link-local address for interfaces</font>

IPv6 link-local addresses are commonly used for neighbor discovery protocols and stateless autoconfiguration. There are two ways to generate:

- **Auto-generation**
  The device automatically generates a link-local address for an interface based on the link-local address prefix (FE80\::/10) and the link-layer address of the interface.
- **Manual Assignment**
  Users manually configure the IPv6 link-local address via the method described in [Configure the IPv6 address of the interface](https://v1.docs.asternos.com/aidc/ipv6-service-configuration-guide#configure-the-ipv6-address-of-the-interface)
  It is recommended to use the auto-generation method to avoid link-local address conflicts.

<font color="#1d05a2">Table 2 Enable auto-generation of IPv6 link-local address for interfaces</font>

| **Purpose**                                        | **Commands**                                                                                                                                             | **Description** |
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| Enter global configuration view.                   | **configure terminal**                                                                                                                                   | -               |
| Create interface configuration view.               | **interface** \{**ethernet** *interface-name* \[.*subinterface-number*] \| **link-aggregation** *lag-id*\[.*subinterface-number*] \| **vlan** *vlan-id*} | -               |
| Enable auto generation of IPv6 link-local address. | **ipv6 use-link-local**                                                                                                                                  | -               |

## <font color="#1d50a2">Display and Maintenance</font>

<font color="#1d05a2">Table 3 IPv6 display and maintenance</font>

| **Purpose**                             | **Commands**             | **Description** |
| --------------------------------------- | ------------------------ | --------------- |
| Display interfaces with IPv6 addresses. | **show ipv6 interfaces** | -               |

## <font color="#1d50a2">Typical Configuration Example</font>

### <font color="#1d50a2">Configure SLAAC</font>

1. Networking Requirements
   Multiple hosts are connected to Device A. It is expected to configure an IPv6 address on the interface of Device A, and notify to the hosts to obtain the IPv6 address in a stateful manner as well as other related configuration information.
2. Topology

::Image[]{src="https://app.archbee.com/api/optimize/zl-MD6bX0o2Ab3p8w66u1/wuNn_VksLO1ZxeofF-aHC-20251127-063050.png" size="50" width="271" height="246" position="center" caption="Figure 1 SLAAC topology" darkWidth="271" darkHeight="246" showCaption="true"}

3. Procedure

\#Create a VLAN, configure an IPv6 address, and add VLAN member.

```plaintext
sonic# configure terminal
sonic(config)# vlan 10
sonic(config-vlan-10)# exit
sonic(config)# interface vlan 10
sonic(config-vlanif-10)# ip address 2001::1/64
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# switchport access vlan 10
```

\#Enable RA advertisement, advertise IPv6 address prefixes, and set the M and O flag to 1.

```c
sonic(config)# radv enable
Please enter 'radv commit' to take effect
sonic(config)# radv commit
sonic(config)# interface vlan 10
sonic(config-vlanif-10)# radv prefix 2001::/64
Please enter 'radv commit' to take effect
sonic(config-vlanif-10)# radv managed-flag
Please enter 'radv commit' to take effect
sonic(config-vlanif-10)# radv other-config-flag
Please enter 'radv commit' to take effect
sonic(config-vlanif-10)# radv commit
```

4. Verification

\#Display RADV configuration on Device A.

```plaintext
sonic# show radv
Enabled: true
Global unicast only: false
+-------------+-----------+----------------+--------------------+-----------+-----------------+------------+---------+----------------------+---------------------+---------------------+
| Interface   | Prefix    | Managed_Flag   | Otherconfig_Flag   | OffLink   | No-autonomous   | Link_MTU   | RDNSS   | Route | Preference   | MaxRtrAdvInterval   | MinRtrAdvInterval   |
+=============+===========+================+====================+===========+=================+============+=========+======================+=====================+=====================+
| vlan10      | 2001::/64 | on             | on                 |           |                 |            |         |                      |                     |                     |
+-------------+-----------+----------------+--------------------+-----------+-----------------+------------+---------+----------------------+---------------------+---------------------+
```

\#The hosts can ping the gateway.

\#Check ND neighbors on Device A.

```plaintext
sonic# show ndp 2001::/64
Address                MacAddress         Iface        Vlan  Status
---------------------  -----------------  ---------  ------  ---------
2001::210:94ff:fe00:1  00:10:94:00:00:01  0/4            10  REACHABLE
2001::210:94ff:fe00:2  00:10:94:00:00:02  0/4            10  REACHABLE
2001::210:94ff:fe00:3  00:10:94:00:00:03  0/4            10  REACHABLE
2001::210:94ff:fe00:4  00:10:94:00:00:04  0/4            10  REACHABLE
2001::210:94ff:fe00:5  00:10:94:00:00:05  0/4            10  REACHABLE
2001::210:94ff:fe00:6  00:10:94:00:00:06  0/4            10  REACHABLE
2001::210:94ff:fe00:7  00:10:94:00:00:07  0/4            10  REACHABLE
2001::210:94ff:fe00:8  00:10:94:00:00:08  0/4            10  REACHABLE
2001::210:94ff:fe00:9  00:10:94:00:00:09  0/4            10  REACHABLE
2001::210:94ff:fe00:a  00:10:94:00:00:0a  0/4            10  REACHABLE
Total number of entries 10
```

