CN103384280A - Method and system for managing network address translation port resources - Google Patents

Method and system for managing network address translation port resources Download PDF

Info

Publication number
CN103384280A
CN103384280A CN2012101335338A CN201210133533A CN103384280A CN 103384280 A CN103384280 A CN 103384280A CN 2012101335338 A CN2012101335338 A CN 2012101335338A CN 201210133533 A CN201210133533 A CN 201210133533A CN 103384280 A CN103384280 A CN 103384280A
Authority
CN
China
Prior art keywords
ageing time
nat entry
network address
time
span
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.)
Granted
Application number
CN2012101335338A
Other languages
Chinese (zh)
Other versions
CN103384280B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201210133533.8A priority Critical patent/CN103384280B/en
Publication of CN103384280A publication Critical patent/CN103384280A/en
Application granted granted Critical
Publication of CN103384280B publication Critical patent/CN103384280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, and particularly relates to a method for managing network address translation port resources. The method comprises the steps that every time a data package is sent, the aging time of a network address translation port NAT entry corresponding to the data package is updated to be an initial ageing time T0, the initial ageing time T0 of a control link ranges from 30 minutes to 2 hours, and the initial ageing time T0 of a data link ranges from 3 minutes to 30 minutes; according to the data link, when the current usage rate of the NAT entry is not less than a preset threshold value, the remaining ageing time of the NAT entry is shortened; when the ageing time of the NAT entry is up, the NAT entry is released. Through the technical scheme, the NAT entry which is occupied and is not used can be fast released to solve the problem that a user cannot surf the Internet due to the fact that the NAT entry is used up.

Description

A kind of network address conversion port method for managing resource and system
Technical field
The present invention relates to field of mobile communication, particularly relate to a kind of NAT (Network Address Translation, network address translation) entry (port) method for managing resource and system.
Background technology
Along with the development of wifi (WLAN (wireless local area network)) technology, HOTSPOT (hotspot) has appearred in increasing place, and this provides convenience to people's online.But exist the restriction of internal resource when the conversion of the network address and private address due to HOTSPOT, when a plurality of terminal uses do large flow business with a HOTSPOT simultaneously, the inadequate problem of NAT entry resource occurs sometimes, cause the user to surf the Net.Thereby, be necessary to develop a kind of occupied but method of the NAT entry that is not used of quick release, exhaust and cause the problem that the user could not get on to the Net to solve NAT entry.
At present, the effective solution that still there is no the problems referred to above in prior art.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of network address conversion port method for managing resource and system, can discharge fast NAT entry occupied but that be not used, exhaust and cause the problem that the user could not get on to the Net to solve in prior art NAT entry.
As one aspect of the present invention, a kind of network address conversion port method for managing resource is provided, comprising:
When sending packet, the ageing time of the network address conversion port NAT entry that this packet is corresponding is updated to initial ageing time T0, wherein, for control link, the span of described initial ageing time T0 is 30 minutes to 2 hours, for data link, the span of described initial ageing time T0 is 3-30 minute;
When the ageing time of described NAT entry then, discharge described NAT entry.
Preferably, for control link, the span of described initial ageing time T0 is 50-70 minute, and for data link, the span of described initial ageing time T0 is 8-15 minute.
Preferably, the inventive method also comprises:
For data link, when the current utilization rate of described NAT entry is not less than pre-set threshold value, shorten the residue ageing time of described NAT entry, namely shorten the residue time-to-live of described NAT entry; Wherein, the span of described pre-set threshold value is 25% to 100%.
Wherein, shorten the residue ageing time of described NAT entry, only refer to shorten the residue ageing time greater than the residue ageing time of the described NAT entry of Preset Time thresholding t1, and the residue ageing time of described NAT entry foreshortens to described Preset Time thresholding t1.
Further preferred, will be divided into more than or equal to the current utilization rate of the described NAT entry of described pre-set threshold value W interval, described Preset Time thresholding t1 of each interval correspondence respectively; And the current utilization rate of described NAT entry is higher, and described Preset Time thresholding t1 is less; Wherein, W is the natural number greater than 1.
As another aspect of the present invention, a kind of network address conversion port resource management system is provided, comprising:
The ageing time update module, be used for when sending packet, the ageing time of the network address conversion port NAT entry that this packet is corresponding is updated to initial ageing time T0, wherein, for control link, the span of described initial ageing time T0 be 30 minutes to 2 hours, for data link, the span of described initial ageing time T0 is 3-30 minute;
The port resource release module for the ageing time of working as described NAT entry then, discharges described NAT entry.
Preferably, for control link, the span of described initial ageing time T0 is 50-70 minute, and for data link, the span of described initial ageing time T0 is 8-15 minute.
Preferably, system of the present invention also comprises:
The ageing time adjusting module is used for for data link, when the current utilization rate of described NAT entry is not less than pre-set threshold value, shortens the residue ageing time of described NAT entry, namely shortens the residue time-to-live of described NAT entry; Wherein, the span of described pre-set threshold value is 25% to 100%.
Wherein, shorten the residue ageing time of described NAT entry, only refer to shorten the residue ageing time greater than the residue ageing time of the described NAT entry of Preset Time thresholding t1, and the residue ageing time of described NAT entry foreshortens to described Preset Time thresholding t1.
Further preferred, described ageing time adjusting module also is used for, will be divided into more than or equal to the current utilization rate of the described NAT entry of described pre-set threshold value W interval, described Preset Time thresholding t1 of each interval correspondence respectively; And the current utilization rate of described NAT entry is higher, and described Preset Time thresholding t1 is less; Wherein, W is the natural number greater than 1.
Beneficial effect of the present invention is as follows:
The invention provides a kind of network address conversion port method for managing resource and system, carried out special setting by the initial ageing time to NAT entry, and when sending packet, all upgrade the initial ageing time of NAT entry corresponding to this packet, but thereby can discharge fast the occupied NAT entry that is not used, the NAT entry that has overcome extensive existence exhausts and causes the problem that the user could not get on to the Net.
Simultaneously, the present invention makes NAT entry resource obtain utilizing more efficiently according to the utilization rate of NAT respective links type and current NAT entry the release time of dynamic adjusting data link NAT entry, and the NAT entry that is using can not discharged.
Description of drawings
Fig. 1 is the network address conversion port method for managing resource schematic flow sheet of the embodiment of the present invention;
Fig. 2 shortens an instantiation schematic diagram of the residue ageing time of NAT entry in the inventive method;
Fig. 3 is the network address conversion port resource management system structural representation of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing and embodiment, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, does not limit the present invention.
Fig. 1 is the network address conversion port method for managing resource schematic flow sheet of the embodiment of the present invention, and as shown in Figure 1, network address conversion port method for managing resource of the present invention specifically comprises the steps:
Step 1, user need to send tcp data or UDP message.
Step 2, search NAT entry corresponding to this packet in existing NAT entry table, if find corresponding NAT entry, execution in step 3, otherwise execution in step 4.
Step 3, use the network address in this NAT entry information and network terminal slogan to replace private address and privately owned port numbers in TCP or UDP message bag, and the ageing time of the network address conversion port NAT entry that this packet is corresponding is updated to initial ageing time T0, and this NAT entry information is put into NAT entry table.Then execution in step 5.Wherein, ageing time refers to the time-to-live.
In this step, for control link, the span of initial ageing time T0 is 30 minutes to 2 hours, especially take 50-70 minute as good; For data link, the span of initial ageing time T0 is 3-30 minute, especially take 8-15 minute as good.
Step 4, the new NAT entry that sets up, use the network address in this new NAT entry information and network terminal slogan to replace private address and privately owned port numbers in TCP or UDP message bag, and the ageing time of this new NAT entry is set to initial ageing time T0.And this NAT entry information is put into NAT entry table.
In this step, for control link, the span of initial ageing time T0 is 30 minutes to 2 hours, especially take 50-70 minute as good; For data link, the span of initial ageing time T0 is 3-30 minute, especially take 8-15 minute as good.
Step 5, timer of startup, in this embodiment, timer time is set to 1-60s, take 10-20s as good, 10s for example is set, and upgrades the NAT entry information in NAT entry table in every 10s.
Step 6, when the 10s timer then, the time-to-live of all the NAT entry in NAT entry table is deducted 10s.And judgement link corresponding to NAT entry be data link or control link, if control link, and direct execution in step 9, if data link, execution in step 7.
Step 7, judge NAT entry current utilization rate whether less than pre-set threshold value, if less than pre-set threshold value execution in step 9, if be not less than execution in step 8 of pre-set threshold value.The span of pre-set threshold value is 25% to 100%.
Step 8, shorten the residue ageing time of NAT entry, namely shorten the residue time-to-live of NAT entry.
In this embodiment, shorten the residue ageing time of NAT entry, only refer to shorten the residue ageing time greater than the residue ageing time of the NAT entry of Preset Time thresholding t1, and the residue ageing time of NAT entry foreshortens to Preset Time thresholding t1.
This embodiment provides a kind of preferred version, will be divided into more than or equal to the current utilization rate of the NAT entry of pre-set threshold value W interval, each interval respectively corresponding Preset Time thresholding t1; And the current utilization rate of NATentry is higher, and t1 is less for the Preset Time thresholding; Wherein, W is the natural number greater than 1.
Below provide an instantiation of this step, as shown in Figure 2:
If (namely using) NAT entry number of current foundation is more than or equal to 1/4 of total NAT entry number of this HOTSPOT, but less than 1/2, will remain the time-to-live all to foreshorten to 5 minutes greater than residue time-to-live of all NAT entry of 5 minutes.
If the NAT entry number of current foundation more than or equal to total NAT entry number 1/2 and less than 3/4, will remain the time-to-live all to foreshorten to 3 minutes greater than residue time-to-live of all NAT entry of 3 minutes.
If the NAT entry number of setting up more than or equal to 3/4 of total NAT entry number, will remain the time-to-live and all foreshorten to 90s greater than residue time-to-live of all NAT entry of 90s.
Step 9, judge whether the time-to-live of NAT entry equals 0.If the time-to-live equals 0 carry out 10, if be not equal to 0, return to step 5.
Step 10, release NAT entry.
Fig. 3 is the network address conversion port resource management system structural representation of the embodiment of the present invention, as shown in Figure 3, network address conversion port resource management system of the present invention specifically comprises ageing time update module 301, ageing time adjusting module 302 and port resource release module 303.
Particularly, ageing time update module 301, be used for when sending packet, the ageing time of the network address conversion port NAT entry that this packet is corresponding is updated to initial ageing time T0, wherein, for control link, the span of initial ageing time T0 is 30 minutes to 2 hours, for data link, the span of initial ageing time T0 is 3-30 minute; Preferably, for control link, the span of initial ageing time T0 is 50-70 minute, and for data link, the span of initial ageing time T0 is 8-15 minute.
Ageing time adjusting module 302 is used for for data link, when the current utilization rate of NAT entry is not less than pre-set threshold value, shortens the residue ageing time of NAT entry, namely shortens the residue time-to-live of NAT entry; Wherein, the span of pre-set threshold value is 25% to 100%.
Wherein, shorten the residue ageing time of NAT entry, only refer to shorten the residue ageing time greater than the residue ageing time of the NAT entry of Preset Time thresholding t1, and the residue ageing time of NAT entry foreshortens to Preset Time thresholding t1.
Preferably, ageing time adjusting module 302 also be used for being divided into more than or equal to the current utilization rate of the NAT entry of described pre-set threshold value W interval, Preset Time thresholding t1 of each interval correspondence respectively; And the current utilization rate of NAT entry is higher, and t1 is less for the Preset Time thresholding; Wherein, W is the natural number greater than 1.
Port resource release module 303 for the ageing time of working as NAT entry then, discharges this NAT entry.
Although be the example purpose, the preferred embodiments of the present invention are disclosed, it is also possible those skilled in the art will recognize various improvement, increase and replacement, therefore, scope of the present invention should be not limited to above-described embodiment.

Claims (10)

1. a network address conversion port method for managing resource, is characterized in that, comprising:
When sending packet, the ageing time of the network address conversion port NAT entry that this packet is corresponding is updated to initial ageing time T0, wherein, for control link, the span of described initial ageing time T0 is 30 minutes to 2 hours, for data link, the span of described initial ageing time T0 is 3-30 minute;
When the ageing time of described NAT entry then, discharge described NAT entry.
2. network address conversion port method for managing resource as claimed in claim 1, it is characterized in that, for control link, the span of described initial ageing time T0 is 50-70 minute, for data link, the span of described initial ageing time T0 is 8-15 minute.
3. network address conversion port method for managing resource as claimed in claim 1 or 2, is characterized in that, also comprises:
For data link, when the current utilization rate of described NAT entry is not less than pre-set threshold value, shorten the residue ageing time of described NAT entry; Wherein, the span of described pre-set threshold value is 25% to 100%.
4. network address conversion port method for managing resource as claimed in claim 3, it is characterized in that, shorten the residue ageing time of described NAT entry, only refer to shorten the residue ageing time greater than the residue ageing time of the described NAT entry of Preset Time thresholding t1, and the residue ageing time of described NAT entry foreshortens to described Preset Time thresholding t1.
5. network address conversion port method for managing resource as claimed in claim 4, it is characterized in that, to be divided into more than or equal to the current utilization rate of the described NAT entry of described pre-set threshold value W interval, each interval respectively corresponding described Preset Time thresholding t1; And the current utilization rate of described NAT entry is higher, and described Preset Time thresholding t1 is less; Wherein, W is the natural number greater than 1.
6. a network address conversion port resource management system, is characterized in that, comprising:
The ageing time update module, be used for when sending packet, the ageing time of the network address conversion port NAT entry that this packet is corresponding is updated to initial ageing time T0, wherein, for control link, the span of described initial ageing time T0 be 30 minutes to 2 hours, for data link, the span of described initial ageing time T0 is 3-30 minute;
The port resource release module for the ageing time of working as described NAT entry then, discharges described NAT entry.
7. network address conversion port resource management system as claimed in claim 6, it is characterized in that, for control link, the span of described initial ageing time T0 is 50-70 minute, for data link, the span of described initial ageing time T0 is 8-15 minute.
8. network address conversion port resource management system as described in claim 6 or 7, is characterized in that, also comprises:
The ageing time adjusting module is used for for data link, when the current utilization rate of described NAT entry is not less than pre-set threshold value, shortens the residue ageing time of described NAT entry; Wherein, the span of described pre-set threshold value is 25% to 100%.
9. network address conversion port resource management system as claimed in claim 8, it is characterized in that, shorten the residue ageing time of described NAT entry, only refer to shorten the residue ageing time greater than the residue ageing time of the described NAT entry of Preset Time thresholding t1, and the residue ageing time of described NAT entry foreshortens to described Preset Time thresholding t1.
10. network address conversion port resource management system as claimed in claim 9, it is characterized in that, described ageing time adjusting module also is used for, to be divided into more than or equal to the current utilization rate of the described NAT entry of described pre-set threshold value W interval, each interval respectively corresponding described Preset Time thresholding t1; And the current utilization rate of described NAT entry is higher, and described Preset Time thresholding t1 is less; Wherein, W is the natural number greater than 1.
CN201210133533.8A 2012-05-02 2012-05-02 A kind of network address conversion port method for managing resource and system Active CN103384280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210133533.8A CN103384280B (en) 2012-05-02 2012-05-02 A kind of network address conversion port method for managing resource and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210133533.8A CN103384280B (en) 2012-05-02 2012-05-02 A kind of network address conversion port method for managing resource and system

Publications (2)

Publication Number Publication Date
CN103384280A true CN103384280A (en) 2013-11-06
CN103384280B CN103384280B (en) 2016-12-14

Family

ID=49491971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210133533.8A Active CN103384280B (en) 2012-05-02 2012-05-02 A kind of network address conversion port method for managing resource and system

Country Status (1)

Country Link
CN (1) CN103384280B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333611A (en) * 2014-10-29 2015-02-04 中国联合网络通信集团有限公司 Method and device for adjusting aging time
CN104486453A (en) * 2014-11-19 2015-04-01 中国联合网络通信集团有限公司 Ageing-time adjusting method and device
CN105100297A (en) * 2015-06-30 2015-11-25 杭州华三通信技术有限公司 Resource processing method and device
WO2017059742A1 (en) * 2015-10-10 2017-04-13 中兴通讯股份有限公司 Customer premises equipment, server, and method and system for managing port resource
CN110691148A (en) * 2018-07-05 2020-01-14 中国移动通信有限公司研究院 Method, device, equipment and storage medium for determining NAT (network Address translation) aging time
CN113746954A (en) * 2021-09-22 2021-12-03 烽火通信科技股份有限公司 Method and device for rapidly recovering NAT address block secondary allocation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010016878A1 (en) * 2000-02-17 2001-08-23 Hideki Yamanaka Communicating system and communicating method for controlling throughput
CN101170517A (en) * 2007-12-06 2008-04-30 杭州华三通信技术有限公司 Method and device for aging of control session table
CN101355570A (en) * 2008-09-19 2009-01-28 杭州华三通信技术有限公司 Control method and control device for reporting aging information
CN101860575A (en) * 2010-07-02 2010-10-13 迈普通信技术股份有限公司 UPnP (Universal Plug-n-Play) gateway equipment NAT (Network Address Translation) port mapping maintenance method and equipment thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010016878A1 (en) * 2000-02-17 2001-08-23 Hideki Yamanaka Communicating system and communicating method for controlling throughput
CN101170517A (en) * 2007-12-06 2008-04-30 杭州华三通信技术有限公司 Method and device for aging of control session table
CN101355570A (en) * 2008-09-19 2009-01-28 杭州华三通信技术有限公司 Control method and control device for reporting aging information
CN101860575A (en) * 2010-07-02 2010-10-13 迈普通信技术股份有限公司 UPnP (Universal Plug-n-Play) gateway equipment NAT (Network Address Translation) port mapping maintenance method and equipment thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SDBABY: "nat aging-time 老化时间控制", 《 HTTP://SDBABY.BLOG.51CTO.COM/149645/717744》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333611A (en) * 2014-10-29 2015-02-04 中国联合网络通信集团有限公司 Method and device for adjusting aging time
CN104333611B (en) * 2014-10-29 2017-07-04 中国联合网络通信集团有限公司 The method of adjustment and device of a kind of ageing time
CN104486453A (en) * 2014-11-19 2015-04-01 中国联合网络通信集团有限公司 Ageing-time adjusting method and device
CN104486453B (en) * 2014-11-19 2017-07-28 中国联合网络通信集团有限公司 The method of adjustment and device of a kind of ageing time
CN105100297A (en) * 2015-06-30 2015-11-25 杭州华三通信技术有限公司 Resource processing method and device
CN105100297B (en) * 2015-06-30 2019-01-22 新华三技术有限公司 A kind of method for processing resource and device
WO2017059742A1 (en) * 2015-10-10 2017-04-13 中兴通讯股份有限公司 Customer premises equipment, server, and method and system for managing port resource
CN110691148A (en) * 2018-07-05 2020-01-14 中国移动通信有限公司研究院 Method, device, equipment and storage medium for determining NAT (network Address translation) aging time
CN113746954A (en) * 2021-09-22 2021-12-03 烽火通信科技股份有限公司 Method and device for rapidly recovering NAT address block secondary allocation
CN113746954B (en) * 2021-09-22 2023-06-13 烽火通信科技股份有限公司 Method and device for quickly recovering NAT address block through secondary allocation

Also Published As

Publication number Publication date
CN103384280B (en) 2016-12-14

Similar Documents

Publication Publication Date Title
CN103384280A (en) Method and system for managing network address translation port resources
CN102104893B (en) Method, device and wireless access point equipment for realizing hot backup of wireless controller
CN107005586B (en) Method and device for managing virtual network function
US20140075217A1 (en) Power Saving Network Controller
CN104580734A (en) Data synchronization method, data synchronization system and terminal of multi-system equipment
Khotimsky et al. Unifying sleep and doze modes for energy-efficient PON systems
CN103327161B (en) Terminal and fast starting method
CN107306230B (en) Method, device, controller and core network equipment for network resource deployment
CN106487575A (en) A kind of communication module batch upgrading method based on power line communication
CN105208671B (en) The implementation method of high channel utilization rate H-MAC agreements for wireless sensor network
CN103731859B (en) Network resource optimizing method and device
CN103188171A (en) Message scheduling method and equipment
CN105262890A (en) Information update control system and method for applications on portable electronic device
CN102355659A (en) Radio remote head unit starting processing method and system thereof
CN105723779A (en) Data re-synchronization method and apparatus
CN102868989A (en) Method, system and equipment for call ticket generation in long-term evolution fusion type core network
CN103259883B (en) From pack low-power dissipation wireless network IP address management method
CN105188116A (en) Method for automatically selecting frequency spectrum to perform uplink access by terminal
CN108566669A (en) A kind of method of terminal intelligent power saving, terminal and the device with store function
CN102820992A (en) Processing method and device of data packets
CN102983992B (en) Realize the method for communication between many boards in ATCA device, system
CN102629905B (en) Slave card start control method of network equipment
CN102742213A (en) Single service board and method for controlling power supply thereof
CN103068000B (en) Based on the self-organizing network method and system of moonlet
CN102378233A (en) Method and system for improving reliability of wireless communication network 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