This littel snippet of IOS code provides a reverse telnet client from a Cisco IOS router to another device (usually the first switch after the router). It can be very handy to have console access to a remote branch core switch or similar if something goes ballistic and the reverse telnet provides as such a very affordable and easy way of setting this up on all branches. It does not scale in the same manner as a dedicated console server or an Async module for the ISR with multiple ports, but is a handy trick to known.
It is possible to utilize the AUX port of the ISR router as a console port termination. Just remember that it MUST be a roll-over cable between the two devices.

Quick illustration of the reverse telnet principle
It is very simple to setup. Just configure a Loopback interface as the reverse telnet target as shown below
Note that the linenumber associated with the AUX port may vary between models and IOS versions.
router#config t
router(config)#int loopback 0
router(config-if)#ip address 172.18.0.1 255.255.255.255
router(config-if)#exit
router(config)#line aux 0
router(config-line)#modem InOut
router(config-line)#transport input all
router(config-line)#transport output all
router(config-line)#speed 9600
router(config-line)#end
router#
router#sh line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
0 CTY - - - - - 0 0 0/0 -
225 AUX 19200/19200 - inout - - - 0 0 0/0 -
* 226 VTY - - - - - 10 0 0/0 -
227 VTY - - - - - 0 0 0/0 -
228 VTY - - - - - 0 0 0/0 -
229 VTY - - - - - 0 0 0/0 -
230 VTY - - - - - 0 0 0/0 -
router#
router#telnet 172.18.0.1 2225
When done you press CTRL+SHIFT+6, x and write “disconnect”. If you forget the line stays open and must later be cut off with the “clear line x” command., where x is found by typing “who”.
(Edit) – Translated original post to English

Be the first to comment on "Reverse Telnet for Branch Switch Console Access"