
Router(config-subif)#encapsulation dot1Q 20ħ. Router(config)#interface fastEthernet 0/0.20Ħ. Router(config-subif)#encapsulation dot1Q 10ģ. Router(config)#interface fastEthernet 0/0.10Ģ.

Now let’s add a 2621 router and configure it to route the packets between 2 VLANs.Ĭonfigure 2 virtual interfaces on fa0/1 and assign them to VLAN 10 and VLAN 20 for the sake of making configuration understandable to everyone it is better to use the same names or numbers for the VLANs (Here we use VLAN 10 and VLAN 20 as we used them before in our switch configuration).ġ. Verify the result of Step 1 and Step 2 by typing the Show vlan brief command on the switch.

Switch(config-if)#switchport access vlan 20 Switch(config-if)#switchport mode accessħ. Switch(config)#interface fastEthernet 0/2Ħ. Switch(config-if)#switchport access vlan 10ĥ. Switch(config-if)#switchport mode accessģ. Switch(config)#interface fastEthernet 0/1Ģ. To assign the ports to the VLANs follow these steps:ġ. Now we are going to assign Fa0/1 port to Accounting (VLAN 10) and Fa0/2 port to Engineering (VLAN 20) that we made in Step 1. With the above commands you have successfully configured the VLAN 10 and VLAN 20 on the switch and you have assigned names to them.

To configure the VLANs on the switch follow these steps: Hence we call it Router on a stick or “one-armed”.įirst we are going to add a Cisco 2960 switch and 2 computers to our virtual lab and then we configure 2 VLANs on the switch that are named VLAN 10 (Accounting) and VLAN 20 (Engineering) as depicted in Figure 1. The only difference is that the router contains only a single Ethernet NIC that is part of both VLANs. If they need to communicate, then a router must be placed between the two VLANs to forward packets between them, just as if the two LANs were physically isolated. This means that two machines attached to the same switch cannot send Ethernet frames to each other. It has only a single Ethernet NIC that is part of two or more Virtual LANs, enabling them to be joined.Ī switch allows multiple virtual LANs to coexist on the same physical switch. Figure 1 shows the scenario that we are going to implement.Ī Stub router, One-armed router or router on a stick, is a router that routes traffic between virtual local area networks (VLANs). You can use cisco packet tracer program as a virtual lab on your computer. In this post we are going to show you how you can implement router on a stick.
