With the development of network technology,multicast,as an efficient data transmission method,is being used more and more widely,and people are paying more and more attention to its security.IPsec,as a protocol with high practicality and reliability,is becoming more and more popular among enterprises and individual users.This paper first introduces the IPsec peer-to-peer deployment scheme,the multicast key management structure without GCKS,and the end-to-end gateway discovery mechanism.Then,based on the end-to-end gateway discovery mechanism,it proposes an end-to-end multicast IPsec discovery mechanism suitable for the IPsec peer-to-peer deployment scheme.Finally,it discusses the routing problem of discovery packets in the real network and proposes a solution.