OpenWrt Forum Archive

Topic: howto change ip addresses

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

Hi all, I,ve just installed openwrt on a Lynksys WRT54G. It is attached to a  D-Link DFE-96Ds router which also has a Linux file server attached which I wand to keep on a seperate network. The D-LInk router is attached to a Caymen 3300 DSL modem. Before I installed  OpenWRT the LYnksys was set to 192.168.10.1 and was working fine. After the installation I could not Telnet into it so I held down the reset button for 30 seconds. I can now telnet into it at 192.168.1.1 but I can't ping anything outside the unit. Which files do I have to edit to change the units IP adress back to 192.168.10.1 Has anyone written a howto for changing settings in OpenWRT? Any advice or help would be very much appreciated.

Read the documentation and take a look at

root@Daniel:~# nvram get lan_ipaddr
192.168.2.1

I think you have to change it.

I've read the Docs and deleted  udhcpd.conf from /etc. I then copied it from /rom/etc and used vi to edit the ip to 192.168.10.1. Then  I rebooted the wrt. However when I opened udhcpd.conf it had reverted to 192.168.1.1 What am I doing wrong? Maybe it's just that Ive lost two nights sleep fighting with it and I'm too tired  to spot something simple.

Try to change the lan ip-address.

Do:

nvram set lan_ipaddr=192.168.10.1
nvram commit
nvram_commit(): start
nvram_commit(): end
reboot

Now you can telnet to the routers ip-address 192.168.10.1.

Thanks Duff. That helped me to understand what I'm doing a bit better. I can now telnet into the WRT and set IP etc. I have a static IP and I have setup pinholes in the Caymen DSL mdem to allow traffic over various ports for smpp, http, smtp, jabber and other services that I run on my main server. The Caymen modem handles DHCP. However it is not giving a lease to the WRTG. Any ideas or pointers you can offer? Regards Sean

The discussion might have continued from here.