Skip to content

Instantly share code, notes, and snippets.

@unixdj
Last active January 31, 2018 11:05
Show Gist options
  • Save unixdj/5969578 to your computer and use it in GitHub Desktop.
Save unixdj/5969578 to your computer and use it in GitHub Desktop.
OpenWRT: STA+AP on TP-Link TL-WR703N. Network configuration for OpenWRT that enables two VAPs, one as a client (STA) for uplink (wan interface) and another as an access point bridged with eth0 (lan bridge). NAT is already provided. TL-WR703N has Atheros AR9331 wireless with one antenna and no network switch.
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdxx:xxxx:xxxx::/48'
config interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option proto 'dhcp'
config wifi-device radio0
option type mac80211
option channel 11
option hwmode 11ng
option path 'platform/ar933x_wmac'
option htmode HT20
list ht_capab SHORT-GI-20
list ht_capab SHORT-GI-40
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
#option disabled 1
config wifi-iface
option device radio0
option network lan
option mode ap
option ssid PocketNet
option key 'password'
option encryption psk2
config wifi-iface
option device radio0
option network wan
option mode sta
option ssid Upstream
option key 'password'
option encryption psk2
@CRImier
Copy link

CRImier commented Feb 28, 2016

Hello! It's awesome that I've found this, for some reason I can't do this using similar configuration - will try this one. Could you post your resulting interface names? My board assigns them as wlan0 and wlan0.1, which is kinda confusing.
Also, the configuration doesn't work for some weird reason. Bummer. Will need to research my board more, or maybe flash another version of OpenWRT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment