Skip to content

Instantly share code, notes, and snippets.

@braian87b
Last active August 7, 2017 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braian87b/2333a32577a221c8d62b5ce8b54a4d95 to your computer and use it in GitHub Desktop.
Save braian87b/2333a32577a221c8d62b5ce8b54a4d95 to your computer and use it in GitHub Desktop.
How to setup Routed Client for OpenWRT / LEDE
Refer to image: https://forum.lede-project.org/t/help-to-create-2-wifi-networks-in-the-same-router/3320/6
Instrucciones en español: https://gist.github.com/braian87b/2333a32577a221c8d62b5ce8b54a4d95
# Delete existing wireless interfaces:
uci del wireless.@wifi-iface[-1]
uci del wireless.@wifi-iface[-1]
uci del wireless.@wifi-iface[-1]
# Important, to avoid conflicts with phisical WAN port (you will not be using it, if you want to use it too you had to use MWAN3)
uci del network.wan.ifname
# First WiFi Client/Station it connects to the Router/AP on the right in the drawing
uci add wireless wifi-iface
uci set wireless.@wifi-iface[0].network='wan'
uci set wireless.@wifi-iface[0].device='radio0'
uci set wireless.@wifi-iface[0].mode='sta'
#use 'psk' if WPA, or 'psk2' if WPA2
uci set wireless.@wifi-iface[0].encryption='psk2'
uci set wireless.@wifi-iface[0].ssid='EXACT NAME of the Existing NETWORK'
uci set wireless.@wifi-iface[0].key='Exact Password of the network'
# Just enable WDS if the other router is same brand and it has it enabled
uci set wireless.@wifi-iface[0].wds='1'
# Second WiFi for you
uci add wireless wifi-iface
uci set wireless.@wifi-iface[-1].network='lan'
uci set wireless.@wifi-iface[-1].device='radio0'
uci set wireless.@wifi-iface[-1].mode='ap'
uci set wireless.@wifi-iface[-1].encryption='psk-mixed+tkip+aes'
uci set wireless.@wifi-iface[-1].ssid='Name of YOUR Network'
uci set wireless.@wifi-iface[-1].key='your Password'
# Another WiFi (optional)
uci add wireless wifi-iface
uci set wireless.@wifi-iface[-1].network='lan'
uci set wireless.@wifi-iface[-1].device='radio0'
uci set wireless.@wifi-iface[-1].mode='ap'
uci set wireless.@wifi-iface[-1].encryption='psk2+aes'
uci set wireless.@wifi-iface[-1].ssid='another more secure WPA2 AES network'
uci set wireless.@wifi-iface[-1].key='other Password'
# Your network is on the left as on the drawing, will be 192.168.2.0/24 (as stated in red color)
uci set network.lan.ipaddr='192.168.2.1'
# Name the Router, to find it on the network (optional)
uci set system.@system[0].hostname='YourRouter'
uci set network.lan.hostname="`uci get system.@system[0].hostname`"
# We enable WiFi radio, increase channel width from HT20 to HT40 (just in case it is compatible) and put channel in automatic (in case it changes in the future)
uci set wireless.radio0.htmode='HT40'
uci set wireless.radio0.channel='auto'
uci set wireless.radio0.disabled='0'
# commit changes, save it and reboot
uci commit
sync
reboot
# In case of something does not work properly press reset button during 30 seconds to reset configuration and start over.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment