METHOD BASED ON THE COMBINATION OF THE UPnP AND STUN FOR NAT TRAVERSAL
First Claim
1. A method based on the combination of UPnP and STUN for NAT traversal, is characterized of including the steps as follow:
- (1) the peer joining into the P2P streaming media system broadcast-searches the message for UPnP device in the internal net by the SSDP protocol;
void Search(char* name, const char* type), wherein, according to the requirement of UPnP standard, the parameter name is “
WANIPConnection” and
the parameter type is “
service”
meaning searching UPnP service;
(2) if searching UPnP service succeeds, sending the Port-Adding message to the NAT gateway control URL by the SOAP protocol;
void InvokeCommand(char* name, char* args), wherein the parameter name is control command “
AddPortMapping”
to UPnP device, and args is the several other parameters required by UPnP standard,so that after adding port mapping the inner peer can connect with the outer peer for data communication, and NAT traversal is realized; and
(3) if searching fails, the peer initiates STUN model to perform NAT traversal for the second time;
void GetMapAddr(int&
extIP, int&
extPort, NatType&
natType), wherein the parameters extIP and extPort are the outer IP and Port obtained by STUN, and the parameter natType is the type of NAT determined during traversing.
2 Assignments
0 Petitions
Accused Products
Abstract
The present invention relates to a method based on the combination of UPnP and STUN for NAT traversal. The method of the present invention effectively takes the advantages of UPnP and STUN. In particularly, when UpnP fails to traverse NAT, STUN is applied to perform the NAT traversal for the second time, so that the efficiency of the successful traversal is effectively improved. For the symmetric NAT traversal, a Port-Adding Sample Estimation method based on NAT adding port mapping is provided for port estimation, to avoid the defects resulted from the third-party agent and the blindness of the speculation approach. And, where both of the communication peers in the P2P streaming media system are behind NAT, the method that the part of the ordinary outer peers with the sufficient bandwidth acts as the Auxiliary-Relay peers is provided to release the pressure of the relay server so that the bottle-neck of the communication is broken through.
20 Citations
4 Claims
-
1. A method based on the combination of UPnP and STUN for NAT traversal, is characterized of including the steps as follow:
-
(1) the peer joining into the P2P streaming media system broadcast-searches the message for UPnP device in the internal net by the SSDP protocol; void Search(char* name, const char* type), wherein, according to the requirement of UPnP standard, the parameter name is “
WANIPConnection” and
the parameter type is “
service”
meaning searching UPnP service;(2) if searching UPnP service succeeds, sending the Port-Adding message to the NAT gateway control URL by the SOAP protocol; void InvokeCommand(char* name, char* args), wherein the parameter name is control command “
AddPortMapping”
to UPnP device, and args is the several other parameters required by UPnP standard,so that after adding port mapping the inner peer can connect with the outer peer for data communication, and NAT traversal is realized; and (3) if searching fails, the peer initiates STUN model to perform NAT traversal for the second time; void GetMapAddr(int&
extIP, int&
extPort, NatType&
natType), wherein the parameters extIP and extPort are the outer IP and Port obtained by STUN, and the parameter natType is the type of NAT determined during traversing. - View Dependent Claims (2, 3, 4)
-
Specification