Archive for September, 2009

Every cisco routers has a configuration register which is saved in NVRAM and is a 16 bit value.

This post will not tackle all the 16 bits of the configuration register, but only the 13th bit which is used to either load IOS or ROMMON. Another post will be made to detail all the 16 bit configuration register.

Before continuing, it is important to understand the basic “boot process” of a router. When you power a router on, it first performs a POST, then loads the bootstrap program from ROM to RAM, which in return loads the appropriate IOS (bootstrap can load an IOS from tftp)/ROMMON or RXBOOT. Once loaded, the bootstrap program gives the hand to the IOS to handle the commands from there on.

The most important bit is the low order bit which is (2 for IOS, 1 for Rxboot and 0 for ROMMON)

Please note that by default, the low order boot bit is 2 thus 0x 2102

Example:

home-booth(config)#conf t
home-booth(config)#config-register 0×2100
home-booth(config)#do wr
Building configuration…
[OK]
home-booth(config)#do reload

Proceed with reload? [confirm]

(… a bit later)

%SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload Command.
System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.

rommon 1 > System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory.

rommon 1 >
rommon 1 > confreg 0×2102
rommon 2 >

What could ROMMON be useful for? Simple… restoring a router with a corrupted/broken IOS image!

Configuration Register

I have come across this article which I though qualified for a post here.

As some of you may already know it. It is possible to tap through a turned off mobile phone. More info on the subject read here and there.

Dan at this site has come up with a small technique to help prevent mobile tapping, to ensure total privacy… and all of this by just using a reed switch and a magnet.

Read more at http://www.stahlke.org/dan/phonemute/

If you are still not up for some soldering, you can always remove the battery from your mobile phone when not using it :)

Cisco IOS shortcuts

Configuring Cisco IOS shortcuts command are quite easy and neat… just use the exec command “alias”.

command structure: alias <mode> <shortcut> <command>

Example in exec mode: sh ip int br (show ip interface brief)

so following, we would get “alias exec s sh ip int br”

Example in configure mode: router ospf

and we would get “alias configure ro router ospf”

More mixed examples [ alias / original command / command to enter ]

shr / show run | inc ip  / alias exec shr sh run | inc ip

et0 / interface fa0/0 / alias configure et0 interface fa0/0

reload /  sh run / alias exec reload sh run <— rewrite IOS command

I hope that was informative!

When facing this error…

manually cd into the project QT folder and run “make”… ld would return the library name it isn’t able to locate.

Example:

ali@laptop:~/Documents/Dev/QT-Progs/Test$ make
g++ -Wl,-rpath,/opt/qtsdk-2009.03/qt/lib -o Test main.o testhello.o moc_testhello.o    -L/opt/qtsdk-2009.03/qt/lib -lQtGui -L/opt/qtsdk-2009.03/qt/lib -L/usr/X11R6/lib -pthread -lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lfontconfig -lXext -lX11 -lQtCore -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
/usr/bin/ld: cannot find -lfreetype
collect2: ld returned 1 exit status
make: *** [Test] Error 1

Note the “cannot find -lfreetype”.. now note it can be any other library, depending on your current system configuration.

In most cases, install the devel package associated with this library.

Debian/Ubuntu “apt-get install libfreetype6-dev” for example.

Now, re-run the “make” and observe for further errors…