When using SONiC, you may notice that port names or numbers are not continuous.
The non-continuous port numbering in SONiC is due to lane grouping and hardware architecture constraints in high-speed network switches. Here's a detailed explanation:
1. Physical Lane Grouping
High-Speed Interfaces Require Multiple Lanes
Modern high-speed interfaces (e.g., 100G, 400G) use multiple physical lanes to achieve higher bandwidth. For example:
- A 100G QSFP28 interface uses 4 lanes (each lane runs at ~25Gbps).
- A 400G QSFP-DD interface uses 8 lanes (each lane runs at ~50Gbps).
Each interface consumes a block of lanes. If the switch ASIC allocates lanes in fixed increments (e.g., blocks of 4 or 8), the port numbers will be assigned by that increment. For example:
- Ethernet0 uses lanes 0-3 → Next available lanes start at 4.
- Ethernet4 uses lanes 4-7 → Next available lanes start at 8.
2. ASIC Architecture Constraints
Fixed Lane Groupings
Switch ASICs often have predefined lane groupings for different interface types:
- Broadcom Tomahawk3: Groups lanes in blocks of 4 for 100G ports.
- Broadcom Tomahawk4: Groups lanes in blocks of 8 for 400G ports.
Example:
If an ASIC dedicates lanes 0-127 to user ports and each 100G port requires 4 lanes, the port numbers will increase by 4:
Ethernet0, Ethernet4, Ethernet8, ..., Ethernet124.
3. Split Ports and Subinterfaces
Flexibility for Lower-Speed Modes
Switches can split high-speed ports into multiple lower-speed ports. For example:
- A 100G port (Ethernet0) can be split into:
- 4x25G ports: Ethernet0_0, Ethernet0_1, Ethernet0_2, Ethernet0_3.
- 2x50G ports: Ethernet0_0, Ethernet0_1.
4. Platform-Specific Conventions
Legacy Compatibility
Older switches or platforms may have used different numbering schemes. SONiC maintains compatibility by:
- Following the hardware vendor's port numbering (e.g., Cisco-style Ethernet1/1 vs. SONiC's Ethernet0).
Comments
0 comments
Please sign in to leave a comment.