Thursday, April 26, 2012

MQC FRTS w / LLQ

I failed my lab and had a bad couple days to say the last. There is nothing more humbling then setting out to do something, putting your heart into it and coming up short.

One of the areas I realized I needed help in is QoS, and this post is related to MQC FRTS

I was totally lost on how to do this before tonight.

So lets say we were given a requirement to:

1) prioritize DSCP 46(voice) traffic

2)give bandwidth remaining 10 % to web traffic, coming in marked with dscp 32

3)shape on our DLCI 402 to 512k or 512000

I am no wizard, I referred to http://www.cisco.com/en/US/docs/ios-xml/ios/wan_frly/configuration/12-4t/wan-mqc-fr-tfshp.html#GUID-4FD565D0-CE2D-4066-B803-580EC0F6017B and INE's video on MQC FRTS before attempting this.

In order to accomplish we will need multiple policy-maps, as well as a map-class frame-relay class :)

See my below setup to test this out to learn

class-map match-all web     (-------IOS decided to put in cs4 when i put dscp 32 automatically)
 match ip dscp cs4
class-map match-all voice
 match ip dscp ef
!
!
policy-map LLQ
 class voice
    priority 32
 class web
    bandwidth remaining percent 10
policy-map QOS-MQC
 class class-default
    shape average 512000
  service-policy LLQ

map-class frame-relay FRTS
 service-policy output QOS-MQC

interface Serial0/0/0.200 multipoint
 ip address 172.16.200.4 255.255.255.0
 ipv6 address FE80::4 link-local
 ipv6 address 200:123::4/64
 ipv6 ospf network non-broadcast
 ipv6 ospf 1 area 0
 frame-relay map ip 172.16.200.1 401 broadcast
 frame-relay map ip 172.16.200.2 402 broadcast
 frame-relay map ipv6 FE80::1 401 broadcast
 frame-relay interface-dlci 402
  class FRTS

So.. reference the above config..., now lets talk about it.

First I created a Parent policy-map named QOS-MQC

-Inside of class-default , I configured shaping to 512000 - nothing under this frame-relay interface dlci 402 will be able to trasfer more then 512000
-I also called my child policy named LLQ - which references class-voice and class web to take care of the matching dscp 46 and dscp 32 for web
-Next, I configured map-class frame-relay FRTS and call our Parent policy-map
-Apply service policy to the interface DLCI

Next and most important thing I am learning, is we can't just configure something and then not test it, I think I went wrong here in the lab the 1st go around.
So I was thinking ok how can I test voice traffic or traffic with a specific DSCP value, without having the traffic sending to me by a device or traffic generator?

I learned there is  a way to do an extended ping , set the TOS byte in the IP header. We need to covert our known DSCP value, to a decimal #

To do so, I saw online in a quick google search you can take your dscp value and multiply by 4, this will be your value to put in the TOS byte in the ping.
Ok, while it works, I wanted a better understanding. Here is I the way that helped me understand and most importantly verify I met the requirements of the task.

DSCP value 46 (used for voice in my lab)
DSCP value 32 (used for web traffic in my lab)

DSCP is the first 6 most significant bits

normal binary 128 64 32 16 8 4 2 1 = 8 bits

DSCP 6 most significant bits = 32 16 8 4 2 1

DO DSCP 46 would have these bits 101110       or 32+8+4+2 = 46

now write the number out in binary (remember to add the last two zero's)
10111000 = 128+32+16+8 or 184

Now lets test !!

R4#ping            
Protocol [ip]:
Target IP address:
% Bad IP address
R4#ping
Protocol [ip]:
Target IP address: 172.16.200.2
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]: 184  <-------------------DSCP 46 TOS in binary
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 5, 100-byte ICMP Echos to 172.16.200.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
R4#show poi
R4#               
R4#
R4#|| now test web
   ^
% Invalid input detected at '^' marker.

R4#ping
Protocol [ip]:
Target IP address: 172.16.200.2
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]: 128 <--------------------------DSCP 32 TOS BYTE in binary
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 5, 100-byte ICMP Echos to 172.16.200.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

 Serial0/0/0.200: DLCI 402 -   ( notice how this is only applied on dlci 402 on the interface

  Service-policy output: QOS-MQC

    Class-map: class-default (match-any)
      140 packets, 14560 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 140/14560
      shape (average) cir 512000, bc 2048, be 2048
      target shape rate 512000
        lower bound cir 0,  adapt to fecn 0

      Service-policy : LLQ

        queue stats for all priority classes:
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops) 0/0/0
          (pkts output/bytes output) 110/11440
         
        Class-map: voice (match-all)
          110 packets, 11440 bytes       <----------Hits on simulated voice traffic, score!
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: ip dscp ef (46)
          Priority: 32 kbps, burst bytes 1500, b/w exceed drops: 0
         


       Class-map: web (match-all)
          10 packets, 1040 bytes  <--------------Hits on simulated web traffic score!
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: ip dscp cs4 (32)
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops) 0/0/0
          (pkts output/bytes output) 10/1040
          bandwidth remaining 10% (48 kbps)


        Class-map: class-default (match-any)
          20 packets, 2080 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: any
         
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops) 0/0/0
          (pkts output/bytes output) 20/2080

2 comments:

  1. Hey Erik,
    I think you could've achieved the same using the config below -

    class-map match-all web (-------IOS decided to put in cs4 when i put dscp 32 automatically)
    match ip dscp cs4
    class-map match-all voice
    match ip dscp ef
    !
    !
    policy-map LLQ
    class voice
    priority 32
    class web
    bandwidth remaining percent 10

    map-class
    frame-relay cir 512000
    frame-relay mincir 512000
    service-policy output LLQ

    So, the only change from the config you suggested is that I'm avoiding the policy map "QOS-MQC" and nesting only once instead of twice :)
    I'm not sure if this works as I haven't tested this...but I'll test this out soon and let you know!

    ReplyDelete
  2. Let me know if it works, I have not tried that way. I tried to stick as close to the config guide as possible which also has the nesting.

    Let me know! :)

    ReplyDelete