Configuring Dynamic Mixed VLAN Ranges
Dynamic VLAN and dynamic stacked VLAN configuration supports mixed (or flexible) VLAN ranges. You configure mixed VLAN ranges at the [edit interfaces] hierarchy level by specifying the flexible-vlan-tagging statement for the interface and defining both VLAN and stacked VLAN ranges for use with different VLAN or stacked VLAN dynamic profiles.
![]() |
Caution: JUNOS VLAN IDs for single-tag VLANs are equivalent to the outer tags used for stacked (dual-tag) VLANs. When configuring mixed (flexible) VLANs, ensure that single-tag VLAN IDs and stacked VLAN outer tag values do not overlap. |
To configure both VLAN and stacked VLAN ranges:
- Access the interface over which you want to create
dynamic VLANs.
- user@host# edit interfaces ge-0/0/0
- Specify the flexible-vlan-tagging statement to indicate that this interface is for use with both VLAN
and stacked VLAN ranges.
- [edit interfaces ge-0/0/0]
- user@host# set flexible-vlan-tagging
- Access the VLAN [auto-configure] hierarchy level.
- [edit interfaces ge-0/0/0]
- user@host# edit auto-configure
- Access the [vlan-ranges] hierarchy
level.
- [edit interfaces ge-0/0/0 auto-configure]
- user@host# edit vlan-ranges
- Access the VLAN dynamic profile for which
you want to configure VLAN ranges.
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# edit dynamic-profile (VLAN) VLAN-PROF1
- Specify the VLAN ranges that you want
the dynamic profile to use. The following example specifies a lower
VLAN ID limit of 2000 and an upper VLAN ID limit of 3000.
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# set ranges (Dynamic VLAN) 2000-3000
- Access the [stacked-vlan-ranges] hierarchy level.
- [edit interfaces ge-0/0/0 auto-configure]
- user@host# edit stacked-vlan-ranges
- Access the VLAN dynamic profile for which
you want to configure VLAN ranges.
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# edit dynamic-profile (Stacked VLAN) VLAN-PROF1
- Specify the outer and inner stacked VLAN
ranges that you want the dynamic profile to use. The following example
specifies an outer stacked VLAN ID range from 3001 through 4000 (to
avoid overlapping VLAN IDs with single-tag VLANs) and an inner stacked
VLAN ID range of any (enabling a range from 1 through 4094
for the inner stacked VLAN ID).
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# set ranges (Dynamic Stacked VLAN) 3001-4000,any


