- Table of Contents
-
- 01-Access Volume
- 00-Access Volume Organization
- 01-Ethernet Interface Commands
- 02-Link Aggregation Commands
- 03-Port Isolation Commands
- 04-Service Loopback Group Commands
- 05-DLDP Commands
- 06-Smart Link Commands
- 07-LLDP Commands
- 08-VLAN Commands
- 09-GVRP Commands
- 10-QinQ Commands
- 11-BPDU Tunneling Commands
- 12-VLAN Mapping Commands
- 13-Ethernet OAM Commands
- 14-Connectivity Fault Detection Commands
- 15-EPON OLT Commands
- 16-MSTP Commands
- 17-RRPP Commands
- 18-Mirroring Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
10-QinQ Commands | 60.85 KB |
QinQ Configuration Commands
classifier behavior
Syntax
classifier classifier-name behavior behavior-name
undo classifier classifier-name
View
Policy view
Default Level
2: System level
Parameters
classifier-name: Name of a class, a string of 1 to 31 characters.
behavior-name: Name of a traffic behavior, a string of 1 to 31 characters.
Description
Use the classifier behavior command to associate a traffic behavior with a class.
Use the undo classifier command to remove the association.
Note that each class can be associated with only one traffic behavior.
Related commands: qos policy.
In a QoS policy with multiple class-to-traffic-behavior associations, if the action of creating an outer VLAN tag is configured in a traffic behavior, we recommend you not to configure any other action in this traffic behavior. Otherwise, the QoS policy may not function as expected after it is applied.
Examples
# Associate the behavior test with the class database in the policy user1.
[Sysname] qos policy user1
[Sysname-qospolicy-user1] classifier database behavior test
if-match customer-vlan-id
Syntax
if-match customer-vlan-id vlan-id-list
undo if-match customer-vlan-id vlan-id-list
View
Class view
Default Level
2: System level
Parameters
vlan-id-list: Customer VLAN IDs. You can specify up to eight VLAN IDs for the argument in the form of vlan-id to vlan-id or multiple discontinuous space-separated VLAN IDs. A VLAN ID ranges from 1 to 4094.
Description
Use the if-match customer-vlan-id command to use the specified customer VLAN ID(s) as the match criterion.
Use the undo if-match customer-vlan-id command to remove the match criterion.
Example
# Create class class1 and classify frames of customer VLAN 9 through 100 to class 1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match customer-vlan-id 9 to 100
nest top-most vlan-id
Syntax
nest top-most vlan-id vlan-id
undo nest
View
Traffic behavior view
Default Level
2: System level
Parameters
vlan-id: VLAN ID, in the range of 1 to 4094.
Description
Use the nest top-most vlan-id command to configure the action of creating an outer VLAN tag for the traffic behavior.
Use the undo nest command to remove the action.
Related commands: qos policy, traffic behavior.
Examples
# Configure the action of creating outer VLAN tag 100 for the traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] nest top-most vlan-id 100
qinq enable
Syntax
qinq enable
undo qinq enable
View
Ethernet port view, Layer-2 aggregate interface view, port group view
Default Level
2: System level
Parameters
None
Description
Use the qinq enable command to enable basic QinQ for the current Ethernet port.
Use the undo qinq enable command to disable basic QinQ for the current Ethernet port.
By default, basic QinQ is disabled for Ethernet port.
After basic QinQ is enabled on the port, frames on this port will be tagged with a new VLAN tag, the VLAN ID in which is the default VLAN ID of the port.
Configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
Examples
# Enable basic QinQ on port GigabitEthernet 2/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 2/0/1
[Sysname-GigabitEthernet2/0/1] qinq enable
# Enable basic QinQ on Layer-2 aggregate interface 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] qinq enable
qinq ethernet-type customer-tag
Syntax
qinq ethernet-type customer-tag hex-value
undo qinq ethernet-type customer-tag
View
System view
Default Level
2: System level
Parameters
hex-value: Hexadecimal protocol type ID, in the range of 0x0001 to 0xFFFF, but you cannot set it to any of the protocol type values listed in Table 1-1.
Table 1-1 Common protocol type values
Protocol type |
Value |
ARP |
0x0806 |
PUP |
0x0200 |
RARP |
0x8035 |
IP |
0x0800 |
IPv6 |
0x86DD |
PPPoE |
0x8863/0x8864 |
MPLS |
0x8847/0x8848 |
IPX/SPX |
0x8137 |
IS-IS |
0x8000 |
LACP |
0x8809 |
802.1x |
0x888E |
Cluster |
0x88A7 |
Reserved |
0xFFFD/0xFFFE/0xFFFF |
Description
Use the qinq ethernet-type customer-tag command to configure the TPID value of the customer network VLAN tags.
Use the undo qinq ethernet-type customer-tag command to restore the system default.
By default, the TPID value of the customer network VLAN tags is 0x8100.
Examples
# Set the TPID value of the customer network VLAN tags to 0x9100.
<Sysname> system-view
[Sysname] qinq ethernet-type customer-tag 9100
qinq ethernet-type service-tag
Syntax
qinq ethernet-type service-tag hex-value
undo qinq ethernet-type service-tag
View
Ethernet port view, Layer-2 aggregate interface view, port group view
Default Level
2: System level
Parameters
hex-value: Hexadecimal protocol type ID, in the range of 0x0001 to 0xFFFF except the protocol type values listed in Table 1-1.
Description
Use the qinq ethernet-type service-tag command to configure the TPID value of the service provider network VLAN tags.
Use the undo qinq ethernet-type service-tag command to restore the default.
By default, the TPID value of the service provider network VLAN tags is 0x8100.
Examples
# Set the TPID value of the service provider network VLAN tags to 0x9100 for GigabitEthernet 2/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet2/0/1
[Sysname-GigabitEthernet2/0/1] qinq ethernet-type service-tag 9100
qos apply policy
Syntax
qos apply policy policy-name inbound
undo qos apply policy inbound
View
Ethernet port view, port group view
Default Level
2: System level
Parameters
inbound: Applies the specified policy to the traffic received on the current port(s).
policy-name: Policy name, a string of 1 to 31 characters.
Description
Use the qos apply policy command to apply a policy on a port or a port group.
Use the undo qos apply policy command to remove the policy applied on a port or a port group.
In selective QinQ implementation on SC/SA/EA series boards, a QoS policy can be applied only to incoming traffic. Therefore, the qos apply policy command can be applied only on ports receiving traffic from the customer network.
For complete information about board types, refer to the accompanied installation manual.
Examples
# Apply the policy test in the inbound direction of GigabitEthernet 2/0/1.
[Sysname] interface GigabitEthernet 2/0/1
[Sysname-GigabitEthernet2/0/1] qos apply policy test inbound
qos policy
Syntax
qos policy policy-name
undo qos policy policy-name
View
System view
Default Level
2: System level
Parameters
policy-name: Policy name, a string of 1 to 31 characters.
Description
Use the qos policy command to create a policy. This command also leads you to policy view.
Use the undo qos policy command to remove a policy.
To remove a policy that has been applied on a port, remove it from the port first.
Related commands: classifier behavior, qos apply policy.
Examples
# Create the policy user1.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1]
traffic behavior
Syntax
traffic behavior behavior-name
undo traffic behavior behavior-name
View
System view
Default Level
2: System level
Parameters
behavior-name: Behavior name, a string of 1 to 31 characters.
Description
Use the traffic behavior command to create a traffic behavior. This command also leads you to traffic behavior view.
Use the undo traffic classifier command to remove a traffic behavior.
Related commands: qos policy, qos apply policy, classifier behavior.
Examples
# Create a traffic behavior behavior1.
<Sysname> system-view
[Sysname] traffic behavior behavior1
[Sysname-behavior-behavior1]
traffic classifier
Syntax
traffic classifier classifier-name [ operator { and | or } ]
undo traffic classifier classifier-name
View
System view
Default Level
2: System level
Parameters
and: Specifies the relationship between the match criteria in the specified class as logical AND. That is, a packet belongs to the class only when it matches all the match criteria defined in the class.
or: Specifies the relationship between the match criteria in the class as logical OR. That is, a packet belongs to the class if it matches a match criterion defined in the class.
classifier-name: Class name, a string of 1 to 31 characters.
Description
Use the traffic classifier command to create a class. This command also leads you to class view.
Use the undo traffic classifier command to remove a class.
By default, a packet belongs to the class only when it matches all match criteria defined in the class.
Examples
# Create the class class1.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1]