IPSec provides three functions: AuthenticationHeader(AH), Encapsulation Security Payload(ESP) and Internet Key Exchange(IKE). AH provides connectionlessintegrity, data origin optionally protection against replays. ESP consists of two parts: ESP header providesconfidentiality, antiflow analysis service; ESP provides data origin authentication, connectionless integrity, and anantireplay service. IPsec provides a standard, strong, and extensive mechanism which can provide security for IP and upper layer (i.e. UDP and TCP).