Data transmission method, device, equipment and medium
By establishing multiple tunnel groups in EVPN and switching according to priority and bandwidth conditions, the problem of coarse-grained control of silent settings in cold standby technology is solved, and the stability and efficiency of data transmission are improved.
Patent Information
- Application Number
- CN202410816395.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-24
AI Technical Summary
In the existing technology, the control granularity of silent settings in cold standby technology is coarse, which results in enabling high-cost tunnels to transmit data when low-cost tunnels are abnormal, which may lead to increased costs or low efficiency. In addition, silent settings when some tunnels are abnormal affect normal tunnel transmission. .
By establishing multiple tunnel groups between the first site and the second site, the high-priority tunnel group is used first to transmit data. When the tunnel group is abnormal, it is switched to the low-priority backup tunnel group and the data is transmitted according to the bandwidth and link quality. Flexible selection of transmission paths based on conditions.
It reduces the granularity of silent setting control in cold standby technology, improves business stability and data transmission efficiency, avoids increased costs and low efficiency caused by tunnel abnormalities, and enables flexible use of backup tunnel groups.
Smart Images

Figure CN118433759B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data transmission method, device, equipment and medium. Background Art
[0002] With the development of communication technology, Ethernet Virtual Private Network (EVPN) is increasingly used in enterprise and operator scenarios, and enterprises have a variety of network choices. In order to ensure the stability of business communications and reduce costs, enterprises will choose various types of wide area network (WAN) exports, use point to multiple point (P2MP) tunnels, access various types of networks; and use cold standby technology to set some high-cost tunnels to silent state and use low-cost tunnels to transmit data; when the low-cost tunnel is abnormal, these high-cost tunnels are enabled, that is, these high-cost tunnels are used to transmit data.
[0003] In the above data transmission method, the silent setting is for all tunnels under a WAN port, which has the problem of coarse control granularity. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a data transmission method, apparatus, device and medium to reduce the control granularity of silent settings in cold standby technology. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a first gateway device included in a first site, and the method includes:
[0006] Sending a first data stream to a second site through a first tunnel group, wherein the first tunnel group includes a tunnel between the first gateway device and a gateway device included in the second site via a first WAN;
[0007] When all tunnels included in the first tunnel group are abnormal, the first data stream is sent to the second site through a second tunnel group, and the second tunnel group includes a tunnel between the first gateway device and the gateway device included in the second site via a second WAN, and the priority of the second WAN is lower than that of the first WAN.
[0008] In some embodiments, the first site further includes a second gateway device; when all tunnels included in the first tunnel group are abnormal, the method further includes:
[0009] Determining a state of a tunnel included in a third tunnel group, the third tunnel group including a tunnel between the second gateway device and a gateway device included in the second site via the first WAN;
[0010] When it is determined that all the tunnels included in the third tunnel group are abnormal, the step of sending the first data flow to the second site through the second tunnel group is performed.
[0011] In some embodiments, the method further comprises:
[0012] When it is determined that the tunnels included in the third tunnel group are normal, the first data flow is sent to the second gateway device, so that the second gateway device sends the first data flow to the second site through the third tunnel group.
[0013] In some embodiments, the step of sending the first data flow to the second site through the second tunnel group includes:
[0014] Obtain a minimum value between a first bandwidth of the first tunnel group for carrying data flows and a preset bandwidth corresponding to the second tunnel group, where the preset bandwidth is a maximum bandwidth that allows users to use the second tunnel group to transmit data flows;
[0015] If the minimum value is less than the available bandwidth of the second tunnel group, the first data flow is sent to the second site through the second tunnel group.
[0016] In some embodiments, the first site further includes a second gateway device; and the method further includes:
[0017] If the minimum value is greater than or equal to the available bandwidth of the second tunnel group, the first data stream is sent to the second site through the second tunnel group and the fourth tunnel group, and the fourth tunnel group includes a tunnel between the second gateway device and the gateway device included in the second site via the second WAN.
[0018] In some embodiments, the step of sending the first data flow to the second site through the second tunnel group and the fourth tunnel group includes:
[0019] Selecting a tunnel that meets a preset link quality condition from the tunnels included in the fourth tunnel group;
[0020] The first data flow is sent to the second site through the tunnels included in the second tunnel group and the selected tunnel.
[0021] In some embodiments, the first bandwidth is determined by the following steps:
[0022] A second bandwidth of data flows carried by all tunnels included in the first tunnel group within a statistical collection period;
[0023] The first bandwidth is obtained by calculating an average of the second bandwidth corresponding to a preset number of acquisition cycles.
[0024] In some embodiments, the available bandwidth is determined by the following steps:
[0025] Acquire a third bandwidth of data flows carried by all tunnels currently included in the second tunnel group;
[0026] The difference between the highest bandwidth that the second tunnel group can carry the data flow and the third bandwidth is calculated to obtain the available bandwidth.
[0027] In some embodiments, the method further comprises:
[0028] A second data stream is sent to a third site via a fifth tunnel group, wherein the fifth tunnel group includes a tunnel between the first gateway device and a gateway device included in the third site via the first WAN.
[0029] In some embodiments, the method further comprises:
[0030] The target tunnel identifier sent by the receiving controller;
[0031] Determine the target priority configuration information corresponding to the WAN indicated by the target tunnel according to the pre-stored correspondence between the WAN and the priority configuration information;
[0032] The target priority configuration information is set as attribute information of the target tunnel.
[0033] In a second aspect, an embodiment of the present application provides a data transmission device, which is applied to a first gateway device included in a first site, and the device includes:
[0034] A first sending module, configured to send a first data stream to a second site through a first tunnel group, wherein the first tunnel group includes a tunnel between the first gateway device and a gateway device included in the second site via a first WAN;
[0035] A second sending module is used to send the first data stream to the second site through a second tunnel group when all tunnels included in the first tunnel group are abnormal, the second tunnel group includes a tunnel between the first gateway device and the gateway device included in the second site via a second WAN, and the priority of the second WAN is lower than that of the first WAN.
[0036] In some embodiments, the first site further includes a second gateway device; and the second sending module is further configured to:
[0037] When all the tunnels included in the first tunnel group are abnormal, determine the status of the tunnels included in the third tunnel group, and the third tunnel group includes the tunnels between the second gateway device and the gateway device included in the second site passing through the first WAN; when it is determined that all the tunnels included in the third tunnel group are abnormal, execute the step of sending the first data flow to the second site through the second tunnel group.
[0038] In some embodiments, the second sending module is further used to:
[0039] When it is determined that the tunnels included in the third tunnel group are normal, the first data flow is sent to the second gateway device, so that the second gateway device sends the first data flow to the second site through the third tunnel group.
[0040] In some embodiments, the second sending module is specifically used to:
[0041] Obtain a minimum value between a first bandwidth of the first tunnel group for carrying data flows and a preset bandwidth corresponding to the second tunnel group, where the preset bandwidth is a maximum bandwidth that allows users to use the second tunnel group to transmit data flows;
[0042] If the minimum value is less than the available bandwidth of the second tunnel group, the first data flow is sent to the second site through the second tunnel group.
[0043] In some embodiments, the first site further includes a second gateway device; and the second sending module is further configured to:
[0044] If the minimum value is greater than or equal to the available bandwidth of the second tunnel group, the first data stream is sent to the second site through the second tunnel group and the fourth tunnel group, and the fourth tunnel group includes a tunnel between the second gateway device and the gateway device included in the second site via the second WAN.
[0045] In some embodiments, the second sending module is specifically used to:
[0046] Selecting a tunnel that meets a preset link quality condition from the tunnels included in the fourth tunnel group;
[0047] The first data flow is sent to the second site through the tunnels included in the second tunnel group and the selected tunnel.
[0048] In some embodiments, the apparatus further includes: a first determining module, configured to determine the first bandwidth, specifically configured to:
[0049] A second bandwidth of data flows carried by all tunnels included in the first tunnel group within a statistical collection period;
[0050] The first bandwidth is obtained by calculating an average of the second bandwidth corresponding to a preset number of acquisition cycles.
[0051] In some embodiments, the apparatus further includes: a second determination module, configured to determine the available bandwidth, specifically configured to:
[0052] Acquire a third bandwidth of data flows carried by all tunnels currently included in the second tunnel group;
[0053] The difference between the highest bandwidth that the second tunnel group can carry the data flow and the third bandwidth is calculated to obtain the available bandwidth.
[0054] In some embodiments, the apparatus further includes a third sending module, configured to:
[0055] A second data stream is sent to a third site via a fifth tunnel group, wherein the fifth tunnel group includes a tunnel between the first gateway device and a gateway device included in the third site via the first WAN.
[0056] In some embodiments, the apparatus further comprises a configuration module, configured to:
[0057] The target tunnel identifier sent by the receiving controller;
[0058] Determine the target priority configuration information corresponding to the WAN indicated by the target tunnel according to the pre-stored correspondence between the WAN and the priority configuration information;
[0059] The target priority configuration information is set as attribute information of the target tunnel.
[0060] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0061] Memory, used to store computer programs;
[0062] The processor is used to implement the method described in the first aspect when executing the program stored in the memory.
[0063] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0064] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the method described in the first aspect above.
[0065] Beneficial effects of the embodiments of the present application:
[0066] In the technical solution provided in the embodiment of the present application, the first gateway device included in the first site establishes tunnel groups with the gateway device included in the second site through the first WAN and the second WAN, namely the first tunnel group and the second tunnel group. When the first gateway device sends a data stream to the gateway device included in the second site, the first tunnel group corresponding to the high-priority first WAN is used to transmit the data stream, and the second tunnel group corresponding to the low-priority second WAN is in a silent state, that is, the first tunnel group is the main tunnel group between the first gateway device and the second site, and the second tunnel group is the backup tunnel group between the first gateway device and the second site. When all the tunnels included in the first tunnel group are abnormal, the first gateway device activates the backup tunnel group between the first gateway device and the second site, and then uses the second tunnel group to continue transmitting the data stream, thereby ensuring the stability of the business.
[0067] One WAN port can establish multiple tunnel groups with multiple sites. In the embodiment of the present application, if one tunnel group is abnormal, only the backup tunnel group corresponding to the tunnel group needs to be enabled, and the backup tunnel groups corresponding to all tunnel groups under the WAN port corresponding to the tunnel group do not need to be enabled. Compared with the control of the backup tunnel group through the WAN port in the related art, the control granularity of the silent setting in the cold standby technology is reduced, the problem of coarse control granularity is solved, and the backup tunnel group can be flexibly used for data transmission.
[0068] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0070] Figure 1 A first schematic diagram of a data transmission system provided in an embodiment of the present application;
[0071] Figure 2 A schematic diagram of a first flow chart of a data transmission method provided in an embodiment of the present application;
[0072] Figure 3 A second flow chart of the data transmission method provided in the embodiment of the present application;
[0073] Figure 4 A third flow chart of the data transmission method provided in the embodiment of the present application
[0074] Figure 5 A schematic diagram of a flow chart of a priority configuration method provided in an embodiment of the present application;
[0075] Figure 6 A first schematic diagram of a data transmission scenario provided in an embodiment of the present application;
[0076] Figure 7 A second schematic diagram of a data transmission scenario provided in an embodiment of the present application;
[0077] Figure 8 A third schematic diagram of a data transmission scenario provided in an embodiment of the present application;
[0078] Fig. 9 A fourth schematic diagram of a data transmission scenario provided in an embodiment of the present application;
[0079] Fig.10 A fifth schematic diagram of a data transmission scenario provided in an embodiment of the present application;
[0080] Fig.11 A second schematic diagram of a data transmission system provided in an embodiment of the present application;
[0081] Fig.12 A schematic diagram of a structure of a data transmission device provided in an embodiment of the present application;
[0082] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0083] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0084] To facilitate understanding, the terms appearing in the embodiments of the present application are explained below.
[0085] Gateway device: An edge device of a local area network (LAN). A gateway device includes one or more LAN ports and one or more WAN ports. The gateway device accesses the LAN through the LAN port and accesses the WAN through the WAN port, that is, the LAN accesses the WAN through the gateway device. Here, the network type of the WAN port is the network type of the WAN to which the WAN port is connected, that is, the network types of the WAN ports connected to the same WAN are the same. A gateway device may include WAN ports of multiple network types, that is, a gateway device may access multiple WANs. The gateway device may be a gateway device such as a router or a switching device. In the embodiments of the present application, the type of the gateway device is not limited.
[0086] Site: includes one or more gateway devices. In the embodiment of the present application, there is no limit on the number of gateway devices included in the site. In the embodiment of the present application, the site can be divided into a headquarters site (i.e., a hub site) and a spoke site. A site can be a headquarters site or a spoke site. When a site is connected to multiple other sites, the site is a headquarters site relative to the multiple other sites, and the multiple other sites are spoke sites relative to the headquarters site.
[0087] P2MP tunnel: When a gateway device establishes multiple tunnels with multiple gateway devices through a WAN port, these multiple tunnels constitute a P2MP tunnel. The tunnel established by a gateway device through a WAN port with a gateway device can be a Transport Tunnel Endpoint (TTE) tunnel or other types of tunnels.
[0088] Transmission network: It is composed of one or more WANs. The network types of the transmission network may include but are not limited to Multiple Spanning Tree Protocol (MSTP), Multiprotocol Label Switching (MPLS) and 5th Generation Mobile Communication Technology (5G). In practical applications, WANs can be divided according to the network type of the transmission network. In this case, a transmission network includes one WAN, and the network type of the WAN is the network type of the transmission network. WANs can also be divided according to the network type of the transmission network, the operator, etc. In this case, a transmission network can include multiple WANs, and the network type of the WAN is determined by the network type of the transmission network and the operator, etc.
[0089] With the development of communication technology, EVPN is increasingly used in enterprise and operator scenarios, and enterprises have a variety of network choices. In order to ensure the stability of business communications and reduce costs, enterprises will choose WAN exports of various network types, use P2MP tunneling, access various types of networks; and use cold standby technology to set some high-cost tunnels to silent state and use low-cost tunnels to transmit data; when the low-cost tunnel is abnormal, these high-cost tunnels are enabled, that is, these high-cost tunnels are used to transmit data.
[0090] In the above data transmission method, the silent setting is for all tunnels under one WAN port, that is, if the tunnel under the first WAN port is abnormal, the high-cost tunnel under the second WAN port in the silent state needs to be enabled, and all high-cost tunnels under the second WAN port need to be enabled at the same time. This silent setting has the problem of coarse control granularity, and when only some tunnels under the first WAN port are abnormal, this silent setting will also cause other problems.
[0091] For example, when only some tunnels under the first WAN port are abnormal, if the high-cost tunnel in silent state is enabled, the data flow transmitted by the normal tunnel under the first WAN port and the data flow transmitted by the abnormal tunnel will be transmitted through the high-cost tunnel, which will increase the cost of data transmission. Alternatively, when only some tunnels under the first WAN port are abnormal, if the high-cost tunnel in silent state is not enabled, and the high-cost tunnel is enabled only when all tunnels under the first WAN port are abnormal, the data transmission efficiency will be low, and there will be problems such as packet loss and low reliability.
[0092] In order to solve the above problems, the present application embodiment provides a data transmission system, such as Figure 1 As shown, it includes a headquarters site and multiple branch sites. Figure 1 In the description, only two branch sites (branch 1 site and branch 2 site) are used as an example, which is not limiting.
[0093] like Figure 1 In the data transmission system shown, the headquarters site is a three-gateway site, including three gateway devices, namely gateway device H1, gateway device H2, and gateway device H3; the two branch sites are dual-gateway sites, each including two gateway devices, namely branch 1 site including gateway device S11 and gateway device S12, and branch 2 site including gateway device S21 and gateway device S22. Transmission network 1 includes one WAN1. Transmission network 2 includes two WANs, namely WAN2 and WAN3.
[0094] Tunnels are established between each gateway device at the headquarters site and each gateway device at each branch site through the corresponding WAN ports of WAN1, WAN2, and WAN3. Figure 1In the figure, the solid line represents the tunnel established through the WAN port corresponding to WAN1, that is, the tunnel passing through WAN1; the dotted line represents the tunnel established through the WAN port corresponding to WAN2, that is, the tunnel passing through WAN2; the dotted line represents the tunnel established through the WAN port corresponding to WAN3, that is, the tunnel passing through WAN3.
[0095] Figure 1 In the embodiment, each WAN port corresponds to a P2MP tunnel. For example, four tunnels connected to gateway devices S11, S12, S21 and S22 are established at the WAN1 port of gateway device H1. These four tunnels constitute a P2MP tunnel at the WAN1 port of gateway device H1. For another example, three tunnels connected to gateway devices H1, H2 and H3 are established at the WAN1 port of gateway device S11. These three tunnels constitute a P2MP tunnel at the WAN1 port of gateway device S11. In the embodiment of the present application, the P2MP tunnels are further divided into multiple tunnel groups based on the site. That is, multiple tunnels corresponding to the same site in a P2MP tunnel are divided into one tunnel group. Figure 1 In the figure, the P2MP tunnel at the WAN1 port of the gateway device H1 can be divided into tunnel group 11 corresponding to the branch 1 site and tunnel group 12 corresponding to the branch 2 site; the P2MP tunnel at the WAN1 port of the gateway device S11 corresponds to only one headquarters site, therefore, the P2MP tunnel at the WAN1 port of the gateway device S11 includes a tunnel group corresponding to the headquarters site.
[0096] In an embodiment of the present application, WAN has a priority, and the priority of WAN can be divided according to cost, that is, the higher the cost, the lower the priority; the priority of WAN can also be divided according to link quality, that is, the higher the link quality, the higher the priority; the priority of WAN can also be divided according to multiple factors such as cost and link quality, and there is no limitation on this.
[0097] The priority of a WAN is the priority of a tunnel passing through the WAN, and the priority of a tunnel is the priority of a tunnel group including the tunnel. In the embodiment of the present application, the gateway device preferentially uses a high-priority tunnel group to transmit data streams. When a high-priority tunnel group is used to transmit data streams, a low-priority tunnel group is in a silent state, that is, a high-priority tunnel group is a primary tunnel group, and a low-priority tunnel group is a backup tunnel group. The gateway device uses a cold standby technology to transmit data streams.
[0098] In the above Figure 1 Based on Figure 2, is a first flow chart of the data transmission method provided in the embodiment of the present application, which is applied to the first gateway device included in the first site, the first site can be a headquarters site or any branch site, the first site includes one or more gateway devices, and the first gateway device can be any gateway device included in the first site. The above data transmission method includes the following steps.
[0099] Step S21, sending a first data stream to a second site through a first tunnel group, wherein the first tunnel group includes a tunnel between a first gateway device and a gateway device included in the second site via a first WAN.
[0100] Step S22, when all tunnels included in the first tunnel group are abnormal, the first data stream is sent to the second site through the second tunnel group, the second tunnel group includes a tunnel between the first gateway device and the gateway device included in the second site via the second WAN, and the priority of the second WAN is lower than the priority of the first WAN.
[0101] In the technical solution provided in the embodiment of the present application, the first gateway device included in the first site establishes tunnel groups with the gateway device included in the second site through the first WAN and the second WAN, namely the first tunnel group and the second tunnel group. When the first gateway device sends a data stream to the gateway device included in the second site, the first tunnel group corresponding to the high-priority first WAN is used to transmit the data stream, and the second tunnel group corresponding to the low-priority second WAN is in a silent state, that is, the first tunnel group is the main tunnel group between the first gateway device and the second site, and the second tunnel group is the backup tunnel group between the first gateway device and the second site. When all the tunnels included in the first tunnel group are abnormal, the first gateway device activates the backup tunnel group between the first gateway device and the second site, and then uses the second tunnel group to continue transmitting the data stream, thereby ensuring the stability of the business.
[0102] One WAN port can establish multiple tunnel groups with multiple sites. In the embodiment of the present application, if one tunnel group is abnormal, only the backup tunnel group corresponding to the tunnel group needs to be enabled, and the backup tunnel groups corresponding to all tunnel groups under the WAN port corresponding to the tunnel group do not need to be enabled. Compared with the control of the backup tunnel group through the WAN port in the related art, the control granularity of the silent setting in the cold standby technology is reduced, the problem of coarse control granularity is solved, and the backup tunnel group can be flexibly used for data transmission.
[0103] In the above step S21, the first data stream is any data stream received from the LAN side of the first site through the LAN port of the first gateway device. The second site is any site connected to the first site, and the second site includes one or more gateway devices. The second site can be a branch site or a headquarters site, which is specifically determined according to the type of the first site. For example, when the first site is a headquarters site, the second site is a branch site connected to the headquarters site; when the first site is a branch site, the second site is a headquarters site connected to the branch site.
[0104] In the embodiment of the present application, the first tunnel group is a tunnel group for data transmission between the first site and the second site that is currently enabled, and the communication protocol of the data stream transmitted by the first tunnel group is the same as the communication protocol of the first data stream. For the convenience of description, the tunnel included in the first tunnel group is referred to as the first tunnel. The communication protocol may include but is not limited to MSTP, MPLS protocol, etc. The first tunnel group may be the tunnel group with the highest priority, and the first tunnel group is the main tunnel group.
[0105] Before step S21, the first gateway device and all or part of the gateway devices included in the second site can establish a first tunnel passing through the first WAN through the WAN port corresponding to the first WAN (ie, the first WAN port) to obtain a first tunnel group. Figure 1 Taking the data transmission system shown as an example, when the first WAN is WAN1, the first gateway device is gateway device H1, and the second site is branch 1 site, the first tunnel group can include two first tunnels, namely, a tunnel between gateway device H1 and gateway device S11 of branch 1 site via WAN1, and a tunnel between gateway device H1 and gateway device S12 of branch 1 site via WAN1.
[0106] In an embodiment of the present application, the transmission network may include WANs of multiple priorities, and there may be one or more WANs of each priority, and there may be one or more WANs with the same priority, that is, there may be one or more WANs with the same priority as the first WAN. To ensure the correct transmission of the data stream, during data transmission, the first gateway device may receive the data stream from the LAN side through the LAN port, that is, the first data stream, and according to the description information of the first data stream, determine the tunnel group that matches the communication protocol of the first data stream and has the highest priority in the tunnel group between the first gateway device and the second site, that is, the first tunnel group that transmits the first data stream, and then use the first WAN port to send the first data stream to the second site through the first tunnel group passing through the first WAN. The gateway device at the second site receives the first data stream sent by the first gateway device through the first tunnel group. Here, the first WAN may be one or more, and the number of first tunnel groups may be one or more.
[0107] In the embodiment of the present application, the first gateway device may send the data stream in any of the following ways.
[0108] Method 1: Use load balancing to send data streams.
[0109] The first gateway device uses a load balancing method to send the first data stream to the second site through each first tunnel included in the first tunnel group, thereby realizing multi-channel parallel transmission. For example, the first tunnel group includes two tunnels, namely tunnel 1 and tunnel 2. The first gateway device first sends a packet of the first data stream through tunnel 1, and then sends a packet of the first data stream through tunnel 2; then, it sends a packet of the first data stream through tunnel 1 again, and then sends a packet of the first data stream through tunnel 2; the first data stream is sent cyclically in this way, thereby realizing load balancing of tunnels 1 and 2.
[0110] In an embodiment of the present application, when there are multiple first tunnel groups, the first gateway device uses a load balancing method to send the first data stream to the second site through each first tunnel included in each first tunnel group. For example, there are two first tunnel groups, namely, the first tunnel group 1 and the first tunnel group 2. The first tunnel group 1 includes two tunnels, namely, tunnel 11 and tunnel 12, and the first tunnel group 2 includes two tunnels, namely, tunnel 21 and tunnel 22. The first gateway device first sends a packet of the first data stream through tunnel 11, then sends a packet of the first data stream through tunnel 12, then sends a packet of the first data stream through tunnel 21, and finally sends a packet of the first data stream through tunnel 22. The first data stream is sent in a cycle in this way to achieve load balancing of the first tunnel group 1 and the first tunnel group 2.
[0111] Method 2: Use a tunnel with high link quality to send data streams.
[0112] The first gateway device determines the quality score of each first tunnel based on quality reference values such as link delay jitter and packet loss rate, selects the first tunnel that meets the preset link quality conditions, and sends the first data stream to the second site through the first tunnel that meets the preset link quality conditions, thereby realizing multi-channel parallel transmission.
[0113] In an embodiment of the present application, the preset link quality condition may be: the first preset number of tunnels with the highest quality score. That is, the first gateway device selects the first preset number of first tunnels with the highest quality score; and sends the first data stream to the second site through the first preset number of first tunnels with the highest quality score, thereby realizing multi-channel parallel transmission. Here, the smaller the delay jitter and the smaller the packet loss rate, the higher the quality score.
[0114] The preset link quality condition may also be: a tunnel with a quality score higher than a preset score threshold. That is, the first gateway device selects a first tunnel with a quality score higher than the preset score threshold; and sends the first data stream to the second site through the first tunnel with a quality score higher than the preset score threshold, thereby achieving multi-channel parallel transmission.
[0115] The preset link quality condition may also be: a tunnel group with a quality score higher than a preset score threshold. That is, the first gateway device selects a second preset number of first tunnel groups with the highest quality scores; and uses a load balancing method to send the first data stream to the second site through each first tunnel included in the second preset number of first tunnel groups with the highest quality scores.
[0116] The preset link quality condition may also be: a tunnel group with a quality score higher than a preset score threshold. That is, the first gateway device selects a first tunnel group with a quality score higher than the preset score threshold; and uses a load balancing method to send the first data stream to the second site through each first tunnel included in the first tunnel group with a quality score higher than the preset score threshold.
[0117] In the embodiment of the present application, the first gateway device may also send the data stream in other ways, such as randomly selecting one or more tunnels from the first tunnel group to send the first data stream, and this is not limited.
[0118] In the above step S22, the first gateway device can detect the status of each first tunnel included in the first tunnel group to determine whether each first tunnel is abnormal, that is, to determine whether each first tunnel can send data streams normally. When sending the first data stream, the first gateway device can collect information of the first tunnel group through Intelligent Network Quality Analyzer (iNQA) to determine whether the first tunnel included in the first tunnel group is broken. When the first tunnel is detected to be broken, the first gateway device can determine that the first tunnel is abnormal. According to the detection results of the first gateway device on each first tunnel included in the first tunnel group, it can be specifically divided into the following three situations.
[0119] Case 1: All first tunnels included in the first tunnel group are normal. The first gateway device determines that the first tunnel can send data streams, and continues to send the first data stream to the second site through the first tunnel group.
[0120] In case 2, part of the first tunnel included in the first tunnel group is normal, and the first gateway device determines that part of the first tunnel can send data streams. At this time, the first gateway device can continue to send the first data stream to the second site through the normal first tunnel included in the first tunnel group.
[0121] Case 3: all first tunnels included in the first tunnel group are abnormal, and the first gateway device determines that all first tunnels cannot send data flows.
[0122] In the embodiment of the present application, when all the first tunnels included in the first tunnel group are abnormal, the first gateway device activates the backup tunnel group (i.e., the second tunnel group), uses the WAN port corresponding to the second WAN (i.e., the second WAN port), and sends the first data stream to the second site through the second tunnel group passing through the second WAN. The gateway device at the second site receives the first data stream sent by the first gateway device through the second tunnel group.
[0123] The second tunnel group is a backup tunnel group for data transmission between the first site and the second site. The second tunnel group is in a silent state. For ease of description, the tunnels included in the second tunnel group are referred to as second tunnels. Figure 1 Taking the data transmission system shown as an example, when the second WAN is WAN2, the first gateway device is gateway device H1, and the second site is branch 1 site, the second tunnel group may include two second tunnels, namely, a tunnel between gateway device H1 and gateway device S11 of branch 1 site via WAN2, and a tunnel between gateway device H1 and gateway device S12 of branch 1 site via WAN2.
[0124] In an embodiment of the present application, before sending the first data stream to the second site through the second tunnel group, the first gateway device may also detect the status of each second tunnel included in the second tunnel group. When there is a normal second tunnel in the second tunnel group, step S22 is executed to send the first data stream to the second site through the normal second tunnel.
[0125] In an embodiment of the present application, the transmission network may include WANs of multiple priorities, and each priority WAN may have one or more WANs, and the same priority WAN may have one or more WANs. To ensure the correct transmission of the data stream, the first gateway device may determine, based on the description information of the first data stream, a second tunnel group that matches the communication protocol of the first data stream and has the highest priority in the tunnel group between the first gateway device and the second site that has a lower priority than the first tunnel group, and then use the second WAN port to send the first data stream to the second site through the second tunnel group passing through the second WAN. Here, the second WAN may be one or more, and the number of second tunnel groups may be one or more.
[0126] The manner in which the first gateway device sends the first data stream to the second site through the second tunnel group can be specifically referred to the relevant description of sending the first data stream to the second site through the first tunnel group in step S21, which will not be repeated here.
[0127] In an embodiment of the present application, when selecting a backup tunnel group, the first gateway device can, based on the diversion configuration, prioritize the use of the backup tunnel group on the local device (such as the second tunnel group mentioned above) to send data streams. That is, the backup tunnel group at the entry location of the LAN side service traffic (i.e., data stream) of the first site is preferentially enabled to send data streams, thereby reducing the service traffic crossing the tunnel and improving the forwarding speed of the data stream.
[0128] In some embodiments, the first site can also be connected to the third site through the fifth tunnel group. In this case, the first site is the headquarters site, the second site and the third site are branch sites respectively, and the third site includes one or more gateway devices. The fifth tunnel group includes a tunnel between the first gateway device and the gateway device included in the third site through the first WAN, that is, the first tunnel group and the fifth tunnel group are established through the same WAN port on the first gateway device, and the first tunnel group and the fifth tunnel group pass through the same WAN. When data streams are transmitted between the first site and the third site, the above-mentioned data transmission method also includes the following steps: sending a second data stream to the third site through the fifth tunnel group. The gateway device of the third site receives the second data stream sent by the first gateway device through the fifth tunnel group.
[0129] The fifth tunnel group is a tunnel group currently enabled for data transmission between the first site and the third site, and the communication protocol of the data flow transmitted by the fifth tunnel group is the same as the communication protocol of the second data flow. For ease of description, the tunnel included in the fifth tunnel group is referred to as the fifth tunnel. The fifth tunnel group may be the tunnel group with the highest priority, and the fifth tunnel is the main tunnel.
[0130] Still Figure 1 Taking the data transmission system shown as an example, when the first WAN is WAN1, the first gateway device is gateway device H1, the second site is branch 1 site, and the third site is branch 2 site, the first tunnel group and the fifth tunnel group constitute the P2MP tunnel at the WAN1 port of gateway device H1, the first tunnel group is tunnel group 11 corresponding to branch 1 site, and the fifth tunnel group is tunnel group 12 corresponding to branch 2 site.
[0131] When the first gateway device uses the first WAN port to send the first data stream to the second site through the first tunnel group passing through the first WAN, it can also receive the data stream from the LAN side through the LAN port, that is, the second data stream. According to the description information of the second data stream, in the tunnel group between the first gateway device and the third site, determine the tunnel group that matches the communication protocol of the second data stream and has the highest priority, that is, the fifth tunnel group that transmits the second data stream, and then use the first WAN port to send the second data stream to the third site through the fifth tunnel group passing through the first WAN. Here, the number of the fifth tunnel group can be one or more. The first data stream and the second data stream can be the same or different.
[0132] For different tunnel groups (such as the first tunnel group and the fifth tunnel group) under the same WAN port, the first gateway device can control the two tunnel groups separately. When it is detected that all the first tunnels included in the first tunnel group are abnormal, the first gateway device executes the above step S22 to send the first data stream to the second site through the second tunnel group, and at this time the fifth tunnel included in the fifth tunnel group is normal, then the first gateway device can continue to use the first WAN port to send the second data stream to the third site through the fifth tunnel group.
[0133] When it is detected that all the fifth tunnels included in the fifth tunnel group are abnormal, the first gateway device uses the above step S22 to process the second data stream transmitted by the fifth tunnel group. At this time, the first tunnel included in the first tunnel group is normal. The first gateway device can continue to use the first WAN port to send the first data stream to the second site through the first tunnel group.
[0134] In the technical solution provided in the embodiment of the present application, a tunnel group is used to control the backup tunnel group. Even if there are multiple tunnel groups under the same WAN port, it can be ensured that the multiple tunnel groups do not affect each other, thereby reducing the control granularity of the silent setting in the cold standby technology and solving the problem of coarse control granularity.
[0135] In some embodiments, the first site includes multiple gateway devices. At this time, based on the above data transmission method, the embodiment of the present application also provides a data transmission method, such as Figure 3 As shown, including:
[0136] Step S31, sending a first data flow to a second site through a first tunnel group, wherein the first tunnel group includes a tunnel between a first gateway device and a gateway device included in the second site via a first WAN, which is the same as the above step S21.
[0137] Step S32: When all tunnels included in the first tunnel group are abnormal, determine the status of the tunnels included in the third tunnel group, where the third tunnel group includes the tunnels between the second gateway device included in the first site and the gateway device included in the second site via the first WAN.
[0138] Step S33, when it is determined that all the tunnels included in the third tunnel group are abnormal, the first data stream is sent to the second site through the second tunnel group, the second tunnel group includes a tunnel between the first gateway device and the gateway device included in the second site via the second WAN, and the priority of the second WAN is lower than the priority of the first WAN.
[0139] In the technical solution provided by the embodiment of the present application, the first site also includes a second gateway device, and the second gateway device and the gateway device included in the second site establish a tunnel group through the first WAN, namely, the third tunnel group. When the first gateway device sends a data stream to the gateway device included in the second site, the first tunnel group established by the first gateway device is used first to transmit the data stream. At this time, the third tunnel group (i.e., the main tunnel group) established by the second gateway device and the second tunnel group (i.e., the backup tunnel group) corresponding to the low-priority second WAN are both in a silent state. When the tunnels included in the first tunnel group are all abnormal, the first gateway device first determines the state of the third tunnel group. When it is determined that all the main tunnels are abnormal, the second tunnel group is used to continue to transmit the data stream to ensure the stability of the service. It can be seen that in the embodiment of the present application, the tunnel group is used to control the backup tunnel group, which reduces the control granularity of the silent setting in the cold standby technology, solves the problem of coarse control granularity, and uses the main tunnel group with lower cost to transmit data as much as possible, reduces the cost of transmitting data streams, and realizes more flexible data transmission in the scenario of multiple gateways.
[0140] In the above step S32, when the first gateway device determines that all the first tunnels included in the first tunnel group are abnormal, that is, in case 1 in the above step S22, the first gateway device determines the tunnel group (such as the third tunnel group) established between other gateway devices included in the first site (such as the second gateway device) and the gateway devices included in the second site through the first WAN.
[0141] In the embodiment of the present application, the third tunnel group is a tunnel group for data transmission between the first site and the second site, and the communication protocol of the data stream transmitted by the third tunnel group is the same as the communication protocol of the first data stream, and the second gateway device is a gateway device other than the first gateway device included in the first site, and the number of the second gateway devices can be one or more. For ease of description, the tunnel included in the third tunnel group is referred to as the third tunnel. The third tunnel group can be the main tunnel group. For the first gateway device, the priority of the third tunnel group is lower than the first tunnel group and higher than the second tunnel group.
[0142] Still Figure 1 The data transmission system shown is taken as an example for explanation. When the first WAN is WAN1, the first gateway device is gateway device H1, and the second site is branch 1 site, the second gateway device can be gateway device H2 and gateway device H3. Taking the second gateway device as gateway device H2 as an example, the third tunnel group can include two third tunnels, namely, a tunnel between gateway device H2 and gateway device S11 of branch 1 site via WAN2, and a tunnel between gateway device H2 and gateway device S12 of branch 1 site via WAN2.
[0143] In the embodiment of the present application, when all tunnels included in the first tunnel group are abnormal, the first gateway device determines, based on the description information of the first data flow, in the tunnel group between the second gateway device and the second site, a tunnel group that matches the communication protocol of the second data flow and has the highest priority, that is, the third tunnel group that transmits the first data flow. Here, the number of the third tunnel groups can be one or more, and the multiple third tunnel groups can belong to the same second gateway device or to different second gateway devices.
[0144] The first gateway device can detect the status of each third tunnel included in the third tunnel group to determine whether each third tunnel is abnormal, that is, to determine whether each third tunnel can send data streams normally. Specifically, it can be divided into the following three situations, that is, situation 3 in the above step S22 can be divided into situation 11, situation 12 and situation 13.
[0145] Case 11: all third tunnels included in the third tunnel group are abnormal, and the first gateway device determines that all third tunnels cannot send data flows.
[0146] In an embodiment of the present application, when all third tunnels included in the third tunnel group are abnormal, the first gateway device executes step S33, enables the backup tunnel group (i.e., the second tunnel group), and sends the first data stream to the second site through the second tunnel group. For details, please refer to the relevant description of situation 3 in the above step S22.
[0147] In some embodiments, in situation 11, the above-mentioned step S22 / step S33 can be implemented by the following steps: obtaining the minimum value of the first bandwidth of the first tunnel group carrying the data flow and the preset bandwidth corresponding to the second tunnel group, where the preset bandwidth is the maximum bandwidth allowing the user to use the second tunnel group to transmit the data flow; if the minimum value is less than the available bandwidth of the second tunnel group, sending the first data flow to the second site through the second tunnel group.
[0148] In the embodiment of the present application, after determining that the first tunnel group is abnormal, the first gateway device can obtain information about each first tunnel included in the first tunnel group, and calculate the total service bandwidth of the first tunnel group based on the bandwidth occupied by the service before all the first tunnels are disconnected (that is, the bandwidth of all the first tunnels carrying data flows). The calculated total service bandwidth is the first bandwidth of the first tunnel group carrying data flows. Figure 1 Taking the data transmission system shown as an example, when the first gateway device is gateway device H1, the second site is branch 1 site, and the first tunnel group is tunnel group 11 corresponding to branch 1 site, the first bandwidth is shown in the following formula.
[0149] Formula (1)
[0150] Wherein, tunnel1 represents the first tunnel group; Btunnel1 represents the first bandwidth of the data flow carried by the first tunnel group; i represents the number of the first tunnel included in the first tunnel group, and the value range of i can be determined according to the number of the first tunnels. When the first tunnel group is tunnel group 11, i=1,2; represents the TTE tunnel numbered i (i.e., the first tunnel) in the first tunnel group; hub1-spoke1 represents the tunnel group between the gateway device H1 at the headquarters site and the gateway device included in the branch 1 site; It represents the bandwidth occupied by the service before the first tunnel numbered i is disconnected; ∑ is the summation symbol.
[0151] In an embodiment of the present application, the first gateway device can count the second bandwidths of all first tunnels carrying data flows included in the first tunnel group within a collection period; calculate the average of the second bandwidths corresponding to a preset number of collection periods to obtain the first bandwidth. The collection period is the time unit for the first gateway device to calculate the first bandwidth. Within a collection period, the first gateway device calculates the total service bandwidth of the first tunnel group within the collection period based on the bandwidth occupied by the service before all first tunnels are disconnected, as the second bandwidth of the first tunnel group carrying data flows within the collection period. The specific method for calculating the second bandwidth can be found in the above formula (1). Afterwards, the first gateway device calculates multiple second bandwidths in the same way within multiple (i.e., a preset number) collection periods, takes the average of these multiple second bandwidths, and uses the average as the first bandwidth.
[0152] For example, after determining that the first tunnel group is abnormal, the first gateway device can take the last n (i.e., a preset number) collection cycles before all the first tunnels are disconnected, calculate the second bandwidth in each collection cycle, obtain n second bandwidths, calculate the average of these n second bandwidths, and obtain the first bandwidth. The first gateway device can also randomly select n (i.e., a preset number) collection cycles from the multiple collection cycles before all the first tunnels are disconnected to calculate the first bandwidth. n can be 4, 5, etc., and there is no limitation on the value of the preset number and the way in which the first gateway device selects the collection cycle. In the embodiment of the present application, by counting the second bandwidths of multiple collection cycles and taking the average of multiple second bandwidths as the total service bandwidth, the stability of the calculated first bandwidth is ensured and the accuracy of the first bandwidth is improved.
[0153] In the embodiment of the present application, the backup tunnel group can be set with a preset bandwidth, which indicates the maximum bandwidth of the data stream transmitted by the user using the backup tunnel group. After determining the second tunnel group, the first gateway device can determine the preset bandwidth B of the second tunnel group according to the committed information rate (CIR) of the second tunnel group. CIR , to determine the maximum bandwidth of the user using the second tunnel group to transmit data flows. For example, the preset bandwidth BCIR This is the CIR, or the preset bandwidth B. CIR It is the product of CIR and preset weight coefficient. The preset weight coefficient can be 0.8, 0.9 or 0.95, etc., and there is no limit on this. By setting a preset bandwidth for the backup tunnel group, the speed of data flow transmission using the backup tunnel group can be limited, and the cost of enabling the backup tunnel group can be reduced.
[0154] After determining the first bandwidth of the first tunnel group and the preset bandwidth of the second tunnel group, the first gateway device may determine the minimum value between the two. Taking the first bandwidth obtained in formula (1) as an example, the first gateway device may determine the minimum value as min[B tunnel1 ,B CIR ].
[0155] In an embodiment of the present application, after determining the second tunnel group, the first gateway device also needs to determine the available bandwidth of the second tunnel group to determine whether the bandwidth of the second tunnel group meets the bandwidth requirements, that is, to determine whether the export bandwidth of the second WAN port on the first gateway device is sufficient.
[0156] The first gateway device can determine the available bandwidth by the following steps: obtaining the third bandwidth of all tunnels included in the current second tunnel group that carry data flows; calculating the difference between the highest bandwidth of the second tunnel group that can carry data flows and the third bandwidth to obtain the available bandwidth.
[0157] The first gateway device calculates the total service bandwidth of the current second tunnel group according to the bandwidth occupied by the services of all the current second tunnels (that is, the bandwidth of all the second tunnels carrying data flows), as the third bandwidth B current The first gateway device calculates the total bandwidth B of the second tunnel group wan The product of B and the preset service coefficient T determines the maximum bandwidth of the second tunnel group that can be occupied by the service (i.e., the bandwidth that can carry data flow). That is, calculate B wan ×T, the highest bandwidth is obtained. In different bandwidth scenarios, the preset service coefficient can be different. For example, in a large bandwidth scenario (i.e., the WAN port bandwidth is greater than 10G (Gigabit)), the value of T can be 0.9, and in a small bandwidth scenario, the value of T can be 0.8. There is no limit on the value of the service coefficient.
[0158] Afterwards, the first gateway device calculates the difference between the highest bandwidth and the third bandwidth, that is, calculates B wan ×TB current By calculating the difference between the highest bandwidth and the occupied third bandwidth, a more accurate available bandwidth can be obtained, and the available bandwidth corresponding to different bandwidth scenarios can also be obtained, thereby improving the accuracy and reliability of the available bandwidth.
[0159] In the embodiment of the present application, the bandwidth requirement is: the minimum value of the first bandwidth of the first tunnel group and the preset bandwidth of the second tunnel group is less than the available bandwidth of the second tunnel group, and the first gateway device determines whether the bandwidth of the second tunnel group meets the bandwidth requirement, that is, determines whether the minimum value is less than the available bandwidth. Taking the first bandwidth obtained in formula (1) as an example, the bandwidth requirement formula is as follows.
[0160] min[B tunnel1 ,B CIR ]<(B wan ×TB current ) Formula (2)
[0161] Among them, B tunnel1 Indicates the first bandwidth; B CIR Indicates the preset bandwidth of the second tunnel group; min[B tunnel1 ,B CIR ] represents the minimum value of the preset bandwidths of the first bandwidth and the second tunnel group; B wan represents the total bandwidth of the second tunnel group; T represents the service coefficient; B current Indicates the third bandwidth; B wan ×TB current Indicates the available bandwidth of the second tunnel group.
[0162] According to formula (2), when the minimum value of the first bandwidth and the preset bandwidth of the second tunnel group is less than the available bandwidth of the second tunnel group, it is determined that the bandwidth of the second tunnel group meets the bandwidth requirement and the egress bandwidth of the second WAN port on the first gateway device is sufficient. Then, the first gateway device can send the first data stream to the second site through the second tunnel group to reduce the situation of traversing the tunnel, reduce the interaction between gateway devices, and improve the transmission speed and efficiency of the data stream.
[0163] In some embodiments, when the minimum value of the preset bandwidth of the first bandwidth and the second tunnel group is greater than or equal to the available bandwidth of the second tunnel group, the first gateway device may determine that the bandwidth of the second tunnel group does not meet the bandwidth requirement, and the egress bandwidth of the second WAN port on the first gateway device is insufficient, then the first gateway device determines the tunnel group (such as the fourth tunnel group) established between other gateway devices (such as the second gateway device) included in the first site and the gateway device included in the second site through the second WAN. The fourth tunnel group includes a tunnel between the second gateway device and the gateway device included in the second site through the second WAN. The fourth tunnel group is a backup tunnel group for data transmission between the first site and the second site. The fourth tunnel group is in a silent state. For ease of description, the tunnel included in the fourth tunnel group will be referred to as the fourth tunnel in the following.
[0164] Still Figure 1Taking the data transmission system shown as an example, when the second WAN is WAN2, the first gateway device is gateway device H1, the second gateway device is H2, and the second site is branch 1 site, the fourth tunnel group may include two second tunnels, namely, a tunnel between gateway device H2 and gateway device S11 of branch 1 site via WAN2, and a tunnel between gateway device H2 and gateway device S12 of branch 1 site via WAN.
[0165] In an embodiment of the present application, the transmission network may include WANs of multiple priorities, and each priority WAN may have one or more WANs, and the same priority WAN may have one or more WANs. To ensure the correct transmission of the data stream, the first gateway device may determine, based on the description information of the first data stream, a fourth tunnel group that matches the communication protocol of the first data stream and has the highest priority in the tunnel group between the second gateway device and the second site that has a lower priority than the first tunnel group, and then use the second WAN port to send the first data stream to the second site through the fourth tunnel group passing through the second WAN. Here, the second WAN may be one or more, and the number of the fourth tunnel groups may be one or more.
[0166] The first gateway device and the second gateway device can jointly send the first data stream to the second site through the second tunnel group and the fourth tunnel group. That is, the first gateway device uses the second WAN port to send the first data stream to the second site through the second tunnel group passing through the second WAN; in addition, the first gateway device sends the first data stream to the second gateway device, and the second gateway device uses the second WAN port to send the first data stream to the second site through the fourth tunnel group passing through the second WAN. The gateway device at the second site receives the first data stream sent by the first gateway device through the second tunnel group and the fourth tunnel group.
[0167] In the embodiment of the present application, the first gateway device may send the first data stream in a load balancing manner, or may send the first data stream in a tunnel with high link quality according to the link quality. For example, the first gateway device selects a tunnel that meets the preset link quality condition from the tunnels included in the fourth tunnel group; sends the first data stream to the second site through the tunnels included in the second tunnel group and the selected tunnel. For details, please refer to the relevant description of sending the first data stream to the second site through the first tunnel group in step S21, which will not be repeated here.
[0168] In an embodiment of the present application, the first gateway device can detect the status of each fourth tunnel included in the fourth tunnel group. When there is a normal fourth tunnel in the fourth tunnel group, the second gateway device can send the first data stream to the second site through the normal fourth tunnel.
[0169] When all fourth tunnels included in the fourth tunnel group are abnormal, the first gateway device may use the current second WAN as a new first WAN and re-execute steps S32 to S33 to ensure the real-time and reliability of data stream transmission.
[0170] In the technical solution provided by the embodiment of the present application, when the available bandwidth of the second tunnel group does not meet the bandwidth condition, by traversing the tunnel, other gateway devices included in the first site are used together with the first gateway device to transmit the data stream, and more tunnels are selected for traffic forwarding. Through multi-channel parallel transmission, the transmission speed of the first data stream is improved while meeting the bandwidth condition.
[0171] In case 12, the third tunnels included in the third tunnel group are all normal, and the first gateway device determines that the third tunnel can send data flows.
[0172] In the embodiment of the present application, the first gateway device does not enable the backup tunnel group, but enables the main tunnel group (i.e., the third tunnel group) corresponding to the second gateway device, and sends the first data stream to the second gateway device, and the second gateway device uses the first WAN port to send the first data stream to the second site through the third tunnel group passing through the first WAN. The gateway device at the second site receives the first data stream sent by the first gateway device through the third tunnel group. In the event of an abnormality in the first tunnel group, other main tunnel groups with higher priorities are first determined, and data streams are sent through other main tunnel groups to save network resources and reduce the cost of transmitting data streams.
[0173] Case 13: Part of the third tunnel included in the third tunnel group is normal, and the first gateway device determines that part of the third tunnel can send data streams. At this time, the first gateway device does not enable the backup tunnel group, and still sends the first data stream to the second gateway device. The second gateway device uses the first WAN port to send the first data stream to the second site through the normal third tunnel included in the third tunnel group.
[0174] The second gateway device sends the first data stream to the second site through the first tunnel group in step S21, and details thereof may be referred to, and will not be repeated here.
[0175] In combination with the above description, when the first site includes multiple gateway devices, see Figure 4 , which is a third flow chart of the data transmission method provided in an embodiment of the present application, the above-mentioned data transmission method may include the following steps.
[0176] Step S41, sending a first data flow to a second site through a first tunnel group, wherein the first tunnel group includes a tunnel between a first gateway device and a gateway device included in the second site via a first WAN, which is the same as the above step S21.
[0177] Step S42: Send the second data stream to the third site through the fifth tunnel group, where the fifth tunnel group includes a tunnel between the first gateway device and the gateway device included in the third site via the first WAN.
[0178] Step S43, when all tunnels included in the first tunnel group are abnormal, determine the status of the tunnels included in the third tunnel group, where the third tunnel group includes the tunnels between the second gateway device included in the first site and the gateway device included in the second site through the first WAN. This is the same as the above step S32. According to the status of the third tunnel group, execute step S44 or step S45.
[0179] Step S44: When it is determined that the tunnels included in the third tunnel group are normal, the first data stream is sent to the second gateway device, so that the second gateway device sends the first data stream to the second site through the third tunnel group.
[0180] Step S45: When it is determined that all the tunnels included in the third tunnel group are abnormal, a minimum value of the first bandwidth for carrying data flows of the first tunnel group and the preset bandwidth corresponding to the second tunnel group is obtained.
[0181] Step S46, determining whether the minimum value is less than the available bandwidth of the second tunnel group, if so, executing step S47; if not, executing step S48.
[0182] Step S47: Send the first data flow to the second site through the second tunnel group.
[0183] Step S48: Send the first data stream to the second site through the second tunnel group and the fourth tunnel group, where the fourth tunnel group includes a tunnel between the second gateway device and the gateway device included in the second site via the second WAN.
[0184] The above steps S41 to S48 can be specifically referred to above Figure 2~Figure 3 The execution order of step S42 and step S41 is not limited here.
[0185] In the technical solution provided in the embodiment of the present application, a tunnel group is used to control the backup tunnel group. When all the tunnels included in the first tunnel group are abnormal, the first gateway device preferentially transmits the data stream through the third tunnel group (i.e., the main tunnel group). When it is determined that all the main tunnel groups are abnormal, the second tunnel group (i.e., the backup tunnel group) is used to continue to transmit the data stream, thereby ensuring the stability of the service. Compared with the control of the backup tunnel group through the WAN port in the related art, in the embodiment of the present application, the control granularity of the silent setting in the cold standby technology is reduced, the problem of coarse control granularity is solved, and the main tunnel group with lower cost is used as much as possible to transmit data, so as to reduce the cost of transmitting data streams.
[0186] In addition, when the available bandwidth of the second tunnel group meets the bandwidth conditions, the situation of crossing the tunnel is reduced, the interaction between the gateway devices is reduced, and the transmission speed and efficiency of the data flow are improved. When the available bandwidth of the second tunnel group does not meet the bandwidth conditions, by crossing the tunnel, other gateway devices included in the first site are used together with the first gateway device to transmit the data flow, and more tunnels are selected for traffic forwarding. Through multi-channel parallel transmission, while meeting the bandwidth conditions, the transmission speed of the first data flow is improved, and more flexible data transmission is achieved in the multi-gateway scenario.
[0187] In some embodiments, the first gateway device can automatically configure the priority of the tunnel, see Figure 5 , which is a flow chart of a priority configuration method provided in an embodiment of the present application, may include the following steps.
[0188] Step S51: receiving the identifier of the target tunnel sent by the controller.
[0189] Step S52: Determine the target priority configuration information corresponding to the WAN indicated by the target tunnel according to the pre-stored correspondence between the WAN and the priority configuration information.
[0190] Step S53: Set the target priority configuration information as the attribute information of the target tunnel.
[0191] In the technical solution provided in the embodiment of the present application, unified configuration and deployment are performed based on the controller. It is only necessary to determine the correspondence between WAN and priority, and determine the WAN passed through according to the target tunnel, so as to configure the priority for the target tunnel and add the target tunnel to the cold standby strategy without configuring each tunnel one by one. This improves the configuration efficiency of the cold standby strategy and facilitates subsequent maintenance.
[0192] In the above step S51, the controller can be an electronic device such as a computer or a server, or a software defined network (SDN) controller, etc., and the following description will take the SDN controller as an example. The target tunnel is a tunnel that needs to be configured with a priority, that is, a tunnel that needs to use a cold standby strategy. The tunnel identifier (Identifier, ID) is used to distinguish different tunnels. The tunnel identifier may include a site (Site) ID, a gateway device (Dev) ID, an interface (If) ID (i.e., a WAN port ID), and a management Internet Protocol (IP) address (i.e., a system (Sys) IP address), etc. The content included in the tunnel identifier is not limited here. The first gateway device receives the identifier of the target tunnel issued by the SDN controller, and determines the target tunnel that needs to be configured with a priority from all established tunnels.
[0193] In the above step S52, the priority configuration information includes the priority of the WAN and the primary and backup strategies of the tunnels passing through the WAN. In the embodiment of the present application, the priority of the WAN can be represented by a numerical value. For example, the priority can be represented as 20, 30, etc. The larger the numerical value, the higher the priority. The priority of the WAN can be represented by words such as high and low, which are not limited. The primary and backup strategies indicate that the tunnel is a primary tunnel or a backup tunnel. The content included in the priority configuration information is not limited here.
[0194] The WAN indicated by the target tunnel is the WAN through which the target tunnel passes. Taking the priority configuration information including the priority of the WAN and the primary and backup policies of the tunnel passing through the WAN as an example, the target priority configuration information includes the priority of the WAN through which the target tunnel passes (that is, the priority of the target tunnel) and the primary and backup policies of the target tunnel (that is, whether the target tunnel is the primary tunnel or the backup tunnel).
[0195] The first gateway device determines the target tunnel according to the identifier of the target tunnel, and then determines the WAN through which the target tunnel passes as the WAN indicated by the target tunnel. The first gateway device searches for the correspondence between the preset stored WAN and the priority configuration information, obtains the correspondence including the WAN indicated by the target tunnel, and uses the priority configuration information included in the obtained correspondence as the target priority configuration information.
[0196] Afterwards, the first gateway device executes step S53 to set the target priority configuration information as the attribute information of the target tunnel, that is, to set the priority and primary backup strategy of the target tunnel as the attribute information of the target tunnel. When the backup strategy (cold backup strategy) is subsequently implemented according to the priority, the first gateway device can determine the priority and primary backup strategy of the tunnel according to the attribute information of each tunnel to implement tunnel selection.
[0197] In an embodiment of the present application, the first gateway device may, during the process of establishing the tunnel, determine the priority of the tunnel and set attribute information for the tunnel according to the indicated WAN through the above steps S51 to S53; the first gateway device may also execute the above steps S51 to S53 after the tunnel is established, determine the priority of the tunnel according to the indicated WAN, add the target tunnel to the primary-backup strategy, and set attribute information for the tunnel, without limitation.
[0198] In an embodiment of the present application, the priority configuration information may also include outbound speed limit information and inbound speed limit information of the tunnel passing through the WAN. The outbound speed limit information may include the outbound CIR, etc., and the inbound speed limit information may include the inbound CIR, etc. The contents of the outbound speed limit information and the inbound speed limit information are not limited here.
[0199] In this case, the target priority configuration information includes the priority, primary and backup strategies, outbound speed limit information, and inbound speed limit information of the target tunnel, and the first gateway device can set the priority, primary and backup strategies, outbound speed limit information, and inbound speed limit information of the target tunnel as the attribute information of the target tunnel. Furthermore, the first gateway device can determine the priority, primary and backup strategies, and preset bandwidth of the tunnel based on the attribute information.
[0200] In an embodiment of the present application, the first gateway device can design a configuration command template, and fill in the configuration command template according to the identifier of the target tunnel and the target priority configuration information, obtain the configuration command corresponding to the target tunnel, and set the attribute information of the target tunnel according to the configuration command.
[0201] Taking the priority configuration information including the priority of the WAN, the primary and backup strategies of the tunnel passing through the WAN, the outbound speed limit information and the inbound speed limit information as an example, the configuration command template may include the following fields: target tunnel identification field, primary and backup strategy field, priority field, inbound speed limit field and outbound speed limit field. The fields included in the configuration command template are not limited here.
[0202] The target tunnel identification field includes a field name (expressed as tte-policy destination) and field content. The field content is used to fill in the target tunnel identification sent by the controller. For example, the target tunnel identification includes the site ID (i.e. SiteID), gateway device ID (i.e. DevID), interface (i.e. IfID) ID, and system IP address (i.e. SysIP). The field content is expressed as SiteID / DevID / IfID / SysIP.
[0203] The primary-backup strategy field is used to indicate the primary-backup strategy of the target tunnel indicated by the target tunnel identification field, that is, whether the target tunnel is a primary tunnel (active) or a backup tunnel (standby). The primary-backup strategy field is expressed as {active|standby}.
[0204] The priority field includes a field name (expressed as Priority) and field content. The field content is used to fill in the priority of the target tunnel indicated by the target tunnel identification field. In the embodiment of the present application, the priority is based on cost, and the field content is expressed as cost.
[0205] The inbound rate limit field includes a field name (expressed as lr-inbound cir) and field content (expressed as CIR). For example, if the inbound rate limit information is the inbound CIR, the field content is used to fill in the inbound CIR of the target tunnel indicated by the target tunnel identifier field.
[0206] The outbound rate limit field includes a field name (expressed as lr-outbound cir) and field content (expressed as CIR). For example, if the outbound rate limit information is the outbound CIR, the field content is used to fill in the outbound CIR of the target tunnel indicated by the target tunnel identifier field.
[0207] Based on the above description, the configuration command template is: tte-policy destination SiteID / DevID / IfID / SysIP {active|standby} Priority cost lr-inbound cir CIR lr-outbound cirCIR.
[0208] After the first gateway device determines the target priority configuration information, it fills the target tunnel identifier, priority, inbound CIR and outbound CIR included in the target priority configuration information into the field content of the target tunnel identifier field, the field content of the priority field, the field content of the inbound speed limit field and the field content of the outbound speed limit field respectively, and determines the primary and backup policy fields (that is, determines whether the primary and backup policy fields are active or standby) according to the primary and backup policies included in the target priority configuration information, and generates a configuration command corresponding to the target tunnel.
[0209] For example, when the target tunnel's identifier includes the site ID, gateway device ID, interface ID and system IP address which are 2, 1, 3 and 10.10.10.2 respectively, the target tunnel is a backup tunnel, the priority is 20, and the inbound CIR and outbound CIR are both 1000, the first gateway device generates the corresponding configuration command for the target tunnel: tte-policy destination 2 / 1 / 3 / 10.10.10.2 standby Priority 20 lr-inbound cir 1000 lr-outbound cir 1000.
[0210] The first gateway device determines the target tunnel according to the identifier of the target tunnel in the generated configuration command, and configures the attribute information of the target tunnel according to the primary and backup strategy fields, the priority field, the inbound speed limit field, and the outbound speed limit field.
[0211] Below through Figure 6~Figure 10 The data transmission scenario shown and Fig.11 The data transmission system shown provides a detailed description of the data transmission method provided in the embodiment of the present application.
[0212] Figure 6The first schematic diagram of the data transmission scenario provided for the embodiment of the present application. In the data transmission scenario, there is a headquarters site and two branch sites (i.e., branch 1 site and branch 2 site), the headquarters site includes three gateway devices, i.e., gateway device H1, gateway device H2, and gateway device H3, branch 1 site includes two gateway devices, i.e., gateway device S11 and gateway device S12, and branch 2 site includes two gateway devices, i.e., gateway device S21 and gateway device S22.
[0213] Figure 6 In the data transmission scenario shown, transmission network 1 includes a WAN (ie, WAN1), and transmission network 2 includes a WAN (ie, WAN2), and the priority WAN1>WAN2. For the headquarters site, the above system includes 7 tunnel groups, namely T1~T7.
[0214] Among them, T1 is a tunnel group between the gateway device H1 and the branch 1 site through WAN1, including the tunnel TTE1 between the gateway device H1 and the gateway device S11 and the tunnel TTE2 between the gateway device H1 and the gateway device S12.
[0215] T2 is a tunnel group between the gateway device H2 and the branch 1 site via WAN1, including a tunnel TTE3 between the gateway device H2 and the gateway device S11 and a tunnel TTE4 between the gateway device H2 and the gateway device S12.
[0216] T3 is a tunnel group between the gateway device H1 and the branch 2 site via WAN1, including a tunnel TTE5 between the gateway device H1 and the gateway device S21 and a tunnel TTE6 between the gateway device H1 and the gateway device S22.
[0217] T4 is a tunnel group between the gateway device H1 and the branch 1 site via WAN2, including a tunnel TTE7 between the gateway device H1 and the gateway device S11 and a tunnel TTE8 between the gateway device H1 and the gateway device S12.
[0218] T5 is a tunnel group between the gateway device H2 and the branch 1 site via WAN2, including a tunnel TTE9 between the gateway device H2 and the gateway device S11 and a tunnel TTE10 between the gateway device H2 and the gateway device S12.
[0219] T6 is a tunnel group between the gateway device H3 and the branch 1 site via WAN2, including a tunnel TTE11 between the gateway device H3 and the gateway device S11 and a tunnel TTE12 between the gateway device H3 and the gateway device S12.
[0220] T7 is a tunnel group between the gateway device H3 and the branch 2 site via WAN2, including a tunnel TTE13 between the gateway device H3 and the gateway device S21 and a tunnel TTE14 between the gateway device H3 and the gateway device S22.
[0221] In this network, the tunnel group passing through WAN1 (i.e., T1, T2, and T3) is the main tunnel group and is in the enabled state; the tunnel group passing through WAN2 (i.e., T4, T5, T6, and T7) is the backup tunnel group and is in the silent state. In other words, WAN1 is the first WAN and WAN2 is the second WAN.
[0222] During downlink data transmission, take the example of the gateway device H1 at the headquarters site receiving the data stream from the LAN side. The gateway device H1 (i.e., the first gateway device) at the headquarters site (i.e., the first site) receives data stream 1 (i.e., the first data stream) and data stream 2 (i.e., the second data stream) from the LAN side through its own LAN port. The destination site of data stream 1 is the branch 1 site (i.e., the second site), and the destination site of data stream 2 is the branch 2 site (i.e., the third site).
[0223] Gateway device H1 uses the TTE1 tunnel and TTE2 tunnel included in the T1 tunnel group (i.e., the first tunnel group) to send data stream 1 to gateway devices S11 and S12 included in branch 1 site in a load balancing manner. Gateway device H1 uses the TTE5 tunnel and TTE6 tunnel included in the T3 tunnel group (i.e., the fifth tunnel group) to send data stream 2 to gateway devices S21 and S22 included in branch 2 site in a load balancing manner.
[0224] For example, gateway device H1 sends data stream 1 to branch 1. When sending data stream 1, gateway device H1 collects information about TTE1 tunnel and TTE2 tunnel through iNQA to determine whether TTE1 tunnel and TTE2 tunnel are disconnected (that is, whether they are abnormal).
[0225] When the gateway device H1 determines that one of the TTE1 tunnel and the TTE2 tunnel is disconnected, taking the disconnection of the TTE1 tunnel as an example, the gateway device H1 sends data stream 1 to the gateway device S12 at the branch 1 site through the TTE2 tunnel.
[0226] When gateway device H1 determines that both TTE1 tunnel and TTE2 tunnel are disconnected, gateway device H1 determines the main tunnel group between other gateway devices (such as gateway device H2 and gateway device H3) included in the headquarters site and branch 1 site, such as the T2 tunnel group (i.e., the third tunnel group) corresponding to gateway device H2. Gateway device H1 sends data stream 1 to gateway device H2, and gateway device H2 sends data stream 1 to gateway devices S11 and S12 included in branch 1 site through TTE3 tunnel and TTE4 tunnel included in T2 tunnel group in a load balancing manner.
[0227] At this time, since the WAN port corresponding to WAN1 on gateway device H1 functions normally and the traffic of T3 tunnel group is also normal (that is, T3 tunnel group can transmit data flow normally), gateway device H1 can continue to send data flow 2 to branch 2 site through T3 tunnel group without enabling T7 tunnel group.
[0228] When gateway device H1 determines that all tunnels included in the T2 tunnel group are disconnected, gateway device H1 determines whether the bandwidth of the T4 tunnel group (backup tunnel group) established by itself meets the bandwidth requirement. When the bandwidth of the T4 tunnel group meets the bandwidth requirement, gateway device H1 enables the T4 tunnel group (i.e., the second tunnel group). Gateway device H1 sends data stream 1 to gateway devices S11 and S12 at branch 1 site in a load balancing manner through the TTE7 tunnel and TTE8 tunnel included in the T4 tunnel group.
[0229] When the bandwidth of the T4 tunnel group does not meet the bandwidth requirement, the gateway device H1 determines the backup tunnel groups between other gateway devices (such as the gateway device H2 and the gateway device H3) included in the headquarters site and the branch 1 site, such as the T5 tunnel group and the T6 tunnel group (ie, the fourth tunnel group).
[0230] Gateway device H1 determines the tunnels that meet the preset link quality conditions from the T5 and T6 tunnel groups, such as TTE9 and TTE11. Gateway device H1 sends data stream 1 to gateway devices S11 and gateway devices S12 at branch 1 site in a load balancing manner through TTE7, TTE8, TTE9 and TTE11 tunnels.
[0231] Figure 7 This is a second schematic diagram of a data transmission scenario provided in an embodiment of the present application. Figure 6 Based on the data transmission scenario shown, for the branch 1 site, the above system includes 4 tunnel groups, namely T8~T11.
[0232] T8 is a tunnel group between the gateway device S11 and the headquarters site through WAN1, including TTE1 and TTE3.
[0233] T9 is a tunnel group between the gateway device S12 and the headquarters site through WAN1, including TTE2 and TTE4.
[0234] T10 is a tunnel group between the gateway device S11 and the headquarters site through WAN2, including TTE7, TTE9 and TTE11.
[0235] T11 is a tunnel group between the gateway device S12 and the headquarters site through WAN2, including TTE8, TTE10 and TTE12.
[0236] In this network, the tunnel group passing through WAN1 (i.e., T8 and T9) is the main tunnel group and is in the enabled state; the tunnel group passing through WAN2 (i.e., T10 and T11) is the backup tunnel group and is in the silent state. In other words, WAN1 is the first WAN and WAN2 is the second WAN.
[0237] During uplink data transmission, take the example of the gateway device S11 at branch 1 sending a data stream to the headquarters site. The gateway device S11 (i.e., the first gateway device) at branch 1 site (i.e., the first site) receives data stream 3 (i.e., the first data stream) from the LAN side through its own LAN port, and the destination site of data stream 3 is the headquarters site.
[0238] The gateway device S11 sends data stream 3 to the gateway devices H1 and H2 at the headquarters site (ie, the second site) through the tunnel group T8 including the TTE1 tunnel and the TTE3 tunnel (ie, the first tunnel group) in a load balancing manner.
[0239] When sending data stream 3, gateway device S11 collects information of T8 tunnel group through iNQA to determine whether TTE1 tunnel and TTE3 tunnel are disconnected (ie, whether they are abnormal).
[0240] When the gateway device S11 determines that one of the TTE1 tunnel and the TTE3 tunnel is disconnected, taking the disconnection of the TTE1 tunnel as an example, the gateway device S11 sends the data stream 3 to the gateway device H2 at the headquarters site through the TTE3 tunnel.
[0241] When the gateway device S11 determines that the TTE1 tunnel and the TTE3 tunnel are both disconnected, the gateway device S11 determines the main tunnel group between other gateway devices (such as the gateway device S12) included in the branch 1 site and the headquarters site, such as the T9 tunnel group (i.e., the third tunnel group) corresponding to the gateway device S12. The gateway device S11 sends the data stream 3 to the gateway device S12, and the gateway device S12 sends the data stream 3 to the gateway devices H1 and H2 at the headquarters site through the TTE2 tunnel and the TTE4 tunnel included in the T9 tunnel group in a load balancing manner.
[0242] When the gateway device S11 determines that all tunnels included in the T9 tunnel group are disconnected, that is, the gateway device S11 determines that the main tunnel groups (that is, the T8 tunnel group and the T9 tunnel group) that transmit data streams to the headquarters site are disconnected, the gateway device S11 determines whether the bandwidth of the T10 tunnel group (backup tunnel group) established by itself meets the bandwidth requirement.
[0243] When the bandwidth of the T10 tunnel group meets the bandwidth requirement, the gateway device S11 activates the T10 tunnel group (i.e., the second tunnel group). The gateway device S11 sends data stream 3 to the gateway devices H1 to H3 at the headquarters site through the TTE7 tunnel, TTE9 tunnel, and TTE11 tunnel included in the T10 tunnel group in a load balancing manner.
[0244] When the bandwidth of the T10 tunnel group does not meet the bandwidth requirement, the gateway device S11 determines a backup tunnel group between other gateway devices (such as the gateway device S12) included in the branch 1 site and the headquarters site, such as the T11 tunnel group (ie, the fourth tunnel group).
[0245] Gateway device S11 determines tunnels that meet preset link quality conditions from the T11 tunnel group, such as TTE10 and TTE12, and sends data stream 3 to gateway devices H1 to H3 at the headquarters site through TTE7, TTE9, TTE10, TTE11 and TTE12 tunnels.
[0246] For ease of description, Figure 8~Figure 10 The following takes the data flow transmission between the headquarters site and branch 1 site as an example. Figure 8~Figure 10 The data transmission scenario shown omits the branch 2 site and the tunnel between the branch 2 site and the headquarters site.
[0247] Figure 8 A third schematic diagram of a data transmission scenario provided in an embodiment of the present application. Figure 8 In the data transmission scenario shown, transmission network 1 includes one WAN (ie, WAN1), and transmission network 2 includes two WANs (ie, WAN2 and WAN3), and the priority is WAN1>WAN2>WAN3.
[0248] For the headquarters site, the above system includes five tunnel groups, namely T21~T25.
[0249] Among them, T21 is a tunnel group between the gateway device H1 and the branch 1 site through WAN1, including the tunnel TTE21 between the gateway device H1 and the gateway device S11 and the tunnel TTE22 between the gateway device H1 and the gateway device S12.
[0250] T22 is a tunnel group between the gateway device H2 and the branch 1 site via WAN1, including a tunnel TTE23 between the gateway device H2 and the gateway device S11 and a tunnel TTE24 between the gateway device H2 and the gateway device S12.
[0251] T23 is a tunnel group between the gateway device H1 and the branch 1 site via WAN2, including a tunnel TTE25 between the gateway device H1 and the gateway device S11 and a tunnel TTE26 between the gateway device H1 and the gateway device S12.
[0252] T24 is a tunnel group between the gateway device H2 and the branch 1 site via WAN2, including a tunnel TTE27 between the gateway device H2 and the gateway device S11 and a tunnel TTE28 between the gateway device H2 and the gateway device S12.
[0253] T25 is a tunnel group between the gateway device H3 and the branch 1 site via WAN3, including a tunnel TTE29 between the gateway device H3 and the gateway device S11 and a tunnel TTE210 between the gateway device H3 and the gateway device S12.
[0254] In this network, the tunnel group passing through WAN1 (i.e., T21 and T22) is the main tunnel group and is in the enabled state; the tunnel group passing through WAN2 and WAN3 (i.e., T23, T24, and T25) is the backup tunnel group and is in the silent state. In the initial state, WAN1 is the first WAN and WAN2 is the second WAN.
[0255] During downlink data transmission, take the example of the gateway device H1 at the headquarters site receiving the data stream on the LAN side. The gateway device H1 (i.e., the first gateway device) at the headquarters site (i.e., the first site) receives data stream 4 from the LAN side through its own LAN port, and the destination site of data stream 4 is the branch 1 site (i.e., the second site). The gateway device H1 uses the TTE21 tunnel and TTE22 tunnel included in the T21 tunnel group (i.e., the first tunnel group) to send data stream 4 to the gateway devices S11 and S12 included in the branch 1 site in a load balancing manner.
[0256] When gateway device H1 determines that all tunnels included in tunnel groups T21 and T22 are disconnected, if the bandwidth of tunnel group T23 does not meet the bandwidth requirement, gateway device H1 determines the highest priority available backup tunnel group between other gateway devices (such as gateway device H2 and gateway device H3) included in the headquarters site and branch 1 site, such as T24 tunnel group (i.e., the fourth tunnel group).
[0257] Gateway device H1 determines a tunnel that meets the preset link quality condition from the T24 tunnel group, such as TTE27. Gateway device H1 sends data stream 4 to gateway devices S11 and S12 at branch 1 site in a load balancing manner through tunnels TTE25, TTE26 and TTE27.
[0258] Afterwards, gateway device H1 can use WAN2 as the new first WAN and WAN3 as the new second WAN to re-execute data transmission. For example, when all tunnels included in the T23 and T24 tunnel groups are disconnected, gateway device H1 determines the highest priority available backup tunnel group between other gateway devices (such as gateway device H2 and gateway device H3) included in the headquarters site and branch 1 site, such as T25 tunnel group. Gateway device H1 sends data stream 4 to gateway devices S11 and S12 at branch 1 site through the T25 tunnel group including TTE29 and TTE210 tunnels in a load balancing manner.
[0259] When the gateway device H1 determines that the T21 and T22 tunnel groups are restored to normal, such as when all or part of the tunnels included in the T21 and T22 tunnel groups are restored to normal, the gateway device H1 can use WAN1 as a new first WAN and WAN2 as a new second WAN to re-execute data transmission.
[0260] Figure 8 The description of the part is relatively simple. For details, please refer to the above Figure 6 In addition, Figure 8 In the data transmission scenario shown, the uplink data transmission process is similar to the downlink data transmission process and will not be described in detail here.
[0261] Fig. 9 A fourth schematic diagram of a data transmission scenario provided in an embodiment of the present application. Fig. 9 In the data transmission scenario shown, transmission network 1 includes two WANs (ie, WAN1 and WAN2), transmission network 2 includes one WAN (ie, WAN3), and the priority WAN1=WAN2>WAN3.
[0262] For the headquarters site, the above system includes five tunnel groups, namely T31~T35.
[0263] Among them, T31 is a tunnel group between the gateway device H1 and the branch 1 site through WAN1, including the tunnel TTE31 between the gateway device H1 and the gateway device S11 and the tunnel TTE32 between the gateway device H1 and the gateway device S12.
[0264] T32 is a tunnel group between the gateway device H2 and the branch 1 site via WAN1, including a tunnel TTE33 between the gateway device H2 and the gateway device S11 and a tunnel TTE34 between the gateway device H2 and the gateway device S12.
[0265] T33 is a tunnel group between the gateway device H3 and the branch 1 site via WAN2, including a tunnel TTE35 between the gateway device H3 and the gateway device S11 and a tunnel TTE36 between the gateway device H3 and the gateway device S12.
[0266] T34 is a tunnel group between the gateway device H1 and the branch 1 site via WAN3, including a tunnel TTE37 between the gateway device H1 and the gateway device S11 and a tunnel TTE38 between the gateway device H1 and the gateway device S12.
[0267] T35 is a tunnel group between the gateway device H2 and the branch 1 site via WAN3, including a tunnel TTE39 between the gateway device H2 and the gateway device S11 and a tunnel TTE310 between the gateway device H2 and the gateway device S12.
[0268] In this network, the tunnel group passing through WAN1 and WAN2 (i.e., T31, T32, and T33) is the main tunnel group and is in the enabled state; the tunnel group passing through WAN3 (i.e., T34 and T35) is the backup tunnel group and is in the silent state. In other words, WAN1 and WAN2 are the first WAN, and WAN3 is the second WAN.
[0269] During downlink data transmission, take the example of the gateway device H1 at the headquarters site receiving the data stream on the LAN side. The gateway device H1 (i.e., the first gateway device) at the headquarters site (i.e., the first site) receives data stream 5 (i.e., the first data stream) from the LAN side through its own LAN port, and the destination site of data stream 5 is the branch 1 site (i.e., the second site). The gateway device H1 sends data stream 5 to the gateway devices S11 and S12 included in the branch 1 site through the TTE31 tunnel and TTE32 tunnel included in the T31 tunnel group (i.e., the first tunnel group) in a load balancing manner.
[0270] When gateway device H1 determines that both TTE31 tunnel and TTE32 tunnel are disconnected, gateway device H1 determines the main tunnel group between other gateway devices (such as gateway device H2 and gateway device H3) included in the headquarters site and branch 1 site, such as T32 tunnel group (i.e., the third tunnel group) corresponding to gateway device H2 and T33 tunnel group (i.e., the third tunnel group) corresponding to gateway device H3. Gateway device H1 uses load balancing to send data stream 5 to gateway devices H2 and H3. Gateway device H2 uses TTE33 tunnel and TTE34 tunnel included in T32 tunnel group to send data stream 5 to gateway devices S11 and S12 included in branch 1 site in load balancing. Gateway device H3 uses TTE35 tunnel and TTE36 tunnel included in T33 tunnel group to send data stream 5 to gateway devices S11 and S12 included in branch 1 site in load balancing.
[0271] When the gateway device H1 determines that all tunnels included in the T32 and T33 tunnel groups are disconnected, the gateway device H1 starts to enable the backup tunnel group.
[0272] Fig. 9 The description of the part is relatively simple. For details, please refer to the above Figure 6 In addition, Fig. 9 In the data transmission scenario shown, the uplink data transmission process is similar to the downlink data transmission process and will not be described in detail here.
[0273] exist Fig. 9 In the data transmission scenario shown, WAN1 priority can also be greater than WAN2. The tunnel group passing through WAN1 (i.e., T31 and T32) is the primary tunnel group and is in the enabled state; the tunnel group passing through WAN2 and WAN3 (i.e., T33, T34, and T35) is the backup tunnel group and is in the silent state. The corresponding data transmission process is similar to Figure 6 and Figure 8 Some of the data transmission processes are similar and will not be repeated here.
[0274] Fig.10 A fifth schematic diagram of a data transmission scenario provided in an embodiment of the present application. Fig.10 In the data transmission scenario shown, transmission network 1 includes two WANs (ie, WAN1 and WAN2), transmission network 2 includes two WANs (ie, WAN3 and WAN4), and the priority WAN1=WAN2>WAN3>WAN4.
[0275] For the headquarters site, the above system includes six tunnel groups, namely T41~T46.
[0276] Among them, T41 is a tunnel group between the gateway device H1 and the branch 1 site through WAN1, including a tunnel TTE41 between the gateway device H1 and the gateway device S11 and a tunnel TTE42 between the gateway device H1 and the gateway device S12.
[0277] T42 is a tunnel group between the gateway device H2 and the branch 1 site via WAN1, including a tunnel TTE43 between the gateway device H2 and the gateway device S11 and a tunnel TTE44 between the gateway device H2 and the gateway device S12.
[0278] T43 is a tunnel group between the gateway device H3 and the branch 1 site via WAN2, including a tunnel TTE45 between the gateway device H3 and the gateway device S11 and a tunnel TTE46 between the gateway device H3 and the gateway device S12.
[0279] T44 is a tunnel group between the gateway device H1 and the branch 1 site via the WAN3, including a tunnel TTE47 between the gateway device H1 and the gateway device S11 and a tunnel TTE48 between the gateway device H1 and the gateway device S12.
[0280] T45 is a tunnel group between the gateway device H2 and the branch 1 site via WAN3, including a tunnel TTE49 between the gateway device H2 and the gateway device S11 and a tunnel TTE410 between the gateway device H2 and the gateway device S12.
[0281] T46 is a tunnel group between the gateway device H3 and the branch 1 site via WAN4, including a tunnel TTE411 between the gateway device H3 and the gateway device S11 and a tunnel TTE412 between the gateway device H3 and the gateway device S12.
[0282] In this network, the tunnel group passing through WAN1 and WAN2 (i.e., T41, T42, and T43) is the main tunnel group and is in the enabled state; the tunnel group passing through WAN3 and WAN4 (i.e., T44, T45, and T46) is the backup tunnel group and is in the silent state. In the initial state, WAN1 and WAN2 are the first WAN, and WAN3 is the second WAN.
[0283] During downlink data transmission, take the example of the gateway device H1 at the headquarters site receiving the data stream on the LAN side. The gateway device H1 (i.e., the first gateway device) at the headquarters site (i.e., the first site) receives data stream 6 (i.e., the first data stream) from the LAN side through its own LAN port, and the destination site of data stream 6 is the branch 1 site (i.e., the second site). The gateway device H1 sends data stream 6 to the gateway devices S11 and S12 included in the branch 1 site through the TTE41 tunnel and TTE42 tunnel included in the T41 tunnel group (i.e., the first tunnel group) in a load balancing manner.
[0284] When gateway device H1 determines that both TTE41 tunnel and TTE42 tunnel are disconnected, gateway device H1 determines the main tunnel group between other gateway devices (such as gateway device H2 and gateway device H3) included in the headquarters site and branch 1 site, such as T42 tunnel group (i.e., the third tunnel group) corresponding to gateway device H2 and T43 tunnel group (i.e., the third tunnel group) corresponding to gateway device H3. Gateway device H1 uses load balancing to send data stream 6 to gateway devices H2 and H3. Gateway device H2 uses load balancing to send data stream 6 to gateway devices S11 and S12 included in branch 1 site through TTE43 tunnel and TTE44 tunnel included in T42 tunnel group; gateway device H3 uses load balancing to send data stream 6 to gateway devices S11 and S12 included in branch 1 site through TTE45 tunnel and TTE46 tunnel included in T43 tunnel group.
[0285] When gateway device H1 determines that all tunnels included in the T42 and T43 tunnel groups are disconnected, if the bandwidth of the T44 tunnel group does not meet the bandwidth requirement, gateway device H1 determines the highest priority available backup tunnel group between other gateway devices (such as gateway device H2 and gateway device H3) included in the headquarters site and the branch 1 site, such as the T45 tunnel group (i.e., the fourth tunnel group).
[0286] Gateway device H1 determines a tunnel that meets the preset link quality condition from the T45 tunnel group, such as TTE49, and sends data stream 6 to gateway devices S11 and S12 at branch 1 site in a load balancing manner through tunnels TTE47, TTE48 and TTE49.
[0287] Afterwards, gateway device H1 can use WAN3 as the new first WAN and WAN4 as the new second WAN to re-execute data transmission. For example, when all tunnels included in the T44 and T45 tunnel groups are disconnected, gateway device H1 determines the highest priority available backup tunnel group between other gateway devices (such as gateway device H2 and gateway device H3) included in the headquarters site and branch 1 site, such as T46 tunnel group. Gateway device H1 sends data stream 6 to gateway devices S11 and S12 at branch 1 site through the T46 tunnel group including TTE411 and TTE412 tunnels in a load balancing manner.
[0288] When the gateway device H1 determines that the T41, T42 and T43 tunnel groups have returned to normal, such as when all or part of the tunnels included in the T41, T42 and T43 tunnel groups have returned to normal, the gateway device H1 can use WAN1 and WAN2 as the new first WAN and WAN3 as the new second WAN to re-execute data transmission.
[0289] Fig.10 The description of the part is relatively simple. For details, please refer to the above Figure 6~Figure 9 In addition, Fig.10 In the data transmission scenario shown, the uplink data transmission process is similar to the downlink data transmission process and will not be described in detail here.
[0290] exist Fig.10 In the data transmission scenario shown, WAN1 priority can also be greater than WAN2. The tunnel group passing through WAN1 (i.e., T41 and T42) is the primary tunnel group and is in the enabled state; the tunnel group passing through WAN2, WAN3, and WAN4 (i.e., T43~T46) is the backup tunnel group and is in the silent state. The corresponding data transmission process is similar to the data transmission process in part 6 of the figure, and will not be repeated here.
[0291] Figure 6~Figure 10 In the example, the communication protocol used by each WAN (i.e., the communication protocol of the data stream transmitted by the tunnel group) matches the transmitted data stream. In actual applications, there may be a situation where the communication protocol used by some WANs does not match the transmitted data stream. In this case, when transmitting the data stream, the WAN that does not match the communication protocol of the data stream can be ignored.
[0292] For example, Fig. 9 In the example, the gateway device H1 at the headquarters site receives data stream 7 from the LAN side through its own LAN port, and the destination site of data stream 7 is branch 1 site. The communication protocol of data stream 7 does not match the communication protocol used by WAN2.
[0293] The gateway device H1 sends the data stream 7 to the gateway devices S11 and S12 included in the branch 1 site in a load balancing manner through the TTE31 tunnel and the TTE32 tunnel included in the T31 tunnel group.
[0294] When the gateway device H1 determines that the TTE31 tunnel and the TTE32 tunnel are both disconnected, the gateway device H1 determines the main tunnel groups between other gateway devices (such as gateway devices H2 and gateway devices H3) included in the headquarters site and the branch 1 site, such as the T32 tunnel group (i.e., the third tunnel group) corresponding to the gateway device H2 and the T33 tunnel group (i.e., the third tunnel group) corresponding to the gateway device H3. Since the communication protocol used by WAN2 through the T33 tunnel group does not match the communication protocol of data stream 7, that is, the communication protocol of the T33 tunnel group does not match the communication protocol of data stream 7, the gateway device H1 sends the data stream 7 to the gateway device H2, and the gateway device H2 uses the TTE33 tunnel and TTE34 tunnel included in the T32 tunnel group to send the data stream 7 to the gateway devices S11 and S12 included in the branch 1 site in a load balancing manner. Here, the gateway device H1 will not send the data stream 7 to the gateway device H3.
[0295] Considering the matching of communication protocols, the correct transmission of data stream is guaranteed.
[0296] Fig.11 A second schematic diagram of a data transmission system provided in an embodiment of the present application. Fig.11 The data transmission system shown includes a headquarters site, three branch sites (i.e., branch 1 site, branch 2 site, and branch 3 site) and three transmission networks (i.e., MSTP transmission network, MPLS transmission network, and 5G transmission network). The headquarters site is a three-gateway site, including three gateway devices (i.e., gateway device H1, gateway device H2, and gateway device H3); branch 1 site, branch 2 site, and branch 3 site are dual-gateway sites, each including two gateway devices, i.e., branch 1 site includes gateway device S11 and gateway device S12, branch 2 site includes gateway device S21 and gateway device S22, and branch 3 site includes gateway device S31 and gateway device S32.
[0297] The MSTP transmission network includes one WAN (i.e., WAN1), the MPLS transmission network includes one WAN (i.e., WAN2), and the 5G transmission network includes two WANs (i.e., WAN3 and WAN4). In the 5G transmission network, the priority of the WAN can be further differentiated according to the gateway information of different operators, that is, the priority WAN1=WAN2>WAN3>WAN4 is determined.
[0298] Fig.11 In the example, the gateway device at the headquarters site and the gateway device at the branch site establish different tunnels and tunnel groups through different WANs. Among them, the tunnel passing through WAN1 and WAN2 is the main tunnel; the tunnel passing through WAN3 and WAN4 is the backup tunnel.
[0299] When the branch 3 site is connected to the data transmission system, one WAN port of the gateway device S31 of the branch 3 site is connected to WAN2, and one WAN port of the gateway device S32 is connected to WAN3. The gateway device S31 obtains the priority configuration information of WAN2, and further defines the properties of the tunnel between the gateway device S31 and the headquarters site via WAN2. As described above, the tunnel between the gateway device S31 and the headquarters site via WAN2 is defined as the main tunnel. The gateway device S32 obtains the priority configuration information of WAN3, and further defines the properties of the tunnel between the gateway device S32 and the headquarters site via WAN3. As described above, the tunnel between the gateway device S32 and the headquarters site via WAN3 is defined as the backup tunnel. The above two tunnels are added to the cold standby strategy accordingly.
[0300] In the embodiment of the present application, the minimum granularity of the backup tunnel and the priority of the backup tunnel are introduced, and the operation dimension is placed on the settings of the transmission network and the operator. All access devices (i.e., gateway devices) only need to confirm the network type accessed by the WAN port (i.e., the accessed transmission network and operator), and can complete the priority configuration of the backup tunnel of the entire network while deploying the tunnel. When the corresponding transmission network is accessed, the tunnel group is deployed together with the priority configuration, and the newly added gateway device (such as the gateway device included in the branch 3 site) can also be automatically added to the backup strategy. When any tunnel group is abnormal, the gateway device can switch autonomously according to the priority strategy.
[0301] In the technical solution provided by the embodiment of the present application, in a point-to-multipoint scenario, a unified operation deployment of the TTE tunnel can be performed based on the controller, and a fine-grained network tunnel backup strategy is provided to realize the backup tunnel of the gateway device's autonomous switching. It is suitable for multi-gateway scenarios and supports speed limiting to ensure that costs are controllable. While ensuring network forwarding security, it can save high-value bandwidth in general operation and maintenance. At the same time, the unified strategy is easy to deploy and maintain, reducing the risk of deployment errors.
[0302] Corresponding to the above-mentioned data transmission method, the embodiment of the present application also provides a data transmission device, such as Fig.12 , applied to a first gateway device included in a first site, the device comprising:
[0303] A first sending module 121, configured to send a first data stream to a second site through a first tunnel group, wherein the first tunnel group includes a tunnel between the first gateway device and a gateway device included in the second site via a first WAN;
[0304] The second sending module 122 is used to send the first data flow to the second site through the second tunnel group when all tunnels included in the first tunnel group are abnormal, the second tunnel group includes a tunnel between the first gateway device and the gateway device included in the second site via a second WAN, and the priority of the second WAN is lower than that of the first WAN.
[0305] In the technical solution provided in the embodiment of the present application, the first gateway device included in the first site establishes tunnel groups with the gateway device included in the second site through the first WAN and the second WAN, namely the first tunnel group and the second tunnel group. When the first gateway device sends a data stream to the gateway device included in the second site, the first tunnel group corresponding to the high-priority first WAN is used to transmit the data stream, and the second tunnel group corresponding to the low-priority second WAN is in a silent state, that is, the first tunnel group is the main tunnel group between the first gateway device and the second site, and the second tunnel group is the backup tunnel group between the first gateway device and the second site. When all the tunnels included in the first tunnel group are abnormal, the first gateway device activates the backup tunnel group between the first gateway device and the second site, and then uses the second tunnel group to continue transmitting the data stream, thereby ensuring the stability of the business.
[0306] One WAN port can establish multiple tunnel groups with multiple sites. In the embodiment of the present application, if one tunnel group is abnormal, only the backup tunnel group corresponding to the tunnel group needs to be enabled, and the backup tunnel groups corresponding to all tunnel groups under the WAN port corresponding to the tunnel group do not need to be enabled. Compared with the control of the backup tunnel group through the WAN port in the related art, the control granularity of the silent setting in the cold standby technology is reduced, the problem of coarse control granularity is solved, and the backup tunnel group can be flexibly used for data transmission.
[0307] In some embodiments, the first site further includes a second gateway device; the second sending module 122 is further configured to:
[0308] When all the tunnels included in the first tunnel group are abnormal, determine the status of the tunnels included in the third tunnel group, and the third tunnel group includes the tunnels between the second gateway device and the gateway device included in the second site passing through the first WAN; when it is determined that all the tunnels included in the third tunnel group are abnormal, execute the step of sending the first data flow to the second site through the second tunnel group.
[0309] In some embodiments, the second sending module 122 is further configured to:
[0310] When it is determined that the tunnels included in the third tunnel group are normal, the first data flow is sent to the second gateway device, so that the second gateway device sends the first data flow to the second site through the third tunnel group.
[0311] In some embodiments, the second sending module 122 is specifically configured to:
[0312] Obtain a minimum value between a first bandwidth of the first tunnel group for carrying data flows and a preset bandwidth corresponding to the second tunnel group, where the preset bandwidth is a maximum bandwidth that allows users to use the second tunnel group to transmit data flows;
[0313] If the minimum value is less than the available bandwidth of the second tunnel group, the first data flow is sent to the second site through the second tunnel group.
[0314] In some embodiments, the first site further includes a second gateway device; the second sending module 122 is further configured to:
[0315] If the minimum value is greater than or equal to the available bandwidth of the second tunnel group, the first data stream is sent to the second site through the second tunnel group and the fourth tunnel group, and the fourth tunnel group includes a tunnel between the second gateway device and the gateway device included in the second site via the second WAN.
[0316] In some embodiments, the second sending module 122 is specifically configured to:
[0317] Selecting a tunnel that meets a preset link quality condition from the tunnels included in the fourth tunnel group;
[0318] The first data flow is sent to the second site through the tunnels included in the second tunnel group and the selected tunnel.
[0319] In some embodiments, the apparatus further includes: a first determining module, configured to determine the first bandwidth, specifically configured to:
[0320] A second bandwidth of data flows carried by all tunnels included in the first tunnel group within a statistical collection period;
[0321] The first bandwidth is obtained by calculating an average of the second bandwidth corresponding to a preset number of acquisition cycles.
[0322] In some embodiments, the apparatus further includes: a second determination module, configured to determine the available bandwidth, specifically configured to:
[0323] Acquire a third bandwidth of data flows carried by all tunnels currently included in the second tunnel group;
[0324] The difference between the highest bandwidth that the second tunnel group can carry the data flow and the third bandwidth is calculated to obtain the available bandwidth.
[0325] In some embodiments, the apparatus further includes a third sending module, configured to:
[0326] A second data stream is sent to a third site via a fifth tunnel group, wherein the fifth tunnel group includes a tunnel between the first gateway device and a gateway device included in the third site via the first WAN.
[0327] In some embodiments, the apparatus further comprises a configuration module, configured to:
[0328] The target tunnel identifier sent by the receiving controller;
[0329] Determine the target priority configuration information corresponding to the WAN indicated by the target tunnel according to the pre-stored correspondence between the WAN and the priority configuration information;
[0330] The target priority configuration information is set as attribute information of the target tunnel.
[0331] The present application also provides an electronic device, such as Fig.13 As shown, it includes a processor 131, a communication interface 132, a memory 133 and a communication bus 134, wherein the processor 131, the communication interface 132 and the memory 133 communicate with each other through the communication bus 134;
[0332] The memory 133 is used to store computer programs;
[0333] The processor 131 is configured to implement any of the above-mentioned data transmission methods when executing the program stored in the memory 133 .
[0334] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0335] The communication interface 132 is used for communication between the above electronic device and other devices.
[0336] The memory 133 may include a random access memory (RAM) or a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory 133 may also be at least one storage device located away from the processor 131 .
[0337] The above-mentioned processor 131 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0338] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned data transmission methods is implemented.
[0339] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the data transmission methods in the above embodiments.
[0340] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0341] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0342] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, storage medium, and program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The above is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A data transmission method, characterized in that: Applied to a first gateway device included in a first site, the method includes: Sending a first data stream to a second site through a first tunnel group, wherein the first tunnel group includes a tunnel between the first gateway device and a gateway device included in the second site via a first wide area network WAN; When all tunnels included in the first tunnel group are abnormal, the first data stream is sent to the second site through a second tunnel group, and the second tunnel group includes a tunnel between the first gateway device and the gateway device included in the second site via a second WAN, and the priority of the second WAN is lower than that of the first WAN.
2. The method according to claim 1, characterized in that The first site further includes a second gateway device; when all tunnels included in the first tunnel group are abnormal, the method further includes: Determining a state of a tunnel included in a third tunnel group, the third tunnel group including a tunnel between the second gateway device and a gateway device included in the second site via the first WAN; When it is determined that all the tunnels included in the third tunnel group are abnormal, the step of sending the first data flow to the second site through the second tunnel group is performed.
3. The method according to claim 2, characterized in that The method further comprises: When it is determined that the tunnels included in the third tunnel group are normal, the first data flow is sent to the second gateway device, so that the second gateway device sends the first data flow to the second site through the third tunnel group.
4. The method according to any one of claims 1 to 3, characterized in that: The step of sending the first data flow to the second site through the second tunnel group includes: Obtain a minimum value between a first bandwidth of the first tunnel group for carrying data flows and a preset bandwidth corresponding to the second tunnel group, where the preset bandwidth is a maximum bandwidth that allows users to use the second tunnel group to transmit data flows; If the minimum value is less than the available bandwidth of the second tunnel group, the first data flow is sent to the second site through the second tunnel group.
5. The method according to claim 4, characterized in that The first site also includes a second gateway device; the method also includes: If the minimum value is greater than or equal to the available bandwidth of the second tunnel group, the first data stream is sent to the second site through the second tunnel group and the fourth tunnel group, and the fourth tunnel group includes a tunnel between the second gateway device and the gateway device included in the second site via the second WAN.
6. The method according to claim 5, characterized in that The step of sending the first data flow to the second site through the second tunnel group and the fourth tunnel group includes: Selecting a tunnel that meets a preset link quality condition from the tunnels included in the fourth tunnel group; The first data flow is sent to the second site through the tunnels included in the second tunnel group and the selected tunnel.
7. The method according to claim 4, characterized in that The first bandwidth is determined by the following steps: A second bandwidth of data flows carried by all tunnels included in the first tunnel group within a statistical collection period; The first bandwidth is obtained by calculating an average of the second bandwidth corresponding to a preset number of acquisition cycles.
8. The method according to claim 4, characterized in that The available bandwidth is determined by the following steps: Acquire a third bandwidth of data flows carried by all tunnels currently included in the second tunnel group; The difference between the highest bandwidth that the second tunnel group can carry the data flow and the third bandwidth is calculated to obtain the available bandwidth.
9. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: A second data stream is sent to a third site via a fifth tunnel group, wherein the fifth tunnel group includes a tunnel between the first gateway device and a gateway device included in the third site via the first WAN.
10. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The target tunnel identifier sent by the receiving controller; Determine the target priority configuration information corresponding to the WAN indicated by the target tunnel according to the pre-stored correspondence between the WAN and the priority configuration information; The target priority configuration information is set as attribute information of the target tunnel.
11. A data transmission device, characterized in that: Applied to a first gateway device included in a first site, the apparatus includes: A first sending module, configured to send a first data stream to a second site through a first tunnel group, wherein the first tunnel group includes a tunnel between the first gateway device and a gateway device included in the second site via a first wide area network WAN; A second sending module is used to send the first data stream to the second site through a second tunnel group when all tunnels included in the first tunnel group are abnormal, the second tunnel group includes a tunnel between the first gateway device and the gateway device included in the second site via a second WAN, and the priority of the second WAN is lower than that of the first WAN.
12. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-10 when executing a program stored in a memory.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Multi-CPE (customer premise equipment) redundant link system and method
CN106788921A
Method for establishing tunnel between local gateways, and gateway
CN109314903A
