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 |
| 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 | |
| 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