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 VN segment mapping for VXLAN overlay integration, bridge mode selection, cross-connect capabilities, MAC packet classification, and fabricpath 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. Settings from vlan configuration <id> mode, such as mac-learn disable, layer-2 multicast lookup mac and per-VLAN ip igmp snooping commands, are configured under vlan.configurations; a VLAN configuration does not create the VLAN itself. The global private VLAN FEX trunk mode and the dot1q tunnel transit VLANs are configured under system.

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 VN segment mapping for VXLAN overlay integration, bridge mode selection, cross-connect capabilities, MAC packet classification, and fabricpath 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.

NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
systemClasssystemNo
vlanClassvlanNo

NameTypeConstraintMandatoryDefault Value
vlanClassvlanNo

NameTypeConstraintMandatoryDefault Value
dot1q_tunnel_transit_vlansClassdot1q_tunnel_transit_vlansNo
private_vlan_fex_trunkBooleantrue, falseNo

NameTypeConstraintMandatoryDefault Value
vlansListvlansNo
configurationsListconfigurationsNo

NameTypeConstraintMandatoryDefault Value
vlansListvlansNo

dot1q_tunnel_transit_vlans (nxos.devices.configuration.system)

Section titled “dot1q_tunnel_transit_vlans (nxos.devices.configuration.system)”
NameTypeConstraintMandatoryDefault Value
idsListInteger[min: 1, max: 4094]No
rangesListrangesNo

NameTypeConstraintMandatoryDefault Value
idIntegermin: 1, max: 4094Yes
vn_segmentIntegermin: 1, max: 16777215No
nameStringNo
state_activeBooleantrue, falseNo
bridge_modeChoiceip, macNo
untaggedBooleantrue, falseNo
policy_enforce_vlanBooleantrue, falseNo
cross_connectBooleantrue, falseNo
long_nameBooleantrue, falseNo
mac_packet_classifyBooleantrue, falseNo
modeChoicece, fabricpathNo
vrfStringNo
private_vlan_typeChoiceprimary, isolated, communityNo
private_vlan_associationClassprivate_vlan_associationNo
isolateBooleantrue, falseNo

NameTypeConstraintMandatoryDefault Value
idIntegermin: 1, max: 4094Yes
vn_segmentIntegermin: 1, max: 16777215No
nameStringNo
state_activeBooleantrue, falseNo
bridge_modeChoiceip, macNo
untaggedBooleantrue, falseNo
policy_enforce_vlanBooleantrue, falseNo
cross_connectBooleantrue, falseNo
long_nameBooleantrue, falseNo
mac_packet_classifyBooleantrue, falseNo
modeChoicece, fabricpathNo
vrfStringNo

configurations (nxos.devices.configuration.vlan)

Section titled “configurations (nxos.devices.configuration.vlan)”
NameTypeConstraintMandatoryDefault Value
idIntegermin: 1, max: 4094Yes
mac_learnBooleantrue, falseNo
layer_2_multicast_lookup_macBooleantrue, falseNo
igmp_snoopingClassigmp_snoopingNo

ranges (nxos.devices.configuration.system.dot1q_tunnel_transit_vlans)

Section titled “ranges (nxos.devices.configuration.system.dot1q_tunnel_transit_vlans)”
NameTypeConstraintMandatoryDefault Value
fromIntegermin: 1, max: 4094Yes
toIntegermin: 1, max: 4094Yes

private_vlan_association (nxos.devices.configuration.vlan.vlans)

Section titled “private_vlan_association (nxos.devices.configuration.vlan.vlans)”
NameTypeConstraintMandatoryDefault Value
idsListInteger[min: 1, max: 4094]No
rangesListrangesNo

igmp_snooping (nxos.devices.configuration.vlan.configurations)

Section titled “igmp_snooping (nxos.devices.configuration.vlan.configurations)”
NameTypeConstraintMandatoryDefault Value
enableBooleantrue, falseNo
access_groupStringNo
explicit_trackingBooleantrue, falseNo
fast_leaveBooleantrue, falseNo
group_timeoutIntegermin: 0, max: 65535No
last_member_query_intervalIntegermin: 1, max: 25No
link_local_groups_suppressionBooleantrue, falseNo
proxy_general_queries_mrtIntegermin: 0, max: 25No
proxy_leave_use_group_addressBooleantrue, falseNo
querierIPNo
querier_timeoutIntegermin: 1, max: 65535No
query_floodBooleantrue, falseNo
query_intervalIntegermin: 1, max: 18000No
query_max_response_timeIntegermin: 1, max: 25No
report_flood_allBooleantrue, falseNo
report_flood_interfacesListreport_flood_interfacesNo
report_suppressionBooleantrue, falseNo
robustness_variableIntegermin: 1, max: 7No
startup_query_countIntegermin: 0, max: 10No
startup_query_intervalIntegermin: 0, max: 18000No
v3_report_suppressionBooleantrue, falseNo
versionChoice2, 3No
mrouter_interfacesListmrouter_interfacesNo
static_groupsListstatic_groupsNo

report_flood_interfaces (nxos.devices.configuration.vlan.configurations.igmp_snooping)

Section titled “report_flood_interfaces (nxos.devices.configuration.vlan.configurations.igmp_snooping)”
NameTypeConstraintMandatoryDefault Value
interface_typeChoiceethernet, port-channelYes
interface_idAnyString or Integer[min: 0]Yes

mrouter_interfaces (nxos.devices.configuration.vlan.configurations.igmp_snooping)

Section titled “mrouter_interfaces (nxos.devices.configuration.vlan.configurations.igmp_snooping)”
NameTypeConstraintMandatoryDefault Value
interface_typeChoiceethernet, port-channelYes
interface_idAnyString or Integer[min: 0]Yes

static_groups (nxos.devices.configuration.vlan.configurations.igmp_snooping)

Section titled “static_groups (nxos.devices.configuration.vlan.configurations.igmp_snooping)”
NameTypeConstraintMandatoryDefault Value
groupIPYes
sourceIPNo
interfacesListinterfacesYes

interfaces (nxos.devices.configuration.vlan.configurations.igmp_snooping.static_groups)

Section titled “interfaces (nxos.devices.configuration.vlan.configurations.igmp_snooping.static_groups)”
NameTypeConstraintMandatoryDefault Value
interface_typeChoiceethernet, port-channelYes
interface_idAnyString or Integer[min: 0]Yes

Example 1: L2 VLANs with VXLAN VN segment mappings for tenant segmentation

nxos:
devices:
- name: LEAF1
configuration:
vlan:
vlans:
- id: 101
name: BLUE_WEB_TIER
vn_segment: 10101
- id: 102
name: BLUE_APP_TIER
vn_segment: 10102

Example 2: L3 VLANs for VRF-to-VNI mapping (symmetric IRB)

nxos:
devices:
- name: LEAF1
configuration:
vlan:
vlans:
- id: 1010
name: BLUE_L3VNI
vn_segment: 11010
- id: 1020
name: GREEN_L3VNI
vn_segment: 11020

Example 3: Private VLAN domain with primary, isolated, and community VLANs (ports are configured under switchport on Ethernet and port-channel interfaces, SVI mapping under interfaces.vlans)

nxos:
devices:
- name: LEAF1
configuration:
feature:
private_vlan: true
vlan:
vlans:
- id: 100
name: PVLAN_PRIMARY
private_vlan_type: primary
private_vlan_association:
ranges:
- from: 101
to: 102
- id: 101
name: PVLAN_ISOLATED
private_vlan_type: isolated
- id: 102
name: PVLAN_COMMUNITY
private_vlan_type: community
configurations:
- id: 101
mac_learn: false
- id: 102
mac_learn: false

Example 4: 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
vn_segment: 10101
- id: 102
name: BLUE_APP_TIER
vn_segment: 10102
# L3 VNI transit VLANs - one per VRF for symmetric IRB
- id: 1010
name: BLUE_L3VNI
vn_segment: 11010
- id: 1020
name: GREEN_L3VNI
vn_segment: 11020

Example 5: VLAN with layer 2 isolation (requires NX-OS 10.6(3) or later)

nxos:
devices:
- name: LEAF1
configuration:
vlan:
vlans:
- id: 1030
name: ISOLATED_HOSTS
vn_segment: 11030
isolate: true

Example 6: Private VLAN FEX trunk mode

nxos:
devices:
- name: LEAF1
configuration:
system:
private_vlan_fex_trunk: true

Example 7: Dot1Q tunnel transit for a VLAN range (system dot1q-tunnel transit vlan <vlan-range>)

nxos:
devices:
- name: LEAF1
configuration:
system:
dot1q_tunnel_transit_vlans:
ranges:
- from: 10
to: 20

Example 8: Per-VLAN IGMP snooping with querier, timers, mrouter port and static groups

nxos:
devices:
- name: LEAF1
configuration:
route_maps:
- name: IGMP-SNOOP-FILTER
entries:
- order: 10
action: permit
vlan:
vlans:
- id: 100
name: MCAST_DATA
- id: 200
name: NO_SNOOPING
configurations:
- id: 100
layer_2_multicast_lookup_mac: true
igmp_snooping:
querier: 10.1.100.1
query_interval: 60
query_max_response_time: 10
robustness_variable: 3
version: 3
fast_leave: true
explicit_tracking: false
report_suppression: false
v3_report_suppression: true
group_timeout: 300
proxy_general_queries_mrt: 10
access_group: IGMP-SNOOP-FILTER
mrouter_interfaces:
- interface_type: ethernet
interface_id: 1/10
static_groups:
- group: 239.1.1.1
interfaces:
- interface_type: ethernet
interface_id: 1/11
- group: 232.1.1.1
source: 10.1.1.5
interfaces:
- interface_type: port-channel
interface_id: 10
report_flood_interfaces:
- interface_type: ethernet
interface_id: 1/12
- id: 200
igmp_snooping:
enable: false

Example 1: L2 VLANs with VXLAN VN segment mappings for tenant segmentation

nxos:
devices:
- name: LEAF1
configuration:
vlan:
vlans:
- id: 101
name: BLUE_WEB_TIER
vn_segment: 10101
- id: 102
name: BLUE_APP_TIER
vn_segment: 10102

Example 2: L3 VLANs for VRF-to-VNI mapping (symmetric IRB)

nxos:
devices:
- name: LEAF1
configuration:
vlan:
vlans:
- id: 1010
name: BLUE_L3VNI
vn_segment: 11010
- id: 1020
name: GREEN_L3VNI
vn_segment: 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
vn_segment: 10101
- id: 102
name: BLUE_APP_TIER
vn_segment: 10102
# L3 VNI transit VLANs - one per VRF for symmetric IRB
- id: 1010
name: BLUE_L3VNI
vn_segment: 11010
- id: 1020
name: GREEN_L3VNI
vn_segment: 11020