Monday, January 28, 2008

CCIE practice - My "scripts"

I wouldn't call them scripts. They are just simple commands that help you get quickly the information required.

Maybe you have already seen them around. Some parts are surely not mine. I just found them and adapted them to my needs.

Collection Scripts

Collect the active ip addresses from each router/switch


sh ip int br | exc unass


Collect the ip addresses belonging to backbone routers
$INTERFACE is the physical interface where the backbone router is connected
Read your exam for the ip addresses to be tested (used only for IGP routes)


sh ip route | inc $INTERFACE

While running the above collection scripts, keep a notepad window open with the following testing scripts into it and fill in the ip addresses that you collect. Using Alt + Left Mouse Button selects a rectangle in SecureCRT, so you can very easily get the ip addresses from the above outputs.

Testing Scripts

Test ip connectivity on each router


foreach i {
} { ping $i }

Don't forget to exit from tcl ("tclquit") when finished, because you might have some IOS commands ("set" under route-maps) behave "strangely" inside it.

Test ip connectivity on each switch

conf t

macro name PING
do ping x.x.x.x
do ping y.y.y.y
do ping .......


After creating the above macro, you only need to run the following each time you want to test

conf t

macro global apply PING

After you finish all testing (and before the lab exam ends), don't forget to remove the macro from the switches.

Removal Scripts

Remove macro from switches

sh run | inc macro

conf t

no ...



conf t

no macro name PING
no macro global desc PING


I used all the above scripts in every Mock Lab i had, either online or offline (using Dynamips). During the first ones, i was making a lot of mistakes while configuring them, but after a lot of practice i was able to write all of them into a notepad window in less than 1 minute (do not copy-paste them while practicing; try to write them down every time).

Collection of ip addresses shouldn't take you more than 2-3 minutes, especially if you use my 2 desktop environments. The whole scripting thing should take you less than 4 minutes, plus 1 minute for running the 2 testing scripts simultaneously on all routers and then on all switches (you just copy-paste the testing scripts on all the windows and watch the outputs). Of course, if an ip address is unreachable, you'll get an extra delay, so try to remove from the scripts all ip addresses that do not need reachability; "DO NO NEED" is always according to the exam instructions. If the ip address needs reachability, you'd better check your configuration.

Finally, note that the CCIE Lab is not about scripting. You don't want to spend your time configuring (and possibly trying to remember) complex scripts. I have seen a lot of super-duper scripts that could even "make you a coffee" (that's a greek phrase), but if you don't know the stuff you're being tested, they aren't going to help you. They might even slow you down.

One of your tasks when being at the CCIE Lab is to be as simple and as fast as possible. Your main focus should be on the lab tasks and not on any extra scripts that are there to help you. Use the scripts in order to verify quickly some parts of the required tasks, but do not rely on them for passing the lab.

Scripts can make your lab "easier" in regards to time management. That's their only role.


  1. instead of:
    sh ip int br | exc unass

    I prefer to use:
    sh ip int brie | in \.

    It's a few less characters.

  2. Hi, I'm currently studying for my CCIE R&S and I've read your post about how you did your lab under dynamips on your Ubuntu desktop, but I was wondering if you could tell me what topology did you create, because I was in the IE's website and I've seen that they have more than one topology, including one specifically for Dynamips. Is it the one that you studied?

    I look forward to hearing from you,


  3. Sorry, could you send me the answer to my e-mail??? Thanks!! I've posted the previous comment.
    my e-mail is

  4. I used the general one, not the one for dynamips.
    I just created my own real<=>dynamips port pairs, which i used along the whole practicing period.


Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Greece License.