WO2009129692A1 - 一种系统终端设备建立nat穿越通道的方法 - Google Patents

一种系统终端设备建立nat穿越通道的方法 Download PDF

Info

Publication number
WO2009129692A1
WO2009129692A1 PCT/CN2009/000427 CN2009000427W WO2009129692A1 WO 2009129692 A1 WO2009129692 A1 WO 2009129692A1 CN 2009000427 W CN2009000427 W CN 2009000427W WO 2009129692 A1 WO2009129692 A1 WO 2009129692A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
terminal device
test point
system terminal
data receiving
Prior art date
Application number
PCT/CN2009/000427
Other languages
English (en)
French (fr)
Inventor
傅川
王迪
张国清
杨清峰
秦卓琼
Original Assignee
中国科学院计算技术研究所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院计算技术研究所 filed Critical 中国科学院计算技术研究所
Publication of WO2009129692A1 publication Critical patent/WO2009129692A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal

Definitions

  • the present invention relates to the field of computer network communication technologies, and more particularly, to a method for a system terminal device to establish a NAT traversal channel.
  • NAT Network Address Translator
  • the NAT device provides the address translation function for the private network (referred to as the private network) address controlled by the NAT.
  • the host in the private network can transparently access the external network address. The reverse access is not possible.
  • the private network address of the host under the NAT is on the external network.
  • the medium is not routable.
  • the external network host cannot directly access the hosts in the private network, and hosts in different private networks cannot communicate directly in many cases. This is an end-to-end deployment of many hosts in the private network. Communication brings many problems and challenges.
  • NAT traversal technology the technology for solving host communication problems deployed in private networks is NAT traversal technology, and many research groups and standardization organizations have made a lot of meaningful work.
  • ALG Application Lay Gate
  • Relaying, Connection Reversal, Hole Punching, etc. also appear like middle box communication ( Middle Box Communication), Simple Traversal of User Datagram Protocol Through NAT (STUN), TRANS (Travensal Using Relay NAT, TURN), Interactive Connectivity Establishment (ICE), etc.
  • a standard or draft used to resolve NAT traversal problems A standard or draft used to resolve NAT traversal problems.
  • the present invention proposes a method for a system terminal device to establish a NAT traversal channel.
  • a method for a system terminal device to establish a NAT tunneling channel includes:
  • Step 1) the calling party system terminal device obtains the data receiving port and the network address, the hierarchical information, the data receiving port and the network address on the NAT device by forwarding the service node, respectively, and forwards the data receiving port and the network address on the service node.
  • the data receiving port and the network address, the data receiving port and the network address on the NAT device, and the data receiving port and the network address on the system terminal device are sent to the system terminal device of the called party;
  • Step 2) the called party system terminal device receives the connection request and the network address, the tier information, and the data receiving port on the NAT device, which are sent by the calling party system terminal device and carries the calling party receiving data port and the network address. And network address;
  • Step 3 the data sending port of the called party's system terminal device sequentially performs a pass-through test for the data receiving port and the network address on the calling party system terminal device, and the target is the caller forwarding data receiving on the service node.
  • the port and network address forwarding test, the target is the traversal test of the data receiving port and the network address on the calling party NAT device, and confirms that the calling party receives the data port and the network address;
  • Step 4) After the system terminal device of the called party confirms that the calling party receives the data port and the network address, the network address and the port that the called party receives the data are sent to the calling terminal system terminal device;
  • Step 5 After receiving the above message, the calling party system terminal device converts the state of the data receiving test point of the calling party system terminal device and the port corresponding to the data sending test point into a non-test state.
  • the forwarding service node is configured to assist a system terminal device that communicates with each other to establish a data delivery path or perform data forwarding between the system terminal devices, where the forwarding service node has configuration information storage means for storing the forwarding service node.
  • the forwarding service node is configured to send and receive data from the network, and the forwarding service node has a service point storage device for recording and forwarding data on the service node Receiving a data receiving test point on the test point, and its corresponding NAT device or on the system terminal device, the forwarding service node has an identification recording device, and in the call, the recorded information is used to locate the system terminal device, and assist in processing the call.
  • And sending the call response message including: identifier, a network address and port of the system terminal device corresponding to the identifier, and a network address and port of the related NAT device, where the forwarding service node has a port state recording device, configured to record the node Whether the port status is a test status.
  • the system terminal device can access the forwarding service node.
  • the system terminal device can run the client, or the server, or both the client and the server.
  • the system terminal device can send and receive data.
  • the system terminal device has a device for storing configuration information of the device; the device stores the identifier and network address of the terminal device of the system. This identifier uses the identity of the user of the current device, or the identity of the service that the current device is running.
  • the system terminal device has a device for recording the correspondence between the data receiving addresses of the communication parties, and includes: a network address and a port for receiving data belonging to the terminal device of the system, a network address for receiving data belonging to the terminal device of the counterpart system, and Items such as ports.
  • the system terminal device has a device for recording the entry point of the forwarding service node, including: a network address, a port.
  • the system terminal device has an operation control module that controls the execution of the system terminal device.
  • the system terminal device has a device for recording and forwarding the service node data receiving test point, including: network address, port, and hierarchical information.
  • the system terminal device has a device for recording data receiving test points on the NAT device, including: a network address and a port.
  • the system terminal device has a device for recording data receiving test points on the terminal device of the system, including: port and port status.
  • the system terminal device has a device for recording a data transmission test point on the system terminal device, including: port, port status.
  • the port status is used to record whether the status of the port on the system terminal device is the test status.
  • the system terminal device has a device for recording the relationship between the terminal data transmission point and the data transmission target point of the system, including: the terminal data transmission point port of the system, the network address and port of the other party data delivery destination.
  • the system terminal device has a device for recording mandatory test points, including: network address, end mouth.
  • the system terminal device has a device for recording a data transmission test point on the other party's NAT, including: a network address and a port.
  • the system terminal device has a device for recording the data receiving test point of the other party forwarding service node: network address, port, and hierarchical information.
  • the system terminal device has a device for recording data reception test points on the other party's NAT device: network address, port.
  • the system terminal device has a device for recording data reception test points on the terminal of the other system: a network address and a port.
  • the forwarding service node sets the state of the port corresponding to the data receiving test point of the forwarding service node to the test state after the data receiving test point of the forwarding service node is allocated to the system terminal device;
  • the forwarding service node receives the test request message of the other party or the response message of the test request message at the data receiving test point of the forwarding service node, and receives the data corresponding to the current data receiving test point of the forwarding service node.
  • Test point forwarding the received data packet
  • the data receiving test point of the forwarding service node extracts the source address of the data packet carrying the message if the message type is a normal forwarding test message or a response message of a normal forwarding test message. And the source port, and add the obtained source address and source port in the message, and mark it as a forwarding service node to add;
  • the data receiving test point of the forwarding service node extracts the source address and the source port of the data packet carrying the message, and in the message Join the obtained source address and source port, and mark it as a forwarding node add.
  • the step 1) further includes: the calling party system terminal device receives the data receiving test point and data of the calling party system terminal device when requesting the forwarding service node of the calling party system terminal device to forward the data receiving test point of the serving node
  • the port status corresponding to each of the sending test points is set to the test state.
  • step 1) the system terminal device of the called party and the system terminal device of the calling party can access the forwarding service node.
  • the step 1) further includes: when the calling party system terminal device acquires the data receiving port and the network address on the forwarding service node, acquiring the hierarchical information of the forwarding service node in the multi-layer NAT network.
  • the step 2) further comprises: the called party system terminal device, when requesting the forwarding service node of the called party system terminal device to forward the data receiving test point of the service node, the data receiving test of the called party system terminal device Point The port status corresponding to each of the data transmission test points is set to the test state.
  • step 2) the system terminal device of the called party and the system terminal device of the calling party can access the forwarding service node.
  • the step 2) further includes: when the called terminal system terminal device obtains the data receiving port and the network address on the forwarding service node, acquiring the hierarchical information of the forwarding service node in the multi-layer NAT network.
  • step 3) further comprises:
  • Step A20 the system terminal device of the called party sends a through test to the data receiving test point of the system terminal device of the calling party through its own data transmission test point;
  • Step A21 after receiving the through test request message, the system terminal device of the calling party performs a through test and returns a response message;
  • Step A22 when the response message does not pass through the forwarding server, or the system terminal device of the called party sends a mandatory test message to the calling system terminal device by using its own data receiving test point, and establishes a NAT traversal channel.
  • the system terminal device of the called party confirms that the calling party receives the data port and the network address.
  • step 3) further comprises:
  • Step B20 when the system terminal device of the called party does not receive the direct response message or cannot establish the NAT traversal channel, initiate a forwarding test by using the data transmission test point of the called party to forward the data receiving test point on the serving node to the calling party.
  • Step B21 after receiving the forwarding test message, the system terminal device of the calling party performs a forwarding test and returns a response message;
  • Step B22 when there is a response message in the returned response message that has not been forwarded by the forwarding point, the called party sends an asymmetric forwarding from the data transmission test point of the system terminal device to the data reception test point on the calling party forwarding service node.
  • Test request when there is no response message that has not been forwarded by the forwarding point in the returned response message, confirm the update of the forwarding point of the calling party, adjust the forwarding point, and restart the forwarding test.
  • step 3) further comprises:
  • Step C20 the data transmission test point of the system terminal device of the called party initiates a NAT traversal test to the data receiving test point on the calling party NAT device;
  • Step C21 after receiving the NAT traversal test message, the system terminal device of the calling party performs a NAT traversal test and returns a response message; Step C22), the system terminal device of the called party determines, according to the response message, a network address and a port for receiving data of a caller available to the called party.
  • the data receiving test point includes a data receiving test point on the forwarding service node, a data receiving test point on the NAT device, and a data receiving test point on the system terminal device, where the data sending test point includes data on the NAT device.
  • the state of the data transmission test point on the system terminal device is the test state
  • the state of the data reception test point on the system terminal device is the test state
  • the test request message of the through test includes a data receiving test point on the forwarded service node of the called party, and a data receiving test point on the system terminal device.
  • step )20) further comprises: the called party waiting for a return message at a data receiving test point on the system terminal device.
  • step A21) further comprises:
  • Step A210 the caller's system terminal device extracts the test request message in the pass-through test, and the called party forwards the data receiving test point on the service node and the data receiving test point on the system terminal device to obtain the test request message.
  • the source address in the data packet
  • Step A211 when the network address of the data receiving test point on the system terminal device of the called party is the same as the source address in the data packet carrying the test request message, receiving test points to the data of the system terminal device of the called party Return the two sides to reach the reachable message;
  • Step A212 when the network address of the data receiving test point of the system terminal device of the called party is different from the source address in the data packet carrying the test request message, the calling party sends a test point from the data transmission point of the system terminal device to the The data receiving test point on the calling party's forwarding service node sends a response message including a mandatory test point, and waits for a mandatory test message at the data sending test point; Step A213), after the system terminal device of the calling party acquires the source address and the source port carried in the data packet carrying the mandatory test message, sends the source address and the source port carried by the data sending test point to the data packet carrying the mandatory test message. Returning a mandatory test response message, the message includes the source address and the source port, and waiting for a test request message at a data receiving test point on the system terminal device;
  • Step A214 after receiving the pass through test request message, acquiring a data receiving test point on the new NAT device in the message, and receiving data from the data sending test point of the calling party system terminal device to the new NAT device The test point returns to the passthrough test response message.
  • step A21) further comprises:
  • Step A210 the caller's system terminal device extracts the test request message in the pass-through test, and the called party forwards the data receiving test point on the service node and the data receiving test point on the system terminal device to obtain the test request message.
  • the source address in the data packet
  • Step A211 when the calling party determines that the source address of the data packet carrying the test message is the same as the network address of the data receiving test point of the terminal device of the called party system, the two parties can directly pass, add a test end flag to the response message, and join
  • the data receiving test points of the two parties are the data receiving test points of the terminal devices of the two systems.
  • the called party After receiving the response message, if the called party includes the test end flag, the corresponding data receiving test points are taken as the data receiving test of the two parties according to the indication of the message.
  • Step A212 when the network address of the data receiving test point of the system terminal device of the called party is different from the source address in the data packet carrying the test request message, the calling party sends a test point from the data transmission point of the system terminal device to the The data receiving test point on the calling party's forwarding service node sends a response message including a mandatory test point, and waits for a mandatory test message at the data sending test point;
  • Step A213 After the system terminal device of the calling party acquires the source address and the source port carried in the data packet carrying the mandatory test message, the system sends a return test response message to the source address and the source address carried in the data packet carrying the mandatory test message.
  • the message includes the source address and the source port, and waits for a test request message at a data receiving test point on the system terminal device;
  • Step A214 after the caller receives the passthrough test request message, add a test end flag to the response message traversing the through test message, and join the data receiving test point of both parties as the data receiving test point of the calling party system terminal device,
  • the data on the caller's new NAT device receives the test point, and the called party receives the response message.
  • the message includes the test end flag
  • the corresponding data reception test point is used as the data reception test point of both parties according to the instruction of the message.
  • step A22) further comprises:
  • Step A220 the system terminal device of the called party obtains a return message, confirms that both parties can pass through, and the data receiving test points on the system terminal devices of the two parties are respectively received addresses, and the called party system terminal is returned to the calling party.
  • the data on the device receives the test point;
  • Step A221) the system terminal device of the called party confirms that the two parties are not directly reachable, obtains a mandatory test point in the response message, and sends a mandatory test message from the data receiving test point on the system terminal device to the mandatory test point;
  • Step A222) After receiving the returned mandatory test response message, the data receiving test point of the system terminal device of the called party obtains the test point in the response message, and uses it as a data receiving test point on the new NAT device, from The data sending test point sends a traversal test request message to the data receiving test point on the system terminal device of the calling party, where the traversing through test request message includes a data receiving test point on the new NAT device;
  • Step A223) the system terminal device of the called party acquires a return message, confirms that both parties can forward the pass-through, and receive data from the data receiving test point on the new NAT device of the called party's system terminal device and the system terminal device of the calling party.
  • the test points are the respective receiving addresses, and the records are received and corresponding.
  • the test request message of the forwarding test includes a data receiving test point on the forwarding service node of the called party, a data receiving test point on the NAT device, and a data receiving test on the system terminal device. point.
  • the test request message of the forwarding test may further include hierarchical information of the data receiving test point on the forwarded service node of the called party, and the hierarchical information of the data receiving test point on the forwarding service node is empty by default.
  • the test request message of the forwarding test includes the hierarchical information of the data receiving test point on the forwarded service node of the called party.
  • the step B20) further includes: the called party waiting for a return message at a data receiving test point of the system terminal device.
  • step B21 when the received forwarding test message is an asymmetric forwarding test request message, step B21) further includes:
  • Step B210 the calling party system terminal device acquires the mandatory test point in the test request message, and receives the test point from the data on the system terminal device to the called party.
  • the test point sends a mandatory test message
  • Step B211 the data receiving test point of the calling party on the system terminal device waits for a mandatory test response message
  • Step B212 the calling party system terminal device acquires a new receiving point in the mandatory test response message, as a data receiving test point on the calling party's new NAT device, and sends a test point from the calling party system terminal device to the called party system.
  • the data receiving test point on the terminal device transmits an asymmetric forwarding test response message including the data receiving test point on the calling party's new NAT device.
  • step B21 when the received forwarding test message is an asymmetric forwarding test request message, step B21) further includes:
  • Step B210 the calling party system terminal device acquires the mandatory test point in the test request message, and sends a mandatory test message from the data receiving test point on the system terminal device to the mandatory test point of the called party;
  • Step B211 the data receiving test point of the calling party on the system terminal device waits for a mandatory test response message
  • Step B212 the calling party system terminal device acquires a new receiving point in the mandatory test response message, as a data receiving test point on the new NAT device of the calling party, and adds a test end flag to the response message of the asymmetric forwarding test message, and
  • the data receiving test point of the joining party is the data receiving test point on the new NAT device of the calling party, and the data receiving test point of the terminal device of the called party system, after the called party receives the response message, if the message includes the test end flag, According to the instruction of the message, the corresponding data receiving test point is used as the data receiving test point of both parties.
  • step B21 when the received forwarding test message is a normal forwarding test request message, step B21) further includes:
  • Step B210 the calling party system terminal device acquires the data receiving test point on the forwarding service node of the called party in the normal forwarding test message, the data receiving test point on the NAT device, and the data receiving test point on the system terminal device, and obtains The network address and port added by the calling party's forwarding service node sends a test status cancel message to the data receiving test point of the calling party's forwarding service node;
  • Step B21K determining whether there is hierarchical information in the message. If the determination is yes, obtaining the hierarchical information of the data receiving test point on the forwarding service node of the called party, and comparing the level of the data receiving test point on the forwarding service node of the two parties, If the levels are the same, go to step B211); if the level is different, go to step B212); if the answer is no, go directly to step B211); Step B211), the calling party sends a tunneling message from the data receiving test point on the system terminal device to the network address and port added by the data receiving test point of the calling party's forwarding service node, and the data transmission test point is sent from the calling party system terminal device respectively. Sending a response message to the data receiving test point on the forwarded service node of the called party and the data receiving test point on the system terminal device;
  • Step B212 the calling party system terminal device re-acquires the data receiving test point on the new forwarding service node and the data receiving test point on the new NAT device according to the hierarchical information of the data of the receiving service node of the forwarded service node of the called party, Sending a response message from the data transmission test point of the caller system terminal device to the data reception test point on the forwarded service node of the called party and the data reception test point on the system terminal device, wherein the response message includes a new forwarding service node The data on the test point and the data reception test point on the new NAT device.
  • step B22) further includes:
  • step B22 the step of determining to generate a new traversing test point further includes:
  • Step B220 waiting for a mandatory test message on a data transmission test point on the system terminal device of the called party;
  • Step B221) Obtain a source address and a source port carried by the data packet carrying the mandatory test message, and return, from the data transmission test point on the system terminal device of the called party, the source address and the port, including the source address and the port. Forced test response message;
  • Step B222 the system terminal device of the called party acquires the response information of the asymmetric forwarding test request from the calling party, and replaces the system terminal of the original calling party with the data receiving test point on the new NAT device of the system terminal device of the calling party.
  • the data on the device's NAT device receives the test point.
  • step B22) further includes:
  • Step B220 when it is determined that a new traversal test point is not generated, and when there is a response message forwarded by the forwarding point in the cached message, the path information in the return message is acquired, and the network address added by the forwarded service node of the called party is obtained.
  • the port sends a hole-piercing message from a data receiving test point on the called party's system terminal device to a network address and port added by the called party's forwarding service node; Step B221), determining whether a data receiving test point of the new forwarding service node of the calling party appears in the returned response message;
  • Step B222 if there is a data receiving test point of the calling party's new forwarding service node, adjusting the forwarding point to obtain the data receiving test point of the calling party's new forwarding service node instead of the original calling party forwarding the data on the service node
  • the data receiving test point on the NAT device of the system terminal device of the new calling party replaces the data receiving test point on the NAT device of the system terminal device of the original calling party;
  • Step B223) If there is no data receiving test point of the new forwarding service node of the calling party, the data receiving test points on the forwarding service nodes of the two parties are the respective data receiving addresses, and the correspondence is recorded and received.
  • step B23 further comprises:
  • Step B230 when there is no response message that is not forwarded by the forwarding point, the path information in the return message is acquired, and the network address and port added by the forwarding service node of the called party are obtained, from the system of the called party.
  • the data receiving test point on the terminal device sends a hole punching message to the network address and port added by the forwarded service node of the called party;
  • Step B231) determining whether there is a new data forwarding test point of the calling party in the returned response message
  • Step B232 if there is a data receiving test point of the calling party's new forwarding service node, adjusting the forwarding point to obtain the data receiving test point of the calling party's new forwarding service node instead of the original calling party forwarding the data on the service node
  • the data receiving test point on the NAT device of the system terminal device of the new calling party replaces the data receiving test point on the NAT device of the system terminal device of the original calling party;
  • Step B233 if there is no data receiving test point of the new forwarding service node of the calling party, the data receiving test points on the forwarding service nodes of the two parties are the respective data receiving addresses, and the correspondence is recorded and received.
  • step C21) further comprises:
  • Step C210 after receiving the NAT traversal test message, the system terminal device of the calling party acquires the source address of the data packet carrying the message; compares the source address with the network address of the data receiving test point of the system terminal device of the called party Whether they are the same; Step C211), if the addresses are the same, receive test points from the data transmission test point of the calling party's system terminal device to the data on the called party's system terminal device Send a reply message;
  • step C21) further comprises:
  • Step C210 after receiving the NAT traversal test message, the system terminal device of the calling party acquires the source address of the data packet carrying the message; compares the source address with the network address of the data receiving test point of the system terminal device of the called party Whether it is the same; Step C211), if the addresses are the same, add a test end flag to the response message traversing the test message, and join the data receiving test point of both parties as the data receiving test point and the called party system terminal on the calling party's new NAT device.
  • the data receiving test point of the device after receiving the response message, if the called party includes the test end flag, according to the instruction of the message, the corresponding data receiving test point is used as the data receiving test point of both parties;
  • step C22) further includes:
  • Step C220 the called party receives a response message on the data receiving test point on the system terminal device
  • Step C221) determining whether there is a record in the received correspondence relationship of the record that the data receiving test point on the service node is forwarded as the receiving correspondence relationship;
  • Step C222 If yes, the data receiving test points on the NAT devices of the two parties are used as respective receiving addresses, establishing a receiving correspondence relationship, and recording the receiving corresponding relationship;
  • Step C223) if not, the data receiving test point on the system terminal device of the called party and the data receiving test point on the calling party NAT device as respective receiving addresses, establishing a receiving correspondence relationship, and recording the receiving corresponding relationship.
  • Step 4) further includes: the called party sends a test status cancel message to the data receiving test point on the forwarded service node of the called party from the data receiving test point on the called party system terminal device, and the called party sends the system terminal
  • the status of the corresponding port of the data receiving test point and the data sending test point on the device is set to Non-test status;
  • step 4) further comprises: finding a last joined record from the data reception correspondence record of the called party and the calling party, and returning to the calling party the data receiving port and the network address of the called party in the last record.
  • the present invention considers the diversity of end-to-end communication under multi-level NAT, and fully utilizes the network resources in the private network formed by multi-level NAT, and can implement NAT traversal in various scenarios; the method can be applied to full cone type and IP restriction.
  • the test results consisting of the network address and port generated by this method can be used for subsequent data transmission.
  • the communication between the system terminal devices, the method can realize the traversal of the private network, and limit the data flow to the private network, thereby reducing the pressure on the backbone network; in the testing process, the method can be One or two channels need to be opened on the NAT device.
  • Figure 1 shows the same root multi-layer NAT network
  • Figure 1 shows the tester's overall test flow
  • Figure 3 shows the overall test flow of the tested party
  • Figure 4 shows the test side passthrough test flow
  • Figure 5 shows the pass-through test flow of the tested party
  • Figure 6 shows the tester forwarding test flow
  • Figure 7 shows the test flow forwarded by the tested party
  • Figure 8 shows the tester NAT traversal test flow
  • Figure 9 shows the NAT traversal test flow of the tested party.
  • FIG. 1 is a schematic diagram showing the structure of a multi-layer multi-layer NAT network.
  • a private network 4-1 accesses the public network 3 through the NAT device 1001, and a private network 4-2 accesses the private network 4-1 through another NAT device 1002.
  • the private network accessing the public network 3 through the NAT device 1001 is the network controlled by the NAT device
  • the private network 4-2 accessing the private network 4-1 through the NAT device 1002 is the network controlled by the NAT device.
  • the NAT device directly connected to the public network 3 is a root NAT device.
  • the number of minimum NAT devices that each private network passes through to the public network 3 is the layer of the private network.
  • the path is the shortest path from the private network to the public network 3.
  • a multi-layer NAT network can be thought of as a combination of multiple multi-rooted NAT networks.
  • a multi-layer NAT network can be thought of as a combination of multiple multi-rooted NAT networks.
  • the level of the public network is 0.
  • Multi-layer NAT networks increase the number of users' accesses and make the relative positions of the two parties more complicated.
  • the multi-layer NAT network turns the public network flat communication mode into a hierarchical communication mode.
  • the typical relationship between the two parties is: (1) the two communicating parties are in the public network; (2) the communicating party is in the private network extended by the NAT device, and the other party is in the public network; In the private network controlled by the same NAT device; (4) the two communicating parties are in the private network controlled by different NAT devices, and the two NAT devices are connected to the public network through different root NATs; (5) the two communicating parties are in different NAT devices.
  • the two NAT devices are connected to the public network through the same root NAT.
  • the present invention describes the NAT network described in the fifth case as a homogeneous multi-layer NAT network.
  • the network address of the NAT device refers to the network address bound to the external network interface of the NAT device.
  • the NAT device external network interface can be bound to multiple network addresses.
  • multiple network addresses can be mapped to one NAT device by enumerating addresses or enumerating network segments. Ordinary users can access the network through the low-end NAT device.
  • the external interface of the NAT router is generally bound to a network address.
  • a NAT device external network interface is bound to only one network address. Therefore, a NAT device can be represented by a network address bound to the external network interface of the NAT device. It is not difficult for the development designer to find that the method described below is also applicable to NAT devices with external network interfaces bound to multiple network addresses.
  • the network address of the NAT device is the network address bound to the external network interface of the NAT device, or the NAT router address.
  • the address can be a public address or a private address.
  • Direct upper layer network If the external network interface of NAT device A is directly connected to the network controlled by NAT device B, the network controlled by NAT device B is the direct upper layer network of the network controlled by NAT device A; the public network is the network controlled by the root NAT device.
  • Direct lower layer network If the external network interface of NAT device A is directly connected to the network controlled by NAT device B, the network controlled by NAT device A is the direct lower layer network of the network controlled by NAT device B; the network controlled by the root NAT device is the public network. Directly underlying network.
  • NAT path length The number of NAT devices passing through the reachable path of hosts A to B is the length of the NAT path.
  • the shortest NAT path In the NAT environment, the shortest NAT path with the smallest length of the NAT path is the shortest NAT path called A to B. The number of NATs that pass through is the shortest NAT path length.
  • the upper layer network the direct upper layer network of the network controlled by the current NAT device, the network controlled by each NAT device and the public network of the public network, and is the upper layer network of the network controlled by the current NAT device.
  • Lower layer network The network controlled by each NAT device from the direct network of the public network or the network controlled by the current NAT device, which is the lower layer network of the public network or the network controlled by the current NAT device.
  • Network to which the device is deployed The network to which the device is deployed on the public network is the public network.
  • the network to which the device is deployed on the network controlled by the NAT device is the network controlled by the NAT device.
  • the network to which the device belongs is the public network or the lower-layer network of the network controlled by the current NAT device.
  • the device is behind the NAT.
  • the level information is used to indicate the shortest number of NAT paths from the current network to the public network. The larger the value, the farther away from the public network. The smaller the value, the closer to the public network, and the 0 is the public network.
  • the service is used to assist a system terminal device that wants to communicate with each other to establish a data delivery path or to perform data forwarding for the system terminal device; each node providing the service needs to have a device for storing configuration information of the service node.
  • the device storage information includes: the host name of the service node, the host network address, the port, and the hierarchical information of the service node.
  • the service point recording device records the data reception test point on the forwarding service node, and the data reception test point on the corresponding NAT device or on the system terminal device.
  • the logic control module controls the execution of the forwarding service point.
  • Identification record table in the call, the recorded information is used to locate the system terminal device to assist in processing the call and call response message
  • the sending including the identifier, the network address and port of the system terminal device corresponding to the identifier, and the network address and port of the related NAT device.
  • the forwarding service node has a port status recording device for recording whether the node port status is a test status.
  • the system terminal device can access the forwarding service node.
  • the client device can be run on the terminal device of the system, or the server can be run, or both the client and the server can be run at the same time.
  • the system terminal device can send and receive data.
  • the system terminal device has a device for storing configuration information of the device; the device stores the identity and network address of the terminal device of the system. This identifier identifies the identity of the user who is using the current device, or the identity of the service that the current device is running.
  • the system terminal device has a device for recording the correspondence between the data receiving addresses of the communication parties, and includes: a network address and a port for receiving data belonging to the terminal device of the system, a network address for receiving data belonging to the terminal device of the counterpart system, and Items such as ports.
  • the system terminal device has a device for recording the entry point of the forwarding service node, including: a network address and a port.
  • the system terminal equipment has an operation control module that controls the execution of the system terminal equipment.
  • the system terminal device has a device for recording and forwarding service node data receiving test points, including: network address, port, and hierarchical information.
  • the system terminal device has a device for recording data reception test points on the NAT device, including: network address, port.
  • the system terminal device has a device for recording data receiving test points on the system terminal device, including: port and port status.
  • the system terminal device has a device for recording data transmission test points on the system terminal device, including: port, port status.
  • the port status is used to record whether the status of the port on the system terminal device is the test status.
  • the system terminal device has a device for recording the relationship between the data transmission point of the system terminal and the data transmission destination point, including: the system terminal data transmission point port, the network address and port of the other party data delivery destination.
  • the system terminal has a device for recording mandatory test points, including: network address, port.
  • the system terminal device has a device for recording a data transmission test point on the other party's NAT, including: a network address and a port.
  • the system terminal device has a device for recording the data receiving test point of the other party forwarding service node: network address, port, and hierarchical information.
  • the system terminal device has a device for recording data reception test points on the other party's NAT device: network address, port.
  • the system terminal device has a device for recording data reception test points on the terminal of the other system: network address and port. How the system works
  • a forwarding service node is deployed in a network controlled by a public network and a NAT device.
  • the system terminal device needs to know the network address and port of the forwarding service node deployed in the public network.
  • the system terminal device needs to know the network address and port of the forwarding service node deployed in the network controlled by the current NAT device and the network address and port of each forwarding service node in the upper layer network;
  • the network device controlled by the current NAT device does not forward the service node.
  • the system terminal device needs to know the network address and port of each forwarding service node in the upper layer network.
  • the system terminal device can be configured by a manual configuration, such as a system administrator, to obtain the network address and port of the relevant forwarding service node.
  • the forwarding service node network address and port can be accessed by the system terminal device.
  • the services that the forwarding service node can provide are:
  • the system terminal device After obtaining the forwarding service node, the system terminal device sends a login message to the forwarding service node to the user or the application, including: message category, identifier, network address and port of the terminal device of the system.
  • the forwarding service node that receives the login message records the network address and port on the NAT device if the login message is forwarded by the NAT device, in addition to the information such as the identifier, network address, and port in the login message.
  • Various services and applications can also register their logos as described above.
  • a forwarding service node deployed in the public network; for a system terminal device used in a network controlled by the NAT device, its identity is recorded in the current NAT device control
  • the forwarding service node in the network and the forwarding service node in the upper layer network If the service node is not forwarded in the network controlled by the current NAT device, its identity is recorded in the forwarding service node in the upper layer network.
  • the system terminal device periodically sends a login message to the forwarding service node.
  • the data receiving test point on the forwarding service node is used to receive data and forward the data to the system terminal device applying for the test point.
  • This test point consists of a network address and port.
  • the test point can be accessed by various system terminal devices participating in the data communication.
  • the method to get the test point is:
  • the system terminal device requests the forwarding service node of the system terminal device to forward the data receiving test point of the service node, the system corresponding to the data receiving test point and the data transmission test point of the system terminal device is set to the test state.
  • Department The terminal device forwards a data receiving test point request message to the one or more forwarding service nodes according to the locally saved network address and port configuration of the forwarding service node entry point, where the message includes at least: a message type of the message; The current identity, such as the user identity; the identity of the requested target, such as the user identity of the requested user. By default, the request message does not contain hierarchical information.
  • the request message may add the hierarchical information as needed, and the forwarding service node that does not meet the hierarchical information returns a failure response message to the terminal device of the system, and the forwarding service node that conforms to the hierarchical information returns the relevant response message to the terminal device of the system according to the logic.
  • the forwarding service node After the forwarding service node receives the forwarding data receiving test point request message, it determines whether there is hierarchical information in the request message, and if so, whether the hierarchical information is the same as the hierarchical information of the local node, and if not, returns a failure response message; There is no hierarchical information in the request message, or the hierarchical information in the request message is the same as the hierarchical information of the local node, and the local identification record is used to find out whether the requested identifier exists. If the requested identifier is in the local identification record table, it is the system terminal.
  • the device allocates a data receiving test point, records the data receiving test point in the service point recording device, and returns a success response message including the data receiving test point and the hierarchical information to the system terminal device that sends the request message, and the data receiving
  • the test point can be accessed by the system terminal device that is requested to run or use the target device; if the requested identity is not in the local user record table, a failure response message is returned to the system terminal device that sent the request message.
  • the port state corresponding to the data receiving test point is set to the test state.
  • the system terminal device records the network address and port of the forwarding service point included in the success response message, and the hierarchical information. After receiving the response message from all forwarding service nodes, the network address and port in the message, and the hierarchical information are extracted and recorded. If only one successful response message is received, the corresponding network address and port are used as the terminal device of the system. Forwarding the data receiving test point on the service node. If only multiple success response messages are received, select the network address and port of the forwarding service node with the highest hierarchical information value as the data receiving test point on the forwarding service node of the terminal device of the system.
  • the system terminal device After acquiring the data receiving test point on the forwarding service node, the system terminal device requests the data receiving test point from the data receiving test point on the NAT device.
  • the data reception test point on the NAT device consists of the network address and port of the NAT device.
  • the NAT device groups the data received at the test point according to the rules of the NAT device.
  • the system terminal device forwards. This method can be implemented using the method defined in the STUN (I ETF RFC 3489) protocol.
  • the status of the port corresponding to the data receiving test point of the corresponding forwarding service node is in the test state.
  • Obtain the data receiving test points on the NAT device as:
  • the system terminal device receives the test point according to the data on the locally stored forwarding service node, and sends a NAT device data receiving test point request message to the test point from the port used by the terminal device of the system for receiving data, and the message includes the message of the message.
  • the forwarding service node After receiving the NAT device data receiving test point request message, the forwarding service node extracts the source network address and the source port carried by the data packet carrying the request message, records the network address and port in the service point recording device, and The system terminal device returns a reply message containing the source network address and the source port.
  • the system terminal device After receiving the response message, the system terminal device compares the source network address and source port in the message with the network address and port used to send the NAT device data receiving test point request message. If different, the network address and port record are recorded. Receive test points for data on the NAT device. If they are the same, set the data receive test point on the NAT device to null.
  • test status cancel message includes: message category.
  • the system terminal device When a user uses a system terminal device to access system terminal devices of other users or system terminal devices that run an application.
  • the system terminal device sends a connection call request message to the request destination by forwarding the service node.
  • the specific method is:
  • the system terminal device sends a connection call request message to the one or more forwarding service nodes according to the locally configured network address and port configuration of the forwarding service node entry point, where the message includes at least: the current identifier of the device, such as the user identifier; The identifier of the request target, such as the user identifier of the requested user, the data receiving test point on the forwarding service node for receiving data, the data receiving test point on the NAT device, and the data receiving test point of the system terminal device, the system terminal device
  • the port status corresponding to the data receiving test point is the test status.
  • the forwarding service node After the forwarding service node receives the connection call request message, if the requested identity is in the local identification record table, it is requested according to the login information of the requested target. The target forwards the connection call request message. If it does not exist, a failure message is returned.
  • the system terminal device of the requested target can decide whether to agree to the connection according to logic. If it agrees, it returns a success response message. If it does not agree, it returns a failure response message. The response message needs to be forwarded by the service node. .
  • the forwarding service for the user to connect to the call request message can be implemented based on the SIP (IETF RFC3261) protocol.
  • the forwarding service node receives the response message of the test request message or the test request message of the other party at the data receiving test point of the forwarding service node, and receives the test point corresponding to the data receiving test point of the current forwarding service node in the service point recording device, and forwards the test point.
  • the data receiving test point of the forwarding service node extracts the source address and source of the data packet carrying the message if the message type is a normal forwarding test message or a response message of a normal forwarding test message after receiving the message. Port, and join the obtained source address and source port in the message, and mark it as a forwarding service node to add.
  • the data receiving test point of the forwarding service node extracts the source address and the source port of the data packet carrying the message after receiving the test message or the response message of the test message. And add the obtained source address and source port in the message, and mark it as a forwarding service node to add.
  • the diversity of NAT devices and the diversity of relative positional relationships between system terminals in a multi-layer NAT network make the relationship between data transmission and reception between system terminal devices very complicated.
  • Some end-to-end communication needs to be forwarded through the forwarding service node; some end-to-end communication can directly pass through the NAT device; some end-to-end communication can be directly connected.
  • the data receiving test point on the forwarding service node is the network address and port of the forwarding service node, which is referred to as r 3 for convenience, and is referred to as forwarding point; 2)
  • the data receiving test point on the NAT device is NAT.
  • the network address and port of the device are conveniently referred to as r2, referred to as the NAT traversal point, or the traversing point.
  • the data receiving test point on the system terminal device is the network address and port of the system terminal device, which is indicated by the convenient use of rl. During the test, rl and r 3 are in the test state.
  • Data transmission test point 1) The data transmission test point on the NAT device is the network address and port of the NAT device, which is used for convenient use of s2; 2) The data transmission test point on the system terminal device is the network address and port of the system terminal device. For convenience of using si.
  • s i is the test state.
  • the system terminal device in order to receive data, need to obtain the data receiving test point (r3) on the forwarding service node and the data receiving test point on the NAT device (r2). ), the data reception test point (rl) on the system terminal device.
  • the above data receiving ports can be represented as Ar Ar2 and Ar3.
  • the data transmission test points of the system terminal device can be expressed as As l, As2.
  • the progressive end-to-end NAT traversal channel setup method consists of three steps: data reception test point acquisition; path test; path acknowledgment.
  • a and B the two parties will be referred to as A and B respectively.
  • B is the path test initiator, that is, the called party
  • A is the path test responder, that is, the caller.
  • the acquisition of data reception test points is divided into four steps.
  • Step 1 Caller A (test responder) obtains the data receiving port and network address (r3) on the forwarding service node through the forwarding service node; the data receiving port and network address (r2) on the NAT device.
  • r3 data receiving port and network address
  • r2 data receiving port and network address
  • Step 2 Caller A passes the various data collection test points it has collected to the called party B: Arl, Ar2, Ar3.
  • the information collected by the tester can be passed to the tester via a message defined in the SIP protocol and the associated DSP protocol.
  • Step 3 Called Party B (tester) receives caller A (test responder) After the information, the called party B (tester) obtains the data receiving port and network address (r3) on the forwarding service node, the data receiving port on the NAT device, and the network address (r2) through the forwarding service node.
  • the data receiving port and network address (r3) on the forwarding service node it is necessary to ensure that the selected forwarding service node can be accessed by any party participating in the test.
  • the data receiving port and the network address on the forwarding service node it is necessary to obtain the hierarchical information of the node in the multi-layer NAT network. Start the path test.
  • Figure 2 shows the test sequence flow chart of the tester test method. This test method is performed in a fixed sequence of straight-through test, forward test, and NAT traversal test.
  • Test initiator B initiates a through test from Bs 1 to Ar 1 of test responder A;
  • S1001 Whether a direct response message is received, if yes, go to S1010, if not : to S2000;
  • S1010 Determine whether the response message has not been forwarded by the forwarding server according to the source address of the data packet carrying the response message, and if yes, go to S1040, if not, go to S1020;
  • Tester B initiates a mandatory test message from Br 1 to the mandatory test point of test responder A;
  • Tester B initiates a forwarding test from Bs l to Ar 3 of test responder A;
  • S2010 Whether to receive a forward response message, if yes, transfer to S2020, if not, to S5000;
  • S2020 Whether there is a response message in the cached message that has not been forwarded by Br3, if yes, go to S2030, if not, go to S2060;
  • Tester B sends an asymmetric forwarding test request message from Bs1 to Ar3 of test responder A;
  • S2040 Whether to generate a new crossing test point, if yes, transfer to S3000, if not, go to S2050;
  • S2050 Is there a reply message forwarded by Br3 in the cached message, if yes, go to S2060, if not, go to S5000;
  • S2060 Test whether the forwarding point of responder A is updated. If yes, go to S2070. If not, go to S2080;
  • Tester B initiates a NAT traversal test from Bs 1 to Ar 2 of test responder A;
  • FIG. 3 Initial test responder A is in the initial idle state. After receiving the test message, the test message is split, the test category of the test message is determined, and then according to the test category, the test processing module of different categories is entered, and finally the processing is completed. , returning a response message to tester B, and test responder A returns to wait for receiving the test message status.
  • S6200 Whether to receive the test message, if yes, go to S6300, if not, go to S6100;
  • S6300 Determine whether the pass-through test is based on the message type. If yes, go to S6400 : If not, go to S6500;
  • S6500 Determine whether it is a forwarding test according to the message type. If yes, go to S6600 : If not, go to S6700;
  • S6700 Determine whether it is a traversal test according to the message type. If yes, go to S6800 : If not, go to S6900;
  • S6800 Enter the traversal test response module and execute S6100 in sequence
  • test side pass-through test flow is the operation step of S1XXX from S1000 in Figure 2; the test response pass-through test flow is S6400 after the pass-through test.
  • Figure 4 shows the test pass process of Tester B:
  • S1000 Send a normal straight-through test request message from the Bs l to the tested party Arl, where the request message includes information such as the test party Brl, Br 3;
  • S1001 Set the timer BT1, wait for the response message at the B rl address, and determine whether it times out. If it does not time out and receives the response message, go to S1010-1, if it times out, go to S2000;
  • S1010-1 extracting a source address of a data packet carrying a response message
  • S1010-2 According to whether the source address of the data packet carrying the response message and the network address of the Arl are the same, it is determined whether the communication parties are directly reachable. If the same is reachable, the switch is S1040. If not, the non-through is reachable. Transfer to S1020;
  • S1020 Obtain a mandatory test point in the response message, and send a mandatory test message from the Brl to the mandatory test point;
  • S1030-1 Set the timer BT2, and wait for the feedback message in Brl to determine whether it times out. If it does not time out and receives the response message, go to S1030-2, if it times out, turn
  • S1030-2 Obtain a test point P in the mandatory test response message, denoted as Br2_new : send a passthrough test request message from Bs1 to test responder Ar1, and the message includes Br2_new;
  • S1030-3 Set the timer BT3, and wait for the response message in Brl to determine whether it times out. If it does not time out and receives the response message, go to S1030-4, if it times out, go to S2000;
  • Tester B initiates a forwarding test from Bs l to Ar 3 of the tested party A.
  • Figure 5 shows the pass-through test flow for test responder A:
  • S6400- 1 extract Brl, Br 3 in the ordinary straight-through test request message
  • S6400-6 Wait for the tester's mandatory test message on As l to determine whether the received message is a mandatory test message. If it is a mandatory test message, go to S6400-7. If it is not a mandatory test message, go to S6100.
  • S6400-7 Obtain the source address and source port carried in the data packet carrying the mandatory test message, denoted as P, and send a mandatory test response message from As l to P, and the message body includes P;
  • S6400-8 Waiting for the test message of the tester in Arl, determining whether the received message is a passthrough test request message. If the message passing through the passthrough test request is received, go to S6400-9. If it is not through the passthrough test request message, go to S6100. ;
  • S 6400-9 Obtain Br 2—new in the test message, instead of Br 2, return a response message from As 1 to Br 2 _new, and send a test status cancel message from Arl to Ar 3 ;
  • the tester forwards the test flow as Figure 2 from S2000, and the operation procedure is labeled S2XXX.
  • the test responder forwards the test flow to determine the S6600 after the test is forwarded.
  • Figure 6 shows the tester B process
  • S2000 Send a normal forwarding test request message from Bs 1 to Ar 3 of the test responder, where the message body includes the test point address Brl Br2 Br 3 of the tester B.
  • the message does not carry the level information of Br 3, Hierarchical information can be added to the message as an option;
  • S2010-4 receiving a response message, recording a source address of the data packet carrying the response message, and buffering the response message;
  • S2010-5 Whether it times out, if it times out, go to S2010-6, if there is no timeout, go to S2010-2;
  • S2010-6 Whether a response message is received in BT1, if a response message is received, go to S2020, if no response message is received, go to S5000;
  • S2020 According to whether the source address of the carrying response message is the same as the network address in the Br 3, determine whether there is a response message in the buffered response message that has not been forwarded by the forwarding point, and if there is a response message that has not been forwarded by the forwarding point, go to S2030, If there is no response message that has not been forwarded by the forwarding point, go to S2060-1;
  • S2060-1 Obtain the path information in the return message body and the network address and port added by Br3 of the tester B, and send a tunneling message from the Brl to the network address and port added by the test responder B Br3;
  • S2060-2 Is there a new forwarding test point address in the response message, if yes, go to S2070, if not, go to S2080;
  • S2030 Send an asymmetric forwarding test request message from the Bs 1 point to the Ar 3 of the test responder A, where the message body includes a mandatory test point Bs l;
  • S2040-1 Set the timer BT2, wait for the forced test message on Bs l, and determine whether it times out. If the forced test message is not received after timeout, go to S2040-2. If it times out, go to S2050, indicating that there is no new NAT device. Data reception test point generation;
  • S2040-2 Obtain the source address and the source port carried in the data packet carrying the mandatory test message, and record it as the access point P, and return a mandatory test response message to the P point, where the message body contains P;
  • S2040-3 Set the timer BT3, wait for the asymmetric forwarding test response message on the Brl, and determine whether it times out. If the asymmetric forwarding test response message is not received, go to S2040-4. If it times out, go to S2050, indicating no new. The data receiving test point on the NAT device is generated;
  • S2050 According to whether the source address of the carrying response message is the same as the network address in Br 3, determine whether there is a response message forwarded by Br3 in the buffered message. If there is a response message forwarded by the forwarding point, go to S2060-l, if not After the response message forwarded by Br3, transfer to S5000;
  • Tester B initiates NAT test from Bs l to test responder A, and executes sequentially.
  • Figure 7 shows the test responder A process
  • S6600-1 Determine whether the message is an asymmetric forwarding test request message or a normal forwarding test request message. If it is a normal forwarding test request message, go to S6600-2, if it is an asymmetric forwarding test request message, go to S 6600-10;
  • S6600-2 Extract the hierarchical information of Brl, Br2, Br 3, and Br 3 in the normal forwarding test request message, obtain the network address and port added by Ar 3 of the test responder A in the message, and from Arl to Ar 3 Send a test status cancel message;
  • S6600-3 Determine whether the message contains hierarchical information. If yes, go to S6600-4. If not, go to S6600-6.
  • 86600-5 Determine whether the value of the person and the 3 level information are the same. If they are equal, turn to S6600-6. If they are not equal, turn to S6600-8;
  • S 6600-6 Sending a tunneling message from Ar 1 to the network address and port added by Ar 3 of the test responder A;
  • S6600-7 Sends response information from As l to the tester's Brl and Br 3 respectively, and executes S6100 in sequence;
  • Test responder A re-acquires the forwarding test point Ar 3 _new and the crossing test point Ar 2 _ new;
  • S6600-9 Sends response information from As l to the tester's Brl and Br 3 respectively, and the message body contains new test point information Ar 3_new, Ar2 _new, sequentially executing S6100;
  • S 6600-11 Set the timer ATI, wait for the forced test response message on Ar 1 to determine whether it times out. If the forced test response message is not received, go to S6600-12. If it times out, go to S6100.
  • S6600-12 Obtain a new receiving point P in the message, denoted as Ar2_new, and send a road asymmetric forwarding test response message from As l to Brl, the message body includes Ar2 _new, and sequentially executes S6100;
  • the traversal test is described in detail below: The tester forwards the test flow to Figure 2 from Starting from S3000, the operation procedure is marked as S3XXX; the test response party forwarding test flow is determined as the S6800 after the forwarding test.
  • Figure 8 shows the tester B process
  • S3000-1 Sends a traversal test request message from Bs l to the test responder's Ar2;
  • S3000-2 Sets the timer BT1, waits for a response message on Brl, determines whether it times out, if it does not time out and receives a response message, go to S3000 -4, if timeout, turn
  • S3000-5 Recording the correspondence between the data receiving test points in the device corresponding to the data receiving address of the two communicating parties by using r2 of both sides as parameters, and sequentially executing S4000;
  • S3000-3 The traversal test fails, and the correspondence between the two receiving addresses is not added to the data receiving record list of both parties, and S 4000 is executed in sequence;
  • S6800-1 obtain the source address of the data packet carrying the message, and record it as IP0;
  • S6800- 2 Compare the network address of Brl and IP0 are the same. If they are equal, go to S6800-3. If they are not equal, go to S6800-4;
  • S6800- 3 Sends a response message from As l to the tester's Brl, and executes S6100 in sequence;
  • S 6800-4 sending a response message from A s 1 to the test party Br 2, sequentially executing S6100;
  • S4000 Find the record that is last added to the list from the device that receives the correspondence between the data receiving addresses of the communication parties.
  • the address and port in the record are respectively the network address and port that the tester and the test responder can use to receive data, from Br to Br. 3 sends a test status cancel message, and sets the status of the corresponding port of the data receiving test point and the data transmission test point of the system terminal device to a non-test state, and returns the data receiving port and the network address of the test party in the record to the test responder.
  • the tester's test results can be passed to the test responder via messages defined in the SIP protocol and associated DSP protocols.
  • Step 4 After testing the message received by the responder including the data receiving port and the network address of the tester, the state of the corresponding port of the data transmission test point and the data receiving test point of the system terminal device is set to a non-test state.
  • #test results of the network address and port The tester can set the data receiving test point of the test responder in the test result to the data transmission target of the corresponding port of the data transmission test point of the tester system terminal device.
  • the test responder can set the data receiving test point of the test side in the test result to the data sending target of the corresponding port of the data sending test point of the test responder system terminal device.
  • the information collected by the test responder can be passed to the tester via the SIP protocol and the message defined in the relevant DSP protocol, or the tester test result can be passed to the test responder.
  • Basic message type and content
  • test request message There are two types of messages: test request message, response message.
  • the test request message defines different test request messages by the type of request in the message;
  • the reply message defines different reply messages by the type of response in the message.
  • the basic content of the specific message is shown in Table 1 and Table 2, where Table 1 shows the basic information of the test request message, and Table 2 shows the basic information of the response message:
  • the test responder can provide the tester with the test result of the current data receiving test point by using the test request message and the current processing feature, thereby improving the processing speed of the tester.
  • test responder A When the test responder A receives the normal straight-through test request message, and determines that the source address of the data packet carrying the test message and the network address of the Brl are the same, the two parties can directly pass, add a test end flag to the response message, and join the data of both parties.
  • the receiving test points are Arl, Brl.
  • test responder A After the test responder A receives the pass through test request message, the test end flag is added to the response message traversing the through test message, and the data receiving test of both parties is added as Arl, Br2_new.
  • test responder A After the test responder A receives the asymmetric forward test request message, the test end flag is added to the response message of the asymmetric forward test message, and the data receiving test points of both parties are added as Ar2_new, Brl.
  • test responder A When the test responder A receives the traversal test request message, compares the network address of the Brl with the source address of the data packet carrying the message. If not, the test end flag is added to the response message of the traversal test message, and Add the data receiving test points of both parties to Ar2, Br2; if they are the same, add the test end flag to the response message of the traversal test message, and add the data receiving test points of both parties to Ar2_new, Brl;
  • the SDP message is taken as an example to describe the information format related to the test.
  • the SDP extension is adapted to the NAT environment as follows:
  • the request SDP is:
  • Test responder forwards the data receiving test point of the service node.
  • Party B (tester) extends the response SDP to:
  • nat-r corresponds to the data receiving test point after the tester test.
  • the forwarding server, the forwarding service point, and the forwarding service node are logically considered to be forwarding service nodes.
  • the steps for implementing the method of the present invention may not be limited to the combination in the embodiment, and some steps may be omitted in the specific implementation, or other steps mentioned in the specification may be added.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Description

一种系统终端设备建立 NAT穿越通道的方法 技术领域
本发明涉及计算机网络通信技术领域, 更具体地, 本发明涉 及一种系统终端设备建立 NAT穿越通道的方法。
背景技术
众所周知由于 IP地址有限以及分配上的不均勾, 导致网络 地址严重缺乏,从实际应用和部署上看, 网络地址翻译(Network Address Translator, NAT)技术是解决 IP地址不足情况下接入 互联网的重要方法。 随着个人信息设备的增多、 网络接入设备的 普及和网络技术的发展, 越来越多的公司、 团体和家庭希望将这 些设备以网络的方式组织在一起, 并接入互联网, 但是出于安全 的考虑,如何在网络上隐藏高安全等级的节点是很多公司面临的 问题, 在这种 IP地址严重缺乏、 设备组网互联需求迫切并且在 大量安全隐患的情况下,通过 NAT技术形成的单级或者多级私网 结构接入互联网在实际部署中已经越来越普遍和流行。
NAT设备为 NAT控制下的私有网络(简称私网 )地址提供地 址翻译功能, 使得私网内的主机可以透明地访问外部网络地址, 反向访问不可以, NAT下主机的私有网络地址在外部网络中是不 可路由的, 外部网络主机无法直接访问位于私网内的主机, 而且 不同私网内的主机之间在很多情况下也无法直接通信,这对很多 主机部署在私网内的端到端通信带来了很多问题和挑战。
目前解决部署在私有网络中的主机通信问题的技术是 NAT 穿越技术, 有不少研究团体、标准化组织都已做出了很多有意义 的工作。 目前常用的方法和技术有:应用程序网关(Application Lay Gate, ALG ). 中继 ( Relaying )、 反转连接 ( Connection Reversal ), 穿洞 ( Hole Punching )技术等, 也出现了像中间箱 通信 (Middle Box Communication), 简单 UDP穿越 NAT ( Simple Traversal of User Datagram Protocol Through NAT, STUN )、 中继穿越 NAT (Traversal Using Relay NAT, TURN )、 交互连接 建立 ( Interactive Connectivity Establishment, ICE )等一 系列提交 IETF用来解决 NAT穿越问题的标准或草案。
现有的这些技术、标准和草案都存在这样的问题: 没有考虑 多级 NAT下的穿越问题,或者只是简单地使用中继的方式通过公 网服务器进行转发实现穿越, 或者是依赖 NAT设备本身 Ha i rp in 特性利用穿洞技术实现, 这显然是十分低效的, 而且在很多场景 下无法实现。 没有考虑多级 NAT下端到端通信的多样性, 也没有 充分利用多级 NAT所构成私网内的网络资源。
发明内容
为克服现有 NAT 网络环境中转发穿越低效并且通用性差的 缺陷, 本发明提出了一种系统终端设备建立 NAT 穿越通道的方 法。
根据本发明的一个方面,提供一种系统终端设备建立 NAT穿 越通道的方法, 包括:
步骤 1 )、 呼叫方系统终端设备通过转发服务节点分别获取 转发服务节点上的数据接收端口及网络地址、及其层级信息、 NAT 设备上的数据接收端口及网络地址,并将转发服务节点上的数据 接收端口及网络地址、 NAT设备上的数据接收端口及网络地址和 系统终端设备上的数据接收端口及网络地址发送给被呼叫方的 系统终端设备;
步骤 2 )、 被呼叫方系统终端设备收到所述呼叫方系统终端 设备发送的携带有呼叫方接收数据端口和网络地址的连接请求 及网络地址、 及其层级信息、 NAT设备上的数据接收端口及网络 地址;
步骤 3 )、 被呼叫方的系统终端设备的数据发送端口向呼叫 方顺序进行目标为呼叫方系统终端设备上的数据接收端口及网 络地址的直通测试、 目标为呼叫方转发服务节点上的数据接收端 口及网络地址的转发测试、 目标为呼叫方 NAT设备上的数据接收 端口及网络地址的穿越测试,确认呼叫方接收数据端口和网络地 址;
步骤 4 )、 被呼叫方的系统终端设备确认呼叫方接收数据端 口和网络地址后,将被呼叫方接收数据的网络地址与端口发送给 呼叫方系统终端设备;
步骤 5 )、 呼叫方系统终端设备收到上述消息后, 将呼叫方 系统终端设备的数据接收测试点和数据发送测试点对应的端口 的状态转换为非测试状态。 其中,所述转发服务节点用于协助相互通讯的系统终端设备 建立数据传递路径或在系统终端设备之间进行数据转发,所述转 发服务节点具有配置信息存储装置,用于存储所述转发服务节点 的配置信息: 节点主机名称、节点主机 IP地址、端口、层级信息; 所述转发服务节点用于从网络收发数据,所述转发服务节点具有 服务点存储装置, 用于记录转发服务节点上的数据接收测试点、 及其对应的 NAT设备上的或系统终端设备上的数据接收测试点, 所述转发服务节点具有标识记录装置, 在呼叫中, 记录的信息用 于定位系统终端设备, 协助处理呼叫和呼叫应答消息的发送, 包 括: 标识、 该标识对应的系统终端设备的网络地址和端口、 及相 关 NAT设备的网络地址和端口, 所述转发服务节点具有端口状态 记录装置, 用于记录该节点端口状态是否为测试状态。
其中, 所述系统终端设备可以访问转发服务节点, 在具体网 络应用系统中该系统终端设备上可以运行客户端,也可以运行服 务端,或同时运行客户端和服务端。系统终端设备可以收发数据。 系统终端设备有一个用于存储设备的配置信息的装置;该装置存 储本系统终端设备的标识、 网络地址。 该标识使用当前设备的用 户的标识、 或当前设备运行的服务的标识。 系统终端设备有一个 用于记录通讯双方数据接收地址对应关系的装置, 包括: 属于本 系统终端设备的用于接收数据的网络地址和端口、属于对方系统 终端设备的用于接收数据的网络地址和端口等项目。系统终端设 备有一个用于记录转发服务节点入口点的装置,包括: 网络地址、 端口。 系统终端设备有一个运行控制模块, 控制系统终端设备的 执行。系统终端设备有一个用于记录转发服务节点数据接收测试 点的装置, 包括: 网络地址、 端口、 层级信息。 系统终端设备有 一个用于记录 NAT设备上的数据接收测试点的装置, 包括: 网络 地址、 端口。 系统终端设备有一个用于记录本系统终端设备上的 数据接收测试点的装置, 包括: 端口、 端口状态。 系统终端设备 有一个用于记录系统终端设备上的数据发送测试点的装置, 包 括: 端口, 端口状态。 端口状态用于记录系统终端设备上该端口 状态是否为测试状态。 系统终端设备有一个用于记录本系统终端 数据发送点和数据传递目标点关系的装置,包括: 本系统终端数 据发送点端口, 对方数据传递目标的网络地址和端口。 系统终 端设备有一个用于记录强制测试点的装置, 包括: 网络地址、 端 口。 系统终端设备有一个用于记录对方 NAT上的数据发送测试点 的装置, 包括: 网络地址、 端口。 系统终端设备有一个用于记录 对方转发服务节点的数据接收测试点的装置: 网络地址、 端口、 层级信息。系统终端设备有一个用于记录对方 NAT设备上的数据 接收测试点的装置: 网络地址、 端口。 系统终端设备有一个用于 记录对方系统终端上的数据接收测试点的装置:网络地址、端口。
其中,所述转发服务节点在为系统终端设备分配转发服务节 点的数据接收测试点后,将所述转发服务节点的数据接收测试点 对应的端口的状态设置为测试状态;
其中, 在测试状态下, 所述转发服务节点在转发服务节点的 数据接收测试点接收对方的测试请求消息或测试请求消息的应 答消息,向与转发服务节点的当前数据接收测试点对应的数据接 收测试点, 转发收到的数据分组;
其中, 在测试状态下, 所述转发服务节点的数据接收测试点 在收到消息后,如果消息类型为普通转发测试消息或普通转发测 试消息的应答消息,提取携带该消息的数据分组的源地址和源端 口, 并在该消息中加入获取的源地址和源端口, 并标记为转发服 务节点添加;
其中, 在测试状态下, 所述转发服务节点的数据接收测试点 在收到测试消息后或测试消息的应答消息后,提取携带该消息的 数据分组的源地址和源端口,并在该消息中加入获取的源地址和 源端口, 并标记为转发 务节点添加。
其中, 步骤 1 )进一步包括: 所述呼叫方系统终端设备在向 呼叫方系统终端设备的转发服务节点请求转发服务节点的数据 接收测试点时,将呼叫方系统终端设备的数据接收测试点和数据 发送测试点各自对应的端口状态设为测试状态。
其中, 步骤 1 ) 中, 所述被呼叫方的系统终端设备和所述呼 叫方的系统终端设备都可以访问到所述转发服务节点。
其中, 步骤 1 )进一步包括: 所述呼叫方系统终端设备获取 所述转发服务节点上的数据接收端口及网络地址时,获取所述转 发服务节点在多层 NAT网络中的层级信息。
其中, 步骤 2 )进一步包括: 所述被呼叫方系统终端设备在 向被呼叫方系统终端设备的转发服务节点请求转发服务节点的 数据接收测试点时,将被呼叫方系统终端设备的数据接收测试点 和数据发送测试点各自对应的端口状态设为测试状态。
其中, 步骤 2 ) 中, 所述被呼叫方的系统终端设备和所述呼 叫方的系统终端设备都可以访问到所述转发服务节点。
其中, 步骤 2 )进一步包括: 所述被呼叫方系统终端设备获 取所述转发服务节点上的数据接收端口及网络地址时,获取所述 转发服务节点在多层 NAT网络中的层级信息。
其中, 步骤 3 )进一步包括:
步骤 A20 )、所述被呼叫方的系统终端设备通过自身的数据发 送测试点向呼叫方的系统终端设备的自身的数据接收测试点发 起直通测试;
步骤 A21 )、呼叫方的系统终端设备接收到直通测试请求消息 后, 进行直通测试, 并返回应答消息;
步骤 A22 )、 当所述应答消息未经过转发服务器, 或者所述被 呼叫方的系统终端设备通过自身的数据接收测试点向呼叫方系 统终端设备强制测试点发出强制测试消息, 建立 NAT穿越通道, 所述被呼叫方的系统终端设备确认呼叫方接收数据端口和网络 地址。
其中, 步骤 3 )进一步包括:
步骤 B20 )、当所述被呼叫方的系统终端设备没有收到直通应 答消息或者不能建立 NAT穿越通道后, 通过自身的数据发送测试 点向呼叫方转发服务节点上的数据接收测试点发起转发测试; 步骤 B21 )、 呼叫方的系统终端设备接收到转发测试消息后, 进行转发测试, 并返回应答消息;
步骤 B22 )、当返回的应答消息中存在未经过转发点转发的应 答消息,所述被呼叫方从系统终端设备的数据发送测试点向呼叫 方转发服务节点上的数据接收测试点发非对称转发测试请求; 步骤 B23 ),当返回的应答消息中不存在未经过转发点转发的 应答消息, 确认更新呼叫方的转发点, 调整转发点, 重新开始转 发测试。
其中, 步骤 3 )进一步包括:
步骤 C20 )、所述被呼叫方的系统终端设备的数据发送测试点 向呼叫方 NAT设备上的数据接收测试点发起 NAT穿越测试;
步骤 C21 )、 呼叫方的系统终端设备接收到 NAT穿越测试消息 后, 进行 NAT穿越测试, 并返回应答消息; 步骤 C22 )、所述被呼叫方的系统终端设备根据所述应答消息 确定对于被呼叫方可用的呼叫方接收数据的网络地址和端口。
其中,所述数据接收测试点包括转发服务节点上的数据接收 测试点、 NAT设备上的数据接收测试点、 系统终端设备上的数据 接收测试点, 所述数据发送测试点包括 NAT设备上的数据发送测 试点和系统终端设备上的数据发送测试点; 其中, 转发服务节点 上的数据接收测试点为转发服务节点的网络地址及端口, NAT设 备上的数据接收测试点为 NAT设备的网络地址及端口, 系统终端 设备上的数据接收测试点为系统终端设备的网络地址及端口; NAT设备上的数据发送测试点为 NAT设备的网络地址及端口, 系统 终端设备上的数据发送测试点为系统终端设备的网络地址及端 σ。
其中, 在测试中, 系统终端设备上的数据发送测试点的状态 为测试状态, 系统终端设备上的数据接收测试点的状态为测试状 态。
其中, 步骤 Α20 ) 中, 所述直通测试的测试请求消息中包括 所述被呼叫方的转发服务节点上的数据接收测试点、系统终端设 备上的数据接收测试点。
其中, 步骤 Α20 )进一步包括: 所述被呼叫方在系统终端设 备上的数据接收测试点等待返回消息。
其中, 步骤 A21 )进一步包括:
步骤 A210 )、 呼叫方的系统终端设备提取直通测试的测试请 求消息中的被呼叫方转发服务节点上的数据接收测试点、系统终 端设备上的数据接收测试点,获取携带所述测试请求消息的数据 分组中的源地址;
步骤 A211 )、 当被呼叫方的系统终端设备上的数据接收测试 点的网络地址与所述携带测试请求消息的数据分组中的源地址 相同,向被呼叫方的系统终端设备的数据接收测试点返回双方直 通可达消息;
步骤 A212 )、 当被呼叫方的系统终端设备的数据接收测试点 的网络地址与所述携带测试请求消息的数据分组中的源地址不 相同,呼叫方从系统终端设备的数据发送测试点向被呼叫方的转 发服务节点上的数据接收测试点发送包括强制测试点的应答消 息, 并在所述在数据发送测试点等待强制测试消息; 步骤 A213 )、 呼叫方的系统终端设备获取携带强制测试消息 的数据分组携带的源地址和源端口后,从数据发送测试点向所述 携带强制测试消息的数据分组携带的源地址及源端口发送返回 强制测试应答消息, 消息中包括所述源地址和源端口, 并在系统 终端设备上的数据接收测试点等待测试请求消息;
步骤 A214 )、 收到穿越直通测试请求消息后, 获取消息中的 新的 NAT设备上的数据接收测试点, 从呼叫方系统终端设备的数 据发送测试点向所述新的 NAT设备上的数据接收测试点返回穿越 直通测试应答消息。
其中, 步骤 A21 )进一步包括:
步骤 A210 )、 呼叫方的系统终端设备提取直通测试的测试请 求消息中的被呼叫方转发服务节点上的数据接收测试点、系统终 端设备上的数据接收测试点,获取携带所述测试请求消息的数据 分组中的源地址;
步骤 A211 )、 呼叫方判定携带该测试消息的数据分组的源地 址和被呼叫方系统终端设备的数据接收测试点的网络地址相同 时, 双方可以直通, 在应答消息中加入测试结束标志, 并加入双 方数据接收测试点为双方系统终端设备的数据接收测试点,被呼 叫方在收到应答消息后, 如果消息中包含测试结束标志, 才 据消 息的指示将相应数据接收测试点作为双方数据接收测试点;
步骤 A212 )、 当被呼叫方的系统终端设备的数据接收测试点 的网络地址与所述携带测试请求消息的数据分组中的源地址不 相同,呼叫方从系统终端设备的数据发送测试点向被呼叫方的转 发服务节点上的数据接收测试点发送包括强制测试点的应答消 息, 并在所述数据发送测试点等待强制测试消息;
步骤 A213 )、 呼叫方的系统终端设备获取携带强制测试消息 的数据分组携带的源地址和源端口后,向所述携带强制测试消息 的数据分组携带的源地址和源地址发送返回强制测试应答消息, 消息中包括所述源地址和源端口,并在系统终端设备上的数据接 收测试点等待测试请求消息;
步骤 A214 )、 当呼叫方收到穿越直通测试请求消息后, 在穿 越直通测试消息的应答消息中加入测试结束标志,并加入双方数 据接收测试点为呼叫方系统终端设备的数据接收测试点、被呼叫 方新的 NAT设备上的数据接收测试点, 被呼叫方收到应答消息 后, 如果消息中包含测试结束标志,才 据消息的指示将相应数据 接收测试点作为双方数据接收测试点。
其中, 步骤 A22 )进一步包括:
步骤 A220 )、 被呼叫方的系统终端设备获取返回消息, 确认 双方可以直通可达,以双方的系统终端设备上的数据接收测试点 为各自接收地址,向呼叫方返回所述被呼叫方系统终端设备上的 数据接收测试点;
步骤 A221 )、 被呼叫方的系统终端设备确认双方不可以直通 可达, 获取应答消息中的强制测试点, 从系统终端设备上的数据 接收测试点向强制测试点发送强制测试消息;
步骤 A222 )被呼叫方的系统终端设备的数据接收测试点收到 所述返回的强制测试应答消息后, 获取应答消息中的测试点, 将 其作为新的 NAT设备上的数据接收测试点, 从数据发送测试点向 呼叫方的系统终端设备上的数据接收测试点发送穿越直通测试 请求消息, 所述穿越直通测试请求消息中包含新的 NAT设备上的 数据接收测试点;
步骤 A223 )、 被呼叫方的系统终端设备获取返回消息, 确认 双方可以转发直通, 以被呼叫方的系统终端设备的新的 NAT设备 上的数据接收测试点和呼叫方的系统终端设备的数据接收测试 点为各自接收地址, 记录接收对应关系。
其中, 步骤 B20 ) 中, 所述转发测试的测试请求消息中包括 所述被呼叫方的转发服务节点上的数据接收测试点、 NAT设备上 的数据接收测试点和系统终端设备上的数据接收测试点。所述转 发测试的测试请求消息中还可以包括被呼叫方的转发 务节点 上的数据接收测试点的层级信息,所述转发服务节点上的数据接 收测试点的层级信息在缺省状态下为空, 当层级信息由被呼叫方 决定时,所述转发测试的测试请求消息中包括被呼叫方的转发服 务节点上的数据接收测试点的层级信息。
其中, 步骤 B20 )进一步包括: 所述被呼叫方在系统终端设 备的数据接收测试点等待返回消息。
其中, 步骤 B21 ) 中, 当接收到的转发测试消息是非对称转 发测试请求消息, 步骤 B21 )进一步包括:
步骤 B210 )、 呼叫方系统终端设备获取测试请求消息中的强 制测试点,从系统终端设备上的数据接收测试点向被呼叫方的强 制测试点发送强制测试消息;
步骤 B211 )、 呼叫方在系统终端设备上的数据接收测试点等 待强制测试应答消息;
步骤 B212 )、 呼叫方系统终端设备获取强制测试应答消息中 的新接收点,作为呼叫方新的 NAT设备上的数据接收测试点,从呼 叫方系统终端设备上数据发送测试点向被呼叫方系统终端设备 上的数据接收测试点发送包括呼叫方新的 NAT设备上的数据接收 测试点的非对称转发测试应答消息。
其中, 步骤 B21 ) 中, 当接收到的转发测试消息是非对称转 发测试请求消息, 步骤 B21 )进一步包括:
步骤 B210 )、 呼叫方系统终端设备获取测试请求消息中的强 制测试点,从系统终端设备上的数据接收测试点向被呼叫方的强 制测试点发送强制测试消息;
步骤 B211 )、 呼叫方在系统终端设备上的数据接收测试点等 待强制测试应答消息;
步骤 B212 )、 呼叫方系统终端设备获取强制测试应答消息中 的新接收点,作为呼叫方新的 NAT设备上的数据接收测试点, 在 非对称转发测试消息的应答消息中加入测试结束标志,并加入双 方数据接收测试点为呼叫方新的 NAT设备上的数据接收测试点、 被呼叫方系统终端设备的数据接收测试点,被呼叫方在收到应答 消息后, 如果消息中包含测试结束标志,才 据消息的指示将相应 数据接收测试点作为双方数据接收测试点。
其中, 步骤 B21 ) 中, 当接收到的转发测试消息是普通转发 测试请求消息, 步骤 B21 )进一步包括:
步骤 B210 )、 呼叫方系统终端设备获取普通转发测试消息中 的被呼叫方的转发服务节点上的数据接收测试点、 NAT设备上的 数据接收测试点和系统终端设备上的数据接收测试点,获取呼叫 方的转发服务节点添加的网络地址和端口,向呼叫方的转发服务 节点的数据接收测试点发测试状态取消消息;
步骤 B21K )、 判别消息中是否存在层级信息, 如果判断为是, 获取被呼叫方的转发服务节点上的数据接收测试点的层级信息, 并比较双方转发服务节点上的数据接收测试点的层级,如果所述 层级相同, 进入步骤 B211 ); 如果层级不同, 则进入步骤 B212 ); 如果判断为否, 则直接进入步骤 B211 ); 步骤 B211 )、 呼叫方从系统终端设备上数据接收测试点向呼 叫方的转发服务节点的数据接收测试点添加的网络地址和端口 发送穿洞消息,从呼叫方系统终端设备的数据发送测试点分别向 被呼叫方的转发服务节点上的数据接收测试点和系统终端设备 上的数据接收测试点发送应答消息;
步骤 B212 )、 呼叫方系统终端设备根据被呼叫方的转发服务 节点的数据接收测试点的层级信息重新获取新的转发服务节点 上的数据接收测试点和新的 NAT设备上的数据接收测试点,从呼 叫方系统终端设备的数据发送测试点分别向被呼叫方的转发服 务节点上的数据接收测试点和系统终端设备上的数据接收测试 点发送应答消息,其中, 应答消息包括新的转发服务节点上的数 据接收测试点和新的 NAT设备上的数据接收测试点。
其中, 步骤 B22 )进一步包括:
判断未产生新的穿越测试点后,确认緩存的消息中有经过转 发点转发的应答消息; 确认更新呼叫方的转发点, 调整转发点, 重新开始转发测试。
其中, 步骤 B22 ) 中, 确定产生新的穿越测试点的步骤进一 步包括:
步骤 B220 )、 在被呼叫方的系统终端设备上的数据发送测试 点上等待强制测试消息;
步骤 B221 )、 获取携带强制测试消息的数据分组携带的源地 址和源端口,并从被呼叫方的系统终端设备上的数据发送测试点 向所述源地址和端口返回包括所述源地址和端口的强制测试应 答消息;
步骤 B222 )、 被呼叫方的系统终端设备获取来自呼叫方的非 对称转发测试请求的应答信息,用呼叫方的系统终端设备的新的 NAT设备上的数据接收测试点代替原来呼叫方的系统终端设备的 NAT设备上的数据接收测试点。
其中, 步骤 B22 )进一步包括:
步骤 B220 )、 当判断未产生新的穿越测试点, 同时当緩存的 消息中存在经过转发点转发的应答消息,获取返回消息中的路径 信息和获取被呼叫方的转发服务节点添加的网络地址和端口,从 被呼叫方的系统终端设备上的数据接收测试点向被呼叫方的转 发服务节点添加的网络地址和端口发送穿洞消息; 步骤 B221 )、 判断返回的应答消息中是否有呼叫方新的转发 服务节点的数据接收测试点出现;
步骤 B222 )、 如果有呼叫方新的转发服务节点的数据接收测 试点出现, 调整转发点, 以获取的呼叫方新的转发服务节点的数 据接收测试点代替原来的呼叫方转发服务节点上的数据接收测 试点, 新的呼叫方的系统终端设备的 NAT设备上的数据接收测试 点代替原来的呼叫方的系统终端设备的 NAT设备上的数据接收测 试点;
步骤 B223 )、 如果没有呼叫方新的转发服务节点的数据接收 测试点出现,以双方的转发服务节点上的数据接收测试点为各自 的数据接收地址, 记录接收对应关系。
其中, 步骤 B23 )进一步包括:
步骤 B230 )、 当返回的应答消息中不存在未经过转发点转发 的应答消息,获取返回消息中的路径信息和获取被呼叫方的转发 服务节点添加的网络地址和端口,从被呼叫方的系统终端设备上 的数据接收测试点向被呼叫方的转发服务节点添加的网络地址 和端口发送穿洞消息;
步骤 B231 )、 判断返回的应答消息中是否有呼叫方新的转发 服务节点的数据接收测试点出现;
步骤 B232 )、 如果有呼叫方新的转发服务节点的数据接收测 试点出现, 调整转发点, 以获取的呼叫方新的转发服务节点的数 据接收测试点代替原来的呼叫方转发服务节点上的数据接收测 试点, 新的呼叫方的系统终端设备的 NAT设备上的数据接收测试 点代替原来的呼叫方的系统终端设备的 NAT设备上的数据接收测 试点;
步骤 B233 ), 如果没有呼叫方新的转发服务节点的数据接收 测试点出现,以双方的转发服务节点上的数据接收测试点为各自 的数据接收地址, 记录接收对应关系。
其中, 步骤 C21 )进一步包括:
步骤 C210 )、呼叫方的系统终端设备接收到 NAT穿越测试消息 后, 获取携带该消息的数据分组的源地址; 比较所述源地址和被 呼叫方的系统终端设备的数据接收测试点的网络地址是否相同; 步骤 C211 )、 如果地址相同, 从呼叫方的系统终端设备的数 据发送测试点向被呼叫方的系统终端设备上的数据接收测试点 发送应答消息;
步骤 C212 )、 如果地址不相同, 从呼叫方的系统终端设备的 数据发送测试点向被呼叫方的系统终端设备的 NAT设备上的数据 接收测试点发送应答消息。
其中, 步骤 C21 )进一步包括:
步骤 C210 )、呼叫方的系统终端设备接收到 NAT穿越测试消息 后, 获取携带该消息的数据分组的源地址; 比较所述源地址和被 呼叫方的系统终端设备的数据接收测试点的网络地址是否相同; 步骤 C211 )、 如果地址相同, 在穿越测试消息的应答消息中 加入测试结束标志, 并加入双方数据接收测试点为呼叫方新的 NAT设备上的数据接收测试点、 被呼叫方系统终端设备的数据接 收测试点, 被呼叫方在收到应答消息后, 如果消息中包含测试结 束标志,根据消息的指示将相应数据接收测试点作为双方数据接 收测试点;
步骤 C212 )、 如果地址不相同, 在穿越测试消息的应答消息 中加入测试结束标志, 并加入双方数据接收测试点为双方 NAT设 备上的数据接收测试点, 被呼叫方在收到应答消息后, 如果消息 中包含测试结束标志,根据消息的指示将相应数据接收测试点作 为双方数据接收测试点。
其中, 步骤 C22 )进一步包括:
步骤 C220 )、 被呼叫方在系统终端设备上的数据接收测试点 等待应答消息;
步骤 C221 )、 判断记录的接收对应关系中是否存在以双方转 发服务节点上的数据接收测试点作为接收对应关系的记录;
步骤 C222 )、 如果存在, 以双方的 NAT设备上的数据接收测试 点作为各自的接收地址, 建立接收对应关系, 并记录所述接收对 应关系;
步骤 C223 )、 如果不存在, 以被呼叫方的系统终端设备上的 数据接收测试点和呼叫方 NAT设备上的数据接收测试点作为各自 的接收地址, 建立接收对应关系, 并记录所述接收对应关系。
其中, 步骤 4 )进一步包括: 被呼叫方从被呼叫方系统终端 设备上的数据接收测试点向被呼叫方的转发服务节点上的数据 接收测试点发测试状态取消消息,被呼叫方将系统终端设备上的 数据接收测试点和数据发送测试点各自对应的端口的状态设为 非测试状态;
其中, 步骤 4 )进一步包括: 从被呼叫方和呼叫方的数据接 收对应关系记录中找到最后加入的记录,向呼叫方返回所述最后 记录中的被呼叫方的数据接收端口和网络地址。
本发明考虑多级 NAT下端到端通信的多样性,充分利用多级 NAT所构成私网内的网络资源, 可以在多种场景下实现 NAT的穿 越; 该方法可以适用于全锥型、 IP限制型、 IP及端口限制型、 对称型等基本 NAT设备及其组合后构建的单层、 多层网络环境。 本方法产生的由网络地址和端口构成的测试结果可用于后续的 数据传输。 在同根多层 NAT网络下, 系统终端设备间的通讯, 本方法可以实现私有网络的穿越, 将数据流限制在私有网络中, 从而减小骨干网络的压力; 在测试过程中, 本方法可以根据需要 NAT设备上打开一到两条通道。
附图说明
以下, 结合附图来详细说明本发明的实施例, 其中:
图 1示出同根多层 NAT网络;
图 1示出测试方整体测试流程;
图 3示出被测试方整体测试流程;
图 4示出测试方直通测试流程;
图 5示出被测试方直通测试流程;
图 6示出测试方转发测试流程;
图 7示出被测试方转发测试流程;
图 8示出测试方 NAT穿越测试流程;
图 9示出被测试方 NAT穿越测试流程。
具体实施方式
下面结合附图和具体实施例,对本发明提供的数据发送端口 发起的渐进式端到端 NAT穿越通道建立方法作进一步说明。
图 1 所示为同根多层 NAT 网络结构示意图, 一个私有网络 4-1通过 NAT设备 1001接入公有网络 3,一个私有网络 4-2通过 另一 NAT设备 1002接入私有网络 4-1。 通过 NAT设备 1001接入 公有网络 3的私有网络为该 NAT设备控制的网络,通过 NAT设备 1002接入私有网络 4-1的私有网络 4-2为该 NAT设备控制的网 络。 直接同公有网络 3相连的 NAT设备为根 NAT设备。 各私有网 络到公有网络 3经过的最少 NAT设备的个数为该私有网络的层 数, 该路径为私有网络到公有网络 3的最短路径。 私有网络到公 有网络 3的层数越少, 表示层级越高。 如果两个私有网络到公有 网络的最短路径中至少有一个 NAT设备相同,则这两个私有网络 有共同的根 NAT设备。多层 NAT网络可以被看作是多个同根多层 NAT网络的组合。 多层 NAT网络可以被看作是多个同根多层 NAT 网络的组合。 公有网络的层级为 0。
多层 NAT网络在扩大用户的接入数量的同时,也使通信双方 的相对位置变得更为复杂。多层 NAT网络将公有网络扁平化通信 模式变成了层次化通信模式。 多层 NAT网络环境下, 通信双方典 型关系为: (1 )通信双方在公有网络; (2 )通信一方在通过 NAT 设备扩展的私有网络中, 另一方在公有网络中; (3 )通信双方在 同一 NAT设备控制的私有网络中; ( 4 )通信双方在不同 NAT设备 控制的私有网络中,且这两个 NAT设备通过不同的根 NAT与公有 网络的相连; (5 )通信双方在不同 NAT设备控制的私有网络中, 且这两个 NAT设备通过相同的根 NAT与公有网络的相连。本发明 将第五种情况所描述的 NAT网络称为同根多层 NAT网络。
NAT设备的网络地址指同 NAT设备的外网界面绑定的网络地 址。 对于规模较大的私有网络, NAT设备外网界面可以同多个网 络地址进行绑定。 在网络管理中, 可以通过枚举地址或者枚举网 段的方式将多个网络地址映射为一个 NAT设备。普通用户可以通 过低端 NAT设备自行接入网络,该 NAT路由器外网界面一般与一 个网络地址绑定。 在下面对 NAT设备的描述中, 一个 NAT设备外 网界面只与一个网络地址绑定。 因此, 一个 NAT设备可以用一个 同该 NAT设备的外网界面绑定的网络地址代表。开发设计人员不 难发现,下面描述的方法也适用于外网界面同多个网络地址绑定 的 NAT设备。
为了方便对多层 NAT网络的描述, 现定义如下名词:
NAT设备的网络地址: 是指该 NAT设备的外网界面上绑定的 网络地址, 或称为 NAT路由器地址, 该地址可以是公有地址, 也 可以是私有地址。
直接上层网络: 如果 NAT设备 A的外网界面同 NAT设备 B 控制的网络直接相连, NAT设备 B控制的网络为 NAT设备 A控制 的网络的直接上层网络;公有网络是根 NAT设备控制的网络的直 接上层网络。 直接下层网络: 如果 NAT设备 A的外网界面同 NAT设备 B 控制的网络直接相连, NAT设备 A控制的网络为 NAT设备 B控制 的网络的直接下层网络;根 NAT设备控制的网络是公有网络的直 接下层网络。
NAT路径长度: NAT环境下, 主机 A到 B的可达路径中经过 NAT设备的个数为该 NAT路径的长度。
最短 NAT路径: NAT环境下,主机 A到 B的所有 NAT路径中, NAT路径长度最小的一条称为 A到 B的最短 NAT路径, 所经过的 NAT个数为最短 NAT路径长度。
上层网络:从当前 NAT设备控制的网络的直接上层网络起到 公有网络止的各 NAT设备控制的网络及公有网络,为当前 NAT设 备控制的网络的上层网络。
下层网络:从公有网络或当前 NAT设备控制的网络的直接下 层网络起的各 NAT设备控制的网络,为公有网络或当前 NAT设备 控制的网络的下层网络
所属网络: 部署于公有网络的设备的所属网络为公有网络, 部署在 NAT设备控制的网络的设备的所属网络为 NAT设备控制的 网络。
NAT之后: 设备所属网络为公有网络或当前 NAT设备控制的 网络的下层网络, 则该设备在 NAT之后。
层级信息用于表示离当前网络到公有网络最短 NAT路径数, 该值越大代表距离公有网络越远,该值越小代表距离公有网络越 近, 0代表公有网络。
基本设备及数据收发点类型
基本设备
转发服务节点:该服务用于协助希望相互通讯的系统终端设 备建立数据传递路径或为系统终端设备进行数据转发;每个提供 该服务的节点需具有一个用于存储本服务节点的配置信息的装 置; 该装置存储信息包括: 本服务节点主机名称、 本服务节点主 机网络地址、端口、层级信息。通讯模块, 用于从网络收发数据。 服务点记录装置记录转发服务节点上的数据接收测试点、及相对 应的 NAT设备上的或系统终端设备上的数据接收测试点。逻辑控 制模块控制转发服务点的执行。 标识记录表, 在呼叫中, 记录的 信息用于定位系统终端设备,协助处理呼叫和呼叫应答消息的发 送, 包括标识、 该标识对应的系统终端设备的网络地址和端口、 及相关 NAT设备的网络地址和端口。转发服务节点具有端口状态 记录装置, 用于记录该节点端口状态是否为测试状态。
系统终端设备: 系统终端设备可以访问转发服务节点。 在具 体网络应用系统中该系统终端设备上可以运行客户端,也可以运 行服务端, 或同时运行客户端和服务端。 系统终端设备可以收发 数据。 系统终端设备有一个用于存储设备的配置信息的装置; 该 装置存储本系统终端设备的标识、 网络地址。 该标识使用当前设 备的用户的标识、 或当前设备运行的服务的标识。 系统终端设备 有一个用于记录通讯双方数据接收地址对应关系的装置, 包括: 属于本系统终端设备的用于接收数据的网络地址和端口、属于对 方系统终端设备的用于接收数据的网络地址和端口等项目。 系统 终端设备有一个用于记录转发服务节点入口点的装置,包括: 网 络地址、 端口。 系统终端设备有一个运行控制模块, 控制系统终 端设备的执行。系统终端设备有一个用于记录转发服务节点数据 接收测试点的装置, 包括: 网络地址、 端口、 层级信息。 系统终 端设备有一个用于记录 NAT设备上的数据接收测试点的装置,包 括: 网络地址、 端口。 系统终端设备有一个用于记录系统终端设 备上的数据接收测试点的装置, 包括: 端口、 端口状态。 系统终 端设备有一个用于记录系统终端设备上的数据发送测试点的装 置, 包括: 端口, 端口状态。 端口状态用于记录系统终端设备上 该端口状态是否为测试状态。系统终端设备有一个用于记录本系 统终端数据发送点和数据传递目标点关系的装置,包括: 本系统 终端数据发送点端口, 对方数据传递目标的网络地址和端口。 系 统终端设备有一个用于记录强制测试点的装置,包括:网络地址、 端口。系统终端设备有一个用于记录对方 NAT上的数据发送测试 点的装置, 包括: 网络地址、 端口。 系统终端设备有一个用于记 录对方转发服务节点的数据接收测试点的装置:网络地址、端口、 层级信息。系统终端设备有一个用于记录对方 NAT设备上的数据 接收测试点的装置: 网络地址、 端口。 系统终端设备有一个用于 记录对方系统终端上的数据接收测试点的装置:网络地址、端口。 系统工作原理
在公有网络和 NAT设备控制的网络中部署转发服务节点。 当 系统终端设备位于公有网络时, 系统终端设备需要知道部署在公 有网络中的转发服务节点的网络地址和端口。 当系统终端设备位 于 NAT设备控制的网络时, 系统终端设备需要知道部署在当前 NAT设备控制的网络中的转发服务节点的网络地址和端口及上层 网络中各转发服务节点的网络地址和端口;如果当前 NAT设备控 制的网络中没有转发服务节点, 系统终端设备需要知道上层网络 中各转发服务节点的网络地址和端口 。 系统终端设备可以通过 人工配置的方式, 如系统管理员进行配置, 获得相关转发服务节 点的网络地址和端口。该转发服务节点网络地址和端口可以被该 系统终端设备访问。
转发服务节点可以提供的服务有:
1 )记录用户或应用的登录信息
系统终端设备获得转发服务节点后,向转发服务节点发用户 或应用的登录消息, 包括:消息类别, 标识, 本系统终端设备网 络地址、 端口。 收到登录消息的转发服务节点, 除记录登录消息 中的标识, 网络地址、 端口等信息外, 如果该登录消息经过 NAT 设备转发, 还要记录 NAT设备上的网络地址和端口。 各种服务和 应用也可以按上述方式注册其标识。
对于在公有网络中使用的系统终端设备,其标识被记录在部 署在公有网络中的转发服务节点中;对于在 NAT设备控制的网络 中使用的系统终端设备,其标识被记录在当前 NAT设备控制的网 络中的转发服务节点和上层网络中的转发服务节点中。如果在当 前 NAT设备控制的网络中没有转发服务节点,其标识被记录在上 层网络中的转发服务节点中。系统终端设备定时向转发服务节点 发登录消息。
2 ) 为系统终端设备提供转发服务节点上数据接收测试点分 配服务
转发服务节点上数据接收测试点用于接收数据并向申请该 测试点的系统终端设备转发数据。该测试点由网络地址和端口构 成。 该测试点可以被参加数据通讯的各系统终端设备访问。 获取 该测试点的方法为:
• 系统终端设备在向系统终端设备的转发服务节点请求 转发服务节点的数据接收测试点时,将系统终端设备的数据接收 测试点和数据发送测试点各自对应的端口状态设为测试状态。系 统终端设备根据本地保存的转发服务节点入口点的网络地址和 端口的配置向一个或多个转发服务节点发转发数据接收测试点 请求消息, 消息中至少包括: 本消息的消息类型; 本设备的当前 标识, 如用户标识; 被请求目标的标识, 如被请求用户的用户标 识。 缺省情况下, 请求消息中不包含层级信息。 请求消息中可以 根据需要添加层级信息,不符合该层级信息的转发服务节点向本 系统终端设备返回失败应答消息,符合该层级信息的转发服务节 点才 据逻辑向本系统终端设备返回相关应答消息。
• 转发服务节点收到转发数据接收测试点请求消息后, 判断该请求消息中是否有层级信息, 如果有, 判断该层级信息和 本节点的层级信息是否相同, 如果不同, 返回失败应答消息; 如 果请求消息中没有层级信息,或者请求消息中的层级信息和本节 点的层级信息相同,在本地标识记录中查找被请求的标识是否存 在, 如果被请求标识在本地标识记录表中, 为该系统终端设备分 配一个数据接收测试点,将该数据接收测试点记录在服务点记录 装置中,则向发送该请求消息的系统终端设备返回包含该数据接 收测试点及层级信息的成功应答消息,该数据接收测试点可以被 被请求目标运行或使用的系统终端设备访问;如果被请求标识不 在本地用户记录表中,则向发送该请求消息的系统终端设备返回 失败应答消息。 测试节点分配成功后, 将该数据接收测试点对应 的端口状态设为测试状态。
• 系统终端设备记录成功应答消息中包括的转发服务点 的网络地址和端口, 及层级信息。 当收到所有转发服务节点的应 答消息后, 提取并记录消息中网络地址和端口, 及层级信息等信 息, 如果只收到一个成功应答消息, 则将相应网络地址和端口作 为本系统终端设备的转发服务节点上数据接收测试点,如果只收 到多个成功应答消息,选择层级信息值最大的转发服务节点的网 络地址和端口作为本系统终端设备的转发服务节点上数据接收 测试点
3 ) NAT设备上的数据接收测试点获取服务
系统终端设备在获取转发服务节点上数据接收测试点后,向 该数据接收测试点请求 NAT设备上的数据接收测试点。 NAT设备 上的数据接收测试点由该 NAT设备的网络地址和端口构成。 NAT 设备根据该 NAT设备的规则将在该测试点收到的数据分组向该 系统终端设备转发。 本方法可以使用 STUN ( I ETF RFC 3489 )协 议中定义的方法实现。相应的转发服务节点的数据接收测试点对 应的端口的状态处于测试状态下。获取 NAT设备上的数据接收测 试点为:
• 系统终端设备根据本地保存的转发服务节点上数据接 收测试点, 从本系统终端设备用于接收数据的端口, 向该测试点 发 NAT设备数据接收测试点请求消息,消息中包括本消息的消息 类型。
• 转发服务节点收到 NAT 设备数据接收测试点请求消息 后, 提取携带该请求消息的数据分组携带的源网络地址和源端 口, 将该网络地址和端口记录在服务点记录装置中, 并向该系统 终端设备返回包含该源网络地址和源端口的应答消息。
• 系统终端设备收到应答消息后, 将消息中的源网络地址 和源端口同发出该 NAT设备数据接收测试点请求消息使用的网 络地址和端口比较, 如果不同, 则将该网络地址和端口记录为 NAT设备上的数据接收测试点, 如果相同, 则将 NAT设备上的数 据接收测试点设为空。
4) 转发服务节点上数据接收测试点取消
• 当转发服务器上数据接收测试点收到对应的系统终端 设备发的测试状态取消消息后,将数据接收测试点对应的端口状 态设为非测试状态; 测试状态取消消息包括: 消息类别。
5 ) 用户连接呼叫请求消息的转发服务
当用户使用系统终端设备访问其它用户的系统终端设备或 运行某种应用的系统终端设备时。系统终端设备通过转发服务节 点向请求目标发连接呼叫请求消息。 具体方法为:
• 系统终端设备根据本地保存的转发服务节点入口点 的网络地址和端口的配置向一个或多个转发服务节点发连接呼 叫请求消息, 消息中至少包括:本设备的当前标识,如用户标识; 被请求目标的标识, 如被请求用户的用户标识, 及用于接收数据 的转发服务节点上数据接收测试点、 NAT设备上的数据接收测试 点、 系统终端设备的数据接收测试点上, 系统终端设备的数据接 收测试点对应的端口状态为测试状态。
• 转发服务节点收到连接呼叫请求消息后, 如果被请求 标识在本地标识记录表中,根据被请求目标的登录信息向被请求 目标转发该连接呼叫请求消息。 如果不存在, 返回失败消息。
• 被请求目标的系统终端设备收到连接呼叫请求消息 后, 可以根据逻辑决定是否同意连接; 如果同意, 则返回成功应 答消息, 如果不同意, 则返回失败应答消息; 应答消息需要转发 服务节点转发。
用户连接呼叫请求消息的转发服务可以基于 SIP ( IETF RFC3261 )协议实现。
6 ) 测试消息的转发服务
转发服务节点在转发服务节点的数据接收测试点接收对方 的测试请求消息或测试请求消息的应答消息,向服务点记录装置 中与当前转发服务节点的数据接收测试点对应的数据接收测试 点, 转发收到的数据分组。
端口处于测试状态下时,转发服务节点的数据接收测试点在 收到消息后,如果消息类型为普通转发测试消息或普通转发测试 消息的应答消息, 提取携带该消息的数据分组的源地址和源端 口, 并在该消息中加入获取的源地址和源端口, 并标记为转发服 务节点添加。
为了减化处理流程, 在端口处于测试状态下时, 转发服务节 点的数据接收测试点在收到测试消息后或测试消息的应答消息 后, 提取携带该消息的数据分组的源地址和源端口, 并在该消息 中加入获取的源地址和源端口, 并标记为转发服务节点添加。
7 )数据转发服务
在系统终端设备请求的转发服务节点的数据接收测试点的 端口上等待其他系统终端设备发出的数据分组。在端口处于非测 试状态下时,向服务点记录装置中与当前转发服务节点的数据接 收测试点对应的端口对应的数据接收测试点对应的端口,转发该 数据分组。
数据测试点类型
NAT设备的多样性、 以及多层 NAT网络中系统终端间相对位 置关系多样性使得系统终端设备间收发数据的关系变得非常复 杂。 有的端到端的通讯需要通过转发服务节点转发; 有的端到端 的通讯可以直接穿过 NAT设备; 有的端到端的通讯可以直接联 通。
下面将转发服务节点上、 NAT设备上, 及系统终端设备上的 各种通讯端口 #居用途 4故如下分类。
数据接收测试点: 1 )转发服务节点上的数据接收测试点为 转发服务节点的网络地址及端口, 为方便使用 r 3表示, 简称为 转发点; 2 ) NAT设备上的数据接收测试点为 NAT设备的网络地 址及端口, 为方便使用 r2表示, 简称为 NAT穿越点,或穿越点; 3 ) 系统终端设备上的数据接收测试点为系统终端设备的网络地 址及端口,为方便使用 rl表示。在测试期间 rl、 r 3为测试状态。
数据发送测试点: 1 ) NAT设备上的数据发送测试点为 NAT 设备的网络地址及端口, 为方便使用 s2表示; 2 )系统终端设备 上的数据发送测试点为系统终端设备的网络地址及端口,为方便 使用 s i表示。 在测试期间 s i为测试状态。
NAT 环境下, 系统终端设备(为描述方便, 使用大写字母表 示, 如 A )为了能够接收数据,需要获得转发服务节点上的数据 接收测试点 (r3 )、 NAT设备上的数据接收测试点 (r2 )、 系统终 端设备上的数据接收测试点 (rl )。 上述数据接收端口可表示为 Ar Ar2、 Ar3。 同理, 系统终端设备的数据发送测试点可以表 示为 As l、 As2。
端到端的 NAT穿越通道建立方法
渐进式端到端 NAT穿越通道建立方法由三个步骤组成:数据 接收测试点获取; 路径测试; 路径确认。 为了方便下面将通讯双 方分别称为 A、 B。 在下面的描述中 B为路径测试发起方, 也就 是被呼叫方, A为路径测试响应方, 也就是呼叫方。
数据接收测试点的获取
数据接收测试点的获取分为四步。
第一步: 呼叫方 A (测试响应方)通过转发服务节点获得转 发服务节点上的数据接收端口及网络地址(r3 ); NAT设备上的 数据接收端口及网络地址(r2 )。 在转发服务节点选择时, 需要 保证选择的转发服务节点能过被参与测试的任何一方访问到。在 获取转发服务节点上的数据接收端口及网络地址的同时,需要获 取该节点在多层 NAT网络中的层级信息。
第二步: 呼叫方 A向被呼叫方 B传递其收集到的各种数据接 收测试点: Arl、 Ar2、 Ar3。 如可以通过 SIP协议及相关的 DSP 协议中定义的消息将被测试方收集的信息传递给测试方。
第三步: 被呼叫方 B (测试方) 收到呼叫方 A (测试响应方) 的信息后, 被呼叫方 B (测试方)通过转发服务节点获得转发服 务节点上的数据接收端口及网络地址(r3 )、 NAT设备上的数据 接收端口及网络地址(r2 )。 在转发服务节点选择时, 需要保证 选择的转发服务节点能过被参与测试的任何一方访问到。在获取 转发服务节点上的数据接收端口及网络地址的同时,需要获取该 节点在多层 NAT网络中的层级信息。 开始路径测试。
路径测试
图 2所示为测试方测试方法的测试顺序流程图。本测试方法 按直通测试、 转发测试和 NAT穿越测试的固定循序依次进行。
S0001:开始;
S1000:测试发起方 B从 Bs 1向测试响应方 A的 Ar 1发起直通测 试;
S1001:是否收到直通应答消息,如果是,转 S1010, 如果不是: 转 S2000;
S1010:才 据携带应答消息的数据分组的源地址判断应答消 息是否未经过转发服务器转发, 如果是,转 S1040,如果不是,转 S1020;
S1040:直通路径确认, 通道建立成功,顺序执行 S5000;
S1020:测试方 B从 Br 1向测试响应方 A的强制测试点发起强制 测试消息;
S1030:是否建立 NAT穿越通道,如果是,转 S4000,如果不是, 转 S2000;
S2000:测试方 B从 Bs l向测试响应方 A的 Ar 3发起转发测试; S2010:是否收到转发应答消息,如果是,转 S2020,如果不是, 转 S5000;
S2020:緩存的消息中是否有未经过 Br3转发的应答消息,如 果有,转 S2030,如果没有,转 S2060;
S2030:测试方 B从 Bs l向测试响应方 A的 Ar 3发非对称转发测 试请求消息;
S2040:是否产生新的穿越测试点,如果是,转 S3000,如果不 是,转 S2050;
S2050:緩存的消息中是否有经过 Br3转发的应答消息,如果 有,转 S2060,如果没有,转 S5000;
S2060: 测试响应方 A的转发点是否更新,如果是,转 S2070, 如果不是,转 S2080;
S2070:调整转发测试点,顺序执行 S2000;
S2080:记录转发路径;
S 3000:测试方 B从 Bs 1向测试响应方 A的 Ar 2发起 NAT穿越测 试;
S400Q:路径确认, 通道建立成功;
S5000:结束。
图 3初始测试响应方 A处于初始空闲状态,收到测试消息后, 对测试消息进行拆分, 判定该测试消息的测试类别, 然后按照其 测试类别, 进入不同类别的测试处理模块, 最后处理完毕, 向测 试方 B返回应答消息,测试响应方 A返回等待接收测试消息状态。
S6000:开始;
S6100:在 Arl上等待接收测试消息;
S6200:是否收到测试消息,如果是, 转 S6300,如果不是, 转 S6100;
S6300:根据消息类型判别是否为直通测试,如果是,转 S6400: 如果不是, 转 S6500;
S6400:进入直通测试应答模块, 执行 S6100;
S6500:根据消息类型判别是否为转发测试,如果是,转 S 6600: 如果不是, 转 S6700;
S6600:进入转发测试应答模块,顺序执行 S6100;
S6700:根据消息类型判别是否为穿越测试,如果是,转 S6800: 如果不是, 转 S6900;
S6800:进入穿越测试应答模块,顺序执行 S6100;
S6900:其它处理,顺序执行 S6100。
下面分别详细描述直通测试、转发测试和穿越测试这三个测 试阶段。 从图 4一图 9, 结合具体测试步骤, 对图 1、 图 3中的 部分步骤进行细化, 细化内容是原步骤的扩展、 具体化, 与原步 骤不矛盾。 为了详细描述具体步骤, SN N表示图 2或图 3中相 应的步骤, SNNNN-N表示 SNNNN的子步骤。 N为 0到 9的数字。
直通路径测试
下面分别详细描述直通测试: 测试方直通测试流程为图 2从 S1000起,标号为 S1XXX的操作步骤; 测试响应方直通测试流程 是判定为直通测试后的 S6400。 图 4为测试方 B的直通测试流程:
S1000:从 Bs l向被测试方 Arl发送普通直通测试请求消息,该 请求消息中包含测试方 Brl、 Br 3等信息;
S1001:设置计时器 BT1, 在 B rl地址等待应答消息, 并判定 是否超时,如果未超时并收到应答消息, 转 S1010-1,如果超时, 转 S2000;
S1010-1:提取携带应答消息的数据分组的源地址;
S1010-2:才 据携带应答消息的数据分组的源地址和 Arl的网 络地址是否相同, 判定通信双方是否直通可达, 如果相同为直通 可达, 转 S1040,如果不相同为非直通可达, 转 S1020;
S1040: 确认以双方的 rl为各自的数据接收地址, 并向测试 响应方 A返回测试方的数据接收网络地址和端口 (可以通过 SIP 协议及相关的 DSP协议中定义的消息将被测试方的信息传递给测 试方。 );
S1020:获取应答消息中的强制测试点, 从 Brl向强制测试点 发送强制测试消息;
S1030-1:设置计时器 BT2, 并在 Brl等待反馈消息, 判定是否 超时,如果未超时并收到应答消息, 转 S1030-2,如果超时, 转
S2000;
S1030-2:获取强制测试应答消息中的测试点 P,记为 Br2 _new: 由 Bs 1向测试响应方 Ar 1发送穿越直通测试请求消息,消息中包含 Br2 _new;
S1030-3:设置计时器 BT3, 并在 Brl等待应答消息, 判定是否 超时, 如果未超时并收到应答消息, 转 S1030-4,如果超时, 转 S2000;
S1030-4:以 Br2_new、 Arl为参数,在通讯双方数据接收地址 对应关系的装置中记录双方数据接收点对应关系, 顺序执行
S4000;
S2000:测试方 B从 Bs l向被测试方 A的 Ar 3发起转发测试。
图 5为测试响应方 A的直通测试流程:
S6400- 1:提取普通直通测试请求消息中的 Brl、 Br 3;
S6400-2:获取携带该测试请求消息的数据分组的携带的源 地址, 己为 IP1;
S6400-3:判定测试方 Brl测试点的网络地址和 IP1是否一致, 如果一致, 转 S6400-4,如果不一致, 转 S6400- 5 ;
S6400-4:双方直通可达, 从 As l向测试方 rl返回路径回馈消 息,返回 6100, 从 Arl向 Ar 3发送测试状态取消消息;
86400-5:从481向测试方^ 3返回应答消息,消息体中包含强 制测试点 As l ;
S6400-6:在 As l上等待测试方的强制测试消息, 判定收到的 消息是否为强制测试消息, 如果是强制测试消息, 转 S6400- 7, 如果不是强制测试消息, 转 S6100;
S6400-7:获取携带强制测试消息的数据分组携带的源地址 和源端口, 记为 P,从 As l向 P发送返回强制测试应答消息, 消息体 中包含 P;
S6400-8:在 Arl等待测试方的测试消息, 判定收到的消息是 否为穿越直通测试请求消息,如果收到穿越直通测试请求消息, 转 S6400-9,如果不是穿越直通测试请求消息, 转 S6100;
S 6400-9:获取测试消息中的 Br 2—new,代替 Br 2, 从 As 1向 Br2 _new返回应答消息, 从 Arl向 Ar 3发送测试状态取消消息;
S6100:等待接受测试消息。
转发路径测试
下面分别详细描述转发测试: 测试方转发测试流程为图 2从 S2000起,标号为 S2XXX的操作步骤; 测试响应方转发测试流程 是判定为转发测试后的 S6600。
图 6为测试方 B流程:
S2000:从 Bs 1向测试响应方的 Ar 3发送普通转发测试请求消 息, 消息体中包含测试方 B的测试点地址 Brl Br2 Br 3, 缺省情况 下本消息不带 Br 3的层级信息, 该层级信息可作为选项添加到消 息中;
S2010- 1 :设置计时器 BT1;
S2010-2:在 Brl等待返回信息;
S2010-3:是否收到应答消息, 如果收到应答消息, 转
S2010-4 , 如果没有收到应答消息, 转 S2010- 5 ;
S2010-4:收到应答消息,记录携带应答消息的数据分组的源 地址, 并緩存应答消息;
S2010-5:是否超时, 如果超时, 转 S2010-6, 如果没有超时, 转 S2010- 2 ; S2010-6:在 BT1内是否收到应答消息, 如果收到应答消息, 转 S2020, 如果没有收到应答消息, 转 S5000;
S2020:根据携带应答消息的源地址是否同 Br 3中的网络地址 相同,判定緩存的应答消息中是否有未经过转发点转发的应答消 息, 如果有未经过转发点转发的应答消息, 转 S2030, 如果没有 未经过转发点转发的应答消息, 转 S2060-1 ;
S2060-1:获取返回消息体中路径信息和测试方 B的 Br3添加 的网络地址、 端口, 从 Brl向测试响应方 B的 Br3添加的网络地址、 端口发送穿洞消息;
S2060-2:应答消息中是否有新的转发测试点地址出现,如果 有, 转 S2070, 如果没有, 转 S2080;
S2070:调整转发测试点, 以获取新的转发测试点 Ar3_new代 替 Ar3、 Ar2— new代替 Ar2, 顺序执行 S2000;
S2080:以双方的 r 3为参数,在通讯双方数据接收地址对应关 系的装置中记录数据接收测试点对应关系,顺序执行 S3000;
S2030:从 Bs 1点向测试响应方 A的 Ar 3发送非对称转发测试请 求消息, 消息体中包含强制测试点 Bs l ;
S2040-1:设置计时器 BT2, 在 Bs l上等待强制测试消息, 判定 是否超时, 如果未超时收到强制测试消息, 转 S2040-2, 如果超 时, 转 S2050, 表示没有新的 NAT设备上的数据接收测试点产生;
S2040-2:获取携带强制测试消息的数据分组携带的源地址 和源端口, 记为访问点 P, 向 P点返回强制测试应答消息, 消息体 中包含 P;
S2040-3:设置计时器 BT3,在 Brl上等待非对称转发测试应答 消息,判定是否超时,如果未超时收到非对称转发测试应答消息, 转 S2040-4, 如果超时, 转 S2050, 表示没有新的 NAT设备上的数 据接收测试点产生;
S2050:根据携带应答消息的源地址是否同 Br 3中的网络地址 相同, 判定緩存的消息中是否有经过 Br3转发的应答消息, 如果 有经过转发点转发的应答消息, 转 S2060-l, 如果没有经过 Br3 转发的应答消息, 转 S5000;
S2040-4:获取来自被测试方 A的应答信息, 用 Ar2_new代替
Ar2 ;
S3000:测试方 B从 Bs l向测试响应方 A发起 NAT测试,顺序执行 S4000;
S5000:结束。
图 7为测试响应方 A流程:
S6600-1 :判定该消息是非对称转发测试请求消息、还是普通 转发测试请求消息,如果是普通转发测试请求消息, 转 S6600-2, 如果是非对称转发测试请求消息, 转 S 6600- 10;
S6600- 2:提取普通转发测试请求消息中的 Brl、 Br2、 Br 3, 及 Br 3 的层级信息, 获取该消息中测试响应方 A的 Ar 3添加的网络地址、 端口, 并从 Arl向 Ar 3发送测试状态取消消息;
S6600-3: 判断消息中是否有包含层级信息, 如果有, 转 S6600- 4,如果没有, 转 S6600- 6
S 6600-4:获取该消息中 Br 3的层级信息值;
86600-5:判定人 和^ 3层级信息值是否相同, 如果相等, 转 S6600-6 , 如果不相等, 转 S6600- 8;
S 6600-6:从 Ar 1向测试响应方 A的 Ar 3添加的网络地址、 端口 发送穿洞消息;;
S6600-7: 从 As l分别以测试方的 Brl和 Br 3为目标发送应答 信息, 顺序执行 S6100;
S6600-8:测试响应方 A向 #居测试方 Br 3的层级信息重新获 取转发测试点 Ar 3 _new和穿越测试点 Ar 2 _ new;
S6600-9: 从 As l分别以测试方的 Brl和 Br 3为目标发送应答 信息, 消息体中包含新的测试点信息 Ar 3_new, Ar2 _new, 顺序执 行 S6100;
S6600-10:获取消息中强制测点,从 Ar l向强制测试点发送强 制测试消息;
S 6600-11:设置计时器 ATI,在 Ar 1上等待强制测试应答消息, 判定是否超时,如果未超时收到强制测试应答消息,转 S6600-12, 如果超时, 转 S6100;
S6600-12:获取该消息中的新接收点 P, 记为 Ar2 _new,从 As l 向 Brl发送路非对称转发测试应答消息, 消息体中包含 Ar2 _new, 顺序执行 S6100;
S6100:等待接受测试消息。
穿越路径测试
下面分别详细描述穿越测试: 测试方转发测试流程为图 2从 S3000起,标号为 S3XXX的操作步骤; 测试响应方转发测试流程 是判定为转发测试后的 S6800。
图 8为测试方 B流程:
S2080:记录转发路径;
S3000- 1 :从 Bs l向测试响应方的 Ar2发送穿越测试请求消息; S3000-2:设置计时器 BT1, 在 Brl上等待应答消息, 判定是否 超时,如果未超时并收到应答消息, 转 S3000-4, 如果超时, 转
S3000-3;
S3000-4:在双方数据接收记录列表中以双方转发点 r 3作为 接收对应关系的记录是否存在, 如果存在, 转 S3000-5, 如果不 存在, 转 S3000- 6 ;
S3000-5:以双方的 r2为参数,在通讯双方数据接收地址对应 关系的装置中记录数据接收测试点对应关系, 顺序执行 S4000;
S3000- 6:以 Brl、 Ar2为参数, 在通讯双方数据接收地址对应 关系的装置中记录数据接收测试点对应关系, 顺序执行 S4000;
S3000-3:穿越测试失败,不在双方数据接收记录列表中添加 双方接收地址对应关系, 顺序执行 S 4000;
图 9测试响应方 A流程:
S6800-1 :获取携带该消息的数据分组的源地址,记为 IP0;
S6800- 2:比较 Brl的网络地址和 IP0是否相同, 如果相等, 转 S6800-3 , 如果不相等, 转 S6800- 4;
S6800- 3:从 As l向测试方的 Brl发送应答消息, 顺序执行 S6100;
S 6800-4:从 A s 1向测试方的 Br 2发送应答消息, 顺序执行 S6100;
S6100:等待接受测试消息。
路径确认
测试方 B流程:
S4000: 从通讯双方数据接收地址对应关系的装置中找到最 后加入该列表的记录,记录中的地址和端口分别为测试方和测试 响应方可用于接收数据的网络地址和端口,从 Br l向 Br 3发测试 状态取消消息,将系统终端设备的数据接收测试点和数据发送测 试点各自对应的端口的状态设为非测试状态,向测试响应方返回 该记录中测试方的数据接收端口和网络地址。 如可以通过 S I P协议及相关的 DSP协议中定义的消息将测试 方测试后的结果传递给测试响应方。
第四步:测试响应方收到的包含测试方的数据接收端口和网 络地址的消息后,将系统终端设备的数据发送测试点和数据接收 测试点各自对应的端口的状态设为非测试状态。
在测试结束后, #居由网络地址和端口构成的测试结果: 测 试方可以将测试结果中测试响应方的数据接收测试点设为测试 方系统终端设备的数据发送测试点对应端口的数据发送目标;测 试响应方可以将测试结果中测试方的数据接收测试点设为测试 响应方系统终端设备的数据发送测试点对应端口的数据发送目 标。
可以通过 SIP协议及相关的 DSP协议中定义的消息将测试响 应方收集的信息传递给测试方,或将测试方测试的结果传递给测 试响应方 基本消息类型及内容
消息分为两种: 测试请求消息、 应答消息。 测试请求消息通过消 息中的请求类型定义不同的测试请求消息;应答消息通过消息中 的应答类型定义不同的应答消息。具体消息的基本内容见表 1和 表 2, 其中表 1示出了测试请求消息基本信息, 表 2示出了应答消 息基本信息:
表 1
Figure imgf000032_0001
表 2
Figure imgf000033_0001
基于测试响应方的应答消息的扩展
测试响应方可以 #居测试请求消息及当前处理特征向测试 方提供当前数据接收测试点的测试结果,从而提高测试方的处理 速度。
测试响应方 A:
当测试响应方 A收到普通直通测试请求消息, 并判定携带该 测试消息的数据分组的源地址和 Brl的网络地址相同时,双方可 以直通, 在应答消息中加入测试结束标志, 并加入双方数据接收 测试点为 Arl, Brl。
当测试响应方 A收到穿越直通测试请求消息后,在穿越直通测 试消息的应答消息中加入测试结束标志,并加入双方数据接收测 试点为 Arl, Br2— new。
当测试响应方 A收到非对称转发测试请求消息后, 在非对称 转发测试消息的应答消息中加入测试结束标志,并加入双方数据 接收测试点为 Ar2 _new, Brl。
当测试响应方 A收到穿越测试请求消息后,比较 Brl的网络 地址和获取携带该消息的数据分组的源地址是否相同,如果不相 同, 在穿越测试消息的应答消息中加入测试结束标志, 并加入双 方数据接收测试点为 Ar2, Br2; 如果相同, 在穿越测试消息的应 答消息中加入测试结束标志, 并加入双方数据接收测试点为 Ar2_new, Brl ;
测试方 B流程:
在收到应答消息后, 如果消息中包含测试结束标志, 才 据消 息的指示将相应数据接收测试点作为双方数据接收测试点,结束 测试。 对 SDP消息的扩展
例如在 IP电话应用中: 甲方在端口 10600上等待数据, 在 端口 10602上发送数据; 乙方在端口 10600上等待数据, 在端口 10602上发送数据。 为了便于在通话双方间测试信息的传递, 下 面以 SDP消息为例描述与测试相关的信息格式。该信息的传递主 要通过对 SDP协议中 " a= "属性的扩展实现。该扩展方式是在测试 响应方和测试方间传递测试信息方式的一种。
甲方原始请求 SDP为: v=0
o=al ice 2890844526 2890844526 IN IP4 cl ient, atlanta. example, com s=- c=IN IP4 159. 226. 0. 101
t=0 0
m=audio 10600 RTP/AVP 0
a=rtpmap: 0 PCMU/8000
乙方原始应答 SDP为:
ν=0
o=bob 2890844527 2890844527 IN IP4 cl ient, bi loxi. example, com s=- c=IN IP4 159. 226. 0. 201
t=0 0
m=audio 10600 RTP/AVP 0
a=rtpmap: 0 PCMU/8000 当甲乙双方处于不同 NAT下,为了适应 NAT环境对 SDP扩展 如下:
曱方 (测试响应方)扩展后请求 SDP为:
ν=0
o=al ice 2890844526 2890844526 IN IP4 cl ient, atlanta. example, com s=一
c=IN IP4 192. 0. 2. 101
t=0 0
m=audio 10600 RTP/AVP 0
a=rtpmap: 0 PCMU/8000
a=nat-rl: 测试响应方系统终端设备上的数据接收测试点
a=nat-r2 : 测试响应方 NAT设备上的数据接收测试点
a=nat-r3 : 测试响应方转发服务节点的数据接收测试点 乙方 (测试方)扩展后应答 SDP为:
v=0 o=bob 2890844527 2890844527 IN IP4 cl ient, bi loxi. example, com s=- c=IN IP4 10, 1. 0. 201
t=0 0
m=audio 10600 RTP/AVP 0
a=rtpmap: 0 PCMU/8000
a=nat-r : 测试后测试方的数据接收测试点 在扩展中: na t-rl, nat-r2, nat-r3 对应于测试响应方系统 终端设备上的数据接收测试点、测试响应方 NAT设备上的数据接 收测试点, 测试响应方转发服务节点的数据接收测试点; nat-r 对应测试方测试后的数据接收测试点。
在本发明中,所述转发服务器、转发服务点和转发服务节点, 在逻辑上都可认为是转发服务节点。
在本发明中,用于实现本发明的方法的步骤可以不限于实施 例中的组合, 在具体实现中可以去掉部分步骤, 或者加入其他的 本说明书中提到的步骤。
最后应说明的是, 以上实施例仅用以说明本发明的技术方案 而非对其限制, 并且在应用上可以延伸到其他的修改、 变化、 应 用和实施例, 同时认为所有这样的修改、 变化、 应用、 实施例都 在本发明的精神和范围内。

Claims

权 利 要 求
1、 一种系统终端设备建立 NAT穿越通道的方法, 包括: 步骤 1 )、 呼叫方系统终端设备通过转发服务节点分别获取 转发服务节点上的数据接收端口及网络地址、及其层级信息、 NAT 设备上的数据接收端口及网络地址,并将转发服务节点上的数据 接收端口及网络地址、 NAT设备上的数据接收端口及网络地址和 系统终端设备上的数据接收端口及网络地址发送给被呼叫方的 系统终端设备;
步骤 2 )、 被呼叫方系统终端设备收到所述呼叫方系统终端 设备发送的携带有呼叫方接收数据端口和网络地址的连接请求 及网络地址、 及其层级信息、 NAT设备上的数据接收端口及网络 地址;
步骤 3 )、 被呼叫方的系统终端设备的数据发送端口向呼叫 方顺序进行目标为呼叫方系统终端设备上的数据接收端口及网 络地址的直通测试、 目标为呼叫方转发服务节点上的数据接收端 口及网络地址的转发测试、 目标为呼叫方 NAT设备上的数据接收 端口及网络地址的穿越测试,确认呼叫方接收数据端口和网络地 址;
步骤 4 )、 被呼叫方的系统终端设备确认呼叫方接收数据端 口和网络地址后,将被呼叫方接收数据的网络地址与端口发送给 呼叫方系统终端设备;
步骤 5 )、 呼叫方系统终端设备收到上述消息后, 将呼叫方 系统终端设备的数据接收测试点和数据发送测试点对应的端口 的状态转换为非测试状态。
2、 权利要求 1 的方法, 所述转发服务节点具有配置信息存 储装置,用于存储所述转发服务节点的配置信息:节点主机名称、 节点主机 IP地址、 端口、 层级信息; 所述转发服务节点用于从 网络收发数据, 所述转发服务节点具有服务点存储装置, 用于记 录转发服务节点上的数据接收测试点、及其对应的 NAT设备上的 或系统终端设备上的数据接收测试点,所述转发服务节点具有端 口状态记录装置, 用于记录该节点端口状态是否为测试状态。
3、 权利要求 2的方法, 其中, 所述转发服务节点在为系统 终端设备分配转发服务节点的数据接收测试点后,将所述转发服 务节点的数据接收测试点对应的端口的状态设置为测试状态; 其中, 在测试状态下, 所述转发服务节点在转发服务节点的 数据接收测试点接收对方的测试请求消息或测试请求消息的应 答消息,向与转发服务节点的当前数据接收测试点对应的数据接 收测试点, 转发收到的数据分组;
其中, 在测试状态下, 所述转发服务节点的数据接收测试点 在收到消息后,如果消息类型为普通转发测试消息或普通转发测 试消息的应答消息,提取携带该消息的数据分组的源地址和源端 口, 并在该消息中加入获取的源地址和源端口, 并标记为转发服 务节点添加;
其中, 在测试状态下, 所述转发服务节点的数据接收测试点 在收到测试消息后或测试消息的应答消息后,提取携带该消息的 数据分组的源地址和源端口,并在该消息中加入获取的源地址和 源端口, 并标记为转发 务节点添加。
4、 权利要求 3 的方法, 其中, 步骤 1 )进一步包括: 所述 呼叫方系统终端设备在向呼叫方系统终端设备的转发服务节点 请求转发服务节点的数据接收测试点时,将呼叫方系统终端设备 的数据接收测试点和数据发送测试点各自对应的端口状态设为 测试状态;所述被呼叫方的系统终端设备和所述呼叫方的系统终 端设备都可以访问到所述转发服务节点。
5、 权利要求 4 的方法, 其中, 步骤 1 )进一步包括: 所述 呼叫方系统终端设备获取所述转发服务节点上的数据接收端口 及网络地址时,获取所述转发服务节点在多层 NAT网络中的层级
Ί¾息。
6、 权利要求 3 的方法, 其中, 步骤 2 )进一步包括: 所述 被呼叫方系统终端设备在向被呼叫方系统终端设备的转发服务 节点请求转发服务节点的数据接收测试点时,将被呼叫方系统终 端设备的数据接收测试点和数据发送测试点各自对应的端口状 态设为测试状态;所述被呼叫方的系统终端设备和所述呼叫方的 系统终端设备都可以访问到所述转发服务节点。
7、 权利要求 4 的方法, 其中, 步骤 2 )进一步包括: 所述 被呼叫方系统终端设备获取所述转发服务节点上的数据接收端 口及网络地址时,获取所述转发服务节点在多层 NAT网络中的层 级信息。
8、 权利要求 3的方法, 其中, 步骤 3 )进一步包括: 步骤 A20 )、所述被呼叫方的系统终端设备通过自身的数据发 送测试点向呼叫方的系统终端设备的自身的数据接收测试点发 起直通测试;
步骤 A21 )、呼叫方的系统终端设备接收到直通测试请求消息 后, 进行直通测试, 并返回应答消息;
步骤 A22 )、 当所述应答消息未经过转发服务器, 或者所述被 呼叫方的系统终端设备通过自身的数据接收测试点向呼叫方系 统终端设备强制测试点发出强制测试消息, 建立 NAT穿越通道, 所述被呼叫方的系统终端设备确认呼叫方接收数据端口和网络 地址。
9、 权利要求 3的方法, 其中, 步骤 3 )进一步包括: 步骤 B20 )、当所述被呼叫方的系统终端设备没有收到直通应 答消息或者不能建立 NAT穿越通道后, 通过自身的数据发送测试 点向呼叫方转发服务节点上的数据接收测试点发起转发测试; 步骤 B21 )、 呼叫方的系统终端设备接收到转发测试消息后, 进行转发测试, 并返回应答消息;
步骤 B22 )、当返回的应答消息中存在未经过转发点转发的应 答消息,所述被呼叫方从系统终端设备的数据发送测试点向呼叫 方转发服务节点上的数据接收测试点发非对称转发测试请求; 步骤 B23 ),当返回的应答消息中不存在未经过转发点转发的 应答消息, 确认更新呼叫方的转发点, 调整转发点, 重新开始转 发测试。
10、 权利要求 3的方法, 其中, 步骤 3 )进一步包括: 步骤 C20 )、所述被呼叫方的系统终端设备的数据发送测试点 向呼叫方 NAT设备上的数据接收测试点发起 NAT穿越测试;
步骤 C21 )、 呼叫方的系统终端设备接收到 NAT穿越测试消息 后, 进行 NAT穿越测试, 并返回应答消息;
步骤 C22 )、所述被呼叫方的系统终端设备根据所述应答消息 确定对于被呼叫方可用的呼叫方接收数据的网络地址和端口。
11、 权利要求 8或 9或 10的方法, 其中, 所述数据接收测试点 包括转发服务节点上的数据接收测试点、系统终端设备上的数据 接收测试点, 所述数据发送测试点包括 NAT设备上的数据发送测 试点和系统终端设备上的数据发送测试点; 其中, 转发服务节点 上的数据接收测试点为转发服务节点的网络地址及端口, NAT设 备上的数据接收测试点为 NAT设备的网络地址及端口, 系统终端 设备上的数据接收测试点为系统终端设备的网络地址及端口; NAT设备上的数据发送测试点为 NAT设备的网络地址及端口, 系统 终端设备上的数据发送测试点为系统终端设备的网络地址及端 口; 其中, 在测试中, 系统终端设备上的数据发送测试点的状态 为测试状态, 系统终端设备上的数据接收测试点的状态为测试状 态。
12、 权利要求 8的方法, 其中, 步骤 A20 ) 中, 所述直通测试 的测试请求消息中包括所述被呼叫方的转发服务节点上的数据 接收测试点、 系统终端设备上的数据接收测试点。
13、 权利要求 12的方法, 其中, 步骤 A20 )进一步包括: 所 述被呼叫方在系统终端设备上的数据接收测试点等待返回消息。
14、 权利要求 13的方法, 其中, 步骤 A21 )进一步包括: 步骤 A210 )、 呼叫方的系统终端设备提取直通测试的测试请 求消息中的被呼叫方转发服务节点上的数据接收测试点、系统终 端设备上的数据接收测试点,获取携带所述测试请求消息的数据 分组中的源地址;
步骤 A211 )、 当被呼叫方的系统终端设备上的数据接收测试 点的网络地址与所述携带测试请求消息的数据分组中的源地址 相同,向被呼叫方的系统终端设备的数据接收测试点返回双方直 通可达消息;
步骤 A212 )、 当被呼叫方的系统终端设备的数据接收测试点 的网络地址与所述携带测试请求消息的数据分组中的源地址不 相同,呼叫方从系统终端设备的数据发送测试点向被呼叫方的转 发服务节点上的数据接收测试点发送包括强制测试点的应答消 息, 并在所述在数据发送测试点等待强制测试消息;
步骤 A213 ), 呼叫方的系统终端设备获取携带强制测试消息 的数据分组携带的源地址和源端口后,从数据发送测试点向所述 携带强制测试消息的数据分组携带的源地址及源端口发送返回 强制测试应答消息, 消息中包括所述源地址和源端口, 并在系统 终端设备上的数据接收测试点等待测试请求消息;
步骤 A214 )、 收到穿越直通测试请求消息后, 获取消息中的 新的 NAT设备上的数据接收测试点, 从呼叫方系统终端设备的数 据发送测试点向所述新的 NAT设备上的数据接收测试点返回穿越 直通测试应答消息。
15、 权利要求 13的方法, 其中, 步骤 A21 )进一步包括: 步骤 A210 )、 呼叫方的系统终端设备提取直通测试的测试请 求消息中的被呼叫方转发服务节点上的数据接收测试点、系统终 端设备上的数据接收测试点,获取携带所述测试请求消息的数据 分组中的源地址;
步骤 A211 )、 呼叫方判定携带该测试消息的数据分组的源地 址和被呼叫方系统终端设备的数据接收测试点的网络地址相同 时, 双方可以直通, 在应答消息中加入测试结束标志, 并加入双 方数据接收测试点为双方系统终端设备的数据接收测试点,被呼 叫方在收到应答消息后, 如果消息中包含测试结束标志, 才 据消 息的指示将相应数据接收测试点作为双方数据接收测试点;
步骤 A212 )、 当被呼叫方的系统终端设备的数据接收测试点 的网络地址与所述携带测试请求消息的数据分组中的源地址不 相同,呼叫方从系统终端设备的数据发送测试点向被呼叫方的转 发服务节点上的数据接收测试点发送包括强制测试点的应答消 息, 并在所述数据发送测试点等待强制测试消息;
步骤 A213 ), 呼叫方的系统终端设备获取携带强制测试消息 的数据分组携带的源地址和源端口后,向所述携带强制测试消息 的数据分组携带的源地址和源地址发送返回强制测试应答消息, 消息中包括所述源地址和源端口,并在系统终端设备上的数据接 收测试点等待测试请求消息;
步骤 A214 )、 当呼叫方收到穿越直通测试请求消息后, 在穿 越直通测试消息的应答消息中加入测试结束标志,并加入双方数 据接收测试点为呼叫方系统终端设备的数据接收测试点、被呼叫 方新的 NAT设备上的数据接收测试点, 被呼叫方收到应答消息 后, 如果消息中包含测试结束标志, 才 据消息的指示将相应数据 接收测试点作为双方数据接收测试点。
16、 权利要求 11的方法, 其中, 步骤 A22 )进一步包括: 步骤 A220 )、 被呼叫方的系统终端设备获取返回消息, 确认 双方可以直通可达,以双方的系统终端设备上的数据接收测试点 为各自接收地址,向呼叫方返回所述被呼叫方系统终端设备上的 数据接收测试点; 步骤 A221 )、 被呼叫方的系统终端设备确认双方不可以直通 可达, 获取应答消息中的强制测试点, 从系统终端设备上的数据 接收测试点向强制测试点发送强制测试消息;
步骤 A222 )被呼叫方的系统终端设备的数据接收测试点收到 所述返回的强制测试应答消息后, 获取应答消息中的测试点, 将 其作为新的 NAT设备上的数据接收测试点, 从数据发送测试点向 呼叫方的系统终端设备上的数据接收测试点发送穿越直通测试 请求消息, 所述穿越直通测试请求消息中包含新的 NAT设备上的 数据接收测试点;
步骤 A223 )、 被呼叫方的系统终端设备获取返回消息, 确认 双方可以转发直通, 以被呼叫方的系统终端设备的新的 NAT设备 上的数据接收测试点和呼叫方的系统终端设备的数据接收测试 点为各自接收地址, 记录接收对应关系。
17、 权利要求 9的方法, 其中, 步骤 B20 ) 中, 所述转发测试 的测试请求消息中包括所述被呼叫方的转发服务节点上的数据 接收测试点、 NAT设备上的数据接收测试点和系统终端设备上的 数据接收测试点,但不包括被呼叫方的转发服务节点上的数据接 收测试点的层级信息;或者所述转发测试的测试请求消息中包括 所述被呼叫方的转发服务节点上的数据接收测试点、 NAT设备上 的数据接收测试点、系统终端设备上的数据接收测试点以及被呼 叫方的转发服务节点上的数据接收测试点的层级信息。
18、 权利要求 9的方法, 其中, 步骤 B20 )进一步包括: 所述 被呼叫方在系统终端设备的数据接收测试点等待返回消息。
19、 权利要求 9的方法, 其中, 步骤 B21 ) 中, 当接收到的转 发测试消息是非对称转发测试请求消息, 步骤 B21 )进一步包括: 步骤 B210 )、 呼叫方系统终端设备获取测试请求消息中的强 制测试点,从系统终端设备上的数据接收测试点向被呼叫方的强 制测试点发送强制测试消息;
步骤 B211 )、 呼叫方在系统终端设备上的数据接收测试点等 待强制测试应答消息;
步骤 B212 )、 呼叫方系统终端设备获取强制测试应答消息中 的新接收点,作为呼叫方新的 NAT设备上的数据接收测试点,从呼 叫方系统终端设备上数据发送测试点向被呼叫方系统终端设备 上的数据接收测试点发送包括呼叫方新的 NAT设备上的数据接收 测试点的非对称转发测试应答消息。
20、 权利要求 9的方法, 其中, 步骤 B21 ) 中, 当接收到的转 发测试消息是非对称转发测试请求消息, 步骤 B21 )进一步包括: 步骤 B210 )、 呼叫方系统终端设备获取测试请求消息中的强 制测试点,从系统终端设备上的数据接收测试点向被呼叫方的强 制测试点发送强制测试消息;
步骤 B211 )、 呼叫方在系统终端设备上的数据接收测试点等 待强制测试应答消息;
步骤 B212 )、 呼叫方系统终端设备获取强制测试应答消息中 的新接收点,作为呼叫方新的 NAT设备上的数据接收测试点, 在 非对称转发测试消息的应答消息中加入测试结束标志,并加入双 方数据接收测试点为呼叫方新的 NAT设备上的数据接收测试点、 被呼叫方系统终端设备的数据接收测试点,被呼叫方在收到应答 消息后, 如果消息中包含测试结束标志, 才 据消息的指示将相应 数据接收测试点作为双方数据接收测试点。
21、 权利要求 9的方法, 其中, 步骤 B21 ) 中, 当接收到的转 发测试消息是普通转发测试请求消息, 步骤 B21 )进一步包括: 步骤 B210 )、 呼叫方系统终端设备获取普通转发测试消息中 的被呼叫方的转发服务节点上的数据接收测试点、 NAT设备上的 数据接收测试点和系统终端设备上的数据接收测试点,获取呼叫 方的转发服务节点添加的网络地址和端口,向呼叫方的转发服务 节点的数据接收测试点发测试状态取消消息;
步骤 B21K )、 判别消息中是否存在层级信息, 如果判断为是, 获取被呼叫方的转发服务节点上的数据接收测试点的层级信息, 并比较双方转发服务节点上的数据接收测试点的层级,如果所述 层级相同, 进入步骤 B211 ); 如果层级不同, 则进入步骤 B212 ); 如果判断为否, 则直接进入步骤 B211 );
步骤 B211 )、 呼叫方从系统终端设备上数据接收测试点向呼 叫方的转发服务节点的数据接收测试点添加的网络地址和端口 发送穿洞消息,从呼叫方系统终端设备的数据发送测试点分别向 被呼叫方的转发服务节点上的数据接收测试点和系统终端设备 上的数据接收测试点发送应答消息;
步骤 B212 )、 呼叫方系统终端设备根据被呼叫方的转发服务 节点的数据接收测试点的层级信息重新获取新的转发服务节点 上的数据接收测试点和新的 NAT设备上的数据接收测试点,从呼 叫方系统终端设备的数据发送测试点分别向被呼叫方的转发服 务节点上的数据接收测试点和系统终端设备上的数据接收测试 点发送应答消息,其中, 应答消息包括新的转发服务节点上的数 据接收测试点和新的 NAT设备上的数据接收测试点。
22、 权利要求 9的方法, 其中, 步骤 B22 )进一步包括: 判断未产生新的穿越测试点后,确认緩存的消息中有经过转 发点转发的应答消息; 确认更新呼叫方的转发点, 调整转发点, 重新开始转发测试。
23、 权利要求 9的方法, 其中, 步骤 B22 ) 中, 确定产生新的 穿越测试点的步骤进一步包括:
步骤 B220 )、 在被呼叫方的系统终端设备上的数据发送测试 点上等待强制测试消息;
步骤 B221 )、 获取携带强制测试消息的数据分组携带的源地 址和源端口,并从被呼叫方的系统终端设备上的数据发送测试点 向所述源地址和端口返回包括所述源地址和端口的强制测试应 答消息;
步骤 B222 )、 被呼叫方的系统终端设备获取来自呼叫方的非 对称转发测试请求的应答信息,用呼叫方的系统终端设备的新的 NAT设备上的数据接收测试点代替原来呼叫方的系统终端设备的 NAT设备上的数据接收测试点。
24、 权利要求 22的方法, 其中, 步骤 B22 )进一步包括: 步骤 B220 )、 当判断未产生新的穿越测试点, 同时当緩存的 消息中存在经过转发点转发的应答消息,获取返回消息中的路径 信息和获取被呼叫方的转发服务节点添加的网络地址和端口,从 被呼叫方的系统终端设备上的数据接收测试点向被呼叫方的转 发服务节点添加的网络地址和端口发送穿洞消息;
步骤 B221 )、 判断返回的应答消息中是否有呼叫方新的转发 服务节点的数据接收测试点出现;
步骤 B222 )、 如果有呼叫方新的转发服务节点的数据接收测 试点出现, 调整转发测试点, 以获取的呼叫方新的转发服务节点 的数据接收测试点代替原来的呼叫方转发服务节点上的数据接 收测试点, 新的呼叫方的系统终端设备的 NAT设备上的数据接收 测试点代替原来的呼叫方的系统终端设备的 NAT设备上的数据接 收测试点;
步骤 B223 ), 如果没有呼叫方新的转发服务节点的数据接收 测试点出现,以双方的转发服务节点上的数据接收测试点为各自 的数据接收地址, 记录接收对应关系。
25、 权利要求 9的方法, 其中, 步骤 B23 )进一步包括: 步骤 B230 )、 当返回的应答消息中不存在未经过转发点转发 的应答消息,获取返回消息中的路径信息和获取被呼叫方的转发 务节点添加的网络地址和端口,从被呼叫方的系统终端设备上 的数据接收测试点向被呼叫方的转发服务节点添加的网络地址 和端口发送穿洞消息;
步骤 B231 )、 判断返回的应答消息中是否有呼叫方新的转发 服务节点的数据接收测试点出现;
步骤 B232 )、 如果有呼叫方新的转发服务节点的数据接收测 试点出现, 调整转发点, 以获取的呼叫方新的转发服务节点的数 据接收测试点代替原来的呼叫方转发服务节点上的数据接收测 试点, 新的呼叫方的系统终端设备的 NAT设备上的数据接收测试 点代替原来的呼叫方的系统终端设备的 NAT设备上的数据接收测 试点;
步骤 B233 ), 如果没有呼叫方新的转发服务节点的数据接收 测试点出现,以双方的转发服务节点上的数据接收测试点为各自 的数据接收地址, 记录接收对应关系。
26、 权利要求 10的方法, 其中, 步骤 C21 )进一步包括: 步骤 C210 )、呼叫方的系统终端设备接收到 NAT穿越测试消息 后, 获取携带该消息的数据分组的源地址; 比较所述源地址和被 呼叫方的系统终端设备的数据接收测试点的网络地址是否相同; 步骤 C211 )、 如果地址相同, 从呼叫方的系统终端设备的数 据发送测试点向被呼叫方的系统终端设备上的数据接收测试点 发送应答消息;
步骤 C212 )、 如果地址不相同, 从呼叫方的系统终端设备的 数据发送测试点向被呼叫方的系统终端设备的 NAT设备上的数据 接收测试点发送应答消息。
27、 权利要求 10的方法, 其中, 步骤 C21 )进一步包括: 步骤 C210 )、呼叫方的系统终端设备接收到 NAT穿越测试消息 后, 获取携带该消息的数据分组的源地址; 比较所述源地址和被 呼叫方的系统终端设备的数据接收测试点的网络地址是否相同; 步骤 C211 )、 如果地址相同, 在穿越测试消息的应答消息中 加入测试结束标志, 并加入双方数据接收测试点为呼叫方新的 NAT设备上的数据接收测试点、 被呼叫方系统终端设备的数据接 收测试点, 被呼叫方在收到应答消息后, 如果消息中包含测试结 束标志,根据消息的指示将相应数据接收测试点作为双方数据接 收测试点;
步骤 C212 )、 如果地址不相同, 在穿越测试消息的应答消息 中加入测试结束标志, 并加入双方数据接收测试点为双方 NAT设 备上的数据接收测试点, 被呼叫方在收到应答消息后, 如果消息 中包含测试结束标志,根据消息的指示将相应数据接收测试点作 为双方数据接收测试点。
28、 权利要求 10的方法, 其中, 步骤 C22 )进一步包括: 步骤 C220 )、 被呼叫方在系统终端设备上的数据接收测试点 等待应答消息;
步骤 C221 )、 判断记录的接收对应关系中是否存在以双方转 发服务节点上的数据接收测试点作为接收对应关系的记录;
步骤 C222 )、 如果存在, 以双方的 NAT设备上的数据接收测试 点作为各自的接收地址, 建立接收对应关系, 并记录所述接收对 应关系;
步骤 C223 )、 如果不存在, 以被呼叫方的系统终端设备上的 数据接收测试点和呼叫方 NAT设备上的数据接收测试点作为各自 的接收地址, 建立接收对应关系, 并记录所述接收对应关系。
29、 权利要求 3的方法, 其中, 步骤 4 )进一步包括: 被呼叫 方从被呼叫方系统终端设备上的数据接收测试点向被呼叫方的 转发服务节点上的数据接收测试点发测试状态取消消息,被呼叫 方将系统终端设备上的数据接收测试点和数据发送测试点各自 对应的端口的状态设为非测试状态; 步骤 4 )还进一步包括: 从 被呼叫方和呼叫方的数据接收对应关系记录中找到最后加入的 记录,向呼叫方返回所述最后记录中的被呼叫方的数据接收端口 和网络地址。
30、 权利要求 1的方法, 其中, 所述系统终端设备具有配置 信息存储装置, 用于存储本系统终端设备的配置信息, 所述配置 信息包括标识和网络地址,所述标识是使用当前设备的用户的标 识或者是当前设备运行的服务的标识; 系统终端设备具有地址对 应关系记录装置, 用于记录通讯双方数据接收地址对应关系, 所 述通讯双方数据接收地址包括:属于本系统终端设备的用于接收 数据的网络地址和端口,以及属于对方系统终端设备的用于接收 数据的网络地址和端口; 系统终端设备具有转发服务节点入口点 记录装置, 用于记录转发服务节点入口点信息, 包括网络地址和 端口; 系统终端设备具有运行控制模块, 用于控制系统终端设备 的执行; 系统终端设备具有转发服务节点数据接收测试点记录装 置,用于记录转发服务节点数据接收测试点信息,包括网络地址、 端口和层级信息; 系统终端设备具有 NAT设备上的数据接收测试 点记录装置, 用于记录 NAT设备上的数据接收测试点信息, 包括 网络地址和端口; 系统终端设备具有数据接收测试点记录装置, 用于记录本系统终端设备上的数据接收测试点信息, 包括端口和 端口状态; 系统终端设备具有数据发送测试点记录装置, 用于记 录系统终端设备上的数据发送测试点信息, 包括端口和端口状 态;所述端口状态用于表征系统终端设备上的端口是否处于测试 状态;
所述系统终端设备用于运行客户端、运行服务端或者同时运 行客户端和服务端;并且所述系统终端设备能够访问转发服务节 点和收发数据;所述系统终端设备具有数据发送点和数据传递目 标点关系记录装置,用于记录本系统终端数据发送点和数据传递 目标点的关系,所述数据发送点和数据传递目标点关系记录装置 所记录的信息包括: 本系统终端数据发送点端口, 对方数据传递 目标的网络地址和端口; 系统终端设备具有强制测试点记录装 置, 用于记录强制测试点信息, 包括网络地址和端口; 系统终端 设备具有对方 NAT上的数据发送测试点记录装置,用于记录对方 NAT上的数据发送测试点信息, 包括网络地址和端口; 系统终端 设备具有对方转发服务节点的数据接收测试点记录装置,用于记 录对方转发服务节点的数据接收测试点信息, 包括网络地址、 端 口和层级信息; 系统终端设备具有对方 NAT设备上的数据接收测 试点记录装置, 用于记录对方 NAT设备上的数据接收测试点信 息, 包括网络地址和端口; 系统终端设备具有对方系统终端上的 数据接收测试点记录装置,用于记录对方系统终端上的数据接收 测试点信息, 包括网络地址和端口。
PCT/CN2009/000427 2008-04-21 2009-04-21 一种系统终端设备建立nat穿越通道的方法 WO2009129692A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2008101045860A CN101262447B (zh) 2008-04-21 2008-04-21 一种系统终端设备建立nat穿越通道的方法
CN200810104586.0 2008-04-21

Publications (1)

Publication Number Publication Date
WO2009129692A1 true WO2009129692A1 (zh) 2009-10-29

Family

ID=39962657

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/000427 WO2009129692A1 (zh) 2008-04-21 2009-04-21 一种系统终端设备建立nat穿越通道的方法

Country Status (2)

Country Link
CN (1) CN101262447B (zh)
WO (1) WO2009129692A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262447B (zh) * 2008-04-21 2011-02-16 中国科学院计算技术研究所 一种系统终端设备建立nat穿越通道的方法
CN102055659B (zh) * 2009-11-10 2012-08-22 中国科学院计算技术研究所 一种系统终端设备建立nat穿越通道的方法
WO2012046390A1 (ja) * 2010-10-07 2012-04-12 パナソニック株式会社 通信装置、通信方法、集積回路、およびプログラム
CN103024095A (zh) * 2012-11-23 2013-04-03 北京百度网讯科技有限公司 数据中心系统及数据中心提供服务方法
CN106331198B (zh) * 2015-06-29 2020-04-21 中兴通讯股份有限公司 Nat穿透方法及装置
CN111131747B (zh) * 2019-12-06 2022-08-16 视联动力信息技术股份有限公司 确定数据通道状态的方法、装置、电子设备及存储介质
CN110990337A (zh) * 2019-12-25 2020-04-10 北京锐安科技有限公司 文件搬运方法、装置、计算机设备及存储介质
CN113037819B (zh) * 2021-02-26 2022-09-23 杭州雾联科技有限公司 一种边缘算力资源共享方法、装置及设备
CN114500062B (zh) * 2022-01-30 2024-04-02 北京百度网讯科技有限公司 一种nat穿越方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1633102A (zh) * 2003-12-24 2005-06-29 华为技术有限公司 实现网络地址转换穿越的方法及其系统
JP2005204216A (ja) * 2004-01-19 2005-07-28 Nippon Telegr & Teleph Corp <Ntt> 複数nat/fw装置接続に対応したsip−algの呼関連リソース管理方法及びそのsip−alg
CN1863157A (zh) * 2005-10-28 2006-11-15 华为技术有限公司 穿越nat实现网络通信的方法及装置
CN1996946A (zh) * 2006-12-01 2007-07-11 中国联合通信有限公司 Ip多媒体通信业务处理系统及实现ip多媒体通信的方法
CN101262447A (zh) * 2008-04-21 2008-09-10 中国科学院计算技术研究所 一种系统终端设备建立nat穿越通道的方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100550882C (zh) * 2004-03-02 2009-10-14 华为技术有限公司 一种穿越子网的方法及子网穿越系统
CN101064712B (zh) * 2006-04-24 2013-04-24 上海信息安全基础设施研究中心 一种基于Linux内核实现双通道穿越多级NAT和防火墙的系统及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1633102A (zh) * 2003-12-24 2005-06-29 华为技术有限公司 实现网络地址转换穿越的方法及其系统
JP2005204216A (ja) * 2004-01-19 2005-07-28 Nippon Telegr & Teleph Corp <Ntt> 複数nat/fw装置接続に対応したsip−algの呼関連リソース管理方法及びそのsip−alg
CN1863157A (zh) * 2005-10-28 2006-11-15 华为技术有限公司 穿越nat实现网络通信的方法及装置
CN1996946A (zh) * 2006-12-01 2007-07-11 中国联合通信有限公司 Ip多媒体通信业务处理系统及实现ip多媒体通信的方法
CN101262447A (zh) * 2008-04-21 2008-09-10 中国科学院计算技术研究所 一种系统终端设备建立nat穿越通道的方法

Also Published As

Publication number Publication date
CN101262447B (zh) 2011-02-16
CN101262447A (zh) 2008-09-10

Similar Documents

Publication Publication Date Title
WO2009129692A1 (zh) 一种系统终端设备建立nat穿越通道的方法
JP6619894B2 (ja) アクセス制御
US8055771B2 (en) Network traversal method for establishing connection between two endpoints and network communication system
TWI434595B (zh) 網路系統之連線建立管理方法及其相關系統
EP1819134A1 (en) Symmetric network adress translation system using STUN technique and method for implementing the same
US20070217408A1 (en) Address Resolution Device, Address Resolution Method, And Communication System Including The Same
CN105376299B (zh) 一种网络通信方法、设备及网络附属存储设备
US20100183001A1 (en) Intercept system, route changing device and recording medium
WO2007016850A1 (fr) Procédé, système et appareil d’accès au serveur web
TWI484804B (zh) 網路系統之資料管理方法及其相關系統
JPWO2010119738A1 (ja) アドレス共有システム
JP2007527068A (ja) 少なくとも2つの計算装置間の接続を設定する際のアドレス及びポート番号アブストラクション
WO2009129707A1 (zh) 局域网之间发送、接收信息的方法和装置以及通信的系统
CN112437168B (zh) 一种内网穿透系统
WO2011035528A1 (zh) 用于通过中继方式进行nat穿越的方法、系统和中继服务器
CN105979022A (zh) 一种基于UPnP协议的NAT穿透方法及系统
CN111800341B (zh) 一种跨路由器终端通信方法及装置
WO2007019809A1 (fr) Procede et systeme d&#39;etablissement d&#39;un canal direct point par point
WO2014201600A1 (zh) 一种会话管理方法、地址管理方法及相关装置
TWI393410B (zh) 複數網路間之通信系統及方法
JP3656134B2 (ja) Vpn選択接続ゲートウェイおよびそれによる通信方法
WO2010054561A1 (zh) 一种媒体流代理方法、语音交换机及通信系统
TW200409498A (en) NAPT gateway system and method to expand the number of connections
TWI504213B (zh) 第三代合作夥伴計劃網路中位址轉譯器穿越方法
WO2009114997A1 (zh) 多层nat网络中面向应用的名字注册系统及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09735496

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09735496

Country of ref document: EP

Kind code of ref document: A1