IPsec implementation with IKEv1 and IKEv2 keying protocols