Someone asked so lets walk through the overhead introduced when using IPSec with AES; it’s higher than you might think and I haven’t even factored in ISAKMP.
Encryption really isn’t ‘my bag’ so if anything is wrong, do let me know; hopefully public scrutiny will mean I can truly rely on these figures.
Take a look at my TCP Over IP Bandwidth Overhead article if you’d like to understand the further overheads introduced by TCP/IP itself, plus those of Ethernet.
TL;DR – As before, skip to the end for the summary if you really can’t face the math.
Assumptions
The following assumptions have been made when formulating these calculations;
- No retries, packet losses or other events occur
- One way, one to one host communication data and overhead
- TCP & IP packet headers of 40Bytes (no TCP options)
- Use of a full-duplex communications medium, i.e. the full bandwidth is available both upstream and downstream, at the same time
- Where division of the data into the maximum packet size results in a fraction, a packet for that remaining data must still be transmitted so I always round-up when calculating the number of packets
Units of Measurement
The abbreviations used with the data/traffic values in this article are metric prefixes (aka SI prefixes) indicating decimal multiplication (rather than binary prefixes (based on powers of two) where 1kbit = 1024bits), as follows;
- 1 kB = 1,000 Bytes (8,000 bits)
- 1 MB = 1,000,000 Bytes (8,000,000 bits)
A few things to remember;
- Serial line speeds are typically quoted using binary prefixes, so a 2Mb E1 is actually 2.048Mb using metric prefixes
- Ethernet speeds are typically quoted using metric prefixes, so a 100Mb Ethernet link is exactly that (100,000,000bit)
- Linux commands display file size information using metric prefixes. However, using a –human-readable or -h switch normally results in output using binary prefixes which is rather confusing
- Windows displays file sizes using binary prefixes.To make accurate calculations, view the file properties or use a command prompt to discover the file size in Bytes and apply the metric prefix
- Most other storage systems use binary prefixes
- Hard drive manufacturers typically use metric prefixes which means they appear smaller than specified when capacity is displayed using binary prefixes
Bits & Bytes
- 1 Byte = 8 bits
- File sizes are normally quoted in Bytes
- Linux commands display file size information in Bytes
- Link speeds are quoted in Mb (Megabits) per second, not MegaBytes, thus (ignoring all overheads) it’ll take 8s to move 100MB (MegaByte)over a 100Mb (Megabit)per second Fast Ethernet link
Other Overheads
TCP/IP handshake overheads have been ignored as these are negligible.
ISAKMP overheads have been ignored.
For the sake of simplicity I’ve ignored Ethernet’s preamble, start frame delimeter and interpacket gap when calculating it’s overhead.
Encryption Padding
AESOnly operates using a specific size of data called block size. TheAESblock size is 128 bits or 16 Bytes. If the body of a packet is smaller than or not divisible by this 16 Byte block size it is ‘padded’ so it can be operated on. For instance;
- A 1 Byte packet body will have 15 Bytes of padding added, resulting in a 16 Byte body.
- A 500 Byte packet body will have 12 Bytes of padding added, resulting in a 512 Byte body.
- A 1400 Byte packet body will have 8 Bytes of padding added, resulting in a 1408 Byte body.
Reference Note: AES block size – RFC3602, Section 2.4
Hash/HMAC Padding & Additions
MD5andSHA-1HMACprocessing also operates using a specific block size; 512 bits or 64 Bytes. Every packet (aka message) also has a 1 bit padding identifier added (even if there is no padding) and a 64 bit or 8 Byte message length added. If the body of a packet,with the extra 65 bits added, is smaller than or not divisible by the 64 Byte block size it is ‘padded’ so it can be operated on. For instance;
- An 8 Byte packet body will have 48 Bytes of padding added, (including the 1 bit padding identifier,) resulting in a 56 Byte body prior to the 8 Byte message length information being added. Total body size will be 64 Bytes.
- A 500 Byte packet body will have 4 Bytes of padding added, (including the 1 bit padding identifier,) resulting in a 504 Byte body prior to the 8 Byte message length information being added. Total body size will be 512 Bytes.
- A 1399 Byte, 7 bit packet body will have no padding added except the the 1 bit padding identifier, resulting in a 1400 Byte body prior to the 8 Byte message length information being added. Total body size will be 1408 Bytes.
IP Sec Headers & Trailers
AHandESPboth add headers to the TCP/IP packet itself,ESPalso adds an Initialisation Vector (IV) and a trailer. The size of this additional data depends on the IPsec protocol and mode used, as follows;
- Tunnel Mode: 20 Byte header regardless of protocol used
- Transport Mode: No additional data, headers or trailers
- AH: 24 Byte header
- ESP: 40 Bytes (8 Byte header (SPI and Sequence Number,) 16 Byte IV and 16 Byte trailer)
Reference Note: The Initialisation Vector (IV) is always be the same as the encryption block size – RFC3602, Section 2.1
Overhead Calculations
Now we understand all the possible additions to the packet body and the TCP/IP packet itself, we’ll calculate the overall affect or overhead when encrypting packets withAESand sending them across an IPsec secured network link. We’ll assumeSHA-1hashing,ESPtunnel mode is used and theESPIV is 16 Bytes.
Transmitting 1 Byte of Data
This might seem unlikely but programs such as Telnet and SSH transmit a packet for every character sent or received during a session.
- Add 15 Bytes forAESpadding to reach the 16 ByteAESblock size (1 16 Byte block)
- Add 1 bit for the padding identifier
- Add 8 Bytes for theSHA-1message length information
- Add 39 Bytes, 7 bits padding to reach the 64 ByteSHA-1block size (1 64 Byte block)
- Add 20 Bytes for theESPtunnel mode header
- Add 8 Bytes for theESPheader
- Add 16 Bytes for theESPIV
- Add 16 Byes for theESPtrailer
- Total packet size (minus TCP/IP headers) is now: 124 Bytes– an increase of 12,300%
Transmitting 1000 Bytes of Data
- Add 8 Bytes forAESpadding to reach the 16 ByteAESblock size (63 16 Byte blocks)
- Add 1 bit for the padding identifier
- Add 8 Bytes for theSHA-1message length information
- Add 7 Bytes, 7 bits padding to reach the 64 ByteSHA-1block size (16 64 Byte blocks)
- Add 20 Bytes for theESPtunnel mode header
- Add 8 Bytes for theESPheader
- Add 16 Bytes for theESPIV
- Add 16 Byes for theESPtrailer
- Total packet size (minus TCP/IP headers) is now: 1084 Bytes– an increase of 8.4%
Transmitting 1328 Bytes of Data
- Add 0 Bytes forAESpadding to reach the 16 ByteAESblock size (83 16 Byte blocks)
- Add 0 bit for the padding identifier
- Add 8 Bytes for theSHA-1message length information
- Add 8 Bytes padding to reach the 64 ByteSHA-1block size (21 64 Byte blocks)
- Add 20 Bytes for theESPtunnel mode header
- Add 8 Bytes for theESPheader
- Add 16 Bytes for theESPIV
- Add 16 Byes for theESPtrailer
- Total packet size (minus TCP/IP headers) is now: 1404 Bytes– an increase of 5.72%
Transmitting 1460 Bytes of Data
- Add 12 Bytes forAESpadding to reach the 16 ByteAESblock size (92 16 Byte blocks)
- Add 1 bit for the padding identifier
- Add 8 Bytes for theSHA-1message length information
- Add 55 Bytes, 7 bits padding to reach the 64 ByteSHA-1block size (24 64 Byte blocks)
- Add 20 Bytes for theESPtunnel mode header
- Add 8 Bytes for theESPheader
- Add 16 Bytes for theESPIV
- Add 16 Byes for theESPtrailer
- Total packet size (minus TCP/IP headers) is now: 1596 Bytes– an increase of 9.32%
Summary
So, as demonstrated, for data payloads in excess of the common TCP payload maximum segment size (theMSS) of 1460 Bytes, the IPSec bandwidth overhead using AES is approximately9.32%. This equates to an ‘efficiency’ of 91.48% (1460/1596) – in other words, that’s how much bandwidth is left for actual data if you’re putting as much data in each packet as possible. Note however that as this packet size is larger than the typical IP (and Ethernet) MTU, it’s very unlikely that you’ll achieve this level of efficiency. As noted in the comments, the ideal MSS appears to be 1328 when using ESP.
Keep in mind that for very small data payloads (common with applications such as Telnet, TN3270 mainframe emulation and SSH) the IPSec bandwidth overhead can as high as12,300%.
If you add TCP/IP and Ethernet (and VLAN tagging) into the mix (see the calculations from Wikipediahere) then the throughput of a 100Mb link is 100 x 0.92.64 (IPSec+AES efficiency) x 0.9733 (TCP/IP efficiency) x 0.9728 (Ethernet (with tagging) efficiency) which equals 87.71Mbps, a combined efficiency of 87.71%. assuming ideal conditions.
Thanks To
This article would not of been possible without the analysis and information provided by Ray Savarda and Matt Karash in this article:http://www.tisc-insight.com/newsletters/39.html.
Chris Bull for correcting me over theESP IV size back in 2010.
Next
My head hurts but I’m having quite a bit of fun removing the rose coloured spectacles and taking away everyone’s bandwidth. I’ve already ‘stolen’ 1.2Gb+ of every 10Gb link out there and I really want more. So, next up I’ll calculate the bandwidth overhead of SSL/TLS and see if we can get down to less than 80% efficiency. Think this sounds fanciful? What’s so odd about using a VPN with HTTPS through a trunked firewall interface?
Other articles in this series;
- TCP Over IP Bandwidth Overhead
- TCP/IP over VXLAN Bandwidth Overheads
The icon Artwork used in this article is by the GNOME Project and licensed under the Creative Commons Attribution-Share Alike 3.0 United States License.
FAQs
What is the bandwidth overhead of IPsec VPN? ›
The IPsec VPN overhead on this packet is an additional 84 bytes, resulting in a total packet size of 128 bytes, an increase of 200%. A 10 Mbps Ethernet link can handle approximately 8,845 packets per second at this packet size.
How much bandwidth does an IPsec tunnel use? ›Also, maximum IPsec tunnel bandwidth on the gateway was limited to (3/20)*Gateway Capacity provided by the customer. So, for example, if you set the gateway capacity to 1000 Mbps, then the IPsec tunnel capacity would be 150 Mbps.
Does IPsec add overhead? ›Transferring one byte of encrypted data to an internet protocol security (IPSec) network may result in well over one hundred percent overhead, whereas, it is actually less than ten percent for 1000 bytes' data size.
What is the maximum bandwidth for IPsec? ›How does the maximum IPSec VPN throughput define? The PA firewall overall could support up to 2.7Gbps for IPsec VPN throughput, but VPN tunnels would be based on maximum of physical link.
How much overhead does a VPN take? ›Yes. However, Using a VPN on your cell phone increases data usage by 4-20% (depending on the protocol you use.) This means that you can't use a VPN to get around your monthly data cap, or to get unlimited roaming data. So, if you were wondering, “does a VPN use more data?” Then the answer is yes.
How much overhead does a VPN add? ›How much data does a VPN use? A VPN encrypts those files during the transfer, and that process does create some overhead. By most estimates, the encryption process adds about 10-15% more data usage.
How can I tell how much bandwidth my IP is using? ›The most accurate way to monitor the bandwidth used by devices on your network is to head to the router. All devices connect to your router. In the router's settings, you'll be able to work out the data usage information for each device by using their IP and MAC addresses.
What is MTU size for IPsec tunnel? ›When IPsec is being used, it is customary to set the MTU size on the tunnel interfaces to 1,400 bytes and to set the TCP-MSS-adjust to 1,360 bytes. This can be configured in a Cisco IOS device using these commands.
How is VPN bandwidth calculated? ›Determine your Internet Service Provider (ISP) bandwidth. Calculate your expected throughput by taking the least bandwidth of either the VM, VPN Gateway, or ISP; which is measured in Megabits-per-second (/) divided by eight (8).
What is the major drawback of IPsec? ›However, IPSec has two major drawbacks. First, it relies on the security of your public keys. If you have poor key management or the integrity of your keys is compromised then you lose the security factor. The second disadvantage is performance.
What is the size of IPsec packet header? ›
For IPsec tunnel, the header length is variable and can be upto 64 bytes. This ensures that packets traveling through your GRE or IPSec tunnel do not exceed the packet size limitations of your network appliance or other appliances in the path between your network appliance and the ZIA Public Service Edge.
How many bytes does IPsec add? ›A normal IP header is 20 bytes long, and a TCP header is also 20 bytes long, meaning each packet can contain 1,460 bytes of payload. However, IPsec adds an Authentication Header, an ESP header, and associated trailers. These add 50-60 bytes to a packet, or more.
How much bandwidth is required for 1000 users? ›Businesses need 100Mbps per 1,000 users or 100Kbps (kilobits per second) per user. Mbps is over 1000 times faster than 1.0 Kbps.
How is maximum bandwidth calculated? ›The Maximum bandwidth can be calculated as follows: where RWIN is the TCP Receive Window and RTT is the round-trip time for the path. The Max TCP Window size in the absence of TCP window scale option is 65,535 bytes. Example: Max Bandwidth = 65,535 bytes / 0.220 s = 297886.36 B/s * 8 = 2.383 Mbit/s.
What is a bandwidth limit exceeded? ›Bandwidth Limit Exceeded error:
This error indicates that your site is receiving too much traffic than the host can allow, which is dependent on the server space you have purchased.
The throughput of a network is the rate of successful data reception in a network connection. The higher the rate, the faster the throughput and, theoretically, the better the connection.
What is the throughput of site to site VPN? ›A: Each AWS Site-to-Site VPN connection has two tunnels and each tunnel supports a maximum throughput of up to 1.25 Gbps.
Does VPN bypass data cap? ›Short Answer: A VPN does count toward your data cap. All data must flow through your ISP/mobile provider's servers before reaching the VPN server. Even though the data is encrypted it still uses bandwidth. In some cases, a VPN may help you get around specific caps or throttling, but not always.
What profit does VPN use? ›What Do VPNs Do? In basic terms, a VPN provides an encrypted server and hides your IP address from corporations, government agencies and would-be hackers. A VPN protects your identity even if you are using public or shared Wi-Fi, and your data will be kept private from any prying internet eyes.
Can I see how much bandwidth each device is using? ›With the Google Wifi app
Open the Google Wifi app . Devices. The numbers next to "Devices" represent your total Internet (WAN) traffic to and from your network. Under each device, you can view how much data each device has downloaded and uploaded.
Is there a way to check bandwidth? ›
- Click on “Settings” on your PC.
- Select “Network & Internet”
- Click on the “Data Usage” tab.
- Under the “Overview” tab, you'll see a list of all your applications and the total data usage from the last 30 days.
- Clear up your device. Remove any unnecessary files and clear your caches. ...
- Reduce the number of devices connected to your network. They'll all be competing for bandwidth;
- Use an ethernet cable. ...
- Check your router. ...
- Update your drivers on your connected devices.
The MTU of the next receiving device is determined before sending a packet to it. If the packet is too large and the next receiving device cannot accept it, the packet is divided into multiple packets and sent. This is called fragmentation. Fragmentation is bad for performance, as it adds delay and extra data.
What is the difference between MTU 9000 and 1500? ›With a standard 1500 byte MTU that will take 14,316,558 packets, but with an MTU of 9000 we are sending 2,386,093 packets. That's a difference of 11,930,465 packets. That's our advantage. Speed when sending large amounts of data.
Why do you add 28 to MTU? ›You add 28 bytes because 20 bytes are reserved for the IP header and 8 bytes must be allocated for the ICMP Echo Request header.
How much bandwidth is required for 500 users? ›Number of Concurrent Calls | Minimum Required Bandwidth | Recommended Speed |
---|---|---|
1 | 100 Kbps Up and Down | 3 Mbps Up and Down |
3 | 300 Kbps Up and Down | 3 Mbps Up and Down |
5 | 500 Kbps Up and Down | 5 Mbps Up and Down |
10 | 1 Mbps Up and Down | 5 - 10 Mbps Up and Down |
- Connect to a server closer to your physical location. ...
- Connect to a server that isn't overloaded. ...
- Try connecting via a different VPN protocol. ...
- Enable split tunneling if available. ...
- Use a wired connection. ...
- Close unnecessary apps running in the background. ...
- Restart your router and other devices.
IPsec originally defined two protocols for securing IP packets: Authentication Header (AH) and Encapsulating Security Payload (ESP).
Why is IPsec so complicated? ›Because IPsec requires third-party client software, it is more complicated and expensive to set up and maintain. However, this also makes it more secure. It's tough for a hacker to penetrate an IPsec system without knowing which client it uses and the exact settings to get that client to work properly.
What are the 3 major components of IPsec? ›IPSec Components. Encapsulating Security Payload (ESP) Authentication Header. Security Association.
What is the minimal total header size or overhead for each packet? ›
The minimum size is 20 bytes (header without data) and the maximum is 65,535 bytes. All hosts are required to be able to reassemble datagrams of size up to 576 bytes, but most modern hosts handle much larger packets. Links may impose further restrictions on the packet size, in which case datagrams must be fragmented.
How many packets are in IPsec? ›All 9 packets of the Phase 1 (Main Mode) and Phase 2 process.
What is the maximum header size of an IP packet 32 bytes? ›Length - A 4-bit field containing the length of the IP header in 32-bit increments. The minimum length of an IP header is 20 bytes, or five 32-bit increments. The maximum length of an IP header is 24 bytes, or six 32-bit increments.
How many bytes of overhead does an IP IP tunnel add to a packet? ›Typically this is 20 bytes per packet, so if the normal packet size (MTU) on a network is 1500 bytes, a packet that is sent through a tunnel can only be 1480 bytes big. 2.1) Install IP tunnel package.
Is IPsec multithreaded? ›IPsec cryptography jobs can be dispatched multi-threaded to run in parallel and increase performance. However, not all platforms and configurations fully support this function. To enable this capability, check Asynchronous Cryptography under VPN > IPsec on the Advanced tab.
Why does IPsec use port 4500? ›And UDP 500 is for ISAKMP which is used to negotiate the IKE Phase 1 in IPSec Site-to-Site vpn & is default port number for isakmp, used when there is no NATing in the transit path of the vpn traffic. This is why we need UDP 4500.
What is the best bandwidth limit? ›Recommendations: For social media, email or light video streaming: 10-25 Mbps download bandwidth. For gaming or heavy use of video, especially 4K: 50-100 Mbps download bandwidth. For most households: At least 3 Mbps upload bandwidth, or at least 10% of your download bandwidth.
How much bandwidth is required for 2000 users? ›BANDWIDTH REQUIREMENTS | ||
---|---|---|
Low Usage | Medium Usage | |
1000 | 140 | 280 |
1500 | 150 | 300 |
2000 | 200 | 400 |
There's no way to lift an internet bandwidth limit. Not even a VPN can help. The only way around the limit is upgrading to a higher internet plan or switching providers.
What is throughput vs bandwidth? ›Bandwidth and throughput both indicate network performance. The terms are often used together, but bandwidth refers to capacity, while throughput details how much data actually transmits. Bandwidth and throughput are two terms related to network performance.
What happens if you use too much bandwidth? ›
Too much bandwidth usage can have multiple negative effects on a network, including poor site performance and slow upload and download speeds. Network monitoring software can be used to examine a network's overall performance by detecting these issues and suggesting improvements.
What happens if bandwidth is more? ›The more bandwidth a data connection has, the more data it can send and receive at one time. In concept, bandwidth can be compared to the volume of water that can flow through a pipe. The wider the pipe's diameter, the more water can flow through it at one time. Bandwidth works on the same principle.
What is the bandwidth of VPN? ›Maximum bandwidth is the bandwidth a user can use through the VPN connection. This is a limit on how much the user can use if there is bandwidth available. For example, if the user's maximum bandwidth is 100 kbps, the user cannot use more than 100 kbps regardless how much available bandwidth.
How do I bypass bandwidth throttling? ›What's the best way to bypass bandwidth throttling? If your ISP is throttling your bandwidth, and switching providers is not an option, the easiest solution is to connect through VPN. Your ISP won't be able to inspect the data packets, so it won't be able to throttle that traffic based on what service you're using.
Does VPN bypass bandwidth limit? ›Internet service providers throttle bandwidth when you try to stream video, torrent, or access content they deem undesirable. A VPN can help you bypass bandwidth throttling in certain situations. Bandwidth throttling occurs when someone intentionally slows down your internet speed.
What is the max MTU for IPsec? ›When IPsec is being used, it is customary to set the MTU size on the tunnel interfaces to 1,400 bytes and to set the TCP-MSS-adjust to 1,360 bytes. This can be configured in a Cisco IOS device using these commands.
What is the formula for calculating bandwidth? ›The basic equation for this is Total Bandwidth = Packet Size x Packets Per Second.
What is the formula to calculate bandwidth? ›- To calculate the required network bandwidth, determine the following information: Total amount of data (TD) to be replicated, in gigabytes. ...
- Calculate the bandwidth required by using the following formula: (TD * (100 / DR) * 8192) / (RWT * 3600) = Required_Network_Bandwidth (Mbps/second)
Businesses need 100Mbps per 1,000 users or 100Kbps (kilobits per second) per user. Mbps is over 1000 times faster than 1.0 Kbps.