OpenWrt Forum Archive

Topic: I can't connect through telnet. What am I doing wrong?

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I just installed the OpenWrt firmware on my TP-MR3040 router.  I have my USB modem plugged in, the router is turned on, and the "internet" LED on the router is lit up.

On the following OpenWrt web page:

http://wiki.openwrt.org/doc/howto/basic.config

I'm instructed to first log in.  So I'm trying to log in using telnet.

I'm using windows xp, so I click on the "start" button.  I type "telnet" at the "run" prompt and a new window opens with a prompt.  I type "o" at the prompt, which gives the "<to>" prompt.  I then type the IP address (192.168.1.1) at the prompt.  Telnet then gives the following message:

Connecting To 192.168.1.1...Could not open connection to the host, on port 23: Connect failed

What am I doing wrong?  Why didn't it connect?

Thanks for your time and for any help that you may be willing to provide.

test with ping 192.168.1.1

check your lan ip segment :

open cmd window (run cmd)
ipconfig

look for Ethernet lan IP4 address & gateway

should be in range of 192.168.1.x but NO gateway at 192.168.1.1

if not change IP address/range of lan interface

(better use PUTTY prog)


regards
3zl
(sickbay& bored)

(Last edited by 3zl on 28 Apr 2014, 21:13)

Thanks so much, 3zl, for responding to my post.  However, now I'm really confused as to what's going on.

I did what you suggested.  I opened a command prompt window by clicking on the windows start button, then clicking "run" and then typing "cmd" at the prompt.  Once the command prompt window opened up, I typed "ping 192.168.1.1" and pressed "enter".  It responded by saying that the "destination host is unreachable".  It printed this out four times.

After that, I decided to type "ipconfig" at the prompt, as you suggested.  The computer simply responded by printing "Windows IP Configuration".

My USB modem is plugged into the router's USB port, the router is turned on, and the "internet" LED is lit up on the router.  Any ideas of why nothing is showing up when I type "ipconfig", or why ping says "destination unreachable.'?  I'm definitely doing something wrong, but I have no idea of how to fix this.

Thanks again for your response.  If you, or anyone, has any ideas of what's going on with this, I'm eager to hear your thoughts.  I appreciate your time and any help that anyone is willing to provide.

please check you network setup

"After that, I decided to type "ipconfig" at the prompt, as you suggested.  The computer simply responded by printing "Windows IP Configuration""

Meaning there is no further information there ?

in cmd window do:  "ipfconfig >ipconfig.log"

post content of "ipconfig.log" file here

Find out if you have any LAN connections configured :
Start ->Network Connections ->
   is there any Local Area connection ? right click / Properties  / internet Protocol

post here

regards
3zl

Now I think I'm beginning to understand what the problem was.  You were very helpful when you told me to look in "Network Connections" in control panel.  All of my devices were disabled, including "Local Area Connection".  So I enabled all of the devices and then plugged in an ethernet cable from my router to the ethernet jack on the back of the computer.  After doing this, Ping was able to get a response.  Also, when I type "ipconfig" at the command prompt I get the following:

Windows IP Configuration





Ethernet adapter Local Area Connection:



        Connection-specific DNS Suffix  . : lan

        IP Address. . . . . . . . . . . . : 192.168.1.135

        Subnet Mask . . . . . . . . . . . : 255.255.255.0

        Default Gateway . . . . . . . . . : 192.168.1.1



Ethernet adapter Wireless Network Connection:



        Media State . . . . . . . . . . . : Media disconnected


So it seems as if my router is now able to connect to my computer, but it has to connect via the ethernet cable, not wirelessly.  So now, I'm assuming I can proceed setting things up through the ethernet cable which, when I'm finished, should also allow me to connect wirelessly.

If I right-click on the "Wireless Network Connection" icon in the "Network Connections" portion of Control Panel, and then click "view available networks", many networks show up.  However, because I just installed the firmware on my router, and haven't begun to set things up, I'm assuming that my wireless network wouldn't show up here.  Even if it was showing up, I don't know what it would be called.  Hopefully, after I go through the basic configuration process, it will show up.  Please let me know if I'm wrong in my understanding.

Either way, thank you so much for helping me with this.  Now that ping worked, I hope to be able to connect through telnet and start setting things up.

Your help is greatly appreciated. and I love this forum.  If things don't work as planned, or if I run into any more snags, it's likely I'll be back.  Thanks so much, again, for your great help!

CAVEAT !

have a closer look at the LAN settings !

your LAN gateway ( Internet router ?) is on 192.168.1.1 !
and providing dhcp in the address range of 192.168.1.x

so what you actually pinging maybe your gateway !
IP-address collission anyway

In order to connect to your Openwrt device you have to :

either change the lan-gateway address of your router from 192.168.1.1 -> 192.168.1.254 (might not be possible )

or disconnect your PC from the router and set your PC-LAN ip manually to something in the range of 192.168.1.x

please dig a little into network basics

regards
3zl

(Last edited by 3zl on 29 Apr 2014, 18:35)

Thanks for your response.

I was able to get telnet to work and was able to enter a password as was described on the "First time log in" page.  According to that page, I won't be able to use telnet again but will have to log in via SSH.  Because I'm using windows,  I'll use PuTTY as you've suggested.

Because I'm not going to be using telnet again, should I still be concerned with the address being 192.168.1.1?

Everything that I've done up to this point is strictly based on what the openwrt website has instructed me to do. 

I own a virgin mobile USB modem and I want to hook it up to a USB router.  So I bought the TP-MR3040 router at Walmart (the same place where I bought the USB modem).  I hooked up the router according to the instructions, but it didn't work.  I quickly found out that the TP-MR3040 router doesn't support my USB modem.

I was reading the product reviews of the TP-MR3040 on amazon.com.  I wanted to see what people were saying about it and if anyone else had gotten it to work with a different modem.  As I was looking, I read a review that said that the router doesn't work with a lot of modems, but that it's possible to get it to work by using openwrt.

That was the first time I had heard of openwrt.  I didn't even know what it was at the time.  So I went to the openwrt website and saw that it does indeed support my router.  So I replaced the router's firmware with the suggested firmware from openwrt, expecting it to work right after installing it.  Once I noticed that it wasn't working, I read more about openwrt, and learned that it's a matter of configuring the router correctly.  So that has started me on this quest.

I'll admit that I'm not too familiar with linux.  I also don't know much about computer networks or  how modems or routers work.  I know what they do, but not how they work.

I say all of this because I want to be clear on what I'm ultimately trying to do.  I'm trying to set up my USB modem to work with the router.  Because it's simply a matter of getting the right configuration, I figured I'd just follow the recommended instructions for a typical system.  So I found the "Beginner's Guide" on the openwrt website, and started there.  Everything that I choose to do, and nearly all that I know about what to do, I'm getting from the direction of the openwrt website.  I'm following the instructions for a system that most closely resembles mine.  I have a 3g/4g USB modem, so I'm following the configuration steps for a "3g" dongle setup.

A long time ago, I tried to host my own website by setting up a LAMP system.  I didn't know anything about linux or apache, but was a little more familiar with MySQL and PHP.  I got a book that explained how to setup a LAMP system, and simply followed the instructions step-by-step until I finally got the thing to work.  I never mastered, or even learned much more about apache or linux, but was able to get it to work.  That's what I intend to do here.  Is such an approach feasible?  Is it merely a matter of choosing the right settings, and modifying the right files in order to get it to work, or can this only be done with a deep knowledge of linux and openwrt?

I'm sorry to type such a long post, but I want to be open about my intent on how I plan to get the router to work, and also about my lack of mastering linux or openwrt.  I've been stepping through the process slowly with incremental success, but I haven't mastered anything.  I only learned about what telnet is because the beginner's guide page said that it is what I could use in order to complete the "first log in" stage of setting things up.  The same thing is true about PuTTY.  I hadn't heard of it until I was told that it's needed in order to continue.  This is the way that I've been stepping through this process.  I'm not mastering anything, but am simply going from step to step until the thing finally works.

So I used the 192.168.1.1 address because that's what openwrt said to use on the beginner's page.  Now that I've entered the password, and won't be going back to telnet, do I still have to worry about this setting?  It says that I'll now be logging in via SSH.

I've now gotten to the point where it says I should backup my configuration.  Because of what it says at the bottom of the Generic backup page of the openwrt website, I typed the following at the "root@OpenWrt:~#" prompt.

"cd /etc; tar cvz config" > openwrt.tar.gz

As a result, I received the following message:

-ash: cd /etc; tar cvz config: not found

Do I have to create a directory, or do I have to specify a more absolute path?

Thanks again for all of your help and input.  Because you now know a little more concerning what I'm trying to do, and my lack of experience, I'm interested in knowing whether or not you believe it's feasible for me to configure my router with minimal knowledge of linux or openwrt.  The openwrt website does tend to show the basics of what it takes to setup a system.  However, I do tend to run into snags every once in a while.

The discussion might have continued from here.