Switching

last person joined: 3 days ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
Expand all | Collapse all

Asking about configuring CoS on Junos

  • 1.  Asking about configuring CoS on Junos

    Posted 08-28-2013 03:11

    Hi all.

     

    I'm trying to configure CoS feature on Junos. I've made a lab like this

     

    SRX240-(ge-0/0/4)--------(ge-0/0/4)->EX4200

     

    I'm using BA to classify incoming packets, with the configuration like this.

     

    set class-of-service classifiers inet-precedence TEST_CLASS forwarding-class FC_TEST loss-priority high code-points 010
    set class-of-service forwarding-classes class FC_TEST queue-num 6
    set class-of-service interfaces ge-0/0/4 scheduler-map SCHED-MAP-EX
    set class-of-service scheduler-maps SCHED-MAP-EX forwarding-class FC_TEST scheduler NEW_CLASS_SCHE
    set class-of-service schedulers NEW_CLASS_SCHE transmit-rate percent 30
    set class-of-service schedulers NEW_CLASS_SCHE buffer-size percent 50
    set class-of-service schedulers NEW_CLASS_SCHE priority low

    As I understand, with this configuration, every incoming packets on interface ge-0/0/4 will be classified FC_TEST (instead of best-efford forwarding-class).

    But, when I ping from SRX to EX4200, and issue the command, show interface queue ge-0/0/4, there's nothing on queue 6, and queue 7 increase (that means traffic still maps queue 7 - network control).

     

    Queue: 6, Forwarding classes: FC_TEST
    Queued:
    Transmitted:
    Packets : 0
    Bytes : 0
    Tail-dropped packets : 0
    Queue: 7, Forwarding classes: network-control
    Queued:
    Transmitted:
    Packets : 4363
    Bytes : 574715
    Tail-dropped packets : 0

    --------------still ping from SRX------------

    Queue: 6, Forwarding classes: FC_TEST
    Queued:
    Transmitted:
    Packets : 0
    Bytes : 0
    Tail-dropped packets : 0
    Queue: 7, Forwarding classes: network-control
    Queued:
    Transmitted:
    Packets : 4396
    Bytes : 578459
    Tail-dropped packets : 0

     

    Please correct me, if my configuration is wrong.

     

     



  • 2.  RE: Asking about configuring CoS on Junos

    Posted 08-28-2013 04:32

    Hi,

     

    I would suggest you to test the QoS with minimum 3 routers, Use the config setup like below

     

    R1------R2-------R3, 

     

    Ping from R1 to R3 and then apply Classifier and Sechdular on R2.

     

    Here are few point to remember while testing QoS, 

     

    1. Classification usually used on the ingress.

    2. Rewrite and sechduling happening on Egress.

    3. You can see the Queue counter on the egress interface.

     

    Regards

    Satinder Singh

     



  • 3.  RE: Asking about configuring CoS on Junos

    Posted 08-28-2013 08:09

    Hi.

    Can you give the configuration with topo ?



  • 4.  RE: Asking about configuring CoS on Junos

    Posted 08-28-2013 10:04

    Queue 7 may be increasing due to Network control traffic and not by ping traffic. In my setup ping packets increase the queue counters in best effor queue



  • 5.  RE: Asking about configuring CoS on Junos

    Posted 08-28-2013 10:50

    post this output:

    >show class-of-service

     

    when you ping specify the tos value to 80, 88, 96 respectively then view the results to to see the counter increase.



  • 6.  RE: Asking about configuring CoS on Junos

    Posted 08-28-2013 11:29

    Hi,

     

    Chapter 6 of JNCIE study guide is best resource to understand QoS. You can use the topology in the chapter for your practice.

     

    https://www.juniper.net/us/en/training/certification/JNCIE_studyguide.pdf

     

    By default control plane traffic matches to network control class and all other traffic in best-effort class.

     

    Regards

    Satinder Singh



  • 7.  RE: Asking about configuring CoS on Junos
    Best Answer

    Posted 09-01-2013 04:31

    If the intention is to classify the incoming traffic from incoming interface to queue 6 then below configuration will work -

     

    R1- ge-0/0/1 ---------------ge-0/0/1-R2--ge-0/0/2---------------ge-0/0/1--- R3

     

     

    Configuration on Router R2 -

     

    set class-of-service classifiers inet-precedence classify_FC_Test forwarding-class FC_Test loss-priority high code-points 010

    set class-of-service forwarding-classes queue 6 FC_Test

    set firewall filter int-filter term inet-term from interface ge-0/0/1
    set firewall filter int-filter term inet-term then forwarding-class FC_Test

     

    Ping interface ge-0/0/1 of R3 from R1 and check the queue counters on R2 with below command. You should see the FC_Test queue counters increase

     

     run show interfaces ge-0/0/2 detail | find "queue counters"           



  • 8.  RE: Asking about configuring CoS on Junos

    Posted 09-03-2013 00:11

    Thanks for your help. As I know, this is classification by using MC, but if I want to use BA, would you give me a solution ?



  • 9.  RE: Asking about configuring CoS on Junos

    Posted 09-03-2013 00:19

    Hi,

     

    Here are mostimportant point for QoS.

     

    1. Classification usually used on the ingress.

    2. Rewrite and sechduling happening on Egress.

    3. You can see the Queue counter on the egress interface.

     

    And best resources from Juniper are QoS chapter of JNCIE study guide.

     

    https://www.juniper.net/us/en/training/certification/JNCIE_studyguide.pdf

     

    REgards

    Satinder Singh



  • 10.  RE: Asking about configuring CoS on Junos

    Posted 09-03-2013 00:27

    Hi,

     

    Here is config of default DSCP classifier on R2.

     

    [edit class-of-service]
    lab@r2# show
    interfaces {
    ge-0/0/1 {
    unit 0 {
    classifiers {
    dscp default;
    }
    }
    }
    ge-0/0/1 {
    unit 0 {
    classifiers {
    dscp default;
    }
    }
    }
    }

     

    Regards

    Satinder Singh



  • 11.  RE: Asking about configuring CoS on Junos

    Posted 09-03-2013 06:18

    Below BA configuration has worked for me for classifying the ping traffic into FC_TEST queue

     

    Topology -

     

    R1---ge-0/01 ---------ge-0/0/1---R2----ge-0/0/2-----------------ge-0/0/1--R3

     

     

    set class-of-service classifiers inet-precedence classify_FC_Test forwarding-class FC_Test loss-priority high code-points 010
    set class-of-service forwarding-classes queue 6 FC_Test
    set class-of-service interfaces ge-0/0/1 unit 0 forwarding-class FC_Test

     

     

    Ping from R1 to interface ge-0/0/1 on R3 -

     

    Check for the counters on R2 ge-0/0/2 interface with command

    - run show interfaces ge-0/0/3 detail | find "queue counters"

     

    You should see the FC_TEST queue counters increasing.

     



  • 12.  RE: Asking about configuring CoS on Junos

    Posted 09-04-2013 03:00

    Hi.

     

    My topo is

    SRX240-01---<ge-0/0/3>-------------SRX240-02-----------<ge-0/0/4>------------EX4200

    And this is configuration at SRX-240-02

    set class-of-service classifiers inet-precedence classify_FC_Test forwarding-class FC_Test loss-priority high code-points 010
    set class-of-service forwarding-classes queue 6 FC_Test
    set class-of-service interfaces ge-0/0/3 unit 0 forwarding-class FC_Test

    --------

    and then, I ping continously to EX4200 from SRX-01, but the counter does not change.

     

    root@SRX240-02> show interfaces ge-0/0/3 detail | find "queue counters"
     6 FC_Test                        0                    0                    0



  • 13.  RE: Asking about configuring CoS on Junos

    Posted 09-12-2013 21:04

    You should look at the counters on interface 02 of SRX 240 in your topology. I just tried it again it works perfectly for me , this time with a slight different configuration -

     

    topology -

     

    ro ---ge-0/0/1--------------ge-0/0/1--r1--ge/0/0/3 ----------------ge-0/0/1----r2

     

    set class-of-service classifiers dscp FC_Test_Classify forwarding-class FC_TEST loss-priority low code-points 000001
    set class-of-service forwarding-classes queue 6 FC_TEST
    set class-of-service forwarding-classes queue 6 priority high
    set class-of-service interfaces ge-0/0/1 unit 0 forwarding-class FC_TEST

     

    I can see the counters for queue FC_TEST increase on the interface ge-0/0/3 when i ping to r2 from r0



  • 14.  RE: Asking about configuring CoS on Junos

    Posted 10-28-2013 21:35

    Hi.

     

    I don't understand why we look the counter on ge-0/0/3? As I know, traffic from r0 will go to R1 via ge-0/0/1, and traffic will be classified at here first, it means queues on interface ge-0/0/1 will be increased.



  • 15.  RE: Asking about configuring CoS on Junos

    Posted 10-28-2013 22:15

    Just monitor the correct egress interface in your case. Traffic classified on the ingress interface and the rewrite applies to the egress. By the way, did you get a chance to read and understand the chapter 6 that Satin referred you to? I just read through a part of it and I believe you will gain lots of understanding as to which interfaces to configure and which interfaces to monitor.For example, if Device A has ge-0/0/1 as ingress interface with BA Classifier enabled and BA rewrite rules enabled on ge-0/0/2 egress which is connected to the ge-0/0/3 interface on Device B, then you would see the classified traffic on the ge-0/0/3 of Device B, that was rewritten on Device A. Hopefully you will get better understanding from reading the chapter 6. 

    • Rewrite rules—A rewrite rule sets the appropriate CoS bits in the outgoing packet. This allows the next downstream routing device to classify the packet into the appropriate service group. Rewriting, or marking, outbound packets is useful when the routing device is at the border of a network and must alter the CoS values to meet the policies of the targeted peer.


  • 16.  RE: Asking about configuring CoS on Junos

    Posted 01-22-2014 07:19

    Thanks for all. After reading, I understanding so much about CoS.