cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2511
Views
4
Helpful
9
Replies

TCL for packet loss - Shutdown BGP session

stephen.stack
Level 4
Level 4

Hi Guys,

Looking for a solution here. I am looking for a EEM/TCL script (or other idea) that when packet loss occurs on a certain path, we can shut down the BGP peering seesion, so that all traffic directs to another upstream ISP.

We had this problem yesterday, it affected our customers in terms of performance and we want to make sure that it does not happen again.

Thnaks in advance

Stephen

========================== http://www.rconfig.com A free, open source network device configuration management tool, customizable to your needs! - Always vote on an answer if you found it helpful
9 Replies 9

Joseph W. Doherty
Hall of Fame
Hall of Fame

"(or other idea)"

Have you considered OER/PfR?

hi Joesph,

Thanks for the idea. Since you mentioned it, we will looking to to PfR in more detail. I think it is a more scaleable and robust method of an 'intelligent' design than scripting!

Stephen

========================== http://www.rconfig.com A free, open source network device configuration management tool, customizable to your needs! - Always vote on an answer if you found it helpful

Joe Clarke
Cisco Employee
Cisco Employee

EEM would work well for this. If you still want to pursue a scripting option, let me know exactly how you are detecting packet loss, exactly what commands you want to run when loss is detected, and what IOS version you're using.

Hi,

thanks for reply, and help. I am presenting my options to management soon. It would be good to have a number of solutions investigated.

So, i think the following would do me...

I have a 7206VXR c7200-is-mz.124-13a.bin

I am detecing packet loss by ping really. So, if the script could constantly ping out an interface, we'll say the next hop. If packet loss exceeds 10% then shut down the interface, while raising a log entry.

This way BGP will just failover to the other ISP automatically.

What do you think?

Regards

Stephen

========================== http://www.rconfig.com A free, open source network device configuration management tool, customizable to your needs! - Always vote on an answer if you found it helpful

This is doable. The best course of action will be to use IP SLA to do the ping. You could then have an EEM Tcl policy configured which would watch for an IP SLA timeout. If one occurs, it would look at the total number of successful completions, and compare that to the amount of time the IP SLA collector has been active. If the number of failures > 10%, then you could run the commands you need.

Makes sense to me.

Where would i start in writing the script. IO have a few scripting guys in the office here that could help me out. What would TCL compare to in terms of scripting?

Stephen

========================== http://www.rconfig.com A free, open source network device configuration management tool, customizable to your needs! - Always vote on an answer if you found it helpful

Tcl is like Tcl. It's flow is more akin to a shell script than to something like Perl. The EEM Tcl policy reference can be found at http://www.cisco.com/en/US/docs/ios/netmgmt/configuration/guide/nm_eem_policy_tcl.html . There are some sample scripts available from http://www.cisco.com/go/ciscobeyond/ . I am also hosting an EEM Ask the Expert session on the Network Management forum. If you have specific questions, feel free to ask there, and I'll help you out.

Qi Liu
Level 1
Level 1

Hi Stephen,

    I'm facing a similar problem and it's really puzzling me. How could EEM/TCL with SLA do a packet-loss detection and automatically disable the path with problem?

    Two paths which I am using now to access the Internet are both via static routes.

    If you have solved the problem , could you please help me and share your experience?

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:

Review Cisco Networking products for a $25 gift card