11.2.5.3. Weighting Control Setting (WRR)

Operation Confirmed Version:
 vSRX Version15.1X49-D105.1

This section describes the setting for Weighted Round Robin (WRR) which transmits traffic at an arbitrary ratio when the bandwidth setting of output interface is exceeded.

Setting for making communications initiated from a specific source IP address be set to 2:1 at output interface

Presumed case for sample setting

  • To set the restriction bandwidth of interface (ge-0/0/1) to 10 Mbps

  • To make double communications from virtual server (192.168.1.11) be output, compared with communications from virtual server (192.168.3.13)

  • To apply when 10 Mbps is exceeded at interface (ge-0/0/1)

Setting flow in a presumed case

In the setting flow, settings are to be made so that packets are sorted by the traffic input interface and output in accordance with the specified ratio is performed by the output interface.

1.Create filter name QOS_STRICT for communications initiated from virtual server (192.168.1.11).
2.Create filter name QOS_AF for communications initiated from virtual server (192.168.3.13).
3.For communications (packets) whose source IP address is 192.168.1.0/24, set Forwarding class to expedited-forwarding and set to QOS_STRICT.
4.For communications (packets) whose source IP address is 192.168.3.0/24, set Forwarding class to assured-forwarding and set to QOS_AF.
5.Apply the filter above to interfaces (ge-0/0/0) and (ge-0/0/2).
6.Treat expedited-forwarding of Forwarding class as PRIORITY_HIGH and set 40% ratio.
7.Treat assured-forwarding of Forwarding class as PRIORITY_LOW and set 20% ratio.
8.Set the scheduler created above to schedule map name SCHE.
9.For scheduler map SCHE, set the upper-limit bandwidth to 10 Mbps.
10.For interface (ge-0/0/1), make a setting for scheduler operations.

Command to be entered with CLI

user01@vSRX-02# set firewall filter QOS_STRICT term 1 from source-address 192.168.1.0/24
user01@vSRX-02# set firewall filter QOS_STRICT term 1 then loss-priority low
user01@vSRX-02# set firewall filter QOS_STRICT term 1 then forwarding-class expedited-forwarding
user01@vSRX-02# set firewall filter QOS_STRICT term 1 then accept
user01@vSRX-02# set firewall filter QOS_STRICT term 2 then accept
user01@vSRX-02# set firewall filter QOS_AF term 1 from source-address 192.168.3.0/24
user01@vSRX-02# set firewall filter QOS_AF term 1 then loss-priority high
user01@vSRX-02# set firewall filter QOS_AF term 1 then forwarding-class assured-forwarding
user01@vSRX-02# set firewall filter QOS_AF term 1 then accept
user01@vSRX-02# set firewall filter QOS_AF term 2 then accept
user01@vSRX-02# set interfaces ge-0/0/0 unit 0 family inet filter input QOS_STRICT
user01@vSRX-02# set interfaces ge-0/0/2 unit 0 family inet filter input QOS_AF
user01@vSRX-02# set class-of-service schedulers PRIORITY_HIGH transmit-rate percent 40
user01@vSRX-02# set class-of-service schedulers PRIORITY_HIGH priority low
user01@vSRX-02# set class-of-service schedulers PRIORITY_LOW transmit-rate percent 20
user01@vSRX-02# set class-of-service schedulers PRIORITY_LOW priority low
user01@vSRX-02# set class-of-service scheduler-maps SCHE forwarding-class expedited-forwarding scheduler PRIORITY_HIGH
user01@vSRX-02# set class-of-service scheduler-maps SCHE forwarding-class assured-forwarding scheduler PRIORITY_LOW
user01@vSRX-02# set class-of-service interfaces ge-0/0/1 unit 0 scheduler-map SCHE shaping-rate 10m
user01@vSRX-02# set class-of-service interfaces ge-0/0/1 unit 0 rewrite-rules dscp default
user01@vSRX-02# set interfaces ge-0/0/1 per-unit-scheduler

The configuration after completion of appropriate settings is as follows.

interfaces {
    ge-0/0/0 {
        unit 0 {
            family inet {
                filter {
                    input QOS_STRICT;
                }
                address 192.168.1.102/24;
            }
        }
    }
    ge-0/0/1 {
       per-unit-scheduler;
       unit 0 {
           family inet {
               address 192.168.2.102/24;
           }
       }
    }
    ge-0/0/2 {
        unit 0 {
            family inet {
                filter {
                    input QOS_AF;
                }
                address 192.168.3.102/24;
            }
        }
    }
}
class-of-service {
    interfaces {
        ge-0/0/1 {
            unit 0 {
                scheduler-map SCHE;
                shaping-rate 10m;
                rewrite-rules {
                    dscp default;
                }
            }
        }
    }
    scheduler-maps {
        SCHE {
            forwarding-class expedited-forwarding scheduler PRIORITY_HIGH;
            forwarding-class assured-forwarding scheduler PRIORITY_LOW;
        }
    }
    schedulers {
        PRIORITY_HIGH {
            transmit-rate percent 40;
            priority low;
        }
        PRIORITY_LOW {
            transmit-rate percent 20;
            priority low;
        }
    }
}
firewall {
    filter QOS_STRICT {
        term 1 {
            from {
                source-address {
                    192.168.1.0/24;
                }
            }
            then {
                loss-priority low;
                forwarding-class expedited-forwarding;
                accept;
            }
        }
        term 2 {
            then accept;
        }
    }
    filter QOS_AF {
        term 1 {
            from {
                source-address {
                    192.168.3.0/24;
                }
            }
            then {
                loss-priority high;
                forwarding-class assured-forwarding;
                accept;
            }
        }
        term 2 {
            then accept;
        }
    }
}

Operation check result

The verification result log below allowed to confirm that packets were forwarded in accordance with the WRR rule because the output ratio was 2:1 when traffic was concurrently applied from two virtual servers (192.168.1.11, 192.168.3.13) so that the restriction bandwidth (10M bps) was exceeded.

Output status from interface (ge-0/0/1) regarding vSRX

user01@vSRX-02> show interfaces queue ge-0/0/1
Physical interface: ge-0/0/1, Enabled, Physical link is Up
  Interface index: 136, SNMP ifIndex: 520
Forwarding classes: 8 supported, 4 in use
Egress queues: 8 supported, 4 in use
Queue: 0, Forwarding classes: best-effort
    (中略)

Queue: 1, Forwarding classes: expedited-forwarding
  Queued:
    Packets              :                 51026                     0 pps
    Bytes                :              77151312                     0 bps
  Transmitted:
    Packets              :                 33575                     0 pps
    Bytes                :              50765400                     0 bps
    Tail-dropped packets :                 17451                     0 pps
    RL-dropped packets   :                     0                     0 pps
    RL-dropped bytes     :                     0                     0 bps
    RED-dropped packets  :                     0                     0 pps
     Low                 :                     0                     0 pps
     Medium-low          :                     0                     0 pps
     Medium-high         :                     0                     0 pps
     High                :                     0                     0 pps
    RED-dropped bytes    :                     0                     0 bps
     Low                 :                     0                     0 bps
     Medium-low          :                     0                     0 bps
     Medium-high         :                     0                     0 bps
     High                :                     0                     0 bps
  Queue Buffer Usage:
    Reserved buffer      :                625000 bytes
  Queue-depth bytes      :
    Current              :                     0

Queue: 2, Forwarding classes: assured-forwarding
  Queued:
    Packets              :                 51025                     0 pps
    Bytes                :              77149800                     0 bps
  Transmitted:
    Packets              :                 16909                     0 pps
    Bytes                :              25566408                     0 bps
    Tail-dropped packets :                 34116                     0 pps
    RL-dropped packets   :                     0                     0 pps
    RL-dropped bytes     :                     0                     0 bps
    RED-dropped packets  :                     0                     0 pps
     Low                 :                     0                     0 pps
     Medium-low          :                     0                     0 pps
     Medium-high         :                     0                     0 pps
     High                :                     0                     0 pps
    RED-dropped bytes    :                     0                     0 bps
     Low                 :                     0                     0 bps
     Medium-low          :                     0                     0 bps
     Medium-high         :                     0                     0 bps
     High                :                     0                     0 bps
  Queue Buffer Usage:
    Reserved buffer      :                625000 bytes
  Queue-depth bytes      :
    Current              :                     0
Queue: 3, Forwarding classes: network-control
    (省略)

Log resulted when 10 Mbps traffic was applied from virtual server (192.168.1.11) to virtual server (192.168.2.12)

Log resulted when 10 Mbps traffic was applied from virtual server (192.168.3.13) to virtual server (192.168.2.14)