Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:network:openwrt_as_clientdevice [2021/08/15 17:59] – unify headers vgaeteradocs:guide-user:network:openwrt_as_clientdevice [2021/10/17 17:38] – [Command-line instructions] vgaetera
Line 1: Line 1:
 ====== OpenWrt as client device ====== ====== OpenWrt as client device ======
 See also: See also:
-[[docs:guide-user:network:switch_router_gateway_and_nat|Router vs switch vs gateway and NAT]], 
 [[docs:guide-user:network:openwrt_as_routerdevice|OpenWrt as router device]], [[docs:guide-user:network:openwrt_as_routerdevice|OpenWrt as router device]],
 +[[docs:guide-user:network:switch_router_gateway_and_nat|Router vs switch vs gateway and NAT]],
 [[docs:guide-user:security:recovering_from_clientmode|Regaining access to an OpenWrt device in client mode]] [[docs:guide-user:security:recovering_from_clientmode|Regaining access to an OpenWrt device in client mode]]
  
Line 23: Line 23:
  
 ===== Command-line instructions ===== ===== Command-line instructions =====
-To make the same we just did with Luci webinterface above, see above for more detailed explanation of the steps: +Configure the LAN interface statically with the new IP address ''192.168.1.2'', netmask ''255.255.255.0'', gateway ''192.168.1.1'', and DNS ''192.168.1.1''
-  - Type ''uci set network.lan.ipaddr=new-ip-address'' and press Return+ 
-  - Type ''uci set network.lan.gateway=your-gateway-address'' and press Return+<code bash> 
-  - Type ''uci set network.lan.dns=dns-address-here'' and press Return+uci set network.lan.proto="static" 
-  - Type ''uci commit && service network restart'' to save the changes and restart network interfaces+uci set network.lan.ipaddr="192.168.1.2" 
-  - The ssh session will not work anymore because the device has changed address, this is normal+uci set network.lan.netmask="255.255.255.0" 
-  Now you can connect the network cable from the device's LAN port to your existing network, the other router's LAN ports usually+uci set network.lan.gateway="192.168.1.1" 
-  - Connect again to the device at its new address as defined above.+uci set network.lan.dns="192.168.1.1" 
 +uci commit network 
 +/etc/init.d/network restart 
 +</code> 
 + 
 +Note that changing the IP address causes the SSH session to hang/disconnect
 +Now you can connect the network cable from the device's LAN port to your existing network, the other router's LAN ports usually.
  
  • Last modified: 2023/10/14 05:58
  • by vgaetera