Ethernet Switching
Highlighted
Ethernet Switching

show command to display vlan-name & active ports

‎07-13-2019 02:03 AM

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 

Ajaz Nawaz
JNCIE-SEC#254 | CCIE#15721
JNCIA-FWV | JNCIS-FWV
JNCIA-JUNOS | JNCIS-SEC
JNCIP-SEC | JNCIE-SEC
CCNP-Collaboration
7 REPLIES 7
Highlighted
Ethernet Switching

Re: show command to display vlan-name & active ports

‎07-13-2019 03:07 AM

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

show vlans | match "vlan|\*"

 

Thanks,
Nellikka
JNCIE x3 (SEC #321; SP #2839; ENT #790)
Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too!!!
Highlighted
Ethernet Switching

Re: show command to display vlan-name & active ports

[ Edited ]
‎07-13-2019 03:21 AM

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!!!

 

Highlighted
Ethernet Switching

Re: show command to display vlan-name & active ports

‎07-13-2019 04:59 AM

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

Ajaz Nawaz
JNCIE-SEC#254 | CCIE#15721
JNCIA-FWV | JNCIS-FWV
JNCIA-JUNOS | JNCIS-SEC
JNCIP-SEC | JNCIE-SEC
CCNP-Collaboration
Highlighted
Ethernet Switching
Solution
Accepted by topic author anawaz
‎07-13-2019 05:57 AM

Re: show command to display vlan-name

‎07-13-2019 05:38 AM
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
Highlighted
Ethernet Switching

Re: show command to display vlan-name

‎07-13-2019 06:14 AM

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

Ajaz Nawaz
JNCIE-SEC#254 | CCIE#15721
JNCIA-FWV | JNCIS-FWV
JNCIA-JUNOS | JNCIS-SEC
JNCIP-SEC | JNCIE-SEC
CCNP-Collaboration
Highlighted
Ethernet Switching

Re: show command to display vlan-name

‎07-13-2019 08:56 AM

Hi Jibut

Did you see my last update to this query?

Thanks

Ajaz Nawaz
JNCIE-SEC#254 | CCIE#15721
JNCIA-FWV | JNCIS-FWV
JNCIA-JUNOS | JNCIS-SEC
JNCIP-SEC | JNCIE-SEC
CCNP-Collaboration
Highlighted
Ethernet Switching

Re: show command to display vlan-name

‎07-15-2019 06:38 PM
Sure, let me check it.

Regards,
Jibu
Feedback