P2p peer connection establishment method and system

The present invention relates to a method for establishing P2P peer connection, comprising: P2P server receives a P2P client initiates a P2P connection establishment request; P2P server its own IP address query request sent to the AAA server according to the P2P client; query to the AAA server geographic house address to the P2P server; P2P server updates its own stored address mapping table, and find the IP address of at least one P2P peer associated with the seed file; query geographic numbers address P2P peer IP address corresponding to the address mapping table and according to P2P close strategy chosen for the client side, forming P2P peer group; the P2P peer group returned to the P2P client, so that the P2P client and P2P establishing P2P its peer group clients like connector . According to the present invention is to optimize the physical position information of peer to peer connection, the P2P connection between the nearest implement peer, P2P connection further improve the stability, and improving the utilization efficiency of network bandwidth.