OpenWrt Forum Archive

Topic: TP-Link TL-WR703N - how to configure it as a wirelesss client

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello

I have the WR703N already flashed (as a matter of fact this is the second WR703N I have working with OpenWrt), but I want to use it for adding wireless functionality to other device that only has RJ45 ethernet. So I want to configure the WR703N as a wireless client that could provide ethernet on the LAN port to other device that has no wireless interface. If possible I want to use dynamic IP addressing for both the WR703N and for the other device, using an existing DHCP server on the network (I have it already working on other OpenWrt router). Can you give me any tip to help in the WR703N network configuration?

Thanks

Fernando

Thanks! I will try it!

I have used in the past the SMCWEB-N AP/Ethernet Client configured as a wireless client, I had only to configure it with an IP address of my LAN and the SSID of the wireless network to connect to, and it worked exactly the way I want, extending the network to the devices connected to its RJ45 ethernet ports. Is it possible to configure the WR703N with OpenWrt the same way? Or is the SMCWEB-N using the Broadcom specific "Bridged client" mode? The receipe you proposed have a similar result, except having to configure a Client Subnet that in the end is not used. As I want to make it as simple as possible to others to configure, this 'unused' subnet configuration is not easy to explain. I can try to select a unlikely default configuration for this subnet to not colide with the main AP subnet, but there is always the risk of someone to configure the same network address on the main network, making this setup fail... Except for this situation the receipe you proposed fits my needs :-)

Fernando

if you configure a really strange "unused" lan ip like 192.168.234.1/24 i think you could be safe..

Hi, i had this problem a few days ago and wanted a WIFI Bridge which is client on WIfi Side and forwards Ethernet to clients without Wifi.

i used
http://trac.gateworks.com/wiki/relayd
http://wiki.openwrt.org/doc/recipes/relayclient

HOWTO - recipe for dummies like me
http://cavebeat.blogspot.co.at/2012/08/ … ridge.html


needed packages
relayd
luci-proto-relay




in my case i want to connect to an WPA2-PSK network,
with NET 10.0.0.0 and /24
my router to the internet is in this example gateway & dns => 10.0.0.138

the WR703n net from LAN interface (10.0.1.1 /24 ) is different from the Wifi ( 10.0.0.205 /24 ) net, this is important!

i disabled the dhcp client function from the wifi interface, and set a static adress 10.0.0.205 to easier access the WR703n from wifi side

if i disabled the Wifi by accident, i have to set on my PC a static adress with the ip 10.0.1.2 /24 to start luci or ssh on 10.0.1.1 /24

don't forget the "/etc/init.d/relayd enable"
and Network tab - Firewall tab - Zones, change the forwarding for lan and wwan to "accept"

my important config files:

root@WR703n:/etc/config# cat wireless 
config wifi-device 'radio0'
    option type 'mac80211'
    option macaddr '14:e6:e4:e3:a5:4a'
    option hwmode '11ng'
    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 channel '6'
    option country 'AT'
    option txpower '20'
    option disabled '0'

config wifi-iface
    option ssid 'YOUR_SSID'
    option encryption 'psk2'
    option device 'radio0'
    option mode 'sta'
    option network 'wwan'
    option key 'YOUR_PW'

If you have deleted your wireless file or config, you can get it with "wifi detect"
http://wiki.openwrt.org/doc/uci/wireles … figuration

root@WR703n:/etc/config# cat network 
config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    option ifname 'eth0'
    option type 'bridge'
    option proto 'static'
    option netmask '255.255.255.0'
    option gateway '10.0.0.138'
    option dns '10.0.0.138'
    option ipaddr '10.0.1.1'

config interface 'wwan'
    option _orig_ifname 'wlan0'
    option _orig_bridge 'false'
    option proto 'static'
    option ipaddr '10.0.0.205'
    option netmask '255.255.255.0'
    option gateway '10.0.0.138'
    option broadcast '10.0.0.255'
    option dns '10.0.0.138'

config interface 'stabridge'
    option proto 'relay'
    option ipaddr '10.0.0.206'
    list network 'lan'
    list network 'wwan'
root@WR703n:/etc/config# cat dhcp

config dnsmasq
    option domainneeded '1'
    option boguspriv '1'
    option filterwin2k '0'
    option localise_queries '1'
    option rebind_protection '1'
    option rebind_localhost '1'
    option local '/lan/'
    option domain 'lan'
    option expandhosts '1'
    option nonegcache '0'
    option authoritative '1'
    option readethers '1'
    option leasefile '/tmp/dhcp.leases'
    option resolvfile '/tmp/resolv.conf.auto'

config dhcp 'lan'
    option interface 'lan'
    option ignore '1'

config dhcp 'wan'
    option interface 'wan'
    option ignore '1'

(Last edited by cave on 10 Sep 2012, 12:35)

Hi,

I did same setup on my wr1043nd. I have really unknown problem:


I attached ethernet cable into wr1043 and was trying to ping uplink router - first 15packets passed smoothly - response ~10ms and after that I got response around 3000ms and wr1043 looks like stucked - ssh connection was dead. When I disconnected ethernet cable everything worked again... any idea? Thanks


I have  OpenWrt Attitude Adjustment 12.09-rc1

(Last edited by lenovomi on 8 Jan 2013, 01:55)

hi,

which ip ranges do you use?

IP/subnet from Uplink Router?
IP/subnet from WR1043ND WiFi Interface?
IP/subnet from WR1043ND LAN Interface?
IP/subnet from WR1043ND Bridge Interface?
IP/subnet from laptop with only ethernet connected to uplink router?
IP/subnet from laptop with only ethernet connected to WR1043ND router?
IP/subnet from laptop with only wifi connected?

are you sending the ping from laptop? or from WR1043ND? or with laptop through WR1043ND to the uplink router?

have you done "install relayd" and "/etc/init.d/relayd enable" properly?

Can you connect to your WR1043ND from the Wifi-side with your laptop?
Has the WR1043ND connected properly to the wifi?
Installed luci or have you done it with CLI only?
Have you disabled the DHCP things on the WR1043ND interfaces?

Hi,

I use the same as your example:


IP/subnet from Uplink Router?
wifi interface of the router has ip 10.0.0.138/24

IP/subnet from WR1043ND WiFi Interface?
wifi - 10.0.0.50/24

IP/subnet from WR1043ND LAN Interface?
LAN - 10.0.1.1/24

IP/subnet from WR1043ND Bridge Interface?
10.0.0.56/24

IP/subnet from laptop with only ethernet connected to uplink router?
no device

IP/subnet from laptop with only ethernet connected to WR1043ND router?
Laptop is connected by ethernet to WR1043ND - 10.0.0.80/24 (assigned by DHCP from uplink router)

IP/subnet from laptop with only wifi connected?
10.0.0.83/24


are you sending the ping from laptop? or from WR1043ND? or with laptop through WR1043ND to the uplink router?

I tried to send ping from laptop connected by ethernet (behind wr1043nd) - got 2000ms

When I tried ping from wr1043ND to uplink router:

1) when I had laptopt attached on wr1043nd by ethernet - response 2000ms / big packet lost
2) when I disconnected laptop from wr1043nd - everything works fine


have you done "install relayd" and "/etc/init.d/relayd enable" properly?
Yes, thru luci interface - i think there isnt improper way...  "/etc/init.d/relayd enable" is enabled, I can list active process of relayd by "ps a"


Can you connect to your WR1043ND from the Wifi-side with your laptop?
Yes, without any problem while there isnt any ethernet client connected to wr1043...


Has the WR1043ND connected properly to the wifi?
Yes

When I simply connect it to wifi, no eth clients everything works fine.

Installed luci or have you done it with CLI only?
everything by Luci

Have you disabled the DHCP things on the WR1043ND interfaces?

Yes




Thanks

But the strange thing is when I bootup wr1043nd it works fine for few sec - about 30packets generated by ping have response time ~20ms which is fine, but after a while(30sec) it goes up to 3000ms.

(Last edited by lenovomi on 8 Jan 2013, 14:44)

Strange behaviour, please make some more tests...

have you tried different Ports on the Router to connect with ethernet cable.

Are you using the WAN or the Lan interface on the Router to connect with.

please try to connect with
Laptop with static IP 10.0.1.2/24 over ethernet, then start login with putty/ssh to 10.0.1.1/24 and start a ping to your 10.0.0.138/24 uplink router.
use the user root and the password you have set when you connected with telnet after flashing.

make this test with different ethernet ports  (LAN/WAN interface)


If your laptop is connected (Wifi/Lan)  to your uplink Router, try to connect (ssh/putty) to 10.0.0.50/24 and start ping to 10.0.0.138


Have you done a reflashing?

cave wrote:

Strange behaviour, please make some more tests...

have you tried different Ports on the Router to connect with ethernet cable.

Yes, I tried all four of them. For example when I attached laptop to lan port one, first ~30 packets has 30ms response then it went to 2000ms. After that I (on the fly) changed port and it went again around ~30packets 30ms but in few seconds time rised  to 2000ms.

64 bytes from 10.0.0.138: icmp_req=130 ttl=63 time=4.24 ms
64 bytes from 10.0.0.138: icmp_req=131 ttl=63 time=4.69 ms
64 bytes from 10.0.0.138: icmp_req=132 ttl=63 time=3.17 ms
64 bytes from 10.0.0.138: icmp_req=133 ttl=63 time=4.13 ms
64 bytes from 10.0.0.138: icmp_req=134 ttl=63 time=4.06 ms
64 bytes from 10.0.0.138: icmp_req=135 ttl=63 time=538 ms
64 bytes from 10.0.0.138: icmp_req=136 ttl=63 time=737 ms
64 bytes from 10.0.0.138: icmp_req=137 ttl=63 time=1913 ms
64 bytes from 10.0.0.138: icmp_req=138 ttl=63 time=10977 ms
64 bytes from 10.0.0.138: icmp_req=147 ttl=63 time=1914 ms

cave wrote:

Are you using the WAN or the Lan interface on the Router to connect with.

only LAN interface

cave wrote:

please try to connect with
Laptop with static IP 10.0.1.2/24 over ethernet, then start login with putty/ssh to 10.0.1.1/24 and start a ping to your 10.0.0.138/24 uplink router.
use the user root and the password you have set when you connected with telnet after flashing.

make this test with different ethernet ports  (LAN/WAN interface)

This test passed sucesfully, I tried two lan ports and got ping responses from wr1043nd to 10.0.0.138  in arround ~10ms (for long period of time)

Now Im so confused.

cave wrote:

If your laptop is connected (Wifi/Lan)  to your uplink Router, try to connect (ssh/putty) to 10.0.0.50/24 and start ping to 10.0.0.138

Without any device connected to LAN port on tpwr1043nd it works perfect.. ping had ~10ms response.


cave wrote:

Have you done a reflashing?

Not sure what you meant... I flashed original tplink firmware with gargoyle, then Backfire 10.03.1, then openwrt from trunk, then back to tplink firmware and now its 12.09-rc1.


Should I start some debugging?

Thanks!

http://wiki.openwrt.org/toh/tp-link/tl- … figuration

WAN is 0, the blue one... ?!

lenovomi wrote:
cave wrote:

    Are you using the WAN or the Lan interface on the Router to connect with.

only LAN interface

my tpwr703n has only one ethernet port, and only one ethernet interface.

have you tried it with WAN as the bridging interface?

lenovomi wrote:

IP/subnet from WR1043ND WiFi Interface?
wifi - 10.0.0.50/24

is this ip static?

lenovomi wrote:
cave wrote:

please try to connect with
Laptop with static IP 10.0.1.2/24 over ethernet, then start login with putty/ssh to 10.0.1.1/24 and start a ping to your 10.0.0.138/24 uplink router.
use the user root and the password you have set when you connected with telnet after flashing.

make this test with different ethernet ports  (LAN/WAN interface)

This test passed sucesfully, I tried two lan ports and got ping responses from wr1043nd to 10.0.0.138  in arround ~10ms (for long period of time)

Now Im so confused.

nice to know, some problems with your DHCP-server maybe... or the 10.0.0.0/24 net

is there somewhere a loop or wrong firewall rules (bridging forwarding) or an ip twice in the net ?


new test:
disable DHCP-Client on your client(laptop/pc) and set it to static 10.0.0.100/24  (take an unused IP!)
gateway = 10.0.0.138, dns = 10.0.0.138
and ping 10.0.0.138 from your laptop.

then
try to connect from pc/10.0.0.100/24 with ssh to 10.0.1.1/24. This should not be possible!
try to connect from pc/10.0.0.100/24 with ssh to WR1043nd/10.0.0.50/24. This should not be possible! because of relayd and this missing function without WDS.



At this point i am only guessing.

Have you asked in #openwrt on freenode/IRC ? maybe they can help you.
use angry scanner to check the IP's in your network.
maybe some debugging with wireshark to see what is going on... but this could take a while to analyze the pakets...
to see why the connection speed is going down.

Which uplink router do you use? Maybe you can use the WDS-bridge instead of pseudobridge-with-relayd

cave wrote:

http://wiki.openwrt.org/toh/tp-link/tl- … figuration

WAN is 0, the blue one... ?!

Yes, Wan is 0 and blue one but it dont use it. I need 3 LAN ports to use.

cave wrote:
lenovomi wrote:
cave wrote:

    Are you using the WAN or the Lan interface on the Router to connect with.

only LAN interface

my tpwr703n has only one ethernet port, and only one ethernet interface.

have you tried it with WAN as the bridging interface?

Im using LAN interface on the router. Havent tried WAN because i need 2-3 lan ports.

cave wrote:
lenovomi wrote:

IP/subnet from WR1043ND WiFi Interface?
wifi - 10.0.0.50/24

is this ip static?

Yes it static IP.

cave wrote:
lenovomi wrote:
cave wrote:

please try to connect with
Laptop with static IP 10.0.1.2/24 over ethernet, then start login with putty/ssh to 10.0.1.1/24 and start a ping to your 10.0.0.138/24 uplink router.
use the user root and the password you have set when you connected with telnet after flashing.

make this test with different ethernet ports  (LAN/WAN interface)

This test passed sucesfully, I tried two lan ports and got ping responses from wr1043nd to 10.0.0.138  in arround ~10ms (for long period of time)

Now Im so confused.

nice to know, some problems with your DHCP-server maybe... or the 10.0.0.0/24 net

is there somewhere a loop or wrong firewall rules (bridging forwarding) or an ip twice in the net ?

new test:
disable DHCP-Client on your client(laptop/pc) and set it to static 10.0.0.100/24  (take an unused IP!)
gateway = 10.0.0.138, dns = 10.0.0.138
and ping 10.0.0.138 from your laptop.

I did, its the same behaviour .. first packets ~20ms, then 2000ms ... and big lost. Yes, it was unique IP - noone used it at the time.

cave wrote:

then
try to connect from pc/10.0.0.100/24 with ssh to 10.0.1.1/24. This should not be possible!

Yes, it wasnt possible.

cave wrote:

try to connect from pc/10.0.0.100/24 with ssh to WR1043nd/10.0.0.50/24. This should not be possible! because of relayd and this missing function without WDS.

It wasnt possible to ssh to wr1043/.50

cave wrote:

At this point i am only guessing.

Have you asked in #openwrt on freenode/IRC ? maybe they can help you.
use angry scanner to check the IP's in your network.
maybe some debugging with wireshark to see what is going on... but this could take a while to analyze the pakets...
to see why the connection speed is going down.

Which uplink router do you use? Maybe you can use the WDS-bridge instead of pseudobridge-with-relayd

Im using HUAWEI - HG622u not sure about WDS bridge.


Well Im using the default Firewall rules... should i completly disable FW in openwrt?

The problem was with the huawei AP ... there was broadcast storm, after reboot of huawei its better... but there is still around 6% packet loss...

Hi, for the firewall, how would that config file look?

(Just curious)

The discussion might have continued from here.