Joined: 18 Jan 2004
|Posted: 2.1.2010, 01:35 Post subject: How to set MTU on specific network interface VPN
|A lot of hidden problems with VPN connections, especially on Vista, Windows 7 and Server 2008 R2 might get even worse because of MTU size, which is actually lower as set by default.
Routers and Windows VPN ser MTU packet size to default 1500, but you can test, which MTU size is best for you. If your VPN or internet connection does not pass the whole packet in its preset size, it will fragment the packet and transmit the remaining in another packet frame.
It looks like this:
when MTU packet size is set to 1500 bytes, each transmitted packet has fixed size of 1500 bytes. When you transmit more than 1500 bytes, the download is devided into packets, each of 1500 size.
Now, if your internet (or VPN) connection does not allow such a size, but only, let's say, 1400, then your packets will be fragmented and first packet will be:
1400 bytes (transmitter frame full)
and next packet
100 bytes (transmiter frame will have 1300 bytes empty)
So, to optimise it, first TEST your connection for MTU maximum size:
Code: ping <destination IP> -f -l 1500
Most probably you will get anwer that YOUR PACKET NEEDS TO BE FRAGMENTED.
Then lower the "-l 1500" part to 1450, then to 1400 etc...and when you get normal PING response, increase the number by 10 until you get FRAGMENTED answer again.
Now you've found your connection packet size limit.
LOWER THE LIMIT BY 20 TO BE ON THE SAFE SIDE!
For example, if you packets were fragmented at 1390 and were no more fragmented at 1380, then we'll use MTU size of 1360 to be safe.
Now, list your connections:
Code: netsh interface ipv4 show subinterfaces
You'll get interface list.
Find your interface for which you set MTU size, and let's go:
Code: netsh interface ipv4 set subinterface "Interface Name" mtu=1360 store=persistent