Skip to content

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
NameTypeConstraintMandatoryDefault Value
vlanClass[vlan]No

NameTypeConstraintMandatoryDefault Value
vlansList[vlans]No

NameTypeConstraintMandatoryDefault Value
idIntegermin: 1, max: 4094Yes
vniIntegerNo
nameStringNo
state_activeBooleantrue, falseNo
bridge_modeChoiceip, macNo
untaggedBooleantrue, falseNo
policy_enforcedBooleantrue, falseNo
cross_connectBooleantrue, falseNo
forwarding_mode_routeBooleantrue, falseNo
forwarding_mode_bridgeBooleantrue, falseNo
long_nameBooleantrue, falseNo
mac_packet_classifyBooleantrue, falseNo
modeChoicece, fabric-pathNo
vrfStringNo

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

Example 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: 11020

Example 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