IPv6 Configuration
show ipv6 interfaces
Section titled “show ipv6 interfaces”[Command]
show ipv6 interfaces
[Purpose]
View IPv6 address information
[View]
System view
[Notes]
The physical state of the interface is admin.
[Use Cases]
sonic# show ipv6 interfacesInterface Master IPv6 address/mask MAC Address Admin/Oper----------- -------- ------------------- ----------------- ------------vlan10 2001::1008/64 60:eb:5a:01:1c:93 up/upshow ndp
Section titled “show ndp”[Command]
show ndp
show ndp ipv6-address A::B
show ndp iface {mgmt|ethernet interface_num } ipv6-address A::B
[Purpose]
View IPv6 neighbor table entry information
[View]
System view
[Use Cases]
sonic# show ndpAddress MacAddress Iface Vlan Status---------------------- ----------------- ---------- ------ ---------2022::9300 18:17:25:37:65:08 Ethernet50 - REACHABLE2022::9310 18:17:25:37:67:22 Ethernet49 - REACHABLEfd00:400::ae2b 94:e6:f7:25:3b:3b Ethernet11 400 REACHABLEshow nd ipv6 mac-check
Section titled “show nd ipv6 mac-check”[Command]
show nd ipv6 mac-check
[Purpose]
Show IPv6 MAC address detection configuration
[View]
System view
[Use Cases]
sonic# show nd ipv6 mac-check+-----------+| enabled |+===========+| false |+-----------+show nd rate-limit
Section titled “show nd rate-limit”[Command]
show nd rate-limit
[Purpose]
Show ND packets speed limit configuration
[View]
System view
[Use Cases]
sonic# show nd rate-limit+--------------+| rate-limit |+==============+| 2000 pps |+--------------+ip address
Section titled “ip address”[Command]
ip address A::B/mask
no ip address A::B/mask
[Purpose]
Specify the IPv6 address of the interface
[Parameter]
| Parameter | Description |
|---|---|
| A::B/mask | Total length is 128 bits in the format |
[View]
Interface view
[Use Cases]
sonic# configure terminalsonic(config)# interface vlan 100sonic(config-vlanif-100)# ip address fd00::1000/64ipv6 use-link-local
Section titled “ipv6 use-link-local”[Command]
ipv6 use-link-local no ipv6 use-link-local
[Purpose]
Use the interface’s IPv6 link-local address for BGP neighbor session establishment.
[View]
Interface view、lag view
[Use Cases]
sonic# configure terminalsonic(config)# interface ethernet 1sonic(config-if-1)# ipv6 use-link-local[Command]
nd ra
no nd ra
[Purpose]
Enable the interface to send RA packets
[View]
System configuration view
[Usage Scenario] Enabling this configuration causes the device to periodically broadcast RA messages. These messages contain information about IPv6 address prefixes and the Autonomous Address Configuration (Autoconfig) flag set to disabled. End-user devices connected to this router will generate IPv6 addresses using stateless configuration methods, as they will not rely on automatic address assignment.
[Use Cases]
sonic# configure terminalsonic(config)# nd rand ra autonomous {on|off}
Section titled “nd ra autonomous {on|off}”[Command]
nd ra autonomous {on|off }
[Purpose]
Set the flag bit of the stateless auto-configuration address in the RA packets
[View]
Vlan view, System configuration view
[Notes]
The default state is off, and the flag bit is 0.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 100sonic(config-vlan-100)# nd ra autonomous onnd ra dns-server
Section titled “nd ra dns-server”[Command]
nd ra dns-server A::B no nd ra dns-server A::B
[Purpose]
Set the DNS server address in the RA packets
[View]
Vlan view, System configuration view
[Use Cases]
sonic# configure terminalsonic(config)# vlan 100sonic(config-vlan-100)# nd ra dns-server 2400:3200:baba::1nd ra link-mtu
Section titled “nd ra link-mtu”[Command]
nd ra link-mtu mtu
[Purpose]
Set the link_mtu in the RA packet
[Parameter]
| Parameter | Description |
|---|---|
| mtu | Value range 0/1280-1500 |
[View]
Vlan view, System configuration view
[Usage Scenario] When enabled, this configuration specifies that the device includes an MTU option in its Router Advertisement (RA) messages. The value of the MTU option should match the MTU configured on the interface. Hosts receiving these RA messages will adjust the size of their transmitted packets based on the provided MTU value.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 100sonic(config-vlan-100)# nd ra link-mtu 1500nd ra managed-flag
Section titled “nd ra managed-flag”[Command]
nd ra managed-flag {on|off}
[Purpose]
Set the flag bit of the stateful auto-configuration address in RA packet (FLAG M)
[View]
Vlan view, System configuration view
[Usage Scenario] The managed-flag in an RA (Router Advertisement) message for IPv6 is a flag that indicates whether hosts receiving the RA message should use DHCPv6 (Dynamic Host Configuration Protocol for IPv6) to obtain additional network configuration information, such as IPv6 addresses, DNS servers, and more. When the managed-flag is set to 1 in an RA message, it means that hosts receiving this message should use DHCPv6 to acquire IPv6 addresses and other configuration information. This is typically used in specific network deployment scenarios where more fine-grained address management or specific network policies are required. If the managed-flag is set to 0, then hosts receiving the RA message can use automatic configuration methods, such as SLAAC (Stateless Address Autoconfiguration), to generate IPv6 addresses without the need for DHCPv6. This is suitable for many typical IPv6 network deployments, where DHCPv6 is primarily used for distributing other configuration options rather than assigning IPv6 addresses.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 100sonic(config-vlan-100)# nd ra managed-flag onnd ra other-flag
Section titled “nd ra other-flag”[Command]
nd ra other-flag {on|off}
[Purpose]
Set the flag bit for stateful auto-configuration of other information in RA packet (FLAG O)
[View]
Vlan view, System configuration view
[Usage Scenario] The “O” flag, which stands for the “other-flag” field in IPv6 Router Advertisement (RA) messages, is used to indicate whether hosts receiving the RA message should use other protocols for configuration. When the “O” flag (other-flag) in an RA message is set to 1, it means that hosts receiving this message should use other protocols to obtain additional network configuration information instead of using DHCPv6. This other protocol could be a custom protocol specific to the network environment or another configuration protocol. Setting the “O” flag allows network administrators to specify how hosts should obtain additional configuration information in special situations, not limited to the use of DHCPv6 or SLAAC. If the “O” flag is set to 0, then hosts receiving the RA message can follow standard IPv6 auto-configuration methods like SLAAC to generate IPv6 addresses, or they can use DHCPv6 to obtain configuration information, depending on the setting of the managed-flag field.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 100sonic(config-vlan-100)# nd ra other-flag onnd ra prefix
Section titled “nd ra prefix”[Command]
nd ra prefix A::B/mask
no nd ra prefix A::B/mask
[Purpose]
Set the prefix information in RA packet
[Parameter]
| Parameter | Description |
|---|---|
| A::B/mask | The format is X:X:X:X:X:X:X:X/x |
[View]
Vlan view, System configuration view
[Usage Scenario] In the default configuration, Router Advertisement (RA) messages do not automatically include address prefixes; you need to specify them manually. When a host receives an RA message that carries prefix information, it will update its local prefix information accordingly..
[Use Cases]
sonic# configure terminalsonic(config)# vlan 100sonic(config-vlan-100)# nd ra prefix fd00:100::/64nd ra route-information
Section titled “nd ra route-information”[Command]
nd ra route-information A::B/mask [preference {low|medium|high}]
no nd route-information A::B/mask
[Purpose]
Set the routing option information in RA packet
[Parameter]
| Parameter | Description |
|---|---|
| A::B/mask | The format is X:X:X:X:X:X:X:X/x |
[View]
Vlan view, System configuration view
[Usage Scenario] The RA packet contains routing option information, through which the device will publish specific routing information to the hosts of this segment. By default, the routing priority is medium.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 100sonic(config-vlan-100)# nd ra route-information fd00:100::/64sonic(config-vlan-100)# nd ra route-information ::/0 preference highnd rate-limit
Section titled “nd rate-limit”[Command]
nd rate-limit value
[Purpose]
Configure the device’s speed limit policy for IPv6 NDP interaction packet, by default, the speed limit rate is 2000pps
[Parameter]
| Parameter | Description |
|---|---|
| value | Value range: 100-1000, precision: 100, unit: pps |
[View]
System configuration view
[Use Cases]
sonic(config)# nd rate-limit 1000nd ipv6 mac-check enable
Section titled “nd ipv6 mac-check enable”[Command]
nd ipv6 mac-check enable
no nd ipv6 mac-check enable
[Purpose]
Enable detection of the legitimacy of ND interaction packet
[View]
System configuration view
[Usage Scenario] Detect whether the link-layer address and SMAC of the NDP interaction packet are the same, and if they are different, they are regarded as illegal packet.
[Use Cases]
sonic(config)# nd ipv6 mac-check enable