Wednesday, December 17, 2008

SLA - Sending a Constant Bitrate

Everytime I study QoS I think about ways to generate a constant rate of traffic from a router. I always test using pings but I never really know at what rate data is being pushed through. With SLA, I can configure a somewhat rudimentary way of doing this.

Suppose I want a router R1 to send 64K to R7 (off in the distance).

Let's figure out the data size and frequency. There are probably multiple ways to do this depending on frequency and request-data-size but here is how I do it:

My load-interval on R7 is going to be 30 seconds so 1,920,000 (64,000 x 30) bits need to flow through every 30 second interval. Now if I send data a 1 second intervals, then I need to send 64000 bits every second. 64000 bits = 8000 bytes.

Formula using 1 second frequency intervals:

Load-interval X desired bitrate = total bits per interval
total bits per interval / 8 = request-data-size

Here is the config:

R1(config)#ip sla monitor 1
R1(config-sla-monitor)#type echo protocol ipIcmpEcho 150.100.56.7
R1(config-sla-monitor-echo)#request-data-size 8000
R1(config-sla-monitor-echo)#frequency 1


On R7 I created this tracker:

ip sla monitor responder

access-list 100 permit icmp host 150.100.12.1 any

class-map match-all SLA
match access-group 100

policy-map TRACK-SLA
class SLA

interface FastEthernet0/0
service-policy input TRACK-SLA


Now Let's start the SLA monitor on R1:

R1(config)#ip sla monitor schedule 1 life forever start-time now

Now on R7 we use the show policy-map interface command to see the bit rate. It takes a little while but it should peak near 64000 bps give or take 1000.

After 750 packets we have 65K:

R7#sho policy-map interface
FastEthernet0/0

Service-policy input: TRACK-SLA

Class-map: SLA (match-all)
750 packets, 1027500 bytes
30 second offered rate 65000 bps
Match: access-group 100

Class-map: class-default (match-any)
91 packets, 6548 bytes
30 second offered rate 0 bps, drop rate 0 bps
Match: any


Now several minutes later we are still at 65K:

R7#sho policy-map interface
FastEthernet0/0

Service-policy input: TRACK-SLA

Class-map: SLA (match-all)
2784 packets, 3814080 bytes
30 second offered rate 65000 bps
Match: access-group 100

Class-map: class-default (match-any)
280 packets, 20188 bytes
30 second offered rate 0 bps, drop rate 0 bps
Match: any

3 comments:

  1. hello friend,

    i might not be as experienced as you, but while watching Qos cbt video by jeremy, the section on congestion management. he was able to generate traffice by installing an ftp server and also a web server with the use of apache. so he uploaded a large file(140Mb) and tried to download via ftp and also via http( apache web server).

    so while the files was been downloaded he was applying various Qos and was able to show the effects on the router.the topology was like this.

    [host]---R1-----wan clould----R2-----(SERVER)


    TAKIA

    ReplyDelete
  2. Hi Takia, thanks for the comment. I wanted a way to do it with routers only. That way I don't have to mess around getting my lab connected to the rest of the world :)

    ReplyDelete
  3. the server does not have to be with the internet, it can be virtually created on ur laptop( hosting the server). u are still in total control.

    ReplyDelete

Note: Only a member of this blog may post a comment.