Compression not effective on routed VPN

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
aristizb
OpenVpn Newbie
Posts: 2
Joined: Tue Mar 01, 2011 8:12 pm

Compression not effective on routed VPN

Post by aristizb » Tue Mar 01, 2011 8:28 pm

Hi,

I have configured a VPN using OpenVPN 2.2-beta5 on Ubuntu 8.04.

Two subnets are connected via routed VPN, and everything seems to be working fine. I enabled compression on both client and server using the comp-lzo directive, but it looks that I never get a benefit from it; when I monitor the traffic between the client and server nodes and I initiate a file transfer from a machine on the server side to a machine on the client side, there is no data compression.

To be more clear, I created a 1 GB file full of zeros, then I scp it, and I see that roughly 1GB travel across the VPN, am I missing something or is it probably a wrong configuration on my VPN nodes?

The LZO library was installed on both sides, and when I start the VPN service I can see that compression is enabled on the logs:

"Tue Mar 1 11:41:48 2011 192.168.7.5:47834 LZO compression initialized"

Any help is appreciated.


Juan.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Compression not effective on routed VPN

Post by janjust » Tue Mar 01, 2011 9:33 pm

you're scp-ing an empty file over a VPN - the problem is in the 'scp' : scp/ssh encrypts the file for you, even if it is full of zeroes. You'd use '-o Compression=yes' in scp for that.

Try measuing the performance using either 'nc' (to transfer the empty file) or using iperf, which you can also 'feed' the file full of zeroes.

aristizb
OpenVpn Newbie
Posts: 2
Joined: Tue Mar 01, 2011 8:12 pm

Re: Compression not effective on routed VPN

Post by aristizb » Tue Mar 01, 2011 10:31 pm

Thanks a lot for the clarification.

Now that I use nc to transfer files between the nodes I can see a sustainable difference.

For a 1GB file, the VPN traffic is ~100 MB.
For a 100 MB file, the VPN traffic is ~11 MB.


Regards,



Juan.

Post Reply