The invention provides a method for achieving establishment of multiple
internet protocol security (
IPsec) tunnels among network devices. The method for achieving the establishment of the multiple
IPsec tunnels among the network devices includes the following steps that static allocation is conducted on a
server side, wherein the allocation comprises a local
internet protocol (IP) address of the establishment of the IP sec tunnels of the
server side, a two-dimension corresponding table is allocated, and the two-dimension corresponding table comprises IP addresses of all
client sides and protection subnets corresponding to the IP addresses; the
server side scans the two-dimension corresponding table and judges whether information of source protection subnet and information of objective protection subnets are matched according to a received tunnel establishment request sent by a
client side communication initiator, one
IPsec tunnel is established between the initiator and the
server side when the information of source protection subnet and the information of the objective protection subnets are matched, the
server side and a
client side responder conduct inverse negotiation, the
client side responder judges whether the protection subnet of the
client side is matched with the information of the objective protection subnets according to the establishment request information sent by the
server side, when the protection subnet of the
client side is matched with the information of the objective protection subnets, tunnel connection is established, and when the protection subnet of the client side is not matched with the information of the objective protection subnets, tunnel connection between the initiator and the server side is broken. Through the method for achieving the establishment of the multiple IPsec tunnels among the network devices, dynamic connection and
dynamic maintenance of the multiple IPsec tunnels among the network devices are achieved.