IP Security (IPSec) (original) (raw)

Last Updated : 29 Apr, 2026

IP Security (IPsec) is a set of network security protocols used to protect data transmitted over an IP network, such as the Internet. It provides security by authenticating, encrypting, and ensuring the integrity of IP packets during communication between devices.

Features

Working

IPsec is used to secure data when it travels over the Internet by creating a protected connection between communicating devices. It ensures that the transmitted information remains confidential, authentic, and unchanged during transmission.

ipsec_tunnel

Connection Establishment Process

IPsec establishes a secure communication channel by authenticating devices and encrypting the data transmitted over the network. The connection establishment process takes place in two main phases.

Phase 1: Establishing the IKE Tunnel

In Phase 1, a secure communication channel is created using Internet Key Exchange. This secure channel is used for further negotiation of security parameters and key exchange.

Phase 2: Establishing the IPsec Tunnel

In Phase 2, also known as Quick Mode, the devices negotiate the IPsec Security Associations (SA) and decide how data will be protected during communication.

IPsec Tunnel Mode vs Transport Mode

Tunnel Mode Transport Mode
Protects the entire original IP packet (header + data) Protects only the payload (data) part
Adds a new outer IP header Uses the original IP header
Provides higher security Provides comparatively lower security
Encapsulates the whole original packet Does not encapsulate the full packet
Used in site-to-site VPN connections Used in host-to-host communication
Hides source and destination IP addresses Source and destination IP addresses remain visible
More overhead due to the extra IP header Less overhead
Commonly used in VPN gateways Commonly used for end-to-end communication

Protocols Used in IPSec

IP Security Architecture

IPSec (IP Security) architecture uses two protocols to secure the traffic or data flow. These protocols are ESP (Encapsulation Security Payload) and AH (Authentication Header).

architecture

IPsec VPN

This is a secure networking method that allows users to communicate over the internet safely and privately. IPsec VPN creates an encrypted tunnel between sender and receiver, ensuring that transmitted data remains confidential and protected from unauthorized access.

Uses

Advantages

Disadvantages