Creating vlan 33Ībove Command will create the vlan 33 automatically on switch. Switch(config-if-range)# switchport access vlan 33 Switch(config-if-range)# switchport mode access Switch(config)# interface range fastEthernet 0/2 – 3
We will assign the vlan 33 to port2 and port3 as it is in vlan 33, while other ports will be assign with vlan 44. Configure the each device according to following configuration.įour ports are required to be configured as access ports because these ports are connected with the PCs.
We can configure an IP address on each sub-interface in order to make communication possible between different Vlans.ĭesign the lab according to following figure and we have four PC/host PC0 & PC1 are belongs to vlan 33 and PC2 & PC3 are belong to vlan 44. In this lesson I will show you how you can use a router connecting different Vlans with each other with single switch & this is known as “router on a stick” or “inter-vlan routing”.įor inter clan routing you are required to create the sub-interfaces for each vlan on a router. You require a router if you want to interconnect VLANs with each other. In this way you can configure inter-vlan routing on Cisco switch and router.Router on a stick configuration on Packet Tracerīy default the nodes associated to same vlans can communicate with each other in switching environment. Minimum = 14ms, Maximum = 24ms, Average = 18ms Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),Īpproximate round trip times in milli-seconds: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down Switch1(config-if)#switchport trunk encapsulation dot1q Now, let’s configure Switch1 with TRUNK interface. Vlan1 unassigned YES unset administratively down downĪs you can see above interface fa0/0.2 and fa0/0.3 are up with their respective IP address configured.
Router on a stick vlan manual#
Interface IP-Address OK? Method Status ProtocolįastEthernet0/0 unassigned YES unset up upįastEthernet0/0.2 192.168.2.254 YES manual up upįastEthernet0/0.3 192.168.3.254 YES manual up upįastEthernet0/1 unassigned YES unset administratively down down
You can view the list of interface using, show ip interface brief command as shown below. IP address command simply assigns IP address to the sub interface. Command encapsulation dot1q 2 means this sub interface will accept frames tagged with VLAN 2 on them. %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to up %LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up %LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up You can configure many sub interfaces under same physical interface. The sub interface can be configured with different IP address.
The interface of router connected to switch must have sub interfaces created with dot1q encapsulation. A sub interface is a logical interface that is part of the physical interface. Fa0/0 of R1 is connected to Fa0/7 of Switch1. Here, we need to create TRUNK link between Switch1 and R1. For inter vlan routing to work, you need to create TRUNK link between Switch and the router. Each host have IP assigned as shown below. Similarly, Host A and Host E are on VLAN 3, and Host B and Host C are on VLAN 2. PCs in VLAN 2 will have IP of 192.168.2.0/24 network and PCs in VLAN 3 will have IP of 192.168.3.0/24 network. The switch is configured with two VLANs 2 and 3. Configure Inter VLAN Routing in Cisco Router In this post, I will show steps to Configure Inter VLAN Routing in Cisco Router also called router on a stick. Layer 3 switches are pretty expensive which is the main reason why router on a stick configuration is popular. Routing between the VLANs can be done using layer 3 switch or use more popular form of inter-vlan routing called router on a stick. Communication between different VLANs require router or some form of routing.