Network line switching method, device, equipment and storage medium

By adding routing rules to the routing tables of private subnets and transit gateways, the problem of inability to access the service provider when public network line is abnormal is solved, and a stable Internet communication service independent of the public network quality is realized.

CN118660004BActive Publication Date: 2025-03-18广州三七极耀网络科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410590445.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2025-03-18
Estimated Expiration
2044-05-13

AI Technical Summary

Technical Problem

When an abnormality occurs in a public network line, the service user cannot access the service provider through a third-party proxy server, resulting in low reliability and stability of the Internet communication service.

Method used

When an exception occurs on the public network line, a detection request is sent to the first server through the private subnet and the public network line, and its access exception is determined, and routing rules are added to the routing table of the private subnet and the first transit gateway, so that the access request is forwarded to the first server through the first transit gateway and the second transit gateway.

Benefits of technology

When the public network line is abnormal, the service provider is accessed through the first transit gateway and the second transit gateway, and the reliability and stability of Internet communication services are improved independently of the public network quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660004B_ABST
    Figure CN118660004B_ABST
Patent Text Reader

Abstract

The present application discloses a network line switching method, device, equipment and storage medium, and relates to the field of Internet technology. The method includes: sending a first detection request to a first server through a private subnet and a public network line, and determining whether an access abnormality occurs to the first server according to the return result of the first detection request; in the case of an access abnormality to the first server, according to the first communication address of the first server and the first identifier of the pre-deployed first transit gateway, adding a first routing rule in the first routing table of the private subnet, so that the private subnet sends the request to access the first server to the first transit gateway; obtaining the second identifier of the pre-deployed second transit gateway, adding a second routing rule in the second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends the request to access the first server to the first server through the second transit gateway.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a network line switching method, device, equipment and storage medium. Background Art

[0002] The public network refers to a computer network connected worldwide, also known as the Internet, which is composed of countless Internet service providers (ISPs) that are interconnected through physical links and routers to provide Internet communication services to users. Service users can access the business services provided by service providers through public network lines. In the global Internet environment, factors such as network connectivity, link quality, equipment failures and human errors can cause abnormalities in public network lines, which in turn lead to network instability between service users and service providers, and service users cannot access the business services provided by service providers, resulting in business losses for service providers and / or service users.

[0003] In the prior art, when an abnormality is detected in the public network line, the service user can access the business services provided by the service provider through a third-party proxy server. However, the third-party proxy server essentially relies on the quality of the public network line. If the public network line is interrupted, the service user still cannot access the business services provided by the service provider through the third-party proxy server, and the reliability and stability of the Internet communication service are low. Summary of the invention

[0004] The present application provides a network line switching method, apparatus, device and storage medium, so as to switch the network line of the access service provider to the first transit gateway and the second transit gateway when an abnormality occurs in the public network line, so as to send the request for accessing the service provider to the service provider through the first transit gateway and the second transit gateway, so as to solve the problem in the prior art that the service provider cannot be accessed through a third-party proxy server when an abnormality occurs in the public network line, and ensure the reliability and stability of Internet communication services.

[0005] In a first aspect, the present application provides a network line switching method, comprising:

[0006] Sending a first detection request to the first server through the private subnet and the public network line, and determining whether an access abnormality occurs to the first server according to a return result of the first detection request;

[0007] In the case of access anomaly to the first server, according to the first communication address of the first server and the first identifier of the pre-deployed first transit gateway, a first routing rule for accessing the first server is added in the first routing table of the private subnet, so that the private subnet sends a request for accessing the first server to the first transit gateway based on the first routing rule;

[0008] Obtain a second identifier of a pre-deployed second transit gateway, and add a second routing rule for accessing the first server in a second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends a request for accessing the first server to the first server through the second transit gateway based on the second routing rule.

[0009] In a second aspect, the present application provides a network line switching device, comprising:

[0010] a route anomaly detection module, configured to send a first detection request to a first server through a private subnet and a public network line, and determine whether an access anomaly occurs to the first server according to a return result of the first detection request;

[0011] A first rule adding module is configured to add a first routing rule for accessing the first server in a first routing table of the private subnet according to a first communication address of the first server and a first identifier of a pre-deployed first transit gateway when an access exception occurs to the first server, so that the private subnet sends a request for accessing the first server to the first transit gateway based on the first routing rule;

[0012] The second rule adding module is configured to obtain a second identifier of a pre-deployed second transit gateway, and add a second routing rule for accessing the first server in a second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends a request for accessing the first server to the first server through the second transit gateway based on the second routing rule.

[0013] In a third aspect, the present application provides a network line switching device, including:

[0014] one or more processors;

[0015] The memory stores one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the network line switching method as described in the first aspect.

[0016] In a fourth aspect, the present application provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the network line switching method as described in the first aspect.

[0017] In the present application, a first detection request is sent to the first server through a private subnet and a public network line, and whether an access abnormality occurs to the first server is determined according to the return result of the first detection request; in the case of an access abnormality to the first server, a first routing rule for accessing the first server is added to the first routing table of the private subnet according to the first communication address of the first server and the first identifier of the pre-deployed first transit gateway, so that the private subnet sends the request for accessing the first server to the first transit gateway based on the first routing rule; the second identifier of the pre-deployed second transit gateway is obtained, and a second routing rule for accessing the first server is added to the second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends the request for accessing the first server to the first server through the second transit gateway based on the second routing rule. Through the above technical means, when an abnormality occurs in the public network line, a first routing rule can be added to the first routing table of the private subnet and a second routing rule can be added to the second routing table of the first transit gateway, so that the private subnet forwards the request for accessing the first server to the first transit gateway, the first transit gateway forwards the request to the second transit gateway, and the second transit gateway forwards the request to the first server. Since the first transit gateway and the second transit gateway do not rely on the quality of the public network, the first server can be accessed through the first transit gateway and the second transit gateway even if the public network line is interrupted, which solves the problem in the prior art that the service provider cannot be accessed through a third-party proxy server when an abnormality occurs in the public network line, thereby ensuring the reliability and stability of Internet communication services. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flow chart of a network line switching method provided by an embodiment of the present application;

[0019] Figure 2 It is a flow chart of the communication process of the service host and the monitoring host accessing the first server provided by the embodiment of the present application;

[0020] Figure 3 It is a schematic diagram of the communication process of a service host accessing an external network server provided in an embodiment of the present application;

[0021] Figure 4 It is a schematic diagram of the communication process of a service host accessing an intranet service host provided by an embodiment of the present application;

[0022] Figure 5 It is a flowchart of determining a second transit gateway and adding a second routing rule provided in an embodiment of the present application;

[0023] Figure 6 It is a schematic diagram of the communication process of the service host accessing the server A and the server B provided by the embodiment of the present application;

[0024] Figure 7 is a flow chart of adding a routing rule for accessing a second server provided in an embodiment of the present application;

[0025] Figure 8 It is a structural schematic diagram of a network line switching device provided in an embodiment of the present application;

[0026] Fig. 9 It is a structural diagram of a network line switching device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0029] In the more common existing implementation methods, when an abnormality is detected in the public network line, the service user can access the business services provided by the service provider through a third-party proxy server. Alternatively, the retry mechanism is automatically executed through the business code to access the business services provided by the service provider through the public network line again. However, both the third-party proxy server and the retry mechanism rely on the quality of the public network line. If the public network line is interrupted, the service user will still not be able to access the business services provided by the service provider through the third-party proxy server or the retry mechanism, and the reliability and stability of the Internet communication service are low.

[0030] To solve the above problems, this embodiment provides a network line switching method, so that when an abnormality occurs in the public network line, the network line of the access service provider is switched to the first transit gateway and the second transit gateway, so that the request to access the service provider is sent to the service provider through the first transit gateway and the second transit gateway, thereby ensuring the reliability and stability of the Internet communication service.

[0031] The network line switching method provided in this embodiment can be executed by a network line switching device, which can be implemented by software and / or hardware. The network line switching device can be composed of two or more physical entities, or it can be composed of one physical entity. For example, the network line switching device can be a computer device corresponding to the service user. If the service user simultaneously performs the operation of accessing the service provider, the operation of providing its own business services, and the operation of network line switching, the operation load of the service user is relatively high, which affects the quality of the business services provided by the service user. In order to ensure that the service user can provide high-quality business services, a computer device other than the service user can be used as a network line switching device. For example, a game service end includes multiple business hosts and multiple monitoring hosts. A business host is configured with a corresponding monitoring host. The business host provides business services to game players and accesses business services provided by other application platforms. The monitoring host is used to monitor the operating status and network status of the business host. That is, the business host is the service user, and the monitoring host serves as a network line switching device.

[0032] The network line switching device is installed with at least one type of operating system, wherein the operating system includes but is not limited to Android system, Linux system and Windows system. The network line switching device can install at least one application based on the operating system, and the application can be an application that comes with the operating system or an application downloaded from a third-party device or server. In this embodiment, the network line switching device has at least an application that can execute the network line switching method.

[0033] For ease of understanding, this embodiment is described by taking the monitoring host as an example of the main body executing the network line switching method.

[0034] Figure 1 A flow chart of a network line switching method provided by an embodiment of the present application is given. Figure 1 , the network line switching method specifically includes:

[0035] S110: Send a first detection request to the first server through a private subnet and a public network line, and determine whether an access abnormality occurs to the first server according to a return result of the first detection request.

[0036] In this embodiment, the first server is the service provider accessed by the business host. When the business host accesses the first server, it will send a corresponding service access request to the first server through the private subnet and the public network line deployed at the location. For example, if the business host is deployed in region A and needs to call the interface provided by the application store to process the business service, the business host can access the domain name of the application store through the private subnet and the public network line deployed in region A. Among them, the private subnet is used to host resources that are not directly exposed to the public Internet to improve the network security of the game server.

[0037] For example, Figure 2 FIG. 1 is a flow chart of the communication process of the service host and the monitoring host accessing the first server provided by the embodiment of the present application. Figure 2 As shown, the public network line in area A includes a NAT gateway in area A and an Internet gateway in area A. When the service host accesses the domain name of the first server, the service access request is sent to the private subnet, the private subnet forwards the service access request to the NAT gateway in area A, the NAT gateway in area A forwards the service access request to the Internet gateway in area A, and the Internet gateway in area A forwards the service access request to the first server. At the same time, the monitoring host sends the first detection request to the private subnet, the private subnet forwards the first detection request to the NAT gateway in area A, the NAT gateway in area A forwards the first detection request to the Internet gateway in area A, and the Internet gateway in area A forwards the first detection request to the first server. When the public network line in area A is abnormal, such as when the outbound public network optical cable in area A is interrupted, the Internet gateway in area A disconnects the communication connection with the first server, and the requests sent by the service host and the monitoring host cannot reach the first server. At this time, the first server has an access abnormality. When the first server has an access abnormality, it can be determined that the public network line used to access the first server has an abnormality, and when the public network line has an abnormality, the network line is switched to access the first server normally through the network line.

[0038] In this embodiment, the first detection request is a request for the monitoring host to detect whether the business host has an abnormality in accessing the first server. When accessing the domain name of the first server based on the first detection request, the return results corresponding to the first detection request for successful access and failed access are different, and whether an access abnormality occurs to the first server can be determined based on the return result of the first detection request. Exemplarily, when the domain name of the first server is inaccessible, return results such as an error code, error message, or timeout will be received. Therefore, when these return results indicating that the first server is inaccessible are received, it can be determined that an access abnormality occurs to the first server. When the domain name of the first server can be accessed normally, return results such as HTTP status code and HTML content will be received. Therefore, when these return results indicating that the first server can be accessed normally are received, it can be determined that no access abnormality occurs to the first server.

[0039] S120. When an access anomaly occurs to the first server, a first routing rule for accessing the first server is added to the first routing table of the private subnet according to the first communication address of the first server and the first identifier of the pre-deployed first transit gateway, so that the private subnet sends a request for accessing the first server to the first transit gateway based on the first routing rule.

[0040] In this embodiment, the first transit gateway is a transit gateway pre-deployed in the same region as the monitoring host and the service host. For example, when the monitoring host and the service host are deployed in region A, the first transit gateway is also deployed in region A. This embodiment is described by taking the first transit gateway, the monitoring host, and the service host as examples where they are all deployed in region A. The first transit gateway may be deployed using the Transit Gateway (TGW) service provided by AWS (Amazon Web Services).

[0041] Exemplarily, when the monitoring host determines that the first server has an abnormality based on the return result of the first detection request, the domain name of the first server can be resolved through the DNS server to obtain the first communication address of the first server. It should be noted that the monitoring host and the business host access the first server based on its domain name when accessing the first server, and the domain name cannot be used as information for the transit gateway to access the first server. Therefore, before accessing the first server with the help of the transit gateway, the domain name of the first server needs to be resolved to obtain the first communication address of the first server. Among them, the first communication address is the IP address of the first server.

[0042] The domain name of the first server can be resolved into one or more IP addresses, and the corresponding first routing rule can be added to the first routing table of the private subnet based on each IP address and the first identifier of the first transit gateway. Among them, the first identifier is the device identifier of the first transit gateway. The IP address of the first server is the destination IP address specified by the first routing rule, that is, the request to access the first server should be routed to the destination IP address, and the first transit gateway corresponding to the first identifier is the next hop specified by the first routing rule, that is, the next network device or interface to which the request received by the private subnet should be forwarded. Therefore, the first routing rule can specify that the private subnet forwards the request to access the first server to the first transit gateway.

[0043] S130. Obtain a second identifier of a pre-deployed second transit gateway, and add a second routing rule for accessing the first server in a second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends a request for accessing the first server to the first server through the second transit gateway based on the second routing rule.

[0044] In this embodiment, the second transit gateway is a transit gateway pre-deployed in a different region from the monitoring host and the service host. For example, when the monitoring host and the service host are deployed in region A, the second transit gateway is deployed in region B. This embodiment is described by taking the deployment of the second transit gateway in region B as an example. The second transit gateway can be deployed using the Transit Gateway (TGW) service provided by AWS (Amazon Web Services).

[0045] Exemplarily, after resolving one or more IP addresses based on the domain name of the first server, a corresponding second routing rule can be added to the second routing table of the first transit gateway based on each IP address and the second identifier of the second transit gateway. The second identifier is the device identifier of the second transit gateway. The IP address of the first server is the destination IP address specified by the second routing rule, that is, the request to access the first server should be routed to the destination IP address, and the second transit gateway corresponding to the second identifier is the next hop specified by the second routing rule, that is, the next network device or interface to which the request received by the first transit gateway should be forwarded. Therefore, the second routing rule can specify that the first transit gateway forwards the request to access the first server to the second transit gateway.

[0046] After the monitoring host adds the first routing rule for accessing the first server in the private subnet and adds the second routing rule for accessing the first server in the first transit gateway, the business host can send a service access request for accessing the first server to the private subnet. The private subnet can resolve the IP address of the first server based on the domain name corresponding to the service access request, query the first routing rule for accessing the first server in the first routing table according to the IP address of the first server, and forward the service access request to the first transit gateway according to the first identifier in the first routing rule. The first transit gateway resolves the IP address of the first server based on the domain name corresponding to the received service access request, query the second routing rule for accessing the first server in the second routing table according to the IP address of the first server, and forward the service access request to the second transit gateway according to the second identifier in the second routing rule. The second transit gateway resolves the IP address of the first server based on the domain name corresponding to the received service access request, and sends the service access request to the first server according to the IP address of the first server, so that the business host can successfully access the first server.

[0047] It should be noted that the second transit gateway and the public network line are not deployed in the same area. When the public network line is abnormal, the network of the second transit gateway is not abnormal. This embodiment aims to continue to access the service provider through the network line deployed in other areas when the local public network line deployed at the location of the business host and the monitoring host is abnormal, so as to ensure the reliability and stability of the Internet service. The private subnet and the second transit gateway are not deployed in the same area, and the private subnet cannot directly communicate with the second transit gateway across regions. Therefore, the first transit gateway is deployed in the same area as the private subnet to forward the request sent by the private subnet to the second transit gateway through the first transit gateway. When switching from the public network line to the line of the first transit gateway and the second transit gateway, it is only necessary to add corresponding routing rules to the private subnet and the first transit gateway. Compared with the operation of starting the retry mechanism through a third-party proxy server or modifying the business code, the operation of switching the network line in this embodiment is simpler and faster. Moreover, the first transit gateway and the second transit gateway can be directly deployed using the Transit Gateway (TGW) service provided by AWS (Amazon Web Services). The deployment process is also relatively simple compared to the construction process of the proxy service, which is suitable for most Internet scenarios and is more flexible to use.

[0048] In one embodiment, the first server is an external network server, and the third routing table of the second transit gateway is pre-added with a third routing rule for accessing the external network server. The third routing rule is used to specify that the second transit gateway sends a request for accessing the external network server to a corresponding configured network line, so as to send the request for accessing the external network server to the external network server through the network line. Among them, the external network server does not belong to the computer device deployed by the game server corresponding to the business host. It can be understood that when the first server is an external network server, the second transit gateway cannot directly send the request for accessing the first server to the external network server. At this time, the first server needs to be accessed through the corresponding configured network line. Exemplarily, after the business host sends a service access request to the private subnet, the private subnet sends the service access request to the first transit gateway based on the first routing rule, and the first transit gateway sends the service access request to the second transit gateway based on the second routing rule. The second transit gateway resolves the IP address of the first server according to the domain name corresponding to the service access request, and determines whether the first server is an external network server or an intranet business host according to the IP address. When it is determined that the first server is an external network server, the third routing table is queried to obtain the third routing rule for accessing the external network server. The second transit gateway sends the service access request to the corresponding configured network line according to the third routing rule, and the network line sends the service access request to the first server. It should be noted that the network line corresponding to the second transit gateway is deployed in the same area as the second transit gateway, so that communication connection with the second transit gateway can be established. For example, when the second transit gateway is deployed in area B, the network line corresponding to the second transit gateway can be a public network line deployed in area B.

[0049] In this embodiment, the network lines configured corresponding to the second transit gateway include a router, a NAT gateway, and an Internet gateway. The fourth routing table of the router is pre-added with a fourth routing rule, and the fourth routing rule is used to specify that the router sends the request transmitted by the second transit gateway to the NAT gateway; the NAT gateway is used to send the request transmitted by the router to the Internet gateway, and the Internet gateway is used to send the request transmitted by the NAT gateway to the external network server. The router can be implemented based on the Transit Gateway (TGW) mounting component provided by AWS (Amazon Web Services). Exemplarily, Figure 3 Schematic diagram of the communication process of the service host accessing the external network server provided by the embodiment of the present application. Figure 3As shown, the second transit gateway and the routers, NAT gateways and Internet gateways in the correspondingly configured network lines are deployed in region B, and the first transit gateway, private subnet and service host are deployed in region A. The service host sends the service access request to the private subnet, the private subnet forwards the service access request to the first transit gateway, the first transit gateway forwards the service access request to the second transit gateway, the second transit gateway sends the service access request to the router in region B, the router in region B sends the service access request transmitted by the second transit gateway to the NAT gateway in region B based on the fourth routing rule, the NAT gateway in region B modifies the source IP address of the service access request to its own IP address and sends it to the Internet gateway in region B, the Internet gateway in region B sends the service access request to the corresponding external network server according to the destination IP address of the service access request.

[0050] It should be noted that the third routing rule of the second transit gateway is added when it is deployed, and the corresponding configured network line is also built together when the second transit gateway is deployed. The second transit gateway can send the request to access the external network server to the corresponding configured network line based on the pre-added third routing rule. The router in the network line can forward the request transmitted by the second transit gateway to the NAT gateway in the network line based on the pre-added fourth routing rule, and the NAT gateway and Internet gateway in the network line can send the request to the corresponding external network server based on the destination IP address of the request. Therefore, when the monitoring host executes the network line switching method, there is no need to add the third routing rule in the second transit gateway and configure the network line, but only to add the corresponding routing rules in the private subnet and the first transit gateway, which greatly improves the network line switching efficiency of the business host, thereby improving the efficiency of the business host accessing the first server.

[0051] In another embodiment, the first server is an intranet service host, and the third routing table of the second transit gateway is pre-added with a fifth routing rule for accessing the intranet service host, and the fifth routing rule is configured based on the second communication address of the intranet service host. The fifth routing rule is used to specify that the second transit gateway sends the request for accessing the intranet service host to the intranet service host. Among them, the intranet service host is another computer device deployed on the game server corresponding to the service host. The second communication address is the IP address of the intranet service host. It can be understood that when the first server is an intranet service host, the second transit gateway can directly send the request for accessing the first server to the intranet service host without the need to access the first server through other network lines. Exemplarily, Figure 4 Schematic diagram of the communication process of the service host accessing the intranet service host provided by the embodiment of the present application. Figure 4As shown, the service host sends the service access request to the private subnet, the private subnet forwards the service access request to the first transit gateway, the first transit gateway forwards the service access request to the second transit gateway, the second transit gateway resolves the IP address of the first server according to the domain name accessed by the service access request, and determines whether the first server is an external network server or an intranet service host according to the IP address. When the first server is determined to be an intranet service host, the third routing table is queried to obtain the fifth routing rule for accessing the intranet service host, and the second transit gateway sends the service access request to the first server according to the fifth routing rule.

[0052] Similarly, the fifth routing rule of the second transit gateway is added when it is deployed, and the second transit gateway can send the request to access the intranet service host to the intranet service host based on the fifth routing rule. Therefore, when the monitoring host executes the network line switching method, it is not necessary to add the fifth routing rule and configure the network line in the second transit gateway, but only to add the corresponding routing rules in the private subnet and the first transit gateway, which greatly improves the network line switching efficiency of the service host, thereby improving the efficiency of the service host accessing the first server.

[0053] The fifth routing rule is added based on the second communication address of the intranet business host, which includes the second communication address of the corresponding intranet business host. When the second transit gateway determines that the first server corresponding to the transmission of the service access request is an external network server or an intranet business host, the second transit gateway can match the first communication address of the first server with the second communication address of the intranet business host contained in each fifth routing rule. If the match is successful, the first server is determined to be an intranet business host, and the service access request is sent to the first server through the corresponding matched fifth routing rule. If the match fails, the first server is determined to be an external network server, and the service access request is sent to the corresponding configured network line through the third routing rule, and the service access request is sent to the first server through the network line.

[0054] Furthermore, when deploying a second transit gateway, it is possible that the second transit gateway cannot access the first server. To this end, multiple second transit gateways can be deployed in multiple regions to select a second transit gateway that can normally access the first server from the multiple second transit gateways to forward requests to access the first server, thereby ensuring that the business host can normally access the services provided by the first server and improving the reliability of Internet services. The second transit gateway, as the next hop of the first transit gateway, affects the addition of the second routing rule of the first transit gateway. Therefore, when adding the second routing rule, the second transit gateway can be selected based on the access situation of each second transit gateway to the first server, so that the second routing rule can be added based on the second identifier of the selected second transit gateway. Exemplarily, Figure 51 is a flowchart of determining a second transit gateway and adding a second routing rule provided by an embodiment of the present application. Figure 5 As shown, the step of determining the second transit gateway and adding the second routing rule specifically includes S1301-S1302:

[0055] S1301. In the case where multiple second transit gateways are pre-deployed, obtain the access time of each second transit gateway to the first server, and determine the second transit gateway with the shortest access time as the target transit gateway.

[0056] The access time can be understood as the time required for the request sent by the second transit gateway to reach the first server. The shorter the access time, the shorter the time required for the service host to access the first server, and the higher the service access efficiency. Therefore, the second transit gateway with the shortest access time can be determined as the target transit gateway, so that the request sent by the service host to access the first server is forwarded to the first server through the target transit gateway.

[0057] In this embodiment, when the monitoring host obtains the access duration corresponding to the second transit gateway, it can add the second routing rule for accessing the first server in the second routing table of the first transit gateway based on the second identifier of the second transit gateway, and the monitoring host issues a detection request for accessing the first server, so as to send the detection request to the first server through the private subnet, the first transit gateway and the second transit gateway, and determine the access duration of the second transit gateway based on the time difference between the reception time of the return result of the detection request and the issuance time of the detection request. By analogy, the access duration of each second transit gateway can be determined.

[0058] Furthermore, since it takes a long time to add the second routing rule and send the detection request from the monitoring host to the first server, the switching efficiency of the network line is affected. In this regard, the detection result sent by the monitoring device corresponding to each second transit gateway can be obtained, and the access time of the corresponding second transit gateway can be obtained in the detection result; wherein, the monitoring device sends the second detection request to the first server through the corresponding second transit gateway, and generates the detection result according to the return result of the second detection request. The second detection request is a request for the corresponding monitoring device to detect whether the access to the first server is abnormal. Exemplarily, each second transit gateway is configured with a corresponding monitoring device, and the monitoring device is connected to the monitoring host for communication, and the monitoring host can send the domain name of the first server to the monitoring device. The monitoring device generates a second detection request according to the domain name of the first server, sends the second detection request to the second transit gateway, and the second transit gateway resolves the IP address of the first server according to the domain name corresponding to the second detection request, and sends the second detection request to the first server according to the IP address of the first server. When accessing the domain name of the first server based on the second detection request, the return result corresponding to the second detection request is different for successful access and failed access, and it can be determined whether the first server has an access abnormality based on the return result of the second detection request. If it is determined based on the returned result that the access to the first server is abnormal, then it is determined that the first server is inaccessible. If it is determined based on the returned result that the first server is normally accessible, then the access duration is determined based on the time difference between the reception time of the returned result and the sending time of the second detection request. The monitoring device generates a detection result based on the access result of whether the first server has an access abnormality and the access duration, and sends the detection result to the monitoring host. The monitoring host determines whether the corresponding second transit gateway has normally accessed the first server and the access duration based on the detection results sent by the monitoring devices corresponding to each second transit gateway, and selects the second transit gateway with the shortest access duration as the target transit gateway among the second transit gateways that can normally access the first server. This embodiment determines the access duration of the corresponding second transit gateway to the first server through the monitoring device, thereby eliminating the need for the monitoring host to add each second transit gateway in the second routing table, and shortens the transmission path of the detection request, effectively improving the efficiency of obtaining the access duration, thereby improving the line switching efficiency.

[0059] S1302. Add a second routing rule for accessing the first server in a second routing table of the first transit gateway according to the first communication address and the second identifier of the target transit gateway.

[0060] Exemplarily, the first communication address is used as the destination IP address specified by the second routing rule, and the target transit gateway is used as the next hop specified by the second routing rule, and the second routing rule is added to the second routing table based on the first communication address and the target transit gateway. When the business host sends a service access request to the first server to the private subnet, the private subnet sends the service access request to the first transit gateway, the first transit gateway sends the service access request to the target transit gateway, and the target transit gateway sends the service access request to the first server. It should be noted that regardless of whether the first server is an external network server or an internal network business host, each second transit gateway has the function of sending requests to external network servers and internal network business hosts. Therefore, after determining the target transit gateway, the target transit gateway also sends requests to external network servers and internal network business hosts normally.

[0061] This embodiment selects the second transit gateway with the shortest access time as the target transit gateway according to the access time of the second transit gateway, so as to access the first server through the target transit gateway, thereby improving the access efficiency of the service host to the first server.

[0062] In one embodiment, when the accessed servers are different, the access time of the second transit gateway is also different. For example, the second transit gateway is deployed in region B and the second transit gateway is deployed in region C in advance. When accessing server A, the access time of the second transit gateway in region B is shorter, and when accessing server B, the access time of the second transit gateway in region C is shorter. At this time, the second transit gateway with the shortest access time can be selected as the target transit gateway for accessing the corresponding server based on the access time of each second transit gateway to each server, and the second routing rule for accessing the server is added to the second routing table based on the IP address of the server and the second identifier of the corresponding target transit gateway.

[0063] This embodiment uses Figure 6 The schematic diagram of the communication process of the service host accessing server A and server B is used as an example for description. Figure 6As shown, both server A and server B are external network servers, the second transit gateway in region B has the shortest access time to server A, and the second transit gateway in region C has the shortest access time to server B, so the second routing table of the first transit gateway in region A is added with a second routing rule A generated based on the second identifier of the second transit gateway in region B and the IP address of server A, and a second routing rule B generated based on the second identifier of the second transit gateway in region C and the IP address of server B. The business host sends a service access request A to the private subnet to access server A, and the private subnet forwards the service access request A to the first transit gateway. The first transit gateway resolves the IP address of server A according to the domain name of the service access request A, obtains the second routing rule A according to the IP address of server A, and sends the service access request A to the second transit gateway in region B according to the second routing rule A. The second transit gateway in region B sends the service access request A to server A through the router, NAT gateway, and Internet gateway in region B. The business host sends a service access request B to access server B to the private subnet. The private subnet forwards the service access request B to the first transit gateway. The first transit gateway resolves the IP address of server B based on the domain name of the service access request B, obtains the second routing rule B based on the IP address of server B, and sends the service access request B to the second transit gateway in region C based on the second routing rule B. The second transit gateway in region C sends the service access request B to server B through the router, NAT gateway and Internet gateway in region C.

[0064] In another embodiment, when service access requests are forwarded through multiple second transit gateways, the operating and maintenance costs of the second transit gateways are relatively high. In this regard, one second transit gateway can be used to implement access to multiple servers. That is, after determining that an access anomaly occurs on the first server and determining the target transit gateway corresponding to the first server, if an access anomaly also occurs on the subsequent second server, a routing rule for accessing the second server is directly added to the first transit gateway based on the second identifier of the target transit gateway, so that the request to access the second server is sent to the second server through the target transit gateway. The second server is another server that has an access anomaly after the first server. Exemplarily, Figure 7 1 is a flow chart of adding a routing rule for accessing a second server provided in an embodiment of the present application. Figure 7 As shown, the step of adding a routing rule for accessing the second server specifically includes S140-S150:

[0065] S140. When an abnormality is detected in the access to the second server, a sixth routing rule for accessing the second server is added to the first routing table according to the second communication address and the first identifier of the second server, so that the private subnet sends the request for accessing the second server to the first transit gateway based on the sixth routing rule.

[0066] Exemplarily, the monitoring host accesses the second server through a private subnet and a public network line. When an access anomaly occurs on the second server, the domain name of the second server is resolved through the DNS server to obtain the second communication address of the second server. The second communication address is the IP address of the second server. Then, based on the IP address of the second server and the first identifier of the first transit gateway, a corresponding sixth routing rule is added to the first routing table. The IP address of the second server is the destination IP address specified by the sixth routing rule, and the first transit gateway corresponding to the first identifier is the next hop specified by the sixth routing rule. Therefore, the sixth routing rule can specify that the private subnet forwards the request to access the first server to the first transit gateway.

[0067] S150. According to the second communication address and the second identifier of the target transit gateway, add a seventh routing rule for accessing the second server in the second routing table, so that the first transit gateway sends the request for accessing the second server to the second server through the target transit gateway based on the seventh routing rule.

[0068] Exemplarily, based on the second identifier of the target transit gateway and the IP address of the second server, a corresponding seventh routing rule is added to the second routing table. The IP address of the second server is the destination IP address specified by the seventh routing rule, and the target transit gateway corresponding to the second identifier is the next hop specified by the seventh routing rule. Therefore, the seventh routing rule can specify that the first transit gateway forwards the request to access the second server to the target transit gateway.

[0069] When the business host sends the service access request to the second server to the private subnet, the private subnet can resolve the IP address of the second server based on the domain name corresponding to the service access request, query the sixth routing rule for accessing the second server in the first routing table according to the IP address of the second server, and forward the service access request to the first transit gateway according to the first identifier in the sixth routing rule. The first transit gateway resolves the IP address of the second server based on the domain name corresponding to the service access request received, query the seventh routing rule for accessing the second server in the second routing table according to the IP address of the second server, and forward the service access request to the target transit gateway according to the second identifier in the seventh routing rule, and the target transit gateway sends the received service access request to the second server. In this embodiment, a second transit gateway forwards the service access requests to the second server and the first server, so as to achieve normal access to multiple servers through a second transit gateway, thereby reducing the maintenance cost and operation cost of the second transit gateway.

[0070] In summary, the network line switching method provided in the embodiment of the present application sends a first detection request to the first server through a private subnet and a public network line, and determines whether an access abnormality occurs to the first server according to the return result of the first detection request; in the case of an access abnormality on the first server, according to the first communication address of the first server and the first identifier of the pre-deployed first transit gateway, a first routing rule for accessing the first server is added to the first routing table of the private subnet, so that the private subnet sends the request for accessing the first server to the first transit gateway based on the first routing rule; obtain the second identifier of the pre-deployed second transit gateway, and add the second routing rule for accessing the first server in the second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends the request for accessing the first server to the first server through the second transit gateway based on the second routing rule. Through the above technical means, when an abnormality occurs on the public network line, the first routing rule can be added to the first routing table of the private subnet and the second routing rule can be added to the second routing table of the first transit gateway, so that the private subnet forwards the request for accessing the first server to the first transit gateway, the first transit gateway forwards the request to the second transit gateway, and the second transit gateway forwards the request to the first server. Since the first transit gateway and the second transit gateway do not rely on the quality of the public network, the first server can be accessed through the first transit gateway and the second transit gateway even if the public network line is interrupted, which solves the problem in the prior art that the service provider cannot be accessed through a third-party proxy server when an abnormality occurs in the public network line, thereby ensuring the reliability and stability of Internet communication services.

[0071] Based on the above embodiments, Figure 8 This is a schematic diagram of the structure of a network line switching device provided in an embodiment of the present application. Figure 8 The network line switching device provided in this embodiment specifically includes: a route anomaly detection module 21, a first rule adding module 22 and a second rule adding module 23.

[0072] The route anomaly detection module 21 is configured to send a first detection request to the first server through the private subnet and the public network line, and determine whether an access anomaly occurs to the first server according to the return result of the first detection request;

[0073] The first rule adding module 22 is configured to add a first routing rule for accessing the first server in a first routing table of the private subnet according to a first communication address of the first server and a first identifier of a pre-deployed first transit gateway when an access exception occurs to the first server, so that the private subnet sends a request for accessing the first server to the first transit gateway based on the first routing rule;

[0074] The second rule adding module 23 is configured to obtain the second identifier of the pre-deployed second transit gateway, and add a second routing rule for accessing the first server in the second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends the request for accessing the first server to the first server through the second transit gateway based on the second routing rule.

[0075] Based on the above embodiment, the first server is an external network server, and the third routing table of the second transit gateway is pre-added with a third routing rule for accessing the external network server. The third routing rule is used to specify that the second transit gateway sends the request for accessing the external network server to the corresponding configured network line, so as to send the request for accessing the external network server to the external network server through the network line.

[0076] Based on the above embodiment, the network line includes a router, a NAT gateway and an Internet gateway; wherein the fourth routing table of the router is pre-added with a fourth routing rule, and the fourth routing rule is used to specify that the router sends the request transmitted by the second transit gateway to the NAT gateway; the NAT gateway is used to send the request transmitted by the router to the Internet gateway, and the Internet gateway is used to send the request transmitted by the NAT gateway to the external network server.

[0077] Based on the above embodiment, the first server is the intranet service host, and the third routing table of the second transit gateway is pre-added with the fifth routing rule for accessing the intranet service host. The fifth routing rule is configured based on the second communication address of the intranet service host. The fifth routing rule is used to specify that the second transit gateway sends the request for accessing the intranet service host to the intranet service host.

[0078] Based on the above embodiment, the second rule adding module 23 includes: a target gateway determination unit, configured to obtain the access time of each second transit gateway to the first server when multiple second transit gateways are pre-deployed, and determine the second transit gateway with the shortest access time as the target transit gateway; a rule adding unit, configured to add a second routing rule for accessing the first server in the second routing table of the first transit gateway according to the first communication address and the second identifier of the target transit gateway.

[0079] Based on the above embodiment, the target gateway determination unit includes: an access time acquisition subunit, which is configured to obtain the detection results sent by the monitoring device corresponding to each second transit gateway, and obtain the access time of the corresponding second transit gateway in the detection results; wherein, the monitoring device sends a second detection request to the first server through the corresponding second transit gateway, and generates a detection result based on the return result of the second detection request.

[0080] On the basis of the above embodiment, the network line switching device also includes: a fourth rule adding module, which is configured to add a second routing rule for accessing the first server in the second routing table of the first transit gateway according to the first communication address and the second identifier, and when an abnormality is detected in the access to the second server, add a sixth routing rule for accessing the second server in the first routing table according to the second communication address and the first identifier of the second server, so that the private subnet sends the request for accessing the second server to the first transit gateway based on the sixth routing rule; a fifth rule adding module, which is configured to add a seventh routing rule for accessing the second server in the second routing table according to the second communication address and the second identifier of the target transit gateway, so that the first transit gateway sends the request for accessing the second server to the second server through the target transit gateway based on the seventh routing rule.

[0081] As mentioned above, the network line switching device provided in the embodiment of the present application sends a first detection request to the first server through the private subnet and the public network line, and determines whether the first server has an access abnormality according to the return result of the first detection request; in the case of an access abnormality on the first server, according to the first communication address of the first server and the first identifier of the pre-deployed first transit gateway, add a first routing rule for accessing the first server in the first routing table of the private subnet, so that the private subnet sends the request for accessing the first server to the first transit gateway based on the first routing rule; obtain the second identifier of the pre-deployed second transit gateway, add a second routing rule for accessing the first server in the second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends the request for accessing the first server to the first server through the second transit gateway based on the second routing rule. Through the above technical means, when an abnormality occurs in the public network line, the first routing rule can be added to the first routing table of the private subnet and the second routing rule can be added to the second routing table of the first transit gateway, so that the private subnet forwards the request for accessing the first server to the first transit gateway, the first transit gateway forwards the request to the second transit gateway, and the second transit gateway forwards the request to the first server. Since the first transit gateway and the second transit gateway do not rely on the quality of the public network, the first server can be accessed through the first transit gateway and the second transit gateway even if the public network line is interrupted, which solves the problem in the prior art that the service provider cannot be accessed through a third-party proxy server when an abnormality occurs in the public network line, thereby ensuring the reliability and stability of Internet communication services.

[0082] The network line switching device provided in the embodiment of the present application can be used to execute the network line switching method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0083] Fig. 9 is a schematic diagram of a network line switching device provided in an embodiment of the present application, with reference to Fig. 9 The network line switching device includes: a processor 31, a memory 32, a communication device 33, an input device 34 and an output device 35. The number of processors 31 in the network line switching device can be one or more, and the number of memories 32 in the network line switching device can be one or more. The processor 31, memory 32, communication device 33, input device 34 and output device 35 of the network line switching device can be connected through a bus or other methods.

[0084] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the network line switching method of any embodiment of the present application (for example, the route anomaly detection module 21, the first rule adding module 22 and the second rule adding module 23 in the network line switching device). The memory 32 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0085] The communication device 33 is used for data transmission.

[0086] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 32, that is, implements the above-mentioned network line switching method.

[0087] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.

[0088] The network line switching device provided above can be used to execute the network line switching method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0089] An embodiment of the present application also provides a storage medium containing computer executable instructions, which are used to execute a network line switching method when executed by a computer processor. The network line switching method includes: sending a first detection request to a first server through a private subnet and a public network line, and determining whether an access abnormality occurs to the first server based on a return result of the first detection request; when an access abnormality occurs to the first server, adding a first routing rule for accessing the first server to a first routing table of the private subnet based on a first communication address of the first server and a first identifier of a pre-deployed first transit gateway, so that the private subnet sends a request for accessing the first server to the first transit gateway based on the first routing rule; obtaining a second identifier of a pre-deployed second transit gateway, and adding a second routing rule for accessing the first server to a second routing table of the first transit gateway based on the first communication address and the second identifier, so that the first transit gateway sends a request for accessing the first server to the first server through the second transit gateway based on the second routing rule.

[0090] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.

[0091] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application is not limited to the above network line switching method, and the computer executable instructions can also execute related operations in the network line switching method provided in any embodiment of the present application.

[0092] The network line switching device, storage medium and network line switching equipment provided in the above embodiments can execute the network line switching method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the network line switching method provided in any embodiment of the present application.

[0093] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A network line switching method, characterized in that: include: Sending a first detection request to the first server through the private subnet and the public network line, and determining whether an access abnormality occurs to the first server according to a return result of the first detection request; In the case of access anomaly to the first server, according to the first communication address of the first server and the first identifier of the pre-deployed first transit gateway, a first routing rule for accessing the first server is added in the first routing table of the private subnet, so that the private subnet sends a request for accessing the first server to the first transit gateway based on the first routing rule; wherein the first transit gateway is a transit gateway pre-deployed in the same area as the monitoring host and the business host; Obtain a second identifier of a pre-deployed second transit gateway, and add a second routing rule for accessing the first server in a second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends a request for accessing the first server to the first server through the second transit gateway based on the second routing rule; wherein the second transit gateway and the public network line are not deployed in the same area, and when an abnormality occurs in the public network line, the network of the second transit gateway does not have an abnormality; when the first server is an external network server, a third routing rule for accessing the external network server is pre-added to the third routing table of the second transit gateway, and the third routing rule is used to specify that the second transit gateway sends a request for accessing the external network server to a correspondingly configured network line, so as to send the request for accessing the external network server to the external network server through the network line, and the correspondingly configured network lines of the second transit gateway include routers, NAT gateways, and Internet gateways.

2. The network line switching method according to claim 1, characterized in that: The network line includes a router, a NAT gateway and an Internet gateway; wherein the fourth routing table of the router is pre-added with a fourth routing rule, and the fourth routing rule is used to specify that the router sends the request transmitted by the second transit gateway to the NAT gateway; the NAT gateway is used to send the request transmitted by the router to the Internet gateway, and the Internet gateway is used to send the request transmitted by the NAT gateway to the external network server.

3. The network line switching method according to claim 1, characterized in that: The first server is an intranet service host, and the third routing table of the second transit gateway is pre-added with a fifth routing rule for accessing the intranet service host. The fifth routing rule is configured based on the second communication address of the intranet service host. The fifth routing rule is used to specify that the second transit gateway sends a request for accessing the intranet service host to the intranet service host.

4. The network line switching method according to claim 1, characterized in that: The obtaining of a second identifier of a pre-deployed second transit gateway, and adding a second routing rule for accessing the first server in a second routing table of the first transit gateway according to the first communication address and the second identifier, includes: In the case where multiple second transit gateways are pre-deployed, obtaining the access time of each second transit gateway to the first server, and determining the second transit gateway with the shortest access time as the target transit gateway; According to the first communication address and the second identifier of the target transit gateway, a second routing rule for accessing the first server is added to the second routing table of the first transit gateway.

5. The network line switching method according to claim 4, characterized in that: The obtaining of the access duration of each second transit gateway accessing the first server includes: Obtain the detection results sent by the monitoring device corresponding to each of the second transit gateways, and obtain the access duration of the corresponding second transit gateway from the detection results; wherein, the monitoring device sends a second detection request to the first server through the corresponding second transit gateway, and generates the detection result according to the return result of the second detection request.

6. The network line switching method according to claim 4, characterized in that: After adding a second routing rule for accessing the first server in a second routing table of the first transit gateway according to the first communication address and the second identifier, the method further includes: When an abnormality is detected in access to the second server, a sixth routing rule for accessing the second server is added to the first routing table according to the second communication address of the second server and the first identifier, so that the private subnet sends a request for accessing the second server to the first transit gateway based on the sixth routing rule; According to the second communication address and the second identifier of the target transit gateway, a seventh routing rule for accessing the second server is added to the second routing table, so that the first transit gateway sends a request for accessing the second server to the second server through the target transit gateway based on the seventh routing rule.

7. A network line switching device, characterized in that: include: a route anomaly detection module, configured to send a first detection request to a first server through a private subnet and a public network line, and determine whether an access anomaly occurs to the first server according to a return result of the first detection request; A first rule adding module is configured to add a first routing rule for accessing the first server in a first routing table of the private subnet according to a first communication address of the first server and a first identifier of a pre-deployed first transit gateway when an access exception occurs to the first server, so that the private subnet sends a request for accessing the first server to the first transit gateway based on the first routing rule; wherein the first transit gateway is a transit gateway pre-deployed in the same area as the monitoring host and the service host; The second rule adding module is configured to obtain the second identifier of the pre-deployed second transit gateway, and add the second routing rule for accessing the first server in the second routing table of the first transit gateway according to the first communication address and the second identifier, so that the first transit gateway sends the request for accessing the first server to the first server through the second transit gateway based on the second routing rule; wherein the second transit gateway and the public network line are not deployed in the same area, and when the public network line is abnormal, the network of the second transit gateway is not abnormal; when the first server is an external network server, the third routing table of the second transit gateway is pre-added with the third routing rule for accessing the external network server, and the third routing rule is used to specify that the second transit gateway sends the request for accessing the external network server to the corresponding configured network line, so as to send the request for accessing the external network server to the external network server through the network line, and the correspondingly configured network lines of the second transit gateway include routers, NAT gateways and Internet gateways.

8. A network line switching device, characterized in that: include: one or more processors; A memory stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the network line switching method as described in any one of claims 1-6.

9. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the network line switching method according to any one of claims 1 to 6 when executed by a computer processor.

Citation Information

Patent Citations

  • Data packet processing method, device, electronic equipment and storage medium

    CN113890864A

  • Cross-AZ equipment switching system and method, storage medium and program product

    CN116346713A