Options

Tcl

chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
I have been learning a little bit about TCL, or rather I want to learn about it, and I am wondering what exactly is TCL capable of? I'm looking for a means to streamline configurations on switches that require a pretty repetitive motion. EG look up mac address, find the interface it is on, set it to an access vlan. I had to do that on almost 200 nodes this weekend and I would prefer to find a way to not be a mindless dummy. HAH!
Currently Pursuing
WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
mikej412 wrote:
Cisco Networking isn't just a job, it's a Lifestyle.

Comments

  • Options
    nicklauscombsnicklauscombs Member Posts: 885
  • Options
    chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□

    Dang, another book I want. I just bought CIPT1 and SWITCH cisco press, now I have another one I want XD. I think learning the script would be verrrry useful.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • Options
    Ryan82Ryan82 Member Posts: 428
    I'd love to hear your review on it when you are done reading. I have been thinking of learning a little TCL myself.
  • Options
    chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    Ryan82 wrote: »
    I'd love to hear your review on it when you are done reading. I have been thinking of learning a little TCL myself.

    I'll post one up when I finish reading it, I want to finish my SWITCH book first though before I go to far into it. That shouldn't take to long though.
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • Options
    ReardenRearden Member Posts: 222
    I've done this sort of thing in two ways before:

    The first way was using a bunch of SNMP write calls. I wouldn't suggest this, though because it can be tricky to make sure you're dealing with the interface you think you are.

    The second, and far more successful way has been to use the Expect module for Perl to script CLI sessions. It's exactly like using Excpect with TCL, it's just that I like Perl better :D

    Cisco's consistent CLI has make it a breeze to script things like this. I used to have it set up where the program worked like this:

    This program starts you at an enable prompt. Enter commands, followed by EOF:
    conf t
    <some configuration change here>
    end
    copy run start
    <carriage return>
    <carriage return>
    <ctrl + d>


    Then I'd have some error checking to make sure that the copy actually went through. It wasn't elegant (my script assumed there would be a copy so that it could do the error checking). But it saved me a ton of time when I had to make a change on every switch in the network.
    More systems have been wiped out by admins than any cracker could do in a lifetime.
  • Options
    DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    Rearden wrote: »
    But it saved me a ton of time when I had to make a change on every switch in the network.

    See I did the lazyway and got KIWI KAT tools :)

    steps

    click create activity,

    type list of commands,

    tick devices you want to apply to.

    click run ...... ;)

    OK so thats the cheats way to do it, but it gets me by.. I would love to run TCL at some point, but I got about 500 other things in line before that unless it jumps up the que for some reason..
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
Sign In or Register to comment.