149
Configuration procedures
1.
Configure the QinQ access switches
2.
Configure QinQ on the access switches.
For more information, see the corresponding configuration guide for the switches.
3.
Configure the router:
This section takes subinterface GigabitEthernet 2/0/0.1 that connects to building A as an
example. The configurations for buildings B and C are the same.
# Configure IP addresses for interfaces as shown in the network diagram. (Details not shown)
# Configure QinQ termination on subinterface GigabitEthernet 2/0/0.1.
<Router> system-view
[Router] interface GigabitEthernet 2/0/0.1
[Router-GigabitEthernet2/0/0.1] vlan-type dot1q vid 1 second-dot1q 1 to 200
[Router-GigabitEthernet2/0/0.1] vlan-termination broadcast enable
[Router-GigabitEthernet2/0/0.1] quit
# Configure ACLs to match the internal IP network segment and HTTP services, respectively.
[Router] acl number 3000 name inner
[Router-acl-adv-3000-inner] rule 0 permit ip source 192.168.0.0 0.0.3.255
[Router-acl-adv-3000-inner] quit
[Router] acl number 3001 name http
[Router-acl-adv-3001-http] rule 0 permit tcp destination-port eq 80
[Router-acl-adv-3001-http] quit
# Configure a traffic class for the father QoS policy to match the traffic accessing the external
network.
[Router] traffic classifier A
[Router-classifier-A] if-match acl 3000
[Router-classifier-A] quit
# Configure a class for the child QoS policy to match the traffic accessing non-HTTP services.
[Router] traffic classifier http
[Router-classifier-http] if-match not acl 3001
[Router-classifier-http] quit
# Configure a traffic behavior for the child QoS policy to limit the rate to 30 Mbps.
[Router] traffic behavior http
[Router-behavior-http] car cir 30000
[Router-behavior-http] quit
# Associate the traffic behavior with the corresponding traffic class in the child QoS policy.
[Router] qos policy http
[Router-qospolicy-http] classifier http behavior http
[Router-qospolicy-http] quit
# Configure a traffic behavior for the parent QoS policy to limit the rate to 100 Mbps, and nest
the child QoS policy in the traffic behavior.
[Router] traffic behavior A
[Router-behavior-A] traffic-policy http
[Router-behavior-A] car cir 100000
[Router-behavior-A] quit
# Associate the traffic behavior with the corresponding traffic class in the parent QoS policy,
and apply the parent QoS policy to the incoming traffic of interface GigabitEthernet 2/0/0.1.