# Slow network performance over vpn



## Aravind Divakaran (Nov 5, 2017)

Hi All,

When I am trying to copy a file from freebsd to freebsd over vpn transfer speed is very low and copying is getting aborted. But linux servers on same network getting good transfer speed and no network failure. If I am try to transfer from linux server to freebsd transfer speed is low but no network failure. Please help me to identify why slowness in connectivity between freebsd servers over vpn.

Thank You

- Aravind M D


----------



## SirDice (Nov 6, 2017)

Check the MTU of the VPN, it should be around 1492 or even a little less. Setting the MTU too high will result in fragmentation which is generally not good for the performance.


----------



## PacketMan (Nov 8, 2017)

Yep, MTU is first thing that comes to my mind.  You could try this series of commands from FreeBSD:
`ping -c 5 -s 10 target-machine-ip-address`  - Just to verify you can ping the remote machine.
`ping -c 5 -s 1492 target-machine-ip-address` - Verify if 1492 works.
`ping -c 5 -s 1500 target-machine-ip-address` - Verify if 1500 works.

I personally have not used these command options before, so you might have to subtract 8 from 1492 and 1500. See man page for ping -s flag for details.


----------



## Max212 (Nov 8, 2017)

Juniper recommends to use 1320 bytes for IPSec traffic and Cisco default value is 1380.


----------



## SirDice (Nov 9, 2017)

Note that IPSec is always a VPN but a VPN doesn't necessarily have to be IPSec. There are several protocols you can use to set up a VPN, IPSec is just one of them.


----------



## Max212 (Nov 9, 2017)

That is true. MSS size usually depends of type of connectivity and used protocols....


----------

