Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

Switch trunking ports

Unanswered Question
Nov 21st, 2013
User Badges:


If I have switch A that has 3 vlans with ip addresses in other words 3 switch virtual interfaces and I configure one  port as a switchport trunk that has the following commands switchport trunk mode and encapulasation dot1q.   Now if I want connect to another switch B to allow those same vlans to go accross and then put 5 ports in those 3 vlans. The port from switch B that connects to switch A I would configure with the following commands  switchport mode trunk and  encapulasation dot1 my question is do I just configure on both switch ports switchport trunk allowed vlan all for devices from both switches in the same vlans to talk to each other or do I still need to add more commands to both switches like add the same svi from switch A to Switch B?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
bhargavdesai Thu, 11/21/2013 - 21:44
User Badges:


I just understood that you want to run a trunk between two switches.

Fist of all both the switches need to be properly inter-connected with cables.

Both the switches need to have Identical VLANs created in their VLAN database. Or somehow VTP should propagate VLAN database across your network.

Ports that inter connect both the switch should be hard code Trunk Ports. And Trunking Protocol should be identical as in your case 802.1Q (and Mostly worldwide used)

When you configure trunk port all VLANs are allowed by default. If you want to propagate specific VLANs you can configured VLANs accordingly both the side.



Horacio Gutierrez Thu, 11/21/2013 - 22:24
User Badges:


You said identical vlans need to be configured on both switches. My question can the same vlans on both switches have the same ip addresses and also do I even need to put ip addresses on both switches or can only one switch have ip adresses and the other switch just create the vlans without ip addresses?

bhargavdesai Thu, 11/21/2013 - 22:36
User Badges:


You can not have same IP on single network.

Identical VLAN i mean to say L2 VLAN, means just create VLAN no need to configure IP adress or Switch Virtual Interface SVI. You can create VLAN on Switch B and do not configured any IP adress on that it will do for you.



devils_advocate Fri, 11/22/2013 - 01:49
User Badges:
  • Gold, 750 points or more
  • Community Spotlight Award,

    Small Business, November 2015

Hi Horacio

It sounds like you are pretty much there from reading your original post.

Using the following commands creates a trunk port between the switches:

#switchport trunk encapsulation dot1q

#switchport mode trunk

If you use these commands on both the switches you are connecting together, you should get a trunk port form and by default this allows all vlans to pass traffic across it.

If you want to restrict the trunk so that it only passes traffic for specific vlans, this can be achieved using the following command:

#switchport trunk allowed vlan [X]

Replace the [X] with the vlans you want to allow. Make sure you do this both sides otherwise you may find one side sending traffic which is dropped by the other side.

Make sure the Layer 2 Vlans exist on both switches. The SVI you mentioned with be the default gateway for hosts in that Vlan and only needs to exist on the switch which is performing the intervlan routing, you do not need an SVI on each switch for every Vlan.

Hope this helps


This Discussion