Skip to content

Interface Configuration

By default, the management port (mgmt 0) of the switch does not have an IP address when shipped from factory. It can automatically obtain IP address through DHCP by connecting the management port to DHCP Server on the same network segment. At the same time, AsterNOS supports users to manually configure the management port IP, which can only have one IPv4 address and one IPv6 address. Multiple configurations will be overwritten.

Table 1 Management Port View

CommandPurpose
show interface mgmtDisplay management port configuration.

[Command]

show interface mgmt

[Purpose]

Display management port configuration.

[View]

Privileged User View

[Use Cases]

sonic# show interface mgmt
Management IP address = 10.250.0.138/24
Management Network Default Gateway = 10.250.0.254

Table 2 Management Port Config

CommandPurpose
interface mgmt 0Enter Management Port Configuration View
ip address A.B.C.D/M [gw A.B.C.D]Configure or modify the IPv4 address and gateway of the management port.
ipv6 address [A::B/M gw A::B]Configure or modify the IPv6 address and gateway of the management port.

[Command]

interface mgmt 0

[Purpose]

Enter Management Port Configuration View

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# interface mgmt 0

[Command]

ip address A.B.C.D/M [gw A.B.C.D]

[Purpose]

Configure or modify the IPv4 address and gateway of mgmt.

[Parameters]

ParameterDescription
A.B.C.D/MIPv4 address with prefix length.
A.B.C.D(Optional) IPv4 gateway address without prefix length.

[View]

Management Port Configuration View

[Notes]

IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed. Run command no ip address A.B.C.D/M [gw A.B.C.D] to delete IPv4 address configuration of mgmt.

[Use Cases]

sonic# configure terminal
sonic(config)# interface mgmt 0
sonic(config-mgmt-0)# ip address 10.250.0.103/24 gw 10.250.0.254

[Command]

ipv6 address A::B/M [gw A::B]

[Purpose]

Configure or modify the IPv6 address and gateway of mgmt.

[Parameters]

ParameterDescription
A::B/MIPv6 address with prefix length.
A::B(Optional) IPv6 gateway address without prefix length.

[View]

Management Port Configuration View

[Notes]

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. Run command no ip address A.B.C.D/M [gw A.B.C.D] to delete IPv6 address configuration of mgmt.

[Use Cases]

sonic# configure terminal
sonic(config)# interface mgmt 0
sonic(config-mgmt-0)# ipv6 address 2013::138/64 gw 2013::1

Table 3 Interface Attribute Information View

CommandPurpose
show interface descriptionDisplay description of interfaces.

[Command]

show interface description

[Purpose]

Display description of interfaces.

[View]

Privileged User View

[Use Cases]

sonic# show interface description
Interface Oper Admin Alias Description
--------------- ------ ------- ------- -------------
0/0 down up Y1 N/A
0/1 down up Y2 N/A
0/2 down up Y3 N/A
0/3 down up Y4 N/A
0/4 down up Y5 N/A
0/5 down up Y6 N/A
0/6 down up Y7 N/A
0/7 down up Y8 N/A
0/8 down up Y9 N/A
0/9 down up Y10 N/A

Table 4 Interface Status View

CommandPurpose
show interface summaryDisplay summary information about the status of interfaces.
show {ip|ipv6} interfacesDisplay IP address configuration of interfaces.
show interface [ethernet interface_name]Display information about the status of interfaces.
show counters interface [ethernet interface_name]Display statistics of interfaces.
show counters rif [{ethernet|vlan|link-aggregation} interface_name]Display statistics of Layer 3 ports.
clear counters {interface|rif}Clear the counters.
show link-delayDisplay interface linkup delay configuration.
show port-isolate summaryDisplay the port isolation group configuration.
show interface startup_delayDisplay the delayed startup time configuration of ports.

[Command]

show interface summary

[Purpose]

Display summary information about the status of interfaces.

[View]

Privileged User View

[Notes]

trunk indicates Layer 2 interface mode, routed indicates Layer 3 interface mode.

[Use Cases]

sonic# show interface summary
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
--------------- ----------- ------- ----- ----- ------- --------------- ------ ------- --------------- ----------
0/0 0 25G 9216 rs Y1 lag1 up up SFP/SFP+/SFP28 N/A
0/1 1 25G 9216 rs Y2 routed down up N/A N/A
0/2 2 25G 9216 rs Y3 routed down up N/A N/A
0/3 3 25G 9216 rs Y4 routed down up N/A N/A
0/4 4 25G 9216 rs Y5 routed up up SFP/SFP+/SFP28 N/A
0/5 5 25G 9216 rs Y6 routed down up N/A N/A
0/6 6 25G 9216 rs Y7 routed down up N/A N/A
0/7 7 25G 9216 rs Y8 routed down up N/A N/A
0/8 8 25G 9216 rs Y9 routed down up N/A N/A
0/9 9 25G 9216 rs Y10 routed down up N/A N/A
0/10 10 25G 9216 rs Y11 routed up up SFP/SFP+/SFP28 N/A
0/11 11 25G 9216 rs Y12 routed down up SFP/SFP+/SFP28 N/A
0/12 12 25G 9216 rs Y13 routed down up N/A N/A
0/13 13 25G 9216 rs Y14 routed down up N/A N/A
0/14 14 25G 9216 rs Y15 routed down up SFP/SFP+/SFP28 N/A
0/15 15 25G 9216 rs Y16 routed down up N/A N/A
0/16 16 25G 9216 rs Y17 routed down up SFP/SFP+/SFP28 N/A
0/17 17 25G 9216 rs Y18 routed down up N/A N/A
0/18 18 25G 9216 rs Y19 routed down up N/A N/A
0/19 19 25G 9216 rs Y20 routed down up N/A N/A
0/20 20 25G 9216 rs Y21 routed down up N/A N/A
0/21 21 25G 9216 rs Y22 routed down up N/A N/A
0/22 22 25G 9216 rs Y23 routed down up N/A N/A
0/23 23 25G 9216 rs Y24 routed down up N/A N/A
0/24 24 25G 9216 rs Y25 routed down up N/A N/A
0/25 25 25G 9216 rs Y26 routed up up SFP/SFP+/SFP28 N/A
0/26 26 25G 9216 rs Y27 routed down up N/A N/A
0/27 27 25G 9216 rs Y28 routed down up N/A N/A
0/28 28 25G 9216 rs Y29 trunk down up N/A N/A
0/29 29 25G 9216 rs Y30 trunk down up N/A N/A
0/30 30 25G 9216 rs Y31 routed down up N/A N/A
0/31 31 25G 9216 rs Y32 routed down up N/A N/A
0/32 32 25G 9216 rs Y33 routed up up SFP/SFP+/SFP28 N/A
0/33 33 25G 9216 rs Y34 routed down up N/A N/A
0/34 34 25G 9216 rs Y35 routed down up N/A N/A
0/35 35 25G 9216 rs Y36 routed down up N/A N/A
0/36 36 25G 9216 rs Y37 routed down up N/A N/A
0/37 37 25G 9216 rs Y38 routed down up N/A N/A
0/38 38 25G 9216 rs Y39 routed down up SFP/SFP+/SFP28 N/A
0/39 39 25G 9216 rs Y40 routed down up N/A N/A
0/40 40 25G 9216 rs Y41 routed down up N/A N/A
0/41 41 25G 9216 rs Y42 routed down up N/A N/A
0/42 42 25G 9216 rs Y43 routed down up N/A N/A
0/43 43 25G 9216 rs Y44 routed down up N/A N/A
0/44 44 25G 9216 rs Y45 routed down up N/A N/A
0/45 45 25G 9216 rs Y46 routed down up N/A N/A
0/46 46 25G 9216 rs Y47 routed down up N/A N/A
0/47 47 25G 9216 rs Y48 routed down up SFP/SFP+/SFP28 N/A
0/48 48,49,50,51 100G 9216 rs C1 routed up up QSFP28 or later N/A
0/52 52,53,54,55 100G 9216 rs C2 lag99 down up QSFP28 or later N/A
0/56 56,57,58,59 100G 9216 rs C3 routed down up QSFP28 or later N/A
0/60 64,65,66,67 100G 9216 rs C4 routed up up QSFP28 or later N/A
0/64 68,69,70,71 100G 9216 rs C5 routed up up QSFP28 or later N/A
0/68 72,73,74,75 100G 9216 rs C6 routed down up N/A N/A
0/72 76,77,78,79 100G 9216 rs C7 routed up up QSFP28 or later N/A
0/76 80,81,82,83 100G 9216 rs C8 routed down up N/A N/A
lag1 N/A 25G 9216 N/A N/A trunk up up N/A N/A
lag99 N/A 100G 9216 N/A N/A trunk down up N/A N/A

[Command]

show {ip|ipv6} interfaces

[Purpose]

Display IP address configuration of interfaces.

[View]

Privileged User View

[Use Cases]

sonic# show ip interfaces
Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP
----------- -------- ------------------- ------------ -------------- -------------
0/48 199.0.3.1/24 up/up N/A N/A
0/52 199.0.7.1/24 up/up N/A N/A
0/72 10.72.0.1/24 up/up N/A N/A
loopback0 10.1.0.34/32 up/up N/A N/A
vlan100 Vrf123 100.100.0.1/24 up/up N/A N/A
vlan200 Vrf123 200.200.0.1/24 up/up N/A N/A
vlan300 Vrf123 200.230.0.1/24 up/down N/A N/A
vlan400 200.240.0.1/24 up/down N/A N/A
vlan4094 99.0.0.1/24 up/up N/A N/A
mgmt 10.250.0.138/24 up/up N/A N/A
sonic# show ipv6 interfaces
Interface Master IPv6 address/mask Admin/Oper BGP Neighbor Neighbor IP
----------- -------- ------------------- ------------ -------------- -------------
0/48 2000::1/64 up/up N/A N/A

[Command]

show interface [ethernet interface_name]

[Purpose]

Display information about the status of interfaces.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

Privileged User View

[Use Cases]

sonic# show interface ethernet 0/208
0/208 is up, line protocol is up
Hardware is Eth
Mac address is 60:eb:5a:01:34:cf
Interface index is 208
Description is N/A
Mode of IPV4 address assignment: not-set
Mode of IPV6 address assignment: not-set
IP MTU 9216 bytes
LineSpeed 100.0G, Auto-negotiation off
Input statistics:
421 packets, 108,425 octets
414 Multicasts, 3 Broadcasts, 4 Unicasts
0 error, 0 discarded, 2 crc-error
Output statistics:
1,207,984,068 packets, 154,622,078,263 octets
454 Multicasts, 5 Broadcasts, 1,207,983,609 Unicasts
0 error, 3,322 discarded

show counters interface [ethernet interface_name]

Section titled “show counters interface [ethernet interface_name]”

[Command]

show counters interface [ethernet interface_name]

[Purpose]

Display statistics of interfaces.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

Privileged User View

[Use Cases]

sonic# show counters interfaces
IFACE STATE RX_OK RX_BPS RX_UTIL RX_ERR RX_DRP RX_OVR TX_OK TX_BPS TX_UTIL TX_ERR TX_DRP TX_OVR
--------------- ------- ------- -------- --------- -------- -------- -------- ------- -------- --------- -------- -------- --------
Ethernet0 D 0 N/A N/A 0 0 0 0 N/A N/A 0 0 N/A
Ethernet1 U 0 N/A N/A 0 0 0 27 N/A N/A 0 0 N/A
Ethernet2 U 0 N/A N/A 0 0 0 27 N/A N/A 0 0 N/A
Ethernet3 U 0 N/A N/A 0 0 0 35 N/A N/A 0 0 N/A
Ethernet4 X 0 N/A N/A 0 0 0 0 N/A N/A 0 0 N/A
sonic# show counters interfaces ethernet 0/1
Port: 0/1
Rx 1024to1518Pkts : 0
Rx 128-255Pkts : 0
Rx 1519to2047Pkts : 0
Rx 2048to4095Pkts : 0
Rx 256-511Pkts : 0
Rx 4096to9216Pkts : 0
Rx 512-1023Pkts : 0
Rx 64Pkts : 0
Rx 65-127Pkts : 0
Rx 9217to16383Pkts : 0
Rx Bcast : 0
Rx Bytes : 0
Rx CRC Alignment : 0
Rx Err : 0
Rx Mcast : 0
Rx Oversize : 0
Rx Pkts : 0
Rx Ucast : 0
Rx UnderSize : 0
Tx 1024to1518Pkts : 0
Tx 128-255Pkts : 9032
Tx 1519to2047Pkts : 0
Tx 2048to4095Pkts : 0
Tx 256-511Pkts : 0
Tx 4096to9216Pkts : 0
Tx 512-1023Pkts : 0
Tx 64Pkts : 0
Tx 65-127Pkts : 51
Tx 9217to16383Pkts : 0
Tx Bcast : 0
Tx Bytes : 1833670
Tx Err : 0
Tx Mcast : 9083
Tx Oversize : 0
Tx Pkts : 9083
Tx Ucast : 0
Section titled “show counters rif [{ethernet|vlan|link-aggregation} interface_name]”

[Command]

show counters rif [{ethernet|vlan|link-aggregation} interface_name]

[Purpose]

Display statistics of Layer 3 ports.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

Privileged User View

[Use Cases]

sonic# show counters rif
IFACE RX_OK RX_BPS RX_PPS RX_ERR TX_OK TX_BPS TX_PPS TX_ERR
----------- ------- -------- -------- -------- ------- -------- -------- --------
0/1 N/A N/A N/A N/A N/A N/A N/A N/A
0/1.1 N/A N/A N/A N/A N/A N/A N/A N/A
0/48 N/A N/A N/A N/A N/A N/A N/A N/A

[Command]

clear counters {interface|rif}

[Purpose]

Clear the counters.

[Parameters]

ParameterDescription
interfaceClear counters of all interfaces.
rifClear counters of router interfaces.

[View]

Privileged User View

[Use Cases]

sonic# clear counters interface
Cleared counters

[Command]

show link-delay

[Purpose]

Display interface linkup delay configuration.

[View]

Privileged User View

[Use Cases]

sonic# show link-delay
Port up delay : 5

[Command]

show port-isolate summary

[Purpose]

Display the port isolation group configuration.

[View]

Privileged User View

[Use Cases]

sonic# show port-isolate summary
+----------------+--------+-----------------------+-----------------------+
| Isolate Name | Type | Isolated from | Isolated to |
+================+========+=======================+=======================+
| test1 | port | 0/42 ,0/40 | 0/42 ,0/40 |
+----------------+--------+-----------------------+-----------------------+

[Command]

show interface startup_delay

[Purpose]

Display the delayed startup time configuration of ports.

[View]

Privileged User View

[Use Cases]

sonic# show interface startup_delay
Port start up delay time
----------- ---------------------
0/0 150
0/4 150
0/8 150
0/12 150
0/16 150
0/20 150
0/24 150
0/28 150
0/32 150
0/36 150
0/40 150
0/44 150
0/48 150
......

Table 5 Interfaces Status Config

CommandPurpose
interface ethernet interface_nameEnter Physical Interface Configuration View.
shutdownBring the interface down administratively.
speed speedSet the speed for physical interfaces.
autonegEnable autonegotiation of interfaces.
advertised-speeds {speed|all}Configure autonegotiation of interfaces speed
ip address {A.B.C.D/M|A::B/M} [secondary]Configure IP address for the interface.
fec {fc|rs}Set FEC mode of interfaces.
mtu mtuConfigure the MTU value on an interface.
description descriptionSpecify the description for the interface.
mac_address HH:HH:HH:HH:HH:HHSpecify a MAC address to the Layer 3 interface.
mac-address learningEnable MAC learning for the interface.
switchportChange a Layer 3 interface into a Layer 2 interface.
switchport {trunk|access} vlan vlan-idAdd the interface to a vlan.
switchport range vlan min-id max-idAdd the interface to bulk VLANs.
link-delay up delay-timeSet a delay time for interface state from down to up.
monitor-link group-name {uplink|downlink}Configure uplink and downlink.
breakout {4x25G[10G]|4x50G[10G]|2x200G[100G]|4x100G[50G]|2x100G[50G]|4x200G[100G]| 2x400G[200G]}Split high bandwidth ports into four low speed ports.
startup-delay delay-timeSet a delay time for interface state from down to up during system startup.
port-isolate enable isloate-group-nameCreate a port isolation group.
loopback-pkt-dropEnable the loopback packets not forwarding feature.
ipv6 use-link-localEnable the IPv6 link local address function of the interface

[Command]

interface ethernet interface_name

[Purpose]

Enter Physical Interface Configuration View.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1
sonic(config-if-0/1)# show this
!
interface ethernet 0/1

[Command]

shutdown

[Purpose]

Bring the interface down administratively.

[View]

Physical Interface Configuration View

[Notes]

Run command no shutdown to bring the interface up administratively.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1
sonic(config-if-0/1)# shutdown
sonic(config-if-0/1)# show this
!
interface ethernet 0/1
shutdown

[Command]

speed speed

[Purpose]

Set the speed for physical interfaces.

[Parameters]

ParameterDescription
speedThe speed is in Mbit. 1000/10000/25000/25000-R1/40000/50000-R1/50000-R2/100000/100000-R1/100000-R2/200000/200000-R2/200000-R4/400000/400000-R4/400000-R8/800000 are available.

[View]

Physical Interface Configuration View

[Notes]

When modifying the speed, if it does not match current FEC mode, system will give a prompt that you need to modify the FEC mode first. The FEC mode support for different speeds is as follows: 1GE/10GE interfaces do not support FEC, 25GE/100GE interfaces support fc and rs modes, and 40GE interfaces only support fc mode, 200GE/400GE interfaces only support rs mode. 100000-R2 means 100G rate mode for two lanes, which only supported by CX732Q-N and CX864E-N. The 25000-R1/50000-R1/50000-R2/100000-R1/100000-R4/200000-R2/200000-R4/400000-R4/400000-R8/800000 rate modes are only supported on CX864E-N for configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1
sonic(config-if-0/1)# speed 10000
sonic(config-if-0/1)# show this
!
interface ethernet 0/1
speed 10000

[Command]

autoneg

[Purpose]

Enable autonegotiation of interfaces.

[View]

Physical Interface Configuration View

[Notes]

Run command no autoneg to disable autonegotiation.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/2
sonic(config-if-0/1)# autoneg
sonic(config-if-0/1)# show this
!
interface ethernet 0/2
autoneg

[Command]

advertised-speeds {speed|all}

[Purpose]

Configure autonegotiation of interfaces rate.

[Parameters]

ParameterDescription
speedSpecify autonegotiation of interfaces rate
allAll speeds supported by the interface

[View]

Physical Interface Configuration View

[Notes]

After configuring autonegotiation of interfaces rate, run command no autoneg and autoneg commands to take effect. Run command no advertised-speeds to delete autonegotiation of interfaces rate.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/2
sonic(config-if-0/2)# advertised-speeds 40000
Notice: advertised_speed is set success, please operate autoneg off and on to enable advertised_speed become effective

[Command]

ip address {A.B.C.D/M|A::B/M} [secondary]

[Purpose]

Configure IP address for the interface.

[Parameters]

ParameterDescription
A.B.C.D/MIPv4 address with prefix length.
A::B/MIPv6 address with prefix length.
secondaryThe default is Primary IP, specifying this option means configuring as Secondary IP, which requires that the Secondary IP and Primary IP be in the same network segment.

[View]

Physical Interface Configuration View

[Notes]

IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed. 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. Run command no ip address {A.B.C.D/M|A::B/M} [secondary] to delete IP address configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/2
sonic(config-if-0/1)# ip address 3.3.3.6/24
sonic(config-if-0/1)# show this
!
interface ethernet 0/2
ip address 3.3.3.6/24

[Command]

fec {fc|rs}

[Purpose]

Set FEC mode of interfaces.

[View]

Physical Interface Configuration View

[Notes]

1GE/10GE ports do not support FEC, 25GE/100GE ports support fc and rs modes. 40GE ports on CX308P-48Y-N-V2 support fc mode, and other models do not support FEC, 200G/400G/800G interfaces only support rs mode, 400G interface on CX732Q-N and CX732Q-N-V2 supports disabling FEC after slowing down to 100G rate. Run command no fec to disable FEC.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1
sonic(config-if-0/1)# fec rs

[Command]

mtu mtu

[Purpose]

Configure the MTU value on an interface.

[Parameters]

ParameterDescription
mtuMaximum Transmission Unit, the range is from 1312 to 9216.

[View]

Physical Interface Configuration View

[Notes]

The default is 9216 Bytes.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1
sonic(config-if-0/1)# mtu 1518
sonic(config-if-0/1)# show this
!
interface ethernet 0/1
mtu 1518

[Command]

description description

[Purpose]

Specify the description for the interface.

[Parameters]

ParameterDescription
descriptionIn string form.

[View]

Physical Interface Configuration View

[Notes]

Run command no description to delete description.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1
sonic(config-if-0/1)# description abc
sonic(config-if-0/1)# show this
!
interface ethernet 0/1
description abc

[Command]

mac_address HH:HH:HH:HH:HH:HH

[Purpose]

Specify a MAC address to the Layer 3 interface.

[Parameters]

ParameterDescription
HH:HH:HH:HH:HH:HHMAC address, not case sensitive.

[View]

Physical Interface Configuration View

[Notes]

The default is the MAC of the switch; Run command no mac_address to restore the MAC of the Layer 3 interface to default.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/2
sonic(config-if-0/2)# mac-address 18:17:25:37:67:af
sonic(config-if-0/2)# show this
!
interface ethernet 0/2
mac-address 18:17:25:37:67:af

[Command]

mac-address learning

[Purpose]

Enable MAC learning for the interface.

[View]

Physical Interface Configuration View

[Notes]

The interface to be operated should be added to a VLAN. MAC learning is enabled by default. Run command no mac-address learning to disable MAC learning for the interface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/2
sonic(config-if-0/2)# no mac-address learning
sonic(config-if-0/2)# show this
!
interface ethernet 0/2
no mac-address learning

[Command]

switchport

[Purpose]

Change a Layer 3 interface into a Layer 2 interface.

[View]

Physical Interface Configuration View

[Notes]

Run command no switchport to change a Layer 2 interface into a Layer 3 interface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/2
sonic(config-if-0/2)# switchport
sonic(config-if-0/2)# show this
!
interface ethernet 0/2
switchport
sonic(config-if-0/2)# no switchport
sonic(config-if-0/2)# show this
!
interface ethernet 0/2

[Command]

switchport {trunk|access} vlan vlan-id

[Purpose]

Add the interface to a vlan.

[Parameters]

ParameterDescription
accessAdd to VLAN as untagged.
trunkAdd to VLAN as tagged.
vlan-idVLAN ID, the range is [1,4094].

[View]

Physical Interface Configuration View

[Notes]

An interface can only be added to one VLAN as untagged, but it can be added to multiple VLANs as tagged. The VLAN ID of the untagged VLAN will be set as PVID of the interface; Run command no switchport vlan vlan-id to remove the interface from specified VLAN; Run command no switchport to remove the interface from all VLANs and change to Layer 3 port.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# switchport access vlan 300
sonic(config-if-0/0)# show this
!
interface ethernet 0/0
switchport access vlan 300

[Command]

switchport range vlan min-id max-id

[Purpose]

Add the interface to bulk VLANs.

[Parameters]

ParameterDescription
min-idStarting VLAN ID, the range is [1,4094].
max-idEnding VLAN ID, the range is [1,4094].

[View]

Physical Interface Configuration View/LAGIF Configuration View

[Notes]

Run command no switchport vlan range min-id max-id to remove the interface from bulk VLANs.

[Use Cases]

sonic# configure terminal
sonic(config)# vlan range 10 20
sonic(config)# interface ethernet 0/4
sonic(config-if-0/4)# switchport range vlan 10 20

[Command]

link-delay up delay-time

[Purpose]

Set a delay time for interface state from down to up.

[Parameters]

ParameterDescription
delay-timeThe delay time is in seconds and takes the value in the range 0 or [2-10]. The default is 0.

[View]

Global Configuration View

[Notes]

The purpose is that when the operation status of an interface goes from down to up, the interface will go through a delay time before going up again. This function is disabled on interfaces by default.

[Use Cases]

sonic# configure terminal
sonic(config)# link-delay up 2

[Command]

monitor-link group-name {uplink|downlink}

[Purpose]

Configure uplink and downlink.

[Parameters]

ParameterDescription
group-nameSpecify the monitor-link group name.

[View]

Physical Interface Configuration View

[Notes]

Run command no monitor-link group-name to delete monitor-link interface configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# monitor-link test downlink

breakout {4x25G[10G]|4x50G[10G]|2x200G[100G]|4x100G[50G]|2x100G[50G]|4x200G[100G]| 2x400G[200G]}

Section titled “breakout {4x25G[10G]|4x50G[10G]|2x200G[100G]|4x100G[50G]|2x100G[50G]|4x200G[100G]| 2x400G[200G]}”

[Command]

breakout {4x25G[10G]|4x50G[10G]|2x200G[100G]|4x100G[50G]|2x100G[50G]|4x200G[100G]|2x400G[200G]}

[Purpose]

Split high bandwidth ports into four low speed ports.

[Parameters]

ParameterDescription
4x25G[10G]Split into four 25G ports, supported on 100GE、200GE、400GE ports.
4x50G[10G]Split into four 50G ports, supported on 200GE ports.
2x200G[100G]Split into two 200G ports, supported on 400GE ports.
4x100G[50G]Split into four 100G ports, supported on 400GE ports.
2x100G[50G]Split into two 50G ports, supported on 200GE ports.
4x200G[100G]Split into four 200G ports, supported on 800GE ports.
2x400G[200G]Split into two 400G ports, supported on 800GE ports.

[View]

Physical Interface Configuration View

[Notes]

Please delete the configuration related to this interface before breakout. The system will give a prompt after the breakout is successful. Run command no breakout undoes the breakout configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# breakout 4x25G[10G]
Start to breakout. Do not interrupt the breakout; otherwise, the configuration may be abnormal!
Breakout process got successfully completed.
Please note loaded setting will be lost after system reboot. To preserve setting, run write.

[Command]

startup-delay delay-time

[Purpose]

Set a delay time for interface state from down to up during system startup.

[Parameters]

ParameterDescription
delay-timeThe delay time is in seconds and takes the range is from 1 to 65535.

[View]

Physical Interface Configuration View

[Notes]

Run command no startup-delay to delete interface startup-delay configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# startup-delay 150

[Command]

port-isolate enable isloate-group-name

[Purpose]

Create a port isolation group.

[Parameters]

ParameterDescription
isloate-group-namePort isolation group name.

[View]

Physical Interface Configuration View

[Notes]

Currently only supported on CX308P-48Y-N-V2 and CX532P-N-V2. The ports in the isolation group are bi-directionally isolated. Run command no port-isolate enable to delete the port isolation group.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/42
sonic(config-if-0/42)# port-isolate enable test1
sonic(config-if-0/42)# show this
!
interface ethernet 0/42
fec rs
mtu 9216
port-isolate enable test1
speed 25000

[Command]

loopback-pkt-drop

[Purpose]

Enable the loopback packets not forwarding feature.

[View]

Physical Interface Configuration View

[Notes]

Currently not supported on CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# loopback-pkt-drop

[Command]

ipv6 use-link-local

[Purpose]

Enable the IPv6 link local address function of the interface.

[View]

Physical Interface Configuration View

[Notes]

Setting an IPv6 address will automatically enable this feature. Run command no ipv6 use-link-local to disable this feature.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# ipv6 use-link-local

Table 6 Subinterface Status View

CommandPurpose
show sub-interface [ethernet interface_name.subinterface-number]Display information about the status of subinterfaces.
show {ip|ipv6} interfacesDisplay IP address configuration of subinterfaces.

show sub-interface [ethernet interface_name.subinterface-number]

Section titled “show sub-interface [ethernet interface_name.subinterface-number]”

[Command]

show sub-interface [ethernet interface_name.subinterface-number]

[Purpose]

Display information about the status of subinterfaces.

[Parameters]

ParameterDescription
interface_nameParent interface name. (eg.0/1)
subinterface-numberSubinterface number.

[View]

Privileged User View

[Use Cases]

sonic# show sub-interface
Sub port interface Speed MTU vlan Admin Type
-------------------- ------- ----- ------ ------- --------------------
0/0.2 25G 9100 2 up 802.1q-encapsulation

[Command]

show {ip|ipv6} interfaces

[Purpose]

Display IP address configuration of subinterfaces.

[View]

Privileged User View

[Use Cases]

sonic# show ip interfaces
Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP
----------- -------- ------------------- ------------ -------------- -------------
0/0.2 2.0.0.1/24 up/down N/A N/A
0/48 199.0.3.1/24 up/up N/A N/A
0/52 199.0.7.1/24 up/up N/A N/A
loopback0 10.1.0.34/32 up/up N/A N/A
mgmt 10.250.0.138/24 up/up N/A N/A

Table 7 Subinterface Config

CommandPurpose
interface {ethernet|link-aggregation} interface_name.subinterface-numberCreate a subinterface.
mtu mtuConfigure the MTU value on a subinterface.
shutdownBring the subinterface down administratively.
ip address {A.B.C.D/M|A::B/M} [secondary]Configure IP address for the subinterface.
mac_address HH:HH:HH:HH:HH:HHSpecify a MAC address to the subinterface.
Section titled “interface {ethernet|link-aggregation} interface_name.subinterface-number”

[Command]

interface {ethernet|link-aggregation} interface_name.subinterface-number

[Purpose]

Create a subinterface.

[Parameters]

ParameterDescription
interface_nameParent interface name. (eg.0/1)
subinterface-numberSubinterface number.

[View]

Global Configuration View

[Notes]

Run command no interface {ethernet|link-aggregation} interface_name.subinterface-number to delete the subinterface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1.1
sonic(config-if-0/1.1)# show this
!
interface ethernet 0/1.1
sonic(config)# no interface ethernet 0/1.1

[Command]

mtu mtu

[Purpose]

Configure the MTU value on a subinterface.

[Parameters]

ParameterDescription
mtuMaximum Transmission Unit, the range is from 1312 to 9216. The default is 9216 Bytes.

[View]

Subinterface Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1.1
sonic(config-if-0/1.1)# mtu 2000
sonic(config-if-0/1.1)# show this
!
interface ethernet 0/1.1
mtu 2000

[Command]

shutdown

[Purpose]

Bring the subinterface down administratively.

[View]

Subinterface Configuration View

[Notes]

Run command no shutdown to bring the sub-interface up administratively.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/1.1
sonic(config-if-0/1.1)# shutdown
sonic(config-if-0/1.1)# show this
!
interface ethernet 0/1.1
shutdown

[Command]

ip address {A.B.C.D/M|A::B/M} [secondary]

[Purpose]

Configure IP address for the subinterface.

[Parameters]

ParameterDescription
A.B.C.D/MIPv4 address with prefix length.
A::B/MIPv6 address with prefix length.
secondaryThe default is Primary IP, specifying this option means configuring as Secondary IP, which requires that the Secondary IP and Primary IP be in the same network segment.

[View]

Subinterface Configuration View

[Notes]

IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed. 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. Run command no ip address {A.B.C.D/M|A::B/M} [secondary]to delete IP address configuration of the subinterface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/2.2
sonic(config-if-0/2.2)# ip address 3.3.3.6/24
sonic(config-if-0/2.2)# show this
!
interface ethernet 0/2.2
ip address 3.3.3.6/24

[Command]

mac_address HH:HH:HH:HH:HH:HH

[Purpose]

Specify a MAC address to the subinterface.

[Parameters]

ParameterDescription
HH:HH:HH:HH:HH:HHMAC address, not case sensitive.

[View]

Subinterface Configuration View

[Notes]

The default is the MAC of the switch. Run command no mac_address to restore the MAC of the sub-interface to default.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/2.2
sonic(config-if-0/2.2)# mac-address 18:17:25:37:67:af
sonic(config-if-0/2.2)# show this
!
interface ethernet 0/2.2
mac-address 18:17:25:37:67:af

Table 8 Loopback View

CommandPurpose
show {ip|ipv6} interfacesDisplay IP address configuration of loopback interfaces.

[Command]

show {ip|ipv6} interfaces

[Purpose]

Display IP address configuration of loopback interfaces.

[View]

Privileged User View

[Use Cases]

sonic# show ip interfaces
Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP
----------- -------- ------------------- ------------ -------------- -------------
0/48 199.0.3.1/24 up/up N/A N/A
0/52 199.0.7.1/24 up/up N/A N/A
0/72 10.72.0.1/24 up/up N/A N/A
loopback0 10.1.0.34/32 up/up N/A N/A
mgmt 10.250.0.138/24 up/up N/A N/A

Table 9 Loopback Config

CommandPurpose
interface loopback loopback-idEnter Loopback Interface Configuration View.
ip address {A.B.C.D/M|A::B/M}Configure IP address for the loopback interface.

[Command]

interface loopback loopback-id

[Purpose]

Enter Loopback Interface Configuration View

[Parameters]

ParameterDescription
loopback-idLoopback interface number, integer form, range from 0 to 999.

[View]

Global Configuration View

[Notes]

Loopback0 has been created by default and cannot be deleted. Run command no interface loopback loopback-id to delete loopback interface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface loopback 1
sonic(config-loif-1)# show this
!
interface loopback 1

[Command]

ip address {A.B.C.D/M|A::B/M}

[Purpose]

Configure IP address for the loopback interface.

[Parameters]

ParameterDescription
A.B.C.D/MIPv4 address with prefix length.
A::B/MIPv6 address with prefix length.

[View]

Loopback Interface Configuration View

[Notes]

Run command no ip address {A.B.C.D/M|A::B/M} to delete IP address configuration of the loopback interface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface loopback 2
sonic(config-loif-2)# ip address 3.3.3.6/24
sonic(config-loif-2)# show this
!
interface loopback 2
ip address 3.3.3.6/24

Table 10 CRC Config

CommandPurpose
crc-check enableEnable CRC error packets detection.
crc-check threshold interval countSet the threshold of CRC error detection.

[Command]

crc-check enable

[Purpose]

Enable CRC error packets detection.

[View]

Global Configuration View

[Notes]

Run command no crc-check enable to disable CRC error packets detection.

[Use Cases]

sonic(config)# crc-check enable
Created symlink /etc/systemd/system/sonic.target.wants/counterscheckmgrd.service/lib/systemd/system/counterscheckmgrd.service.
sonic(config)# no crc-check enable
Removed /etc/systemd/system/sonic.target.wants/counterscheckmgrd.service.

[Command]

crc-check threshold interval count

[Purpose]

Set the threshold of CRC error detection.

[Parameters]

ParameterDescription
intervalSet the interval in seconds, the range is 2~60, the default value is 10.
countSet the maximum count of CRC error packets in the range of [1,65535], the default value is 100.

[View]

Global Configuration View

[Notes]

If the number of CRC error packets during the interval time exceeds the count number, the threshold is considered to be exceeded. When the received CRC error packets exceed the threshold, the system will automatically set the interface to errdown.

[Use Cases]

sonic(config)# crc-check threshold 10 100

Table 11 Transceiver View

CommandPurpose
show interface transceiver [ethernet interface_name] {eeprom [detail]|lpmode|presence}Display optical module information of interfaces.

show interface transceiver [ethernet interface_name] {eeprom [detail]|lpmode|presence}

Section titled “show interface transceiver [ethernet interface_name] {eeprom [detail]|lpmode|presence}”

[Command]

show interface transceiver [ethernet interface_name] {eeprom [detail]|lpmode|presence}

[Purpose]

Display optical module information of interfaces.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

Privileged User View

[Use Cases]

sonic# show interface transceiver ethernet 0/0 eeprom detail
0/0 : SFP EEPROM detected
Connector: MPOx12
Encoding: NRZ
Extended Identifier: Power Class 4(3.5W max), CDR present in Rx Tx
Extended RateSelect Compliance: Unknown
Identifier: QSFP28 or later
Length Cable Assembly(m): 50
Nominal Bit Rate(100Mbs): 255
Specification compliance:
Vendor Date Code(YYYY-MM-DD Lot): 2022-07-08
Vendor Name: Teraspek
Vendor OUI: 00-00-00
Vendor PN: TSQ885S101T1
Vendor Rev: 00
Vendor SN: 22070073
ChannelMonitorValues:
RX1Power: 0.8422dBm
RX2Power: 0.6971dBm
RX3Power: 1.6414dBm
RX4Power: 1.1458dBm
TX1Bias: 6.0740mA
TX2Bias: 6.2960mA
TX3Bias: 5.9220mA
TX4Bias: 6.5100mA
ChannelThresholdValues:
RxPowerHighAlarm : 4.4000dBm
RxPowerHighWarning: 3.4001dBm
RxPowerLowAlarm : -13.2975dBm
RxPowerLowWarning : -10.3012dBm
TxBiasHighAlarm : 10.0000mA
TxBiasHighWarning : 8.5000mA
TxBiasLowAlarm : 2.0000mA
TxBiasLowWarning : 3.0000mA
ModuleMonitorValues:
Temperature: 32.9570C
Vcc: 3.2961Volts
ModuleThresholdValues:
TempHighAlarm : 75.0000C
TempHighWarning: 70.0000C
TempLowAlarm : -5.0000C
TempLowWarning : 0.0000C
VccHighAlarm : 3.6300Volts
VccHighWarning : 3.4650Volts
VccLowAlarm : 2.9700Volts
VccLowWarning : 3.1350Volts

Table 12 Transceiver Config

CommandPurpose
cmis enableEnable CMIS management.
lpmode onEnable low power consumption of the interface.
transceiver frequency frequencyConfigure the frequency of the optical module.
transceiver transmitter signal-power powerConfigure the signal transmission power of the optical module.

[Command]

cmis enable

[Purpose]

Enable CMIS management.

[View]

Global Configuration View

[Notes]

This command is designed for optical modules that support CMIS protocol to improve the stability of interface signal. By importing a JSON file, customizing and modifying the Signal Integrity configuration of the CMIS optical module, then enable CMIS management after restarting the device. After enabling this function for about 5 minutes, the SI information of the configured CMIS optical module can be read normally. Run command no cmis enable to disable CMIS management. Executing enable and disable commands will cause down/up of optical modules that support CMIS protocol but will not affect optical modules that do not support CMIS protocol.

[Use Cases]

Step 1: show the information of the optical module, find the Vendor Name and Vendor PN information.

spine# show interface transceiver ethernet 0/128 eeprom detail
0/128 : SFP EEPROM detected
Active App Selection Host Lane 1: 1
Active App Selection Host Lane 2: 1
Active App Selection Host Lane 3: 1
Active App Selection Host Lane 4: 1
Active App Selection Host Lane 5: 1
Active App Selection Host Lane 6: 1
Active App Selection Host Lane 7: 1
Active App Selection Host Lane 8: 1
Application Advertisement: 400GAUI-8 C2M (Annex 120E) - Host Assign (0x1) - Active Cable assembly with BER < 2.6x10^-4 - Media Assign (0x1)
CMIS Revision: 4.0
Connector: No separable connector
Encoding: N/A
Extended Identifier: Power Class 4 (8.0W Max)
Extended RateSelect Compliance: N/A
Hardware Revision: 1.0
Host Electrical Interface: 400GAUI-8 C2M (Annex 120E)
Host Lane Assignment Options: 1
Host Lane Count: 8
Identifier: QSFP-DD Double Density 8X Pluggable Transceiver
Length Cable Assembly(m): 3.0
Media Interface Code: Active Cable assembly with BER < 2.6x10^-4
Media Interface Technology: 850 nm VCSEL
Media Lane Assignment Options: 1
Media Lane Count: 8
Nominal Bit Rate(100Mbs): 0
Specification compliance: active_cable_media_interface
Supported Max Laser Frequency: N/A GHz
Supported Max TX Power: 0.0 dBm
Supported Min Laser Frequency: N/A GHz
Supported Min TX Power: 0.0 dBm
Vendor Date Code(YYYY-MM-DD Lot): 2023-08-19
Vendor Name: OEM
Vendor OUI: 00-00-00
Vendor PN: QSFPDD-400G-AOC
Vendor Rev: 10
Vendor SN: SN23080288
Active Firmware Version: N/A
Inactive Firmware Version: N/A
ChannelMonitorValues:
RX1Power: 1.69dBm
RX2Power: 1.686dBm
RX3Power: 1.598dBm
RX4Power: 1.59dBm
RX5Power: 1.014dBm
RX6Power: 1.257dBm
RX7Power: 1.182dBm
RX8Power: 1.239dBm
TX1Bias: 7.474mA
TX1Power: 0.678dBm
TX2Bias: 7.466mA
TX2Power: 0.612dBm
TX3Bias: 7.46mA
TX3Power: 0.66dBm
TX4Bias: 7.44mA
TX4Power: 0.662dBm
TX5Bias: 7.48mA
TX5Power: 0.658dBm
TX6Bias: 7.472mA
TX6Power: 0.591dBm
TX7Bias: 7.456mA
TX7Power: 0.64dBm
TX8Bias: 7.45mA
TX8Power: 0.642dBm
ModuleMonitorValues:
Temperature: 44.004C
Vcc: 3.251Volts
ChannelThresholdValues:
RxPowerHighAlarm : 7.0dBm
RxPowerHighWarning: 4.0dBm
RxPowerLowAlarm : -10.0dBm
RxPowerLowWarning : -7.001dBm
TxBiasHighAlarm : 12.0mA
TxBiasHighWarning : 10.0mA
TxBiasLowAlarm : 2.0mA
TxBiasLowWarning : 4.0mA
TxPowerHighAlarm : 7.0dBm
TxPowerHighWarning: 4.0dBm
TxPowerLowAlarm : -9.5dBm
TxPowerLowWarning : -6.501dBm
ModuleThresholdValues:
TempHighAlarm : 80.0C
TempHighWarning: 70.0C
TempLowAlarm : -10.0C
TempLowWarning : 0.0C
VccHighAlarm : 3.63Volts
VccHighWarning : 3.465Volts
VccLowAlarm : 2.97Volts
VccLowWarning : 3.135Volts

Check the interface status and read the alias number of the interface

spine# show interface summary
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
--------------- ------------------------------- ------- ----- ----- ------- --------------- ------ ------- ----------------------------------------------- ----------
0/0 217,218,219,220,221,222,223,224 400G 9216 rs QC1 trunk down up QSFP-DD Double Density 8X Pluggable Transceiver N/A
0/8 209,210,211,212 100G 9216 rs QC2 trunk down up N/A N/A
0/16 249,250,251,252 100G 9216 rs QC3 trunk down up N/A N/A
0/24 241,242,243,244 100G 9216 rs QC4 routed down up N/A N/A
0/32 233,234,235,236 100G 9216 rs QC5 routed down up N/A N/A
0/40 225,226,227,228,229,230,231,232 400G 9216 rs QC6 trunk down up QSFP-DD Double Density 8X Pluggable Transceiver N/A
0/48 201,202,203,204 100G 9216 rs QC7 lag48 up up QSFP28 or later N/A
0/56 193,194,195,196 100G 9216 rs QC8 lag56 up up QSFP28 or later N/A
0/64 185,186,187,188 100G 9216 rs QC9 lag64 up up QSFP28 or later N/A
0/72 177,178,179,180 100G 9216 rs QC10 lag72 up up QSFP28 or later N/A
0/80 169,170,171,172 100G 9216 rs QC11 routed up up QSFP28 or later N/A
0/88 161,162,163,164 100G 9216 rs QC12 routed up up QSFP28 or later N/A
0/96 153,154,155,156 100G 9216 rs QC13 routed up up QSFP28 or later N/A
0/104 145,146 100G 9216 rs QC14 routed down up N/A N/A
0/112 137,138,139,140 100G 9216 rs QC15 trunk down up N/A N/A
0/120 129,130,131,132 100G 9216 rs QC16 trunk down up N/A N/A
0/128 121,122,123,124,125,126,127,128 400G 9216 rs QC17 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A
0/136 113,114,115,116,117,118,119,120 400G 9216 rs QC18 routed up up QSFP-DD Double Density 8X Pluggable Transceiver N/A
0/144 105,106,107,108,109,110,111,112 400G 9216 rs QC19 routed down up N/A N/A
0/152 97,98,99,100,101,102,103,104 400G 9216 rs QC20 routed down up N/A N/A
0/160 89,90,91,92 100G 9216 rs QC21 routed down up N/A N/A
0/168 81,82,83,84 100G 9216 rs QC22 routed up up QSFP28 or later N/A
0/176 65,66,67,68 100G 9216 rs QC23 routed down up N/A N/A
0/184 73,74,75,76,77,78,79,80 400G 9216 rs QC24 routed down up QSFP-DD Double Density 8X Pluggable Transceiver N/A
0/192 49,50,51,52,53,54,55,56 400G 9216 rs QC25 routed down up N/A N/A
0/200 57,58,59,60 100G 9216 rs QC26 routed down up N/A N/A
0/208 17,18,19,20 100G 9216 rs QC27 routed down up QSFP28 or later N/A
0/216 25,26,27,28 100G 9216 rs QC28 routed up up QSFP28 or later N/A
0/224 1,2,3,4 100G 9216 rs QC29 trunk down up N/A N/A
0/232 9,10,11,12 100G 9216 rs QC30 routed down up QSFP28 or later N/A
0/240 33,34,35,36 100G 9216 rs QC31 routed down up QSFP+ or later with CMIS N/A
0/248 41,42,43,44 100G 9216 rs QC32 routed down up N/A N/A
0/256 258 10G 9216 none X1 lag47 up up SFP/SFP+/SFP28 N/A
0/257 257 10G 9216 none X2 routed down up SFP/SFP+/SFP28 N/A

Find the corresponding I2C bus number based on the alias number and read the optical module parameter information based on the I2C bus number. The method of mapping the alias number to the i2c bus number varies depending on the device. For CX73Q-N devices, the alias number is mapped to the i2c bus number by adding 1, while for CX864E-N devices, the alias number is mapped to the i2c bus number by adding 5, The first 32 ports of the CX664D-N device correspond to i2c bus numbers 3, 4, 5, 6, 11, 12, 13, 14, 19, 20, 21, 22, 27, 28, 29, 30, 35, 36, 37, 38, 43, 44, 45, 46, 51, 52, 53, 54, 59, 60, 61, 62 in sequence. The i2c bus numbers corresponding to the last 32 ports are 10, 9, 8, 7, 18, 17, 16, 15, 26,25, 24, 23, 34, 33, 32, 31, 42, 41, 40, 39, 50, 49, 48, 47, 58, 57, 56, 55,66, 65, 64, and 63.

Step2: In bash mode, create a JSON file containing SI configuration based on information such as the optical module model, manufacturer, number and speed of lanes, and alias number of interfaces, where the manufacturer name needs to be capitalized. Taking interface 0/128 of CX732Q-N device as an example, according to the information read above, Vendor Name is OEM, Vendor PN is QSFPDD-400G-AOC, the number of lanes is 8, the speed of the optical module is 400G, and the speed of each lane is 100G. The alias number of the interface is 17, and the mapped i2c bus number is 18.

admin@sonic:~$ sudo cat optics_si_settings.json
{
"GLOBAL_MEDIA_SETTINGS":{
"0-31":{
"50G_SPEED":{
"OEM-QSFPDD-400G-AOC":{
"OutputEqPreCursorTargetRx":{
"OutputEqPreCursorTargetRx1":0,
"OutputEqPreCursorTargetRx2":0,
"OutputEqPreCursorTargetRx3":0,
"OutputEqPreCursorTargetRx4":0,
"OutputEqPreCursorTargetRx5":0,
"OutputEqPreCursorTargetRx6":0,
"OutputEqPreCursorTargetRx7":0,
"OutputEqPreCursorTargetRx8":0
},
"OutputEqPostCursorTargetRx":{
"OutputEqPostCursorTargetRx1":2,
"OutputEqPostCursorTargetRx2":2,
"OutputEqPostCursorTargetRx3":2,
"OutputEqPostCursorTargetRx4":2,
"OutputEqPostCursorTargetRx5":2,
"OutputEqPostCursorTargetRx6":2,
"OutputEqPostCursorTargetRx7":2,
"OutputEqPostCursorTargetRx8":2
},
"OutputAmplitudeTargetRx":{
"OutputAmplitudeTargetRx1":1,
"OutputAmplitudeTargetRx2":1,
"OutputAmplitudeTargetRx3":1,
"OutputAmplitudeTargetRx4":1,
"OutputAmplitudeTargetRx5":1,
"OutputAmplitudeTargetRx6":1,
"OutputAmplitudeTargetRx7":1,
"OutputAmplitudeTargetRx8":1
},
"AdaptiveInputEqEnableTx": {
"AdaptiveInputEqEnableTx1": 0,
"AdaptiveInputEqEnableTx2": 0,
"AdaptiveInputEqEnableTx3": 0,
"AdaptiveInputEqEnableTx4": 0,
"AdaptiveInputEqEnableTx5": 0,
"AdaptiveInputEqEnableTx6": 0,
"AdaptiveInputEqEnableTx7": 0,
"AdaptiveInputEqEnableTx8": 0
},
"AdaptiveInputEqRecalledTx": {
"AdaptiveInputEqRecalledTx1": 1,
"AdaptiveInputEqRecalledTx2": 1,
"AdaptiveInputEqRecalledTx3": 1,
"AdaptiveInputEqRecalledTx4": 1,
"AdaptiveInputEqRecalledTx5": 1,
"AdaptiveInputEqRecalledTx6": 1,
"AdaptiveInputEqRecalledTx7": 1,
"AdaptiveInputEqRecalledTx8": 1
},
"FixedInputEqTargetTx": {
"FixedInputEqTargetTx1": 2,
"FixedInputEqTargetTx2": 2,
"FixedInputEqTargetTx3": 2,
"FixedInputEqTargetTx4": 2,
"FixedInputEqTargetTx5": 2,
"FixedInputEqTargetTx6": 2,
"FixedInputEqTargetTx7": 2,
"FixedInputEqTargetTx8": 2
}
}
}
}
},
"PORT_MEDIA_SETTINGS":{
"17":{
"50G_SPEED":{
"OEM-QSFPDD-400G-AOC":{
"OutputEqPreCursorTargetRx":{
"OutputEqPreCursorTargetRx1":0,
"OutputEqPreCursorTargetRx2":0,
"OutputEqPreCursorTargetRx3":0,
"OutputEqPreCursorTargetRx4":0,
"OutputEqPreCursorTargetRx5":0,
"OutputEqPreCursorTargetRx6":0,
"OutputEqPreCursorTargetRx7":0,
"OutputEqPreCursorTargetRx8":0
},
"OutputEqPostCursorTargetRx":{
"OutputEqPostCursorTargetRx1":2,
"OutputEqPostCursorTargetRx2":2,
"OutputEqPostCursorTargetRx3":2,
"OutputEqPostCursorTargetRx4":2,
"OutputEqPostCursorTargetRx5":2,
"OutputEqPostCursorTargetRx6":2,
"OutputEqPostCursorTargetRx7":2,
"OutputEqPostCursorTargetRx8":2
},
"OutputAmplitudeTargetRx":{
"OutputAmplitudeTargetRx1":1,
"OutputAmplitudeTargetRx2":1,
"OutputAmplitudeTargetRx3":1,
"OutputAmplitudeTargetRx4":1,
"OutputAmplitudeTargetRx5":1,
"OutputAmplitudeTargetRx6":1,
"OutputAmplitudeTargetRx7":1,
"OutputAmplitudeTargetRx8":1
},
"AdaptiveInputEqEnableTx": {
"AdaptiveInputEqEnableTx1": 0,
"AdaptiveInputEqEnableTx2": 0,
"AdaptiveInputEqEnableTx3": 0,
"AdaptiveInputEqEnableTx4": 0,
"AdaptiveInputEqEnableTx5": 0,
"AdaptiveInputEqEnableTx6": 0,
"AdaptiveInputEqEnableTx7": 0,
"AdaptiveInputEqEnableTx8": 0
},
"AdaptiveInputEqRecalledTx": {
"AdaptiveInputEqRecalledTx1": 1,
"AdaptiveInputEqRecalledTx2": 1,
"AdaptiveInputEqRecalledTx3": 1,
"AdaptiveInputEqRecalledTx4": 1,
"AdaptiveInputEqRecalledTx5": 1,
"AdaptiveInputEqRecalledTx6": 1,
"AdaptiveInputEqRecalledTx7": 1,
"AdaptiveInputEqRecalledTx8": 1
},
"FixedInputEqTargetTx": {
"FixedInputEqTargetTx1": 2,
"FixedInputEqTargetTx2": 2,
"FixedInputEqTargetTx3": 2,
"FixedInputEqTargetTx4": 2,
"FixedInputEqTargetTx5": 2,
"FixedInputEqTargetTx6": 2,
"FixedInputEqTargetTx7": 2,
"FixedInputEqTargetTx8": 2
}
}
}
}
}
}

Step 3: Place the JSON file in the specified directory and restart the device.

admin@sonic:~$ sudo mv optics_si_settings.json /usr/share/sonic/device/x86_64-asterfusion_cx732q_n-r0/CX732Q-N_TL07E02/
admin@sonic:~$ sudo /etc/sku_setup x86_64-asterfusion_cx732q_n-r0
admin@sonic:~$ sudo config reload -y

Step 4: After the device returns to normal, enable CMIS management and wait for about 5 minutes for the configuration information to be updated to the optical module data.

sonic# configure
sonic(config)# cmis enable
Step 5: The SI information of the optical module can be read through i2c to verify whether the configuration is effective. Each SI parameter supports modification and specific address values. Refer to the table below. First, confirm whether the bit corresponding to support is 1. If it is 1, it indicates support for configuring this parameter. Continue to check whether the value on the address of the corresponding field is consistent with the value in the configuration file. If it is 0, it indicates that this parameter is not supported for configuration. When setting parameter values, they cannot exceed the value of the address corresponding to Max.

Table 13 Optical module SI parameter address table

FiledDescriptionPageAddress
active_apsel_hostlaneHost Channel Application Selection11h0xD5[7:4]-0xCE[7:4]
OutputEqPreCursorTargetRx(support)-01h0xA2[3]
OutputEqPreCursorTargetRx(Max)-01h0x9A[3:0]
OutputEqPreCursorTargetRx-10h0xA5[7:0]-0xA2[7:0]( Every four bits correspond to one lane)
OutputEqPostCursorTargetRx(support)-01h0xA2[4]
OutputEqPostCursorTargetRx(Max)-01h0x9A[7:4]
OutputEqPostCursorTargetRx-10h0xA9[7:0]-0xA6[7:0]( Every four bits correspond to one lane)
OutputAmplitudeTargetRx(support)-01h0xA2[2]
OutputAmplitudeTargetRx(Max)-01h0x99[7:4]
OutputAmplitudeTargetRx-10h0xAD[7:0]-0xAA[7:0]( Every four bits correspond to one lane)
AdaptiveInputEqEnableTx(support)-01h0xA1[3]
AdaptiveInputEqEnableTx-10h0x99[7:0]( Each bit corresponds to a lane)(only 0 or 1)
AdaptiveInputEqRecalledTx(support)-01h0xA1[5],0xA1[6]( One of them is 1, which means support)
AdaptiveInputEqRecalledTx-10h0x9B[7:0]-0x9A[7:0]( Every two bits correspond to a lane)
FixedInputEqTargetTx(support)-01h0xA1[2]
FixedInputEqTargetTx-10h0x9F[7:0]-0x9C[7:0]( Every four bits correspond to one lane)

Read the data on page 1 of i2c and determine whether the current module supports configuring this parameter based on the supported addresses of the fields in the table above. Taking the reading of the OutputEqPreCursorTarget Rx parameter as an example, according to the table above, the support bit for the parameter OutputEqPreCursorTarget Rx is located on page 1 of the i2c data, at 0xA2 [3].

admin@spine:~$ sudo i2cset -f -y 18 0x50 0x7f 0x1
admin@spine:~$ sudo i2cdump -f -y 18 0x50
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 18 40 00 06 ff 00 00 00 00 00 00 00 00 00 29 b0 ?@.?..........)?
10: 7e fe 00 00 00 00 00 00 00 00 20 00 00 00 00 00 ~?........ .....
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 04 11 03 88 01 ff 00 00 00 00 00 .....?????......
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 ...............?
80: 00 00 01 00 00 00 00 00 00 00 42 68 07 d0 24 f0 ..?.......Bh??$?
90: 55 20 46 00 00 00 9d 78 00 42 00 2a 02 07 06 03 U F...?x.B.\*????
a0: 07 09 0d 00 00 00 80 57 55 00 00 00 00 00 00 00 ???...?WU.......
b0: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?...............
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2e ................

After reading the first page of data, the value of A2 is 09, the corresponding binary is 0000 1001, and the value of 0xA2 [3] is 1, indicating that this parameter supports configuration. If setting parameter values is supported, read the data on page 10 of i2c, determine the actual effective value of the parameters, and compare it with the configuration values in the JSON file. According to the table above, the address bits of this parameter value are in the range of 0xA5 [7:0] -0xA2 [7:0], and every four bits correspond to the value of a lane.

admin@spine:~$ sudo i2cset -f -y 18 0x50 0x7f 0x10
admin@spine:~$ sudo i2cdump -f -y 18 0x50
No size specified (using byte-data access)
` `0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 18 40 00 06 ff 00 00 00 00 00 00 00 00 00 2b b7 ?@.?..........+?
10: 7f 12 00 00 00 00 00 00 00 00 20 00 00 00 00 00 ??........ .....
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 04 11 03 88 01 ff 00 00 00 00 00 .....?????......
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 ...............?
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 11 11 11 11 11 11 11 11 00 00 00 33 33 33 33 .????????...3333
a0: ff ff 00 00 00 00 00 00 00 00 11 11 11 11 00 00 ..........????..
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Reading the data on page 10, the values from 0xA2 to 0xA5 are all 00, corresponding to binary values of 0000 0000 0000 0000 0000 0000 0000. Each four bits corresponds to a lane value, and all lane values are 0, consistent with the configuration in the JSON file. Continue reading the OutputEqPostCursorTarget Rx parameter value, with a support bit of 0xA2 [4]. Based on the data read above, A2 is 09 and 0xA2 [4] is 0, indicating that this parameter does not support modification.

[Command]

lpmode on

[Purpose]

Enable low power consumption of the interface.

[View]

Physical Interface Configuration View

[Notes]

This feature is turned off by default. Run command lpmode off to disable low power mode.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# lpmode on

[Command]

transceiver frequency frequency

[Purpose]

Configure the frequency of the optical module.

[Parameters]

ParameterDescription
frequencyLaser frequency, in GHz, with a value range of 1-4294967295.

[View]

Physical Interface Configuration View

[Notes]

Run command no transceiver frequency to remove the configured operating frequency of the optical module.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# transceiver frequency 100

transceiver transmitter signal-power power

Section titled “transceiver transmitter signal-power power”

[Command]

transceiver transmitter signal-power power

[Purpose]

Configure the signal transmission power of the optical module.

[Parameters]

ParameterDescription
powerSignal transmission power, in dBm, with a value range of -327.68-327.67.

[View]

Physical Interface Configuration View

[Notes]

Run command no transceiver transmitter signal-power to remove the configured optical module emission power.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# transceiver transmitter signal-power 100

Asterfusion AI and data center SONiC switches as the links below

CX-N series switches