Hello!
I have issue with measurement of OpenVPN performance. The tunnel is set in test environment, so it is all in my local network. OpenVPN server and client are set in TCP mode. I try to measure speed from VPN client to Server through the tunnel. The speed without the tunnel between 2 PCs is ok (about 95Mbps, and my network expected performance is 100Mbps so I get correct reaults), but when I try to measure speed though the tunnel I get impossibly high results. For example, testing TCP bandwidth shows this:
bin/iperf.exe -c 10.8.0.1 -P 1 -i 1 -p 5001 -f m -t 10
------------------------------------------------------------
Client connecting to 10.8.0.1, TCP port 5001
TCP window size: 0.06 MByte (default)
------------------------------------------------------------
[188] local 10.8.0.6 port 1281 connected with 10.8.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[188] 0.0- 1.0 sec 23.7 MBytes 199 Mbits/sec
[188] 1.0- 2.0 sec 39.8 MBytes 334 Mbits/sec
[188] 2.0- 3.0 sec 39.6 MBytes 333 Mbits/sec
[188] 3.0- 4.0 sec 37.9 MBytes 318 Mbits/sec
[188] 4.0- 5.0 sec 40.8 MBytes 342 Mbits/sec
[188] 5.0- 6.0 sec 35.3 MBytes 296 Mbits/sec
[188] 6.0- 7.0 sec 37.1 MBytes 311 Mbits/sec
[188] 7.0- 8.0 sec 39.2 MBytes 329 Mbits/sec
[188] 8.0- 9.0 sec 39.1 MBytes 328 Mbits/sec
[188] 9.0-10.0 sec 39.1 MBytes 328 Mbits/sec
[188] 0.0-10.0 sec 372 MBytes 311 Mbits/sec
300 Mbps is definitely not what I expect to get and I don't know the reason. The testing software is okay (I use jperf) because I tried other options and it shows the same weird results.
So, how do I fix this strange thing with performance measurements? Is something wrong with my config?
The Server config:
;local a.b.c.d
port 1194
# TCP or UDP server?
proto tcp
#proto udp
;dev tap
dev tun
;dev-node MyTap
ca "C:\\Program Files (x86)\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\config\\server.crt"
key "C:\\Program Files (x86)\\OpenVPN\\config\\server.key" # This file should be kept secret
dh dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
;push "route 192.168.10.0 255.255.255.0"
;push "route 192.168.20.0 255.255.255.0"
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
;learn-address ./script
;push "redirect-gateway def1"
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"
;push "dhcp-option DNS 10.8.0.1"
;client-to-client
;duplicate-cn
keepalive 10 120
;tls-auth ta.key 0 # This file is secret
;cipher BF-CBC # Blowfish (default)
;cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES
comp-lzo
;max-clients 100
;user nobody
;group nobody
persist-key
persist-tun
status openvpn-status.log
;log openvpn.log
;log-append openvpn.log
verb 3
;mute 20
Client config:
client
;dev tap
dev tun
;dev-node MyTap
# Are we connecting to a TCP or
# UDP server? Use the same setting as
# on the server.
proto tcp
#proto udp
remote 192.168.2.10 1194
;remote-random
resolv-retry infinite
nobind
;user nobody
;group nobody
persist-key
persist-tun
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
;mute-replay-warnings
ca "C:\\Program Files (x86)\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\config\\client2.crt"
key "C:\\Program Files (x86)\\OpenVPN\\config\\client2.key"
ns-cert-type server
;tls-auth ta.key 1
;cipher x
comp-lzo
verb 3
;mute 20
;redirect-gateway def1