Nov 3

Run remote procedures & GNS3

Posted by Dragos Draghicescu

An interesting and pretty new capability of Cisco IOS is scripting through TCL language. What is not that well documented is that you can configure a router in some situations and the interesting thing is that you can store the configuration procedure remotely, like on a tftp server for example. What I will present may be useful in lab environments, for simulation purposes. I used it to prepare a huge exercise for the CCNA 2 class.

First of all, I will suppose that you have configured a tftp server somewhere in your LAN. Second thing is you can configure a bridge between your Ethernet interface and a tap interface (a virtual interface, for use with the emulated router). In Linux, you can use the Bridge-utils and uml-utilities to do that. You can find a tutorial on how to do a bridge <here>.

Now lets get to work! :)

In GNS3 (ran as root) you have to link the router with a clouds tap interface. In the cloud configuration panel, add a tap interface into the NIO tap tab (lets say tap0). Next, configure the router interface IP address like its part of your LAN. You can ping your gateway to verify that.

It’s all said and done. The script I wrote reads a number of Loopback interfaces to be configured from the user input. The output looks like this:

IOS output

IOS output

The output is incomplete, but the script configured Loopback 0 to 4 with ip addresses.

I hope some will find what can be done with IOS TCL pretty interesting.

Good luck!


3 Responses to “Run remote procedures & GNS3”

  1. sherbban Says:

    Eu folosesc expect pentru configurari “hard-core”. partea buna la expect e ca poti sa il folosesti in orice shell (il folosesc pt: IOS, JUNOS, NX-OS, bash). Ce e bun la expect e ca se bazeaza pe tcl si poti sa il folosesti remote.
    plus ca scriptul il configurezi la tine pe calculator si poti sa il modifici/refolosesti pt toate echipamentele de care ai nevoie.

  2. Sorin Says:

    As dori sa adaugati mai multe informatii despre acest subiect.

  3. Dragos Draghicescu Says:

    Salut Sorin si multumesc pentru interesul manifestat. Voi incerca in perioada urmatoarea sa mai scriu un articol pe acest subiect. As putea sa iti recomand totusi o pagina care te-ar putea interesa, cum ar fi
    Voi reveni pe acest subiect.

    Numai bine!

Leave a Reply