[SOLVED] How to change router IP


I'm trying to change router IP. Instead of I'd like to set something else (usually

I tried to change it in the network file:

config interface 'lan'
	option force_link '1'
	option type 'bridge'
	option proto 'static'
	option ipaddr ''
	option netmask ''
	option ip6assign '60'
	option macaddr '76:a0:51:44:bb:aa'
	option ifname 'eth0.1'

but it does not work. After the reboot I can't anymore access by the lan to the router. Do you know what I forget ?
Thank you

The first and the last IP address in a subnet are reserved.
For your configuration

option ipaddr ''
option netmask ''

the reserved IP addresses are and
You cannot assign them to hosts or to the router. The allowed range of IP addresses for your configuration is from to
Also keep in mind the DHCP range, which must not overlap with statically assigned addresses.

1 Like

You can't have a IP address that ends with .0 or .255, that's not a limitation of OpenWrt/Linux.

1 Like

If you really want to you can but first you must change the netmask. ( notice the 254 )

option ipaddr ''
option netmask ''


Address:           11000000.10101000.0000000 1.00000000
Netmask: = 23    11111111.11111111.1111111 0.00000000
Wildcard:             00000000.00000000.0000000 1.11111111
Network:        11000000.10101000.0000000 0.00000000 (Class C)
Broadcast:         11000000.10101000.0000000 1.11111111
HostMin:           11000000.10101000.0000000 0.00000001
HostMax:         11000000.10101000.0000000 1.11111110
Hosts/Net: 510                   (Private Internet)

Might help to read up read up on subnetting


(I drafted this and never hit post, but @mbo2o covered most of it:)

Not entirely accurate...I've assigned...it does behave differently, though. Likely because of routers along the path needing upgrade...or the subnet divided in some router along the way (making the 0 or 255 invalid). Why do I say this?

Because I've passed traffic.

Of course, when you assign .0 or .255, the subnet used isn't a /24, and the IP's used still cannot be on a bit boundary of the subnet used (wish is the actual issue).

.0 is not a reserved address in IPv4. It may be that OpenWRT won't accept it, but it is a perfectly valid IPv4 address. If it is a "good choice" for an address is a different question, but it certainly is a valid IPv4 address (as is .255 that is not at the "end" of the net block).

See, for example

I did provide a link to be fair (which people seems to have overlooked) and I did assume that his intention wasn't to also change netmask.

Make sure all your routers and statically assigned devices are on the same subnet also if that is your intention

thank you for explanation.
Case solved for me

1 Like

Glad you found a solution. Please consider consider:

Editing the title - by using the pencil icon, and appending "[SOLVED]"

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.