02-Configuration Examples

HomeSupportRoutersCR16000-F SeriesConfigure & DeployConfiguration ExamplesH3C CR16000-F Routers Configuration Examples All-In-One-R8630Pxx-6W10002-Configuration Examples
Table of Contents
Related Documents
55-General QoS Configuration Examples
Title Size Download
55-General QoS Configuration Examples 117.83 KB

Example: Configuring QoS redirection in a dual-egress scenario

Network configuration

As shown in Figure 1, Device A is connected to the intranet via XGE3/1/1 and to the Internet via XGE3/1/2 and XGE3/1/3. By default, traffic from the intranet goes through XGE3/1/3 to access the Internet. For the traffic from the server to enter the public network through XGE3/1/2 and the other traffic to enter the public network through XGE3/1/3, configure a QoS policy containing traffic redirection actions on Device A.

Figure 1 Dual-port QoS redirection

‌‌

Device

Interface

IP address

Device A

XGE3/1/1

10.1.99.9/30

 

XGE3/1/2

10.1.99.1/30

 

XGE3/1/3

10.1.99.5/30

 

Prerequisites

Configure the IP addresses of the interfaces on Device A.

Procedure

Configuring Device A

# Configure two static default routes on Device A, directing the traffic to the public network through XGE3/1/3 by default. Adjust the priority of the static default route for XGE3/1/2 to the public network to a lower priority.

<Device A> system-view

[Device A] ip route-static 0.0.0.0 0 10.1.99.6

[Device A] ip route-static 0.0.0.0 0 10.1.99.2 preference 80

# Configure ACL 3001 to match the traffic from the server to other devices in the internal network, and configure ACL 3002 to match the traffic with the source address as the server IP address.

[Device A] acl advanced 3001

[Device A-acl-ipv4-adv-3001] rule permit ip source 10.1.40.0 0.0.0.255 destination 10.

1.40.0 0.0.0.255

[Device A-acl-ipv4-adv-3001] rule permit ip source 10.1.40.0 0.0.0.255 destination 10.

1.41.0 0.0.0.255

[Device A-acl-ipv4-adv-3001] rule permit ip source 10.1.40.0 0.0.0.255 destination 10.

1.42.0 0.0.0.255

[Device A-acl-ipv4-adv-3001] quit

[Device A] acl advanced 3002

[Device A-acl-ipv4-adv-3002] rule permit ip source 10.1.40.0 0.0.0.255

[Device A-acl-ipv4-adv-3002] quit

# Configure QoS policies, allowing normal forwarding of traffic from the server to other devices in the internal network, and redirecting traffic from the server to the public network to the IP address of XGE3/1/2.

[Device A] traffic classifier c1

[Device A-classifier-c1] if-match acl 3001

[Device A-classifier-c1] quit

[Device A] traffic classifier c2

[Device A-classifier-c2] if-match acl 3002

[Device A-classifier-c2] quit

[Device A] traffic behavior b1

[Device A-behavior-b1] filter permit

[Device A-behavior-b1] quit

[Device A] traffic behavior b2

[Device A-behavior-b2] redirect next-hop 10.1.99.2

[Device A-behavior-b2] quit

[Device A] qos policy p1

[Device A-qospolicy-p1] classifier c1 behavior b1

[Device A-qospolicy-p1] classifier c2 behavior b2

[Device A-qospolicy-p1] quit

# Apply the QoS policy to the inbound direction of XGE3/1/1.

[Device A] interface ten-gigabitethernet 3/1/1

[Device A-Ten-GigabitEthernet3/1/1] qos apply policy p1 inbound

[Device A-Ten-GigabitEthernet3/1/1] quit

Verifying the configuration

# Use the display qos policy user-defined command to display the configuration of the QoS policy applied to the interface. The traffic redirecting action is in effect.

[Device A] display qos policy  interface GigabitEthernet 1/0/1

Interface: Ten-GigabitEthernet3/1/1

  Direction: Inbound

  Policy: p1

   Classifier: c1

     Operator: AND

     Rule(s) :

      If-match acl 3001

     Behavior: b1

       Filter enable: Permit

   Classifier: c2

     Operator: AND

     Rule(s) :

      If-match acl 3002

     Behavior: b2

      Redirecting:

        Redirect to next-hop 10.1.99.2 (active)

Configuration files

·     Device A:

traffic classifier c1 operator and

 if-match acl 3001

#

traffic classifier c2 operator and

 if-match acl 3002

#

traffic behavior b1

 filter permit

#

traffic behavior b2

 redirect next-hop 10.1.99.2

#

qos policy p1

 classifier c1 behavior b1

 classifier c2 behavior b2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 10.1.99.9 255.255.255.252

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ip address 10.1.99.1 255.255.255.252

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 ip address 10.1.99.5 255.255.255.252

#

#

 ip route-static 0.0.0.0 0 10.1.99.2 preference 80

 ip route-static 0.0.0.0 0 10.1.99.6

#

acl advanced 3001

 rule 5 permit ip source 10.1.40.0 0.0.0.255 destination 10.1.41.0 0.0.0.255

 rule 10 permit ip source 10.1.40.0 0.0.0.255 destination 10.1.40.0 0.0.0.255

 rule 15 permit ip source 10.1.40.0 0.0.0.255 destination 10.1.42.0 0.0.0.255

#

acl advanced 3002

 rule 5 permit ip source 10.1.40.0 0.0.0.255

#

Example: Configuring QoS congestion management and congestion avoidance

Network configuration

As shown in Figure 2, the server, the telephone, PC 1, and PC 2 send data to the network through Device A. The server sends critical business data, the telephone sends voice data, and PC 1 and PC 2 send non-critical business data. Device A's ingress interfaces include not only XGE3/1/1 but also other GE interfaces, while XGE3/1/2 is the only egress interface. The flow rate in the inbound direction is higher than the rate on the XGE3/1/2 interface, and congestion might occur at the XGE3/1/2 interface.

Ensure that business data sent by the server and telephone receive priority during network congestion, with the telephone guaranteed a bandwidth of 5 Mbps and the server guaranteed a bandwidth of 10 Mbps. PC 1 and PC 2 cannot be "starved" and also need to be serviced during the transmission process, so the WRR method is used to schedule their services. When congestion occurs at the XGE3/1/2 interface, discard packets based on WRED drop probability.

Figure 2 QoS congestion management and congestion avoidance network topology

‌‌

Device

Interface

IP address

Device A

XGE3/1/1

10.1.1.1/24

 

XGE3/1/2

10.10.1.1/24

 

Prerequisites

Configure the IP addresses of the interfaces on Device A.

Procedure

Configuring Device A

# Configure ACL 3001 to match traffic from the telephone, configure ACL 3002 to match traffic from the server, configure ACL 3003 to match traffic from PC 1, and configure ACL 3004 to match traffic from PC 2.

[Device A] acl advanced 3001

[Device A-acl-ipv4-adv-3001] rule permit ip source 10.1.1.3 0.0.0.0

[Device A-acl-ipv4-adv-3001] quit

[Device A] acl advanced 3002

[Device A-acl-ipv4-adv-3002] rule permit ip source 10.1.1.2 0.0.0.0

[Device A-acl-ipv4-adv-3002] quit

[Device A] acl advanced 3003

[Device A-acl-ipv4-adv-3003] rule permit ip source 10.1.1.4 0.0.0.0

[Device A-acl-ipv4-adv-3003] quit

[Device A] acl advanced 3004

[Device A-acl-ipv4-adv-3004] rule permit ip source 10.1.1.5 0.0.0.0

[Device A-acl-ipv4-adv-3004] quit

# Configure QoS policies to mark the local precedence of traffic from the telephone, the server, PC 1, and PC 2, map traffic to different queues based on the local precedence values.

[Device A] traffic classifier Telephone

[Device A-classifier-Telephone] if-match acl 3001

[Device A-classifier-Telephone] quit

[Device A] traffic classifier Server

[Device A-classifier-Server] if-match acl 3002

[Device A-classifier-Server] quit

[Device A] traffic classifier PC1

[Device A-classifier-PC1] if-match acl 3003

[Device A-classifier-PC1] quit

[Device A] traffic classifier PC2

[Device A-classifier-PC2] if-match acl 3004

[Device A-classifier-PC2] quit

[Device A] traffic behavior Telephone

[Device A-behavior-Telephone] remark local-precedence 5

[Device A-behavior-Telephone] quit

[Device A] traffic behavior Server

[Device A-behavior-Server] remark local-precedence 4

[Device A-behavior-Server] quit

[Device A] traffic behavior PC1

[Device A-behavior-PC1] remark local-precedence 3

[Device A-behavior-PC1] quit

[Device A] traffic behavior PC2

[Device A-behavior-PC2] remark local-precedence 2

[Device A-behavior-PC2] quit

[Device A] qos policy p1

[Device A-qospolicy-p1] classifier Telephone behavior Telephone

[Device A-qospolicy-p1] classifier Server behavior Server

[Device A-qospolicy-p1] classifier PC1 behavior PC1

[Device A-qospolicy-p1] classifier PC2 behavior PC2

[Device A-qospolicy-p1] quit

# Apply the QoS policy to the inbound direction of XGE3/1/1.

[Device A] interface ten-gigabitethernet 3/1/1

[Device A-Ten-GigabitEthernet3/1/1] qos apply policy p1 inbound

[Device A-Ten-GigabitEthernet3/1/1] quit

# Configure a WRED profile to drop congested packets according to the parameters of the WRED profile.

[Device A] qos wred-profile aaa

[Device A-wred-profile-aaa] queue drop-level 0 limit-percent low-limit 70 high-limit 100 discard-probability 100

[Device A-wred-profile-aaa] queue drop-level 1 limit-percent low-limit 60 high-limit 90 discard-probability 100

[Device A-wred-profile-aaa] queue drop-level 2 limit-percent low-limit 50 high-limit 80 discard-probability 100

[Device A-wred-profile-aaa] quit

# Configure a queue scheduling profile. Use SP for the traffic from the telephone, with a minimum guaranteed bandwidth of 5 Mbps. Use SP for the traffic from the server, with a minimum guaranteed bandwidth of 10 Mbps. Use WRR for the traffic from PC 1, with a scheduling weight of 20. Use WRR for the traffic from PC 2, with a scheduling weight of 10.

[Device A] qos qmprofile aaa

[Device A-qmprofile-aaa] queue ef sp wred-profile aaa

[Device A-qmprofile-aaa] bandwidth queue ef min 5000

[Device A-qmprofile-aaa] queue af4 sp wred-profile aaa

[Device A-qmprofile-aaa] bandwidth queue af4 min 10000

[Device A-qmprofile-aaa] queue af3 wrr group 1 weight 20 wred-profile aaa

[Device A-qmprofile-aaa] queue af2 wrr group 1 weight 10 wred-profile aaa

[Device A-qmprofile-aaa] quit

# Configure a user profile to limit the total outbound traffic rate to 100 Mbps and to use the queue scheduling profile.

[Device A] user-profile aaa

[Device A-user-profile-aaa] qos user-queue cir 100000 pir 100000 qmprofile aaa outbound

# Apply the user profile to the outbound direction of XGE3/1/2.

[Device A] interface ten-gigabitethernet 3/1/2

[Device A-Ten-GigabitEthernet3/1/2] qos apply user-profile aaa outbound

[Device A-Ten-GigabitEthernet3/1/2] quit

Verifying the configuration

# Execute the display user-profile interface command to verify the configuration, state, and traffic policing information for the user profile applied. The output shows that the rate limit configuration and the queue scheduling profile both take effect.

[Device A] display user-profile interface outbound

Interface: Ten-GigabitEthernet3/1/2

  Direction: Outbound

    User Profile: aaa

      User queue:

        Limit Rate(active):

          CIR 100000 (kbps), CBS 6250000 (Bytes), EBS 0 (Bytes), PIR 100000 (kbps)

        QMProfile(active):

          aaa

# Use the display qos policy interface command to display the configuration of the QoS policy applied to the interface.

[Device A] display qos policy interface inbound

Interface: Ten-GigabitEthernet3/1/1

  Direction: Inbound

  Policy: p1

   Classifier: Telephone

     Operator: AND

     Rule(s) :

      If-match acl 3001

     Behavior: Telephone

      Marking:

        Remark local-precedence 5

   Classifier: Server

     Operator: AND

     Rule(s) :

      If-match acl 3002

     Behavior: Server

      Marking:

        Remark local-precedence 4

   Classifier: PC1

     Operator: AND

     Rule(s) :

      If-match acl 3003

     Behavior: PC1

      Marking:

        Remark local-precedence 3

   Classifier: PC2

     Operator: AND

     Rule(s) :

      If-match acl 3004

     Behavior: PC2

      Marking:

        Remark local-precedence 2

Configuration files

·     Device A:

#

qos wred-profile aaa

 queue drop-level 0 limit-percent low-limit 70 high-limit 100 discard-probability 100

 queue drop-level 1 limit-percent low-limit 60 high-limit 90 discard-probability 100

 queue drop-level 2 limit-percent low-limit 50 high-limit 80 discard-probability 100

#

qos qmprofile aaa

 queue af2 wrr group 1 weight 10 wred-profile aaa

 queue af3 wrr group 1 weight 20 wred-profile aaa

 queue af4 sp wred-profile aaa

 queue ef sp wred-profile aaa

 bandwidth queue af4 min 10000

 bandwidth queue ef min 5000

#

traffic classifier Telephone operator and

 if-match acl 3001

#

traffic classifier Server operator and

 if-match acl 3002

#

traffic classifier PC1 operator and

 if-match acl 3003

#

traffic classifier PC2 operator and

 if-match acl 3004

#

traffic behavior Telephone

 remark local-precedence 5

#

traffic behavior Server

 remark local-precedence 4

#

traffic behavior PC1

 remark local-precedence 3

#

traffic behavior PC2

 remark local-precedence 2

#

qos policy p1

 classifier Telephone behavior Telephone

 classifier Server behavior Server

 classifier PC1 behavior PC1

 classifier PC2 behavior PC2

#

user-profile aaa

 qos user-queue cir 100000 cbs 6250000 pir 100000 ebs 0 qmprofile aaa outbound

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 10.1.1.1 255.255.255.0

 qos apply policy p1 inbound

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ip address 10.10.1.1 255.255.255.0

 qos apply user-profile aaa outbound

#

acl advanced 3001

 rule 5 permit ip source 10.1.1.3 0

acl advanced 3002

 rule 5 permit ip source 10.1.1.2 0

acl advanced 3003

 rule 5 permit ip source 10.1.1.4 0

acl advanced 3004

 rule 5 permit ip source 10.1.1.5 0

#

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网