WO2015066840A1 - 一种网络地址转换设备及方法 - Google Patents
一种网络地址转换设备及方法 Download PDFInfo
- Publication number
- WO2015066840A1 WO2015066840A1 PCT/CN2013/086560 CN2013086560W WO2015066840A1 WO 2015066840 A1 WO2015066840 A1 WO 2015066840A1 CN 2013086560 W CN2013086560 W CN 2013086560W WO 2015066840 A1 WO2015066840 A1 WO 2015066840A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cpu
- packet
- port
- network address
- port resources
- Prior art date
Links
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/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
- 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
Definitions
- the present invention relates to the field of Internet technologies, and in particular, to an apparatus and method for network address translation (NAT). Background technique
- IPv6 Internet Protocol version 6, Internet Protocol version 6
- IPv6 Internet Protocol version 6, Internet Protocol version 6
- IPv4 network since the network using IPv4 (hereinafter referred to as IPv4 network) has been very mature, the IPv4 network is so large that it takes a long time to gradually transition from the IPv4 network to the IPv6 network (using the IPv6 network). During the long transition from IPv4 networks to IPv6 networks, Network Address Translation (NAT) technology will continue to be widely used.
- NAT technology belongs to the access wide area network (WAN) technology. It is a conversion technology that converts private addresses into public network (publ ic) IP addresses. It is widely used in various Internet access methods. .
- NAT Unlike ordinary home or enterprise-class NAT, carriers have more customers, so they have high requirements for NAT performance, operability, and manageability.
- Carrier Grade Network Address Translation (BP CGNAT) technology is a transitional scheme widely adopted by various operators.
- CGN was also known as LSN (Large Scale NAT), and its essence is NAT. Since operators face many customers, most of them can be calculated in units of hundreds of millions. Therefore, the amount of network address conversion required for CGN equipment is also large.
- LSN Large Scale NAT
- CGN needs to be able to guarantee the normal use of existing terminals or services, and at the same time achieve true IPv6 response. Use, and meet the needs of the business in terms of performance, operational level, and manageability. Summary of the invention
- the present invention provides a device and method for network address translation, which respectively sends the port resources managed by the network address translation device to the CPU of each service board, and the CPU of the service board is responsible for managing the port resources. Allocating, and each port resource is managed by a single CPU.
- the CPU of the service board that manages the port resources allocates port resources to the CPU of the service board that receives the packet.
- the CPU of the service board participates in network address translation, which fully utilizes the advantages of the distributed system and improves the allocation efficiency and utilization of port resources.
- an embodiment of the present invention provides a device for implementing network address translation, where the device includes: a control board (11), a service board, and an interface board (15), where the service board includes multiple a central processing unit (CPU), wherein a port resource of the device is allocated to a plurality of CPUs of the service board for management and allocation; and the interface board (15) is configured to receive a user premises equipment (301) Transmitting the first packet of the first session, and forwarding the first packet to the first CPU of the service board; the first CPU is configured to determine, according to the NAT policy, that the second CPU is responsible for managing the Transmitting a port resource required for network address translation; obtaining N port resources from the second CPU; and performing network address translation on the first packet by using the first port resource from the N port resources The converted message is sent to the interface board (15); the interface board (15) is further configured to send the received converted message to the external network.
- the interface board includes multiple a central processing unit (CPU), wherein a port resource of the device is allocated to a pluralit
- the device further includes: a control board, configured to: broadcast a port resource to multiple CPUs of the service board; or broadcast a port allocation policy to the service board a plurality of CPUs, wherein the port allocation policy allocates port resources of the device to a plurality of CPUs of the service board, and each of the CPUs is responsible for managing allocated port resources.
- a control board configured to: broadcast a port resource to multiple CPUs of the service board; or broadcast a port allocation policy to the service board a plurality of CPUs, wherein the port allocation policy allocates port resources of the device to a plurality of CPUs of the service board, and each of the CPUs is responsible for managing allocated port resources.
- the device further includes: the interface board (15) is further configured to: forward the first packet according to a source IP address of the first packet The first CPU of the service board.
- the device further includes: when the first CPU receives the second packet of the session in which the first packet is located, the first CPU is further configured to save according to the saved The session table processes the second packet, where the session table is established after the first packet completes network address translation.
- the device further includes: when the first CPU receives the third message of the second session sent by the user premises equipment (301), where the second session is A new session is different from the first session, and the first CPU is further configured to perform network address translation on the third packet by selecting a second port resource from the N port resources.
- the device further includes: the network address translation policy is used to determine corresponding port resource information according to characteristics of the received packet
- the device further includes: the first CPU is configured to receive a fourth packet, and determine, according to the NAT policy, that the first CPU is responsible for managing the fourth packet to perform network Port resources required for address translation; allocating M port resources for the user premises equipment that sends the fourth packet from the port resource pool managed by the first CPU; using the first port resource pair of the M port resources The fourth message is described for network address translation.
- the device further includes: the first CPU is further configured to store a usage status of the M port resources, and periodically update a usage status of the M port resources.
- the device further includes: the second CPU is further configured to store a usage state of the N port resources, and send the usage status of the N port resources to the The first CPU is further configured to periodically update the usage status of the N port resources, and send the updated usage status to the second CPU.
- an embodiment of the present invention provides a network address translation method, where the device for implementing the network address translation method includes a control board (11), an interface board (15), and a service board with multiple CPUs.
- the port resource of the device is allocated to the plurality of CPUs of the service board for management and allocation; the first CPU of the service board receives the first session sent by the user premises equipment (301) forwarded by the interface board (15) a first packet; determining, according to the network address translation policy, a port resource required by the second CPU to manage the first packet for network address translation; obtaining N port resources from the second CPU; and using the N ports
- the first port resource in the resource performs network address translation on the first packet to obtain a converted packet; the converted packet is sent to the interface board (15); the interface board (15) The converted message is sent to an external network.
- the network address translation method further includes: the control board (11) broadcasting the port resource to multiple CPUs of the service board; or The control board (11) broadcasts a port allocation policy to a plurality of CPUs of the service board, wherein the port allocation policy is used to port resources of the device A plurality of CPUs allocated to the service board, each of which is responsible for managing allocated port resources.
- the network address translation method further includes: the interface board (15) assigning the first packet to the first packet according to the source IP address of the first packet The first CPU of the service board.
- the network address translation method further includes: when the first CPU receives the second packet that belongs to the session where the first packet is located, The CPU processes the second packet according to the saved session table, where the session table is established after the first packet completes network address translation.
- the network address translation method further includes: when the first CPU receives the third packet of the second session sent by the user premises equipment (301) The second session is a new session different from the first session, and the first CPU performs network address translation on the third packet by using a second port resource of the N port resources.
- the network address translation method further includes: determining, by the network address translation policy, a corresponding port resource according to a characteristic of the received packet.
- the network address translation method further includes: the first CPU receiving the fourth packet; determining, according to the network address translation policy, that the first CPU is responsible for managing the location Port resources required for network address translation in the fourth packet; allocating M port resources for the user premises equipment that sends the fourth packet from the port resources managed by the first CPU; using M port resources The first port resource performs network address translation on the fourth packet.
- the network address translation method further includes: the first CPU saves a usage status of the M port resources, and periodically updates the use of the M port resources. status.
- the network address translation method further includes: the second CPU storing a usage status of the N port resources, and using the N port resources Sending to the first CPU; the first CPU periodically updates the usage status of the N port resources, and sends the updated usage status to the second CPU.
- the port resources managed by the network address translation device are respectively sent to the CPUs of the service boards, and the CPU of the service board is responsible for managing and allocating port resources, and each port resource is solely used by one CPU.
- the CPU of the service board that manages the port resources allocates port resources to the CPU of the service board that receives the packets.
- the CPUs of multiple service boards participate in network address translation. In this way, the CPU of the service board manages the port resources of the network address translation device, thereby preventing the control board from becoming a bottleneck of port resource allocation, fully utilizing the advantages of the distributed system, and improving the allocation efficiency and utilization rate of the port resources.
- FIG. 1 is a schematic diagram of an application scenario of a carrier-level network address translation service application
- FIG. 2 is a schematic structural diagram of a carrier-level network address translation device
- FIG. 3 is a schematic flowchart of an existing carrier-class network address translation method
- FIG. 4 is a schematic diagram of signals of network address translation in an embodiment of the present invention.
- FIG. 5 is a schematic flowchart of a method for network address translation according to an embodiment of the present invention.
- Carrier Grade Network Address Translation (CGN) technology is a transitional scheme widely adopted by various operators for IPv4-IPv6. Its essence is network address translation equipment.
- CGN solutions such as: DS-Lite (Dual-Stack Lite), NAT444 (Double-layer NAT44 technology, address network address translation technology for double-layer IPv4 private address to IPv4 public address) , PNAT (Prefix Based NAT, host-based IPv6 transition network address translation technology), NAT64 (network address translation technology between IPv6 and IPv4).
- the CGN solution is mainly applied to the network transition of the metropolitan area network. For the application scenario, please refer to Figure 1.
- the terminal user User (401) is connected to the Customer Presidial Equipment (CPE) (301), and the CPE (301) is used as the egress gateway of the terminal user (401).
- the Broadband Remote Access Service (Broadband Remote Access Service) BRAS) (2) After dialing the line, forward the message to the CGN device (1).
- the CGN device (1) allocates port resources for each CPE, implements carrier-class NAT conversion, and sends the converted packets to the external network (5).
- the CPE (301) encapsulates the packet sent by the end user (401) in the IPv4-in-IPv6 tunnel packet with the IP address (CPE-IP) of the CPE device as the source IP address. , sent to the CGN device (1).
- the CPE (301) converts the source IP address of the packet sent by the end user (401) to CPE-IP and sends it to the CGN device.
- the source IP address of the packets is the IP address of the CPE, and the CGN device (1) can The packets sent by different CPEs are distinguished and identified by the source IP address of the packets.
- Other implementations of the CGN are similar in the implementation of the port allocation scheme and the NAT function. Therefore, the present application mainly introduces the DS-Lite and NAT444 solutions, and similar implementations of other solutions are not separately described.
- CGN provides port-port technology and semi-dynamic technology.
- the port pre-allocation technology means that the carrier-level network address translation device (CGN device) pre-allocates port resources for each CPE, and all the packets sent by the terminal users connected to the CPE use the allocated port resources for network address translation. .
- CGN device carrier-level network address translation device
- the CPE can be additionally allocated new port resources by incremental allocation.
- the CGN device (1) is generally installed at a network interface such as a local area network or a metropolitan area network.
- the CGN device (1) can be a stand-alone device, or can be integrated into a firewall device, or can be integrated into a router device. Determined according to business needs.
- the packets sent by the end user are sent to the CGN device through the CPE.
- the CGN device performs network address translation and sends it to the external network to obtain the required service or information.
- the structure of the CGN device is as shown in FIG. 2, and includes a main processing unit (MPU, also referred to as a main control board) (11), a service processing unit (SPU), and an interface board. (line processing unit, LPU for short) (15).
- MPU main processing unit
- SPU service processing unit
- LPU interface board
- the mutual positional relationship between the boards shown in Fig. 2 is only an illustrative description, indicating the connection relationship between each other, the number of various boards in the CGN equipment produced by different manufacturers, and the specific installation. The location will be different, only the board that can achieve similar functions.
- the CGN device also includes components such as a switching network board, a power supply, a fan, and the like, which are similar to the prior art and will not be described in detail herein.
- network address translation is integrated into other devices, such as integrating network address translation into a firewall or router
- the functions of the control board, business board, and interface board can be implemented by components with similar functions.
- components such as power supplies and fans are also set according to the conditions of other integrated devices. It will not be explained here. In the embodiment of the present invention, the description will be made with a separate CGN device.
- control board (11) is responsible for managing the CGN device (1), in particular, the allocation and use of the NAT address pool and port resources owned by the CGN device.
- the NAT address pool is a collection of public network IP addresses that can be used by the CGN device for network address translation.
- the port resource refers to a set of public network IP addresses and corresponding port number segments that can be used for network address translation.
- the service board is connected to the control board (11) and is responsible for processing the message.
- a CGN device usually has multiple service boards to meet the requirements of processing a large number of packets. Multiple service boards are connected to the control board (11), and each service board is also connected to each other. Between the service board and the control board (11) The connection and the connection between the business boards are the same as the existing connections.
- Each business board can include a single CPU or multiple CPUs. For operators, because of the large amount of traffic that needs to be processed, the service board mostly contains multiple CPUs. The function of performing network address translation on packets is implemented by the CPU in the service board.
- the interface board (15) is connected to the control board (11) and the service board, and the connection mode is the same as the existing connection mode.
- the interface board (15) distributes the received packet sent by the terminal user (401) to the service board according to the pre-configured policy, and the service board processes the packet, and then sends the processed packet to the interface board.
- the interface board (15) sends the processed packet of the service board to the external network.
- the function of receiving the packet and sending the packet on the interface board can be separated by one interface board to receive the packet sent by the terminal user.
- the other interface board is responsible for sending the packet processed by the service board to the public network.
- FIG. 3 is a schematic diagram showing the network address translation of the message by the existing CGN device.
- ?51 (301) transmits the message sent by the end user 11 ⁇ 1 ⁇ 1 (401) to the CGN device (1) through 81 ⁇ 5(2); the interface of the CGN device (1)
- the board After receiving the packet sent by the CPEU 301), the board (15) forwards the packet to the corresponding service board according to a predetermined policy. For example, the packet is forwarded to the corresponding service board, such as SPU1, according to the source IP address of the packet.
- the CPU of the service board (for example, CPU0 (1311) of SPU1 (131)), when receiving the first packet of the first session sent by CPE1 (301), applies N port resources to the control board (11), and A port resource is taken out from the N port resources for the first packet of the first session to perform network address translation, and the session state of the first session is saved, that is, the session table.
- the packet received by the CPU0 (1311) of the SPUU 131 is the subsequent packet of the first session, the subsequent packet of the first session is forwarded according to the session table.
- This technology has been used by those skilled in the art. Well known, not detailed here.
- a port resource is taken from the remaining port resources for the first message of the new session.
- the first packet of the second session is subjected to network address translation, and the session state of the second session is saved, that is, the session table; when the CPU0 (1311) of the SPUU 131) receives the subsequent packet of the second session The packet is forwarded according to the saved session table of the second session.
- the port resources are managed by the control board (11).
- the CPU of each service board needs to apply for port resources to the control board to use for network address translation for the new session.
- the control board (11) is the only way for each CPU of each service board to obtain port resources.
- it is also the bottleneck of the performance of each CPU of each service board to obtain port resources, and the advantages of the distributed system cannot be exploited.
- the CPU of the service board can also apply to the control board (11) to directly allocate the N port resources to the CPE that sends the packet.
- the CPU of the service board goes to the control board (11).
- New application for M port resources or, after the CPU of the service board applies for the N port resources to the control board (11), the M port resources are divided into the CPEs that send the packets from the N port resources; when the other CPE session packets are received, The CPU of the service board allocates Q port resources from the remaining NM port resources to the newly accessed CPE.
- the way of these two port resources will face the bottleneck of port resource allocation of the control board and the secondary allocation and management of port resources.
- M, N, and P are an integer and do not represent a specific number.
- the control board divides the port resources into CPUs of each service board, thus preventing the control board from becoming a bottleneck for resource allocation and management.
- the CPU of each service board When receiving the packet of the newly created session, the CPU of each service board directly obtains the port from the port resources allocated by the CPU and performs network address translation.
- the CPU of each service board can only use the allocated NAT port resources to allocate port resources for the sessions sent by the CPE. When the remaining port resources of the CPU are insufficient, the CPU can only wait for the port resources to be released before processing.
- the present invention provides a device and a method for port resource allocation and network address translation, which can solve the problem that the control board is a bottleneck for port resource allocation, and can solve the problem of port resource management and allocation conflict between CPUs of multiple service boards. Improve port utilization and take advantage of distributed systems.
- the port resource is mapped to the CPU of each service board, and the CPU of the service board manages the port resource, and each port resource is separately managed by the mapped CPU.
- the port resources are managed and allocated by the CPU of the service board, which avoids the problem that the control board becomes a bottleneck for port resource allocation and management; and each port resource is separately managed by the mapped CPU, and the port in the distributed system is solved.
- multiple CPUs participate together, which improves port utilization and gives full play to the architecture and performance advantages of distributed systems. .
- the CGN device includes a control board (11), a service board, and an interface board (15), as shown in FIG.
- the components of the switching stencil, power supply, fan, etc. are the same as the existing implementations (not shown in the figure) and will not be described in detail here.
- the firewall or the router integrated with the CGN function implements the carrier-level network address translation by referring to the solution mentioned in the text by the components having the same function, which is not described in the embodiment of the present invention.
- the control board (11) includes a CPU (1101) and a memory (1103).
- the CPU (1101) in the control board (11) is configured to manage all resources and information of the CGN device and the CGN, and allocate the port resources to the CPUs of the respective service boards according to the port allocation policy; the memory (1103) is used to store the CGNs.
- the set of public network IP addresses managed by the CGN device that can be used for network address translation constitutes a NAT address pool.
- the port resource refers to a set of respective public network IP addresses and corresponding port number segments that can be used for network address translation.
- the business board includes a CPU and a memory.
- the CPU in the service board is used to process received packets, including port resource allocation, network address translation, and so on.
- the memory is used to store user tables and session tables.
- the user table includes port resources and Information such as a correspondence between the user premises equipment, and the session table includes information such as a session state.
- the user table and the session table can be implemented in the prior art, and will not be described in detail in this embodiment.
- the interface board (15) includes a CPU (1503), a receiver (1501), and a transmitter (1505).
- the receiver (1501) is configured to receive the packet sent by the CPE, and send the packet to the CPU of the interface board.
- the CPU of the interface board distributes the packet to the CPU of the service board according to certain rules. For example, the CPU of the interface board distributes the packet to the CPU of the service board according to the source IP address of the received packet.
- the sender (1505) is configured to receive the message sent by the CPU of the service board and send the message to the external network.
- the function of receiving the packet and the function of sending the packet can be performed by the two interface boards respectively according to the needs of the traffic. That is, the CGN device can include two interface boards, one of which includes a CPU and a receiver, and the other of which includes a CPU and a transmitter.
- the public network IP address owned by the CGN device for network address translation constitutes a NAT address pool and is stored in the memory (1103) of the control board (11).
- the public network IP address of the CGN device can be configured as a NAT address pool or a plurality of NAT address pools. In the embodiment of the present invention, a NAT address pool is taken as an example for description.
- Each public network IP address corresponds to an available port number segment, for example, port 2049-65535, which is also stored in the memory (1103) of the control board (11), and the public IP addresses and corresponding addresses that can be used for network address translation
- the port number segment constitutes a port resource.
- the CPU (1101) of the control board (11) maps the port resources to the CPUs of the service boards according to the port allocation policy, and stores the correspondence between the port resources and the CPUs in the service board in the memory.
- the port allocation policy is an algorithm that allocates the port resources of the CGN device to the CPU of the service board.
- the CPU of the service board is responsible for managing the allocated port resources.
- the control board can run the algorithm to map the port resources to the CPU of the service board, and then broadcast the port resources to the CPU of the service board.
- the control board can also broadcast the port allocation policy to the CPU of the service board.
- the CPU of the service board is allocated through the running port.
- the policy gets the port resource responsible for management. In this way, the management and allocation of the port resources are transferred from the control board to the CPU of the service board, and the CPU of the service board independently manages the allocated port resources.
- the NAT address pool managed by the CGN device has N public network IP addresses that can be used for network address translation, and each public network IP address has a port number that can be used.
- the CGN device uses a fixed algorithm to map port resources to the CPUs of each service board, and then broadcasts the port resources to the CPU of the corresponding service board.
- the specific port allocation policy can be set according to the performance parameters of the CGN device and the actual needs of the operator.
- the port allocation policy can contain several parameters as shown in Table 1. The parameters in Table 1 are only examples. The program is not limited. In actual use, the parameters and the values of the parameters can be modified as needed.
- Public network IP address ID Public network IP address SPU number CPU number Port block Port allocation granularity
- the first set of parameters indicates: The port resources of the 199th public IP address (10. 10. 2. 0) are divided into 256 ports as one block and allocated to CPU0 of SPU1.
- CPU0 of SPU1 is the CPU responsible for managing the port resources corresponding to the 199th public network IP address.
- the second set of parameters indicates: The port resource of the 200th public network IP address ( 10. 10. 2. 1 ) is divided into 256 ports as one block and allocated to CPU2 of SPU0, that is, CPU2 of SPU0 is responsible for management.
- the CPU of the port resource of the 200th public network IP address Due to the large number, they cannot be listed one by one in the table. The unlisted parameters are indicated by an ellipsis defined.
- each port resource is managed independently by a CPU, avoiding port allocation conflicts.
- the first CPU searches for the NAT policy, first.
- the CPU determines the ID number of the public network IP address that needs to perform network address translation according to the characteristics of the received packet, performs HASH calculation on the ID number of the public network IP address, and obtains a CPU that manages the port resource that needs to perform network address translation.
- the characteristics of the packet may be one or more of the ACL information of the packet, the source IP address, the destination IP address, the source port, the destination port, and the quintuple information such as the protocol type and the NAT type.
- the method for determining the IP address for network address translation according to the characteristics of the packet is similar to the existing implementation, and will not be described in detail herein.
- the second CPU is not the same CPU as the first CPU, that is, the CPU of the service board that receives the packet is different from the CPU of the service board that manages the port resource, the first CPU will use the first report.
- the text is sent to the second CPU, ie receiving The CPU of the service board of the packet sends the first packet to the CPU of the service board that manages the port resource.
- the first CPU and the second CPU may be located on the same service board or on different service boards. There is no impact on the implementation of the technical solution in the embodiment of the present invention.
- the second CPU After receiving the first packet, the second CPU allocates N ports to the CPE that sends the first packet from the managed port resource, and saves the usage status of the N port resources, for example, The usage status of the allocated N port resources and the relationship with the corresponding CPE are saved in the user table. The second CPU sends the first packet and the allocated N ports to the first CPU.
- the first CPU After receiving the first packet and the N port resources sent by the second CPU, the first CPU selects one port resource from the N port resources to perform network address translation on the first packet.
- the usage status of the N port resources is saved, for example, the usage status of the allocated N port resources and the relationship between the used CPEs are saved in the user table, and the user table is periodically updated. Other information in the user table is similar to that in the prior art implementation and will not be described here.
- the first CPU sends the first packet that has completed the network address translation to the interface board, and the first packet that has completed the network address translation is sent by the interface board to the external network. To ensure that N ports are not reclaimed by the second CPU, the first CPU periodically updates the usage status of the N port resources and sends a refresh message to the second CPU.
- the first CPU does not refresh the usage status of the N port resources, and does not send a refresh message to the second CPU, and the N port resources on the second CPU Usage Status If no refresh message is received within the set time range, the N port resources are released for reallocation.
- the first CPU manages the port resources from the management. Allocating N ports for the user premises equipment that sends the first packet, and selecting a port resource from the N port resources, performing network address translation on the first packet, and using the allocated N port resources.
- the usage status and the relationship with the corresponding CPE are saved to the user table and the stored user table is updated. Other information in the user table is similar to that in the prior art implementation and will not be described here.
- the first CPU sends the first packet that has completed the network address translation to the interface board, and the interface board sends the first packet that has completed the network address translation to the network.
- the new port resources can be newly applied for network address translation by using the method described above, and will not be described in detail herein.
- a port resource is managed by a unique CPU, which solves the complicated port resource allocation and management in the prior art.
- the problem In addition, the CPUs of multiple service boards participate in the complete process of network address translation, and when the port resources are no longer used, they can be released for reuse. This can fully utilize the advantages of distributed systems and improve the utilization of port resources. .
- the first CPU sends the second packet according to the stored session table when the packet sent by the interface board received by the CPU (the first CPU) is a subsequent packet of the session (the second packet). If the processing is performed, refer to the processing mode of the subsequent session of the same session in the existing mode, and details are not described here.
- the first CPU is allocated from the first CPU.
- the second port resource is selected from the N port resources to perform network address translation on the third packet. That is, from among the allocated port resources, except for the port resources (that is, N-1 port resources) that have been allocated to the first packet, the port resource is selected to perform network on the third packet. Address translation.
- the subsequent processing is similar to the first packet and will not be described here.
- the first CPU no longer needs to forward the packet to the second CPU, and directly selects unused port resources from the already allocated port resources for network address translation, thereby fully utilizing the advantages of the distributed system.
- the number of end users connected to one CPE may be many, and the allocated N ports may not be used enough.
- the M port resources may be re-applied, and the application method and the foregoing N The method of port resources is the same.
- the embodiments provided by the present invention solve the problems of the bottleneck of the port resource management and allocation, the complicated port resource allocation and management problem, and the low utilization of the port resources in the prior art, and fully utilize the distributed system. Advantages, improve the utilization efficiency of port resources.
- the method flow of the network address translation provided by the embodiment of the present invention is as shown in FIG. 4 and FIG. 5.
- Step 1 The CPU (1101) of the CGN device control board (11) maps the port resources owned by the CGN device (1) to the CPU of the service board.
- the public network IP address of the CGN device is used to form a NAT address pool.
- the public IP address of the CGN device can be used to form a NAT address pool, or can be divided into multiple NAT address pools.
- a NAT address pool is used as an example for description.
- Each IP address corresponds to a segment of the port number used to perform network address translation.
- the public network IP address used for network address translation and the corresponding port number segment constitute a port resource that can be used for network address translation.
- the CPU (l lOl) of the control board (11) maps the port resources to the CPUs of the service boards according to the port allocation policy, and the CPU of the service board manages and allocates the allocated port resources.
- the control board (11) can run the port allocation algorithm to map the port resources to the CPU of the service board, and then broadcast the port resources to the CPU of the service board; the control board (11) can also broadcast the port allocation policy to the CPU of the service board.
- the CPU of the service board obtains the port resources to be managed by running the port allocation policy.
- the CGN device has N public network IP addresses that can be used for network address translation.
- the available port resources corresponding to each public network IP address are 2049-65535, which are stored in the memory (1103) of the control board (11).
- Control Board (l l) The CPU (1101) of the MPU maps port resources to the CPUs on the service board SPU.
- a public network IP address of a CGN device that can be used for network address translation is 10. 10. 2.
- its corresponding port resource is 2049-65535.
- the CPU of the control board (11) maps the port resource to SPU1 ( CPU0 (1311) management of 131), that is, CPU0 (1311) of SPU1 (131) is responsible for management and allocation of port resources of this public network IP address.
- the mapping relationship between the port resources and each service board SPU and each CPU is stored in the memory (1103) of the MPU (11).
- the port assignment strategy has been given specific examples in the foregoing, and is described in detail here.
- each port resource is managed independently by the CPU of the mapped service board.
- a port resource is managed by only one CPU, which avoids port allocation conflicts.
- multiple CPUs of the service board participate in the management and allocation of port resources, making full use of distributed The architectural advantages of the system.
- Step 2 After receiving the packet sent by the CPE, the interface board (15) sends the packet to the CPU of the service board.
- the interface board (15) offloads the received packet to the CPU of the corresponding service board according to the source IP address of the packet. Therefore, all packets with the same source IP address are offloaded to the same CPU on the same service board.
- the source IP address of the packet is the IP address of the CPE, that is, the CPE-IP. Therefore, packets sent by all end users connected to the same CPE are offloaded to the same service board.
- the same CPU processing The processing of the message sent by the CPE to the received terminal user has been mentioned before, and will not be further described here.
- the CPU allocated to the service board according to the source IP address of the packet is well known to those skilled in the art and will not be described in detail herein.
- the receiver (1501) on the interface board LPU (15) receives the message sent by the CPE1 and sends it to the CPU (1503) of the interface board (15).
- the CPU (1503) of the interface board (15) divides the packet to CPU0 (1311) of SPU1 (131) according to the source IP address of the packet.
- the source IP address of the packet This is the IP address of CPE1, so these messages will still be offloaded to CPU0 (1311) on SPU1 (131).
- the receiver (1501) of the interface board LPU (15) receives the packet sent by the CPE2, the CPU of the interface board diverts the packet according to the source IP address of the packet after being sent to the CPU of the interface board. Give CPUU1313 on SPUU131).
- the message sent by CPE2 is not shown in Figure 5. Since the source IP address of the packet sent by the CPE2 is the IP address of the CPE2, the new packet or the new session sent by the CPE2 is also offloaded to the CPU1 on the IJSPU1 (131) (1313). That is to say, packets sent by all terminals in the same CPE are offloaded to the same CPU on the same service board.
- Step 3 The CPU of the service board processes the received packet.
- the CPU that receives the packet that is offloaded by the interface board is referred to as the first CPU.
- the first CPU searches for the NAT policy, and obtains the network address according to the characteristics of the first packet.
- the ID number of the converted public network IP address is hashed to the ID number of the public network IP address, and the CPU (second CPU) responsible for managing the port resource that needs to perform network address translation is obtained.
- the characteristics of the packet may include the ACL information of the packet, the source IP address, the destination IP address, the source port, the destination port, and the quintuple information such as the protocol, and one or more of the NAT type information. .
- the method for determining the IP address for performing network address translation according to the characteristics of the packet is similar to the existing implementation manner, and will not be described in detail herein.
- the first CPU and the second CPU may be located on the same service board or on different service boards.
- the NAT policy may be pre-written and saved in the memory (1103) of the control board (11).
- the first CPU reads the NAT policy to the memory (1103) of the control board (11).
- the NAT policy may be pre-written and saved in the memory of each service board.
- the first CPU reads the NAT policy to the memory of the service board where the first CPU obtains the network address translation.
- the ID number of the network IP address is hashed to the ID number of the public network IP address, and the CPU number corresponding to the port resource is obtained.
- step 4 If the calculated second CPU is the same CPU as the first CPU, then go to step 4 to continue processing. If the calculated second CPU is not the same CPU as the first CPU, then go to step 5 to continue processing.
- the CPU0 (1311) module ie, the first CPU of the service board SPUU 131
- receives the message of the CPE1 sent by the interface board LPU (15) if the received message is sent by the CPE1.
- the first packet of a session the CPU0 ( 1311) of the service board SPU1 (131) obtains the ID of the public IP address for network address translation based on the ACL information of the packet. The number is 199, and the ID of the IP address is hashed, and the CPU 2 (1353) (ie, the second CPU) whose CPU that manages the port resource is SPU0 (135) is obtained.
- the second CPU is not the same CPU as the first CPU, and then proceeds to step 5 to continue processing.
- Step 4 If the second CPU is the same CPU as the first CPU, the first CPU allocates N port resources for the user premises equipment that sends the first message, and continues to perform step 8.
- the CPU is configured to allocate N port resources for the user premises equipment that sends the first packet.
- the first CPU further saves the usage status of the N port resources, for example, records the usage status of the allocated N port resources and the correspondence relationship with the corresponding CPE in the form of a user table, where the user table is stored.
- the memory of the service board where the first CPU is located In the memory of the service board where the first CPU is located.
- Step 5 If the calculated second CPU is not the same CPU as the first CPU, the first CPU forwards the first packet to the second CPU.
- the CPU of the service board that manages the port resource If the CPU (second CPU) of the service board that manages the port resource is not the same CPU as the CPU (the first CPU) of the service board that receives the packet, the CPU of the service board that receives the packet forwards the received packet to the The CPU of the service board that manages port resources.
- CPU0 (1311) of SPU1 (131) forwards the received first message sent by CPE1 to CPU2 (1353) of SPU0 (135).
- Step 6 The second CPU allocates N port resources to the CPE that sends the first packet.
- CPU2 (1353) of SPU0 (135) allocates N port resources to CPE1 that sends the first packet.
- Step 7 the second CPU sends the allocated N port resources and the first packet to the first CPU.
- CPU 2 (1353) of SPU0 (135) transmits N port resources and the first message to CPU0 (1311) of SPU1 (131).
- Step 8 The first CPU selects one port resource from the allocated N port resources to perform network address translation on the first packet.
- the first CPU selects one port resource from the received N port resources allocated by the second CPU to perform network address translation on the first packet.
- the first CPU saves the usage status of the N port resources, and saves the session state of the session where the first packet is located, and the remaining N-1 ports are used by the CPE for subsequent new sessions. Used when the message is NAT translated.
- CPU0 (1311) of SPU1 selects the first packet of the first session sent by CPE1 from one of the N port resources allocated by CPU2 (1353) of SPU0 (135). Perform NAT conversion.
- the first CPU saves the usage status of the N port resources, and periodically updates.
- Step 9 The first packet sent by the first CPU to the network address is sent to the external network through the interface board.
- the CPU0 (1311) module of SPU1 (131) transmits the first packet after network address translation to the external network through the interface board (15).
- the control board transfers management and allocation of port resources to the CPU of the service board for management and allocation, and a certain port resource is managed by a single CPU, thereby avoiding the control board becoming a port resource allocation.
- multiple CPUs of the service board participate together, which can solve the problem of management and allocation conflict of distributed system port resources, and can improve port utilization.
- the first CPU allocates N port resources to the CPE that sends the first packet, save the N.
- the usage status of the port resources for example, records the usage status of the N port resources and the corresponding relationship with the corresponding CPE in the form of a user table, and periodically updates the user table.
- the first CPU releases the N port resources for re-allocation.
- the second CPU saves the usage status of the N port resources, for example, in the form of a user table.
- the usage status of the allocated N port resources and the correspondence relationship with the corresponding CPE are recorded, and the user table is sent to the first CPU.
- the first CPU saves the usage status of the N port resources after receiving the first packet sent by the second CPU and the N ports allocated for the CPE that sends the first packet.
- the usage state of the N port resources and the correspondence relationship with the CPE that sends the first packet are saved, and the user table is periodically updated; and the refresh message is periodically sent to the second CPU to avoid The N ports are reclaimed for recycling.
- the second CPU releases the N port resources for re-allocation.
- the first CPU sends the subsequent packet to the network according to the saved session table.
- the transmission of the message according to the session table is a technique well known to those skilled in the art and is not the focus of the present invention and will not be described in detail herein.
- the first CPU extracts a port resource from the allocated N-1 port resources to create a new session.
- the first packet carries the network address translation, and the first packet of the new session after the network address translation is sent to the external network through the interface board.
- a port resource is selected to perform network on the third packet. Address translation. In this way, when the first CPU receives the first packet of the new session sent by the user premises equipment, the first CPU does not need to forward the first packet of the newly created session to the second CPU, thereby saving the service board.
- the first CPU extracts a port resource from the allocated N-1 port resources, performs network address translation on the first packet of the newly created session, updates the stored user table and the session table, and sends a refresh message to the second CPU.
- the memory of the business board refreshes the stored user table.
- the CPU0 (1311) module of the SPUU 131) when the message received by the CPU0 (1311) module of the SPUU 131) is the first message of a new session sent by the CPE 1, the CPU0 (1311) of the SPU1 (131) is from the CPU 2 of the SPU0 (135). (1353) A port resource is taken out from the allocated N-1 port resources to perform network address translation on the first packet of the newly created session, and the first packet of the new session after the network address translation is sent through the interface board. . That is, in addition to the port resources of the first packet that has been allocated to the first packet sent by the CPE1, CPU0 (1311) of the SPUU 131) selects one port from the remaining N-1 port resources. The resource performs network address translation on the first packet of the new session. CPU0 (1311) of SPU1 (131) saves the new session state to the memory of SPU1 and sends a refresh message to the memory of SPU0 to refresh the stored user table.
- the present invention allocates NAT port resources to CPUs of different service boards, and these CPUs are responsible for managing and allocating port resources, thereby avoiding the control board becoming a bottleneck of port resources and avoiding port management conflicts, and fully utilizing the distributed system.
- the N port resources allocated by the second CPU for the CPE are all used, and no remaining port resources are available. It is. Can Refer to the processing mode when the first CPU receives the first message of the first session sent by the CPE.
- the CPU (first CPU) of the service board that receives the packet is not the same CPU as the CPU (the second CPU) of the service board that manages the port resource
- the first packet of the new CPU is forwarded by the first CPU.
- the second CPU allocates M port resources to the user premises equipment that sends the message, and updates the user table stored in the memory of the service board, that is, updates the correspondence between the CPE recorded therein and the allocated port resource.
- the second CPU sends the newly allocated M port resources and the first packet of the new new session to the first CPU, and the first CPU selects one port resource from the received M port resources to the new CPU.
- the first packet of the new session is translated into a network address, and the packet with the network address translation is sent to the external network through the interface board.
- the first CPU updates the stored session state, and periodically sends a refresh message to the second CPU to update the stored user table of the memory of the service board where the second CPU is located, so as to ensure that the corresponding port block resource is not recovered by the second CPU. .
- the first CPU of the service board that receives the message is the same CPU as the CPU (the second CPU) of the service board that manages the port resource
- the first CPU is the user premises equipment that sends the message. Allocating M port resources, updating the user table stored in the memory of the service board, and selecting a port resource from the allocated M port resources to perform network address translation on the first packet of the new new session, and The translated packets are sent to the external network through the interface board.
- the first CPU updates the stored session state and user table. According to the above aspect, the incremental allocation of port resources is achieved.
- the invention transfers the management and allocation of port resources from the control board to the CPU of the service board, and a certain port resource is independently managed by one CPU, thereby avoiding the control board becoming a bottleneck for management and allocation of port resources, and simplifying the port.
- the complexity of resource management and distribution In the process of implementing network address translation, the CPUs of multiple service boards participate in the whole process, and the port resources are dynamically allocated, thus fully utilizing the advantages of the distributed system. And improve the utilization of port resources.
- the method for managing and allocating port resources suggested in the technical solution of the present invention can also be applied to a general network address translation device. As long as the control of the management and allocation of the port resources is transferred from the control board to the service board, it is covered by the technical solution of the present invention.
- the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
- the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is 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 invention.
- 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, which can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
本发明提供了一种网络地址转换的设备及方法,用以解决控制板成为端口资源分配瓶颈以及端口资源利用率低的问题。网络地址转换设备包括控制板、业务板和接口板。业务板包括多个CPU,网络地址转换设备的端口资源分配给业务板的多个CPU进行管理和分配。接口板用于将用户驻地设备发送的第一报文转发给业务板的第一CPU;所述业务板的第一CPU根据NAT策略确定第二CPU负责管理第一报文进行网络地址转换所需的端口资源块,从所述第二CPU获得N个端口资源,从获得的N个端口资源中使用第一端口资源对所述第一报文进行网络地址转换;将网络地址转换后的第一报文发送给接口板;所述接口板将进行网络地址转换后的第一报文发送到外部网络中。端口资源分别由业务板的CPU管理,解决了控制板成为端口资源分配的瓶颈的问题;多个CPU参与了网络地址转换的过程,充分发挥了分布式系统的优势,并且提高了端口资源的利用率。
Description
一种网络地址转换设备及方法
技术领域
本发明涉及互联网技术领域, 尤其涉及一种网络地址转换 (Network Address Translation, NAT) 的设备及方法。 背景技术
因特网 ( internet )使用的 IPv4 ( Internet Protocol version 4, 互联网协议版本 4) 有 32位(4字节)地址, 最多可以允许 2的 32次方数量的电脑联到互联网中。 随着互联网的 迅速发展, 对 IP地址的需求愈来愈大, IPv4地址将被分配殆尽这个问题已无法回避。在这 种需求下, 推出了下一版本的互联网协议, 即 IPv6 ( Internet Protocol version 6, 互 联网协议版本 6)。 IPv6采用 128位地址长度, 几乎可以不受限制地提供 IP地址, 并且在安 全性、 网络管理、移动性以及服务质量等方面有明显的改进, 是下一代互联网络协议采用 的核心标准。
然而, 由于使用 IPv4的网络 (下文简称 IPv4网络) 已发展的非常成熟, IPv4网络非 常庞大, 以至于不得不需要一段很长的时间逐步从 IPv4网络向 IPv6网络 (使用 IPv6的网 络)过渡。在 IPv4网络向 IPv6网络漫长的过渡期间, NAT (Network Address Translation, 网络地址转换) 技术仍将得到广泛使用。 NAT技术属于接入广域网 (WAN,) 技术, 是一种 将私有 (private )地址转化为公网 (publ ic ) IP地址的转换技术, 被广泛应用于各种因 特网 (internet ) 的接入方式中。
与普通家用或企业级的 NAT不同, 对于运营商(Carrier)来讲, 其面对的客户更多, 因此对 NAT的性能、 可运营性和可管理性的要求高。
运营商级网络地址转换 ( Carrier Grade Network Address Translation, BP CGNAT, 简称 CGN)技术是目前各运营商广泛采用的过渡方案。 CGN也曾经被称为 LSN (Large Scale NAT) , 其实质就是 NAT。 由于运营商面对的客户很多, 大多可以以亿为单位来计算, 因此 CGN设备所需要处理的网络地址转换的业务量也很大。在 IPv4网络向 IPv6网络漫长的过 渡期间, CGN需要能够保证现有的终端或业务的正常使用, 同时又能实现真正的 IPv6应
用, 并且在性能、 可运营程度以及可管理程度方面满足业务的需求。 发明内容
有鉴于此,本发明提供了一种网络地址转换的设备及方法,将网络地址转换设备所管 理的端口资源分别发送给各个业务板的 CPU, 由业务板的 CPU来负责对端口资源进行管理 和分配, 并且每个端口资源由一个 CPU来独立管理, 这样在实现网络地址转换的整个过程 中, 管理端口资源的业务板的 CPU会为接收到报文的业务板的 CPU分配端口资源, 多个业 务板的 CPU共同参与实现网络地址转换, 充分发挥了分布式系统的优势, 提高了端口资源 的分配效率和利用率。
为了解决上述问题, 第一方面, 本发明实施例提供了一种实现网络地址转换的设备, 所述设备包括: 控制板(11)、 业务板和接口板(15), 所述业务板包括多个中央处理单元 ( central processing unit, CPU) ,其中所述设备的端口资源分配给所述业务板的多个 CPU进行管理和分配; 所述接口板(15)用于接收用户驻地设备 (301)发送的第一会话的第 一报文, 并将所述第一报文转发给所述业务板的第一 CPU; 所述第一 CPU用于, 根据 NAT策 略确定第二 CPU负责管理所述第一报文进行网络地址转换所需要的端口资源;从所述第二 CPU获得 N个端口资源;从所述 N个端口资源中使用第一端口资源对所述第一报文进行网络 地址转换得到转换后的报文; 将所述转换后的报文发送给所述接口板(15) ; 所述接口板 (15)还用于将接收到的所述转换后的报文发送到外部网络。
结合第一方面, 在第一种可能的实现方式中, 所述设备还包括: 控制板用于: 将端 口资源广播到所述业务板的多个 CPU; 或者将端口分配策略广播到业务板的多个 CPU, 其 中所述端口分配策略将所述设备的端口资源分配给所述业务板的多个 CPU,每个所述 CPU 负责管理所分配的端口资源。
结合第一方面的第二种可能的实现方式中, 所述设备还包括: 所述接口板(15)进一 步用于: 根据所述第一报文的源 IP地址将所述第一报文转发给所述业务板的第一 CPU。
在第三种可能的实现方式中, 所述设备还包括: 当所述第一 CPU接收到所述第一报文 所在会话的第二报文时,所述第一 CPU进一步用于根据保存的会话表对所述第二报文进行 处理,其中所述会话表是在所述第一报文完成网络地址转换后建立的。
在第四种可能的实现方式中, 所述设备还包括: 当所述第一 CPU接收到所述用户驻地 设备 (301)发送的第二会话的第三报文时,其中所述第二会话是与所述第一会话不同的一 个新会话, 所述第一 CPU进一步用于从所述 N个端口资源中选取第二端口资源对所述第三 报文进行网络地址转换。
在第五种可能的实现方式中, 所述设备还包括: 所述网络地址转换策略用于根据接 收到的报文的特性确定对应的端口资源信息
在第六种可能的实现方式中, 所述设备还包括: 所述第一 CPU用于接收第四报文; 根 据所述 NAT策略确定所述第一 CPU负责管理所述第四报文进行网络地址转换所需要的端口 资源; 从第一 CPU所管理的端口资源池中为发送所述第四报文的用户驻地设备分配 M个端 口资源; 使用 M个端口资源中的第一端口资源对所述第四报文进行网络地址转换。
在第七种可能的实现方式中, 所述设备还包括: 所述第一 CPU还用于存储所述 M个端 口资源的使用状态, 并定期更新所述 M个端口资源的使用状态。
在第八种可能的实现方式中, 所述设备还包括: 所述第二 CPU进一步用于存储所述 N 个端口资源的使用状态, 并将所述 N个端口资源的使用状态发送给所述第一 CPU; 所述第 一 CPU进一步用于定期更新所述 N个端口资源的使用状态, 并将所述更新的使用状态发送 给所述第二 CPU。
第二方面, 本发明实施例提供了一种网络地址转换方法, 其中,实现所述网络地址转 换方法的设备包括控制板(11)、接口板(15)和带有多个 CPU的业务板, 所述设备的端口资 源分配给所述业务板的多个 CPU进行管理和分配; 所述业务板的第一 CPU接收所述接口板 (15)转发的用户驻地设备 (301)发送的第一会话的第一报文;根据网络地址转换策略确定 第二 CPU管理所述第一报文进行网络地址转换所需要的端口资源;从所述第二 CPU获得 N个 端口资源;使用所述 N个端口资源中的第一端口资源对所述第一报文进行网络地址转换得 到转换后的报文; 将所述转换后的报文发送给所述接口板(15) ; 所述接口板(15)将所述 转换后的报文发送到外部网络。
结合第二方面, 在第一种可能的实现方式中, 所述网络地址转换方法还包括: 所述 控制板(11)将所述端口资源广播到所述业务板的多个 CPU;或者所述控制板(11)将端口分 配策略广播给所述业务板的多个 CPU,其中所述端口分配策略用于将所述设备的端口资源
分配给所述业务板的多个 CPU, 每个所述 CPU负责管理所分配的端口资源。
结合第二方面的第二种可能的实现方式中, 所述网络地址转换方法还包括, 所述接 口板(15)根据所述第一报文的源 IP地址将所述第一报文分配给所述业务板的所述第一 CPU。
结合第二方面的第三种可能的实现方式中, 所述网络地址转换方法还包括, 当所述 第一 CPU接收到属于所述第一报文所在会话的第二报文时, 所述第一 CPU根据保存的会话 表对所述第二报文进行处理,其中所述会话表是在所述第一报文完成网络地址转换后建 立的。
结合第二方面的第四种可能的实现方式中, 所述网络地址转换方法还包括, 当所述 第一 CPU接收到所述用户驻地设备 (301)发送的第二会话的第三报文时, 其中所述第二会 话是与所述第一会话不同的一个新会话, 所述第一 CPU使用 N个端口资源中的第二端口资 源对所述第三报文进行网络地址转换。
结合第二方面的第五种可能的实现方式中, 所述网络地址转换方法还包括, 所述 网络地址转换策略用于根据接收到的报文的特性确定对应的端口资源。
结合第二方面的第六种可能的实现方式中, 所述网络地址转换方法还包括, 所述第 一 CPU接收第四报文; 根据所述网络地址转换策略确定所述第一 CPU负责管理所述第四报 文进行网络地址转换所需要的端口资源;从第一 CPU所管理的端口资源中为发送所述第四 报文的用户驻地设备分配 M个端口资源; 使用 M个端口资源中的第一端口资源对所述第四 报文进行网络地址转换。
结合第二方面的第七种可能的实现方式中, 所述网络地址转换方法还包括, 所述第 一 CPU保存所述 M个端口资源的使用状态, 并定期更新所述 M个端口资源的使用状态。
结合第二方面的第八种可能的实现方式中, 所述网络地址转换方法还包括, 所述第 二 CPU存储所述 N个端口资源的使用状态,并将所述 N个端口资源的使用状态发送给所述第 一 CPU; 所述第一 CPU定期更新所述 N个端口资源的使用状态, 并将所述更新的使用状态发 送给所述第二 CPU。
本发明实施例通过把网络地址转换设备所管理的端口资源分别发送给各个业务板的 CPU, 由业务板的 CPU来负责对端口资源的管理和分配, 并且每个端口资源由一个 CPU来独
立管理, 在实现网络地址转换的整个过程中, 管理端口资源的业务板的 CPU会为接收到报 文的业务板的 CPU分配端口资源, 多个业务板的 CPU共同参与实现网络地址转换。 这样由 业务板的 CPU来对网络地址转换设备的端口资源进行管理,避免了控制板成为端口资源分 配的瓶颈, 充分发挥了分布式系统的优势, 提高了端口资源的分配效率和利用率。
根据下面参考附图对示例性实施例的详细说明, 本发明的其它特征及方面将变得清 楚。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施例或现有 技术描述中所需要使用的附图作一简单地介绍。 图 1为运营商级网络地址转换业务应用的应用场景示意图;
图 2为运营商级网络地址转换设备的结构示意图;
图 3为已有的运营商级网络地址转换方法的流程示意图;
图 4为本发明实施例中的网络地址转换的信号示意图;
图 5为本发明实施例的网络地址转换的方法流程示意图。
具体实施方式
以下将参考附图详细说明本发明的各种示例性实施例、 特征和方法。
另外, 为了更好的说明本发明, 在下文的具体实施方式中给出了众多的具体细节。 本领域技术人员应当理解, 没有这些具体细节, 本发明同样可以实施。 在另外一些实例 中, 对于大家熟知的方法、手段、 元件和电路未作详细描述, 以便于凸显本发明的主旨。
运营商级网络地址转换 ( Carrier Grade Network Address Translation, 即 CGNAT, 简称 CGN) 技术是目前各运营商广泛采用的 IPv4-IPv6的过渡方案, 其实质为网络地址转 换设备。 CGN解决方案有多种实现方式, 例如: DS-Lite ( Dual-Stack Lite , 双栈精简技 术), NAT444 (双层 NAT44技术, 即双层 IPv4私有地址到 IPv4公有地址的地址网络地址转 换技术), PNAT ( Prefix Based NAT,基于主机的 IPv6过渡网络地址转换技术), NAT64 ( IPv6 与 IPv4之间的网络地址转换技术)。
CGN解决方案主要应用于城域网的网络过渡,其应用场景请参见附图 1。 终端用户 User (401)与用户驻地设备 (Customer Presidial Equipment, 简称 CPE) (301)相连, CPE (301)作为终端用户(401)的出口网关, 通过宽带远程接入服务 (Broadband Remote Access Service, 简称 BRAS) (2)拨号上线后, 转发报文至 CGN设备(1)。 CGN设备(1)为 各 CPE分配端口资源,并实现运营级 NAT转换,并将转换后的报文发送到外部网络 (5)中。
在 DS-Lite解决方案中, CPE (301 )会将终端用户(401 )发来的报文封装在以 CPE设备 的 IP地址 (CPE-IP) 为源 IP的 IPv4-in-IPv6隧道报文中, 发给 CGN设备(1 )。 而在 NAT444 解决方案中, CPE (301 )会将终端用户(401 )发来的报文的源 IP转换为 CPE-IP后,发给 CGN 设备。 因此, 在 DS-Lite和 NAT444解决方案中, 每个 CPE下所有终端用户发起的报文到达 CGN设备(1 )后, 报文的源 IP都是所属 CPE的 IP地址, CGN设备(1 )可以通过报文源 IP区分 和识别不同 CPE发送来的报文。其他的 CGN实现方式在端口分配方案及 NAT功能的实现上类 似, 因此, 在本申请文件中主要是基于 DS-Lite和 NAT444解决方案进行介绍, 其他解决方 案类似的实现方式不再单独进行记述。
为了满足高转发性能以及解决大量 NAT应用带来的用户溯源的难题, CGN提供了端口 预分配 (port-range) 技术和增量分配 ( semi -dynamic) 技术。 端口预分配技术是指, 运营商级网络地址转换设备(简称 CGN设备)为各个 CPE预先分配端口资源, 后续 CPE所连 接的所有终端用户发送的报文均使用已分配的端口资源进行网络地址转换。 随着新建会 话的不断增加, 当 CPE分配到的端口资源不足时, 可以通过增量分配为该 CPE追加分配新 的端口资源。
CGN设备(1 )一般安装在在局域网或者城域网等网络接口处, CGN设备( 1 )可以是一个 独立的设备, 也可以集成在防火墙设备中, 或者可以集成到路由器设备中, 具体设置方 式根据业务需要确定。终端用户发送的报文通过 CPE发送到 CGN设备, 由 CGN设备进行网络 地址转换后发送到外部网络中, 获取所需的服务或信息。
CGN设备的结构如附图 2所示, 包括控制板 (main processing unit,简称 MPU,有的也 称之为主控板) (11), 业务板(service processing unit,简称 SPU), 和接口板 (line processing unit,简称 LPU) ( 15)。 图 2中给出的各板之间的相互位置关系仅为示例性的 说明,表明相互之间的连接关系,不同厂家生产的 CGN设备中各种板的个数以及具体安装
位置会有不同, 只能具有能实现类似功能的板即可。 另外, CGN设备还包括交换网板、 电 源、 风扇等组成部件, 与现有技术类似, 在此不再详述。
如果将网络地址转换功能集成到其他设备中时, 如将网络地址转换功能集成到防火 墙或者路由器中, 控制板、 业务板以及接口板等的功能可以由具备类似功能的元器件来 实现。 相应的, 电源、 风扇等部件也根据集成的其他设备的情况来设置。 在此不再另行 说明。 在本发明实施例中, 以单独的 CGN设备来进行说明。
CGN设备中, 控制板(11)负责对 CGN设备(1)进行管理, 特别是负责该 CGN设备所拥 有的 NAT地址池以及端口资源的分配和使用。所述 NAT地址池为 CGN设备所管理的可用于网 络地址转换的公网 IP地址的集合。 所述端口资源是指可用于网络地址转换的公网 IP地址 及对应的端口号段的集合。
业务板与控制板(11)相连, 负责对报文进行处理。 CGN设备中一般会有多块业务板, 以满足处理大量报文的需求, 多个业务板分别与控制板(11)相连, 各个业务板也互相连 接; 业务板与控制板(11)之间的连接以及各业务板之间的连接与现有连接方式相同。每 个业务板可以包括单个 CPU或者包括多个 CPU。 对于运营商来讲, 由于需要处理的报文业 务量大, 因此, 业务板大都包含多个 CPU。对报文进行网络地址转换的功能, 由业务板中 的 CPU来实现。
接口板(15)与控制板(11)、 业务板相连, 连接方式与现有连接方式相同。 接口板 (15)将接收到的终端用户(401)发送来的报文根据预先配置的策略分流给业务板,业务 板对报文进行处理, 再将处理后的报文发送给接口板(15), 接口板(15)再将业务板处 理后的报文发送到外部网络中去。 接口板接收报文和发送报文的功能可以分开由一个接 口板负责接收终端用户发送来的报文, 由另外一个接口板负责将业务板处理后的报文发 送到公共网络中去。
附图 3给出了已有的 CGN设备对报文进行网络地址转换的示意图。
如附图 3所示, ?51(301)将终端用户11^1~1(401)发送来的报文通过81^5(2)发送 给 CGN设备(1) ; CGN设备(1)的接口板(15)接收到 CPEU301)发送来的报文后, 根据预 定的策略将报文转发给对应的业务板。例如根据报文的源 IP将报文转发给对应的业务板, 如 SPU1。
业务板的 CPU (例如 SPU1(131)的 CPU0(1311) )接收到 CPE1 (301)发送的第一条会话 的第一个报文时, 向控制板(11)申请 N个端口资源, 并从 N个端口资源中取出一个端口资 源供该第一条会话的第一个报文进行网络地址转换,同时保存该第一条会话的会话状态, 即会话表。当 SPUU131)的 CPU0(1311)接收到的报文是该第一条会话的后续报文时,根 据会话表对该第一条会话的后续报文进行转发, 此技术已为本领域技术人员所熟知, 在 此不再详述。
以此类推,当 SPUU131)的 CPU0(1311)接收到 CPEU301)发送的一个新的会话的第 一条报文时, 从剩余的端口资源中取出一个端口资源供该新会话的第一条报文进行端口 转换, 并保存相应的会话状态, 即会话表。 例如, 当 SPUU131)的 CPU0(1311)接收的是 第二条会话的第一个报文时,从除了已为第一条会话所采用的端口外的剩余的 N-1个端口 中取出一个端口供第二条会话的第一个报文进行网络地址转换, 并保存所述第二条会话 的会话状态, 即会话表; 当 SPUU131)的 CPU0(1311)接收到第二条会话的后续报文时, 根据保存的第二条会话的会话表对该报文进行转发。
在该方案中, 端口资源由控制板(11)统一管理, 各业务板的 CPU需要向控制板申请 端口资源来为新建会话做网络地址转换时使用。 此时, 控制板(11)是各业务板的各 CPU 获取端口资源的唯一途径, 同时也是各业务板的各 CPU获取端口资源性能的瓶颈所在,无 法发挥分布式系统的优势。
并且, 当 SPUU131)的 CPU0(1311)接收到的新会话数量增多, 控制板(11)分配的 N 个端口资源被使用完毕时, CPU0(1311)需要再次向控制板(11)申请新的端口资源, 这样 会引起端口资源的二次分配和管理的问题, 增加了端口资源分配的复杂性。
此外, 业务板的 CPU还可以向控制板(11)申请 N个端口资源直接分配给发送报文的 CPE, 当接收到其他的 CPE的报文时, 业务板的 CPU再向控制板(11)新申请 M个端口资源。 或者, 业务板的 CPU向控制板(11)申请 N个端口资源后, 从这 N个端口资源中划分 M个端口 资源给发送报文的 CPE; 当接收到其他的 CPE的会话报文时, 业务板的 CPU再从剩余的 N-M 个端口资源中分配 Q个端口资源分配给新接入的 CPE。 同样的, 这两种端口资源的方式会 面临控制板的端口资源分配的瓶颈以及端口资源二次分配和管理的问题。此处的 M、 N和 P 为一个整数, 不代表具体的数量。
为了克服控制板的瓶颈和端口资源二次分配和管理的问题,还有另外一种实现方法。 控制板将端口资源分块并划分给各业务板的各个 CPU,这样就避免了控制板成为理端口资 源分配和管理的瓶颈。 各业务板的 CPU接收到新建会话的报文时, 直接从该 CPU所划分的 端口资源中获取端口并进行网络地址转换。这种方案中,各业务板的 CPU只能利用所划分 的 NAT端口资源为 CPE发送的会话分配端口资源, 当 CPU的剩余端口资源不足,只能等待释 放出端口资源后再进行处理, 无法发挥分布式系统的优势, 端口利用率低。
本发明提供了一种端口资源分配以及网络地址转换的设备及方法, 既能解决控制板 为端口资源分配的瓶颈的问题,又能解决多业务板 CPU之间端口资源管理和分配冲突的问 题, 提高端口利用率, 充分发挥分布式系统的优势。
本发明实施例提供的解决方案中,将端口资源映射到各个业务板的 CPU上, 由业务板 的 CPU对端口资源进行管理, 并且每个端口资源由所映射的 CPU单独进行管理。 这样端口 资源由业务板的 CPU来管理和分配, 避免了控制板成为端口资源分配和管理的瓶颈的问 题;而且每个端口资源由所映射的 CPU单独进行管理,解决了分布式系统中的端口资源管 理的二次分配和管理的问题; 另外, 在端口资源分配以及网络地址转换的过程中, 有多 个 CPU共同参与, 这样提高了端口利用率, 又充分发挥分布式系统的架构和性能优势。
在本发明实施例中, CGN设备包括控制板(11)、 业务板以及接口板(15), 如附图 2所 示。 交换网板、 电源、 风扇等部件与现有的实现方式相同 (未在图中示出), 在此不再详 述。集成了 CGN功能的防火墙或者路由器由具有相同功能的元器件参照本文中提到的解决 来实现运营商级的网络地址转换, 在本发明实施例中不再另行说明。
控制板(11)包括 CPU (1101)和存储器(1103)。 控制板(11)中的 CPU (1101)用于对 CGN 设备及 CGN的所有资源及信息进行管理,并将端口资源根据端口分配策略分配给各个业务 板的 CPU;存储器(1103)用于存储 CGN设备所能管理的 NAT地址池和端口资源, 以及端口资 源与分配的业务板 CPU之间的对应关系。 CGN设备所管理的可用于网络地址转换的公网 IP 地址的集合组成 NAT地址池。所述端口资源是指可用于网络地址转换的各个公网 IP地址及 对应的端口号段的集合。
业务板包括 CPU和存储器。 业务板中的 CPU用于处理接收到的报文, 包括端口资源分 配、 网络地址转换等。 存储器用于存储用户表和会话表。 所述用户表包含有端口资源和
用户驻地设备之间的对应关系等信息, 所述会话表包含有会话状态等信息。 用户表及会 话表可以利用本领域中已有的实现方式, 在本实施例中不再详述。
接口板(15)包括 CPU (1503)、接收器(1501)和发送器(1505)。接收器(1501)用于接收 CPE发送来的报文,并将报文发送给接口板的 CPU。接口板的 CPU根据一定的规则把报文分 发给业务板的 CPU, 例如接口板的 CPU根据接收到的报文的源 IP地址把报文分发给业务板 的 CPU。 发送器(1505)用于接收业务板的 CPU发送过来的报文并发送到外部网络去。 在运 营商级网络地址转换的应用场景下, 也可以根据业务量的需要, 将接收报文的功能与发 送报文的功能分别由两个接口板来完成。也即 CGN设备可以包括两个接口板,一个接口板 包括 CPU和接收器, 另外一个接口板包括 CPU和发送器。
CGN设备拥有的用于网络地址转换的公网 IP地址组成 NAT地址池,保存在控制板(11) 的存储器(1103)中。 CGN设备的可使用的公网 IP地址可以组成一个 NAT地址池, 也可以分 成多个 NAT地址池, 在本发明实施例中, 以一个 NAT地址池为例进行说明。 每个公网 IP地 址对应一段可用的端口号段,例如端口 2049-65535,也保存在控制板(11)的存储器(1103) 中, 所述可用于网络地址转换的各个公网 IP地址及对应的端口号段组成端口资源。 控制 板(11)的 CPU (1101)根据端口分配策略把端口资源分别映射给各业务板的 CPU, 并将端口 资源与业务板中的 CPU的对应关系保存在存储器中。 端口分配策略是一种算法, 将 CGN设 备的端口资源分配给业务板的 CPU, 由业务板的 CPU分别负责管理所分配的端口资源。 控 制板可以运行算法把端口资源映射到业务板的 CPU,然后将各端口资源广播到业务板的 CPU;控制板也可以将端口分配策略广播到业务板的 CPU,业务板的 CPU通过运行端口分配 策略得到负责管理的端口资源。 这样, 就把对端口资源的管理和分配从控制板转移给了 业务板的 CPU, 由业务板的 CPU对分配的端口资源独立进行管理。
例如, 所述 CGN设备管理的 NAT地址池中有 N个可以用于网络地址转换的公网 IP地址, 每个公网 IP地址都有可供使用的一段端口号。 CGN设备使用固定算法将端口资源分别映射 到各个业务板的 CPU, 然后将端口资源广播到对应的业务板的 CPU。 具体的端口分配策略 可以根据 CGN设备的各个性能参数和运营商的实际需要来设定。端口分配策略中可以包含 如表一所示的几个参数。 表一中的参数仅为示例, 不对本方案进行限制, 实际使用中, 可以根据需要对参数以及参数的数值进行修改。
公网 IP地址 ID 公网 IP地址 SPU编号 CPU编号 端口块 端口分配粒度
… … … … … …
199 10. 10. 2. 0 1 0 2049-65535 256
200 10. 10. 2. 1 1 1 2049-65535 256
201 10. 12. 2. 2 1 1 2049-65535 256
202 10. 12. 2. 3 1 2 2049-33793 256
… … … … … … 表一 端口资源分配策略所含参数
如表一所示, 第一组参数表示: 将第 199个公网 IP地址 (10. 10. 2. 0 ) 的端口资源按 照 256个端口为一个块来进行划分并分配给 SPU1的 CPU0, 即 SPU1的 CPU0是负责管理第 199 个公网 IP地址对应的端口资源的 CPU。 第二组参数表示: 将第 200个公网 IP地址 ( 10. 10. 2. 1 ) 的端口资源按照 256个端口为一个块来进行划分并分配给 SPU0的 CPU2, 即 SPU0的 CPU2是负责管理第 200个公网 IP地址的端口资源的 CPU。 由于数量多, 在表中无法 一一列出, 未列出的参数以省略号 (…) 表示。
这样对端口资源的管理就由控制板转移到各个业务板的 CPU,避免了控制板成为端口 资源分配和管理的瓶颈。 同时, 每个端口资源由一个 CPU独立进行管理, 避免了端口分配 的冲突。
业务板中的 CPU (第一 CPU)接收的接口板分发的报文如果为一个 CPE发送的第一个会 话的第一条报文 (第一报文), 第一 CPU查找 NAT策略, 第一 CPU根据接收到的报文的特性 确定需要进行网络地址转换的公网 IP地址的 ID号, 对公网 IP地址的 ID号做 HASH计算, 得 到管理需要进行网络地址转换的端口资源的 CPU (第二 CPU)。所述报文的特性可以为报文 的 ACL信息, 报文的源 IP、 目的 IP、 源端口、 目的端口以及协议等五元组信息, NAT类型 等信息中的一种或者多种。 根据报文的特性确定进行网络地址转换的 IP地址的方法与现 有实现方式相近似, 在此不再详述。
如果所述第二 CPU与所述第一 CPU不是同一个 CPU, 即接收到报文的业务板的 CPU不同 于管理端口资源的业务板的 CPU,则所述第一 CPU将所述第一报文发送给第二 CPU, 即接收
到报文的业务板的 CPU将所述第一报文发送给管理端口资源的业务板的 CPU。所述第一 CPU 和所述第二 CPU可以位于同一个业务板,也可以位于不同的业务板。对本发明实施例中的 技术方案的实现没有影响。
所述第二 CPU接收到所述第一报文后, 从管理的端口资源中为发送所述第一报文的 CPE分配 N个端口, 并保存所述 N个端口资源的使用状态, 例如将分配的 N个端口资源的使 用状态以及与对应的 CPE之间的关系保存到用户表中。 所述第二 CPU将所述第一报文、 所 述分配的 N个端口发送给所述第一 CPU。
所述第一 CPU接收到所述第二 CPU发送过来的第一报文、 所述 N个端口资源之后, 从 N 个端口资源中选取一个端口资源对所述第一报文进行网络地址转换,并保存所述 N个端口 资源的使用状态, 例如将所述分配的 N个端口资源的使用状态以及与对应的 CPE之间的关 系保存到用户表中, 并定时更新用户表。 用户表中的其他信息与现有技术实现方式中类 似, 在此不再另行说明。第一 CPU将完成了网络地址转换的第一报文发送给接口板, 由接 口板将所述完成了网络地址转换的第一报文发送到外部网络中。为了确保 N个端口不会被 第二 CPU回收,第一 CPU定时更新所述 N个端口资源的使用状态并发送刷新消息给第二 CPU。 当该 CPE的所有会话都断开后,第一 CPU不再刷新所述 N个端口资源的使用状态,也不再发 送刷新消息给第二 CPU,第二 CPU上的所述 N个端口资源的使用状态如果在设定的时间范围 内没有收到刷新消息, 则释放所述 N个端口资源以供重新分配。
如果得出的负责管理所述公网 IP地址的 CPU (即第二 CPU)与接收第一报文的 CPU (即 第一 CPU) 为同一个 CPU,则所述第一 CPU从管理的端口资源中为发送所述第一报文的用户 驻地设备分配 N个端口, 并从 N个端口资源中选取一个端口资源对所述第一报文进行网络 地址转换, 将所述分配的 N个端口资源的使用状态以及与对应的 CPE之间的关系保存到用 户表中并更新存储的用户表。 用户表中的其他信息与现有技术实现方式中类似, 在此不 再另行说明。第一 CPU将完成了网络地址转换的第一报文发送给接口板, 由接口板将所述 完成了网络地址转换的第一报文发送到网络中。
当所述 N个资源不够使用时, 可以使用以上描述的方法再新申请 M个新的端口资源用 于网络地址转换, 在此不再详述。
这样,一个端口资源由唯一的 CPU管理,解决了现有技术中端口资源分配和管理复杂
的问题。另外, 多个业务板的 CPU共同参与完整的网络地址转换全过程, 并且当端口资源 不再使用时, 可以释放以供重新使用, 这样可以充分发挥分布式系统的优势, 提高端口 资源的利用率。
当业务板中的 CPU (第一 CPU)接收的接口板分发的报文为一个会话的后续报文时(第 二报文), 所述第一 CPU根据存储的会话表将第二报文发送出去, 此时的处理方式可参考 现有方式中同一会话后续报文的处理方式, 在此不再详述。
当业务板中的 CPU (第一 CPU)接收的接口板分发的报文为同一个 CPE发送的新的会话 的第一个报文时(第三报文),所述第一 CPU从分配的 N个端口资源中选择第二端口资源对 所述第三报文进行网络地址转换。也就是说从分配的 N个端口资源中, 除了已经分配给第 一报文的端口资源以外的其他端口资源(即 N-1个端口资源)中,选择一个端口资源对第三 报文进行网络地址转换。 后面的处理方式与第一报文类似, 在此不再另行说明。 此时, 第一 CPU不再需要把报文转发给第二 CPU, 直接从已经分配的端口资源中选取未使用的端 口资源进行网络地址转换, 充分发挥了分布式系统的优势。
由于在 CGN方案中,一个 CPE连接的终端用户的数量可能会很多,可能会出现分配的 N 个端口资源不够使用的情况, 此时可以重新申请 M个端口资源, 申请的方法与前述的 N个 端口资源的方法相同。
通过本发明提供的实施例,解决了现有技术中控制板为端口资源管理和分配的瓶颈、 端口资源分配和管理问题复杂、 以及端口资源利用率低等等问题, 充分利用了分布式系 统的优势, 提高了端口资源的利用效率。
下面以一个具体的例子来说明 CGN设备在实现网络地址转换的过程中是如何来实现 高效简单的端口资源分配和管理的。
本发明实施例提供的网络地址转换的方法流程如附图 4和附图 5所示。
步骤 1, CGN设备控制板(11)的 CPU (1101)将 CGN设备(1)所拥有的端口资源映射到业务 板的 CPU。
CGN设备所拥有的用于网络地址转换的公网 IP地址组成 NAT地址池, CGN设备的可使用 的公网 IP地址可以组成一个 NAT地址池,也可以分成多个 NAT地址池,在本发明实施例中, 以一个 NAT地址池为例进行说明。 每个 IP地址都对应一段端口号段用于进行网络地址转
换, 用于网络地址转换的公网 IP地址及对应的端口号段构成了可以用于网络地址转换的 端口资源。 控制板(11)的 CPU (l lOl)根据端口分配策略把端口资源映射到各个业务板的 CPU, 由业务板的 CPU对分配到的端口资源进行管理和分配。 控制板(11)可以运行端口分 配算法把端口资源映射到业务板的 CPU,然后将各端口资源广播到业务板的 CPU; 控制板 (11)也可以将端口分配策略广播到业务板的 CPU, 业务板的 CPU通过运行端口分配策略得 到负责管理的端口资源。
例如, CGN设备有 N个可用于网络地址转换的公网 IP地址, 每个公网 IP地址对应的可 用的端口资源为 2049-65535, 存储在控制板(11)的存储器(1103)中。 控制板(l l) MPU的 CPU (1101)将端口资源映射到业务板 SPU上的各个 CPU。 例如, CGN设备某个可用于网络地 址转换的公网 IP地址为 10. 10. 2. 0, 其对应的端口资源为 2049-65535, 控制板(11)的 CPU 将该端口资源映射给 SPU1 (131)的 CPU0 (1311)管理, 即由 SPU1 (131)的 CPU0 (1311)负责这 个公网 IP地址的端口资源的管理和分配。 将端口资源与各业务板 SPU以及各个 CPU之间的 映射关系保存到 MPU (11)的存储器(1103)中。端口分配策略在前文已给出具体的示例,在 此不同详述。
这样, 每个端口资源由所映射的业务板的 CPU独立管理。这样, 一个端口资源只会由 一个 CPU进行管理, 避免了端口分配冲突; 并且, 从网络地址转换整个过程来看, 业务板 的多个 CPU共同参与端口资源的管理和分配, 充分利用了分布式系统的架构优势。
步骤 2, 接口板(15)接收到 CPE发送来的报文后, 发送给业务板的 CPU。
接口板(15)根据报文的源 IP地址将接收到的报文分流至对应业务板的 CPU。因此具有 相同源 IP地址的所有报文都会分流到同一业务板的同一个 CPU上。 在 DS-Lite和 NAT444解 决方案中, 报文的源 IP地址即是 CPE的 IP地址, 即 CPE-IP, 所以同一个 CPE连接的所有终 端用户发出的报文都会被分流至同一个业务板的同一个 CPU处理。 CPE对接收到的终端用 户发出的报文的处理前文已提及, 在此不再另行说明。 根据报文的源 IP地址分配到业务 板的 CPU已为本领域技术人员所熟知, 在此不再详述。
如附图 4所示, 接口板 LPU (15)上的接收器(1501)接收到 CPE1发送来的报文, 发送给 接口板(15)的 CPU (1503)。 接口板(15)的 CPU (1503)根据报文的源 IP地址, 将报文分流给 SPU1 (131)的 CPU0 (1311)。后续 CPE1发来新的报文或者新的会话时, 由于报文的源 IP地址
即为 CPE1的 IP地址,所以这些报文仍然会被分流给 SPU1 (131)上的 CPU0 (1311)。如果接口 板 LPU (15)的接收器(1501)接收到的是 CPE2发送来的报文, 则发送给接口板的 CPU后, 接 口板的 CPU根据该报文的源 IP地址, 将报文分流给 SPUU131)上的 CPUU1313)。 为了清楚 的显示出一个完整的过程, CPE2发送的报文, 未在附图 5中示出。 由于 CPE2发送来的报文 的源 IP地址为所述 CPE2的 IP地址, 因此, CPE2发送的新的报文或者新的会话也会被分流 至 IJSPUl (131)上的 CPU1 (1313)。 也就是说, 同一个 CPE下的所有终端发出的报文会被分流 给同一个业务板的同一个 CPU处理。
步骤 3, 业务板的 CPU对接收到的报文进行处理。
为了描述方便,将接收到接口板分流的报文的 CPU称之为第一 CPU。如果第一 CPU接收 到的报文是 CPE发送的第一个会话的第一条报文 (第一报文), 第一 CPU查找 NAT策略, 根 据第一报文的特性, 获得需要进行网络地址转换的公网 IP地址的 ID号, 对所述公网 IP地 址的 ID号进行哈希计算, 得到负责管理需要进行网络地址转换的端口资源的 CPU (第二 CPU)。 所述报文的特性可以包含所述报文的 ACL信息, 报文的源 IP、 目的 IP、 源端口、 目 的端口以及协议等五元组信息, 以及 NAT类型等信息中的一种或者多种。根据报文的特性 确定进行网络地址转换的 IP地址的方法与现有实现方式相近似, 在此不再详述。 所述第 一 CPU和所述第二 CPU可以位于同一个业务板, 也可以位于不同的业务板。
所述 NAT策略可以预先写入并保存到控制板(11)的存储器(1103)中, 当第一 CPU接收 到第一报文后,向控制板(11)的存储器(1103)读取 NAT策略获得需要进行网络地址转换的 公网 IP地址的 ID号, 对所述公网 IP地址的 ID号进行哈希计算, 得出端口资源对应的 CPU 号。 所述 NAT策略也可以预先写入并保存到各业务板的存储器中, 当第一 CPU接收到第一 报文后,向所在的业务板的存储器读取 NAT策略获得需要进行网络地址转换的公网 IP地址 的 ID号, 对所述公网 IP地址的 ID号进行哈希计算, 得出端口资源对应的 CPU号。
如果计算出的第二 CPU与所述第一 CPU是同一个 CPU, 则转至步骤 4继续处理。 如果计 算出的第二 CPU与所述第一 CPU不是同一个 CPU, 则转至步骤 5继续处理。
如附图 4所示,业务板 SPUU131)的 CPU0 (1311)模块(即第一 CPU)接收到接口板 LPU (15) 发送的 CPE1的报文时, 如果接收到的报文是 CPE1发送的第一个会话的第一条报文, 业务 板 SPU1 (131)的 CPU0 ( 1311)根据报文的 ACL信息得到进行网络地址转换的公网 IP地址的 ID
号为 199, 对所述 IP地址的 ID进行哈希计算, 得到管理该端口资源的 CPU为 SPU0 (135)的 CPU2 (1353) (即第二 CPU)。此时第二 CPU与第一 CPU不是同一个 CPU,则转至步骤 5继续处理。
步骤 4,如果第二 CPU与所述第一 CPU是同一个 CPU,则所述第一 CPU为发送所述第一报 文的用户驻地设备分配 N个端口资源, 继续执行步骤 8。
如果管理端口资源的业务板的 CPU (第二 CPU ) 就是接收报文的业务板的 CPU (第一
CPU) , 所述第一 CPU为发送所述第一报文的用户驻地设备分配 N个端口资源。 另外, 所述 第一 CPU还保存所述 N个端口资源的使用状态,例如以用户表的形式记录分配的 N个端口资 源的使用状态以及与对应的 CPE之间的对应关系, 该用户表存储在第一 CPU所在的业务板 的存储器中。
步骤 5,如果计算出的第二 CPU与所述第一 CPU不是同一个 CPU,则第一 CPU将所述第一 报文转发给所述第二 CPU。
如果管理端口资源的业务板的 CPU (第二 CPU)与接收报文的业务板的 CPU (第一 CPU) 不是同一个 CPU, 则接收报文的业务板的 CPU把接收到的报文转发给管理端口资源的业务 板的 CPU。 在本实例中, SPU1 (131)的 CPU0 (1311)将接收到的 CPE1发送的所述第一报文转 发给 SPU0 (135)的 CPU2 (1353)。
步骤 6, 所述第二 CPU给该发送所述第一报文的 CPE分配 N个端口资源。
在本实例中, SPU0 (135)的 CPU2 (1353)接收到的第一报文后, 给发送该第一报文的 CPE1分配 N个端口资源。
歩骤 7, 所述第二 CPU将分配的所述 N个端口资源以及所述第一报文发送给所述第一 CPU。
在本实施例中, SPU0 (135)的 CPU2 (1353)将 N个端口资源以及第一报文发送给 SPU1 (131)的 CPU0 (1311)。
步骤 8,第一 CPU从分配的 N个端口资源中选取一个端口资源对所述第一报文进行网络 地址转换。
所述第一 CPU从接收到的第二 CPU分配的 N个端口资源中,选取一个端口资源对所述第 一报文进行网络地址转换。 另外, 所述第一 CPU保存所述 N个端口资源的使用状态, 以及 保存所述第一报文所在会话的会话状态, 剩余的 N-1个端口供该 CPE后续其它新建会话的
报文进行 NAT转换时使用。
如图 4所示, SPU1 (131)的 CPU0 (1311)从 SPU0 (135)的 CPU2 (1353)分配的 N个端口资源 中选取一个端口资源对 CPE1发送的第一个会话的第一条报文进行 NAT转换。 所述第一 CPU 保存所述 N个端口资源的使用状态, 并定时进行更新。
步骤 9, 第一 CPU将进行网络地址转换后的第一报文, 通过接口板发送到外部网络。
SPU1 (131)的 CPU0 (1311)模块将进行网络地址转换后的第一报文, 通过接口板(15) 发送到外部网络。
如图 4中所示的方法, 控制板将端口资源的管理和分配转移给业务板的 CPU来管理和 分配, 且某个端口资源由唯一的一个 CPU管理, 避免了控制板成为端口资源分配的瓶颈, 以及端口资源分配和管理复杂的问题。 另外, 对报文进行网络地址转换的整个过程中, 由业务板的多个 CPU来共同参与,这样既能解决分布式系统端口资源的管理和分配冲突的 问题, 又可以提高端口利用率, 让尽可能多的 CPU参与地址池管理, 充分发挥出分布式架 构的优势。
另外, 为了充分利用分布式系统的优势, 提高端口资源的利用率, 在上述步骤 4中, 所述第一 CPU为所述发送第一报文的 CPE分配 N个端口资源后, 保存所述 N个端口资源的使 用状态,例如以用户表的形式记录 N个端口资源的使用状态以及与对应的 CPE的对应关系, 并定时更新所述用户表。当在预定的时间范围内,所述 N个端口资源的使用状态不再有新 的更新时, 所述第一 CPU释放所述 N个端口资源, 用于再次分配。 类似的, 在上述步骤 6 中,所述第二 CPU为所述发送第一报文的 CPE分配 N个端口后,第二 CPU保存所述 N个端口资 源的使用状态, 例如以用户表的形式记录分配的 N个端口资源的使用状态以及与对应的 CPE之间的对应关系, 并将用户表发送给所述第一 CPU。 同时, 所述第一 CPU在接收到所述 第二 CPU发送的第一报文和为所述发送第一报文的 CPE分配的 N个端口之后, 也保存所述 N 个端口资源的使用状态,例如以用户表的形式保存所述 N个端口资源的使用状态以及与所 述发送第一报文的 CPE之间的对应关系, 定时更新用户表; 并定时发送刷新消息给第二 CPU, 避免所述 N个端口被回收重新分配。 当在预定的时间范围内, 第二 CPU保存的 N个端 口资源的使用状态没有新的更新时,所述第二 CPU释放所述 N个端口资源,用于再次分配。
这样, 可以充分发挥分布式系统的优点, 各个 CPU之间的端口资源可以互相使用; 同
时不再使用的端口资源可以回收后重新分配, 提高了端口资源的利用率。
如果所述第一 CPU接收到的报文是所述用户驻地设备发送的第一个会话的后续报文 时,则所述第一 CPU根据保存的会话表将后续报文发送到网络中。根据会话表发送报文为 本领域技术人员所熟知的技术, 并且不是本发明重点所述, 在此不再详述。
如果所述第一 CPU接收到的报文是所述用户驻地设备发送的一个新建会话的第一个 报文, 则第一 CPU从分配的 N-1个端口资源中取出一个端口资源对新建会话的第一个报文 进行网络地址转换, 并将网络地址转换后的新建会话的第一个报文通过接口板发送到外 部网络。也就是说从分配的 N个端口资源中, 除了已经分配给第一报文的端口资源以外的 其他端口资源(即 N-1个端口资源)中, 选择一个端口资源对第三报文进行网络地址转换。 这样,第一 CPU接收到所述用户驻地设备发送的新建会话的第一个报文时,不需要再把接 收到的新建会话的第一个报文转发给第二 CPU, 这样节省了业务板 CPU的流量消耗, 减轻 了业务板 CPU的负担,并加快了报文处理的时间。第一 CPU从分配的 N-1个端口资源中取出 一个端口资源对新建会话的第一个报文进行网络地址转换后, 更新存储的用户表和会话 表, 并发送刷新消息给第二 CPU所在业务板的存储器刷新所存储的用户表。
在本实施中,当 SPUU131)的 CPU0 (1311)模块接收到的报文是 CPE1发送的一个新建会 话的第一个报文时, SPU1 (131)的 CPU0 (1311)从 SPU0 (135)的 CPU2 (1353)分配的 N-1个端口 资源中取出一个端口资源对新建会话的第一个报文进行网络地址转换, 并将网络地址转 换后的新建会话的第一个报文通过接口板发送出去。 即除了已经分配给 CPE1发送的第一 个会话的第一个报文的端口资源之外的其他的端口资源中, SPUU131)的 CPU0 (1311)从剩 下的 N-1端口资源中选取一个端口资源对新建会话的第一个报文进行网络地址转换。 SPU1 (131)的 CPU0 (1311)将新的会话状态保存到 SPU1的存储器中,并发送刷新消息给 SPU0 的存储器刷新所存储的用户表。
本发明通过将 NAT端口资源分配到不同业务板的 CPU,由这些 CPU负责管理和分配端口 资源, 避免了控制板成为端口资源的瓶颈, 也避免了端口管理的冲突问题, 充分发挥了 分布式系统的优势, 提高了端口资源的利用率。
如果第一 CPU接收到所述用户驻地设备 E发送的新的新建会话的第一条报文时, 第二 CPU为该 CPE分配的 N个端口资源已经全部被使用,没有剩余的端口资源可以使用了。可以
参照当第一 CPU接收到 CPE发送的第一个会话的第一条报文时的处理方式。 当接收到报文 的业务板的 CPU (第一 CPU) 与管理端口资源的业务板的 CPU (第二 CPU ) 不是同一个 CPU 时,第一 CPU该新的新建会话的第一条报文转发给第二 CPU。第二 CPU为该发送该报文的用 户驻地设备再分配 M个端口资源,并更新所在业务板的存储器中存储的用户表, 即更新其 中记录的 CPE与分配的端口资源之间的对应关系。第二 CPU将新分配的 M个端口资源和所述 新的新建会话的第一条报文发送给第一 CPU,第一 CPU从接收到的 M个端口资源中选取一个 端口资源对所述新的新建会话的第一条报文做网络地址转换, 将网络地址转换后的报文 通过接口板发送到外部网络。另外, 第一 CPU会更新存储的会话状态, 并定时发送刷新新 消息给第二 CPU更新第二 CPU所在业务板的存储器的存储的用户表, 以保证对应端口块资 源不会被第二 CPU回收。 当所述接收到报文的业务板的 CPU (第一 CPU)与管理端口资源的 业务板的 CPU (第二 CPU)是同一个 CPU时, 第一 CPU为发送该报文的用户驻地设备再分配 M 个端口资源,更新业务板的存储器中存储的用户表,再从分配的 M个端口资源中选择一个 端口资源对所述新的新建会话的第一条报文做网络地址转换, 将网络地址转换后的报文 通过接口板发送到外部网络。另外, 第一 CPU会更新存储的会话状态和用户表。根据上述 方面, 实现了端口资源的增量分配。
本发明通过把对端口资源的管理和分配由控制板转移给业务板的 CPU,并且某个端口 资源由一个 CPU独立管理,避免了控制板成为端口资源的管理和分配的瓶颈,也简化了端 口资源管理和分配的复杂度。 并且在实现网络地址转换的过程中, 有多个业务板的 CPU 参与整个过程, 并且端口资源是动态分配的, 这样就充分发挥了分布式系统的优势。 并 且提高了端口资源的利用率。
本发明技术方案中提示的端口资源的管理和分配方法也可以适用于普通的网络地址 转换设备。 只要是将端口资源的管理和分配的控制权由控制板转移到业务板, 即为本发 明的技术方案所涵盖。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各示例的单元 及方法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结合来实现。 这些功能究 竟以硬件还是软件方式来执行, 取决于技术方案的特定应用和设计约束条件。 专业技术 人员可以对每个特定的应用来使用不同方法来实现所描述的功能, 但是这种实现不应认
为超出本发明的范围。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时, 可以存 储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技术方案本质上或者说 对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来, 该 计算机软件产品存储在一个存储介质中, 包括若干指令用以使得一台计算机设备 (可以 是个人计算机, 服务器, 或者网络设备等) 执行本发明各个实施例所述方法的全部或部 分步骤。而前述的存储介质包括: U盘、移动硬盘、只读存储器(ROM, Read-Only Memory), 随机存取存储器 (RAM, Random Access Memory), 磁碟或者光盘等各种可以存储程序代 码的介质。
以上实施方式仅用于说明本发明, 而并非对本发明的限制, 有关技术领域的普通技 术人员, 在不脱离本发明的精神和范围的情况下, 还可以做出各种变化和变型, 因此所 有等同的技术方案也属于本发明的范畴, 本发明的专利保护范围应由权利要求限定。
Claims
1 . ——禾中实现网络地址转换 ( network address trans l at i on, NAT ) 的设备, 所述设备包括控制板(11 ),业务板和接口板(15),其 特征在于:
所述业务板包括多个中央处理单元 ( central proce ss ing un it CPU ) ,其中所述设备的端口资源分配给所述业务板的多个 CPU进行 管理和分配;
所述接口板(15)用于接收用户驻地设备(301)发送的第一会话 的第一报文, 并将所述第一报文转发给所述业务板的第一 CPU; 所述第一 CPU用于,
根据 NAT策略确定第二 CPU负责管理所述第一报文进行网 络地址转换所需要的端口资源;
从所述第二 CPU获得 N个端口资源;
从所述 N个端口资源中使用第一端口资源对所述第一报 文进行网络地址转换得到转换后的报文;
将所述转换后的报文发送给所述接口板(15); 所述接口板(15)还用于将接收到的所述转换后的报文发送到 外部网络。
2.如权利要求 1所述的设备, 其特征在于, 所述控制板(11 ) 用于:
将端口资源广播到所述业务板的多个 CPU; 或者
将端口分配策略广播到业务板的多个 CPU , 其中所述端口分配 策略将所述设备的端口资源分配给所述业务板的多个 CPU,每个所 述 CPU负责管理所分配的端口资源。
3 . 如权利要求 1所述的设备, 其特征在于, 所述接口板(15) 进一歩用于:
根据所述第一报文的源 I P地址将所述第一报文转发给所述业 务板的第一 CPU。
4. 如权利要求 1所述的设备, 其特征在于, 当所述第一 CPU接 收到所述第一报文所在会话的第二报文时, 所述第一 CPU进一歩用 于根据保存的会话表对所述第二报文进行处理,其中所述会话表在 所述第一报文完成网络地址转换后建立。
5. 如权利要求 1所述的设备, 其特征在于, 当所述第一 CPU接 收到所述用户驻地设备(30 1 )发送的第二会话的第三报文时, 其中 所述第二会话是与所述第一会话不同的一个新会话, 所述第一 CPU 进一歩用于从所述 N个端口资源中选取第二端口资源对所述第三报 文进行网络地址转换。
6. 如权利要求 1至 5任一所述的设备, 其特征在于, 所述 NAT 策略用于根据接收到的报文的特性确定对应的端口资源信息。
7 . 如权利要求 1所述的设备, 其特征在于, 所述第一 CPU进一 歩用于,
接收第四报文;
根据所述 NAT策略确定所述第一 CPU负责管理所述第四报文进 行网络地址转换所需要的端口资源;
从第一 CPU所管理的端口资源池中为发送所述第四报文的用户 驻地设备分配 M个端口资源;
使用 M个端口资源中的第一端口资源对所述第四报文进行网络 地址转换。
8 . 如权利要求 7所述的设备, 其特征在于, 所述第一 CPU还用 于存储所述 M个端口资源的使用状态, 并定期更新所述 M个端口资源 的使用状态。
9. 如权利要求 1所述的设备, 其特征在于, 所述第二 CPU进一 歩用于存储所述 N个端口资源的使用状态, 并将所述 N个端口资源的
使用状态发送给所述第一 CPU;
所述第一 CPU进一歩用于定期更新所述 N个端口资源的使用状 态, 并将所述更新的使用状态发送给所述第二 CPU。
10. 一禾中网络地址转换 (network address translation, NAT) 方法, 其中实现所述网络地址转换方法的设备包括控制板(11)、 接 口板(15)和带有多个 CPU的业务板, 其特征在于: 所述设备的端口 资源分配给所述业务板的多个 CPU进行管理和分配;
所述业务板的第一 CPU接收所述接口板(15)转发的用户驻地设 备(301)发送的第一会话的第一报文;
根据网络地址转换策略确定第二 CPU管理所述第一报文进行网 络地址转换所需要的端口资源;
从所述第二 CPU获得 N个端口资源;
使用所述 N个端口资源中的第一端口资源对所述第一报文进行 网络地址转换得到转换后的报文;
将所述转换后的报文发送给所述接口板(15);
所述接口板(15)将所述转换后的报文发送到外部网络(5)。
11. 如权利要求 10所述的方法, 其特征在于, 进一歩包括: 所述控制板(11)将所述端口资源广播到所述业务板的多个
CPU; 或者
所述控制板(11)将端口分配策略广播给所述业务板的多个 CPU, 其中所述端口分配策略用于将所述设备的端口资源分配给所 述业务板的多个 CPU, 每个所述 CPU负责管理所分配的端口资源。
12. 如权利要求 10所述的方法, 其特征在于, 所述接口板(15) 根据所述第一报文的源 IP地址将所述第一报文分配给所述业务板 的所述第一 CPU。
13.如权利要求 10所述的方法, 其特征在于, 该方法进一歩包 括: 当所述第一 CPU接收到属于所述第一报文所在会话的第二报文
时,所述第一 CPU根据保存的会话表对所述第二报文进行处理,其中 所述会话表是在所述第一报文完成网络地址转换后建立的。
14.如权利要求 10所述的方法, 其特征在于, 该方法进一歩包 括: 当所述第一 CPU接收到所述用户驻地设备(30 1 )发送的第二会话 的第三报文时,其中所述第二会话是与所述第一会话不同的一个新 会话,所述第一 CPU使用 N个端口资源中的第二端口资源对所述第三 报文进行网络地址转换。
15.如权利要求 10- 14任一所述的方法,其特征在于,所述网络 地址转换策略用于根据接收到的报文的特性确定对应的端口资源。
16.如权利要求 10所述的方法,其特征在于,该方法进一歩包 括:
所述第一 CPU接收第四报文;
根据所述网络地址转换策略确定所述第一 CPU负责管理所述第 四报文进行网络地址转换所需要的端口资源;
从第一 CPU所管理的端口资源中为发送所述第四报文的用户驻 地设备分配 M个端口资源;
使用 M个端口资源中的第一端口资源对所述第四报文进行网络 地址转换。
17.如权利要求 16所述的方法,其特征在于,所述第一 CPU保存 所述 M个端口资源的使用状态, 并定期更新所述 M个端口资源的使用 状态。
18.如权利要求 10所述的方法,其特征在于, 所述第二 CPU存储 所述 N个端口资源的使用状态, 并将所述 N个端口资源的使用状态发 送给所述第一 CPU ;
所述第一 CPU定期更新所述 N个端口资源的使用状态, 并将所述 更新的使用状态发送给所述第二 CPU。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2013/086560 WO2015066840A1 (zh) | 2013-11-05 | 2013-11-05 | 一种网络地址转换设备及方法 |
CN201380002273.3A CN103797774B (zh) | 2013-11-05 | 2013-11-05 | 一种网络地址转换设备及方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2013/086560 WO2015066840A1 (zh) | 2013-11-05 | 2013-11-05 | 一种网络地址转换设备及方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015066840A1 true WO2015066840A1 (zh) | 2015-05-14 |
Family
ID=50671631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/086560 WO2015066840A1 (zh) | 2013-11-05 | 2013-11-05 | 一种网络地址转换设备及方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103797774B (zh) |
WO (1) | WO2015066840A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111131048A (zh) * | 2019-12-31 | 2020-05-08 | 杭州迪普科技股份有限公司 | 网络流量转发方法、装置、电子设备及机器可读存储介质 |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103825976B (zh) * | 2014-03-04 | 2017-05-10 | 新华三技术有限公司 | 分布式系统架构中的nat处理方法及装置 |
CN104270394B (zh) * | 2014-10-24 | 2017-06-23 | 南京贝伦思网络科技股份有限公司 | 阻断设备的acl规则高速加载实现方法 |
CN104270396B (zh) * | 2014-10-24 | 2017-06-16 | 南京贝伦思网络科技股份有限公司 | 阻断设备多板卡acl规则的高速并发加载实现方法 |
CN104601738B (zh) * | 2014-12-09 | 2018-04-10 | 国家计算机网络与信息安全管理中心 | 一种分布式网络地址转换系统 |
CN106302841A (zh) * | 2015-05-18 | 2017-01-04 | 中兴通讯股份有限公司 | 一种运营商级网络地址转换的方法及装置 |
CN106254256B (zh) * | 2015-06-04 | 2019-08-16 | 新华三技术有限公司 | 基于三层vxlan网关的数据报文转发方法和设备 |
CN106326189B (zh) * | 2015-07-02 | 2019-08-23 | 杭州海康威视数字技术股份有限公司 | 处理器的控制方法和装置 |
CN106571944A (zh) * | 2015-10-10 | 2017-04-19 | 中兴通讯股份有限公司 | 用户侧设备、服务器、端口资源管理方法及系统 |
CN105939400B (zh) * | 2015-12-24 | 2019-06-07 | 杭州迪普科技股份有限公司 | 一种PPPoE地址分配方法及装置 |
CN106131244A (zh) * | 2016-08-29 | 2016-11-16 | 北京神州绿盟信息安全科技股份有限公司 | 一种报文传送方法及装置 |
CN106878117B (zh) * | 2016-12-15 | 2020-12-29 | 新华三技术有限公司 | 一种数据处理方法及装置 |
CN108574587B (zh) * | 2017-03-09 | 2020-07-24 | 华为技术有限公司 | 分布式设备的容量更新方法及装置 |
CN108574626A (zh) * | 2017-03-13 | 2018-09-25 | 中兴通讯股份有限公司 | 一种分布式nat双机热备份流量切换系统和方法 |
CN107547508B (zh) * | 2017-06-29 | 2021-07-30 | 新华三信息安全技术有限公司 | 一种报文发送、接收方法、装置及网络设备 |
CN108924272B (zh) * | 2018-06-26 | 2021-09-17 | 新华三信息安全技术有限公司 | 一种端口资源分配方法及装置 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101150502A (zh) * | 2007-10-22 | 2008-03-26 | 中兴通讯股份有限公司 | 一种nat-pt设备及其负荷分担方法 |
CN102739820A (zh) * | 2012-06-28 | 2012-10-17 | 杭州华三通信技术有限公司 | 报文的网络地址转换处理方法和网络设备 |
CN103152269A (zh) * | 2013-02-26 | 2013-06-12 | 杭州华三通信技术有限公司 | 一种基于nat的报文转发方法和设备 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7058973B1 (en) * | 2000-03-03 | 2006-06-06 | Symantec Corporation | Network address translation gateway for local area networks using local IP addresses and non-translatable port addresses |
CN102821036A (zh) * | 2012-04-20 | 2012-12-12 | 杭州华三通信技术有限公司 | 一种实现报文转发的方法及设备 |
-
2013
- 2013-11-05 CN CN201380002273.3A patent/CN103797774B/zh active Active
- 2013-11-05 WO PCT/CN2013/086560 patent/WO2015066840A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101150502A (zh) * | 2007-10-22 | 2008-03-26 | 中兴通讯股份有限公司 | 一种nat-pt设备及其负荷分担方法 |
CN102739820A (zh) * | 2012-06-28 | 2012-10-17 | 杭州华三通信技术有限公司 | 报文的网络地址转换处理方法和网络设备 |
CN103152269A (zh) * | 2013-02-26 | 2013-06-12 | 杭州华三通信技术有限公司 | 一种基于nat的报文转发方法和设备 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111131048A (zh) * | 2019-12-31 | 2020-05-08 | 杭州迪普科技股份有限公司 | 网络流量转发方法、装置、电子设备及机器可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN103797774B (zh) | 2017-07-21 |
CN103797774A (zh) | 2014-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015066840A1 (zh) | 一种网络地址转换设备及方法 | |
EP2214383B1 (en) | Automatically releasing resources reserved for subscriber devices within a broadband access network | |
TWI449380B (zh) | 資料中心網路系統及其封包傳送方法 | |
US11909551B2 (en) | Broadband remote access server (BRAS) system-based packet encapsulation | |
WO2015085523A1 (zh) | 一种虚拟可扩展局域网的通信方法、装置和系统 | |
EP2654250A2 (en) | Virtual local area network identity transformation method and apparatus | |
KR20040024917A (ko) | 아이피 어드레스 할당 장치 및 방법 | |
US20140064259A1 (en) | Method of managing context table for compression of ipv6 header based on context in wireless mesh network | |
WO2015085788A1 (zh) | 一种动态主机配置协议报文处理方法及装置 | |
EP2584742A1 (en) | Method and switch for sending packet | |
WO2016191906A1 (zh) | 互联网协议地址分配方法及路由器 | |
CN108200199B (zh) | IPV4 over IPV6隧道场景中的负载均衡系统及方法 | |
EP2806598B1 (en) | Method and system for managing address resources | |
CN115695279A (zh) | 一种基于第6版互联网协议的段路由SRv6的通信方法 | |
WO2017059742A1 (zh) | 用户侧设备、服务器、端口资源管理方法及系统 | |
EP3086512B1 (en) | Implementation method and apparatus for vlan to access vf network and fcf | |
CN109936490A (zh) | 基于VXLAN和OpenFlow的虚拟家庭网络共享方法及系统 | |
WO2013097400A1 (zh) | 一种网络设备绑定的方法、通信的方法、装置及系统 | |
JP2010062757A (ja) | Dnsプロキシ装置及びdns中継方法 | |
US8549117B2 (en) | Method for address translator traversal in 3GPP networks | |
US10164937B2 (en) | Method for processing raw IP packet and device thereof | |
WO2015196719A1 (zh) | 一种地址配置方法、装置和设备 | |
WO2015085558A1 (zh) | 一种动态分配ip地址的方法、装置和系统 | |
US20230171673A1 (en) | Method and system for routing an internet protocol data packet between wireless computer devices connected to a cellular network | |
WO2020168363A2 (en) | System and method for forwarding packets in a hierarchical network architecture using variable length addresses |
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: 13897234 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 13897234 Country of ref document: EP Kind code of ref document: A1 |