Archive for January, 2011

Flash cards

January 31, 2011 4 comments

I am going to create flash cards for my CCIE lab studys. A sample question could look like this:


Routers R1 and R2 are EIGRP neighbors. is the transit link between them.
R1 also has a loopback with the IP-address The default settings are
enabled for EIGRP and the correct network statements are in place. What netmask will R2
have for R1’s loopback?


The netmask is or /16 since auto-summary is on by default.

I am going to create the flashcards in Anki, if there is interest I will make it publically available for download and it will be updated whenever I add content to it.

Categories: Anki, Announcement, CCIE Tags: , ,

Quickly opening multiple sessions with Putty

January 28, 2011 12 comments

If you as I are studying for the CCIE R&S you should be using Putty? Why? Because for the
R&S track Putty is used in the lab. Yes, I an many others use SecureCRT and love the tabs
but you don’t want to go to the lab and do anything for the first time, except get your number!
Therefore we should use Putty to practice.

I use rack rentals and Dynamips for my studies, in either case I need to connect to a least 10
devices, the 6 routers and the 4 switches. This can be a bit tedious to do everytime you
want to study. Here is my solution for it. Start by installing Putty, I usually just use the
executable but you want to install it to be able to use it from the command line.
Download it here.

Install it to a directory of your preference.

Open a command prompt and type putty, what happens? Nothing, because Windows
doesn’t know where Putty is located. Either you can type C:\Program files\Putty\Putty.exe
or where you installed it everytime you want to use it but there is a better way.

Start by clicking the Start button and then right clicking on “Computer” and then
choose “Properties”.

Then we will have a new screen where we whant to choose “Advanced system settings”.

After that choose “Environment Variables…”.

Scroll down the “System variables” until you see “Path”. Select this and then choose edit.

After every entry there needs to be a semicolon. Scroll to the right and after your
final entry put “;C:\Program files\PuTTY” or the directory where you installed it.
You do not need the “”.

Windows will now know where Putty is located. If you type Putty from the
command prompt Putty will load. The advantage now is that we can use Putty from the
command line, you can used putty -telnet or putty -ssh to open sessions from the
command line but we are interested in putty -load. This is how I have things setup.

We need to create sessions in the GUI that we can load from the command prompt.
If you are using rack rentals like graded labs you telnet to a terminal server and
can create sessions by using different usernames. You can see that I connect
to on port 23.

Some things that you might like to change, in the “Windows” section change
the scrollback. I use 5000 lines of scrollback. You want to be able to run debugs
and then scroll back and go through the output.

I use a different font than standard, you can change this in “Appearance”.
The one I use is called Lucida Console.

I also like to change the selection behaviour. The default is to paste on right click.
I change it to bring up a menu on right click. If I want to paste something directly
I can use shift+insert.

This is enough to get us started but first lets make some more changes.
Under “Behaviour” we can set “Window title:”.
Set this to the device name like R1, R2, SW1 etc.
This will help us to know which device we are logged in to.

When you have edited your settings you need to save them to a session.
Choose “Session” and then “Saved Sessions” and enter a name for the session
and then click “Save”. To save more sessions leave the settings as they are, enter
a new name under “Saved sessions”, change the window title under behaviour, when
this is done click save and the session will be saved with the new name.
Do this for all the devices.

To load the sessions from the commandline we use putty -load.
I made a quick .bat file to start all my sessions. The code looks like this:

start “R1” “C:\Program Files\PuTTY\putty.exe” -load rr-r1
timeout /T 2 > nul
start “R2” “C:\Program Files\PuTTY\putty.exe” -load rr-r2
timeout /T 2 > nul
start “R3” “C:\Program Files\PuTTY\putty.exe” -load rr-r3
timeout /T 2 > nul
start “R4” “C:\Program Files\PuTTY\putty.exe” -load rr-r4
timeout /T 2 > nul
start “R5” “C:\Program Files\PuTTY\putty.exe” -load rr-r5
timeout /T 2 > nul
start “R6” “C:\Program Files\PuTTY\putty.exe” -load rr-r6
timeout /T 2 > nul
start “SW1” “C:\Program Files\PuTTY\putty.exe” -load rr-sw1
timeout /T 2 > nul
start “SW2” “C:\Program Files\PuTTY\putty.exe” -load rr-sw2
timeout /T 2 > nul
start “SW3” “C:\Program Files\PuTTY\putty.exe” -load rr-sw3
timeout /T 2 > nul
start “SW4” “C:\Program Files\PuTTY\putty.exe” -load rr-sw4

I have implemented a 2 second wait between each session because the sessions
time out quite fast and we need time to type username and password.
The timeout may not be availabe in systems older than Vista but you may
solve this by using a ping command or so. This bat-file can also be used to open
remote sessions to a Dynamips-server. The only thing that changes in the Putty
sessions is that we connect via ssh and then ports 2000 and upward.
If you connect to Dynamips you don’t need to implement the timeout command.

Hopefully this post has showed you new ways of using Putty and has speeded up your labstudies.


January 28, 2011 1 comment

There is a difference in how Windows and Unix-based systems end their lines. Why does this matter to us?
When converting the configs for the INE workbook vol1 the configs have been made by someone using Windows.

Windows uses a carriage return and a linefeed for each new line. The carriage return can be expressed as \r or ^M.
After that we have a linefeed which is expressed \n or ^J. When using a Unixbased system only the \n is used.

How can I convert from DOS-format to Unix, well there are a lot of different ways of doing this.
We can do it by using sed but there is a easier way. There is a utility called dos2unix, I run Debian on my Dynamips
box and I couldn’t find a package called dos2unix but there is a package named tofrodos that contains dos2unix.
To install it use:

sudo apt-get install tofrodos

Then answer yes to install it. Using it is easy, this is the syntax:

dos2unix r1.txt

This will clean up the file and output it with the same name it already has (overwriting). If you want to put the result in a new file then use:

dos2unix r1.txt r1-new.txt

If you have had issues with running my script this might be why. If you open a DOS-formatted text-file with Nano it will say that it has been
converted from DOS-format. I probably could have solved this in the script but my Unix skills are very limited and as I pick things up I will
try to improve it. Please leave comments if you use the script and if you have made any improvements to it. I want the community and all
us future CCIEs to have the tools needed readily available for sucessful studies.

Categories: Linux, Scripts Tags: , ,

5000 hits

January 26, 2011 1 comment

May not sound like much but still a  milestone for me. Traffic is increasing for every month which is a good sign. I hope you enjoy the site and that more people join in on the fun 🙂

Categories: Announcement Tags:

Script updates

January 25, 2011 Leave a comment

Some more updates to script:

  • Had missed to remap some serial interfaces on r4-r6
  • Port Fa0/6 on SW2 wasn’t remapped which led to connectivity issues between R1 and R6
Categories: CCIE, Dynamips, Scripts Tags: , ,

Script updated again

January 24, 2011 1 comment

Found some more bugs:

  • Wasn’t matching specific enough in the sed statements for bb1
  • Added 100/full to backbone routers ethernet interfaces
  • Redid how I delete interfaces for backbone routers

Should be pretty close to finished now but I find something almost every day.

Categories: CCIE, Dynamips, Scripts Tags: , ,

Script updated

January 23, 2011 1 comment

Found a lot of errors in my script and added some features. Things that got fixed:

  • Searching for interfaces for r1-r6 that didn’t need to be changed
  • Setting all interfaces to 100/full since Dynamips doesn’t like auto
  • Some patterns weren’t specific enough which led to multiple entries
  • Switchport mode dynamic desirable not available, set to hardcoded trunk
  • Switchport host not available, using switchport mode access instead
  • Delete some of interfaces on BB1 because we have separate frameswitch in topology

That should take care of most of the errors, if you find anything else please report it. Script is still avaible here.

Categories: CCIE, Dynamips, Scripts Tags: , ,