CN104333613B - A kind of method to set up and device of NAT connection retention times - Google Patents

A kind of method to set up and device of NAT connection retention times Download PDF

Info

Publication number
CN104333613B
CN104333613B CN201410596750.XA CN201410596750A CN104333613B CN 104333613 B CN104333613 B CN 104333613B CN 201410596750 A CN201410596750 A CN 201410596750A CN 104333613 B CN104333613 B CN 104333613B
Authority
CN
China
Prior art keywords
retention time
packet
application layer
layer protocol
connection
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
CN201410596750.XA
Other languages
Chinese (zh)
Other versions
CN104333613A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201410596750.XA priority Critical patent/CN104333613B/en
Publication of CN104333613A publication Critical patent/CN104333613A/en
Application granted granted Critical
Publication of CN104333613B publication Critical patent/CN104333613B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L61/2575NAT traversal using address mapping retrieval, e.g. simple traversal of user datagram protocol through session traversal utilities for NAT [STUN]

Landscapes

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

Abstract

The invention discloses a kind of method to set up and device of NAT connection retention times, it is related to communication technical field, disclosure satisfy that different business to the demand of the usage time connected in NAT, improves the business experience of user.The method to set up of the NAT connection retention times includes:The corresponding retention time is set according to different application layer protocols;When NAT device, which is established, to be connected, the corresponding retention time is arranged to the retention time of the connection according to the application layer protocol of packet by NAT device.During technical scheme is mainly used in NAT foundation connections.

Description

A kind of method to set up and device of NAT connection retention times
Technical field
The present invention relates to communication technical field, more particularly to the method to set up and device of a kind of NAT connection retention times.
Background technology
At present, global ip v4 (Internet Protocol version 4, internet protocol version four) addresses and Asia-Pacific The allocated end of IPv4 addresses, the problem of whole world is faced with IPv4 address shortages.The problem of in order to alleviate shortage of ip address, can To make multiple private IP address shared one using NAT (Network Address Translation, network address translation) equipment Individual public network IP address, so as to realize that private network accesses the function of global network.
NAT is the process for another IP address by the IP address conversion in IP data packet heads.NAT technologies allow multiple IP The single public ip address of nodes sharing, rather than distribute single public ip address for each network equipment.In other words, there is provided One kind allows one group of unregistered IP address is used for internal network communication and is used for another group of public ip address outside or public The standard of common letter.Specifically, when the application in certain client in private network sends and accesses the Internet request, NAT is set It is standby to receive the access the Internet request, NAT device by the IP address of the IP address of the client and port mapping to public network and Port, the back mapping entry of the application is created, the response that the back mapping entry is used to will be returned to private network redirects To correct node, and then the connection established between the application in the client in private network and public network server.It is if specific Map entry is not used by retention time section, then the map entry can be eliminated, i.e. application in client takes with public network Connection between business device is disconnected, and this phenomenon turns into NAT agings.
NAT device sets the different retention times respectively for the packet of different transport layer protocols at present, but due to same The packet of one transport layer protocol has the identical retention time, makes the business experience of user bad.It is for example, it is desired to long-term online If the map entry of business do not used in retention time section by communication, the map entry can be eliminated, that is, be used to transmit The connection of the business datum of the business is disconnected, when the business is needed with internet communication, it is necessary to established again through NAT device Connection, it may appear that service disconnection phenomenon, and for short period service, after business is offline, map entry is still present, and takes Resource in NAT device, the resource utilization of NAT device can be reduced.
The content of the invention
Embodiments of the invention provide a kind of method to set up and device of NAT connection retention times, disclosure satisfy that different Business improves the business experience of user to the demand of the connection usage time in NAT.
To reach above-mentioned purpose, embodiments of the invention adopt the following technical scheme that:
A kind of method to set up of NAT connection retention times, including:
The corresponding retention time is set according to different application layer protocols;
When NAT device, which is established, to be connected, NAT device sets the corresponding retention time according to the application layer protocol of packet It is set to the retention time of the connection.
A kind of setting device of NAT connection retention times, including:
Retention time setting unit, for setting the corresponding retention time according to different application layer protocols;
Connect setting unit, in NAT device, for when NAT device establish connect when, according to the application layer of packet The corresponding retention time is arranged to the retention time of the connection by agreement.
The method to set up and device of NAT connection retention times provided in an embodiment of the present invention, assisted according to different application layers View sets the corresponding retention time, and the time that every kind of application carries out needs during business is different, so according to different application layers The retention time that agreement is set is also different, and when NAT device is established and connected, NAT device will according to the application layer protocol of packet The corresponding retention time is arranged to the retention time of the connection, so that every kind of application is connected with the respective retention time, Meet demand of the different applications to usage time, improve the business experience of user.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of method to set up flow chart of NAT connection retention times in the embodiment of the present invention;
Fig. 2 is the method to set up flow chart of another NAT connection retention times in the embodiment of the present invention;
Fig. 3 is a kind of structural representation of packet in the embodiment of the present invention;
Fig. 4 is a kind of structural representation of the packet of insertion TLV structures in the embodiment of the present invention;
Fig. 5 is the method to set up flow chart of another NAT connection retention times in the embodiment of the present invention;
Fig. 6 is the method to set up flow chart of another NAT connection retention times in the embodiment of the present invention;
Fig. 7 is the annexation that the application in the embodiment of the present invention in client is established by NAT device and public network Schematic diagram;
Fig. 8 is a kind of setting device composition schematic diagram of NAT connection retention times in the embodiment of the present invention;
Fig. 9 is a kind of communication system composition schematic diagram in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
One embodiment of the invention provides a kind of method to set up of NAT connection retention times, as shown in figure 1, this method bag Include:
The 101st, the corresponding retention time is set according to different application layer protocols.
Wherein, different application layer protocols represents the application type of different packets, and the retention time in this step is Before establishing connection, NAT device connects the retention time set for every kind of application in advance.
102nd, when NAT device establish connect when, NAT device according to the application layer protocol of packet by corresponding holding when Between be arranged to retention time of the connection.
Wherein, connection of the connection that NAT device is established between the application in client and public network service device, NAT Equipment is by the application layer protocol of identification data bag, when being kept with reference to corresponding to above-mentioned steps 101 find the application layer protocol Between, the retention time corresponding to the application layer protocol is arranged to retention time of the connection.
The method to set up of NAT connection retention times provided in an embodiment of the present invention, set according to different application layer protocols The corresponding retention time, the time that every kind of application carries out needs during business is different, so being set according to different application layer protocols The retention time put is also different, and when NAT device is established and connected, NAT device will be corresponding according to the application layer protocol of packet Retention time be arranged to retention time of the connection so that every kind of application is connected with the respective retention time, meet not With application to the demand of usage time, improve the business experience of user.
In a kind of implementation of the present invention, the corresponding retention time is set to wrap according to different application layer protocols Include:When application layer protocol is the agreement that NAT device can identify, NAT device sets corresponding according to different application layer protocols Retention time;
When NAT device, which is established, to be connected, NAT device sets the corresponding retention time according to the application layer protocol of packet Being set to the process of the retention time of the connection includes:When NAT device, which is established, to be connected, if NAT device identifies answering for packet With layer protocol, be then arranged to the retention time of the connection retention time corresponding with the application layer protocol.
In another implementation of the present invention, the corresponding retention time is set also according to different application layer protocols Including:Client obtains the application layer protocol of the packet of initiation business, when judging that the application layer protocol can not for NAT device During the agreement of identification, client insertion in the preceding n packet of the business of initiation is corresponding with the application layer protocol of the packet Retention time, n is integer more than or equal to 1.
When NAT device, which is established, to be connected, NAT device sets the corresponding retention time according to the application layer protocol of packet Being set to the process of the retention time of the connection also includes:When NAT device, which is established, to be connected, if NAT device is identified in packet The retention time of insertion, be then arranged to the retention time of the connection retention time inserted in the packet.
What deserves to be explained is NAT device identification initiation business first packet in insert with the packet should With the layer protocol corresponding retention time, it becomes possible to for connection, the retention time is set, but due to the process in packet transmission In the phenomenon of data-bag lost occurs, so being all inserted into preceding n packet above-mentioned with packet application layer protocol The corresponding retention time, to ensure that the packet can be passed to NAT device.Wherein, n is the integer more than 1, but can not What is set is excessive, is traditionally arranged to be 3.
Another embodiment of the present invention provides a kind of method to set up of NAT connection retention times, as shown in Fig. 2 this method Including:
201st, client obtains the application layer protocol of the packet of initiation business, when judging that the application layer protocol sets for NAT During for the agreement that can not be identified, client is after the IP packet header of the preceding n packet of the business of initiation, application layer protocol packet header The indication field of insertion extension before.
Wherein, n is the integer more than or equal to 1, is traditionally arranged to be 3, the insertion extension indication field in preceding 3 packets, So as to avoid causing the packet of insertion extension indication field to be sent to asking for NAT device due to data-bag lost Topic, extension indication field include retention time identification marking and the retention time corresponding with the application layer protocol of the packet. For example, extension indication field can be TLV structures, the TLV meaning is exactly Type types, Length length, Value values, In embodiment, it is assumed that Type=20, which is represented, inserts the retention time in the packet, the Value=120 seconds determine the packet The Connection Time of affiliated application is 120 seconds, and Length represents the length of packet.
What deserves to be explained is the insertion position for extending indication field can be in the IP packet header of packet and transport layer protocol bag , can also be between transport layer protocol packet header and application layer protocol packet header between head.The structure of packet is as shown in figure 3, insertion The packet structure of TLV structures is as shown in figure 4, using the transport layer protocol of packet as TCP (Transmission in Fig. 4 Control Protocol, transmission control protocol) agreement, TLV structures between TCP packet header and application layer protocol packet header exemplified by enter Row explanation.
202nd, when NAT device, which is established, to be connected, if NAT device identifies the extension indication field inserted in packet, Retention time in the extension indication field is arranged to the retention time of the connection.
203rd, NAT device removes the extension indication field inserted in packet from packet.
What deserves to be explained is it is after the connection applied belonging to the packet sets the retention time, to remove number in NAT device It is to prevent the data to the application from having an impact according to the extension indication field inserted in bag.
Another embodiment of the present invention provides a kind of method to set up of NAT connection retention times, as shown in figure 5, this method Including:
301st, client obtains the application layer protocol of the packet of initiation business, when judging that the application layer protocol sets for NAT During for the agreement that can not be identified, optional Option field of the client in the IP packet header of the preceding n packet of the business of initiation The insertion retention time corresponding with the application layer protocol of the packet.
What deserves to be explained is optional Opition fields are the Optional Fields in the IP packet header of packet, except NAT Other equipment beyond equipment does not read this field typically, or have read this field and it is not processed yet, and this will not be answered Data have an impact, and optional Option fields insertion the retention time will not change data bag structure.
302nd,, should if NAT device identifies the retention time inserted in packet when NAT device, which is established, to be connected The retention time inserted in packet is arranged to the retention time of the connection.
What deserves to be explained is due to optional Option fields insertion the retention time will not change data bag structure, The data of application will not be had an impact, so being set for the connection after the retention time without will be inserted in above-mentioned steps 301 Retention time removes.
Another embodiment of the present invention provides a kind of method to set up of more detailed NAT connection retention times, such as Fig. 6 institutes Show, this method includes:
401st, NAT device sets the retention time of acquiescence according to different transport layer protocols.
Wherein, transport layer protocol includes Transmission Control Protocol and UDP (User Datagram Protocol, User Datagram Protocol View) agreement etc., NAT device is that the connection based on Transmission Control Protocol or udp protocol sets the unified retention time respectively, for example, being based on The connection of Transmission Control Protocol is 600 seconds, and the connection based on UDP is 60 seconds.
402nd, the application layer protocol that can be identified for NAT device, NAT device is according to different application layer protocol settings pair The retention time answered.
What deserves to be explained is for recognizable application layer protocol, NAT device is to the connection based on every kind of application layer protocol The different retention times is set respectively, and the retention time is to be actually needed time of holding previously according to each application to set 's.For example, to the connection based on SMTP (Simple Mail Transfer Protocol, simple message transfer protocol (SMTP)) agreement It is 86400 seconds (about 24 hours) to set the retention time, to (Hyper Text Transfer Protocol, being surpassed based on HTTP Text transfer protocol) agreement connection set retention time be 21600 seconds (6 hours).
403rd, client obtains the application layer protocol of the packet of initiation business, when judging that the application layer protocol sets for NAT During for the agreement that can not be identified, client insertion and application layer of the packet in the preceding n packet of the business of initiation are assisted Discuss the corresponding retention time.
Wherein, n is the integer more than 1, and the method for inserting the retention time can be that above-mentioned steps 201 or step 301 are retouched The method stated.
It should be noted that it can make client that there is application layer protocol by way of software is installed in the client Identification function, because the software in client can often upgrade, so the application layer protocol type that client can identify compares NAT The application layer protocol that equipment can identify is more, and client has been previously stored the application layer protocol type that NAT device can identify, If client identifies that the application layer protocol in packet is the agreement that NAT device can identify, client is not to the number Processed according to bag;If client identifies the application layer protocol type of packet, but the application layer protocol is that NAT device can not The agreement of identification, then the retention time corresponding with the application layer protocol of the packet is inserted in the packet;If client The application layer protocol type of packet is cannot recognize that, then the packet is not processed.
What deserves to be explained is the mistake that it is the connection setting retention time belonging to different application in advance that above-mentioned steps 402,403, which are, Journey, the execution sequence of step 402 and step 403 is not limited in the present embodiment, because executive agent is different, it is possible to simultaneously Execution also can be performed sequentially, and step 402 is performed with being illustrated exemplified by step 403 by simultaneously in Fig. 7.
When initiating business below for user, the mistake of connection is established in the application in client by NAT device and public network Journey.
404th, packet is identified NAT device.
Wherein, NAT device packet is identified including:The transport layer protocol type of identification data bag, application layer association Whether the retention time is inserted in view type and packet.NAT device once recognizes the retention time in packet, then performs Following step 405 to 406, and for being not inserted into the packet of retention time, the transport layer protocol of NAT device elder generation identification data bag Type, then the application layer protocol type of identification data bag, if identifying the application layer protocol type of packet, perform following steps Rapid 407 to 408.
405th, NAT device identifies the retention time inserted in packet.
406th, the retention time inserted in the packet is arranged to the retention time of the connection by NAT device.
For example, application is off-gauge application belonging to the packet, NAT device None- identified goes out the application layer of its packet Protocol type, the application be short period service, it is necessary to retention time be 120 seconds, client is in advance in preceding 3 data of the application The retention time is inserted in bag as 120 seconds, then the retention time connected belonging to the application is arranged to 120 seconds by NAT device.
What deserves to be explained is if the method for insertion retention time is IP of the client in the preceding n packet of the business of initiation Extension indication field is inserted after packet header, before application layer protocol packet header, then also needs to expand after setting the retention time for connection Exhibition indication field removes from packet.
407th, NAT device identifies the application layer protocol type of packet.
408th, the retention time corresponding with the application layer protocol of the packet is arranged to the holding of the connection by NAT device Time.
For example, NAT device identifies that the type of the application layer protocol of packet is smtp protocol, then by the holding of the connection Time is arranged in above-mentioned steps 402 86400 seconds retention times corresponding to smtp protocol (24 hours).
In addition, what deserves to be explained is if NAT device identifies the transport layer protocol type of packet, but it is unidentified go out data The application layer protocol type of bag, and do not recognize the retention time from packet, then NAT device is by the transport layer with the packet Retention time corresponding to agreement is arranged to the retention time of the connection.
For example, NAT device identifies that the transport layer protocol of the packet is UDP, but application layer protocol not can recognize that, and not The retention time is recognized, then the retention time of the connection is the default time 60 set in above-mentioned steps 401 according to udp protocol Second.
A kind of annexation that application in client is established by NAT device and public network is as shown in fig. 7, following knot The method to set up that Fig. 7 illustrates the NAT connection retention times in above-described embodiment is closed, client 1 is led to client 2 in Fig. 7 Cross NAT device and access public network, client 1 is run using 1 and using 2 simultaneously, and the operation of client 2 applies 3.Assuming that using 1 The application that can not be identified for NAT device, i.e. NAT device can not identify application layer association when this applies initiation business in packet View, but client inserts the retention time in the preceding n packet of the business of initiation, the application layer protocol institute with the packet The corresponding retention time is 120 seconds;It is standard application using 2, NAT device can be identified when this applies initiation business in packet Application layer protocol be smtp protocol, the retention time that NAT device is set according to the application layer protocol is 846000 seconds (about 24 Hour);Be the applications that can not identify of NAT device using 3, i.e., NAT device can not identify when this applies initiation business before n data Application layer protocol in bag, the retention time is also not inserted into packet, but can identify that the transport layer protocol in packet is Udp protocol, the retention time that NAT device is set according to udp protocol are 60 seconds.
When user initiates business, it is to be inserted in packet the retention time set using connection 1 corresponding to 1 that NAT device, which is, 120 seconds retention times entered;NAT device is the application layer protocol for the retention time set using connection 2 corresponding to 2 being packet Corresponding 846000 seconds retention times (about 24 hours);NAT device is to be using the retention time of the setting of connection 3 corresponding to 3 Retention time 60 seconds corresponding to the transport layer protocol of packet.
The method to set up of NAT connection retention times provided by the invention, assisted for the application layer that NAT device can identify View, the retention time according to corresponding to being set different application layer protocols, so as to meet the needs of different application is to usage time;It is right In the application layer protocol that NAT device can not identify, client insertion and packet in the preceding n packet of the business of initiation The application layer protocol corresponding retention time, so that when NAT device sets each required holding for the connection of different application Between, and the present invention is with good expansibility, and can be continuously increased new application identification.Compared with prior art, this hair It is bright that for the connection of different application, the different retention times is set, it is that the connection of long-term business sets the longer retention time, improves Consumer's Experience, while the quick aging of the connection of short period service is also accelerated, improve the resource utilization of NAT device.
Another embodiment of the present invention provides a kind of setting device of NAT connection retention times, as shown in figure 8, the device Including:Retention time setting unit 41 and connection setting unit 42.
Retention time setting unit 41, for setting the corresponding retention time according to different application layer protocols.
Connect setting unit 42, in NAT device, for when NAT device establish connect when, according to the application of packet The corresponding retention time is arranged to the retention time of the connection by layer protocol.
As shown in figure 9, the device is applied in a kind of communication system, the communication system includes NAT device and at least one Client, retention time setting unit 41 also include:The first retention time in NAT device sets subelement 411 and position The second retention time in client sets subelement 412, and the setting device of the NAT retention times also includes:Set positioned at NAT Removal unit 43 in standby.
First retention time set subelement 411, for when application layer protocol be NAT device can identify agreement when, The corresponding retention time is set according to different application layer protocols.
Connect setting unit 42, specifically for when NAT device establish connect when, if NAT device identify packet should With layer protocol, then when connecting setting unit 42 retention time corresponding with the application layer protocol being arranged into the holding of the connection Between.
Second retention time set subelement 412, the application layer protocol of the packet for obtaining initiation business, worked as judgement When the application layer protocol is the agreement that NAT device can not identify, insertion and the data in the preceding n packet of the business of initiation The application layer protocol of bag corresponding retention time, n are the integer more than or equal to 1.
Setting unit 42 is connected, is specifically additionally operable to when NAT device is established and connected, if NAT device is identified in packet The retention time of insertion, the then when retention time inserted in the packet is arranged to the holding of the connection by connection setting unit 42 Between.
Second retention time set subelement 412, specifically for initiate business preceding n packet IP packet header it Afterwards, insert extension indication field before application layer protocol packet header, extension indication field include retention time identification marking and with this The application layer protocol of the packet corresponding retention time;
Or the optional Option fields insertion in the IP packet header of the preceding n packet in the business of initiation and the packet Application layer protocol corresponding retention time.
Removal unit 43 in NAT device, if for client in the IP packet header of the preceding n packet of the business of initiation Afterwards, extension indication field is inserted before application layer protocol packet header, then is arranged to by the retention time inserted in the packet After the retention time of the connection, the extension indication field inserted in packet and retention time are removed from packet.
The setting device of NAT connection retention times provided in an embodiment of the present invention, the retention time, setting unit was according to difference Application layer protocol corresponding retention time is set, the time that every kind of application carries out needs during business is different, so according to not The retention time that same application layer protocol is set is also different, and when connection is established in NAT device, connection setting unit is according to data The corresponding retention time is arranged to the retention time of the connection by the application layer protocol of bag, so that every kind of application is connected with The respective retention time, meet demand of the different applications to usage time, improve the business experience of user.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow Software is helped to add the mode of required common hardware to realize, naturally it is also possible to which by hardware, but the former is more preferably in many cases Embodiment.Based on such understanding, portion that technical scheme substantially contributes to prior art in other words Dividing can be embodied in the form of software product, and the computer software product is stored in the storage medium that can be read, and such as be counted The floppy disk of calculation machine, hard disk or CD etc., including some instructions to cause a computer equipment (can be personal computer, Server, or network equipment etc.) perform method described in each embodiment of the present invention.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (10)

  1. A kind of 1. method to set up of network address translation NAT connection retention times, it is characterised in that including:
    The corresponding retention time is set according to different application layer protocols;
    When NAT device, which is established, to be connected, the corresponding retention time is arranged to by NAT device according to the application layer protocol of packet The retention time of the connection.
  2. 2. the method to set up of NAT connection retention times according to claim 1, it is characterised in that
    It is described to set the corresponding retention time to include according to different application layer protocols:
    When application layer protocol is the agreement that the NAT device can identify, the NAT device is according to different application layer protocols The corresponding retention time is set;
    It is described when NAT device establish connect when, NAT device sets the corresponding retention time according to the application layer protocol of packet Being set to the process of the retention time of the connection includes:
    , will be with the application layer protocol if NAT device identifies the application layer protocol of packet when NAT device, which is established, to be connected The corresponding retention time is arranged to the retention time of the connection.
  3. 3. the method to set up of NAT connection retention times according to claim 2, it is characterised in that
    It is described to set the corresponding retention time also to include according to different application layer protocols:
    Client obtain initiation business packet application layer protocol, when judge the application layer protocol for the NAT device not During the agreement that can be identified, client insertion and application layer protocol phase of the packet in the preceding n packet of the business of initiation Corresponding retention time, n are the integer more than or equal to 1;
    It is described when NAT device establish connect when, NAT device sets the corresponding retention time according to the application layer protocol of packet Being set to the process of the retention time of the connection also includes:
    When NAT device, which is established, to be connected, if NAT device identifies the retention time inserted in packet, by the packet The retention time of insertion is arranged to the retention time of the connection.
  4. 4. the method to set up of NAT connection retention times according to claim 3, it is characterised in that
    The client inserts the holding corresponding with the application layer protocol of the packet in the preceding n packet of the business of initiation Time course includes:
    Client is after the IP packet header of the preceding n packet of the business of initiation, insertion extension instruction before application layer protocol packet header Field, the extension indication field include retention time identification marking and the holding corresponding with the application layer protocol of the packet Time;
    Or optional Option field insertion and the data of the client in the IP packet header of the preceding n packet of the business of initiation The application layer protocol of the bag corresponding retention time.
  5. 5. the method to set up of NAT connection retention times according to claim 4, it is characterised in that
    Refer to if client inserts extension after the IP packet header of the preceding n packet of the business of initiation, before application layer protocol packet header Show field, then it is described the retention time inserted in the packet is arranged to the retention time of the connection after, in addition to:
    NAT device removes the extension indication field inserted in packet from packet.
  6. A kind of 6. setting device of NAT connection retention times, it is characterised in that including:
    Retention time setting unit, for setting the corresponding retention time according to different application layer protocols;
    Connect setting unit, in NAT device, for when NAT device establish connect when, according to the application layer protocol of packet The corresponding retention time is arranged to the retention time of the connection.
  7. 7. device according to claim 6, it is characterised in that
    The retention time setting unit includes:The first retention time in NAT device sets subelement, is applied for working as When layer protocol is the agreement that the NAT device can identify, the corresponding retention time is set according to different application layer protocols;
    The connection setting unit, specifically for when NAT device establish connect when, if NAT device identifies the application of packet Layer protocol, the then when retention time corresponding with the application layer protocol is arranged to the holding of the connection by the connection setting unit Between.
  8. 8. device according to claim 7, it is characterised in that
    The retention time setting unit also includes:The second retention time in client sets subelement, for obtaining The application layer protocol of the packet of initiation business, when the agreement that judges the application layer protocol and can not be identified for the NAT device When, the retention time corresponding with the application layer protocol of the packet is inserted in the preceding n packet of the business of initiation, n is big In the integer equal to 1;
    The connection setting unit, specifically it is additionally operable to, when NAT device is established and connected, insert if NAT device is identified in packet The retention time entered, the then when retention time inserted in the packet is arranged to the holding of the connection by the connection setting unit Between.
  9. 9. device according to claim 8, it is characterised in that
    Second retention time sets subelement, specifically for after the IP packet header of the preceding n packet of the business of initiation, answer With inserting extension indication field before layer protocol packet header, the extension indication field include retention time identification marking and with the number According to the application layer protocol of the bag corresponding retention time;
    Or initiate business preceding n packet IP packet header in optional Option fields insertion with the packet answer With the layer protocol corresponding retention time.
  10. 10. device according to claim 9, it is characterised in that described device also includes:
    Removal unit in NAT device, if for client initiate business preceding n packet IP packet header after, Extension indication field is inserted before application layer protocol packet header, then the retention time inserted in the packet is arranged to this described After the retention time of connection, the extension indication field inserted in packet is removed from packet.
CN201410596750.XA 2014-10-29 2014-10-29 A kind of method to set up and device of NAT connection retention times Active CN104333613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410596750.XA CN104333613B (en) 2014-10-29 2014-10-29 A kind of method to set up and device of NAT connection retention times

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410596750.XA CN104333613B (en) 2014-10-29 2014-10-29 A kind of method to set up and device of NAT connection retention times

Publications (2)

Publication Number Publication Date
CN104333613A CN104333613A (en) 2015-02-04
CN104333613B true CN104333613B (en) 2018-03-30

Family

ID=52408261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410596750.XA Active CN104333613B (en) 2014-10-29 2014-10-29 A kind of method to set up and device of NAT connection retention times

Country Status (1)

Country Link
CN (1) CN104333613B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109962988B (en) * 2017-12-25 2022-01-11 中国电信股份有限公司 Method and system for configuring NAT (network Address translation) aging duration and NAT equipment
CN110691148B (en) * 2018-07-05 2022-04-29 中国移动通信有限公司研究院 Method, device, equipment and storage medium for determining NAT (network Address translation) aging time

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010072953A1 (en) * 2008-12-23 2010-07-01 France Telecom System for conveying an ipv4 data packet
CN101631377B (en) * 2009-07-30 2011-11-30 中兴通讯股份有限公司 Terminal dormancy method and terminal
CN103561130A (en) * 2013-11-06 2014-02-05 北京神州绿盟信息安全科技股份有限公司 Network address translation device and method suitable for multiple application layer protocols

Also Published As

Publication number Publication date
CN104333613A (en) 2015-02-04

Similar Documents

Publication Publication Date Title
US7542466B2 (en) System and method of information communication, information processing apparatus and information processing method, program and recording medium
US10103962B1 (en) Return path trace
EP3186930B1 (en) Relay optimization using software defined networking
US7496685B2 (en) Method and system for managing a device within a private network using a management device external to the private network
EP2608489B1 (en) Method, device and system for allocating internet protocol address of external network in network address translation pass-through
US20060075484A1 (en) Apparatus, method, and computer program product for building virtual networks
US10574570B2 (en) Communication processing method and apparatus
US8364847B2 (en) Address management in a connectivity platform
US20090043889A1 (en) Communication system, data processing apparatus, server, data processing method, program that executes the data processing method, and recording medium to record the program
US20050188002A1 (en) Apparatus, method, and computer program product for building virtual networks
US20110185085A1 (en) Network Address Translation Based on Recorded Application State
CN103036875A (en) Processing device and recognition device for user identity
CN104333613B (en) A kind of method to set up and device of NAT connection retention times
CN115150327A (en) Interface setting method, device, equipment and medium
CN104106254A (en) Methods and systems for enabling NAT traversal
EP2345230B1 (en) Method and apparatus for allocating network resources from one address realm to clients in a different address realm
CN111478821B (en) Network performance test method and system
US9197557B2 (en) Relay server and relay communication system
JP2005341084A (en) Vpn system, remote terminal, and remote access communication method used for vpn system and remote terminal
US20240064124A1 (en) Data sending method and apparatus, and method and system for establishing p2p connection
CN105763414B (en) A kind of learning method and device of list item
EP3823218A1 (en) Gateway selection method, device, and system
CN104320500B (en) The keepalive method and device of a kind of NAT device
KR20140102280A (en) Methods and systems for enabling nat traversal
JP5084716B2 (en) VPN connection apparatus, DNS packet control method, and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant