Trunk Port-Channel
The Trunk Port-Channel configuration allows to define the multiple attributes that an trunk port-channel can have.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”topology_switch_trunk_po_interface (vxlan.topology.switches.interfaces)
Section titled “topology_switch_trunk_po_interface (vxlan.topology.switches.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Regex: (?i)^(po|port-channel)([1-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|40[0-8][0-9]|409[0-6])$ | Yes | |
| mode | Choice | trunk, vpc_peer_link | Yes | |
| description | String | max: 256 | No | NetAsCode Trunk PO Interface |
| vpc_id | Integer | min: 1, max: 4906 | No | |
| 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 |
| spanning_tree_portfast | Boolean | true, false | No | true |
| enable_bpdu_guard | Boolean | true, false | No | true |
| pc_mode | Choice | active, on, passive | No | active |
| members | List | String[Regex: (?i)^(?:e|eth(?:ernet)?)\d(?:\/\d+){1,2}$] | Yes | |
| trunk_allowed_vlans | List | [trunk_allowed_vlans] | No | none |
| 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 | ||
| disable_lacp_suspend_individual | Boolean | true, false | No | false |
| enable_lacp_vpc_convergence | Boolean | true, false | No | false |
| lacp_port_priority | Integer | min: 1, max: 65535 | No | 32768 |
| lacp_rate | Choice | normal, fast | No | normal |
trunk_allowed_vlans (vxlan.topology.switches.interfaces.topology_switch_trunk_po_interface)
Section titled “trunk_allowed_vlans (vxlan.topology.switches.interfaces.topology_switch_trunk_po_interface)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| from | Integer | min: 1, max: 4094 | Yes | none |
| to | Integer | min: 1, max: 4094 | No | none |
Examples
Section titled “Examples”This configuration creates a port-channel11 (vPC id: 10) and port-channel21 on dc1-leaf1 and dc1-leaf2:
Note that port-channel21 is not a VPC.
- Interface
port-channel11is configured wtih a VPC ID10, VLANs100-200, 300-310, using interfacesEthernet1/11andEthernet1/12as member of the port-channel using LACPactivemode. MTU set asJumbo (9216), speed asauto, and spanning-tree portfast and BPDU guard enabled. This configuration is applied for both switches. - Interface
port-channel21ondc1-leaf1is configured with VLANs1-4093, using interfacesEthernet1/21andEthernet1/22as member of the port-channel using LACPactivemode. MTU set asdefault (1500), speed asauto, and spanning-tree portfast and BPDU guard enabled. - Interface
port-channel21ondc1-leaf2is using interfacesEthernet1/21andEthernet1/22as member of the port-channel. The rest of the attributes are configured with the default settings.
vxlan: topology: switches: - name: dc1-leaf1 interfaces: - name: port-channel11 mode: trunk description: 'VPC Trunk Interface 1 Leaf 1' enabled: true pc_mode: active vpc_id: 10 # (VPC Port-channel) mtu: jumbo speed: auto trunk_allowed_vlans: - from: 100 to: 200 - from: 300 to: 310 spanning_tree_portfast: true enable_bpdu_guard: true members: - eth1/11 - eth1/12 - name: po21 mode: trunk description: 'Port-channel Trunk Interface 1' enabled: true pc_mode: active mtu: default speed: auto spanning_tree_portfast: true enable_bpdu_guard: true members: - eth1/21 - eth1/22 - name: dc1-leaf2 interfaces: - name: port-channel11 mode: trunk description: 'VPC Trunk Interface 1 Leaf 2' enabled: true pc_mode: active vpc_id: 10 # (VPC Port-channel) mtu: jumbo speed: auto trunk_allowed_vlans: - from: 100 to: 200 - from: 300 to: 310 spanning_tree_portfast: true enable_bpdu_guard: true members: - eth1/11 - eth1/12 - name: po21 description: 'Port-channel Trunk Interface 2' mode: trunk members: - eth1/21 - eth1/22