Trunking and Intervlan routing
Trunking is used to communicate between different Vlan in different switches.Trunking is enabled by giving trunk encapsulation in trunking port.Intervlan routing is used to communicate between vlans.
[10 range ip’s are in Vlan 10 and 20 range ip’s are in Vlan 20]
Requirement is to communicate between different vlans and networks.
Create Vlan’s in 2 switches
Create Vlan 10 and vlan 20 in layer 2 switch
Layer 2 switch configuration
Switch(config)vlan 10
Switch(config)name <anyname>
Exit
Switch(config)vlan 20
Switch(config)name <anyname>
Add interfaces to vlan.{interface adding command in my previous note: Vlan Notes
Then the layer 2 to layer 3 switch connected interface should be enable trunk
In this scenario f0/1 should be trunked
Switch(config)#interface f0/1
Switch(config-if)#switchport mode trunk
Layer 3 switch configuration
Create vlan 10 and 20
Add interfaces to vlan.{interface adding command in my previous note: Vlan Notes
Interface f0/1 should be enabled trunking
In layer 3 first give –encapsulation command
Switch(config)#interface f0/1
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#Switchport mode trunk
Next step is to done intervlan routing for communicating the different vlans
Switch(config)#interface vlan 10
Switch(config-if)ip address 10.0.0.5 255.0.0.0
Exit
Switch(config)#interface vlan 20
Switch(config-if)#ip address 20.0.0.5 255.0.0.0
Exit
Switch(config)#ip routing
[ Host computers set ip and gateway should be vlan ip ,so,in this scenario gateway is 10.0.0.5]
Trunking is used to communicate between different Vlan in different switches.Trunking is enabled by giving trunk encapsulation in trunking port.Intervlan routing is used to communicate between vlans.
[10 range ip’s are in Vlan 10 and 20 range ip’s are in Vlan 20]
Requirement is to communicate between different vlans and networks.
Create Vlan’s in 2 switches
Create Vlan 10 and vlan 20 in layer 2 switch
Layer 2 switch configuration
Switch(config)vlan 10
Switch(config)name <anyname>
Exit
Switch(config)vlan 20
Switch(config)name <anyname>
Add interfaces to vlan.{interface adding command in my previous note: Vlan Notes
Then the layer 2 to layer 3 switch connected interface should be enable trunk
In this scenario f0/1 should be trunked
Switch(config)#interface f0/1
Switch(config-if)#switchport mode trunk
Layer 3 switch configuration
Create vlan 10 and 20
Add interfaces to vlan.{interface adding command in my previous note: Vlan Notes
Interface f0/1 should be enabled trunking
In layer 3 first give –encapsulation command
Switch(config)#interface f0/1
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#Switchport mode trunk
Next step is to done intervlan routing for communicating the different vlans
Switch(config)#interface vlan 10
Switch(config-if)ip address 10.0.0.5 255.0.0.0
Exit
Switch(config)#interface vlan 20
Switch(config-if)#ip address 20.0.0.5 255.0.0.0
Exit
Switch(config)#ip routing
[ Host computers set ip and gateway should be vlan ip ,so,in this scenario gateway is 10.0.0.5]
No comments:
Post a Comment