Trunk Interface Port
The Trunk Ethernet port configuration allows to define the multiple attributes that an trunk port can have.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”topology_switch_trunk_interface (vxlan.topology.switches.interfaces)
Section titled “topology_switch_trunk_interface (vxlan.topology.switches.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Regex: (?i)^(?:e|eth(?:ernet)?)\d(?:\/\d+){1,2}$ | Yes | |
| mode | Choice | trunk | Yes | |
| description | String | max: 256 | No | NetAsCode Trunk Interface |
| mtu | Any | Integer[min: 1500, max: 9216] or Choice[default, jumbo] | No | jumbo |
| speed | String | Regex: (?i)^(auto|100mb|1gb|10gb|25gb|40gb|100gb|200gb|400gb|800gb)$ | No | auto |
| enabled | Boolean | true, false | No | true |
| enable_cdp | Boolean | true, false | No | true |
| trunk_allowed_vlans | List | [trunk_allowed_vlans] | No | none |
| spanning_tree_portfast | Boolean | true, false | No | true |
| enable_bpdu_guard | Boolean | true, false | No | true |
| duplex | Choice | auto, full, half | No | auto |
| orphan_port | Boolean | true, false | No | false |
| native_vlan | Integer | min: 1, max: 4094 | No | |
| enable_qos | Boolean | true, false | No | false |
| qos_policy | String | No | ||
| queuing_policy | String | No | ||
| monitor | Boolean | true, false | No | false |
| freeform_config | String | No | ||
| fec | Choice | auto, fc-fec, off, rs-cons16, rs-fec, rs-ieee | No | auto |
| enable_storm_control | Boolean | true, false | No | false |
| storm_control_action | Choice | shutdown, trap, default | No | default |
| storm_control_broadcast_level_percent | Number | min: 0.0, max: 100.0 | No | |
| storm_control_broadcast_level_pps | Integer | min: 0, max: 200000000 | No | |
| storm_control_multicast_level_percent | Number | min: 0.0, max: 100.0 | No | |
| storm_control_multicast_level_pps | Integer | min: 0, max: 200000000 | No | |
| storm_control_unicast_level_percent | Number | min: 0.0, max: 100.0 | No | |
| storm_control_unicast_level_pps | Integer | min: 0, max: 200000000 | No |
trunk_allowed_vlans (vxlan.topology.switches.interfaces.topology_switch_trunk_interface)
Section titled “trunk_allowed_vlans (vxlan.topology.switches.interfaces.topology_switch_trunk_interface)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| from | Integer | min: 1, max: 4094 | Yes | none |
| to | Integer | min: 1, max: 4094 | No | none |
Forward Error Correction (FEC)
Section titled “Forward Error Correction (FEC)”If you previously configured FEC via freeform_config, you must migrate to the fec parameter using the same value and remove the FEC configuration from freeform_config to avoid conflicts.
Forward Error Correction (FEC) controls error correction on the physical interface. The following FEC modes are supported:
auto- Automatic FEC selection (default, not visible inshow run)fc-fec- FireCode FEC (also known as BASE-R or Clause 74)off- FEC disabledrs-cons16- Reed-Solomon FEC Consortium 1.6rs-fec- Reed-Solomon FEC (Clause 91 for 100G, Consortium 1.5 for 25G/50G)rs-ieee- Reed-Solomon FEC IEEE standard
Storm Control
Section titled “Storm Control”If you previously configured storm control via freeform_config, you must migrate to the storm control parameters using the same values and remove the storm control configuration from freeform_config to avoid conflicts.
You cannot configure both percentage-based (*_percent) and PPS-based (*_pps) thresholds on the same interface. Choose one method per interface.
Storm control prevents traffic storms on Layer 2 interfaces by limiting broadcast, multicast, and unicast traffic. The following parameters are supported:
Control Parameters:
enable_storm_control- Enable or disable storm control (boolean)storm_control_action- Action when threshold is exceeded:shutdown,trap, ordefault
Percentage-based Thresholds (0.00-100.00%):
storm_control_broadcast_level_percent- Broadcast traffic threshold as percentage of bandwidthstorm_control_multicast_level_percent- Multicast traffic threshold as percentage of bandwidthstorm_control_unicast_level_percent- Unicast traffic threshold as percentage of bandwidth
PPS-based Thresholds (0-200000000 packets/sec):
storm_control_broadcast_level_pps- Broadcast traffic threshold in packets per secondstorm_control_multicast_level_pps- Multicast traffic threshold in packets per secondstorm_control_unicast_level_pps- Unicast traffic threshold in packets per second
Example 1 - Basic Trunk Interface Configuration
Section titled “Example 1 - Basic Trunk Interface Configuration”This configuration creates Ethernet1/11, Ethernet1/12 and Ethernet1/13 on switch dc1-leaf1.
- Interface
Ethernet1/11is configured with VLANs10-20, 30, 40-50, MTU set asJumbo (9216), speedautoand spanning-tree portfast enabled and BPDU guard disabled. - Interface
Ethernet1/12is configured with VLANs45-48, the rest of the attributes are configured with the default settings. - Interface
Ethernet1/13is configured with allVLANs (1-4094), the rest of the attributes are configured with the default settings.
vxlan: topology: switches: - name: dc1-leaf1 interfaces: - name: Ethernet1/11 mode: trunk description: 'Trunk Interface 1' enabled: true mtu: jumbo speed: auto trunk_allowed_vlans: - from: 10 to: 20 - from: 30 - from: 40 to: 50 spanning_tree_portfast: true enable_bpdu_guard: false - name: e1/12 mode: trunk speed: 10gb trunk_allowed_vlans: - from: 45 to: 48 - name: e1/13 mode: trunk trunk_allowed_vlans: - from: 1 to: 4094Example 2 - FEC Configuration on 25G Trunk Interfaces
Section titled “Example 2 - FEC Configuration on 25G Trunk Interfaces”This configuration demonstrates FEC on 25G trunk interfaces with VLAN trunking:
- Interface
Ethernet1/5with RS-FEC IEEE - Interface
Ethernet1/6with FC-FEC
vxlan: topology: switches: - name: dc1-leaf1 interfaces: - name: Ethernet1/5 mode: trunk description: '25G Trunk with RS-FEC IEEE' speed: 25gb fec: rs-ieee trunk_allowed_vlans: - from: 100 to: 200 - name: Ethernet1/6 mode: trunk description: '25G Trunk with FC-FEC' speed: 25gb fec: fc-fec trunk_allowed_vlans: - from: 100 to: 200Example 3 - Storm Control on Trunk Interfaces
Section titled “Example 3 - Storm Control on Trunk Interfaces”This configuration demonstrates storm control on trunk interfaces:
vxlan: topology: switches: - name: dc1-leaf1 interfaces: - name: Ethernet1/10 mode: trunk description: 'Trunk with percentage-based storm control' enable_storm_control: true storm_control_action: trap storm_control_broadcast_level_percent: 10.00 storm_control_multicast_level_percent: 10.00 trunk_allowed_vlans: - from: 100 to: 200The Trunk Ethernet port configuration allows to define the multiple attributes that an trunk port can have.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”topology_switch_trunk_interface (vxlan.topology.switches.interfaces)
Section titled “topology_switch_trunk_interface (vxlan.topology.switches.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Regex: (?i)^(?:e|eth(?:ernet)?)\d(?:\/\d+){1,2}$ | Yes | |
| mode | Choice | trunk | Yes | |
| description | String | max: 256 | No | NetAsCode Trunk Interface |
| mtu | Any | Integer[min: 1500, max: 9216] or Choice[default, jumbo] | No | jumbo |
| speed | String | Regex: (?i)^(auto|100mb|1gb|10gb|25gb|40gb|100gb|200gb|400gb|800gb)$ | No | auto |
| enabled | Boolean | true, false | No | true |
| trunk_allowed_vlans | List | [trunk_allowed_vlans] | No | none |
| spanning_tree_portfast | Boolean | true, false | No | true |
| enable_bpdu_guard | Boolean | true, false | No | true |
| duplex | Choice | auto, full, half | No | auto |
| orphan_port | Boolean | true, false | No | false |
| native_vlan | Integer | min: 1, max: 4094 | No | |
| enable_qos | Boolean | true, false | No | false |
| qos_policy | String | No | ||
| queuing_policy | String | No | ||
| monitor | Boolean | true, false | No | false |
| freeform_config | String | No |
trunk_allowed_vlans (vxlan.topology.switches.interfaces.topology_switch_trunk_interface)
Section titled “trunk_allowed_vlans (vxlan.topology.switches.interfaces.topology_switch_trunk_interface)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| from | Integer | min: 1, max: 4094 | Yes | none |
| to | Integer | min: 1, max: 4094 | No | none |
Example
Section titled “Example”This configuration creates Ethernet1/11, Ethernet1/12 and Ethernet1/13 on switch dc1-leaf1.
- Interface
Ethernet1/11is configured with VLANs10-20, 30, 40-50, MTU set asJumbo (9216), speedautoand spanning-tree portfast enabled and BPDU guard disabled. - Interface
Ethernet1/12is configured with VLANs45-48, the rest of the attributes are configured with the default settings. - Interface
Ethernet1/13is configured with allVLANs (1-4904), the rest of the attributes are configured with the default settings.
vxlan: topology: switches: - name: dc1-leaf1 interfaces: - name: Ethernet1/11 mode: trunk description: 'Trunk Interface 1' enabled: true mtu: jumbo speed: auto trunk_allowed_vlans: - from: 10 to: 20 - from: 30 - from: 40 to: 50 spanning_tree_portfast: true enable_bpdu_guard: false - name: e1/12 mode: trunk speed: 10gb trunk_allowed_vlans: - from: 45 to: 48 - name: e1/13 mode: trunk trunk_allowed_vlans: - from: 1 to: 4094