cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
838
Views
20
Helpful
8
Replies

Trunking VLANs

CipTC
Level 1
Level 1

Hi everyone,

 

This is the first time when I writing to this community and asking for help. So please be kind if this post is not opened in the correct section and advise how should I do this correctly next time.

 

That been said, please let me know if there is any easy solution to this issue:

I have a bunch of vlans and I would like to check if all of them are trunked correctly. Instead of checking each vlan one by one, I would like to check all of them at once.

 

switchport trunk allowed vlan 19,22,29,44,101,103-106,108-115,117,122-123,125-129,131,140,142-147,150,160,164-169,172-173,177,179,186,193,203-204,225-226,303-314,322-323,326-327,330-331,340,342-343,345-347,360,366-367,376,379,393,1011,1401

 

Usually I would use "show vlan id xxx" but I am looking for a faster way for doing this. As you can see, there are many vlans and it will take a lot of time to check all of them one by one.

 

I am also interested how to check if any of these vlans are missing from the switch configuration. 

 

Like for example if you do "show vlan id 19,22,29,44,101,103-106,108-115 .... " the switch will show me only the vlans that are configured but it will not tell me which vlan is missing.

 

Hardware used:

cisco Nexus9000 C9396PX

1 Accepted Solution

Accepted Solutions

Hello

 

Sh interface trunk  -  this will show what is allowed to cross the trunk and what is at present being used over that trunk
Sh vlan brief <--  this will show what vlans are in the vlan database of the switch


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

8 Replies 8

Hello

 

Sh interface trunk  -  this will show what is allowed to cross the trunk and what is at present being used over that trunk
Sh vlan brief <--  this will show what vlans are in the vlan database of the switch


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks Paul!
sh interface trunk - seems to be useful for what I need. I forgot about this command.
I know about - sh vlan brief. This shows all the vlans available on the switch and their statuses but I was mainly interested if there is a command that can show me a missing vlan from a list of vlans. Do you know or remember any?

you can also do this, assuming gig1/0/1 is the trunk port - sh run int g1/0/1 - you can see the actual cmd switchport trunk allowed vlan ..... - & then see which vlans are allowed - as well as the rest of the trunk port config

regards, mk

please rate if helpful :)

Hello


@CipTC wrote:
 I was mainly interested if there is a command that can show me a missing vlan from a list of vlans. Do you know or remember any?

Not so sure what you mean here, can you elaborate a bit more?

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

It seems to me that it is pretty clear that the original poster is asking for a command that will show what might be missing from the config. Unfortunately I do not believe that any such command exists. In my experience the most difficult part of troubleshooting is to identify things that should be present but are missing. It is usually easier to identify something that is in the config that should not be, or to identify something that is in the config with an incorrect value. But it is quite difficult to identify what should be there but is not.

 

HTH

 

Rick

HTH

Rick

Let's say vlans 10,20,30 are configured on the switch and vlans 40 and 50 are missing from the switch configuration.
If I want to run - show vlan id 10,20,30,40,50
I would like the switch to show me(tell me) that vlans 10,20 and 30 are present on the switch and vlans 40, 50 are not present on the switch.
This way I could identify easily what vlans I am missing, right?
This is an easy case(example) with 5 vlans and it is very visible which ones are missing and configure them without the switch to tell us which vlan is missing. But imagine if you have to check which vlan is missing from a list of 100 vlans. There is not easy way to do that from what I know. Only to count them manually one by one, right? That is what I am trying to find out here :) Let's exclude VTP. My company doesn't allow VTP configuration in the network.

Hello

So as the others have stated no command feature exist for this however those two commands I originally posted will  easily allow you check is if your missing a vlan as they list the vlan -ids sequentially


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

I agree with @Richard Burts there is no such command but I want to add a new suggestion to go with VTP feature. It will decrease your headache of VLAN configuration on each switch.

 

Regards,

Deepak Kumar

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!
Review Cisco Networking for a $25 gift card