Skip to content
  • There are no suggestions because the search field is empty.

Configuring the Router-on-a-Stick Solution

The configuration process of the router-on-a-stick solution consists of two parts: configuring the switch and the router. On the switch, you need to:

  1. create the desired VLANs, 
  2. set the membership mode on the interfaces, and
  3. assign the access ports to the corresponding VLANs. 

On the router, you need to:

  1. create subinterfaces, 
  2. assign them to the desired VLANs, and 
  3. define IP addresses.

VLAN and Trunking Configuration on a Switch

Based on the topology example in the image above, you need to configure the following commands on the switch, assuming the interfaces are already enabled:

Configuring the router-on-a-stick solution on a switch 

Subinterface Configuration on a Router

The configuration process on the router consists of three steps:

  1. Configuring subinterfaces: Enter the mode of the subinterface you want to use on the router. This can be done by using the interface [interface.subinterface_number] command. For example, “interface Fa0/1.10” to configure subinterface 10 inside interface FastEthernet0/1.
  2. Mapping the subinterfaces to the desired VLANs on the switch: This can be done by using the encapsulation dot1q [vlan_number] command, which defines the 802.1Q encapsulation and mapping to the desired VLAN. 
  3. Assigning IP addresses on subinterfaces: The IP address required for routing will also serve as a default gateway for the devices in the corresponding VLAN.

You need to configure the following commands on the router, assuming the interfaces are already enabled:

Configuring Router-on-a-stick solution on a router

To verify the configuration on the router, you can use the following commands:

  • show ip interface brief: To verify the subinterfaces and the parameters defined.
  • show vlans: To verify the mapping of the subinterfaces and the VLANs.
  • show ip route: To verify that the router can reach the VLAN networks. 

The best way to verify connectivity is always to perform a ping from a device in one VLAN to a device in another.