VLAN
VLAN (Virtual Local Area Network) configuration enables logical network segmentation by creating isolated broadcast domains within a single NX-OS infrastructure, each identified by a numeric ID and optional descriptive name. It supports advanced features including VNI mapping for VXLAN overlay integration, bridge mode selection, cross-connect capabilities, MAC packet classification, and fabric-path mode for data center fabric topologies. VLAN management includes administrative state control, policy enforcement, and forwarding mode configuration for both routed and bridged traffic flows.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vlan | Class | [vlan] | No |
vlan (nxos.devices.configuration)
Section titled “vlan (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vlans | List | [vlans] | No |
vlans (nxos.devices.configuration.vlan)
Section titled “vlans (nxos.devices.configuration.vlan)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| id | Integer | min: 1, max: 4094 | Yes | |
| vni | Integer | No | ||
| name | String | No | ||
| state_active | Boolean | true, false | No | |
| bridge_mode | Choice | ip, mac | No | |
| untagged | Boolean | true, false | No | |
| policy_enforced | Boolean | true, false | No | |
| cross_connect | Boolean | true, false | No | |
| forwarding_mode_route | Boolean | true, false | No | |
| forwarding_mode_bridge | Boolean | true, false | No | |
| long_name | Boolean | true, false | No | |
| mac_packet_classify | Boolean | true, false | No | |
| mode | Choice | ce, fabric-path | No | |
| vrf | String | No |
Examples
Section titled “Examples”Example 1: L2 VLANs with VXLAN VNI mappings for tenant segmentation
nxos: devices: - name: LEAF1 configuration: vlan: vlans: - id: 101 name: BLUE_WEB_TIER vni: 10101 - id: 102 name: BLUE_APP_TIER vni: 10102Example 2: L3 VLANs for VRF-to-VNI mapping (symmetric IRB)
nxos: devices: - name: LEAF1 configuration: vlan: vlans: - id: 1010 name: BLUE_L3VNI vni: 11010 - id: 1020 name: GREEN_L3VNI vni: 11020Example 3: Complete leaf VLAN configuration with both L2 and L3 VLANs
nxos: devices: - name: LEAF2 configuration: vlan: vlans: # L2 VLANs - extended across VXLAN fabric - id: 101 name: BLUE_WEB_TIER vni: 10101 - id: 102 name: BLUE_APP_TIER vni: 10102 # L3 VNI transit VLANs - one per VRF for symmetric IRB - id: 1010 name: BLUE_L3VNI vni: 11010 - id: 1020 name: GREEN_L3VNI vni: 11020