Reverse telnet; accessing router using AUX port.
by David Sudjiman ~ November 26th, 2006. Filed under: Cisco.You have your router connected to internet, in this scenario you’re using 2501 (GW), and you need to ask your friend to troubleshoot your second router, a 2503 (R1), that seems has problem connecting to GW.
You can take advantage the use of AUX port.
To prepare, you need a rollover RJ45 cable and connect both routers using AUX port and put these configuration lines.
hostname GW ! interface Loopback0 ip address 192.168.1.1 255.255.255.255 ! ! enable secret gw_secret enable secret 5 $1$jrfJ$emVdO4/QA133es8FFR5XU/ ! line aux 0 password gw_aux login modem InOut transport input all speed 38400 flowcontrol hardware
On GW, that Loopback0 exists because GW does not have any IP address. For this scenario, you can use any available IP on your GW if there is any.
hostname R1 ! ! enable secret r1_secret enable secret 5 $1$jrfJ$emVdO4/QA133es8FFR5XU/ ! line aux 0 password r1_aux login modem InOut transport input all speed 38400 flowcontrol hardware
You need to check on what port your AUX port is.
GW#sh line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
* 0 CTY - - - - - 6 0 0/0 -
1 AUX 38400/38400 - inout - - - 6 0 0/4135 -
2 VTY - - - - - 0 0 0/0 -
3 VTY - - - - - 0 0 0/0 -
4 VTY - - - - - 0 0 0/0 -
5 VTY - - - - - 0 0 0/0 -
6 VTY - - - - - 0 0 0/0 -
From the above sh line result you see that AUX is on port 1. Cisco arranges the TCP port correspond with your AUX port by using port starting from port 2000. Now try to connect to particular TCP port 2001.
GW#telnet 192.168.1.1 2001 Trying 192.168.1.1, 2001 ... Open User Access Verification Password: gw_aux Password OK User Access Verification Password: r1_aux R1>ena Password: r1_secret R1#
Now, you can see that you can connect to R1 from GW using AUX port. to get out from R1 but not disconnecting the line, you use sequence CTRL+SHIFT+6 x. That is you press CTRL+SHIFT+6 altogether then you press x or you can use other sequence CTRL+ALT+6 x, depends your terminal application.
Currently, the session between GW and R1 exists, you can’t connect to R1 using telnet command.
GW#telnet 192.168.1.1 2001
Trying 192.168.1.1, 2001 ...
% Connection refused by remote host
GW#sh line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
* 0 CTY - - - - - 6 0 0/0 -
* 1 AUX 38400/38400 - inout - - - 6 0 0/4135 -
2 VTY - - - - - 0 0 0/0 -
3 VTY - - - - - 0 0 0/0 -
4 VTY - - - - - 0 0 0/0 -
5 VTY - - - - - 0 0 0/0 -
6 VTY - - - - - 0 0 0/0 -
Can use that * mark on AUX port, that’s the sign that port AUX (and console) is in use. You can go back to R1 by pressing ENTER then you will be redirected to R1 again.
GW# [Resuming connection 1 to 192.168.1.1 ... ] R1#
When you finish configuring R1, you can’t close the connection from R1. You need to get out from R1 using sequence CTRL+SHIFT+6 x and from GW you need to close the session.
GW#disconnect
Closing connection to 192.168.1.1 [confirm]
GW#sh line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
* 0 CTY - - - - - 7 0 0/0 -
1 AUX 38400/38400 - inout - - - 7 0 0/4135 -
2 VTY - - - - - 0 0 0/0 -
3 VTY - - - - - 0 0 0/0 -
4 VTY - - - - - 0 0 0/0 -
5 VTY - - - - - 0 0 0/0 -
6 VTY - - - - - 0 0 0/0 -
Just in case the command disconnect does not work, you can force closing the session using command clear line 1.