CN114389949A - Route upgrading method, electronic equipment and storage medium - Google Patents

Route upgrading method, electronic equipment and storage medium Download PDF

Info

Publication number
CN114389949A
CN114389949A CN202210068288.0A CN202210068288A CN114389949A CN 114389949 A CN114389949 A CN 114389949A CN 202210068288 A CN202210068288 A CN 202210068288A CN 114389949 A CN114389949 A CN 114389949A
Authority
CN
China
Prior art keywords
backup
routing
upgrade
network device
routing table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210068288.0A
Other languages
Chinese (zh)
Other versions
CN114389949B (en
Inventor
林娥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN202210068288.0A priority Critical patent/CN114389949B/en
Publication of CN114389949A publication Critical patent/CN114389949A/en
Application granted granted Critical
Publication of CN114389949B publication Critical patent/CN114389949B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/56Routing software
    • H04L45/563Software download or update
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application relates to the technical field of communication transmission and discloses a route upgrading method, electronic equipment and a storage medium. The route upgrading method is applied to network equipment and comprises the following steps: receiving a backup instruction of a central controller, and backing up a current main routing table according to the backup instruction; receiving an upgrading instruction sent by a central controller under the condition that all network equipment is successfully backed up, wherein the central controller is in communication connection with all the network equipment; upgrading the routing software according to the upgrading instruction, and routing according to the backup main routing table in the upgrading process of the routing software; and after receiving a switching instruction sent by the central controller under the condition that each network device is successfully upgraded, routing according to a routing table generated by the upgraded routing software. In the embodiment of the application, the problems of interruption of service flow and the like caused by route loss due to processes such as restarting and the like when the dynamic routing software is updated are avoided, and the dynamic routing software of the network equipment is smoothly updated.

Description

路由升级方法、电子设备及存储介质Routing upgrade method, electronic device and storage medium

技术领域technical field

本发明涉及通信传输技术领域,尤其涉及路由升级方法、电子设备及存储介质。The present invention relates to the technical field of communication transmission, and in particular, to a route upgrade method, an electronic device and a storage medium.

背景技术Background technique

在基于软件定义广域网(SD-WAN,Software Defined Wide Area Network)搭建的网络中,通过使用动态路由软件,能够使得企业中多台网络设备实现自主进行动态路由学习的动作。In a network based on Software Defined Wide Area Network (SD-WAN, Software Defined Wide Area Network), by using dynamic routing software, multiple network devices in an enterprise can realize autonomous dynamic routing learning.

升级/替换动态路由软件时,会存在本网络设备的路由信息出错的风险,例如在升级过程中会存在数据删除、数据输入、数据更新等,均有可能导致路由信息丢失或出错,影响正在运行中的路由动作,还例如在升级完成后进行重启的过程,也可能导致业务流量的路由中断。如果企业有多台网络设备的组网需要升级/替换动态路由软件,则会导致企业的业务流量多次出错或中断。When upgrading/replacing the dynamic routing software, there is a risk of errors in the routing information of the network equipment. For example, during the upgrade process, there will be data deletion, data input, data update, etc., which may lead to loss or error of routing information, affecting the running Routing actions in , such as the process of restarting after the upgrade is completed, may also cause the routing of service traffic to be interrupted. If an enterprise has multiple network devices and needs to upgrade/replace the dynamic routing software, it will result in multiple errors or interruptions of the enterprise's business traffic.

发明内容SUMMARY OF THE INVENTION

本申请实施例的主要目的在于提出一种路由升级方法、电子设备及存储介质,用于保证业务流量的正常运行,避免流量出错或中断等情况发生。The main purpose of the embodiments of the present application is to propose a route upgrade method, electronic device and storage medium, which are used to ensure the normal operation of service traffic and avoid traffic errors or interruptions.

为实现上述目的,本申请实施例提供了一种路由升级方法,应用于网络设备,包括:接收中央控制器的备份指令,根据备份指令备份当前的主路由表;接收中央控制器在各网络设备均备份成功的情况下发送的升级指令,中央控制器与各网络设备均通信连接;根据升级指令升级路由软件,并在路由软件的升级过程中,根据备份的主路由表进行路由;在接收到中央控制器在各网络设备均升级成功的情况下发送的切换指令后,根据升级后的路由软件生成的路由表进行路由。In order to achieve the above purpose, an embodiment of the present application provides a route upgrade method, which is applied to a network device, including: receiving a backup instruction from a central controller, and backing up the current main routing table according to the backup instruction; The upgrade instructions sent when all backups are successful, and the central controller communicates with each network device; upgrades the routing software according to the upgrade instructions, and performs routing according to the backup main routing table during the upgrade process of the routing software; After the switching instruction sent by the central controller under the condition that all network devices have been upgraded successfully, routing is performed according to the routing table generated by the upgraded routing software.

为实现上述目的,本申请实施例还提供了一种路由升级方法,应用于中央控制器,包括:向网络设备发送备份指令,供网络设备根据备份指令备份当前的主路由表;获取各网络设备的备份状态,在各网络设备均备份成功的情况下向各网络设备发送升级指令,供网络设备根据升级指令升级路由软件并在路由软件的升级过程中,根据备份的主路由表进行路由;获取各网络设备的升级状态,在各网络设备均升级成功的情况下向各网络设备发送切换指令;切换指令用于指示网络设备根据升级后的路由软件生成的路由表进行路由。In order to achieve the above purpose, an embodiment of the present application also provides a route upgrade method, which is applied to a central controller, including: sending a backup instruction to a network device for the network device to back up the current main routing table according to the backup instruction; obtaining each network device When the backup status of each network device is successful, an upgrade command is sent to each network device, so that the network device can upgrade the routing software according to the upgrade command and perform routing according to the backup main routing table during the upgrade process of the routing software; The upgrade status of each network device sends a switching command to each network device when all network devices are successfully upgraded; the switching command is used to instruct the network device to perform routing according to the routing table generated by the upgraded routing software.

为实现上述目的,本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述应用于网络设备的路由升级方法,或能够执行应用于中央控制器的路由升级方法。To achieve the above object, an embodiment of the present application further provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor , the instructions are executed by at least one processor, so that the at least one processor can execute the above-mentioned route upgrade method applied to the network device, or can execute the route upgrade method applied to the central controller.

为实现上述目的,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现上述应用于网络设备的路由升级方法,或能够实现上述应用于中央控制器的路由升级方法。In order to achieve the above purpose, the embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The controller's route upgrade method.

本申请中,通过接收并执行中央控制器下发的指令进行路由升级,包括通知所有设备在升级前将动态路由表备份成静态路由表,从而在升级过程中将企业业务流量切到走备份后的路由表。即升级过程并不影响到业务流量的传输,原业务按照备份的路由表进行路由,在路由软件完成升级后切换到升级后路由软件生成的路由表中,避免升级动态路由软件时由于重启等过程导致路由丢失,从而引发业务流量中断等问题,实现平滑升级网络设备的动态路由软件。此外,中央控制器根据各网络设备在各升级阶段反馈的状态确定是否推进下一步,使得各网络设备的升级进度保持一致,相较于现有技术中的逐台升级方案来说,可保持企业各网络设备的升级状态一致,避免出现部分升级成功部分未升级或失败的状态,进而避免整个升级过程中因设备状态不一致而对业务流量产生的影响。In this application, routing upgrade is performed by receiving and executing the instructions issued by the central controller, including informing all devices to back up the dynamic routing table into a static routing table before upgrading, so as to switch the business traffic of the enterprise to the back up during the upgrade process routing table. That is to say, the upgrade process does not affect the transmission of service traffic. The original service is routed according to the backup routing table. After the routing software is upgraded, it is switched to the routing table generated by the upgraded routing software to avoid the process of restarting the dynamic routing software during the upgrade. This leads to the loss of routes, which leads to problems such as interruption of service traffic, and realizes the smooth upgrade of dynamic routing software of network equipment. In addition, the central controller determines whether to proceed to the next step according to the feedback status of each network device in each upgrade stage, so that the upgrade progress of each network device is consistent. The upgrade status of each network device is consistent, avoiding the state where some upgrades are successful and some are not upgraded or failed, thereby avoiding the impact on service traffic caused by inconsistent device states during the entire upgrade process.

附图说明Description of drawings

图1是根据本申请一个实施方式所提供的路由升级方法的流程图;1 is a flowchart of a route upgrade method provided according to an embodiment of the present application;

图2是根据本申请一个实施方式所提供的路由升级方法的示意图;2 is a schematic diagram of a route upgrade method provided according to an embodiment of the present application;

图3是根据本申请另一个实施方式所提供的路由升级方法的流程图;3 is a flowchart of a route upgrade method provided according to another embodiment of the present application;

图4是根据本申请另一个实施方式所提供的路由升级方法的示意图;4 is a schematic diagram of a route upgrade method provided according to another embodiment of the present application;

图5是根据本申请一个实施方式所提供的电子设备的示意图。FIG. 5 is a schematic diagram of an electronic device provided according to an embodiment of the present application.

具体实施方式Detailed ways

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。In order to make the objectives, technical solutions and advantages of the embodiments of the present application more clear, each embodiment of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that, in each embodiment of the present application, many technical details are provided for the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can be realized. The following divisions of the various embodiments are for the convenience of description, and should not constitute any limitation on the specific implementation of the present application, and the various embodiments may be combined with each other and referred to each other on the premise of not contradicting each other.

本申请实施例中的术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。本申请的描述中,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列部件或单元的系统、产品或设备没有限定于已列出的部件或单元,而是可选地还包括没有列出的部件或单元,或可选地还包括对于这些产品或设备固有的其它部件或单元。本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。The terms "first" and "second" in the embodiments of the present application are only used for the purpose of description, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with "first", "second" may expressly or implicitly include at least one of that feature. In the description of this application, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a system, product or device comprising a series of components or units is not limited to the listed components or units, but may optionally also include components or units not listed, or Other parts or units inherent in the equipment. In the description of the present application, "a plurality of" means at least two, such as two, three, etc., unless otherwise expressly and specifically defined.

quagga/frr是实现RIP(Routing Information Protocol,路由信息协议)、OSPF(Open Shortest Path First,开放式最短路径优先)、BGP(Border Gateway Protocol,边界网关协议)等路由协议的动态路由软件。基于SD-WAN(Software Defined Wide AreaNetwork,软件定义广域网实现互连组网)搭建的网络,通过使用quagga/frr软件,实现企业多台网络设备自动进行动态路由学习,完成组网。但是升级/替换动态路由软件,会导致其他设备到这台设备的路由丢失,从而导致业务流量中断;如果企业有多台组网设备需要升级/替换动态路由软件,逐台升级的方式会导致企业业务流量多次中断。quagga/frr is a dynamic routing software that implements routing protocols such as RIP (Routing Information Protocol, Routing Information Protocol), OSPF (Open Shortest Path First, Open Shortest Path First), BGP (Border Gateway Protocol, Border Gateway Protocol). The network built based on SD-WAN (Software Defined Wide Area Network, software-defined wide area network realizes interconnection networking), through the use of quagga/frr software, realizes the automatic dynamic routing learning of multiple network devices in the enterprise, and completes the networking. However, upgrading/replacing the dynamic routing software will cause the loss of routes from other devices to this device, resulting in interruption of service traffic. Business traffic was interrupted several times.

本发明的一个实施方式涉及一种路由升级方法。应用于网络设备,具体流程如图1所示。One embodiment of the present invention relates to a route upgrade method. Applied to network equipment, the specific process is shown in Figure 1.

步骤101,接收中央控制器的备份指令,根据备份指令备份当前的主路由表。Step 101: Receive a backup instruction from the central controller, and back up the current main routing table according to the backup instruction.

步骤102,接收中央控制器在各网络设备均备份成功的情况下发送的升级指令,中央控制器与各网络设备均通信连接。Step 102: Receive an upgrade instruction sent by the central controller under the condition that all network devices are backed up successfully, and the central controller is in communication connection with each network device.

步骤103,根据升级指令升级路由软件,并在路由软件的升级过程中,根据备份的主路由表进行路由。Step 103: Upgrade the routing software according to the upgrade instruction, and perform routing according to the backup main routing table during the upgrade process of the routing software.

步骤104,在接收到中央控制器在各网络设备均升级成功的情况下发送的切换指令后,根据升级后的路由软件生成的路由表进行路由。Step 104, after receiving the switching instruction sent by the central controller under the condition that all network devices are upgraded successfully, perform routing according to the routing table generated by the upgraded routing software.

下面对本实施方式的路由升级方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须。The implementation details of the route upgrade method of the present embodiment will be specifically described below, and the following contents are only provided for the convenience of understanding, and are not necessary for implementing this solution.

在步骤101中,接收中央控制器的备份指令,根据备份指令备份当前的主路由表。即,中央控制器能够确定升级过程的推进,网络设备在接收到中央控制器的指令后执行初步备份。备份结果用于在执行路由升级时对于待传输数据进行路由。其中,可选的,在中央控制器判断所有需要升级的网络设备与中央处理器均处于正常连接时,或者说所有需要进行升级的网络设备都在线时,再开始本例中进程,以此避免由于通信连接等外部问题影响升级效率。In step 101, a backup instruction from the central controller is received, and the current main routing table is backed up according to the backup instruction. That is, the central controller can determine the progress of the upgrade process, and the network device performs a preliminary backup after receiving an instruction from the central controller. The backup result is used to route the data to be transmitted when the route upgrade is performed. Optionally, when the central controller determines that all network devices that need to be upgraded are in normal connection with the central processing unit, or that all network devices that need to be upgraded are online, the process in this example is started, so as to avoid The upgrade efficiency is affected by external problems such as communication connections.

在一个例子中,备份后的主路由表的优先级高于当前的主路由表的优先级。在备份后的主路由表的优先级高于当前主路由表的优先级的情况下,备份后的主路由表生成后,由于优先级原因,数据的路由就会转由备份后的主路由表实现,即自动由原主路由表(所述当前的主路由表)切换为备份后的主路由表,以备份后的主路由表中信息实现数据的路由。In one example, the priority of the backup main routing table is higher than the priority of the current main routing table. If the priority of the main routing table after backup is higher than the priority of the current main routing table, after the main routing table after backup is generated, the data routing will be transferred to the main routing table after backup due to the priority. Realization, that is, automatically switching from the original main routing table (the current main routing table) to the backed up main routing table, and implementing data routing with the information in the backed up main routing table.

在一个例子中,根据备份指令备份当前的主路由表之后,还包括:若接收到中央控制器在各网络设备中存在备份失败的情况下发送的删除备份指令,则根据删除备份指令删除已备份的主路由表数据,并结束本次升级。即,由于并不限制升级设备的个数,允许多台/个设备(或多个设备构成的通信网络)一同进行升级,所以可能在对于多台网络设备一同进行备份时,出现部分设备备份不成功的情况,此时需要对于已备份的数据进行删除;例如对于已备份成功和备份失败的网络设备中的参数均进行删除,使得下次重新执行备份时不会被本次备份失败的数据所影响;同时,清空备份的数据,能够避免备份完成的路由部分切换导致路由出错。In one example, after backing up the current main routing table according to the backup instruction, the method further includes: if a deletion backup instruction sent by the central controller in the case of a backup failure in each network device is received, deleting the backup backup instruction according to the deletion backup instruction the main routing table data and end the upgrade. That is, since the number of upgrade devices is not limited, and multiple devices (or a communication network composed of multiple devices) are allowed to be upgraded together, it is possible that when multiple network devices are backed up together, some devices may not be backed up. In the case of success, the data that has been backed up needs to be deleted at this time; for example, the parameters in the network devices that have been successfully backed up and those that have failed to be backed up should be deleted, so that the next time the backup is re-executed, it will not be affected by the data that failed this backup. At the same time, clearing the backup data can avoid routing errors caused by partial switching of the routing after the backup is completed.

在一个例子中,根据备份指令备份当前的主路由表之后,还包括:向中央控制器发送备份状态,备份状态包括备份成功或备份失败;或接收并回复中央控制器发送的第一查询消息,第一查询消息用于查询网络设备的备份状态;根据升级指令升级路由软件之后,还包括:基于升级路由软件完成后生成的动态路由的目的IP个数确定升级状态;向中央控制器发送升级升级状态,升级状态包括升级成功或升级失败;或接收并回复中央控制器发送的第二查询消息,第二查询消息用于查询网络设备的升级状态。即,中央控制器与各网络设备之间的信息交互,可以通过中央处理器向网络设备请求进行主动请求,由各网络设备反馈至中央处理器;或由各网络设备主动将状态发送至中央处理器,所述状态包括备份状态和升级状态。其中,中央处理器可向网络设备发送第一查询消息,用于查询网络的备份状态;可以向网络设备发送第二查询消息,用于查询网络的升级状态。即中央处理器与网络设备之间的信息交互并不限于某一方发起,双方均可作为信息交互的发起者,增加状态反馈/获取的途径。In one example, after backing up the current main routing table according to the backup instruction, the method further includes: sending a backup status to the central controller, where the backup status includes backup success or backup failure; or receiving and replying to the first query message sent by the central controller, The first query message is used to query the backup status of the network device; after upgrading the routing software according to the upgrade instruction, it further includes: determining the upgrade status based on the number of destination IPs of the dynamic routes generated after the upgrade of the routing software is completed; sending the upgrade and upgrade to the central controller The upgrade status includes upgrade success or upgrade failure; or receiving and replying to the second query message sent by the central controller, where the second query message is used to query the upgrade status of the network device. That is, the information exchange between the central controller and each network device can be actively requested by the central processor to the network device, and each network device feeds back to the central processor; or each network device actively sends the status to the central processing unit. The state includes a backup state and an upgrade state. The central processor may send a first query message to the network device for querying the backup status of the network; and may send a second query message to the network device for querying the upgrade status of the network. That is to say, the information exchange between the central processing unit and the network device is not limited to being initiated by one party, and both parties can act as the initiator of the information exchange to increase the way of status feedback/acquisition.

其中,对于升级状态的确定,可以通过路由软件完成升级后的动态路由的目的IP个数确定升级状态,例如,当所述动态路由的目的IP个数与原主路由表的目的IP个数相同,或与备份的主路由表中的目标IP个数相同,则判断该路由软件升级成功。在进行升级状态的反馈时,可以由网络设备直接反馈升级状态,即升级成功或升级失败,也可以由网络设备反馈所述动态路由的目的IP个数、原主路由表或备份的主路由表的目的IP个数,供中央处理器进行判断处理,以减少网络设备的运算压力;进一步的,网络设备可以接收并回复中央控制器发送的第三查询消息,所述第三查询消息用于查询所述动态路由的目的IP的个数、原主路由表或备份的主路由表的目的IP个数,以供中央处理器进行判断处理。Wherein, for the determination of the upgrade status, the upgrade status can be determined by the number of destination IPs of the dynamic routing after the routing software completes the upgrade. Or the number of target IPs in the backup main routing table is the same, it is judged that the routing software is upgraded successfully. During the feedback of the upgrade status, the network device can directly feed back the upgrade status, that is, the upgrade is successful or the upgrade fails, or the network device can feed back the number of destination IPs of the dynamic route, the original main routing table or the backup main routing table. The number of destination IPs for the central processor to perform judgment processing to reduce the computing pressure of the network device; further, the network device can receive and reply to the third query message sent by the central controller, and the third query message is used to query all The number of destination IPs of the dynamic routing and the number of destination IPs of the original main routing table or the backup main routing table are described for the central processing unit to judge and process.

此外,若完成升级后的动态路由的目的IP个数与原主路由表的目的IP个数不相同,或与备份的主路由表得目标IP个数不相同,则进入周期性检查,在第二时间阈值或其他预设得时间内,仍不一致,则反馈路由软件升级失败。In addition, if the number of destination IPs of the dynamic routing after the upgrade is not the same as the number of destination IPs in the original main routing table, or the number of destination IPs in the backup main routing table, enter the periodic check, and in the second If the time threshold or other preset time is still inconsistent, the feedback routing software upgrade fails.

在步骤102中,接收中央控制器在各网络设备均备份成功的情况下发送的升级指令,中央控制器与各网络设备均通信连接。在中央处理器获取到各网络设备均备份成功的信息时,会下发升级指令,即推动各网络设备进入下一阶段的升级中。In step 102, an upgrade instruction sent by the central controller under the condition that all network devices are backed up successfully is received, and the central controller is in communication connection with each network device. When the central processing unit obtains the information that each network device has been successfully backed up, it will issue an upgrade instruction, that is, push each network device to enter the next stage of upgrade.

在步骤103中,根据升级指令升级路由软件,并在路由软件的升级过程中,根据备份的主路由表进行路由。In step 103, the routing software is upgraded according to the upgrade instruction, and in the process of upgrading the routing software, routing is performed according to the backup main routing table.

根据中央控制器下发的升级指令完成路由升级,其中,由于前一阶段已经完成了备份,在执行升级的同时,沿用备份的主路由表进行路由,能够使得路由过程不受升级操作的影响。具体地,路由升级过程中可能会出现路由数据替换、丢失、不完整等情况,不足以保证数据路由的过程与非升级时段相同,因此在路由升级采用原主路由表无法实现路由需求;但本实施方式中在升级之前存在备份过程,升级中采用备份的主路由表进行路由,使得完成路由升级的同时也能实现数据路由需求。The routing upgrade is completed according to the upgrade instruction issued by the central controller. Since the backup has been completed in the previous stage, while the upgrade is performed, the backup main routing table is used for routing, so that the routing process is not affected by the upgrade operation. Specifically, routing data may be replaced, lost, or incomplete during the routing upgrade process, which is not enough to ensure that the data routing process is the same as the non-upgrade period. Therefore, the original main routing table cannot meet the routing requirements in the routing upgrade; however, this implementation In the method, there is a backup process before the upgrade, and the backup main routing table is used for routing during the upgrade, so that the data routing requirement can be fulfilled while the routing upgrade is completed.

在步骤104中,在接收到中央控制器在各网络设备均升级成功的情况下发送的切换指令后,根据升级后的路由软件生成的路由表进行路由。即,在完成路由升级后,由备份的主路由表切换至升级后的路由软件生成的路由表进行路由。In step 104, after receiving the handover instruction sent by the central controller under the condition that all network devices are upgraded successfully, routing is performed according to the routing table generated by the upgraded routing software. That is, after the routing upgrade is completed, the backup main routing table is switched to the routing table generated by the upgraded routing software for routing.

在一个例子中,在接收到中央控制器在各网络设备均升级成功的情况下发送的切换指令后,根据升级后的路由软件生成的路由表进行路由,包括:在接收到中央控制器在各网络设备均升级成功的情况下发送的切换指令后,根据切换指令删除备份的主路由表;在备份的主路由表完成删除后,切换至升级后的路由软件生成的路由表进行路由。即,可以由删除备份的主路由表的动作实现路由表切换,在删除备份的主路由表后,自主寻找升级后的路由软件生成的路由表进行路由。例如,当备份的主路由表的优先级高于原主路由表,也高于升级后的路由软件生成的路由表,则在路由软件升级成功,生成新路由表的情况下,删除优先级高的备份的主路由表,能够自主切换为所述新路由表进行路由。In one example, after receiving the switching instruction sent by the central controller under the condition that all network devices have been successfully upgraded, perform routing according to the routing table generated by the upgraded routing software, including: After the switching instruction is sent when all network devices are successfully upgraded, the backup main routing table is deleted according to the switching instruction; after the backup main routing table is deleted, it is switched to the routing table generated by the upgraded routing software for routing. That is, routing table switching can be realized by the action of deleting the backup main routing table, and after deleting the backup main routing table, the routing table generated by the upgraded routing software can be independently searched for routing. For example, when the priority of the backup main routing table is higher than that of the original main routing table and the routing table generated by the upgraded routing software, if the routing software is successfully upgraded and a new routing table is generated, delete the routing table with higher priority. The backup main routing table can autonomously switch to the new routing table for routing.

此外,删除操作结束后网络设备可向中央控制器反馈删除状态,例如删除成功或删除失败;若删除失败,则接收中央控制器下发的再次删除指令,直到删除成功。其中,删除操作也可添加时间阈值作为判断成功或失败的标准之一。In addition, after the deletion operation is completed, the network device can feed back the deletion status to the central controller, such as successful deletion or failure to delete; if the deletion fails, it will receive a deletion instruction issued by the central controller again until the deletion is successful. The deletion operation may also add a time threshold as one of the criteria for judging success or failure.

在一个例子中,备份成功,还包括:在预置的第一时间阈值内完成备份;升级成功,还包括:在预置的第二时间阈值内完成升级。即,为备份和升级过程设置时间阈值,在对应的时间内完成才算备份/升级成功,超过对应的时间阈值则认定为失败;为备份和升级过程所使用的时间进行约束,避免占用较长时间还无法对于升级或备份结果下结论的情况出现,提高执行效率。也就是将备份或升级状态执行完成的判断标准包括在预设时间内,用于保证方案的执行效率。可以理解的是,并不限制所述第一时间阈值和所述第二时间阈值的关系,可以相同可以不同,允许按照实际需求进行调整。In an example, the successful backup further includes: completing the backup within a preset first time threshold; the successful upgrade further includes: completing the upgrade within a preset second time threshold. That is, set a time threshold for the backup and upgrade process, and the backup/upgrade is successful only when the backup is completed within the corresponding time, and it is considered to be a failure if the corresponding time threshold is exceeded; the time used for the backup and upgrade process is constrained to avoid taking a long time. Time is not yet able to draw conclusions about upgrade or backup results, improving execution efficiency. That is, the criterion for judging that the execution of the backup or upgrade state is completed is included in the preset time, so as to ensure the execution efficiency of the solution. It can be understood that the relationship between the first time threshold and the second time threshold is not limited, and may be the same or different, allowing adjustment according to actual needs.

为了便于理解,以下以一实际执行过程对于上述实施例进行描述。可以理解的是,仅为说明,并不对上述实施例产生实质性限定。可参考图2,包括但不限于:For ease of understanding, the above embodiments are described below with an actual execution process. It can be understood that, it is only for illustration, and does not limit the above embodiments substantially. Refer to Figure 2, including but not limited to:

S1、中央控制器通知企业的所有网络设备进行第一升级阶段:备份路由。S1. The central controller notifies all network devices of the enterprise to perform the first upgrade stage: backup routing.

S2、设备收到中央控制器的备份路由指令,将设备当前的main路由表进行复制,复制成优先级更高的策略路由表(即上述备份的主路由表),从而将设备的流量都自动切到走优先级更高的策略路由表。由于策略路由表是静态的,不受路由软件升级影响,从而保证业务流量不中断。S2. The device receives the backup routing instruction from the central controller, and copies the current main routing table of the device into a policy routing table with a higher priority (that is, the above-mentioned backup main routing table), so that the traffic of the device is automatically Switch to the policy routing table with higher priority. Since the policy routing table is static, it is not affected by routing software upgrades, thus ensuring uninterrupted service traffic.

S3、所有设备完成备份路由操作后,将备份结果上报给中央控制器,中央控制器在收到所有设备都正常备份的消息后,通知所有设备进行第二阶段:替换路由软件。如果第一阶段有网络设备没有成功备份、或者中央控制器在规定的时间内没有收到设备上报的备份路由结果,那么中央控制器就不会通知各网络设备进行第二阶段。S3. After all devices complete the backup routing operation, report the backup results to the central controller. After receiving the message that all devices are backed up normally, the central controller notifies all devices to perform the second stage: replace the routing software. If the network device fails to be successfully backed up in the first stage, or the central controller does not receive the backup routing result reported by the device within the specified time, the central controller will not notify each network device to perform the second stage.

S4、企业的所有设备收到中央控制器的替换路由软件命令后,开始进行路由软件的升级,也可以实现路由软件的替换,以将qugga软件替换为frr软件为例:先安装frr软件,再将quagga的配置文件复制一份到frr的配置文件目录,由于frr跟quaga组件使用的监听端口是同一个,要先关闭这个企业的quagga组件,再启动frr软件。S4. After all the devices of the enterprise receive the replacement routing software command from the central controller, they start to upgrade the routing software, and the routing software can also be replaced. Take the replacement of qugga software with frr software as an example: first install the frr software, then Copy the quagga configuration file to the frr configuration file directory. Since the listening port used by the frr and quaga components is the same, you must first close the quagga component of this enterprise, and then start the frr software.

S5、在将企业的qugga软件替换为frr软件后,frr软件会自动生成、学习动态路由,在升级完frr,要检查frr软件生成的动态路由是否正常:通过对比生成的main路由表的动态路由的目的IP段个数,是否跟第一阶段复制的策略路由表的目的IP段个数一致,如果一致,则认为升级成功,如果不一致则认为升级失败。每台网络设备都做升级结果判断,再将升级结果上报给中央控制器。其中,若是路由软件升级过程,则不会产生前述不同软件替换的步骤,仅自主升级即可。S5. After replacing the enterprise's qugga software with frr software, the frr software will automatically generate and learn dynamic routes. After upgrading frr, check whether the dynamic routes generated by the frr software are normal: compare the dynamic routes of the generated main routing table Whether the number of destination IP segments is the same as the number of destination IP segments in the policy routing table replicated in the first phase. If they are consistent, the upgrade is considered successful; if they are inconsistent, the upgrade is considered unsuccessful. Each network device judges the upgrade result, and then reports the upgrade result to the central controller. Wherein, if it is a routing software upgrade process, the aforementioned steps of replacing different software will not be generated, and only self-upgrade is required.

S6、中央控制器在收到所有网络设备都正常升级的消息后,通知所有网络设备进行第三阶段:删除备份路由。如果第二阶段有网络设备没有成功升级、或者中央控制器在规定的时间内没有收到网络设备上报的升级结果,那么中央控制器就不会通知所有设备进行第三阶段,流量继续跑在第一阶段备份的策略路由表,业务流量不受影响。S6. After receiving the message that all network devices are normally upgraded, the central controller notifies all network devices to perform the third stage: delete the backup route. If there is a network device that is not successfully upgraded in the second stage, or the central controller does not receive the upgrade result reported by the network device within the specified time, the central controller will not notify all devices to go to the third stage, and the traffic will continue to run in the first stage. The policy routing table backed up in the first stage does not affect the business traffic.

S7、企业的所有网络设备收到中央控制器的删除备份路由命令后,开始进行删除备份路由操作,删除完备份路由表后,流量自动重新跑升级后生成的main路由表,所有网络设备删除备份路由表,将删除结果上报给中央控制器。S7. After receiving the command to delete the backup route from the central controller, all network devices of the enterprise start to delete the backup route. After the backup route table is deleted, the traffic automatically reruns the main route table generated after the upgrade, and all network devices delete the backup route. Routing table, and report the deletion result to the central controller.

S8、中央控制器在收到所有网络设备都正常删除备份路由的消息后,结束升级流程,并将升级结果置为成功。S8. After receiving the message that all network devices have normally deleted the backup route, the central controller ends the upgrade process, and sets the upgrade result as successful.

本实施例中,通过接收并执行中央控制器下发的指令进行路由升级,包括通知所有设备在升级前将动态路由表备份成静态路由表,从而在升级过程中将企业业务流量切到走备份后的路由表。即升级过程并不影响到业务流量的传输,原业务按照备份的路由表进行路由,在路由软件完成升级后切换到升级后路由软件生成的路由表中,避免升级动态路由软件时由于重启等过程导致路由丢失,从而引发业务流量中断等问题,实现平滑升级网络设备的动态路由软件。此外,中央控制器根据各网络设备在各升级阶段反馈的状态确定是否推进下一步,使得各网络设备的升级进度保持一致,相较于现有技术中的逐台升级方案来说,可保持企业各网络设备的升级状态一致,避免出现部分升级成功部分未升级或失败的状态,进而避免整个升级过程中因设备状态不一致而对业务流量产生的影响。In this embodiment, routing upgrade is performed by receiving and executing the instructions issued by the central controller, including informing all devices to back up the dynamic routing table into a static routing table before upgrading, so as to switch the enterprise business traffic to the backup during the upgrade process after the routing table. That is to say, the upgrade process does not affect the transmission of service traffic. The original service is routed according to the backup routing table. After the routing software is upgraded, it is switched to the routing table generated by the upgraded routing software to avoid the process of restarting the dynamic routing software during the upgrade. This leads to the loss of routes, which leads to problems such as interruption of service traffic, and realizes the smooth upgrade of dynamic routing software of network equipment. In addition, the central controller determines whether to proceed to the next step according to the feedback status of each network device in each upgrade stage, so that the upgrade progress of each network device is consistent. The upgrade status of each network device is consistent, avoiding the state where some upgrades are successful and some are not upgraded or failed, thereby avoiding the impact on service traffic caused by inconsistent device states during the entire upgrade process.

上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided only for the purpose of describing clearly. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as the same logical relationship is included, they are all within the protection scope of this patent. ;Adding insignificant modifications to the algorithm or process or introducing insignificant designs, but not changing the core design of the algorithm and process are all within the scope of protection of this patent.

本发明的一个实施方式涉及一种路由升级方法。应用于中央控制器,具体流程如图3所示。One embodiment of the present invention relates to a route upgrade method. Applied to the central controller, the specific process is shown in Figure 3.

步骤201,向网络设备发送备份指令,供网络设备根据备份指令备份当前的主路由表;Step 201, sending a backup instruction to the network device for the network device to back up the current main routing table according to the backup instruction;

步骤202,获取各网络设备的备份状态,在各网络设备均备份成功的情况下向各网络设备发送升级指令,供网络设备根据升级指令升级路由软件并在路由软件的升级过程中,根据备份的主路由表进行路由。其中,获取各网络设备的备份状态,包括:接收各网络设备发送的备份状态,备份状态包括备份成功或备份失败;或向各网络设备发送第一查询消息,接收各网络设备对第一查询消息的回复;第一查询消息用于查询网络设备的备份状态。即允许网络设备和中央处理器双方都能作为状态获取/反馈的主动发起方,增加中央处理器获取备份状态的途径。Step 202: Acquire the backup status of each network device, and send an upgrade instruction to each network device under the condition that each network device is backed up successfully, so that the network device can upgrade the routing software according to the upgrade instruction, and during the upgrade process of the routing software, according to the backup data. The main routing table for routing. Wherein, acquiring the backup status of each network device includes: receiving a backup status sent by each network device, where the backup status includes backup success or backup failure; or sending a first query message to each network device, and receiving each network device's response to the first query message reply; the first query message is used to query the backup status of the network device. That is, both the network device and the central processor are allowed to act as active initiators of state acquisition/feedback, increasing the way for the central processor to acquire the backup state.

步骤203,获取各网络设备的升级状态,在各网络设备均升级成功的情况下向各网络设备发送切换指令;切换指令用于指示网络设备根据升级后的路由软件生成的路由表进行路由。其中,获取各网络设备的升级状态,包括:接收各网络设备发送的升级状态,升级状态包括升级成功或升级失败;或向各网络设备发送第二查询消息,接收各网络设备对第二查询消息的回复;第二查询消息用于查询网络设备的升级状态。即允许网络设备和中央处理器双方都能作为状态获取/反馈的主动发起方,增加中央处理器获取升级状态的途径。Step 203: Acquire the upgrade status of each network device, and send a switching instruction to each network device when all network devices are successfully upgraded; the switching instruction is used to instruct the network device to perform routing according to the routing table generated by the upgraded routing software. Wherein, acquiring the upgrade status of each network device includes: receiving the upgrade status sent by each network device, where the upgrade status includes upgrade success or upgrade failure; or sending a second query message to each network device, and receiving each network device's response to the second query message reply; the second query message is used to query the upgrade status of the network device. That is, both the network device and the central processor are allowed to act as active initiators of status acquisition/feedback, increasing the way for the central processor to acquire the upgrade status.

为了便于理解,以下以一实际执行过程对于上述实施例进行描述。可以理解的是,仅为说明,并不对上述实施例产生实质性限定。For ease of understanding, the above embodiments are described below with an actual execution process. It can be understood that, it is only for illustration, and does not limit the above embodiments substantially.

企业1的北京总部和厦门分公司通过SD-WAN(企业组网的设备有CPE(CustomerPremise Equipment,直译为客户前置设备)、POP(Point of Presence,接入点)。CPE、POP与中央控制器建立长连接,接收、上报消息。CPE与POP、POP-POP建立隧道,并通过动态路由软件生成动态路由,实现设备间互联(每一台设备都有去往其他任意一台设备的路由)。参考图4结构,具体升级过程,包括但不限于:Enterprise 1's Beijing headquarters and Xiamen branch use SD-WAN (the enterprise networking equipment includes CPE (CustomerPremise Equipment, literally translated as customer pre-installation equipment), POP (Point of Presence, access point). CPE, POP and central control The device establishes a long connection, receives and reports messages. The CPE establishes tunnels with POP and POP-POP, and generates dynamic routes through dynamic routing software to realize interconnection between devices (each device has a route to any other device) . With reference to the structure of Figure 4, the specific upgrade process includes but is not limited to:

A1、中央控制器判断企业的所有网络设备是否都与其正常连接,都正常连接,状态为在线,当企业的所有设备都在线时,控制器才开始升级流程。A1. The central controller determines whether all the network devices of the enterprise are normally connected to it, and the status is online. When all the devices of the enterprise are online, the controller starts the upgrade process.

A2、中央控制器发送备份指令给企业1的所有CPE、POP设备,用于实现主路由表的备份。A2. The central controller sends a backup instruction to all CPE and POP devices of the enterprise 1, so as to realize the backup of the main routing table.

A3、CPE、POP设备收到备份路由消息,先查看ip rule中优先级最高的路由表例如table252是否存在,或存在残留数据,存在的情况下删除该路由表【ip rule del table252】,并在备份路由操作前清空该路由表【ip route flush table 252】,确保该路由表没有之前残留的路由。备份main路由表,是通过复制main路由表的目的IP地址段、下一跳到路由表252,在复制好所有路由后,检查main表路由是否和策略路由表(即备份后的主路由表)一致;确认main表路由的目的网段是否都在策略路由表存在,都存在,则备份操作成功,否则,认为备份失败,备份成功后添加路由表252,因为路由表252的优先级比main路由表高(linux系统,根据路由表的id来决定优先级,main路由表的id通常为254,优先级低于前述252路由表),在添加完路由表252,所有流量都切到走路由表252。将策略路由表(备份的路由表)id设置为252,因为要让原先走main路由表的流量都走策略路由表,但又要不影响流量走其他的策略路由表。A3. When the CPE and POP devices receive the backup routing message, first check whether the routing table with the highest priority in the ip rule, such as table252, exists, or if there is residual data. If it exists, delete the routing table [ip rule del table252], and in the Before the backup routing operation, clear the routing table [ip route flush table 252] to ensure that the routing table does not have any remaining routes. The main routing table is backed up by copying the destination IP address segment of the main routing table and the next hop to routing table 252. After copying all the routes, check whether the main table routing is consistent with the policy routing table (that is, the main routing table after backup) Consistent; confirm whether the destination network segments of the main table route exist in the policy routing table, and if they exist, the backup operation is successful; otherwise, the backup is considered to have failed, and the routing table 252 is added after the backup is successful, because the priority of the routing table 252 is higher than that of the main route. Table height (linux system, the priority is determined according to the id of the routing table, the id of the main routing table is usually 254, and the priority is lower than the aforementioned 252 routing table), after adding routing table 252, all traffic is cut to the walking routing table 252. Set the id of the policy routing table (backup routing table) to 252, because the traffic that originally went to the main routing table should go to the policy routing table, but it should not affect the traffic to go to other policy routing tables.

A4、CPE、POP设备各自完成备份操作后,各自将备份操作的结果上报给中央控制器。A4. After the CPE and POP devices have completed their backup operations, they report the results of the backup operations to the central controller.

A5、中央控制器在收到所有设备的备份成功消息后,判定第一阶段的【备份路由】成功,可以进行第二阶段的【替换动态路由软件】,通知所有设备进行替换动态路由软件。如果第一阶段有设备备份路由失败,中央控制器通知所有网络设备删除备份的路由表,恢复到升级前的状态,本轮升级结束,升级结果为失败。A5. After receiving the backup success message of all devices, the central controller determines that the [backup routing] of the first stage is successful, and can perform the second stage of [replace dynamic routing software] to notify all devices to replace the dynamic routing software. If the device backup route fails in the first stage, the central controller notifies all network devices to delete the backup routing table and restore to the state before the upgrade. This round of upgrade ends, and the upgrade result is a failure.

A6、CPE、POP设备收到中央控制器下发的【替换动态路由软件】消息,执行替换动态软件的操作。以执行从quagga替换为frr为例,CPE和POP的设备的替换路由软件的流程不同:A6. The CPE and POP devices receive the [Replace Dynamic Routing Software] message sent by the central controller, and perform the operation of replacing the dynamic software. Taking the replacement of quagga to frr as an example, the process of replacing routing software for CPE and POP devices is different:

CPE设备执行的步骤:安装动态路由软件frr,再将原来的路由软件quagga的配置文件复制一份到frr软件的配置文件目录下。由于两个软件的监听端口是相同的,所以要先关闭软件quagga,再启动frr。Steps performed by the CPE device: Install the dynamic routing software frr, and then copy the configuration file of the original routing software quagga to the configuration file directory of the frr software. Since the listening ports of the two software are the same, the software quagga should be closed first, and then frr should be started.

POP设备执行的步骤:路由软件在POP设备上,各个企业分进程运行。初次替换路由软件时,先安装动态路由软件frr,再替换当前企业的路由软件:将quagga的该企业ID目录下的配置文件复制一份到frr软件的企业ID配置文件目录下。将该企业的quagga进程kill掉,再启动该企业的frr进程,其他企业的进程不能操作,也不能直接stop quagga。Steps performed by the POP device: The routing software is installed on the POP device, and each enterprise runs in separate processes. When replacing the routing software for the first time, install the dynamic routing software frr first, and then replace the routing software of the current enterprise: copy the configuration file under the enterprise ID directory of quagga to the enterprise ID configuration file directory of the frr software. Kill the quagga process of the company, and then start the frr process of the company. Processes of other companies cannot be operated, and quagga cannot be stopped directly.

A7、关闭quagga软件(CPE)/关闭企业的quagga进程(POP),原先main路由表学习的动态路由会消失,但是此时流量走备份的策略路由表,所以不会造成流量中断。启动frr进程后,frr会自动重新学习动态路由到main表,每隔预设时间(例如5s)检查main表的动态路由表的目的IP地址段是否与备份的策略路由表的一致,一致说明切换路由软件成功,上报成功信息给中央控制器,不一致,周期性检查,设置最长检查时间阈值,例如最长检查90s,90s后main路由表的目的IP地址段还是与备份的策略路由表不一致,则上报替换路由软件失败。A7. Close the quagga software (CPE)/close the enterprise's quagga process (POP), the dynamic routes learned by the main routing table will disappear, but the traffic will go to the backup policy routing table at this time, so the traffic will not be interrupted. After the frr process is started, frr will automatically relearn the dynamic routing to the main table, and check whether the destination IP address segment of the dynamic routing table of the main table is consistent with the backup policy routing table every preset time (for example, 5s). If the routing software is successful, it reports the success information to the central controller. If it is inconsistent, it is checked periodically. The maximum check time threshold is set. For example, the maximum check time is 90s. After 90s, the destination IP address segment of the main routing table is still inconsistent with the backup policy routing table. Then it fails to report the replacement of the routing software.

A8、中央控制器在收到所有设备成功替换路由软件的消息后,判定第二阶段的【替换路由软件】成功,可以进行第三阶段的【删除备份路由表】,通知所有设备进行删除备份路由表。如果第二阶段有设备替换路由软件失败,需要人为干预,排查失败的原因后,正常替换设备的路由软件后,再通过中央控制器通知所有网元进行第三阶段的删除备份路由表。A8. After receiving the message that all devices have successfully replaced the routing software, the central controller determines that the second stage [replace the routing software] is successful, and can proceed to the third stage [delete the backup routing table] to notify all devices to delete the backup routing surface. If a device fails to replace the routing software in the second stage, human intervention is required. After checking the cause of the failure, after the routing software of the device is replaced normally, the central controller notifies all network elements to delete the backup routing table in the third stage.

A9、CPE、POP设备收到【删除备份路由表】消息,先删除路由表252,再清空路由表252的所有路由,流量切回走main路由表。各台设备将删除备份路由表的操作结果上报给中央控制器。A9. The CPE and POP devices receive the [Delete Backup Routing Table] message, delete the routing table 252 first, then clear all routes in the routing table 252, and switch traffic back to the main routing table. Each device reports the operation result of deleting the backup routing table to the central controller.

A10、中央控制器在收到所有设备的删除路由表成功消息后,判定第三阶段的【删除备份路由表】成功,完成升级该企业的所有设备,升级结束,升级结果为成功。A10. After receiving the successful message of deleting the routing table of all the devices, the central controller determines that the [deleting the backup routing table] in the third stage is successful, and completes the upgrade of all the devices of the enterprise. The upgrade is over, and the upgrade result is successful.

本实施例中,中央处理器向网络设备下发的指令进行路由升级,包括通知所有设备在升级前将动态路由表备份成静态路由表,从而在升级过程中将企业业务流量切到走备份后的路由表。即升级过程并不影响到业务流量的传输,原业务按照备份的路由表进行路由,在路由软件完成升级后切换到升级后路由软件生成的路由表中,避免升级动态路由软件时由于重启等过程导致路由丢失,从而引发业务流量中断等问题,实现平滑升级网络设备的动态路由软件。并且中央控制器能够根据各网络设备在各升级阶段反馈的状态确定是否推进下一步,使得各网络设备的升级进度保持一致,相较于现有技术中的逐台升级方案来说,可保持企业各网络设备的升级状态一致,避免出现部分升级成功部分未升级或失败的状态,进而避免整个升级过程中因设备状态不一致而对业务流量产生的影响。本实施例通过中央控制器控制整个升级流程,通知所有网络设备在升级前将动态路由表备份成优先级高的静态路由表,从而将企业业务流量切到走备份路由表后进行升级,解决升级动态路由软件时路由丢失导致业务流量中断的问题,从而实现平滑升级网络设备的动态路由软件。In this embodiment, the instructions issued by the central processing unit to the network devices perform routing upgrade, including informing all devices to back up the dynamic routing table into a static routing table before the upgrade, so as to switch the enterprise service traffic to the back up during the upgrade process routing table. That is to say, the upgrade process does not affect the transmission of service traffic. The original service is routed according to the backup routing table. After the routing software is upgraded, it is switched to the routing table generated by the upgraded routing software to avoid the process of restarting the dynamic routing software during the upgrade. This leads to the loss of routes, which leads to problems such as interruption of service traffic, and realizes the smooth upgrade of dynamic routing software of network equipment. And the central controller can determine whether to proceed to the next step according to the feedback status of each network device in each upgrade stage, so that the upgrade progress of each network device is consistent. The upgrade status of each network device is consistent, avoiding the state where some upgrades are successful and some are not upgraded or failed, thereby avoiding the impact on service traffic caused by inconsistent device states during the entire upgrade process. In this embodiment, the central controller controls the entire upgrade process, and informs all network devices to back up the dynamic routing table to a static routing table with a high priority before the upgrade, so that the enterprise service traffic is switched to the backup routing table for upgrade, which solves the problem of upgrade. In the case of dynamic routing software, the loss of routes leads to the interruption of service traffic, so that the dynamic routing software of network devices can be smoothly upgraded.

本发明一个实施方式涉及一种电子设备,如图5所示,包括至少一个处理器301;以及,与所述至少一个处理器301通信连接的存储器302;其中,所述存储器302存储有可被所述至少一个处理器301执行的指令,所述指令被所述至少一个处理器301执行,以使所述至少一个处理器301能够执行上述应用于网络设备的路由升级方法,或能够执行应用于中央控制器的路由升级方法。An embodiment of the present invention relates to an electronic device, as shown in FIG. 5 , comprising at least one processor 301; and a memory 302 communicatively connected to the at least one processor 301; wherein the memory 302 stores data that can be accessed by Instructions executed by the at least one processor 301, the instructions are executed by the at least one processor 301, so that the at least one processor 301 can execute the above routing upgrade method applied to a network device, or can execute a method applied to a network device. The route upgrade method of the central controller.

其中,存储器和处理器采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器和存储器的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器。The memory and the processor are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors and various circuits of the memory. The bus may also connect together various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides the interface between the bus and the transceiver. A transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other devices over a transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.

处理器负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器可以被用于存储处理器在执行操作时所使用的数据。The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Instead, memory may be used to store data used by the processor in performing operations.

本发明一个实施方式涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。One embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The above method embodiments are implemented when the computer program is executed by the processor.

即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium and includes several instructions to make a device ( It may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。Those skilled in the art can understand that the above-mentioned embodiments are specific examples for realizing the present invention, and in practical applications, various changes in form and details can be made without departing from the spirit and the spirit of the present invention. scope.

Claims (10)

1. A route upgrading method is applied to network equipment and comprises the following steps:
receiving a backup instruction of a central controller, and backing up a current main routing table according to the backup instruction;
receiving an upgrade instruction sent by the central controller under the condition that the backup of each network device is successful, wherein the central controller is in communication connection with each network device;
upgrading the routing software according to the upgrading instruction, and routing according to the backup main routing table in the upgrading process of the routing software;
and after receiving a switching instruction sent by the central controller under the condition that each network device is upgraded successfully, routing according to a routing table generated by the upgraded routing software.
2. The route upgrade method according to claim 1, wherein the priority of the backup master routing table is higher than the priority of the current master routing table.
3. The method for upgrading a route according to claim 2, wherein after receiving a switching instruction sent by the central controller when each of the network devices is upgraded successfully, performing routing according to a routing table generated by upgraded routing software, includes:
after receiving a switching instruction sent by the central controller under the condition that each network device is upgraded successfully, deleting the backed-up main routing table according to the switching instruction;
and after the backup main routing table is deleted, switching to the routing table generated by the upgraded routing software for routing.
4. The route upgrade method according to claim 1, wherein after the backing up the current primary routing table according to the backup instruction, the method further comprises:
and if a backup deleting instruction sent by the central controller under the condition that the backup fails in each network device is received, deleting the backed-up main routing table data according to the backup deleting instruction, and finishing the upgrading.
5. The route upgrade method according to claim 1, wherein after the backing up the current primary routing table according to the backup instruction, the method further comprises:
sending a backup state to the central controller, wherein the backup state comprises a backup success or a backup failure;
or receiving and replying a first query message sent by the central controller, wherein the first query message is used for querying the backup state of the network equipment;
after the routing software is upgraded according to the upgrading instruction, the method further comprises the following steps:
determining an upgrading state based on the target IP number of the dynamic route generated after the route upgrading software is completed;
sending the upgrading state to the central controller, wherein the upgrading state comprises upgrading success or upgrading failure;
or receiving and replying a second query message sent by the central controller, wherein the second query message is used for querying the upgrade state of the network equipment.
6. The route upgrade method according to any one of claims 1 to 5, wherein the backup is successful, further comprising: completing backup within a preset first time threshold;
the upgrading is successful, and the method further comprises the following steps: and completing upgrading within a preset second time threshold.
7. A route upgrading method is applied to a central controller and is characterized by comprising the following steps:
sending a backup instruction to network equipment, so that the network equipment can back up a current main routing table according to the backup instruction;
obtaining the backup state of each network device, sending an upgrading instruction to each network device under the condition that each network device is successfully backed up, so that the network devices can upgrade routing software according to the upgrading instruction and carry out routing according to a backed-up main routing table in the upgrading process of the routing software;
obtaining the upgrading state of each network device, and sending a switching instruction to each network device under the condition that each network device is upgraded successfully; and the switching instruction is used for indicating the network equipment to perform routing according to a routing table generated by the upgraded routing software.
8. The route upgrade method according to claim 7, wherein the obtaining the backup status of each of the network devices comprises:
receiving backup states sent by each network device, wherein the backup states comprise backup success or backup failure;
or sending a first query message to each network device, and receiving the reply of each network device to the first query message; the first query message is used for querying the backup state of the network equipment;
the obtaining of the upgrade status of each network device includes:
receiving an upgrade state sent by each network device, wherein the upgrade state comprises upgrade success or upgrade failure;
or sending a second query message to each network device, and receiving a reply of each network device to the second query message; the second query message is used for querying the upgrade status of the network device.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a route upgrade method as claimed in any one of claims 1 to 6, or to perform a route upgrade method as claimed in any one of claims 7 to 8.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the route upgrade method of any one of claims 1 to 6, or is capable of implementing the route upgrade method of any one of claims 7-8.
CN202210068288.0A 2022-01-20 2022-01-20 Router upgrade method, electronic device and storage medium Active CN114389949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210068288.0A CN114389949B (en) 2022-01-20 2022-01-20 Router upgrade method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210068288.0A CN114389949B (en) 2022-01-20 2022-01-20 Router upgrade method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN114389949A true CN114389949A (en) 2022-04-22
CN114389949B CN114389949B (en) 2024-04-12

Family

ID=81203374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210068288.0A Active CN114389949B (en) 2022-01-20 2022-01-20 Router upgrade method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114389949B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6535924B1 (en) * 2001-09-05 2003-03-18 Pluris, Inc. Method and apparatus for performing a software upgrade of a router while the router is online
US20060129670A1 (en) * 2001-03-27 2006-06-15 Redseal Systems, Inc. Method and apparatus for network wide policy-based analysis of configurations of devices
US20070162565A1 (en) * 2006-01-09 2007-07-12 Cisco Technology, Inc. Method and system for minimizing disruption during in-service software upgrade
US20100054316A1 (en) * 2008-09-04 2010-03-04 Verizon Data Services Llc Digital subscriber line (dsl) network upgrade tool
CN101888304A (en) * 2009-05-15 2010-11-17 华为技术有限公司 Method, device and system for upgrading routing equipment
CN102082730A (en) * 2011-02-09 2011-06-01 中兴通讯股份有限公司 Router upgrading method and router
US20140071884A1 (en) * 2011-03-10 2014-03-13 Elta Systems Ltd. Ip based cellular communication system utilizing advanced tunnels and encapsulation methods useful in conjunction therewith
US20140380294A1 (en) * 2013-06-21 2014-12-25 Wistron Neweb Corp. Methods for upgrading firmware and electronic devices using the same
CN104486394A (en) * 2014-12-10 2015-04-01 杭州华三通信技术有限公司 Non-interrupting service software upgrading method and device
CN104901840A (en) * 2015-07-01 2015-09-09 冯旋宇 Data updating method of router and router
WO2016000107A1 (en) * 2014-06-30 2016-01-07 华为技术有限公司 Primary and secondary system handover method for dynamic route device, and apparatus thereof
CN105306356A (en) * 2014-07-30 2016-02-03 上海博达数据通信有限公司 Method for realizing master-slave switching of multicast routing on distributed system
WO2017000284A1 (en) * 2015-07-01 2017-01-05 冯旋宇 Router data update method and router
CN106534401A (en) * 2016-11-28 2017-03-22 国云科技股份有限公司 Method for transforming host storage network IP from dynamic state to static state
US20200245212A1 (en) * 2019-01-24 2020-07-30 Hewlett Packard Enterprise Development Lp Wireless device upgrade
CN111770169A (en) * 2020-06-29 2020-10-13 百度在线网络技术(北京)有限公司 Method, device, equipment and storage medium for upgrading equipment firmware
CN112039718A (en) * 2020-07-16 2020-12-04 视联动力信息技术股份有限公司 Upgrade status detection method, server, device and storage medium
US20210117279A1 (en) * 2019-10-17 2021-04-22 EMC IP Holding Company LLC Method, apparatus and computer program product for managing backup system
CN113055196A (en) * 2019-12-28 2021-06-29 华为技术有限公司 Message processing method, network device and computer-readable storage medium

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060129670A1 (en) * 2001-03-27 2006-06-15 Redseal Systems, Inc. Method and apparatus for network wide policy-based analysis of configurations of devices
US6535924B1 (en) * 2001-09-05 2003-03-18 Pluris, Inc. Method and apparatus for performing a software upgrade of a router while the router is online
US20070162565A1 (en) * 2006-01-09 2007-07-12 Cisco Technology, Inc. Method and system for minimizing disruption during in-service software upgrade
US20100054316A1 (en) * 2008-09-04 2010-03-04 Verizon Data Services Llc Digital subscriber line (dsl) network upgrade tool
CN101888304A (en) * 2009-05-15 2010-11-17 华为技术有限公司 Method, device and system for upgrading routing equipment
CN102082730A (en) * 2011-02-09 2011-06-01 中兴通讯股份有限公司 Router upgrading method and router
US20140071884A1 (en) * 2011-03-10 2014-03-13 Elta Systems Ltd. Ip based cellular communication system utilizing advanced tunnels and encapsulation methods useful in conjunction therewith
US20140380294A1 (en) * 2013-06-21 2014-12-25 Wistron Neweb Corp. Methods for upgrading firmware and electronic devices using the same
WO2016000107A1 (en) * 2014-06-30 2016-01-07 华为技术有限公司 Primary and secondary system handover method for dynamic route device, and apparatus thereof
CN105306356A (en) * 2014-07-30 2016-02-03 上海博达数据通信有限公司 Method for realizing master-slave switching of multicast routing on distributed system
CN104486394A (en) * 2014-12-10 2015-04-01 杭州华三通信技术有限公司 Non-interrupting service software upgrading method and device
CN104901840A (en) * 2015-07-01 2015-09-09 冯旋宇 Data updating method of router and router
WO2017000284A1 (en) * 2015-07-01 2017-01-05 冯旋宇 Router data update method and router
CN106534401A (en) * 2016-11-28 2017-03-22 国云科技股份有限公司 Method for transforming host storage network IP from dynamic state to static state
US20200245212A1 (en) * 2019-01-24 2020-07-30 Hewlett Packard Enterprise Development Lp Wireless device upgrade
US20210117279A1 (en) * 2019-10-17 2021-04-22 EMC IP Holding Company LLC Method, apparatus and computer program product for managing backup system
CN113055196A (en) * 2019-12-28 2021-06-29 华为技术有限公司 Message processing method, network device and computer-readable storage medium
CN111770169A (en) * 2020-06-29 2020-10-13 百度在线网络技术(北京)有限公司 Method, device, equipment and storage medium for upgrading equipment firmware
CN112039718A (en) * 2020-07-16 2020-12-04 视联动力信息技术股份有限公司 Upgrade status detection method, server, device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孔艺权;: "网络路由备份技术设计及实验仿真", 实验室研究与探索, no. 05, 15 May 2012 (2012-05-15) *

Also Published As

Publication number Publication date
CN114389949B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
US9274906B2 (en) Implementing failover processes between storage stamps
EP3694148A1 (en) Configuration modification method for storage cluster, storage cluster and computer system
EP2619662B1 (en) In-service software upgrade of control and line cards of network element
CN106330475B (en) A method and device for managing active and standby nodes in a communication system and a high-availability cluster
US20210089379A1 (en) Computer system
CN109446178A (en) A kind of Hadoop object storage high availability method, system, device and readable storage medium storing program for executing
CN111182033B (en) Method and equipment for restoring switch
CN101588302A (en) Method and apparatus for updating router
WO2016177231A1 (en) Dual-control-based active-backup switching method and device
CN112612653B (en) A business recovery method, device, arbitration server and storage system
WO2006129277A2 (en) Method and hardware node for customized upgrade control
CN112052127B (en) A data synchronization method and device for dual-machine hot standby environment
CN110109772B (en) CPU restarting method, communication equipment and readable storage medium
CN108900331A (en) A kind of distributed type assemblies management method and distributed type assemblies
CN102420746A (en) Forwarding method for multicast flow and network equipment therefor
CN111371680A (en) Route management method, device, device and storage medium for dual-system hot backup
CN114389949B (en) Router upgrade method, electronic device and storage medium
JP2002049502A (en) Update method in multi-processor system
CN117459482B (en) Restarting method and device of switch, storage medium and electronic device
CN108984602B (en) A database control method and database system
JP2009246475A (en) Communication system with redundancy composition, and system switching method of the system
JP2001067214A (en) Computer system and program file updating method
CN110119400A (en) Unique identification generation method and device suitable for logical operation
CN111756562B (en) Cluster takeover method, system and related components
KR101628219B1 (en) Method and apparatus for operating controller of software defined network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant