Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[MX] Examples - Using the transmit-rate in hierarchical class of service (HCoS) environment

1

0

Article ID: KB31315 KB Last Updated: 28 Mar 2017Version: 1.0
Summary:

Using the transmit-rate feature in conjunction with hierarchical class of service (HCoS) requires assigning guaranteed rate on an interface by traffic-control-profiles or setting queue priority to medium or high. This article provides examples.

Symptoms:
Either of the following conditions must be satisfied in order to use the transmit rate feature in an HCoS environment:
  1. Assigning guaranteed rate to an interface (ifd or ifl) by traffic-control-profiles.
  2. Setting queue priority to medium or high.
Otherwise, the transmit-rate will be ignored.

For example, Sample test No. 1 reveals that the transmit-rate is ignored.

Sample test No.1

--Topology --

                  -------------> 20m tos 0
                  -------------> 20m tos 1             10m shaping
   +----------+   -------------> 20m tos 2 +----------+               +----------+
   |  TESTER  |                            |  MX480   |xe-0/0/0       |  MX480   |
   |          |----------------------------|          |---------------| logical  |
   |          |                    ge-3/0/0|          |       xe-3/2/0|          |
   +----------+                            +----------+               +----------+
                                          Junos 14.2R1.8

tos 0 traffic goes into queue 0. (scheduler SH0)
tos 1 traffic goes into queue 1. (scheduler SH1)
tos 2 traffic goes into queue 2. (scheduler SH2)

FPC0 : MPC Type 1 3D Q
FPC3 : DPCE 20x 1GE + 2x 10GE R


-- traffic-control-profiles and schedulers config --

set class-of-service traffic-control-profiles TEST scheduler-map SCH-MAP
set class-of-service traffic-control-profiles TEST shaping-rate 10m
set class-of-service interfaces xe-0/0/0 output-traffic-control-profile TEST

set class-of-service schedulers SCH0 excess-rate percent 25
set class-of-service schedulers SCH0 priority low
set class-of-service schedulers SCH1 transmit-rate 4m          <<< ignored.
set class-of-service schedulers SCH1 excess-rate percent 25
set class-of-service schedulers SCH1 priority low
set class-of-service schedulers SCH2 transmit-rate 4m          <<< ignored.
set class-of-service schedulers SCH2 excess-rate percent 25
set class-of-service schedulers SCH2 priority low
set class-of-service schedulers SCH3 excess-rate percent 25
set class-of-service schedulers SCH3 priority low

-- Setting information --

user@router-re0> show class-of-service scheduler-hierarchy interface xe-0/0/0
Interface/                    Shaping Guarnteed  Guaranteed/   Queue   Excess
Resource name                    rate      rate       Excess  weight   weight
                                kbits     kbits     priority          high/low
xe-0/0/0                        10000
  xe-0/0/0 RTP                  10000         0                          1    1
    0                           10000         0     Low  Low     250
    1                           10000      4000     Low  Low     250
    2                           10000      4000     Low  Low     250
    3                           10000         0     Low  Low     250

-- Test result --

+-------------------------------------------------------------------------------------------------------+
| queue | input rate(L1) | output rate(L1) | Wrong theoretical value(L1) | True theoretical value(L1)   |
+-------------------------------------------------------------------------------------------------------+
|   0   |  20666624 bps  |    3330304 bps  | 0m + 2m * 1 / 3 = 0.66 mbps | 0m + 10m * 1 / 3 = 3.33 mbps |
+-------------------------------------------------------------------------------------------------------+
|   1   |  20666240 bps  |    3329920 bps  | 4m + 2m * 1 / 3 = 4.66 mbps | 0m + 10m * 1 / 3 = 3.33 mbps |
+-------------------------------------------------------------------------------------------------------+
|   2   |  20666240 bps  |    3329920 bps  | 4m + 2m * 1 / 3 = 4.66 mbps | 0m + 10m * 1 / 3 = 3.33 mbps |
+-------------------------------------------------------------------------------------------------------+
|   3   |         0 bps  |          0 bps  |                      0 mbps |                       0 mbps |
+-------------------------------------------------------------------------------------------------------+

* Theoretical value : transmit-rate + excess rate * weight ratio

  excess rate is given by the following equation.
  excess rate = shaping-rate(10m) - sum of transmit-rate(8m) 

-- Whole sample setting --
set logical-systems R2 interfaces xe-3/2/0 unit 0 vlan-id 10
set logical-systems R2 interfaces xe-3/2/0 unit 0 family inet address 30.0.0.2/24
set interfaces xe-0/0/0 hierarchical-scheduler
set interfaces xe-0/0/0 vlan-tagging
set interfaces xe-0/0/0 unit 0 vlan-id 10
set interfaces xe-0/0/0 unit 0 family inet address 30.0.0.1/24
set interfaces ge-3/0/0 unit 0 family inet address 10.0.0.1/24
set interfaces xe-3/2/0 vlan-tagging
set routing-options static route 30.0.0.2/32 next-hop 30.0.0.2
set class-of-service classifiers inet-precedence BA forwarding-class 0 loss-priority low code-points 000
set class-of-service classifiers inet-precedence BA forwarding-class 1 loss-priority low code-points 001
set class-of-service classifiers inet-precedence BA forwarding-class 2 loss-priority low code-points 010
set class-of-service classifiers inet-precedence BA forwarding-class 3 loss-priority low code-points 011
set class-of-service forwarding-classes class 0 queue-num 0
set class-of-service forwarding-classes class 1 queue-num 1
set class-of-service forwarding-classes class 2 queue-num 2
set class-of-service forwarding-classes class 3 queue-num 3
set class-of-service traffic-control-profiles TEST scheduler-map SCH-MAP
set class-of-service traffic-control-profiles TEST shaping-rate 10m
set class-of-service interfaces xe-0/0/0 output-traffic-control-profile TEST
set class-of-service interfaces ge-3/0/0 unit 0 classifiers inet-precedence BA
set class-of-service scheduler-maps SCH-MAP forwarding-class 0 scheduler SCH0
set class-of-service scheduler-maps SCH-MAP forwarding-class 1 scheduler SCH1
set class-of-service scheduler-maps SCH-MAP forwarding-class 2 scheduler SCH2
set class-of-service scheduler-maps SCH-MAP forwarding-class 3 scheduler SCH3
set class-of-service schedulers SCH0 excess-rate percent 25
set class-of-service schedulers SCH0 priority low
set class-of-service schedulers SCH1 transmit-rate 4m
set class-of-service schedulers SCH1 excess-rate percent 25
set class-of-service schedulers SCH1 priority low
set class-of-service schedulers SCH2 transmit-rate 4m
set class-of-service schedulers SCH2 excess-rate percent 25
set class-of-service schedulers SCH2 priority low
set class-of-service schedulers SCH3 excess-rate percent 25
set class-of-service schedulers SCH3 priority low
Cause:

This is the designed behavior and part of the specification.

Solution:

Either of the following conditions must be satisfied in order to use the transmit rate feature in an HCoS environment.

  1. Assigning guaranteed rate to an interface (ifd or ifl) by traffic-control-profiles.
  2. Setting queue priority to medium or high.

The following three tests provide example configuration and results.
 

Sample Test No.2 : adding guaranteed-rate to ifd

-- set/delete setting from No.1 test --

set class-of-service traffic-control-profiles TEST guaranteed-rate 10m
set class-of-service interfaces xe-0/0/0 output-traffic-control-profile-remaining TEST
delete class-of-service interfaces xe-0/0/0 output-traffic-control-profile


* output-traffic-control-profile-remaining is required on this environment.
   ifd cannot be set to guaranteed-rate by output-traffic-control-profile.

-- Setting information --

user@router-re0> show class-of-service scheduler-hierarchy interface xe-0/0/0
Interface/                    Shaping Guarnteed  Guaranteed/   Queue   Excess
Resource name                    rate      rate       Excess  weight   weight
                                kbits     kbits     priority          high/low
xe-0/0/0                     10000000
  xe-0/0/0 RTP                  10000     10000                       500  500
    0                           10000         0     Low  Low     250
    1                           10000      4000     Low  Low     250
    2                           10000      4000     Low  Low     250
    3                           10000         0     Low  Low     250

-- Test result --

+------------------------------------------------------------------------+
| queue | input rate(L1) | output rate(L1) | Theoretical value(L1)       |
+------------------------------------------------------------------------+
|   0   |  20667904 bps  |     661632 bps  | 0m + 2m * 1 / 3 = 0.66 mbps |
+------------------------------------------------------------------------+
|   1   |  20667520 bps  |    4655360 bps  | 4m + 2m * 1 / 3 = 4.66 mbps |
+------------------------------------------------------------------------+
|   2   |  20667904 bps  |    4658176 bps  | 4m + 2m * 1 / 3 = 4.66 mbps |
+------------------------------------------------------------------------+
|   3   |         0 bps  |          0 bps  |                      0 mbps |
+------------------------------------------------------------------------+
 

Sample Test No.3 : adding guaranteed-rate to ifl

-- set/delete setting from No.1 test --

set class-of-service traffic-control-profiles TEST guaranteed-rate 10m
set class-of-service interfaces xe-0/0/0 unit 0 output-traffic-control-profile TEST
delete class-of-service interfaces xe-0/0/0 output-traffic-control-profile

-- Setting information --

user@router-re0> show class-of-service scheduler-hierarchy interface xe-0/0/0
Interface/                    Shaping Guarnteed  Guaranteed/   Queue   Excess
Resource name                    rate      rate       Excess  weight   weight
                                kbits     kbits     priority          high/low
xe-0/0/0                     10000000
  xe-0/0/0 RTP               10000000         0                          1    1
    0                        10000000         0     Low  Low     950
    3                        10000000         0     Low  Low      50
  xe-0/0/0.0                    10000     10000                        500  500
    0                           10000         0     Low  Low     250
    1                           10000      4000     Low  Low     250
    2                           10000      4000     Low  Low     250
    3                           10000         0     Low  Low     250

-- Test result --

+------------------------------------------------------------------------+
| queue | input rate(L1) | output rate(L1) | Theoretical value(L1)       |
+------------------------------------------------------------------------+
|   0   |  20666368 bps  |     669952 bps  | 0m + 2m * 1 / 3 = 0.66 mbps |
+------------------------------------------------------------------------+
|   1   |  20666368 bps  |    4665344 bps  | 4m + 2m * 1 / 3 = 4.66 mbps |
+------------------------------------------------------------------------+
|   2   |  20666368 bps  |    4665344 bps  | 4m + 2m * 1 / 3 = 4.66 mbps |
+------------------------------------------------------------------------+
|   3   |         0 bps  |          0 bps  |                      0 mbps |
+------------------------------------------------------------------------+
 

Sample Test No.4 : changing guaranteed priority

-- change setting from No.1 test --

set class-of-service schedulers SCH0 priority medium-low
set class-of-service schedulers SCH1 priority medium-low
set class-of-service schedulers SCH2 priority medium-low
set class-of-service schedulers SCH3 priority medium-low

-- Setting information --

user@router-re0> show class-of-service scheduler-hierarchy interface xe-0/0/0
Interface/                    Shaping Guarnteed  Guaranteed/   Queue   Excess
Resource name                    rate      rate       Excess  weight   weight
                                kbits     kbits     priority          high/low
xe-0/0/0                        10000
  xe-0/0/0 RTP                  10000         0                          1    1
    0                           10000         0  Medium  Low     250
    1                           10000      4000  Medium  Low     250
    2                           10000      4000  Medium  Low     250
    3                           10000         0  Medium  Low     250

-- Test result --

+------------------------------------------------------------------------+
| queue | input rate(L1) | output rate(L1) | Theoretical value(L1)       |
+------------------------------------------------------------------------+
|   0   |  20701184 bps  |     662784 bps  | 0m + 2m * 1 / 3 = 0.66 mbps |
+------------------------------------------------------------------------+
|   1   |  20700800 bps  |    4667264 bps  | 4m + 2m * 1 / 3 = 4.66 mbps |
+------------------------------------------------------------------------+
|   2   |  20701184 bps  |    4660992 bps  | 4m + 2m * 1 / 3 = 4.66 mbps |
+------------------------------------------------------------------------+
|   3   |         0 bps  |          0 bps  |                      0 mbps |
+------------------------------------------------------------------------+
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search