WO2023030300A1 - Network address translation method and apparatus - Google Patents
Network address translation method and apparatus Download PDFInfo
- Publication number
- WO2023030300A1 WO2023030300A1 PCT/CN2022/115776 CN2022115776W WO2023030300A1 WO 2023030300 A1 WO2023030300 A1 WO 2023030300A1 CN 2022115776 W CN2022115776 W CN 2022115776W WO 2023030300 A1 WO2023030300 A1 WO 2023030300A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- service board
- bandwidth
- service
- network device
- user
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 227
- 238000013519 translation Methods 0.000 title claims abstract description 93
- 230000004044 response Effects 0.000 claims description 114
- 238000006243 chemical reaction Methods 0.000 claims description 78
- 230000006870 function Effects 0.000 claims description 49
- 230000015654 memory Effects 0.000 claims description 45
- 238000004590 computer program Methods 0.000 claims description 20
- 239000013256 coordination polymer Substances 0.000 description 100
- 238000012545 processing Methods 0.000 description 45
- 238000004891 communication Methods 0.000 description 40
- 230000008569 process Effects 0.000 description 19
- 238000000926 separation method Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 8
- 238000011161 development Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
-
- 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/256—NAT traversal
Definitions
- the present application relates to the communication field, in particular to a method and device for network address translation.
- Internet Protocol Version 4 (Internet Protocol Version 4, IPv4) is a widely used network protocol at present, which can assign a string of Internet Protocol (Internet Protocol, IP) addresses to each device connected to the Internet, so that each connection Devices connected to the Internet can use network protocols for connection and data transmission.
- IP Internet Protocol
- NAT network address translation
- the broadband access server can select a service board from multiple service boards to perform NAT conversion for the user.
- This application provides a method and device for network address translation.
- a service board for users to perform NAT conversion from the perspective of bandwidth, the bandwidth resource utilization rate of the service board can be improved, which is beneficial to improving the service experience of users.
- a method for network address translation comprising: a network device receives a first request message, and the first request message is used to request a first user to go online; the network device based on the first bandwidth parameter of a plurality of service boards , select the first service board from multiple service boards; the network device sends a second request message to the first service board, and the second request message is used to instruct the first service board to perform NAT conversion for the first user.
- the first user may be any Internet device requesting to connect to the network.
- the network device may be a broadband access server (broadband remote access server, BRAS), a user plane device (user plane, UP) or a control plane device (control plane, CP) performing a broadband access function.
- BRAS broadband remote access server
- UP user plane device
- control plane device control plane, CP
- the UP may be a physical user plane device (physical user plane, pUP) or a virtual user plane device (virtual user plane, vUP).
- a plurality of service boards means at least one service board, and the embodiment of the present application does not limit the specific number of service boards.
- the network device selects a first service board from multiple service boards to perform NAT conversion for the first user.
- the method for network address translation provided by the embodiment of the present application, when selecting a service board for the user to perform NAT conversion from the perspective of bandwidth, based on the first bandwidth parameter, select the first service board from multiple service boards to perform NAT for the first user Switching, from the perspective of bandwidth, selecting the service board that performs NAT conversion for the first user can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization rate of the service board, and help improve the user's service experience.
- the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, Configured bandwidth ratio, or real-time bandwidth usage ratio; among them, the configured bandwidth ratio is the ratio of the total configured bandwidth of online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to The ratio of the configured bandwidth of the service board.
- Online users on the service board are users who perform NAT conversion on the service board.
- the service board can perform NAT conversion for at least one user, so there can be at least one online user on the service board.
- the service board can configure the bandwidth corresponding to the service for the user.
- the bandwidth corresponding to the service can be the user's bandwidth. Configure bandwidth.
- the configured bandwidth of the online user on the service board is the service bandwidth configured for the user by the service board.
- the real-time bandwidth of online users on the service board is the bandwidth actually used after the user activates the service and goes online.
- the real-time bandwidth of the online users on the service board is less than or equal to the configured bandwidth of the online users on the service board.
- the configured bandwidth of the service board may represent the bandwidth processing capability of the service board.
- the sum of the configured bandwidth of online users on the service board is the sum of the configured bandwidths of all online users on the service board, so the configured bandwidth ratio can be the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
- the total real-time bandwidth of online users on the service board is the sum of real-time bandwidth of all online users on the service board, so the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
- selecting a first service board from multiple service boards includes: obtaining by a network device The first bandwidth parameter of each of the multiple service boards; the network device determines the service board with the smallest value of the first bandwidth parameter among the multiple service boards as the first service board.
- the network device can obtain the configured bandwidth ratio or the real-time bandwidth usage ratio of each of the multiple service boards, and select the service board with the smallest configured bandwidth ratio or real-time bandwidth usage ratio from the multiple service boards to determine it as the first service board .
- the service board with the smallest proportion of configured bandwidth or the service board with the smallest proportion of real-time bandwidth usage, that is, the service board with the largest remaining bandwidth, can configure bandwidth for the first user and perform NAT conversion for the first user.
- the service board with the smallest configured bandwidth ratio or real-time bandwidth usage ratio is selected from multiple service boards and determined as the first service board, that is, the service board with the largest remaining bandwidth is determined as the first service board.
- the service board can improve the bandwidth utilization rate of the service board, and at the same time provide sufficient bandwidth resources for the first user to avoid exceeding the configured bandwidth of the service board, which is conducive to improving the user's service experience.
- the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, including: each of the multiple service boards If the first bandwidth parameter values of the service boards are the same, the network device determines the service board with the least number of online users among the multiple service boards as the first service board.
- the network device can obtain the number of online users of each service board in multiple service boards, and The service board with the least number of online users is determined as the first service board.
- the service board with the least number of online users is selected as the first service board, which can make each service board have online users
- the number is relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
- the method further includes: the network device receives a first response message from the first service board, where the first response message includes the public address assigned by the first service board to the first user. Internet Protocol IP address and port number range; the network device sends a second response message to the client device, and the second response message is used to indicate that the first user is successfully online, and the first user connects to the network device through the client device.
- the method further includes: the network device acquires the second bandwidth parameter of the first service board; when the second bandwidth parameter of the first service board does not meet the preset condition, The network device determines the target service board based on the second bandwidth parameters of other service boards except the first service board among the multiple service boards; the network device sends a third request message to the target service board, and the third request message is used to indicate the target The service board performs NAT conversion for the first user.
- the second bandwidth parameter of the target service board satisfies a preset condition.
- the preset condition may be different based on the second bandwidth parameter.
- the preset condition when the second bandwidth parameter is the real-time bandwidth usage ratio, the preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
- the preset condition when the second bandwidth parameter is the real-time bandwidth of the online users on the service board, the preset condition may be that the sum of the real-time bandwidths of the online users on the service board is less than the preset bandwidth.
- the network device when the second bandwidth parameter of the first service board does not meet the preset condition, the network device can select the target service board that meets the preset condition to perform NAT translation for the first user, and can Alleviate the tension of the bandwidth resources of the first service board, and at the same time make full use of the bandwidth resources of the target service board, which can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization of the service board, and help improve user business experience.
- the at least one service board may be at least one candidate service board
- the network device may base on the at least one candidate service board
- the first bandwidth parameter of the board is used to determine the target service board from at least one candidate service board.
- the method for network address translation determines the target service board to perform NAT conversion for the first user from the candidate service boards that meet the preset conditions, which can alleviate the situation of the bandwidth resource shortage of the first service board.
- the bandwidth parameter of the service board determines the target service board, which can improve the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards, improving the bandwidth resource utilization rate of the service board, and improving the user's business experience.
- the second bandwidth parameter includes real-time bandwidth or real-time bandwidth usage ratio of online users on the service board.
- the second bandwidth parameter of the target service board satisfies a preset condition.
- the network device determines the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board, including: when multiple When the second bandwidth parameter of at least one candidate service board other than the first service board among the service boards satisfies the preset condition, the network device selects from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board. Determine the target business board.
- the network device may calculate the to-be-transferred bandwidth of the first service board and the to-be-transferred bandwidth of at least one candidate service board based on the configured bandwidth ratio or the real-time bandwidth usage ratio. Incoming bandwidth.
- the network device may determine the second service board as the target service board.
- the bandwidth resources to be transferred to the target service board are greater than or equal to the resources to be transferred out of the first service board, which can alleviate the shortage of bandwidth resources of the first service board and at the same time, target business
- the board can perform NAT conversion for the first user without exceeding the preset conditions, and can also increase the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards and improving the bandwidth resource utilization rate of the service board , which is conducive to improving the user's service experience.
- the network device determines a target service board from at least one candidate service board based on a first bandwidth parameter of at least one candidate service board, including: the network device determines a target service board based on the first service board The first bandwidth parameter of the board calculates the to-be-transferred bandwidth of the first service board; the network device calculates the to-be-transferred bandwidth of at least one candidate service board based on the first bandwidth parameter of at least one candidate service board; the network device calculates the to-be-transferred bandwidth of at least one candidate service board based on the The bandwidth and the bandwidth to be transferred are determined from at least one candidate service board to determine the target service board.
- the method before the network device sends the third request message to the target service board, the method further includes: the network device based on the number of online users of the first service board, the first service board The first user is determined by at least one parameter of the real-time bandwidth of the online user or the configured bandwidth of the online user on the first service board.
- the network address translation method provided in the embodiment of the present application can determine the first user based on the number of online users or bandwidth parameters, can make the bandwidth usage ratio among multiple service boards more balanced, and improve the bandwidth resource utilization ratio of the service boards, and at the same time It can make the number of online users of each service board relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
- the method further includes: the network device receives a third response message from the target service board, and the third response The message includes a new public network IP address and a new port number range allocated to the first user by the target service board.
- the public network IP address and port number range allocated by the first service board can be used.
- the target service board can allocate a new public network IP for the first user.
- the address and the new port number range are sent to the network device.
- the network device receives the new public network IP address and the new port number range, when it detects that the first user accesses the network, the network device can use the new public network IP
- the range of addresses and new port numbers provides network services to the first user.
- the target service board can allocate a new public network IP address and a new port number range for the first user, and the first user can access the network through the target service board, which can improve the target service board bandwidth resource utilization.
- the method further includes: the network device sends a fourth request message to the first service board, and the fourth request message is used to notify the first service board to release the original Public network IP address and original port number range.
- the first service board can release the original public network IP address and the original port number range of the first user, which can save memory resources.
- the first user does not have two ranges of public network IP addresses and port numbers, so it is not easy to make mistakes when accessing the network.
- the method further includes: the network device selects the first service board based on The first request message sends the fifth request message to the authentication server, and the fifth request message is used to request authentication for the first user; when the authentication is successful, the network device allocates a private network IP address for the first user; the network device sends the first user a private network IP address; A user sends a fifth response message, where the fifth response message is used to indicate the private IP address allocated by the network device to the first user.
- the network device is a broadband access server, a user plane device or a control plane device that performs a broadband access function.
- multiple service boards are deployed in the network device.
- the present application provides a method for network address translation, the method comprising: a network device acquires a second bandwidth parameter of a first service board, the first service board is included in multiple service boards, and the first service board is The first user performs NAT conversion; when the second bandwidth parameter of the first service board does not meet the preset condition, the network device determines based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board
- the target service board the network device sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
- the network device when the second bandwidth parameter of the first service board does not meet the preset condition, the network device can select the target service board that meets the preset condition to perform NAT translation for the first user, and can Alleviate the tension of the bandwidth resources of the first service board, and at the same time make full use of the bandwidth resources of the target service board, which can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization of the service board, and help improve user business experience.
- the second bandwidth parameter includes the real-time bandwidth or the real-time bandwidth usage ratio of the online users on the service board, where the real-time bandwidth usage ratio is the real-time bandwidth of the online users on the service board The ratio of the sum to the configured bandwidth of the service board.
- the method before the network device obtains the second bandwidth parameter of the first service board, the method further includes: the network device receives a first request message, and the first request message is used to request The first user goes online; the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards; the network device sends a second request message to the first service board, and the second request message is used to indicate The first service board performs NAT conversion for the first user.
- the method for network address translation determines the target service board to perform NAT conversion for the first user from the candidate service boards that meet the preset conditions, which can alleviate the situation of the bandwidth resource shortage of the first service board.
- the bandwidth parameter of the service board determines the target service board, which can improve the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards, improving the bandwidth resource utilization rate of the service board, and improving the user's business experience.
- the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, Configured bandwidth ratio, or real-time bandwidth usage ratio; wherein, the configured bandwidth ratio is the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
- the network device determines the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board, including: when multiple When the second bandwidth parameter of at least one candidate service board other than the first service board among the service boards satisfies the preset condition, the network device selects from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board. Determine the target business board.
- the network device determines the target service board from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board, including: the network device determines the target service board based on the first service board The first bandwidth parameter of the board calculates the to-be-transferred bandwidth of the first service board; the network device calculates the to-be-transferred bandwidth of at least one candidate service board based on the first bandwidth parameter of at least one candidate service board; the network device calculates the to-be-transferred bandwidth of at least one candidate service board based on the The bandwidth and the bandwidth to be transferred are determined from at least one candidate service board to determine the target service board.
- the network device may determine the second service board as the target service board.
- the bandwidth resources to be transferred to the target service board are greater than or equal to the resources to be transferred out of the first service board, which can alleviate the shortage of bandwidth resources of the first service board and at the same time, target business
- the board can perform NAT conversion for the first user without exceeding the preset conditions, and can also increase the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards and improving the bandwidth resource utilization rate of the service board , which is conducive to improving the user's service experience.
- the method before the network device sends the third request message to the target service board, the method further includes: the network device based on the number of online users of the first service board, the first service board The first user is determined by at least one parameter of the real-time bandwidth of the online user or the configured bandwidth of the online user on the first service board.
- the network address translation method provided in the embodiment of the present application can determine the first user based on the number of online users or bandwidth parameters, can make the bandwidth usage ratio among multiple service boards more balanced, and improve the bandwidth resource utilization ratio of the service boards, and at the same time It can make the number of online users of each service board relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
- the method further includes: the network device sends a fourth request message to the first service board, and the fourth request The message is used to notify the first service board to release the range of the original public network IP address and the original port number of the first user.
- the first service board can release the original public network IP address and the original port number range of the first user, which can save memory resources.
- the first user does not have two ranges of public network IP addresses and port numbers, so it is not easy to make mistakes when accessing the network.
- the present application provides a network address translation device, which includes: a transceiver module and a processing module.
- the transceiver module is used for: receiving a first request message, where the first request message is used to request the first user to go online.
- the processing module is used to: select the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards; the transceiver module is also used to: send a second request message to the first service board, and the second request message uses To instruct the first service board to perform NAT conversion for the first user.
- the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, Configured bandwidth ratio, or real-time bandwidth usage ratio; among them, the configured bandwidth ratio is the ratio of the total configured bandwidth of online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to The ratio of the configured bandwidth of the service board.
- the device when the first bandwidth parameter includes a configured bandwidth ratio or a real-time bandwidth usage ratio, the device further includes an acquisition module; the acquisition module is configured to: acquire the bandwidth in multiple service boards The first bandwidth parameter of each service board; the processing module is also used to: determine the service board with the smallest value of the first bandwidth parameter among the multiple service boards as the first service board.
- the processing module is further configured to: when the first bandwidth parameter value of each service board among the multiple service boards is the same, connect the multiple service boards online The service board with the least number of users is determined as the first service board.
- the transceiver module is further configured to: receive a first response message from the first service board, where the first response message includes the public address assigned by the first service board to the first user. Internet protocol IP address and port number range; send a second response message to the client device, the second response message is used to indicate that the first user is successfully online, and the first user is connected to the network device through the client device.
- the above device further includes an acquisition module; the acquisition module is used to: acquire the second bandwidth parameter of the first service board; the processing module is also used to: when the first service board When the second bandwidth parameter does not meet the preset condition, determine the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board; the transceiver module is also used to: send to the target service board Sending a third request message, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
- the second bandwidth parameter includes a real-time bandwidth or a real-time bandwidth usage ratio of online users on the service board.
- the second bandwidth parameter of the target service board satisfies a preset condition.
- the processing module is further configured to: when there is at least one candidate service board in the plurality of service boards other than the first service board, the second bandwidth parameter satisfies the preset When the condition is met, the target service board is determined from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board.
- the processing module is further configured to: calculate the bandwidth to be transferred out of the first service board based on the first bandwidth parameter of the first service board; Calculate the bandwidth to be transferred in of at least one candidate service board according to the first bandwidth parameter; determine the target service board from the at least one candidate service board based on the bandwidth to be transferred out and the bandwidth to be transferred in.
- the processing module is further configured to: based on the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the number of online users on the first service board At least one parameter in the user's configured bandwidth identifies the first user.
- the transceiver module is further configured to: receive a third response message from the target service board, where the third response message includes the new public address assigned by the target service board to the first user. Network IP address and new port number range.
- the transceiver module is further configured to: send a fourth request message to the first service board, and the fourth request message is used to notify the first service board to release the original Public network IP address and original port number range.
- the transceiver module is further configured to: based on the first request message, send a fifth request message to the authentication server, where the fifth request message is used to request authentication for the first user;
- the processing module is also used for: in the case of successful authentication, assigning a private network IP address to the first user; Private IP address assigned by the user.
- the foregoing apparatus is a broadband access server, a user plane device or a control plane device that performs a broadband access function.
- multiple service boards are deployed in the device.
- the present application provides a network address translation device, which includes: an acquisition module, a processing module, and a transceiver module.
- the obtaining module is used for: obtaining the second bandwidth parameter of the first service board, the first service board is included in a plurality of service boards, and the first service board performs NAT conversion for the first user;
- the processing module is used for: when the first service board When the second bandwidth parameter does not meet the preset condition, the target service board is determined based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board;
- the transceiver module is used to: send to the target service board A third request message, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
- the second bandwidth parameter includes the real-time bandwidth or the real-time bandwidth usage ratio of the online users on the service board, where the real-time bandwidth usage ratio is the real-time bandwidth of the online users on the service board The ratio of the sum to the configured bandwidth of the service board.
- the transceiver module is further configured to: receive a first request message, and the first request message is used to request the first user to go online; the processing module is further configured to: based on multiple services The first bandwidth parameter of the board is to select the first service board from multiple service boards; the transceiver module is also used to: send a second request message to the first service board, and the second request message is used to indicate that the first service board is the first The user performs NAT conversion.
- the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, Configured bandwidth ratio, or real-time bandwidth usage ratio; wherein, the configured bandwidth ratio is the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
- the processing module is further configured to: when there is at least one candidate service board in the multiple service boards except the first service board, the second bandwidth parameter satisfies the preset When the condition is met, the target service board is determined from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board.
- the processing module is further configured to: calculate the bandwidth to be transferred out of the first service board based on the first bandwidth parameter of the first service board; Calculate the bandwidth to be transferred in of at least one candidate service board according to the first bandwidth parameter; determine the target service board from the at least one candidate service board based on the bandwidth to be transferred out and the bandwidth to be transferred in.
- the processing module is further configured to: based on the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the number of online users on the first service board At least one parameter in the user's configured bandwidth identifies the first user.
- the transceiver module is further configured to: send a fourth request message to the first service board, and the fourth request message is used to notify the first service board to release the original Public network IP address and original port number range.
- the present application provides a device for network address translation, including a processor, the processor is coupled with a memory, and can be used to execute instructions in the memory, so as to realize any possibility in the first aspect or the second aspect above method in the implementation.
- the device for network address translation further includes a memory.
- the device for network address translation further includes a communication interface, and the processor is coupled to the communication interface.
- the present application provides a processor, including: an input circuit, an output circuit, and a processing circuit.
- the processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation manner of the first aspect or the second aspect above.
- the above-mentioned processor can be a chip
- the input circuit can be an input pin
- the output circuit can be an output pin
- the processing circuit can be a transistor, a gate circuit, a flip-flop, and various logic circuits.
- the input signal received by the input circuit may be received and input by, for example but not limited to, the receiver
- the output signal of the output circuit may be, for example but not limited to, output to the transmitter and transmitted by the transmitter
- the circuit may be the same circuit, which is used as an input circuit and an output circuit respectively at different times.
- the present application does not limit the specific implementation manners of the processor and various circuits.
- the present application provides a processing device, including a processor and a memory.
- the processor is used to read instructions stored in the memory, and may receive signals through the receiver and transmit signals through the transmitter, so as to execute the method in any possible implementation manner of the first aspect or the second aspect above.
- processors there are one or more processors, and one or more memories.
- the memory may be integrated with the processor, or the memory may be separated from the processor.
- the memory can be a non-transitory (non-transitory) memory, such as a read-only memory (read only memory, ROM), which can be integrated with the processor on the same chip, or can be respectively arranged in different On the chip, the application does not limit the type of the memory and the arrangement of the memory and the processor.
- a non-transitory memory such as a read-only memory (read only memory, ROM)
- ROM read only memory
- a related data interaction process such as sending indication information may be a process of outputting indication information from a processor
- receiving capability information may be a process of receiving input capability information from a processor.
- processed output data may be output to the transmitter, and input data received by the processor may be from the receiver.
- the transmitter and the receiver may be collectively referred to as a transceiver.
- the processing device in the seventh aspect above can be a chip, and the processor can be implemented by hardware or by software.
- the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software
- the processor may be a general-purpose processor, which is realized by reading the software code stored in the memory, and the memory may be integrated in the processor, or it may be located outside the processor and exist independently.
- the present application provides a computer-readable storage medium
- the computer-readable storage medium stores a computer program (also referred to as a code, or an instruction) which, when run on a computer, enables the computer to perform the above-mentioned first A method in any possible implementation manner of the aspect or the second aspect.
- a computer program also referred to as a code, or an instruction
- the present application provides a computer program product
- the computer program product includes: a computer program (also called code, or instruction), when the computer program is executed, the computer executes the above-mentioned first aspect or the second aspect A method in any of the possible implementations.
- the present application provides a network address translation system, the network address translation system includes a network device, and the network device is used to execute the method in any possible implementation manner of the first aspect or the second aspect above .
- FIG. 1 is a schematic diagram of a communication system applicable to an embodiment of the present application
- FIG. 2 is a schematic structural diagram of another communication system applicable to an embodiment of the present application.
- FIG. 3 is a schematic flowchart of a method for network address translation provided in an embodiment of the present application
- FIG. 4 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application.
- FIG. 5 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application.
- FIG. 6 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application.
- FIG. 7 is a schematic flowchart of another network address translation method provided by an embodiment of the present application.
- FIG. 8 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application.
- FIG. 9 is a schematic flowchart of another network address translation method provided by an embodiment of the present application.
- FIG. 10 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application.
- FIG. 11 is a schematic block diagram of an apparatus for network address translation provided by an embodiment of the present application.
- FIG. 12 is a schematic block diagram of another network address translation device provided by an embodiment of the present application.
- Fig. 13 is a schematic block diagram of another network address translation device provided by an embodiment of the present application.
- words such as “first” and “second” are used to distinguish the same or similar items with basically the same function and effect.
- the first indication information and the second indication information are for distinguishing different indication information, and the sequence thereof is not limited.
- words such as “first” and “second” do not limit the number and execution order, and words such as “first” and “second” do not necessarily limit the difference.
- At least one means one or more
- plural means two or more.
- “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural.
- the character “/” generally indicates that the contextual objects are an “or” relationship.
- “At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
- At least one (one) of a, b and c may represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, wherein a, b, c can be single or multiple.
- IPv4 addresses are rapidly consumed, and the exhaustion of IPv4 addresses has become a bottleneck restricting network development.
- network address translation can temporarily alleviate the problem of restricting network development due to the exhaustion of IPv4 addresses.
- IP Internet protocol
- NAT can map multiple private network Internet protocol (internet protocol, IP) addresses of the internal network to a public network IP address, and can use different protocol port numbers to correspond to different private network IP addresses. Therefore, a local area network may only need a small number of public network IP addresses to meet the communication requirements of all network devices in the network with multiple private network IP addresses and the Internet.
- Broadband remote access server (broadband remote access server, BRAS) is a new type of access gateway for broadband network applications.
- Applications such as broadband Internet access for community residents, construction of intranets, and support for Internet service providers (Internet Service Providers, ISPs) to wholesale services to users.
- ISPs Internet Service Providers
- the BRAS module is deployed at the edge of the network.
- load sharing is performed based on the number of users, and a carrier-grade NAT (carrier grade NAT, CGN) board is selected to allocate a public network IP address.
- CGN carrier grade NAT
- the BRAS module will count The number of users on each CGN service board is based on the number of users for load sharing to ensure that the number of users on each service board is even, thereby ensuring that the IP address is used more evenly on each service board.
- the BRAS can perform traffic load sharing through multiple CGN service boards to fully utilize IP resources.
- the CGN single board can be integrated in the access gateway device, that is, the same access gateway router includes both the BRAS module and the CGN single board. The embodiment of this application does not limit the deployment mode of the CGN board.
- the BRAS can select a service board from multiple service boards to perform NAT conversion for the user based on the number of online users of the service board.
- the use of bandwidth resources between service boards will be unbalanced, reducing the bandwidth usage of the service boards.
- FIG. 1 shows a structure diagram of a communication system 100 .
- the communication system 100 may include a smart phone 101, a notebook computer 102, a device 103 used by an enterprise deploying an intranet, a device 104 used by a family deploying broadband, and user premise equipment (CPE). ) 105, router 106 and server 107.
- the router 106 may include a main processing unit (main processing unit, MPU) 1061, a service board 1, a service board 2, and a service board 3.
- the router 106 may also include a BRAS module, that is, the router 106 may perform a broadband access function. It should be understood that the number of service boards in FIG. 1 is only an example, which is not limited in this embodiment of the present application.
- Smartphones 101, laptops 102, devices 103 used by enterprises deploying intranets, and devices 104 used by families deploying broadband can all be connected to the server 107 through the access network.
- the communication system 100 may further include a log server (syslog sever), a web server (web sever), and a dynamic host configuration protocol server (dynamic host configuration protocol sever, DHCP sever), which are not shown in FIG. 1 .
- a log server log sever
- web server web sever
- dynamic host configuration protocol server dynamic host configuration protocol sever, DHCP sever
- the CPE 105 dials up and goes online, and the BRAS in the router 106
- the module can choose to send a request message to the service board with the least number of online users according to the number of online users in service board 1, service board 2 and service board 3, and the request message is used to request the service board with the fewest number of online users to request a connection Users of the network perform NAT translation.
- the BRAS module can send a message to start charging to the server 107, and the server 107 starts charging after receiving the message.
- the home 104 deploying broadband requests to connect to the network, and the CPE 105 dials up to go online.
- the BRAS module in the router 106 receives the online request of the CPE 105, it counts the number of online users of the service board 1 and the online users of the service board 2 respectively. and the number of online users on service board 3.
- the number of online users of service board 1 may be 100 users
- the number of online users of service board 2 may be 80 users
- the number of online users of service board 3 may be 90 users.
- the BRAS module can choose to send a request message to the service board 2 with the least number of online users based on the number of online users, and the request message is used to request the service board 2 to perform NAT conversion for the home 104 deploying broadband. After the NAT conversion is successful, the BRAS module can send a message to start charging to the server 107, and the server 107 starts charging after receiving the message.
- the BRAS module is based on the number of online users in the service board, and selects a service board from multiple service boards to perform NAT conversion for users who request to connect to the network.
- bandwidth gap of users When the bandwidth gap of users is large, it will lead to unbalanced use of bandwidth resources among service boards, and reduce the bandwidth utilization rate of service boards.
- a user can subscribe to a customized paid service that occupies a large bandwidth, for example, high-definition video, augmented reality (augmented reality, AR) service, virtual reality (virtual reality, VR) service or a peer-to-peer content distribution network (peer to peer content delivery network, PCDN) business, etc.
- augmented reality augmented reality
- VR virtual reality
- PCDN peer-to-peer content distribution network
- Each user can subscribe to different services, and the BRAS module can allocate different bandwidths to each user.
- the BRAS module is a service board selected based on the number of users, and the bandwidth usage rate of some service boards may exceed 80%, and the bandwidth usage rate of some service boards may be less than 30%. When the service bandwidth exceeds the bandwidth of the service board, the bandwidth exceeding the processing capability of the service board will be discarded, resulting in service damage.
- CU separation refers to the network architecture in which CP and UP are decoupled. CU separation includes but not limited to the following implementations A and B.
- control plane and the forwarding plane are located on different hardware devices.
- the CP device and the UP device are two independent and different devices.
- the CP device and the UP device are distributed in different places.
- the CP device is located in the data center of the cloud, and the UP device is deployed at a suitable location in the network according to the requirements. In this way, the deployment of the control plane and the forwarding plane is more flexible.
- control plane and the forwarding plane are located on the same hardware device and their functions are separated.
- the physical entity of the CP device and the physical entity of the UP device are the same device.
- the CP device and the UP device run on the same host, the same server, or the same terminal.
- both the CP device and the UP device are implemented by virtualization technology.
- the CP device is called, for example, a virtual CP (virtual CP, vCP), and the UP device is called, for example, a virtual UP (virtual UP, vUP).
- the CP device is a virtual machine
- the UP device is a virtual router or a virtual switch.
- both the CP device and the UP device are implemented based on a common physical server combined with NF technology, and the CP device and the UP device are two different virtual network functions (virtualized network function, VNF).
- VNF virtualized network function
- both the CP device and the UP device are network elements virtualized by an X86 server.
- the CP device is implemented by a virtualization technology
- the UP device is implemented by a traditional network device.
- the UP device is called, for example, a physical UP (physical UP, pUP).
- a CP device and a UP device have a one-to-many relationship, that is, one CP device is used to control multiple UP devices.
- there is a one-to-one correspondence between CP devices and UP devices that is, one CP device is used to control one UP device.
- the communication system where the CU is separated includes multiple UP devices.
- multiple UP devices are distributed in different places in the communication system where the CU is separated.
- multiple UP devices cooperate to share the forwarding task based on the distributed architecture.
- CU separation can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "CU separation".
- CU separation may sometimes be called “control and forwarding separation”, “forwarding and control separation”, “control plane and user plane separation”, “control and user separation” and so on.
- CP can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "CP”.
- CP may sometimes be referred to as "CP function (CP function, CPF)" or "CP face”.
- CPF CP function
- CP face CP face
- CP device refers to any device that implements the CP function.
- UP can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "UP”. For example, the term “UP” may sometimes be referred to as “UP function (UPF)” or "UP face”. “UP”, “UPF” and “UP face” are used interchangeably herein.
- UPF UP function
- UP face are used interchangeably herein.
- UP device refers to any device that implements the UP function.
- the BNG system realizes the decoupling of control and forwarding as well as the decoupling of software and hardware based on the architecture of SDN or NFV, and becomes a BNG system with CU separation, so as to have the advantages brought by the architecture of CU separation.
- the CP device in the BNG system controls multiple UP devices in the BNG system, the CP device schedules multiple UP devices to process traffic forwarding tasks, and the CP device allocates resources for multiple UP devices. Therefore, compared with the single-machine implementation of the BNG system , Under the CU separation architecture, the utilization rate and reliability of the equipment of the BNG system can be greatly improved.
- CU-separated BNG in this embodiment of the present application may have different names.
- different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for the "CU-separated BNG”.
- CU-separated BNG may sometimes be referred to as a "disaggregated BNG system (DBNG)"
- DBNG-CP disaggregated BNG system
- CU-separated BNG-CP CP
- CU-separated The UP device in BNG may be referred to as DBNG-UP.
- CU-separated BNG may sometimes be referred to as a "virtual broadband network gateway (virtual BNG, vBNG) control plane and user plane disaggregated system (CU system)", namely "vBNG CU system", correspondingly, the CP device in the CU-separated BNG can be called vBNG-CP, and the UP device in the CU-separated BNG can be called vBNG-UP.
- CU-separated BNG can sometimes be referred to as "virtual broadband remote access server (vBRAS) CU system", that is, “vBRAS CU system”.
- vBRAS virtual broadband remote access server
- CU-separated BNG The CP device in the CU may be called vBRAS-CP, and the UP device in the BNG where the CU is separated may be called vBRAS-UP.
- DBNG "vBNG CU system”
- vBRAS CU system the UP device in the BNG where the CU is separated
- FIG. 2 shows an architecture diagram of another communication system 200 .
- the communication system 200 may include a smart phone 101, a notebook computer 102, a device 103 used by an enterprise deploying an intranet, a device 104 used by a family deploying broadband, a CPE 105, and a user plane device (user plane , UP) 201, a control plane device (control plane, CP) 202 and a server 107.
- UP 201 may include MPU 2011, service board 1, service board 2, and service board 3.
- the UP 201 can also include a BRAS module, that is, the UP 201 can perform broadband access functions.
- the UP may be a physical user plane function (physical user plane, pUP) or a virtual user plane function (virtual user plane, vUP). It should be understood that the number of service boards in FIG. 2 is only an example, which is not limited in this embodiment of the present application.
- the BRAS module in the UP 201 shown in Figure 2 can have some functions of the BRAS module in the router 106 shown in Figure 1 above.
- Service board 1, service board 2, and service board 3 in FIG. 2 may be the same as or different from service board 1, service board 2, and service board 3 in FIG. 1, which is not limited in this embodiment of the application.
- Smartphones 101, laptops 102, devices 103 used by enterprises deploying intranets, and devices 104 used by families deploying broadband can all be connected to the server 107 through the access network.
- the communication system 100 may further include a log server (syslog sever), a web server (web sever), and a dynamic host configuration protocol server (dynamic host configuration protocol sever, DHCP sever), which are not shown in FIG. 2 .
- a log server log sever
- web server web sever
- dynamic host configuration protocol server dynamic host configuration protocol sever, DHCP sever
- CPE 105 dials up and goes online, and the BRAS module in UP 201 receives
- CP 202 can choose to send a request message to the service board with the least number of online users according to the number of online users in service board 1, service board 2 and service board 3.
- the message is used to request the service board with the least number of online users to perform NAT conversion for the users requesting to connect to the network.
- the CP 202 can send a message to start charging to the server 107 through the network, and the server 107 starts charging after receiving the message.
- UP 201 can also communicate with server 107 through the network.
- the CP 202 is based on the number of online users in the service board, and selects the service board that performs NAT conversion for the user requesting to connect to the network from a plurality of service boards.
- the service board selects the service board that performs NAT conversion for the user requesting to connect to the network from a plurality of service boards.
- one service board is selected from multiple service boards to perform NAT conversion for the user, which is based on the online user of the service board All of these will lead to unbalanced use of bandwidth resources among service boards and reduce the bandwidth utilization of service boards.
- the embodiment of the present application provides a method and device for network address translation. From the perspective of bandwidth, selecting a service board for NAT conversion for the user can improve the utilization rate of bandwidth resources of the service board, which is conducive to improving the user's business experience.
- FIG. 3 is a network address translation method 300 provided by an embodiment of the present application.
- the method 300 may be applied to the communication system 100 shown in FIG. 1 and the communication system 200 shown in FIG. 2 above, but this embodiment of the present application is not limited thereto.
- the method 300 may include the following steps:
- the network device receives a first request message, where the first request message is used to request a first user to go online.
- the first user can be any Internet device that requests to connect to the network.
- the first user can be the smart phone 101, laptop 102 in FIG. 1 or FIG. It should be understood that to go online is to connect to the network.
- the first user may be a user who subscribes to a large-bandwidth customized service.
- the network device may be a BRAS, a UP or a CP performing a broadband access function.
- the network device can be the BRAS module in the router 106 in FIG. 1, and the network device can also be the BRAS module in the UP 201 in FIG. 2, the UP 201 or the CP 202 performing the broadband access function.
- the network device may receive the first request message from the CPE 105.
- the BRAS may be the BRAS module in FIG. 1 or the BRAS module in FIG. 2 .
- the network device can receive the first request message from the UP 201.
- the network device selects a first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards.
- the network device is a BRAS
- the network device and multiple service boards can be deployed in the same device.
- the BRAS module in FIG. 1 above can be deployed in the router 106 together with multiple service boards.
- a plurality of service boards means at least one service board, and the embodiment of the present application does not limit the specific number of service boards.
- the first bandwidth parameter may include at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio; wherein the configured bandwidth The ratio is the ratio of the total configured bandwidth of online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
- Online users on the service board are users who perform NAT conversion on the service board.
- the service board can perform NAT conversion for at least one user, so there can be at least one online user on the service board.
- the service board can configure the bandwidth corresponding to the service for the user.
- the bandwidth corresponding to the service can be the user's bandwidth. Configure bandwidth.
- the configured bandwidth of the online user on the service board is the service bandwidth configured for the user by the service board.
- the bandwidth of the service opened by the user is 50 megabytes (Mbyte, M)
- the service board performs NAT conversion for the user, so the configured bandwidth of the online user of the service board is 50M.
- the real-time bandwidth of online users on the service board is the bandwidth actually used after the user activates the service and goes online.
- the real-time bandwidth of the online users on the service board is less than or equal to the configured bandwidth of the online users on the service board.
- the configured bandwidth of the service board may represent the bandwidth processing capability of the service board.
- the configured bandwidth of the service board is 100M, and the bandwidth within 100M can be configured for online users.
- the bandwidth exceeding the processing capability of the service board will be discarded.
- the sum of the configured bandwidth of online users on the service board is the sum of the configured bandwidths of all online users on the service board, so the configured bandwidth ratio can be the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
- the total real-time bandwidth of online users on the service board is the sum of real-time bandwidth of all online users on the service board, so the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
- the network device sends a second request message to the first service board, where the second request message is used to instruct the first service board to perform NAT conversion for the first user.
- the network device selects a first service board from multiple service boards to perform NAT conversion for the first user.
- the service board when the service board performs NAT conversion for the user, based on the first bandwidth parameter, the first service board is selected from multiple service boards to perform NAT conversion for the first user, and the bandwidth Selecting the service board that performs NAT conversion for the first user can balance the bandwidth usage among multiple service boards, improve the bandwidth resource utilization of the service board, and help improve the user's service experience.
- selecting the first service board from multiple service boards includes: the network device obtaining each service in the multiple service boards The first bandwidth parameter of the board; the network device determines the service board with the smallest value of the first bandwidth parameter among the multiple service boards as the first service board.
- the network device can obtain the configured bandwidth ratio or the real-time bandwidth usage ratio of each of the multiple service boards, and select the service board with the smallest configured bandwidth ratio or real-time bandwidth usage ratio from the multiple service boards to determine it as the first service board .
- the service board with the smallest proportion of configured bandwidth or the service board with the smallest proportion of real-time bandwidth usage, that is, the service board with the largest remaining bandwidth, can configure bandwidth for the first user and perform NAT conversion for the first user.
- the service board with the smallest configured bandwidth ratio or real-time bandwidth usage ratio is selected from multiple service boards and determined as the first service board, that is, the service board with the largest remaining bandwidth is determined as the first service board.
- the service board can improve the bandwidth utilization rate of the service board, and at the same time provide sufficient bandwidth resources for the first user to avoid exceeding the configured bandwidth of the service board, which is conducive to improving the user's service experience.
- the network device can count the configured bandwidth of the online users on the service board of each service board among the multiple service boards The sum or the sum of the real-time bandwidth of the online users on the service boards, the service board with the minimum configured bandwidth sum of the online users on the service boards or the real-time bandwidth sum of the online users on the service boards of each service board in the multiple service boards is determined as the first a business board.
- the network device when the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, it includes: the first bandwidth of each service board among the multiple service boards When the parameter values are the same, the network device determines the service board with the least number of online users among the multiple service boards as the first service board.
- the network device can obtain multiple services when the configured bandwidth ratio or the real-time bandwidth usage ratio of each of the multiple service boards is the same.
- the number of online users of each service board in the board, and the service board with the least number of online users among the multiple service boards is determined as the first service board.
- the network device may obtain the number of online users of each of the multiple service boards, and determine the service board with the least number of online users among the multiple service boards as the first service board.
- the service board with the least number of online users is selected as the first service board, which can make each service board have online users
- the number is relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
- the above method 300 further includes: the network device receives a first response message from the first service board, and the first response message includes the public network IP address and port number assigned by the first service board to the first user Scope: the network device sends a second response message to the client device, and the second response message is used to indicate that the first user goes online successfully, and the first user connects to the network device through the client device.
- the first service board performs NAT conversion for the first user, that is, assigns the public network IP address and port number range to the first user.
- the first service board can send a first response message to the network device, and the first response message includes the public network IP address and port number range allocated for the first user.
- the network device can send the The device sends a second response message, and the second response message is used to indicate that the first user goes online successfully.
- the first service board can use the public network IP address and port number range to provide network services for the first user. That is, the traffic of the first user can be processed by the first service board.
- the port number range of the service board can be any range from 1026 to 6535.
- the ranges of port numbers corresponding to different service boards can be completely the same, partially overlap, or be completely different.
- the port number range of service board 1 can be 1026-3535
- the port number range of service board 2 can be 2035-4521
- the port number range of service board 3 can be 4888-5231
- the port number range of service board 4 Can be 4888-5231.
- the above method 300 further includes: the network device sends the authentication server Sending the fifth request message, the fifth request message is used to request authentication for the first user; when the authentication is successful, the network device allocates a private network IP address for the first user; the network device sends the fifth response message to the first user, The fifth response message is used to indicate the private IP address allocated by the network device to the first user.
- the network device can request authentication for the first user from the authentication server, and if the authentication is successful, assign a private network IP address to the first user, and send the private network IP address to the first user .
- the network device can select the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, and use the private network IP address to send the first service board to the first service board. Apply for a range of public IP addresses and port numbers.
- FIG. 4 provides another network address translation method 400 according to the embodiment of the present application, and the method 400 may be applicable to the communication system 100 described in FIG. 1 .
- the method 400 can be understood as: the network device in the method 300 can be the BRAS module in the router 106 in the communication system 100, and the first user can be a dynamic host configuration protocol (DHCP) user.
- DHCP dynamic host configuration protocol
- the method 400 may include:
- CPE 105 sends a first request message to the BRAS module in the router 106, the first request message is used to request the first user to go online, and correspondingly, the BRAS module in the router 106 receives the first request message.
- the CPE 105 can dial to go online, that is, send the first request message to the BRAS module in the router 106.
- the first request message may be a DHCP discovery (discovery) message.
- the BRAS module in the router 106 sends a fifth request message to the authentication server based on the first request message.
- the fifth request message is used to request authentication for the first user.
- the authentication server receives the fifth request message and performs the A user is authenticated.
- the authentication server may be a remote authentication dial-in user server (RADIUS).
- RADIUS remote authentication dial-in user server
- the BRAS module in the router 106 receives a sixth response message from the authentication server, where the sixth response message is used to indicate that the authentication of the first user is successful.
- the BRAS module in the router 106 allocates a private network IP address for the first user.
- the BRAS module in the router 106 sends a seventh response message to the CPE 105, the seventh response message includes the private network IP address allocated by the BRAS module to the first user, and correspondingly, the CPE 105 receives the seventh response message.
- the seventh response message may be a DHCP offer (offe) message.
- CPE 105 sends the sixth request message to the BRAS module in the router 106, and the sixth request message is used to indicate that the private network IP address is successfully received, and correspondingly, the BRAS module in the router 106 receives the sixth request message.
- the sixth request message may be a DHCP request (request) message.
- the BRAS module in the router 106 selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards.
- the BRAS module in the router 106 sends a second request message to the first service board, the second request message is used to instruct the first service board to perform NAT conversion for the first user, and correspondingly, the first service board receives the second request information.
- the first service board allocates a public network IP address and a port number range to the first user.
- the first service board may allocate a public network IP address and a port number range to the first user based on the private network IP address, and establish a correspondence between the private network IP address, the public network IP address, and the port number range.
- the first service board sends a first response message to the BRAS module in the router 106.
- the first response message includes the public network IP address and port number range allocated by the first service board to the first user.
- the The BRAS module receives the first response message.
- the BRAS module in the router 106 sends a second response message to the CPE 105, the second response message is used to indicate that the first user has successfully gone online, and correspondingly, the CPE 105 receives the second response message.
- the second response message may be a DHCP acknowledgment (acknowledgment, ACK) message.
- ACK DHCP acknowledgment
- the first user may access the network based on the second response message.
- the BRAS module in the router 106 may instruct the first service board to provide network services for the first user,
- the traffic of the first user can access the network through the first service board.
- the method 400 further includes: the BRAS module in the router 106 sends an accounting request to the authentication server, and correspondingly, the authentication server receives the accounting request, and sends a response message to the BRAS module in the router 106, The response message is used to indicate the start of charging.
- the BRAS module in the router 106 can allocate a private network IP address for the first user, and select from multiple IP addresses based on the first bandwidth parameter. Select the first service board from the two service boards, so that it can allocate the public network IP address and port number range for the first user according to the assigned private network IP address, and the first user can connect to the network through the first service board. At the same time, The BRAS module in the router 106 selects the service board that performs NAT conversion for the first user from the perspective of bandwidth, which can make the bandwidth utilization ratio between multiple service boards more balanced, improve the bandwidth resource utilization ratio of the service board, and help improve user business experience.
- FIG. 5 provides another network address translation method 500 according to the embodiment of the present application, and the method 500 may be applicable to the communication system 200 described in FIG. 2 .
- the method 500 can be understood as: the network device in the method 300 can be the CP 202 in the communication system 200, and the first user can be a DHCP user.
- the method 500 may include:
- CPE 105 sends a first request message to the BRAS module in UP 201, the first request message is used to request the first user to go online, and correspondingly, the BRAS module in UP 201 receives the first request message.
- the CPE 105 can dial to go online, that is, send the first request message to the BRAS module in the UP 201.
- the first request message may be a DHCP discovery message.
- the BRAS module in the UP 201 forwards the first request message to the CP 202, and correspondingly, the CP 202 receives the first request message.
- the CP 202 sends a fifth request message to the authentication server, where the fifth request message is used to request authentication for the first user.
- the authentication server receives the fifth request message and authenticates the first user.
- the authentication server may be RADIUS.
- the CP 202 receives a sixth response message from the authentication server, where the sixth response message is used to indicate that the first user has successfully authenticated.
- the CP 202 allocates a private network IP address for the first user.
- the CP 202 sends a seventh response message to the BRAS module in the UP 201, the seventh response message includes the private network IP address allocated by the CP 202 to the first user, and correspondingly, the BRAS module in the UP 201 receives the seventh response information.
- the seventh response message may be a DHCP offer message.
- the BRAS module in the UP 201 forwards the seventh response message to the CPE 105, and correspondingly, the CPE 105 receives the seventh response message.
- the CPE 105 sends a sixth request message to the BRAS module in the UP 201.
- the sixth request message is used to indicate that the private network IP address has been successfully received.
- the BRAS module in the UP 201 receives the sixth request message.
- the sixth request message may be a DHCP request message.
- the BRAS module in the UP 201 forwards the sixth request message to the CP 202, and correspondingly, the CP 202 receives the sixth request message.
- the CP 202 selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards.
- the CP 202 sends a second request message to the first service board, where the second request message is used to instruct the first service board to perform NAT conversion for the first user, and correspondingly, the first service board receives the second request message.
- the first service board allocates a public network IP address and a port number range to the first user.
- the first service board may allocate a public network IP address and a port number range to the first user based on the private network IP address, and establish a correspondence between the private network IP address, the public network IP address, and the port number range.
- the first service board sends a first response message to the CP 202.
- the first response message includes the public network IP address and port number range allocated by the first service board to the first user.
- the CP 202 receives the first response message.
- the CP 202 sends a second response message to the BRAS module in the UP 201.
- the second response message is used to indicate that the first user has successfully gone online.
- the BRAS module in the UP 201 receives the second response message.
- the second response message may be a DHCP ACK message.
- the BRAS module in the UP 201 forwards the second response message to the CPE 105.
- the first user may access the network based on the second response message.
- the BRAS module in UP 201 When the BRAS module in UP 201 detects that the first user accesses the network, it can instruct the first service board to provide network services for the first user,
- the traffic of the first user can access the network through the first service board.
- the method 500 further includes: the CP 202 sends an accounting request to the authentication server, and correspondingly, the authentication server sends a response message to the CP 202, and the response message is used to indicate the start of accounting.
- the CP 202 can assign a private network IP address to the first user, and select the IP address from multiple service boards based on the first bandwidth parameter. Select the first service board, so that it can allocate the public network IP address and port number range for the first user according to the assigned private network IP address, and the first user can connect to the network through the first service board. From the perspective of selecting a service board for NAT conversion for the first user, the bandwidth utilization rate among multiple service boards can be balanced, the bandwidth resource utilization rate of the service board can be improved, and the service experience of users can be improved.
- FIG. 6 provides another network address translation method 600 according to the embodiment of the present application, and the method 600 may be applicable to the communication system 200 described in FIG. 2 .
- the method 600 can be understood as: the network device in the method 300 can be the BRAS module in the UP 201 in the communication system 200, and the first user can be a DHCP user.
- the method 600 may include:
- CPE 105 sends a first request message to the BRAS module in UP 201, the first request message is used to request the first user to go online, and correspondingly, the BRAS module in UP 201 receives the first request message.
- the CPE 105 can dial to go online, that is, send the first request message to the BRAS module in the UP 201.
- the first request message may be a DHCP discovery message.
- the BRAS module in the UP 201 forwards the first request message to the CP 202, and correspondingly, the CP 202 receives the first request message.
- the CP 202 sends a fifth request message to the authentication server, where the fifth request message is used to request authentication for the first user.
- the authentication server receives the fifth request message and authenticates the first user.
- the authentication server may be RADIUS.
- the CP 202 receives a sixth response message from the authentication server, where the sixth response message is used to indicate that the authentication of the first user is successful.
- the CP 202 allocates a private network IP address for the first user.
- the CP 202 sends a seventh response message to the BRAS module in the UP 201, the seventh response message includes the private network IP address allocated by the CP 202 to the first user, and correspondingly, the BRAS module in the UP 201 receives the seventh response information.
- the seventh response message may be a DHCP offer message.
- the BRAS module in the UP 201 forwards the seventh response message to the CPE 105, and correspondingly, the CPE 105 receives the seventh response message.
- the CPE 105 sends a sixth request message to the BRAS module in the UP 201.
- the sixth request message is used to indicate that the private network IP address has been successfully received.
- the BRAS module in the UP 201 receives the sixth request message.
- the sixth request message may be a DHCP request message.
- the BRAS module in the UP 201 forwards the sixth request message to the CP 202, and correspondingly, the CP 202 receives the sixth request message.
- the CP 202 sends a seventh request message to the BRAS module in the UP 201, the seventh request message is used to request the BRAS module in the UP 201 to allocate a public network IP address and port number range for the first user, correspondingly, the UP 201
- the BRAS module in receives the seventh request message.
- the BRAS module in the UP 201 selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards.
- the BRAS module in the UP 201 sends a second request message to the first service board, and the second request message is used to instruct the first service board to perform NAT conversion for the first user, and correspondingly, the first service board receives the second request information.
- the first service board allocates a public network IP address and a port number range to the first user.
- the first service board may allocate a public network IP address and a port number range to the first user based on the private network IP address, and establish a correspondence between the private network IP address, the public network IP address, and the port number range.
- the first service board sends the first response message to the BRAS module in the UP 201, the first response message includes the public network IP address and port number range allocated by the first service board to the first user, correspondingly, the UP 201
- the BRAS module receives the first response message.
- the BRAS module in the UP 201 sends an eighth response message to the CP 202, the eighth response message includes the public network IP address and port number range allocated by the first service board to the first user, and correspondingly, the CP 202 receives the eighth response information.
- the CP 202 sends a second response message to the BRAS module in the UP 201, where the second response message is used to indicate that the first user goes online successfully.
- the second response message may be a DHCP Ack message.
- the BRAS module in the UP 201 forwards the second response message to the CPE 105.
- the first user may access the network based on the second response message.
- the BRAS module in UP 201 When the BRAS module in UP 201 detects that the first user accesses the network, it can instruct the first service board to provide network services for the first user,
- the traffic of the first user can access the network through the first service board.
- the method 600 further includes: the CP 202 sends an accounting request to the authentication server, and correspondingly, the authentication server sends a response message to the CP 202, and the response message is used to indicate the start of accounting.
- the CP 202 can assign a private network IP address to the first user, and the BRAS module in the UP 201 can be based on the first bandwidth parameter Select the first service board from multiple service boards, and allocate the public network IP address and port number range to the first user according to the assigned private network IP address, the first user can connect to the network through the first service board, UP 201
- the BRAS module selects the service board that performs NAT conversion for the first user, which can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization rate of the service board, and help improve the user's business experience.
- a new user on the service board or a change in the bandwidth of an online user on the service board may cause unbalanced use of the bandwidth resources of the service board. Therefore, the embodiment of the present application also provides a method for network address translation, which can improve the bandwidth resource utilization of the service board. It is beneficial to balance the use of bandwidth resources among multiple service boards and provide users with better service experience.
- FIG. 7 is another network address translation method 700 provided by the embodiment of the present application.
- the method 700 may be performed after the above method 300 .
- the method 700 may be applied to the communication system 100 shown in FIG. 1 and the communication system 200 shown in FIG. 2 above, but this embodiment of the present application is not limited thereto.
- the method 700 may include the following steps:
- the network device acquires a second bandwidth parameter of a first service board, where the first service board is included in multiple service boards, and the first service board performs NAT conversion for a first user.
- the first user can be any Internet device that requests to connect to the network.
- the first user can be the smart phone 101, laptop 102 in FIG. 1 or FIG. It should be understood that to go online is to connect to the network.
- the network device may be a BRAS, a UP or a CP performing a broadband access function.
- the network device can be the BRAS module in the router 106 in FIG. 1, and the network device can also be the BRAS module in the UP 201 in FIG. 2, the UP 201 or the CP 202 performing the broadband access function.
- the second bandwidth parameter includes at least one of the following: real-time bandwidth or real-time bandwidth usage ratio of online users on the service board; wherein, the real-time bandwidth usage ratio is the ratio of the real-time bandwidth sum of online users on the service board to the configured bandwidth of the service board.
- the network device determines a target service board based on the second bandwidth parameters of other service boards among the multiple service boards except the first service board.
- the second bandwidth parameter of the target service board satisfies a preset condition.
- the preset condition may be different based on the second bandwidth parameter.
- the preset condition when the second bandwidth parameter is the real-time bandwidth usage ratio, the preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
- the preset ratio may be 80%.
- the real-time bandwidth ratio of the first service board is equal to or greater than 80%, the real-time bandwidth ratio of the first service board does not meet the preset ratio, and the network device may be based on multiple service boards
- the real-time bandwidth ratio of the real-time bandwidth ratio is determined as the target service board with a real-time bandwidth ratio of less than 80%.
- the preset condition when the second bandwidth parameter is the real-time bandwidth of the online users on the service board, the preset condition may be that the sum of the real-time bandwidths of the online users on the service board is less than the preset bandwidth.
- the preset bandwidth can be 80M.
- the network device can base on multiple The real-time bandwidth sum of the online users of the service boards, and the service board whose real-time bandwidth sum of the online users is less than 80M is determined as the target service board.
- the configured bandwidth of each service board is different, and the preset bandwidth can be set according to the configured bandwidth of each service board.
- the configuration bandwidth of service board 1 is 100M, and the preset bandwidth can be set to 80M; the configuration bandwidth of service board 2 is 150M, and the preset bandwidth can be set to 120M; Can be set to 90M. If the preset condition is that the total real-time bandwidth of the online users on the service board is less than the preset bandwidth, and the total real-time bandwidth of the online users on the service board 1 (the first service board) is equal to or greater than 80M, the real-time bandwidth of the online users on the service board 2 When the sum is less than 120M and the total real-time bandwidth of online users of service board 3 is less than 90M, the network device may determine service board 2 or service board 3 as the target service board.
- the network device sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
- the network device when the second bandwidth parameter of the first service board does not meet the preset condition, the network device can select the target service board that meets the preset condition to perform NAT translation for the first user, and can Alleviate the tension of the bandwidth resources of the first service board, and at the same time make full use of the bandwidth resources of the target service board, which can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization of the service board, and help improve user business experience.
- the network device determines the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board, including: when there are multiple service boards When the second bandwidth parameter of at least one candidate service board other than the first service board satisfies the preset condition, the network device determines the target service board from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board.
- the at least one service board may be at least one candidate service board
- the network device may base on the at least one candidate service board
- the first bandwidth parameter of the board is used to determine the target service board from at least one candidate service board.
- the first bandwidth parameter may include at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio; wherein the configured bandwidth The ratio is the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
- the network device acquires the first bandwidth parameter of each service board in the at least one candidate service board, and the first bandwidth in the at least one candidate service board The service board with the smallest parameter value is determined as the first service board.
- the network device counts the configuration of the online users on the service board of each service board in the at least one candidate service board
- the sum of the bandwidth or the sum of the real-time bandwidth of the online users on the service board is determined by the service board with the minimum configured bandwidth sum of the online users on the service board of each service board in the at least one candidate service board or the sum of the real-time bandwidth of the online users on the service board It is the first business board.
- the method for network address translation determines the target service board to perform NAT conversion for the first user from the candidate service boards that meet the preset conditions, which can alleviate the situation of the bandwidth resource shortage of the first service board.
- the bandwidth parameter of the service board determines the target service board, which can improve the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards, improving the bandwidth resource utilization rate of the service board, and improving the user's business experience.
- the network device determines the target service board from at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board, including: the network device calculates the target service board based on the first bandwidth parameter of the first service board The bandwidth to be transferred out of the first service board; the network device calculates the bandwidth to be transferred in of at least one candidate service board based on the first bandwidth parameter of at least one candidate service board; the network device calculates the bandwidth to be transferred in based on the bandwidth to be transferred out and the bandwidth to be transferred in A target service board is determined from at least one candidate service board.
- the network device may calculate the to-be-transferred bandwidth of the first service board and the to-be-transferred bandwidth of at least one candidate service board based on the configured bandwidth ratio or the real-time bandwidth usage ratio. Incoming bandwidth.
- the network device may determine the second service board as the target service board.
- the configured bandwidth ratio or the real-time bandwidth usage ratio of the first service board is 90%
- the preset condition is that the configured bandwidth ratio or the real-time bandwidth usage ratio is less than or equal to 80%
- the candidate service boards include service board 1 and service board 2
- the configured bandwidth ratio or real-time bandwidth usage ratio of service board 1 is 60%, and the configured bandwidth of service board 1 is 80M
- the configured bandwidth ratio or real-time bandwidth usage ratio of service board 2 is 70%
- the configured bandwidth of service board 2 is 90M
- the bandwidth to be transferred in by service board 1 is greater than the bandwidth to be transferred out, and the bandwidth to be transferred in by service board 2 is smaller than the bandwidth to be transferred out. Therefore, the network device can determine service board 1 as the target service board.
- the bandwidth resources to be transferred to the target service board are greater than or equal to the resources to be transferred out of the first service board, which can alleviate the shortage of bandwidth resources of the first service board and at the same time, target business
- the board can perform NAT conversion for the first user without exceeding the preset conditions, and can also increase the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards and improving the bandwidth resource utilization rate of the service board , which is conducive to improving the user's service experience.
- the network device may select the second service board with the least number of online users among the at least one second service board.
- the business board is determined as the target business board.
- the service board with the least number of online users is selected as the target service board, which can Making the number of online users of each service board relatively uniform is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
- the method 700 further includes: the network device based on the number of online users on the first service board, the number of online users on the first service board The first user is determined by at least one parameter of the real-time bandwidth or the configured bandwidth of the online users on the first service board.
- the bandwidth to be transferred out of the first service board is 10M
- the configured bandwidth or real-time bandwidth of the first user is 10M
- the network device can determine the first user among at least one online user in the first service board, and request the target service The board performs NAT translation for the first user.
- the number of online users of the target service board is 10, the number of online users of the first service board is 20, the bandwidth to be transferred out of the first service board is 10M, and the configured bandwidth or real-time bandwidth of the first user is 2M.
- the configured bandwidth or real-time bandwidth of the second user in the first service board is 5M
- the configured bandwidth or real-time bandwidth of the third user in the first service board is 3M
- the configured bandwidth or real-time bandwidth of the fourth user in the first service board is 10M
- the number of online users of the target service board is much smaller than the number of online users of the first service board
- the network device can determine the first user, the second user and the third user among at least one online user of the first service board, and request the target
- the service board performs NAT conversion for the first user, the second user and the third user.
- the network address translation method provided in the embodiment of the present application can determine the first user based on the number of online users or bandwidth parameters, can make the bandwidth usage ratio among multiple service boards more balanced, and improve the bandwidth resource utilization ratio of the service boards, and at the same time It can make the number of online users of each service board relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
- the method 700 further includes: the network device receives a third response message from the target service board, the third response message includes the target service The new public network IP address and the new port number range assigned by the board to the first user.
- the public network IP address and port number range allocated by the first service board can be used.
- the target service board can allocate a new public network IP for the first user.
- the address and the new port number range are sent to the network device.
- the new public network IP address can be used and the new range of port numbers to provide network services to first users.
- the target service board can allocate a new public network IP address and a new port number range for the first user, and the first user can access the network through the target service board, which can improve the target service board bandwidth resource utilization.
- the network device may also send a fourth request message to the first service board, where the fourth request message is used to notify the first service board to release the range of the original public network IP address and the original port number of the first user.
- the first service board can release the original public network IP address and the original port number range of the first user, which can save memory resources.
- the first user does not have two ranges of public network IP addresses and port numbers, so it is not easy to make mistakes when accessing the network.
- FIG. 8 provides another network address translation method 800 according to the embodiment of the present application, and the method 800 may be applicable to the communication system 100 described in FIG. 1 .
- the method 800 can be understood as: the network device in the method 700 can be a BRAS module in the router 106 in the communication system 100 .
- the method 800 may include:
- the first user accesses the network through the first service board.
- the first service board performs NAT conversion for the first user, and the first user can access the network through the first service board.
- the BRAS module in the router 106 counts the number of online users of the first service board and the real-time bandwidth of the online users of the first service board.
- the BRAS module in the router 106 can record the online users of the first service board and the real-time bandwidth of the online users, and perform statistics on the number of online users and the total real-time bandwidth of all online users on the first service board.
- the BRAS module in the router 106 obtains the real-time bandwidth usage ratio of the first service board.
- the BRAS module in the router 106 can send a request message to the first service board, and the request message is used to obtain the real-time bandwidth usage ratio of the first service board, correspondingly, after the first service board receives the request message, it can send a request message to the router 106
- the BRAS module sends a response message, where the response message may include the real-time bandwidth usage ratio of the first service board.
- the network device determines the target service board based on the real-time bandwidth usage ratios of other service boards in the multiple service boards except the first service board.
- the preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
- the preset ratio may be 80%.
- the BRAS module in the router 106 may be based on For the real-time bandwidth ratios of multiple service boards, a service board whose real-time bandwidth ratio is less than 80% is determined as a target service board.
- the BRAS module in the router 106 sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user, and correspondingly, the target service board receives the third request message.
- the target service board allocates a new public network IP address and a new port number range to the first user.
- the target service board can update the corresponding relationship between the private network IP address, the public network IP address and the port number range, that is, establish the corresponding relationship between the private network IP address, the new public network IP address and the new port number range.
- the target service board sends a third response message to the BRAS module in the router 106, the third response message includes the new public network IP address and the new port number range allocated by the target service board for the first user, and the BRAS in the router 106 The module receives the third response message.
- the BRAS module in the router 106 sends a fourth request message to the first service board, where the fourth request message is used to notify the first service board to release the range of the original public network IP address and the original port number of the first user.
- the first user accesses the network through the target service board.
- the BRAS module in the router 106 may instruct the target service board to provide network services for the first user, that is, the traffic of the first user is processed by the target service board.
- the BRAS module in the router 106 may send the accounting statistics message to the authentication server.
- the BRAS module in the router 106 can select the target service board that meets the preset condition to assign the bandwidth to the first user.
- the new public network IP address and the new port number range can alleviate the tightness of the bandwidth resources of the first service board. Balanced to improve the bandwidth resource utilization of the service board.
- the first service board can release the original public network IP address and the original port number range allocated for the first user, which can save memory resources and can be used as NAT for more users. Conversion is conducive to improving the user's business experience.
- FIG. 9 provides another network address translation method 900 according to the embodiment of the present application, and the method 900 may be applicable to the communication system 200 described in FIG. 2 .
- the method 900 can be understood as: the network device in the method 700 can be the CP 202 in the communication system 200.
- the method 900 may include:
- the first user accesses the network through the first service board.
- the first service board performs NAT conversion for the first user, and the first user can access the network through the first service board.
- the BRAS module in the UP 201 counts the number of online users of the first service board and the real-time bandwidth of the online users of the first service board.
- the BRAS module in the UP 201 can record the online users of the first service board and the real-time bandwidth of the online users, and perform statistics on the number of online users and the sum of the real-time bandwidth of all online users on the first service board.
- the BRAS module in the UP 201 acquires the real-time bandwidth usage ratio of the first service board.
- the BRAS module in the UP 201 can send a request message to the first service board, and the request message is used to obtain the real-time bandwidth usage ratio of the first service board.
- the first service board can send a request message to the UP 201
- the BRAS module sends a response message, where the response message may include the real-time bandwidth usage ratio of the first service board.
- the BRAS module in the UP 201 sends first information to the CP 202, where the first information includes the real-time bandwidth utilization ratio of the first service board, and correspondingly, the CP 202 receives the first information.
- the CP 202 determines the target service board based on the real-time bandwidth usage ratios of other service boards in the multiple service boards except the first service board.
- the preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
- the preset ratio may be 80%.
- the real-time bandwidth ratio of the first service board is equal to or greater than 80%, the real-time bandwidth ratio of the first service board does not meet the preset ratio, and the network device may be based on multiple service boards
- the real-time bandwidth ratio of the real-time bandwidth ratio is determined as the target service board with a real-time bandwidth ratio of less than 80%.
- the CP 202 sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user, and correspondingly, the target service board receives the third request message.
- the target service board allocates a new public network IP address and a new port number range to the first user.
- the target service board can update the corresponding relationship between the private network IP address, the public network IP address and the port number range, that is, establish the corresponding relationship between the private network IP address, the new public network IP address and the new port number range.
- the target service board sends a third response message to the CP 202.
- the third response message includes the new public network IP address and the new port number range allocated by the target service board to the first user, and the CP 202 receives the third response message.
- the CP 202 sends a fourth request message to the first service board, where the fourth request message is used to notify the first service board to release the original public network IP address and the original port number range of the first user.
- the first user accesses the network through the target service board.
- the CP 202 When the CP 202 detects that the first user accesses the network, it can instruct the target service board to provide network services for the first user, that is, the traffic of the first user is processed by the target service board.
- the CP 202 may send an accounting statistics message to the authentication server.
- the CP 202 can select a target service board that meets the preset condition to assign a new public network to the first user
- the IP address and the new port number range can alleviate the tightness of the bandwidth resources of the first service board, and at the same time, can make full use of the bandwidth resources of the target service board, which can make the bandwidth utilization ratio among multiple service boards more balanced, and improve the business
- the first service board can release the original public network IP address and original port number range allocated for the first user, which can save memory resources, and can perform NAT conversion for more users at the same time, which is beneficial to Improve user experience.
- FIG. 10 provides another network address translation method 1000 according to the embodiment of the present application, and the method 1000 may be applicable to the communication system 200 described in FIG. 2 .
- the method 1000 can be understood as: the network device in the method 700 can be the BRAS module in the UP 201 in the communication system 200.
- the method 1000 may include:
- a first user accesses a network through a first service board.
- the first service board performs NAT conversion for the first user, and the first user can access the network through the first service board.
- the BRAS module in the UP 201 counts the number of online users of the first service board and the real-time bandwidth of the online users of the first service board.
- the BRAS module can record the online users of the first service board and the real-time bandwidth of the online users, and perform statistics on the number of online users and the sum of the real-time bandwidth of all online users on the first service board.
- the BRAS module in the UP 201 acquires the real-time bandwidth usage ratio of the first service board.
- the BRAS module can send a request message to the first service board, and the request message is used to obtain the real-time bandwidth usage ratio of the first service board.
- the first service board can send the request message to the BRAS module in the UP 201 A response message, where the response message may include the real-time bandwidth usage ratio of the first service board.
- the BRAS module in the UP 201 determines the target based on the real-time bandwidth usage ratios of other service boards in the multiple service boards except the first service board business board.
- the preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
- the preset ratio may be 80%.
- the real-time bandwidth ratio of the first service board is equal to or greater than 80%, the real-time bandwidth ratio of the first service board does not meet the preset ratio, and the network device may be based on multiple service boards
- the real-time bandwidth ratio of the real-time bandwidth ratio is determined as the target service board with a real-time bandwidth ratio of less than 80%.
- the BRAS module in the UP 201 sends a third request message to the target service board, the third request message is used to instruct the target service board to perform NAT conversion for the first user, and correspondingly, the target service board receives the third request message.
- the target service board allocates a new public network IP address and a new port number range to the first user.
- the target service board can update the corresponding relationship between the private network IP address, the public network IP address and the port number range, that is, establish the corresponding relationship between the private network IP address, the new public network IP address and the new port number range.
- the target service board sends the third response message to the BRAS module in the UP 201, the third response message includes the new public network IP address and the new port number range allocated by the target service board for the first user, and the BRAS in the UP 201 The module receives the third response message.
- the BRAS module in the UP 201 sends second information to the CP 202, the second information includes the new public network IP address and the new port number range allocated by the target service board for the first user, correspondingly, the CP 202 receives the first Two information.
- the BRAS module in the UP 201 sends a fourth request message to the first service board, and the fourth request message is used to notify the first service board to release the original public network IP address and the original port number range of the first user.
- the first user accesses the network through the target service board.
- the BRAS module in UP 201 When the BRAS module in UP 201 detects that the first user accesses the network, it can instruct the target service board to provide network services for the first user, that is, the traffic of the first user is processed by the target service board.
- the BRAS module in the UP 201 can send the accounting statistics message to the CP 202, and the CP 202 can forward the accounting statistics message to the authentication server.
- the BRAS module in the UP 201 can select a target service board that satisfies the preset condition to allocate to the first user.
- the new public network IP address and the new port number range can alleviate the tightness of the bandwidth resources of the first service board. Balanced to improve the bandwidth resource utilization of the service board.
- the first service board can release the original public network IP address and the original port number range allocated for the first user, which can save memory resources and can be used as NAT for more users. Conversion is conducive to improving the user's business experience.
- sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
- the method for NAT provided by the embodiment of the present application is described in detail above with reference to FIG. 1 to FIG. 10 .
- the apparatus for NAT provided by the embodiment of the present application will be described in detail below in conjunction with FIG. 11 to FIG. 13 .
- FIG. 11 shows an apparatus 1100 for network address translation provided by an embodiment of the present application.
- the apparatus 1100 includes: a transceiver module 1110 and a processing module 1120 .
- the apparatus 1100 may specifically be the network device in the above-mentioned method 300 or method 700, or the functions of the network device in the above-mentioned method 300 or method 700 may be integrated in the apparatus 1100 middle.
- the above functions can be implemented by hardware, or can be implemented by executing corresponding software by hardware.
- the hardware or software includes one or more modules corresponding to the above functions.
- Apparatus 1100 may be configured to execute various processes and/or steps corresponding to network devices in the foregoing method embodiments.
- the network device may be a BRAS module in the router 106.
- the network device may be the CP 202.
- the network device may be the UP 201 or the BRAS module in the UP 201.
- the transceiver module 1110 may be used to execute S301 in the above method 300, that is, to receive a first request message, and the first request message is used to request the first user to go online.
- the processing module 1120 can be used to execute S302 in the above-mentioned method 300, that is, to select the first service board from multiple service boards based on the first bandwidth parameters of the multiple service boards; the transceiver module can also be used to execute the above-mentioned method 300 In S303, it is used to send a second request message to the first service board, and the second request message is used to instruct the first service board to perform NAT conversion for the first user.
- the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio; wherein, The configured bandwidth ratio is the ratio of the total configured bandwidth of online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
- the apparatus 1100 further includes an acquisition module; the acquisition module is configured to: acquire the first bandwidth parameter of each service board in the plurality of service boards; process Module 1120 is further configured to: determine the service board with the smallest value of the first bandwidth parameter among the multiple service boards as the first service board.
- the processing module 1120 is further configured to: in the case that the value of the first bandwidth parameter of each of the multiple service boards is the same, determine the service board with the least number of online users among the multiple service boards as the first service board plate.
- the transceiver module 1110 is also configured to: receive a first response message from the first service board, where the first response message includes the public network IP address and port number range assigned by the first service board to the first user; The client device sends a second response message, where the second response message is used to indicate that the first user goes online successfully, and the first user connects to the network device through the client device.
- the device 1100 further includes an acquisition module; the acquisition module is used to: acquire the second bandwidth parameter of the first service board; the processing module 1120 is also used to: when the second bandwidth parameter of the first service board does not meet the preset condition , determine the target service board based on the second bandwidth parameters of other service boards in the plurality of service boards except the first service board; the transceiver module 1110 is also used to: send a third request message to the target service board, the third request message It is used to instruct the target service board to perform NAT conversion for the first user.
- the acquisition module is used to: acquire the second bandwidth parameter of the first service board
- the processing module 1120 is also used to: when the second bandwidth parameter of the first service board does not meet the preset condition , determine the target service board based on the second bandwidth parameters of other service boards in the plurality of service boards except the first service board
- the transceiver module 1110 is also used to: send a third request message to the target service board, the third request message It is used to instruct the target service board to perform
- the second bandwidth parameter includes real-time bandwidth or real-time bandwidth usage ratio of online users on the service board.
- the second bandwidth parameter of the target service board satisfies a preset condition.
- the processing module 1120 is further configured to: when the second bandwidth parameter of at least one candidate service board other than the first service board among the multiple service boards satisfies a preset condition, based on the second bandwidth parameter of the at least one candidate service board A bandwidth parameter for determining a target service board from at least one candidate service board.
- the processing module 1120 is further configured to: calculate the to-be-transferred bandwidth of the first service board based on the first bandwidth parameter of the first service board; calculate at least one candidate service based on the first bandwidth parameter of at least one candidate service board The board's to-be-transferred bandwidth; based on the to-be-transferred bandwidth and the to-be-transferred bandwidth, determine a target service board from at least one candidate service board.
- the processing module 1120 is further configured to: determine the second parameter based on at least one parameter of the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the configured bandwidth of online users on the first service board. a user.
- the transceiver module 1110 is further configured to: receive a third response message from the target service board, where the third response message includes the new public network IP address and the new port number range allocated to the first user by the target service board.
- the transceiver module 1110 is further configured to: send a fourth request message to the first service board, the fourth request message is used to notify the first service board to release the original public network IP address and the original port number range of the first user.
- the transceiver module 1110 is further configured to: send a fifth request message to the authentication server based on the first request message, where the fifth request message is used to request authentication for the first user; the processing module 1120 is also configured to: In this case, allocate a private network IP address to the first user; the transceiver module 1110 is further configured to: send a fifth response message to the first user, and the fifth response message is used to indicate the private network IP address allocated by the device to the first user.
- the apparatus 1100 is a broadband access server, a user plane device or a control plane device performing a broadband access function.
- FIG. 12 shows another network address translation device 1200 provided by an embodiment of the present application.
- the device 1200 obtains a module 1210 , a processing module 1220 and a transceiver module 1230 .
- the apparatus 1200 may specifically be the network device in the foregoing method 700 , or the functions of the network device in the foregoing method 700 may be integrated in the apparatus 1200 .
- the above functions can be implemented by hardware, or can be implemented by executing corresponding software by hardware.
- the hardware or software includes one or more modules corresponding to the above functions.
- Apparatus 1200 may be configured to execute various processes and/or steps corresponding to network devices in the foregoing method embodiments.
- the network device may be a BRAS module in the router 106.
- the network device may be the CP 202.
- the network device may be the UP 201 or the BRAS module in the UP 201.
- the acquisition module 1210 can be used to execute S701 in the above method 700, that is, to acquire the second bandwidth parameter of the first service board, the first service board is included in multiple service boards, and the first service board is the first user Perform NAT conversion;
- the processing module 1220 can be used to execute S702 in the above-mentioned method 700, that is, when the second bandwidth parameter of the first service board does not meet the preset condition, based on multiple service boards except the first service board The second bandwidth parameter of other service boards, to determine the target service board;
- the transceiver module 1230 can be used to execute S703 in the above method 700, that is, to send a third request message to the target service board, and the third request message is used to indicate The target service board performs NAT conversion for the first user.
- the second bandwidth parameter includes real-time bandwidth or real-time bandwidth usage ratio of online users on the service board, where the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
- the transceiver module 1230 is also configured to: receive a first request message, the first request message is used to request the first user to go online; the processing module 1220 is also configured to: based on the first bandwidth parameters of multiple service boards, from multiple The first service board is selected among the service boards; the transceiver module 1230 is further configured to: send a second request message to the first service board, and the second request message is used to instruct the first service board to perform NAT conversion for the first user.
- the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio; wherein, the configured bandwidth ratio is the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
- the processing module 1220 is further configured to: when the second bandwidth parameter of at least one candidate service board other than the first service board among the multiple service boards satisfies a preset condition, based on the second bandwidth parameter of the at least one candidate service board A bandwidth parameter for determining a target service board from at least one candidate service board.
- the processing module 1220 is further configured to: calculate the to-be-transferred bandwidth of the first service board based on the first bandwidth parameter of the first service board; calculate at least one candidate service based on the first bandwidth parameter of at least one candidate service board The board's to-be-transferred bandwidth; based on the to-be-transferred bandwidth and the to-be-transferred bandwidth, determine a target service board from at least one candidate service board.
- the processing module 1220 is further configured to: determine the second parameter based on at least one parameter of the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the configured bandwidth of online users on the first service board. a user.
- the transceiver module 1230 is further configured to: send a fourth request message to the first service board, the fourth request message is used to notify the first service board to release the original public network IP address and the original port number range of the first user.
- module here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and memory, incorporated logic, and/or other suitable components to support the described functionality.
- ASIC application specific integrated circuit
- processor such as a shared processor, a dedicated processor, or a group processor, etc.
- memory incorporated logic, and/or other suitable components to support the described functionality.
- the network address translation apparatus 1100 or the network address translation apparatus 1200 may specifically be the network device in the above method embodiment, or the network device in the above method embodiment
- the function can be integrated in the network address translation apparatus 1100 or the network address translation apparatus 1200, and the network address translation apparatus 1100 or the network address translation apparatus 1200 can be used to execute the various processes corresponding to the network equipment in the above method embodiments and/or or steps, in order to avoid repetition, no more details are given here.
- the above-mentioned NAT apparatus 1100 or NAT apparatus 1200 has the function of implementing the corresponding steps performed by the network device in the above-mentioned method embodiment; the above-mentioned functions can be realized by hardware, and can also be realized by hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the above functions.
- the NAT device in FIG. 11 or the NAT device in FIG. 12 may also be a chip or a chip system, for example: a system on chip (system on chip, SoC).
- SoC system on chip
- FIG. 13 is a schematic block diagram of another network address translation apparatus 1300 provided by an embodiment of the present application.
- the apparatus 1300 for network address translation includes a processor 1310 , a transceiver 1320 and a memory 1330 .
- the processor 1310, the transceiver 1320 and the memory 1330 communicate with each other through an internal connection path, the memory 1330 is used to store instructions, and the processor 2140 is used to execute the instructions stored in the memory 1330 to control the transceiver 1320 to send signals and /or to receive a signal.
- the network address translation apparatus 1300 may specifically be the network device in the above-mentioned method 300 or method 700, or the functions of the network equipment in the above-mentioned method 300 or method 400 may be integrated in the network address translation apparatus 1300, and the network address translation The apparatus 1300 can be used to execute each step and/or process corresponding to the network device in the above-mentioned method 300 or method 700.
- the memory 1330 may include read-only memory and random-access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory.
- the memory may also store device type information.
- the processor 1310 may be configured to execute instructions stored in the memory, and when the processor executes the instructions, the processor may execute various steps and/or processes corresponding to the network device in the above method 300 or method 700 .
- the network device may be a BRAS module in the router 106.
- the network device may be the CP 202.
- the network device may be the UP 201 or the BRAS module in the UP 201.
- processor 1310 in the network address translation device 1300 can specifically implement the functions of the processing module 1120 in the above-mentioned device 1100
- the transceiver 1320 can specifically realize the functions of the transceiver module 1110 in the above-mentioned device 1100
- the memory 1330 can store and implement Instructions for processor 1310 and transceiver 1320 functions.
- the processor 1310 in the network address translation device 1300 can also specifically implement the functions of the processing module 1220 in the above-mentioned device 1200, and the transceiver 1320 can specifically realize the functions of the transceiver module 1230 in the above-mentioned device 1200, and the processor 1310 or the transceiver 1320 can also implement
- the functions of the acquisition module 1210 in the above-mentioned apparatus 1200 may be specifically realized, and the memory 1330 may store instructions for realizing the functions of the processor 1310 and the transceiver 1320 .
- the processor 1310 may be a central processing unit (central processing unit, CPU), and the processor may also be other general processors, digital signal processors (DSPs), application specific integrated circuits ( ASIC), Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- DSPs digital signal processors
- ASIC application specific integrated circuits
- FPGA Field Programmable Gate Array
- a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
- each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
- the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
- the storage medium is located in the memory, and the processor executes the instructions in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
- An embodiment of the present application provides a network address translation system, where the network address translation system includes a network device.
- the network device may be configured to: receive a first request message, where the first request message is used to request the first user to go online; based on the first bandwidth parameters of the multiple service boards, select the The first service board; sending a second request message to the first service board, where the second request message is used to instruct the first service board to perform NAT conversion for the first user.
- the network device may be configured to: obtain the second bandwidth parameter of the first service board, where the first service board is included in multiple service boards, and the first service board performs NAT conversion for the first user; When the second bandwidth parameter of the first service board does not meet the preset condition, determine the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board; send to the target service board A third request message, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
- network device may also execute the steps and/or processes related to the network device described in any of the foregoing methods, which will not be repeated here.
- the embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and the computer program is used to implement the method corresponding to the network device in the foregoing method embodiment.
- the embodiment of the present application further provides a chip system, which is used to support the network device in the above method embodiment to implement the functions shown in the embodiment of the present application.
- the embodiment of the present application also provides a computer program product.
- the computer program product includes a computer program (also referred to as code, or instruction).
- code also referred to as code, or instruction.
- the computer program When the computer program is run on a computer, the computer can execute the method described in the above method embodiments. method corresponding to the network device shown.
- the disclosed systems, devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present application provides a network address translation method and apparatus, which can improve the utilization rate of bandwidth resources of a service board, thereby facilitating improvement of the service experience of a user. The method comprises: a network device receives a first request message, the first request message being used for requesting a first user to go online; the network device selects, on the basis of first bandwidth parameters of multiple service boards, a first service board from among the multiple service boards; the network device sends a second request message to the first service board, the second request message being used for instructing the first service board to perform NAT for the first user.
Description
本申请要求于2021年09月01日提交中国国家知识产权局、申请号为202111020071.4、申请名称为“网络地址转换的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with application number 202111020071.4 and application title "Method and Device for Network Address Translation" filed with the State Intellectual Property Office of China on September 1, 2021, the entire contents of which are incorporated herein by reference Applying.
本申请涉及通信领域,尤其涉及一种网络地址转换的方法和装置。The present application relates to the communication field, in particular to a method and device for network address translation.
互联网通信协议第四版(internet protocol version 4,IPv4)是目前使用广泛的网络协议,其可以为每一个接入互联网的设备分配一串网络协议(internet protocol,IP)址,从而使每一个接入互联网的设备能够使用网络协议进行连接和数据传输。随着全球快速增长的网络用户及智能手机、个人电脑等互联网设备迅速消耗掉了IPv4地址,IPv4地址枯竭已成为制约网络发展的瓶颈。Internet Protocol Version 4 (Internet Protocol Version 4, IPv4) is a widely used network protocol at present, which can assign a string of Internet Protocol (Internet Protocol, IP) addresses to each device connected to the Internet, so that each connection Devices connected to the Internet can use network protocols for connection and data transmission. With the rapid growth of global Internet users and Internet devices such as smart phones and personal computers, IPv4 addresses are rapidly consumed, and the exhaustion of IPv4 addresses has become a bottleneck restricting network development.
目前,网络地址转换(network address translation,NAT)可以暂时缓解因IPv4地址枯竭而制约网络发展的问题。NAT可以将内部网络的多个私有IP地址映射为一个公有IP地址。当用户请求上线时,宽带接入服务器可以从多个业务板中选择一个业务板为该用户作NAT转换。At present, network address translation (NAT) can temporarily alleviate the problem of restricting network development due to the exhaustion of IPv4 addresses. NAT can map multiple private IP addresses of the internal network to one public IP address. When a user requests to go online, the broadband access server can select a service board from multiple service boards to perform NAT conversion for the user.
发明内容Contents of the invention
本申请提供了一种网络地址转换的方法和装置,通过从带宽的角度为用户选择业务板作NAT转换,可以提升业务板的带宽资源利用率,有利于提高用户的业务体验。This application provides a method and device for network address translation. By selecting a service board for users to perform NAT conversion from the perspective of bandwidth, the bandwidth resource utilization rate of the service board can be improved, which is beneficial to improving the service experience of users.
第一方面,提供了一种网络地址转换的方法,该方法包括:网络设备接收第一请求消息,第一请求消息用于请求第一用户上线;网络设备基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板;网络设备向第一业务板发送第二请求消息,第二请求消息用于指示第一业务板为第一用户作NAT转换。In a first aspect, a method for network address translation is provided, the method comprising: a network device receives a first request message, and the first request message is used to request a first user to go online; the network device based on the first bandwidth parameter of a plurality of service boards , select the first service board from multiple service boards; the network device sends a second request message to the first service board, and the second request message is used to instruct the first service board to perform NAT conversion for the first user.
第一用户可以为请求连接网络的任意互联网设备。The first user may be any Internet device requesting to connect to the network.
网络设备可以为宽带接入服务器(broadband remote access server,BRAS)、执行宽带接入功能的用户面设备(user plane,UP)或者控制面设备(control plane,CP)。其中,UP可以为物理用户面设备(physical user plane,pUP)或虚拟用户面设备(virtual user plane,vUP)。The network device may be a broadband access server (broadband remote access server, BRAS), a user plane device (user plane, UP) or a control plane device (control plane, CP) performing a broadband access function. Wherein, the UP may be a physical user plane device (physical user plane, pUP) or a virtual user plane device (virtual user plane, vUP).
多个业务板即至少一个业务板,本申请实施例对业务板的具体个数不作限定。A plurality of service boards means at least one service board, and the embodiment of the present application does not limit the specific number of service boards.
网络设备基于第一带宽参数,从多个业务板中选择第一业务板为第一用户作NAT转换。Based on the first bandwidth parameter, the network device selects a first service board from multiple service boards to perform NAT conversion for the first user.
本申请实施例提供的网络地址转换的方法,通过从带宽的角度为用户选择业务板作NAT转换时,基于第一带宽参数,从多个业务板中选择第一业务板为第一用户作 NAT转换,从带宽的角度选择为第一用户作NAT转换的业务板,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。The method for network address translation provided by the embodiment of the present application, when selecting a service board for the user to perform NAT conversion from the perspective of bandwidth, based on the first bandwidth parameter, select the first service board from multiple service boards to perform NAT for the first user Switching, from the perspective of bandwidth, selecting the service board that performs NAT conversion for the first user can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization rate of the service board, and help improve the user's service experience.
结合第一方面,在第一方面的某些实现方式中,第一带宽参数包括以下至少一个:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;其中,已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比,实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。With reference to the first aspect, in some implementations of the first aspect, the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, Configured bandwidth ratio, or real-time bandwidth usage ratio; among them, the configured bandwidth ratio is the ratio of the total configured bandwidth of online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to The ratio of the configured bandwidth of the service board.
业务板上的在线用户为在业务板上作NAT转换的用户。业务板可以为至少一个用户作NAT转换,故业务板上的在线用户可以为至少一个。Online users on the service board are users who perform NAT conversion on the service board. The service board can perform NAT conversion for at least one user, so there can be at least one online user on the service board.
用户可以开通不同的业务,不同的业务对应不同的带宽,当用户开通了某个业务,并请求连接网络时,业务板可以为用户配置该业务对应的带宽,该业务对应的带宽可以为用户的配置带宽。Users can activate different services, and different services correspond to different bandwidths. When a user activates a certain service and requests to connect to the network, the service board can configure the bandwidth corresponding to the service for the user. The bandwidth corresponding to the service can be the user's bandwidth. Configure bandwidth.
业务板上在线用户的配置带宽为业务板为用户配置的业务的带宽。业务板上在线用户的实时带宽为用户开通业务上线后实际使用的带宽。业务板上在线用户的实时带宽小于或等于业务板上在线用户的配置带宽。The configured bandwidth of the online user on the service board is the service bandwidth configured for the user by the service board. The real-time bandwidth of online users on the service board is the bandwidth actually used after the user activates the service and goes online. The real-time bandwidth of the online users on the service board is less than or equal to the configured bandwidth of the online users on the service board.
业务板的配置带宽可以表示业务板的带宽处理能力。业务板上在线用户的配置带宽总和为业务板上的所有的在线用户的配置带宽之和,故已配置带宽比例可以为业务板上在线用户的配置带宽总和与业务板的配置带宽之比。The configured bandwidth of the service board may represent the bandwidth processing capability of the service board. The sum of the configured bandwidth of online users on the service board is the sum of the configured bandwidths of all online users on the service board, so the configured bandwidth ratio can be the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
业务板上在线用户的实时带宽总和为业务板上的所有的在线用户的实时带宽之和,故实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。The total real-time bandwidth of online users on the service board is the sum of real-time bandwidth of all online users on the service board, so the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
结合第一方面,在第一方面的某些实现方式中,当第一带宽参数包括已配置带宽比例或者实时带宽使用比例时;从多个业务板中选择第一业务板,包括:网络设备获取多个业务板中每个业务板的第一带宽参数;网络设备将多个业务板中第一带宽参数数值最小的业务板确定为第一业务板。With reference to the first aspect, in some implementation manners of the first aspect, when the first bandwidth parameter includes a configured bandwidth ratio or a real-time bandwidth usage ratio; selecting a first service board from multiple service boards includes: obtaining by a network device The first bandwidth parameter of each of the multiple service boards; the network device determines the service board with the smallest value of the first bandwidth parameter among the multiple service boards as the first service board.
网络设备可以获取多个业务板中每个业务板的已配置带宽比例或者实时带宽使用比例,从多个业务板中选择已配置带宽比例或者实时带宽使用比例最小的业务板确定为第一业务板。The network device can obtain the configured bandwidth ratio or the real-time bandwidth usage ratio of each of the multiple service boards, and select the service board with the smallest configured bandwidth ratio or real-time bandwidth usage ratio from the multiple service boards to determine it as the first service board .
已配置带宽比例最小的业务板或者实时带宽使用比例最小的业务板,即剩余带宽最多的业务板,可以为第一用户配置带宽,为第一用户作NAT转换。The service board with the smallest proportion of configured bandwidth or the service board with the smallest proportion of real-time bandwidth usage, that is, the service board with the largest remaining bandwidth, can configure bandwidth for the first user and perform NAT conversion for the first user.
本申请实施例提供的网络地址转换的方法,从多个业务板中选择已配置带宽比例或者实时带宽使用比例最小的业务板确定为第一业务板,即将剩余带宽最多的业务板确定为第一业务板,可以提高业务板的带宽使用率,同时可以为第一用户提供充足的带宽资源,避免超出业务板的配置带宽,有利于提高用户的业务体验。In the method for network address translation provided in the embodiment of the present application, the service board with the smallest configured bandwidth ratio or real-time bandwidth usage ratio is selected from multiple service boards and determined as the first service board, that is, the service board with the largest remaining bandwidth is determined as the first service board. The service board can improve the bandwidth utilization rate of the service board, and at the same time provide sufficient bandwidth resources for the first user to avoid exceeding the configured bandwidth of the service board, which is conducive to improving the user's service experience.
结合第一方面,在第一方面的某些实现方式中,网络设备基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板,包括:在多个业务板中每个业务板的第一带宽参数数值相同的情况下,网络设备将多个业务板中在线用户数最少的业务板确定为第一业务板。With reference to the first aspect, in some implementation manners of the first aspect, the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, including: each of the multiple service boards If the first bandwidth parameter values of the service boards are the same, the network device determines the service board with the least number of online users among the multiple service boards as the first service board.
在多个业务板中每个业务板的已配置带宽比例或者实时带宽使用比例均相同的情 况下,网络设备可以获取多个业务板中每个业务板的在线用户数,将多个业务板中在线用户数最少的业务板确定为第一业务板。When the configured bandwidth ratio or real-time bandwidth utilization ratio of each service board in multiple service boards is the same, the network device can obtain the number of online users of each service board in multiple service boards, and The service board with the least number of online users is determined as the first service board.
本申请实施例提供的网络地址转换的方法,在多个业务板的带宽资源利用率相同的情况下,选择在线用户数最少的业务板确定为第一业务板,可以使每个业务板在线用户数较均匀,有利于提高业务板IP地址资源的使用率,有利于提高用户的业务体验。In the network address translation method provided by the embodiment of the present application, when the bandwidth resource utilization ratios of multiple service boards are the same, the service board with the least number of online users is selected as the first service board, which can make each service board have online users The number is relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
结合第一方面,在第一方面的某些实现方式中,方法还包括:网络设备接收来自第一业务板的第一应答消息,第一应答消息包括第一业务板为第一用户分配的公网互联网协议IP地址和端口号范围;网络设备向用户端设备发送第二应答消息,第二应答消息用于表示第一用户上线成功,第一用户通过用户端设备连接至网络设备。With reference to the first aspect, in some implementations of the first aspect, the method further includes: the network device receives a first response message from the first service board, where the first response message includes the public address assigned by the first service board to the first user. Internet Protocol IP address and port number range; the network device sends a second response message to the client device, and the second response message is used to indicate that the first user is successfully online, and the first user connects to the network device through the client device.
结合第一方面,在第一方面的某些实现方式中,方法还包括:网络设备获取第一业务板的第二带宽参数;当第一业务板的第二带宽参数不满足预设条件时,网络设备基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;网络设备向目标业务板发送第三请求消息,第三请求消息用于指示目标业务板为第一用户作NAT转换。With reference to the first aspect, in some implementations of the first aspect, the method further includes: the network device acquires the second bandwidth parameter of the first service board; when the second bandwidth parameter of the first service board does not meet the preset condition, The network device determines the target service board based on the second bandwidth parameters of other service boards except the first service board among the multiple service boards; the network device sends a third request message to the target service board, and the third request message is used to indicate the target The service board performs NAT conversion for the first user.
目标业务板的第二带宽参数满足预设条件。The second bandwidth parameter of the target service board satisfies a preset condition.
预设条件可以基于第二带宽参数的不同而不同。The preset condition may be different based on the second bandwidth parameter.
在一种可能的实现方式中,当第二带宽参数为实时带宽使用比例时,预设条件可以为实时带宽使用比例小于预设比例。In a possible implementation manner, when the second bandwidth parameter is the real-time bandwidth usage ratio, the preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
在另一种可能的实现方式中,当第二带宽参数为业务板上在线用户的实时带宽时,预设条件可以是业务板上在线用户的实时带宽总和小于预设带宽。In another possible implementation manner, when the second bandwidth parameter is the real-time bandwidth of the online users on the service board, the preset condition may be that the sum of the real-time bandwidths of the online users on the service board is less than the preset bandwidth.
本申请实施例提供的网络地址转换的方法,当第一业务板的第二带宽参数不满足预设条件时,网络设备可以选择满足预设条件的目标业务板为第一用户作NAT转换,可以缓解第一业务板带宽资源紧张的状况,同时可以充分利用目标业务板的带宽资源,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the network address translation method provided in the embodiment of the present application, when the second bandwidth parameter of the first service board does not meet the preset condition, the network device can select the target service board that meets the preset condition to perform NAT translation for the first user, and can Alleviate the tension of the bandwidth resources of the first service board, and at the same time make full use of the bandwidth resources of the target service board, which can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization of the service board, and help improve user business experience.
多个业务板中除第一业务板之外的其他业务板中可能存在至少一个业务板满足预设条件,该至少一个业务板可以为至少一个候选业务板,网络设备可以基于该至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。Among the multiple service boards except the first service board, there may be at least one service board that satisfies the preset condition, the at least one service board may be at least one candidate service board, and the network device may base on the at least one candidate service board The first bandwidth parameter of the board is used to determine the target service board from at least one candidate service board.
本申请实施例提供的网络地址转换的方法,从满足预设条件的候选业务板中确定目标业务板为第一用户作NAT转换,可以缓解第一业务板带宽资源紧张的状况,同时,考虑候选业务板的带宽参数确定目标业务板,可以提高目标业务板的带宽使用率,有利于使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。The method for network address translation provided by the embodiment of the present application determines the target service board to perform NAT conversion for the first user from the candidate service boards that meet the preset conditions, which can alleviate the situation of the bandwidth resource shortage of the first service board. The bandwidth parameter of the service board determines the target service board, which can improve the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards, improving the bandwidth resource utilization rate of the service board, and improving the user's business experience.
结合第一方面,在第一方面的某些实现方式中,第二带宽参数包括业务板上在线用户的实时带宽或实时带宽使用比例。With reference to the first aspect, in some implementation manners of the first aspect, the second bandwidth parameter includes real-time bandwidth or real-time bandwidth usage ratio of online users on the service board.
结合第一方面,在第一方面的某些实现方式中,目标业务板的第二带宽参数满足预设条件。With reference to the first aspect, in some implementation manners of the first aspect, the second bandwidth parameter of the target service board satisfies a preset condition.
结合第一方面,在第一方面的某些实现方式中,网络设备基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板,包括:当多个业务板 中存在除第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,网络设备基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。With reference to the first aspect, in some implementation manners of the first aspect, the network device determines the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board, including: when multiple When the second bandwidth parameter of at least one candidate service board other than the first service board among the service boards satisfies the preset condition, the network device selects from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board. Determine the target business board.
当第一带宽参数包括已配置带宽比例或者实时带宽使用比例时,网络设备可以基于已配置带宽比例或者实时带宽使用比例,计算第一业务板的待转出带宽以及至少一个候选业务板的待转入带宽。When the first bandwidth parameter includes a configured bandwidth ratio or a real-time bandwidth usage ratio, the network device may calculate the to-be-transferred bandwidth of the first service board and the to-be-transferred bandwidth of at least one candidate service board based on the configured bandwidth ratio or the real-time bandwidth usage ratio. Incoming bandwidth.
当至少一个候选业务板存在第二业务板的待转入带宽大于或等于待转出带宽时,网络设备可以将该第二业务板确定为目标业务板。When at least one candidate service board has a second service board whose bandwidth to be transferred is greater than or equal to the bandwidth to be transferred out, the network device may determine the second service board as the target service board.
本申请实施例提供的网络地址转换的方法,目标业务板的待转入带宽资源大于或等于第一业务板的待转出资源,可以缓解第一业务板带宽资源紧张的状况的同时,目标业务板为第一用户作NAT转换可以不超出预设条件,还可以提高目标业务板的带宽使用率,有利于使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the network address translation method provided by the embodiment of the present application, the bandwidth resources to be transferred to the target service board are greater than or equal to the resources to be transferred out of the first service board, which can alleviate the shortage of bandwidth resources of the first service board and at the same time, target business The board can perform NAT conversion for the first user without exceeding the preset conditions, and can also increase the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards and improving the bandwidth resource utilization rate of the service board , which is conducive to improving the user's service experience.
结合第一方面,在第一方面的某些实现方式中,网络设备基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板,包括:网络设备基于第一业务板的第一带宽参数,计算第一业务板的待转出带宽;网络设备基于至少一个候选业务板的第一带宽参数,计算至少一个候选业务板的待转入带宽;网络设备基于待转出带宽和待转入带宽,从至少一个候选业务板中确定目标业务板。With reference to the first aspect, in some implementation manners of the first aspect, the network device determines a target service board from at least one candidate service board based on a first bandwidth parameter of at least one candidate service board, including: the network device determines a target service board based on the first service board The first bandwidth parameter of the board calculates the to-be-transferred bandwidth of the first service board; the network device calculates the to-be-transferred bandwidth of at least one candidate service board based on the first bandwidth parameter of at least one candidate service board; the network device calculates the to-be-transferred bandwidth of at least one candidate service board based on the The bandwidth and the bandwidth to be transferred are determined from at least one candidate service board to determine the target service board.
结合第一方面,在第一方面的某些实现方式中,在网络设备向目标业务板发送第三请求消息之前,方法还包括:网络设备基于第一业务板的在线用户数、第一业务板上在线用户的实时带宽、或第一业务板上在线用户的配置带宽中的至少一个参数确定第一用户。With reference to the first aspect, in some implementation manners of the first aspect, before the network device sends the third request message to the target service board, the method further includes: the network device based on the number of online users of the first service board, the first service board The first user is determined by at least one parameter of the real-time bandwidth of the online user or the configured bandwidth of the online user on the first service board.
本申请实施例提供的网络地址转换的方法,可以基于在线用户数或者带宽参数确定第一用户,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,同时可以使每个业务板在线用户数较均匀,有利于提高业务板IP地址资源的使用率,有利于提高用户的业务体验。The network address translation method provided in the embodiment of the present application can determine the first user based on the number of online users or bandwidth parameters, can make the bandwidth usage ratio among multiple service boards more balanced, and improve the bandwidth resource utilization ratio of the service boards, and at the same time It can make the number of online users of each service board relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
结合第一方面,在第一方面的某些实现方式中,在网络设备向目标业务板发送第三请求消息之后,方法还包括:网络设备接收来自目标业务板的第三应答消息,第三应答消息包括目标业务板为第一用户分配的新的公网IP地址和新的端口号范围。With reference to the first aspect, in some implementations of the first aspect, after the network device sends the third request message to the target service board, the method further includes: the network device receives a third response message from the target service board, and the third response The message includes a new public network IP address and a new port number range allocated to the first user by the target service board.
第一用户上线时,可以使用第一业务板分配的公网IP地址和端口号范围,网络设备向目标业务板发送第三请求消息之后,目标业务板可以为第一用户分配新的公网IP地址和新的端口号范围,并发送给网络设备,网络设备接收到新的公网IP地址和新的端口号范围后,当检测到第一用户访问网络时,网络设备可以新的公网IP地址和新的端口号范围为第一用户提供网络服务。When the first user goes online, the public network IP address and port number range allocated by the first service board can be used. After the network device sends the third request message to the target service board, the target service board can allocate a new public network IP for the first user. The address and the new port number range are sent to the network device. After the network device receives the new public network IP address and the new port number range, when it detects that the first user accesses the network, the network device can use the new public network IP The range of addresses and new port numbers provides network services to the first user.
本申请实施例提供的网络地址转换的方法,目标业务板可以为第一用户分配新的公网IP地址和新的端口号范围,第一用户可以通过目标业务板访问网络,可以提高目标业务板的带宽资源利用率。In the method for network address translation provided in the embodiment of the present application, the target service board can allocate a new public network IP address and a new port number range for the first user, and the first user can access the network through the target service board, which can improve the target service board bandwidth resource utilization.
结合第一方面,在第一方面的某些实现方式中,方法还包括:网络设备向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP 地址和原端口号范围。With reference to the first aspect, in some implementation manners of the first aspect, the method further includes: the network device sends a fourth request message to the first service board, and the fourth request message is used to notify the first service board to release the original Public network IP address and original port number range.
本申请实施例提供的网络地址转换的方法,目标业务板为第一用户作NAT转换后,第一业务板可以释放第一用户的原公网IP地址和原端口号范围,可以节省内存资源,同时第一用户不会存在两个公网IP地址和端口号范围,访问网络时不易出错。In the network address translation method provided in the embodiment of the present application, after the target service board performs NAT conversion for the first user, the first service board can release the original public network IP address and the original port number range of the first user, which can save memory resources. At the same time, the first user does not have two ranges of public network IP addresses and port numbers, so it is not easy to make mistakes when accessing the network.
结合第一方面,在第一方面的某些实现方式中,在网络设备基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板之前,方法还包括:网络设备基于第一请求消息,向认证服务器发送第五请求消息,第五请求消息用于为第一用户请求认证;网络设备在认证成功的情况下,为第一用户分配私网IP地址;网络设备向第一用户发送第五应答消息,第五应答消息用于表示网络设备为第一用户分配的私网IP地址。With reference to the first aspect, in some implementation manners of the first aspect, before the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, the method further includes: the network device selects the first service board based on The first request message sends the fifth request message to the authentication server, and the fifth request message is used to request authentication for the first user; when the authentication is successful, the network device allocates a private network IP address for the first user; the network device sends the first user a private network IP address; A user sends a fifth response message, where the fifth response message is used to indicate the private IP address allocated by the network device to the first user.
结合第一方面,在第一方面的某些实现方式中,网络设备为宽带接入服务器、执行宽带接入功能的用户面设备或者控制面设备。With reference to the first aspect, in some implementation manners of the first aspect, the network device is a broadband access server, a user plane device or a control plane device that performs a broadband access function.
结合第一方面,在第一方面的某些实现方式中,多个业务板部署在网络设备中。With reference to the first aspect, in some implementation manners of the first aspect, multiple service boards are deployed in the network device.
第二方面,本申请提供了一种网络地址转换的方法,该方法包括:网络设备获取第一业务板的第二带宽参数,第一业务板包括在多个业务板中,第一业务板为第一用户作NAT转换;当第一业务板的第二带宽参数不满足预设条件时,网络设备基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;网络设备向目标业务板发送第三请求消息,第三请求消息用于指示目标业务板为第一用户作NAT转换。In a second aspect, the present application provides a method for network address translation, the method comprising: a network device acquires a second bandwidth parameter of a first service board, the first service board is included in multiple service boards, and the first service board is The first user performs NAT conversion; when the second bandwidth parameter of the first service board does not meet the preset condition, the network device determines based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board The target service board: the network device sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
本申请实施例提供的网络地址转换的方法,当第一业务板的第二带宽参数不满足预设条件时,网络设备可以选择满足预设条件的目标业务板为第一用户作NAT转换,可以缓解第一业务板带宽资源紧张的状况,同时可以充分利用目标业务板的带宽资源,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the network address translation method provided in the embodiment of the present application, when the second bandwidth parameter of the first service board does not meet the preset condition, the network device can select the target service board that meets the preset condition to perform NAT translation for the first user, and can Alleviate the tension of the bandwidth resources of the first service board, and at the same time make full use of the bandwidth resources of the target service board, which can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization of the service board, and help improve user business experience.
结合第二方面,在第二方面的某些实现方式中,第二带宽参数包括业务板上在线用户的实时带宽或实时带宽使用比例,其中,实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。With reference to the second aspect, in some implementations of the second aspect, the second bandwidth parameter includes the real-time bandwidth or the real-time bandwidth usage ratio of the online users on the service board, where the real-time bandwidth usage ratio is the real-time bandwidth of the online users on the service board The ratio of the sum to the configured bandwidth of the service board.
结合第二方面,在第二方面的某些实现方式中,在网络设备获取第一业务板的第二带宽参数之前,方法还包括:网络设备接收第一请求消息,第一请求消息用于请求第一用户上线;网络设备基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板;网络设备向第一业务板发送第二请求消息,第二请求消息用于指示第一业务板为第一用户作NAT转换。With reference to the second aspect, in some implementation manners of the second aspect, before the network device obtains the second bandwidth parameter of the first service board, the method further includes: the network device receives a first request message, and the first request message is used to request The first user goes online; the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards; the network device sends a second request message to the first service board, and the second request message is used to indicate The first service board performs NAT conversion for the first user.
本申请实施例提供的网络地址转换的方法,从满足预设条件的候选业务板中确定目标业务板为第一用户作NAT转换,可以缓解第一业务板带宽资源紧张的状况,同时,考虑候选业务板的带宽参数确定目标业务板,可以提高目标业务板的带宽使用率,有利于使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。The method for network address translation provided by the embodiment of the present application determines the target service board to perform NAT conversion for the first user from the candidate service boards that meet the preset conditions, which can alleviate the situation of the bandwidth resource shortage of the first service board. The bandwidth parameter of the service board determines the target service board, which can improve the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards, improving the bandwidth resource utilization rate of the service board, and improving the user's business experience.
结合第二方面,在第二方面的某些实现方式中,第一带宽参数包括以下至少一个:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;其中,已配置带宽比例为业务板上在线用户 的配置带宽总和与业务板的配置带宽之比。With reference to the second aspect, in some implementations of the second aspect, the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, Configured bandwidth ratio, or real-time bandwidth usage ratio; wherein, the configured bandwidth ratio is the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
结合第二方面,在第二方面的某些实现方式中,网络设备基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板,包括:当多个业务板中存在除第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,网络设备基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。With reference to the second aspect, in some implementation manners of the second aspect, the network device determines the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board, including: when multiple When the second bandwidth parameter of at least one candidate service board other than the first service board among the service boards satisfies the preset condition, the network device selects from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board. Determine the target business board.
结合第二方面,在第二方面的某些实现方式中,网络设备基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板,包括:网络设备基于第一业务板的第一带宽参数,计算第一业务板的待转出带宽;网络设备基于至少一个候选业务板的第一带宽参数,计算至少一个候选业务板的待转入带宽;网络设备基于待转出带宽和待转入带宽,从至少一个候选业务板中确定目标业务板。With reference to the second aspect, in some implementation manners of the second aspect, the network device determines the target service board from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board, including: the network device determines the target service board based on the first service board The first bandwidth parameter of the board calculates the to-be-transferred bandwidth of the first service board; the network device calculates the to-be-transferred bandwidth of at least one candidate service board based on the first bandwidth parameter of at least one candidate service board; the network device calculates the to-be-transferred bandwidth of at least one candidate service board based on the The bandwidth and the bandwidth to be transferred are determined from at least one candidate service board to determine the target service board.
当至少一个候选业务板存在第二业务板的待转入带宽大于或等于待转出带宽时,网络设备可以将该第二业务板确定为目标业务板。When at least one candidate service board has a second service board whose bandwidth to be transferred is greater than or equal to the bandwidth to be transferred out, the network device may determine the second service board as the target service board.
本申请实施例提供的网络地址转换的方法,目标业务板的待转入带宽资源大于或等于第一业务板的待转出资源,可以缓解第一业务板带宽资源紧张的状况的同时,目标业务板为第一用户作NAT转换可以不超出预设条件,还可以提高目标业务板的带宽使用率,有利于使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the network address translation method provided by the embodiment of the present application, the bandwidth resources to be transferred to the target service board are greater than or equal to the resources to be transferred out of the first service board, which can alleviate the shortage of bandwidth resources of the first service board and at the same time, target business The board can perform NAT conversion for the first user without exceeding the preset conditions, and can also increase the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards and improving the bandwidth resource utilization rate of the service board , which is conducive to improving the user's service experience.
结合第二方面,在第二方面的某些实现方式中,在网络设备向目标业务板发送第三请求消息之前,方法还包括:网络设备基于第一业务板的在线用户数、第一业务板上在线用户的实时带宽、或第一业务板上在线用户的配置带宽中的至少一个参数确定第一用户。With reference to the second aspect, in some implementations of the second aspect, before the network device sends the third request message to the target service board, the method further includes: the network device based on the number of online users of the first service board, the first service board The first user is determined by at least one parameter of the real-time bandwidth of the online user or the configured bandwidth of the online user on the first service board.
本申请实施例提供的网络地址转换的方法,可以基于在线用户数或者带宽参数确定第一用户,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,同时可以使每个业务板在线用户数较均匀,有利于提高业务板IP地址资源的使用率,有利于提高用户的业务体验。The network address translation method provided in the embodiment of the present application can determine the first user based on the number of online users or bandwidth parameters, can make the bandwidth usage ratio among multiple service boards more balanced, and improve the bandwidth resource utilization ratio of the service boards, and at the same time It can make the number of online users of each service board relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
结合第二方面,在第二方面的某些实现方式中,在网络设备向目标业务板发送第三请求消息之后,方法还包括:网络设备向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。With reference to the second aspect, in some implementations of the second aspect, after the network device sends the third request message to the target service board, the method further includes: the network device sends a fourth request message to the first service board, and the fourth request The message is used to notify the first service board to release the range of the original public network IP address and the original port number of the first user.
本申请实施例提供的网络地址转换的方法,目标业务板为第一用户作NAT转换后,第一业务板可以释放第一用户的原公网IP地址和原端口号范围,可以节省内存资源,同时第一用户不会存在两个公网IP地址和端口号范围,访问网络时不易出错。In the network address translation method provided in the embodiment of the present application, after the target service board performs NAT conversion for the first user, the first service board can release the original public network IP address and the original port number range of the first user, which can save memory resources. At the same time, the first user does not have two ranges of public network IP addresses and port numbers, so it is not easy to make mistakes when accessing the network.
第三方面,本申请提供了一种网络地址转换的装置,该装置包括:收发模块和处理模块。收发模块用于:接收第一请求消息,第一请求消息用于请求第一用户上线。处理模块用于:基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板;收发模块还用于:向第一业务板发送第二请求消息,第二请求消息用于指示第一业务板为第一用户作NAT转换。In a third aspect, the present application provides a network address translation device, which includes: a transceiver module and a processing module. The transceiver module is used for: receiving a first request message, where the first request message is used to request the first user to go online. The processing module is used to: select the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards; the transceiver module is also used to: send a second request message to the first service board, and the second request message uses To instruct the first service board to perform NAT conversion for the first user.
结合第三方面,在第三方面的某些实现方式中,第一带宽参数包括以下至少一个:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、 已配置带宽比例、或实时带宽使用比例;其中,已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比,实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。With reference to the third aspect, in some implementations of the third aspect, the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, Configured bandwidth ratio, or real-time bandwidth usage ratio; among them, the configured bandwidth ratio is the ratio of the total configured bandwidth of online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to The ratio of the configured bandwidth of the service board.
结合第三方面,在第三方面的某些实现方式中,当第一带宽参数包括已配置带宽比例或者实时带宽使用比例时,装置还包括获取模块;获取模块用于:获取多个业务板中每个业务板的第一带宽参数;处理模块还用于:将多个业务板中第一带宽参数数值最小的业务板确定为第一业务板。With reference to the third aspect, in some implementation manners of the third aspect, when the first bandwidth parameter includes a configured bandwidth ratio or a real-time bandwidth usage ratio, the device further includes an acquisition module; the acquisition module is configured to: acquire the bandwidth in multiple service boards The first bandwidth parameter of each service board; the processing module is also used to: determine the service board with the smallest value of the first bandwidth parameter among the multiple service boards as the first service board.
结合第三方面,在第三方面的某些实现方式中,处理模块还用于:在多个业务板中每个业务板的第一带宽参数数值相同的情况下,将多个业务板中在线用户数最少的业务板确定为第一业务板。With reference to the third aspect, in some implementation manners of the third aspect, the processing module is further configured to: when the first bandwidth parameter value of each service board among the multiple service boards is the same, connect the multiple service boards online The service board with the least number of users is determined as the first service board.
结合第三方面,在第三方面的某些实现方式中,收发模块还用于:接收来自第一业务板的第一应答消息,第一应答消息包括第一业务板为第一用户分配的公网互联网协议IP地址和端口号范围;向用户端设备发送第二应答消息,第二应答消息用于表示第一用户上线成功,第一用户通过用户端设备连接至网络设备。With reference to the third aspect, in some implementation manners of the third aspect, the transceiver module is further configured to: receive a first response message from the first service board, where the first response message includes the public address assigned by the first service board to the first user. Internet protocol IP address and port number range; send a second response message to the client device, the second response message is used to indicate that the first user is successfully online, and the first user is connected to the network device through the client device.
结合第三方面,在第三方面的某些实现方式中,上述装置还包括获取模块;获取模块用于:获取第一业务板的第二带宽参数;处理模块还用于:当第一业务板的第二带宽参数不满足预设条件时,基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;收发模块还用于:向目标业务板发送第三请求消息,第三请求消息用于指示目标业务板为第一用户作NAT转换。With reference to the third aspect, in some implementation manners of the third aspect, the above device further includes an acquisition module; the acquisition module is used to: acquire the second bandwidth parameter of the first service board; the processing module is also used to: when the first service board When the second bandwidth parameter does not meet the preset condition, determine the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board; the transceiver module is also used to: send to the target service board Sending a third request message, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
结合第三方面,在第三方面的某些实现方式中,第二带宽参数包括业务板上在线用户的实时带宽或实时带宽使用比例。With reference to the third aspect, in some implementation manners of the third aspect, the second bandwidth parameter includes a real-time bandwidth or a real-time bandwidth usage ratio of online users on the service board.
结合第三方面,在第三方面的某些实现方式中,目标业务板的第二带宽参数满足预设条件。With reference to the third aspect, in some implementation manners of the third aspect, the second bandwidth parameter of the target service board satisfies a preset condition.
结合第三方面,在第三方面的某些实现方式中,处理模块还用于:当多个业务板中存在除第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。With reference to the third aspect, in some implementation manners of the third aspect, the processing module is further configured to: when there is at least one candidate service board in the plurality of service boards other than the first service board, the second bandwidth parameter satisfies the preset When the condition is met, the target service board is determined from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board.
结合第三方面,在第三方面的某些实现方式中,处理模块还用于:基于第一业务板的第一带宽参数,计算第一业务板的待转出带宽;基于至少一个候选业务板的第一带宽参数,计算至少一个候选业务板的待转入带宽;基于待转出带宽和待转入带宽,从至少一个候选业务板中确定目标业务板。In conjunction with the third aspect, in some implementations of the third aspect, the processing module is further configured to: calculate the bandwidth to be transferred out of the first service board based on the first bandwidth parameter of the first service board; Calculate the bandwidth to be transferred in of at least one candidate service board according to the first bandwidth parameter; determine the target service board from the at least one candidate service board based on the bandwidth to be transferred out and the bandwidth to be transferred in.
结合第三方面,在第三方面的某些实现方式中,处理模块还用于:基于第一业务板的在线用户数、第一业务板上在线用户的实时带宽、或第一业务板上在线用户的配置带宽中的至少一个参数确定第一用户。With reference to the third aspect, in some implementation manners of the third aspect, the processing module is further configured to: based on the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the number of online users on the first service board At least one parameter in the user's configured bandwidth identifies the first user.
结合第三方面,在第三方面的某些实现方式中,收发模块还用于:接收来自目标业务板的第三应答消息,第三应答消息包括目标业务板为第一用户分配的新的公网IP地址和新的端口号范围。With reference to the third aspect, in some implementation manners of the third aspect, the transceiver module is further configured to: receive a third response message from the target service board, where the third response message includes the new public address assigned by the target service board to the first user. Network IP address and new port number range.
结合第三方面,在第三方面的某些实现方式中,收发模块还用于:向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。With reference to the third aspect, in some implementation manners of the third aspect, the transceiver module is further configured to: send a fourth request message to the first service board, and the fourth request message is used to notify the first service board to release the original Public network IP address and original port number range.
结合第三方面,在第三方面的某些实现方式中,收发模块还用于:基于第一请求消息,向认证服务器发送第五请求消息,第五请求消息用于为第一用户请求认证;处理模块还用于:在认证成功的情况下,为第一用户分配私网IP地址;收发模块还用于:向第一用户发送第五应答消息,第五应答消息用于表示装置为第一用户分配的私网IP地址。With reference to the third aspect, in some implementations of the third aspect, the transceiver module is further configured to: based on the first request message, send a fifth request message to the authentication server, where the fifth request message is used to request authentication for the first user; The processing module is also used for: in the case of successful authentication, assigning a private network IP address to the first user; Private IP address assigned by the user.
结合第三方面,在第三方面的某些实现方式中,上述装置为宽带接入服务器、执行宽带接入功能的用户面设备或者控制面设备。With reference to the third aspect, in some implementation manners of the third aspect, the foregoing apparatus is a broadband access server, a user plane device or a control plane device that performs a broadband access function.
结合第三方面,在第三方面的某些实现方式中,多个业务板部署在装置中。With reference to the third aspect, in some implementation manners of the third aspect, multiple service boards are deployed in the device.
第四方面,本申请提供了一种网络地址转换的装置,该装置包括:获取模块、处理模块以及收发模块。获取模块用于:获取第一业务板的第二带宽参数,第一业务板包括在多个业务板中,第一业务板为第一用户作NAT转换;处理模块用于:当第一业务板的第二带宽参数不满足预设条件时,基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;收发模块用于:向目标业务板发送第三请求消息,第三请求消息用于指示目标业务板为第一用户作NAT转换。In a fourth aspect, the present application provides a network address translation device, which includes: an acquisition module, a processing module, and a transceiver module. The obtaining module is used for: obtaining the second bandwidth parameter of the first service board, the first service board is included in a plurality of service boards, and the first service board performs NAT conversion for the first user; the processing module is used for: when the first service board When the second bandwidth parameter does not meet the preset condition, the target service board is determined based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board; the transceiver module is used to: send to the target service board A third request message, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
结合第四方面,在第四方面的某些实现方式中,第二带宽参数包括业务板上在线用户的实时带宽或实时带宽使用比例,其中,实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。With reference to the fourth aspect, in some implementations of the fourth aspect, the second bandwidth parameter includes the real-time bandwidth or the real-time bandwidth usage ratio of the online users on the service board, where the real-time bandwidth usage ratio is the real-time bandwidth of the online users on the service board The ratio of the sum to the configured bandwidth of the service board.
结合第四方面,在第四方面的某些实现方式中,收发模块还用于:接收第一请求消息,第一请求消息用于请求第一用户上线;处理模块还用于:基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板;收发模块还用于:向第一业务板发送第二请求消息,第二请求消息用于指示第一业务板为第一用户作NAT转换。With reference to the fourth aspect, in some implementations of the fourth aspect, the transceiver module is further configured to: receive a first request message, and the first request message is used to request the first user to go online; the processing module is further configured to: based on multiple services The first bandwidth parameter of the board is to select the first service board from multiple service boards; the transceiver module is also used to: send a second request message to the first service board, and the second request message is used to indicate that the first service board is the first The user performs NAT conversion.
结合第四方面,在第四方面的某些实现方式中,第一带宽参数包括以下至少一个:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;其中,已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比。With reference to the fourth aspect, in some implementations of the fourth aspect, the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, Configured bandwidth ratio, or real-time bandwidth usage ratio; wherein, the configured bandwidth ratio is the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
结合第四方面,在第四方面的某些实现方式中,处理模块还用于:当多个业务板中存在除第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。With reference to the fourth aspect, in some implementations of the fourth aspect, the processing module is further configured to: when there is at least one candidate service board in the multiple service boards except the first service board, the second bandwidth parameter satisfies the preset When the condition is met, the target service board is determined from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board.
结合第四方面,在第四方面的某些实现方式中,处理模块还用于:基于第一业务板的第一带宽参数,计算第一业务板的待转出带宽;基于至少一个候选业务板的第一带宽参数,计算至少一个候选业务板的待转入带宽;基于待转出带宽和待转入带宽,从至少一个候选业务板中确定目标业务板。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the processing module is further configured to: calculate the bandwidth to be transferred out of the first service board based on the first bandwidth parameter of the first service board; Calculate the bandwidth to be transferred in of at least one candidate service board according to the first bandwidth parameter; determine the target service board from the at least one candidate service board based on the bandwidth to be transferred out and the bandwidth to be transferred in.
结合第四方面,在第四方面的某些实现方式中,处理模块还用于:基于第一业务板的在线用户数、第一业务板上在线用户的实时带宽、或第一业务板上在线用户的配置带宽中的至少一个参数确定第一用户。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the processing module is further configured to: based on the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the number of online users on the first service board At least one parameter in the user's configured bandwidth identifies the first user.
结合第四方面,在第四方面的某些实现方式中,收发模块还用于:向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。With reference to the fourth aspect, in some implementation manners of the fourth aspect, the transceiver module is further configured to: send a fourth request message to the first service board, and the fourth request message is used to notify the first service board to release the original Public network IP address and original port number range.
第五方面,本申请提供了一种网络地址转换的装置,包括处理器,该处理器与存 储器耦合,可用于执行存储器中的指令,以实现上述第一方面或第二方面中任一种可能实现方式中的方法。可选地,该网络地址转换的装置还包括存储器。可选地,该网络地址转换的装置还包括通信接口,处理器与通信接口耦合。In the fifth aspect, the present application provides a device for network address translation, including a processor, the processor is coupled with a memory, and can be used to execute instructions in the memory, so as to realize any possibility in the first aspect or the second aspect above method in the implementation. Optionally, the device for network address translation further includes a memory. Optionally, the device for network address translation further includes a communication interface, and the processor is coupled to the communication interface.
第六方面,本申请提供了一种处理器,包括:输入电路、输出电路和处理电路。处理电路用于通过输入电路接收信号,并通过输出电路发射信号,使得处理器执行上述第一方面或第二方面中任一种可能实现方式中的方法。In a sixth aspect, the present application provides a processor, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation manner of the first aspect or the second aspect above.
在具体实现过程中,上述处理器可以为芯片,输入电路可以为输入管脚,输出电路可以为输出管脚,处理电路可以为晶体管、门电路、触发器和各种逻辑电路等。输入电路所接收的输入的信号可以是由例如但不限于接收器接收并输入的,输出电路所输出的信号可以是例如但不限于输出给发射器并由发射器发射的,且输入电路和输出电路可以是同一电路,该电路在不同的时刻分别用作输入电路和输出电路。本申请对处理器及各种电路的具体实现方式不做限定。In a specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a flip-flop, and various logic circuits. The input signal received by the input circuit may be received and input by, for example but not limited to, the receiver, the output signal of the output circuit may be, for example but not limited to, output to the transmitter and transmitted by the transmitter, and the input circuit and the output The circuit may be the same circuit, which is used as an input circuit and an output circuit respectively at different times. The present application does not limit the specific implementation manners of the processor and various circuits.
第七方面,本申请提供了一种处理装置,包括处理器和存储器。该处理器用于读取存储器中存储的指令,并可通过接收器接收信号,通过发射器发射信号,以执行上述第一方面或第二方面中任一种可能实现方式中的方法。In a seventh aspect, the present application provides a processing device, including a processor and a memory. The processor is used to read instructions stored in the memory, and may receive signals through the receiver and transmit signals through the transmitter, so as to execute the method in any possible implementation manner of the first aspect or the second aspect above.
可选地,处理器为一个或多个,存储器为一个或多个。Optionally, there are one or more processors, and one or more memories.
可选地,存储器可以与处理器集成在一起,或者存储器与处理器分离设置。Optionally, the memory may be integrated with the processor, or the memory may be separated from the processor.
在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不做限定。In the specific implementation process, the memory can be a non-transitory (non-transitory) memory, such as a read-only memory (read only memory, ROM), which can be integrated with the processor on the same chip, or can be respectively arranged in different On the chip, the application does not limit the type of the memory and the arrangement of the memory and the processor.
应理解,相关的数据交互过程例如发送指示信息可以为从处理器输出指示信息的过程,接收能力信息可以为处理器接收输入能力信息的过程。具体地,处理输出的数据可以输出给发射器,处理器接收的输入数据可以来自接收器。其中,发射器和接收器可以统称为收发器。It should be understood that a related data interaction process such as sending indication information may be a process of outputting indication information from a processor, and receiving capability information may be a process of receiving input capability information from a processor. In particular, processed output data may be output to the transmitter, and input data received by the processor may be from the receiver. Wherein, the transmitter and the receiver may be collectively referred to as a transceiver.
上述第七方面中的处理装置可以是一个芯片,该处理器可以通过硬件来实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。The processing device in the seventh aspect above can be a chip, and the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software When implemented, the processor may be a general-purpose processor, which is realized by reading the software code stored in the memory, and the memory may be integrated in the processor, or it may be located outside the processor and exist independently.
第八方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序(也可以称为代码,或指令)当其在计算机上运行时,使得计算机执行上述第一方面或第二方面中任一种可能实现方式中的方法。In an eighth aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program (also referred to as a code, or an instruction) which, when run on a computer, enables the computer to perform the above-mentioned first A method in any possible implementation manner of the aspect or the second aspect.
第九方面,本申请提供了一种计算机程序产品,计算机程序产品包括:计算机程序(也可以称为代码,或指令),当计算机程序被运行时,使得计算机执行上述第一方面或第二方面中任一种可能实现方式中的方法。In the ninth aspect, the present application provides a computer program product, the computer program product includes: a computer program (also called code, or instruction), when the computer program is executed, the computer executes the above-mentioned first aspect or the second aspect A method in any of the possible implementations.
第十方面,本申请提供了一种网络地址转换的系统,该网络地址转换的系统包括网络设备,该网络设备用于执行上述第一方面或第二方面中任一种可能实现方式中的方法。In a tenth aspect, the present application provides a network address translation system, the network address translation system includes a network device, and the network device is used to execute the method in any possible implementation manner of the first aspect or the second aspect above .
图1是本申请实施例适用的一种通信系统的架构示意图;FIG. 1 is a schematic diagram of a communication system applicable to an embodiment of the present application;
图2是本申请实施例适用的另一种通信系统的架构示意图;FIG. 2 is a schematic structural diagram of another communication system applicable to an embodiment of the present application;
图3是本申请实施例提供的一种网络地址转换的方法的示意性流程图;FIG. 3 is a schematic flowchart of a method for network address translation provided in an embodiment of the present application;
图4是本申请实施例提供的另一种网络地址转换的方法的示意性流程图;FIG. 4 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application;
图5是本申请实施例提供的又一种网络地址转换的方法的示意性流程图;FIG. 5 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application;
图6是本申请实施例提供的另一种网络地址转换的方法的示意性流程图;FIG. 6 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application;
图7是本申请实施例提供的又一种网络地址转换的方法的示意性流程图;FIG. 7 is a schematic flowchart of another network address translation method provided by an embodiment of the present application;
图8是本申请实施例提供的另一种网络地址转换的方法的示意性流程图;FIG. 8 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application;
图9是本申请实施例提供的又一种网络地址转换的方法的示意性流程图;FIG. 9 is a schematic flowchart of another network address translation method provided by an embodiment of the present application;
图10是本申请实施例提供的另一种网络地址转换的方法的示意性流程图;FIG. 10 is a schematic flowchart of another method for network address translation provided by an embodiment of the present application;
图11是本申请实施例提供的一种网络地址转换的装置的示意性框图;FIG. 11 is a schematic block diagram of an apparatus for network address translation provided by an embodiment of the present application;
图12是本申请实施例提供的另一种网络地址转换的装置的示意性框图;FIG. 12 is a schematic block diagram of another network address translation device provided by an embodiment of the present application;
图13是本申请实施例提供的又一种网络地址转换的装置的示意性框图。Fig. 13 is a schematic block diagram of another network address translation device provided by an embodiment of the present application.
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below with reference to the accompanying drawings.
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一指示信息和第二指示信息是为了区分不同的指示信息,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. For example, the first indication information and the second indication information are for distinguishing different indication information, and the sequence thereof is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not necessarily limit the difference.
需要说明的是,本申请中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in this application, words such as "exemplarily" or "for example" are used as examples, illustrations or illustrations. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a concrete manner.
此外,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b和c中的至少一项(个),可以表示:a,或b,或c,或a和b,或a和c,或b和c,或a、b和c,其中a,b,c可以是单个,也可以是多个。In addition, "at least one" means one or more, and "plurality" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (one) of a, b and c may represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, wherein a, b, c can be single or multiple.
随着全球快速增长的网络用户、智能手机以及个人电脑等互联网设备迅速消耗掉了IPv4地址,IPv4地址枯竭已成为制约网络发展的瓶颈。目前,网络地址转换(network address translation,NAT)可以暂时缓解因IPv4地址枯竭而制约网络发展的问题。NAT可以将内部网络的多个私网互联网协议(internet protocol,IP)地址映射为一个公网IP地址,同时可以用不同的协议端口号与不同的私网IP地址对应。因此,一个局域网可以只需要少量的公网IP地址即可实现多个私网IP地址网络内的所有网络设备与互联网的通信需求。With the rapid growth of global Internet users, Internet devices such as smart phones and personal computers, IPv4 addresses are rapidly consumed, and the exhaustion of IPv4 addresses has become a bottleneck restricting network development. At present, network address translation (NAT) can temporarily alleviate the problem of restricting network development due to the exhaustion of IPv4 addresses. NAT can map multiple private network Internet protocol (internet protocol, IP) addresses of the internal network to a public network IP address, and can use different protocol port numbers to correspond to different private network IP addresses. Therefore, a local area network may only need a small number of public network IP addresses to meet the communication requirements of all network devices in the network with multiple private network IP addresses and the Internet.
宽带接入服务器(broadband remote access server,BRAS)是面向宽带网络应用的新型接入网关,可以完成用户带宽的IP或者异步传输模式(asynchronous transfer mode,ATM)网的数据接入,实现商业楼宇及小区住户的宽带上网、构建企业内部网(intranet)、支持互联网服务提供商(internet service provider,ISP)向用户批发业务等应用。Broadband remote access server (broadband remote access server, BRAS) is a new type of access gateway for broadband network applications. Applications such as broadband Internet access for community residents, construction of intranets, and support for Internet service providers (Internet Service Providers, ISPs) to wholesale services to users.
在具体网络中,BRAS模块部署在网络边缘,用户上线时基于用户数进行负载分担选择运营商级NAT(carrier grade NAT,CGN)单板分配公网IP地址,当前用户上线时,BRAS模块会统计每块CGN业务单板用户数,基于用户数进行负载分担,保证每个业务单板用户数均匀,从而保证IP地址在每个业务板上使用率比较平均。In a specific network, the BRAS module is deployed at the edge of the network. When a user goes online, load sharing is performed based on the number of users, and a carrier-grade NAT (carrier grade NAT, CGN) board is selected to allocate a public network IP address. When the current user goes online, the BRAS module will count The number of users on each CGN service board is based on the number of users for load sharing to ensure that the number of users on each service board is even, thereby ensuring that the IP address is used more evenly on each service board.
在接入网络的互联网设备较多,且公网IP地址有限的情况下,BRAS可以通过多块CGN业务板进行流量负载分担实现IP资源的充分利用。在一种可能的情况下,CGN单板可以集成在接入网关设备中,即同一台接入网关路由器同时包括BRAS模块和CGN单板。本申请实施例对CGN单板的部署方式不做限定。When there are many Internet devices connected to the network and the public network IP addresses are limited, the BRAS can perform traffic load sharing through multiple CGN service boards to fully utilize IP resources. In a possible situation, the CGN single board can be integrated in the access gateway device, that is, the same access gateway router includes both the BRAS module and the CGN single board. The embodiment of this application does not limit the deployment mode of the CGN board.
当用户请求上线时,BRAS可以基于业务板的在线用户数从多个业务板中选择一个业务板为该用户作NAT转换。但是,当用户的接入带宽不同时,会导致业务板之间带宽资源使用不均衡,降低业务板的带宽使用率。When a user requests to go online, the BRAS can select a service board from multiple service boards to perform NAT conversion for the user based on the number of online users of the service board. However, when users have different access bandwidths, the use of bandwidth resources between service boards will be unbalanced, reducing the bandwidth usage of the service boards.
应理解,本申请实施例中的用户可以理解为互联网设备。It should be understood that the user in the embodiment of the present application may be understood as an Internet device.
下面,结合图1和图2所示的通信系统,对基于业务板的在线用户数从多个业务板中选择业务板的方法进行详细说明。Next, the method of selecting a service board from multiple service boards based on the number of online users of the service board will be described in detail with reference to the communication system shown in FIG. 1 and FIG. 2 .
示例性地,图1示出了一种通信系统100的架构图。如图1所示,该通信系统100可以包括智能手机101、笔记本电脑102、部署内部网的企业所使用的设备103、部署宽带的家庭所使用的设备104、用户端设备(user premise equipment,CPE)105、路由器106以及服务器107。路由器106中可以包括主控板(main processing unit,MPU)1061、业务板1、业务板2以及业务板3。路由器106还可以包括BRAS模块,即路由器106可以执行宽带接入功能。应理解,图1中的业务板的个数仅仅为一个示例,本申请实施例对此并不做限定。Exemplarily, FIG. 1 shows a structure diagram of a communication system 100 . As shown in FIG. 1 , the communication system 100 may include a smart phone 101, a notebook computer 102, a device 103 used by an enterprise deploying an intranet, a device 104 used by a family deploying broadband, and user premise equipment (CPE). ) 105, router 106 and server 107. The router 106 may include a main processing unit (main processing unit, MPU) 1061, a service board 1, a service board 2, and a service board 3. The router 106 may also include a BRAS module, that is, the router 106 may perform a broadband access function. It should be understood that the number of service boards in FIG. 1 is only an example, which is not limited in this embodiment of the present application.
智能手机101、笔记本电脑102、部署内部网的企业所使用的设备103、部署宽带的家庭所使用的设备104均可以通过接入网连接至服务器107。 Smartphones 101, laptops 102, devices 103 used by enterprises deploying intranets, and devices 104 used by families deploying broadband can all be connected to the server 107 through the access network.
可选地,通信系统100还可以包括日志服务器(syslog sever)、网络服务器(web sever)以及动态主机配置协议服务器(dynamic host configuration protocol sever,DHCP sever),图1中未示出。Optionally, the communication system 100 may further include a log server (syslog sever), a web server (web sever), and a dynamic host configuration protocol server (dynamic host configuration protocol sever, DHCP sever), which are not shown in FIG. 1 .
当上述智能手机101、笔记本电脑102、部署内部网的企业所使用的设备103以及部署宽带的家庭所使用的设备104等任一设备请求连接网络时,CPE 105进行拨号上线,路由器106中的BRAS模块可以根据业务板1、业务板2以及业务板3中的在线用户数,选择向在线用户数最少的业务板发送请求消息,该请求消息用于请求该在线用户数最少的业务板为请求连接网络的用户作NAT转换。当NAT转换成功后,BRAS模块可以向服务器107发送开始计费的消息,服务器107接收到该消息后开始进行计费。When any device such as the smart phone 101, the notebook computer 102, the device 103 used by the enterprise deploying the intranet, and the device 104 used by the family deploying broadband request to connect to the network, the CPE 105 dials up and goes online, and the BRAS in the router 106 The module can choose to send a request message to the service board with the least number of online users according to the number of online users in service board 1, service board 2 and service board 3, and the request message is used to request the service board with the fewest number of online users to request a connection Users of the network perform NAT translation. After the NAT conversion is successful, the BRAS module can send a message to start charging to the server 107, and the server 107 starts charging after receiving the message.
示例性地,部署宽带的家庭104请求连接网络,CPE 105进行拨号上线,路由器106中的BRAS模块接收到CPE 105的上线请求后,分别统计业务板1的在线用户数、 业务板2的在线用户数以及业务板3的在线用户数。其中,业务板1的在线用户数可以为100个用户,业务板2的在线用户数可以为80个用户,业务板3的在线用户数可以为90个用户。BRAS模块可以基于在线用户数的个数,选择向在线用户数最少的业务板2发送请求消息,该请求消息用于请求该业务板2为部署宽带的家庭104作NAT转换。当NAT转换成功后,BRAS模块可以向服务器107发送开始计费的消息,服务器107接收到该消息后开始进行计费。Exemplarily, the home 104 deploying broadband requests to connect to the network, and the CPE 105 dials up to go online. After the BRAS module in the router 106 receives the online request of the CPE 105, it counts the number of online users of the service board 1 and the online users of the service board 2 respectively. and the number of online users on service board 3. Wherein, the number of online users of service board 1 may be 100 users, the number of online users of service board 2 may be 80 users, and the number of online users of service board 3 may be 90 users. The BRAS module can choose to send a request message to the service board 2 with the least number of online users based on the number of online users, and the request message is used to request the service board 2 to perform NAT conversion for the home 104 deploying broadband. After the NAT conversion is successful, the BRAS module can send a message to start charging to the server 107, and the server 107 starts charging after receiving the message.
BRAS模块是基于业务板中在线用户数,从多个业务板中选择为请求连接网络的用户作NAT转换的业务板。当用户的带宽差距较大时,会导致业务板之间带宽资源使用不均衡,降低业务板的带宽使用率。The BRAS module is based on the number of online users in the service board, and selects a service board from multiple service boards to perform NAT conversion for users who request to connect to the network. When the bandwidth gap of users is large, it will lead to unbalanced use of bandwidth resources among service boards, and reduce the bandwidth utilization rate of service boards.
示例性地,用户可以开通占用带宽较大的定制化付费业务,例如,高清视频、增强现实(augmented reality,AR)业务、虚拟现实(virtual reality,VR)业务或者对等内容分发网络(peer to peer content delivery network,PCDN)业务等。每个用户可以开通不同业务,BRAS模块可以为每个用户分配不同的带宽。BRAS模块是基于用户数选择的业务板,可能会出现部分业务板带宽使用率超过80%,部分业务板带宽使用率不足30%的情况。当业务带宽超过业务板带宽时,超过业务板处理能力的带宽会被丢弃,导致业务受损。Exemplarily, a user can subscribe to a customized paid service that occupies a large bandwidth, for example, high-definition video, augmented reality (augmented reality, AR) service, virtual reality (virtual reality, VR) service or a peer-to-peer content distribution network (peer to peer content delivery network, PCDN) business, etc. Each user can subscribe to different services, and the BRAS module can allocate different bandwidths to each user. The BRAS module is a service board selected based on the number of users, and the bandwidth usage rate of some service boards may exceed 80%, and the bandwidth usage rate of some service boards may be less than 30%. When the service bandwidth exceeds the bandwidth of the service board, the bandwidth exceeding the processing capability of the service board will be discarded, resulting in service damage.
在用户面设备和控制面设备分离(control plane and user plane disaggregated,CU分离)的通信系统中,上述问题同样存在。In a communication system where the user plane device and the control plane device are separated (control plane and user plane disaggregated, CU separation), the above problems also exist.
CU分离是指CP和UP解耦的网络架构。CU分离包括而不限于下述实现方式A和实现方式B。CU separation refers to the network architecture in which CP and UP are decoupled. CU separation includes but not limited to the following implementations A and B.
实现方式A、控制面和转发面位于不同硬件设备上。In implementation mode A, the control plane and the forwarding plane are located on different hardware devices.
在采用实现方式A时,CP设备和UP设备是两个单独且不同的设备。可选地,CP设备与UP设备分布式在不同的地点。例如,CP设备位于云端的数据中心,UP设备根据需求部署在网络中合适的位置。通过这种方式,使得控制面和转发面的部署更加灵活。When implementation A is adopted, the CP device and the UP device are two independent and different devices. Optionally, the CP device and the UP device are distributed in different places. For example, the CP device is located in the data center of the cloud, and the UP device is deployed at a suitable location in the network according to the requirements. In this way, the deployment of the control plane and the forwarding plane is more flexible.
实现方式B、控制面和转发面位于同一个硬件设备上且功能分离。In implementation mode B, the control plane and the forwarding plane are located on the same hardware device and their functions are separated.
在采用实现方式B时,CP设备的物理实体和UP设备的物理实体为同一个设备。例如,CP设备与UP设备运行在同一个主机、同一个服务器或同一个终端中。When the implementation mode B is adopted, the physical entity of the CP device and the physical entity of the UP device are the same device. For example, the CP device and the UP device run on the same host, the same server, or the same terminal.
在一些实施例中,CP设备和UP设备均通过虚拟化技术实现。CP设备例如称为虚拟CP(virtual CP,vCP),UP设备例如称为虚拟UP(virtual UP,vUP)。例如,CP设备为虚拟机,UP设备为虚拟路由器或虚拟交换机。在一些实施例中,CP设备和UP设备均是基于通用的物理服务器结合NF)技术实现的,CP设备和UP设备是两个不同的虚拟网络功能(virtualized network function,VNF)。例如,CP设备和UP设备均是通过X86服务器虚拟化出的网元。In some embodiments, both the CP device and the UP device are implemented by virtualization technology. The CP device is called, for example, a virtual CP (virtual CP, vCP), and the UP device is called, for example, a virtual UP (virtual UP, vUP). For example, the CP device is a virtual machine, and the UP device is a virtual router or a virtual switch. In some embodiments, both the CP device and the UP device are implemented based on a common physical server combined with NF technology, and the CP device and the UP device are two different virtual network functions (virtualized network function, VNF). For example, both the CP device and the UP device are network elements virtualized by an X86 server.
在另一些实施例中,CP设备通过虚拟化技术实现,UP设备通过传统的网络设备实现。UP设备例如称为物理UP(physical UP,pUP)。In some other embodiments, the CP device is implemented by a virtualization technology, and the UP device is implemented by a traditional network device. The UP device is called, for example, a physical UP (physical UP, pUP).
本实施例对通信系统中CP设备与UP设备之间的数量关系不做限定。在一些实施例中,CP设备与UP设备是一对多的关系,即,一个CP设备用于控制多个UP设备。在另一些实施例中,CP设备与UP设备是一一对应的关系,即,一个CP设备用于控 制一个UP设备。This embodiment does not limit the quantity relationship between the CP device and the UP device in the communication system. In some embodiments, a CP device and a UP device have a one-to-many relationship, that is, one CP device is used to control multiple UP devices. In other embodiments, there is a one-to-one correspondence between CP devices and UP devices, that is, one CP device is used to control one UP device.
本实施例对通信系统中UP设备的数量不做限定。可选地,CU分离的通信系统包括多个UP设备。可选地,CU分离的通信系统中多个UP设备分布在不同的地点。可选地,CU分离的通信系统中多个UP设备基于分布式架构协同分担转发任务。This embodiment does not limit the number of UP devices in the communication system. Optionally, the communication system where the CU is separated includes multiple UP devices. Optionally, multiple UP devices are distributed in different places in the communication system where the CU is separated. Optionally, in the communication system where the CU is separated, multiple UP devices cooperate to share the forwarding task based on the distributed architecture.
值得说明的一点是,“CU分离”可以具有不同的名称。例如,不同标准、同一标准的不同版本、不同厂商、不同应用场景对“CU分离”可以具有不同的称呼。例如,术语“CU分离”有时也可以被称为“控制和转发分离”、“转控分离”、“控制面和用户面分离”、“控制和用户分离”等。It's worth pointing out that "CU separation" can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "CU separation". For example, the term "CU separation" may sometimes be called "control and forwarding separation", "forwarding and control separation", "control plane and user plane separation", "control and user separation" and so on.
值得说明的一点是,“CP”可以具有不同的名称。例如,不同标准、同一标准的不同版本、不同厂商、不同应用场景对“CP”可以具有不同的称呼。例如,术语“CP”有时也可以被称为“CP功能(CP function,CPF)”或“CP面”。本文中“CP”、“CPF”和“CP面”可互换使用。术语“CP设备”是指实现了CP功能的任意设备。It's worth pointing out that "CP" can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "CP". For example, the term "CP" may sometimes be referred to as "CP function (CP function, CPF)" or "CP face". "CP", "CPF" and "CP face" are used interchangeably herein. The term "CP device" refers to any device that implements the CP function.
值得说明的一点是,“UP”可以具有不同的名称。例如,不同标准、同一标准的不同版本、不同厂商、不同应用场景对“UP”可以具有不同的称呼。例如,术语“UP”有时也可以被称为“UP功能(UP function,UPF)”或“UP面”。本文中“UP”、“UPF”和“UP面”可互换使用。术语“UP设备”是指实现了UP功能的任意设备。It's worth pointing out that "UP" can have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for "UP". For example, the term "UP" may sometimes be referred to as "UP function (UPF)" or "UP face". "UP", "UPF" and "UP face" are used interchangeably herein. The term "UP device" refers to any device that implements the UP function.
随着各种互联网业务的层出不穷,对BNG系统支持的用户的会话数量要求不断提高、对用户接入带宽不断提高、尤其对BNG系统对外提供业务开放、可编程的能力的要求越来越高。有鉴于这些需求,BNG系统基于SDN或NFV的架构实现控制与转发的解耦以及软件与硬件的解耦,成为CU分离的BNG系统,从而具备CU分离的架构带来的优势,With the continuous emergence of various Internet services, the requirements for the number of user sessions supported by the BNG system are continuously increasing, the user access bandwidth is continuously increasing, and especially the requirements for the BNG system to provide services open and programmable to the outside world are getting higher and higher. In view of these requirements, the BNG system realizes the decoupling of control and forwarding as well as the decoupling of software and hardware based on the architecture of SDN or NFV, and becomes a BNG system with CU separation, so as to have the advantages brought by the architecture of CU separation.
例如,BNG系统中的CP设备控制BNG系统中的多个UP设备,CP设备调度多个UP设备处理流量的转发任务,CP设备为多个UP分配资源,因此与单机实现BNG系统的方式相比,CU分离架构下BNG系统的设备的利用率和可靠性都能得到大幅的提升。For example, the CP device in the BNG system controls multiple UP devices in the BNG system, the CP device schedules multiple UP devices to process traffic forwarding tasks, and the CP device allocates resources for multiple UP devices. Therefore, compared with the single-machine implementation of the BNG system , Under the CU separation architecture, the utilization rate and reliability of the equipment of the BNG system can be greatly improved.
值得说明的一点是,本申请实施例中“CU分离的BNG”可以具有不同的名称。例如,不同标准、同一标准的不同版本、不同厂商、不同应用场景对“CU分离的BNG”可以具有不同的称呼。例如,术语“CU分离的BNG”有时也可以被称为“分离的BNG系统(disaggregated BNG,DBNG)”,相应地,CU分离的BNG中的CP设备可以被称为DBNG-CP,CU分离的BNG中的UP设备可以被称为DBNG-UP。又如,术语“CU分离的BNG”有时也可以被称为“虚拟宽带网络网关(virtual BNG,vBNG)控制面和用户面分离的系统(control plane and user plane disaggregated System,CU系统)”,即“vBNG CU系统”,相应地,CU分离的BNG中的CP设备可以被称为vBNG-CP,CU分离的BNG中的UP设备可以被称为vBNG-UP。又如,术语“CU分离的BNG”有时也可以被称为“虚拟宽带远程接入服务器(virtual broadband remote access server,vBRAS)CU系统”,即“vBRAS CU系统”,相应地,CU分离的BNG中的CP设备可以被称为vBRAS-CP,CU分离的BNG中的UP设备可以被称为vBRAS-UP。本文中“DBNG”、“vBNG CU系统”和“vBRAS CU系统”可互换使用。It is worth noting that the "CU-separated BNG" in this embodiment of the present application may have different names. For example, different standards, different versions of the same standard, different manufacturers, and different application scenarios may have different names for the "CU-separated BNG". For example, the term "CU-separated BNG" may sometimes be referred to as a "disaggregated BNG system (DBNG)", and accordingly, the CP device in a CU-separated BNG may be referred to as DBNG-CP, and CU-separated The UP device in BNG may be referred to as DBNG-UP. As another example, the term "CU-separated BNG" may sometimes be referred to as a "virtual broadband network gateway (virtual BNG, vBNG) control plane and user plane disaggregated system (CU system)", namely "vBNG CU system", correspondingly, the CP device in the CU-separated BNG can be called vBNG-CP, and the UP device in the CU-separated BNG can be called vBNG-UP. As another example, the term "CU-separated BNG" can sometimes be referred to as "virtual broadband remote access server (vBRAS) CU system", that is, "vBRAS CU system". Correspondingly, CU-separated BNG The CP device in the CU may be called vBRAS-CP, and the UP device in the BNG where the CU is separated may be called vBRAS-UP. In this article, "DBNG", "vBNG CU system" and "vBRAS CU system" are used interchangeably.
示例性地,图2示出了另一种通信系统200的架构图。如图2所示,该通信系统 200可以包括智能手机101、笔记本电脑102、部署内部网的企业所使用的设备103、部署宽带的家庭所使用的设备104、CPE 105、用户面设备(user plane,UP)201、控制面设备(control plane,CP)202以及服务器107。UP 201中可以包括MPU 2011、业务板1、业务板2以及业务板3。UP 201中还可以包括BRAS模块,即UP 201可以执行宽带接入功能。UP可以为物理用户面功能(physical user plane,pUP)或者虚拟用户面功能(virtual user plane,vUP)。应理解,图2中业务板的个数仅仅为一个示例,本申请实施例对此并不做限定。Exemplarily, FIG. 2 shows an architecture diagram of another communication system 200 . As shown in FIG. 2, the communication system 200 may include a smart phone 101, a notebook computer 102, a device 103 used by an enterprise deploying an intranet, a device 104 used by a family deploying broadband, a CPE 105, and a user plane device (user plane , UP) 201, a control plane device (control plane, CP) 202 and a server 107. UP 201 may include MPU 2011, service board 1, service board 2, and service board 3. The UP 201 can also include a BRAS module, that is, the UP 201 can perform broadband access functions. The UP may be a physical user plane function (physical user plane, pUP) or a virtual user plane function (virtual user plane, vUP). It should be understood that the number of service boards in FIG. 2 is only an example, which is not limited in this embodiment of the present application.
图2所示的UP 201中的BRAS模块可以具有上述图1所示的路由器106中的BRAS模块的部分功能。图2中的业务板1、业务板2以及业务板3和上述图1中的业务板1、业务板2以及业务板3可以相同也可以不同,本申请实施例不做限定。The BRAS module in the UP 201 shown in Figure 2 can have some functions of the BRAS module in the router 106 shown in Figure 1 above. Service board 1, service board 2, and service board 3 in FIG. 2 may be the same as or different from service board 1, service board 2, and service board 3 in FIG. 1, which is not limited in this embodiment of the application.
智能手机101、笔记本电脑102、部署内部网的企业所使用的设备103、部署宽带的家庭所使用的设备104均可以通过接入网连接至服务器107。 Smartphones 101, laptops 102, devices 103 used by enterprises deploying intranets, and devices 104 used by families deploying broadband can all be connected to the server 107 through the access network.
可选地,通信系统100还可以包括日志服务器(syslog sever)、网络服务器(web sever)以及动态主机配置协议服务器(dynamic host configuration protocol sever,DHCP sever),图2中未示出。Optionally, the communication system 100 may further include a log server (syslog sever), a web server (web sever), and a dynamic host configuration protocol server (dynamic host configuration protocol sever, DHCP sever), which are not shown in FIG. 2 .
智能手机101、笔记本电脑102、部署内部网的企业所使用的设备103以及部署宽带的家庭所使用的设备104等任一设备请求连接网络时,CPE 105进行拨号上线,UP 201中的BRAS模块接收到拨号上线请求后,将该请求转发给CP 202,CP 202可以根据业务板1、业务板2以及业务板3中的在线用户数,选择向在线用户数最少的业务板发送请求消息,该请求消息用于请求该在线用户数最少的业务板为请求连接网络的用户作NAT转换。当NAT转换成功后,CP 202可以通过网络向服务器107发送开始计费的消息,服务器107接收到该消息后开始进行计费。可选地,UP 201也可以通过网络与服务器107进行通信。When any device such as smart phone 101, notebook computer 102, device 103 used by enterprises deploying intranet, and device 104 used by families deploying broadband requests to connect to the network, CPE 105 dials up and goes online, and the BRAS module in UP 201 receives After the dial-up request is forwarded to CP 202, CP 202 can choose to send a request message to the service board with the least number of online users according to the number of online users in service board 1, service board 2 and service board 3. The message is used to request the service board with the least number of online users to perform NAT conversion for the users requesting to connect to the network. After the NAT conversion is successful, the CP 202 can send a message to start charging to the server 107 through the network, and the server 107 starts charging after receiving the message. Optionally, UP 201 can also communicate with server 107 through the network.
在该通信系统200中,CP 202是基于业务板中在线用户数,从多个业务板中选择为请求连接网络的用户作NAT转换的业务板。当用户的带宽差距较大时,会导致业务板之间带宽资源使用不均衡,降低业务单板的带宽使用率。In the communication system 200, the CP 202 is based on the number of online users in the service board, and selects the service board that performs NAT conversion for the user requesting to connect to the network from a plurality of service boards. When there is a large gap in bandwidth between users, it will lead to unbalanced use of bandwidth resources among service boards, reducing the bandwidth usage of service boards.
综上所示,在上述图1所示的通信系统100和图2所示的通信系统200中,从多个业务板中选择一个业务板为用户作NAT转换,都是基于业务板的在线用户数的,均会导致业务板之间带宽资源使用不均衡,降低业务单板的带宽使用率。To sum up, in the communication system 100 shown in FIG. 1 and the communication system 200 shown in FIG. 2, one service board is selected from multiple service boards to perform NAT conversion for the user, which is based on the online user of the service board All of these will lead to unbalanced use of bandwidth resources among service boards and reduce the bandwidth utilization of service boards.
有鉴于此,本申请实施例提供了一种网络地址转换的方法和装置,从带宽的角度,为用户选择作NAT转换的业务板,可以提升业务板的带宽资源利用率,有利于提高用户的业务体验。In view of this, the embodiment of the present application provides a method and device for network address translation. From the perspective of bandwidth, selecting a service board for NAT conversion for the user can improve the utilization rate of bandwidth resources of the service board, which is conducive to improving the user's business experience.
图3为本申请实施例提供的一种网络地址转换的方法300。该方法300可以应用于上述图1所示的通信系统100和图2所示的通信系统200,但本申请实施例不限于此。如图3所示,该方法300可以包括下列步骤:FIG. 3 is a network address translation method 300 provided by an embodiment of the present application. The method 300 may be applied to the communication system 100 shown in FIG. 1 and the communication system 200 shown in FIG. 2 above, but this embodiment of the present application is not limited thereto. As shown in FIG. 3, the method 300 may include the following steps:
S301、网络设备接收第一请求消息,该第一请求消息用于请求第一用户上线。S301. The network device receives a first request message, where the first request message is used to request a first user to go online.
第一用户可以为请求连接网络的任意互联网设备,例如,第一用户可以为图1或者图2中的智能手机101、笔记本电脑102、部署内部网的企业103或者部署宽带的家庭104。应理解,上线即为连接网络。The first user can be any Internet device that requests to connect to the network. For example, the first user can be the smart phone 101, laptop 102 in FIG. 1 or FIG. It should be understood that to go online is to connect to the network.
第一用户可以是开通大带宽定制业务的用户。The first user may be a user who subscribes to a large-bandwidth customized service.
网络设备可以为BRAS、执行宽带接入功能的UP或者CP。例如,网络设备可以为图1中路由器106中的BRAS模块,网络设备还可以为图2中UP 201中的BRAS模块、执行宽带接入功能的UP 201或者CP 202。The network device may be a BRAS, a UP or a CP performing a broadband access function. For example, the network device can be the BRAS module in the router 106 in FIG. 1, and the network device can also be the BRAS module in the UP 201 in FIG. 2, the UP 201 or the CP 202 performing the broadband access function.
当网络设备为BRAS或者执行宽带接入功能的UP 201时,网络设备可以接收来自CPE 105的第一请求消息。其中,BRAS可以为图1中的BRAS模块,也可以为图2中的BRAS模块。当网络设备为CP 202时,网络设备可以接收来自UP 201的第一请求消息。When the network device is a BRAS or a UP 201 performing a broadband access function, the network device may receive the first request message from the CPE 105. Wherein, the BRAS may be the BRAS module in FIG. 1 or the BRAS module in FIG. 2 . When the network device is the CP 202, the network device can receive the first request message from the UP 201.
S302、网络设备基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板。S302. The network device selects a first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards.
网络设备为BRAS时,网络设备可以与多个业务板部署于同一个设备中。例如,上述图1中的BRAS模块可以与多个业务板部署于路由器106中。When the network device is a BRAS, the network device and multiple service boards can be deployed in the same device. For example, the BRAS module in FIG. 1 above can be deployed in the router 106 together with multiple service boards.
多个业务板即至少一个业务板,本申请实施例对业务板的具体个数不作限定。A plurality of service boards means at least one service board, and the embodiment of the present application does not limit the specific number of service boards.
第一带宽参数可以包括以下至少一个:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;其中,已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比,实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。The first bandwidth parameter may include at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio; wherein the configured bandwidth The ratio is the ratio of the total configured bandwidth of online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
业务板上的在线用户为在业务板上作NAT转换的用户。业务板可以为至少一个用户作NAT转换,故业务板上的在线用户可以为至少一个。Online users on the service board are users who perform NAT conversion on the service board. The service board can perform NAT conversion for at least one user, so there can be at least one online user on the service board.
用户可以开通不同的业务,不同的业务对应不同的带宽,当用户开通了某个业务,并请求连接网络时,业务板可以为用户配置该业务对应的带宽,该业务对应的带宽可以为用户的配置带宽。Users can activate different services, and different services correspond to different bandwidths. When a user activates a certain service and requests to connect to the network, the service board can configure the bandwidth corresponding to the service for the user. The bandwidth corresponding to the service can be the user's bandwidth. Configure bandwidth.
业务板上在线用户的配置带宽为业务板为用户配置的业务的带宽。示例性地,用户开通的业务的带宽为50兆(Mbyte,M),业务板为该用户作NAT转换,则该业务板在线用户的配置带宽为50M。The configured bandwidth of the online user on the service board is the service bandwidth configured for the user by the service board. Exemplarily, the bandwidth of the service opened by the user is 50 megabytes (Mbyte, M), and the service board performs NAT conversion for the user, so the configured bandwidth of the online user of the service board is 50M.
业务板上在线用户的实时带宽为用户开通业务上线后实际使用的带宽。业务板上在线用户的实时带宽小于或等于业务板上在线用户的配置带宽。The real-time bandwidth of online users on the service board is the bandwidth actually used after the user activates the service and goes online. The real-time bandwidth of the online users on the service board is less than or equal to the configured bandwidth of the online users on the service board.
业务板的配置带宽可以表示业务板的带宽处理能力。示例性地,业务板的配置带宽为100M,可以为在线用户配置100M以内的带宽。当在线用户的配置带宽超出100M时,超过业务板处理能力的带宽会被丢弃。The configured bandwidth of the service board may represent the bandwidth processing capability of the service board. Exemplarily, the configured bandwidth of the service board is 100M, and the bandwidth within 100M can be configured for online users. When the configured bandwidth of an online user exceeds 100M, the bandwidth exceeding the processing capability of the service board will be discarded.
业务板上在线用户的配置带宽总和为业务板上的所有的在线用户的配置带宽之和,故已配置带宽比例可以为业务板上在线用户的配置带宽总和与业务板的配置带宽之比。The sum of the configured bandwidth of online users on the service board is the sum of the configured bandwidths of all online users on the service board, so the configured bandwidth ratio can be the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
业务板上在线用户的实时带宽总和为业务板上的所有的在线用户的实时带宽之和,故实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。The total real-time bandwidth of online users on the service board is the sum of real-time bandwidth of all online users on the service board, so the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
S303、网络设备向第一业务板发送第二请求消息,该第二请求消息用于指示第一业务板为第一用户作NAT转换。S303. The network device sends a second request message to the first service board, where the second request message is used to instruct the first service board to perform NAT conversion for the first user.
网络设备基于第一带宽参数,从多个业务板中选择第一业务板为第一用户作NAT转换。Based on the first bandwidth parameter, the network device selects a first service board from multiple service boards to perform NAT conversion for the first user.
本申请实施例提供的网络地址转换的方法,通过业务板为用户作NAT转换时,基 于第一带宽参数,从多个业务板中选择第一业务板为第一用户作NAT转换,从带宽的角度选择为第一用户作NAT转换的业务板,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the method for network address translation provided in the embodiment of the present application, when the service board performs NAT conversion for the user, based on the first bandwidth parameter, the first service board is selected from multiple service boards to perform NAT conversion for the first user, and the bandwidth Selecting the service board that performs NAT conversion for the first user can balance the bandwidth usage among multiple service boards, improve the bandwidth resource utilization of the service board, and help improve the user's service experience.
作为一个可选的实施例,当第一带宽参数包括已配置带宽比例或者实时带宽使用比例时;从多个业务板中选择第一业务板,包括:网络设备获取多个业务板中每个业务板的第一带宽参数;网络设备将多个业务板中第一带宽参数数值最小的业务板确定为第一业务板。As an optional embodiment, when the first bandwidth parameter includes the configured bandwidth ratio or the real-time bandwidth usage ratio; selecting the first service board from multiple service boards includes: the network device obtaining each service in the multiple service boards The first bandwidth parameter of the board; the network device determines the service board with the smallest value of the first bandwidth parameter among the multiple service boards as the first service board.
网络设备可以获取多个业务板中每个业务板的已配置带宽比例或者实时带宽使用比例,从多个业务板中选择已配置带宽比例或者实时带宽使用比例最小的业务板确定为第一业务板。The network device can obtain the configured bandwidth ratio or the real-time bandwidth usage ratio of each of the multiple service boards, and select the service board with the smallest configured bandwidth ratio or real-time bandwidth usage ratio from the multiple service boards to determine it as the first service board .
已配置带宽比例最小的业务板或者实时带宽使用比例最小的业务板,即剩余带宽最多的业务板,可以为第一用户配置带宽,为第一用户作NAT转换。The service board with the smallest proportion of configured bandwidth or the service board with the smallest proportion of real-time bandwidth usage, that is, the service board with the largest remaining bandwidth, can configure bandwidth for the first user and perform NAT conversion for the first user.
本申请实施例提供的网络地址转换的方法,从多个业务板中选择已配置带宽比例或者实时带宽使用比例最小的业务板确定为第一业务板,即将剩余带宽最多的业务板确定为第一业务板,可以提高业务板的带宽使用率,同时可以为第一用户提供充足的带宽资源,避免超出业务板的配置带宽,有利于提高用户的业务体验。In the method for network address translation provided in the embodiment of the present application, the service board with the smallest configured bandwidth ratio or real-time bandwidth usage ratio is selected from multiple service boards and determined as the first service board, that is, the service board with the largest remaining bandwidth is determined as the first service board. The service board can improve the bandwidth utilization rate of the service board, and at the same time provide sufficient bandwidth resources for the first user to avoid exceeding the configured bandwidth of the service board, which is conducive to improving the user's service experience.
可选地,当第一带宽参数包括业务板上在线用户的配置带宽或者业务板上在线用户的实时带宽,网络设备可以统计多个业务板中每个业务板的业务板上在线用户的配置带宽总和或者业务板上在线用户的实时带宽总和,将该多个业务板中每个业务板的业务板上在线用户的配置带宽总和或者业务板上在线用户的实时带宽总和最小的业务板确定为第一业务板。Optionally, when the first bandwidth parameter includes the configured bandwidth of the online users on the service board or the real-time bandwidth of the online users on the service board, the network device can count the configured bandwidth of the online users on the service board of each service board among the multiple service boards The sum or the sum of the real-time bandwidth of the online users on the service boards, the service board with the minimum configured bandwidth sum of the online users on the service boards or the real-time bandwidth sum of the online users on the service boards of each service board in the multiple service boards is determined as the first a business board.
作为一个可选的实施例,当网络设备基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板,包括:在多个业务板中每个业务板的第一带宽参数数值相同的情况下,网络设备将多个业务板中在线用户数最少的业务板确定为第一业务板。As an optional embodiment, when the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, it includes: the first bandwidth of each service board among the multiple service boards When the parameter values are the same, the network device determines the service board with the least number of online users among the multiple service boards as the first service board.
当第一带宽参数包括已配置带宽比例或者实时带宽使用比例时,在多个业务板中每个业务板的已配置带宽比例或者实时带宽使用比例均相同的情况下,网络设备可以获取多个业务板中每个业务板的在线用户数,将多个业务板中在线用户数最少的业务板确定为第一业务板。When the first bandwidth parameter includes the configured bandwidth ratio or the real-time bandwidth usage ratio, the network device can obtain multiple services when the configured bandwidth ratio or the real-time bandwidth usage ratio of each of the multiple service boards is the same. The number of online users of each service board in the board, and the service board with the least number of online users among the multiple service boards is determined as the first service board.
当第一带宽参数包括业务板上在线用户的配置带宽或业务板上在线用户的实时带宽时,在多个业务板中每个业务板的在线用户的配置带宽总和或者在线用户的实时带宽总和均相同的情况下,网络设备可以获取多个业务板中每个业务板的在线用户数,将多个业务板中在线用户数最少的业务板确定为第一业务板。When the first bandwidth parameter includes the configured bandwidth of online users on a service board or the real-time bandwidth of online users on a service board, the sum of the configured bandwidth of online users on each service board or the sum of the real-time bandwidth of online users in multiple service boards In the same situation, the network device may obtain the number of online users of each of the multiple service boards, and determine the service board with the least number of online users among the multiple service boards as the first service board.
本申请实施例提供的网络地址转换的方法,在多个业务板的带宽资源利用率相同的情况下,选择在线用户数最少的业务板确定为第一业务板,可以使每个业务板在线用户数较均匀,有利于提高业务板IP地址资源的使用率,有利于提高用户的业务体验。In the network address translation method provided by the embodiment of the present application, when the bandwidth resource utilization ratios of multiple service boards are the same, the service board with the least number of online users is selected as the first service board, which can make each service board have online users The number is relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
作为一个可选的实施例,上述方法300还包括:网络设备接收来自第一业务板的第一应答消息,第一应答消息包括第一业务板为第一用户分配的公网IP地址和端口号范围;网络设备向用户端设备发送第二应答消息,第二应答消息用于表示第一用户上线成功,第一用户通过用户端设备连接至网络设备。As an optional embodiment, the above method 300 further includes: the network device receives a first response message from the first service board, and the first response message includes the public network IP address and port number assigned by the first service board to the first user Scope: the network device sends a second response message to the client device, and the second response message is used to indicate that the first user goes online successfully, and the first user connects to the network device through the client device.
第一业务板为第一用户作NAT转换,即为第一用户分配公网IP地址和端口号范围。第一业务板可以向网络设备发送第一应答消息,该第一应答消息包括为第一用户分配的公网IP地址和端口号范围,网络设备接收到该第一应答消息后,可以向用户端设备发送第二应答消息,该第二应答消息用于表示第一用户上线成功,第一用户上线时,第一业务板可以使用该公网IP地址和端口号范围为第一用户提供网络服务,即第一用户的流量可以由第一业务板处理。The first service board performs NAT conversion for the first user, that is, assigns the public network IP address and port number range to the first user. The first service board can send a first response message to the network device, and the first response message includes the public network IP address and port number range allocated for the first user. After receiving the first response message, the network device can send the The device sends a second response message, and the second response message is used to indicate that the first user goes online successfully. When the first user goes online, the first service board can use the public network IP address and port number range to provide network services for the first user. That is, the traffic of the first user can be processed by the first service board.
业务板的端口号范围可以为1026-6535中的任意范围。不同的业务板对应的端口号范围可以完全相同,还可以部分重叠,也可以完全不同。The port number range of the service board can be any range from 1026 to 6535. The ranges of port numbers corresponding to different service boards can be completely the same, partially overlap, or be completely different.
示例性地,业务板1的端口号范围可以为1026-3535,业务板2的端口号范围可以为2035-4521,业务板3的端口号范围可以为4888-5231,业务板4的端口号范围可以为4888-5231。For example, the port number range of service board 1 can be 1026-3535, the port number range of service board 2 can be 2035-4521, the port number range of service board 3 can be 4888-5231, and the port number range of service board 4 Can be 4888-5231.
可选地,在S302、网络设备基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板之前,上述方法300还包括:网络设备基于第一请求消息,向认证服务器发送第五请求消息,第五请求消息用于为第一用户请求认证;网络设备在认证成功的情况下,为第一用户分配私网IP地址;网络设备向第一用户发送第五应答消息,第五应答消息用于表示网络设备为第一用户分配的私网IP地址。Optionally, before S302, before the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, the above method 300 further includes: the network device sends the authentication server Sending the fifth request message, the fifth request message is used to request authentication for the first user; when the authentication is successful, the network device allocates a private network IP address for the first user; the network device sends the fifth response message to the first user, The fifth response message is used to indicate the private IP address allocated by the network device to the first user.
当第一用户请求上线时,网络设备可以向认证服务器为第一用户请求认证,在认证成功的情况下,为第一用户分配私网IP地址,并将该私网IP地址发送给第一用户。当第一用户接收私网IP地址成功后,网络设备可以基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板,并使用该私网IP地址向第一业务板申请公网IP地址和端口号范围。When the first user requests to go online, the network device can request authentication for the first user from the authentication server, and if the authentication is successful, assign a private network IP address to the first user, and send the private network IP address to the first user . After the first user successfully receives the private network IP address, the network device can select the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, and use the private network IP address to send the first service board to the first service board. Apply for a range of public IP addresses and port numbers.
示例性地,图4为本申请实施例提供另一种网络地址转换的方法400,该方法400可以适用于图1所述的通信系统100。方法400可以理解为:方法300中的网络设备可以为通信系统100中路由器106中的BRAS模块,第一用户可以为动态主机配置协议的(dynamic host configuration protocol,DHCP)用户。Exemplarily, FIG. 4 provides another network address translation method 400 according to the embodiment of the present application, and the method 400 may be applicable to the communication system 100 described in FIG. 1 . The method 400 can be understood as: the network device in the method 300 can be the BRAS module in the router 106 in the communication system 100, and the first user can be a dynamic host configuration protocol (DHCP) user.
如图4所示,该方法400可以包括:As shown in FIG. 4, the method 400 may include:
S401、CPE 105向路由器106中的BRAS模块发送第一请求消息,该第一请求消息用于请求第一用户上线,对应地,路由器106中的BRAS模块接收第一请求消息。S401, CPE 105 sends a first request message to the BRAS module in the router 106, the first request message is used to request the first user to go online, and correspondingly, the BRAS module in the router 106 receives the first request message.
当第一用户请求上线时,CPE 105可以拨号上线,即向路由器106中的BRAS模块发送第一请求消息。When the first user requests to go online, the CPE 105 can dial to go online, that is, send the first request message to the BRAS module in the router 106.
示例性地,该第一请求消息可以为DHCP发现(discovery)报文。Exemplarily, the first request message may be a DHCP discovery (discovery) message.
S402、路由器106中的BRAS模块基于第一请求消息,向认证服务器发送第五请求消息,第五请求消息用于为第一用户请求认证,对应地,认证服务器接收该第五请求消息,对第一用户进行认证。S402. The BRAS module in the router 106 sends a fifth request message to the authentication server based on the first request message. The fifth request message is used to request authentication for the first user. Correspondingly, the authentication server receives the fifth request message and performs the A user is authenticated.
示例性地,认证服务器可以为远程认证拨号用户服务器(remote authentication dial-in user server,RADIUS)。Exemplarily, the authentication server may be a remote authentication dial-in user server (RADIUS).
S403、路由器106中的BRAS模块接收认证服务器的第六应答消息,该第六应答消息用于指示该第一用户认证成功。S403. The BRAS module in the router 106 receives a sixth response message from the authentication server, where the sixth response message is used to indicate that the authentication of the first user is successful.
S404、在第一用户认证成功的情况下,路由器106中的BRAS模块为第一用户分 配私网IP地址。S404. When the first user is successfully authenticated, the BRAS module in the router 106 allocates a private network IP address for the first user.
S405、路由器106中的BRAS模块向CPE 105发送第七应答消息,该第七应答消息包括BRAS模块为第一用户分配的私网IP地址,对应地,CPE 105接收该第七应答消息。S405, the BRAS module in the router 106 sends a seventh response message to the CPE 105, the seventh response message includes the private network IP address allocated by the BRAS module to the first user, and correspondingly, the CPE 105 receives the seventh response message.
示例性地,该第七应答消息可以为DHCP提供(offe)报文。Exemplarily, the seventh response message may be a DHCP offer (offe) message.
S406、CPE 105向路由器106中的BRAS模块发送第六请求消息,该第六请求消息用于表示成功接收到私网IP地址,对应地,路由器106中的BRAS模块接收到第六请求消息。S406, CPE 105 sends the sixth request message to the BRAS module in the router 106, and the sixth request message is used to indicate that the private network IP address is successfully received, and correspondingly, the BRAS module in the router 106 receives the sixth request message.
示例性地,第六请求消息可以为DHCP请求(request)报文。Exemplarily, the sixth request message may be a DHCP request (request) message.
S407、路由器106中的BRAS模块基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板。S407. The BRAS module in the router 106 selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards.
该步骤可以参考上述S302,此处不再赘述。For this step, reference may be made to the above S302, which will not be repeated here.
S408、路由器106中的BRAS模块向第一业务板发送第二请求消息,该第二请求消息用于指示第一业务板为第一用户作NAT转换,对应地,第一业务板接收第二请求消息。S408, the BRAS module in the router 106 sends a second request message to the first service board, the second request message is used to instruct the first service board to perform NAT conversion for the first user, and correspondingly, the first service board receives the second request information.
该步骤可以参考上述S303,此处不再赘述。For this step, reference may be made to the above S303, which will not be repeated here.
S409、第一业务板为第一用户分配公网IP地址和端口号范围。S409. The first service board allocates a public network IP address and a port number range to the first user.
第一业务板可以基于私网IP地址,为第一用户分配公网IP地址和端口号范围,并建立私网IP地址、公网IP地址以及端口号范围之间的对应关系。The first service board may allocate a public network IP address and a port number range to the first user based on the private network IP address, and establish a correspondence between the private network IP address, the public network IP address, and the port number range.
S410、第一业务板向路由器106中的BRAS模块发送第一应答消息,第一应答消息包括第一业务板为第一用户分配的公网IP地址和端口号范围,对应地,路由器106中的BRAS模块接收第一应答消息。S410. The first service board sends a first response message to the BRAS module in the router 106. The first response message includes the public network IP address and port number range allocated by the first service board to the first user. Correspondingly, the The BRAS module receives the first response message.
S411、路由器106中的BRAS模块向CPE 105发送第二应答消息,第二应答消息用于表示第一用户上线成功,对应地,CPE 105接收第二应答消息。S411, the BRAS module in the router 106 sends a second response message to the CPE 105, the second response message is used to indicate that the first user has successfully gone online, and correspondingly, the CPE 105 receives the second response message.
示例性地,第二应答消息可以为DHCP肯定(acknowledgement,ACK)报文。Exemplarily, the second response message may be a DHCP acknowledgment (acknowledgment, ACK) message.
S412、第一用户可以基于第二应答消息,访问网络。S412. The first user may access the network based on the second response message.
当路由器106中的BRAS模块检测到第一用户访问网络时,可以指示第一业务板为第一用户提供网络服务,When the BRAS module in the router 106 detects that the first user accesses the network, it may instruct the first service board to provide network services for the first user,
即第一用户的流量可以经过第一业务板访问网络。That is, the traffic of the first user can access the network through the first service board.
可选地,在S411之前,方法400还包括:路由器106中的BRAS模块向认证服务器发送计费请求,对应地,认证服务器接收该计费请求,并向路由器106中的BRAS模块发送应答消息,该应答消息用于表示开始计费。Optionally, before S411, the method 400 further includes: the BRAS module in the router 106 sends an accounting request to the authentication server, and correspondingly, the authentication server receives the accounting request, and sends a response message to the BRAS module in the router 106, The response message is used to indicate the start of charging.
本申请实施例提供的网络地址转换的方法,第一用户请求上线,且认证成功的情况下,路由器106中的BRAS模块可以为第一用户分配私网IP地址,并基于第一带宽参数从多个业务板中选择出第一业务板,使其可以根据分配的私网IP地址,为第一用户分配公网IP地址和端口号范围,第一用户可以经过第一业务板连接网络,同时,路由器106中的BRAS模块从带宽的角度选择为第一用户作NAT转换的业务板,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the network address translation method provided in the embodiment of this application, when the first user requests to go online and the authentication is successful, the BRAS module in the router 106 can allocate a private network IP address for the first user, and select from multiple IP addresses based on the first bandwidth parameter. Select the first service board from the two service boards, so that it can allocate the public network IP address and port number range for the first user according to the assigned private network IP address, and the first user can connect to the network through the first service board. At the same time, The BRAS module in the router 106 selects the service board that performs NAT conversion for the first user from the perspective of bandwidth, which can make the bandwidth utilization ratio between multiple service boards more balanced, improve the bandwidth resource utilization ratio of the service board, and help improve user business experience.
示例性地,图5为本申请实施例提供又一种网络地址转换的方法500,该方法500可以适用于图2所述的通信系统200。方法500可以理解为:方法300中的网络设备可以为通信系统200中的CP 202,第一用户可以为DHCP用户。Exemplarily, FIG. 5 provides another network address translation method 500 according to the embodiment of the present application, and the method 500 may be applicable to the communication system 200 described in FIG. 2 . The method 500 can be understood as: the network device in the method 300 can be the CP 202 in the communication system 200, and the first user can be a DHCP user.
如图5所示,该方法500可以包括:As shown in FIG. 5, the method 500 may include:
S501、CPE 105向UP 201中的BRAS模块发送第一请求消息,该第一请求消息用于请求第一用户上线,对应地,UP 201中的BRAS模块接收第一请求消息。S501, CPE 105 sends a first request message to the BRAS module in UP 201, the first request message is used to request the first user to go online, and correspondingly, the BRAS module in UP 201 receives the first request message.
当第一用户请求上线时,CPE 105可以拨号上线,即向UP 201中的BRAS模块发送第一请求消息。When the first user requests to go online, the CPE 105 can dial to go online, that is, send the first request message to the BRAS module in the UP 201.
示例性地,该第一请求消息可以为DHCP discovery报文。Exemplarily, the first request message may be a DHCP discovery message.
S502、UP 201中的BRAS模块向CP 202转发该第一请求消息,对应地,CP 202接收该第一请求消息。S502, the BRAS module in the UP 201 forwards the first request message to the CP 202, and correspondingly, the CP 202 receives the first request message.
S503、CP 202向认证服务器发送第五请求消息,第五请求消息用于为第一用户请求认证,对应地,认证服务器接收该第五请求消息,对第一用户进行认证。S503. The CP 202 sends a fifth request message to the authentication server, where the fifth request message is used to request authentication for the first user. Correspondingly, the authentication server receives the fifth request message and authenticates the first user.
示例性地,认证服务器可以为RADIUS。Exemplarily, the authentication server may be RADIUS.
S504、CP 202接收认证服务器的第六应答消息,该第六应答消息用于指示该第一用户认证成功。S504. The CP 202 receives a sixth response message from the authentication server, where the sixth response message is used to indicate that the first user has successfully authenticated.
S505、在第一用户认证成功的情况下,CP 202为第一用户分配私网IP地址。S505. When the first user is authenticated successfully, the CP 202 allocates a private network IP address for the first user.
S506、CP 202向UP 201中的BRAS模块发送第七应答消息,该第七应答消息包括CP 202为第一用户分配的私网IP地址,对应地,UP 201中的BRAS模块接收该第七应答消息。S506, the CP 202 sends a seventh response message to the BRAS module in the UP 201, the seventh response message includes the private network IP address allocated by the CP 202 to the first user, and correspondingly, the BRAS module in the UP 201 receives the seventh response information.
示例性地,该第七应答消息可以为DHCP offer报文。Exemplarily, the seventh response message may be a DHCP offer message.
S507、UP 201中的BRAS模块向CPE 105转发该第七应答消息,对应地,CPE 105接收该第七应答消息。S507, the BRAS module in the UP 201 forwards the seventh response message to the CPE 105, and correspondingly, the CPE 105 receives the seventh response message.
S508、CPE 105向UP 201中的BRAS模块发送第六请求消息,该第六请求消息用于表示成功接收到私网IP地址,对应地,UP 201中的BRAS模块接收到第六请求消息。S508. The CPE 105 sends a sixth request message to the BRAS module in the UP 201. The sixth request message is used to indicate that the private network IP address has been successfully received. Correspondingly, the BRAS module in the UP 201 receives the sixth request message.
示例性地,第六请求消息可以为DHCP request报文。Exemplarily, the sixth request message may be a DHCP request message.
S509、UP 201中的BRAS模块向CP 202转发该第六请求消息,对应地,CP 202接收该第六请求消息。S509, the BRAS module in the UP 201 forwards the sixth request message to the CP 202, and correspondingly, the CP 202 receives the sixth request message.
S510、CP 202基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板。S510. The CP 202 selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards.
该步骤可以参考上述S302,此处不再赘述。For this step, reference may be made to the above S302, which will not be repeated here.
S511、CP 202向第一业务板发送第二请求消息,该第二请求消息用于指示第一业务板为第一用户作NAT转换,对应地,第一业务板接收第二请求消息。S511. The CP 202 sends a second request message to the first service board, where the second request message is used to instruct the first service board to perform NAT conversion for the first user, and correspondingly, the first service board receives the second request message.
该步骤可以参考上述S303,此处不再赘述。For this step, reference may be made to the above S303, which will not be repeated here.
S512、第一业务板为第一用户分配公网IP地址和端口号范围。S512. The first service board allocates a public network IP address and a port number range to the first user.
第一业务板可以基于私网IP地址,为第一用户分配公网IP地址和端口号范围,并建立私网IP地址、公网IP地址以及端口号范围之间的对应关系。The first service board may allocate a public network IP address and a port number range to the first user based on the private network IP address, and establish a correspondence between the private network IP address, the public network IP address, and the port number range.
S513、第一业务板向CP 202发送第一应答消息,第一应答消息包括第一业务板为第一用户分配的公网IP地址和端口号范围,对应地,CP 202接收第一应答消息。S513. The first service board sends a first response message to the CP 202. The first response message includes the public network IP address and port number range allocated by the first service board to the first user. Correspondingly, the CP 202 receives the first response message.
S514、CP 202向UP 201中的BRAS模块发送第二应答消息,第二应答消息用于表示第一用户上线成功,对应地,UP 201中的BRAS模块接收第二应答消息。S514. The CP 202 sends a second response message to the BRAS module in the UP 201. The second response message is used to indicate that the first user has successfully gone online. Correspondingly, the BRAS module in the UP 201 receives the second response message.
示例性地,第二应答消息可以为DHCP ACK报文。Exemplarily, the second response message may be a DHCP ACK message.
S515、UP 201中的BRAS模块向CPE 105转发该第二应答消息。S515, the BRAS module in the UP 201 forwards the second response message to the CPE 105.
S516、第一用户可以基于第二应答消息,访问网络。S516. The first user may access the network based on the second response message.
当UP 201中的BRAS模块检测到第一用户访问网络时,可以指示第一业务板为第一用户提供网络服务,When the BRAS module in UP 201 detects that the first user accesses the network, it can instruct the first service board to provide network services for the first user,
即第一用户的流量可以经过第一业务板访问网络。That is, the traffic of the first user can access the network through the first service board.
可选地,在S514之前,方法500还包括:CP 202向认证服务器发送计费请求,对应地,认证服务器向CP 202发送应答消息,该应答消息用于表示开始计费。Optionally, before S514, the method 500 further includes: the CP 202 sends an accounting request to the authentication server, and correspondingly, the authentication server sends a response message to the CP 202, and the response message is used to indicate the start of accounting.
本申请实施例提供的网络地址转换的方法,第一用户请求上线,且认证成功的情况下,CP 202可以为第一用户分配私网IP地址,并基于第一带宽参数从多个业务板中选择出第一业务板,使其可以根据分配的私网IP地址,为第一用户分配公网IP地址和端口号范围,第一用户可以经过第一业务板连接网络,同时,CP 202从带宽的角度选择为第一用户作NAT转换的业务板,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the network address translation method provided in the embodiment of this application, when the first user requests to go online and the authentication is successful, the CP 202 can assign a private network IP address to the first user, and select the IP address from multiple service boards based on the first bandwidth parameter. Select the first service board, so that it can allocate the public network IP address and port number range for the first user according to the assigned private network IP address, and the first user can connect to the network through the first service board. From the perspective of selecting a service board for NAT conversion for the first user, the bandwidth utilization rate among multiple service boards can be balanced, the bandwidth resource utilization rate of the service board can be improved, and the service experience of users can be improved.
示例性地,图6为本申请实施例提供另一种网络地址转换的方法600,该方法600可以适用于图2所述的通信系统200。方法600可以理解为:方法300中的网络设备可以为通信系统200中UP 201中的BRAS模块,第一用户可以为DHCP用户。Exemplarily, FIG. 6 provides another network address translation method 600 according to the embodiment of the present application, and the method 600 may be applicable to the communication system 200 described in FIG. 2 . The method 600 can be understood as: the network device in the method 300 can be the BRAS module in the UP 201 in the communication system 200, and the first user can be a DHCP user.
如图6所示,该方法600可以包括:As shown in FIG. 6, the method 600 may include:
S601、CPE 105向UP 201中的BRAS模块发送第一请求消息,该第一请求消息用于请求第一用户上线,对应地,UP 201中的BRAS模块接收第一请求消息。S601, CPE 105 sends a first request message to the BRAS module in UP 201, the first request message is used to request the first user to go online, and correspondingly, the BRAS module in UP 201 receives the first request message.
当第一用户请求上线时,CPE 105可以拨号上线,即向UP 201中的BRAS模块发送第一请求消息。When the first user requests to go online, the CPE 105 can dial to go online, that is, send the first request message to the BRAS module in the UP 201.
示例性地,该第一请求消息可以为DHCP discovery报文。Exemplarily, the first request message may be a DHCP discovery message.
S602、UP 201中的BRAS模块向CP 202转发该第一请求消息,对应地,CP 202接收该第一请求消息。S602, the BRAS module in the UP 201 forwards the first request message to the CP 202, and correspondingly, the CP 202 receives the first request message.
S603、CP 202向认证服务器发送第五请求消息,第五请求消息用于为第一用户请求认证,对应地,认证服务器接收该第五请求消息,对第一用户进行认证。S603. The CP 202 sends a fifth request message to the authentication server, where the fifth request message is used to request authentication for the first user. Correspondingly, the authentication server receives the fifth request message and authenticates the first user.
示例性地,认证服务器可以为RADIUS。Exemplarily, the authentication server may be RADIUS.
S604、CP 202接收认证服务器的第六应答消息,该第六应答消息用于指示该第一用户认证成功。S604. The CP 202 receives a sixth response message from the authentication server, where the sixth response message is used to indicate that the authentication of the first user is successful.
S605、在第一用户认证成功的情况下,CP 202为第一用户分配私网IP地址。S605. When the first user is authenticated successfully, the CP 202 allocates a private network IP address for the first user.
S606、CP 202向UP 201中的BRAS模块发送第七应答消息,该第七应答消息包括CP 202为第一用户分配的私网IP地址,对应地,UP 201中的BRAS模块接收该第七应答消息。S606, the CP 202 sends a seventh response message to the BRAS module in the UP 201, the seventh response message includes the private network IP address allocated by the CP 202 to the first user, and correspondingly, the BRAS module in the UP 201 receives the seventh response information.
示例性地,该第七应答消息可以为DHCP offer报文。Exemplarily, the seventh response message may be a DHCP offer message.
S607、UP 201中的BRAS模块向CPE 105转发该第七应答消息,对应地,CPE 105接收该第七应答消息。S607, the BRAS module in the UP 201 forwards the seventh response message to the CPE 105, and correspondingly, the CPE 105 receives the seventh response message.
S608、CPE 105向UP 201中的BRAS模块发送第六请求消息,该第六请求消息用于表示成功接收到私网IP地址,对应地,UP 201中的BRAS模块接收到第六请求消息。S608. The CPE 105 sends a sixth request message to the BRAS module in the UP 201. The sixth request message is used to indicate that the private network IP address has been successfully received. Correspondingly, the BRAS module in the UP 201 receives the sixth request message.
示例性地,第六请求消息可以为DHCP request报文。Exemplarily, the sixth request message may be a DHCP request message.
S609、UP 201中的BRAS模块向CP 202转发该第六请求消息,对应地,CP 202接收该第六请求消息。S609, the BRAS module in the UP 201 forwards the sixth request message to the CP 202, and correspondingly, the CP 202 receives the sixth request message.
S610、CP 202向UP 201中的BRAS模块发送第七请求消息,该第七请求消息用于请求UP 201中的BRAS模块为第一用户分配公网IP地址和端口号范围,对应地,UP 201中的BRAS模块接收该第七请求消息。S610, the CP 202 sends a seventh request message to the BRAS module in the UP 201, the seventh request message is used to request the BRAS module in the UP 201 to allocate a public network IP address and port number range for the first user, correspondingly, the UP 201 The BRAS module in receives the seventh request message.
S611、UP 201中的BRAS模块基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板。S611, the BRAS module in the UP 201 selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards.
该步骤可以参考上述S302,此处不再赘述。For this step, reference may be made to the above S302, which will not be repeated here.
S612、UP 201中的BRAS模块向第一业务板发送第二请求消息,该第二请求消息用于指示第一业务板为第一用户作NAT转换,对应地,第一业务板接收第二请求消息。S612, the BRAS module in the UP 201 sends a second request message to the first service board, and the second request message is used to instruct the first service board to perform NAT conversion for the first user, and correspondingly, the first service board receives the second request information.
该步骤可以参考上述S303,此处不再赘述。For this step, reference may be made to the above S303, which will not be repeated here.
S613、第一业务板为第一用户分配公网IP地址和端口号范围。S613. The first service board allocates a public network IP address and a port number range to the first user.
第一业务板可以基于私网IP地址,为第一用户分配公网IP地址和端口号范围,并建立私网IP地址、公网IP地址以及端口号范围之间的对应关系。The first service board may allocate a public network IP address and a port number range to the first user based on the private network IP address, and establish a correspondence between the private network IP address, the public network IP address, and the port number range.
S614、第一业务板向UP 201中的BRAS模块发送第一应答消息,第一应答消息包括第一业务板为第一用户分配的公网IP地址和端口号范围,对应地,UP 201中的BRAS模块接收第一应答消息。S614, the first service board sends the first response message to the BRAS module in the UP 201, the first response message includes the public network IP address and port number range allocated by the first service board to the first user, correspondingly, the UP 201 The BRAS module receives the first response message.
S615、UP 201中的BRAS模块向CP 202发送第八应答消息,第八应答消息包括第一业务板为第一用户分配的公网IP地址和端口号范围,对应地,CP 202接收第八应答消息。S615, the BRAS module in the UP 201 sends an eighth response message to the CP 202, the eighth response message includes the public network IP address and port number range allocated by the first service board to the first user, and correspondingly, the CP 202 receives the eighth response information.
S616、CP 202向UP 201中的BRAS模块发送第二应答消息,该第二应答消息用于表示第一用户上线成功。S616. The CP 202 sends a second response message to the BRAS module in the UP 201, where the second response message is used to indicate that the first user goes online successfully.
示例性地,第二应答消息可以为DHCP Ack报文。Exemplarily, the second response message may be a DHCP Ack message.
S617、UP 201中的BRAS模块向CPE 105转发该第二应答消息。S617, the BRAS module in the UP 201 forwards the second response message to the CPE 105.
S618、第一用户可以基于第二应答消息,访问网络。S618. The first user may access the network based on the second response message.
当UP 201中的BRAS模块检测到第一用户访问网络时,可以指示第一业务板为第一用户提供网络服务,When the BRAS module in UP 201 detects that the first user accesses the network, it can instruct the first service board to provide network services for the first user,
即第一用户的流量可以经过第一业务板访问网络。That is, the traffic of the first user can access the network through the first service board.
可选地,在S616之前,方法600还包括:CP 202向认证服务器发送计费请求,对应地,认证服务器向CP 202发送应答消息,该应答消息用于表示开始计费。Optionally, before S616, the method 600 further includes: the CP 202 sends an accounting request to the authentication server, and correspondingly, the authentication server sends a response message to the CP 202, and the response message is used to indicate the start of accounting.
本申请实施例提供的网络地址转换的方法,第一用户请求上线,且认证成功的情况下,CP 202可以为第一用户分配私网IP地址,UP 201中的BRAS模块可以基于第一带宽参数从多个业务板中选择出第一业务板,并根据分配的私网IP地址,为第一用户分配公网IP地址和端口号范围,第一用户可以经过第一业务板连接网络,UP 201中的BRAS模块从带宽的角度选择为第一用户作NAT转换的业务板,可以使多个业务 板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the method for network address translation provided by the embodiment of the present application, when the first user requests to go online and the authentication is successful, the CP 202 can assign a private network IP address to the first user, and the BRAS module in the UP 201 can be based on the first bandwidth parameter Select the first service board from multiple service boards, and allocate the public network IP address and port number range to the first user according to the assigned private network IP address, the first user can connect to the network through the first service board, UP 201 In terms of bandwidth, the BRAS module selects the service board that performs NAT conversion for the first user, which can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization rate of the service board, and help improve the user's business experience.
业务板有新用户上线或者业务板在线用户带宽发生改变,可能会造成业务板带宽资源使用不均衡,因此本申请实施例还提供一种网络地址转换的方法,可以提高业务板带宽资源利用率,有利于多个业务板之间的带宽资源使用均衡,提供用户的业务体验。A new user on the service board or a change in the bandwidth of an online user on the service board may cause unbalanced use of the bandwidth resources of the service board. Therefore, the embodiment of the present application also provides a method for network address translation, which can improve the bandwidth resource utilization of the service board. It is beneficial to balance the use of bandwidth resources among multiple service boards and provide users with better service experience.
图7为本申请实施例提供的又一种网络地址转换的方法700。该方法700可以在上述方法300之后执行。该方法700可以应用于上述图1所示的通信系统100和图2所示的通信系统200,但本申请实施例不限于此。如图7所示,该方法700可以包括下列步骤:FIG. 7 is another network address translation method 700 provided by the embodiment of the present application. The method 700 may be performed after the above method 300 . The method 700 may be applied to the communication system 100 shown in FIG. 1 and the communication system 200 shown in FIG. 2 above, but this embodiment of the present application is not limited thereto. As shown in FIG. 7, the method 700 may include the following steps:
S701、网络设备获取第一业务板的第二带宽参数,第一业务板包括在多个业务板中,第一业务板为第一用户作NAT转换。S701. The network device acquires a second bandwidth parameter of a first service board, where the first service board is included in multiple service boards, and the first service board performs NAT conversion for a first user.
第一用户可以为请求连接网络的任意互联网设备,例如,第一用户可以为图1或者图2中的智能手机101、笔记本电脑102、部署内部网的企业103或者部署宽带的家庭104。应理解,上线即为连接网络。The first user can be any Internet device that requests to connect to the network. For example, the first user can be the smart phone 101, laptop 102 in FIG. 1 or FIG. It should be understood that to go online is to connect to the network.
网络设备可以为BRAS、执行宽带接入功能的UP或者CP。例如,网络设备可以为图1中路由器106中的BRAS模块,网络设备还可以为图2中UP 201中的BRAS模块、执行宽带接入功能的UP 201或者CP 202。The network device may be a BRAS, a UP or a CP performing a broadband access function. For example, the network device can be the BRAS module in the router 106 in FIG. 1, and the network device can also be the BRAS module in the UP 201 in FIG. 2, the UP 201 or the CP 202 performing the broadband access function.
第二带宽参数包括以下至少一个:业务板上在线用户的实时带宽或实时带宽使用比例;其中,所述实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。The second bandwidth parameter includes at least one of the following: real-time bandwidth or real-time bandwidth usage ratio of online users on the service board; wherein, the real-time bandwidth usage ratio is the ratio of the real-time bandwidth sum of online users on the service board to the configured bandwidth of the service board.
S702、当第一业务板的第二带宽参数不满足预设条件时,网络设备基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板。S702. When the second bandwidth parameter of the first service board does not meet the preset condition, the network device determines a target service board based on the second bandwidth parameters of other service boards among the multiple service boards except the first service board.
目标业务板的第二带宽参数满足预设条件。The second bandwidth parameter of the target service board satisfies a preset condition.
预设条件可以基于第二带宽参数的不同而不同。The preset condition may be different based on the second bandwidth parameter.
在一种可能的实现方式中,当第二带宽参数为实时带宽使用比例时,预设条件可以为实时带宽使用比例小于预设比例。In a possible implementation manner, when the second bandwidth parameter is the real-time bandwidth usage ratio, the preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
示例性地,预设比例可以为80%,当第一业务板的实时带宽比例等于或大于80%时,第一业务板的实时带宽比例不满足预设比例,网络设备可以基于多个业务板的实时带宽比例,将实时带宽比例小于80%的业务板确定为目标业务板。Exemplarily, the preset ratio may be 80%. When the real-time bandwidth ratio of the first service board is equal to or greater than 80%, the real-time bandwidth ratio of the first service board does not meet the preset ratio, and the network device may be based on multiple service boards The real-time bandwidth ratio of the real-time bandwidth ratio is determined as the target service board with a real-time bandwidth ratio of less than 80%.
在另一种可能的实现方式中,当第二带宽参数为业务板上在线用户的实时带宽时,预设条件可以是业务板上在线用户的实时带宽总和小于预设带宽。In another possible implementation manner, when the second bandwidth parameter is the real-time bandwidth of the online users on the service board, the preset condition may be that the sum of the real-time bandwidths of the online users on the service board is less than the preset bandwidth.
例如,预设带宽可以为80M,当第一业务板的在线用户的实时带宽总和等于或大于80M时,第一业务板的在线用户的实时带宽总和不满足预设带宽,网络设备可以基于多个业务板的在线用户的实时带宽总和,将在线用户的实时带宽总和小于80M的业务板确定为目标业务板。For example, the preset bandwidth can be 80M. When the total real-time bandwidth of the online users of the first service board is equal to or greater than 80M, and the total real-time bandwidth of the online users of the first service board does not meet the preset bandwidth, the network device can base on multiple The real-time bandwidth sum of the online users of the service boards, and the service board whose real-time bandwidth sum of the online users is less than 80M is determined as the target service board.
每个业务板的配置带宽不同,预设带宽可以根据每个业务板的配置带宽设置不同的预设带宽。The configured bandwidth of each service board is different, and the preset bandwidth can be set according to the configured bandwidth of each service board.
示例性地,业务板1的配置带宽为100M,预设带宽可以设为80M,业务板2的 配置带宽为150M,预设带宽可以设为120M,业务板3的配置带宽为120M,预设带宽可以设为90M。若预设条件为业务板上在线用户的实时带宽总和小于预设带宽,且业务板1(第一业务板)的在线用户的实时带宽总和等于或大于80M,业务板2的在线用户的实时带宽总和小于120M,业务板3的在线用户的实时带宽总和小于90M时,网络设备可以将业务板2或者业务板3确定为目标业务板。Exemplarily, the configuration bandwidth of service board 1 is 100M, and the preset bandwidth can be set to 80M; the configuration bandwidth of service board 2 is 150M, and the preset bandwidth can be set to 120M; Can be set to 90M. If the preset condition is that the total real-time bandwidth of the online users on the service board is less than the preset bandwidth, and the total real-time bandwidth of the online users on the service board 1 (the first service board) is equal to or greater than 80M, the real-time bandwidth of the online users on the service board 2 When the sum is less than 120M and the total real-time bandwidth of online users of service board 3 is less than 90M, the network device may determine service board 2 or service board 3 as the target service board.
S703、网络设备向目标业务板发送第三请求消息,第三请求消息用于指示目标业务板为第一用户作NAT转换。S703. The network device sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
本申请实施例提供的网络地址转换的方法,当第一业务板的第二带宽参数不满足预设条件时,网络设备可以选择满足预设条件的目标业务板为第一用户作NAT转换,可以缓解第一业务板带宽资源紧张的状况,同时可以充分利用目标业务板的带宽资源,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the network address translation method provided in the embodiment of the present application, when the second bandwidth parameter of the first service board does not meet the preset condition, the network device can select the target service board that meets the preset condition to perform NAT translation for the first user, and can Alleviate the tension of the bandwidth resources of the first service board, and at the same time make full use of the bandwidth resources of the target service board, which can make the bandwidth utilization rate among multiple service boards more balanced, improve the bandwidth resource utilization of the service board, and help improve user business experience.
作为一个可选的实施例,上述S702、网络设备基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板,包括:当多个业务板中存在除第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,网络设备基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。As an optional embodiment, the above S702, the network device determines the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board, including: when there are multiple service boards When the second bandwidth parameter of at least one candidate service board other than the first service board satisfies the preset condition, the network device determines the target service board from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board.
多个业务板中除第一业务板之外的其他业务板中可能存在至少一个业务板满足预设条件,该至少一个业务板可以为至少一个候选业务板,网络设备可以基于该至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。Among the multiple service boards except the first service board, there may be at least one service board that satisfies the preset condition, the at least one service board may be at least one candidate service board, and the network device may base on the at least one candidate service board The first bandwidth parameter of the board is used to determine the target service board from at least one candidate service board.
第一带宽参数可以包括以下至少一个:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;其中,已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比。The first bandwidth parameter may include at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio; wherein the configured bandwidth The ratio is the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
例如,当第一带宽参数包括已配置带宽比例或者实时带宽使用比例时,网络设备获取该至少一个候选业务板中每个业务板的第一带宽参数,将该至少一个候选业务板中第一带宽参数数值最小的业务板确定为第一业务板。For example, when the first bandwidth parameter includes the configured bandwidth ratio or the real-time bandwidth usage ratio, the network device acquires the first bandwidth parameter of each service board in the at least one candidate service board, and the first bandwidth in the at least one candidate service board The service board with the smallest parameter value is determined as the first service board.
又如,当第一带宽参数包括业务板上在线用户的配置带宽或者业务板上在线用户的实时带宽时,网络设备统计该至少一个候选业务板中每个业务板的业务板上在线用户的配置带宽总和或者业务板上在线用户的实时带宽总和,将该至少一个候选业务板中每个业务板的业务板上在线用户的配置带宽总和或者业务板上在线用户的实时带宽总和最小的业务板确定为第一业务板。As another example, when the first bandwidth parameter includes the configured bandwidth of online users on the service board or the real-time bandwidth of online users on the service board, the network device counts the configuration of the online users on the service board of each service board in the at least one candidate service board The sum of the bandwidth or the sum of the real-time bandwidth of the online users on the service board is determined by the service board with the minimum configured bandwidth sum of the online users on the service board of each service board in the at least one candidate service board or the sum of the real-time bandwidth of the online users on the service board It is the first business board.
本申请实施例提供的网络地址转换的方法,从满足预设条件的候选业务板中确定目标业务板为第一用户作NAT转换,可以缓解第一业务板带宽资源紧张的状况,同时,考虑候选业务板的带宽参数确定目标业务板,可以提高目标业务板的带宽使用率,有利于使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。The method for network address translation provided by the embodiment of the present application determines the target service board to perform NAT conversion for the first user from the candidate service boards that meet the preset conditions, which can alleviate the situation of the bandwidth resource shortage of the first service board. The bandwidth parameter of the service board determines the target service board, which can improve the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards, improving the bandwidth resource utilization rate of the service board, and improving the user's business experience.
作为一个可选的实施例,网络设备基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板,包括:网络设备基于第一业务板的第一带宽参数,计算第一业务板的待转出带宽;网络设备基于至少一个候选业务板的第一带宽参数,计算至少一个候选业务板的待转入带宽;网络设备基于待转出带宽和待转入带 宽,从至少一个候选业务板中确定目标业务板。As an optional embodiment, the network device determines the target service board from at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board, including: the network device calculates the target service board based on the first bandwidth parameter of the first service board The bandwidth to be transferred out of the first service board; the network device calculates the bandwidth to be transferred in of at least one candidate service board based on the first bandwidth parameter of at least one candidate service board; the network device calculates the bandwidth to be transferred in based on the bandwidth to be transferred out and the bandwidth to be transferred in A target service board is determined from at least one candidate service board.
当第一带宽参数包括已配置带宽比例或者实时带宽使用比例时,网络设备可以基于已配置带宽比例或者实时带宽使用比例,计算第一业务板的待转出带宽以及至少一个候选业务板的待转入带宽。When the first bandwidth parameter includes a configured bandwidth ratio or a real-time bandwidth usage ratio, the network device may calculate the to-be-transferred bandwidth of the first service board and the to-be-transferred bandwidth of at least one candidate service board based on the configured bandwidth ratio or the real-time bandwidth usage ratio. Incoming bandwidth.
当至少一个候选业务板存在第二业务板的待转入带宽大于或等于待转出带宽时,网络设备可以将该第二业务板确定为目标业务板。When at least one candidate service board has a second service board whose bandwidth to be transferred is greater than or equal to the bandwidth to be transferred out, the network device may determine the second service board as the target service board.
示例性地,第一业务板的已配置带宽比例或者实时带宽使用比例为90%,预设条件为已配置带宽比例或者实时带宽使用比例小于或等于80%,第一业务板不满足预设条件,若第一业务板的配置带宽为100M,则第一业务板的待转出带宽为100*(90%-80%)=10M。若候选业务板包括业务板1和业务板2,业务板1的已配置带宽比例或者实时带宽使用比例为60%,业务板1的配置带宽为80M,则业务板1的待转入带宽为80*(80%-60%)=16M,业务板2的已配置带宽比例或者实时带宽使用比例为70%,业务板2的配置带宽为90M,则业务板2的待转入带宽为90*(80%-70%)=9M。业务板1的待转入带宽大于待转出带宽,业务板2的待转入带宽小于待转出带宽,故网络设备可以将业务板1确定为目标业务板。Exemplarily, the configured bandwidth ratio or the real-time bandwidth usage ratio of the first service board is 90%, the preset condition is that the configured bandwidth ratio or the real-time bandwidth usage ratio is less than or equal to 80%, and the first service board does not meet the preset condition , if the configured bandwidth of the first service board is 100M, then the bandwidth to be transferred out of the first service board is 100*(90%-80%)=10M. If the candidate service boards include service board 1 and service board 2, the configured bandwidth ratio or real-time bandwidth usage ratio of service board 1 is 60%, and the configured bandwidth of service board 1 is 80M, then the bandwidth to be transferred to service board 1 is 80M *(80%-60%)=16M, the configured bandwidth ratio or real-time bandwidth usage ratio of service board 2 is 70%, and the configured bandwidth of service board 2 is 90M, then the bandwidth to be transferred in service board 2 is 90*( 80%-70%) = 9M. The bandwidth to be transferred in by service board 1 is greater than the bandwidth to be transferred out, and the bandwidth to be transferred in by service board 2 is smaller than the bandwidth to be transferred out. Therefore, the network device can determine service board 1 as the target service board.
本申请实施例提供的网络地址转换的方法,目标业务板的待转入带宽资源大于或等于第一业务板的待转出资源,可以缓解第一业务板带宽资源紧张的状况的同时,目标业务板为第一用户作NAT转换可以不超出预设条件,还可以提高目标业务板的带宽使用率,有利于使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,有利于提高用户的业务体验。In the network address translation method provided by the embodiment of the present application, the bandwidth resources to be transferred to the target service board are greater than or equal to the resources to be transferred out of the first service board, which can alleviate the shortage of bandwidth resources of the first service board and at the same time, target business The board can perform NAT conversion for the first user without exceeding the preset conditions, and can also increase the bandwidth utilization rate of the target service board, which is conducive to balancing the bandwidth utilization rate among multiple service boards and improving the bandwidth resource utilization rate of the service board , which is conducive to improving the user's service experience.
可选地,当至少一个候选业务板存在至少一个第二业务板的待转入带宽大于或等于待转出带宽时,网络设备可以将该至少一个第二业务板中在线用户数最少的第二业务板确定为目标业务板。Optionally, when at least one candidate service board has at least one second service board whose bandwidth to be transferred is greater than or equal to the bandwidth to be transferred out, the network device may select the second service board with the least number of online users among the at least one second service board. The business board is determined as the target business board.
本申请实施例提供的网络地址转换的方法,在多个第二业务板的待转入带宽大于或等于待转出带宽的情况下,选择在线用户数最少的业务板确定为目标业务板,可以使每个业务板在线用户数较均匀,有利于提高业务板IP地址资源的使用率,有利于提高用户的业务体验。In the network address translation method provided in the embodiment of the present application, when the bandwidth to be transferred in of multiple second service boards is greater than or equal to the bandwidth to be transferred out, the service board with the least number of online users is selected as the target service board, which can Making the number of online users of each service board relatively uniform is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
作为一个可选的实施例,在上述703、网络设备向目标业务板发送第三请求消息之前,方法700还包括:网络设备基于第一业务板的在线用户数、第一业务板上在线用户的实时带宽、或第一业务板上在线用户的配置带宽中的至少一个参数确定第一用户。As an optional embodiment, before the above step 703, before the network device sends the third request message to the target service board, the method 700 further includes: the network device based on the number of online users on the first service board, the number of online users on the first service board The first user is determined by at least one parameter of the real-time bandwidth or the configured bandwidth of the online users on the first service board.
例如,第一业务板的待转出带宽为10M,第一用户的配置带宽或者实时带宽为10M,网络设备可以在第一业务板中的至少一个在线用户中确定第一用户,并请求目标业务板为第一用户作NAT转换。For example, the bandwidth to be transferred out of the first service board is 10M, the configured bandwidth or real-time bandwidth of the first user is 10M, the network device can determine the first user among at least one online user in the first service board, and request the target service The board performs NAT translation for the first user.
又如,目标业务板的在线用户数为10个,第一业务板的在线用户数为20个,第一业务板的待转出带宽为10M,第一用户的配置带宽或者实时带宽为2M,第一业务板中第二用户的配置带宽或者实时带宽为5M,第一业务板中第三用户的配置带宽或者实时带宽为3M,第一业务板中第四用户的配置带宽或者实时带宽为10M,目标业务板的在线用户数远小于第一业务板的在线用户数,网络设备可以在第一业务板中的至 少一个在线用户中确定第一用户、第二用户以及第三用户,并请求目标业务板为第一用户、第二用户以及第三用户作NAT转换。For another example, the number of online users of the target service board is 10, the number of online users of the first service board is 20, the bandwidth to be transferred out of the first service board is 10M, and the configured bandwidth or real-time bandwidth of the first user is 2M. The configured bandwidth or real-time bandwidth of the second user in the first service board is 5M, the configured bandwidth or real-time bandwidth of the third user in the first service board is 3M, and the configured bandwidth or real-time bandwidth of the fourth user in the first service board is 10M , the number of online users of the target service board is much smaller than the number of online users of the first service board, the network device can determine the first user, the second user and the third user among at least one online user of the first service board, and request the target The service board performs NAT conversion for the first user, the second user and the third user.
本申请实施例提供的网络地址转换的方法,可以基于在线用户数或者带宽参数确定第一用户,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,同时可以使每个业务板在线用户数较均匀,有利于提高业务板IP地址资源的使用率,有利于提高用户的业务体验。The network address translation method provided in the embodiment of the present application can determine the first user based on the number of online users or bandwidth parameters, can make the bandwidth usage ratio among multiple service boards more balanced, and improve the bandwidth resource utilization ratio of the service boards, and at the same time It can make the number of online users of each service board relatively uniform, which is conducive to improving the utilization rate of IP address resources of the service board and improving the service experience of users.
作为一个可选的实施例,在上述S703、网络设备向目标业务板发送第三请求消息之后,方法700还包括:网络设备接收来自目标业务板的第三应答消息,第三应答消息包括目标业务板为第一用户分配的新的公网IP地址和新的端口号范围。As an optional embodiment, after the above S703, after the network device sends the third request message to the target service board, the method 700 further includes: the network device receives a third response message from the target service board, the third response message includes the target service The new public network IP address and the new port number range assigned by the board to the first user.
第一用户上线时,可以使用第一业务板分配的公网IP地址和端口号范围,网络设备向目标业务板发送第三请求消息之后,目标业务板可以为第一用户分配新的公网IP地址和新的端口号范围,并发送给网络设备,网络设备接收到新的公网IP地址和新的端口号范围后,当检测到第一用户访问网络时,可以使用新的公网IP地址和新的端口号范围为第一用户提供网络服务。When the first user goes online, the public network IP address and port number range allocated by the first service board can be used. After the network device sends the third request message to the target service board, the target service board can allocate a new public network IP for the first user. The address and the new port number range are sent to the network device. After the network device receives the new public network IP address and the new port number range, when the first user is detected to access the network, the new public network IP address can be used and the new range of port numbers to provide network services to first users.
本申请实施例提供的网络地址转换的方法,目标业务板可以为第一用户分配新的公网IP地址和新的端口号范围,第一用户可以通过目标业务板访问网络,可以提高目标业务板的带宽资源利用率。In the method for network address translation provided in the embodiment of the present application, the target service board can allocate a new public network IP address and a new port number range for the first user, and the first user can access the network through the target service board, which can improve the target service board bandwidth resource utilization.
可选地,网络设备还可以向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。Optionally, the network device may also send a fourth request message to the first service board, where the fourth request message is used to notify the first service board to release the range of the original public network IP address and the original port number of the first user.
本申请实施例提供的网络地址转换的方法,目标业务板为第一用户作NAT转换后,第一业务板可以释放第一用户的原公网IP地址和原端口号范围,可以节省内存资源,同时第一用户不会存在两个公网IP地址和端口号范围,访问网络时不易出错。In the network address translation method provided in the embodiment of the present application, after the target service board performs NAT conversion for the first user, the first service board can release the original public network IP address and the original port number range of the first user, which can save memory resources. At the same time, the first user does not have two ranges of public network IP addresses and port numbers, so it is not easy to make mistakes when accessing the network.
图8为本申请实施例提供另一种网络地址转换的方法800,该方法800可以适用于图1所述的通信系统100。方法800可以理解为:方法700中的网络设备可以为通信系统100中路由器106中的BRAS模块。FIG. 8 provides another network address translation method 800 according to the embodiment of the present application, and the method 800 may be applicable to the communication system 100 described in FIG. 1 . The method 800 can be understood as: the network device in the method 700 can be a BRAS module in the router 106 in the communication system 100 .
如图8所示,该方法800可以包括:As shown in FIG. 8, the method 800 may include:
S801、第一用户经过第一业务板访问网络。S801. The first user accesses the network through the first service board.
第一业务板为第一用户作NAT转换,第一用户可以经过第一业务板访问网络。The first service board performs NAT conversion for the first user, and the first user can access the network through the first service board.
S802、路由器106中的BRAS模块统计第一业务板的在线用户数和第一业务板的在线用户的实时带宽。S802. The BRAS module in the router 106 counts the number of online users of the first service board and the real-time bandwidth of the online users of the first service board.
路由器106中的BRAS模块可以记录第一业务板的在线用户和在线用户的实时带宽,并对在线用户的个数、和第一业务板上所有在线用户的实时带宽的总和进行统计。The BRAS module in the router 106 can record the online users of the first service board and the real-time bandwidth of the online users, and perform statistics on the number of online users and the total real-time bandwidth of all online users on the first service board.
S803、路由器106中的BRAS模块获取第一业务板的实时带宽使用比例。S803. The BRAS module in the router 106 obtains the real-time bandwidth usage ratio of the first service board.
路由器106中的BRAS模块可以向第一业务板发送请求消息,该请求消息用于获取第一业务板的实时带宽使用比例,对应地,第一业务板接收该请求消息后,可以向路由器106中的BRAS模块发送应答消息,该应答消息可以包括第一业务板的实时带宽使用比例。The BRAS module in the router 106 can send a request message to the first service board, and the request message is used to obtain the real-time bandwidth usage ratio of the first service board, correspondingly, after the first service board receives the request message, it can send a request message to the router 106 The BRAS module sends a response message, where the response message may include the real-time bandwidth usage ratio of the first service board.
S804、当第一业务板的实时带宽使用比例不满足预设条件时,网络设备基于多个业务板中除第一业务板之外的其他业务板的实时带宽使用比例,确定目标业务板。S804. When the real-time bandwidth usage ratio of the first service board does not meet the preset condition, the network device determines the target service board based on the real-time bandwidth usage ratios of other service boards in the multiple service boards except the first service board.
预设条件可以为实时带宽使用比例小于预设比例。The preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
示例性地,预设比例可以为80%,当第一业务板的实时带宽比例等于或大于80%时,第一业务板的实时带宽比例不满足预设比例,路由器106中的BRAS模块可以基于多个业务板的实时带宽比例,将实时带宽比例小于80%的业务板确定为目标业务板。Exemplarily, the preset ratio may be 80%. When the real-time bandwidth ratio of the first service board is equal to or greater than 80%, and the real-time bandwidth ratio of the first service board does not meet the preset ratio, the BRAS module in the router 106 may be based on For the real-time bandwidth ratios of multiple service boards, a service board whose real-time bandwidth ratio is less than 80% is determined as a target service board.
S805、路由器106中的BRAS模块向目标业务板发送第三请求消息,该第三请求消息用于指示目标业务板为第一用户作NAT转换,对应地,目标业务板接收该第三请求消息。S805. The BRAS module in the router 106 sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user, and correspondingly, the target service board receives the third request message.
S806、目标业务板为第一用户分配新的公网IP地址和新的端口号范围。S806. The target service board allocates a new public network IP address and a new port number range to the first user.
目标业务板可以更新私网IP地址、公网IP地址以及端口号范围之间的对应关系,即建立私网IP地址、新的公网IP地址以及新的端口号范围之间的对应关系。The target service board can update the corresponding relationship between the private network IP address, the public network IP address and the port number range, that is, establish the corresponding relationship between the private network IP address, the new public network IP address and the new port number range.
S807、目标业务板向路由器106中的BRAS模块发送第三应答消息,第三应答消息包括目标业务板为第一用户分配的新的公网IP地址和新的端口号范围,路由器106中的BRAS模块接收第三应答消息。S807, the target service board sends a third response message to the BRAS module in the router 106, the third response message includes the new public network IP address and the new port number range allocated by the target service board for the first user, and the BRAS in the router 106 The module receives the third response message.
S808、路由器106中的BRAS模块向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。S808. The BRAS module in the router 106 sends a fourth request message to the first service board, where the fourth request message is used to notify the first service board to release the range of the original public network IP address and the original port number of the first user.
S809、第一用户经过目标业务板访问网络。S809. The first user accesses the network through the target service board.
当路由器106中的BRAS模块检测到第一用户访问网络时,可以指示目标业务板为第一用户提供网络服务,即第一用户的流量由目标业务板处理。When the BRAS module in the router 106 detects that the first user accesses the network, it may instruct the target service board to provide network services for the first user, that is, the traffic of the first user is processed by the target service board.
可选地,在上述S803之前,路由器106中的BRAS模块可以向认证服务器发送计费统计报文。Optionally, before the above S803, the BRAS module in the router 106 may send the accounting statistics message to the authentication server.
本申请实施例提供的网络地址转换的方法,当第一业务板的实时带宽使用比例不满足预设条件时,路由器106中的BRAS模块可以选择满足预设条件的目标业务板为第一用户分配新的公网IP地址和新的端口号范围,可以缓解第一业务板带宽资源紧张的状况,同时,可以充分利用目标业务板的带宽资源,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,另外,第一业务板可以释放为第一用户分配的原公网IP地址和原端口号范围,可以节省内存资源,同时可以为更多的用户作NAT转换,有利于提高用户的业务体验。In the network address translation method provided by the embodiment of the present application, when the real-time bandwidth usage ratio of the first service board does not meet the preset condition, the BRAS module in the router 106 can select the target service board that meets the preset condition to assign the bandwidth to the first user. The new public network IP address and the new port number range can alleviate the tightness of the bandwidth resources of the first service board. Balanced to improve the bandwidth resource utilization of the service board. In addition, the first service board can release the original public network IP address and the original port number range allocated for the first user, which can save memory resources and can be used as NAT for more users. Conversion is conducive to improving the user's business experience.
图9为本申请实施例提供又一种网络地址转换的方法900,该方法900可以适用于图2所述的通信系统200。方法900可以理解为:方法700中的网络设备可以为通信系统200中的CP 202。FIG. 9 provides another network address translation method 900 according to the embodiment of the present application, and the method 900 may be applicable to the communication system 200 described in FIG. 2 . The method 900 can be understood as: the network device in the method 700 can be the CP 202 in the communication system 200.
如图9所示,该方法900可以包括:As shown in Figure 9, the method 900 may include:
S901、第一用户经过第一业务板访问网络。S901. The first user accesses the network through the first service board.
第一业务板为第一用户作NAT转换,第一用户可以经过第一业务板访问网络。The first service board performs NAT conversion for the first user, and the first user can access the network through the first service board.
S902、UP 201中的BRAS模块统计第一业务板的在线用户数和第一业务板的在线用户的实时带宽。S902, the BRAS module in the UP 201 counts the number of online users of the first service board and the real-time bandwidth of the online users of the first service board.
UP 201中的BRAS模块可以记录第一业务板的在线用户和在线用户的实时带宽,并对在线用户的个数、和第一业务板上所有在线用户的实时带宽的总和进行统计。The BRAS module in the UP 201 can record the online users of the first service board and the real-time bandwidth of the online users, and perform statistics on the number of online users and the sum of the real-time bandwidth of all online users on the first service board.
S903、UP 201中的BRAS模块获取第一业务板的实时带宽使用比例。S903, the BRAS module in the UP 201 acquires the real-time bandwidth usage ratio of the first service board.
UP 201中的BRAS模块可以向第一业务板发送请求消息,该请求消息用于获取第 一业务板的实时带宽使用比例,对应地,第一业务板接收该请求消息后,可以向UP 201中的BRAS模块发送应答消息,该应答消息可以包括第一业务板的实时带宽使用比例。The BRAS module in the UP 201 can send a request message to the first service board, and the request message is used to obtain the real-time bandwidth usage ratio of the first service board. Correspondingly, after the first service board receives the request message, it can send a request message to the UP 201 The BRAS module sends a response message, where the response message may include the real-time bandwidth usage ratio of the first service board.
S904、UP 201中的BRAS模块向CP 202发送第一信息,该第一信息包括第一业务板的实时带宽使用比例,对应地,CP 202接收第一信息。S904, the BRAS module in the UP 201 sends first information to the CP 202, where the first information includes the real-time bandwidth utilization ratio of the first service board, and correspondingly, the CP 202 receives the first information.
S905、当第一业务板的实时带宽使用比例不满足预设条件时,CP 202基于多个业务板中除第一业务板之外的其他业务板的实时带宽使用比例,确定目标业务板。S905. When the real-time bandwidth usage ratio of the first service board does not meet the preset condition, the CP 202 determines the target service board based on the real-time bandwidth usage ratios of other service boards in the multiple service boards except the first service board.
预设条件可以为实时带宽使用比例小于预设比例。The preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
示例性地,预设比例可以为80%,当第一业务板的实时带宽比例等于或大于80%时,第一业务板的实时带宽比例不满足预设比例,网络设备可以基于多个业务板的实时带宽比例,将实时带宽比例小于80%的业务板确定为目标业务板。Exemplarily, the preset ratio may be 80%. When the real-time bandwidth ratio of the first service board is equal to or greater than 80%, the real-time bandwidth ratio of the first service board does not meet the preset ratio, and the network device may be based on multiple service boards The real-time bandwidth ratio of the real-time bandwidth ratio is determined as the target service board with a real-time bandwidth ratio of less than 80%.
S906、CP 202向目标业务板发送第三请求消息,该第三请求消息用于指示目标业务板为第一用户作NAT转换,对应地,目标业务板接收该第三请求消息。S906. The CP 202 sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user, and correspondingly, the target service board receives the third request message.
S907、目标业务板为第一用户分配新的公网IP地址和新的端口号范围。S907. The target service board allocates a new public network IP address and a new port number range to the first user.
目标业务板可以更新私网IP地址、公网IP地址以及端口号范围之间的对应关系,即建立私网IP地址、新的公网IP地址以及新的端口号范围之间的对应关系。The target service board can update the corresponding relationship between the private network IP address, the public network IP address and the port number range, that is, establish the corresponding relationship between the private network IP address, the new public network IP address and the new port number range.
S908、目标业务板向CP 202发送第三应答消息,第三应答消息包括目标业务板为第一用户分配的新的公网IP地址和新的端口号范围,CP 202接收第三应答消息。S908. The target service board sends a third response message to the CP 202. The third response message includes the new public network IP address and the new port number range allocated by the target service board to the first user, and the CP 202 receives the third response message.
S909、CP 202向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。S909. The CP 202 sends a fourth request message to the first service board, where the fourth request message is used to notify the first service board to release the original public network IP address and the original port number range of the first user.
S910、第一用户经过目标业务板访问网络。S910. The first user accesses the network through the target service board.
当CP 202检测到第一用户访问网络时,可以指示目标业务板为第一用户提供网络服务,即第一用户的流量由目标业务板处理。When the CP 202 detects that the first user accesses the network, it can instruct the target service board to provide network services for the first user, that is, the traffic of the first user is processed by the target service board.
可选地,在上述S903之前,CP 202可以向认证服务器发送计费统计报文。Optionally, before the above S903, the CP 202 may send an accounting statistics message to the authentication server.
本申请实施例提供的网络地址转换的方法,当第一业务板的实时带宽使用比例不满足预设条件时,CP 202可以选择满足预设条件的目标业务板为第一用户分配新的公网IP地址和新的端口号范围,可以缓解第一业务板带宽资源紧张的状况,同时,可以充分利用目标业务板的带宽资源,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,另外,第一业务板可以释放为第一用户分配的原公网IP地址和原端口号范围,可以节省内存资源,同时可以为更多的用户作NAT转换,有利于提高用户的业务体验。In the network address translation method provided in the embodiment of the present application, when the real-time bandwidth usage ratio of the first service board does not meet the preset condition, the CP 202 can select a target service board that meets the preset condition to assign a new public network to the first user The IP address and the new port number range can alleviate the tightness of the bandwidth resources of the first service board, and at the same time, can make full use of the bandwidth resources of the target service board, which can make the bandwidth utilization ratio among multiple service boards more balanced, and improve the business In addition, the first service board can release the original public network IP address and original port number range allocated for the first user, which can save memory resources, and can perform NAT conversion for more users at the same time, which is beneficial to Improve user experience.
图10为本申请实施例提供另一种网络地址转换的方法1000,该方法1000可以适用于图2所述的通信系统200。方法1000可以理解为:方法700中的网络设备可以为通信系统200中的UP 201中的BRAS模块。FIG. 10 provides another network address translation method 1000 according to the embodiment of the present application, and the method 1000 may be applicable to the communication system 200 described in FIG. 2 . The method 1000 can be understood as: the network device in the method 700 can be the BRAS module in the UP 201 in the communication system 200.
如图10所示,该方法1000可以包括:As shown in Figure 10, the method 1000 may include:
S1001、第一用户经过第一业务板访问网络。S1001. A first user accesses a network through a first service board.
第一业务板为第一用户作NAT转换,第一用户可以经过第一业务板访问网络。The first service board performs NAT conversion for the first user, and the first user can access the network through the first service board.
S1002、UP 201中的BRAS模块统计第一业务板的在线用户数和第一业务板的在线用户的实时带宽。S1002, the BRAS module in the UP 201 counts the number of online users of the first service board and the real-time bandwidth of the online users of the first service board.
BRAS模块可以记录第一业务板的在线用户和在线用户的实时带宽,并对在线用 户的个数、和第一业务板上所有在线用户的实时带宽的总和进行统计。The BRAS module can record the online users of the first service board and the real-time bandwidth of the online users, and perform statistics on the number of online users and the sum of the real-time bandwidth of all online users on the first service board.
S1003、UP 201中的BRAS模块获取第一业务板的实时带宽使用比例。S1003, the BRAS module in the UP 201 acquires the real-time bandwidth usage ratio of the first service board.
BRAS模块可以向第一业务板发送请求消息,该请求消息用于获取第一业务板的实时带宽使用比例,对应地,第一业务板接收该请求消息后,可以向UP 201中的BRAS模块发送应答消息,该应答消息可以包括第一业务板的实时带宽使用比例。The BRAS module can send a request message to the first service board, and the request message is used to obtain the real-time bandwidth usage ratio of the first service board. Correspondingly, after the first service board receives the request message, it can send the request message to the BRAS module in the UP 201 A response message, where the response message may include the real-time bandwidth usage ratio of the first service board.
S1004、当第一业务板的实时带宽使用比例不满足预设条件时,UP 201中的BRAS模块基于多个业务板中除第一业务板之外的其他业务板的实时带宽使用比例,确定目标业务板。S1004, when the real-time bandwidth usage ratio of the first service board does not meet the preset condition, the BRAS module in the UP 201 determines the target based on the real-time bandwidth usage ratios of other service boards in the multiple service boards except the first service board business board.
预设条件可以为实时带宽使用比例小于预设比例。The preset condition may be that the real-time bandwidth usage ratio is smaller than the preset ratio.
示例性地,预设比例可以为80%,当第一业务板的实时带宽比例等于或大于80%时,第一业务板的实时带宽比例不满足预设比例,网络设备可以基于多个业务板的实时带宽比例,将实时带宽比例小于80%的业务板确定为目标业务板。Exemplarily, the preset ratio may be 80%. When the real-time bandwidth ratio of the first service board is equal to or greater than 80%, the real-time bandwidth ratio of the first service board does not meet the preset ratio, and the network device may be based on multiple service boards The real-time bandwidth ratio of the real-time bandwidth ratio is determined as the target service board with a real-time bandwidth ratio of less than 80%.
S1005、UP 201中的BRAS模块向目标业务板发送第三请求消息,该第三请求消息用于指示目标业务板为第一用户作NAT转换,对应地,目标业务板接收该第三请求消息。S1005, the BRAS module in the UP 201 sends a third request message to the target service board, the third request message is used to instruct the target service board to perform NAT conversion for the first user, and correspondingly, the target service board receives the third request message.
S1006、目标业务板为第一用户分配新的公网IP地址和新的端口号范围。S1006. The target service board allocates a new public network IP address and a new port number range to the first user.
目标业务板可以更新私网IP地址、公网IP地址以及端口号范围之间的对应关系,即建立私网IP地址、新的公网IP地址以及新的端口号范围之间的对应关系。The target service board can update the corresponding relationship between the private network IP address, the public network IP address and the port number range, that is, establish the corresponding relationship between the private network IP address, the new public network IP address and the new port number range.
S1007、目标业务板向UP 201中的BRAS模块发送第三应答消息,第三应答消息包括目标业务板为第一用户分配的新的公网IP地址和新的端口号范围,UP 201中的BRAS模块接收第三应答消息。S1007, the target service board sends the third response message to the BRAS module in the UP 201, the third response message includes the new public network IP address and the new port number range allocated by the target service board for the first user, and the BRAS in the UP 201 The module receives the third response message.
S1008、UP 201中的BRAS模块向CP 202发送第二信息,该第二信息包括目标业务板为第一用户分配的新的公网IP地址和新的端口号范围,对应地,CP 202接收第二信息。S1008, the BRAS module in the UP 201 sends second information to the CP 202, the second information includes the new public network IP address and the new port number range allocated by the target service board for the first user, correspondingly, the CP 202 receives the first Two information.
S1009、UP 201中的BRAS模块向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。S1009, the BRAS module in the UP 201 sends a fourth request message to the first service board, and the fourth request message is used to notify the first service board to release the original public network IP address and the original port number range of the first user.
S1010、第一用户经过目标业务板访问网络。S1010. The first user accesses the network through the target service board.
当UP 201中的BRAS模块检测到第一用户访问网络时,可以指示目标业务板为第一用户提供网络服务,即第一用户的流量由目标业务板处理。When the BRAS module in UP 201 detects that the first user accesses the network, it can instruct the target service board to provide network services for the first user, that is, the traffic of the first user is processed by the target service board.
可选地,在上述S1003之前,UP 201中的BRAS模块可以向CP 202发送计费统计报文,CP 202可以向认证服务器转发该计费统计报文。Optionally, before the above S1003, the BRAS module in the UP 201 can send the accounting statistics message to the CP 202, and the CP 202 can forward the accounting statistics message to the authentication server.
本申请实施例提供的网络地址转换的方法,当第一业务板的实时带宽使用比例不满足预设条件时,UP 201中的BRAS模块可以选择满足预设条件的目标业务板为第一用户分配新的公网IP地址和新的端口号范围,可以缓解第一业务板带宽资源紧张的状况,同时,可以充分利用目标业务板的带宽资源,可以使多个业务板之间的带宽使用率较均衡,提升业务板的带宽资源利用率,另外,第一业务板可以释放为第一用户分配的原公网IP地址和原端口号范围,可以节省内存资源,同时可以为更多的用户作NAT转换,有利于提高用户的业务体验。In the method for network address translation provided in the embodiment of the present application, when the real-time bandwidth utilization ratio of the first service board does not meet the preset condition, the BRAS module in the UP 201 can select a target service board that satisfies the preset condition to allocate to the first user. The new public network IP address and the new port number range can alleviate the tightness of the bandwidth resources of the first service board. Balanced to improve the bandwidth resource utilization of the service board. In addition, the first service board can release the original public network IP address and the original port number range allocated for the first user, which can save memory resources and can be used as NAT for more users. Conversion is conducive to improving the user's business experience.
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺 序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
上文中结合图1至图10,详细描述了本申请实施例提供的网络地址转换的方法,下面将结合图11至图13,详细描述本申请实施例提供的网络地址转换的装置。The method for NAT provided by the embodiment of the present application is described in detail above with reference to FIG. 1 to FIG. 10 . The apparatus for NAT provided by the embodiment of the present application will be described in detail below in conjunction with FIG. 11 to FIG. 13 .
图11示出了本申请实施例提供的一种网络地址转换的装置1100,该装置1100包括:收发模块1110和处理模块1120。FIG. 11 shows an apparatus 1100 for network address translation provided by an embodiment of the present application. The apparatus 1100 includes: a transceiver module 1110 and a processing module 1120 .
在一个可选的例子中,本领域技术人员可以理解,装置1100可以具体为上述方法300或者方法700中的网络设备,或者,上述方法300或者方法700中网络设备中的功能可以集成在装置1100中。上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。装置1100可以用于执行上述方法实施例中与网络设备对应的各个流程和/或步骤。In an optional example, those skilled in the art can understand that the apparatus 1100 may specifically be the network device in the above-mentioned method 300 or method 700, or the functions of the network device in the above-mentioned method 300 or method 700 may be integrated in the apparatus 1100 middle. The above functions can be implemented by hardware, or can be implemented by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions. Apparatus 1100 may be configured to execute various processes and/or steps corresponding to network devices in the foregoing method embodiments.
可选地,在上述方法400和方法800中,网络设备可以为路由器106中的BRAS模块。Optionally, in the foregoing method 400 and method 800, the network device may be a BRAS module in the router 106.
可选地,在上述方法500和方法900中,网络设备可以为CP 202。Optionally, in the foregoing method 500 and method 900, the network device may be the CP 202.
可选地,在上述方法600和方法1000中,网络设备可以为UP 201或者为UP 201中的BRAS模块。Optionally, in the foregoing method 600 and method 1000, the network device may be the UP 201 or the BRAS module in the UP 201.
其中,收发模块1110可以用于执行上述方法300中的S301,即用于接收第一请求消息,第一请求消息用于请求第一用户上线。处理模块1120可以用于执行上述方法300中的S302,即用于基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板;收发模块还可以用于执行上述方法300中的S303,即用于向第一业务板发送第二请求消息,第二请求消息用于指示第一业务板为第一用户作NAT转换。Wherein, the transceiver module 1110 may be used to execute S301 in the above method 300, that is, to receive a first request message, and the first request message is used to request the first user to go online. The processing module 1120 can be used to execute S302 in the above-mentioned method 300, that is, to select the first service board from multiple service boards based on the first bandwidth parameters of the multiple service boards; the transceiver module can also be used to execute the above-mentioned method 300 In S303, it is used to send a second request message to the first service board, and the second request message is used to instruct the first service board to perform NAT conversion for the first user.
可选地,第一带宽参数包括以下至少一个:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;其中,已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比,实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。Optionally, the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio; wherein, The configured bandwidth ratio is the ratio of the total configured bandwidth of online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
可选地,当第一带宽参数包括已配置带宽比例或者实时带宽使用比例时,装置1100还包括获取模块;获取模块用于:获取多个业务板中每个业务板的第一带宽参数;处理模块1120还用于:将多个业务板中第一带宽参数数值最小的业务板确定为第一业务板。Optionally, when the first bandwidth parameter includes a configured bandwidth ratio or a real-time bandwidth usage ratio, the apparatus 1100 further includes an acquisition module; the acquisition module is configured to: acquire the first bandwidth parameter of each service board in the plurality of service boards; process Module 1120 is further configured to: determine the service board with the smallest value of the first bandwidth parameter among the multiple service boards as the first service board.
可选地,处理模块1120还用于:在多个业务板中每个业务板的第一带宽参数数值相同的情况下,将多个业务板中在线用户数最少的业务板确定为第一业务板。Optionally, the processing module 1120 is further configured to: in the case that the value of the first bandwidth parameter of each of the multiple service boards is the same, determine the service board with the least number of online users among the multiple service boards as the first service board plate.
可选地,收发模块1110还用于:接收来自第一业务板的第一应答消息,第一应答消息包括第一业务板为第一用户分配的公网互联网协议IP地址和端口号范围;向用户端设备发送第二应答消息,第二应答消息用于表示第一用户上线成功,第一用户通过用户端设备连接至网络设备。Optionally, the transceiver module 1110 is also configured to: receive a first response message from the first service board, where the first response message includes the public network IP address and port number range assigned by the first service board to the first user; The client device sends a second response message, where the second response message is used to indicate that the first user goes online successfully, and the first user connects to the network device through the client device.
可选地,装置1100还包括获取模块;获取模块用于:获取第一业务板的第二带宽参数;处理模块1120还用于:当第一业务板的第二带宽参数不满足预设条件时,基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;收发模块1110还用于:向目标业务板发送第三请求消息,第三请求消息用于指示目标业 务板为第一用户作NAT转换。Optionally, the device 1100 further includes an acquisition module; the acquisition module is used to: acquire the second bandwidth parameter of the first service board; the processing module 1120 is also used to: when the second bandwidth parameter of the first service board does not meet the preset condition , determine the target service board based on the second bandwidth parameters of other service boards in the plurality of service boards except the first service board; the transceiver module 1110 is also used to: send a third request message to the target service board, the third request message It is used to instruct the target service board to perform NAT conversion for the first user.
可选地,第二带宽参数包括业务板上在线用户的实时带宽或实时带宽使用比例。Optionally, the second bandwidth parameter includes real-time bandwidth or real-time bandwidth usage ratio of online users on the service board.
可选地,目标业务板的第二带宽参数满足预设条件。Optionally, the second bandwidth parameter of the target service board satisfies a preset condition.
可选地,处理模块1120还用于:当多个业务板中存在除第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。Optionally, the processing module 1120 is further configured to: when the second bandwidth parameter of at least one candidate service board other than the first service board among the multiple service boards satisfies a preset condition, based on the second bandwidth parameter of the at least one candidate service board A bandwidth parameter for determining a target service board from at least one candidate service board.
可选地,处理模块1120还用于:基于第一业务板的第一带宽参数,计算第一业务板的待转出带宽;基于至少一个候选业务板的第一带宽参数,计算至少一个候选业务板的待转入带宽;基于待转出带宽和待转入带宽,从至少一个候选业务板中确定目标业务板。Optionally, the processing module 1120 is further configured to: calculate the to-be-transferred bandwidth of the first service board based on the first bandwidth parameter of the first service board; calculate at least one candidate service based on the first bandwidth parameter of at least one candidate service board The board's to-be-transferred bandwidth; based on the to-be-transferred bandwidth and the to-be-transferred bandwidth, determine a target service board from at least one candidate service board.
可选地,处理模块1120还用于:基于第一业务板的在线用户数、第一业务板上在线用户的实时带宽、或第一业务板上在线用户的配置带宽中的至少一个参数确定第一用户。Optionally, the processing module 1120 is further configured to: determine the second parameter based on at least one parameter of the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the configured bandwidth of online users on the first service board. a user.
可选地,收发模块1110还用于:接收来自目标业务板的第三应答消息,第三应答消息包括目标业务板为第一用户分配的新的公网IP地址和新的端口号范围。Optionally, the transceiver module 1110 is further configured to: receive a third response message from the target service board, where the third response message includes the new public network IP address and the new port number range allocated to the first user by the target service board.
可选地,收发模块1110还用于:向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。Optionally, the transceiver module 1110 is further configured to: send a fourth request message to the first service board, the fourth request message is used to notify the first service board to release the original public network IP address and the original port number range of the first user.
可选地,收发模块1110还用于:基于第一请求消息,向认证服务器发送第五请求消息,第五请求消息用于为第一用户请求认证;处理模块1120还用于:在认证成功的情况下,为第一用户分配私网IP地址;收发模块1110还用于:向第一用户发送第五应答消息,第五应答消息用于表示装置为第一用户分配的私网IP地址。Optionally, the transceiver module 1110 is further configured to: send a fifth request message to the authentication server based on the first request message, where the fifth request message is used to request authentication for the first user; the processing module 1120 is also configured to: In this case, allocate a private network IP address to the first user; the transceiver module 1110 is further configured to: send a fifth response message to the first user, and the fifth response message is used to indicate the private network IP address allocated by the device to the first user.
可选地,装置1100为宽带接入服务器、执行宽带接入功能的用户面设备或者控制面设备。Optionally, the apparatus 1100 is a broadband access server, a user plane device or a control plane device performing a broadband access function.
图12示出了本申请实施例提供的另一种网络地址转换的装置1200,该装置1200获取模块1210、处理模块1220以及收发模块1230。FIG. 12 shows another network address translation device 1200 provided by an embodiment of the present application. The device 1200 obtains a module 1210 , a processing module 1220 and a transceiver module 1230 .
在一个可选的例子中,本领域技术人员可以理解,装置1200可以具体为上述方法700中的网络设备,或者,上述方法700中网络设备中的功能可以集成在装置1200中。上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。装置1200可以用于执行上述方法实施例中与网络设备对应的各个流程和/或步骤。In an optional example, those skilled in the art may understand that the apparatus 1200 may specifically be the network device in the foregoing method 700 , or the functions of the network device in the foregoing method 700 may be integrated in the apparatus 1200 . The above functions can be implemented by hardware, or can be implemented by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions. Apparatus 1200 may be configured to execute various processes and/or steps corresponding to network devices in the foregoing method embodiments.
可选地,在上述方法800中,网络设备可以为路由器106中的BRAS模块。Optionally, in the foregoing method 800, the network device may be a BRAS module in the router 106.
可选地,在上述方法900中,网络设备可以为CP 202。Optionally, in the foregoing method 900, the network device may be the CP 202.
可选地,在上述1000中,网络设备可以为UP 201或者为UP 201中的BRAS模块。Optionally, in the above 1000, the network device may be the UP 201 or the BRAS module in the UP 201.
其中,获取模块1210可以用于执行上述方法700中的S701,即用于获取第一业务板的第二带宽参数,第一业务板包括在多个业务板中,第一业务板为第一用户作NAT转换;处理模块1220可以用于执行上述方法700中的S702,即用于当第一业务板的第二带宽参数不满足预设条件时,基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;收发模块1230可以用于执行上述方法700 中的S703,即用于向目标业务板发送第三请求消息,第三请求消息用于指示目标业务板为第一用户作NAT转换。Wherein, the acquisition module 1210 can be used to execute S701 in the above method 700, that is, to acquire the second bandwidth parameter of the first service board, the first service board is included in multiple service boards, and the first service board is the first user Perform NAT conversion; the processing module 1220 can be used to execute S702 in the above-mentioned method 700, that is, when the second bandwidth parameter of the first service board does not meet the preset condition, based on multiple service boards except the first service board The second bandwidth parameter of other service boards, to determine the target service board; the transceiver module 1230 can be used to execute S703 in the above method 700, that is, to send a third request message to the target service board, and the third request message is used to indicate The target service board performs NAT conversion for the first user.
可选地,第二带宽参数包括业务板上在线用户的实时带宽或实时带宽使用比例,其中,实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。Optionally, the second bandwidth parameter includes real-time bandwidth or real-time bandwidth usage ratio of online users on the service board, where the real-time bandwidth usage ratio is the ratio of the total real-time bandwidth of online users on the service board to the configured bandwidth of the service board.
可选地,收发模块1230还用于:接收第一请求消息,第一请求消息用于请求第一用户上线;处理模块1220还用于:基于多个业务板的第一带宽参数,从多个业务板中选择第一业务板;收发模块1230还用于:向第一业务板发送第二请求消息,第二请求消息用于指示第一业务板为第一用户作NAT转换。Optionally, the transceiver module 1230 is also configured to: receive a first request message, the first request message is used to request the first user to go online; the processing module 1220 is also configured to: based on the first bandwidth parameters of multiple service boards, from multiple The first service board is selected among the service boards; the transceiver module 1230 is further configured to: send a second request message to the first service board, and the second request message is used to instruct the first service board to perform NAT conversion for the first user.
可选地,第一带宽参数包括以下至少一个:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;其中,已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比。Optionally, the first bandwidth parameter includes at least one of the following: configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio; wherein, The configured bandwidth ratio is the ratio of the sum of the configured bandwidth of online users on the service board to the configured bandwidth of the service board.
可选地,处理模块1220还用于:当多个业务板中存在除第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,基于至少一个候选业务板的第一带宽参数,从至少一个候选业务板中确定目标业务板。Optionally, the processing module 1220 is further configured to: when the second bandwidth parameter of at least one candidate service board other than the first service board among the multiple service boards satisfies a preset condition, based on the second bandwidth parameter of the at least one candidate service board A bandwidth parameter for determining a target service board from at least one candidate service board.
可选地,处理模块1220还用于:基于第一业务板的第一带宽参数,计算第一业务板的待转出带宽;基于至少一个候选业务板的第一带宽参数,计算至少一个候选业务板的待转入带宽;基于待转出带宽和待转入带宽,从至少一个候选业务板中确定目标业务板。Optionally, the processing module 1220 is further configured to: calculate the to-be-transferred bandwidth of the first service board based on the first bandwidth parameter of the first service board; calculate at least one candidate service based on the first bandwidth parameter of at least one candidate service board The board's to-be-transferred bandwidth; based on the to-be-transferred bandwidth and the to-be-transferred bandwidth, determine a target service board from at least one candidate service board.
可选地,处理模块1220还用于:基于第一业务板的在线用户数、第一业务板上在线用户的实时带宽、或第一业务板上在线用户的配置带宽中的至少一个参数确定第一用户。Optionally, the processing module 1220 is further configured to: determine the second parameter based on at least one parameter of the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the configured bandwidth of online users on the first service board. a user.
可选地,收发模块1230还用于:向第一业务板发送第四请求消息,第四请求消息用于通知第一业务板释放第一用户的原公网IP地址和原端口号范围。Optionally, the transceiver module 1230 is further configured to: send a fourth request message to the first service board, the fourth request message is used to notify the first service board to release the original public network IP address and the original port number range of the first user.
应理解,上述装置1100和装置1200均以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选的例子中,本领域技术人员可以理解,网络地址转换的装置1100或网络地址转换的装置1200可以具体为上述方法实施例中的网络设备,或者,上述方法实施例中网络设备的功能可以集成在网络地址转换的装置1100或网络地址转换的装置1200中,网络地址转换的装置1100或网络地址转换的装置1200可以用于执行上述方法实施例中与网络设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。It should be understood that the foregoing apparatus 1100 and apparatus 1200 are both embodied in the form of functional modules. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and memory, incorporated logic, and/or other suitable components to support the described functionality. In an optional example, those skilled in the art can understand that the network address translation apparatus 1100 or the network address translation apparatus 1200 may specifically be the network device in the above method embodiment, or the network device in the above method embodiment The function can be integrated in the network address translation apparatus 1100 or the network address translation apparatus 1200, and the network address translation apparatus 1100 or the network address translation apparatus 1200 can be used to execute the various processes corresponding to the network equipment in the above method embodiments and/or or steps, in order to avoid repetition, no more details are given here.
上述网络地址转换的装置1100或网络地址转换的装置1200具有实现上述方法实施例中网络设备执行的相应步骤的功能;上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。The above-mentioned NAT apparatus 1100 or NAT apparatus 1200 has the function of implementing the corresponding steps performed by the network device in the above-mentioned method embodiment; the above-mentioned functions can be realized by hardware, and can also be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
在本申请的实施例中,图11中的网络地址转换的装置或图12中的网络地址转换的装置也可以是芯片或者芯片系统,例如:片上系统(system on chip,SoC)。In the embodiment of the present application, the NAT device in FIG. 11 or the NAT device in FIG. 12 may also be a chip or a chip system, for example: a system on chip (system on chip, SoC).
图13是本申请实施例提供的另一种网络地址转换的装置1300的示意性框图。该网络地址转换的装置1300包括处理器1310、收发器1320和存储器1330。其中,处理器1310、收发器1320和存储器1330通过内部连接通路互相通信,该存储器1330用于存储指令,该处理器2140用于执行该存储器1330存储的指令,以控制该收发器1320发送信号和/或接收信号。FIG. 13 is a schematic block diagram of another network address translation apparatus 1300 provided by an embodiment of the present application. The apparatus 1300 for network address translation includes a processor 1310 , a transceiver 1320 and a memory 1330 . Wherein, the processor 1310, the transceiver 1320 and the memory 1330 communicate with each other through an internal connection path, the memory 1330 is used to store instructions, and the processor 2140 is used to execute the instructions stored in the memory 1330 to control the transceiver 1320 to send signals and /or to receive a signal.
应理解,网络地址转换的装置1300可以具体为上述方法300或者方法700中的网络设备,或者,上述方法300或者方法400中网络设备的功能可以集成在网络地址转换的装置1300中,网络地址转换的装置1300可以用于执行上述方法300或者方法700中与网络设备对应的各个步骤和/或流程。可选地,该存储器1330可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器1310可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法300或者方法700中与网络设备对应的各个步骤和/或流程。It should be understood that the network address translation apparatus 1300 may specifically be the network device in the above-mentioned method 300 or method 700, or the functions of the network equipment in the above-mentioned method 300 or method 400 may be integrated in the network address translation apparatus 1300, and the network address translation The apparatus 1300 can be used to execute each step and/or process corresponding to the network device in the above-mentioned method 300 or method 700. Optionally, the memory 1330 may include read-only memory and random-access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 1310 may be configured to execute instructions stored in the memory, and when the processor executes the instructions, the processor may execute various steps and/or processes corresponding to the network device in the above method 300 or method 700 .
可选地,在上述方法400和方法800中,网络设备可以为路由器106中的BRAS模块。Optionally, in the foregoing method 400 and method 800, the network device may be a BRAS module in the router 106.
可选地,在上述方法500和方法900中,网络设备可以为CP 202。Optionally, in the foregoing method 500 and method 900, the network device may be the CP 202.
可选地,在上述方法600和方法1000中,网络设备可以为UP 201或者为UP 201中的BRAS模块。Optionally, in the foregoing method 600 and method 1000, the network device may be the UP 201 or the BRAS module in the UP 201.
还应理解,网络地址转换的装置1300中处理器1310可以具体实现上述装置1100中的处理模块1120的功能,收发器1320可以具体实现上述装置1100中的收发模块1110的功能,存储器1330可以存储实现处理器1310和收发器1320功能的指令。It should also be understood that the processor 1310 in the network address translation device 1300 can specifically implement the functions of the processing module 1120 in the above-mentioned device 1100, the transceiver 1320 can specifically realize the functions of the transceiver module 1110 in the above-mentioned device 1100, and the memory 1330 can store and implement Instructions for processor 1310 and transceiver 1320 functions.
网络地址转换的装置1300中处理器1310还可以具体实现上述装置1200中的处理模块1220的功能,收发器1320可以具体实现上述装置1200中的收发模块1230的功能,处理器1310或者收发器1320还可以具体实现上述装置1200中的获取模块1210的功能,存储器1330可以存储实现处理器1310和收发器1320功能的指令。The processor 1310 in the network address translation device 1300 can also specifically implement the functions of the processing module 1220 in the above-mentioned device 1200, and the transceiver 1320 can specifically realize the functions of the transceiver module 1230 in the above-mentioned device 1200, and the processor 1310 or the transceiver 1320 can also implement The functions of the acquisition module 1210 in the above-mentioned apparatus 1200 may be specifically realized, and the memory 1330 may store instructions for realizing the functions of the processor 1310 and the transceiver 1320 .
应理解,在本申请实施例中,该处理器1310可以是中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present application, the processor 1310 may be a central processing unit (central processing unit, CPU), and the processor may also be other general processors, digital signal processors (DSPs), application specific integrated circuits ( ASIC), Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor executes the instructions in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
本申请实施例提供一种网络地址转换的系统,该网络地址转换的系统包括网络设备。在一个可能的实现方式中,网络设备可以用于:接收第一请求消息,第一请求消息用于请求第一用户上线;基于多个业务板的第一带宽参数,从多个业务板中选择第 一业务板;向第一业务板发送第二请求消息,第二请求消息用于指示第一业务板为第一用户作NAT转换。An embodiment of the present application provides a network address translation system, where the network address translation system includes a network device. In a possible implementation manner, the network device may be configured to: receive a first request message, where the first request message is used to request the first user to go online; based on the first bandwidth parameters of the multiple service boards, select the The first service board; sending a second request message to the first service board, where the second request message is used to instruct the first service board to perform NAT conversion for the first user.
在另一个可能的实现方式中,网络设备可以用于:获取第一业务板的第二带宽参数,第一业务板包括在多个业务板中,第一业务板为第一用户作NAT转换;当第一业务板的第二带宽参数不满足预设条件时,基于多个业务板中除第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;向目标业务板发送第三请求消息,第三请求消息用于指示目标业务板为第一用户作NAT转换。In another possible implementation manner, the network device may be configured to: obtain the second bandwidth parameter of the first service board, where the first service board is included in multiple service boards, and the first service board performs NAT conversion for the first user; When the second bandwidth parameter of the first service board does not meet the preset condition, determine the target service board based on the second bandwidth parameters of other service boards in the multiple service boards except the first service board; send to the target service board A third request message, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
应理解,网络设备还可以执行上述任一方法中描述的与网络设备相关的步骤和/或流程,此处不再赘述。It should be understood that the network device may also execute the steps and/or processes related to the network device described in any of the foregoing methods, which will not be repeated here.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,该计算机程序用于实现上述方法实施例中网络设备对应的方法。The embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and the computer program is used to implement the method corresponding to the network device in the foregoing method embodiment.
本申请实施例还提供了一种芯片系统,该芯片系统用于支持上述方法实施例中网络设备实现本申请实施例所示的功能。The embodiment of the present application further provides a chip system, which is used to support the network device in the above method embodiment to implement the functions shown in the embodiment of the present application.
本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机程序(也可以称为代码,或指令),当该计算机程序在计算机上运行时,该计算机可以执行上述方法实施例所示的网络设备对应的方法。The embodiment of the present application also provides a computer program product. The computer program product includes a computer program (also referred to as code, or instruction). When the computer program is run on a computer, the computer can execute the method described in the above method embodiments. method corresponding to the network device shown.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设 备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (28)
- 一种网络地址转换NAT的方法,其特征在于,包括:A method for Network Address Translation NAT, characterized in that it comprises:网络设备接收第一请求消息,所述第一请求消息用于请求第一用户上线;The network device receives a first request message, where the first request message is used to request the first user to go online;所述网络设备基于多个业务板的第一带宽参数,从所述多个业务板中选择第一业务板;The network device selects a first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards;所述网络设备向所述第一业务板发送第二请求消息,所述第二请求消息用于指示所述第一业务板为所述第一用户作NAT转换。The network device sends a second request message to the first service board, where the second request message is used to instruct the first service board to perform NAT conversion for the first user.
- 根据权利要求1所述的方法,其特征在于,所述第一带宽参数包括以下至少一个:The method according to claim 1, wherein the first bandwidth parameter comprises at least one of the following:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;Configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio;其中,所述已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比,所述实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。Wherein, the configured bandwidth ratio is the ratio of the sum of the configured bandwidth of the online users on the service board to the configured bandwidth of the service board, and the real-time bandwidth usage ratio is the ratio of the sum of the real-time bandwidth of the online users on the service board to the configured bandwidth of the service board Compare.
- 根据权利要求2所述的方法,其特征在于,当所述第一带宽参数包括已配置带宽比例或者实时带宽使用比例时;The method according to claim 2, wherein when the first bandwidth parameter includes a configured bandwidth ratio or a real-time bandwidth usage ratio;所述从所述多个业务板中选择第一业务板,包括:The selecting the first service board from the plurality of service boards includes:所述网络设备获取所述多个业务板中每个业务板的第一带宽参数;The network device obtains a first bandwidth parameter of each service board in the plurality of service boards;所述网络设备将所述多个业务板中所述第一带宽参数数值最小的业务板确定为所述第一业务板。The network device determines, among the plurality of service boards, the service board with the smallest value of the first bandwidth parameter as the first service board.
- 根据权利要求1-3中任一项所述的方法,其特征在于,所述网络设备基于多个业务板的第一带宽参数,从所述多个业务板中选择第一业务板,包括:The method according to any one of claims 1-3, wherein the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, comprising:在所述多个业务板中每个业务板的所述第一带宽参数数值相同的情况下,所述网络设备将所述多个业务板中在线用户数最少的业务板确定为所述第一业务板。When the value of the first bandwidth parameter of each of the multiple service boards is the same, the network device determines the service board with the least number of online users among the multiple service boards as the first business board.
- 根据权利要求1-4中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:所述网络设备接收来自所述第一业务板的第一应答消息,所述第一应答消息包括所述第一业务板为所述第一用户分配的公网互联网协议IP地址和端口号范围;The network device receives a first response message from the first service board, where the first response message includes the public network Internet Protocol IP address and port number range allocated by the first service board to the first user;所述网络设备向用户端设备发送第二应答消息,所述第二应答消息用于表示所述第一用户上线成功,所述第一用户通过所述用户端设备连接至所述网络设备。The network device sends a second response message to the client device, where the second response message is used to indicate that the first user goes online successfully, and the first user connects to the network device through the client device.
- 根据权利要求1-5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:所述网络设备获取所述第一业务板的第二带宽参数;The network device acquires a second bandwidth parameter of the first service board;当所述第一业务板的第二带宽参数不满足预设条件时,所述网络设备基于所述多个业务板中除所述第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;When the second bandwidth parameter of the first service board does not meet the preset condition, the network device, based on the second bandwidth parameters of other service boards in the plurality of service boards except the first service board, Determine the target business board;所述网络设备向所述目标业务板发送第三请求消息,所述第三请求消息用于指示所述目标业务板为所述第一用户作NAT转换。The network device sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
- 根据权利要求6所述的方法,其特征在于,所述第二带宽参数包括业务板上在线用户的实时带宽或实时带宽使用比例。The method according to claim 6, wherein the second bandwidth parameter includes real-time bandwidth or real-time bandwidth usage ratio of online users on the service board.
- 根据权利要求6或7所述的方法,其特征在于,所述目标业务板的第二带宽参 数满足所述预设条件。The method according to claim 6 or 7, wherein the second bandwidth parameter of the target service board satisfies the preset condition.
- 根据权利要求6-8中任一项所述的方法,其特征在于,所述网络设备基于所述多个业务板中除所述第一业务板之外的其他业务板的第二带宽参数,确定目标业务板,包括:The method according to any one of claims 6-8, wherein the network device is based on the second bandwidth parameters of other service boards in the plurality of service boards except the first service board, Determine the target business board, including:当所述多个业务板中存在除所述第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,所述网络设备基于所述至少一个候选业务板的第一带宽参数,从所述至少一个候选业务板中确定目标业务板。When the second bandwidth parameter of at least one candidate service board other than the first service board among the plurality of service boards satisfies a preset condition, the network device, based on the first bandwidth parameter of the at least one candidate service board, A bandwidth parameter is used to determine a target service board from the at least one candidate service board.
- 根据权利要求9所述的方法,其特征在于,所述网络设备基于所述至少一个候选业务板的第一带宽参数,从所述至少一个候选业务板中确定目标业务板,包括:The method according to claim 9, wherein the network device determines a target service board from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board, comprising:所述网络设备基于所述第一业务板的第一带宽参数,计算所述第一业务板的待转出带宽;The network device calculates the to-be-transferred bandwidth of the first service board based on the first bandwidth parameter of the first service board;所述网络设备基于所述至少一个候选业务板的第一带宽参数,计算所述至少一个候选业务板的待转入带宽;The network device calculates the transfer-in bandwidth of the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board;所述网络设备基于所述待转出带宽和所述待转入带宽,从所述至少一个候选业务板中确定目标业务板。The network device determines a target service board from the at least one candidate service board based on the to-be-transferred bandwidth and the to-be-transferred bandwidth.
- 根据权利要求6-10中任一项所述的方法,其特征在于,在所述网络设备向所述目标业务板发送第三请求消息之前,所述方法还包括:The method according to any one of claims 6-10, wherein before the network device sends the third request message to the target service board, the method further comprises:所述网络设备基于所述第一业务板的在线用户数、所述第一业务板上在线用户的实时带宽、或所述第一业务板上在线用户的配置带宽中的至少一个参数确定所述第一用户。The network device determines the at least one parameter based on the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the configured bandwidth of online users on the first service board. first user.
- 根据权利要求6-11中任一项所述的方法,其特征在于,在所述网络设备向所述目标业务板发送第三请求消息之后,所述方法还包括:The method according to any one of claims 6-11, wherein after the network device sends the third request message to the target service board, the method further comprises:所述网络设备接收来自所述目标业务板的第三应答消息,所述第三应答消息包括所述目标业务板为所述第一用户分配的新的公网IP地址和新的端口号范围。The network device receives a third response message from the target service board, where the third response message includes a new public network IP address and a new port number range allocated to the first user by the target service board.
- 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method according to claim 12, characterized in that the method further comprises:所述网络设备向所述第一业务板发送第四请求消息,所述第四请求消息用于通知所述第一业务板释放所述第一用户的原公网IP地址和原端口号范围。The network device sends a fourth request message to the first service board, where the fourth request message is used to notify the first service board to release the range of the original public network IP address and the original port number of the first user.
- 根据权利要求1-13中任一项所述的方法,其特征在于,在所述网络设备基于多个业务板的第一带宽参数,从所述多个业务板中选择第一业务板之前,所述方法还包括:The method according to any one of claims 1-13, wherein, before the network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards, The method also includes:所述网络设备基于所述第一请求消息,向认证服务器发送第五请求消息,所述第五请求消息用于为所述第一用户请求认证;The network device sends a fifth request message to an authentication server based on the first request message, where the fifth request message is used to request authentication for the first user;所述网络设备在认证成功的情况下,为所述第一用户分配私网IP地址;The network device assigns a private network IP address to the first user when the authentication is successful;所述网络设备向所述第一用户发送第五应答消息,所述第五应答消息用于表示所述网络设备为所述第一用户分配的私网IP地址。The network device sends a fifth response message to the first user, where the fifth response message is used to indicate the private network IP address allocated by the network device to the first user.
- 根据权利要求1-14中任一项所述的方法,其特征在于,所述网络设备为宽带接入服务器、执行宽带接入功能的用户面设备或者控制面设备。The method according to any one of claims 1-14, wherein the network device is a broadband access server, a user plane device or a control plane device performing a broadband access function.
- 根据权利要求1-15中任一项所述的方法,其特征在于,所述多个业务板部署在所述网络设备中。The method according to any one of claims 1-15, wherein the plurality of service boards are deployed in the network device.
- 一种网络地址转换NAT的方法,其特征在于,包括:A method for Network Address Translation NAT, characterized in that it comprises:网络设备获取第一业务板的第二带宽参数,所述第一业务板包括在多个业务板中,所述第一业务板为第一用户作NAT转换;The network device obtains the second bandwidth parameter of the first service board, the first service board is included in multiple service boards, and the first service board performs NAT conversion for the first user;当所述第一业务板的第二带宽参数不满足预设条件时,所述网络设备基于所述多个业务板中除所述第一业务板之外的其他业务板的第二带宽参数,确定目标业务板;When the second bandwidth parameter of the first service board does not meet the preset condition, the network device, based on the second bandwidth parameters of other service boards in the plurality of service boards except the first service board, Determine the target business board;所述网络设备向所述目标业务板发送第三请求消息,所述第三请求消息用于指示所述目标业务板为所述第一用户作NAT转换。The network device sends a third request message to the target service board, where the third request message is used to instruct the target service board to perform NAT conversion for the first user.
- 根据权利要求17所述的方法,其特征在于,所述第二带宽参数包括业务板上在线用户的实时带宽或实时带宽使用比例,其中,所述实时带宽使用比例为业务板上在线用户的实时带宽总和与业务板的配置带宽之比。The method according to claim 17, wherein the second bandwidth parameter includes the real-time bandwidth or the real-time bandwidth usage ratio of the online users on the service board, wherein the real-time bandwidth usage ratio is the real-time bandwidth usage ratio of the online users on the service board. The ratio of the total bandwidth to the configured bandwidth of the service board.
- 根据权利要求17或18所述的方法,其特征在于,在网络设备获取第一业务板的第二带宽参数之前,所述方法还包括:The method according to claim 17 or 18, wherein, before the network device acquires the second bandwidth parameter of the first service board, the method further comprises:所述网络设备接收第一请求消息,所述第一请求消息用于请求所述第一用户上线;The network device receives a first request message, where the first request message is used to request the first user to go online;所述网络设备基于所述多个业务板的第一带宽参数,从所述多个业务板中选择所述第一业务板;The network device selects the first service board from the multiple service boards based on the first bandwidth parameters of the multiple service boards;所述网络设备向所述第一业务板发送第二请求消息,所述第二请求消息用于指示所述第一业务板为所述第一用户作NAT转换。The network device sends a second request message to the first service board, where the second request message is used to instruct the first service board to perform NAT conversion for the first user.
- 根据权利要求19所述的方法,其特征在于,所述第一带宽参数包括以下至少一个:The method according to claim 19, wherein the first bandwidth parameter comprises at least one of the following:业务板上在线用户的配置带宽、业务板的配置带宽、业务板上在线用户的实时带宽、已配置带宽比例、或实时带宽使用比例;Configured bandwidth of online users on the service board, configured bandwidth of the service board, real-time bandwidth of online users on the service board, configured bandwidth ratio, or real-time bandwidth usage ratio;其中,所述已配置带宽比例为业务板上在线用户的配置带宽总和与业务板的配置带宽之比。Wherein, the configured bandwidth ratio is the ratio of the sum of configured bandwidths of online users on the service board to the configured bandwidth of the service board.
- 根据权利要求19或20所述的方法,其特征在于,所述网络设备基于所述多个业务板中除所述第一业务板之外的其他业务板的第二带宽参数,确定目标业务板,包括:The method according to claim 19 or 20, wherein the network device determines the target service board based on the second bandwidth parameters of other service boards in the plurality of service boards except the first service board ,include:当所述多个业务板中存在除所述第一业务板之外的至少一个候选业务板的第二带宽参数满足预设条件时,所述网络设备基于所述至少一个候选业务板的第一带宽参数,从所述至少一个候选业务板中确定目标业务板。When the second bandwidth parameter of at least one candidate service board other than the first service board among the plurality of service boards satisfies a preset condition, the network device, based on the first bandwidth parameter of the at least one candidate service board, A bandwidth parameter is used to determine a target service board from the at least one candidate service board.
- 根据权利要求21所述的方法,其特征在于,所述网络设备基于所述至少一个候选业务板的第一带宽参数,从所述至少一个候选业务板中确定目标业务板,包括:The method according to claim 21, wherein the network device determines a target service board from the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board, comprising:所述网络设备基于所述第一业务板的第一带宽参数,计算所述第一业务板的待转出带宽;The network device calculates the to-be-transferred bandwidth of the first service board based on the first bandwidth parameter of the first service board;所述网络设备基于所述至少一个候选业务板的第一带宽参数,计算所述至少一个候选业务板的待转入带宽;The network device calculates the transfer-in bandwidth of the at least one candidate service board based on the first bandwidth parameter of the at least one candidate service board;所述网络设备基于所述待转出带宽和所述待转入带宽,从所述至少一个候选业务板中确定目标业务板。The network device determines a target service board from the at least one candidate service board based on the to-be-transferred bandwidth and the to-be-transferred bandwidth.
- 根据权利要求17-22中任一项所述的方法,其特征在于,在所述网络设备向所述目标业务板发送第三请求消息之前,所述方法还包括:The method according to any one of claims 17-22, wherein before the network device sends a third request message to the target service board, the method further comprises:所述网络设备基于所述第一业务板的在线用户数、所述第一业务板上在线用户的实时带宽、或所述第一业务板上在线用户的配置带宽中的至少一个参数确定所述第一用户。The network device determines the at least one parameter based on the number of online users on the first service board, the real-time bandwidth of online users on the first service board, or the configured bandwidth of online users on the first service board. first user.
- 根据权利要求17-23中任一项所述的方法,其特征在于,在所述网络设备向所述目标业务板发送第三请求消息之后,所述方法还包括:The method according to any one of claims 17-23, wherein after the network device sends the third request message to the target service board, the method further comprises:所述网络设备向所述第一业务板发送第四请求消息,所述第四请求消息用于通知所述第一业务板释放所述第一用户的原公网IP地址和原端口号范围。The network device sends a fourth request message to the first service board, where the fourth request message is used to notify the first service board to release the range of the original public network IP address and the original port number of the first user.
- 一种网络地址转换NAT的装置,其特征在于,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储计算机程序,当所述处理器调用所述计算机程序时,使得所述装置执行如权利要求1-16中任一项所述的方法或者如权利要求17-24中任一项所述的方法。A device for network address translation NAT, characterized in that it includes: a processor, the processor is coupled with a memory, and the memory is used to store a computer program, when the processor invokes the computer program, the The device executes the method according to any one of claims 1-16 or the method according to any one of claims 17-24.
- 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序包括用于实现如权利要求1-16中任一项所述的指令或者如权利要求17-24中任一项所述的指令。A computer-readable storage medium, characterized in that it is used to store a computer program, the computer program including instructions for implementing any one of claims 1-16 or any one of claims 17-24 instructions described in the item.
- 一种网络地址转换的系统,其特征在于,包括:网络设备,所述网络设备用于执行如权利要求1-16中任一项所述的方法或者如权利要求17-24中任一项所述的方法。A network address translation system, characterized by comprising: a network device configured to execute the method according to any one of claims 1-16 or the method according to any one of claims 17-24 described method.
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序,当所述计算机程序被运行时,使得所述计算机程序产品执行如权利要求1-16中任一项所述的方法或者如权利要求17-24中任一项所述的方法。A computer program product, characterized in that the computer program product comprises: a computer program, when the computer program is executed, the computer program product is made to execute the method according to any one of claims 1-16 Or the method according to any one of claims 17-24.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111020071.4 | 2021-09-01 | ||
CN202111020071.4A CN115766652A (en) | 2021-09-01 | 2021-09-01 | Method and device for network address translation |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023030300A1 true WO2023030300A1 (en) | 2023-03-09 |
Family
ID=85332154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/115776 WO2023030300A1 (en) | 2021-09-01 | 2022-08-30 | Network address translation method and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115766652A (en) |
WO (1) | WO2023030300A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024212573A1 (en) * | 2023-04-14 | 2024-10-17 | 浙江宇视科技有限公司 | Communication connection method and apparatus, electronic device, system, and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104954239A (en) * | 2014-03-26 | 2015-09-30 | 中国电信股份有限公司 | CGN broadband access gateway and implementation method thereof |
CN105099898A (en) * | 2014-04-16 | 2015-11-25 | 杭州迪普科技有限公司 | PPPOE (point-to-point protocol over Ethernet) message forwarding method and BRAS (broadband remote access server) |
US20150373094A1 (en) * | 2013-01-28 | 2015-12-24 | Zte Corporation | Load sharing method and apparatus |
CN106878117A (en) * | 2016-12-15 | 2017-06-20 | 新华三技术有限公司 | A kind of data processing method and device |
US20200162422A1 (en) * | 2017-05-24 | 2020-05-21 | New H3C Technologies Co., Ltd. | Separating cgn forwarding and control |
-
2021
- 2021-09-01 CN CN202111020071.4A patent/CN115766652A/en active Pending
-
2022
- 2022-08-30 WO PCT/CN2022/115776 patent/WO2023030300A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150373094A1 (en) * | 2013-01-28 | 2015-12-24 | Zte Corporation | Load sharing method and apparatus |
CN104954239A (en) * | 2014-03-26 | 2015-09-30 | 中国电信股份有限公司 | CGN broadband access gateway and implementation method thereof |
CN105099898A (en) * | 2014-04-16 | 2015-11-25 | 杭州迪普科技有限公司 | PPPOE (point-to-point protocol over Ethernet) message forwarding method and BRAS (broadband remote access server) |
CN106878117A (en) * | 2016-12-15 | 2017-06-20 | 新华三技术有限公司 | A kind of data processing method and device |
US20200162422A1 (en) * | 2017-05-24 | 2020-05-21 | New H3C Technologies Co., Ltd. | Separating cgn forwarding and control |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024212573A1 (en) * | 2023-04-14 | 2024-10-17 | 浙江宇视科技有限公司 | Communication connection method and apparatus, electronic device, system, and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115766652A (en) | 2023-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111885075B (en) | Container communication method, device, network equipment and storage medium | |
US8739179B2 (en) | Method and system for low-overhead data transfer | |
WO2018090666A1 (en) | Multipath data transmission method and device | |
US7965714B2 (en) | Method and system for offloading network processing | |
US9143421B2 (en) | Network system capable of implementing stun with the assistance of two network devices and method thereof | |
CN106302322B (en) | Virtual machine data flow management method and system | |
KR20150013860A (en) | Clientless cloud computing | |
WO2011059770A2 (en) | Smart client routing | |
US20230291706A1 (en) | Method for accessing network, media gateway, electronic device and storage medium | |
WO2023030300A1 (en) | Network address translation method and apparatus | |
WO2019214569A1 (en) | Service quality of service negotiation method and apparatus | |
CN113542244B (en) | Micro-service calling method, device, server and system | |
WO2022048559A1 (en) | Method and apparatus for accessing gateway | |
WO2022052496A1 (en) | Address reservation method, network device, and system | |
WO2023221708A1 (en) | Pdn dialing method, system and apparatus, multi-pdn dialing configuration method, system and apparatus, and device and storage medium | |
WO2023035660A1 (en) | Resource request method, system and apparatus, and device and storage medium | |
CN114531320A (en) | Communication method, device, equipment, system and computer readable storage medium | |
WO2022089645A1 (en) | Communication method, apparatus, device, system, and computer readable storage medium | |
WO2024046298A1 (en) | Method and apparatus for creating virtual network | |
CN113825251B (en) | Session establishment method, device, system and computer storage medium | |
CN114710465B (en) | Network address translation method, device, equipment and storage medium | |
WO2024188167A1 (en) | Tunnel technology-based packet processing method and apparatus | |
CN117082152B (en) | Service processing method, system and device | |
WO2023241465A1 (en) | T-ees discovery method and related apparatus | |
WO2024230431A1 (en) | Network access method, and computing device and computing device cluster |
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: 22863435 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: 22863435 Country of ref document: EP Kind code of ref document: A1 |