A method, device and equipment for generating an address forwarding table based on edge nodes
By generating address forwarding tables based on edge nodes in the cloud computing environment, the problem of unavailability of cloud services is solved, the reliability and accuracy of address forwarding tables are achieved, and network conflicts caused by split brains are avoided.
Patent Information
- Application Number
- CN202411708297.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In a cloud computing environment, cloud services deployed stand-alone machines are easily unavailable due to hardware failures, network failures or power failures, making it difficult to ensure reliability of address forwarding tables.
A method for generating address forwarding tables based on edge nodes is proposed. By obtaining packets carrying the network address of the disaster recovery backup group and the physical address of the edge node, querying the address forwarding table, determining the validity of the packets, and updating the address forwarding tables according to the validity, to avoid the problem that the same network address corresponds to different physical addresses.
By updating the address forwarding table, this method avoids network conflicts and repeated packet forwarding caused by split brains, and improves the reliability and accuracy of address forwarding.
Smart Images

Figure CN119232633B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of server technology, and in particular to a method, device and equipment for generating an address forwarding table based on an edge node. Background Art
[0002] With the popularization of cloud computing, a large number of enterprise users have deployed services on cloud servers. Due to the complexity of cloud computing networks and the robustness of their own businesses, the deployed cloud services often become unavailable. Especially for single-machine deployment scenarios, cloud services may become unavailable due to hardware failures, network failures, power failures, and other reasons.
[0003] In order to solve this problem, cloud server redundant deployment is usually adopted, and redundant protocols are used between servers to implement active and standby redundant services. The introduction of active and standby redundant services requires the generation of corresponding address forwarding tables to ensure the reliability of data packet forwarding in the network. Based on this, it is necessary to provide a method for generating an address forwarding table. Summary of the invention
[0004] In view of this, the present disclosure provides a method, apparatus and device for generating an address translation table based on an edge node, so as to solve the problem of generating an address translation table on an edge node.
[0005] In a first aspect, the present disclosure provides a method for generating an address forwarding table based on an edge node, the method comprising:
[0006] Obtain a first message, the first message carrying a network address of a disaster recovery backup group and a physical address of a first edge node, the disaster recovery backup group includes at least two nodes, and the first edge node is one of the at least two nodes;
[0007] Querying an address forwarding table based on the network address of the disaster recovery backup group in the first message;
[0008] If there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group in the address forwarding table, and the physical address in the first forwarding table entry is different from the physical address in the first message, the validity of the first message is determined based on the configuration information of the disaster recovery backup group, and the first forwarding table entry is used to characterize the mapping relationship between the network address of the disaster recovery backup group and the physical address of the second edge node in the disaster recovery backup group;
[0009] The first message is processed based on a validity determination result of the first message to update the address forwarding table.
[0010] In a second aspect, the present disclosure further provides a device for generating an address transfer table based on an edge node, the device comprising:
[0011] An acquisition module, configured to acquire a first message, wherein the first message carries a network address of a disaster recovery backup group and a physical address of a first edge node, the disaster recovery backup group includes at least two edge nodes, and the first edge node is one of the at least two edge nodes;
[0012] A query module, configured to query an address forwarding table based on the network address of the disaster recovery backup group in the first message;
[0013] A determination module, for determining the validity of the first message based on the configuration information of the disaster recovery backup group if there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group in the address forwarding table, and the physical address in the first forwarding table entry is different from the physical address in the first message, wherein the first forwarding table entry is used to characterize the mapping relationship between the network address of the disaster recovery backup group and the physical address of the second edge node in the disaster recovery backup group;
[0014] A processing module is used to process the first message based on the validity determination result of the first message to update the address forwarding table.
[0015] In a third aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, the memory and the processor being connected, the memory storing computer instructions, and the processor executing the computer instructions to execute the method for generating an address translation table based on an edge node according to the first aspect or any corresponding embodiment thereof.
[0016] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for generating an address translation table based on an edge node according to the first aspect or any corresponding embodiment thereof.
[0017] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the method for generating an address translation table based on an edge node according to the first aspect or any corresponding embodiment thereof.
[0018] The method for generating an address forwarding table provided in this embodiment obtains a first message carrying a network address of a disaster recovery backup group and a physical address of a first edge node, wherein the first message is sent by the first edge node, and the first edge node is a node belonging to the disaster recovery backup group. After obtaining the first message, the address forwarding table is queried based on the network address of the disaster recovery backup group in the first message. Since the address forwarding table is used to store the mapping relationship between the network address and the physical address, the address forwarding table can be queried using the network address of the disaster recovery backup group to determine whether a forwarding table entry corresponding to the network address of the disaster recovery backup group already exists in the address forwarding table.
[0019] If there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group, it means that there is a mapping relationship between the network address of the disaster recovery backup group and the physical address of a node in the disaster recovery backup group in the address forwarding table. If the physical address in the first forwarding table entry is different from the physical address in the first message, it means that the first edge node from which the first message comes is different from the node corresponding to the physical address in the first forwarding table entry. In this case, the validity of the first message is determined by the configuration information of the disaster recovery backup group, and then the first message is processed based on the result of the validity determination of the first message to update the address forwarding table, instead of directly replacing the first forwarding table entry with the mapping relationship between the network address and the physical address in the first message.
[0020] The method disclosed in the present invention processes the first message by determining the validity result of the first message, and directly updates the address forwarding table entry by using the mapping relationship between the network address and the physical address in the received first message, thereby avoiding the same network address in the forwarding table entry corresponding to different physical addresses, ensuring the reliability of the address forwarding table, and at the same time, improving the accuracy of subsequent data forwarding based on the address forwarding table. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 is a schematic diagram of a cloud network system architecture according to an embodiment of the present disclosure;
[0023] Figure 2 is a flow chart of another method for generating an address forwarding table according to an embodiment of the present disclosure;
[0024] Figure 3 is a schematic diagram of a primary and standby redundant node according to an embodiment of the present disclosure;
[0025] Figure 4 is a flow chart of another method for generating an address forwarding table according to an embodiment of the present disclosure;
[0026] Figure 5 is a scenario schematic diagram of a virtual network system according to an embodiment of the present disclosure;
[0027] Figure 6 It is a flowchart of a method for processing a GARP message according to an embodiment of the present disclosure;
[0028] Figure 7 is a structural block diagram of a device for generating an address transfer table according to an embodiment of the present disclosure;
[0029] Figure 8 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0031] The technical solution of the embodiment of the present disclosure can be applied to the application scenario of routing table item forwarding on edge devices or edge nodes, for example, it is applicable to routing table item forwarding in a cloud server.
[0032] Among them, edge devices or edge nodes are logical abstractions of the basic common capabilities of various edge-side product forms such as edge gateways, edge controllers, and edge servers. These product forms have common capabilities such as real-time data analysis, local data storage, and real-time network connection. Edge nodes are located at the edge of the network, close to users or data sources, and are used to provide fast data transmission, processing, computing, and storage services.
[0033] The above edge device or edge node may also be a switch, a router, etc. connecting two or more edge devices / edge nodes, and the forwarded routing table entry includes the network address of each edge device / edge node.
[0034] In traditional physical networks, network devices (such as switches and routers) and network resources (such as IP addresses and subnets) are configured and managed based on physical devices and topological structures. In order to improve the utilization of network resources, the deployment and management of large-scale network devices are simplified, so that network devices and resources can be created, configured and managed in a logical manner.
[0035] like Figure 1As shown, a schematic diagram of a cloud network system architecture provided in this embodiment. The system architecture diagram includes: a network controller, at least one server or server cluster, and a switch or a router. In addition, the system may also include other network devices, such as network device 1, network device 2, and network device 3, each of which is connected to the connection layer through a NIC (Network Interface Controller), the connection layer is connected to the server, and the server is connected to the switch or router through another NIC, such as NIC 4.
[0036] The network controller may be a computing node or a computing unit. The network devices 1 to 3 may be edge nodes or edge devices, and the above network includes but is not limited to a content delivery network (Content Delivery Network, CDN).
[0037] It should be understood that in this embodiment Figure 1 Other network devices or nodes in the system shown may also be other nodes / devices based on edge computing, which is not limited in this embodiment.
[0038] In general scenarios, there is a master-slave redundancy relationship between at least two network devices. For example, there is a master-slave redundancy relationship between network device 1 and network device 2. Assume that network device 1 is the master node, responsible for receiving and processing data packets from the target host. Network device 2 is the backup node, responsible for monitoring the status of the master node and taking over the work of the master node when the master node fails.
[0039] In the redundant relationship between the master and backup nodes, a split brain problem may actually occur. Split brain refers to when the communication link between the master and backup nodes fails or is delayed, which may cause the master and backup nodes to declare themselves as the master node at the same time, causing network instability and conflict. Among them, the split brain problem may be caused by the following situations:
[0040] First, communication link failure: When the communication link between the primary and backup nodes fails, they cannot perform status synchronization and heartbeat detection normally, which may cause two devices to declare themselves as the primary node at the same time.
[0041] Second, network delay: If the communication link delay between the primary and backup nodes is too high, it may cause both parties to be unable to detect each other's state changes in time, resulting in two independent primary nodes.
[0042] When a brain split occurs, the active and standby nodes simultaneously declare themselves as active nodes, and send messages to the forwarding device respectively, carrying the mapping relationship between the network address of the redundant backup group where the active and standby nodes are located and their own physical addresses. The forwarding device writes the mapping relationship in the message into the address forwarding table. Accordingly, the same network address corresponds to different physical addresses in the address forwarding table, which may cause conflicts or repeated forwarding of data packets in the network.
[0043] In order to solve the problem of generating address forwarding, this embodiment provides a method for generating an address forwarding table based on an edge node, which can be applied to Figure 1 The connection layer shown in FIG. An address forwarding table is set on the connection layer, such as an ARP (Address Resolution Protocol) cache table. The ARP cache table is used to store the mapping relationship between the network (IP) address and the physical (MAC) address. Before sending data, the forwarding device will first search the ARP cache table. If the MAC address of the other device exists in the cache table, the MAC address is directly used to encapsulate the frame and then the frame is sent out. If the corresponding information does not exist in the cache table, it is obtained by sending an ARP request message. The mapping relationship between the obtained IP address and MAC address will be stored in the ARP cache table for a period of time. During the validity period, the device can directly search for the destination MAC address from this ARP cache table to encapsulate data without performing an ARP query. When the validity period expires, the ARP table entry will be automatically deleted. If the target device is located in another network, the source device will search for the MAC address of the gateway in the ARP cache table, and then send the data to the gateway, which will then forward the data to the destination device.
[0044] ARP packets are an important part of the TCP / IP protocol suite. ARP packets are mainly used to resolve the IP address of the network layer into the physical address (i.e., MAC address) of the link layer, thereby achieving the correct transmission of data frames in the local area network.
[0045] See also Figure 2 , is a schematic diagram of a flow chart of generating an address transfer table based on an edge node provided by an embodiment of the present disclosure, the method comprising:
[0046] Step S101: Obtain a first message, where the first message carries a network address of a disaster recovery backup group and a physical address of a first edge node.
[0047] The disaster recovery backup group includes at least two nodes, and the first edge node is one of the at least two edge nodes. Figure 3As shown in the figure, there are three nodes, PC1, PC2 and PC3. Each node has its own IP address and MAC address, and each node also has an interface GE0 for connecting to other PCs. For the disaster recovery backup group composed of PC2 and PC3, it also has an IP address for the disaster recovery backup group, that is, Figure 3 Highly Available Virtual IP (HAVIP) as shown in .
[0048] The IP address and MAC address corresponding to PC2 are IP address 2 and MAC address 2 respectively; the IP address and MAC address corresponding to PC3 are IP address 3 and MAC address 3 respectively. PC2 and PC3 are two redundant backup nodes. When the first message is sent by PC2, the first message carries MAC address 2 and a highly available virtual IP; when the first message is sent by PC3, the first message carries MAC address 3 and a highly available virtual IP.
[0049] In this example, PC2 is assumed to be the primary node and PC3 is the backup node. The network address of the disaster recovery backup group shared by these two nodes is the HAVIP address, such as 192.168.1.100. The MAC address 2 corresponding to this address is 00:00:00:00:00:02. For example, Table 1 shows the address forwarding table maintained in PC1 under normal scenarios.
[0050] Table 1. Address forwarding table of PC1 in normal scenario
[0051]
[0052] If the communication between PC2 and PC3 is abnormal, the backup node PC3 (as the first edge node) attempts to take over the network and upgrade to the master node. However, PC2 still believes that it is the master node after the failure restart, so PC2 and PC3 both compete to be the master node, which causes a split brain. Accordingly, PC2 and PC3 both carry highly available virtual IP and their respective physical addresses to send messages to PC1. At this time, for PC1, it learns that the MAC address corresponding to the IP address 192.168.1.100 is 00:00:00:00:00:02 or 00:00:00:00:00:03, that is, one IP address corresponds to two MAC addresses, causing a split brain. For example, Table 2 shows the address forwarding table maintained in PC1 in a split brain scenario.
[0053] Table 2: Address forwarding table of PC1 in split-brain scenario
[0054]
[0055] Step S102: query the address forwarding table based on the network address of the disaster recovery backup group in the first message.
[0056] The address forwarding table is the correspondence between the IP address, MAC address and interface of the device access recorded in the history. After obtaining the first message, the network address of the disaster recovery backup group carried in the first message is obtained accordingly, and the address forwarding table is queried using the network address to determine whether there is a forwarding table entry with the same network address in the address forwarding table, and further, determine whether the physical address in the forwarding table entry queried is the same as the physical address in the first message.
[0057] Continuing with the above example, the address forwarding table is queried to see whether there is a highly available virtual IP carried by the first message, that is, 192.168.1.00.
[0058] Step S103: If there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group in the address forwarding table, and the physical address in the first forwarding table entry is different from the physical address in the first message, the validity of the first message is determined based on the configuration information of the disaster recovery backup group.
[0059] The first forwarding table entry is used to represent the mapping relationship between the network address of the disaster recovery backup group and the physical address of the second edge node in the disaster recovery backup group. The configuration information of the disaster recovery backup group includes the working mode of the disaster recovery backup group, which includes the preemptive mode and the non-preemptive mode.
[0060] Determine whether there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group in the address forwarding table, including: determine whether there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group in the address forwarding table, and if so, determine whether the MAC address in the first forwarding table entry is the same as the physical address of the first edge node carried in the first message.
[0061] When it is determined that the physical address in the first forwarding table entry is different from the physical address in the first message, it can be explained that the current scenario is a split-brain scenario, and the validity of the first message needs to be further determined. At this time, the validity of the first message is analyzed in combination with the configuration information of the disaster recovery backup group. The configuration information of the disaster recovery backup is used to characterize the processing rules for the obtained messages in the split-brain scenario. For example, the working mode, priority, etc.
[0062] An optional implementation is that the network controller sends the configuration information of the disaster recovery backup group to the connection layer. After the connection layer obtains the configuration information, it determines whether the first edge node currently requested is in preemptive mode, such as by indicating a preset character. The character "1" indicates preemptive mode, and the character "0" indicates non-preemptive mode. If it is in preemptive mode, it means that the first edge node of the request expects to connect to the switch / router and preempt the current transmission link.
[0063] Step S104: Process the first message based on the validity determination result of the first message to update the address forwarding table.
[0064] Specifically, an implementation method includes: if the working mode is the preemptive mode, obtaining the priority of the first edge node and the second edge node in the configuration information; and determining the validity of the first message based on the comparison result of the priority of the first edge node and the second edge node.
[0065] The second edge node is a node currently transmitting services, or can be understood as a link occupying port resources. The priority of the second edge node and the first edge node refers to the priority of service transmission, which can be issued by the network controller through configuration information.
[0066] In addition, optionally, the configuration information also includes a keep-alive time of the first message. The keep-alive time can be customized by the system, and this embodiment does not limit this.
[0067] In a possible implementation, Figure 4 As shown, the above step S103 specifically includes:
[0068] Step S1031, determining whether the working mode of the disaster recovery backup group is the preemptive mode.
[0069] If yes, execute step S1032; if no, that is, the working mode is the non-preemptive mode, determine that the first message is invalid.
[0070] Step S1032: Obtain the priorities of the first edge node and the second edge node in the configuration information.
[0071] Step S1033: determine whether the priority of the first edge node is higher than the priority of the second edge node.
[0072] Step S1034: If yes, that is, higher than the priority of the second edge node, it is determined that the first message is valid.
[0073] Step S1035: If not, that is, the priority of the first edge node is lower than the priority of the second edge node, it is determined that the first message is invalid.
[0074] In addition, in the above step S104, the first message is processed based on the validity determination result of the first message to update the address forwarding table, which specifically includes:
[0075] Step S1041: Generate a second forwarding table entry based on the first message, and replace the first forwarding table entry with the second forwarding table entry to obtain an updated address forwarding table.
[0076] The second forwarding table entry is used to represent the network address of the disaster recovery backup group and the physical address of the first edge node. The original first forwarding table entry in the address forwarding table is updated to the second forwarding table entry, so that the first edge node forwards the service message according to the second forwarding table entry.
[0077] For example, in the event of a brain split, based on the original master-slave redundancy relationship and the mapping relationship shown in Table 1 or Table 2 above, select one of the two MAC addresses to establish a mapping relationship with HAVIP. For example, PC3 is used as the master node, and the MAC address 00:00:00:00:00:03 corresponding to PC3 is used as the MAC address for establishing the mapping relationship. The second forwarding table entry is generated and obtained, as shown in Table 3 below.
[0078] Table 3. Second forwarding table entry for PC1
[0079]
[0080] Among them, the second forwarding table entry includes the mapping relationship between the network address 192.168.1.100 of the disaster recovery backup group and MAC address 3. According to the mapping relationship shown in Table 3, it is 192.168.1.100 and 00:00:00:00:00:03, replacing the first forwarding table entry in the original address forwarding table: 192.168.1.100 and 00:00:00:00:00:02.
[0081] The method provided by this embodiment processes the first message by determining the validity result of the first message, and directly updates the address forwarding table entry by directly using the mapping relationship between the network address and the physical address in the received first message, thereby avoiding the same network address in the forwarding table entry corresponding to different physical addresses, ensuring the reliability of the address forwarding table, and improving the accuracy of subsequent data forwarding based on the address forwarding table. In the relationship between the two nodes of the disaster recovery backup group, the MAC address dimension based on the first edge node is introduced, and the configuration information of the disaster recovery backup group is obtained.
[0082] When a brain split occurs in the network, the address forwarding table is queried based on the network address of the disaster recovery backup group in the first message, and the validity of the first message is determined based on whether the physical address in the forwarding table item is the same as the physical address in the first message, as well as the configuration information. If the first message is determined to be valid, the address forwarding table is updated from the original first forwarding table item to the second forwarding table item, and the message is forwarded according to the second forwarding table item. Compared with directly updating the address forwarding table of the first edge node when the first message is received, this method can selectively access the target device, optimize the transmission conditions in subsequent different scenarios, and ensure the security and reliability of data message transmission.
[0083] In some embodiments, the above-mentioned step S102 specifically includes: using the network address of the disaster recovery backup group in the first message to query the address forwarding table; if there is a first forwarding table entry in the address forwarding table that is the same as the network address of the disaster recovery backup group, then comparing the physical address in the first forwarding table entry with the physical address in the first message to obtain a physical address comparison result.
[0084] In some embodiments, the method of step S103 further includes: if there is a first forwarding table item corresponding to the network address of the disaster recovery backup group in the address forwarding table, and the physical address in the first forwarding table item is the same as the physical address in the first message, then the first edge node of the request is a node in the current address forwarding table that is forwarding the service according to the first forwarding table item, and at this time, the validity information of the first forwarding table item is updated. The validity information includes: the expiration time of the first forwarding table item. For example, the validity time of the first forwarding table item is extended to keep the current service flow transmission.
[0085] Furthermore, the updating of the validity information of the first forwarding table item further includes: obtaining the validity information of each forwarding table item in the address forwarding table, wherein the validity information includes the most recent update time and the effective duration. Comparing the current time with the most recent update time to determine the update interval; if the update interval is greater than the effective duration, setting the corresponding forwarding table item in the address forwarding table to invalid.
[0086] In another specific implementation, the method provided in the above embodiment can also be applied to a virtual network architecture, such as Figure 5 As shown in the system architecture diagram, the system architecture includes a virtual network controller, at least one server and a switch or a router. Among them, the server 1 in the at least one server includes at least one virtual machine (virtual-server) and a virtualization layer (vSwitch) and an interface network card.
[0087] like Figure 5 As shown in the figure, server 1 includes three virtual machines, namely virtual machine 1 (virtual-server1), virtual machine 2 (virtual-server2) and virtual machine 3 (virtual-server3). These three virtual machines are connected to the same physical machine. Among them, virtual machine 1 is connected to the virtualization layer vSwitch through virtual network card 1 (vNIC1), virtual machine 2 is connected to the virtualization layer vSwitch through virtual network card 2 (vNIC2), and virtual machine 3 is connected to the virtualization layer vSwitch through virtual network card 3 (vNIC3).
[0088] The virtualization layer vSwitch is connected to the switch or router through the VXLAN through the virtual network interface vNIC. Among them, the virtual network controller is the central management component of the entire virtual network. It is responsible for controlling and coordinating the configuration and operation of network devices such as virtual switches, virtual routers and virtual firewalls. The virtual network controller is usually based on Software-Defined Networking (SDN) technology to provide centralized network management and programming interfaces.
[0089] A virtual switch is a component that provides switching functions in a virtualized environment. It is responsible for communication between virtual machines or containers and between virtual machines and the physical network. The virtual switch forwards data packets in the virtual network to the correct destination, implementing routing and forwarding of internal network traffic.
[0090] Virtual machines / containers are virtualized instances running in a virtualized environment. They host applications and services and communicate through virtual networks. Virtual machines and containers can be connected to virtual switches and virtual routers to achieve internal and external network connectivity through virtual networks.
[0091] A virtual router is a component that provides routing functions in a virtualized environment. It is responsible for communication between virtual networks and implements packet forwarding and routing selection between different subnets. A virtual router forwards packets from a source virtual network to a target virtual network based on routing tables and network policies.
[0092] At least two nodes included in the disaster recovery backup group are virtual machines. The first message carries the high-availability virtual network address of the disaster recovery backup group and the physical address of the first virtual machine. The first forwarding table entry is used to characterize the mapping relationship between the high-availability virtual network address of the disaster recovery backup group and the physical address of the second virtual machine.
[0093] In this embodiment, an ARP (Address Resolution Protocol) cache table is set on the virtualization layer vSwitch in each server.
[0094] The ARP cache table (ARP cache) is used to store the mapping relationship between IP addresses and MAC addresses. Before sending data, the device will first search the ARP cache table. If the MAC address of the other device exists in the cache table, the MAC address is directly used to encapsulate the frame and then the frame is sent out. If the corresponding information does not exist in the cache table, it is obtained by sending an ARP request message. The learned mapping relationship between IP addresses and MAC addresses will be stored in the ARP cache table for a period of time. During the validity period, the device can directly look up the destination MAC address from this ARP cache table to encapsulate data without performing an ARP query. When the validity period expires, the ARP table entry will be automatically deleted. If the target device is located in another network, the source device will look up the MAC address of the gateway in the ARP cache table, and then send the data to the gateway, which will then forward the data to the destination device.
[0095] When a brain split is detected in the system, a preset communication protocol is enabled to establish a master-slave redundancy relationship between at least two devices in the system. Specifically, a master-slave redundancy relationship between two or more devices is established based on VRRP (Virtual Router Redundancy Protocol).
[0096] Among them, the VRRP protocol dynamically assigns the responsibility of a virtual router to one of the VRRP routers on the LAN to achieve router redundancy and failover. When the master router fails, the backup router can automatically take over to ensure the continuity and stability of the network. In addition, VRRP also supports traffic load balancing, which improves network throughput and overall performance by evenly distributing traffic between the master and backup routers.
[0097] In this embodiment, the VRRP protocol implements master-slave check and master-slave election based on heartbeat. In the virtual network, the vSwitch virtual forwarding layer is introduced, which increases the complexity of the network. When a problem occurs in the heartbeat, the master node and the backup node will be upgraded to the master node and actively send GARP (Gratuitous ARP) packets to take over the network, thereby causing a brain split problem.
[0098] Combine the following Figure 6 , a method for generating an address translation table provided by this embodiment under a virtual network architecture is described in detail. Figure 6 As shown, the method includes:
[0099] Step S201: when receiving a GARP message, parse the GARP message to obtain a first IP address of a redundant backup group and a first MAC address of a first edge node.
[0100] The GARP message is a type of the first message. The GARP message is a special type of ARP message, which is used to broadcast the mapping information between the IP address and the MAC address of the host in the network, rather than to request the resolution of an unknown address. The GARP message is used to detect IP address conflicts. It notifies other devices in the network that a certain IP address has been occupied by a certain MAC address. It is also used to update virtual MAC addresses in certain network environments, such as dual-machine hot standby systems.
[0101] The triggering condition of step S201 is: triggered when the device is started, the IP address is changed, or a specific network event (such as hot standby switching) occurs.
[0102] The GARP message includes the IP address, MAC address and the mapping relationship between the redundant backup group. The above content can be obtained by parsing the GARP message.
[0103] Step S202, searching in the address forwarding table whether the first IP address exists. The address forwarding table includes a mapping relationship between at least one IP address and at least one MAC. If it exists, executing step S203, otherwise directly creating a forwarding table entry and recording the expiration time.
[0104] Step S203, determining whether the first MAC address is the same as the second MAC address.
[0105] There is an association relationship between the second MAC address and the first IP address in the address forwarding table, that is, they correspond to the first forwarding table entry.
[0106] In a high-availability architecture, high-availability software such as Keepalived usually uses the VRRP protocol to implement IP drift. The VRRP protocol allows a group of routers (which may be cloud servers in a cloud environment) to share a virtual IP address (ie, HAVIP), and uses a campaign mechanism to decide which router (or cloud server) will serve as the primary router (or primary node) to provide services to the outside world. When the primary router fails, the backup router will take over the virtual IP address and continue to provide services. In this process, the HAVIP forwarding table may need to be updated accordingly to reflect the MAC address of the new primary router.
[0107] Since the virtualization layer receives GARP messages sent by at least one virtual machine in the upper layer in real time during traffic transmission, the virtualization layer will update and store the mapping relationship between the IP address and MAC address sent by each virtual machine in real time, and generate the corresponding HAVIP forwarding table, that is, the forwarding table entry in the address forwarding table.
[0108] If the first MAC address is the same as the second MAC address, execute step S205; otherwise, execute step S204.
[0109] Step S204, determining the working mode and priority from the configuration information, and determining the target device according to the working mode and service priority.
[0110] Specifically, step S204 includes:
[0111] Step S2041, determining from the configuration information whether the working mode is the preemptive mode.
[0112] The working mode can be pre-configured by the virtual network controller and sent to the server through configuration information. The specific process is shown in the above embodiment and will not be repeated here. If it is the preemptive mode, step S2042 is executed; otherwise, step S2043 is executed.
[0113] Step S2042: Determine whether the priority of the service currently requested to be transmitted by the first edge node is higher than the service priority indicated in the first forwarding table entry.
[0114] The priority of the transmission service can also be carried by the configuration information. For example, in the above embodiment, it is assumed that the priority corresponding to the PC2 service is 100, and the priority corresponding to the PC3 service is 50. If the priority of the current requested transmission service is 100 for PC2, which is higher than the service priority 50 indicated in PC3, then step S206 is executed. Otherwise, step S2043 is executed.
[0115] Step S2043: determine to forward the message according to the current forwarding table entry, and discard the GARP message.
[0116] For example, if the service priority of PC2 that sends the GARP message is lower than the priority of the service data flow PC3 that is currently transmitting, it means that the service data flow of PC3 currently transmitting is superior to the service data flow of PC2 that is preempted. Therefore, the current transmission MAC address is not switched, and the service data flow is still transmitted between PC1 and PC3 according to PC3's MAC address 3 (for example, 00:00:00:00:00:03).
[0117] In addition, GARP messages of PC2 are silently discarded, thereby avoiding service flow switching.
[0118] Step S205, refreshing the expiration time.
[0119] Refresh the expiration time, that is, update the validity information of the first forwarding table entry. For example, if the first forwarding table entry includes the mapping relationship between PC2's MAC address 2 (00:00:00:00:00:02) and the IP address of the disaster recovery backup group (192.168.1.100), there is no need to switch and re-establish the mapping relationship, but the expiration time of the first forwarding table entry needs to be updated, such as postponed for one or more cycles.
[0120] Step S206: Replace the first forwarding table entry with the second forwarding table entry to generate a new address forwarding table. The new address forwarding table includes: a mapping relationship between the network address in the GARP message and the first MAC address and a corresponding expiration time.
[0121] For example, if the priority of the data stream requested by PC3 for service transmission is higher than that of PC2, which is currently transmitting the data stream, the MAC address 3 (00:00:00:00:00:03) corresponding to PC3 is used as the MAC address that establishes a mapping relationship with the IP address 192.168.1.100, and the second forwarding table entry is generated. The second forwarding table entry replaces the original first forwarding table entry and is written into the address forwarding table. At this time, the data stream will be transmitted from PC1 to PC3, and will be encapsulated in a frame by PC3's MAC address 3 before being transmitted to the next device.
[0122] It should be noted that all entries in the above-mentioned ARP cache table are driven by GARP packets / messages. When the virtualization layer first receives a GARP packet sent from a virtual machine, there is no creation record, so a new record needs to be created. When the GARP packets / messages sent by the virtual machine or other virtual machines are received subsequently, the generation history record will be stored and compared.
[0123] The method provided in this embodiment, when receiving a GARP message, queries whether there is a first forwarding table entry according to the address forwarding table, and determines the validity of the current GARP message in combination with whether the preemptive mode is turned on, the priority, and other contents in the configuration information, and then determines whether to switch the MAC address corresponding to the IP address of the current HAVIP, thereby effectively solving the problem of network oscillation after brain split. For example, when the current master node attempts to take over the network again, if the service transmission priority is low, the MAC address is not switched, and the MAC of the current backup device is still used to encapsulate frames and send data frames, thereby avoiding frequent network switching and solving the brain split problem.
[0124] In this embodiment, virtual-server1 (virtual machine 1) and virtual-server2 (virtual machine 2) are located on the same physical machine server1, and the VRRP protocol is enabled to implement the active-standby redundancy relationship. When the VRRP protocol works normally, the forwarding table assumes that the priority of virtual-server1 is higher than that of virtual-server2. The address forwarding table entries established are shown in Table 4 below.
[0125] Table 4. Normal address forwarding table
[0126]
[0127] When a split-brain occurs, the address forwarding table is shown in Table 5.
[0128] Table 5. Address forwarding table when split-brain occurs
[0129]
[0130] Among them, in Table 5, the MAC address of virtual machine 1 (virtual-server1 vNIC MAC address) and virtual machine 2 (virtual-server2 vNIC MAC address) both try to establish a mapping relationship with the IP address of HAVIP1. And both send GARP packets to the virtualization layer vSwitch, resulting in the VTEP IP address and vSwitch virtual port in the ARP cache table receiving GARP packets. In order to solve the brain split problem caused by continuous switching, the virtual network controller is used to add an expiration time field in the ARP cache table. The servers that enable VRRP to achieve active and standby redundancy are set with different priorities, and the preemption mode and GARP survival validity parameters are set, and the configuration is recorded in the virtual controller.
[0131] When VRRP split-brain occurs, all servers will broadcast GARP packets to the vSwitch to try to take over the HAVIP service; an expiration time field is added to the forwarding table.
[0132] In one embodiment, if the first GARP message currently sent by virtual-server 1 belongs to the preemptive mode. The preemptive mode is a standard configuration in the VRRP protocol and can be set by a preset field / character. Then, step S2042 is executed to obtain the priority of the service to be transmitted by virtual-server 1 and compare it with the priority of the second virtual machine (virtual-server 2) that is currently acquiring traffic.
[0133] If the priority of virtual machine 1 is less than that of virtual machine 2, execute step S2043. If the priority of virtual machine 1 is greater than that of virtual machine 2, execute step S206. In this embodiment, it is assumed that the priority is: virtual machine 1 < virtual machine 2, then the first GARP message is discarded, or the traffic request of the first GARP message is ignored, and the external traffic continues to be transmitted to the second virtual machine (virtual-server 2) according to IP2 written in the HAVIP forwarding table. If the priority comparison shows that virtual machine 1 < virtual machine 2, the IP address in the HAVIP forwarding table is updated to IP1, the HAVIP forwarding table entry is refreshed, and the expiration time is recorded. At this time, the first virtual machine obtains the traffic, and the external traffic from the router is transmitted to the first virtual machine to realize the switching of business data flow.
[0134] It should be understood that the method provided in this embodiment can also be used for GARP message requests of different virtual machines, such as Figure 5 As shown, the system further includes a second server (server 2), which also includes at least one virtual machine, such as virtual-server 4, and a second virtualization layer (vSwitch 2). The vSwitch 2 can be generated by configuring a host Hypervisor (virtual machine manager) 2. The Hypervisor 2 can run on a host operating system and access and manage physical resources through the host operating system.
[0135] The address forwarding table is a second HAVIP forwarding table, which communicates with vSwitch 1 in server 1 (server 1), and the communication adopts VRRP protocol. When the second virtualization layer (vSwitch 2) receives the second GARP message sent by the virtual machine of the second server (server 2), the validity of the second GARP message is determined according to the second HAVIP forwarding table and configuration information.
[0136] At this time, virtual-server3 and virtual-server4 are located on different physical machines server1 and server2, and the VRRP protocol is enabled to achieve active-standby redundancy. According to the address forwarding table when the VRRP protocol works normally, assuming that the priority of virtual-server3 is higher than that of virtual-server4, when the second GARP message sent from virtual-server4 is received, according to Table 6 and Table 7 below, a split-brain problem occurs, and vSwitch 1 and vSwitch 2 communicate with each other and perform the above steps S201 to S204. If it is determined that the second GARP message is invalid, the data frame encapsulation and forwarding will continue according to the address forwarding table, and the second GARP message from virtual-server4 will be silently discarded, thereby avoiding network switching.
[0137] Table 6. Normal address forwarding table
[0138]
[0139] Table 7. Address forwarding table when split-brain occurs
[0140]
[0141] The method for generating an address forwarding table based on edge nodes provided in this embodiment can effectively prevent brain splitting by using the highly available HAVIP in the virtual network. Specifically, according to the virtual network controller, the configurations such as priority and ARP expiration time are added to the HAVIP configuration item of the cloud virtual network to generate an updated address forwarding table. And when the GARP message broadcast is triggered, in the host virtualization network layer, according to the processing flow of the GARP message, after a series of judgments and processing such as GARP priority, expiration time, whether it is in preemptive mode, etc., the validity of the current request GARP message is finally determined, and according to whether to switch or update the forwarding table item, frequent switching of the network is avoided, the problem of brain splitting is solved, and the security and reliability of business data transmission are improved.
[0142] In the present embodiment, a generation device of an address transfer table is also provided, and this device is used to realize the above-described embodiment and preferred implementation mode, and the description thereof is omitted. As used below, the term "module" can realize the combination of software and / or hardware of predetermined functions. Although the device described in the following embodiments is preferably realized with software, hardware, or the realization of the combination of software and hardware is also possible and conceived.
[0143] This embodiment provides a device for generating an address transfer table based on an edge node, such as Figure 7 As shown, the device includes: an acquisition module 710, a query module 720, a determination module 730 and a processing module 740. In addition, the device may also include other more or fewer modules, such as a storage module, etc., which is not limited in this embodiment.
[0144] Among them, the acquisition module 710 is used to obtain a first message, which carries the network address of the disaster recovery backup group and the physical address of the first edge node. The disaster recovery backup group includes at least two nodes, and the first edge node is one of the at least two nodes.
[0145] The query module 720 is used to query the address forwarding table based on the network address of the disaster recovery backup group in the first message.
[0146] Determination module 730 is used to determine the validity of the first message based on the configuration information of the disaster recovery backup group if there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group in the address forwarding table, and the physical address in the first forwarding table entry is different from the physical address in the first message. The first forwarding table entry is used to characterize the mapping relationship between the network address of the disaster recovery backup group and the physical address of the second edge node in the disaster recovery backup group.
[0147] The processing module 740 is used to process the first message based on the validity determination result of the first message to update the address forwarding table.
[0148] Optionally, in some specific implementations, the configuration information of the disaster recovery backup group includes a working mode of the disaster recovery backup group, and the working mode includes a preemptive mode and a non-preemptive mode.
[0149] The determination module 730 is also used to obtain the priority of the first edge node and the second edge node in the configuration information if the working mode is the preemptive mode; and determine the validity of the first message based on the comparison result of the priority of the first edge node and the second edge node.
[0150] If the priority of the first edge node is higher than the priority of the second edge node, the first message is determined to be valid; if the priority of the first edge node is lower than the priority of the second edge node, the first message is determined to be invalid.
[0151] Optionally, in some specific implementations, the processing module 740 is specifically used to:
[0152] If the first message is valid, a second forwarding table entry is generated based on the first message, and the second forwarding table entry is used to represent the network address of the disaster recovery backup group and the physical address of the first edge node; the second forwarding table entry replaces the first forwarding table entry to obtain an updated address forwarding table.
[0153] Optionally, in some specific implementations, the processing module 740 is specifically used to:
[0154] The validity information of the second forwarding table entry is recorded in the updated address forwarding table.
[0155] Optionally, in some specific implementations, the processing module 740 is specifically used to:
[0156] If the first message is invalid, the first message is discarded.
[0157] Optionally, in some specific implementations, the device for generating the address transfer table further includes:
[0158] The updating module is used to update the validity information of the first forwarding entry if there is a first forwarding entry corresponding to the network address of the disaster recovery backup group in the address forwarding table and the physical address in the first forwarding entry is the same as the physical address in the first message.
[0159] Optionally, in some specific implementations, the device for generating the address transfer table further includes:
[0160] The validity acquisition module is used to obtain the validity information of each forwarding table entry in the address forwarding table, and the validity information includes the latest update time and the validity period.
[0161] The update interval determination module is used to compare the current time with the most recent update time to determine the update interval.
[0162] The setting module is used to set the corresponding forwarding table entry in the address forwarding table to be invalid if the update interval is greater than the effective time.
[0163] Optionally, in some specific implementations, the query module is specifically used to:
[0164] The address forwarding table is queried using the network address of the disaster recovery backup group in the first message; if the address forwarding table contains a first forwarding table entry that is the same as the network address of the disaster recovery backup group, the physical address in the first forwarding table entry is compared with the physical address in the first message to obtain a physical address comparison result.
[0165] Optionally, in some specific implementations, at least two nodes included in the disaster recovery backup group are virtual machines, the first message carries the high-availability virtual network address of the disaster recovery backup group and the physical address of the first virtual machine, and the first forwarding table entry is used to characterize the mapping relationship between the high-availability virtual network address of the disaster recovery backup group and the physical address of the second virtual machine.
[0166] Optionally, in some specific implementations, at least two virtual machines in the disaster recovery backup group are located on the same server, or at least two virtual machines in the disaster recovery backup group are located on different servers.
[0167] Optionally, in some specific implementations, the device for generating the address transfer table further includes:
[0168] The receiving module is used to receive the configuration information of the disaster recovery backup group under the virtual network controller.
[0169] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0170] The address translation table generation device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0171] The present disclosure also provides an electronic device having the above Figure 7 The generation processing device shown is used to implement the aforementioned Figure 2 , Figure 4 or Figure 6 All or part of the method flow shown.
[0172] See also Figure 8 , is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present disclosure, such as Figure 8 As shown, the electronic device includes: one or more processors 10 , a memory 20 and a communication interface 30 .
[0173] Wherein, the communication interface 30 includes a high-speed interface and a low-speed interface, and the number of interfaces can be designed as needed. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0174] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0175] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0176] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices.
[0177] In some optional embodiments, the memory 20 may include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0178] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0179] The computer device also includes an input device and an output device. The processor 10, the memory 20, the input device and the output device may be connected via a bus or other means.
[0180] Optionally, the electronic device is a server or a server cluster, or a virtualization layer arranged in a server or a server cluster.
[0181] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented by downloading through a network and originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware.
[0182] The storage medium may be a disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid state drive, etc.; further, the storage medium may also include a combination of the above-mentioned types of memories. It is understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method for generating an address transfer table based on an edge node shown in the above embodiment is implemented.
[0183] The present disclosure may be implemented in many ways, including as: a process; an apparatus; a system; a composition of matter; a computer program product embodied on a computer-readable storage medium; and / or a processor, such as a processor configured to execute instructions stored on a memory coupled to the processor and / or provided by the memory. In this specification, these embodiments or any other form that the present disclosure may take may be referred to as techniques. In general, the order of steps of the disclosed processes may be changed within the scope of the present disclosure. Unless otherwise specified, a component described as being configured to perform a task (such as a processor or memory) may be implemented as a general component that is temporarily configured to perform a task at a given time, or as a specific component manufactured to perform a task. As used herein, the term processor refers to one or more devices, circuits, and / or processing cores configured to process data (such as computer program instructions).
[0184] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for generating an address forwarding table based on an edge node, characterized in that: The method comprises: Obtain a first message, wherein the first message carries a network address of a disaster recovery backup group and a physical address of a first edge node, the disaster recovery backup group includes at least two edge nodes, and the first edge node is one of the at least two edge nodes; Querying an address forwarding table based on the network address of the disaster recovery backup group in the first message; If there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group in the address forwarding table, and the physical address in the first forwarding table entry is different from the physical address in the first message, the validity of the first message is determined based on the configuration information of the disaster recovery backup group, and the first forwarding table entry is used to characterize the mapping relationship between the network address of the disaster recovery backup group and the physical address of the second edge node in the disaster recovery backup group; Processing the first message based on a validity determination result of the first message to update the address forwarding table; The configuration information of the disaster recovery backup group includes a working mode of the disaster recovery backup group, and the working mode includes a preemptive mode and a non-preemptive mode; The determining the validity of the first message based on the configuration information of the disaster recovery backup group includes: If the working mode is the preemptive mode, obtaining the priority of the first edge node and the second edge node in the configuration information; Determining validity of the first message based on a comparison result of priorities of the first edge node and the second edge node; The processing of the first message based on the validity determination result of the first message to update the address forwarding table includes: If the first message is valid, a second forwarding table entry is generated based on the first message, wherein the second forwarding table entry is used to represent the network address of the disaster recovery backup group and the physical address of the first edge node, and the second forwarding table entry replaces the first forwarding table entry to obtain an updated address forwarding table; If the first message is invalid, discard the first message.
2. The method according to claim 1, characterized in that: The determining the validity of the first message based on the comparison result of the priority between the first edge node and the second edge node includes: If the priority of the first edge node is higher than the priority of the second edge node, determining that the first message is valid; If the priority of the first edge node is lower than the priority of the second edge node, it is determined that the first message is invalid.
3. The method according to claim 1, characterized in that The determining the validity of the first message based on the configuration information of the disaster recovery backup group further includes: If the working mode is a non-preemptive mode, it is determined that the first message is invalid.
4. The method according to claim 1, characterized in that The step of replacing the first forwarding table entry with the second forwarding table entry to obtain an updated address forwarding table further includes: The validity information of the second forwarding table entry is recorded in the updated address forwarding table.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If a first forwarding entry corresponding to the network address of the disaster recovery backup group exists in the address forwarding table, and the physical address in the first forwarding entry is the same as the physical address in the first message, the validity information of the first forwarding entry is updated.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining validity information of each forwarding table entry in the address forwarding table, the validity information including the most recent update time and the validity period; Compare the current time with the last update time to determine the update interval; If the update interval is greater than the valid time, the corresponding forwarding table entry in the address forwarding table is set to invalid.
7. The method according to claim 1, characterized in that The querying of the address forwarding table based on the network address of the disaster recovery backup group in the first message includes: Querying the address forwarding table using the network address of the disaster recovery backup group in the first message; If the address forwarding table contains a first forwarding table entry that is the same as the network address of the disaster recovery backup group, the physical address in the first forwarding table entry is compared with the physical address in the first message to obtain a physical address comparison result.
8. The method according to claim 1, characterized in that At least two nodes included in the disaster recovery backup group are virtual machines. The first message carries the high-availability virtual network address of the disaster recovery backup group and the physical address of the first virtual machine. The first forwarding table entry is used to characterize the mapping relationship between the high-availability virtual network address of the disaster recovery backup group and the physical address of the second virtual machine.
9. The method according to claim 8, characterized in that At least two virtual machines in the disaster recovery backup group are located on the same server, or, At least two virtual machines in the disaster recovery backup group are located on different servers.
10. The method according to claim 9, characterized in that The method further comprises: Receive the configuration information of the disaster recovery backup group under the virtual network controller.
11. A device for generating an address transfer table based on an edge node, characterized in that: The device comprises: An acquisition module, configured to acquire a first message, wherein the first message carries a network address of a disaster recovery backup group and a physical address of a first edge node, wherein the disaster recovery backup group includes at least two edge nodes, and the first edge node is one of the at least two edge nodes; A query module, configured to query an address forwarding table based on the network address of the disaster recovery backup group in the first message; A determination module, for determining the validity of the first message based on the configuration information of the disaster recovery backup group if there is a first forwarding table entry corresponding to the network address of the disaster recovery backup group in the address forwarding table, and the physical address in the first forwarding table entry is different from the physical address in the first message, wherein the first forwarding table entry is used to characterize the mapping relationship between the network address of the disaster recovery backup group and the physical address of the second edge node in the disaster recovery backup group; A processing module, configured to process the first message based on a validity determination result of the first message to update the address forwarding table; The configuration information of the disaster recovery backup group includes a working mode of the disaster recovery backup group, and the working mode includes a preemptive mode and a non-preemptive mode; The determination module is specifically configured to obtain the priority of the first edge node and the second edge node in the configuration information if the working mode is the preemptive mode; and determine the validity of the first message based on the comparison result of the priority of the first edge node and the second edge node; The processing module is specifically used to generate a second forwarding table entry based on the first message if the first message is valid, the second forwarding table entry is used to represent the network address of the disaster recovery backup group and the physical address of the first edge node, and the second forwarding table entry replaces the first forwarding table entry to obtain an updated address forwarding table; if the first message is invalid, the first message is discarded.
12. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are connected; The memory stores computer instructions, and the processor executes the method for generating an edge node-based address transfer table according to any one of claims 1 to 10 by executing the computer instructions.
13. A computer-readable storage medium, characterized in that: The computer readable storage medium has computer instructions stored thereon; The computer instructions are used to enable a computer to execute the method for generating an edge node-based address transfer table according to any one of claims 1 to 10.
14. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the method for generating an edge node-based address transfer table according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and equipment for realizing failure protection in rapid ring protection protocol single-ring networking
CN102055658A
Internet protocol address analysis method and edge node
CN103179228A