Skip to content
Ask AI

IPv6 Service Configuration Guide

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).

Configure the IPv6 address of the interface

Section titled “Configure the IPv6 address of the interface”

Table 1 Configure IPv6 address of the interface

PurposeCommandsDescription
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/MIPv6 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.
Section titled “Enable auto-generation of IPv6 link-local address for interfaces”

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 It is recommended to use the auto-generation method to avoid link-local address conflicts.

Table 2 Enable auto-generation of IPv6 link-local address for interfaces

PurposeCommandsDescription
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-

Table 3 IPv6 display and maintenance

PurposeCommandsDescription
Display interfaces with IPv6 addresses.show ipv6 interfaces-
  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

  1. Procedure

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

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.

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
  1. Verification

#Display RADV configuration on Device A.

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.

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