Router on a stick

 

Outline

It is possible to link VLANs together using trunking.

 

Explanation

In the following two gateways are created for the VLANs. One is 192.168.100.1 and the other is 192.168.200.1. On the router two subinterfaces are created to act as the gateways for the VLANs. It will then be able to route between these VLANs, thus a node on the 192.168.100.x network can communicate with a node on the 192.168.200.x network, and vice-versa.

 

 

(config)# interface fastethernet 0/0

(config-if)# no ip address

(config-if)# exit

 

(config)# interface fa0/0.1

(config-subif)# encapsulation dot1q 1 native

(config-subif)# exit

 

(config)# interface fa0/0.50

(config-subif)# encapsulation dot1q 50

(config-subif)# ip address 192.168.100.1 255.255.255.0

(config-subif)# exit

 

(config)# interface fa0/0.100

(config-subif)# encapsulation dot1q 100

(config-subif)# ip address 192.168.200.1 255.255.255.0