Junos
Highlighted
Junos

CoS scheduler not working as expected

‎06-16-2015 08:26 AM

hi

 

I've configued CoS the first time, I thought I got everything but its not working... 😞

Im trying to do something basic, limit one hosts service to the available bandwidth.

In my example limit traffic  to port 23, and only provide bandwidht if there is bandwidth available.

 

Im testing this on a EX-2200, and also tested on EX-4300

 

Traffic is sent to 10.128.12.4.  this host is connected to ge-0/0/1

the uplink is ae0:

 

So traffic is comming into ae0, the filter puts it to the bulk class und the outgong interface is ge-0/0/1. to his interface the 

scheduler map is bound.

 

show firewall 
family ethernet-switching {
    filter cos_bulk {
        term to_bulkhost {
            from {
                destination-address {
                    10.128.12.4/32;
                }
                protocol tcp;
                destination-port 23;
            }
            then {
                forwarding-class bulk;
                loss-priority high;
            }
        }
        term network_control {
            from {
                precedence [ net-control internet-control ];
            }
            then {
                forwarding-class network-control;
                loss-priority low;
            }
        }
        term rest {
            then {
                forwarding-class best-effort;
                loss-priority high;
            }
        }
    }
}

Interface ae0

 

unit 0 {
    family ethernet-switching {
        port-mode trunk;
        vlan {
            members all;
        }
        filter {
            input cos_bulk;
        }
    }
}

Class of Service config:

 

forwarding-classes {
    class bulk queue-num 2;
    class network-control queue-num 7;
    class best-effort queue-num 0;
}
interfaces {
    ge-0/0/1 {
        scheduler-map ethernet-cos-map;
    }
}
scheduler-maps {
    ethernet-cos-map {
        forwarding-class bulk scheduler bulk-sched;
        forwarding-class network-control scheduler nc-sched;
        forwarding-class best-effort scheduler be-sched;
    }
}
schedulers {
    bulk-sched {
        transmit-rate remainder;
    }
    nc-sched {
        transmit-rate percent 5;
        buffer-size percent 5;
        priority strict-high;
    }
    be-sched {
        transmit-rate percent 85;
        buffer-size percent 85;
    }
}

 When I send traffic to the server I see the queue counter increasing (bulk):

 

run show interfaces queue ge-0/0/1    
Physical interface: ge-0/0/1, Enabled, Physical link is Up
  Interface index: 140, SNMP ifIndex: 504
  Description: laptop - user1
Forwarding classes: 16 supported, 5 in use
Egress queues: 8 supported, 5 in use
Queue: 0, Forwarding classes: best-effort
  Queued:
  Transmitted:
    Packets              :               3999122
    Bytes                :            3340330338
    Tail-dropped packets :                  9214
    RL-dropped packets   :                     0
    RL-dropped bytes     :                     0
Queue: 1, Forwarding classes: assured-forwarding
  Queued:
  Transmitted:
    Packets              :                     0
    Bytes                :                     0
    Tail-dropped packets :                     0
    RL-dropped packets   :                     0
    RL-dropped bytes     :                     0
Queue: 2, Forwarding classes: bulk
  Queued:
  Transmitted:
    Packets              :                 98495
    Bytes                :             149895030
    Tail-dropped packets :                  3377
    RL-dropped packets   :                     0
    RL-dropped bytes     :                     0
Queue: 5, Forwarding classes: expedited-forwarding
  Queued:
  Transmitted:
    Packets              :                     0
    Bytes                :                     0
    Tail-dropped packets :                     0
    RL-dropped packets   :                     0
    RL-dropped bytes     :                     0
Queue: 7, Forwarding classes: network-control
  Queued:
  Transmitted:
    Packets              :                 46661
    Bytes                :               3922036
    Tail-dropped packets :                     0
    RL-dropped packets   :                     0
    RL-dropped bytes     :                     0

So I think this looks good.

But If I genterate traffic to the host on a other port than port 23 I don't see the traffic for the bulk class being limited.

Its treated the same way as other traffic.

 

This other traffic does NOT his the bluk class counter. Any hint on this? I'm a bit in the dark here... 😞

 

Also if I change the scheduler bulk-sched to transmit-rate 1 percent with 1 percent buffer I don't see an effect.

 

4 REPLIES 4
Highlighted
Junos

Re: CoS scheduler not working as expected

‎07-07-2015 11:52 AM

Don't know if I fully understand your test, but if I understand it right, I would remove the protocal tcp and port 23 from the firewall and try again.  Anything that doesn't match all 3 continues through the firewall and takes the last action.

Highlighted
Junos

Re: CoS scheduler not working as expected

‎07-08-2015 03:07 PM

my problem is that if I run multiple iperf  tests one for  port 23 and others on other ports,  the bulk class iperf gets the same amount of bandwidth then the other classes,  and I don't understand why. 

Highlighted
Junos

Re: CoS scheduler not working as expected

‎07-10-2015 12:50 AM

How do you check the trasmit/drop rate on each qeue. The given outshows the cumulative value. Can you clear the interface statistics and check again.

Thanks,
Suraj
Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too
Highlighted
Junos

Re: CoS scheduler not working as expected

‎07-14-2015 08:43 AM
Physical interface: ge-0/0/1, Enabled, Physical link is Up
Interface index: 140, SNMP ifIndex: 504
Description: laptop - user1
Forwarding classes: 16 supported, 5 in use
Egress queues: 8 supported, 5 in use
Queue: 0, Forwarding classes: best-effort
Queued:
Transmitted:
Packets : 42382
Bytes : 64372032
Tail-dropped packets : 2551
RL-dropped packets : 0
RL-dropped bytes : 0
Queue: 1, Forwarding classes: assured-forwarding
Queued:
Transmitted:
Packets : 0
Bytes : 0
Tail-dropped packets : 0
RL-dropped packets : 0
RL-dropped bytes : 0
Queue: 2, Forwarding classes: bulk
Queued:
Transmitted:
Packets : 43817
Bytes : 66681338
Tail-dropped packets : 2731
RL-dropped packets : 0
RL-dropped bytes : 0
Queue: 5, Forwarding classes: expedited-forwarding
Queued:
Transmitted:
Packets : 0
Bytes : 0
Tail-dropped packets : 0
RL-dropped packets : 0
RL-dropped bytes : 0

I don't see a significant higher value  in drops for queue 2

Feedback