68
Configuration example
Network requirements
As shown in Figure 20, Site 1 and Site 2 in VPN A are two branches of a company, and they use
VLAN 5 to transmit traffic. Because Site 1 and Site 2 are located in different areas, the two sites use
the VPN access service of a service provider. The service provider assigns VLAN 100 to the two
sites.
Configure nesting, so that the two branches can communicate through the service provider network.
Figure 20 Network diagram
Configuration procedure
Configuring PE 1
# Create a class named test to match packets with VLAN ID 5.
<PE1> system-view
[PE1] traffic classifier test
[PE1-classifier-test] if-match service-vlan-id 5
[PE1-classifier-test] quit
# Configure an action to add outer VLAN tag 100 in traffic behavior test.
[PE1] traffic behavior test
[PE1-behavior-test] nest top-most vlan 100
[PE1-behavior-test] quit
# Create a QoS policy named test, and associate class test with behavior test in the QoS policy.
[PE1] qos policy test
[PE1-qospolicy-test] classifier test behavior test
[PE1-qospolicy-test] quit
# Configure the downlink port (GigabitEthernet 1/0/1) as a hybrid port, and assign the port to VLAN
100 as an untagged member.
[PE1] interface GigabitEthernet 1/0/1
[PE1-GigabitEthernet1/0/1] port link-type hybrid
[PE1-GigabitEthernet1/0/1] port hybrid vlan 100 untagged