Tuesday, March 20, 2012

Reverse Telnet on auxiliary port and its configuration


At some point in your career as a network engineer I am sure you would have come across a situation where you will have to configure a device remotely with no network connectivity to the device. It can be no biggie if you have a terminal server or out-of-band access into the device, but what if you don’t have any of these and all you have is one Cisco device there at site. Reverse telnet to the rescue!!! Reverse Telnet or Direct Telnet gives you the ability to telnet into a device and then console to another device from there.

For those of you who are rolling your eyes and going "that is easy!" , this post is not for you. This is for people like me who had no clue when I started off my career. ( In fact well into my career ). I will be using Cisco gear for configuration and setup examples.

All you will need is a Cisco device at site which has an Auxiliary port ( marked AUX) and a device with a console port (which you wish to connect to ) and a straight through cable.   

A Straight through cable as the name suggest is a straight through cable. Pins 1-8 are mapped to Pins 1-8 ( simple enough ). Please note that long cables and higher baud rates have known to cause issues. I always recommend that we keep the cable lengths ~5M or less.


Configuration on the Cisco routers are straight forward. You will need to configure the auxiliary line on them to accept sessions. I have given a sample configuration below.

cisco#config t
cisco(config)#line aux 0
cisco(config-line)#modem InOut
cisco(config-line)#transport input all
cisco(config-line)#speed 9600
cisco(config-line)#exit

The speed/baud rate can change with the device you wish to connect to. I have used 9600 here, which is default for cisco gear. Please refer to the hardware manual of the device to get the correct values for your device.

Once the device is configured you will need to connect the AUX to the console port using the straight through cable. You will need to figure out the port which you will need to use to telnet. Port assignments for Aux vary from device to device. You will be able to find this out using the command "sh line".

cisco>sh line
   Tty Line Typ     Tx/Rx          A Modem  Roty AccO AccI  Uses  Noise Overruns  Int
     0    0 CTY                            -       -            -         -       -         0            0         0/0        -
     1    1 AUX   9600/9600    -       -            -         -       -        62          0         0/0        -
    66   66 TTY   9600/9600   -      -            -         -       -        2             0    0/80592    -
*  322  322 VTY                      -      -            -         -      33       57         0    0/0              -
****TRUNCATED****

To telnet into the device you will need to use the port number of the AUX (i.e. 2000+line#.  seen in the above output ). So in the above example it would be 2001. The syntax is as below:

cisco> telnet  <ip_address> <port_number>

The IP address can be any IP on the device you are on. eg. loopback, LAN etc. and you are all set!

 


Saturday, March 10, 2012

What makes up what I write?

We all agree that blogs should be a reflection of first hand experience or opinions. I mainly intend for this to be a technical knowledge sharing page ( I might digress a bit now and then) but, while I will be sharing first hand experience, I will be making references from other technical literature out there in the internet. This is basically for two reasons...
  1. To reassure myself more than anyone that what I write is accurate and reliable information to the best of my knowledge.
  2. To save me a little bit of time. (everyone has got what they think is an acceptable magnitude of laziness :o) )
I will include reference links where ever possible for those readers who might not find what I have written tailor made for them. While I am new at this please do leave comments on how I can improve on what I write.

Thursday, March 8, 2012

My Very First Blog


"A journey of thousand Blogs starts with a single one". I have always been amazed on what you can stumble upon while browsing the internet. While I have always went looking around for solutions to problems on the internet, some which I was able to find and others which I had to learn the hard way. I would like to make my little contribution into this immensely big knowledge base hoping some of it might come handy for a needy soul.

And here it is… “My Very First Blog