Network interworking and gateway switching method, device and computer readable medium

CN123020459APending Publication Date: 2026-10-30SHANGHAI YUNZHOU INFORMATION & TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611112458.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]现有技术中,简单的虚拟机网络打通方案会将多个站点的广播域无差别合并,容易导致广播风暴、未知单播泛洪以及故障域跨站点扩散;而传统的Anycast(任播)多活网关或VRRP(Virtual Router Redundancy Protocol,虚拟路由冗余协议)虽然能够实现网关高可用,但往往要求全网使用相同的网关MAC(Media Access Control,媒体访问控制)地址或依赖特定协议交互,难以在云平台虚拟化环境中同时满足正常状态下本地网关优先响应与故障状态下终端无需修改配置即可无缝切换至备份站点网关的需求

Benefits of technology

[0017]与现有技术相比,本申请提供了一种多站点网络的网络互通与网关切换方案,该方案可以为属于同一跨站点租户网络的多个站点创建各自独立的本地虚拟机网络,并为每个本地虚拟机网络配置相同的网关位置信息,其中所述网关位置信息包括网关IP地址和网关MAC地址,由此可以将用户可见的一个跨站点租户网络拆解为多个站点的本地虚拟机网络。在正常状态下,网络控制设备将所述第一站点的本地虚拟机网络的流表配置为第一流表信息,以使所述第一站点内的终端节点根据所述第一流表信息,通过所述第一站点的虚拟路由器和本地出口转发请求流量,确保了终端流量优先经由本地出口转发,避免了跨站点链路的无效占用,同时物理隔离的本地虚拟机网络有效抑制了广播域的跨站点扩散,缩小了故障影响范围。而在检测到符合故障切换条件时,网络控制设备可以进行故障切换,将第一站点的本地虚拟机网络的流表由第一流表信息配置为第二流表信息,以使所述第一站点内的终端节点在不修改第一站点的本地虚拟机网络的网关位置信息的情况下,根据所述第二流表信息将流量导入第一站点的VXLAN网关,通过跨站点隧道发送至第二站点的VXLAN网关,并经由第二站点的虚拟路由器和本地出口转发请求流量,解决了传统方案在虚拟化环境中难以兼顾本地优先与无感容灾的技术难题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020459A_ABST
    Figure CN123020459A_ABST
Patent Text Reader

Abstract

The application provides a network interworking and gateway switching method and device of a multi-site network and a computer readable medium. In a normal state, the terminal node in a site can forward request traffic through the local tenant gateway of the site, ensuring that the terminal traffic is preferentially forwarded via the local egress, avoiding invalid occupation of the cross-site link, and effectively inhibiting the cross-site diffusion of the broadcast domain by the physically isolated local virtual machine network, thereby reducing the fault influence range. When a fault switching condition is detected, fault switching can be performed, so that the terminal node in the first site can forward request traffic through the local tenant gateway of the second site without modifying the gateway location information of the local tenant gateway of the first site, thereby solving the technical problem that the traditional scheme is difficult to balance local priority and disaster tolerance in a virtualization environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology, and in particular to a method, device and computer-readable medium for network interconnection and gateway switching in a multi-site network. Background Technology

[0002] Cloud platforms and virtualized networks typically use software-defined networking (SDN) to provide tenants with virtual machine networks, north-south egress, and cross-host migration capabilities. Within a single data center, SDN controllers, tunnel networks, virtual routers, and border forwarding nodes can adequately meet these requirements. However, in multi-data center or multi-site scenarios, customers want to maintain tenant network connectivity between different sites while preserving each site's local resources, local gateways, and local uplink egress.

[0003] In existing technologies, simple virtual machine network connectivity solutions indiscriminately merge broadcast domains from multiple sites, easily leading to broadcast storms, unknown unicast flooding, and cross-site propagation of faulty domains. While traditional Anycast multi-active gateways or VRRP (Virtual Router Redundancy Protocol) can achieve high gateway availability, they often require the entire network to use the same gateway MAC (Media Access Control) address or rely on specific protocols for interaction. This makes it difficult to simultaneously meet the requirements of prioritizing local gateway response under normal conditions and seamlessly switching terminals to backup site gateways without configuration modifications in a cloud platform virtualization environment. Furthermore, existing solutions also have shortcomings in handling cross-site virtual machine migration, IP address deduplication, and east-west traffic optimization, resulting in high operational complexity and limited business continuity assurance capabilities for multi-site virtual networks. Summary of the Invention

[0004] One object of this application is to provide a method, device, and computer-readable medium for network interconnection and gateway switching in a multi-site network.

[0005] To achieve the above objectives, this application provides a method for network interconnection and gateway switching in a multi-site network, the method comprising: Create independent local virtual machine networks for multiple sites belonging to the same cross-site tenant network, and configure the same gateway location information for each local virtual machine network, including gateway IP address and gateway MAC address; Under normal conditions, the network control device configures the flow table of the local virtual machine network of the first site as the first flow table information, so that the terminal nodes in the first site can forward request traffic through the virtual router and local egress of the first site according to the first flow table information. When the failover conditions are met, the network control device configures the flow table of the local virtual machine network of the first site from the first flow table information to the second flow table information. This allows the terminal nodes in the first site to import traffic into the VXLAN gateway of the first site according to the second flow table information without modifying the gateway location information of the local virtual machine network of the first site. The traffic is then sent to the VXLAN gateway of the second site through the cross-site tunnel and forwarded through the virtual router and local egress of the second site.

[0006] Furthermore, the fault switching conditions include: The local egress of the first site is unavailable, the cross-site channel between the first site and the second site is available, and the virtual router and local egress of the second site are available.

[0007] Furthermore, the method also includes: When the fault recovery conditions are met, the network control device configures the flow table of the local virtual machine network of the first site from the second flow table information to the first flow table information, so that the terminal nodes in the first site can forward request traffic through the virtual router and local egress of the first site according to the first flow table information.

[0008] Furthermore, the method also includes: Under normal conditions, the network control device sets the gateway status of the first site to the locally active state; When the failover conditions are met, the network control device changes the gateway status of the first site from the local active state to the failover state. After the network control device configures the flow table of the local virtual machine network of the first site from the first flow table information to the second flow table information, it changes the gateway status of the first site from the failover state to the remote active state. When the fault recovery conditions are detected, the network control device changes the gateway status of the first site from the remote active state to the fault recovery state. After the network control device configures the flow table of the local virtual machine network of the first site from the second flow table information to the first flow table information, it changes the gateway status of the first site from the fault recovery state to the local active state.

[0009] Furthermore, the method also includes: The network control equipment maintains network reachability information for terminal nodes within the maintenance site, the network reachability information including terminal IP address and terminal MAC address; In response to a publish or withdraw event from a terminal node, the network control device publishes or withdraws the network reachability information of the terminal node to a remote site.

[0010] Furthermore, the network control equipment maintains network reachability information for terminal nodes within the maintenance site, including: Configure different automatic address allocation ranges for different sites within the same cross-site tenant network; Based on the automatic address allocation range corresponding to the site where the terminal node is located, an available terminal IP address is allocated to the terminal node in a manual or automatic manner.

[0011] Furthermore, when assigning available terminal IP addresses to the terminal nodes manually or automatically, the control plane records of the cross-site tenant network are queried to deduplicate IP addresses and determine the available terminal IP addresses.

[0012] Furthermore, the method also includes: After the network control device withdraws the network reachability information of the terminal node from the remote site, it enters a hold-and-wait state. After the waiting time corresponding to the hold-and-wait state has elapsed, the terminal IP address in the network reachability information that allows revocation will be reallocated.

[0013] Furthermore, the method also includes: Configure internal relay network segments for local virtual machine networks of different network segments, wherein the local virtual machine networks of different network segments have different gateway IP addresses; Configure a cross-network segment forwarding policy to enable terminal nodes of local virtual machine networks in different network segments to forward request traffic via a cross-network segment forwarding path. The cross-network segment forwarding path sequentially includes a terminal node of a third site, a virtual router of a third site, a VXLAN gateway of a third site, a VXLAN gateway of a fourth site, a virtual router of a fourth site, and a terminal node of a fourth site. The third site and the fourth site are local virtual machine networks in different network segments. The virtual router and the VXLAN gateway forward request traffic through an internal relay network segment.

[0014] Furthermore, each site has an independent control domain, and the network control device includes a central control device and a site agent control device corresponding to each site, through which the relevant information of the network control device is synchronized.

[0015] Based on another aspect of this application, a computing device is also provided, which includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the network interconnection and gateway switching method.

[0016] This application also provides a computer-readable medium having stored thereon computer program instructions that can be executed by a processor to implement the network interconnection and gateway switching method.

[0017] Compared with existing technologies, this application provides a network interconnection and gateway switching scheme for multi-site networks. This scheme can create independent local virtual machine networks for multiple sites belonging to the same cross-site tenant network, and configure the same gateway location information for each local virtual machine network. The gateway location information includes the gateway IP address and gateway MAC address, thereby decomposing a user-visible cross-site tenant network into multiple site local virtual machine networks. Under normal conditions, the network control device configures the flow table of the first site's local virtual machine network as the first flow table information. This allows terminal nodes within the first site to forward request traffic through the first site's virtual router and local egress based on the first flow table information, ensuring that terminal traffic is preferentially forwarded via the local egress, avoiding invalid occupation of cross-site links. Simultaneously, the physically isolated local virtual machine networks effectively suppress the cross-site spread of broadcast domains, reducing the scope of fault impact. When the failover conditions are met, the network control device can perform a failover by configuring the flow table of the local virtual machine network of the first site from the first flow table information to the second flow table information. This allows the terminal nodes in the first site to direct traffic to the VXLAN gateway of the first site according to the second flow table information without modifying the gateway location information of the local virtual machine network of the first site. The traffic is then sent to the VXLAN gateway of the second site through a cross-site tunnel and forwarded through the virtual router and local egress of the second site. This solves the technical problem of traditional solutions in virtualized environments that make it difficult to balance local priority and seamless disaster recovery. Attached Figure Description

[0018] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 A flowchart illustrating a method for network interconnection and gateway switching in a multi-site network, provided in an embodiment of this application; Figure 2 This is a schematic diagram of a cross-site tenant network in an embodiment of this application; Figure 3 This is a schematic diagram illustrating IP / MAC address publishing in an embodiment of this application; Figure 4 This is a schematic diagram illustrating the IP / MAC revocation process in an embodiment of this application. Figure 5 This is a schematic diagram illustrating the division of site address ranges in an embodiment of this application; Figure 6This is a schematic diagram of the automatic terminal IP address allocation mode in the embodiments of this application; Figure 7 This is a schematic diagram of the manual IP address allocation mode for terminals in an embodiment of this application; Figure 8 This is a schematic diagram illustrating cross-network segment interconnection in the embodiments of this application; The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation

[0019] The present application will now be described in further detail with reference to the accompanying drawings.

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] In a typical configuration of this application, the terminal and the service network devices each include one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0022] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0023] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical disc (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0024] This application provides a method for network interconnection and gateway switching in a multi-site network, which can decompose a user-visible cross-site tenant network into multiple site-specific virtual machine networks. Under normal conditions, the network control device configures the flow table of the first site's local virtual machine network as first flow table information. This allows terminal nodes within the first site to forward request traffic via the first site's virtual router and local egress based on the first flow table information. This ensures that terminal traffic is preferentially forwarded via the local egress, avoiding unnecessary occupation of cross-site links. Simultaneously, the physically isolated local virtual machine networks effectively suppress the cross-site spread of broadcast domains, reducing the scope of fault impact. When failover conditions are met, the network control device can perform a failover, reconfiguring the flow table of the local virtual machine network at the first site from the first flow table information to the second flow table information. This allows terminal nodes within the first site to direct traffic to the VXLAN gateway of the first site based on the second flow table information without modifying the gateway location information of the local virtual machine network at the first site. Traffic is then sent to the VXLAN gateway of the second site via a cross-site tunnel, and the request traffic is forwarded through the virtual router and local egress of the second site. This solves the technical challenge of traditional solutions in virtualized environments, which struggle to balance local priority and seamless disaster recovery.

[0025] Figure 1 The present application illustrates a processing flow of a network interconnection and gateway switching method for a multi-site network, comprising at least the following processing steps: Step S101: Create independent local virtual machine networks for multiple sites belonging to the same cross-site tenant network, and configure the same gateway location information for the local tenant gateway of each local virtual machine network, including gateway IP address and MAC address.

[0026] Specifically, from the user's perspective, a cross-site tenant network appears as a unified logical network object, but at the underlying physical or virtual infrastructure level, the network is broken down into multiple isolated local virtual machine networks.

[0027] For example, such as Figure 2As shown, from the user's perspective, the cross-site tenant network appears as a logical network object, tenant-prod-net, with a network segment of 192.168.1.0 / 24 and a gateway IP address of 192.168.1.1. However, at the underlying level, tenant-prod-net is implemented as two independent local virtual machine networks, Segment A and Segment B, corresponding to two sites, A and B. These two independent local virtual machine networks can be bound together as a pair of interconnecting domains, SegmentPair. These two local virtual machine networks have independent broadcast domains and do not directly transmit Layer 2 broadcast packets to each other, thereby effectively suppressing broadcast storms and limiting the cross-site propagation of fault domains.

[0028] In terms of gateway configuration, local virtual machine network Segment A and local virtual machine network Segment B will be configured with the exact same gateway IP address and gateway MAC address. This allows virtual machines and other terminal nodes to seamlessly access the network of site B even if they are hot-migrated from site A to site B.

[0029] In step S102, under normal conditions, the network control device configures the flow table of the local virtual machine network of the first site as the first flow table information, so that the terminal nodes in the first site forward request traffic through the virtual router and local egress of the first site according to the first flow table information.

[0030] The network control device is responsible for managing the announcement behavior within the local virtual machine network of each site. Its specific implementation can be in the form of a DCI (Data Center Interconnect) controller and / or an SDN (Software-Defined Network) controller. For example, in this embodiment, the network control device may include an SDN controller and an SDN agent deployed on each physical machine. The SDN controller receives network configurations from the cloud platform controller and maintains configuration information related to network interconnection and gateway switching. The SDN agent receives control commands from the SDN controller and configures information related to its own machine.

[0031] When the system is running normally and all site exits are functioning correctly, the network control device executes a local declaration isolation policy. This involves configuring the flow table of the local virtual machine network at site A as the first flow table information. This allows terminal nodes within site A to forward request traffic through the site's virtual router and local exit based on the first flow table information. The configuration information in the flow table determines the forwarding target of the request traffic. For example, it can be issued by the SDN controller and configured by the local SDN agent. The flow table can determine whether to forward request traffic to the local virtual router or a VXLAN (Virtual Extensible Local Area Network) gateway.

[0032] After configuring the flow table of the local virtual machine network of site A as the first flow table information, the flow table can match request traffic with gateway MAC addresses and hand it over to the local virtual router (vRouter) for processing. For example, for site A, if the destination gateway MAC address of the matched request traffic is 02:00:00:00:01:01, then the request traffic is forwarded to the local virtual router vRouter A. Similarly, for site B, its configured flow table can also match request traffic with gateway MAC addresses and hand it over to the local virtual router vRouter B for processing. Therefore, under normal circumstances, the virtual routers of each site will send request traffic to the outside through their respective local egress points, such as... Figure 2 The path 201 is shown in the diagram.

[0033] Through this mechanism, when terminal nodes within a site access external networks, their request traffic is directed to the site's virtual router and then sent out from the site's local exit. This achieves local gateway priority, ensures that traffic is forwarded to the nearest available location, avoids east-west or north-south traffic from having to detour through cross-site links under normal conditions, maximizes the use of local bandwidth resources, and reduces transmission latency.

[0034] In step S103, when the fault switching conditions are detected, the network control device configures the flow table of the local virtual machine network of the first site from the first flow table information to the second flow table information, so that the terminal nodes in the first site can, without modifying the gateway location information of the local virtual machine network of the first site, import traffic into the VXLAN gateway of the first site according to the second flow table information, send it to the VXLAN gateway of the second site through the cross-site tunnel, and forward the request traffic through the virtual router and local egress of the second site.

[0035] When the network control device detects an outbound failure or other anomalies that meet preset switching conditions at the first site (e.g., site A), it triggers the gateway switching process, modifying the flow table configuration information from the first flow table information to the second flow table information. At this time, the flow table can match the request traffic to the gateway MAC address, and the traffic is handed over to the VXLAN gateway of this site for processing, instead of being handled by the virtual router of this site. After receiving the request traffic, the VXLAN gateway of site A sends the request traffic to the VXLAN gateway of the second site B through a cross-site tunnel, and further sends it to the virtual router of the second site B. Finally, it exits from the local outbound port of the second site B, such as... Figure 2 The path 202 is shown in the diagram.

[0036] This process is entirely completed by the network control device on the control plane. The terminal node does not need to modify the gateway location information of the local virtual machine network, nor does it need to be aware of the underlying topology changes, thus truly achieving seamless fault takeover for the business.

[0037] Therefore, through the above steps, the solution of this application embodiment utilizes the physical isolation characteristics of the local virtual machine network to ensure traffic localization and fault domain isolation under normal conditions. At the same time, it utilizes the centralized dynamic orchestration of traffic paths by the network control device to achieve seamless cross-site migration of gateway service capabilities under fault conditions. This not only solves the technical problem of balancing high availability and traffic optimization of gateways in multi-site networks, but also provides better cross-site disaster recovery capabilities for upper-layer services.

[0038] As an optional implementation, the failover conditions may include: the local egress of the first site is unavailable, the cross-site channel between the first and second sites is available, and the virtual router and local egress of the second site are available. Specifically, when determining that the failover conditions are met, the network control device must simultaneously complete the above-mentioned pre-verifications. The unavailability of the local egress of the first site is a necessary prerequisite for triggering the failover; the availability of the cross-site channel ensures the physical connectivity of the backup path, preventing traffic loss after the failover due to inter-site link interruption; and the availability of the virtual router and local egress of the second site ensures that the second site, as the backup channel, has actual traffic carrying capacity, avoiding switching traffic to a site that is also in a faulty state. Only when all three conditions are met simultaneously is the failover condition deemed met. This multi-verification mechanism effectively avoids frequent jittering failovers caused by false alarms from single-point detection and eliminates secondary service interruptions caused by switching to an invalid backup path, significantly improving the accuracy and reliability of disaster recovery decisions.

[0039] In addition, another failover condition can be set, namely, pre-configuring a corresponding backup site policy for each site. When a first site is allowed to use the backup site as the exit and the aforementioned three failover conditions are met, the switch will be executed. The exit path can be switched by modifying the flow table configuration information.

[0040] As an optional implementation, to ensure the determinism and security of the gateway switching process, this application introduces an explicit gateway state machine management mechanism. The gateway state can include the following four types: local_active, failover, remote_active, and failback.

[0041] Under normal conditions, the network control device sets the gateway state of the first site to locally active. In this state, the flow table of the first site's local virtual machine network is configured with first flow table information, and terminal nodes forward traffic through the local gateway (i.e., the virtual router of this site). This is a steady-state operating mode of this scheme. When the aforementioned failover conditions are detected, the network control device will first change the gateway state of the first site from locally active to failover state. This failover state is an intermediate transitional state, essentially reserving an atomic time window for control plane operations. During this window, the network control device will configure the flow table of the first site's local virtual machine network from first flow table information to second flow table information, and update the configuration information related to the forwarding path according to the principle of establishing new paths first and then canceling old paths. This design fundamentally prevents loops, black holes, or the simultaneous use of multiple exits during the failover period, ensuring strict timing consistency between control plane commands and data plane behaviors.

[0042] After completing the above transition process, the network control device configures the flow table of the local virtual machine network of the first site from the first flow table information to the second flow table information, and then sets the gateway status of the first site from the failover state to the remote active state. In the remote active state, the default gateway IP address and gateway MAC address of the terminal nodes within the first site remain unchanged.

[0043] At this time, the network control device has configured the flow table of the local virtual machine network of the first site from the first flow table information to the second flow table information. Therefore, without modifying the gateway location information of the first site, the terminal nodes in the first site will import the traffic into the VXLAN gateway of the first site according to the second flow table information, send it to the VXLAN gateway of the second site through the cross-site tunnel, and forward the request traffic through the virtual router and local egress of the second site.

[0044] This process allows the terminal nodes at the first site to transparently utilize the egress resources of the second site to maintain business continuity without modifying their own network configuration. Through state machine-driven flow table configuration, the service interruption time during failover can be effectively shortened.

[0045] After the fault is cleared, the solution in this application embodiment also supports an automated traffic rollback mechanism. When the fault recovery conditions are detected, the network control device configures the flow table of the local virtual machine network of the first site from the second flow table information to the first flow table information, so that the terminal nodes in the first site forward the request traffic through the virtual router and local egress of the first site according to the first flow table information.

[0046] The fault recovery conditions can include the first site's local egress returning to normal and operating stably for more than a preset observation time threshold to prevent repeated oscillations caused by link instability. Similar to the fault handover process, the switchback operation also follows a strict state machine transition sequence: the network control device first changes the gateway state of the first site from remotely active to fault-recovered. In this state, following the principle of establishing new paths first and then canceling old paths, the configuration information related to the forwarding paths is updated, causing the network control device to configure the flow table of the first site's local virtual machine network from the first flow table information to the second flow table information. Then, the gateway state is set back from fault-recovered to locally active.

[0047] This state machine design ensures that both fault initiation and fault return avoid potential momentary routing loops or gateway response loss during the return process, guaranteeing the smoothness and stability of business traffic as it returns to the optimal local path.

[0048] As an optional implementation, the network control device maintains network reachability information for terminal nodes within a site, including the terminal's IP address and MAC address. In response to a terminal node's publish or withdraw event, the network control device can publish or withdraw the terminal node's network reachability information to a remote site.

[0049] like Figure 3As shown, when a virtual machine is created, activated, or deployed within site A, the cloud-based SDN controller sends network reachability information, including the binding relationship between the terminal's IP address and MAC address, to the site's SDN agent. The site's SDN agent creates a logical port (Segment Port) for the virtual machine's network interface card in the local virtual machine network and then reports the network reachability information to the SDN controller. After confirming that the virtual machine belongs to the same cross-site tenant network's interconnection domain, the SDN controller proactively publishes this network reachability information to the network control component of the remote site (such as site B).

[0050] After receiving the published information, site B writes it into its local endpoint reachability table or equivalent forwarding table. The technical essence of this process is to establish a precise location index in the control plane, so that when an end node within site B needs to access the same end node in site A, site B can directly encapsulate the traffic and redirect it to the cross-site channel based on the table entries.

[0051] When virtual machines or other endpoints undergo withdrawal events such as deletion, migration, port stopping, or forced withdrawal, the SDN agent at the endpoint's location reports an endpoint withdraw message. At this point, the SDN controller can send a withdrawal command to the remote site, instructing the remote site to delete the corresponding endpoint reachability entry. Figure 4 As shown.

[0052] However, in real-world distributed systems, there is often a significant time lag between the issuance of the control plane revocation command and the actual clearing of data plane forwarding table entries. To address the potential communication anomalies caused by this, this application introduces a hold-and-wait mechanism. After the network control device revokes the network reachability information of a terminal node from the remote site, it enters a hold-and-wait state; only after the corresponding waiting time in this hold-and-wait state has elapsed is the terminal IP address in the revoked network reachability information allowed to be reallocated.

[0053] Specifically, the hold-down window value can be set according to the needs of the actual scenario; for example, it can usually be slightly larger than the maximum transmission delay of the cross-site channel. The fundamental reason for setting this mechanism is to prevent momentary routing loops or misdelivered packets caused by the rapid reuse of revoked terminal IP addresses. For example, suppose terminal node X (IP 192.168.1.20) of site A is deleted. If the system immediately assigns this IP address to a newly created terminal node Y, and the boundary node of site B has not yet completed clearing the forwarding table entries of the old terminal node X, then traffic sent by site B to 192.168.1.20 will still be incorrectly directed to the location of the no longer existing terminal node X, or dropped due to MAC address mismatch. By forcibly entering the hold-down state, the system ensures that the terminal IP address is frozen until the entire network data plane is fully converged and the old path is completely invalidated, thereby eliminating the security risks caused by the timing inconsistency between the control plane and the data plane from the root and improving the reliability of the solution.

[0054] In scenarios where multiple sites share the same network segment, to avoid address conflicts and improve allocation efficiency, this application proposes an address management strategy based on a combination of site range partitioning and global deduplication in the control plane. As an optional implementation, when the network control device maintains the network reachability information of terminal nodes within a site, it can configure different automatic address allocation ranges for different sites belonging to the same cross-site tenant network. This allows for the allocation of usable terminal IP addresses to terminal nodes manually or automatically based on the automatic address allocation range corresponding to the site where the terminal node is located.

[0055] like Figure 5 As shown, a cross-site tenant network can logically appear as a unified CIDR (Classless Inter-Domain Routing) segment (e.g., 192.168.1.0 / 24). However, at the physical implementation level, the network control device divides the available address space of this segment into multiple non-overlapping sub-ranges and assigns them to the corresponding sites. For example, site A is configured to use 192.168.1.2 to 192.168.1.100 as the automatic allocation range, while site B is configured to use 192.168.1.101 to 192.168.1.200 as the automatic allocation range. In addition, the system reserves a portion of addresses as reserved addresses (such as network addresses, broadcast addresses, gateway addresses, etc.), which do not participate in automatic allocation.

[0056] It should be understood that the above address range division is only an example. In actual deployment, the range size can be dynamically adjusted according to the expected capacity of each site, and even the configuration of non-contiguous address blocks can be supported, as long as there is no overlap between the automatically allocated ranges of different sites.

[0057] When actually allocating terminal IP addresses, either manual or automatic methods can be used. In automatic allocation mode, such as... Figure 6 As shown, when a user creates a new virtual machine (VM) on site A without specifying an IP address, the network control device will select the automatic address allocation range corresponding to site A based on the site where the VM is located. Then, it will search for an unused IP address (e.g., 192.168.1.20) within this automatic address allocation range.

[0058] To ensure address uniqueness during this process, the system not only checks IP occupancy within the automatic address allocation range of site A, but also queries the control plane records of cross-site tenant networks to deduplicate IP addresses and determine available terminal IP addresses. The control plane records here refer to a global state database centrally maintained by the network control device, encompassing information such as allocated IPs, reserved IPs, statically bound IPs, and IPs in migration for all sites. Only when a candidate IP address is both within the automatic address allocation range of the current site and not occupied in the global control plane records will the system officially allocate it to the newly created virtual machine (VM) and synchronously update the global records. This mechanism effectively prevents address duplication issues caused by inter-site state synchronization delays or inconsistent local caches.

[0059] For scenarios where IP addresses are manually specified, such as Figure 7 As shown, when a user creates a virtual machine (VM) on site A and manually specifies an IP address (e.g., 192.168.1.150), the system first verifies whether the IP address falls within the CIDR range of the entire cross-site tenant network. It then queries control plane records to remove duplicates, confirming that the IP address is not an already assigned, reserved, statically bound, or migrating IP. If the IP address is already in use, creation is directly rejected and a conflict warning is returned. If the IP address is not in use, it further determines whether it falls within the automatic address allocation range of site A. If it does, creation of the VM is directly allowed. If it does not, for example, if it falls within the automatic address allocation range of site B, creation is still allowed, but the IP address will be marked as a "manually cross-range address".

[0060] In this way, on the one hand, by limiting the scope of automatic allocation, the address ordering and localization performance of most routine services are guaranteed. On the other hand, by opening up the ability to manually specify cross-scope and supplementing it with forced global deduplication, the address flexibility needs of operation and maintenance personnel in special scenarios (such as business migration, fault recovery, and specific application binding) are met. At the same time, the risk of address conflicts caused by human configuration errors is completely avoided, and zero-conflict address management is achieved when terminal nodes are created and published. This provides a way to manage IP addresses for multi-site tenant networks that takes into account high performance, high availability and high security.

[0061] As an optional implementation, the solution in this application embodiment can achieve cross-network segment interconnection. In real-world scenarios, services of the same tenant in different regions may be deployed in different networks. Therefore, the sites deployed for these services will have different network segments. In this case, sites in two different network segments need to achieve east-west interconnection through an internal cross-network segment forwarding path, bypassing the external north-south exit. Specifically, an internal relay network segment can be configured for local virtual machine networks in different network segments, and these local virtual machine networks in different network segments have different gateway IP addresses. Then, a cross-network segment forwarding policy is configured so that terminal nodes in local virtual machine networks in different network segments forward request traffic through a cross-network segment forwarding path. The cross-network segment forwarding path sequentially includes a terminal node of a third site, a virtual router of a third site, a VXLAN gateway of a third site, a VXLAN gateway of a fourth site, a virtual router of a fourth site, and a terminal node of a fourth site. Among these, the third and fourth sites are local virtual machine networks in different network segments, and the virtual router and VXLAN gateway forward request traffic through the internal relay network segment.

[0062] The third site can be a local site that needs to forward request traffic across network segments, while the fourth site can be a remote site that helps the third site forward request traffic across network segments. Figure 8As shown, site A is the third site, and its network segment (segment A) is 10.211.1.0 / 24. Site B is the fourth site, and its network segment (segment B) is 10.212.1.0 / 24. The two sites cannot directly communicate using the method described in the previous embodiment of modifying the flow table from the first flow table information to the second flow table information. In this case, the network control device configures a dedicated internal transit network segment (transit) within the virtual machine networks of both sites. The virtual routers within the virtual machine networks of the sites are connected to the VXLAN gateways via the internal transit network segment to forward request traffic. Therefore, the internal cross-segment packet path between virtual machine A at site A and virtual machine B at site B is: Virtual Machine A → Segment A → vRouter A → VXLAN Gateway A → Cross-site VXLAN Tunnel → VXLAN Gateway B → vRouter B → Segment B → Virtual Machine B, as follows. Figure 2 The path 203S is shown in the diagram.

[0063] This interconnection architecture based on internal relay network segments enables east-west traffic across network segments to be internally forwarded between multiple sites via cross-site channels, without needing to detour through the external network via north-south exits.

[0064] This design brings multiple technical benefits: First, it significantly reduces external egress bandwidth costs, allowing expensive egress resources to focus on genuine north-south internet access services; second, it significantly reduces network latency for cross-segment service interactions, improving the overall response performance of distributed applications; and third, it enhances data transmission security because sensitive tenant internal traffic is always confined to the controlled internal infrastructure, avoiding the risk of exposure to public networks or untrusted areas.

[0065] As an optional implementation, the solution of this application embodiment can be extended to scenarios with multiple independent control domains. For example, each site can have an independent control domain, and the network control device includes a central control device and a site agent control device corresponding to each site. The relevant information of the network control device is synchronized through the central control device and the site agent control device.

[0066] To support such scenarios, the network control device architecture can adopt a central + agent model. The central control device acts as the global coordinator and state arbitrator across sites, responsible for maintaining a global view of the cross-site tenant network interconnection domain, gateway state machines, and global location indexes of terminal nodes. Site agent control devices deployed at each site act as the execution agent for that site. On the one hand, they report local terminal node creation, deletion, and migration events to the central control device; on the other hand, they receive cross-site forwarding policies and gateway declaration instructions from the central control device and convert them into configuration commands recognizable by the local controller. This layered and decoupled design decouples the upper-layer cross-site business logic from the lower-layer site infrastructure. Regardless of the specific technology used within each site, as long as the site agent control device can complete protocol adaptation and semantic conversion, it can seamlessly access the unified cross-site interconnection system, effectively improving the applicability of the solution.

[0067] Based on the same inventive concept, this application also provides a computing device corresponding to the method of network interconnection and gateway switching in the multi-site network described in the foregoing embodiments, and its problem-solving principle is similar to that of the method. The computing device provided in this application includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to implement the methods and / or technical solutions of the various embodiments of this application described above.

[0068] In particular, the methods and / or embodiments in this application can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by a processing unit, it performs the functions defined in the methods of this application.

[0069] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0070] In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

[0071] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0072] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0073] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The aforementioned computer-readable medium carries one or more computer program instructions, which may be executed by a processor to implement the methods and / or technical solutions of the various embodiments of this application.

[0074] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, a magnetic or optical drive, a floppy disk, or similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0075] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order. The numerical order of the sequence numbers corresponding to the steps does not indicate any specific execution order; the steps may be executed in any combination of orders provided that the execution logic is met.

Claims

1. A method for network interconnection and gateway switching in a multi-site network, characterized in that, The method includes: Create independent local virtual machine networks for multiple sites belonging to the same cross-site tenant network, and configure the same gateway location information for each local virtual machine network, including gateway IP address and gateway MAC address; Under normal conditions, the network control device configures the flow table of the local virtual machine network of the first site as the first flow table information, so that the terminal nodes in the first site can forward request traffic through the virtual router and local egress of the first site according to the first flow table information. When the failover conditions are met, the network control device configures the flow table of the local virtual machine network of the first site from the first flow table information to the second flow table information. This allows the terminal nodes in the first site to import traffic into the VXLAN gateway of the first site according to the second flow table information without modifying the gateway location information of the local virtual machine network of the first site. The traffic is then sent to the VXLAN gateway of the second site through the cross-site tunnel and forwarded through the virtual router and local egress of the second site.

2. The method according to claim 1, characterized in that, The fault switching conditions include: The local egress of the first site is unavailable, the cross-site channel between the first site and the second site is available, and the virtual router and local egress of the second site are available.

3. The method according to claim 1, characterized in that, The method further includes: When the fault recovery conditions are met, the network control device configures the flow table of the local virtual machine network of the first site from the second flow table information to the first flow table information, so that the terminal nodes in the first site can forward request traffic through the virtual router and local egress of the first site according to the first flow table information.

4. The method according to claim 3, characterized in that, The method further includes: Under normal conditions, the network control device sets the gateway status of the first site to the locally active state; When the failover conditions are met, the network control device changes the gateway status of the first site from the local active state to the failover state. After the network control device configures the flow table of the local virtual machine network of the first site from the first flow table information to the second flow table information, it changes the gateway status of the first site from the failover state to the remote active state. When the fault recovery conditions are detected, the network control device changes the gateway status of the first site from the remote active state to the fault recovery state. After the network control device configures the flow table of the local virtual machine network of the first site from the second flow table information to the first flow table information, it changes the gateway status of the first site from the fault recovery state to the local active state.

5. The method according to claim 1, characterized in that, The method further includes: The network control equipment maintains network reachability information for terminal nodes within the maintenance site, the network reachability information including terminal IP address and terminal MAC address; In response to a publish or withdraw event from a terminal node, the network control device publishes or withdraws the network reachability information of the terminal node to a remote site.

6. The method according to claim 5, characterized in that, The network reachability information of terminal nodes within the network control equipment maintenance site includes: Configure different automatic address allocation ranges for different sites within the same cross-site tenant network; Based on the automatic address allocation range corresponding to the site where the terminal node is located, an available terminal IP address is allocated to the terminal node in a manual or automatic manner.

7. The method according to claim 6, characterized in that, When assigning available terminal IP addresses to the terminal nodes manually or automatically, the control plane records of the cross-site tenant network are queried to deduplicate IP addresses and determine the available terminal IP addresses.

8. The method according to claim 5, characterized in that, The method further includes: After the network control device withdraws the network reachability information of the terminal node from the remote site, it enters a hold-and-wait state. After the waiting time corresponding to the hold-and-wait state has elapsed, the terminal IP address in the network reachability information that allows revocation will be reallocated.

9. The method according to claim 1, characterized in that, The method further includes: Configure internal relay network segments for local virtual machine networks of different network segments, wherein the local virtual machine networks of different network segments have different gateway IP addresses; Configure a cross-network segment forwarding policy to enable terminal nodes of local virtual machine networks in different network segments to forward request traffic via a cross-network segment forwarding path. The cross-network segment forwarding path sequentially includes a terminal node of a third site, a virtual router of a third site, a VXLAN gateway of a third site, a VXLAN gateway of a fourth site, a virtual router of a fourth site, and a terminal node of a fourth site. The third site and the fourth site are local virtual machine networks in different network segments. The virtual router and the VXLAN gateway forward request traffic through an internal relay network segment.

10. The method according to claim 1, characterized in that, Each site has an independent control domain. The network control equipment includes a central control device and site agent control devices corresponding to each site. The relevant information of the network control equipment is synchronized through the central control device and the site agent control devices.

11. A computing device, the device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein, When the computer program instructions are executed by the processor, the device is triggered to perform the method of any one of claims 1 to 10.

12. A computer-readable medium having stored thereon computer program instructions that can be executed by a processor to implement the method as described in any one of claims 1 to 10.