CN111314497B - Method and system for simultaneously supporting multiple NAT types to take effect - Google Patents
Method and system for simultaneously supporting multiple NAT types to take effect Download PDFInfo
- Publication number
- CN111314497B CN111314497B CN202010064274.2A CN202010064274A CN111314497B CN 111314497 B CN111314497 B CN 111314497B CN 202010064274 A CN202010064274 A CN 202010064274A CN 111314497 B CN111314497 B CN 111314497B
- Authority
- CN
- China
- Prior art keywords
- nat
- nat types
- configuration
- types
- message data
- 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
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/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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the technical field of computer communication networks, in particular to an effective method and system for simultaneously supporting multiple NAT types. By constructing the inter-group relationship, and storing the corresponding relationship in a structure linked list mode; configuring different NAT types according to related services; specifically, according to message data, judging configuration through sequence; if the two are matched, the message data is forwarded in a downlink mode, otherwise, secondary judgment configuration is carried out, and the message data is forwarded or discarded according to a secondary judgment result. The embedded system network equipment can be further modified on the original NAT function, different requirements can be processed differently, and the aim of simultaneously supporting multiple NAT types to be effective is achieved.
Description
Technical Field
The invention relates to the technical field of computer communication networks, in particular to an effective method and system for simultaneously supporting multiple NAT types.
Background
Ascending: the user points in the direction of the server.
Descending: the server points in the direction of the user.
Internal group: the group formed by the IP address and the port number of the internal host, namely the source IP and the source port of the uplink sending message.
An external group: the IP address and the port number in the internal group are referred, and a new IP address and a new port number are obtained after the source IP address and the source port of the NAT function are converted. The source of the received message is composed of external groups.
Purpose group: the group formed by the private IP address and the port number of the external host is referred to, namely the destination IP and the destination port of the uplink message.
NAT refers to mapping between an internal group and an external group during use, and a server cannot directly access an internal host, and needs to access an intermediate network device first to transmit downlink data to the internal group through the translation of the intermediate network device. Currently, the NAT implementation for UDP data is divided into NAT 1-4, which are called Full Cone NAT, managed Cone NAT, Port managed Cone NAT, and symmetry NAT, respectively. Different NAT types have different restrictions on downstream data. NAT1 is unlimited in that data is forwarded normally as long as the external and internal groups are related. NAT2 adds a restriction, and only on the premise that an external group accesses a destination host, data sent by the destination host is transmitted to the external group with which a relationship has been established, and then the data is received by the network device. The NAT3 is a further enhancement to the NAT2, and the information of the destination host is checked, that is, the IP and the port need to be consistent. NAT4 is a level of flexibility in that the binding is the relationship between internal groups and destination groups, and each communication between the two parties is consistent with the internal group/destination group information. Most devices in the market support four types of NAT functions, but only one type of NAT function is supported at the same time, and different NAT types cannot be processed for different services.
Disclosure of Invention
Aiming at the technical problem that only one NAT type is supported at the same time and different NAT types cannot be processed aiming at different services, the invention provides a method, a system, a platform and a storage medium for simultaneously supporting multiple NAT type validation, so that different requirements are differentially processed, and the aim of simultaneously supporting multiple NAT types to validate is fulfilled.
The invention is realized by the following technical scheme:
a method for simultaneously supporting multiple NAT types to take effect specifically comprises the following steps:
establishing an inter-group relationship, and storing a corresponding relationship in a structure linked list mode;
configuring different NAT types according to related services;
in the step of configuring different NAT types according to related services, the method further comprises the following steps:
acquiring message data;
judging configuration according to the message data through the sequence; if the matching is successful, the message data is forwarded in a downlink mode, otherwise, the next step is executed;
and performing secondary judgment configuration, and forwarding or discarding the message data according to a secondary judgment result.
Further, the relationship between the building groups is as follows: constructing an external group and internal group relationship;
in the step of constructing the inter-group relationship and storing the corresponding relationship in a structure linked list mode, the method also comprises the following steps:
the MAC, IP and port are recorded.
Further, the configuring different NAT types according to the related services specifically includes:
configuring NAT for IP and port of the internal group;
and carrying out NAT configuration on the MAC address of the internal host.
Further, the determining and configuring through the order includes:
the configuration of the MAC address is preferentially matched and the IP and port of the external group are secondarily matched.
Further, the step of performing secondary judgment configuration and forwarding or discarding the message data according to the secondary judgment result further includes the following steps:
judging whether the external group is on the relation linked list, if not, processing in a default mode of NAT 3; if yes, executing the next step;
and forwarding or discarding the message data according to the secondary judgment configuration.
Further, the forwarding or discarding of the message data according to the secondary judgment configuration specifically includes:
NAT1 is directly transmitted according to hardware;
the NAT2 and the NAT4 are original functional parts utilizing the NAT function.
In order to achieve the above object, the present invention further provides a system for simultaneously supporting multiple NAT types, where the system specifically includes:
the building unit is used for building the inter-group relation and storing the corresponding relation in a structure linked list mode;
the configuration unit is used for configuring different NAT types according to related services;
the acquisition module is used for acquiring message data;
the first judging module is used for judging and configuring according to the message data through the sequence;
and the second judgment module is used for performing secondary judgment configuration and forwarding or discarding the message data according to a secondary judgment result.
Further, the system further comprises:
the first configuration module is used for carrying out NAT configuration on the IP and the port of the internal group;
the second configuration module is used for carrying out NAT configuration on the MAC address of the internal host;
the third judging module is used for judging whether the external group is on the relation linked list or not;
the fourth judging module is used for forwarding or discarding the message data according to the secondary judging configuration;
the forwarding module is used for directly forwarding according to hardware;
and the original processing module is used for utilizing the original function part of the NAT function.
In order to achieve the above object, the present invention further provides a platform for simultaneously supporting multiple NAT types, including:
the system comprises a processor, a memory and a control program which simultaneously supports a plurality of NAT types effective platform;
the processor executes the effective platform control program which simultaneously supports multiple NAT types, the effective platform control program which simultaneously supports multiple NAT types is stored in the memory, and the effective platform control program which simultaneously supports multiple NAT types is realized, so that the effective method steps which simultaneously support multiple NAT types are realized.
In order to achieve the above object, the present invention further provides a computer readable storage medium, where the computer readable storage medium stores a control program for simultaneously supporting multiple NAT type validation platforms, and the computer readable storage medium simultaneously supports multiple NAT type validation platform control programs, so as to implement the method steps for simultaneously supporting multiple NAT types validation.
Compared with the prior art, the invention has the following beneficial effects:
the invention supports a plurality of NAT types at the same time to take effect,
establishing an inter-group relationship, and storing a corresponding relationship in a structure linked list mode;
configuring different NAT types according to related services;
in the step of configuring different NAT types according to related services, the method further comprises the following steps:
acquiring message data;
judging configuration according to the message data through the sequence; if the matching is successful, the message data is forwarded in a downlink mode, otherwise, the next step is executed;
and performing secondary judgment configuration, and forwarding or discarding the message data according to a secondary judgment result.
And correspondingly system units and modules:
the building unit is used for building the inter-group relation and storing the corresponding relation in a structure linked list mode;
the configuration unit is used for configuring different NAT types according to related services;
the acquisition module is used for acquiring message data;
the first judging module is used for judging and configuring according to the message data through the sequence;
and the second judgment module is used for performing secondary judgment configuration and forwarding or discarding the message data according to a secondary judgment result.
Correspondingly, the system further comprises:
the first configuration module is used for carrying out NAT configuration on the IP and the port of the internal group;
the second configuration module is used for carrying out NAT configuration on the MAC address of the internal host;
the third judging module is used for judging whether the external group is on the relation linked list or not;
the fourth judging module is used for forwarding or discarding the message data according to the secondary judging configuration;
the forwarding module is used for directly forwarding according to hardware;
and the original processing module is used for utilizing the original function part of the NAT function.
And accordingly platforms and storage media;
the embedded system network equipment can be further modified on the original NAT function, different requirements can be processed differently, and the aim of simultaneously supporting multiple NAT types to be effective is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of an effective method architecture for simultaneously supporting multiple NAT types according to the present invention;
fig. 2 is a schematic software flow diagram of an implementation embodiment of the present invention for a routing device to simultaneously support multiple NAT types to be effective;
FIG. 3 is a schematic diagram of an effective system architecture for supporting multiple NAT types simultaneously according to the present invention;
FIG. 4 is a block diagram of a system for validating multiple NAT types simultaneously according to the present invention;
FIG. 5 is a schematic diagram of an effective platform architecture for supporting multiple NAT types simultaneously according to the present invention;
FIG. 6 is a block diagram of a computer-readable storage medium according to an embodiment of the present invention;
the objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
For better understanding of the objects, aspects and advantages of the present invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings, and other advantages and capabilities of the present invention will become apparent to those skilled in the art from the description.
The invention is capable of other and different embodiments and its several details are capable of modification in various other respects, all without departing from the spirit and scope of the present invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
In addition, if there is a description of "first", "second", etc. in an embodiment of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Secondly, the technical solutions in the embodiments can be combined with each other, but it must be based on the realization of those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not be within the protection scope of the present invention.
Preferably, the method for validating the simultaneous support of multiple NAT types is applied to one or more terminals or servers. The terminal is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The terminal can be a desktop computer, a notebook, a palm computer, a cloud server and other computing equipment. The terminal can be in man-machine interaction with a client in a keyboard mode, a mouse mode, a remote controller mode, a touch panel mode or a voice control device mode.
The invention provides a method, a system, a platform and a storage medium for realizing the effect of simultaneously supporting multiple NAT types.
Fig. 1 is a flowchart of an effective method for simultaneously supporting multiple NAT types according to an embodiment of the present invention.
In this embodiment, the method for enabling the NAT types to be valid while supporting multiple NAT types may be applied to a terminal with a display function or a fixed terminal, where the terminal is not limited to a personal computer, a smart phone, a tablet computer, a desktop or all-in-one machine with a camera, and the like.
The validation method capable of simultaneously supporting multiple NAT types can also be applied to a hardware environment formed by a terminal and a server connected with the terminal through a network. Networks include, but are not limited to: a wide area network, a metropolitan area network, or a local area network. The method for realizing the effect of supporting multiple NAT types simultaneously can be executed by a server, a terminal or both.
For example, for a terminal that needs to perform validation for simultaneously supporting multiple NAT types, the validation function for simultaneously supporting multiple NAT types provided by the method of the present invention may be directly integrated on the terminal, or a client for implementing the method of the present invention may be installed. For another example, the method provided by the present invention may further run on a device such as a server in the form of a Software Development Kit (SDK), and an interface that simultaneously supports multiple NAT type validation functions is provided in the form of an SDK, and a terminal or other devices may implement the function that simultaneously supports multiple NAT types validation through the provided interface.
As shown in fig. 1, the present invention provides an effective method for simultaneously supporting multiple NAT types, and the method specifically includes the following steps, and according to different requirements, the order of the steps in the flowchart may be changed, and some steps may be omitted.
Establishing an inter-group relationship, and storing a corresponding relationship in a structure linked list mode;
configuring different NAT types according to related services;
in the step of configuring different NAT types according to related services, the method further comprises the following steps:
acquiring message data;
judging configuration according to the message data through the sequence; if the matching is successful, the message data is forwarded in a downlink mode, otherwise, the next step is executed;
and performing secondary judgment configuration, and forwarding or discarding the message data according to a secondary judgment result.
Specifically, the relationship between the building groups is as follows: constructing an external group and internal group relationship;
in the step of constructing the inter-group relationship and storing the corresponding relationship in a structure linked list mode, the method also comprises the following steps:
the MAC, IP and port are recorded.
That is, in method steps of embodiments of the present invention, a routing device operates by default as a NAT3 type. The external group and the internal group establish a relationship, store the corresponding relationship in a structure linked list mode, and record MAC, IP and ports. Preferably, the corresponding information is visible at the routing device management interface.
Specifically, the configuring different NAT types according to related services specifically includes:
configuring NAT for IP and port of the internal group;
and carrying out NAT configuration on the MAC address of the internal host.
That is, on the management interface of the routing device, different NAT types are configured for the related services. And carrying out NAT configuration on the IP and the port of the internal group, and carrying out NAT configuration on the MAC address of the internal host.
Preferably, the determining and configuring by the order includes:
the configuration of the MAC address is preferentially matched and the IP and port of the external group are secondarily matched.
Further, the step of performing secondary judgment configuration and forwarding or discarding the message data according to the secondary judgment result further includes the following steps:
judging whether the external group is on the relation linked list, if not, processing in a default mode of NAT 3; if yes, executing the next step;
and forwarding or discarding the message data according to the secondary judgment configuration.
Further, the forwarding or discarding of the message data according to the secondary judgment configuration specifically includes:
NAT1 is directly transmitted according to hardware;
the NAT2 and the NAT4 are original functional parts utilizing the NAT function.
That is, after the driver of the routing device receives the downlink UDP request packet, the configuration of the MAC address is preferentially matched, and if the matching is hit, the full-transparent transmission channel is accessed. And the secondary level matches the IP and the port of the external group, and the hit is processed according to the NAT setting type. Miss, NAT3 is passed by default.
Specifically, the full transparent transmission function is similar to NAT1, and as long as the destination MAC address in the downlink UDP request message matches the set data, the message is forwarded unconditionally, and meanwhile, in order not to affect the operation of the routing device, the message can only be forwarded in a hardware manner without being processed by the CPU of the device.
The secondary level matches the IP and the port of the external group, judges whether the external group (the destination direction) is on the relation linked list, and processes the external group in a default mode NAT3 if the external group (the destination direction) does not exist. If the NAT function exists, the processing is carried out according to the configuration, the NAT1 directly carries out forwarding according to hardware, and the NAT2 and the NAT4 carry out forwarding or discarding processing after judgment by utilizing the original function part of the NAT function.
Specifically, as shown in fig. 2, an implementation embodiment for enabling multiple NAT types to be simultaneously supported for a routing device.
The routing device defaults to operating with NAT3 type. The external group and the internal group establish a relationship, that is, the relationship between the external group and the internal group is established, the corresponding relationship is stored in a structure linked list mode, meanwhile, MAC, IP and ports are recorded, and related data information is visible on a management interface of the routing equipment.
Specifically, on the routing device management interface, different NAT types can be configured for the related services. Namely, the configuration of NAT for the IP and port of the internal group and the configuration of NAT for the MAC address of the internal host.
That is, after receiving a downstream UDP request packet, the router device preferentially matches the configuration of the MAC address, and if a match is hit, the router device goes through the full transparent transmission channel to directly forward the packet downstream. Performing secondary matching if the matching is not hit, and comparing according to the setting of the MAC through the mapping relation between the external group and the internal group in the configuration process of the matched MAC address;
in the setting of the secondary matching external group IP and port, if hit, processing is carried out according to the NAT setting type, and after the processing is carried out through NAT1, NAT2 and NAT4, the message is forwarded in a downlink manner. If the messages are not hit, the messages are directly forwarded in a downlink manner through NAT3 processing in a default mode, and in the embodiment of the invention, the messages are compared according to the setting of the IP/port through the mapping relation between the external group and the internal group in the configuration process of matching the IP and the port.
The internal host receives the corresponding message and sends the message to the internal group and the external group, and the message is sent in real time in an uplink way through the mapping relation between the internal host and the external group,
in the embodiment of the present invention, the full transparent transmission has a function similar to NAT1, and as long as the destination MAC address in the downlink UDP request message matches the set data, the message is unconditionally transmitted downward, and meanwhile, in order not to affect the operation of the routing device, the message can be transmitted only in a hardware manner and is not processed by the CPU of the device.
The secondary matching of the IP and the port of the external group is specifically to determine whether the external group (i.e., the destination point) is on the relationship linked list, and if not, the secondary matching is processed in a default NAT3 manner. If the NAT function exists, the processing is carried out according to the configuration, namely, the NAT1 directly carries out forwarding according to hardware, and the NAT2 and the NAT4 carry out forwarding or discarding processing after judging by utilizing the original function part of the NAT function.
To achieve the above object, as shown in fig. 3, the present invention further provides a system for simultaneously supporting multiple NAT types, where the system specifically includes:
the building unit is used for building the inter-group relation and storing the corresponding relation in a structure linked list mode;
the configuration unit is used for configuring different NAT types according to related services;
the acquisition module is used for acquiring message data;
the first judging module is used for judging and configuring according to the message data through the sequence;
and the second judgment module is used for performing secondary judgment configuration and forwarding or discarding the message data according to a secondary judgment result.
Further, as shown in fig. 4, the system further includes:
the first configuration module is used for carrying out NAT configuration on the IP and the port of the internal group;
the second configuration module is used for carrying out NAT configuration on the MAC address of the internal host;
the third judging module is used for judging whether the external group is on the relation linked list or not;
the fourth judging module is used for forwarding or discarding the message data according to the secondary judging configuration;
the forwarding module is used for directly forwarding according to hardware;
and the original processing module is used for utilizing the original function part of the NAT function.
That is, the routing device operates as a NAT3 type by default. The external group and the internal group establish a relationship, store the corresponding relationship in a structure linked list mode, and record MAC, IP and ports. Visible in the routing device management interface.
And on a management interface of the routing equipment, configuring different NAT types for related services. And carrying out NAT configuration on the IP and the port of the internal group, and carrying out NAT configuration on the MAC address of the internal host.
And after the drive of the routing equipment receives a downlink UDP request message, preferentially matching the configuration of the MAC address, and if the matching is hit, moving a full-transparent transmission channel. And the secondary level matches the IP and the port of the external group, and the hit is processed according to the NAT setting type. Miss, NAT3 is passed by default.
The full transparent transmission is similar to the NAT1 in function, as long as the destination MAC address in the downlink UDP request message matches the set data, the message is forwarded downward unconditionally, and meanwhile, in order not to affect the operation of the routing device, the message can only be forwarded in a hardware manner without being processed by the CPU of the device.
And the secondary matching of the IP and the port of the external group, judging whether the external group (the destination point) is on the relation linked list, and if not, processing in a default mode of NAT 3. If the NAT function exists, the processing is carried out according to the configuration, the NAT1 directly carries out forwarding according to hardware, and the NAT2 and the NAT4 carry out forwarding or discarding processing after judgment by utilizing the original function part of the NAT function.
The specific details of the steps have been set forth above and are not described herein again;
the present invention further provides a validation platform capable of supporting multiple NAT types simultaneously, as shown in fig. 5, including:
the system comprises a processor, a memory and a control program which simultaneously supports a plurality of NAT types effective platform;
the processor executes the validation platform control program capable of supporting multiple NAT types simultaneously, the validation platform control program capable of supporting multiple NAT types simultaneously is stored in the memory, and the validation platform control program capable of supporting multiple NAT types simultaneously realizes the validation method steps capable of supporting multiple NAT types simultaneously, such as:
establishing an inter-group relationship, and storing a corresponding relationship in a structure linked list mode;
configuring different NAT types according to related services;
in the step of configuring different NAT types according to related services, the method further comprises the following steps:
acquiring message data;
judging configuration according to the message data through the sequence; if the matching is successful, the message data is forwarded in a downlink mode, otherwise, the next step is executed;
and performing secondary judgment configuration, and forwarding or discarding the message data according to a secondary judgment result.
The specific details of the steps have been set forth above and are not described herein again;
in the embodiment of the present invention, the built-in processor capable of supporting multiple NAT types validation platform simultaneously may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, and include one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, and a combination of various control chips, and the like. The processor accesses each component by using various interfaces and line connections, and executes various functions and processes data by running or executing programs or units stored in the memory and calling data stored in the memory to simultaneously support multiple NAT types;
the memory is used for storing program codes and various data, is installed in a platform which simultaneously supports a plurality of NAT types to effect and realizes high-speed and automatic access to the program or the data in the running process.
The Memory includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable rewritable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical Disc Memory, magnetic disk Memory, tape Memory, or any other medium readable by a computer that can be used to carry or store data.
The present invention further provides a computer readable storage medium, as shown in fig. 6, where the computer readable storage medium stores a validation platform control program capable of supporting multiple NAT types simultaneously, the validation platform control program capable of supporting multiple NAT types simultaneously, and the validation method steps capable of supporting multiple NAT types simultaneously are implemented, for example,
establishing an inter-group relationship, and storing a corresponding relationship in a structure linked list mode;
configuring different NAT types according to related services;
in the step of configuring different NAT types according to related services, the method further comprises the following steps:
acquiring message data;
judging configuration according to the message data through the sequence; if the matching is successful, the message data is forwarded in a downlink mode, otherwise, the next step is executed;
and performing secondary judgment configuration, and forwarding or discarding the message data according to a secondary judgment result.
The specific details of the steps have been set forth above and are not described herein again;
in describing embodiments of the present invention, it should be noted that any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and that the scope of the preferred embodiments of the present invention includes additional implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processing module-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM).
Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
In the embodiment of the present invention, in order to meet the use requirement, for example, the PS4 direct connection server needs to use the NAT2, and if the whole routing device uses the NAT2, the routing device is more vulnerable to external attacks. For general internet access functions, only NAT3 is also satisfactory. The invention further modifies the original NAT function of the embedded system network equipment, and performs differential processing on different requirements, thereby achieving the purpose of simultaneously supporting the effect of multiple NAT types.
That is to say, aiming at the technical problem that only one type of NAT is supported at the same time and different NAT types cannot be processed for different services, the invention provides a method, a system, a platform and a storage medium for simultaneously supporting multiple NAT types to take effect, which can further modify the original NAT function of the embedded system network equipment, realize the differential processing of different requirements and achieve the purpose of simultaneously supporting the multiple NAT types to take effect.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (6)
1. An effective method for simultaneously supporting multiple NAT types is characterized by comprising the following steps:
establishing an inter-group relationship, and storing a corresponding relationship in a structure linked list mode;
configuring different NAT types according to related services;
in the step of configuring different NAT types according to related services, the method further comprises the following steps:
acquiring message data;
judging configuration according to the message data through the sequence; if the matching is successful, the message data is forwarded in a downlink mode, otherwise, the next step is executed;
performing secondary judgment configuration, and forwarding or discarding the message data according to a secondary judgment result;
the method specifically comprises the following steps: when the driver of the routing equipment receives a downlink UDP request message, the configuration of the MAC address is preferentially matched, if the matching is hit, the full-transparent transmission channel is moved, if the matching is hit, the IP and the port of the external group are matched, if the matching is hit, the processing is carried out according to the NAT setting type, and if the matching is not hit, the NAT3 is passed through a default mode.
2. The method according to claim 1, wherein the inter-building relationship is: constructing an external group and internal group relationship;
in the step of constructing the inter-group relationship and storing the corresponding relationship in a structure linked list mode, the method also comprises the following steps:
the MAC, IP and port are recorded.
3. The method for enabling multiple NAT types to work simultaneously according to claim 1, wherein configuring different NAT types according to related services specifically includes:
configuring NAT for IP and port of the internal group;
and carrying out NAT configuration on the MAC address of the internal host.
4. The method for enabling multiple NAT types to be available simultaneously according to claim 1, wherein the forwarding or discarding of the packet data is performed according to the secondary determination configuration, and specifically:
NAT1 is directly transmitted according to hardware;
the NAT2 and the NAT4 are original functional parts utilizing the NAT function.
5. A validation platform for simultaneously supporting multiple NAT types, comprising:
the system comprises a processor, a memory and a control program which simultaneously supports a plurality of NAT types effective platform;
the method for validating multiple NAT types simultaneously is implemented by the processor executing the validation platform control program for multiple NAT types simultaneously, the validation platform control program for multiple NAT types simultaneously being stored in the memory, and the validation platform control program for multiple NAT types simultaneously being supported, according to any one of claims 1 to 4.
6. A computer-readable storage medium, wherein the computer-readable storage medium stores a validation platform control program capable of simultaneously supporting multiple NAT types, and the validation platform control program capable of simultaneously supporting multiple NAT types implements the validation method steps of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010064274.2A CN111314497B (en) | 2020-01-20 | 2020-01-20 | Method and system for simultaneously supporting multiple NAT types to take effect |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010064274.2A CN111314497B (en) | 2020-01-20 | 2020-01-20 | Method and system for simultaneously supporting multiple NAT types to take effect |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111314497A CN111314497A (en) | 2020-06-19 |
CN111314497B true CN111314497B (en) | 2022-03-11 |
Family
ID=71160541
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010064274.2A Active CN111314497B (en) | 2020-01-20 | 2020-01-20 | Method and system for simultaneously supporting multiple NAT types to take effect |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111314497B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113746954B (en) * | 2021-09-22 | 2023-06-13 | 烽火通信科技股份有限公司 | Method and device for quickly recovering NAT address block through secondary allocation |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101848235A (en) * | 2010-04-16 | 2010-09-29 | 北京航空航天大学 | Real-time multimedia data P2P transmission scheme for supporting NAT traversal |
CN105556906A (en) * | 2014-05-30 | 2016-05-04 | 华为技术有限公司 | Network address translation method and apparatus |
CN109495596A (en) * | 2017-09-13 | 2019-03-19 | 阿里巴巴集团控股有限公司 | A kind of method and device for realizing address conversion |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101800781B (en) * | 2009-02-11 | 2013-07-03 | 中国科学院计算机网络信息中心 | Tunnel transition method and system for passing through NAT |
CN101877728B (en) * | 2010-06-25 | 2014-12-31 | 中兴通讯股份有限公司 | Method and device for converting and forwarding network addresses |
CN103701945B (en) * | 2013-12-16 | 2017-07-14 | 浙江宇视科技有限公司 | A kind of address conversion method and device |
US10554547B2 (en) * | 2015-05-07 | 2020-02-04 | Cisco Technology, Inc. | Scalable network address translation at high speed in a network environment |
CN115174318B (en) * | 2016-11-22 | 2024-02-06 | 三星电子株式会社 | Terminal and base station in wireless communication system and method thereof |
CN108848204B (en) * | 2018-07-10 | 2021-10-26 | 新华三信息安全技术有限公司 | NAT service rapid processing method and device |
-
2020
- 2020-01-20 CN CN202010064274.2A patent/CN111314497B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101848235A (en) * | 2010-04-16 | 2010-09-29 | 北京航空航天大学 | Real-time multimedia data P2P transmission scheme for supporting NAT traversal |
CN105556906A (en) * | 2014-05-30 | 2016-05-04 | 华为技术有限公司 | Network address translation method and apparatus |
CN109495596A (en) * | 2017-09-13 | 2019-03-19 | 阿里巴巴集团控股有限公司 | A kind of method and device for realizing address conversion |
Also Published As
Publication number | Publication date |
---|---|
CN111314497A (en) | 2020-06-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108449282B (en) | Load balancing method and device | |
EP2745474B1 (en) | Virtualization gateway between virtualized and non-virtualized networks | |
US9407600B2 (en) | Service access method and device for conducting the same | |
EP0605339A2 (en) | Method and apparatus for making a cluster of computers appear as a single host on a network | |
CN111865621B (en) | Method and device for accessing gateway | |
CN112040030B (en) | Message transmission method and device, computer equipment and storage medium | |
CN111131037A (en) | Data transmission method, device, medium and electronic equipment based on virtual gateway | |
CN113507393B (en) | Data acceleration transmission method and device, computer equipment and storage medium | |
EP3136248B1 (en) | Access management system, communication system, recording medium and access management method | |
CN111698346B (en) | Private network address conversion method and device, private network gateway and storage medium | |
CN110012118B (en) | Method and controller for providing Network Address Translation (NAT) service | |
CN111314497B (en) | Method and system for simultaneously supporting multiple NAT types to take effect | |
CN112351115B (en) | Port prediction method and device of symmetric NAT equipment | |
CN113676564B (en) | Data transmission method, device and storage medium | |
CN108471384B (en) | Method and device for forwarding messages for end-to-end communication | |
CN115913597A (en) | Method and device for determining lost host | |
CN111654559B (en) | Container data transmission method and device | |
US20050144290A1 (en) | Arbitrary java logic deployed transparently in a network | |
US20140068088A1 (en) | Systems and methods for processing media access control (mac) addresses | |
CN107241460B (en) | Floating address processing method and electronic equipment | |
CN113709016B (en) | Communication system, communication method, communication apparatus, communication device, and storage medium | |
CN111800340B (en) | Data packet forwarding method and device | |
CN113497764A (en) | Service routing method, system, computer storage medium and electronic device | |
CN114531320A (en) | Communication method, device, equipment, system and computer readable storage medium | |
US10637777B2 (en) | Address converting device, information processing system, and method of providing service |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20200619 Assignee: Xinhe Technology (Guangzhou) Co.,Ltd. Assignor: GUANGZHOU V-SOLUTION TELECOMMUNICATION TECHNOLOGY CO.,LTD. Contract record no.: X2022990000628 Denomination of invention: A method and system for simultaneously supporting multiple NAT types to take effect Granted publication date: 20220311 License type: Common License Record date: 20220914 |
|
EE01 | Entry into force of recordation of patent licensing contract |