Router on stick method and SVI (Switched Virtual Interface) are used for Inter-Vlan communication. [For detailed notes on vlan and intervlan visit this link]
Router on stick Configuration
Configuration on switch connected to router
Switch(config)#interface fa0/10
Configuration on switch connected to router
Switch(config)#interface fa0/10
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
This is how we configure Switch.Interface between switch and router must be configured as trunk port.
Router(config)#interface fa0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.10.254 255.255.255.0
Router(config-subif)#exit
Router(config-subif)#exit
Router(config)#interface fa0/0.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.20.254 255.255.255.0
Router(config-subif)#exit
Router(config-subif)#exit
Create two sub-interfaces on the router and tell it to which VLAN they belong. Don't forget to add an IP address for each VLAN.
NOTE : Don't forget to set your IP address and gateway on the computers.
SVI (Switched Virtual Interface) Configuration
Switch(config)#ip routing
Switch(config)#interface vlan 10
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config)#interface vlan 20
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Switch(config)#ip routing
Switch(config)#interface vlan 10
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config)#interface vlan 20
Switch(config-if)#no shutdown
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Start by enabling routing using the "ip routing" command as we know routing is not enabled by default in switches. Next step is to create a SVI for VLAN 10 and 20 and configure IP addresses on them
NOTE : Don't forget to set your IP address and gateway on the computers.
NICE EXPLANATION OF ROUTER ON STICK AND SVI
ReplyDeleteTHANK YOU SHABEER BHAI
WHY ARE WE SHOUTING?
DeleteAwesome
ReplyDeleteThanks
ReplyDelete