Switching

last person joined: 2 days ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  how to add vlan to trunk port

    Posted 06-12-2015 07:45

    Hi, I'm new to juniper. how to add vlan to trunk port and how to verify if its done correctly?



  • 2.  RE: how to add vlan to trunk port

     
    Posted 06-12-2015 07:52

    Hi,

     

    First add a vlan to the switch if that has not been done already

    >set vlan vlan-name vlan-id id

     

    Create the vlan on the switch

    set vlan test vlan-id 20

     

     

    set the vlan to the interface

    set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members test

     

    you can replace the ge-0/0/0 by any interface you want to add the vlan to

     

     

    To check if the vlan is on the trunk

    show interfaces ge-0/0/0


    description test;
    unit 0 {
        family ethernet-switching {

            port-mode trunk;
            vlan {
                members [ TEST-1 test];
            }
        }
    }

     

    now you need to apply the config to the switch with the commit command

     

    commit.

     

    and you are done 🙂

     

     



  • 3.  RE: how to add vlan to trunk port

    Posted 06-12-2015 08:21

    Thanks. is that access port or trunk port? I'm looking see how to add vlans to trunk port, how to remove vlan from trunk port?

     

    assume trunk port has vlan 10,20,30,40. I want to add vlan 50 to the trunk port and then remove vlan 10 from the trunk port, how to do that?

     

    what command to use for verification?



  • 4.  RE: how to add vlan to trunk port

    Posted 06-14-2015 04:22

    The same command marc showed you to add a vlan to the trunk port, you would then use replace the word "set" with "delete" to remove a vlan. Commit the configuration and it will be gone

    >show vlans extensive



  • 5.  RE: how to add vlan to trunk port

     
    Posted 06-14-2015 23:29

     

    as @lyndidon is suggesting... you van remove it with the following command

     

    delete interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members test