[Enterprise SONiC] Switch Port Attributes Follow
How to configure port speed, set FEC to RS mode, and configure auto-negotiation.
- Configure 10G interface to be 1G interface
- Configure 100G interface (QSFP+) to be 40G interface
- Configure 25G interface to be 10G interface
- Configure 400G interface to 100G/40G(Support on version20200.2 or later)
- Configure FEC (Forward Error Correction) to RS mode
- Configure the Etherner0 to auto-negotiation
- Configurate advertised-speed with auto-negotiation.
Restriction
-
known issue: It does not return failed if configure wrong speed on the interface. (This issue is fixed in 202006.1 or later)
e.g: configure1000Gon the interface - Please remember to do "sudo config save", or all of the settings won't be including to the startup configuration.
- FEC is disabled in the default setting
- Before 202006.4, there's no SONiC command to set the auto-negotiation.
- The auto-negotiation is disabled in the default setting.
- Before 202012.1, AS7326-56X doesn't support down speed to 1G.
-
There's a hardware limitation on AS7326-56X, it will have port group design(Ethernet0~Ethernet47). When one of the group members changes speed, others of the same group member will be also modified. We can find the port group member information from Alias. For example, the alias "Eth5/" mean the port group name is "Ethernet5", it will have member about Ethernet0/Ethernet1/Ethernet2/Ethernet5.
admin@sonic:~$ show interface status
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
----------- --------------- ------- ----- ----- ------- ------ ------ ------- --------------- ----------
Ethernet0 3 25G 9100 none Eth5/3 routed down up SFP/SFP+/SFP28 N/A
Ethernet1 2 25G 9100 none Eth5/2 routed down up N/A N/A
Ethernet2 4 25G 9100 none Eth5/4 routed down up N/A N/A
Ethernet3 8 25G 9100 none Eth6/4 routed down up SFP/SFP+/SFP28 N/A
Ethernet4 7 25G 9100 none Eth6/3 routed down up N/A N/A
Ethernet5 1 25G 9100 none Eth5/1 routed down up N/A N/A
Configure 10G interface to be 1G interface
Tested model & firmware version:
- Switch model name:
DCS201 (AS5835-54X)
- Edgecore SONiC version:
202006.4
202012.0~ 202012.4
202111.0 ~202111.3
Step1. Dump speed "Ethernet0" and "Ethernet1" to 1G
Caution: Before "version 202006.2", make sure Tx_Disable is Disabled on 10G interface. Otherwise, the 10G port can NOT link UP even speed configuration is correct. (1: transmit power is disable, 0: transmit power is enable ,default is 1)
Method: use "accton_as5835_54x_util.py set sfp 1-48 {0|1}" to set sfp# tx_disable
For example: disable the tx_disable on Ethernet0 and Ethernet1
admin@sonic:~$ sudo accton_as5835_54x_util.py set sfp 1 0
admin@sonic:~$ sudo accton_as5835_54x_util.py set sfp 2 0
Check command
admin@sonic:~$ sudo accton_as5835_54x_util.py show
omitted...
============================================
SFP:
============================================
sfp1: module_present_1=1 module_tx_disable_1=0
----------------------------------------------------------------
sfp2: module_present_2=1 module_tx_disable_2=0
----------------------------------------------------------------
sfp3: module_present_3=0 module_tx_disable_3=1
omitted...
Step 2. Check the port status.
admin@sonic:~$ show interfaces status | head -4
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
----------- ----------- ------- ----- ----- ------- ------ ------ ------- -------------- ----------
Ethernet0 1 1G 9100 none Eth1/1 routed up up SFP/SFP+/SFP28 N/A
Ethernet1 2 1G 9100 none Eth2/1 routed up up SFP/SFP+/SFP28 N/A
Tested model & firmware version:
- Switch model name:
DCS202 (AS5835-54T)
- Edgecore SONiC version:
202012.2 ~ 202012.4
202111.0 ~ 202111.3
Step1. Add the 1G to advertised-speed with auto-negotiation. (The detail about the advertised-speed, please refer to "Configurate advertised-speed with auto-negotiation".)
admin@sonic:~$ sudo config interface advertised-speeds Ethernet0 1000
Caution:
On AS5835-54T, we only support down-speed by auto-negotiation advertised.
If you try to set the speed by force, you will face bellowing error handling.
admin@sonic:~$ sudo config interface speed Ethernet0 1000
Can't set the port speed. Only support port speed: 10000.
AS5835-54T does not support disabling auto-negotiation with error handling such as:
admin@sonic:~$ sudo config interface autoneg Ethernet0 disabled
Can not set autoneg disabled on Ethernet0 at Accton-AS5835-54T
Step2. Check the port status.
admin@sonic:~$ show interfaces status Ethernet0
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
--------- ----- ----- ---- --- ------------- ------ ---- ----- ---- --------
Ethernet0 2 1G 9100 N/A Eth1/1(Port1) routed up up N/A N/A
admin@sonic:~$ show interface autoneg status Ethernet0
Interface Auto-Neg Mode Speed Adv Speeds Oper Admin
--------- ------------- ----- ---------- ---- -----
Ethernet0 enabled 1G 1G up up
Tested model & firmware version:
- Switch model name:
DCS203 (AS7326-56X)
- Edgecore SONiC version:
202006.4
202012.0 ~ 202012.4
202111.0 ~ 202111.3
Step1. Dump speed "Ethernet48" and "Ethernet52" from 100G to 40G
Steps 2. Check the port speed by SONiC command
admin@sonic:~$ show interface status | grep 'Ethernet48\|Ethernet52'
Ethernet48 37,38,39,40 40G 9100 N/A Eth49/1 routed down up QSFP+ or later N/A
Ethernet52 29,30,31,32 40G 9100 N/A Eth50/1 routed down up QSFP+ or later N/A
Caution: On AS9716-32D, if user want to down-speed 40G, please change port mode(refer to Configure 400G interface to 100G/40G) and then down-speed as this example.
Configure 25G interface to be 10G interface
Tested model & firmware version:
- Switch model name:
DCS203 (AS7326-56X)
- Edgecore SONiC version:
202006 ~ 202006.4
202012.0 ~ 202012.4
202111.0 ~ 202111.3
In the "202006" and earlier versions, you can use following command to dump speed from 25G to 10G. Please be careful about "restriction 7" for port group.
admin@sonic:~$ sudo config interface speed Ethernet0 10000
In the "202006.1" or later version, there's a warning message if you set the port speed with original command. Please follow bellowing way to dump speed from 25G to 10G.
admin@sonic:~$ sudo config interface speed Ethernet0 10000
Can't set the port speed.
Step 1. Check your port group.
admin@sonic:~$ show interfaces status
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
----------- --------------- ------- ----- ----- ------- ------ ------ ------- --------------- ----------
Ethernet0 3 25G 9100 none Eth5/3 routed down up SFP/SFP+/SFP28 N/A
Ethernet1 2 25G 9100 none Eth5/2 routed down up N/A N/A
Ethernet2 4 25G 9100 none Eth5/4 routed down up N/A N/A
Ethernet3 8 25G 9100 none Eth6/4 routed down up SFP/SFP+/SFP28 N/A
Ethernet4 7 25G 9100 none Eth6/3 routed down up N/A N/A
Ethernet5 1 25G 9100 none Eth5/1 routed down up N/A N/A
Step 2. Check breakout option availability and current breakout mode.
admin@sonic:~$ show inter breakout
{
"Ethernet5": {
"index": "6,2,1,3",
"lanes": "1,2,3,4",
"breakout_modes": {
"4x25G": [
"Eth6/1(Port6)",
"Eth6/2(Port2)",
"Eth6/3(Port1)",
"Eth6/4(Port3)"
],
"4x10G[1G]": [
"Eth6/1(Port6)",
"Eth6/2(Port2)",
"Eth6/3(Port1)",
"Eth6/4(Port3)"
]
},
"interface_ids": "5,1,0,2",
"default_brkout_mode": "4x25G",
"autoneg": "off",
"Current Breakout Mode": "4x25G",
"child ports": "Ethernet0,Ethernet1,Ethernet2,Ethernet5",
"child port speeds": "25G,25G,25G,25G"
},
...
omitted
Step 3. Configure the port group "Ethernet5" to 10G.
admin@sonic:~$ sudo config interface breakout Ethernet5 '4x10G'
Do you want to Breakout the port, continue? [y/N]: y
Running Breakout Mode : 4x25G
Target Breakout Mode : 4x10G
...
omitted
Step 4. Checking the status.
admin@sonic:~$ show interfaces status
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
----------- --------------- ------- ----- ----- ------- ------ ------ ------- --------------- ----------
Ethernet0 3 10G 9100 none Eth5/3 routed down down SFP/SFP+/SFP28 N/A
Ethernet1 2 10G 9100 none Eth5/2 routed down down N/A N/A
Ethernet2 4 10G 9100 none Eth5/4 routed down down N/A N/A
Ethernet3 8 25G 9100 none Eth6/4 routed down up SFP/SFP+/SFP28 N/A
Ethernet4 7 25G 9100 none Eth6/3 routed down up N/A N/A
Ethernet5 1 10G 9100 none Eth5/1 routed down down N/A N/A
Caution:
- Before "202006.2", doing the DPB command, the 'Admin' status will be down. After "202006.2" or later version, the 'Admin' status will be up for speed change about 25G to 10G or 10G to 25G.
- After 202012.1 or later, AS7326-56X support down-speed to 1G. '4x10G' mode is change to '4x10G[1G]'. When user change mode to '4x10G[1G]', the device will link in 10G. If user wants to down-speed to 1G, please down the speed to "1000" directly. (please refer to Configure 10G interface to be 1G interface.)
Configure 400G interface to 100G/40G(Support on Edgecore-202006.2 or later)
Tested model & firmware version:
- Switch model name:
DCS510 (AS9716-32D)
- Edgecore SONiC version:
202012.2 ~ 202012.4
202111.0 ~ 202111.3
Step 1. Check breakout option availability and current breakout mode.
admin@sonic:~$ show interfaces breakout
admin@sonic:~$ show interfaces breakout
{
"Ethernet0": {
"index": "1,1,1,1,1,1,1,1",
"lanes": "73,74,75,76,77,78,79,80",
"breakout_modes": {
"1x400G": [
"Eth1(Port1)"
],
"2x200G": [
"Eth1/1(Port1)",
"Eth1/2(Port1)"
],
"4x100G": [
"Eth1/1(Port1)",
"Eth1/2(Port1)",
"Eth1/3(Port1)",
"Eth1/4(Port1)"
],
"1x100G[40G](4)": [
"Eth1(Port1)"
],
"2x50G(4)": [
"Eth1/1(Port1)",
"Eth1/2(Port1)"
],
"4x25G[10G](4)": [
"Eth1/1(Port1)",
"Eth1/2(Port1)",
"Eth1/3(Port1)",
"Eth1/4(Port1)"
]
},
"default_brkout_mode": "1x400G",
"autoneg": "off",
"Current Breakout Mode": "1x400G",
"child ports": "Ethernet0",
"child port speeds": "400G"
},
Step 2. Down speed "Ethernet0" from 400G to 100G.
admin@sonic:~$ sudo config interface breakout Ethernet0 '1x100G[40G](4)'
Caution:
- Be careful, because down speed from 400G to 100G control by DPB command, the "Admin" status will be down after modified.
- if you want 40G, you need to break out first(1x100G[40G](4)) and then use the down speed command as following.
admin@sonic:~$ sudo config interface breakout Ethernet32 '1x100G[40G](4)'
Do you want to Breakout the port, continue? [y/N]: y
Running Breakout Mode : 1x400G
Target Breakout Mode : 1x100G[40G](4)
Ports to be deleted :
{
"Ethernet32": "400000"
}
Ports to be added :
{
"Ethernet32": "100000"
}
After running Logic to limit the impact
Final list of ports to be deleted :
{
"Ethernet32": "400000"
}
Final list of ports to be added :
{
"Ethernet32": "100000"
}
Loaded below Yang Models
['sonic-acl', 'sonic-extension', 'sonic-interface', 'sonic-loopback-interface', 'sonic-port', 'sonic-portchannel', 'sonic-types', 'sonic-vlan']
Note: Below table(s) have no YANG models:
CONTAINER_FEATURE, VERSIONS, DEVICE_METADATA, TELEMETRY, FEATURE, FLEX_COUNTER_TABLE, BREAKOUT_CFG, MGMT_INTERFACE, CRM,
Breakout process got successfully completed.
Please note loaded setting will be lost after system reboot. To preserve setting, run `config save`.
admin@sonic:~$ sudo config interface speed Ethernet32 40000
Configure FEC (Forward Error Correction) to RS mode
Tested model & firmware version:
- Switch model name:
DCS204 (AS7726-32X)
- Edgecore SONiC version:
202006.4
202012.0 ~ 202012.4
202111.0 ~ 202111.3
Step 1: Configure FEC to RS mode.
admin@sonic:~$ sudo config interface fec Ethernet0 rs
Caution: FEC mode support three parameters, "rs", "fc" and "none"
Step 2: Checking the FEC status.
admin@sonic:~$ show interfaces status
Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC
----------- --------------- ------- ----- ----- ------- ------ ------ ------- --------------- ----------
Ethernet0 1,2,3,4 100G 9100 rs Eth1/1 routed down up N/A N/A
Ethernet4 5,6,7,8 100G 9100 none Eth2/1 routed down up N/A N/A
Ethernet8 9,10,11,12 100G 9100 none Eth3/1 routed down up N/A N/A
Ethernet12 13,14,15,16 100G 9100 none Eth4/1 routed down up N/A N/A
Configure the Etherner0 to auto-negotiation
Tested model & firmware version:
- Switch model name:
EPS202 (AS4630-54PE)
DCS202 (AS5835-54T)
- Edgecore SONiC version:
202006.4
202012.0 ~ 202012.4
202111.0 ~ 202111.3
Step 1. Enable the auto-negotiation on Ethernet0
admin@sonic:~$ sudo config interface autoneg Ethernet0 enabled
Step 2. Check configuration status
admin@sonic:~$ show interface autoneg status Ethernet0
Interface Auto-Neg Mode Oper Speed Adv Speeds Oper Admin
----------- --------------- ------------ ------------ ------ -------
Ethernet0 enabled 10G N/A down up
Caution: Before 202006.4, You need to access auto-negotiation by modified config_db.json and "config reload" to apply it.
admin@sonic:~$ sudo vi /etc/sonic/config_db.json
{
... omitted
"Ethernet0": {
"admin_status": "up",
"alias": "Eth5/3",
"index": "1",
"lanes": "3",
"mtu": "9100",
"autoneg": "1",
"parent_port": "Ethernet5",
"speed": "25000"
},
... omitted
}
admin@sonic:~$ sudo config reload -y
Configurate advertised-speed with auto-negotiation.
Tested model & firmware version:
- Switch model name:
DCS202 (AS5835-54T)
- Edgecore SONiC version:
202012.0 ~ 202012.4
202011.0 ~ 202111.3
Restriction
- Known issue:
- [SONIC-3544] [AS5835-54T] Fix the problem that the advertised speed cannot configure with the multiple capabilities (Ethernet0 ~ Ethernet47). (Fixed on version 202012.4)
Step1: Add multiple capabilities in advertised speed.
admin@sonic:~$ sudo config interface advertised-speeds Ethernet0 1000,10000
Note: the Valid speeds are 1000,2500,5000,10000.
Caution:
Since the known issue, before version 202012.0 ~ 202012.3, the advertised-speeds cannot configure with multiple capabilities.
Version 202012.0, although this version could set the multiple capabilities, in fact, it only supports only one capability.
For example, I connect the 1G device on Ethernet0, but it won't link up.
admin@sonic:~$ show interfaces autoneg status Ethernet0
Interface Auto-Neg Mode Speed Adv Speeds Oper Admin
----------- --------------- ------- ------------ ------ -------
Ethernet0 enabled 10G 1G,10G down up
Version 202012.1 ~ 202012.3, there's a warning message.
admin@sonic:~$ sudo config interface advertised-speeds Ethernet0 1000,1000
Can not set advertised-speeds 1000,1000 on Ethernet0 due to Accton-AS5835-54T only supports 10000 only or 1000 only
Step 2: Checking the status.
admin@sonic:~$ show interfaces autoneg status Ethernet0
Interface Auto-Neg Mode Oper Speed Adv Speeds Oper Admin
----------- --------------- ------------ ------------ ------ -------
Ethernet0 enabled 10G 1G,10G up up
Comments
0 comments
Please sign in to leave a comment.