02-11-2017 11:07 PM - edited 03-08-2019 09:18 AM
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
02-12-2017 02:30 AM
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.
02-12-2017 06:14 AM
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
:-)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide