Router On a Stick, Cisco Router On a Stick Configuration

Sharing is caring!

While studying for my Cisco Certified Network associate or CCNA, I have came across the beautiful concept of router on a stick. It is a genius method to cut down on the amount of layer 3 devices in a network while providing routing to different networks. These networks can be split via a switch into VLANS and you can use a single router to communicate between all of them. Router on a stick configurations saves a company money as they could just use one router for all their needs. Before I go into explaining the process of creating a router on a stick network, let me introduce you to GNS3.

What is GNS3?

If you are experienced with Packet Tracer then you will have an idea of what GNS3 is. The difference is that it is much better than Packet Tracer and provides for realistic virtualization. It is a free virtualization software to create computer networks which uses real Cisco IOS images and Linux OS for the hosts. These virtual networks are a cost effective way to practice your Cisco labs instead of buying expensive Cisco gear & equipment.  Although nowadays you can find used Cisco equipment on Ebay fairly cheap. Even though the GNS3 software is free to use, you will have to get your hands on proprietary Cisco IOS images from real devices or online sources. Open source Linux images for the hosts can be found online for free. You can download GNS3 free of charge on their website at https://www.gns3.com/

Router On a Stick, GNS3 Lab

I am assuming you have already setup your GNS3 for initial use, if you haven’t be sure to follow these steps on setting it up. Visit the GNS3 website, go to documentation and read the appropriate quick start guide for either Linux or Windows.

We will first need to setup a new project in GNS3. First we will drag one router, one switch and 2 hosts into the GNS3 project. The switch will be connected to the router via a straight through cable and the hosts will connect to the switch via straight through as well. First we will configure the router and create sub-interfaces for the router. These sub-interfaces allows us to create separate networks for the VLANS and route data. Notice that the encapsulation for trunking is used here which is dot1q. You can create your own networks and IP addresses for practice and do not necessarily have to use the ones provided below.

You are now done with the router configuration.

Secondly, we will configure the switch. We need to create two VLANS on the switch, VLAN 10 and VLAN 20. We will also need to create a trunk interface on the switch.

Switch#

Conf t# int f0/1

switchport mode trunk

switchport trunk encap dot1q

Now that a trunk interface is set, we will create the VLAN’s

Conf t# VLAN 10

int f0/2

switchport mode access

switchport access VLAN10

CTRL + Z

Conf t# VLAN 20

int f0/8

switchport mode access

switchport access VLAN20

Congratulations, you have successfully created VLANS on the switch and set them to trunk and access modes. Each switch port connected to the two hosts will belong to these separate VLANS 10 and 20. Another words each host will be on a different network. We then have one port on the switch going into the router as the trunk link. The trunk will carry all of the information from different VLANS into the router to be distributed. You can now try pinging from one host to the other and it should be successful, if you have followed everything correctly. Here you can see a sample  router on a stick topology to see what it would look like in GNS3 (reminder this is a different network diagram than what we configured above).

 

router on a stick

shares