10x Engineer: Linux, TCL and EEM scripts directly on Cisco IOS!

52 thoughts on “10x Engineer: Linux, TCL and EEM scripts directly on Cisco IOS!

  1. Menu:
    1) TCL Scripts: 2:00
    2) Embedded Event Manager Scripts: 7:45
    3) Linux Scripts: 14:05

    =================================
    Documentation:
    =================================
    TCL: http://bit.ly/2mbkRoT
    EEM: http://bit.ly/2lQZWHl
    Shell: http://bit.ly/2kwMyYN

    =================================
    Books:
    =================================
    Cisco Press Book: https://amzn.to/2LpaU1a
    Good O'Reilly Book: https://amzn.to/2Lpbw6Z

    =================================
    TCL Script:
    =================================
    tclsh
    foreach ipaddr {
    10.1.1.1
    10.1.1.2
    10.1.1.3
    10.1.1.4
    10.1.1.1
    10.1.1.2
    10.1.1.3
    } { ping $ipaddr}

    tclsh ping.tcl

    =================================
    EEM Script:
    =================================
    event manager applet GIG0_DOWN
    event syslog pattern "Interface GigabitEthernet0/0, changed state to administratively down" period 1
    action 1.0 cli command "enable"
    action 2.0 cli command "config terminal"
    action 3.0 cli command "interface g0/0"
    action 4.0 cli command "shutdown"
    action 5.0 cli command "no shutdown"
    action 6.0 syslog msg "What's going on? GIG 0/0 went down!"
    !
    end

    debug event manager action cli

    =================================
    Linux Shell Script:
    =================================
    for x in 1 2 3
    do
    ping 10.1.1.$x
    done

    function testping(){
    ping 10.1.1.1
    ping 10.1.1.2
    ping 10.1.1.3
    ping 10.1.1.4
    }

    function testecho(){
    echo 10.1.1.1
    echo 10.1.1.2
    echo 10.1.1.3
    echo 10.1.1.4
    }

  2. What is minimal IOS version required to run those scripts?
    More advanced uses are welcome. But how often thi is used in the real world? Especially Event manager? It looks quite cumbersome, almost like old BASIC

  3. Great stuff once again David.
    Can't wait to put some of these to use.

    Thanks for the amazing content.

    You really should put these on a GitHub page for the channel.

  4. Perfect explanation and I see that you have right now exactly 80.000 subscribers, good job and my very best to you too David 👏. Thank you very much for your videos…

  5. used a TCL script yesterday in class to ping my OSPF and EIGRP networks to ensure my OSPF/EIGRP injections worked correctly. Powerful stuff, very fun

  6. The world is a pretty terrible place for alot of people one very good thing is the quality of real education available for free or at a low cost to people all over the world so long as they have access to the internet. I still think were all doomed for a 50 year global financial meltdown but these sort of videos make me a little bit happy.

  7. You honestly might be a lifesaver. Something fun about knowing iOS, as well as Python, as well as the underlying C/C++ code powering iOS

  8. This is Awesome! As a network engineer, I am always looking to automate and make myself more efficient! I have used tcl scripts before but never EEM or LINUX!!! I need to take a devnet course ASAP!

  9. I never knew any scripts could be run ON a Cisco box. I got a million lightbulbs lighting up now. Now just need to find the formats and grammar for scripting TCL and EEM.

  10. event manager applet TrunkGuard

    event cli pattern "switchport trunk allowed vlan [123456789]+" enter

    action DenyCommand puts "Command rejected! Please rethink your configuration and be mindful of outages!"

  11. I've used EEM scripts in the past with IPSLA to automatically switch out route-map and HSRP priorities in multi router environments.

  12. At 16:07 how are you getting the stacked list of open Terminal windows to show up in the lower left hand corner of the screen?

  13. And also the 2018 Cisco IOS Shell Command Reference is here https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_shl/command/ios-shell-cr-book/ios-shell-cr-a1.html

  14. 10X engineer is a fad that needs to die. Please let it die. It's just an added pressure on us network engineers who're already overloaded with stuff to learn and do.

  15. Due SDN now we don't need CLI to command on individual Cisco Router or Switch, so what is your comments about SDN. did we need more Cisco certification like CCNA, CCNP and CCIE.

  16. Amazing video. Thank you Sir. Please David go ahead with this series, because it is very informative, hard to find it on the internet and also it is hard to find such amazing explanation. I really enjoy when watching your contents in different social and education media.

  17. Hi David, thank you so much, I never knew this until you showed up!..much appreciated, by the way David sorry if I may ask,
    can we do tcl ping that involves vrf? e.g ping vrf aaa 10.1.1.1
    Thank you!

  18. Hi David, first of all I really appreciate that you are willing to share your knowledge. I have a question concerning the TCL script for pinging interfaces… I attempted to run the script on a Cisco IOSv "vios-adventerprisek9-m" router in EVE-NG. When I type in the command and arguments i.e., "foreach ipaddr {" the cli drops to the next line with the "+>(tcl)" prompt and also for each subsequent IP address entered (if I paste the script in I get an error that a closing brace is missing). All seems good until I enter the first closing brace… then "wrong # args: should be "foreach varList list ?varList list …? command" is the resulting error. I'm not sure if the Guacamole terminal used by EVE-NG is causing the problem or not. The "info patchlevel" command shows TCL version as 8.3.4. Thanks, kmcfrld

  19. So our network is admin disabled for the ability to use term shell. Kind of mad about that but at least I can lab it!

Leave a Reply

Your email address will not be published. Required fields are marked *