PPTP VPN Client download rate extremely slow

icu___

Junior Member
Jun 29, 2014
7
0
0
So I've got trouble with a very simple setup: On the one end there is a dd-wrt router, set up as a pptp vpn server and a few windows machines (XP and Win7) in the local area network of the router. On the other end, a dual boot Windows 8/Ubuntu 14.04 workstation that connects to the vpn server and downloads data from the windows machines through the virtual private network.

Under Windows 8 the download rate averages about 800 KB/s with some peaks at about 1 MB/s. Under ubuntu 14.04 the maximum download rate barely reaches 160 KB/s (i.e. 20%).

What makes it even more curious is that a bandwith test (for example speedtest.net) shows no difference in upload/download speed under ubuntu or windows. I both OS environments I get about 7,5 Mbps for download.

There are no firewalls on the server. I have the same problem both when downloading data from WinXP and Win7 machines.

What am I doind wrong?

Here's the output of iwconfig with the vpn connected:

Code:
icefire@Gigabyte-Mint ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 50:e5:49:42:68:62  
          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::52e5:49ff:fe42:6862/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:276293 errors:0 dropped:0 overruns:0 frame:0
          TX packets:220413 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:332823397 (332.8 MB)  TX bytes:24086787 (24.0 MB)


lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:5244 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5244 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:595011 (595.0 KB)  TX bytes:595011 (595.0 KB)


ppp0      Link encap:Point-to-Point Protocol  
          inet addr:192.168.1.200  P-t-P:192.168.1.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:90 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:19143 (19.1 KB)  TX bytes:13086 (13.0 KB)

And the contents of /etc/NetworkManager/system-connections/VPN Connection1:
Code:
[connection]
id=VPN connection 1
uuid=ab182c72-545d-49c4-bda7-ad22d87d71fe
type=vpn
permissions=user:icefire:;
autoconnect=false
timestamp=1403970639


[vpn]
service-type=org.freedesktop.NetworkManager.pptp
lcp-echo-interval=30
password-flags=1
require-mppe=yes
no-vj-comp=yes
mppe-stateful=yes
user=admin
refuse-eap=yes
refuse-chap=yes
nobsdcomp=yes
lcp-echo-failure=5
gateway=<ip address of the server not really relevant for the post>
nodeflate=yes
refuse-pap=yes


[ipv4]
method=auto
dns=192.168.2.1;
ignore-auto-dns=true

Just for comparison, here are the settings on the windows client:
Capture.png


and the relevant output of ipconfig on the windows client:
Code:
PPP adapter icefire vpn:

  Connection-specific DNS Suffix  . :
  Description . . . . . . . . . . . : icefire vpn
  Physical Address. . . . . . . . . :
  DHCP Enabled. . . . . . . . . . . : No
  Autoconfiguration Enabled . . . . : Yes
  IPv4 Address. . . . . . . . . . . : 192.168.1.201(Preferred)
  Subnet Mask . . . . . . . . . . . : 255.255.255.255
  Default Gateway . . . . . . . . . : 0.0.0.0
  DNS Servers . . . . . . . . . . . : 192.168.2.1
  NetBIOS over Tcpip. . . . . . . . : Enabled

Could anyone give me a hint? Please note that I'm relatively new to ubuntu. Thanks.
 

JoeMcJoe

Senior member
May 10, 2011
327
0
0
What is the router that is running DD-WRT?
What is the CPU usage on the router while running the speed test?
 

icu___

Junior Member
Jun 29, 2014
7
0
0
D-Link DIR-615
I have not monitored the CPU usage of the router while running the speedtest.
CPU usage of the router was about 30% while running the speedtest.

Could this info be of any help? I cannot imagine that the stress on the router cpu depends on the client OS.

btw, upload from client to server shows no speed differences between windows and linux. The problem is just with the download speed.
 

JoeMcJoe

Senior member
May 10, 2011
327
0
0
To be clear, is the VPN server running on the DD-WRT router or on the PC?

The VPN server will take up quite a bit of CPU on a low powered router, run the speed test for a minute continually or download a large file, see what the cpu use is for a long period of time.
 

icu___

Junior Member
Jun 29, 2014
7
0
0
Yes, the VPN server is running on the dd-wrt router. Since the speed test didn't seem to stress the router a lot, I tried downloading a single 150MB file first in Linux and then in Windows.

Here is a screenshot of the speed and the cpu load:

1. in linux:
h_1404242589_4645585_09de173300.png


2. in windows:
h_1404242528_1080924_13ce05d6cd.png
 
Last edited:

JoeMcJoe

Senior member
May 10, 2011
327
0
0
The CPU usage is very high, 0.98 will start to cause waits.

The VPN server is using all the CPU up, is my guess.

If you ssh/telnet in to the router, you can see the 'top' processes and how much cpu they're using.

I use a http://en.wikipedia.org/wiki/Netgear_WNR3500L with a similar speed cpu, if I connect to the PPTP VPN server I can max out the router's cpu very easily.

I switched to OpenVPN on the same router, made a huge difference. I use Shibby Tomato.
 
Last edited:

icu___

Junior Member
Jun 29, 2014
7
0
0
Well I could change the firmware/use openvpn.

However, I still don't get it - in windows, the vpn reaches maximum speed and stresses the router cpu pretty heavily - so what? In windows I can download gigabytes of data and the connection speed remains about 700 KB/s (average).

In Linux, I only get 20% of that speed and the cpu is by far not as stressed. So the problem must lie somewhere in the linux configurarion.. or not?
 

JoeMcJoe

Senior member
May 10, 2011
327
0
0
What about internal to your network with Linux?

Run an 'iperf' test if you can.
 

icu___

Junior Member
Jun 29, 2014
7
0
0
The internal network (LAN) with linux seems to be alright. I haven't noticed any major speed differences in linux. However, an iperf test is not a bad idea, so here are the results. The iperf server was a dual boot linux/windows 7 laptop in the same lan as the vpn client. I tried the following configurations:

1. server windows, client linux:
Code:
icefire@Gigabyte-Mint ~ $ iperf -c 192.168.1.103 -t 60
------------------------------------------------------------
Client connecting to 192.168.1.103, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.105 port 60302 connected with 192.168.1.103 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-60.0 sec   232 MBytes  32.5 Mbits/sec

2. server linux, client linux:
Code:
icefire@Gigabyte-Mint ~ $ iperf -c 192.168.1.103 -t 60
------------------------------------------------------------
Client connecting to 192.168.1.103, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.105 port 60319 connected with 192.168.1.103 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-60.0 sec   239 MBytes  33.3 Mbits/sec

3. server linux, client windows:
Code:
F:\old windows\Downloads>iperf -c 192.168.1.103 -t 60
------------------------------------------------------------
Client connecting to 192.168.1.103, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[200] local 192.168.1.105 port 49430 connected with 192.168.1.103 port 5001
[ ID] Interval       Transfer     Bandwidth
[200]  0.0-60.0 sec   224 MBytes  31.4 Mbits/sec

4. server windows, client windows:
Code:
F:\old windows\Downloads>iperf -c 192.168.1.103 -t 60
------------------------------------------------------------
Client connecting to 192.168.1.103, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[184] local 192.168.1.105 port 49803 connected with 192.168.1.103 port 5001
[ ID] Interval       Transfer     Bandwidth
[184]  0.0-60.0 sec   229 MBytes  32.0 Mbits/sec

All in all, the speed doesn't seem to vary significantly. I guess the key to my vpn problems is somewhere in the linux client configuration....
 

JoeMcJoe

Senior member
May 10, 2011
327
0
0
Yep, must be somewhere in there.

Those iperf speeds look very slow, are those over wifi?
 

icu___

Junior Member
Jun 29, 2014
7
0
0
Client was wired, server was a 5-year-old laptop over wifi.

However, I still don't get it - pptp vpn is quite easy to configure. I can't imagine what could be wrong with the client configuration...
 

JoeMcJoe

Senior member
May 10, 2011
327
0
0
Those iperf speeds are ok for a 802.11g connection then.

Have you tried using L2TP/IPSec instrad of PPTP? I use that on a VPN connection I use on Android.
 

icu___

Junior Member
Jun 29, 2014
7
0
0
well there is just pptp vpn built-in in the dd-wrt firmware which is supported by the router. Of course I can try to set up openvpn or l2tp/ipsec on a computer, just to test if it brings any change. However, it would be just perfect if we could find out the cause of the issues with pptp and ubuntu...

FYI: I tried setting up the client in fedora using a live usb - same thing (max 160 KB/s). So there is something in linux that doesn't seem to work very well with my setup...