Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
First, an application scenario of the present disclosure is described, where the present disclosure is applied to a gateway node in a gateway cluster, where the gateway cluster is configured to receive a data packet sent by a device such as an OVS (OpenVSwitch) to a physical network, and forward the data packet to the gateway cluster corresponding to a destination address of the data packet or a corresponding virtual switch through the physical network, so as to implement transmission of the data packet. A plurality of gateway nodes may be included in a gateway cluster. However, it should be understood by those skilled in the art that the present method can be applied to data transmission between a physical switch and a gateway cluster through simple modification, or applied to other scenarios requiring packet rate limiting, and the application scenario in the present disclosure is only used for illustrating the embodiment of the present disclosure, and should not cause a limitation to the present disclosure.
Fig. 1 is a flow chart illustrating a method of data packet transmission according to an exemplary disclosed embodiment. As shown in fig. 1, the method comprises the steps of:
s11, acquiring a data packet sent to the gateway node, and acquiring a target bandwidth identifier in the data packet by analyzing the data packet.
However, since the generation device and the forwarding device in front of the data packet usually cannot obtain the address declared by the gateway node in the gateway cluster, but send the data packet with the address of the gateway cluster, when the address of the data packet is the address of the gateway node itself, it is described that the data packet has been encapsulated by other gateway nodes (or the home gateway node) in the home gateway cluster, and therefore, when the data packet with the address of the home gateway node itself is received, the speed limit is directly performed according to the preset flow speed limit rule without performing subsequent forwarding processing on the data packet.
In a possible implementation manner, a data packet addressed to the gateway cluster and a data packet addressed to the gateway node themselves are sent to the gateway node through two different ports, so that the gateway node can forward the data packet acquired through the port corresponding to the gateway cluster, and process the data packet acquired through the port corresponding to the gateway node itself according to a preset flow rate limit rule.
In a possible embodiment, the gateway cluster corresponds to a cluster tunnel address, and the gateway node obtains a packet whose target address sent by the physical network is encapsulated as the cluster tunnel address.
For example, if the tunnel address corresponding to the gateway cluster is 172.10.0.0 and the tunnel address corresponding to thegateway node 1 is 172.10.0.1, thegateway node 1 will perform subsequent processing on a packet with the tunnel address 172.10.0.0 sent by the physical network after receiving the packet. Because each node in the gateway cluster can receive the data packet with the tunnel address as the cluster tunnel address, the physical network can randomly distribute the data packet to each gateway node, and can also preferentially distribute the data packet for the gateway node with good load condition according to the load condition of each node so as to balance the load condition of each node. It should be noted that the gateway node also receives a data packet with a tunnel address of 172.10.0.1 sent by the physical network, that is, a data packet with an address of 172.10.0.1, where the data packet is encapsulated by itself and returned to the physical network, or encapsulated by another gateway node and returned to the physical network, and when the data packet with a tunnel address of itself is obtained, the data packet may not be encapsulated again, but is directly processed according to a preset flow rate limiting rule.
The data packet may have already been wrapped by the front-end device during transmission, and therefore, the data packet may be parsed to obtain the target bandwidth identifier in the data packet. Wherein, the bandwidth identification can be packaged in the form of a bandwidth ID. Wherein the bandwidth is used to distinguish between data transmission services of different restriction rules. For example, user a and user B jointly purchase a data transmission service, and the data transmission service is limited in such a way that the total daily data amount does not exceed 2G and the speed does not exceed 5M/s, user a and user B share the transmission service provided by the bandwidth, the total data packet flow of user a and user B does not exceed 5M/s, and the total daily data amount does not exceed 2G.
In a possible implementation manner, the data packet is parsed, data packet information is obtained, and the target bandwidth identifier is determined based on the data packet information. The data packet information comprises at least one of tunnel identification information, IP address information in the tunnel, tenant information and IP address information.
For example, each node may store a correspondence table between packet information and bandwidth identification information, and match the acquired packet information with the bandwidth information through the correspondence table. For example, when a packet is tunneled and forwarded by using a VXLAN (Virtual extensible LAN) technology, the tunnel identification information may be vni (VXLAN Network Identifier), where each vni corresponds to one tenant (it is worth mentioning that there may be multiple users under one tenant). When vni in the data packet is obtained, the vni may be matched with the bandwidth ID in the corresponding table to determine the bandwidth corresponding to the tenant. When the bandwidth identification information is applied to a scenario that an operator forwards data transmission between a tenant and other tenants, the bandwidth identification information can determine a bandwidth which needs to be subjected to speed limitation by using tenant information or IP address information of a receiver or a sender, for example, when speed limitation is required to be performed on downlink data of the receiver, the tenant information or the IP address information of the receiver can be acquired to match with target bandwidth information, and when speed limitation is required to be performed on uplink data of the sender, the tenant information or the IP address information of the sender can be acquired to match with the target bandwidth information.
S12, determining a target gateway node corresponding to the target bandwidth identifier according to the target bandwidth identifier and a preset mapping relation between the bandwidth identifier and the gateway node.
The preset mapping relationship between the bandwidth identification information and the gateway node may be a corresponding relationship between the bandwidth identification information and a gateway node identification, for example,bandwidth 1 corresponds tonode 1,bandwidth 2 corresponds tonode 2, and a node receiving the data packet may determine whether the node is a target gateway node by determining whether its own identification is consistent with the gateway node identification corresponding to the target bandwidth identification; the mapping relationship may also be a correspondence relationship between bandwidth identification information and addresses, for example,bandwidth 1 corresponds to an address 172.10.0.1, andbandwidth 2 corresponds to an address 172.10.0.2, where each address is carried by one node.
It is worth noting that since the number of gateway nodes is typically less than the number of bandwidths, one node can be used to carry traffic of multiple bandwidths. That is, in the mapping relationship, one bandwidth identifier is mapped to one gateway node, but each gateway node may be mapped by a plurality of bandwidth identifiers.
In order to ensure that forwarding of a data packet is not affected when a node of a gateway cluster fails, in one possible implementation manner, one tunnel address corresponds to a plurality of gateway nodes in the gateway cluster, and in the plurality of gateway nodes, each gateway node has different priority for acquiring the tunnel address; the target gateway node corresponding to the target broadband identifier is determined by the following method: determining a target tunnel address corresponding to the target bandwidth identification; and determining the gateway node with the highest acquired priority in the plurality of gateway nodes corresponding to the target tunnel address as the target gateway node.
In one possible embodiment, in the event of a failure of a target gateway node, the gateway node of the next priority of the failed gateway node is taken as the new target gateway node. That is, the gateway node that acquires the highest priority from the gateway nodes that do not fail is taken as the target gateway node.
For example, for a tunnel address 172.10.0.2, the tunnel address corresponds to n gateway nodes in a gateway cluster, where the acquiring priority of the tunnel address by thegateway node 1 is 0, which is denoted as 172.10.0.2, metric; the priority of thegateway node 2 for acquiring the tunnel address is 1, which is marked as 172.10.0.2, and the metric; the gateway node n has an acquisition priority n for the tunnel address, which is denoted as 172.10.0.2, metric; when thegateway node 1 fails, the node with the highest priority in all the gateway nodes which do not fail is thegateway node 2, and the target gateway node is thegateway node 2. Therefore, when one gateway node in the gateway cluster fails, the bandwidth carried by the gateway node is carried by other nodes, and the data packet corresponding to the bandwidth which needs to be carried by the failed gateway node still flows to the same node and is limited by the new node.
The acquisition priority of each gateway node corresponding to each tunnel address is declared to the physical network and other gateway nodes, and when a gateway node fails, each gateway node and each physical network can be informed, so that each gateway node and each physical network can determine the gateway node with the highest acquisition priority currently corresponding to each tunnel address.
And S13, forwarding the data packet to the target gateway node.
During forwarding, the data packet may be directly sent to the target gateway node through a transmission channel between gateway clusters, and the tunnel address of the data packet may also be encapsulated as the address of the target gateway node and forwarded to the target gateway node by the physical network.
In a possible implementation manner, a target tunnel address corresponding to the target broadband identifier is determined based on a corresponding relationship between the bandwidth identifier and the tunnel address, and the data packet is encapsulated by the target tunnel address; and sending the encapsulated data packet to a physical network so that the physical network can send the encapsulated data packet to a target gateway node based on the target tunnel address.
For example, when the tunnel address corresponding to the obtained target bandwidth identifier is 172.10.0.5, the data packet is encapsulated by using 172.10.0.5 as the tunnel address, and the data packet is sent to the corresponding target gateway node by the physical network.
It should be noted that the target gateway node may be another gateway node in the gateway cluster, or may be the local gateway node. The gateway node acquires a data packet with the address of the gateway cluster from an acquisition port corresponding to the address of the gateway cluster, and encapsulates the data packet with the address of a target gateway node.
In a possible implementation manner, based on the target tunnel address, whether a target gateway node corresponding to the target tunnel address is the local gateway node is judged; encapsulating the data packet with the target tunnel address under the condition that the target gateway node is not the gateway node; and under the condition that the target gateway node is the gateway node, processing the data packet based on a flow rate limit rule corresponding to the target broadband identifier.
For example, a tunnel address of bandwidth 1 (bandwidth ID is 001) is 172.10.0.1, a tunnel address of bandwidth 2 (bandwidth ID is 002) is 172.10.0.2, and a tunnel address corresponding to a local gateway node includes 172.10.0.1 but does not include 172.10.0.2, when a bandwidth ID corresponding to a received packet is 001, it is determined that a tunnel address corresponding to the received packet is 172.10.0.1 according to a correspondence relationship between a bandwidth identifier and a tunnel address, and a target node corresponding to a target bandwidth identifier corresponding to the received packet is the local node, and the received packet may not be forwarded, but the received packet may be processed based on a traffic speed limit rule corresponding to the target bandwidth identifier; when the bandwidth ID corresponding to the received packet is 002, it is determined that the tunnel address corresponding to the received packet is 172.10.0.2 through the corresponding relationship between the bandwidth identifier and the tunnel address, and if the target node corresponding to the target bandwidth identifier corresponding to the packet is not the node, the packet is encapsulated by the tunnel address of 172.10.0.2 and returned to the physical network, so that the packet can be sent to the gatewaynode carrying bandwidth 2.
When each gateway node acquires a data packet of a bandwidth carried by itself, the data packet can be processed based on a traffic speed limit rule corresponding to the target broadband identifier. Each gateway node in the gateway cluster may be used as a target gateway node to process the data packet, and therefore, each gateway node may store a traffic speed limit rule, where the traffic speed limit rule may be a traffic speed limit rule of all bandwidths borne by the gateway cluster, or may be a traffic speed limit rule of all bandwidths borne by itself or possibly.
For example, when the traffic speed limit rule corresponding to the target bandwidth identifier is that the speed does not exceed 5M/s, the traffic of the data packet of the bandwidth in the gateway node may be limited, and the part exceeding 5M per unit time is split and sent with delay, or packet loss processing is performed, so that the speed does not exceed 5M/s.
In one possible implementation manner, in response to a bandwidth change instruction, a speed limit rule corresponding to a bandwidth identifier included in the bandwidth change instruction is modified.
For example, when the speed limit rule of thebandwidth 1 is changed from the traffic of not more than 5M/s to not more than 10M/s, the traffic speed limit rule corresponding to thebandwidth 1 in all the gateway nodes which may carry thebandwidth 1 may be modified to the traffic of not more than 10M/s by the bandwidth change instruction.
Fig. 2 is a schematic diagram of a packet transmission process according to an exemplary disclosed embodiment, as shown in fig. 1, a packet 1 (destination address is OVS 3) is encapsulated by OVS1 with a cluster tunnel address (172.10.0.1) of a gateway cluster and then transmitted to a physical network, a packet 2 (destination address is OVS 4) is encapsulated by OVS2 with a cluster tunnel address (172.10.0.1) of a gateway cluster and then transmitted to a physical network, where destination bandwidth identifiers of the packet 1 and the packet 2 are 888, the packet 1 is transmitted by the physical network to a gateway node 1 in the gateway cluster, the packet 2 is transmitted by the physical network to a gateway node 2 in the gateway cluster, and a destination tunnel address corresponding to a bandwidth identifier 888 is 172.10.0.8, the tunnel address gateway node 1 or the gateway node 2 is loaded, the gateway node 1 encapsulates the packet 1 with 4325 xzft 4325 as a tunnel address and returns the packet 1 to the physical network, and the packet 2 is processed by the gateway node 358, and transmits the packet 2 to another gateway node 358, and the packet 2 is transmitted to the gateway node 358, and the packet 2 is processed by the gateway node 358, and the gateway node, and the packet 2 is transmitted to the gateway node 358, and the packet 2 is transmitted to the destination address of the packet 2, and the packet is transmitted to the gateway node 358, and the packet is transmitted to the destination node 358, and the packet 2, and the packet is transmitted to the network node, and the data network node 358.
Through the technical scheme, the following technical effects can be at least achieved:
the data packets belonging to the same bandwidth can be forwarded to the same node, so that the node can realize single-point speed limit on the bandwidth, the speed limit of the data packet traffic belonging to the same bandwidth can be completed by one node, the speed limit of the data packet traffic is more timely and accurate, the computing resources for limiting the data packet speed are reduced, and the speed limit efficiency is improved.
Fig. 3 is a block diagram illustrating a packet transmitting device according to an exemplary disclosed embodiment. As shown in fig. 3, theapparatus 300 includes:
the obtainingmodule 310 is configured to obtain a data packet sent to the gateway node, and obtain a target bandwidth identifier in the data packet by analyzing the data packet.
A determiningmodule 320, configured to determine, according to the target bandwidth identifier and a preset mapping relationship between the bandwidth identifier and a gateway node, a target gateway node corresponding to the target bandwidth identifier.
A sendingmodule 330, configured to forward the data packet to the target gateway node, so that the target gateway node processes the data packet based on a traffic speed limit rule corresponding to the target broadband identifier.
In a possible implementation manner, the determiningmodule 320 is configured to determine, based on a correspondence between a bandwidth identifier and a tunnel address, a target tunnel address corresponding to the target broadband identifier; the sendingmodule 330 is configured to encapsulate the data packet with the target tunnel address, and send the encapsulated data packet to a physical network, so that the physical network sends the encapsulated data packet to a target gateway node based on the target tunnel address.
In a possible implementation manner, the sendingmodule 330 is further configured to determine, based on the target tunnel address, whether a target gateway node corresponding to the target tunnel address is a home gateway node, and encapsulate the data packet with the target tunnel address if the target gateway node is not the home gateway node; the device also comprises a processing module which is used for processing the data packet based on the flow rate limit rule corresponding to the target broadband identification under the condition that the target gateway node is the gateway node.
In a possible implementation, one tunnel address corresponds to a plurality of gateway nodes in the gateway cluster, and in the plurality of gateway nodes, each gateway node has a different priority for acquiring the tunnel address; the determiningmodule 320 is further configured to determine a target tunnel address corresponding to the target bandwidth identifier; and determining a gateway node with the highest acquired priority in the plurality of gateway nodes corresponding to the target tunnel address as the target gateway node, wherein the gateway node with the next priority of the gateway node with the fault is taken as a new target gateway node under the condition that the target gateway node sends the fault.
In a possible implementation manner, the gateway cluster corresponds to a cluster tunnel address, and the obtainingmodule 310 is configured to obtain a packet, where a target address sent by a physical network is encapsulated as the cluster tunnel address.
In a possible implementation manner, the obtainingmodule 310 is configured to parse the data packet and obtain data packet information, where the data packet information includes at least one of tunnel identification information, intra-tunnel IP address information, tenant information, and IP address information, and the target bandwidth identifier is determined based on the data packet information.
In a possible implementation manner, theapparatus 300 further includes a modification module, configured to modify, in response to a bandwidth change instruction, a traffic speed limit rule corresponding to a bandwidth identifier included in the bandwidth change instruction.
The steps executed by each module in the above device have been described in detail in the method portion corresponding to the module, and are not described herein again.
Through the technical scheme, the following technical effects can be at least achieved:
the data packets belonging to the same bandwidth can be forwarded to the same node, so that the node can realize single-point speed limit on the bandwidth, the speed limit of the data packet traffic belonging to the same bandwidth can be completed by one node, the speed limit of the data packet traffic is more timely and accurate, the computing resources for limiting the data packet speed are reduced, and the speed limit efficiency is improved.
Referring now to fig. 4, a schematic diagram of an electronic device (e.g., a gateway node in fig. 1) 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4,electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from astorage device 408 into a Random Access Memory (RAM) 403. In theRAM 403, various programs and data necessary for the operation of theelectronic apparatus 400 are also stored. Theprocessing device 401, theROM 402, and theRAM 403 are connected to each other via abus 404. An input/output (I/O)interface 405 is also connected tobus 404.
Generally, the following devices may be connected to the I/O interface 405:input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; anoutput device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like;storage devices 408 including, for example, magnetic tape, hard disk, etc.; and acommunication device 409. Thecommunication device 409 may allow theelectronic device 400 to communicate with other devices, either wirelessly or by wire, to exchange data. While fig. 4 illustrates anelectronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via thecommunication device 409, or from thestorage device 408, or from theROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by theprocessing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the gateway nodes may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not in some cases form a limitation of the module itself, for example, the first obtaining module may also be described as a "module for obtaining at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides a data packet transmission method applied to a gateway node in a gateway cluster, the method including: acquiring a data packet sent to a gateway node, and acquiring a target bandwidth identifier in the data packet by analyzing the data packet; determining a target gateway node corresponding to the target bandwidth identifier according to the target bandwidth identifier and a preset mapping relation between the bandwidth identifier and the gateway node; and forwarding the data packet to the target gateway node so that the target gateway node processes the data packet based on the flow rate limit rule corresponding to the target broadband identifier.
According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, where determining, according to the target bandwidth identifier and a preset mapping relationship between a bandwidth identifier and a gateway node, a target gateway node corresponding to the target bandwidth identifier includes: determining a target tunnel address corresponding to the target broadband identifier based on the corresponding relation between the bandwidth identifier and the tunnel address; the forwarding the packet to the target gateway node comprises: encapsulating the data packet with the target tunnel address; and sending the encapsulated data packet to a physical network so that the physical network can send the encapsulated data packet to a target gateway node based on the target tunnel address.
Example 3 provides the method of example 2, wherein encapsulating the packet with the destination tunnel address, in accordance with one or more embodiments of the present disclosure, includes: judging whether a target gateway node corresponding to the target tunnel address is a local gateway node or not based on the target tunnel address; encapsulating the data packet with the target tunnel address under the condition that the target gateway node is not the gateway node; the method further comprises the following steps: and under the condition that the target gateway node is the gateway node, processing the data packet based on a flow rate limit rule corresponding to the target broadband identifier.
Example 4 provides the method of example 2 or 3, wherein one tunnel address corresponds to a plurality of gateway nodes in the gateway cluster, and each gateway node in the plurality of gateway nodes has a different priority for acquiring the tunnel address; the target gateway node corresponding to the target broadband identifier is determined by the following method: determining a target tunnel address corresponding to the target bandwidth identification; determining a gateway node with the highest acquired priority in a plurality of gateway nodes corresponding to the target tunnel address as the target gateway node; and when the target gateway node sends a fault, taking the gateway node of the next priority of the gateway node with the fault as a new target gateway node.
Example 5 provides the method of example 1, wherein the gateway cluster corresponds to a cluster tunnel address, and the obtaining the packet sent to the gateway node includes: and acquiring a data packet of which the target address sent by the physical network is encapsulated as the cluster tunnel address.
Example 6 provides the method of example 1, wherein obtaining the target bandwidth identification within the data packet by parsing the data packet, according to one or more embodiments of the present disclosure includes: analyzing the data packet, and acquiring data packet information, wherein the data packet information comprises at least one of tunnel identification information, IP address information in the tunnel, tenant information and IP address information, and the target bandwidth identification is determined based on the data packet information.
Example 7 provides the method of example 1, further comprising, in accordance with one or more embodiments of the present disclosure: and responding to a bandwidth change instruction, and modifying a flow speed limit rule corresponding to a bandwidth identifier included in the bandwidth change instruction.
In accordance with one or more embodiments of the present disclosure, example 8 provides a data packet transmission method and apparatus, where the apparatus is applied to a gateway node in a gateway cluster, and the apparatus includes: the acquisition module is used for acquiring a data packet sent to the gateway node and acquiring a target bandwidth identifier in the data packet by analyzing the data packet; the determining module is used for determining a target gateway node corresponding to the target bandwidth identifier according to the target bandwidth identifier and a preset mapping relation between the bandwidth identifier and the gateway node; and the sending module is used for forwarding the data packet to the target gateway node under the condition that the target gateway node is determined not to be the gateway node, so that the target gateway node processes the data packet based on the flow rate limit rule corresponding to the target broadband identifier.
Example 9 provides the apparatus of example 8, wherein the determining module is configured to determine a target tunnel address corresponding to the target broadband identifier based on a correspondence between a bandwidth identifier and a tunnel address; the sending module is configured to encapsulate the data packet with the target tunnel address; and sending the encapsulated data packet to a physical network so that the physical network can send the encapsulated data packet to a target gateway node based on the target tunnel address.
Example 10 provides the apparatus of example 9, wherein the sending module is further configured to determine, based on the target tunnel address, whether a target gateway node corresponding to the target tunnel address is a home gateway node, and encapsulate the packet with the target tunnel address if the target gateway node is not the home gateway node; the device also comprises a processing module which is used for processing the data packet based on the flow rate limit rule corresponding to the target broadband identifier under the condition that the target gateway node is the gateway node.
Example 11 provides the apparatus of example 9 or 10, wherein one tunnel address corresponds to a plurality of gateway nodes in the gateway cluster, and each gateway node in the plurality of gateway nodes has a different priority for acquiring the tunnel address; the determining module is further configured to determine a target tunnel address corresponding to the target bandwidth identifier, and determine that a gateway node with a highest priority obtained from a plurality of gateway nodes corresponding to the target tunnel address is the target gateway node, where in a case where the target gateway node fails, a gateway node with a next priority of the failed gateway node is used as a new target gateway node.
Example 12 provides the apparatus of example 8, wherein the gateway cluster corresponds to a cluster tunnel address, and the obtaining module is configured to obtain a packet with a destination address encapsulated as the cluster tunnel address, where the packet is sent by a physical network.
Example 13 provides the apparatus of example 8, wherein the obtaining module is configured to parse the packet and obtain packet information, the packet information including at least one of tunnel identification information, intra-tunnel IP address information, tenant information, and IP address information, and the target bandwidth identification is determined based on the packet information.
Example 14 provides the apparatus of example 8, which further includes a modification module, in response to a bandwidth change instruction, to modify a traffic speed limit rule corresponding to a bandwidth identifier included in the bandwidth change instruction.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.