Switching

Expand all | Collapse all

Native VLAN id on Juniper

Jump to Best Answer
  • 1.  Native VLAN id on Juniper

    Posted 07-04-2017 08:54

    Hi all, 

    I want to clarify something on native VLAN on Juniper vendor. 
    First of all, I know that by default Juniper do not have specific VLAN number for native VLAN. 
    In my circumstance,
    I create two VLAN are VLAN_100 and VLAN_200 with VLAN number 100 and 200 respectively. Then, I define the interface ge-0/0/0 assigned trunk mode member all,

     

    set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk
    set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members all

     

    The member all is mean that the interface ge-0/0/0 is assigned to VLAN_100 and VLAN_200 which have tag id, and the interface ge-0/0/0 leave VLAN default because at moment the interface ge-0/0/0 set trunk needs tag id (by default, the VLAN default do not have tag id). 
    After that, What happens when I set native VLAN id is 100 mapping VLAN_100? As I show VLAN on CLI device will see only the interface ge-0/0/0 assigned VLAN_200?

    The next circumstance, as I define native VLAN id is 100 mapping VLAN_100 and the interface ge-0/0/0 assigned trunk mode member [VLAN_100 VLAN_200]. Does CLI command work? And what behavior of VLAN_100 when transmit and receive? The interface ge-0/0/0 connect with VLAN number 100 must be tagged id when transmitting/receiving traffic or not?

    Please correct and clarify this to me. 

    Thanks a lot. 



  • 2.  RE: Native VLAN id on Juniper
    Best Answer

     
    Posted 07-04-2017 11:19
    set vlans VLAN_100 vlan-id 100
    set vlans VLAN_200 vlan-id 200
    
    == CASE 1
    
    set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk
    set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members all
    
    OR
    
    set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk
    set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_100
    set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_200
    
    lab@switch# run show vlans
    Name           Tag     Interfaces
    VLAN_100       100
                           ge-0/0/0.0*
    VLAN_200       200
                           ge-0/0/0.0*
    
    Traffic from/to VLAN_100 sent/received on ge-0/0/0 is tagged.
    
    == CASE 2
    
    set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk
    set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members all
    set interfaces ge-0/0/0 unit 0 family ethernet-switching native-vlan-id VLAN_100
    
    OR
    
    set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk
    set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_100
    set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_200
    set interfaces ge-0/0/0 unit 0 family ethernet-switching native-vlan-id VLAN_100
    
    lab@switch# run show vlans
    Name           Tag     Interfaces
    VLAN_100       100
                           ge-0/0/0.0*
    VLAN_200       200
                           ge-0/0/0.0*
    
    Traffic from VLAN_100 sent over ge-0/0/0 is tagged. Received traffic can be tagged with ID 100 or not tagged.
    Either way it will be classified as traffic destined to VLAN_100. === CASE 3
    set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_200 set interfaces ge-0/0/0 unit 0 family ethernet-switching native-vlan-id VLAN_100 lab@switch# run show vlans Name Tag Interfaces VLAN_100 100 ge-0/0/0.0* VLAN_200 200 ge-0/0/0.0* Traffic from/to VLAN_100 sent/received on ge-0/0/0 is not tagged. == CASE 4 set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_100 set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_200 set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members default COMMIT ERROR set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_100 set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN_200 set interfaces ge-0/0/0 unit 0 family ethernet-switching native-vlan-id default Traffic from/to default vlan sent/received on ge-0/0/0 is not tagged. == CASE 5 set vlans default vlan-id 300 Behavior of default vlan is the same as any other user configured vlan (CASE 1-3).

     

    Regards, Wojtek



  • 3.  RE: Native VLAN id on Juniper

    Posted 07-05-2017 01:43

    Hi wdudys, 

    Thank you for your clarification. 🙂 

    Regards,



  • 4.  RE: Native VLAN id on Juniper

    Posted 11-06-2018 14:35

    FYI...the native vlan behavior changes on QFX or ELS junos OS versions - 

     

    https://kb.juniper.net/InfoCenter/index?page=content&id=KB32289&pmv=print&actp=RSS&searchid=&type=currentpaging