This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| docs:guide-user:network:openwrt_as_routerdevice [2021/10/16 22:28] – reorganize content vgaetera | docs:guide-user:network:openwrt_as_routerdevice [2021/10/17 17:36] – [Command-line instructions] vgaetera |
|---|
| |
| ===== Command-line instructions ===== | ===== Command-line instructions ===== |
| - Type ''uci set network.lan.ipaddr=new-ip-address'' ("new-ip-address" is the new IP address you want for the OpenWrt device in your network) and press Return, | Configure the LAN interface statically with a new IP address ''192.168.2.1''. |
| - If needed, type ''uci set network.wan.proto=static'' to switch to static protocol on WAN interface, then change wan settings by using the [[docs:guide-user:network:openwrt_as_clientdevice#command_line_instructions|same procedure detailed for Client device]], settings for wan interface are ''network.wan.ipaddr'', ''network.wan.gateway'', ''network.wan.dns'', and so on, so change the commands accordingly. | |
| - You might want to [[docs:guide-user:start#basic_configuration|basic OpenWrt documentation]] too, as these setups are usually very specific to your own network setup and it makes no sense to try to cover all possible cases here. | <code bash> |
| - Type ''uci commit && service network restart'' and press Return. | uci set network.lan.ipaddr="192.168.2.1" |
| - Then connect again to your device at its new IP address and continue. | uci commit network |
| | /etc/init.d/network restart |
| | </code> |
| | |
| | Note that changing the IP address causes the SSH session to hang/disconnect. |
| | Follow [[docs:guide-user:network:openwrt_as_clientdevice|OpenWrt as client device]] to configure the WAN interface if necessary. |
| |