beautypg.com

H3C Technologies H3C S6300 Series Switches User Manual

Page 50

background image

40

[DeviceA-qospolicy-car] quit

# Apply QoS policy car to the incoming traffic of port Ten-GigabitEthernet 1/0/1.

[DeviceA] interface Ten-GigabitEthernet 1/0/1

[DeviceA-Ten-GigabitEthernet1/0/1] qos apply policy car inbound

2.

Configure Device B:
# Configure advanced ACL 3001 to match HTTP traffic.

system-view

[DeviceB] acl number 3001

[DeviceB-acl-adv-3001] rule permit tcp destination-port eq 80

[DeviceB-acl-adv-3001] quit

# Create a class named http and use ACL 3001 as the match criterion.

[DeviceB] traffic classifier http

[DeviceB-classifier-http] if-match acl 3001

[DeviceB-classifier-http] quit

# Create a class named class and configure the class to match all packets.

[DeviceB] traffic classifier class

[DeviceB-classifier-class] if-match any

[DeviceB-classifier-class] quit

# Create a behavior named car_inbound and configure the CAR action for the behavior as follows:
Set the CIR to 204800 kbps.

[DeviceB] traffic behavior car_inbound

[DeviceB-behavior-car_inbound] car cir 204800

[DeviceB-behavior-car_inbound] quit

# Create a behavior named car_outbound and configure a CAR action for the behavior as follows:
Set the CIR to 102400 kbps.

[DeviceB] traffic behavior car_outbound

[DeviceB-behavior-car_outbound] car cir 102400

[DeviceB-behavior-car_outbound] quit

# Create a QoS policy named car_inbound and associate class class with traffic behavior
car_inbound in the QoS policy.

[DeviceB] qos policy car_inbound

[DeviceB-qospolicy-car_inbound] classifier class behavior car_inbound

[DeviceB-qospolicy-car_inbound] quit

# Create a QoS policy named car_outbound and associate class http with traffic behavior
car_outbound in the QoS policy.

[DeviceB] qos policy car_outbound

[DeviceB-qospolicy-car_outbound] classifier http behavior car_outbound

[DeviceB-qospolicy-car_outbound] quit

# Apply QoS policy car_inbound to the incoming traffic of port Ten-GigabitEthernet 1/0/1.

[DeviceB] interface Ten-GigabitEthernet 1/0/1

[DeviceB-Ten-GigabitEthernet1/0/1] qos apply policy car_inbound inbound

# Apply QoS policy car_outbound to the outgoing traffic of port Ten-GigabitEthernet 1/0/2.

[DeviceB] interface Ten-GigabitEthernet 1/0/2

[DeviceB-Ten-GigabitEthernet1/0/2] qos apply policy car_outbound outbound