Terminology:

AF – Assured forwarding

EF – Expedite Forwarding

BE – Best Effort

CS – Class Selector – use for backward compatibility with IP Precedence.

MPD – Mark Probability Denominator.

FIFO – First-In-First-Out

 

The number on the bracket ( x ) is the decimal equivalence of the AF or CS value.

 

Typical Classification Table:

 

Class-Map            Value

AF1x:                      ip dscp cs1 ( 8 ) af11 (10) af12 (12) af13 (14)

AF2x:                      ip dscp cs2 (16) af21 ( 18 ) af22 (20) af23 (22)

AF3x:                      ip dscp cs3 (24) af31 (26) af32 ( 28 ) af33 (30)

AF4x:                      ip dscp cs4 (32) af41 (34) af42 (36) af43 ( 38 )

EF/Prec 5:             ip dscp cs5 (40) ef (46)

  

You don’t need for memorize the conversion of AFx / CSx value to its decimal equivalent. There is a formula on how it arrived. Let’s do some basic math.

 

Formula for AF:

 

Given: AFxy

Let x = first digit [1 -4 ]

Let y = second digit [1 -3]

Decimal Value = 8x +2y

 

Formula for CS = 8y

EF = always = 46.

 

Sample:

 

AF43 : x=4 , 3=y;

Decimal Value = 8x +2y

Decimal Value = 8(4) + 2(3)

Decimal Value = 32 + 6

Decimal Value = 38

 

Sample 2:

 

CS1 =   8y    =       8

CS2 =   8(2) =       16

 

How get the value to be used for the extended ping test:

Examples:

 Decimal Value = 38 =  100110 in binary

                 Then 100110 + “00”  = 10011000

10011000 convert back to decimal becomes 152.

 

 Decimal Value = 46 = 101110 binary

 Then 101110 + “00”  = 10111000

                 10111000 convert back to decimal becomes 184.

 

 

1.       Once you get the decimal value, open your scientific calculator (windows – calc.exe will do )

2.       Input the decimal value, convert to binary, then add two zeros “00”

3.       Convert back to decimal. Here you get the actually value to be used for you extended ping test.

 

 

Based on our classification above we use  5 queue only  to make classification not to complicated. Let call the the “ETM” Enhanced Traffic Marking.

 

Also per bucket or class we do WRED (weighted random early detection) based on DSCP. Also configured with MPD = 1, means 100 drop rate  once the maximum threshold is reach.

 

In the ERA of MPLS, a mere packet loss on our ping test does not  give a direct conclusion of a dirty line or circuit. We should always check each QoS queue and see if this taking violations, remarked or even drops.

 

You can use this command in looking for the values you need.

 

show policy-map interface [Interface-Name] output  | i op|ass|ark|form|iola

show policy-map interface [Interface-Name] input |  | i op|ass|ark|form|iola

 

 On this case you can see a  Qos in action. As you can follow logs below, we did a ping test on the EF queue (Decimal 184) and we see a packet drops. This is because the output queue is already congested.

 

While pinging at BE marked ping packets (0) value we see a vey clean sweet ping results.

 

This will conclude that the issue is not on the circuit, meaning , ckt must be error free and clean. The problem is the congestion of traffic class. Btw, within a class scheduling used is FIFO.

  

Router Logs:

 

Ping test using BE:

 

MPLS-Router-1>ping vrf VPN-CustomerA 19.25.19.25 repeat 1000 size 1400

 

Type escape sequence to abort.

Sending 1000, 1400-byte ICMP Echos to 19.25.19.25, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Snip…

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!

Success rate is 100 percent (1000/1000), round-trip min/avg/max = 1/2/24 ms

  

Ping test using EF Queue:

 

MPLS-Router-1>ping vrf VPN-CustomerA

Protocol [ip]:

Target IP address: 19.25.19.25

Repeat count [5]: 1000

Datagram size [100]: 1400  <<<<<<<<<<<<<<<- Large packet size

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface:

Type of service [0]: 184  <<<<<<<<<<<<<<<- EF- Marked ICMP Packet

Set DF bit in IP header? [no]:

Validate reply data? [no]:

Data pattern [0xABCD]:

Loose, Strict, Record, Timestamp, Verbose[none]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 1000, 1400-byte ICMP Echos to 19.25.19.25, timeout is 2 seconds:

!!!!!!.!!!!.!!!!.!!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.

Snip….

!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!

Success rate is 76 percent (769/1000), round-trip min/avg/max = 1/1/224 ms

MPLS-Router-1>ping vrf VPN-CustomerA

Protocol [ip]:

Target IP address: 19.25.19.25

Repeat count [5]: 1000

Datagram size [100]: 1400

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface:

Type of service [0]: 136  <<<<<<<<<<<<- af41 (34) marked ICMP

Set DF bit in IP header? [no]:

Validate reply data? [no]:

Data pattern [0xABCD]:

Loose, Strict, Record, Timestamp, Verbose[none]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 1000, 1400-byte ICMP Echos to 19.25.19.25, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Snip….

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!

Success rate is 100 percent (1000/1000), round-trip min/avg/max = 1/2/20 ms

MPLS-Router-1>

 

Input Policy is clean, no drops on the EF queue.

 

MPLS-Router-1>sh policy-map interface  Serial1/0/0.20892 in 

 

 Serial1/0/0.20892

 

  Service-policy input: INPUT-POLICY

 

    Class-map: EF(match-any)

      26677343 packets, 1708347477 bytes

      5 minute offered rate 68000 bps, drop rate 0 bps

      Match: ip dscp cs5 (40) ef (46)

        26677343 packets, 1708347477 bytes

        5 minute rate 68000 bps

      Police:

        256000 bps, 32000 limit, 32000 extended limit

        conformed 26676976 packets, 1708323989 bytes; action: set-mpls-exp-transmit 5

        exceeded 0 packets, 0 bytes; action: set-mpls-exp-transmit 5

        violated 0 packets, 0 bytes; action: drop

 

    Class-map: AF4x(match-any)

      4744649 packets, 2171531130 bytes

      5 minute offered rate 4000 bps, drop rate 0 bps

      Match: ip dscp cs4 (32) af41 (34) af42 (36) af43 (38)

        4744649 packets, 2171531130 bytes

        5 minute rate 4000 bps

      QoS Set

        mpls experimental imposition 4

          Packets marked 4744649

 

    Class-map: AF3x(match-any)

      28039 packets, 5503914 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: ip dscp cs3 (24) af31 (26) af32 (28) af33 (30)

        11407 packets, 4611124 bytes

        5 minute rate 0 bps

      Match: ip dscp cs6 (48) cs7 (56)

        16632 packets, 892790 bytes

        5 minute rate 0 bps

      QoS Set

        mpls experimental imposition 3

          Packets marked 28039

 

    Class-map: AF2x(match-any)

      2664905 packets, 867531648 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: ip dscp cs2 (16) af21 (18) af22 (20) af23 (22)

        2664905 packets, 867531648 bytes

        5 minute rate 0 bps

      QoS Set

        mpls experimental imposition 2

          Packets marked 2664905

 

    Class-map: BE(match-any)

      1473520 packets, 219300011 bytes

      5 minute offered rate 3000 bps, drop rate 0 bps

      Match: ip precedence 0  1  2  3

        1473520 packets, 219300011 bytes

        5 minute rate 3000 bps

      Match: ip precedence 4  5  6  7

        0 packets, 0 bytes

        5 minute rate 0 bps

      QoS Set

        mpls experimental imposition 0

          Packets marked 1473520

 

    Class-map: class-default (match-any)

      0 packets, 0 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: any

        0 packets, 0 bytes

        5 minute rate 0 bps

 

 

MPLS-Router-1>sh policy-map interface Serial1/0/0.20892 out

 

 Serial1/0/0.20892

 

  Service-policy output: NESTED-PE-CE-6K

 

    Class-map: class-default (match-any)

      36751759 packets, 8673566210 bytes

      5 minute offered rate 155000 bps, drop rate 0 bps

      Match: any

        0 packets, 0 bytes

        5 minute rate 0 bps

      Output queue: 0/128; 0/0 packets/bytes output, 0/0 drops

      Shape : 6092 kbps

 

      Service-policy : OUT-POLICY

 

        Class-map: EF(match-any)

          26002327 packets, 1665771828 bytes

          5 minute offered rate 68000 bps, drop rate 0 bps

          Match: ip dscp cs5 (40) ef (46)

            26002327 packets, 1665771828 bytes

            5 minute rate 68000 bps

      Output queue: 0/256; 26002327/1665723508 packets/bytes output, 0/0 drops

          Absolute priority

          Police:

            3048000 bps, 9525 limit, 0 extended limit

            conformed 26001319 packets, 1665666996 bytes; action: transmit

            exceeded 0 packets, 0 bytes; action: transmit

            violated 29 packets, 42176 bytes; action: drop

 

        Class-map: AF4x(match-any)

          3748257 packets, 2208700671 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: ip dscp cs4 (32) af41 (34) af42 (36) af43 (38)

            3748257 packets, 2208700671 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 3735280/2190803028 packets/bytes output, 12977/17941551 drops

      Bandwidth : (Weight 40)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

                 32   171   500      1/1         0          0          0          0

                 34   171   500      1/1         0          0          0          0

                 36    52   171      1/1     12977   17941551          0          0

                 38    52   171      1/1         0          0          0          0

            Default   256   512      1/10             0          0          0          0

 

        Class-map: AF3x(match-any)

          2107826 packets, 1588258194 bytes

          5 minute offered rate 92000 bps, drop rate 0 bps

          Match: ip dscp cs3 (24) af31 (26) af32 (28) af33 (30)

            2090633 packets, 1587146544 bytes

            5 minute rate 92000 bps

          Match: ip dscp cs6 (48) cs7 (56)

            17193 packets, 1111650 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 2107827/1588123702 packets/bytes output, 0/0 drops

      Bandwidth : (Weight 39)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

                 24   250   500      1/1         0          0          0          0

                 26   250   500      1/1         0          0          0          0

                 28    52   250      1/1         0          0          0          0

                 30    52   250      1/1         0          0          0          0

                 48   511   512      1/10        0          0          0          0

                 56   511   512      1/10        0          0          0          0

            Default   256   512      1/10             0          0          0          0

 

        Class-map: AF2x(match-any)

          1599388 packets, 1526755319 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: ip dscp cs2 (16) af21 (18) af22 (20) af23 (22)

            1599388 packets, 1526755319 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 1599343/1526694011 packets/bytes output, 45/61488 drops

      Bandwidth : (Weight 16)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

                 18   171   500      1/1         0          0          0          0

                 20    52   171      1/1         0          0          0          0

                 22    52   171      1/1        45      61488          0          0

            Default   171   500      1/1              0          0          0          0

 

        Class-map: dscp_AF1x_ipprec_1_6Qs (match-any)

          0 packets, 0 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: ip dscp cs1 (8) af11 (10) af12 (12) af13 (14)

            0 packets, 0 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 0/0 packets/bytes output, 0/0 drops

      Bandwidth : (Weight 1)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

                 10   171   500      1/1         0          0          0          0

                 12    52   171      1/1         0          0          0          0

                 14    52   171      1/1         0          0          0          0

            Default   171   500      1/1              0          0          0          0

 

        Class-map: BE(match-any)

          3293961 packets, 1684080198 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: ip precedence 0  1  2  3

            3293961 packets, 1684080198 bytes

            5 minute rate 0 bps

          Match: ip precedence 4  5  6  7

            0 packets, 0 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 3293710/1683786046 packets/bytes output, 251/286996 drops

      Bandwidth : (Weight 4)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

            Default   171   500      1/1            251     286996          0          0

 

        Class-map: class-default (match-any)

          0 packets, 0 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: any

            0 packets, 0 bytes

            5 minute rate 0 bps

      Output queue: 0/128; 0/0 packets/bytes output, 0/0 drops

MPLS-Router-1>  end