Switching

 View Only

IMPORTANT MODERATION NOTICE

This community is currently under full moderation, meaning  all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you'll receive an email outlining the reason(s). We've implemented full moderation to control spam. Thank you for your patience and participation.



  • 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


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

    Posted 12-06-2021 18:06

    I'm sorry, but none of the solutions offered in this thread work.  

    show vlans |match "default|\*"
    ae0.0*, ge-0/0/0.0*, ge-0/0/1.0, ge-0/0/2.0, ge-0/0/4.0, ge-0/0/6.0, ge-0/0/7.0, ge-0/0/8.0, ge-0/0/9.0, ge-0/0/10.0,
    ge-0/0/11.0, ge-0/0/12.0*, ge-0/0/13.0, ge-0/0/14.0, ge-0/0/15.0, ge-0/0/16.0, ge-0/0/17.0, ge-0/0/18.0*, ge-0/0/19.0,
    ge-0/0/30.0, ge-0/0/31.0*, ge-0/0/32.0, ge-0/0/33.0, ge-0/0/34.0*, ge-0/0/35.0, ge-0/0/36.0, ge-0/0/37.0, ge-0/0/38.0*,
    ge-0/0/39.0*, ge-0/0/40.0*, ge-0/0/41.0, ge-0/0/42.0, ge-0/0/43.0, ge-0/0/44.0, ge-0/0/45.0, ge-0/0/46.0*, ge-0/0/47.0,
    ge-1/0/0.0, ge-1/0/1.0, ge-1/0/2.0, ge-1/0/3.0, ge-1/0/4.0, ge-1/0/5.0, ge-1/0/6.0, ge-1/0/7.0*, ge-1/0/8.0, ge-1/0/9.0,
    ge-1/0/10.0, ge-1/0/11.0*, ge-1/0/12.0, ge-1/0/13.0, ge-1/0/14.0, ge-1/0/15.0, ge-1/0/16.0, ge-1/0/17.0*, ge-1/0/18.0,
    ge-1/0/19.0*, ge-1/0/20.0, ge-1/0/21.0, ge-1/0/22.0, ge-1/0/23.0, ge-1/0/24.0, ge-1/0/25.0, ge-1/0/26.0, ge-1/0/27.0*,
    ge-1/0/28.0, ge-1/0/29.0*, ge-1/0/30.0, ge-1/0/31.0, ge-1/0/32.0, ge-1/0/33.0, ge-1/0/34.0, ge-1/0/35.0*, ge-1/0/36.0,
    ge-1/0/37.0, ge-1/0/38.0, ge-1/0/39.0, ge-1/0/40.0*, ge-1/0/41.0*, ge-1/0/42.0, ge-1/0/43.0, ge-1/0/44.0, ge-1/0/45.0,
    ge-1/0/46.0*, ge-1/0/47.0, ge-2/0/0.0, ge-2/0/1.0, ge-2/0/2.0*, ge-2/0/3.0, ge-2/0/4.0, ge-2/0/5.0, ge-2/0/6.0,
    ge-2/0/7.0, ge-2/0/8.0, ge-2/0/10.0, ge-2/0/11.0*, ge-2/0/12.0, ge-2/0/13.0, ge-2/0/14.0, ge-2/0/15.0, ge-2/0/16.0,
    ge-2/0/17.0, ge-2/0/18.0, ge-2/0/19.0*, ge-2/0/20.0, ge-2/0/21.0*, ge-2/0/22.0*, ge-2/0/23.0, ge-2/0/24.0, ge-2/0/25.0,
    ge-2/0/26.0, ge-2/0/27.0, ge-2/0/28.0, ge-2/0/29.0, ge-2/0/30.0, ge-2/0/31.0*, ge-2/0/32.0, ge-2/0/33.0, ge-2/0/34.0,
    ge-2/0/35.0, ge-2/0/36.0, ge-2/0/37.0, ge-2/0/38.0, ge-2/0/39.0, ge-2/0/40.0, ge-2/0/41.0, ge-2/0/42.0*, ge-2/0/43.0,
    ge-2/0/44.0, ge-2/0/45.0, ge-2/0/46.0*, ge-2/0/47.0, ge-3/0/0.0, ge-3/0/1.0, ge-3/0/2.0, ge-3/0/3.0, ge-3/0/4.0,
    ge-3/0/32.0*, ge-3/0/33.0, ge-3/0/34.0, ge-3/0/35.0, ge-3/0/36.0, ge-3/0/37.0, ge-3/0/38.0, ge-3/0/39.0, ge-3/0/40.0,
    ge-3/0/41.0, ge-3/0/43.0, ge-3/0/45.0, ge-3/0/46.0*, ge-3/0/47.0

    There's the output.  I only want to see ports with "*", but when I do a SHOW VLAN | MATCH "*" I get: [repetition-operator operand invalid]