OpenWrt Forum Archive

Topic: Set router to Static IP, turned of DHCP. Now I can't connect at all

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

Brand new WRT1900AC, v2, fresh install.  Everything seemed to be working correct with Luci

I changed to static IP of 192.168.1.200, and turned off DHCP (because my main router is providing it).  It lost connection while applying changes (as expected), but I was unable to reconnect, even after reboot.

I can see the WRT1900AC on my main router.

Connecting via wired just gives me a self-assigned IP (no network connection).
Connecting via LAN (192.168.1.200) doesn't work (not sure if expected or not)

Did I immediately brick my new router?

OpenWRT disables telnet after you change the root password, are you using SSH to connect to the device?
When your computer is connected to the LAN, what network parameters does it receive from the main router?

Oh yes, I changed the root password.

As far as I know, my computer receives no network parameters.  I downloaded a UDPIntercept tool linked somewhere on the OpenWRT wiki, and never got anything (windows).

I tried SSH and Telnet via putty, but it timed out.  However, I'm not sure what IP to use (I tried 192.168.1.1, .2, and .200).

Unfortunately, my mac only has wifi, so I don't have a lot of unix tools available

I tried holding down reset, and all sorts of failsafe mode, or reboot tricks, but nothing worked.  Now I'm trying to connect via TTL (I already have a USB to UART), but that's not working either (not getting anything in my terminal)

Is it possible to login from your main router with SSH?

bryan4real wrote:

Oh yes, I changed the root password.

Forget about TELNET and use SSH.

bryan4real wrote:

As far as I know, my computer receives no network parameters.

Isn't your main router acting as a DHCP server? How is it configured? How is your MAC configured?

I got it working via Telnet (twice, cause I ran into a similar problem again).  How do I change the IP of the router without locking myself out of luci/ssh (essentially bricking the router, since it seems this model doesn't have failsafe)?

I'm still stuck at this point, because anytime I change anything meaningful, I get locked out and have to start all over via reflashing.  I'm trying to start a whole new network based on this OpenWRT router, without taking down the existing network in the process.  At the least, is there a way to build in a safe backdoor via a new interface, so if I mess up, I can reconnect there and try to troubleshoot?

Even changing IP to just 192.168.1.2 make the web console and ssh completely inaccessible, even though it was providing me internet access when connected.

Main server is DHCP.  I have it reserve an IP for the OpenWRT router's MAC.  Nothing beyond that.

--------------------

For posterity for anyone else who comes across this thread with the same issue, here is what I did to get tty working via serial that's different from the wiki:

First, if you have a v2 unit, then disassembling is MUCH easier than other guides will have you believe.  You only need to remove the two legs on the front (blue side).  Then the blue part slides off very easily (not nearly as much force as guides will say).  Also, in v2, the serial port is located in a different location in the front, so you don't even need to touch the black part of the case.

For the pins, there were a few "gotchas" for me:

(I used a PL2303 USB to serial adapter).
First, DONT cross the RX/TX lines (this may be obvious, but I thought you connect the TX of one side to the RX of the other.  It's actually TX to TX, RX to RX).

Second, don't connect the Vcc line at all.  For some reason it stops the router from booting (maybe too much EM interference?)... anyway, even at 3.3V, you don't need it.  Just connect GND, TX, and RX.

Last, when preparing to load the firmware via TFTP, the command "setenv firmware_name firmware_image_name.img" seems to do nothing.  The device always just looks for "cobra.img".  I imagine the environment variable name changed, but for now, you can just rename your image to cobra.img

(Last edited by bryan4real on 13 Jul 2015, 20:36)

bryan4real wrote:

I can see the WRT1900AC on my main router.

How do you "see" the WRT1900AC?

bryan4real wrote:

I got it working via Telnet (twice, cause I ran into a similar problem again).  How do I change the IP of the router without locking myself out of luci/ssh?

Describe step by step what you are doing to change the IP, from the moment you telnet into the 1900AC, to the moment where you lose connection. Preferably copy&paste putty's output.
And please also show how you try to reconnect.

bryan4real wrote:

I tried SSH and Telnet via putty, but it timed out.

bryan4real wrote:

Even changing IP to just 192.168.1.2 make the web console and ssh completely inaccessible

How did you manage to connect via ssh if it timed out?

Generally to extend a network:
- change the LAN interface IP address to something that is on the same LAN as your main router but doesn't conflict with it (ex if main is 192.168.1.1/24 change the new one to 192.168.1.2/24)
- disable DHCP server
- use a cable connecting LAN on your main router to LAN on this new router

You doing anything different?

tmo26 wrote:

How do you "see" the WRT1900AC?

Sorry, that's a poor way to phrase it.  DCHP allocated it an IP (the server "saw" the connected MAC address)

bryan4real wrote:

I got it working via Telnet (twice, cause I ran into a similar problem again).  How do I change the IP of the router without locking myself out of luci/ssh?

tmo26 wrote:

Describe step by step what you are doing to change the IP, from the moment you telnet into the 1900AC, to the moment where you lose connection. Preferably copy&paste putty's output.

Sorry, I don't have the putty available, but I remember the steps I took:

After flash, visit 192.168.1.1 to make sure it's running.
Telnet to 192.168.1.1, set root password, log-out
SSH in, but only to check (don't change anything).
Use Luci for the next steps (which I did differently each time:)

First time:
go to interfaces, manually set IP (Is it the WAN IP or the LAN IP?  -- I'm sure my confusion here is a large part of why I'm having trouble)
turn off DHCP
automatically disconnect from luci since the IP changed.
try opening 192.168.1.1, 192.168.1.2, 192.168.1.200, both in browser, via ssh ("root@...") and telnet -- timeout on all of them
restart router
try again
try holding down reset button (no effect)
try the multiple power down, power up trick (no effect)
make this thread
take apart and use TTL to re-flash -- Success

Second time: (reserve IP on main server to give openwrt router 192.168.1.2)
go to interfaces, check that WAN has 192.168.1.2 (it does)
set LAN gateway and DNS to be 192.168.1.1
set LAN IP to 192.168.1.2
restart
have internet, but cannot connect to openwrt router at all (tried all methods same as first time... also reflashed in the end)

bryan4real wrote:

Even changing IP to just 192.168.1.2 make the web console and ssh completely inaccessible

tmo26 wrote:

How did you manage to connect via ssh if it timed out?

I didn't.  The only successful SSH connections were before any IP changes

DBAA wrote:

Generally to extend a network:
- change the LAN interface IP address to something that is on the same LAN as your main router but doesn't conflict with it (ex if main is 192.168.1.1/24 change the new one to 192.168.1.2/24)

what about the WAN interface?  don't touch it?  Should the LAN interface IP and WAN be different or the same?  Should I reserve one or both on the main router?

DBAA wrote:

- disable DHCP server

If I don't disable DHCP, will it still work, assuming no IP address conflicts (as in I'm the only one on the network, temporarily?, or set different IP ranges?)

DBAA wrote:

- use a cable connecting LAN on your main router to LAN on this new router

why connect to the openWRT LAN instead of WAN?

It sounds like you are trying to create a "Dumb AP".
https://forum.openwrt.org/viewtopic.php?id=58313
http://wiki.openwrt.org/doc/recipes/dumbap

Reading the above, I think you are almost there.  What I do not see is that to configure (access after turning off DHCP) the OpenWRT router you will probably (should) set a fixed IP on the client.  The IP your client is getting that is not in the 192.168.1.x range indicates a problem and I think this is it.  The MAC reservation on your main router could also be a problem.  I suggest loosing it.

If your goal is an AP I will suggest the following.

First, in general, if you can, change the subnet of the Primary Router to something other than 192.168.1.1(192.168.111.1). In general as new routers get this as a default, I find it will eliminates conflicts when you connect a NEW router to an existing LAN. It eliminates 2 DHCP servers trying to set the same address range.  Instructions below assume you did NOT do this.

The following assumes you are on CC 15.05 RC2, otherwise your prompts may be slightly different.

On your "Main Router" identify the DHCP range.  (lets assume it to be 192.168.1.100 - 150)
Lets reserve (mentally) an IP for the WRT1900AC, which is outside of the DHCP range (192.168.1.200).  Remove the MAC association to the WRT1900AC.

Reset your WRT1900AC to OpenWRT defaults (new install).
Disconnect your WRT1900AC from the "Main Router".
Connect a clinet to the WRT1900AC via Cat-5 using a LAN port (not WAN)
Set your client to 192.168.1.2 (address must not be used by your main router)
Open 192.168.1.1 in a browser.
Set password/login
Go To Network=> Interfaces => LAN => Edit
Lan Interface => Common Configuration => General setup
IPV4 Address: Change to 192.168.1.200
IPV4 gateway: Set 192.168.1.1 (Main Router IP)
Use Custom DHCP servers: 192.168.1.1 (Main Router IP)

Lan Interface => DHCP Server => General Setup
Ignore Interface: Check this box

Save & Apply

Close the browser after you see the turning image in the upper left.
Open the browser
Log into LuCi at 192.168.1.200 (pray if you will, but I have faith).  You should be able to navigate the router, but do not make any changes.

Connect a cable from one of the LAN connections on the WRT1900AC to the Main Router LAN. 

IGNORE anything you see that says WAN on both the physical device and OpenWRT GUI.  You are bypassing the WAN.  Leave all the Interfaces and rules (at least for now).  They are basically ignored.

After a minute or two try accessing your Main Router control panel 192.168.1.1.  Then try to access the Internet.  (If this does not work, reset your client to DHCP and try again, and/or reboot things)

Reset your client to DHCP.

You are done

Thanks!

I finally got it using a really round-about version of your post.

Basically, using defaults, I connected a wired LAN client.
Turned on wifi, connected a different wifi client.
Changed NATed subnet of the lan (but not for the wifi) to 192.168.2.1
played with settings until that could get the internet and get Luci.
Then played with wifi settings to do the same thing (but still on original subnet)
Changed wired back to original subnet.

Obviously, there was not really a need to do all that, but I was playing extra safe that I didn't permanently loose SSH or Luci connections (hence the "transition" subnet).  The bright side it: I learned a lot.

I am glad you got this working, though I am not really following your process.

I think from what was written is that your router was always working, but the IP assigned to the PC was in a different subnet and would not connect by any method even if the IP you were trying to contact was correct.

If you are on windows, then CMD and ipconfig would answer all these questions

The discussion might have continued from here.