cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
726
Views
25
Helpful
4
Replies

allow vlans in trunk port is not working

Mordecalex
Level 1
Level 1

Hi, i would like my web server just accept traffic from vlan 20 (i got 3 multilayer switches with vlan 20) but when i use my central switch and enter the following commands:

enable

config term

int g0/1

switchport trunk allow vlan 20

my server stop receiving traffic from every vlan, why is that? am i missing some step?

 

here is the file from packet tracer

1 Accepted Solution

Accepted Solutions

When you configure g0/1 as a trunk the result is that all vlans are allowed on the trunk. When you add the command 

switchport trunk allow vlan 20

the result is that only vlan 20 is allowed on the trunk. All other vlans are not allowed on that trunk.

We do not know much about your environment and what you are attempting to achieve. But if you have a server and you want only vlan 20 to be able to access the server then I would suggest that a good solution would be to use an access list to restrict access.

HTH

Rick

View solution in original post

4 Replies 4

allow vlan 20 ?? I think you need to allow vlan1 also. 

When you configure g0/1 as a trunk the result is that all vlans are allowed on the trunk. When you add the command 

switchport trunk allow vlan 20

the result is that only vlan 20 is allowed on the trunk. All other vlans are not allowed on that trunk.

We do not know much about your environment and what you are attempting to achieve. But if you have a server and you want only vlan 20 to be able to access the server then I would suggest that a good solution would be to use an access list to restrict access.

HTH

Rick

An addition to the excellent point that @Richard Burts made is that the default on a trunk is to allow all known VLAN's. If you are trying to pass a VLAN through a switch and it doesn't know about it, that traffic will get dropped. VTP transparent will (I think) let unknown VLAN's pass, but any other VTP mode will definitely not pass unknown VLAN's.

I am glad that our suggestions have been helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco