Router–on-a-Stick Inter-VLAN Configuration

from the topology above, VLANs 10 and 20 will be created on switch SW1 using the vlan 10 and vlan 20
commands.

Example switch configuration command:

SW1#config t
SW1(config)#vlan 10
SW1(config-vlan)#vlan 20
SW1(config-vlan)#exit
The fastethernet (fa0/3) will be set to trunk mode:
SW1(config)#interface fa0/3
SW1(config-if)#switchport mode trunk
SW1(config-if)#end
SW1#

As seen above, because switch port F0/3 will been configured as a trunk port, you
do not have to assign any VLANs to the port. And VLANs 10 and 20 had been
created too.

255. Each router subinterface needs to be assigned an IP address on a unique subnet for routing to occur. VLAN ID is assigned using the encapsulation dot1q vlan_id subinterface configuration mode command.1.0 R1(config-subif)#interface fa0/0 R1(config-if)#no shut R1(config-if)#end As you can see from the above.Subinterface_id global configuration mode command.255. . This process is repeated for all the router subinterfaces that are needed to route between the VLANs configured on the network. After that. Cisco routers are configured to route traffic between the local subinterfaces by default. Note: You do not need to execute a no shutdown command at the subinterface level because it does not enable the physical interface. as a result.168.1 255.255. Next.You cannot use the switchport mode dynamic auto or switchport mode dynamic desirable commands because the router does not support dynamic trunking protocol. Dont forget save the configuration so that it is not lose after a reload of the switch. routing does not specifically need to be enabled Next.20 R1(config-subif)#encapsulation dot1q 20 R1(config-subif)#ip address 192.10 R1(config-subif)#encapsulation dot1q 10 R1(config-subif)#ip address 192. use the copy running-config startup-config command in privileged EXEC mode to back up the running configuration to the startup configuration.2. Next. use the show ip route command from privileged EXEC mode to examine the routing table. you assign the IP address for the subinterface using the ip address ip_address subnet_mask subinterface configuration mode command. the configuration of multiple subinterfaces is different than when physical interfaces are used.1 255. Each subinterface is created using the interface interface_id. the router can be configured to perform the inter-VLAN routing Example of router R1 configuration command: R1#config t R1(config)#interface fa0/0.255.0 R1(config-subif)#interface fa0/0.168.

use the show running-config command in privileged EXEC mode.2.orbit-computer-solutions.1.php#sthash.: Interface VLAN ID Fa0/0 Fa0/0 Subinterface Gateway IP Address/Mask Router Encapsulation fa0/0.10 VLAN 10 fa0/0.com/How-to-Configure-Router-on-aStick-InterVLAN-Routing.To verify the router configuration.dpuf .168.See more at: http://www. The show running-config command displays the current operating configuration of the router.ebQ8VtZ9.20 VLAN 20 192.1/24 encapsulation dot1q 10 192.1/24 encapsulation dot1q 20 .168.