Configuring an outer VLAN tagging policy

Basic QinQ can only tag received frames with the PVID tag of the receiving port. Selective QinQ allows adding different outer VLAN tags based on different inner VLAN tags.

You can configure an outer VLAN tagging policy by using one of the following methods:

If multiple outer VLAN tagging policies are configured by using both methods on the same port, the one by using the QoS policy-based method takes effect.

Configuring an outer VLAN tagging policy by using the port-based method

Before enabling selective QinQ on a port, enable basic QinQ on the port first. When both features are enabled on the port, frames that meet the selective QinQ condition are handled with selective QinQ on this port first, and the left frames are handled with basic QinQ.

To configure an outer VLAN tagging policy by using the port-based method:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter interface view or port group view.

  • Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view:interface interface-type interface-number

  • Enter port group view:port-group manual port-group-name

Use either command.

3. Enable basic QinQ.

qinq enable

Disabled by default.

4. Enter QinQ view and configure the SVLAN tag for the port to add.

qinq vid vlan-id

By default, the SVLAN tag to be added is the PVID tag of the receiving port.

5. Tag frames of the specified CVLANs with the current SVLAN.

raw-vlan-id inbound { all | vlan-list }

N/A


[NOTE: ]

NOTE:

  • An inner VLAN tag corresponds to only one outer VLAN tag.

  • To change an outer VLAN tag, you must delete the old outer VLAN tag configuration and configure a new outer VLAN tag.


Configuring an outer VLAN tagging policy by using the QoS policy-based method

The HP 5500 HI Switch Series achieves the selective QinQ feature through QoS policies. For more information about QoS policies, see ACL and QoS Configuration Guide.

To enable the switch to tag tagged packets based on inner VLAN tags, follow these steps:

To configure selective QinQ:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create a class and enter class view.

traffic classifier classifier-name [ operator { and | or } ]

By default, the operator of a class is AND.

3. Specify the inner VLAN IDs of matching frames.

if-match customer-vlan-id vlan-id-list

N/A

4. Return to system view.

quit

N/A

5. Create a traffic behavior and enter traffic behavior view.

traffic behavior behavior-name

N/A

6. Specify an outer VLAN ID.

nest top-most vlan-id vlan-id

N/A

7. Return to system view.

quit

N/A

8. Create a QoS policy and enter QoS policy view.

qos policy policy-name

N/A

9. Associate the traffic class with the traffic behavior defined earlier.

classifier classifier-name behavior behavior-name

N/A

10. Return to system view.

quit

N/A

11. Enter Ethernet interface view or port group view of the customer network-side port.

  • Enter Ethernet interface view:interface interface-type interface-number

  • Enter port group view:port-group manual port-group-name

Use either command.

12. Enable basic QinQ.

qinq enable

N/A

13. Apply the QoS policy to the incoming traffic.

qos apply policy policy-name inbound

N/A


[NOTE: ]

NOTE:

Selective QinQ has higher priority than basic QinQ. A received frame is tagged with an outer VLAN ID based on basic QinQ only after it fails to match the match criteria defined in the traffic class.