Jared Heinrichs

  • Technology Blog
  • Winnipeg Computer Repair
  • Winnipeg Photographer
  • Cooking With Jared
You are here: Home / Networking / How to configure Cisco’s Router on a stick

Mar 26, 2013 By Jared Heinrichs Leave a Comment

How to configure Cisco’s Router on a stick

** NOTE ** – You don’t need to configure router on a stick if you have a layer 3 switch.

Router on a stick is a way to get VLAN’s talking to each other by routing data between the VLAN networks. Here are some of the gotchas in point form for Router on a stick:

  • You need to have at least one switch segmented into two different VLANS
  • You need a router with a FastEthernet or Gigabit port. Ethernet (10MB/sec) will not work.
  • Trunking protocol on the switch must match the trunking protocol on the router (ISL or Dot1Q)
  • The Router will use sub-interfaces… More on this later
  • You have to run the encapsulation command first.
  • Make sure that you run “no shut” on the ports used on the router. They are closed by default unlike a switch.
  • The hosts must have their default gateway changed to the sub-interface on the router.

Here’s what the packet tracer lab will look like:

image

You can download the Cisco Router on a stick lab.

In order to set this up we are going to use two networks. Note – For ease I decided to match the 3rd octet to the VLAN. If you are creating a network from scratch doing something like this makes it much easier for you know what VLAN a particular host will be in:

  1. 192.168.1.0 /24 (Default VLAN)
  2. 192.168.2.0 /24 (VLAN 2)
  3. 192.168.4.0 /24 (VLAN 4)

Couple of things to note:

  • There are three hosts connected to the switch. Each one is in a different subnet but do not currently have their Default gateways installed.
  • Nothing is setup on the switch or the router

Setup the Cisco Switch

  • conf t
  • int fast 0/24
  • switchport mode trunk
  • int fast 0/2
  • switchport access vlan 2
  • int fast 0/3
  • switchport access vlan 4
  • exit
  • exit
  • show vlan brief
  • wr

Setup the Cisco Router

We need to start with the router for this setup. Here are the commands we will need to use:

Change the fast 0/0 port on the router to up

  • conf t
  • int fast 0/0
  • ip address 192.168.1.254 255.255.255.0

Setup both sub-ports

  • int fast 0/0.2
  • encap dot1q 2 <— We’ve just told to encapsulate the sub interface and to use VLAN 2
  • ip address 192.168.2.254 255.255.255.0
  • int fast 0/0.4
  • encap dot1q 4 <— We’ve just told to encapsulate the sub interface and to use VLAN 4
  • ip address 192.168.4.254 255.255.255.0
  • exit
  • wr

Setup the Hosts

  • Make sure each of the hosts has the Default Gateway pointing to the sub-interface that you created on the Cisco router that is in it’s VLAN.
  • 192.168.1.10 /24 gateway will be 192.168.1.254
  • 192.168.2.10 /24 gateway will be 192.168.2.254
  • 192.168.4.10 /24 gateway will be 192.168.4.254

Test it Out!

  1. You should be able to ping all hosts on the network.
  2. You should be able to ping the router port and sub-ports from any machine.

Filed Under: Networking

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Board Game Rules
  • Camera
  • Computer Hardware
    • Blackberry
    • drivers
    • iPad
    • Magic Jack
    • USB
  • Damn Small Linux
  • Exam Notes
  • Facebook
  • FREE Flashcards
  • Games
    • PC
      • League of Legends
    • Wii
    • xbox 360
  • Music
  • Networking
    • Cisco Certification
    • Mitel
    • Palo Alto Firewall
  • News
    • Google
    • Microsoft
  • Operating System
    • Active Directory (2003)
    • Android
    • Command Prompt
    • Damn Small Linux
    • Group Policy
    • Hyper-V
    • IIS
    • ISA 2006
    • Mac OS X
    • Microsoft Exchange Server
    • Powershell
    • Security
    • SME Server
    • Terminal Server 2003
    • Ubuntu Linux
      • Adito Web SSL VPN
      • OpenVpn-als
      • Webmin
    • Virtual Machine Manager
    • Windows 2003 SBS
    • Windows 2003 Server
    • Windows 2008
    • Windows 2008 R2
    • Windows 2012R2
    • Windows 7
    • Windows 8
    • Windows Command Line
    • Windows Deployment Services
    • Windows Server Backup
    • Windows Vista
    • Windows XP
  • Phones
  • Photography
  • Photos
    • Animals
    • Misc
    • Nature
    • Portraits
  • Portfolio
  • Programming
    • CSS
    • HTML
    • jQuery
    • MySQL
    • PHP
    • Script
  • Programs
    • Acrobat
    • Acrobat Reader
    • Adobe Dreamweaver
    • Adobe Illustrator
    • Adobe Photoshop
    • Anti-virus Software
    • Antivirus
    • Backup Exec
    • Bittorent
    • Blackberry BESADMIN
    • Internet Explorer 9
    • Lightroom
    • Microsoft Office
    • Netbeans
    • Onenote
    • Outlook
    • Shelby
    • Sysprep
    • Trend
    • Video Editing
    • Visual Studio
    • Windows Live Writer
    • WireShark
    • XP Mode
    • Zarafa
  • Recipe
  • Review
  • Software Links
  • Troubleshooting
  • Uncategorized
  • Videos
  • Web Applications
    • Brage
    • Google
    • Spiceworks
    • Wordpress
  • Web Browsers
    • Internet Explorer
  • Web Server
    • XAMPP
  • Winnipeg
    • ISP

Try searching this site!

Copyright © 2021 Winnipeg Web Design