WO2019184803A1 - 网络地址转换 - Google Patents
网络地址转换 Download PDFInfo
- Publication number
- WO2019184803A1 WO2019184803A1 PCT/CN2019/079157 CN2019079157W WO2019184803A1 WO 2019184803 A1 WO2019184803 A1 WO 2019184803A1 CN 2019079157 W CN2019079157 W CN 2019079157W WO 2019184803 A1 WO2019184803 A1 WO 2019184803A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- quintuple
- target
- hash
- type
- port
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2521—Translation architectures other than single NAT servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2514—Translation of Internet protocol [IP] addresses between local and global IP addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
- H04L45/7453—Address table lookup; Address filtering using hashing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2517—Translation of Internet protocol [IP] addresses using port numbers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/255—Maintenance or indexing of mapping tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2557—Translation policies or rules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
Definitions
- the network address translation (NAT) device After receiving the packet, the network address translation (NAT) device performs the new process if the packet needs to be processed by NAT and the packet meets the new conditions of the session information.
- the "session information" herein includes, for example, a source IP (Internet Protocol) address of a message, a destination IP address, a source port, a destination port, and a quintuple of a transport layer protocol.
- each conflict trial can only test a new quintuple when the new quintuple
- multiple trials are required, and since the storage medium on which the session table is read each time has an interface delay, the new performance is undoubtedly poor.
- FIG. 1 is a schematic structural diagram of a networking system.
- FIG. 2 is a flowchart of a NAT method according to an exemplary embodiment of the present disclosure.
- FIG. 3 is a schematic diagram of source IP address translation based on a NAT method provided by the present disclosure.
- FIG. 4 is a schematic diagram of a source IP address translation based on a NAT method provided by the present disclosure.
- FIG. 5 is a schematic structural diagram of a NAT device according to an exemplary embodiment of the present disclosure.
- FIG. 6 is a schematic structural diagram of a NAT device according to an exemplary embodiment of the present disclosure.
- first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
- first information may also be referred to as second information without departing from the scope of the present disclosure.
- second information may also be referred to as first information.
- word "if” as used herein may be interpreted as "when” or “when” or “in response to a determination.”
- NAT can be classified into PAT (Port Address Translation) and NO-PAT (Not Port Address Translation).
- NO-PAT Port Address Translation
- an external network IP address that is, a public network IP address
- NO-PAT Not Port Address Translation
- an external network IP address can only be assigned to an intranet IP address for NAT processing; and in the PAT mode, an external network IP address can be simultaneously assigned to multiple The internal network IP address is shared.
- the NAT that appears in the present disclosure refers to the PAT mode.
- NAT can be divided into: inbound interface translation source IP address, inbound interface conversion destination IP address, outbound interface conversion source IP address, and outbound interface conversion destination IP address. Also, the conversion process for different addresses is similar.
- the present disclosure provides a NAT method, apparatus, and NAT device to improve the new performance of the NAT process.
- the NAT method provided by the present disclosure is first introduced below.
- a NAT method provided by the present disclosure is applied to a NAT device.
- the NAT method may be performed by a CPU in a NAT device.
- the CPU may be executed together with some hardware, where the hardware is implemented.
- It can be an Integrated Circuit ASIC (Application Specific Integrated Circuit)/FPGA (Field-Programmable Gate Array).
- the so-called NAT device is an edge device of the network, which is used for the purpose of allowing an internal network user to access an external public network and allowing an external public network to access a part of internal resources (for example, an internal server), for example, a device of the NAT device.
- the type can be a router, of course not limited to this.
- the session table is divided into two levels. Specifically, the first level of the session table is a hash table, which is used to store the signature information of the quintuple hashed and the pointer to the result table; and the second level of the session table is the result table, which is used for storing Quintuples and other forwarding related information.
- the first level of the session table is a hash table, which is used to store the signature information of the quintuple hashed and the pointer to the result table
- the second level of the session table is the result table, which is used for storing Quintuples and other forwarding related information.
- the target quintuple and the corresponding original quintuple may be recorded in the hash table, specifically: (1) Storing a signature information corresponding to the original five-tuple and a pointer to the result table in a hash bucket in the hash table; (2) performing positional swapping of the target five-tuple to obtain a positional swap
- the target quintuple, in a hash bucket in the hash table stores signature information corresponding to the target quintuple after the location swap and a pointer to the result table, where the so-called location interchange is: source IP address and The destination IP address is exchanged and the source port and destination port are interchanged.
- the hash table contains the record of the signature information corresponding to the original quintuple of the message, and belongs to the forward hash record of the message in the hash table; and the hash table includes the target quintuple after the location swap.
- the record of the corresponding signature information belongs to the reverse hash record of the message in the hash table.
- the forward hash record and the reverse hash record corresponding to the same message contain the same pointer, that is, the forward hash record and the reverse hash record corresponding to the same message correspond to the result table.
- the record in the result table includes at least: an original five-tuple of a message, and a target five-tuple after the location of the message is exchanged.
- the manner in which the related information of the hash table storage quintuple is stored is changed. For example, for a plurality of quintuples with the same IP address and consecutive ports, the hash buckets corresponding to the hash tables are consecutive. In this way, a plurality of consecutive hash buckets can be read at one time, and it is determined whether a plurality of five-tuples corresponding to the plurality of consecutive hash buckets respectively generate a hash conflict.
- the networking system includes: host A, NAT device B, and server C.
- Host A and server C belong to different networks, that is, host A belongs to the intranet and server C belongs to the external network. Therefore, when host A sends a packet to server C, NAT device B needs to perform NAT processing on the packet sent by host A, and then sends the NAT-processed packet to server C. Similarly, when server C sends a packet to host A.
- the NAT device B needs to perform NAT processing on the packet sent by the server C, and then sends the NAT-processed packet to the host A.
- the NAT device B in FIG. 1 can perform NAT processing on the packet sent by the host A to the server C and the packet sent from the server C to the host A by using a NAT method provided by the disclosure. NAT processing.
- a NAT method provided by the present disclosure may include the following steps.
- the NAT device When the NAT device receives the packet sent by the other device in the networking system, if the packet needs to be processed by NAT and the packet meets the new conditions of the session information, the NAT device performs a new process.
- the target IP address and the reference port of the target IP address may be obtained from the NAT resource pool, where the reference port is one of a continuous port range of the target IP address. port.
- port selection, random selection or sequential selection, and the like can be performed by using the hashed value of the original quintuple of the message.
- the original quintuple of the packet includes: source IP address, destination IP address, source port, destination port, and transport protocol; and the NAT processing conversion requirement may be only converting the source IP address or converting
- the destination IP address can also be used to convert both the source IP address and the destination IP address. Therefore, after obtaining the target IP address and the reference port, if the source IP address needs to be converted, the target IP address is used to replace the source IP address in the original quintuple, and the reference port is used to replace the original quintuple. Source port; if the destination IP address needs to be translated, the destination IP address is used to replace the destination IP address in the original quintuple, and the reference port is used to replace the destination port in the original quintuple.
- the target IP address described in the present disclosure is an IP address taken from the NAT resource pool, and the target IP address may be used as a source IP address or a destination IP address; and the reference port is a continuous port of the target IP address.
- an ACL Access Control List
- the NAT device stores multiple NAT resource pools to deal with different types of IP addresses, and each NAT resource pool includes an IP address and a corresponding port range.
- whether the packet satisfies the new condition of the session information may include: determining whether the packet is the first packet, and if , to determine that the message meets the new conditions of the session information.
- whether the packet satisfies the new condition of the session information may include: determining whether the packet can directly perform NAT processing based on the session table. If not, determine that the message meets the new conditions of the session information.
- TCP Transmission Control Protocol
- UDP User Datagram Protocol
- the process of determining whether the packet can directly perform NAT processing based on the session table needs to use a hash table, and the present disclosure changes the storage manner of the hash table. Therefore, the process of determining whether the packet can directly perform NAT processing based on the session table is also A change has occurred, followed by a specific introduction.
- the NAT device may replace the source IP address or the destination IP address in the original quintuple of the packet with the target IP address based on the conversion requirement corresponding to the packet.
- the source port or the destination port in the original quintuple is replaced by the reference port, so that the first quintuple corresponding to the packet is generated.
- the NAT device may mask the first type of bits of the two types of ports of the first quintuple, that is, set to 0 to obtain the second quintuple.
- the NAT device determines a target quintuple that does not conflict in a plurality of consecutive hash buckets of the hash table based on the hash result of the second quintuple. Since the source IP address or the destination IP address cannot be determined when the NAT process is directly performed based on the session table, the present disclosure simultaneously masks the source port and the destination port in the first quintuple.
- the port is represented by 16 bits, that is, both the source port and the destination port are represented by 16 bits.
- the number and location of the bits may be set according to actual conditions.
- the first type of bits may be the 0th bit of the port, and may be the 0th bit and the 1st bit of the port, or may be The 0th bit, the 1st bit, and the 2nd bit of the port may also be the 14th bit and the 15th bit of the port, and so on.
- the first type of bits is at least one consecutive bit at the end of the port, and the specific number of bits can be set according to a specific application environment.
- the first type of bits are two consecutive bits at the end of the port, that is, the 0th bit and the 1st bit, or the first type of bits are consecutive 3 bits at the end of the port, that is, the 0th bit, the 1st bit.
- the bit and the second bit, or the first type of bits are consecutive four bits at the end of the port, namely the 0th bit, the 1st bit, the 2nd bit, and the 3rd bit, and so on.
- the storage area corresponding to the hash table is divided into a number of hash buckets, and a binary character string of a fixed number of bits is used as an index value of the hash bucket.
- the present disclosure needs to make the hash buckets corresponding to the plurality of quintuples continuous. Based on the requirement, in a hash bucket in the hash table, storing the signature information corresponding to any five-tuple may include:
- a plurality of five-tuples that differ only in the first type of bits of the two types of ports may correspond to the same index value.
- the shifting process is: replacing the lower N bits of the index value with a combination of the first type of bits of the two types of ports in the quintuple, or supplementing the combination at the end of the index value, where N is the two types of the quintuple The total number of bits of the first type of bit of the port.
- the first may be first The first type of bits of the two types of ports of the quintuple are masked to obtain a second quintuple, and then based on the hash result of the second quintuple, a plurality of consecutive hash buckets in the hash table are determined, and A target five-tuple that does not conflict is determined in the consecutive plurality of hash buckets.
- the step of determining the target five-tuple that does not conflict in the consecutive multiple hash buckets of the hash table may include:
- the base address processing includes: setting a low N position of the first index value to 0, or adding N bits to the end of the first index value;
- N is the sum of the number of bits of the first type of the two types of ports, and M is 2 N .
- the base address processing has a correspondence with the offset processing described above.
- the offset processing is: replacing the low N bits of the index value with a combination of the first type of bits of the two types of ports in the five-tuple group.
- the base address is processed as: the low N position of the first index value is 0; and the offset is processed by: adding the combination at the end of the index value, and correspondingly, the base address is processed as: The end of the index value is complemented by N bits of 0.
- the first hash algorithm may include: an MD (Message Digest Algorithm) or a SHA (Secure Hash Algorithm), and the like.
- the specific process is: determining a first type of hash bucket corresponding to the second index value, The first type of hash bucket corresponding to the second index value is a starting point, and the consecutive M first-type hash buckets are read.
- the step of determining a target five-tuple that does not conflict in the M first-type hash buckets based on the second quintuple and the second hashing algorithm may include:
- the conflict detection includes:
- the second type of port is: a port that performs NAT processing in the original quintuple;
- the fourth quintuple is determined as a target quintuple that does not conflict.
- the second hash algorithm may include: an MD (Message Digest Algorithm) or a SHA (Secure Hash Algorithm), and the like. And determining, by using the first target value as the third index value, the target hash bucket from the M first-type hash buckets, the specific process is: using the first target value as the third index value, and further, In the M first type of hash buckets, the first type of hash bucket corresponding to the third index value is used as the target hash bucket.
- MD Message Digest Algorithm
- SHA Secure Hash Algorithm
- the second type of port of the fourth quintuple may be limited to: the one where the reference port is located Within the range of continuous ports.
- the signature information and the pointer in the hash table entry can be set to invalid values.
- the corresponding signature information and pointer can be changed to a valid value according to the quintuple.
- one bit is set for each signature information and pointer in the hash table entry, and the invalid value is distinguished by setting the bit to 0 or 1. Valid value.
- the target five-tuple and the original five-tuple may be recorded in the hash table and the corresponding result table, and based on The target quintuple performs NAT processing on the packet.
- the recording the target quintuple and the original quintuple in the result table may include: recording the original quintuple in the result table, and the quintuple obtained by performing positional swapping of the target quintuple .
- performing NAT processing on the packet based on the target quintual may include: replacing the original quintuple in the packet with the target quintuple.
- the specific process of recording the target five-tuple and the original five-tuple in the hash table and the corresponding result table may include:
- the index value of the tuple is offset according to the combination of the first type of bits of the two types of ports of the target five-tuple after the location interchange, to form a new index value; and the new index value is used for querying
- the hash table determines a hash bucket, and stores the signature information corresponding to the target quintuple after the location swap and the pointer to the result table into the determined hash bucket.
- a NAT method provided by the disclosure may further include the following steps:
- Step 01 When it is determined that the packet needs to be processed by NAT, the second hash algorithm is used to calculate the second signature information corresponding to the original quintuple;
- Step 02 masking the first type of bits of the two types of ports of the original quintuple to obtain a fifth quintuple;
- Step 03 Calculate a fourth index value corresponding to the fifth quintuple by using a first hash algorithm.
- Step 04 Perform offset processing on the fourth index value to form a fifth index value, and query the hash table with the fifth index value to determine a second type of hash bucket; wherein the offset processing is: The second target value replaces the lower N bits of the fourth index value or complements the second target value at the end of the fourth index value, the second target value being the first type of bits of the two types of ports of the original five-tuple The combination;
- step 05 when it is determined that the second signature information exists in the valid signature information recorded by the second type of hash bucket, the packet is subjected to NAT processing based on the result table, otherwise, the slave NAT resource pool is executed.
- the NAT processing is performed on the packet according to the result table, specifically: determining, according to the pointer corresponding to the second signature information recorded by the second type of hash bucket, the quintuple from the result table, and further Determine the quintuple and perform NAT processing on the packet.
- a plurality of consecutive hash buckets of the hash table are determined at one time, and then the target five-tuples that do not conflict are determined from consecutive consecutive hash buckets of the hash table, that is, one-time trial and Whether the plurality of five-tuples corresponding to the plurality of hash buckets are non-conflicting quintuples, so that the number of times of reading the storage medium can be reduced during the conflict test, and therefore, the new performance in the NAT process can be improved.
- the networking diagram is as shown in Figure 1.
- the networking system includes: host A, NAT device B, and server C.
- the IP address of host A is 192.168.1.2, and the intranet IP address of NAT device B.
- the address is 192.168.1.1 and the external network IP address is 1.1.1.1
- the IP address of server C is 1.1.1.2.
- a NAT method provided by the present disclosure may include the following steps:
- the NAT device B determines that the packet needs to be processed by the NAT based on the ACL.
- 192.168.1.2 is the source IP address
- 1.1.1.2 is the destination IP address
- 2222 is the source port
- 80 is the destination port
- tcp is the transmission protocol.
- the P src1 is a value obtained by masking the 0th bit p0 of the source port 2222
- P dst1 is a value obtained by masking the 0th bit p1 of the destination port 80.
- the index value ind1 corresponding to the quintuple G1 is calculated.
- the last two bits of the index value ind1 are replaced with a combination of p0 and p1 to form an index value ind2.
- v is used to identify the signature information and whether the pointer is a valid value or an invalid value, wherein when v is 0, the signature information and the pointer are invalid values, and when v is 1, the signature information is represented. And the pointer is a valid value.
- S10 Obtain a target IP address and a reference port from a NAT resource pool corresponding to the source IP address.
- the target IP address is assumed to be 1.1.1.1 and the reference port is 2001.
- the quintuple G2 is (1.1.1.1, 1.1.1.2, 2001, 80, tcp); correspondingly, the quintuple G3 is (1.1.1.1, 1.1.1.2, P src2 , P Dst2 , tcp).
- P src2 resulting masked values of the 0th bit source port p2 pentad of G2, P dst2 zeroth bits of the object p1 pentad G2 ports to mask the resultant value.
- the index value ind3 corresponding to the quintuple G3 is calculated.
- the index value ind4 is obtained from the lower two positions of the index value ind3, and the index value ind4 is used as an index, and four consecutive first type hash buckets are read from the hash table.
- the quintuple G4 is (1.1.1.1, 1.1.1.2, P src2 , 80, tcp).
- the 0th bit P2 of the source port of the quintuple G4 is set to 0, to obtain the quintuple G5, and the signature information sig2 corresponding to the quintuple G5 is calculated by using the MD algorithm, and the combination of p2 and p1 is used as an index from the continuous
- the hash bucket D2 is determined in the four first-type hash buckets, and the sig2 is queried in the valid signature information recorded by the hash bucket D2. If not, the quintuple G5 is used as the target corresponding to the packet.
- the quintuple records the quintuple G5 and the original quintuple in the hash table and the corresponding result table, and performs NAT processing on the packet based on the quintuple G5; if present, executes s16.
- the 0th bit P2 of the source port of the quintuple G4 is set to 1 to obtain a quintuple G6, and the signature information sig3 corresponding to the quintuple G6 is calculated by using the MD algorithm, and the combination of p2 and p1 is used as an index, and is continuous.
- the hash bucket D3 is determined in the four first-type hash buckets, and the sig3 is queried in the valid signature information recorded by the hash bucket D3. If not, the quintuple G6 is used as the target corresponding to the packet.
- a quintuple and records the quintuple G6 and the original quintuple in the hash table and the corresponding result table, and performs NAT processing on the packet based on the quintuple G6; if present, returns execution s10 from the source IP Obtain a new destination IP address and reference port in the NAT resource pool corresponding to the address.
- the NAT process is similar to that of s01-s16, except that the processing of the destination port and the source port is reversed.
- the present disclosure provides a NAT device; as shown in FIG. 5, the device includes:
- the obtaining unit 510 is configured to obtain, from the NAT resource pool, a target IP address and a reference port of the target IP address, where the reference port is one of a continuous port range of the target IP address;
- the processing unit 520 is configured to generate, according to the target IP address, the reference port, and the original five-tuple of the packet, the first five-tuple corresponding to the packet, and respectively perform the first five-tuple
- the first type of bits of the two types of ports are masked to obtain a second quintuple
- a determining unit 530 configured to determine a target five-tuple in consecutive plurality of hash buckets of the hash table based on a result of the hash operation on the second five-tuple;
- the converting unit 540 is configured to record the target quintuple and the original quintuple in the hash table and the corresponding result table, and perform NAT processing on the packet based on the target quintuple.
- a plurality of consecutive hash buckets of the hash table are determined at one time, and then the target five-tuples that do not conflict are determined from consecutive consecutive hash buckets of the hash table, that is, one-time trial and Whether the plurality of five-tuples corresponding to the plurality of hash buckets are non-conflicting quintuples, so that the number of times of reading the storage medium can be reduced during the conflict test, and therefore, the new performance in the NAT process can be improved.
- the determining unit 530 may include:
- a calculating subunit configured to calculate, by using a first hash algorithm, a first index value corresponding to the second quintuple;
- Querying a subunit configured to perform base address processing on the first index value to obtain a second index value, and query the hash table by using the second index value as a base address to determine consecutive M first class hashes barrel;
- Determining a subunit configured to determine a target five-tuple in the M first-type hash buckets based on the second quintuple and the second hash algorithm
- the base address processing includes: setting a low N position of the first index value to 0, or adding N bits to the end of the first index value;
- N is the sum of the number of bits of the first type of the two types of ports, and M is 2 N .
- the determining subunit is specifically configured to:
- the conflict detection includes:
- the fourth type of port included in the fourth quintile of the contiguous port range a group is: a port for performing NAT processing in the original quintuple;
- a target hash bucket from the M first-type hash buckets; wherein the first target value is a value of two types of ports in the fourth quintuple a combination of the first type of bits;
- the fourth quintuple is determined as the target quintuple.
- the device further includes:
- a calculating unit configured to calculate, by using a second hash algorithm, second signature information corresponding to the original quintuple when determining that the packet needs to be processed by NAT;
- a masking unit configured to mask a first type of bits of the two types of ports of the original five-tuple to obtain a fifth quintuple
- a generating unit configured to calculate, by using a first hash algorithm, a fourth index value corresponding to the fifth quintuple;
- An indexing unit configured to perform offset processing on the fourth index value to form a fifth index value, and query the hash table by using the fifth index value to determine a second type of hash bucket;
- the offset processing is: replacing the lower N bits of the fourth index value with a second target value or complementing the second target value at the end of the fourth index value, the second target value being the original five a combination of the first type of bits of the two types of ports of the tuple;
- An analyzing unit configured to perform NAT processing on the packet based on the result table when it is determined that the second signature information exists in the valid signature information recorded by the second type of hash bucket, otherwise, The step of obtaining a new target IP address and a reference port of the new target IP address in the NAT resource pool.
- the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
- the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present disclosure. Those of ordinary skill in the art can understand and implement without any creative effort.
- the present disclosure further provides a NAT device, as shown in FIG. 6, the NAT device includes: an internal bus 610, a non-volatile storage medium 620, a processor 630, and a communication interface 640;
- the processor 630, the communication interface 640, and the non-volatile storage medium 620 complete communication with each other through the internal bus 610.
- the non-volatile storage medium 620 is configured to store machine executable instructions corresponding to the NAT method.
- the processor 630 is configured to read the machine executable instructions on the non-volatile storage medium 620 to perform the NAT method provided by the present disclosure.
- the NAT device can be a router, of course, not limited to this.
- the nonvolatile storage medium 620 may be, for example, a non-volatile memory.
- the processor 630 can invoke logic instructions that implement the NAT method in the non-volatile storage medium 620 to perform the NAT method described above.
- the functionality of the logic instructions that implement NAT can be stored in a machine readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
- the portion of the technical solution of the present disclosure that contributes in essence or to the prior art or the portion of the technical solution may be embodied in the form of a software product stored in a storage medium, including
- the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present disclosure.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本公开提供一种NAT方法、装置及NAT设备。基于该方法,从NAT资源池中获取目标IP地址以及所述目标IP地址的参考端口,所述参考端口为所述目标IP地址的一个连续端口范围中的一个端口;基于所述目标IP地址、所述参考端口和报文的原始五元组,生成所述报文对应的第一五元组,并分别对所述第一五元组的两类端口的第一类比特进行掩码,得到第二五元组;基于所述第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定目标五元组;在所述哈希表和对应的结果表中记录所述目标五元组和所述原始五元组,并基于所述目标五元组对所述报文进行NAT处理。
Description
NAT(Network Address Translation,网络地址转换)设备在接收到报文后,如果该报文需进行NAT处理且该报文满足会话信息新建条件,则执行新建流程。这里的“会话信息”例如包括报文的源IP(Internet Protocol,互连网协议)地址、目的IP地址、源端口、目的端口和传输层协议的五元组。
以源IP地址的NAT处理为例。从NAT资源池中选取一个IP地址和该IP地址的一个端口,利用该IP地址和该端口替换该报文的原始五元组中的源IP地址和源端口,形成新的五元组;进而,查询保存于存储介质(如DDR(Double Data Rate)双倍速率同步动态随机存储器)的会话表中的哈希表;当判断出该新的五元组为不冲突的五元组时,即,计算出的该新的五元组的哈希值不会在哈希表中产生哈希冲突时,在该哈希表和对应的结果表中记录该新的五元组和该原始五元组,并基于该新的五元组对该报文进行NAT处理;否则,重新从NAT资源池中选取一个IP地址和该IP地址的一个端口进行分析。
尽管上述新建流程能够实现NAT处理,但是,存在如下问题:基于现有会话表的哈希表的数据存储方式,每次冲突试探只能测试一个新的五元组,当该新的五元组产生冲突时,需要进行多次试探,而由于每次读取会话表所在的存储介质均会存在接口延时,这样无疑导致新建性能较差。
图1是一种组网系统的结构示意图。
图2是本公开一示例性实施例示出的一种NAT方法的流程图。
图3是基于本公开所提供的一种NAT方法进行源IP地址转换的图表示意图。
图4是基于本公开所提供的一种NAT方法进行源IP地址转换的图表示意图。
图5是本公开一示例性实施例示出的一种NAT装置的结构示意图。
图6是本公开一示例性实施例示出的一种NAT设备的结构示意图。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
为了便于方案理解,下面介绍关于NAT(Network Address Translation,网络地址转换)的相关内容。
从转换模式的角度而言,NAT可分为PAT(Port Address Translation,带端口的地址转换)和NO-PAT(Not Port Address Translation,不带端口的地址转换)。其中,NO-PAT模式下,一个外网IP地址(即,公网IP地址)只能分给一个内网IP地址进行NAT处理;而PAT模式下,一个外网IP地址可以同时分配给多个内网IP地址共用。本公开所出现的NAT指PAT模式。
另外,按照不同的组网应用,NAT可以分为:入接口转换源IP地址,入接口转换目的IP地址,出接口转换源IP地址,出接口转换目的IP地址。并且,不同地址的转换过程类似。
本公开提供了一种NAT方法、装置及NAT设备,以提高NAT过程的新建性能。
下面首先对本公开所提供的一种NAT方法进行介绍。本公开所提供的一种NAT方法应用于NAT设备,具体的,该NAT方法可以由NAT设备中的CPU来执行,当然, 也可以由CPU与某些硬件共同执行完成,其中,该某些硬件可以为集成电路ASIC(Application Specific Integrated Circuit)/FPGA(Field-Programmable Gate Array,现场可编程门阵列)。其中,所谓的NAT设备为网络的边沿设备,其用于实现允许内部网络用户访问外部公共网络以及允许外部公共网络访问部分内部资源(例如内部服务器)的目的,举例而言:该NAT设备的设备类型可以为路由器,当然并不局限于此。
另外,会话表分为两级表。具体的,会话表的第一级为哈希表,用于存储五元组经过哈希计算得出的签名信息和指向结果表的指针;而会话表的第二级为结果表,用于存储五元组和其他转发相关的信息。
在会话信息新建流程中,当通过查询哈希表确定出不冲突的目标五元组后,可以在哈希表中记录该目标五元组和所对应的原始五元组,具体为:(1)在该哈希表中的一个哈希桶中,存储该原始五元组对应的签名信息和指向结果表的指针;(2)将目标五元组进行位置互换,得到位置互换后的目标五元组,在哈希表中的一个哈希桶中,存储位置互换后的目标五元组对应的签名信息和指向结果表的指针,其中,所谓位置互换为:源IP地址和目的IP地址互换及源端口和目的端口互换。
哈希表中包含报文的原始五元组对应的签名信息的记录,属于该报文在哈希表中的正向哈希记录;而哈希表中包含位置互换后的目标五元组对应的签名信息的记录,属于该报文在哈希表中的反向哈希记录。另外,同一报文对应的正向哈希记录和反向哈希记录中包含相同的指针,也就是说,同一报文对应的正向哈希记录和反向哈希记录对应于结果表中的同一条记录。其中,结果表中的任一条记录至少包括:一个报文的原始五元组,以及该报文对应的位置互换后的目标五元组。
本公开中,对哈希表存储五元组的相关信息的存储方式进行了改变。例如,对于IP地址相同而端口连续的多个五元组,在哈希表中所对应的哈希桶连续。这样,可以一次性读取连续多个哈希桶,并且判断连续多个哈希桶对应的多个五元组各自是否会产生哈希冲突。
为了便于理解方案,本公开示例性地给出一种适用于本公开所提供方法的组网系统,该组网系统的结构示意图可以参见图1。如图1所示,该组网系统中包括:主机A、NAT设备B和服务器C,由于主机A和服务器C属于不同的网络,即主机A属于内网而服务器C属于外网,因此,当主机A向服务器C发送报文时,NAT设备B需要对主机A发送的报文进行NAT处理,然后将经过NAT处理后的报文发送给服务器C;类似的,当服务器C向主机A发送报文时,NAT设备B需要对服务器C发送的报文进行NAT 处理后,然后将经过NAT处理后的报文发送给该主机A。为了提高新建性能,图1中的NAT设备B可以利用本公开所提供的一种NAT方法,对主机A向服务器C发送的报文进行NAT处理,以及对服务器C向主机A发送的报文进行NAT处理。
如图2所示,本公开所提供的一种NAT方法,可以包括如下步骤。
S101,从NAT资源池中获取目标IP地址以及该目标IP地址的参考端口,该参考端口为该目标IP地址的一个连续端口范围中的一个端口。
当NAT设备接收到组网系统中的其他设备发送的报文时,如果该报文需进行NAT处理且该报文满足会话信息新建条件,则该NAT设备执行新建流程。本公开所提供方案中,该NAT设备执行新建流程时,可以从NAT资源池中获取目标IP地址以及该目标IP地址的参考端口,该参考端口为该目标IP地址的一个连续端口范围中的一个端口。并且,可以利用对该报文的原始五元组进行哈希计算后的值进行端口选择,随机选择或顺序选择,等等。
对于一个报文而言,该报文的原始五元组包括:源IP地址、目的IP地址、源端口、目的端口和传输协议;而NAT处理时的转换需求可以为仅仅转换源IP地址或转换目的IP地址,还可以为既转换源IP地址又转换目的IP地址。因此,在获取该目标IP地址和该参考端口后,如果需要转换源IP地址,则该目标IP地址用于替换原始五元组中的源IP地址,参考端口用于替换原始五元组中的源端口;而如果需要转换目的IP地址,则该目标IP地址用于替换原始五元组中的目的IP地址,参考端口用于替换原始五元组中的目的端口。另外,本公开中所述的目标IP地址为从NAT资源池中取出的一个IP地址,该目标IP地址可以作为源IP地址或目的IP地址;而该参考端口为该目标IP地址的一个连续端口范围中的一个端口,该参考端口可以作为源端口或目的端口。
另外,可以基于ACL(Access Control List,访问控制列表)来确定报文是否需要进行NAT处理、NAT处理时的转换需求以及NAT处理时所使用的NAT资源池,等等。其中,NAT设备中存储有多个NAT资源池,以应对不同类型的IP地址,并且,每个NAT资源池均包含IP地址及对应端口范围。
举例而言:对于采用TCP(Transmission Control Protocol传输控制协议)的数据流中的报文而言,报文是否满足会话信息新建条件的具体判断方式可以包括:判断报文是否为首报文,如果是,确定报文满足会话信息新建条件。对于采用UDP(User Datagram Protocol,用户数据报协议)的数据流中的报文而言,报文是否满足会话信息新建条件 的具体判断方式可以包括:判断报文是否能够基于会话表直接进行NAT处理,如果不可以,确定报文满足会话信息新建条件。这里,仅以TCP协议、UDP协议为例进行了描述,并不具有限制性,在具体应用中,对于采用其他协议的数据流中的报文,可以进行类似处理。例如,在判断出该报文不能基于会话表直接进行NAT处理时,确定报文满足会话信息新建条件。
判断报文是否能够基于会话表直接进行NAT处理的过程需要利用哈希表,而本公开对哈希表的存储方式进行改变,因此,判断报文是否能够基于会话表直接进行NAT处理的过程也发生了改变,后续再具体进行介绍。
S102,基于该目标IP地址、该参考端口和该报文的原始五元组,生成该报文对应的第一五元组,并对该第一五元组的两类端口(即,进行NAT处理的端口和不进行NAT处理的端口)的第一类比特进行掩码,得到第二五元组。
S103,基于该第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定不冲突的目标五元组。
在获取到该目标IP地址和该参考端口后,该NAT设备可以基于该报文对应的转换需求,以该目标IP地址替换该报文的原始五元组中的源IP地址或目的IP地址,以该参考端口替换该原始五元组中的源端口或目的端口,从而生成该报文对应的第一五元组。在得到第一五元组后,该NAT设备可以对该第一五元组的两类端口的第一类比特进行掩码,即置0,得到第二五元组。进而,该NAT设备基于该第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定不冲突的目标五元组。由于在基于会话表直接进行NAT处理时,无法确定被转换的是源IP地址还是目的IP地址,因此,本公开同时对第一五元组中的源端口和目的端口进行掩码。
端口由16位比特表示,也就是源端口和目的端口均由16位比特表示。对于第一类比特而言,比特数量和位置可以根据实际情况设定,举例而言:第一类比特可以为端口的第0比特,可以为端口的第0比特和第1比特,也可以为端口的第0比特、第1比特和第2比特,还可以为端口的第14比特和第15比特,等等。为了计算简便,在具体应用中,该第一类比特为端口末尾的连续至少一位,具体的位数可以根据具体应用环境进行设定。举例而言:该第一类比特为端口的末尾的连续两位,即第0比特和第1比特,或者,该第一类比特为端口的末尾的连续三位,即第0比特、第1比特和第2比特,或者,该第一类比特为端口的末尾的连续四位,即第0比特、第1比特、第2比特和第3比特,等等。
哈希表所对应的存储区域被划分为若干的哈希桶,并且,通过固定位数的二进制字符串作为哈希桶的索引值。为了提升冲突检测速度,从而提高新建性能,本公开需要使多个五元组所对应的哈希桶连续。基于该种需求,在哈希表中的一个哈希桶中,存储任一五元组对应的签名信息具体过程可以包括:
(1)将该五元组中源端口和目的端口的第一类比特进行掩码,利用第一哈希算法,计算掩码后的五元组对应的索引值。
其中,对于区别仅仅在于两类端口的第一类比特的多个五元组可以对应同一索引值。
(2)对该索引值进行偏移处理,形成具有固定位数的新的索引值,并将该五元组对应的签名信息记录到该新的索引值对应的哈希桶中,其中,偏移处理为:以该五元组中两类端口的第一类比特的组合替换索引值的低N位,或者,在索引值的尾部补该组合,其中,N为该五元组中两类端口的第一类比特的总位数。
而基于上述的任一五元组存入哈希表的方式,为了一次性试探多个五元组是否为不冲突的五元组,在得到第一五元组后,可以首先对该第一五元组的两类端口的第一类比特进行掩码,得到第二五元组,进而基于该第二五元组的哈希结果,确定哈希表中的连续多个哈希桶,并在该连续多个哈希桶中确定不冲突的目标五元组。
具体的,基于该第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定不冲突的目标五元组的步骤,可以包括:
利用第一哈希算法,计算该第二五元组对应的第一索引值;
对该第一索引值进行基址处理,得到第二索引值,并以该第二索引值作为基址查询哈希表,确定连续的M个第一类哈希桶;
基于该第二五元组和第二哈希算法,在该M个第一类哈希桶中确定不冲突的目标五元组;
该基址处理包括:将该第一索引值的低N位置0,或者,在该第一索引值的末尾补N位0;
N为两类端口的第一类比特的个数之和,M为2
N。
可以理解的是,该基址处理与上述的偏移处理具有对应性,具体的:该偏移处理为:以五元组中两类端口的第一类比特的组合替换索引值的低N位,相应的,该基址处理为:将该第一索引值的低N位置0;而该偏移处理为:在索引值的尾部补该组合,相应的, 该基址处理为:在第一索引值的末尾补N位0。另外,第一哈希算法可以包括:MD(Message Digest Algorithm,消息摘要算法)或SHA(Secure Hash Algorithm,安全哈希算法),等等。
并且,以该第二索引值作为基址查询哈希表,确定连续的M个第一类哈希桶,具体过程为:确定该第二索引值所对应的第一类哈希桶,以该第二索引值所对应的第一类哈希桶为起始点,读取连续的M个第一类哈希桶。进一步的,所述基于该第二五元组和第二哈希算法,在该M个第一类哈希桶中确定不冲突的目标五元组的步骤,可以包括:
将该第二五元组中的第一类端口的第一类比特进行恢复,得到第三五元组;其中,该第一类端口为:该原始五元组中不进行NAT处理的端口;
对该第三五元组执行冲突检测,直至在该M个第一类哈希桶中确定出不冲突的目标五元组;
所述冲突检测包括:
通过将该第三五元组中的第二类端口的第一类比特进行置0和/或置1的方式,生成所包含第二类端口属于该一个连续端口范围的第四五元组;其中,该第二类端口为:该原始五元组中进行NAT处理的端口;
利用第二哈希算法,计算第四五元组对应的第一签名信息;
将第一目标值作为第三索引值,从该M个第一类哈希桶中确定目标哈希桶;其中,该第一目标值为该第四五元组中两类端口的第一类比特的组合;
当判断出该目标哈希桶所记录的有效的签名信息中存在该第一签名信息时,将该第四五元组确定为不冲突的目标五元组。
其中,第二哈希算法可以包括:MD(Message Digest Algorithm,消息摘要算法)或SHA(Secure Hash Algorithm,安全哈希算法),等等。并且,将第一目标值作为第三索引值,从该M个第一类哈希桶中确定目标哈希桶,具体过程为:将该第一目标值作为第三索引值,进而,将该M个第一类哈希桶中,该第三索引值对应的第一类哈希桶作为目标哈希桶。
可以理解的是,有些端口属于NAT资源池中的无效端口,而在将该第三五元组中的第二类端口的第一类比特进行置0和/或置1后所得到的端口,可能属于NAT资源池中的无效端口。因此,为了避免第四五元组的第二类端口属于该无效端口,在生成时第 四五元组时,该第四五元组的第二类端口可以限定在:参考端口所在的该一个连续端口范围内。
另外,需要说明的是,初始化哈希表时,可以将哈希表项中的签名信息和指针均设置为无效值。当将五元组写入哈希表时,可以根据该五元组,将相应的签名信息和指针更改为有效值。为了区分签名信息和指针是无效值还是有效值,本方案中,在哈希表项中为每一签名信息和指针对应设置1个比特,通过将该比特置0或1,来区分无效值还是有效值。
S104,在该哈希表和对应的结果表中记录该目标五元组和该原始五元组,并基于该目标五元组对该报文进行NAT处理。
在哈希表的连续多个哈希桶中确定出不冲突的目标五元组后,可以在该哈希表和对应的结果表中记录该目标五元组和该原始五元组,并基于该目标五元组对该报文进行NAT处理。其中,在结果表中记录该目标五元组和该原始五元组可以包括:在该结果表中记录该原始五元组,以及对该目标五元组进行位置互换后所得的五元组。而基于该目标五元组对该报文进行NAT处理可以包括:将该报文中的原始五元组替换为目标五元组。本公开中,在该哈希表和对应的结果表中记录该目标五元组和该原始五元组的具体过程可以包括:
(1)利用第二哈希算法,计算该原始五元组对应的签名信息;将该原始五元组的源端口和目的端口的第一类比特进行掩码,得到新的五元组;利用第一哈希算法,计算该原始五元组对应的新的五元组的索引值,并利用原始五元组的两类端口的第一类比特的组合,对该新的五元组的索引值进行偏移处理,得到新的索引值;以该新的索引值查询该哈希表,确定一个哈希桶,并将该原始五元组对应的签名信息和指向结果表的指针存储至所确定的该哈希桶中。
(2)将该目标五元组进行位置互换,得到位置互换后的目标五元组;利用第二哈希算法,计算位置互换后的目标五元组对应的签名信息;将位置互换后的目标五元组的两类端口的第一类比特进行掩码,得到位置互换后的目标五元组对应的新的五元组;利用第一哈希算法,计算该新的五元组的索引值;根据位置互换后的目标五元组的两类端口的第一类比特的组合,对该索引值进行偏移处理,形成新的索引值;以该新的索引值查询该哈希表,确定一个哈希桶,并将位置互换后的目标五元组对应的签名信息和指向结果表的指针存储至所确定的该哈希桶中。另外,可以理解的是,当判断出该报文需进行NAT处理时,在执行新建过程之前,还可以判断该报文是否能够基于会话表直接进行 NAT处理。因此,本公开所提供的一种NAT方法,还可以包括如下步骤:
步骤01,当判断出该报文需进行NAT处理时,利用第二哈希算法,计算该原始五元组对应的第二签名信息;
步骤02,将该原始五元组的两类端口的第一类比特进行掩码,得到第五五元组;
步骤03,利用第一哈希算法,计算该第五五元组对应的第四索引值;
步骤04,对该第四索引值进行偏移处理,形成第五索引值,并以该第五索引值查询该哈希表,确定第二类哈希桶;其中,该偏移处理为:以第二目标值替换该第四索引值的低N位或在该第四索引值的末尾补该第二目标值,该第二目标值为该原始五元组的两类端口的第一类比特的组合;
步骤05,当判断出该第二类哈希桶所记录的有效的签名信息中存在该第二签名信息时,基于该结果表对该报文进行NAT处理,否则,执行所述从NAT资源池中获取目标IP地址以及所述目标IP地址的参考端口的步骤。
其中,基于该结果表对该报文进行NAT处理,具体为:依据该第二类哈希桶所记录的第二签名信息所对应的指针,从结果表中确定出五元组,进而基于所确定出的五元组,对该报文进行NAT处理。
本公开所提供方案中,一次性确定哈希表的连续多个哈希桶,进而从哈希表的连续多个哈希桶中确定不冲突的目标五元组,也就是,一次性试探与连续多个哈希桶对应的多个五元组是否为不冲突的五元组,这样使得冲突试探时可以减少对存储介质的读取次数,因此,可以提高NAT过程中的新建性能。
下面结合应用实例,对本公开所提供的一种NAT方法进行介绍。
该应用实例中,组网示意图如图1所示,该组网系统具体包括:主机A、NAT设备B和服务器C,其中,主机A的IP地址为192.168.1.2,NAT设备B的内网IP地址为192.168.1.1而外网IP地址为1.1.1.1,服务器C的IP地址为1.1.1.2。
如图3和图4所示,本公开所提供的一种NAT方法,可以包括如下步骤:
s01,NAT设备B接收到主机A至服务器C的报文后,基于ACL确定出该报文需进行NAT处理。
s02,提取该报文中的原始五元组(192.168.1.2,1.1.1.2,2222,80,tcp)。
其中,该原始五元组中,192.168.1.2为源IP地址,1.1.1.2为目的IP地址,2222为 源端口,80为目的端口,tcp为传输协议。
s03,利用MD算法,计算该原始五元组对应的签名信息sig1。
s04,将该原始五元组的源端口的第0比特p0和目的端口的第0比特p1进行掩码,得到五元组G1(192.168.1.2,1.1.1.2,P
src1,P
dst1,tcp)。
其中,P
src1为对源端口2222的第0比特p0进行掩码所得值,P
dst1为对目的端口80的第0比特p1进行掩码所得值。
s05,利用SHA算法,计算该五元组G1对应的索引值ind1。
s06,以p0和p1的组合替换索引值ind1的末两位,形成索引值ind2。
s07,以索引值ind2查询哈希表,确定哈希桶D1。
s08,当判断出该哈希桶D1所记录的有效的签名信息中存在签名信息sig1时,基于结果表对该报文进行NAT处理;否则,执行s09。
图3所示的哈希表中,v为用于标识签名信息和指针是有效值还是无效值,其中,v为0时,表示签名信息和指针为无效值,v为1时,表示签名信息和指针属于有效值。
s09,基于ACL确定出该报文对应的地址转换类型为转换源IP地址。
s10,从源IP地址所对应的NAT资源池中获取目标IP地址和参考端口。
其中,假设该目标IP地址为1.1.1.1,参考端口为2001。
s11,以目标IP地址替换原始五元组中的源IP地址,以参考端口替换原始五元组中的源端口,得到五元组G2,并对五元组G2的源端口的第0比特p2和目的端口的第0比特p1进行掩码,得到五元组G3。
其中,如图4所示,五元组G2为(1.1.1.1,1.1.1.2,2001,80,tcp);相应的,五元组G3为(1.1.1.1,1.1.1.2,P
src2,P
dst2,tcp)。
其中,P
src2为对五元组G2的源端口的第0比特p2进行掩码所得值,P
dst2为对五元组G2的目的端口的第0比特p1进行掩码所得值。
s12,利用SHA算法,计算五元组G3对应的索引值ind3。
s13,将索引值ind3的低两位置0,得到索引值ind4,并以索引值ind4作为索引,从哈希表中读取出4个连续的第一类哈希桶。
s14,将五元组G3的目的端口的掩码位恢复,得到五元组G4。
其中,五元组G4为(1.1.1.1,1.1.1.2,P
src2,80,tcp)。
s15,将五元组G4的源端口的第0比特P2置0,得到五元组G5,利用MD算法,计算五元组G5对应的签名信息sig2,以p2和p1的组合作为索引,从连续的4个第一类哈希桶中确定哈希桶D2,查询该哈希桶D2记录的有效的签名信息中是否存在该sig2,如果不存在,将五元组G5作为该报文对应的目标五元组,并在哈希表和对应的结果表中记录五元组G5和原始五元组,并基于五元组G5对该报文进行NAT处理;如果存在,执行s16。
s16,将五元组G4的源端口的第0比特P2置1,得到五元组G6,利用MD算法,计算五元组G6对应的签名信息sig3,以p2和p1的组合作为索引,从连续的4个第一类哈希桶中确定哈希桶D3,查询该哈希桶D3记录的有效的签名信息中是否存在该sig3,如果不存在,将五元组G6作为该报文对应的目标五元组,并在哈希表和对应的结果表中记录五元组G6和原始五元组,并基于五元组G6对该报文进行NAT处理;如果存在,返回执行s10,从源IP地址所对应的NAT资源池中获取新的目标IP地址和参考端口。
当原始五元组所对应的地址转换类型为目的IP地址时,NAT流程与s01-s16类似,区别在于把目的端口和源端口的处理对换。
可见,本具体实施例中,由于在冲突试探时减少了对存储介质的读取次数,因此,可以解决会话信息新建性能较差的问题。
相应于上述方法实施例,本公开提供了一种NAT装置;如图5所示,所述装置包括:
获取单元510,用于从NAT资源池中获取目标IP地址以及所述目标IP地址的参考端口,所述参考端口为所述目标IP地址的一个连续端口范围中的一个端口;
处理单元520,用于基于所述目标IP地址、所述参考端口和报文的原始五元组,生成所述报文对应的第一五元组,并分别对所述第一五元组的两类端口的第一类比特进行掩码,得到第二五元组;
确定单元530,用于基于对所述第二五元组的哈希运算的结果,在哈希表的连续多个哈希桶中确定目标五元组;
转换单元540,用于在所述哈希表和对应的结果表中记录所述目标五元组和所述原始五元组,并基于所述目标五元组对所述报文进行NAT处理。
本公开所提供方案中,一次性确定哈希表的连续多个哈希桶,进而从哈希表的连续多个哈希桶中确定不冲突的目标五元组,也就是,一次性试探与连续多个哈希桶对应的多个五元组是否为不冲突的五元组,这样使得冲突试探时可以减少对存储介质的读取次数,因此,可以提高NAT过程中的新建性能。
可选地,所述确定单元530可以包括:
计算子单元,用于利用第一哈希算法,计算所述第二五元组对应的第一索引值;
查询子单元,用于对所述第一索引值进行基址处理,得到第二索引值,并以所述第二索引值作为基址查询哈希表,确定连续的M个第一类哈希桶;
确定子单元,用于基于所述第二五元组和第二哈希算法,在所述M个第一类哈希桶中确定目标五元组;
所述基址处理包括:将所述第一索引值的低N位置0,或者,在所述第一索引值的末尾补N位0;
N为两类端口的第一类比特的个数之和,M为2
N。
可选地,所述确定子单元具体用于:
将所述第二五元组中的第一类端口的第一类比特进行恢复,得到第三五元组;其中,所述第一类端口为:所述原始五元组中不进行NAT处理的端口;
对所述第三五元组执行冲突检测,直至在所述M个第一类哈希桶中确定出目标五元组;
所述冲突检测包括:
通过将所述第三五元组中的第二类端口的第一类比特进行置0和/或置1的方式,生成所包含第二类端口属于所述一个连续端口范围的第四五元组;其中,所述第二类端口为:所述原始五元组中进行NAT处理的端口;
利用第二哈希算法,计算所述第四五元组对应的第一签名信息;
将第一目标值作为第三索引值,从所述M个第一类哈希桶中确定目标哈希桶;其中,所述第一目标值为所述第四五元组中两类端口的第一类比特的组合;
当判断出所述目标哈希桶所记录的有效的签名信息中存在所述第一签名信息时,将所述第四五元组确定为目标五元组。
可选地,所述装置还包括:
计算单元,用于当判断出所述报文需进行NAT处理时,利用第二哈希算法,计算所述原始五元组对应的第二签名信息;
掩码单元,用于将所述原始五元组的两类端口的第一类比特进行掩码,得到第五五元组;
生成单元,用于利用第一哈希算法,计算所述第五五元组对应的第四索引值;
索引单元,用于对所述第四索引值进行偏移处理,形成第五索引值,并以所述第五索引值查询所述哈希表,确定第二类哈希桶;其中,所述偏移处理为:以第二目标值替换所述第四索引值的低N位或在所述第四索引值的末尾补所述第二目标值,所述第二目标值为所述原始五元组的两类端口的第一类比特的组合;
分析单元,用于当判断出所述第二类哈希桶所记录的有效的签名信息中存在所述第二签名信息时,基于所述结果表对所述报文进行NAT处理,否则,从所述NAT资源池中获取新的目标IP地址以及所述新的目标IP地址的参考端口的步骤。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本公开方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
另外,相应于上述方法实施例,本公开还提供了一种NAT设备,如图6所示,该NAT设备包括:内部总线610、非易失性存储介质620、处理器630和通信接口640;其中,所述处理器630、所述通信接口640、所述非易失性存储介质620通过所述内部总线610完成相互间的通信。
其中,所述非易失性存储介质620,用于存储NAT方法对应的机器可执行指令。
所述处理器630,用于读取所述非易失性存储介质620上的所述机器可执行指令,以执行本公开所提供的NAT方法。
其中关于NAT方法的具体步骤的相关描述可以参见本公开方法实施例中的描述内容,在此不做赘述。并且,需要强调的是,该NAT设备可以为路由器,当然并不局限 于此。
其中,非易失性存储介质620例如可以是非易失性存储器(non-volatile memory)。处理器630可以调用执行非易失性存储介质620中的实现NAT方法的逻辑指令,以执行上述NAT方法。
实现NAT的逻辑指令的功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个机器可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员在考虑说明书及实践本公开后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未记载的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。
以上所述仅为本公开的实施例而已,并不用以限制本公开,凡在本公开的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本公开保护的范围之内。
Claims (14)
- 一种网络地址转换NAT方法,包括:从NAT资源池中获取目标互联网协议IP地址以及所述目标IP地址的参考端口,所述参考端口为所述目标IP地址的一个连续端口范围中的一个端口;基于所述目标IP地址、所述参考端口和报文的原始五元组,生成所述报文对应的第一五元组,并分别对所述第一五元组的两类端口的第一类比特进行掩码,得到第二五元组;基于所述第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定目标五元组;在所述哈希表和对应的结果表中记录所述目标五元组和所述原始五元组,并基于所述目标五元组对所述报文进行NAT处理。
- 根据权利要求1所述的方法,其特征在于,所述基于所述第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定目标五元组,包括:利用第一哈希算法,计算所述第二五元组对应的第一索引值;对所述第一索引值进行基址处理,得到第二索引值,并以所述第二索引值作为基址查询哈希表,确定连续的M个第一类哈希桶;基于所述第二五元组和第二哈希算法,在所述M个第一类哈希桶中确定目标五元组;所述基址处理包括以下任意一者:将所述第一索引值的低N位置0,以及在所述第一索引值的末尾补N位0;N为两类端口的第一类比特的个数之和,M为2 N。
- 根据权利要求2所述的方法,其特征在于,所述基于所述第二五元组和第二哈希算法,在所述M个第一类哈希桶中确定目标五元组,包括:将所述第二五元组中的第一类端口的第一类比特进行恢复,得到第三五元组;其中,所述第一类端口为:所述原始五元组中不进行NAT处理的端口;对所述第三五元组执行冲突检测,直至在所述M个第一类哈希桶中确定出目标五元组;所述冲突检测包括:通过将所述第三五元组中的第二类端口的第一类比特进行置0和/或置1的方式,生成所包含第二类端口属于所述一个连续端口范围的第四五元组;其中,所述第二类端口为:所述原始五元组中进行NAT处理的端口;利用第二哈希算法,计算所述第四五元组对应的第一签名信息;将第一目标值作为第三索引值,从所述M个第一类哈希桶中确定目标哈希桶;其中,所述第一目标值为所述第四五元组中两类端口的第一类比特的组合;当所述目标哈希桶所记录的有效的签名信息中存在所述第一签名信息时,将所述第四五元组确定为目标五元组。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:当判断出所述报文需进行NAT处理时,利用第二哈希算法,计算所述原始五元组对应的第二签名信息;将所述原始五元组的两类端口的第一类比特进行掩码,得到第五五元组;利用第一哈希算法,计算所述第五五元组对应的第四索引值;对所述第四索引值进行偏移处理,形成第五索引值,并以所述第五索引值查询所述哈希表,确定第二类哈希桶;其中,所述偏移处理为以下任意一者:以第二目标值替换所述第四索引值的低N位以及在所述第四索引值的末尾补所述第二目标值,所述第二目标值为所述原始五元组的两类端口的第一类比特的组合;当所述第二类哈希桶所记录的有效的签名信息中存在所述第二签名信息时,基于所述结果表对所述报文进行NAT处理,否则,从所述NAT资源池中获取新的目标IP地址以及所述新的目标IP地址的参考端口。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述第一类比特为用于表示端口的比特序列的末尾的连续至少一位。
- 一种网络地址转换NAT装置,包括:获取单元,用于从NAT资源池中获取目标互联网协议IP地址以及所述目标IP地址的参考端口,所述参考端口为所述目标IP地址的一个连续端口范围中的一个端口;处理单元,用于基于所述目标IP地址、所述参考端口和报文的原始五元组,生成所述报文对应的第一五元组,并分别对所述第一五元组的两类端口的第一类比特进行掩码,得到第二五元组;确定单元,用于基于所述第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定目标五元组;转换单元,用于在所述哈希表和对应的结果表中记录所述目标五元组和所述原始五元组,并基于所述目标五元组对所述报文进行NAT处理。
- 根据权利要求6所述的装置,其特征在于,所述确定单元包括:计算子单元,用于利用第一哈希算法,计算所述第二五元组对应的第一索引值;查询子单元,用于对所述第一索引值进行基址处理,得到第二索引值,并以所述第二索引值作为基址查询哈希表,确定连续的M个第一类哈希桶;确定子单元,用于基于所述第二五元组和第二哈希算法,在所述M个第一类哈希桶中确定目标五元组;所述基址处理包括以下任意一者:将所述第一索引值的低N位置0,以及,在所述第一索引值的末尾补N位0;N为两类端口的第一类比特的个数之和,M为2 N。
- 根据权利要求7所述的装置,其特征在于,所述确定子单元具体用于:将所述第二五元组中的第一类端口的第一类比特进行恢复,得到第三五元组;其中,所述第一类端口为:所述原始五元组中不进行NAT处理的端口;对所述第三五元组执行冲突检测,直至在所述M个第一类哈希桶中确定出目标五元组;所述冲突检测包括:通过将所述第三五元组中的第二类端口的第一类比特进行置0和/或置1的方式,生成所包含第二类端口属于所述一个连续端口范围的第四五元组;其中,所述第二类端口为:所述原始五元组中进行NAT处理的端口;利用第二哈希算法,计算所述第四五元组对应的第一签名信息;将第一目标值作为第三索引值,从所述M个第一类哈希桶中确定目标哈希桶;其中,所述第一目标值为所述第四五元组中两类端口的第一类比特的组合;当所述目标哈希桶所记录的有效的签名信息中存在所述第一签名信息时,将所述第四五元组确定为目标五元组。
- 根据权利要求6-8任一项所述的装置,其特征在于,所述装置还包括:计算单元,用于当判断出所述报文需进行NAT处理时,利用第二哈希算法,计算所述原始五元组对应的第二签名信息;掩码单元,用于将所述原始五元组的两类端口的第一类比特进行掩码,得到第五五元组;生成单元,用于利用第一哈希算法,计算所述第五五元组对应的第四索引值;索引单元,用于对所述第四索引值进行偏移处理,形成第五索引值,并以所述第五索引值查询所述哈希表,确定第二类哈希桶;其中,所述偏移处理为以下任意一者:以第二目标值替换所述第四索引值的低N位以及在所述第四索引值的末尾补所述第二目标值,所述第二目标值为所述原始五元组的两类端口的第一类比特的组合;分析单元,用于当所述第二类哈希桶所记录的有效的签名信息中存在所述第二签名信息时,基于所述结果表对所述报文进行NAT处理,否则,从所述NAT资源池中获取新的目标IP地址以及所述新的目标IP地址的参考端口。
- 一种网络地址转换NAT设备,包括:内部总线、非暂时性存储介质、处理器和通信接口;其中,所述处理器、所述通信接口、所述非暂时性存储介质通过所述内部总线完成相互间的通信;其中,所述存储介质,用于存储NAT方法对应的机器可执行指令;所述处理器,用于读取所述存储介质上的所述机器可执行指令,以:从NAT资源池中获取目标互联网协议IP地址以及所述目标IP地址的参考端口,所述参考端口为所述目标IP地址的一个连续端口范围中的一个端口;基于所述目标IP地址、所述参考端口和报文的原始五元组,生成所述报文对应的第一五元组,并分别对所述第一五元组的两类端口的第一类比特进行掩码,得到第二五元组;基于所述第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定目标五元组;在所述哈希表和对应的结果表中记录所述目标五元组和所述原始五元组,并基于所述目标五元组对所述报文进行NAT处理。
- 根据权利要求10所述的NAT设备,其特征在于,在基于所述第二五元组的哈希结果,在哈希表的连续多个哈希桶中确定目标五元组时,所述机器可执行指令还促使所述处理器:利用第一哈希算法,计算所述第二五元组对应的第一索引值;对所述第一索引值进行基址处理,得到第二索引值,并以所述第二索引值作为基址查询哈希表,确定连续的M个第一类哈希桶;基于所述第二五元组和第二哈希算法,在所述M个第一类哈希桶中确定目标五元组;所述基址处理包括以下任意一者:将所述第一索引值的低N位置0,以及,在所述第一索引值的末尾补N位0;N为两类端口的第一类比特的个数之和,M为2 N。
- 根据权利要求11所述的NAT设备,其特征在于,在基于所述第二五元组和第二哈希算法,在所述M个第一类哈希桶中确定目标五元组时,所述机器可执行指令还促使所述处理器:将所述第二五元组中的第一类端口的第一类比特进行恢复,得到第三五元组;其中, 所述第一类端口为:所述原始五元组中不进行NAT处理的端口;对所述第三五元组执行冲突检测,直至在所述M个第一类哈希桶中确定出目标五元组;所述冲突检测包括:通过将所述第三五元组中的第二类端口的第一类比特进行置0和/或置1的方式,生成所包含第二类端口属于所述一个连续端口范围的第四五元组;其中,所述第二类端口为:所述原始五元组中进行NAT处理的端口;利用第二哈希算法,计算所述第四五元组对应的第一签名信息;将第一目标值作为第三索引值,从所述M个第一类哈希桶中确定目标哈希桶;其中,所述第一目标值为所述第四五元组中两类端口的第一类比特的组合;当所述目标哈希桶所记录的有效的签名信息中存在所述第一签名信息时,将所述第四五元组确定为目标五元组。
- 根据权利要求10-12任一项所述的NAT设备,其特征在于,所述机器可执行指令还促使所述处理器:当判断出所述报文需进行NAT处理时,利用第二哈希算法,计算所述原始五元组对应的第二签名信息;将所述原始五元组的两类端口的第一类比特进行掩码,得到第五五元组;利用第一哈希算法,计算所述第五五元组对应的第四索引值;对所述第四索引值进行偏移处理,形成第五索引值,并以所述第五索引值查询所述哈希表,确定第二类哈希桶;其中,所述偏移处理为以下任意一者:以第二目标值替换所述第四索引值的低N位以及在所述第四索引值的末尾补所述第二目标值,所述第二目标值为所述原始五元组的两类端口的第一类比特的组合;当所述第二类哈希桶所记录的有效的签名信息中存在所述第二签名信息时,基于所述结果表对所述报文进行NAT处理,否则,从所述NAT资源池中获取新的目标IP地址以及所述新的目标IP地址的参考端口。
- 根据权利要求10-12任一项所述的NAT设备,其特征在于,所述第一类比特为用于表示端口的比特序列的末尾的连续至少一位。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US17/041,217 US10965642B2 (en) | 2018-03-26 | 2019-03-22 | Network address translation |
| JP2020551961A JP7082211B2 (ja) | 2018-03-26 | 2019-03-22 | ネットワークアドレス変換 |
| EP19775107.6A EP3758340A4 (en) | 2018-03-26 | 2019-03-22 | NETWORK ADDRESS TRANSLATION |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810253605.X | 2018-03-26 | ||
| CN201810253605.XA CN109688238B (zh) | 2018-03-26 | 2018-03-26 | 一种nat转换方法、装置及nat设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019184803A1 true WO2019184803A1 (zh) | 2019-10-03 |
Family
ID=66184415
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/079157 Ceased WO2019184803A1 (zh) | 2018-03-26 | 2019-03-22 | 网络地址转换 |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US10965642B2 (zh) |
| EP (1) | EP3758340A4 (zh) |
| JP (1) | JP7082211B2 (zh) |
| CN (1) | CN109688238B (zh) |
| WO (1) | WO2019184803A1 (zh) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109688237B (zh) * | 2018-03-26 | 2020-05-12 | 新华三技术有限公司 | 一种nat转换方法、装置及nat设备 |
| CN113132242B (zh) * | 2021-03-19 | 2022-11-15 | 翱捷科技股份有限公司 | 一种网络设备及其共享发送和接收缓存的方法 |
| CN115665092A (zh) * | 2022-09-27 | 2023-01-31 | 湖南网数科技有限公司 | 一种用于网络通信和内容分发领域的ip识别方法 |
| CN115834528B (zh) * | 2022-11-23 | 2025-02-28 | 东软集团股份有限公司 | 数据转发方法、装置、电子设备和存储介质 |
| CN115801283B (zh) * | 2022-11-29 | 2025-07-18 | 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) | 一种网络安全接入设备 |
| CN116668369A (zh) * | 2023-05-27 | 2023-08-29 | 新华三技术有限公司 | 一种流表处理方法、装置、设备及存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101702657A (zh) * | 2009-12-04 | 2010-05-05 | 杭州华三通信技术有限公司 | 一种nat业务的热备份方法和设备 |
| CN101800690A (zh) * | 2009-02-05 | 2010-08-11 | 北京启明星辰信息技术股份有限公司 | 一种使用地址池实现源地址转换的方法和装置 |
| WO2010129682A1 (en) * | 2009-05-05 | 2010-11-11 | Citrix Systems, Inc. | Systems and methods for packet steering in a multi-core architecture |
| CN104243631A (zh) * | 2014-10-13 | 2014-12-24 | 北京太一星晨信息技术有限公司 | 一种IPv4地址与IPv6地址有状态转换的方法及设备 |
| WO2017172183A1 (en) * | 2016-04-01 | 2017-10-05 | Intel Corporation | Pipelined hash table with reduced collisions |
Family Cites Families (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7146354B1 (en) * | 1999-06-18 | 2006-12-05 | F5 Networks, Inc. | Method and system for network load balancing with a compound data structure |
| CN100477671C (zh) * | 2005-12-16 | 2009-04-08 | 中国科学院计算技术研究所 | Pat模式下支持多会话应用层协议的网络地址转换方法 |
| US7830905B2 (en) * | 2007-04-20 | 2010-11-09 | Cray Inc. | Speculative forwarding in a high-radix router |
| CN101132424B (zh) * | 2007-09-29 | 2011-08-31 | 杭州华三通信技术有限公司 | 网络地址转换的方法及装置 |
| US20090138960A1 (en) * | 2007-10-26 | 2009-05-28 | University Of Ottawa | Control access rule conflict detection |
| JP5036752B2 (ja) * | 2009-04-16 | 2012-09-26 | アラクサラネットワークス株式会社 | インタネットワーク装置、及び、ローカルアドレス及び各ローカルアドレスと共に用いられるローカルアドレス内通信ポート番号と、グローバルアドレス及び各グローバルアドレスと共に用いられるグローバルアドレス内通信ポート番号とを相互に変換する方法 |
| CN102438331B (zh) | 2012-01-12 | 2016-04-13 | 惠州Tcl移动通信有限公司 | 一种移动终端通过手机上网的方法及系统 |
| US8891540B2 (en) * | 2012-05-14 | 2014-11-18 | Juniper Networks, Inc. | Inline network address translation within a mobile gateway router |
| US9185072B2 (en) * | 2012-05-14 | 2015-11-10 | Futurewei Technologies, Inc. | Stateless NAT44 |
| KR20150053620A (ko) * | 2013-11-08 | 2015-05-18 | 한국전자통신연구원 | 패킷 전송 장치 및 방법 |
| CN104468381B (zh) * | 2014-12-01 | 2017-05-10 | 国家计算机网络与信息安全管理中心 | 一种多域流规则匹配的实现方法 |
| US9553806B2 (en) * | 2015-02-06 | 2017-01-24 | Telefonaktiebolaget L M Ericsson (Publ) | Method and system for supporting port ranging in a software-defined networking (SDN) system |
| CN106534394B (zh) | 2015-09-15 | 2020-01-07 | 瞻博网络公司 | 用于管理端口的设备、系统和方法 |
| EP3369213B1 (en) * | 2015-10-30 | 2020-08-05 | Telecom Italia S.p.A. | Performance measurement in a packet-switched communication network |
| US10257061B2 (en) * | 2016-05-31 | 2019-04-09 | 128 Technology, Inc. | Detecting source network address translation in a communication system |
| US10305799B2 (en) * | 2016-08-17 | 2019-05-28 | Cisco Technology, Inc. | Re-configurable lookup pipeline architecture for packet forwarding |
| US10834085B2 (en) * | 2017-04-14 | 2020-11-10 | Nxp Usa, Inc. | Method and apparatus for speeding up ACL rule lookups that include TCP/UDP port ranges in the rules |
| CN107566549B (zh) * | 2017-09-30 | 2021-06-18 | 东软集团股份有限公司 | 一种网络地址转换映射表的处理方法、装置及设备 |
| US10681011B2 (en) * | 2017-11-30 | 2020-06-09 | International Business Machines Corporation | Preemptive determination of reserved IP conflicts on VPNs |
-
2018
- 2018-03-26 CN CN201810253605.XA patent/CN109688238B/zh active Active
-
2019
- 2019-03-22 EP EP19775107.6A patent/EP3758340A4/en not_active Ceased
- 2019-03-22 WO PCT/CN2019/079157 patent/WO2019184803A1/zh not_active Ceased
- 2019-03-22 US US17/041,217 patent/US10965642B2/en active Active
- 2019-03-22 JP JP2020551961A patent/JP7082211B2/ja active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101800690A (zh) * | 2009-02-05 | 2010-08-11 | 北京启明星辰信息技术股份有限公司 | 一种使用地址池实现源地址转换的方法和装置 |
| WO2010129682A1 (en) * | 2009-05-05 | 2010-11-11 | Citrix Systems, Inc. | Systems and methods for packet steering in a multi-core architecture |
| CN101702657A (zh) * | 2009-12-04 | 2010-05-05 | 杭州华三通信技术有限公司 | 一种nat业务的热备份方法和设备 |
| CN104243631A (zh) * | 2014-10-13 | 2014-12-24 | 北京太一星晨信息技术有限公司 | 一种IPv4地址与IPv6地址有状态转换的方法及设备 |
| WO2017172183A1 (en) * | 2016-04-01 | 2017-10-05 | Intel Corporation | Pipelined hash table with reduced collisions |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3758340A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| US10965642B2 (en) | 2021-03-30 |
| EP3758340A1 (en) | 2020-12-30 |
| EP3758340A4 (en) | 2021-02-24 |
| US20210014194A1 (en) | 2021-01-14 |
| JP2021516923A (ja) | 2021-07-08 |
| CN109688238A (zh) | 2019-04-26 |
| JP7082211B2 (ja) | 2022-06-07 |
| CN109688238B (zh) | 2020-06-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019184803A1 (zh) | 网络地址转换 | |
| JP6810182B2 (ja) | 分離仮想ネットワークのためのプライベートエイリアスエンドポイント | |
| US11687594B2 (en) | Algorithmic TCAM based ternary lookup | |
| CN103238145B (zh) | 用于网络装备中的高性能、可更新和确定的哈希表的方法和设备 | |
| CN109688237B (zh) | 一种nat转换方法、装置及nat设备 | |
| JP2021516923A5 (zh) | ||
| CN101707617A (zh) | 报文过滤方法、装置及网络设备 | |
| WO2016206511A1 (zh) | 一种实现nat的方法和装置 | |
| WO2017186159A1 (zh) | 报文传输 | |
| CN113472917B (zh) | 一种数据报文的网络地址转换方法、设备及介质 | |
| EP3811576A1 (en) | Flow cache support for crypto operations and offload | |
| CN104243631A (zh) | 一种IPv4地址与IPv6地址有状态转换的方法及设备 | |
| US12137093B2 (en) | Systems and methods for applying attestation tokens to LISP messages | |
| CN110868387B (zh) | 用于操作联网设备的系统和方法 | |
| US20150295883A1 (en) | Storage and retrieval of information using internet protocol addresses | |
| CN111131539B (zh) | 报文转发方法及装置 | |
| CN111756636B (zh) | 数据包处理方法、装置及设备、存储介质 | |
| US8539547B2 (en) | Policy selector representation for fast retrieval | |
| CN106878308B (zh) | 一种icmp报文匹配系统及方法 | |
| US9378784B1 (en) | Security device using high latency memory to implement high update rate statistics for large number of events | |
| US11368354B2 (en) | Multi-result lookups | |
| CN105450527B (zh) | 处理报文、发送信息、接收信息的方法及装置 | |
| CN113132273B (zh) | 一种数据转发方法及装置 | |
| CN108173980A (zh) | 一种sdn环境中的重复地址检测方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19775107 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2020551961 Country of ref document: JP Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2019775107 Country of ref document: EP Effective date: 20200924 |