IPSec is an IETF standard that provides security (authentication, integrity, confidentiality) for data transmitted over IP networks. It operates at the IP layer. IPSec has two main modes - transport mode which secures only the payload, and tunnel mode which secures the entire packet. The two main protocols used in IPSec are AH (Authentication Header) which provides authentication and integrity, and ESP (Encapsulating Security Payload) which provides confidentiality, authentication, and integrity. ESP supports various encryption algorithms. IPSec establishes Security Associations between communicating parties to define encryption/authentication parameters and keys.