Q: How to set up reverse telnet?

Hi,

I'm learning about reverse telnet and am trying to set it up at home.

My LAN PCs are on the range 10.0.0.1 255.0.0.0 - 10.0.0.8 255.0.0.0.

When I'm trying to assign an IP to the Loopback interface I get an error:

***************************************************************** SanJose1(config)#int loopback 0 SanJose1(config-if)# 0:04:27: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up SanJose1(config-if)# SanJose1(config-if)#ip address 10.0.0.11 255.0.0.0 10.0.0.0 overlaps with Ethernet0
Reply to
Voitec
Loading thread data ...

I think the subnet mask on a loopback needs to be 255.255.255.255. Meaning a single host network. Try that first

Hope it helps S.c.

Reply to
sean courtney

Hi

Your loopback and Ethernet Interfaces both are using the 10.0.0.0/8 range.

unless other configs on your lab require the loopback to be 10.0.0.11 try changing your Loopback0 to 10.0.0.16 255.255.255.255 and your Ethernet to 10.0.0.14 255.255.255.240

This way your Ethernet will occupy network 10.0.0.0/28 giving 14 hosts 10.0.0.0 = Network 10.0.0.1-14 = hosts 10.0.0.15 = Broadcast If you change the Ethernet Interface address to 14 you would have to change the default gateway on your PC's but it would be neater to use the last host for the Interface. You could though leave it as 12 and avoid this extra setup.

And your loopback will be configured as a single host network 10.0.0.16/32

regards

Toby

Reply to
Toby

Just thought of a slight problem if you keep the PC setup as you have it and change the router config to what I suggested above. That is that if the PC's IP address's and subnet mask are kept the same then you would have no connectivity to the loopback interface from the PC's.

The reason for this is that the PC,s Ethernet NIC would belong to the network 10.0.0.0/8 and when trying to connect to the loopback0 of 10.0.0.16 it would expect it to be on it's own network but with the IP address setup on the router as above it would be on a different network (as it should be). The problem here is that the PC would not forward the IP packet to the default gateway (Routers Ethernet Interface) but would use ARP to try to find the layer2 MAC address for the IP address of 10.0.0.16 on the LAN but as this address does not exist on the LAN then no reply would be recieved and the IP packet discarded as unreachable.

You will need to change the mask on each PC to 255.255.255.240 also, so you might as well change the Routers Ethernet interface to 10.0.0.14

255.255.255.240 also along with the default gateway on the PC's

Regards

Toby

Reply to
Toby

10.0.0.16/32

Toby, Thanks very much for such a detailed explanation :) It all makes sense so I just need to change the configs (no time now but will do it later today). Will post back in this thread with the outcome.

Thanks, V

Reply to
Voitec

OK, here's some output from the term server router:

**************************************************************** Interface IP-Address OK? Method Status Protocol BRI0 unassigned YES not set administratively down down Ethernet0 10.0.0.12 YES manual up up Loopback0 10.0.0.16 YES manual up up Serial0 unassigned YES not set administratively down down Serial1 192.168.1.2 YES NVRAM down down SanJose1#sh line Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns
  • 0 CTY - - - - - 0 0 0/0 1 AUX 19200/19200 - inout - - - 0 0 0/0 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

SanJose1#ping 10.0.0.16 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.0.0.16, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms SanJose1#

When trying to telnet from the term server router I get:

********************************* SanJose1#telnet 10.0.0.16 2001 Trying 10.0.0.16, 2001 ... Open

**************************************************************** but the cursor just stays flashing in the line below 'Trying...'. I cannot type anything and have to break-out to the prompt.

'sh users' gives:

**************************************************************** SanJose1#sh users Line User Host(s) Idle Location
  • 0 con 0 10.0.0.16 0 1 aux 0 idle 0 10.0.0.16

SanJose1#

**************************************************************** 'clear line 1' is used to clear the above.

When trying to telnet from the PC, I got time outs. Command syntax is: "telnet 10.0.0.16 2001". The PC has an IP of 10.0.0.3/28. I can ping the E0 interface of the router.

What am I doing wrong?

Thanks, V

'sh run' of the router acting as a term server

************************************************************************ SanJose1#sh run Building configuration...

Current configuration: ! version 11.0 service timestamps debug uptime service timestamps log uptime service udp-small-servers service tcp-small-servers ! hostname SanJose1 ! ! ip subnet-zero ! interface Loopback0 ip address 10.0.0.16 255.255.255.255 ! interface Ethernet0 ip address 10.0.0.12 255.255.255.240 no ip mroute-cache no ip route-cache ! interface Serial0 no ip address no ip mroute-cache no ip route-cache shutdown no fair-queue ! ! ip address 192.168.1.2 255.255.255.0 no ip mroute-cache no ip route-cache ! interface BRI0 no ip address no ip mroute-cache no ip route-cache shutdown ! tftp-server flash igs-i-l.110-22a.bin ! line con 0 line aux 0 modem InOut transport input all rxspeed 19200 txspeed 19200 line vty 0 4 login ! end

SanJose1#

'sh run' of the target device I'm trying to reverse telnet into

******************************************** Vista#sh run Building configuration...

Current configuration: ! version 11.0 service timestamps debug uptime service timestamps log uptime service udp-small-servers service tcp-small-servers ! hostname Vista ! ! ip subnet-zero ! interface Serial0 ip address 192.168.1.3 255.255.255.0 no ip directed-broadcast no ip mroute-cache no ip route-cache clockrate 1000000 ! interface Serial1 ip address 192.168.1.4 255.255.255.0 no ip directed-broadcast no ip mroute-cache no ip route-cache clockrate 56000 ! interface TokenRing0 no ip address no ip directed-broadcast no ip mroute-cache no ip route-cache shutdown ! interface BRI0 no ip address no ip directed-broadcast no ip mroute-cache no ip route-cache shutdown ! ! line con 0 line aux 0 transport input all line vty 0 4 login ! end

Vista#

Reply to
Voitec

It looks like a speed mismatch. Vista is running at the default 9600 and SanJose1 at 19200

Regards

Toby

Reply to
Toby

up

up

Toby, I changed the speed on SanJose1 back to 9600 but it made no difference :(

**************************************************************** SanJose1#sh line Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns
  • 0 CTY - - - - - 6 0 0/0 1 AUX 9600/9600 - inout - - - 6 0 0/0 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

SanJose1#telnet 10.0.0.16 2001 Trying 10.0.0.16, 2001 ... Open

****************************************************************
Reply to
Voitec

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.