Description

Adding multiple VLANs to a trunk on a Juniper interface is a common task in network configuration. This process allows multiple VLANs to share the same physical link, effectively segmenting the network while maintaining a high degree of flexibility and efficiency.

Solution

Syntax.

root# set interfaces ge-0/0/<port#> unit 0 family ethernet-switching interface-mode trunk vlan members [whitespace separated list of vlans]


Example.

With the use of the brackets ( [ ] ), you can include multiple vlans in the same statement just with a whitespace in the midle of the vlans. You can choose either to use one vlan id , a vlan-range id or the vlan name.


root# set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode trunk vlan members [ 1 2 3 4-6 seven ]
 

 Note: Do not use "," to separate the vlans since is not a valid syntax.

 

 

To configure a trunk interface to be a member of all VLANs: 

 

user@host# set interface <interface-name> unit 0 family ethernet-switching interface-mode trunk vlan members all

 

This configuration specifies that the trunk interface will be a member of all VLANs currently configured on the switch.

Modification History

2024-05-11 : Article Created

2024-30-10:

Included the command to to configure a trunk interface to be a member of all VLANs.

Edited category, included EX series