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

EEM & QoS

Jaffer.Razvi
Level 1
Level 1

I am attempting to modify an existing tcl script that can apply QoS policies on IP Phones and Router/Switch ports but it does not seem to work, anyone know what I could be doing wrong? Ideally once I have this script working, I would use EEM netconfig job in LMS 3.2 to a group of switches. I have attached the script to this discussion.

Best regards,

Jaffer

14 Replies 14

Joe Clarke
Cisco Employee
Cisco Employee

Exactly what are you doing, and what errors are you seeing?  On what version of IOS are you installing this policy?

I am trying to do the following:

Apply "auto qos voip cisco-phone" on IP Phones

Apply "auto qos voip trust" on ports connected to other switches and routers

Running the following version:

12.2(53) IP Services

QoS policies don't seem to apply ports connected switches and routers.

What errors are you seeing in the show log from the switch?  Are you using AAA command authorization on this device?

There are no errors. I am not using AAA, just local authentication. The EEM job through RME deploys just fine:

Commands
-------------
#MODE_ENABLE
#INTERACTIVE
mkdir  flash:/QoS
#ENDS_INTERACTIVE
#MODE_CONFIG
event  manager directory user policy flash:/QoS
#MODE_ENABLE
#INTERACTIVE
copy  tftp://xxx.xxx.xxx.xxx/null flash:/QoS/QoS.tcl
#ENDS_INTERACTIVE
#MODE_CONFIG
event  manager policy QoS.tcl

But the policy does not seem to be doing anything, its connected to another switch but its not applying the QoS policy to uplink port.

show event manager policy registered

No.  Class     Type    Event Type          Trap  Time Registered           Secu
Name
1    script    user    syslog              Off   Fri May 7 10:11:05 1993   2048
QoS.tcl
pattern {%LINK-3-UPDOWN}
nice 0 queue-priority normal maxrun 60.000 scheduler rp_primary

Enable "debug event manager tcl cli", trigger the policy again, then post the debug output.

Seems the policy only triggers when an interface goes up and down, it doesn't trigger if the interface is already up. The script seems to be incorrect from the looks of it.

This version will trigger when the link comes up, and should work for you.

Niiice but the QoS policy worked to the policy after I physically disconnect/reconnect the port connected to another switch, is there a way to apply the policy if its already connected?

Thanks,

jaffer

How would you want to trigger it if the interface is already up?  Does this need to be timer-based, or does it need to run manually?

Yes, if its already up and if a new interfaces comes up (IP Phone, Router, Switch) to apply the correct QoS statements, would that be possible?

Again, what do you want the trigger to be?  The way the policy is written now, when ANY interface comes up, your QoS commands will be applied to that interface.  The trigger for this is a syslog message.  Do you want another trigger, and if so, what trigger do you want?

I think my only requirement is that it should apply the policy according to the device type, I don't want to reset the physical interface just to apply the QoS policy. If the interface is already up than I suppose there would not be any messages via syslog hence no trigger, what else would you recommend?

Try this version.  This version will either react to a link up syslog message or a manual execution.  If you run the command as:

event manager run QoS.tcl 

Then the script will process the device connected to .   For example:

event manager run QoS.tcl FastEthernet0/1

Joseph, this works for me. I appreciate all your effort!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: