cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
369
Views
0
Helpful
4
Replies

Switch trunking ports

Hello,

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?

4 Replies 4

bhargavdesai
Spotlight
Spotlight

Hi,

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.

H2H

Bhaggu

Hello,

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?

Hello,

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.

H2H

Bhaggu

devils_advocate
Level 7
Level 7

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

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:

Review Cisco Networking products for a $25 gift card