IPsec is a suite of protocols designed to secure IP traffic between networks by encrypting and authenticating communications across tunnels. Key configuration decisions include choosing between Authentication Header and Encapsulating Security Payload, selecting transport or tunnel mode, and defining a cipher suite.
IPsec Overview
Internet Protocol Security, or IPsec, was created to start securing communications across the internet.
The first thing to understand is that there's not just one standard out there for IPsec. Instead it's a lot of different concepts, a lot of different protocols, that are all rolled up into one concept of protecting IP traffic. In fact, this site right here lists out the IPsec and related standards, and you can see there's a lot of different standards that all roll into this idea of IPsec.
When you're configuring IPsec there's a lot of decisions to be made on how you're going to configure it, a lot of selections. Here's some of the selection of how to set up IPsec, and we'll go into some of the details of this. Really IPsec is designed to create tunnels across secure networks so that way you can secure your traffic between two different locations.
One of the first things that you're going to need to set up when you're setting up IPsec is whether you're going to use authentication header, AH, or encapsulating security payload, ESP, or a combination of the two. So you can choose one of these.
AH is really designed more for integrity and authentication, and ESP was originally designed for encrypting traffic, so they serve different purposes, which is why you might want to implement both. What happened is that no one really used AH that much, because they wanted the features of both of these, so really at this point in time they just incorporated a lot of the authentication piece and also the integrity piece into ESP.
Another configuration that can be chosen is the modes of operation. Here we see the transport mode and the tunnel mode. With this we see both have the payload and they both have the same layer 4 header, so that is the same.
In transport mode, the first time we assemble and put this together, we assemble it with a layer 3 header that's really designed for IPsec. However, in tunnel mode we're just taking the packet that already exists and then we're adding the ESP header and trailer onto it, and so it's being tunneled across there. And although authentication header packets look a little different, they also have a similar transport mode and tunnel mode.
Once we've chosen the method in which we're going to communicate, we're going to choose what encryption method we're going to use, and AES is very common. We're also going to choose what is going to keep the integrity of this, and SHA is a common one that we choose for that. We choose what authentication we would use for this, and so maybe it's a pass key that we'd use, or maybe it's RSA. And then we would choose what we'd use for a key exchange, so Diffie-Hellman, maybe one of the versions of Diffie-Hellman, for the key exchange.
This makes up what we call a cipher suite. That cipher suite we would then set up on both sides, both the beginning of the tunnel and the end of the tunnel, so then it can establish between these two devices, establish this tunnel, and communication can happen between these networks.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →