Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

New to scripting on Cisco devices – need direction

Folks:

I just stumbled upon this topic and have been trying to research resources for this topic; however, I am completely lost. In addition, I am very new to networking and just acquired my CCNA, yet I am eager to learn.

I am confused, but what is EEM and how does TCL relate? Is TCL still used with EEM or is something else leveraged to provide scripting capabilities on devices?

Also, I have found Cisco documentation that details: Python being used on 7000 series, yet I am not entirely sure if that is related to EEM.

I am looking for suggestions or direction in learning how to leverage scripts on my devices. What steps should I take? Does it matter what scripting language (Perl, python or TCL) to learn?

With that being said – what is the most leveraged scripting language (Perl, Python, TCL) used in production?

Thank you,

JJ

4 REPLIES
Cisco Employee

New to scripting on Cisco devices – need direction

Depending on the platform, EEM can come in one or two forms.  The forms are either a CLI-based applet (resides in the running config) or a Tcl script (resides as a file on flash).  Unless you're on IOS-XR you do not need to use Tcl to use EEM.  IOS, IOS-XR, IOS-XE, and NX-OS also offer a standalone Tcl scripting environment.  Using this environment you can run ad hoc scripts.

NX-OS also supports a standalone Python scripting environment.  This environment exists on the N3K and N7K, but the N3K implementation is a bit richer at this time.

If you want to use embedded scripting on Cisco devices right now, it's best to learn Tcl.  I wouldn't put off learning, Python, though.  You'll see more Python coming as we roll out our device API, which will offer bindings in Python.

To get equainted with EEM, I recommend you read up on this community, or search through http://ciscolive365.com for presentations on EEM (just search for EEM).  That will point you to examples, links to documentation and more architectual details.

Cisco Employee

Re: New to scripting on Cisco devices – need direction

For NX-OS, python scripting is available on N5K and N6K platforms today as well (it had to be to support power on auto provisioning).  Also EEM on NX-OS platforms can call python scripts.  Documentation on this is spotty or non-existent though.  I would say that python 2.7 (currently 2.7.2) is likely the future for NX-OS as far as on the box scripting goes.  Tcl will continue to be there but python is where most platforms running NX-OS are moving to it seems.

Mike

New Member

New to scripting on Cisco devices – need direction

Joseph and mtimm:

Thank you for such detailed response, which is very much appreciated. I have been teaching myself Python slowly – having some difficulty coming from a “C” background (whitespace is killing me), yet I understand the flexibility the language provides.

Currently the shop I am in has an ad-hoc  script repository, which is a mixture of Perl, Expect and Python. Yet, these languages I am not very strong with; however, I did suspect Python would be leveraged in the future since I saw the Python API released by Cisco.

Aside from the Cisco resource “TCL Scripting for Cisco IOS” ISBN 978-1587059452, should I review or acquire other resources for TCL? 

Thank you,

JJ

Cisco Employee

New to scripting on Cisco devices – need direction

1984
Views
0
Helpful
4
Replies
CreatePlease to create content