Ethernet interfaces can be partitioned; you can assign up to 4095 different logical interfaces, one for each VLAN.
VLAN ID 0 is reserved for tagging the priority of frames. To bind a VLAN ID to a logical interface, include the vlan-id or vlan-id-range statement:
-
vlan-id number;
You can include this statement at the following hierarchy levels:
![]() |
Note: For Gigabit Ethernet IQ and Gigabit Ethernet PICs with SFPs (except the built-in Gigabit Ethernet port on the M7i platform), VLAN IDs on a single interface can differ from each other. Because Intermediate System-to-Intermediate System (IS-IS) has an 8-bit limit for broadcast multiaccess media, you cannot set up more than 255 adjacencies over Gigabit Ethernet using VLAN tagging. For more information, see the JUNOS Routing Protocols Configuration Guide. |
VLAN IDs 1 through 511 are reserved for normal VLANs. VLAN IDs 512 and above are reserved for VLAN circuit cross-connect (CCCs).
For Gigabit Ethernet IQ interfaces and Gigabit Ethernet PICs with SFPs (except the 10-port Gigabit Ethernet PIC and the built-in Gigabit Ethernet port on the M7i platform), you can configure flexible Ethernet services encapsulation on the physical interface. With flexible Ethernet services encapsulation, VLAN IDs from 1 through 511 are no longer reserved for normal VLANs.
Table 47 lists VLAN ID range by interface type.
Table 47: VLAN ID Range by Interface Type
The vlan-id-range statement allows a range of VLAN IDs to be bound to a single logical port. A VLAN range can be used by service providers to interconnect multiple VLANs belonging to a particular customer over multiple sites. Using a VLAN ID range conserves switch resources and simplifies configuration.
To configure mixed tagging, include the vlan-id-range statement at the [edit interfaces ge-fpc/pic/port] hierarchy level:
- [edit interfaces ge-fpc/pic/port]
-
unit logical-unit-number{
- encapsulation vlan-bridge;
-
vlan-id-range number-number;
- }
The following example configures two different ranges of VLAN IDs on two different logical ports:
- [edit interfaces]
- ge-3/0/0 {
- flexible-vlan-tagging;
-
- unit 0 {
- encapsulation vlan-bridge;
- vlan-id-range 500-600;
- }
- }
- ge-3/0/1 {
-
- flexible-vlan-tagging;
- unit 0 {
- encapsulation vlan-bridge;
- vlan-id-range 200-300;
- }
- }