3

When creating Inter-VLAN Routing environments via Router-on-a-Stick method, why do we have to encapsulate sub-interfaces with dot1q vlan-number? What does that dot1q do and why do we have to type the same number as VLAN number?

1 Answer 1

8

In order to have a router actually route anything, it should be connected to at least two network interfaces; so, without VLAN trunking, you would need a router with at least two Ethernet ports, connected to two switch ports assigned to different VLANs, in order to route traffic between them.

VLAN trunking is the practice of having Ethernet frames from two or more VLANs flowing through a single physical port and cable, thus allowing the router to talk to two or more VLANs without actually needing a physical port for each one of them.

DOT1Q (actual name 802.1q) is a protocol for transmitting VLAN informations together with Ethernet frames, which are then called "tagged" frames, because each frame brings a VLAN tag with it, telling the receiving device "this frame belongs to VLAN X"; there are other protocols which can do similar things, but DOT1Q is the most commonly used one.

On Cisco devices, this is handled through sub-interfaces: you have a single Ethernet interface, let's say FastEthernet 0, and then you create subinterfaces of it, like FastEthernet 0.1 and FastEthernet 0.2. The main interface (the physical one) is configured for trunking mode and VLAN encapsulation, each sub-interface is assigned to a different VLAN, and then the router is able to route traffic between these "virtual" interfaces as if they were "real" ones.

VLAN trunking is used whenever you need to carry several VLANs together on a single physical Ethernet connection; oher common uses are connections between switches or to virtualization hosts.

1
  • Great information for an Inter-VLAN beginner. Thanks a dozen.
    – platypus
    Jul 26, 2011 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .