Switching

Expand all | Collapse all

show command to display vlan-name & active ports

Jump to Best Answer
  • 1.  show command to display vlan-name & active ports

    Posted 07-13-2019 02:04

    I have previously used  show vlans |m "\*"

    but the above does not display the vlan name itself...

     

    Can I please ask if anyone knows how to show vlan AND active ports within each vlan

     

    many thanks 



  • 2.  RE: show command to display vlan-name & active ports

    Posted 07-13-2019 03:08

    Please try below command. Replace the vlan with your vlan name prefix:

    show vlans | match "vlan|\*"

     



  • 3.  RE: show command to display vlan-name & active ports

     
    Posted 07-13-2019 03:22

    Hi Ajaz,

     

    If I am getting your query correctly, I think you can get the desired output using command ' show vlans brief '. If you need any specific vlans, than you can use match statement with this command and match with vlan name.

     

    This command will show the routing instance , vlan name and active ports/interfaces in that vlan,

     

    labroot@jtac-qfx5100-24q-2p-r2212> show vlans brief

    Routing instance                VLAN name            Tag                        Interfaces
    default-switch                           default                1                           xe-0/1/3.0*
    default-switch                              v10                 10                          ae0.0
                                                                                                                 ae1.0
                                                                                                                 xe-0/1/5.0

    default-switch                              v100               100                        ae0.0

     

     

    Regards,

    Ankur

    Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too!!!

     



  • 4.  RE: show command to display vlan-name & active ports

    Posted 07-13-2019 04:59

    gents...

    neither work.

    Would like to view this:

    labroot@jtac-qfx5100-24q-2p-r2212> show vlans brief

    Routing instance                VLAN name            Tag                        Interfaces
    default-switch                           default                1                           xe-0/1/3.0* <--- just the interfaces with ' * ' and vlan info i.e name/tag
    default-switch                              v10                 10                          ae0.0

                                                                                                                 xe-0/1/5.0

    default-switch                              v100               100                        ae0.0



  • 5.  RE: show command to display vlan-name & active ports
    Best Answer

    Posted 07-13-2019 05:38
    Will this work for you. Though it will list all the vlans which does not have any active intefaces.

    show vlans |match "default|\*"
    default-switch default 1
    xe-0/1/3.0*
    default-switch v10 10
    xe-0/1/5.0*
    default-switch v100 100
    xe-0/1/1.0*
    default-switch v20 20
    default-switch v200 200
    default-switch v30 30
    xe-0/1/1.0*

    Regards,
    Jibu


  • 6.  RE: show command to display vlan-name & active ports

    Posted 07-13-2019 06:14

    We're nearly there, but not quite...

     

    That command provide all interfaces with asterisk, and the first line from output containing 'vlan' word.

    requirement is to see all vlans with all their respective ports configured in those vlans. e.g.

     

    vlan-id  vlan 100

    ge-1/0/0*

    ge-1/0/1*

     

    vlan 200

    ge-2/0/0*

    ge-2/0/1*

     

    vlan 300

    ge-3/0/0*

    ge-3/0/1*

     

    Actually it seems there are four columns when observing the output from show vlans, and we need all four



  • 7.  RE: show command to display vlan-name & active ports

    Posted 07-13-2019 08:57

    Hi Jibut

    Did you see my last update to this query?

    Thanks



  • 8.  RE: show command to display vlan-name & active ports

    Posted 07-15-2019 18:38
    Sure, let me check it.

    Regards,
    Jibu