WO2021077768A1 - 路由信息的处理方法和装置 - Google Patents
路由信息的处理方法和装置 Download PDFInfo
- Publication number
- WO2021077768A1 WO2021077768A1 PCT/CN2020/096003 CN2020096003W WO2021077768A1 WO 2021077768 A1 WO2021077768 A1 WO 2021077768A1 CN 2020096003 W CN2020096003 W CN 2020096003W WO 2021077768 A1 WO2021077768 A1 WO 2021077768A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- routing information
- bgp module
- bgp
- module
- routing
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/28—Routing or path finding of packets in data switching networks using route fault recovery
Definitions
- the embodiments of the present application relate to the field of communication technologies, and in particular, to a method and device for processing routing information.
- BGP Border Gateway Protocol
- TOR Top Of Rack
- the reflector or TOR switch receives multiple routes sent from different BGP neighbors, and after comparison, selects the preferred route to forward and forward Posting items guide traffic forwarding.
- the graceful restart (GR) capability can be enabled for the BGP protocol.
- the GR capability can maintain the stability of traffic forwarding in the cloudized network.
- FIG. 1 is a schematic diagram of traffic forwarding through BGP multi-active in related technologies.
- BGP module A, BGP module B, and BGP module C respectively communicate with the reflector/TOR switch through BGP session 1, BGP session 2, and BGP session 3 establishes a BGP neighbor relationship and negotiates a successful GR capability.
- the virtual machine network information distribution module of the network controller sends the network information of the virtual machine to BGP module A, BGP module B, and BGP module C respectively.
- the reflector/TOR switch is sent from BGP module A, BGP module B, and BGP module C, respectively.
- the reflector/TOR switch is routed, the route sent by BGP module A is the best route, and the route sent by BGP module B is the second best route.
- BGP module A fails, the reflector/TOR switch will enter the GR state and start the GR timer.
- the GR timer expires and the failure of BGP module A is not recovered, the reflector/TOR switch will disconnect from BGP module A and continue to guide the forwarding of traffic according to the routing information sent by BGP module B.
- the above-mentioned traffic forwarding method causes the reflector/TOR switch to enter the GR state when BGP module A fails, and when the route sent by BGP module B has not been optimized, the reflector/TOR switch The switch will not be able to sense the migration or deletion of virtual machines, causing traffic forwarding to fail.
- the embodiments of the present application provide a routing information processing method and device.
- the routing information sent by the first BGP module will not continue to guide traffic forwarding, thereby improving the success rate of traffic forwarding.
- an embodiment of the present application provides a method for processing routing information, which is applied to a route acquisition device, the route acquisition device is connected to a first Border Gateway Protocol BGP module, and the first BGP module is used to provide routing Information; the method includes:
- the routing information from the first BGP module is deleted.
- the routing information received from the first BGP module is deleted before the GR status of the route acquisition device ends.
- the routing information sent by the first BGP module will not continue to guide traffic forwarding, so that the success rate of traffic forwarding can be improved.
- the route acquisition device is connected to multiple BGP modules, the multiple BGP modules include the first BGP module and the second BGP module, and the first BGP module is the multiple BGP modules.
- the method After entering the GR state and before deleting the routing information from the first BGP module, the method further includes:
- the route acquisition device determines whether the routing information of the second BGP module has changed, it can determine whether it has received the routing information sent by the second BGP module after the first BGP module fails.
- the routing information sent by the BGP module determines that the routing information corresponding to the second BGP module has changed. Wherein, by judging whether the routing information sent by the second BGP module is received, it is judged whether the routing information corresponding to the second BGP module has changed, so that the judging method of the routing information is simpler.
- determining that the routing information received from the second BGP module has changed includes:
- routing information received from the second BGP module this time is different from the routing information received from the second BGP module last time, it is determined that the routing information received from the second BGP module has changed.
- the route acquisition device is a reflector, and the reflector is connected to at least one TOR switch; the method further includes:
- the routing and forwarding entries include the IP address, MAC address, VNI and VTEP information of the virtual machine running in each physical server connected to the TOR switch.
- the route acquisition device is at least one TOR switch; the method further includes:
- the routing and forwarding entry is updated, and the updated routing and forwarding entry is used to instruct the at least one TOR switch to forward traffic.
- updating the routing and forwarding entries according to the routing information sent by the second BGP module can improve the accuracy of updating the routing and forwarding entries.
- the updating the routing and forwarding table entries according to the routing information from the second BGP module includes:
- the routing and forwarding entry is updated according to the preferred route.
- updating the routing and forwarding entries according to the routing information sent by the second BGP module can improve the accuracy of updating the routing and forwarding entries.
- the first BGP module and the second BGP module belong to the same GR group.
- the method further includes:
- the deleting the first routing information received from the first BGP module includes:
- the route acquisition device determines that the first BGP module is faulty, it adds a mark to the first routing information received from the first BGP module. Therefore, when deleting the first routing information, you only need to delete the added The marked first routing information is sufficient, so that the process of deleting the first routing information can be simplified.
- an embodiment of the present application provides a routing information processing device.
- the routing information processing device is connected to a first Border Gateway Protocol BGP module, the first BGP module is used to provide routing information, and the device includes :
- a receiving unit configured to receive routing information from the first BGP module
- a processing unit configured to enter the GR state when it is determined that the first BGP module is faulty
- the processing unit is further configured to delete the routing information from the first BGP module before ending the GR state.
- the routing information processing device is connected to multiple BGP modules, the multiple BGP modules include the first BGP module and the second BGP module, and the first BGP module is the The module with the highest priority among multiple BGP modules;
- the receiving unit is further configured to: receive routing information from the second BGP module;
- the processing unit is further configured to determine that the routing information received from the second BGP module has changed.
- the processing unit is specifically configured to:
- routing information received from the second BGP module this time is different from the routing information received from the second BGP module last time, it is determined that the routing information received from the second BGP module has changed.
- the device for processing routing information is a reflector, and the reflector is connected to at least one TOR switch; the device further includes: a sending unit; wherein,
- the processing unit is also used for:
- the sending unit is configured to send the updated routing and forwarding entry to the at least one TOR switch, and the updated routing and forwarding entry is used to instruct the at least one TOR switch to forward traffic.
- the device for processing routing information is at least one TOR switch
- the processing unit is further configured to: update a routing and forwarding table entry according to the routing information from the second BGP module, and the updated routing and forwarding table entry is used to instruct the at least one TOR switch to perform traffic forwarding.
- the processing unit is specifically configured to:
- the routing and forwarding entry is updated according to the preferred route.
- the first BGP module and the second BGP module belong to the same GR group.
- the processing unit is specifically configured to:
- the device provided in the second aspect of the present application may be a route acquisition device, that is, a reflector or a switch, or a chip in the route acquisition device, and the route acquisition device or the chip can implement the above-mentioned aspects or any of them.
- the hardware or software includes one or more units corresponding to the above-mentioned functions.
- the route acquisition device includes a processing unit and a transceiving unit.
- the processing unit may be a processor, the transceiving unit may be a transceiver, and the transceiver includes a radio frequency circuit.
- the route acquisition device further includes The storage unit, which may be a memory, for example.
- the storage unit is used to store computer-executed instructions
- the processing unit is connected to the storage unit, and the processing unit executes the computer-executed instructions stored in the storage unit to enable
- the route acquisition device executes the routing information processing methods in the above-mentioned aspects or any possible designs thereof.
- the chip includes: a processing unit and a transceiving unit, the processing unit may be a processor, and the transceiving unit may be an input/output interface, a pin, or a circuit on the chip.
- the processing unit can execute the computer-executable instructions stored in the storage unit, so that the chip executes the routing information processing methods in the foregoing aspects or any possible designs thereof.
- the storage unit may be a storage unit (for example, a register, a cache, etc.) in the chip, and the storage unit may also be a storage unit (for example, a storage unit outside the chip in the route acquisition device). , Read-only memory (ROM) or other types of static storage devices (for example, random access memory (RAM)) that can store static information and instructions.
- ROM Read-only memory
- RAM random access memory
- the aforementioned processor may be a central processing unit (CPU), a microprocessor or an application specific integrated circuit (ASIC), or one or more for controlling the above aspects or It is an integrated circuit for program execution of any possible design routing information processing method.
- CPU central processing unit
- ASIC application specific integrated circuit
- the third aspect of the embodiments of the present application provides a computer-readable storage medium for storing computer instructions, which when run on a computer, cause the computer to execute the routing information processing method provided in the first aspect of the embodiments of the present application .
- the fourth aspect of the embodiments of the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the routing information processing method provided in the first aspect of the embodiments of the present application.
- a fifth aspect of the embodiments of the present application provides a processing device for routing information, including: a memory, a processor, and a computer program; wherein the computer program is stored in the memory and is configured to be processed by the The computer program includes instructions for executing the method according to the first aspect.
- the routing information processing method and device receive routing information from the first BGP module, and if it is determined that the first BGP module is faulty, it enters the GR state, and deletes the information from the first BGP module before ending the GR state.
- the routing information of the module Because when the first BGP module fails, the routing information from the first BGP module is deleted before the route acquisition device ends the GR state. In this way, when the second routing information corresponding to the second BGP module changes, it will not Continue to guide traffic forwarding through the routing information from the first BGP module, so that the success rate of traffic forwarding can be improved.
- Figure 1 is a schematic diagram of traffic forwarding through BGP multi-active mode in related technologies
- FIG. 2a is a schematic structural diagram of a cloudized network provided by an embodiment of this application.
- FIG. 2b is a schematic structural diagram of another cloudized network provided by an embodiment of this application.
- FIG. 3 is a schematic flowchart of a method for processing routing information according to an embodiment of the application
- Fig. 4 is a schematic diagram of the process of publishing routing information of a virtual machine
- Figure 5 is a schematic diagram of the flow after a single BGP module fails and recovers normally
- Figure 6 is a schematic flow diagram of a single BGP module failure and the failure is not recovered
- Figure 7 is a schematic diagram of the flow of failure of all BGP modules
- Fig. 8a is a schematic structural diagram of a routing information processing apparatus provided by an embodiment of the application.
- FIG. 8b is a schematic structural diagram of another routing information processing apparatus provided by an embodiment of this application.
- FIG. 9 is a schematic structural diagram of a route acquisition device provided by an embodiment of the present application.
- the unit in this application refers to a functional unit or a logical unit. It can be in the form of software, and its function is realized by the processor executing the program code; it can also be in the form of hardware.
- GR Graceful Restart
- HA high availability
- BGP GR is a type of high availability (HA) technology.
- the basic principles of BGP GR are: (1) When at least one BGP module establishes a BGP neighbor relationship with the reflector/TOR switch, it will notify each other of the GR capabilities supported by the local end and conduct GR capability negotiation. (2) When the reflector/TOR switch detects a failure of a BGP module, the reflector/TOR switch will enter the GR state and start the GR timer. The reflector/TOR switch will not be in the GR timer time period. The routing information and forwarding entries related to the failed BGP module are deleted.
- the routing information received from the failed BGP module is marked with a special mark, and the BGP connection between the failed BGP module is rebuilt and the BGP connection between the failed BGP module is rebuilt. If within the time period of the GR timer, the failure of the failed BGP module recovers, that is, the reflector/TOR switch can re-establish the BGP connection with the failed BGP module, the reflector/TOR switch will remove the faulty BGP module. Special mark in the routing information received in the module, and cancel the GR timer.
- the reflector/TOR switch will send according to other BGP modules Routing information to guide the forwarding of traffic.
- the routing information processing methods provided in the following embodiments of the present application can be applied to a clouded network.
- an extensible virtual local area network (Virtual eXtensible Lan, VxLan) tunnel is generally used to encapsulate tenant data.
- the access mode of the virtual machine can be divided into two types: the host overlay (Overlay) and the network overlay (Overlay).
- the host overlay encapsulates the VxLan tunnel on a virtual switch (Virtual Switch, vSwitch) running on the physical server, and the data packet is the encapsulated VxLan message when it is sent from the physical server.
- the network overlay encapsulates the VxLan tunnel on the access TOR switch of the physical server. When the data packet is sent from the physical server, it is a virtual local area network (Vlan) message or an untag message.
- Vlan virtual local area network
- FIG. 2a is a schematic structural diagram of a clouded network provided by an embodiment of this application
- FIG. 2b is a schematic structural diagram of another clouded network provided by an embodiment of this application.
- the virtual machines (VM) 1 and VM2 running in the physical server 1 also referred to as Host 1 (Host 1)
- the physical server 2 also referred to as Host 2 (Host 2)
- the access mode of VM3 and VM4 running in) is the network overlay mode
- the access mode of VM5 and VM6 running in the physical server 3 also referred to as the host 3 (Host3)
- the host overlay mode also referred to as the host 3 (Host3)
- the VxLan tunnel is encapsulated on the vSwitch running on the physical server 3, and when the data packet is sent from the physical server 3, it is the encapsulated VxLan message.
- a VxLan tunnel is encapsulated on the route acquisition devices of the physical server 1 and the physical server 2, and the data packets sent from the physical server 1 and the physical server 2 are Vlan messages or untag messages, where the route acquisition devices include TOR switches.
- the virtual network edge (NVE) in the physical server 3 is the start and end point of the VxLan tunnel, and the logical unit responsible for encapsulating and de-encapsulating the VxLan tunnel is the VxLan Tunnel End Point (VTEP).
- NVE virtual network edge
- VTEP VxLan Tunnel End Point
- the route acquisition device receives routing information issued by the BGP module to guide the virtual machines running in each physical server to forward traffic.
- the BGP module may be deployed in a network controller, which may include a cloud platform Or a Software Define Network (SDN) controller.
- SDN Software Define Network
- the BGP module can also be deployed independently or in other devices. The specific deployment method of the BGP module is not limited in this embodiment of the application.
- the route acquisition device may include a TOR switch, or may also include a TOR switch and a core switch as a reflector, where the TOR switch may include a TOR switch with an NVE function.
- TOR switch may include a TOR switch with an NVE function.
- EVPN BGP-Ethernet virtual private network
- Two types of information are transferred between TOR switches through the BGP-EVPN protocol: (1) Mutual VTEP information is used to automatically establish a VxLan tunnel between TOR switches, where VTEP information is the end point of the VxLan tunnel between TOR switches; ( 2) Transfer the Internet Protocol (IP) address of each virtual machine running in the physical server connected to each TOR switch, the Media Access Control (MAC) address of each virtual machine, and the virtual machine's virtual machine Extensible LAN network identifier (VxLan Network Identifier, VNI) and which VTEP information of each virtual machine is used to indicate which virtual machines in the physical server are connected to each TOR switch, so as to realize the automatic connection of the internal two of the cloud network Three-layer forwarding.
- IP Internet Protocol
- MAC Media Access Control
- VNI Virtual machine Extensible LAN network identifier
- VM1 virtual machine 1
- VM2 virtual machine 2
- VM3 virtual machine 3
- VM4 virtual machine 4
- VM5 virtual machine 5
- VM6 IP address, MAC address, VNI and VTEP information.
- the vSwitch does not have the capability of the BGP-EVPN protocol.
- the BGP module is usually required to notify the vSwitch of the VTEP information of the vSwitch and the virtual machine (VM) information of each virtual machine running in the physical server, which is used to establish between vSwitches Tunnel to achieve a cloud-based network to get through the internal Layer 2 and Layer 3 forwarding.
- the vSwitch may include a vSwitch with NVE function.
- the BGP module needs to notify the vSwitch of the VTEP information of the TOR switch and the VM information of the virtual machine running in the physical server connected to the TOR switch; at the same time, the BGP module needs to transfer the VTEP information on the vSwitch side.
- the VM information of each virtual machine running in the physical server is packaged into routing information and notified to the TOR switch.
- the routing information may be BGP-EVPN routing information. If there are a large number of TOR switches, the BGP module will advertise routing information to the reflector (RR), and then the reflector (RR) to each TOR switch.
- the reflector (RR) can be a core switch or a certain number of TOR switches. A TOR switch.
- the BGP module may be implemented by software, and its function is to convert VTEP information and VM information into routing information and then publish it to the route acquisition device, for example, to the reflector or directly to the TOR switch.
- the BGP module can be deployed in the network controller, can also be deployed independently, or deployed in other devices.
- the network controller It can include a cloud platform or an SDN controller.
- multiple independent BGP modules back up each other.
- routing information may include information such as the IP address, MAC address, VNI, and VTEP IP of each virtual machine running in the physical server connected to the TOR switch.
- the aforementioned network controller includes a virtual machine network information distribution module, which is used to send to the BGP module the IP address, MAC address, and MAC address of each virtual machine running in the physical server connected to the TOR switch. VNI.
- the route acquisition device in Figure 2a is a TOR switch, that is, there is no reflector (RR).
- the BGP module directly establishes a BGP-EVPN neighbor with the TOR switch, and the BGP module directly Send routing information to the TOR switch to guide the forwarding of traffic.
- the route acquisition device in Figure 2a is a reflector in a clouded network.
- the reflector can be a core switch or a certain TOR switch.
- the BGP module sends routing information to the reflector.
- the reflector then sends the routing information to the VxLan NVE TOR switch.
- the embodiment of the present application takes a scene with a reflector as an example for description.
- the scene without a reflector is similar to the scene with a reflector, and will not be repeated here.
- the reflector will not delete the routing information learned from the network controller, otherwise the routing information on the TOR switch will also be deleted, which will affect data forwarding. Therefore, the reflector needs to enable the BGP graceful restart (Graceful Restart, GR) feature.
- the reflector when the reflector finds that the BGP module is faulty, it will enter the GR state, mark the routing information learned from the BGP module with a special mark (stale mark), and start a GR timer (GR Timer) at this time These specially marked routing information is still valid and can be used to guide traffic forwarding normally. If the fault of the BGP module recovers within the time period of the GR timer, the reflector will remove the stale mark of the routing information and cancel the GR timer. During this process, the data plane will not be affected; but within the time period of the GR timer if the BGP module If the failure of the module is not recovered, the reflector will delete all routing information sent by the failed BGP module. At this time, the data communication is interrupted. Therefore, in addition to the GR function configured on the reflector, multiple BGP modules are also required to ensure reliability.
- the problem of reliability of the BGP module can be solved by activating multiple independent BGP modules.
- the multiple independent BGP modules reflect different IP addresses externally, and establish BGP neighbor relationships with the reflector respectively.
- the reflector receives multiple pieces of routing information sent from different BGP modules, and compares and selects a preferred route to issue forwarding entries to guide traffic forwarding.
- BGP module A, BGP module B, and BGP module C establish BGP neighbor relationships with the reflector/TOR switch through BGP session 1, BGP session 2, and BGP session 3, respectively, and negotiate a successful GR capability.
- the virtual machine network information distribution module of the network controller sends the network information of the virtual machine to BGP module A, BGP module B, and BGP module C respectively.
- the reflector/TOR switch is sent from BGP module A, BGP module B, and BGP module C, respectively.
- Three identical routes are received, the reflector/TOR switch is routed, the route sent by BGP module A is the best route, and the route sent by BGP module B is the second best route.
- the reflector/TOR switch When BGP module A fails, the reflector/TOR switch will enter the GR state and start the GR timer. When the GR timer expires and the failure of BGP module A is not recovered, the reflector/TOR switch will disconnect from BGP module A and continue to guide the forwarding of traffic according to the routing information sent by BGP module B. However, in the above method, when BGP module A fails, the reflector/TOR switch cannot immediately detect it. Regardless of whether GR is configured, it will take a while to discover that BGP module A is faulty, and it will be disconnected from BGP module A. even. During this period, if a virtual machine migrates from one physical server to another physical server, the network controller will notify the BGP module to modify the next hop attribute of the routing information of the virtual machine.
- BGP module B and BGP module C respectively modify the next hop attributes and send them to the reflector/TOR switch.
- the reflector/TOR switch also modified the next hop attribute of the routing information sent by the local BGP module B and BGP module C, but at this time, because the GR timer has not timed out yet, the routing information of BGP module A is still It is preferred and used to guide traffic forwarding, which will cause traffic forwarding to fail.
- the network controller notifies the BGP module to revoke the routing information of the virtual machine.
- BGP module B and BGP module C respectively send the revoked route to the reflector/TOR switch, and the reflector/TOR switch is also deleted.
- the embodiments of the present application propose a method for processing routing information, which is applied to a route acquisition device, which is connected to a first BGP module, and the above-mentioned first BGP module is used to provide routing information,
- the route acquisition device enters the GR state if it is determined that the first BGP module is faulty, and deletes the routing information from the first BGP module before ending the GR state.
- the routing information received from the first BGP module will be deleted before the GR status of the route acquisition device ends. In this way, when the virtual machine is migrated or deleted, it will not continue to pass.
- the routing information sent by the first BGP module guides traffic forwarding, so that the success rate of traffic forwarding can be improved.
- FIG. 3 is a schematic flowchart of a method for processing routing information according to an embodiment of the application. Based on the system architecture shown in Figures 2a and 2b, the method is applied to a route acquisition device, which is connected to a first BGP module, and the first BGP module is used to provide routing information. As shown in Figure 3, in this embodiment, the routing information processing method may include the following steps:
- Step 301 Receive routing information from the first BGP module.
- the route acquisition device will receive the routing information sent by the first BGP module.
- the routing information may include the IP address, MAC address, VNI and each virtual machine running in the physical server connected to the route acquisition device.
- Information such as VTEP IP where it is located.
- the route acquisition device may be, for example, a core switch serving as a reflector, or a TOR switch.
- Step 302 If it is determined that the first BGP module is faulty, enter the GR state.
- the route acquisition device will determine whether the first BGP module fails.
- the route acquisition device may determine whether the packet sent by the first BGP module has been received n consecutive times, and if the first BGP module has not been received n consecutive times. A message sent by a BGP module determines that the first BGP module is faulty.
- the route acquisition device can also determine whether the first BGP module is faulty in one or more of the following ways: judging whether the KeepAlive packet has timed out or whether the Transmission Control Protocol (TCP) connection is wrong, etc.
- keepalive is a mechanism that can detect dead connections. For example: if it is determined that the KeepAlive message has timed out, it can be determined that the first BGP module is faulty, or if it is determined that the TCP connection is incorrect, it can be determined that the first BGP module is faulty.
- the route acquisition device When the route acquisition device determines that the first BGP module is faulty, it will enter the GR state. At this time, the route acquisition device will start the GR timer and mark the routing information received from the first BGP module with a special mark.
- Step 303 Before ending the GR state, delete the routing information from the first BGP module.
- the route acquisition device when the route acquisition device determines that the first BGP module is faulty, in order to improve the reliability of the first BGP module, the route acquisition device will enter the GR state. In order to prevent the migration or deletion of the virtual machine, the routing information sent by the first BGP module is inaccurate, causing traffic forwarding failure.
- the route acquisition device before the route acquisition device ends the GR state, the route acquisition device will delete the routing information received from the first BGP module. In this way, after the route acquisition device deletes the routing information from the first BGP module , Will no longer continue to guide the forwarding of traffic based on the routing information from the first BGP module. Illustratively, the route acquisition device will continue to guide the forwarding of traffic based on the routing information received from other BGP modules, thereby improving the traffic forwarding. Success rate.
- the route acquisition device usually preferentially uses the routing information sent by the first BGP module to guide the forwarding of traffic.
- the route acquisition device is connected to multiple BGP modules, the multiple BGP modules include a first BGP module and a second BGP module, and the first BGP module is the module with the highest priority among the multiple BGP modules, that is, ,
- the route acquisition device will preferentially use the routing information sent by the first BGP module to guide the forwarding of traffic. Before the route acquisition device deletes the routing information from the first BGP module, it will also receive the routing information from the second BGP module; after the route acquisition device enters the GR state, before deleting the routing information from the first BGP module, it needs to determine the route information from the first BGP module. 2.
- the routing information received by the BGP module changes.
- the reason for the change in the routing information of the second BGP module may be due to the migration or deletion of a certain virtual machine or certain virtual machines. Of course, there may also be other reasons.
- the routing information of the second BGP module has changed.
- the second BGP module will re-send the routing information to the route acquisition device, and the route acquisition device will refresh the previously saved routing information from the second BGP module. If the routing information of the second BGP module does not change, the second BGP module usually does not repeatedly send the routing information to the route acquisition device.
- the route acquisition device when determining whether the routing information of the second BGP module has changed, can determine whether it has received the routing information from the second BGP module after entering the GR state. To the routing information from the second BGP module, it is determined that the routing information of the second BGP module has changed. Wherein, by judging whether the routing information from the second BGP module is received, it is judged whether the routing information of the second BGP module has changed, so that the judging method for determining whether the routing information of the second BGP module has changed is simpler.
- the route acquisition device may also actively acquire the routing information of the second BGP module. At this time, when it is determined that the routing information received from the second BGP module has changed, the route acquisition device may also After receiving the routing information from the second BGP module, compare the routing information received from the second BGP module this time with the routing information received from the second BGP module last time. If this time is received from the second BGP module If the received routing information is different from the routing information received from the second BGP module last time, it is determined that the routing information received from the second BGP module has changed.
- the routing information learned from the first BGP module is still the routing information before the change.
- the route acquisition device enters the GR state, if the routing information sent by the first BGP module is used to guide the traffic forwarding, it will cause the traffic forwarding to fail.
- the routing information received from the second BGP module changes, the routing information received or learned from the first BGP module will be deleted. In this way, the route acquisition device will not The routing information from the first BGP module will continue to be used to guide the traffic forwarding, but based on the changed routing information sent from other BGP modules to guide the traffic forwarding, thereby improving the success rate of traffic forwarding.
- the route acquisition device after the route acquisition device enters the GR state, it adds a tag to the routing information from the first BGP module, for example, to tag the routing information from the first BGP module with a stale tag. Therefore, it deletes the routing information from the first BGP module. For the routing information of the module, it is only necessary to delete the tagged routing information, which can simplify the process of deleting the routing information from the first BGP module.
- the route acquisition device is a reflector, and the reflector is connected to at least one TOR switch
- the route acquisition device may also, according to the routing information from the second BGP module,
- the routing and forwarding entry is updated, and the updated routing and forwarding entry is sent to at least one TOR switch, and the updated routing and forwarding entry is used to instruct at least one TOR switch to forward traffic.
- the route acquisition device will delete the stale mark in the routing information from the first BGP module.
- the route acquisition device can update routing forwarding entries based on the updated routing information, and send the updated routing forwarding entries to the reflector.
- the TOR switch will guide traffic forwarding according to the updated routing and forwarding entries.
- the routing and forwarding entries include the IP address, MAC address, VNI and VTEP information of the virtual machines running in each physical server connected to the TOR switch.
- the route acquisition device if the route acquisition device is at least one TOR switch, the route acquisition device will update the routing forwarding table entry according to the routing information from the second BGP module, where the updated routing forwarding table entry is used to indicate at least one TOR switch Perform traffic forwarding.
- the route acquisition device after the route acquisition device deletes the routing information from the first BGP module, it will update its own routing forwarding table entries based on the routing information from the second BGP module. In this way, the TOR switch will forward the routing information according to the updated route. Posting items guide traffic forwarding.
- the routing and forwarding entries include the IP address, MAC address, VNI and VTEP information of the virtual machine running in each physical server connected to the TOR switch.
- the route acquisition device will be based on the information from the at least two second BGP modules.
- the routing information determines the preferred route, and the routing and forwarding entries are updated according to the determined preferred route.
- the preferred route can be understood as the routing information with the highest priority, and the route acquisition device usually guides the forwarding of traffic according to the preferred route.
- the route acquisition device may determine a preferred route from routing information from at least two second BGP modules according to preset routing rules.
- it may also determine the preferred route in other ways, specifically determining the preferred route The manner is not limited in the embodiment of the present application.
- the route acquisition device will delete the stale mark and the GR timer in the routing information from the first BGP module, and first A BGP module will obtain the latest routing information from the network controller, and send the obtained latest routing information to the route acquisition device, so that the route acquisition device is based on the latest routing information from the first BGP module and from the second BGP module
- the routing information is determined to determine the preferred route, thereby updating the routing and forwarding entries.
- the first BGP module and the second BGP module belong to the same GR group.
- the route acquisition device divides BGP neighbors that have a mutual backup relationship into a GR group, for example, divides the first BGP module and the second BGP module into the same GR group.
- the route acquisition device senses that the first BGP module in the GR group is faulty, the route acquisition device will enter the GR state, mark the routing information from the first BGP module with a stale mark, start the GR timer, and wait for the first BGP module Failure recovery.
- the route acquisition device When the routing information from the second BGP module in the same group changes, the route acquisition device will delete the routing information from the first BGP module that has the same prefix in the same group and has a stale tag to avoid the routing information from the first BGP module. Failed to update or delete the routing and forwarding entries due to the high priority of the routing information.
- the same prefix means that the IP addresses and MAC addresses of virtual machines running in each physical server connected to the TOR switch in the routing information are the same.
- the GR status of all BGP modules in the same GR group is independent of each other, that is, if all BGP modules in the same group fail, the route acquisition device will still retain the GR timer after the last BGP module fails to ensure BGP The reliability of the module.
- the routing information processing method receives routing information from the first BGP module. If it is determined that the first BGP module is faulty, it enters the GR state. Before ending the GR state, deletes the information from the first BGP module. Routing information. Because when the first BGP module fails, the routing information from the first BGP module will be deleted before the route acquisition device ends the GR state. In this way, when the virtual machine is migrated or deleted, it will not continue to pass from the first BGP module. The routing information of the module guides traffic forwarding, which can improve the success rate of traffic forwarding.
- the route acquisition device is used as a reflector
- the first BGP module is BGP module A
- the second BGP module is BGP module B as an example.
- BGP module A and BGP module B are two An independent BGP module.
- the solution in which the route acquisition device is a TOR switch is similar to the solution in which the route acquisition device is a reflector, and will not be repeated here.
- the user needs to pre-establish the BGP module A and the reflector, as well as the BGP neighbor relationship between the BGP module B and the reflector, and set the GR capability of the reflector.
- BGP module A and BGP module B have a mutual backup relationship, users need to create a GR group on the reflector and add BGP module A and BGP module B to the GR group.
- FIG. 4 is a schematic diagram of the process of publishing virtual machine routing information. As shown in Figure 4, the process of BGP module A and BGP module B publishing virtual machine routing information is as follows:
- Step 401 When a virtual machine is created or updated, the virtual machine network information distribution module of the network controller will synchronize the network information of the virtual machine to the BGP module A and the BGP module B.
- the virtual machine is a virtual machine running on at least one physical server connected to the TOR.
- the network information of the virtual machine is VM IP: xxxx, VM MAC: xx::xx, VTEP information: yyyy, L2VNI: VNI1, L3VNI: VNI2
- the virtual machine network information distribution module will separate the network information of the above virtual machines Synchronize to BGP module A and BGP module B.
- Step 402 BGP module A and BGP module B respectively encapsulate routing information according to the network information of the virtual machine, and advertise the encapsulated routing information to the reflector.
- the routing information obtained by BGP module A encapsulated according to the virtual machine's network information is xxxx nexthop yyyy from A
- the routing information obtained by BGP module B encapsulated according to the virtual machine's network information is xxxx nexthop yyyy from B.
- BGP module A and BGP module B respectively advertises the above-mentioned routing information to the reflector through the BGP-EVPN route update message.
- Step 403 The reflector performs route selection locally to obtain a preferred route.
- x.x.x.x nexthop y.y.y.y from A can be regarded as the optimal route
- x.x.x.x nexthop y.y.y.y from B can be regarded as the suboptimal route.
- Step 404 The reflector advertises the preferred route to the TOR switch.
- the reflector can send x.x.x.x nexthop y.y.y.y from A routing information to the TOR switch.
- Step 405 The TOR switch encapsulates the Vxlan message according to the preferred route to guide traffic forwarding.
- the virtual machine network information distribution module can advertise routing information to the reflector through the BGP module A and the BGP module B, and the reflector sends the routing information to the TOR switch.
- step 404 will not be executed again.
- BGP module A and BGP module B will The encapsulated routing information is advertised to the TOR switch.
- the TOR switch locally performs route selection to obtain a preferential route, thereby encapsulating the Vxlan message according to the preferential route to guide traffic forwarding.
- the route acquisition device is a TOR switch, that is, there is no reflector
- step 404 will not be executed again.
- BGP module A and BGP module B will The encapsulated routing information is advertised to the TOR switch.
- the TOR switch locally performs route selection to obtain a preferential route, thereby encapsulating the Vxlan message according to the preferential route to guide traffic forwarding.
- FIG. 5 is a schematic diagram of the process after a single BGP module fails and recovers normally.
- a virtual machine migration has occurred as an example for description.
- the specific process is as follows:
- Step 501 The reflector determines that the BGP module A is faulty, and adds a stale mark to the routing information received from the BGP module A, and starts the GR timer.
- the reflector if the reflector does not receive the KA message sent by BGP module A for three consecutive times, it can be determined that BGP module A has failed, and the reflector will enter the GR state and add stale to the routing information received from BGP module A. Mark and start the GR timer.
- Step 502 If the virtual machine is migrated, the virtual machine network information distribution module sends the virtual machine network information to the BGP module B.
- the virtual machine network information distribution module will send virtual machine network information to BGP module B: VM IP: xxxx, VM MAC: xx::xx, VTEP IP: zzzz, L2VNI: VNI1, L3VNI: VNI2 .
- the routing information obtained by BGP module B after encapsulation according to the network information of the virtual machine is x.x.x.x nexthop z.z.z.z from B.
- step 501 can be performed first, and then step 502, or step 502 can be performed first, and then step 501 can be performed, or step 501 and step 502 can be performed at the same time.
- Step 503 BGP module B sends the encapsulated routing information to the reflector.
- BGP module B sends the encapsulated routing information x.x.x.x nexthop z.z.z.z from B to the reflector through the BGP-EVPN route update message.
- Step 504 The reflector deletes the stale route with the same prefix in the same GR group, and re-selects the route to obtain a preferred route.
- the reflector deletes the stale routing information of the same prefix in the same GR group, that is, the routing information x.x.x.x nexthop y.y.y.y from A sent by BGP module A.
- the reflector re-selects the route according to the routing information sent by the BGP module B to obtain a preferred route, for example, select x.x.x.x nexthop z.z.z.z from B as the preferred route.
- Step 505 The reflector advertises the preferred route to the TOR switch.
- the reflector can send x.x.x.x nexthop z.z.z.z from B routing information to the TOR switch.
- Step 506 The TOR switch encapsulates the VxLan message according to the preferred route to guide traffic forwarding.
- Step 507 Before the GR timer expires, if the failure of the BGP module A recovers, the BGP module A and the reflector re-establish the BGP neighbor relationship.
- Step 508 The reflector deletes the stale mark and deletes the GR timer.
- Step 509 BGP module A obtains all routing information from the virtual machine network information distribution module.
- step 507 may be performed first, and then step 509 may be performed, or step 509 may be performed first, and then step 507 may be performed, or step 507 and step 509 may be performed simultaneously.
- Step 510 BGP module A sends all the obtained routing information to the reflector.
- BGP module A sends the latest full routing information to the reflector through a BGP-EVPN route update message, for example, x.x.x.x nexthop z.z.z.z from A.
- Step 511 The reflector re-selects a route to obtain a preferred route.
- the reflector re-selects the route according to the full amount of routing information sent by BGP module A and the routing information sent by BGP module B, so as to obtain a preferred route.
- the reflector determines x.x.x.x nexthop z.z.z.z from A as the optimal route, and x.x.x.x.B is the optimal route based on x.x.x.x nexthop z.z.z.z from A and x.x.x.x nexthop z.z.z.z from B.
- Step 512 The reflector advertises the preferred route to the TOR switch.
- the reflector can send x.x.x.x nexthop z.z.z.z from A routing information to the TOR switch, and the TOR switch refreshes the local routing table according to the received routing information.
- Step 513 The TOR switch encapsulates the VxLan message according to the preferred route to guide traffic forwarding.
- the routing information received from the BGP module A is deleted before the GR state of the reflector ends. In this way, when the virtual machine is migrated or deleted, the routing information will not be deleted. It will continue to guide the traffic forwarding through the routing information sent by BGP module A, but will perform traffic forwarding according to the routing information sent by other BGP modules, which can improve the success rate of traffic forwarding.
- step 505 and step 512 will not be executed again, and in other steps, the actions performed by the reflector will be performed by the TOR switch Implementation, for the specific implementation process, you can refer to the above steps, which will not be repeated here.
- Fig. 6 is a schematic diagram of a process flow when a single BGP module fails and the failure is not recovered.
- the deletion of a virtual machine is taken as an example for description.
- the specific process is as follows:
- Step 601 The reflector determines that the BGP module A is faulty, and adds a stale mark to the routing information received from the BGP module A, and starts the GR timer.
- the reflector if the reflector does not receive the KA message sent by BGP module A for three consecutive times, it can be determined that BGP module A has failed, and the reflector will enter the GR state and add stale to the routing information received from BGP module A. Mark and start the GR timer.
- Step 602 If the virtual machine is deleted, the virtual machine network information distribution module sends the virtual machine network information to the BGP module B.
- the virtual machine network information distribution module will send the virtual machine network information to BGP module B: VM IP: x.x.x.x, VM MAC: xx::xx.
- step 601 can be performed first, and then step 602, or step 602 can be performed first, and then step 601 can be performed, or step 601 and step 602 can be performed at the same time.
- Step 603 BGP module B sends a message to withdraw routing information to the reflector.
- BGP module B will send a message to withdraw routing information to the reflector. For example, to revoke x.x.x.x nexthop z.z.z.z from B routing information.
- Step 604 The reflector deletes the stale routing information of the same prefix in the same GR group.
- the reflector deletes the stale routing information of the same prefix in the same GR group, that is, the routing information x.x.x.x nexthop y.y.y.y from A sent by BGP module A.
- Step 605 The reflector sends a message to withdraw routing information to the TOR switch.
- the TOR switch will refresh the local routing table, and it can learn that the virtual machine x.x.x.x is unreachable.
- Step 606 The GR timer times out, and the failure of BGP module A is not recovered, the reflector deletes all local routing information sent by BGP module A with the stale flag added, and deletes the GR timer.
- the routing information received from the BGP module A is deleted before the GR state of the reflector ends. In this way, when the virtual machine is migrated or deleted, the routing information will not be deleted. It will continue to guide the traffic forwarding through the routing information sent by BGP module A, but will perform traffic forwarding according to the routing information sent by other BGP modules, which can improve the success rate of traffic forwarding.
- step 605 when the route acquisition device is a TOR switch, that is, when there is no reflector, in the above solution, step 605 will not be executed again, and in other steps, the actions performed by the reflector will be executed by the TOR switch.
- the specific implementation process please refer to the above steps, which will not be repeated here.
- FIG. 7 is a schematic diagram of the process of failure of all BGP modules, as shown in Figure 7, the specific process is as follows:
- Step 701 The reflector determines that the BGP module A is faulty, and adds a stale mark to the routing information received from the BGP module A, and starts the GR timer 1.
- the reflector does not receive the KA message sent by BGP module A for three consecutive times, it can be determined that BGP module A has failed, and the reflector will enter the GR state and add stale to the routing information received from BGP module A. Mark and start GR timer 1.
- Step 702 The reflector determines that the BGP module B is faulty, and adds a stale mark to the routing information received from the BGP module B, and starts the GR timer 2.
- the reflector does not receive the KA message sent by BGP module B for three consecutive times, it can be determined that BGP module B has failed, and the reflector will enter the GR state, and add stale to the routing information received from BGP module B Mark and start GR timer 2.
- Step 703 GR timer 1 times out, and the failure of BGP module A is not recovered, the reflector deletes all local routing information sent by BGP module A with the stale flag, and deletes GR timer 1.
- Step 704 The reflector re-selects the route according to the routing information sent by the BGP module B to obtain a preferred route.
- x.x.x.x nexthop y.y.y.y from B with the stale mark added is the preferred route.
- Step 705 The reflector advertises the preferred route to the TOR switch.
- the reflector can send x.x.x.x nexthop y.y.y.y from B routing information to the TOR switch, and the TOR switch refreshes the local routing table according to the received routing information.
- Step 706 GR timer 2 times out and the failure of BGP module B is not recovered, the reflector deletes all local routing information sent by BGP module B with the stale flag, and deletes GR timer 2.
- Step 707 The reflector sends a message to withdraw routing information to the TOR switch.
- the TOR switch will refresh the local routing table, and it can be learned that the virtual machine x.x.x.x is unreachable.
- the reflector when both the BGP module A and the BGP module B fail, the reflector will still retain the time of the GR timer after the last BGP module enters the failure, so that the reliability of the BGP module can be improved.
- the route acquisition device is a TOR switch, that is, when there is no reflector, in the above solution, steps 705 and 707 will not be executed again, and in other steps, the actions performed by the reflector will be performed by the TOR switch Implementation, for the specific implementation process, you can refer to the above steps, which will not be repeated here.
- FIG. 8a is a schematic structural diagram of a routing information processing apparatus provided by an embodiment of the application, where the routing information processing apparatus 80 may be the reflector in the foregoing embodiment, or may be the TOR switch in the foregoing embodiment.
- the device is connected to a first Border Gateway Protocol BGP module, and the first BGP module is used to provide routing information.
- the device includes a receiving unit 11 and a processing unit 12, wherein:
- the receiving unit 11 is configured to receive routing information from the first BGP module
- the processing unit 12 is configured to enter the GR state when it is determined that the first BGP module is faulty;
- the processing unit 12 is further configured to delete the routing information from the first BGP module before ending the GR state.
- the receiving unit 11 receives routing information from the first BGP module, and the processing unit 12 enters the GR state when it determines that the first BGP module is faulty, and the processing unit 12 ends the description.
- the routing information from the first BGP module is deleted.
- the routing information received from the first BGP module will be deleted before the GR status of the route acquisition device ends. In this way, when the virtual machine is migrated or deleted, it will not continue to pass.
- the routing information sent by the first BGP module guides traffic forwarding, so that the success rate of traffic forwarding can be improved.
- the routing information processing device 80 is connected to multiple BGP modules, the multiple BGP modules include the first BGP module and the second BGP module, and the first BGP module is the module with the highest priority among the multiple BGP modules ;
- the receiving unit 11 is further configured to: receive routing information from the second BGP module;
- the processing unit 12 is further configured to determine that the routing information received from the second BGP module has changed.
- processing unit 12 is specifically configured to:
- routing information received from the second BGP module this time is different from the routing information received from the second BGP module last time, it is determined that the routing information received from the second BGP module has changed.
- FIG. 8b is a schematic structural diagram of another routing information processing device provided by an embodiment of the application.
- the routing information processing device 80 is a reflector, and the reflector is connected to at least A TOR switch; the device 80 further includes: a sending unit 13; wherein,
- the processing unit 12 is also used for:
- the sending unit 13 is configured to send the updated routing and forwarding entry to the at least one TOR switch, and the updated routing and forwarding entry is used to instruct the at least one TOR switch to perform traffic forwarding.
- the routing information processing device 80 is at least one TOR switch
- the processing unit 12 is further configured to: update a routing and forwarding table entry according to the routing information from the second BGP module, and the updated routing and forwarding table entry is used to instruct the at least one TOR switch to perform traffic forwarding.
- processing unit 12 is specifically configured to:
- the routing and forwarding entry is updated according to the preferred route.
- the routing information processing apparatus provided in the embodiments of the present application can execute the corresponding method embodiments described above, for example, the embodiments shown in FIG. 3 to FIG. 7, and the implementation principles and technical effects are similar, and will not be repeated here.
- the division of the various units of the above device is only a division of logical functions, and may be fully or partially integrated into a physical entity during actual implementation, or may be physically separated.
- these units can all be implemented in the form of software called by processing elements; they can also be implemented in the form of hardware; part of the units can be implemented in the form of software called by processing elements, and some of the units can be implemented in the form of hardware.
- the receiving unit may be a separately established processing element, or it may be integrated in a certain chip of the device for implementation.
- it may also be stored in the memory of the device in the form of a program, which is called and combined by a certain processing element of the device. Perform the function of the receiving unit.
- each step of the above method or each of the above units may be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
- the above receiving unit is a unit that controls receiving, and information can be received through the receiving device of the device, such as an antenna and a radio frequency device.
- the above units may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital singnal processors). , DSP), or, one or more field programmable gate arrays (FPGA), etc.
- ASIC application specific integrated circuits
- DSP digital singnal processors
- FPGA field programmable gate arrays
- the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call programs.
- CPU central processing unit
- these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
- SOC system-on-a-chip
- the route acquisition device 900 includes a processor 910, a communication interface 920, and a memory 930.
- the processor 910, the communication interface 920, and the memory 930 are connected to each other through an internal bus 940.
- the route acquisition device may be a reflector or a TOR switch.
- the processor 910 may be composed of one or more general-purpose processors, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip.
- the aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
- ASIC application-specific integrated circuit
- PLD programmable logic device
- the above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (generic array logic, GAL), or any combination thereof.
- the bus 940 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
- PCI peripheral component interconnect standard
- EISA extended industry standard architecture
- the bus 940 can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used in FIG. 9, but it does not mean that there is only one bus or one type of bus.
- the memory 930 may include a volatile memory (volatile memory), such as a random access memory (random access memory, RAM); the memory 930 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (read-only memory). Only memory, ROM, flash memory, hard disk drive (HDD), or solid-state drive (SSD); the memory 930 may also include a combination of the above types.
- the memory 930 may be used to store program codes and data, so that the processor 910 can call the program codes and data stored in the memory 930 to implement the functions of the receiving unit 11, the processing unit 12, and the sending module 13 described above.
- the program code may be used to implement the functional module of the routing information processing device shown in FIG. 8, or used to implement the method steps in the method embodiments shown in FIGS. 3-7 with the routing information processing device as the execution subject.
- the device 80 for processing routing information in the foregoing embodiment can also be implemented by multiple routing acquisition devices 900.
- the multiple route acquisition devices 900 include multiple processors 910 and multiple memories 930.
- the multiple processors 910 cooperate to implement the receiving unit 11, the processing unit 12, and the sending module 13 as shown in FIG. 8.
- part or all of the above units can also be implemented by embedding on a certain chip of the route acquisition device in the form of an integrated circuit. And they can be implemented separately or integrated together. That is to say, the above units can be configured as one or more integrated circuits that implement the above methods, for example: one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital singnal processors). , DSP), or, one or more field programmable gate arrays (FPGA), etc.
- ASIC application specific integrated circuits
- microprocessors digital singnal processors
- FPGA field programmable gate arrays
- the present application also provides a storage medium, including: a readable storage medium and a computer program, the computer program is used to implement the routing information processing method provided by any of the foregoing embodiments.
- the program product includes a computer program (ie, an execution instruction), and the computer program is stored in a readable storage medium.
- At least one processor of the route acquisition device can read the computer program from a readable storage medium, and at least one processor executes the computer program to make the route acquisition device implement the routing information processing methods provided in the foregoing various embodiments.
- An embodiment of the present application also provides a route acquisition device, which includes at least one storage element and at least one processing element.
- the at least one storage element is used to store a program.
- the route acquisition device executes any of the foregoing. Operation of the route acquisition device in an embodiment.
- All or part of the steps in the foregoing method embodiments can be implemented by a program instructing relevant hardware.
- the aforementioned program can be stored in a readable memory.
- the program executes the steps of the foregoing method embodiments; and the foregoing memory (storage medium) includes: read-only memory (English: read-only memory, ROM), RAM, flash memory, hard disk, and solid state hard disk , Magnetic tape, floppy disk, optical disc, and any combination thereof.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请提供一种路由信息的处理方法和装置,该方法应用于路由获取设备,所述路由获取设备连接至第一边界网关协议BGP模块,所述第一BGP模块用于提供路由信息;该方法包括:接收来自所述第一BGP模块的路由信息;若确定所述第一BGP模块发生故障,进入GR状态;结束所述GR状态之前,删除来自所述第一BGP模块的路由信息。本申请提供的路由信息的处理方法和装置在发生虚拟机迁移或者删除时,将不会继续通过第一BGP模块发送的路由信息指导流量转发,从而可以提高流量转发的成功率。
Description
本申请实施例涉及通信技术领域,尤其涉及一种路由信息的处理方法和装置。
随着虚拟化技术、软件定义网络(Software Defined Network,SDN)技术的逐步成熟,数据中心的网络已经从传统网络向云化网络逐步演进。云化网络除了可以提升数据中心计算、存储资源的利用率,其与SDN技术的结合更实现了网络的自动化发放和运维。在云化网络部署方案中,为了提高边界网关协议(Border Gateway Protocol,BGP)Speaker模块(也称为BGP模块)的可靠性,BGP模块一般采用多活方式安装部署,即通过启动多个独立的BGP模块,分别与反射器或机架顶部(Top Of Rack,TOR)交换机建立BGP邻居关系,反射器或TOR交换机接收到从不同BGP邻居发送的多份路由,经过比较,选择优选路由下发转发表项指导流量转发。为了提高BGP协议连接稳定性,可以为BGP协议使能优雅重启(Graceful Restart,GR)能力,当BGP协议的会话中断时,通过GR能力可以保持云化网络中流量转发的稳定性。
图1为相关技术中通过BGP多活方式进行流量转发的示意图,如图1所示,BGP模块A、BGP模块B和BGP模块C分别与反射器/TOR交换机通过BGP会话1、BGP会话2和BGP会话3建立BGP邻居关系并协商成功GR能力。网络控制器的虚拟机网络信息分发模块分别向BGP模块A、BGP模块B和BGP模块C发送虚拟机的网络信息,其中,反射器/TOR交换机分别从BGP模块A、BGP模块B和BGP模块C接收到三条相同的路由,反射器/TOR交换机经过选路,BGP模块A发送的路由为最优路由,BGP模块B发送的路由为次优路由。当BGP模块A发生故障,反射器/TOR交换机将会进入GR状态,并启动GR计时器。在GR计时器超时且BGP模块A的故障未恢复时,反射器/TOR交换机将会断开和BGP模块A的连接,并根据BGP模块B发送的路由信息继续指导流量的转发。
然而,在云化网络部署场景中,上述的流量转发方式,在BGP模块A出现故障,导致反射器/TOR交换机进入GR状态,而BGP模块B发送的路由还未被优选时,反射器/TOR交换机将无法感知虚拟机的迁移或删除,导致流量转发失败。
发明内容
本申请实施例提供一种路由信息的处理方法和装置,在发生虚拟机迁移或者删除时,将不会继续通过第一BGP模块发送的路由信息指导流量转发,从而可以提高流量转发的成功率。
第一方面,本申请实施例提供一种路由信息的处理方法,该方法应用于路由获取设备,所述路由获取设备连接至第一边界网关协议BGP模块,所述第一BGP模块用于提供路由信息;所述方法包括:
接收来自所述第一BGP模块的路由信息;
若确定所述第一BGP模块发生故障,进入GR状态;
结束所述GR状态之前,删除来自所述第一BGP模块的路由信息。
在本方案中,由于在第一BGP模块发生故障时,在路由获取设备的GR状态结束之前,将从第一BGP模块中接收到的路由信息删除,这样,在发生虚拟机迁移或者删除时,将不会继续通过第一BGP模块发送的路由信息指导流量转发,从而可以提高流量转发的成功率。
在一种可能的实现方式中,所述路由获取设备连接至多个BGP模块,所述多个BGP模块包括所述第一BGP模块和第二BGP模块,所述第一BGP模块为所述多个BGP模块中优先级最高的模块;所述删除来自所述第一BGP模块的路由信息之前,所述方法还包括:
接收来自所述第二BGP模块的路由信息;
所述进入GR状态之后,所述删除来自所述第一BGP模块的路由信息之前,所述方法还包括:
确定从所述第二BGP模块接收到的路由信息发生变化。
在本案中,路由获取设备在判断第二BGP模块的路由信息是否发生了变化时,可以判断在第一BGP模块发生故障之后,是否接收到第二BGP模块发送的路由信息,若接收到第二BGP模块发送的路由信息,则确定第二BGP模块对应的路由信息发生了变化。其中,通过判断是否接收到第二BGP模块发送的路由信息,来判断第二BGP模块对应的路由信息是否发生了变化,使得路由信息的的判断方式更加简单。
在一种可能的实现方式中,确定从所述第二BGP模块接收到的路由信息发生变化,包括:
判断本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息是否相同;
若本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息不相同,则确定从所述第二BGP模块接收到的路由信息发生变化。
在本案中,通过比较本次从第二BGP模块接收到的路由信息与上一次从第二BGP模块接收到的路由信息是否相同,来判断第二BGP模块对应的路由信息是否发生了变化,使得路由信息的的判断结果更加准确。
在一种可能的实现方式中,所述路由获取设备为反射器,所述反射器连接至至少一个TOR交换机;所述方法还包括:
根据所述来自第二BGP模块的路由信息,更新路由转发表项;
将更新后的路由转发表项发送给所述至少一个TOR交换机,所述更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
其中,路由转发表项中包括与TOR交换机连接的各物理服务器中运行的虚拟机的IP地址、MAC地址、VNI和VTEP信息。
在一种可能的实现方式中,所述路由获取设备为至少一个TOR交换机;所述方法还包括:
根据来自所述第二BGP模块的路由信息,更新路由转发表项,更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
在本方案中,根据第二BGP模块发送的路由信息,更新路由转发表项,可以提高路由转发表项更新的准确性。
在一种可能的实现方式中,所述根据来自所述第二BGP模块的路由信息,更新路由转发表项,包括:
根据来自所述第二BGP模块的路由信息确定优选路由;
根据所述优选路由更新所述路由转发表项。
在本方案中,根据第二BGP模块发送的路由信息,更新路由转发表项,可以提高路由转发表项更新的准确性。
在一种可能的实现方式中,所述第一BGP模块和所述第二BGP模块属于同一GR组内。
在一种可能的实现方式中,所述方法还包括:
在确定出第一BGP模块发生故障时,对从所述第一BGP模块接收到的第一路由信息添加标记;
所述删除从所述第一BGP模块接收到的第一路由信息,包括:
删除添加了标记的所述第一路由信息。
在本方案中,路由获取设备在确定出第一BGP模块发生故障时,对从第一BGP模块接收到的第一路由信息添加标记,因此,在删除第一路由信息时,只需要删除添加了标记的第一路由信息即可,从而可以简化删除第一路由信息的流程。
第二方面,本申请实施例提供一种路由信息的处理装置,所述路由信息的处理装置连接至第一边界网关协议BGP模块,所述第一BGP模块用于提供路由信息,所述装置包括:
接收单元,用于接收来自所述第一BGP模块的路由信息;
处理单元,用于在确定所述第一BGP模块发生故障时,进入GR状态;
所述处理单元,还用于在结束所述GR状态之前,删除来自所述第一BGP模块的路由信息。
在一种可能的实现方式中,所述路由信息的处理装置连接至多个BGP模块,所述多个BGP模块包括所述第一BGP模块和第二BGP模块,所述第一BGP模块为所述多个BGP模块中优先级最高的模块;
所述接收单元,还用于:接收来自所述第二BGP模块的路由信息;
所述处理单元,还用于:确定从所述第二BGP模块接收到的路由信息发生变化。
在一种可能的实现方式中,所述处理单元,具体用于:
判断本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息是否相同;
若本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息不相同,则确定从所述第二BGP模块接收到的路由信息发生变化。
在一种可能的实现方式中,所述路由信息的处理装置为反射器,所述反射器连接至至少一个TOR交换机;所述装置还包括:发送单元;其中,
所述处理单元,还用于:
根据来自所述第二BGP模块的路由信息,更新路由转发表项;
所述发送单元,用于将更新后的路由转发表项发送给所述至少一个TOR交换机,所述更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
在一种可能的实现方式中,所述路由信息的处理装置为至少一个TOR交换机;
所述处理单元,还用于:根据来自所述第二BGP模块的路由信息,更新路由转发表项,更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
在一种可能的实现方式中,所述处理单元,具体用于:
根据来自所述第二BGP模块的路由信息确定优选路由;
根据所述优选路由更新所述路由转发表项。
在一种可能的实现方式中,所述第一BGP模块和所述第二BGP模块属于同一GR组内。
在一种可能的实现方式中,所述处理单元,具体用于:
在确定出第一BGP模块发生故障时,对从所述第一BGP模块接收到的第一路由信息添加标记;
删除添加了标记的所述第一路由信息。
本申请第二方面提供的装置,可以是路由获取设备,也即反射器或者交换机,也可以是路由获取设备内的芯片,所述路由获取设备或所述芯片具有实现上述各方面或其任意可能的设计中的路由信息的处理方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的单元。
所述路由获取设备包括:处理单元和收发单元,所述处理单元可以是处理器,所述收发单元可以是收发器,所述收发器包括射频电路,可选地,所述路由获取设备还包括存储单元,所述存储单元例如可以是存储器。当所述路由获取设备包括存储单元时,所述存储单元用于存储计算机执行指令,所述处理单元与所述存储单元连接,所述处理单元执行所述存储单元存储的计算机执行指令,以使所述路由获取设备执行上述各方面或其任意可能的设计中的路由信息的处理方法。
所述芯片包括:处理单元和收发单元,所述处理单元可以是处理器,所述收发单元可以是所述芯片上的输入/输出接口、管脚或电路等。所述处理单元可执行存储单元存储的计算机执行指令,以使所述芯片执行上述各方面或其任意可能的设计中的路由信息的处理方法。可选地,所述存储单元可以是所述芯片内的存储单元(例如,寄存器、缓存等),所述存储单元还可以是所述路由获取设备内的位于所述芯片外部的存储单元(例如,只读存储器(read-only memory,ROM))或可存储静态信息和指令的其他类型的静态存储设备(例如,随机存取存储器(random access memory,RAM))等。
上述提到的处理器可以是一个中央处理器(central processing unit,CPU)、微处理器或专用集成电路(application specific integrated circuit,ASIC),也可以是一个或多个用于控制上述各方面或其任意可能的设计的路由信息的处理方法的程序执行的集成电路。
本申请实施例的第三方面提供了一种计算机可读存储介质,用于存储计算机指令,当其在计算机上运行时,使得计算机执行本申请实施例的第一方面提供的路由信息的处理方法。
本申请实施例的第四方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行本申请实施例的第一方面提供的路由信息的处理方法。
本申请实施例的第五方面提供了一种路由信息的处理装置,包括:存储器、处理器以及计算机程序;其中,所述计算机程序被存储在所述存储器中,并且被配置为由所述处理器执行,所述计算机程序包括用于执行如第一方面所述的方法的指令。
本申请实施例提供的路由信息的处理方法和装置,通过接收来自第一BGP模块的路由信息,若确定第一BGP模块发生故障,则进入GR状态,在结束GR状态之前,删除来自第一BGP模块的路由信息。由于在第一BGP模块发生故障时,在路由获取设备结束GR状态之前,将来自第一BGP模块的路由信息删除,这样,在第二BGP模块对应的第二路由信息发生变化时,将不会继续通过来自第一BGP模块的路由信息指导流量转发,从而可以提高流量转发的成功率。
图1为相关技术中通过BGP多活方式进行流量转发的示意图;
图2a为本申请实施例提供的一种云化网络的结构示意图;
图2b为本申请实施例提供的另一种云化网络的结构示意图;
图3为本申请实施例提供的一种路由信息的处理方法的流程示意图;
图4为虚拟机路由信息发布的流程示意图;
图5为单个BGP模块发生故障且正常恢复后的流程示意图;
图6为单个BGP模块发生故障且故障未恢复的流程示意图;
图7为所有BGP模块发生故障的流程示意图;
图8a为本申请实施例提供的一种路由信息的处理装置的结构示意图;
图8b为本申请实施例提供的另一种路由信息的处理装置的结构示意图;
图9是本申请实施例提供的一种路由获取设备的结构示意图。
以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。
1)本申请中的单元是指功能单元或逻辑单元。其可以为软件形式,通过处理器执行程序代码来实现其功能;也可以为硬件形式。
2)“多个”是指两个或两个以上,其它量词与之类似。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。“以上”或“以下”等所描述的范围包括边界点。
3)优雅重启(Graceful Restart,GR),属于高可靠性(high availability,HA)技术的一种。BGP GR的基本原理是:(1)至少一个BGP模块在和反射器/TOR交换机建立BGP邻居关系时,会互相向对方通告本端支持的GR能力,并且进行GR能力协商。(2)当反射器/TOR交换机检查到某一个BGP模块发生故障时,反射器/TOR交换机将会进入GR状态,并启动GR计时器,反射器/TOR交换机在GR计时器的计时时间内不删除和发生故障的BGP模块相关的路由信息和转发表项,而是将从发生故障的BGP模块中接收到的路由信息打上特殊标记,并等待重建和发生故障的BGP模块之间的BGP连接。如果在GR计时器的计时时间内,发生故障的BGP模块的故障恢复,即反射器/TOR交换机能够与发生故障的BGP模块重新建立BGP连接,则反射器/TOR交换机会去掉从发生故障的BGP模块中接收到的路由信息中的特殊标记,且取消GR计时器。如果在GR计时器的计时时间内,发生故障的BGP模块的故障未恢复,即反射器/TOR交换机无法与发生故障的BGP模块重 新建立BGP连接,则反射器/TOR交换机会根据其他BGP模块发送的路由信息来指导流量的转发。
4)进入GR状态,包括反射器/TOR交换机启动GR计时器,以及将从发生故障的BGP模块中接收到的路由信息打上特殊标记。
为了下述各实施例的描述清楚简洁,首先给出相关技术的简要介绍:
本申请下述各实施例提供的路由信息的处理方法,可适用于云化网络中。云化网络中一般使用可扩展虚拟局域网(Virtual eXtensible Lan,VxLan)隧道封装租户数据。根据VxLan隧道封装位置的不同,虚拟机的接入方式可以分为主机叠加(Overlay)和网络叠加(Overlay)两种。主机Overlay在物理服务器上运行的虚拟交换机(Virtual Switch,vSwitch)上封装VxLan隧道,数据包从物理服务器上发出时即为封装好的VxLan报文。网络Overlay在物理服务器的接入TOR交换机上封装VxLan隧道,数据包从物理服务器上发出时是虚拟局域网(virtual local area network,Vlan)报文或untag报文。
图2a为本申请实施例提供的一种云化网络的结构示意图,图2b为本申请实施例提供的另一种云化网络的结构示意图。如图2a和图2b所示,物理服务器1(也称为主机1(Host1))中运行的虚拟机(virtual machine,VM)1和VM2,以及物理服务器2(也称为主机2(Host2))中运行的VM3和VM4的接入方式为网络Overlay方式,物理服务器3(也称为主机3(Host3))中运行的VM5和VM6的接入方式为主机Overlay方式。其中,在物理服务器3上运行的vSwitch上封装VxLan隧道,数据包从物理服务器3上发出时即为封装好的VxLan报文。在物理服务器1和物理服务器2的路由获取设备上封装VxLan隧道,数据包从物理服务器1和物理服务器2上发出时是Vlan报文或untag报文,其中,路由获取设备包括TOR交换机。另外,物理服务器3中的虚拟网络边缘(network virtualization edge,NVE)是VxLan隧道的起点和终点,其中,负责封装、解封装VxLan隧道的逻辑单元是VxLan隧道端点(VxLan Tunnel End Point,VTEP)。
其中,路由获取设备接收BGP模块下发的路由信息,以指导各个物理服务器中运行的虚拟机进行流量转发,可选地,BGP模块可以部署在网络控制器中,该网络控制器可以包括云平台或软件定义网络(Software Define Network,SDN)控制器,当然,该BGP模块也可以独立部署,或者部署在其他设备中,对于BGP模块的具体部署方式,本申请实施例在此不做限制。
如图2b所示,路由获取设备可以包括TOR交换机,或者也可以包括TOR交换机和作为反射器的核心交换机,其中,TOR交换机可以包括具有NVE作用的TOR交换机。另外,采用TOR交换机的云化网络实现内部二三层转发时,一种实现方式是使用BGP-以太网虚拟专用网络(ethernet virtual private network,EVPN)协议。TOR交换机之间通过BGP-EVPN协议传递两类信息:(1)彼此的VTEP信息,用来自动建立TOR交换机之间的VxLan隧道,其中,VTEP信息为TOR交换机之间的VxLan隧道的端点;(2)传递与每个TOR交换机连接的物理服务器中运行的各虚拟机的网络协议(Internet Protocol,IP)地址、各虚拟机的媒体访问控制(Media Access Control,MAC)地址、各虚拟机的虚拟可扩展局域网网络标识符(VxLan Network Identifier,VNI)以及各虚拟机所在哪个VTEP信息,从而用来标明每个TOR交换机都连接了哪些物理服务器中的虚拟机,以实现云化 网络自动打通内部二三层转发。例如,可以传递物理服务器1中虚拟机1(VM1)和虚拟机2(VM2)、物理服务器2中虚拟机3(VM3)和虚拟机4(VM4)以及物理服务器3中虚拟机5(VM5)和虚拟机6(VM6)的IP地址、MAC地址、VNI以及所在的VTEP信息。
由于BGP-EVPN协议比较复杂,vSwitch实现该功能会占用物理服务器比较多的资源,所以通常情况下vSwitch是没有BGP-EVPN协议的能力的。采用vSwitch的云化网络实现内部二三层转发时,通常需要BGP模块向vSwitch通知vSwitch的VTEP信息和物理服务器中运行的各虚拟机的虚拟机(Virtual Machine,VM)信息,用来vSwitch间建立隧道,以实现云化网络打通内部二三层转发。可选地,vSwitch可以包括具有NVE作用的vSwitch。
对于既有主机overlay又有网络overlay的情况,BGP模块需要向vSwitch通知TOR交换机的VTEP信息和与TOR交换机连接的物理服务器中运行的虚拟机的VM信息;同时BGP模块需要把vSwitch侧的VTEP信息和物理服务器中运行的各虚拟机的VM信息包装成路由信息通知给TOR交换机,可选地,该路由信息可以为BGP-EVPN路由信息。如果TOR交换机数量比较多,BGP模块会将路由信息通告给反射器(RR),再由反射器(RR)通告给各TOR交换机,其中,反射器(RR)可以是核心交换机,也可以是某个TOR交换机。
示例性的,BGP模块可以由软件实现,作用是将VTEP信息和VM信息转换为路由信息发布给路由获取设备,例如发布给反射器或直接发布给TOR交换机。其中,BGP模块可以部署在网络控制器中,也可以独立部署,或者部署在其他设备中,对于BGP模块的具体部署方式,本申请实施例在此不做限制,示例性的,该网络控制器可以包括云平台或SDN控制器。另外,可以理解的是,多个独立的BGP模块相互备份。
示例性的,上述的路由信息可以包括与TOR交换机连接的物理服务器中运行的各虚拟机的IP地址、MAC地址、VNI和各虚拟机所在的VTEP IP等信息。
另外,上述的网络控制器中包括有虚拟机网络信息分发模块,该虚拟机网络信息分发模块用于向BGP模块发送与TOR交换机连接的物理服务器中运行的各虚拟机的IP地址、MAC地址和VNI。
另外,在TOR交换机数量不多的情况下,图2a中的路由获取设备为TOR交换机,也即没有反射器(RR),此时,BGP模块直接与TOR交换机建立BGP-EVPN邻居,BGP模块直接向TOR交换机发送路由信息,以指导流量的转发。
在TOR交换机数量较多的情况下,图2a中的路由获取设备为云化网络中的反射器,该反射器可以是核心交换机,也可以是某个TOR交换机,BGP模块将路由信息发送给反射器,反射器再把路由信息发送给做VxLan NVE的TOR交换机。
下面首先针对本申请实施例适用场景进行简要说明。
在图2a和图2b所示系统架构的基础上,本申请实施例中以有反射器的场景为例进行说明,无反射器时的场景与有反射器时的场景类似,此处不再赘述。当BGP模块发生故障,反射器不会删除从网络控制器学习到的路由信息,否则TOR交换机上的路由信息也会被删除进而影响数据转发。因此反射器需要开启BGP优雅重启(Graceful Restart,GR)特性。具体的,当反射器发现BGP模块发生故障后,就会进入GR状态,把从BGP模块学习到的路由信息打上一个特殊标记(stale标记),同时启动一个GR计时器(GR Timer),此时这些带特殊标记的路由信息依然有效,而且可以正常用于指导流量转发。 如果GR计时器的计时时间内BGP模块的故障恢复,反射器会去掉路由信息的stale标记,并取消GR计时器,此过程中数据面不受影响;但是在GR计时器的计时时间内如果BGP模块的故障未恢复,则反射器会删除发生故障的BGP模块发送的所有路由信息,此时,数据通信中断。因此除了反射器配置GR功能以外,还需要有多个BGP模块来保证可靠性。
相关技术中,可以通过启动多个独立的BGP模块来解决BGP模块可靠性的问题,其中,多个独立的BGP模块对外体现不同的IP地址,分别与反射器建立BGP邻居关系。反射器接收到从不同BGP模块发送的多份路由信息,经过比较选择优选路由下发转发表项指导流量转发。
如图1所示,BGP模块A、BGP模块B和BGP模块C分别与反射器/TOR交换机通过BGP会话1、BGP会话2和BGP会话3建立BGP邻居关系并协商成功GR能力。网络控制器的虚拟机网络信息分发模块分别向BGP模块A、BGP模块B和BGP模块C发送虚拟机的网络信息,其中,反射器/TOR交换机分别从BGP模块A、BGP模块B和BGP模块C接收到三条相同的路由,反射器/TOR交换机经过选路,BGP模块A发送的路由为最优路由,BGP模块B发送的路由为次优路由。当BGP模块A发生故障,反射器/TOR交换机将会进入GR状态,并启动GR计时器。在GR计时器超时且BGP模块A的故障未恢复时,反射器/TOR交换机将会断开和BGP模块A的连接,并根据BGP模块B发送的路由信息继续指导流量的转发。但是,在上述方式中,当BGP模块A发生故障时,反射器/TOR交换机无法立即感知,无论是否配置了GR,都需要等待一段时间才能发现BGP模块A发生了故障,从而与BGP模块A断连。此期间,如果虚拟机从一个物理服务器迁移到另外一个物理服务器,则网络控制器会通知BGP模块修改该虚拟机的路由信息的下一跳属性。BGP模块B和BGP模块C分别修改了下一跳属性并发送给反射器/TOR交换机。反射器/TOR交换机也修改了本地BGP模块B和BGP模块C发送的路由信息的下一跳属性,但此时,由于GR计时器的计时时间还未超时,因此,BGP模块A的路由信息依然优选且用于指导流量转发,从而会导致流量转发失败。
同样的,如果发生了虚拟机删除,网络控制器通知BGP模块撤销该虚拟机的路由信息,BGP模块B和BGP模块C分别发送撤销路由给反射器/TOR交换机,反射器/TOR交换机也删除了本地BGP模块B和BGP模块C发送的路由信息,但BGP模块A发送的路由信息依然存在且为优选,依然可以用于指导流量转发,从而会导致流量转发失败。
本申请实施例中考虑到上述问题,提出了一种路由信息的处理方法,该方法应用于路由获取设备,该路由获取设备连接至第一BGP模块,上述第一BGP模块用于提供路由信息,路由获取设备通过接收来自第一BGP模块的路由信息,若确定第一BGP模块发生故障,则进入GR状态,在结束GR状态之前,删除来自第一BGP模块的路由信息。由于在第一BGP模块发生故障时,在路由获取设备的GR状态结束之前,将从第一BGP模块中接收到的路由信息删除,这样,在发生虚拟机迁移或者删除时,将不会继续通过第一BGP模块发送的路由信息指导流量转发,从而可以提高流量转发的成功率。
下面,通过具体实施例对本申请的技术方案进行详细说明。需要说明的是,下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
图3为本申请实施例提供的一种路由信息的处理方法的流程示意图。在上述图2a和 图2b所示系统架构的基础上,该方法应用于路由获取设备,路由获取设备连接至第一BGP模块,该第一BGP模块用于提供路由信息。如图3所示,在本实施例中,该路由信息的处理方法可以包括如下步骤:
步骤301:接收来自第一BGP模块的路由信息。
在本步骤中,路由获取设备将接收第一BGP模块发送的路由信息,该路由信息可以包括与路由获取设备连接的物理服务器中运行的各虚拟机的IP地址、MAC地址、VNI和各虚拟机所在的VTEP IP等信息。
其中,路由获取设备例如可以为作为反射器的核心交换机,也可以为TOR交换机。
步骤302:若确定第一BGP模块发生故障,进入GR状态。
在本步骤中,路由获取设备将会确定第一BGP模块是否发生故障。
在一种可能的实现方式中,路由获取设备在确定第一BGP模块是否发生故障时,可以通过判断连续n次是否接收到第一BGP模块发送的报文,若连续n次均未接收到第一BGP模块发送的报文,则确定第一BGP模块发生故障。
当然,路由获取设备还可以通过如下一种或者多种方式确定第一BGP模块是否发生故障:判断保持连接(KeepAlive)报文是否超时或传输控制协议(Transmission Control Protocol,TCP)连接是否错误等等,其中,keepalive是一种可以检测死连接的机制。例如:若判断出KeepAlive报文超时,则可以确定第一BGP模块发生了故障,或者,若判断出TCP连接错误,则确定第一BGP模块发生了故障。
路由获取设备在确定出第一BGP模块发生了故障时,将会进入GR状态,此时,路由获取设备会启动GR计时器,并将从第一BGP模块中接收到的路由信息打上特殊标记。
步骤303:结束GR状态之前,删除来自第一BGP模块的路由信息。
在本步骤中,路由获取设备在确定出第一BGP模块发生故障时,为了提高第一BGP模块的可靠性,路由获取设备将进入GR状态。为了防止由于虚拟机发生迁移或者删除,导致第一BGP模块发送的路由信息不准确,造成流量转发失败的现象。在本申请实施例中,在路由获取设备结束GR状态之前,路由获取设备将会删除从第一BGP模块接收到的路由信息,这样,由于路由获取设备将来自第一BGP模块的路由信息删除后,将不会再继续根据来自第一BGP模块的路由信息指导流量的转发,示例性的,路由获取设备将根据从其他BGP模块接收到的路由信息继续指导流量的转发,从而可以提高流量转发的成功率。
值得注意的是,第一BGP模块发送的路由信息的优先级高于其他BGP模块发送的路由信息。因此,路由获取设备通常会优先采用第一BGP模块发送的路由信息指导流量的转发。
其中,示例性的,路由获取设备连接至多个BGP模块,该多个BGP模块包括第一BGP模块和第二BGP模块,第一BGP模块为多个BGP模块中优先级最高的模块,也就是说,路由获取设备会优先采用第一BGP模块发送的路由信息指导流量的转发。路由获取设备在删除来自第一BGP模块的路由信息之前,还会接收来自第二BGP模块的路由信息;路由获取设备进入GR状态之后,删除来自第一BGP模块的路由信息之前,需要确定从第二BGP模块接收到的路由信息发生变化。
具体的,第二BGP模块的路由信息发生变化的原因,可能是由于某个虚拟机或者某 些虚拟机发生了迁移或者删除了某个虚拟机或者某些虚拟机,当然,也有可能是其他原因引起了第二BGP模块的路由信息发生了变化。另外,在第二BGP模块的路由信息发生变化时,第二BGP模块会重新向路由获取设备发送路由信息,路由获取设备将对之前保存的来自第二BGP模块的路由信息进行刷新。若第二BGP模块的路由信息未发生变化时,第二BGP模块通常不会重复向路由获取设备发送路由信息。因此,在一种可能的实现方式中,路由获取设备在判断第二BGP模块的路由信息是否发生变化时,可以判断在进入GR状态之后,是否接收到来自第二BGP模块的路由信息,若接收到来自第二BGP模块的路由信息,则确定第二BGP模块的路由信息发生了变化。其中,通过判断是否接收到来自第二BGP模块的路由信息,来判断第二BGP模块的路由信息是否发生变化,使得确定第二BGP模块的路由信息是否发生变化的判断方式更加简单。
在另一种可能的实现方式中,路由获取设备也可能会主动获取第二BGP模块路由信息,此时,在确定从第二BGP模块接收到的路由信息发生变化时,路由获取设备也可以在接收到来自第二BGP模块的路由信息之后,将本次从第二BGP模块接收到的路由信息与上一次从第二BGP模块接收到的路由信息进行比较,若本次从第二BGP模块接收到的路由信息与上一次从第二BGP模块接收到的路由信息不同,则确定从第二BGP模块接收到的路由信息发生了变化。
进一步的,在确定出从第二BGP模块接收到的路由信息发生了变化时,若第一BGP模块发生故障,那么从第一BGP模块学习到的路由信息仍然是发生变化之前的路由信息,此时,在路由获取设备进入GR状态后,如果继续采用第一BGP模块发送的路由信息指导流量转发,则将会导致流量转发失败。为了解决这一问题,本申请实施例中,在从第二BGP模块接收的路由信息发生了变化时,会将从第一BGP模块接收或者学习到的路由信息删除,这样,路由获取设备将不会继续采用来自第一BGP模块的路由信息指导流量转发,而是根据来自其他BGP模块发送的变化之后的路由信息指导流量转发,从而提高了流量转发的成功率。
在具体的实现过程中,路由获取设备在进入GR状态后,对来自第一BGP模块的路由信息添加标记,例如为来自第一BGP模块的路由信息打上stale标记,因此,在删除来自第一BGP模块的路由信息时,只需要删除添加了标记的路由信息即可,从而可以简化删除来自第一BGP模块的路由信息的流程。
示例性的,若上述路由获取设备为反射器,该反射器连接至少一个TOR交换机,路由获取设备在删除了来自第一BGP模块的路由信息之后,还可以根据来自第二BGP模块的路由信息,更新路由转发表项,并将更新后的路由转发表项发送给至少一个TOR交换机,该更新后的路由转发表项用于指示至少一个TOR交换机进行流量转发。
具体的,若在路由获取设备结束GR状态之前,也即GR计时器的计时结束之前,第一BGP模块的故障未恢复,且判断出来自第二BGP模块的路由信息发生了变化时,路由获取设备将会删除来自第一BGP模块的路由信息中的stale标记。而且由于来自第二BGP模块的路由信息是更新后的路由信息,路由获取设备可以根据该更新后的路由信息,更新路由转发表项,并将更新后的路由转发表项发送给与反射器连接的至少一个TOR交换机,TOR交换机将会根据更新后的路由转发表项指导流量转发。其中,路由转发表项中包括与TOR交换机连接的各物理服务器中运行的虚拟机的IP地址、MAC地址、VNI和VTEP 信息。
示例性的,若路由获取设备为至少一个TOR交换机,路由获取设备将根据来自第二BGP模块的路由信息,更新路由转发表项,其中,更新后的路由转发表项用于指示至少一个TOR交换机进行流量转发。
具体地,路由获取设备在删除了来自第一BGP模块的路由信息之后,将根据来自第二BGP模块的路由信息,更新自身的路由转发表项,这样,TOR交换机将会根据更新后的路由转发表项指导流量转发。其中,路由转发表项中包括与TOR交换机连接的各物理服务器中运行的虚拟机的IP地址、MAC地址、VNI和VTEP信息。
在一种可能的实现方式中,若第二BGP模块有至少两个,也即来自第二BGP模块的路由信息也为至少两个时,路由获取设备将根据来自至少两个第二BGP模块的路由信息确定优选路由,从而根据确定出的优选路由更新路由转发表项。其中,优选路由可以理解为优先级最高的路由信息,路由获取设备通常会根据优选路由指导流量的转发。
示例性的,路由获取设备可以根据预先设置的选路规则,从来自至少两个第二BGP模块的路由信息中确定优选路由,当然,也可以通过其他方式确定优选路由,对于优选路由的具体确定方式,本申请实施例中不作限制。
本领域技术人员可以理解,若在GR计时器的计时结束之前,第一BGP模块的故障恢复,路由获取设备将会删除来自第一BGP模块的路由信息中的stale标记和GR计时器,并且第一BGP模块会从网络控制器中获取最新的路由信息,将获取的最新的路由信息发送给路由获取设备,以使路由获取设备根据来自第一BGP模块的最新的路由信息以及来自第二BGP模块的路由信息,确定优选路由,从而更新路由转发表项。
需要进行说明的是,在上述各实施例中,第一BGP模块和第二BGP模块属于同一GR组内。
具体的,在本申请实施例中,路由获取设备将具有相互备份关系的BGP邻居划分到一个GR组内,例如将第一BGP模块和第二BGP模块划分到同一GR组内。当路由获取设备感知到GR组内的第一BGP模块发生故障,则路由获取设备将进入GR状态,为来自第一BGP模块的路由信息打上stale标记,并启动GR计时器,等待第一BGP模块的故障恢复。
当同组内来自第二BGP模块的路由信息发生了变化时,路由获取设备将会删除同组内相同前缀的、具有stale标记的来自第一BGP模块的路由信息,以避免来自第一BGP模块的路由信息由于优先级高导致的路由转发表项的更新或者删除失败。其中,相同前缀是指路由信息中的与TOR交换机连接的各物理服务器中运行的虚拟机的IP地址、MAC地址相同。
另外,同一个GR组内的所有BGP模块的GR状态相互独立,即如果同组内所有BGP模块都发生故障,路由获取设备依然会在最后一个BGP模块发生故障后保留GR计时器,以保证BGP模块的可靠性。
本申请实施例提供的路由信息的处理方法,通过接收来自第一BGP模块的路由信息,若确定第一BGP模块发生故障,则进入GR状态,在结束GR状态之前,删除来自第一BGP模块的路由信息。由于在第一BGP模块发生故障时,在路由获取设备结束GR状态之前,将来自第一BGP模块的路由信息删除,这样,在发生虚拟机迁移或者删除时,将不会继 续通过来自第一BGP模块的路由信息指导流量转发,从而可以提高流量转发的成功率。
下面,以路由获取设备为反射器,第一BGP模块为BGP模块A,第二BGP模块为BGP模块B为例具体说明本申请实施例中的方案,其中,BGP模块A和BGP模块B为两个独立的BGP模块。另外,对于路由获取设备为TOR交换机的方案,与路由获取设备为反射器的方案类似,此处不再赘述。
其中,用户需要预先建立BGP模块A和反射器,以及BGP模块B和反射器之间的BGP邻居关系,并设定反射器的GR能力。另外,由于BGP模块A和BGP模块B为互相备份的关系,用户需要在反射器上创建GR组,并将BGP模块A和BGP模块B加入该GR组。
图4为虚拟机路由信息发布的流程示意图,如图4所示,BGP模块A和BGP模块B发布虚拟机路由信息的过程如下:
步骤401:当创建虚拟机或虚拟机发生更新时,网络控制器的虚机网络信息分发模块会把虚拟机的网络信息同步给BGP模块A和BGP模块B。
其中,虚拟机为与TOR连接的至少一个物理服务器中运行的虚拟机。例如,若虚拟机的网络信息为VM IP:x.x.x.x,VM MAC:xx::xx,VTEP信息:y.y.y.y,L2VNI:VNI1,L3VNI:VNI2,虚机网络信息分发模块会将上述虚拟机的网络信息分别同步给BGP模块A和BGP模块B。
步骤402:BGP模块A和BGP模块B分别根据虚拟机的网络信息封装路由信息,并将封装后的路由信息发布给反射器。
其中,BGP模块A根据虚拟机的网络信息封装后得到的路由信息为x.x.x.x nexthop y.y.y.y from A,BGP模块B根据虚拟机的网络信息封装后得到的路由信息为x.x.x.x nexthop y.y.y.y from B,BGP模块A和BGP模块B分别通过BGP-EVPN路由update报文向反射器发布上述的路由信息。
步骤403:反射器本地进行路由选路,得到优选路由。
例如,经过选路之后,可以将x.x.x.x nexthop y.y.y.y from A作为最优路由,将x.x.x.x nexthop y.y.y.y from B作为次优路由。
步骤404:反射器向TOR交换机发布优选路由。
其中,反射器可以将x.x.x.x nexthop y.y.y.y from A路由信息发送给TOR交换机。
步骤405:TOR交换机根据优选路由封装Vxlan报文指导流量转发。
在本实施例中,通过步骤401-步骤405,虚机网络信息分发模块可以通过BGP模块A和BGP模块B,将路由信息发布给反射器,反射器再将路由信息发送给TOR交换机。
需要进行说明的是,在路由获取设备为TOR交换机,也即没有反射器时,上述方案中,步骤404将不会再执行,具体的,在步骤402中,BGP模块A和BGP模块B会将封装后的路由信息发布给TOR交换机,在步骤403中,由TOR交换机本地进行路由选路,以得到优先路由,从而根据优先路由封装Vxlan报文指导流量转发。具体的实现过程可以参见上述各步骤,在此不再赘述。
下面,将基于上述图4的路由信息,对单个BGP模块发生故障,以及所有BGP模块均发生故障后,TOR交换机如何指导流量转发的情况进行介绍。
图5为单个BGP模块发生故障且正常恢复后的流程示意图,本实施例中以发生了虚拟机迁移为例进行说明,如图5所示,具体过程如下:
步骤501:反射器确定BGP模块A发生了故障,则为从BGP模块A接收到的路由信息添加stale标记,并启动GR计时器。
其中,若反射器连续三次未接收到BGP模块A发送的KA报文,则可以确定BGP模块A发生了故障,则反射器将进入GR状态,并且为从BGP模块A接收到的路由信息添加stale标记,并启动GR计时器。
例如:可以为x.x.x.x nexthop y.y.y.y from A添加stale标记。
步骤502:若虚拟机发生迁移,虚机网络信息分发模块向BGP模块B发送虚拟机网络信息。
例如:若虚拟机发生迁移,虚机网络信息分发模块会向BGP模块B发送虚拟机网络信息:VM IP:x.x.x.x,VM MAC:xx::xx,VTEP IP:z.z.z.z,L2VNI:VNI1,L3VNI:VNI2。BGP模块B根据虚拟机的网络信息封装后得到的路由信息为x.x.x.x nexthop z.z.z.z from B。
其中,步骤501和步骤502之间没有先后顺序,可以先执行步骤501,再执行步骤502,也可以先执行步骤502,再执行步骤501,还可以是步骤501和步骤502同时执行。
步骤503:BGP模块B向反射器发送封装后的路由信息。
其中,BGP模块B通过BGP-EVPN路由update报文向反射器发送封装后的路由信息x.x.x.x nexthop z.z.z.z from B。
步骤504:反射器删除同GR组内同前缀的stale路由,并重新进行选路,得到优选路由。
其中,反射器在GR状态结束之前,将同GR组内同前缀的stale路由信息删除,也即将BGP模块A发送的路由信息x.x.x.x nexthop y.y.y.y from A删除。
然后,反射器根据BGP模块B发送的路由信息,重新进行选路,以得到优选路由,例如选择x.x.x.x nexthop z.z.z.z from B作为优选路由。
步骤505:反射器向TOR交换机发布优选路由。
其中,反射器可以将x.x.x.x nexthop z.z.z.z from B路由信息发送给TOR交换机。
步骤506:TOR交换机根据优选路由封装VxLan报文指导流量转发。
步骤507:在GR计时器的计时结束之前,BGP模块A的故障恢复,则BGP模块A与反射器重新建立BGP邻居关系。
步骤508:反射器删除stale标记,并删除GR计时器。
步骤509:BGP模块A从虚机网络信息分发模块中获取全量的路由信息。
其中,步骤507和步骤509之间没有先后顺序,可以先执行步骤507,再执行步骤509,也可以先执行步骤509,再执行步骤507,还可以是步骤507和步骤509同时执行。
步骤510:BGP模块A向反射器发送获取的全量的路由信息。
其中,BGP模块A通过BGP-EVPN路由update报文向反射器发送最新的全量路由信息,例如发送x.x.x.x nexthop z.z.z.z from A。
步骤511:反射器重新进行选路,得到优选路由。
其中,反射器根据BGP模块A发送的全量的路由信息,以及BGP模块B发送的路由信息,重新进行选路,从而得到优选路由。
例如:反射器根据x.x.x.x nexthop z.z.z.z from A和x.x.x.x nexthop z.z.z.z from B,确定x.x.x.x nexthop z.z.z.z from A为最优路由,x.x.x.x nexthop z.z.z.z from B为次优路由。
步骤512:反射器向TOR交换机发布优选路由。
其中,反射器可以将x.x.x.x nexthop z.z.z.z from A路由信息发送给TOR交换机,TOR交换机根据接收的路由信息刷新本地路由表。
步骤513:TOR交换机根据优选路由封装VxLan报文指导流量转发。
在上述实施例中,由于在BGP模块A发生故障时,在反射器的GR状态结束之前,将从BGP模块A中接收到的路由信息删除,这样,在发生虚拟机迁移或者删除时,将不会继续通过BGP模块A发送的路由信息指导流量转发,而是根据其他BGP模块发送的路由信息进行流量转发,从而可以提高流量转发的成功率。
需要进行说明的是,在路由获取设备为TOR交换机,也即没有反射器时,上述方案中,步骤505和步骤512将不会再执行,且其他步骤中,由反射器执行的动作将由TOR交换机执行,对于具体的实现过程,可以参见上述各步骤,在此不再赘述。
图6为单个BGP模块发生故障且故障未恢复的流程示意图,本实施例中以发生了虚拟机删除为例进行说明,如图6所示,具体过程如下:
步骤601:反射器确定BGP模块A发生了故障,则为从BGP模块A接收到的路由信息添加stale标记,并启动GR计时器。
其中,若反射器连续三次未接收到BGP模块A发送的KA报文,则可以确定BGP模块A发生了故障,则反射器将进入GR状态,并且为从BGP模块A接收到的路由信息添加stale标记,并启动GR计时器。
例如:可以为x.x.x.x nexthop y.y.y.y from A添加stale标记。
步骤602:若虚拟机发生删除,虚机网络信息分发模块向BGP模块B发送虚拟机网络信息。
例如:若虚拟机发生删除,虚机网络信息分发模块会向BGP模块B发送虚拟机网络信息:VM IP:x.x.x.x,VM MAC:xx::xx。
其中,步骤601和步骤602之间没有先后顺序,可以先执行步骤601,再执行步骤602,也可以先执行步骤602,再执行步骤601,还可以是步骤601和步骤602同时执行。
步骤603:BGP模块B向反射器发送撤销路由信息的消息。
其中,若发生了虚拟机删除,则BGP模块B会向反射器发送撤销路由信息的消息。例如,撤销x.x.x.x nexthop z.z.z.z from B路由信息。
步骤604:反射器删除同GR组内同前缀的stale路由信息。
其中,反射器在GR状态结束之前,将同GR组内同前缀的stale路由信息删除,也即将BGP模块A发送的路由信息x.x.x.x nexthop y.y.y.y from A删除。
步骤605:反射器向TOR交换机发送撤销路由信息的消息。
例如,撤销x.x.x.x nexthop z.z.z.z from B路由信息,此时,TOR交换机将刷新本地路由表,而且可以获知,虚拟机x.x.x.x不可达。
步骤606:GR计时器超时,且BGP模块A故障未恢复,则反射器删除本地所有BGP模块A发送的添加了stale标记的路由信息,并删除GR计时器。
在上述实施例中,由于在BGP模块A发生故障时,在反射器的GR状态结束之前,将 从BGP模块A中接收到的路由信息删除,这样,在发生虚拟机迁移或者删除时,将不会继续通过BGP模块A发送的路由信息指导流量转发,而是根据其他BGP模块发送的路由信息进行流量转发,从而可以提高流量转发的成功率。
需要进行说明的是,在路由获取设备为TOR交换机,也即没有反射器时,上述方案中,步骤605将不会再执行,且其他步骤中,由反射器执行的动作将由TOR交换机执行,对于具体的实现过程,可以参见上述各步骤,在此不再赘述。
图7为所有BGP模块发生故障的流程示意图,如图7所示,具体过程如下:
步骤701:反射器确定BGP模块A发生了故障,则为从BGP模块A接收到的路由信息添加stale标记,并启动GR计时器1。
其中,若反射器连续三次未接收到BGP模块A发送的KA报文,则可以确定BGP模块A发生了故障,则反射器将进入GR状态,并且为从BGP模块A接收到的路由信息添加stale标记,并启动GR计时器1。
例如:可以为x.x.x.x nexthop y.y.y.y from A添加stale标记。
步骤702:反射器确定BGP模块B发生了故障,则为从BGP模块B接收到的路由信息添加stale标记,并启动GR计时器2。
其中,若反射器连续三次未接收到BGP模块B发送的KA报文,则可以确定BGP模块B发生了故障,则反射器将进入GR状态,并且为从BGP模块B接收到的路由信息添加stale标记,并启动GR计时器2。
例如:可以为x.x.x.x nexthop y.y.y.y from B添加stale标记。
步骤703:GR计时器1超时,且BGP模块A故障未恢复,则反射器删除本地所有BGP模块A发送的添加了stale标记的路由信息,并删除GR计时器1。
步骤704:反射器根据BGP模块B发送的路由信息重新进行选路,得到优选路由。
例如:可以确定添加了stale标记的x.x.x.x nexthop y.y.y.y from B为优选路由。
步骤705:反射器向TOR交换机发布优选路由。
其中,反射器可以将x.x.x.x nexthop y.y.y.y from B路由信息发送给TOR交换机,TOR交换机根据接收的路由信息刷新本地路由表。
步骤706:GR计时器2超时,且BGP模块B故障未恢复,则反射器删除本地所有BGP模块B发送的添加了stale标记的路由信息,并删除GR计时器2。
步骤707:反射器向TOR交换机发送撤销路由信息的消息。
例如,撤销x.x.x.x nexthop y.y.y.y路由信息,此时,TOR交换机将刷新本地路由表,而且可以获知,虚拟机x.x.x.x不可达。
在上述实施例中,由于在BGP模块A和BGP模块B均发生故障时,反射器依然会在最后一个BGP模块进入故障后保留GR计时器的时间,从而可以提高BGP模块的可靠性。
需要进行说明的是,在路由获取设备为TOR交换机,也即没有反射器时,上述方案中,步骤705和步骤707将不会再执行,且其他步骤中,由反射器执行的动作将由TOR交换机执行,对于具体的实现过程,可以参见上述各步骤,在此不再赘述。
图8a为本申请实施例提供的一种路由信息的处理装置的结构示意图,其中,路由信息的处理装置80可以是前述实施例中的反射器,也可以是前述实施例中的TOR交换机。 参见图8a,该装置连接至第一边界网关协议BGP模块,所述第一BGP模块用于提供路由信息,所述装置包括:接收单元11和处理单元12,其中:
接收单元11,用于接收来自所述第一BGP模块的路由信息;
处理单元12,用于在确定所述第一BGP模块发生故障时,进入GR状态;
所述处理单元12,还用于在结束所述GR状态之前,删除来自所述第一BGP模块的路由信息。
本申请实施例提供的路由信息的处理装置,接收单元11通过接收来自第一BGP模块的路由信息,处理单元12在确定第一BGP模块发生故障时,进入GR状态,处理单元12在结束所述GR状态之前,删除来自第一BGP模块的路由信息。由于在第一BGP模块发生故障时,在路由获取设备的GR状态结束之前,将从第一BGP模块中接收到的路由信息删除,这样,在发生虚拟机迁移或者删除时,将不会继续通过第一BGP模块发送的路由信息指导流量转发,从而可以提高流量转发的成功率。
示例性的,所述路由信息的处理装置80连接至多个BGP模块,多个BGP模块包括所述第一BGP模块和第二BGP模块,第一BGP模块为多个BGP模块中优先级最高的模块;
所述接收单元11,还用于:接收来自所述第二BGP模块的路由信息;
所述处理单元12,还用于:确定从所述第二BGP模块接收到的路由信息发生变化。
示例性的,所述处理单元12,具体用于:
判断本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息是否相同;
若本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息不相同,则确定从所述第二BGP模块接收到的路由信息发生变化。
示例性的,图8b为本申请实施例提供的另一种路由信息的处理装置的结构示意图,如图8b所示,所述路由信息的处理装置80为反射器,所述反射器连接至至少一个TOR交换机;所述装置80还包括:发送单元13;其中,
所述处理单元12,还用于:
根据来自所述第二BGP模块的路由信息,更新路由转发表项;
所述发送单元13,用于将更新后的路由转发表项发送给所述至少一个TOR交换机,所述更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
示例性的,所述路由信息的处理装置80为至少一个TOR交换机;
所述处理单元12,还用于:根据来自所述第二BGP模块的路由信息,更新路由转发表项,更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
示例性的,所述处理单元12,具体用于:
根据来自所述第二BGP模块的路由信息确定优选路由;
根据所述优选路由更新所述路由转发表项。
本申请实施例提供的路由信息的处理装置,可以执行上述对应的方法实施例,例如可以是图3-图7所示的实施例,其实现原理和技术效果类似,在此不再赘述。
需要说明的是,应理解以上装置的各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分 单元通过软件通过处理元件调用的形式实现,部分单元通过硬件的形式实现。例如,接收单元可以为单独设立的处理元件,也可以集成在该装置的某一个芯片中实现,此外,也可以以程序的形式存储于装置的存储器中,由该装置的某一个处理元件调用并执行该接收单元的功能。其它单元的实现与之类似。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。此外,以上接收单元是一种控制接收的单元,可以通过该装置的接收装置,例如天线和射频装置接收信息。
以上这些单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个单元通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
参见图9,图9是本申请实施例提供的一种路由获取设备的结构示意图。如图9所示,该路由获取设备900包括:处理器910、通信接口920以及存储器930,所述处理器910、通信接口920以及存储器930通过内部总线940相互连接。应理解,该路由获取设备可以是反射器或TOR交换机。
所述处理器910可以由一个或者多个通用处理器构成,例如中央处理器(central processing unit,CPU),或者CPU和硬件芯片的组合。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC)、可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。
总线940可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线940可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但不表示仅有一根总线或一种类型的总线。
存储器930可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM);存储器930也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM)、快闪存储器(flash memory)、硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器930还可以包括上述种类的组合。存储器930可用于存储程序代码和数据,以便于处理器910调用存储器930中存储的程序代码和数据以实现上述接收单元11、处理单元12和发送模块13的功能。程序代码可以是用来实现图8所示的路由信息的处理装置的功能模块,或者用于实现图3-图7所示的方法实施例中以路由信息的处理装置为执行主体的方法步骤。
此外,上述实施例中的路由信息的处理装置80也可以由多个路由获取设备900实现。多个路由获取设备900包括多个处理器910和多个存储器930。多个处理器910协同实现如图8中所示的接收单元11、处理单元12和发送模块13。
或者,以上各个单元的部分或全部也可以通过集成电路的形式内嵌于该路由获取设备的某一个芯片上来实现。且它们可以单独实现,也可以集成在一起。即以上这些单元可以被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。
本申请还提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现前述任一实施例提供的路由信息的处理方法。
本申请还提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。路由获取设备的至少一个处理器可以从可读存储介质读取该计算机程序,至少一个处理器执行该计算机程序使得路由获取设备实施前述各种实施方式提供的路由信息的处理方法。
本申请实施例还提供了一种路由获取设备,包括至少一个存储元件和至少一个处理元件、所述至少一个存储元件用于存储程序,该程序被执行时,使得所述路由获取设备执行上述任一实施例中的路由获取设备的操作。
实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一可读取存储器中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储器(存储介质)包括:只读存储器(英文:read-only memory,ROM)、RAM、快闪存储器、硬盘、固态硬盘、磁带(magnetic tape)、软盘(floppy disk)、光盘(optical disc)及其任意组合。
Claims (14)
- 一种路由信息的处理方法,其特征在于,所述方法应用于路由获取设备,所述路由获取设备连接至第一边界网关协议BGP模块,所述第一BGP模块用于提供路由信息;所述方法包括:接收来自所述第一BGP模块的路由信息;若确定所述第一BGP模块发生故障,进入GR状态;结束所述GR状态之前,删除来自所述第一BGP模块的路由信息。
- 根据权利要求1所述的方法,其特征在于,所述路由获取设备连接至多个BGP模块,所述多个BGP模块包括所述第一BGP模块和第二BGP模块,所述第一BGP模块为所述多个BGP模块中优先级最高的模块;所述删除来自所述第一BGP模块的路由信息之前,所述方法还包括:接收来自所述第二BGP模块的路由信息;所述进入GR状态之后,所述删除来自所述第一BGP模块的路由信息之前,所述方法还包括:确定从所述第二BGP模块接收到的路由信息发生变化。
- 根据权利要求2所述的方法,其特征在于,所述确定从所述第二BGP模块接收到的路由信息发生变化,包括:判断本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息是否相同;若本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息不相同,则确定从所述第二BGP模块接收到的路由信息发生变化。
- 根据权利要求2或3所述的方法,其特征在于,所述路由获取设备为反射器,所述反射器连接至至少一个TOR交换机;所述方法还包括:根据来自所述第二BGP模块的路由信息,更新路由转发表项;将更新后的路由转发表项发送给所述至少一个TOR交换机,所述更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
- 根据权利要求2或3所述的方法,其特征在于,所述路由获取设备为至少一个TOR交换机;所述方法还包括:根据来自所述第二BGP模块的路由信息,更新路由转发表项,更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
- 根据权利要求4或5所述的方法,其特征在于,所述根据来自所述第二BGP模块的路由信息,更新路由转发表项,包括:根据来自所述第二BGP模块的路由信息确定优选路由;根据所述优选路由更新所述路由转发表项。
- 一种路由信息的处理装置,其特征在于,所述路由信息的处理装置连接至第一边界网关协议BGP模块,所述第一BGP模块用于提供路由信息,所述装置包括:接收单元,用于接收来自所述第一BGP模块的路由信息;处理单元,用于在确定所述第一BGP模块发生故障时,进入GR状态;所述处理单元,还用于在结束所述GR状态之前,删除来自所述第一BGP模块的路由信息。
- 根据权利要求7所述的装置,其特征在于,所述路由信息的处理装置连接至多个BGP模块,所述多个BGP模块包括所述第一BGP模块和第二BGP模块,所述第一BGP模块为所述多个BGP模块中优先级最高的模块;所述接收单元,还用于:接收来自所述第二BGP模块的路由信息;所述处理单元,还用于:确定从所述第二BGP模块接收到的路由信息发生变化。
- 根据权利要求8所述的装置,其特征在于,所述处理单元,具体用于:判断本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息是否相同;若本次从所述第二BGP模块接收到的路由信息与上一次从所述第二BGP模块接收到的路由信息不相同,则确定从所述第二BGP模块接收到的路由信息发生变化。
- 根据权利要求8或9所述的装置,其特征在于,所述路由信息的处理装置为反射器,所述反射器连接至至少一个TOR交换机;所述装置还包括:发送单元;其中,所述处理单元,还用于:根据来自所述第二BGP模块的路由信息,更新路由转发表项;所述发送单元,用于将更新后的路由转发表项发送给所述至少一个TOR交换机,所述更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
- 根据权利要求8或9所述的装置,其特征在于,所述路由信息的处理装置为至少一个TOR交换机;所述处理单元,还用于:根据来自所述第二BGP模块的路由信息,更新路由转发表项,更新后的路由转发表项用于指示所述至少一个TOR交换机进行流量转发。
- 根据权利要求10或11所述的装置,其特征在于,所述处理单元,具体用于:根据来自所述第二BGP模块的路由信息确定优选路由;根据所述优选路由更新所述路由转发表项。
- 一种路由获取设备,其特征在于,包括:处理器;存储器;以及计算机程序;其中,所述计算机程序被存储在所述存储器中,并且被配置为由所述处理器执行,所述计算机程序包括用于执行如权利要求1-6任一项所述的方法的指令。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序使得路由获取设备执行权利要求1-6任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911024778.5 | 2019-10-25 | ||
CN201911024778.5A CN110971516B (zh) | 2019-10-25 | 2019-10-25 | 路由信息的处理方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021077768A1 true WO2021077768A1 (zh) | 2021-04-29 |
Family
ID=70029798
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/096003 WO2021077768A1 (zh) | 2019-10-25 | 2020-06-14 | 路由信息的处理方法和装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110971516B (zh) |
WO (1) | WO2021077768A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113726649A (zh) * | 2021-09-07 | 2021-11-30 | 新华三大数据技术有限公司 | 路由信息处理方法及系统 |
CN113746730A (zh) * | 2021-08-25 | 2021-12-03 | 新华三大数据技术有限公司 | 一种路由信息处理方法及装置 |
CN113765783A (zh) * | 2021-08-05 | 2021-12-07 | 新华三大数据技术有限公司 | 通信方法及装置 |
CN115333994A (zh) * | 2022-08-01 | 2022-11-11 | 北京金山云网络技术有限公司 | 实现vpn路由快速收敛的方法、装置以及电子设备 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110971516B (zh) * | 2019-10-25 | 2021-01-15 | 华为技术有限公司 | 路由信息的处理方法和装置 |
JP2024500907A (ja) * | 2020-12-21 | 2024-01-10 | 華為技術有限公司 | ルート伝送方法および装置 |
CN113595893B (zh) * | 2021-07-20 | 2024-05-14 | 锐捷网络股份有限公司 | 一种路由接收系统、路由接收方法、装置、设备及介质 |
CN115297055B (zh) * | 2022-07-25 | 2024-01-23 | 紫光云技术有限公司 | 一种公有云云主机迁移arp表项更新方法 |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102136999A (zh) * | 2010-10-29 | 2011-07-27 | 华为技术有限公司 | 一种路由收敛方法、系统以及边缘交换设备 |
CN102281199A (zh) * | 2011-08-16 | 2011-12-14 | 华为数字技术有限公司 | 路由设备、路由反射器、路由信息处理方法和系统 |
CN102571425A (zh) * | 2011-12-28 | 2012-07-11 | 杭州华三通信技术有限公司 | 一种边界网关协议平滑重启方法和装置 |
EP3264691A1 (en) * | 2016-06-30 | 2018-01-03 | Juniper Networks, Inc. | Auto discovery and auto scaling of services in software-defined network environment |
CN108123876A (zh) * | 2017-12-14 | 2018-06-05 | 新华三技术有限公司 | 边界网关协议bgp路由信息处理方法及装置 |
US10200274B1 (en) * | 2017-02-17 | 2019-02-05 | Juniper Networks, Inc. | Enhanced traffic flow in software-defined networking controller-based architecture |
CN109412943A (zh) * | 2017-08-18 | 2019-03-01 | 中兴通讯股份有限公司 | 一种sdn控制器集群流量处理方法、装置、设备及存储介质 |
CN110971516A (zh) * | 2019-10-25 | 2020-04-07 | 华为技术有限公司 | 路由信息的处理方法和装置 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7688714B2 (en) * | 2004-04-28 | 2010-03-30 | Cisco Technology, Inc. | Network routing apparatus that performs soft graceful restart |
US7710899B1 (en) * | 2005-08-16 | 2010-05-04 | Cisco Technology, Inc. | System and method for speeding border gateway protocol graceful restart |
CN100558057C (zh) * | 2007-07-20 | 2009-11-04 | 华为技术有限公司 | 一种双向转发检测会话的处理方法及装置 |
CN101364927A (zh) * | 2008-09-24 | 2009-02-11 | 华为技术有限公司 | 实现虚拟专用网vpn故障恢复的方法、设备及系统 |
CN101494604B (zh) * | 2009-03-04 | 2013-01-02 | 华为技术有限公司 | Vrf的迁移方法、迁移装置及vrf分布式通信系统 |
CN101997757B (zh) * | 2009-08-19 | 2012-10-17 | 华为技术有限公司 | 迁移路由信息的方法、设备及系统 |
CN102413031B (zh) * | 2011-12-28 | 2015-09-23 | 杭州华三通信技术有限公司 | 一种rpr故障保护方法及其设备 |
CN106230720B (zh) * | 2016-08-02 | 2021-03-12 | 新华三技术有限公司 | 一种设备故障后的路由恢复方法及装置 |
CN108259325B (zh) * | 2016-12-29 | 2021-07-30 | 中国电信股份有限公司 | 路由维护方法和路由设备 |
-
2019
- 2019-10-25 CN CN201911024778.5A patent/CN110971516B/zh active Active
-
2020
- 2020-06-14 WO PCT/CN2020/096003 patent/WO2021077768A1/zh active Application Filing
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102136999A (zh) * | 2010-10-29 | 2011-07-27 | 华为技术有限公司 | 一种路由收敛方法、系统以及边缘交换设备 |
CN102281199A (zh) * | 2011-08-16 | 2011-12-14 | 华为数字技术有限公司 | 路由设备、路由反射器、路由信息处理方法和系统 |
CN102571425A (zh) * | 2011-12-28 | 2012-07-11 | 杭州华三通信技术有限公司 | 一种边界网关协议平滑重启方法和装置 |
EP3264691A1 (en) * | 2016-06-30 | 2018-01-03 | Juniper Networks, Inc. | Auto discovery and auto scaling of services in software-defined network environment |
US10200274B1 (en) * | 2017-02-17 | 2019-02-05 | Juniper Networks, Inc. | Enhanced traffic flow in software-defined networking controller-based architecture |
CN109412943A (zh) * | 2017-08-18 | 2019-03-01 | 中兴通讯股份有限公司 | 一种sdn控制器集群流量处理方法、装置、设备及存储介质 |
CN108123876A (zh) * | 2017-12-14 | 2018-06-05 | 新华三技术有限公司 | 边界网关协议bgp路由信息处理方法及装置 |
CN110971516A (zh) * | 2019-10-25 | 2020-04-07 | 华为技术有限公司 | 路由信息的处理方法和装置 |
Non-Patent Citations (3)
Title |
---|
GODAN FEDERICO; COLMAN SANTIAGO; GRAMPIN EDUARDO: "Multicast BGP with SDN control plane", 2016 7TH INTERNATIONAL CONFERENCE ON THE NETWORK OF THE FUTURE (NOF), IEEE, 16 November 2016 (2016-11-16), pages 1 - 5, XP033037416, DOI: 10.1109/NOF.2016.7810140 * |
IETF NETWORK WORKING GROUP: "Graceful Restart Mechanism for BGP", REQUEST FOR COMMENTS: 4724, 31 January 2007 (2007-01-31), XP015055044 * |
ZHANG JIEXIN, FU ZHIREN; WU ZHIMING; XU WENHUA; XU HAIFENG: "Vx LAN Application in Cloud Datacenter Network", DIANXIN KEXUE - TELECOMMUNICATIONS SCIENCE, RENMIN YOUDIAN CHUBANSHE, BEIJING, CN, vol. 31, no. 9, 1 January 2015 (2015-01-01), CN, pages 170 - 176, XP055803763, ISSN: 1000-0801, DOI: 10.11959/j.issn.1000-0801.2015238 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113765783A (zh) * | 2021-08-05 | 2021-12-07 | 新华三大数据技术有限公司 | 通信方法及装置 |
CN113746730A (zh) * | 2021-08-25 | 2021-12-03 | 新华三大数据技术有限公司 | 一种路由信息处理方法及装置 |
CN113726649A (zh) * | 2021-09-07 | 2021-11-30 | 新华三大数据技术有限公司 | 路由信息处理方法及系统 |
CN115333994A (zh) * | 2022-08-01 | 2022-11-11 | 北京金山云网络技术有限公司 | 实现vpn路由快速收敛的方法、装置以及电子设备 |
CN115333994B (zh) * | 2022-08-01 | 2024-05-31 | 北京金山云网络技术有限公司 | 实现vpn路由快速收敛的方法、装置以及电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN110971516B (zh) | 2021-01-15 |
CN110971516A (zh) | 2020-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021077768A1 (zh) | 路由信息的处理方法和装置 | |
US11606292B2 (en) | Route processing method, device, and system | |
US9019814B1 (en) | Fast failover in multi-homed ethernet virtual private networks | |
US9929940B2 (en) | Update of MAC routes in EVPN single-active topology | |
CN107113241B (zh) | 路由确定方法、网络配置方法以及相关装置 | |
US9300524B2 (en) | Message forwarding between geographically dispersed network sites | |
US10361992B2 (en) | Method for synchronizing virtual machine location information between data center gateways, gateway, and system | |
CN111510378A (zh) | Evpn报文处理方法、设备及系统 | |
CN107948041B (zh) | 构建vxlan集中式多活网关的方法和设备 | |
WO2020135395A1 (zh) | 一种跨内部网关协议的前缀标识通告方法和装置 | |
WO2022001669A1 (zh) | 建立vxlan隧道的方法及相关设备 | |
CN111736958A (zh) | 虚拟机迁移方法、系统、计算机设备及存储介质 | |
CN111698164B (zh) | 虚拟机的网络路由方法、装置和管理服务器 | |
US20230231795A1 (en) | Method for Synchronizing Topology Information in SFC Network, and Routing Network Element | |
JP2022095786A (ja) | ループ回避通信方法、ループ回避通信デバイスおよびループ回避通信システム | |
US10447581B2 (en) | Failure handling at logical routers according to a non-preemptive mode | |
US11750496B2 (en) | Method for multi-cloud interconnection and device | |
JP7483924B2 (ja) | 接続ステータス検出方法、関連デバイス、コンピュータ記憶媒体、およびコンピュータプログラム | |
WO2020029928A1 (zh) | Bgp会话建立、发送接口地址和别名的方法及网络设备 | |
US11296907B2 (en) | Systems and methods for transitioning of virtualized transport networks | |
CN113973072B (zh) | 报文发送方法、设备及系统 | |
US20220174013A1 (en) | Communication Method and Apparatus | |
US11711240B1 (en) | Method to provide broadcast/multicast support in public cloud | |
US20240039829A1 (en) | Route refresh method, apparatus, and system | |
US20230224245A1 (en) | Packet Transmission Method and Apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20879999 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20879999 Country of ref document: EP Kind code of ref document: A1 |