Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[EX/QFX] Example - Configuring VLANS and Trunking

0

0

Article ID: KB11013 KB Last Updated: 13 Sep 2019Version: 4.0
Summary:

The purpose of this article is to explain how to configure VLANs and trunks on the EX Series (Enhanced Layer 2 Software (ELS) and legacy) Switches and QFX devices, and verify that they are created.

Solution:

1. From configuration mode, create the VLAN and add access vlan members to it:

  • ELS EX and QFX devices:

    root> configure 
    Entering configuration mode

    [edit]
    root# set vlans <vlan-name> vlan-id <vlan-id (1..4095)>
    root# set interfaces ge-0/0/<port#>.0 family ethernet-switching interface-mode access vlan members <vlan-name>
    root# commit

     

  • Legacy devices EX:

    root> configure 
    Entering configuration mode

    [edit]
    root# set vlans <vlan-name> vlan-id <vlan-id (1..4095)>
    root# set interfaces ge-0/0/<port#>.0 family ethernet-switching port-mode access vlan members <vlan-name>
    root# commit

     

2. Verify the VLAN and interface:

root# run show vlans
-------------------------------------------------------
Name           Tag     Adress            Ports
                                       Active/Total
-------------------------------------------------------
bar           67      ---------           0/0
default       None    ---------           3/5
foo           66      ---------           1/1

 
root# run show ethernet-switching table | except :

  VLAN              MAC address       Type         Age Interfaces
  foo               *                 Flood          - ge-0/0/5.0
  bar               *                 Flood          - ge-0/0/16.0, ge-0/0/15.0
  default           *                 Flood          - ge-0/0/0.0, ge-0/0/1.0, ge-0/0/2.0

 
root# run show ethernet-switching interfaces
Interface   Index    State     VLAN members
ge-0/0/0.0  69       UP        default
ge-0/0/1.0  70       UP        default
ge-0/0/5.0  71       UP        foo

 
root# show ethernet-switching interfaces detail
Interface: ge-0/0/0.0 Index: 69
  State: UP
  Vlans: default(untagged)

Interface: ge-0/0/1.0 Index: 70
  State: UP
  Vlans: default(untagged)

Interface: ge-0/0/5.0 Index: 71
  State: UP
  Vlans: foo(untagged)


 

3. Configure the trunk and add VLAN that was created in previous steps:
 

  • ELS EX and QFX devices:

    root# set interfaces ge-0/0/<port#>.0 family ethernet-switching interface-mode trunk [native-vlan-id <id>] vlan members [ whitespace separated list of vlan names or IDs ]

    root# commit

     

  • Legacy devices:

    root# set interfaces ge-0/0/<port#>.0 family ethernet-switching port-mode trunk [native-vlan-id <id>] vlan members [ whitespace separated list of vlan names or IDs ]

    root# commit

     

4. Verify the trunk and the VLAN members for this trunk:

root# run show interfaces ge-0/0/<port#>.0
Flags: Trunk-Mode <---

root# run show ethernet-switching interfaces
Interface   Index    State     VLAN members
ge-0/0/2.0  71       UP        my-vlan, mydefault, pfetest
Modification History:
2019-09-13: Updated article to include ELS command syntax.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search