
#Configure router on a stick on router Pc#
If you look at the network topology below you can see where Cisco came up with the name "Router on Stick" each PC is on its own network and needs the router in order for traffic to pass between the networks. If you like to understand how create VLANs on a switch follow the post above. I have already configured the Cisco switch as posted in Creating VLANs but in summary I have three VLANs total VLAN 1 which is the native VLAN, VLAN 2 and VLAN 3 (which is called support. By having VLANs you are segmenting the network and the only way to get to the other side is having a router. Router(config-subif)#ip add 192.168.3.1 while ago I talked about putting different VLANs on a switch, remember a VLAN is virtual network that although physically it may look like on the same network that does not always mean the case. Router(config-subif)#encapsulation dot1Q 10 Router(config-subif)#in fastethernet 0/1.10 Router(config-subif)#encapsulation dot1Q 5 Router(config)#interface fastethernet 0/1.5 Switch(config-if)#switchport access vlan 10 Switch(config-if)#switchport access vlan 5 Create sub-interface and allow routing between the VlansĬlick on pc0 > click on desktop tab > click on IP configuration > set IP address and default gateway Configure trunk connection between router and a switchĤ. Create Vlans and assign ports to the Vlansģ. Assign IP address and default gateway to the PCĢ. Router on a stick configuration in packet tracer.ġ. Some of the important concepts in this lab are – to create sub-interfaces, use encapsulation dot1Q command to encapsulate the traffic, and mentioning the VLAN number to ascertain that for which VLAN the sub-interface should respond. In the below lab, we will configure ‘Router on a Stick’ that would allow routing between the VLANs. However, Layer 3 Switch is quite expensive so it might not be an affordable option for small office networks. A Layer 3 Switch will then enable routing between VLANs as it has routing capabilities as well. We just have to create virtual interfaces for each VLAN and assign them IP Addresses from the same network. The more simple way to do routing between VLANs is by using a Layer 3 Switch. Hence, ‘Router on a Stick’ is a perfect solution for routing between VLANs with just one router interface. So, it becomes practically non-efficient if we have multiple VLANs. You can see that we have to use extra interfaces for each VLAN. We have not created a sub-interface in the below figure. As you can see, we are using two interfaces on both the router and a switch to allow routing between VLANs. The image below is an alternative method for allowing routing between VLANs. And if we enable routing between multiple VLANs then it will become practically inefficient as the switches and the routers will use those multiple interfaces. If we create a route between VLANs without the ‘Router on a Stick’ method, then we have to waste interfaces on the switches and routers. To make it work, we have to create a truck connection between the switch and a router so that traffic from multiple VLANs can be sent to the router. ‘Router on a stick’ allows us to create sub-interfaces, and assign IP Addresses to those sub-interfaces. And we can assign only one IP Address to a router interface. In general, routers can take traffic from only one subnet and transfer it to another subnet. ‘Router on a Stick’ allows routing between VLANs with only one interface.
