[stordis-toc]
Introduction
In SONiC network interfaces can be configured with various port attributes such as speed, MTU, auto-negotiation, and Forward Error Correction (FEC). These attributes allow administrators to optimize link performance, ensure compatibility with connected devices, and adapt the switch configuration to different network environments.
This article explains how to configure common port attributes using the SONiC.
Prerequisites
Before starting the configuration, ensure you have the following:
- SONiC installed on the switch
- Console or SSH access to the switch.
- Console terminal software: PuTTY, Teraterm, SecureCRT, etc.
- Serial Console cable: Provided with the device.
- Basic Linux CLI knowledge.
Port Attributes
Use the following command to change the port speed:
sudo config interface speed Ethernet28 1000
This command sets the port speed of Ethernet28 to 1 Gbps.
Note:
Changing the port speed may temporarily interrupt the link. Ensure the connected device supports the selected speed.
To verify the settings refer to Verify Interface Configuration section.
Enable auto-negotiation:
sudo config interface autoneg Ethernet28 enabled
Disable auto-negotiation:
sudo config interface autoneg Ethernet28 disabled
Use the following command to shutdown port:
sudo config interface shutdown Ethernet28
Use the following command to startup port:
sudo config interface startup Ethernet28
To verify the settings refer to Verify Interface Configuration section.
Use the following command to change the MTU value:
sudo config interface mtu Ethernet28 9100
Note:
The MTU value should match the configuration on the connected device to avoid packet fragmentation.
Assign an IP address to the interface:
sudo config interface ip add Ethernet28 192.168.1.254/24
Remove an IP address:
sudo config interface ip remove Ethernet28 192.168.1.254/24
Use the following command to configure FEC on the interface:
sudo config interface fec Ethernet28 rs
Common FEC modes include:
- rs - Reed-Solomon
- fc - Firecode
- none - disabled
How to configure the port breakout in SONiC
After applying changes, you can verify the interface configuration using the following commands:
show interfaces status
show interfaces Ethernet28
show interface autoneg status
show interface autoneg status Ethernet28
show ip interfaces
show interface fec status
Congratulations!
You have successfully configured several common port attributes in SONiC, including port speed, auto-negotiation, MTU, FEC, and IP addressing. These parameters allow network administrators to optimize interface performance and adapt the switch configuration to various deployment scenarios.
If you have any questions related to this article, feel free to reach out to our technical support team.
Happy Networking!
Useful links
If you want to explore more topics, be sure to check out our other guides, including:
How can I set up a console connection to Edgecore Open Networking switch?
How to Reset Password in SONiC?
How to backup/recover the configuration in SONiC?
How to configure management IP address in SONiC? – STORDIS Support Portal
Where to download the SONiC Virtual Switch (VS) community pre-built image?
For more free resources, visit:
https://stordis.com/free-resources/
Still have questions? You can find more answers in our full FAQ - just follow the link below.
Comments 0
Comments
Please sign in to leave a comment.