You are not logged in.

#1 2014-04-29 06:50:59

etakeh32
Member
From: Pridnestrovie
Registered: 2014-03-08
Posts: 66

[SOLVED] Slow performance with IP Forwarding / Masquerading.

Hello,

I've set up a laptop to act as router using shorewall and hostapd. Running speedtest from the router gives about 5mbit down, 0.5mbit up. Running speedtest from the client gives 0.5mbit down and 0.5mbit up. Traffic Shaping is disabled and connection between client and router is fine (3-4MB/s NFS transfer either way)

Router:
[tkh@tk135 ~]$ speedtest-cli 
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Time Warner Cable (xx.xx.xx.xx)...
Selecting best server based on ping...
Hosted by Hivelocity Hosting (Tampa, FL) [12.18 km]: 315.428 ms
Testing download speed........................................
Download: 6.10 Mbit/s
Testing upload speed..................................................
Upload: 0.57 Mbit/s
[tkh@tk135 ~]$ 
Client:
[tkh@tk6410 sysctl.d]$ speedtest-cli 
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Time Warner Cable (xx.xx.xx.xx)...
Selecting best server based on ping...
Hosted by Bright House Networks (Tampa, FL) [12.18 km]: 96.003 ms
Testing download speed........................................
Download: 0.45 Mbit/s
Testing upload speed..................................................
Upload: 0.58 Mbit/s
[tkh@tk6410 sysctl.d]$ 

Any suggestions?

Last edited by etakeh32 (2014-04-30 22:09:02)

Offline

#2 2014-04-30 07:14:12

etakeh32
Member
From: Pridnestrovie
Registered: 2014-03-08
Posts: 66

Re: [SOLVED] Slow performance with IP Forwarding / Masquerading.

Update:
I tried without shorewall using just iptables masquerading as described in Internet Sharing ArchWiki. Same result, so issue is NOT related to shorewall... I tossed the grsec kernel and tried stock arch. This gave some improvement, instead of getting only 10% of the speed the router gets, I now got ~30%. Still not satisfactory.  Will try to compile a custom kernel using some recommendations I found an report back. Any help would still be appreciated! Also confused why upload speed doesn't seem affected.... Both NICs are wireless and so I was able to run speedtest on different connections. The upload speed is always the same on both, router and client, download speed is always 10% (or now 30% with the stock kernel)...
e.g.:
Router Down - Router Up // Client Down - Client Up
10mbit - 2mbit  //  1mbit - 2mbit
5mbit - 0.5mbit // 0.5mbit - 0.5mbit
I find it very interesting that this only affects down speeds. I figured it might be due to double NAT, but I can't figure how to bridge a wifi connection with hostapd. Create_ap script gives an error... I would really appreciate any feedback on this.

Offline

#3 2014-04-30 16:05:06

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [SOLVED] Slow performance with IP Forwarding / Masquerading.

What channels are the two wifi interfaces using?

Also, if you want to try bridging the access point it is easy.
1) create bridge in normal manner, let's assume you named it br0
2) put the following line in hostapd.conf:

bridge=br0

Offline

#4 2014-04-30 21:14:37

etakeh32
Member
From: Pridnestrovie
Registered: 2014-03-08
Posts: 66

Re: [SOLVED] Slow performance with IP Forwarding / Masquerading.

Hi Branch!

Thank you for your response! External is on #1 and internal on #3. There are about 6 feet between the two adapters, ext0 is hanging out the window and picking up about 44% signal strength (75-80dbi) and internal has txpower set to 12. Should I try changing my internal channel further away from channel 1?

Offline

#5 2014-04-30 21:42:09

branch
Member
Registered: 2014-03-16
Posts: 209

Re: [SOLVED] Slow performance with IP Forwarding / Masquerading.

3 does overlap with 1 so it may help to move it higher. Perferably >=6.

Offline

#6 2014-04-30 22:08:24

etakeh32
Member
From: Pridnestrovie
Registered: 2014-03-08
Posts: 66

Re: [SOLVED] Slow performance with IP Forwarding / Masquerading.

Reason I chose Channel 3 was because I had used an app on android to survey and that one was the least crowded (apartment complex) standing right by the internal antenna (the network the external is using doesn't even show there). I switched it over to 11 and I'm now getting perfect performance. Thank you so much!

Offline

Board footer

Powered by FluxBB