0% found this document useful (0 votes)
3 views3 pages

Lab6 Router On A Stick

The document explains the 'router-on-a-stick' configuration, which involves connecting a router and switch using a single Ethernet trunk link to route traffic between multiple VLANs. It details the steps for configuring both the switch and router to enable communication between VLANs, particularly in a VoIP network scenario. The configuration ensures efficient packet routing and network stability during high traffic periods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Lab6 Router On A Stick

The document explains the 'router-on-a-stick' configuration, which involves connecting a router and switch using a single Ethernet trunk link to route traffic between multiple VLANs. It details the steps for configuring both the switch and router to enable communication between VLANs, particularly in a VoIP network scenario. The configuration ensures efficient packet routing and network stability during high traffic periods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab 6: Router on a Stick

Router-on-a-stick is a term frequently used to describe a setup up that consists of a router


and switch connected using one Ethernet link configured as an 802.1q trunk link. In this setup, the
switch is configured with multiple VLANs and the router performs all routing between the different
networks/VLANs.

While some believe the term 'router-on-a-stick' sounds a bit silly, it's a very popular term and
commonly used in networks where no layer-3 switch exists. A good example of a router-on-a-stick
configuration (which also happens to be the one we are going to cover) would be a Call Manager
Express installation where there is the need to split the VoIP network, consisting of your Cisco IP
Phone devices, from your data network where all workstations and servers are located.

EXAMPLE SCENARIO

Our example is based on a scenario you are most likely to come across when dealing with
VoIP networks. Because VoIP implementations require you to separate the data and voice network
to route packets between them, you need either a layer 3 switch or a router. This configuration
ensures availability and stability of the VoIP service, especially during peak traffic hours in your
network.

Packets running between VLANs are routed via the CCME router connected to the switch
using one physical port configured as a trunk port on both ends (switch and router).

This example will show you how to configure a Cisco router and switch to create a trunk link
between them and have the router route packets between your VLANs. The figure below shows an
illustration of the above configuration.

1
STEP 1 - SWITCH CONFIGURATION

First step is to create the required two VLANs on our Cisco switch:

Switch(config)#vlan 10
Switch(config-vlan)#name lab-1
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name lab-2
Switch(config-vlan)#exit
Switch(config)#interface range fastEthernet 0/2 - fastEthernet 0/3
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit
Switch(config)#interface range fastEthernet 0/4 - fastEthernet 0/5
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#exit
Switch(config)#exit

Next, we need to create the trunk port that will connect to the router. For this purpose,
we've selected port fastethernet0/1 0/1 (port 1):

Switch(config)# interface fastethernet 0/1


Switch(config-if)# description Trunk-to-Router
Switch(config-if)# switchport mode trunk
Switch(config-if)# spanning-tree portfast trunk

To eliminate confusion, these commands are instructing the switch thus:

1) Define the trunk to use the 802.1q protocol

2) Set the specific port to trunk mode

3) Enable the spanning-tree portfast trunk function to ensure the port will forward packets
immediately when connected to a device e.g router. Note: The spanning-tree portfast trunk
command should never be used on ports that connect to another switch, to ensure
network loops are avoided.

The above steps complete the switch-side configuration.


2
STEP 2 - ROUTER CONFIGURATION

We need to follow a similar configuration for our router to enable communication with our
switch and allow all VLAN traffic to pass through and route as necessary.

Creating a trunk link on a router port is not very different from the process used above -
while we create the trunk port on one physical interface, we are required to create a sub-
interface for each VLAN.

Again, this is a fairly simple process and easy to understand once you've done it at least
one time.

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fastEthernet 0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.0.1 255.255.255.0
Router(config-subif)#exit
Router(config)#interface fastEthernet 0/0.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.1.1 255.255.255.0
Router(config-subif)#exit

Now Pc0 in vlan 10 can ping the Pc3 in the second subnetwork.

You might also like