Sie sind auf Seite 1von 6

7/24/2014 How to configure Inter-VLAN Routing with ROAS | TechVine Tech Support Blog

http://www.it-support.com.au/how-to-configure-inter-vlan-routing-with-roas/2013/10/ 1/6
TechVine | Tech Tips &
Reviews
TechVine
How-To Guides
Software Reviews
About TechVine
Cloud BT
How to configure Inter-VLAN Routing with ROAS
October 24, 2013
Cisco
0 Comments
In this post we are going to show you how you can implement router on a stick. You can use cisco packet tracer
program as a virtual lab on your computer. Figure 1 shows the scenario that we are going to implement.
What is a Router on a stick?
A Stub router, One-armed router or router on a stick, is a router that routes traffic between virtual local area
networks (VLANs). It has only a single Ethernet NIC that is part of two or more Virtual LANs, enabling them to be
joined.
A switch allows multiple virtual LANs to coexist on the same physical switch. This means that two machines
attached to the same switch cannot send Ethernet frames to each other. 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. The only difference is that the router contains only a single Ethernet NIC that is part of both
VLANs. Hence we call it Router on a stick or one-armed.
Figure 1
First 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.
Step 1
To configure the VLANs on the switch follow these steps:
1. Switch#config t
2. Switch(config)#vlan 10
3. Switch(config-vlan)#Name Accounting
Call us on 1300 737 205
7/24/2014 How to configure Inter-VLAN Routing with ROAS | TechVine Tech Support Blog
http://www.it-support.com.au/how-to-configure-inter-vlan-routing-with-roas/2013/10/ 2/6
4. Switch (config-vlan)#exit
5. Switch(config)#vlan 20
6. Switch(config-vlan)#Name Engineering
7. Switch (config-vlan)#exit
With the above commands you have successfully configured the VLAN 10 and VLAN 20 on the switch and you
have assigned names to them.
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.
Step 2
To assign the ports to the VLANs follow these steps:
1. Switch(config)#interface fastEthernet 0/1
2. Switch(config-if)#switchport mode access
3. Switch(config-if)#switchport access vlan 10
4. Switch(config-if)#exit
5. Switch(config)#interface fastEthernet 0/2
6. Switch(config-if)#switchport mode access
7. Switch(config-if)#switchport access vlan 20
Verify the result of Step 1 and Step 2 by typing the Show vlan brief command on the switch.

Figure 2
Now lets add a 2621 router and configure it to route the packets between 2 VLANs.
Step 3
Configure 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).
1. Router(config)#interface fastEthernet 0/0.10
2. Router(config-subif)#encapsulation dot1Q 10
3. Router(config-subif)#ip address 192.168.10.1 255.255.255.0
4. Router(config-subif)#exit
5. Router(config)#interface fastEthernet 0/0.20
6. Router(config-subif)#encapsulation dot1Q 20
7. Router(config-subif)#ip address 192.168.20.1 255.255.255.0
7/24/2014 How to configure Inter-VLAN Routing with ROAS | TechVine Tech Support Blog
http://www.it-support.com.au/how-to-configure-inter-vlan-routing-with-roas/2013/10/ 3/6
Previous Post Next Post
8. Router(config-subif)#exit
9. Router(config)#interface fastEthernet 0/0
10. Router(config-if)#no shutdown
On the switch we need to make the port that connects our switch to the router a trunk port to make it work. In our
demonstration we are using port Fa0/24 as a trunk port. Follow below steps to make port 24 a trunk port.
Step 4
1. Switch(config)#interface fastEthernet 0/24
2. Switch(config-if)#switchport trunk allowed vlan 10,20
3. Switch(config-if)#switchport mode trunk
With these 4 steps you have configured the router to route the traffic between the VLANs. You can add 2
computers to the ports that you have configured and assign them IP address to test the result. Just pay attention
that the default gateway address of each computer in each VLAN is the routers virtual interface IP address that
you have configured for the same VLAN.
Figure 3
Enjoyed this Post?
Share on Twitter
Share on Facebook
Recent Posts:
Search Engine Optimisation A Beginners Guide
7/24/2014 How to configure Inter-VLAN Routing with ROAS | TechVine Tech Support Blog
http://www.it-support.com.au/how-to-configure-inter-vlan-routing-with-roas/2013/10/ 4/6
Google Analytics
How to erase Google Chrome Browser Sync Data
Leave a Comment
Your Name (*)
Your email (*)
Your Website
Your Message (*)
Post Post
Search
'Click or type here to search go
Categories
Android
Apple OSX
apps
Cisco
Exchange
Facebook
Gadgets
General
Gmail
Google
Google Analytics
Google Chrome
How-To Guides
7/24/2014 How to configure Inter-VLAN Routing with ROAS | TechVine Tech Support Blog
http://www.it-support.com.au/how-to-configure-inter-vlan-routing-with-roas/2013/10/ 5/6
Internet Explorer
Linux
Microsoft Office
Mozilla Firefox
News
Opera
Random
Social Media
Software Reviews
Uncategorized
VMware
Web Browser
Website
Windows
Windows Server
Meta
Log in
Disclaimer
All images from applications covered by this blog are copyright of their respective owners. Any opinions
expressed on this site are those of the authors and do not necessarily represent the opinions of TechVine.
This site is Australian owned and operated.
Cloud BT Services
IT Support
IT Services
IT Solutions
IT Consulting
IT Outsourcing
Small Business Computer Support
Data Recovery
About this Site
7/24/2014 How to configure Inter-VLAN Routing with ROAS | TechVine Tech Support Blog
http://www.it-support.com.au/how-to-configure-inter-vlan-routing-with-roas/2013/10/ 6/6
TechVine is a newly launched Australian tech blog that seeks to bring you tech tips, how-to-guides and reviews. If
you're a tech enthusiast and wish to gain some exposure, why not write for us? Hit the About Us page at the top
of thi ssite to find out more.
Copyright 2012. All Rights Reserved.
Sitemap
Home
Privacy policy

Das könnte Ihnen auch gefallen