cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
260
Views
0
Helpful
0
Replies

Stimulus-Response tcl script for QoS or others purpose

Some years ago I worked on a fax issue.
I tried to get a 100% fax transmissions on a long distance geographical VoIP link.
I tried several QoS settings without success.
I got this result only using a "strong" rate limit on all non VoIP traffic.

At this point the problem was "How can I apply the rate limit only during VoIP fax transmission?"

I got an idea: a tcl script.

This script worked properly and it works perfectly also now.
I thought to share my idea and my script hoping that it may be useful for someone.

script name: rate_limit_qos.tcl

1) the script must be copied in flash

2) the script runs after booting process using the IOS kron command:

kron occurrence tcl_occur in 1 oneshot
policy-list tclpol
!
kron policy-list tclpol
cli tclsh flash:/rate_limit_qos.tcl

3) the script runs in loops and so it's like a background daemon

#enter main loop
while {1} {

...

}

4) the script checks a special acl named "107" every 3 seconds

access-list 107 remark FAX TRAFFIC
access-list 107 remark used by tcl script - DO NOT REMOVE
access-list 107 permit udp host 10.255.248.13 any

you can change it according to your needs

5) if the VoIP traffic is matched from the acl 107 the script does something... in my case applies a rate limit to interface f0/1

6) if the VoIP traffic stops, the script removes the previous action... in my case removes the rate limit from interface f0/1

you can easily check it using show run

The script is attached.
You can change it using a text editor.

0 Replies 0