You define dynamic VLAN ranges under the [edit interfaces] hierarchy. You can configure VLAN ranges in the following ways for use with dynamic profiles:
You configure VLAN ranges at the [edit interfaces] hierarchy level by specifying the vlan-tagging statement for the interface and defining VLAN ranges for use with a VLAN dynamic profile.
To configure a VLAN range:
- user@host# edit interfaces ge-0/0/0
- [edit interfaces ge-0/0/0]
- user@host# set vlan-tagging
- [edit interfaces ge-0/0/0]
- user@host# edit auto-configure
- [edit interfaces ge-0/0/0 auto-configure]
- user@host# edit vlan-ranges
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# edit dynamic-profile VLAN-PROF1
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# set ranges 3000-any
You configure stacked VLAN ranges at the [edit interfaces] hierarchy level by specifying the stacked-vlan-tagging statement for the interface and defining stacked VLAN ranges for use with a stacked VLAN dynamic profile.
To configure a VLAN range:
- user@host# edit interfaces ge-0/0/0
- [edit interfaces ge-0/0/0]
- user@host# set stacked-vlan-tagging
- [edit interfaces ge-0/0/0]
- user@host# edit auto-configure
- [edit interfaces ge-0/0/0 auto-configure]
- user@host# edit stacked-vlan-ranges
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# edit dynamic-profile VLAN-PROF1
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# set ranges 2000-4000,any
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:
- user@host# edit interfaces ge-0/0/0
- [edit interfaces ge-0/0/0]
- user@host# set flexible-vlan-tagging
- [edit interfaces ge-0/0/0]
- user@host# edit auto-configure
- [edit interfaces ge-0/0/0 auto-configure]
- user@host# edit vlan-ranges
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# edit dynamic-profile VLAN-PROF1
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# set ranges 2000-3000
- [edit interfaces ge-0/0/0 auto-configure]
- user@host# edit stacked-vlan-ranges
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# edit dynamic-profile VLAN-PROF1
- [edit interfaces ge-0/0/0 auto-configure vlan-ranges]
- user@host# set ranges 3001-4000,any