CN103024097B - The method of detection network address translation server ageing time, Apparatus and system - Google Patents

The method of detection network address translation server ageing time, Apparatus and system Download PDF

Info

Publication number
CN103024097B
CN103024097B CN201210568791.9A CN201210568791A CN103024097B CN 103024097 B CN103024097 B CN 103024097B CN 201210568791 A CN201210568791 A CN 201210568791A CN 103024097 B CN103024097 B CN 103024097B
Authority
CN
China
Prior art keywords
ageing time
probe messages
response message
ageing
time
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201210568791.9A
Other languages
Chinese (zh)
Other versions
CN103024097A (en
Inventor
马佳
张志江
宫贵冬
易怀勋
于忠涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom Technology Co Ltd
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 Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN201210568791.9A priority Critical patent/CN103024097B/en
Publication of CN103024097A publication Critical patent/CN103024097A/en
Application granted granted Critical
Publication of CN103024097B publication Critical patent/CN103024097B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of method of detection network address translation server ageing time, Apparatus and system, in order to alleviate offered load, efficiently utilize Internet resources.In private network device side, the method includes: sent the ageing time probe messages being in acquisition mode to public network main frame by network address translation NAT server;According to whether receive the step-type increase of response message or duration is delayed in minimizing, until determining ageing time scope;According to described ageing time scope, two way classification is adopted to further determine that prediction ageing time.

Description

The method of detection network address translation server ageing time, Apparatus and system
Technical field
The present invention relates to communication technical field, particularly to a kind of conversion of detection network the address method of (NAT, NetworkAddressTranslation) server ageing time, Apparatus and system.
Background technology
Current based on internet protocol version four (InternetProtocolversion4, IPV4) Internet technology develops rapidly, the problem thus brought is IP address wretched insufficiency, for the problem alleviating shortage of ip address, occur in that NAT server, it can with a public network IP address, and the private network device for multiple private IP address provides Internet access service.
NAT server concept is, NAT server itself has a public network IP address and one and communicates in internal lan with private network device private network IP address used, its gateway is set to the IP address of NAT server by private network device, when private network device access the Internet, NAT server can receive access the Internet request, NAT server is by the IP address of the IP address of this private network device and port mapping to its public network and a random port, and forward the request to the destination in public network, and these mapping relations are preserved to the cache table of its NAT server.When the destination host on the Internet receives request message and the return information that private network device sends, NAT server can be forwarded to corresponding private network main frame according to the mapping ruler in the cache table that self preserves, and the process that such private network main frame accesses the Internet terminates with regard to this.
The IP address of the private network device owing to hanging under NAT server is private network IP address, and public network main frame is not when knowing NAT server buffer table content, cannot accessing private network device, this just manages, for public network server, the private network device hung under NAT server and brings difficulty.In order to tackle this problem, occur as soon as NAT server through-transmission technique (NAT server udp hole punching).Its principle is that public network main frame is known a priori by NAT server buffer table the mapping relations of corresponding " private network host IP address and port ", " the IP address of NAT server and port ", then message is sent to this " IP address and the port " of NAT server, it is possible to be forwarded to corresponding private network main frame by NAT server.The typical application example of Fig. 1 that is, public network has a station server, is named as public network service centre temporarily, its IP is public network IP address, has a NAT server between service centre and private network device, and it has two pieces of network interface cards, being furnished with public network IP address for one piece, another block is furnished with private network IP address.Multiple equipment is hung with, such as private network device 1, private network device 2 and private network device 3 under NAT server.The private network device of lower extension is furnished with private network IP and with NAT server route up to, and the gateway preparing these private network devices is NAT server.When private network device accesses the port of public network service centre with the port of self, the cache table on NAT server can preserve the IP mapping relations of correspondence to ensure the carrying out of communication.In order to keep NAT server buffer table content will not by NAT server aging fall, private network device need in each ageing time all to public network service centre port transmission one probe messages, to ensure that these mapping relations are not deleted.
In summary, when the cycle of the private network device above-mentioned probe messages of transmission is less than the ageing time of NAT server, penetrating could be successful, but, the cycle sent can not be too little, multiple message otherwise can occur to send within a digestion period, so when server needs to manage multiple private network device simultaneously, can too much take the bandwidth resources of network, the server of increase and the pressure of network.
Summary of the invention
Embodiments provide a kind of method of detection network address translation server ageing time, Apparatus and system, in order to alleviate offered load, efficiently utilize Internet resources.
The method of a kind of detection network address translation server ageing time that the embodiment of the present invention provides, the method includes:
Send to characterize to public network main frame by network address translation NAT server from private network and be in the ageing time probe messages of acquisition mode, described ageing time probe messages is carried for informing that what public network main frame returned corresponding response message delays duration information;
If receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the ageing time probe messages sent every time be increased step-like, till not receiving described response message first;
If not receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the described ageing time probe messages sent every time be that step-by-step movement is successively decreased, till receiving described response message first;
In the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope, within the scope of described ageing time, test value is chosen for sending ageing time probe messages by presetting regular periodicity, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero.
The method of a kind of detection network address translation server ageing time that the embodiment of the present invention provides, the method includes:
Receive the ageing time probe messages that private network device is sent by network address translation NAT server;
When described ageing time probe messages characterizes and is in acquisition mode, described ageing time probe messages includes delaying duration information, duration information is delayed according to described, rise when receiving described ageing time probe messages, after delaying the corresponding time, send corresponding response message by described NAT server to described private network device.
The device of a kind of detection network address translation server ageing time that the embodiment of the present invention provides, this device includes:
Cycle sending module, it is in the ageing time probe messages of acquisition mode for being sent to public network main frame by network address translation NAT server from private network, described ageing time probe messages is carried for informing that what public network main frame returned corresponding response message delays duration information;
Judge to select module, result for being in the ageing time probe messages of acquisition mode according to described transmission judges, if receiving the described response message of return, then notify that described cycle sending module continues to send and characterize the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the ageing time probe messages sent every time be increased step-like, till not receiving described response message first;
If not receiving the described response message of return, then notify that described cycle sending module continues to send and characterize the ageing time probe messages being in acquisition mode, and delay duration information step-by-step movement the ageing time probe messages sent is carried every time described in and successively decrease, till receiving described response message first;
Analyze and select module, for by preset regular periodicity choose within the scope of described ageing time test value for notify described cycle sending module send ageing time probe messages, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero, in the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope.
The device of a kind of detection network address translation server ageing time that the embodiment of the present invention provides, this device includes:
Receiver module, for receiving the ageing time probe messages that private network device is sent by network address translation NAT server;
Respond module, for when described ageing time probe messages characterizes and is in acquisition mode, described ageing time probe messages includes delaying duration information, duration information is delayed according to described, rise when receiving described ageing time probe messages, after delaying the corresponding time, send corresponding response message by described NAT server to described private network device.
The system of a kind of detection network address translation server ageing time that the embodiment of the present invention provides, this system includes:
Private network device, it is in the ageing time probe messages of acquisition mode for sending to characterize to public network main frame by network address translation NAT server from private network, described ageing time probe messages is carried for informing that what public network main frame returned corresponding response message delays duration information;
If receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the ageing time probe messages sent every time be increased step-like, till not receiving described response message first;
If not receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the described ageing time probe messages sent every time be that step-by-step movement is successively decreased, till receiving described response message first;
In the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope, within the scope of described ageing time, test value is chosen for sending ageing time probe messages by presetting regular periodicity, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero;
Public network main frame, for receiving the ageing time probe messages that private network device is sent by network address translation NAT server;
When described ageing time probe messages characterizes and is in acquisition mode, described ageing time probe messages includes delaying duration information, duration information is delayed according to described, rise when receiving described ageing time probe messages, after delaying the corresponding time, send corresponding response message by described NAT server to described private network device.
The embodiment of the present invention, periodically send and characterize the ageing time probe messages being in acquisition mode, and adopt the method for stepping first to determine ageing time scope, and within the scope of the ageing time determined, determine a prediction ageing time close to the ageing time of NAT server by default rule further, it is achieved thereby that the equipment of private network can both keep being connected with the equipment of public network, offered load can be alleviated again, and utilize Internet resources efficiently.
Accompanying drawing explanation
Communication flow schematic diagram between a kind of existing private network device and public network main frame that Fig. 1 provides for the embodiment of the present invention;
The schematic flow sheet of the method for a kind of detection network address translation server ageing time that Fig. 2 provides for the embodiment of the present invention;
The method flow schematic diagram of a kind of detection network address translation server ageing time that Fig. 3 provides for the embodiment of the present invention;
The structural representation of the device of a kind of detection network address translation server ageing time that Fig. 4 provides for the embodiment of the present invention;
The structural representation of the device of a kind of detection network address translation server ageing time that Fig. 5 provides for the embodiment of the present invention;
A kind of private network device that Fig. 6 provides for the embodiment of the present invention sends the state diagram of ageing time probe messages to service centre;
A kind of private network device that Fig. 7 provides for the embodiment of the present invention sends the state diagram of ageing time probe messages to service centre;
A kind of private network device that Fig. 8 provides for the embodiment of the present invention sends the state diagram of ageing time probe messages to service centre;
A kind of private network device that Fig. 9 provides for the embodiment of the present invention sends the state diagram of ageing time probe messages to service centre;
A kind of private network device that Figure 10 provides for the embodiment of the present invention sends the state diagram of ageing time probe messages to service centre;
A kind of private network device that Figure 11 provides for the embodiment of the present invention sends the state diagram of ageing time probe messages to service centre.
Detailed description of the invention
Present private network device with in the information interactive process of public network main frame, need to carry out information forwarding through NAT server, owing to NAT server belongs to third-party server, the concrete length of the ageing time of its setting is not easy to be known by private network device and public network main frame, so private network device sends to public network main frame for the mapping relations that maintain on NAT server in cache table, the cycle length of probe messages is bad to be determined, the too short pressure easily causing network and public network main frame is excessive, the long loss easily causing again mapping relations.
In order to solve the problems referred to above, embodiments provide a kind of method of detection network address translation server ageing time, Apparatus and system, in order to alleviate offered load, efficiently utilize Internet resources.
As in figure 2 it is shown, in order to achieve the above object, first in private network device side, a kind of method embodiments providing detection network address translation server ageing time, the method includes:
S101, sends to characterize to public network main frame by network address translation NAT server from private network and is in the ageing time probe messages of acquisition mode, carries for informing that what public network main frame returned corresponding response message delays duration information in described ageing time probe messages;
S102, if receiving the described response message of return, then continue to send to be in the ageing time probe messages of acquisition mode, and to delay duration information described in carrying in the ageing time probe messages every time sent be increased step-like, till not receiving described response message first;
S103, if not receiving the described response message of return, then continue to send to be in the ageing time probe messages of acquisition mode, and to delay duration information described in carrying in the described ageing time probe messages every time sent be that step-by-step movement is successively decreased, till receiving described response message first;
S104, in the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope, within the scope of described ageing time, test value is chosen for sending ageing time probe messages by presetting regular periodicity, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero.
In embodiments of the present invention, in order to detect the ageing time of NAT server, the ageing time probe messages sent sets one and delays duration, allow public network main frame when receiving this detection report, delay the time of the response message of return accordingly, private network device is according to whether the response message that can obtain returning is to judge the ageing time of NAT server, such as response message as described in obtaining, what represent this setting delays duration less than described ageing time, such as response message as described in not obtaining, what represent this setting delays duration more than described ageing time, after sending first, can according to above-mentioned concrete condition, what be stepped up transmission every time when less than ageing time delays duration, when more than described ageing time, what gradually reduce transmission every time delays duration, can set that a step value, amplitude with clearly gradually stepping every time, until public network main frame receives first or does not receive response message first, then using delaying duration and delaying duration as the higher limit of the scope of this NAT server ageing time and lower limit in the last probe messages sent in the last current probe messages sent, namely the embodiment of the present invention takes the method for stepping and delimit the ageing time scope of NAT server.
After determining ageing time scope, by the pre-defined rule set, choose further within the scope of this and delay duration, continue to send probe messages, it is obtained in that the duration of delaying that this is then chosen by response message displaces limit value, the duration of delaying that this is then chosen by response message can not be obtained and replace higher limit, the difference of so described ageing time scope bound is more and more less, increasingly level off to the ageing time of NAT server, when the limit D-value of described ageing time scope is less than preset value, such as 2S, then stop choosing, the private network device ageing time using present ageing time lower limit as prediction, when private network device needs to keep being connected with public network main frame so that when being subject to monitoring or the management of public network main frame, can with this time for interval, periodically send for keeping the probe messages connected, both ensure that NAT server will not be deleted and the mapping relations of corresponding public network main frame, the pressure that will not make again network and/or public network main frame is excessive.
It should be noted that choosing of above-mentioned preset value can be set according to practical situation, for instance, when needs precision chooses prediction ageing time, it is possible to suitably reduce this preset value.
It is understood that when every time sending ageing time probe messages, the time to be received such as should set, during beyond this time, represent and continue the transmission of ageing time probe messages next time by the response message not obtaining return.
Above-mentioned preset rules can be set according to operator, such as, two way classification can be adopted, choose the intermediate value of current ageing time scope as test value next time every time, the value every time choosing current ageing time scope 1/3rd place can also be adopted as test value next time, and concrete rule can be varied as desired in.
On the basis of above-described embodiment, employing two way classification is discussed in detail realize described within the scope of described ageing time, choosing test value for sending ageing time probe messages by presetting regular periodicity, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, detailed process includes:
Periodically according to described ageing time higher limit and ageing time lower limit, draw meansigma methods;
Described meansigma methods is sent ageing time probe messages extremely described public network main frame as delaying duration information;
As received the response message of return, then described meansigma methods replaces existing described ageing time lower limit, and as do not received the response message of return, then described meansigma methods replaces existing described ageing time upper limit limit value;
When the limit D-value of described ageing time scope is less than preset value, now the lower limit of described ageing time scope is prediction ageing time.
In the above-described embodiments, it is preferred to use the calculation of two way classification draws prediction ageing time, compares other computational methods, decreases calculation procedure as much as possible.
In order to ensure that result is not zero, when choosing described meansigma methods, should round up.
Further, after obtaining described prediction ageing time, the sign of described ageing time probe messages is proceeded to maintenance state by acquisition mode, periodically send for keeping the ageing time probe messages connected to described public network equipment according to described prediction ageing time.
In embodiments of the present invention, after privately owned equipment obtains described prediction ageing time, described ageing time probe messages is entered maintenance state by acquisition mode, the correspondence mappings relation that purpose is become on maintenance NAT server in cache table from the ageing time detecting NAT server, to ensure that private network device can be managed by public network main frame at random, control.
In order to coordinate said method, at public network host computer side, as it is shown on figure 3, a kind of method embodiments providing detection network address translation server ageing time, the method includes:
S201, receives the ageing time probe messages that private network device is sent by network address translation NAT server;
S202, when described ageing time probe messages characterizes and is in acquisition mode, described ageing time probe messages includes delaying duration information, duration information is delayed according to described, rise when receiving described ageing time probe messages, after delaying the corresponding time, send corresponding response message by described NAT server to described private network device.
In embodiments of the present invention, public network main frame is receiving ageing time probe messages, when the sign of this message is in acquisition mode, delays duration information according to what it carried, delays the response message that the return of corresponding time is corresponding.To help described private network device can smoothly complete the purpose of the ageing time detecting NAT server.
At public network host computer side, further, when receiving the described ageing time probe messages that sign is in maintenance state, corresponding response message is sent immediately.
When described ageing time probe messages characterizes and is in maintenance state, illustrate that the purpose of private network device is for keeping being connected with public network main frame, then return response message immediately.
As shown in the table, carry out illustrating to the form of the response message in said method Yu ageing time probe messages:
Table 1 is ageing time probe messages form:
Table 1
Table 2 is response message form:
Table 2
Corresponding said method, embodiments provides the device of a kind of detection network address translation server ageing time, and as shown in Figure 4, this device includes:
Cycle sending module 1, it is in the ageing time probe messages of acquisition mode for being sent to public network main frame by network address translation NAT server from private network, described ageing time probe messages is carried for informing that what public network main frame returned corresponding response message delays duration information;
Judge to select module 2, result for being in the ageing time probe messages of acquisition mode according to described transmission judges, if receiving the described response message of return, then notify that described cycle sending module continues to send and characterize the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the ageing time probe messages sent every time be increased step-like, till not receiving described response message first;
If not receiving the described response message of return, then notify that described cycle sending module continues to send and characterize the ageing time probe messages being in acquisition mode, and delay duration information step-by-step movement the ageing time probe messages sent is carried every time described in and successively decrease, till receiving described response message first;
Analyze and select module 3, for by preset regular periodicity choose within the scope of described ageing time test value for notify described cycle sending module send ageing time probe messages, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero, in the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope.
In embodiments of the present invention, in order to detect the ageing time of NAT server, periodically sending module sets one in the ageing time probe messages sent and delays duration, allow public network main frame when receiving this detection report, delay the time of the response message of return accordingly, the judgement of this device selects module according to whether the response message that can obtain returning is to judge the ageing time of NAT server, such as response message as described in obtaining, what represent this setting delays duration less than described ageing time, such as response message as described in not obtaining, what represent this setting delays duration more than described ageing time, after sending first, can according to above-mentioned concrete condition, what be stepped up transmission every time when less than ageing time delays duration, when more than described ageing time, what gradually reduce transmission every time delays duration, can set that a step value, amplitude with clearly gradually stepping every time, until public network main frame receives first or does not receive response message first, then using delaying duration and delaying duration as the higher limit of the scope of this NAT server ageing time and lower limit in the last probe messages sent in the last current probe messages sent, namely the embodiment of the present invention takes the method for stepping and delimit the ageing time scope of NAT server.
After determining ageing time scope, analyze the pre-defined rule selecting module by setting, choose further within the scope of this and delay duration, continue to send probe messages, it is obtained in that the duration of delaying that this is then chosen by response message displaces limit value, the duration of delaying that this is then chosen by response message can not be obtained and replace higher limit, the difference of so described ageing time scope bound is more and more less, increasingly level off to the ageing time of NAT server, when the limit D-value of described ageing time scope is less than preset value, such as 2S, then stop choosing, this device ageing time using present ageing time lower limit as prediction, when private network device needs to keep being connected with public network main frame so that when being subject to monitoring or the management of public network main frame, can with this time for interval, periodically send for keeping the probe messages connected, both ensure that NAT server will not be deleted and the mapping relations of corresponding public network main frame, the pressure that will not make again network and/or public network main frame is excessive.
It should be noted that choosing of above-mentioned preset value can be set according to practical situation, for instance, when needs precision chooses prediction ageing time, it is possible to suitably reduce this preset value.
It is understandable that, when sending ageing time probe messages, this device can set that a timer carries out timing for the time of reciprocity corresponding message to be received, during beyond this time every time, represent the response message not obtaining return, continue the transmission of ageing time probe messages next time.
Above-mentioned preset rules can be set according to operator, such as, two way classification can be adopted, choose the intermediate value of current ageing time scope as test value next time every time, the value every time choosing current ageing time scope 1/3rd place can also be adopted as test value next time, and concrete rule can be varied as desired in.
On the basis of above-described embodiment, be discussed in detail a kind of adopt two way classification determine prediction ageing time method, described analysis select module specifically for:
Periodically according to described ageing time higher limit and ageing time lower limit, draw meansigma methods;
Described meansigma methods is sent ageing time probe messages extremely described public network main frame as delaying duration information;
As received the response message of return, then described meansigma methods replaces existing described ageing time lower limit, and as do not received the response message of return, then described meansigma methods replaces existing described ageing time upper limit limit value;
When the limit D-value of described ageing time scope is less than preset value, now the lower limit of described ageing time scope is prediction ageing time.
In the above-described embodiments, it is preferred to use the calculation of two way classification draws prediction ageing time, when described preset value terminates for control flow, the precision of described prediction ageing time, this method compares other computational methods, decreases calculation procedure as much as possible.
In order to ensure that result is not zero, described analysis selects module when choosing described meansigma methods, should round up.
Further, this device also includes module of keeping in communication, for after obtaining described prediction ageing time, the sign of described ageing time probe messages is proceeded to maintenance state by acquisition mode, periodically sends for keeping the ageing time probe messages connected to described public network equipment according to described prediction ageing time.
In embodiments of the present invention, after the message dispensing device of this detection network address translation server ageing time obtains described prediction ageing time, when private network device needs to keep being connected with public network main frame, described ageing time probe messages can be entered maintenance state by acquisition mode, the correspondence mappings relation that purpose is become on maintenance NAT server in cache table from the ageing time detecting NAT server, to ensure that private network device can be managed by public network main frame at random, control.
Corresponding said apparatus, at public network host computer side, embodiments provides the device of a kind of detection network address translation server ageing time, as it is shown in figure 5, this device includes:
Receiver module 3, for receiving the ageing time probe messages that private network device is sent by network address translation NAT server;
Respond module 4, for when described ageing time probe messages characterizes and is in acquisition mode, described ageing time probe messages includes delaying duration information, duration information is delayed according to described, rise when receiving described ageing time probe messages, after delaying the corresponding time, send corresponding response message by described NAT server to described private network device.
In embodiments of the present invention, the receiver module of the message response device of this detection network address translation server ageing time is when receiving ageing time probe messages, respond module judges, when this message is in acquisition mode, delay duration information according to what it included, delay the response message that the return of corresponding time is corresponding.To smoothly complete the purpose of the ageing time of detection NAT server.
Further, described respond module, when receiving the described ageing time probe messages that sign is in maintenance state, sends corresponding response message immediately.
The message response device of the detection network address translation server ageing time in the above embodiment of the present invention can be integrated on public network main frame, and the message dispensing device of this detection network address translation server ageing time can be integrated on private network device.
The embodiment of the present invention additionally provides the system of a kind of detection network address translation server ageing time, and this system includes:
Private network device, it is in the ageing time probe messages of acquisition mode for sending to characterize to public network main frame by network address translation NAT server from private network, described ageing time probe messages is carried for informing that what public network main frame returned corresponding response message delays duration information;
If receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the ageing time probe messages sent every time be increased step-like, till not receiving described response message first;
If not receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the described ageing time probe messages sent every time be that step-by-step movement is successively decreased, till receiving described response message first;
In the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope, within the scope of described ageing time, test value is chosen for sending ageing time probe messages by presetting regular periodicity, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero;
Public network main frame, for receiving the ageing time probe messages that private network device is sent by network address translation NAT server;
When described ageing time probe messages characterizes and is in acquisition mode, described ageing time probe messages includes delaying duration information, duration information is delayed according to described, rise when receiving described ageing time probe messages, after delaying the corresponding time, send corresponding response message by described NAT server to described private network device.
In order to technical scheme is discussed in detail, the embodiment of a kind of method of detection network address translation server ageing time, Apparatus and system cooperating is described in detail below:
In the invention process, described public network main frame is public network service centre, it is now assumed that the ageing time of this NAT server is 5s, the step value set is as 5s, and the predetermined value set is as 1s, and initial time delay is 12s, and employing method is two way classification.
As shown in Figure 6, private network device sends to public network service centre and characterizes the ageing time probe messages being in acquisition mode, set first delay duration as 12s, service centre returns response message after receiving this message 12s, owing to delaying duration more than described ageing time, private network device does not receive response message;
As shown in Figure 7, private network device, after exceeding the waiting time set, will be delayed duration according to step value and be kept to 7s, continue to send the ageing time probe messages being in acquisition mode, owing to delaying duration still more than described ageing time, private network device does not receive response message within the waiting time yet;
As shown in Figure 8, delaying duration and continue to be kept to 2s, and send and characterize the ageing time probe messages being in acquisition mode, owing to delaying duration less than described ageing time, private network device have received response message first within the waiting time.The lower limit delimiting ageing time scope is 2s, higher limit 7s;
As shown in Figure 9, continue the ageing time scope adopting two way classification to reduce delimitation further, continue to send sign with the meansigma methods of current ageing time higher limit with lower limit for test value and be in the ageing time probe messages of acquisition mode, then this test value is=(2+7)/2=5s after rounding up, due to not less than the 5s of ageing time, private network device does not receive response message, and this test value 5s replaces original ageing time higher limit 7s;
As shown in Figure 10, continue to send sign with the meansigma methods of current ageing time higher limit with lower limit for test value and be in the ageing time probe messages of acquisition mode, then this test value is=(2+5)/2=4s, less than ageing time 5s, private network device receives response message, this test value 4s replaces original ageing time lower limit 2s, owing to the difference between current ageing time higher limit (5s) and lower limit (4s) is equal to preset value 1s, then stop the transmission of probe messages, with current ageing time lower limit (4s) for prediction ageing time;
As shown in figure 11, the sign of described ageing time probe messages is transferred to maintenance state (0) by acquisition mode (1), and to predict that ageing time is for the cycle, periodically send to described service centre and characterize the ageing time probe messages being in maintenance state, it is ensured that the correspondence mappings relation of this private network device in the cache table of NAT server and service centre IP address is not deleted.
In sum, the embodiment of the present invention, periodically send and characterize the ageing time probe messages being in acquisition mode, and adopt the method for stepping first to determine ageing time scope, and within the scope of the ageing time determined, determine a prediction ageing time close to the ageing time of NAT server by default rule further, it is achieved thereby that the equipment of private network can both keep being connected with the equipment of public network, offered load can be alleviated again, and utilize Internet resources efficiently.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, complete software implementation or the embodiment in conjunction with software and hardware aspect.And, the present invention can adopt the form at one or more upper computer programs implemented of computer-usable storage medium (including but not limited to disk memory and optical memory etc.) wherein including computer usable program code.
The present invention is that flow chart and/or block diagram with reference to method according to embodiments of the present invention, equipment (system) and computer program describe.It should be understood that can by the combination of the flow process in each flow process in computer program instructions flowchart and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can be provided to produce a machine to the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device so that the instruction performed by the processor of computer or other programmable data processing device is produced for realizing the device of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide in the computer-readable memory that computer or other programmable data processing device work in a specific way, the instruction making to be stored in this computer-readable memory produces to include the manufacture of command device, and this command device realizes the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices provides for realizing the step of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
Obviously, the present invention can be carried out various change and modification without deviating from the spirit and scope of the present invention by those skilled in the art.So, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (9)

1. the method for a detection network address translation server ageing time, it is characterised in that the method includes:
Send to characterize to public network main frame by network address translation NAT server from private network and be in the ageing time probe messages of acquisition mode, described ageing time probe messages is carried for informing that what public network main frame returned corresponding response message delays duration information;
If receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the ageing time probe messages sent every time be increased step-like, till not receiving described response message first;
If not receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the described ageing time probe messages sent every time be that step-by-step movement is successively decreased, till receiving described response message first;
In the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope, within the scope of described ageing time, test value is chosen for sending ageing time probe messages by presetting regular periodicity, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero.
2. the method for claim 1, it is characterized in that, described within the scope of described ageing time, choose test value for sending ageing time probe messages by presetting regular periodicity, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, specifically include:
Periodically according to described ageing time higher limit and ageing time lower limit, draw meansigma methods;
Described meansigma methods is sent ageing time probe messages extremely described public network main frame as delaying duration information;
As received the response message of return, then described meansigma methods replaces existing described ageing time lower limit, and as do not received the response message of return, then described meansigma methods replaces existing described ageing time higher limit;
When the limit D-value of described ageing time scope is less than preset value, now the lower limit of described ageing time scope is prediction ageing time.
3. method as claimed in claim 2, it is characterised in that when choosing described meansigma methods, round up.
4. method as claimed in claim 3, it is characterized in that, after obtaining described prediction ageing time, the sign of described ageing time probe messages is proceeded to maintenance state by acquisition mode, periodically sends for keeping the ageing time probe messages connected to described public network equipment according to described prediction ageing time.
5. the device of a detection network address translation server ageing time, it is characterised in that this device includes:
Cycle sending module, it is in the ageing time probe messages of acquisition mode for being sent to public network main frame by network address translation NAT server from private network, described ageing time probe messages is carried for informing that what public network main frame returned corresponding response message delays duration information;
Judge to select module, result for being in the ageing time probe messages of acquisition mode according to described transmission judges, if receiving the described response message of return, then notify that described cycle sending module continues to send and characterize the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the ageing time probe messages sent every time be increased step-like, till not receiving described response message first;
If not receiving the described response message of return, then notify that described cycle sending module continues to send and characterize the ageing time probe messages being in acquisition mode, and delay duration information step-by-step movement the ageing time probe messages sent is carried every time described in and successively decrease, till receiving described response message first;
Analyze and select module, for by preset regular periodicity choose within the scope of described ageing time test value for notify described cycle sending module send ageing time probe messages, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero, in the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope.
6. device as claimed in claim 5, it is characterised in that described analysis select module specifically for:
Periodically according to described ageing time higher limit and ageing time lower limit, draw meansigma methods;
Described meansigma methods is sent ageing time probe messages extremely described public network main frame as delaying duration information;
As received the response message of return, then described meansigma methods replaces existing described ageing time lower limit, and as do not received the response message of return, then described meansigma methods replaces existing described ageing time higher limit;
When the limit D-value of described ageing time scope is less than preset value, now the lower limit of described ageing time scope is prediction ageing time.
7. device as claimed in claim 6, it is characterised in that described analysis selects module when choosing described meansigma methods, rounds up.
8. device as claimed in claim 7, it is characterized in that, this device also includes module of keeping in communication, for after obtaining described prediction ageing time, the sign of described ageing time probe messages is proceeded to maintenance state by acquisition mode, periodically sends for keeping the ageing time probe messages connected to described public network equipment according to described prediction ageing time.
9. the system of a detection network address translation server ageing time, it is characterised in that this system includes:
Private network device, it is in the ageing time probe messages of acquisition mode for sending to characterize to public network main frame by network address translation NAT server from private network, described ageing time probe messages is carried for informing that what public network main frame returned corresponding response message delays duration information;
If receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the ageing time probe messages sent every time be increased step-like, till not receiving described response message first;
If not receiving the described response message of return, then continue to send the ageing time probe messages being in acquisition mode, and to delay duration information described in carrying in the described ageing time probe messages sent every time be that step-by-step movement is successively decreased, till receiving described response message first;
In the ageing time probe messages of last twice transmission, correspondence delays duration information respectively ageing time higher limit and ageing time lower limit, between interval be ageing time scope, within the scope of described ageing time, test value is chosen for sending ageing time probe messages by presetting regular periodicity, according to whether receive the result of response message, judge that the described test value this time chosen replaces with ageing time higher limit or ageing time lower limit, until the limit D-value of described ageing time scope is less than or equal to preset value, described ageing time lower limit is not less than zero;
Public network main frame, for receiving the ageing time probe messages that private network device is sent by network address translation NAT server;
When described ageing time probe messages characterizes and is in acquisition mode, described ageing time probe messages includes delaying duration information, duration information is delayed according to described, rise when receiving described ageing time probe messages, after delaying the corresponding time, send corresponding response message by described NAT server to described private network device.
CN201210568791.9A 2012-12-24 2012-12-24 The method of detection network address translation server ageing time, Apparatus and system Active CN103024097B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210568791.9A CN103024097B (en) 2012-12-24 2012-12-24 The method of detection network address translation server ageing time, Apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210568791.9A CN103024097B (en) 2012-12-24 2012-12-24 The method of detection network address translation server ageing time, Apparatus and system

Publications (2)

Publication Number Publication Date
CN103024097A CN103024097A (en) 2013-04-03
CN103024097B true CN103024097B (en) 2016-06-29

Family

ID=47972217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210568791.9A Active CN103024097B (en) 2012-12-24 2012-12-24 The method of detection network address translation server ageing time, Apparatus and system

Country Status (1)

Country Link
CN (1) CN103024097B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243283A (en) * 2014-09-16 2014-12-24 合肥协知行信息***工程有限公司 Instant messaging method based on NAT
CN107547295B (en) * 2017-05-10 2020-03-10 新华三信息安全技术有限公司 Aging method and device for domain name cache table entries
CN111917660B (en) * 2020-06-22 2023-08-29 中盈优创资讯科技有限公司 Optimization method and device for gateway equipment policy

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1993949A (en) * 2004-08-03 2007-07-04 松下电器产业株式会社 Information processing system, information processing apparatus, server apparatus, information processing method and program
CN101064625A (en) * 2006-04-27 2007-10-31 中兴通讯股份有限公司 Method for managing user side equipment through network address translation gateway
CN101355570A (en) * 2008-09-19 2009-01-28 杭州华三通信技术有限公司 Control method and control device for reporting aging information
CN102232284A (en) * 2011-05-06 2011-11-02 华为技术有限公司 Method and device for improving performance for accessing forwarding table

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825828B (en) * 2005-02-24 2011-04-27 北京风行在线技术有限公司 Method and apparatus for controlling direct transmission communication with two terminals under different NAT
US20090252072A1 (en) * 2008-04-08 2009-10-08 Telefonaktiebolaget Lm Ericsson (Publ) Method and Apparatus for Maintaining Long-Lived Connections Between a Mobile Client and a Server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1993949A (en) * 2004-08-03 2007-07-04 松下电器产业株式会社 Information processing system, information processing apparatus, server apparatus, information processing method and program
CN101064625A (en) * 2006-04-27 2007-10-31 中兴通讯股份有限公司 Method for managing user side equipment through network address translation gateway
CN101355570A (en) * 2008-09-19 2009-01-28 杭州华三通信技术有限公司 Control method and control device for reporting aging information
CN102232284A (en) * 2011-05-06 2011-11-02 华为技术有限公司 Method and device for improving performance for accessing forwarding table

Also Published As

Publication number Publication date
CN103024097A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
US20160299482A1 (en) Automatic inspection and monitoring method based on time domain slotting control
CN107301084B (en) Virtual machine migration method and device of cluster server, server and storage medium
CN109379445A (en) A kind of sending method and device of PUSH message
CN103338488A (en) Network switching method, terminal, controller, gateway and system
CN103024097B (en) The method of detection network address translation server ageing time, Apparatus and system
CN113596863A (en) Method, apparatus and medium for determining user plane function and providing information
CN104378451A (en) Network communication route selecting method, device and system
CN103228005A (en) Testing method and device for data service of mobile communication network
US20230161541A1 (en) Screen projection method and system
CN109600809A (en) A kind of channel switching method, device and equipment
CN104954431A (en) Network selection method, device and system
CN103607731B (en) A kind of processing method and processing device of measurement report
CN103595736B (en) Access request treating method and apparatus in video monitoring system
CN103888364A (en) Message shunting method and device
CN104486168A (en) Router wireless performance evaluation system and method
CN104702530A (en) Method and device for sending Goose message in ring network
IL266014B2 (en) Data transmission method, terminal device and network device
CN106506640B (en) A kind of processing method and processing device of SNMP request
CN110943876A (en) URL state detection method, device, equipment and system
CN111432453B (en) Communication channel determination method, device and equipment
CN109587806A (en) A kind of scheduling request sending method and terminal device
CN105794289B (en) System and method for mitigating wireless interference
CN104468337A (en) Message transmission method and device, message management center device and data centers
CN104079658B (en) Environmentally friendly Internet of Things real-time control method based on pool technology under Web environment
CN107247638B (en) Data backup method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant