cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1386
Views
0
Helpful
2
Replies

Switchport Trunk allowed vlan issue

Majid Jalinousi
Level 1
Level 1

Hi buddies,

does it need to set Switchport trunk allowed vlan x same as each other between two switches?

And what's different between below two configs?

SW1 (fa0/1) ----> SW2 (fa0/1)

sw1:

int fa 0/1

 switchport access vlan 10

int vlan 10

 no shut

 ip address 100.100.100.100/24

int fa 0/1

 switchport access vlan 10

int vlan 10

 no shut

 ip address 100.100.100.111/24

OR

sw1:

int fa 0/1

 switchport mode trunk

 switchport trunk allowed vlan 10

int vlan 10

 no shut

 ip address 100.100.100.100/24

sw2:

int fa 0/1

 switchport mode trunk

 switchport trunk allowed vlan 10

int vlan 10

 no shut

 ip address 100.100.100.111/24

Actually I want to use the vlan 10 as an interconnect link between tow L3 switches.

Thanks in  advance

2 Replies 2

saif musa
Level 4
Level 4

Hi,

You can use the second configuration, but it does not look professional. chick below configuration;

SW1-fas0/1 ----UTPcable----> SW2-fas0/1

ON SW1

sw#config t

sw(config)# int fas 0/1

sw(config-int)# switchport mode access

sw(config-int)# switchport access vlan 10

sw(config-int)# no shutdown

sw(config-int)# end

sw# wr

sw# exit

and that's you will transfer vlan10 data information from SW1 to SW2. and also you have to know that in this case, all ports in SW2 will be under VLAN10. and that's what you need.

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi

You can use both method to pass the vlan 10 from a switch to other, but the first one is not scalable, for example if you create the vlan 20 and it must be shared with the Switch 2, you should make the same process like with the vlan 10, now imagine you have 100 vlans, you will not have enough ports for that. This method was used a long long time ago. 

The first option can be used for isolated 'layer 3' point to point, if both switches have routing capabilities.

Now the second option is the best if you want to pass more than 1 vlan. The reason to use trunk interfaces between 2 switches is because you can pass all the vlans that you want through one port. This method is a good practice and highly recommended.

By default if dont configure the trunk with restrictions, the trunk port will pass all the vlans. Now if you set up like your example, just the vlan 10 will be passing, and if you want to add the vlan 20 you will need to use the add word.

Example:

int fa 0/1

 switchport mode trunk

 switchport trunk allowed vlan add 20    (if the add word is not configured the vlan 20 will overwrite the vlan 10)

Now the result will be:

int fa 0/1

 switchport mode trunk

 switchport trunk allowed vlan 10, 20

*Also remember create the vlans on both switches.

Now if you want to use this point to point for routing purposes on L3 switches, you could convert the port to layer 3 port using: no switchport command. It will allow you to configure it with an IP address

SW1

int fa 0/1
no switchport
ip add 100.100.100.100 255.255.255.0
no shutdown

SW2

int fa 0/1
no switchport
ip add 100.100.100.111 255.255.255.0
no shutdown

* Remember enable ip routing command globally

Hope it is useful 

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<