Command Line Reference
IP Service
IPv6 Configuration
20 min
ipv6 configuration show ipv6 interface \[command] show ipv6 interface \[purpose] view ipv6 address information \[view] system view \[comment] the physical state of the interface is admin \[ use cases ] sonic# show ipv6 interfaces interface master ipv6 address/mask mac address admin/oper \ vlan10 2001 1008/64 60\ eb 5a 01 1c 93 up/up 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 ndp address macaddress iface vlan status \ 2022 9300 18 17 25 37 65 08 ethernet50 reachable 2022 9310 18 17 25 37 67 22 ethernet49 reachable fd00 400 ae2b 94\ e6\ f7 25 3b 3b ethernet11 400 reachable 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 \[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 \[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 x❌x❌x\ x \ x /x \[view] interface view \[ use cases ] sonic# configure terminal sonic(config)# interface vlan 100 sonic(config vlanif 100)# ip address fd00 1000/64 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 terminal sonic(config)# interface ethernet 1 sonic(config if 1)# ipv6 use link local nd ra \[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 terminal sonic(config)# nd ra 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 \[comment] the default state is off, and the flag bit is 0 \[ use cases ] sonic# configure terminal sonic(config)# vlan 100 sonic(config vlan 100)# nd ra autonomous on 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 terminal sonic(config)# vlan 100 sonic(config vlan 100)# nd ra dns server 2400 3200\ baba 1 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 terminal sonic(config)# vlan 100 sonic(config vlan 100)# nd ra link mtu 1500 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 terminal sonic(config)# vlan 100 sonic(config vlan 100)# nd ra managed flag on 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 terminal sonic(config)# vlan 100 sonic(config vlan 100)# nd ra other flag on 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 terminal sonic(config)# vlan 100 sonic(config vlan 100)# nd ra prefix fd00 100 /64 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 terminal sonic(config)# vlan 100 sonic(config vlan 100)# nd ra route information fd00 100 /64 sonic(config vlan 100)# nd ra route information /0 preference high 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 1000 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
