Encapsulation Mode VPN
Summary:IPSec has the following two data encapsulation modesTransport modeTunnel modeEncapsulation diagram of transmission mode!Let's first look at how th…
This book is available as an e-book in EPUB format
PayPal sponsors this website for any amount. I will send you an EPUB e-book via email. Please send me an email
Email: shuxueha@outlook.com
PayPal: https://paypal.me/zhipinglei
You can also scan the PayPal QR code below to sponsor
You can also purchase this book on Amazon: click to enter the Amazon official website
IPSec has the following two data encapsulation modes
Transport mode
Tunnel mode
Encapsulation diagram of transmission mode!
Let's first look at how the transmission mode encapsulates data through the situation, because AH is rarely used, so in the encapsulation mode diagram, we use the ESP encapsulation protocol as an example to introduce it!
The implementation of the transmission mode is very simple, mainly by inserting an ESP header between the original IP header and the IP payload (TCP header and application layer data). Of course, ESP will also add an ESP tail and ESP verification data part at the end, and encrypt and verify the IP payload and ESP tail. But the original IP header has been completely preserved!
Analysis of IPsec VPN instance transmission mode!
We are now using an IPsec VPN deployed within Yeslab Security Lab to illustrate how the transport mode works. This is a schematic diagram of IPsec VPN!
The main purpose of designing this IPsec VPN is to provide secure protection for the traffic of my computer accessing important internal file servers. My computer's IP address is 10.1.1.5, and the server's IP address is 10.1.19.5. These two addresses are internal addresses of the laboratory network and are globally routable at least within the Yeslab laboratory. The transmission mode simply inserts an ESP header between the original IP header and the IP payload (the ESP tail and ESP verification data can be omitted in the figure), and encrypts and verifies the IP payload. We call the devices that actually communicate as communication points and the devices that encrypt data as encryption points. In this IPSec transmission mode diagram, both the actual communication and encryption devices are my computer (10.1.1.5) and server (10.1.19.5), so the encryption point is equal to the communication point. As long as the condition that the encryption point is equal to the communication point can be met, the transmission mode can be encapsulated. In fact, based on personal experience, to use the transmission mode for encapsulation, the IP addresses of the communication devices (receiver and initiator) must be routed in the network located in between, otherwise tunnel mode must be used. The concept of communication point and encryption point is very important because it directly affects the routing configuration of IPsec VPN. In the next chapter, we will further explore this in detail. Discuss how encryption and communication points affect the routing of IPsec VPN!
After discussing the transmission mode, let's now take a look at how the tunnel mode encapsulates data!
In the encapsulation diagram of the tunnel mode, the tunnel mode encapsulates the entire original IP packet into a new IP packet, and inserts an ESP header between the new IP header and the original IP header to encrypt and verify the entire original IP packet. So, what kind of network topology is suitable for using the tunnel mode to encapsulate IP packets? Site to site IPsec VPN is a classic example, and we can analyze how a site to site IPSec VPN uses tunneling mode to encapsulate data packets!
It is a typical site to site IPSec VPN schematic diagram. The protection network behind the branch site is 10.1.1.0/24, and the protection network behind the central site is 10.1.2.0/24. The branch site has a terminal computer to access the database server of the central site through the site to site IPsec VPN. These two computers are what we call communication points. The real device for encrypting data is the router connecting the two sites to the Internet. Assuming that the Internet address obtained by the branch site router is 202.100.1.1, and the Internet address of the central site is 61.128.1.1, then the two addresses of the router are encryption points. Obviously, the encryption points are not equal to communication points. Therefore, the tunnel mode should be used at this time. IPSec that encapsulates data and transmits it on the Internet The outermost header of the data packet consists of the encrypted IP header for the source and destination, followed by the ESP header, and the innermost layer is the original IP data packet that is securely protected!
Encapsulation packet structure for site to site IPSec VPN using transport mode!
We can also assume that if the transmission mode encapsulation is still carried out in the topology shown, the result of encapsulation is that if such encapsulated packets are sent directly to the Internet, they will be discarded by the Internet router, because 10.1.1.0/24 and 10.1.2.0/24 are both customer internal networks and cannot be routed on the Internet. In order to enable site to site traffic to cross the Internet after being encrypted through IPSec VPN, we need to create a "tunnel" between the two sites, encapsulate the traffic between the sites into this tunnel, and cross the Internet. This tunnel is actually achieved by inserting new IP headers and ESP headers. Repeat the conditions for using tunnel mode again: as long as the encryption point is not equal to the communication point, we should use tunnel mode encapsulation, or in other words, if the IP address of the communication point is not routable in the network between them, we should use tunnel mode encapsulation!
| High-speed VPN | Fast VPN | Preferred Accelerator VPN | Reliable VPN |
| High quality VPN | Old fashioned VPN | Stable VPN(Recommend) | Smooth VPN |

