Specifications

Configuring Routing Between VLANs
How to Configure Routing Between VLANS
46
Configuring the Q-in-Q Subinterface
Use the following steps to configure Q-in-Q subinterfaces. This task is required.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number.subinterface-number
4. encapsulation dot1q vlan-id second-dot1q {any | vlan-id | vlan-id-vlan-id [,vlan-id-vlan-id]}
5. pppoe enabled [group group-name]
6. exit
7. Repeat Step 3 to configure another subinterface.
8. Repeat Step 4 and Step 5 to specify the VLAN tags to be terminated on the subinterface and to
enable PPPoE sessions on the subinterface.
9. end
DETAILED STEPS
Command or Action Purpose
Step 1
enable
Example:
Router> enable
Enables privileged EXEC mode.
Enter your password if prompted.
Step 2
configure terminal
Example:
Router# configure terminal
Enters global configuration mode.
Step 3
interface type number.subinterface-number
Example:
Router(config-if)# interface gigabitethernet
1/0/0.1
Configures a subinterface and enters subinterface
configuration mode.
Step 4
encapsulation dot1q vlan-id second-dot1q {any |
vlan-id | vlan-id-vlan-id[,vlan-id-vlan-id]}
Example:
Router(config-subif)# encapsulation dot1q 100
second-dot1q 200
(Required) Enables the 802.1Q encapsulation of traffic on a
specified subinterface in a VLAN.
Use the second-dot1q keyword and the vlan-id
argument to specify the VLAN tags to be terminated on
the subinterface.
In this example, an unambiguous Q-in-Q subinterface
is configured because only one inner VLAN ID is
specified.
Q-in-Q frames with an outer VLAN ID of 100 and an
inner VLAN ID of 200 will be terminated.