Port Speed configuration Follow
Examples:
- Configure 10G interface (SFP+) to be 1G interface
- Configure 100G interface (QSFP+) to be 40G interface
- Configure 25G interface to be 10G interface
- Configure FEC ( Forward Error Correction) to RS mode
- Configure the Etherner0 to auto-negotiation
Restriction:
- known issue: It does not return failed if configure wrong speed on interface
e.g: configure1000Gon the interface - FEC is disabled in the default setting
- There's no SONiC command to set the auto-negotiation.
- The auto-negotiation is disabled in the default setting
- There's a hardware limitation on AS7326-56X, Ethernet0~48 can support speed for 10G and 25G. But the sub-ports that belong to the same group must set the same speed.
For example, Ethernet0, Ethernet1, Ethernet2, Ethernet5, are the same group.
Here's the way to know which ports are the same group.
You may check the "Alias", the first number is the same, it will be regarded as the same 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 N/A 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 N/A 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
…
omitted
Reference model:
- Switch model name: AS5835-54X
- Edgecore SONiC version: SONiC.Edgecore-SONiC_20201229_070315_ec202006_101
Procedure:
Steps 1. Configure 10G interface (SFP+) to be 1G interface.
Ethernet0 and Ethernet1 as an example.
Caution:
-
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...
Steps 2. Configure 100G interface (QSFP) to be 40G interface.
Ethernet48 and Ethernet52 as an example.
Steps 3. Save the configuration to config_db.json
Steps 4. Check the port speed setting on config_db.json
admin@sonic:~$ sudo vi /etc/sonic/config_db.json {
omitted...
"PORT": {
"Ethernet0": {
"admin_status": "up",
"alias": "tenGigE1",
"index": "1",
"lanes": "1",
"mtu": "9100",
"speed": "1000"
},
"Ethernet1": {
"admin_status": "up",
"alias": "tenGigE2",
"index": "2",
"lanes": "2",
"mtu": "9100",
"speed": "1000"
},
omitted...
"Ethernet48": {
"admin_status": "up",
"alias": "hundredGigE49",
"index": "49",
"lanes": "37,38,39,40",
"mtu": "9100",
"speed": "40000"
},
"Ethernet52": {
"admin_status": "up",
"alias": "hundredGigE50",
"index": "53",
"lanes": "29,30,31,32",
"mtu": "9100",
"speed": "40000"
},
omitted...
}
Steps 5. Check the port speed by SONiC command
admin@sonic:~$ show interface status | grep 'Ethernet0 \|Ethernet1 \|Ethernet48\|Ethernet52'
Ethernet0 1 1G 9100 N/A Eth1/1 routed down up SFP/SFP+/SFP28 N/A
Ethernet1 2 1G 9100 N/A Eth2/1 routed down up SFP/SFP+/SFP28 N/A
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
Appendix:
Check port speed by bcmshell
Example 3: Configure 25G interface to be 10G interface
Reference model:
- Switch model name: AS7326-56X
- Edgecore SONiC version: SONiC.Edgecore-SONiC_20201229_070315_ec202006_101
Procedure:
Because there's a Restriction 4, there's another way to set the port speed on AS7326-56X.
Note: This restriction only on Ethernet0 ~ Ethernet48, and only on AS7326-56X.
There's a warning message if you set the port speed with this command.
admin@sonic:~$ sudo config interface speed Ethernet0 10000
Can't set the port speed.
So we need to set the port speed with Dynamic Port Breakout. (Please refer to this article)
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 N/A 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 N/A N/A
...
omitted
Note: Checking the "Alias", the first number belongs to the port group.
For example, the port group of the Ethernet0 is Ethernet5, the port group of the Ethernet3 is Ethernet6
Step 2: Check breakout option availability and current breakout mode.
admin@sonic:~$ show interfaces breakout
{
"Ethernet5": {
"child port speeds": "25G,25G,25G,25G",
"index": "6,2,1,3",
"lanes": "1,2,3,4",
"child ports": "Ethernet0,Ethernet1,Ethernet2,Ethernet5",
"Current Breakout Mode": "4x25G",
"interface_ids": "5,1,0,2",
"default_brkout_mode": "4x25G",
"breakout_modes": "4x25G,4x10G",
"alias_at_lanes": "Eth5/1,Eth5/2,Eth5/3,Eth5/4"
...
omitted
Step 3: Configure the port speed 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 N/A 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 N/A 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
...
omitted
Example 4: Configure FEC ( Forward Error Correction) to RS mode
Reference model:
- Switch model name: All
- Edgecore SONiC version: SONiC.Edgecore-SONiC_20201229_070315_ec202006_101
Procedure:
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
...
omitted
Example 5: Configure the Etherner0 to auto-negotiation
Reference model:
- Switch model name: All
- Edgecore SONiC version: SONiC.Edgecore-SONiC_20201229_070315_ec202006_101
Procedure:
Step 1: Enable auto-negotiation on 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
}
Step 2: Reload config and check Ethernet0 status by Broadcom shell command.
admin@sonic:~$ sudo config reload -y
...omitted
admin@sonic:~$ bcmcmd 'ps'
ps
ena/ speed/ link auto STP lrn inter max cut loop
port link Lns duplex scan neg? state pause discrd ops face frame thru? back
xe0( 3) down 1 25G FD SW Yes Forward None FA CR 9122 No
xe1( 2) down 1 25G FD SW No Forward None FA CR 9122 No
xe2( 4) down 1 25G FD SW No Forward None FA CR 9122 No
... omitted
Comments
0 comments
Please sign in to leave a comment.