Thursday, May 16, 2024
HomeCisco networkingCisco switchCisco Switch: 802.1q Trunk to Router (a.k.a. Router-on-a-Stick)

Cisco Switch: 802.1q Trunk to Router (a.k.a. Router-on-a-Stick)

You can connect a Cisco switch and router via 802.1q trunking. This configuration is known as a router-on-a-stick.

First, let us start with the switch. VLAN 1 exists by default, so we will add a couple of other VLANs:

vlan 100
name data
state active

vlan 200
name data
state active

Now, we will configure the switchport to connect to the router:
interface fastethernet 1/0/1
switchport trunk encapsulation dot1q
switchport mode trunk

Now, we will move to the router.

interface fastethernet 0/0
no ip address

interface fastethernet 0/0.1
encapsulation dot1q 1 native

interface fastethernet 0/0.100
encapsulation dot1q 100
ip address

interface fastethernet 0/0.200
encapsulation dot1q 200
ip address

At this point, workstations on VLAN 100 should be able to ping the address, and workstations on VLAN 200 should be able to ping the address.

If, for some reason, the native VLAN on the switchport is something other than one (1), change the encapsulation statement on the router, or the trunk may not form.



Please enter your comment!
Please enter your name here

Most Popular


Recent Comments

error: Content is protected !!