WO2018001044A1 - 单级路由器到集群路由器的升级方法及装置 - Google Patents

单级路由器到集群路由器的升级方法及装置 Download PDF

Info

Publication number
WO2018001044A1
WO2018001044A1 PCT/CN2017/087118 CN2017087118W WO2018001044A1 WO 2018001044 A1 WO2018001044 A1 WO 2018001044A1 CN 2017087118 W CN2017087118 W CN 2017087118W WO 2018001044 A1 WO2018001044 A1 WO 2018001044A1
Authority
WO
WIPO (PCT)
Prior art keywords
router
upgraded
switching unit
switching
upgrade
Prior art date
Application number
PCT/CN2017/087118
Other languages
English (en)
French (fr)
Inventor
郝涛
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018001044A1 publication Critical patent/WO2018001044A1/zh

Links

Images

Definitions

  • the present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for upgrading a single-level router to a cluster router.
  • the router is the main node device of the Internet, and the router determines the forwarding of data through routing.
  • the forwarding policy is called routing, which is also the origin of the router name (router).
  • the router system constitutes the main body of the Internet based on TCP/IP. It can also be said that the router constitutes the backbone of the Internet. Its processing speed is one of the main bottlenecks of network communication, and its reliability directly affects the quality of network interconnection.
  • the data packet is forwarded through a single-level router.
  • the single-level router can process up to 8 data packets.
  • the "1+2 mode" cluster router consists of a central router 10 and two single-stage routers 11 and 12.
  • the original switching unit in the single-stage routers 11 and 12 is connected as a cascade switching unit to the switching unit in the intermediate router 10.
  • the cascade switching unit does not directly determine the forwarding route of the data packet as if it is working as a single-level router, but through the The cascading fiber between the central router 10 and the central router 10 transmits the data message to the switching unit of the central router 10, and the central router 10 selects a single-stage router for the data routing message to forward and process it, and then sends it to the corresponding single-level router.
  • the cascade switching unit of the single-stage router 12 can select an access unit for outgoing after receiving the data message.
  • 16 data packets can be processed at the same time, that is, the switching capacity of the "1+2 mode" cluster router is doubled compared with that of the single-stage router, and the network communication bandwidth is also followed. Doubled.
  • the method of upgrading a single-level router to a cluster router is to connect the newly added expansion unit and the switching unit of the original single-level router through the cascade fiber, and then restart the original single-stage router by means of the whole machine restart.
  • the switching unit is upgraded.
  • the process of upgrading the switching unit in the router is actually configuring the switching unit to be upgraded into a cascading switching unit.
  • the switching unit in the original single-level router is in the form of a cascading switching unit. Work to switch a single-level router to a part of the cluster router.
  • the process of configuring the switching unit of the original single-level router as a cascading switching unit will interrupt the services carried out in the original single-level router until the cluster router is started, and the service can be resumed. This process may last for several minutes. The interruption of the service may cause the communication of the user who needs to forward the data packet through the single-level router to realize the network communication, thereby affecting the user experience.
  • the method and device for upgrading a single-level router to a cluster router provided by the embodiments of the present disclosure mainly solve the technical problem: when the single-level router is upgraded to the cluster router in the related art, the whole-stage router needs to be performed for several minutes. Restart, which affects the user experience.
  • an embodiment of the present disclosure provides a method for upgrading a single-level router to a cluster router, including:
  • the current exchange unit to be upgraded in the router to be upgraded is determined by batch
  • the embodiment of the present disclosure further provides an upgrade device for a single-level router to a cluster router, including:
  • a selection module configured to determine, according to a batch, a current exchange unit to be upgraded in the router to be upgraded when the router to be upgraded is normally connected to the central router;
  • a sending module configured to send an upgrade instruction for the switching unit to be upgraded
  • an upgrade module configured to upgrade the to-be-upgraded switching unit to a cascade switching unit according to the upgrade instruction, and initialize a communication link between the cascade switching unit and a corresponding switching unit in the central router.
  • the embodiment of the present disclosure further provides a computer storage medium storing computer executable instructions for performing a single-level router-to-cluster router upgrade method according to any of the foregoing.
  • a method, an apparatus, and a computer storage medium for upgrading a single-stage router to a cluster router are upgraded by a batch of switching units in a router to be upgraded, and the corresponding switching unit of the switching unit and the central router is initialized.
  • the communication link it is ensured that some of the switching units are in a normal working state when upgrading some of the switching units, and all services on the router to be upgraded are not interrupted at the same time due to the upgrade of the router to be upgraded, thereby reducing
  • the impact of router upgrades on users has improved the user experience.
  • FIG. 1 is a schematic structural diagram of a cluster router after the upgrade is completed
  • FIG. 2 is a flowchart of a method for upgrading a single-level router to a cluster router according to Embodiment 1 of the present disclosure
  • FIG. 3 is a schematic structural diagram of an apparatus for upgrading a single-level router to a cluster router according to Embodiment 2 of the present disclosure
  • FIG. 4 is another schematic structural diagram of an apparatus for upgrading a single-level router to a cluster router according to Embodiment 2 of the present disclosure.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • this embodiment provides a A method for upgrading a single-level router to a cluster router, the method can be implemented on a single-level router to a cluster router upgrade device, and the upgrade device of the single-level router to the cluster router can be deployed on the central router or on the router to be upgraded.
  • the CPU Central Processing Unit
  • the CPU Central Processing Unit
  • the central router or the router to be upgraded can complete its function, or the upgrade device of the single-level router to the cluster router can be deployed outside the central router and the router to be upgraded. It can be implemented by other devices or devices provided with a CPU.
  • the upgrade device of the single-level router to the cluster router determines, according to the batch, the current exchange unit to be upgraded in the router to be upgraded.
  • a router includes multiple switching units and multiple access units. There may be units for implementing other functions between the access unit and the port of the router. The key points are not elaborated here.
  • the port of the router receives the datagram to be forwarded. The message is transmitted to the access unit.
  • the access unit generally distributes the data packets to each switching unit in a balanced manner according to the principle of load balancing.
  • the switching unit determines the forwarding route for the data packet and sends it from the corresponding access unit. , to achieve the forwarding of data packets.
  • the upgrade of the router is to increase the expansion component, so that the original single-level router becomes a part of the cluster router.
  • the expansion component includes at least one single-level router and one central router.
  • each single-level router and the central router are connected in a cascade manner: a cascade optical port generally designed on a single-stage router, cascading light The forwarding of data packets is not working.
  • the cascading optical port is used only when the switching unit in the single-level router needs to be upgraded to the cascading switching unit in the router cluster.
  • the port and the central router are connected by fiber, so that the switching unit in the original single-level router is connected as the switching unit in the cascade switching unit.
  • the exchange units are relatively independent, there is basically no direct interaction. Therefore, when upgrading the router to be upgraded, the batch upgrade mode can be adopted, that is, the upgrade device of the single-level router to the cluster router. Some of the switching units are upgraded first, so that some other switching units are still in normal working condition.
  • the upgrading device of the single-level router to the cluster router can be randomly selected. For example, if there are 8 switching units in the router to be upgraded, the upgrading device of the single-level router to the cluster router can be First, select one switching unit as the switching unit to be upgraded in the current batch, or upgrade the three switching units in the current batch first.
  • the upgrade device of the single-level router to the cluster router can also determine the number of exchange units to be upgraded according to some principles, for example, "the principle of minimum packet loss rate", here there are 8 exchanges in one router. The unit is used as an example to describe the "minimum packet loss rate".
  • the number of switching units in the router is adapted to the routing conversion pressure that the router needs to bear. That is, the processing capability of the eight switching units for data packets may be exactly equal to that received by each access unit. The total amount of data packets to be processed. In this case, if any one of the switching units is not in the normal working state, the other seven switching units cannot bear the working pressure of the eight switching units, which may result in User data packets cannot be processed to form a packet loss. From the perspective of practical application, in order to ensure the prevention of packet loss, the working capacity of the eight switching units in the router may be higher than the number of packets actually needed to be processed. For example, eight switching units in a router.
  • Each switching unit can process 4 data packets per second, and there may be only 28 data packets that need to be forwarded by the router every second. In this scenario, even if one switching unit does not need In the working state, the other seven switching units can also ensure that data packets are processed normally without causing packet loss. This is called the redundancy of the switching unit.
  • the switching unit presents a "7+1" redundancy feature, which means that one of the eight switching units can be inactive without affecting the entire router. The normal performance. For some routers with better performance, the redundancy characteristics may be better. For example, the router is also a router with 8 switching units.
  • the redundancy of another router switching unit is “6+2”, that is, it can simultaneously Up to two switching units can be in an abnormal working state without affecting the normal data packet processing of the router. Therefore, in order to ensure the normal network requirements of the user, the upgrading device of the single-level router to the cluster router can determine the current number of switching units to be upgraded according to the redundancy capability of the switching unit in the router to be upgraded when the switching unit is upgraded.
  • the switching unit that is currently in the idle state can be selected to perform the upgrade configuration: according to the traffic volume of each switching unit, at least one switching unit is selected as the switching unit to be upgraded according to the order of the traffic volume, but It is worth noting that the number of selected switching units is smaller than the total number of switching units in the router to be upgraded.
  • the current redundancy capacity of the switching unit in the router to be upgraded is determined to be the highest in an upgrade batch.
  • the N switching units are upgraded, and the upgrading device of the single-level router to the cluster router selects N switching units with less traffic from the switching units of the router to be upgraded as the switching unit to be upgraded of the current upgrade batch, and N should be greater than Equal to 1, but less than the total number of switching units in the router to be upgraded.
  • the upgraded switching unit is to be upgraded, it is configured to be initialized as a cascading switching unit. In the process of the initialization, the switching unit to be upgraded needs to be restarted, which may cause the switching unit to be upgraded. The service is lost, which affects the user experience. Therefore, in order to minimize this effect, the switching unit with less current traffic is selected as the switching unit to be upgraded.
  • the access unit determines, by the load balancing algorithm, which switching unit should send the received data packet to the switching unit to ensure that the working pressure of each switching unit is balanced.
  • Common load balancing algorithms are classified into static load balancing and dynamic load balancing. Static load balancing is divided into polling algorithm, ratio algorithm, priority algorithm, etc. Dynamic load balancing algorithm is divided into minimum connection number and fastest response.
  • the load balancing algorithm is various. In this embodiment, the specific method for performing load balancing is not limited, because no matter which specific algorithm is used, the number of data packets to be processed on each switching unit in the router is similar.
  • the access unit allocates pending packets to each switching unit in a load balancing manner
  • the number of pending data packets on each switching unit in the router to be upgraded should be similar at any time.
  • the upgrading device of the single-level router to the cluster router may randomly select a corresponding number of switching units as the switching unit to be upgraded.
  • the upgrading device of the single-level router to the cluster router delivers an upgrade instruction for the switching unit to be upgraded.
  • the upgrade device of the single-level router to the cluster router may limit the switching access units of the router to be upgraded to send the pending message to the switching unit to be upgraded.
  • the manner in which the upgrade device of the single-level router to the cluster router restricts the access unit to send the pending message to the to-be-upgraded switching unit includes: closing at least one of a unicast mask or a multicast mask of the switching unit to be upgraded.
  • the upgrade device of the single-level router to the cluster router closes the unicast mask or multicast mask of the switching unit to be upgraded, including forced shutdown and graceful shutdown.
  • the upgrade command for the switch unit to be upgraded is delivered, there may be data packets to be processed on each switch unit to be upgraded. If the upgrade command is received, the unicast mask or multicast is directly closed. Mask, then these data packets will be lost.
  • This kind of shutdown mode is forced to close.
  • the forced shutdown mode will inevitably affect the user's business, thus reducing the user experience.
  • the embodiment also provides an elegant closed mode.
  • the so-called elegant shutdown means that if there is still data in the transmission buffer, the data is sent out first, and After receiving a response to all the data, start the shutdown process.
  • the upgrade device of the single-level router to the cluster router upgrades the to-be-upgraded switching unit to the cascade switching unit according to the upgrade instruction, and initializes a communication link between the cascade switching unit and the corresponding switching unit in the central router.
  • the exchange unit between the switch unit to be upgraded and the center router is upgraded before the upgrade of the switch unit to be upgraded is completed.
  • the communication link between the two is not established. At this time, the communication link is still in the "down" state. Therefore, after receiving the upgrade command, the switching unit to be upgraded must be configured as a cascade switching unit according to the upgrade instruction. And the communication link is also initialized so that it can communicate normally.
  • the upgrading device of the single-level router to the cluster router may open a unicast mask between each access unit and the cascading switching unit, so that the cascading switching unit starts. jobs.
  • the cascading switching unit When the cascading switching unit is in normal working, it will receive the data packet transmitted by the access unit, and then transmit the data packet to the corresponding switching unit in the central router through the communication link initialized during the upgrade process.
  • the switching unit selects a router for forwarding, and the router may be a router that transmits the data packet to the central router, such as the single-level router 11 in FIG. 1 or other routers cascaded with the central router, such as a single-stage router. Router 12.
  • the exchange unit in the central router 10 may still The data message is forwarded to the single-stage router 11, and an access unit is selected by the single-stage router 11 and then sent out.
  • the upgrade device of the single-level router to the cluster router may select another switch unit that has not been upgraded as the switch unit to be upgraded, and then continue to cycle the upgrade process until all the routers to be upgraded All switching units have been upgraded. It can be understood that, in this embodiment, all the switching units in the upgraded router are not required to be upgraded, and the upgrade device of the single-level router to the cluster router can be upgraded according to actual needs, and the other part is not upgraded, and continues to be single-stage. The way the router works is working.
  • the upgrade method of the single-level router to the cluster router can be performed by batching the upgrade of the switching unit in the router to be upgraded to ensure that some switching units can not work normally during the upgrade process, and other switching units can be used. It can work normally and provide services for users. Further, since the number of switching units to be upgraded is determined according to the redundancy capability of the switching unit in the router to be upgraded, it can ensure that the switching unit to be upgraded is upgraded while other switching units are being upgraded. All the data packets can be processed normally without any packet loss. In addition, the unicast mask between the access units in the router to be upgraded and the switching unit to be upgraded is closed gracefully. And/or the multicast mask. Therefore, after the upgrade command is issued, the user service is not adversely affected by the shutdown of the switching unit to be upgraded, and the user experience is improved.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • This embodiment provides an upgrade device for a single-level router to a cluster router. Please refer to FIG. 3:
  • the upgrade device 30 of the single-level router to the cluster router includes a selection module 302, a sending module 304, and an upgrade module 306.
  • the selection module 302 is configured to determine, by batch, the current exchange unit to be upgraded in the router to be upgraded.
  • a router includes multiple switching units and multiple access units. There may be units for implementing other functions between the access unit and the port of the router. The key points are not elaborated here.
  • the access unit generally distributes the data packets to each switching unit in a balanced manner according to the principle of load balancing.
  • the switching unit determines the forwarding route for the data packet and sends it from the corresponding access unit. , to achieve the forwarding of data packets.
  • the upgrade of the router is to increase the expansion component, so that the original single-level router becomes a part of the cluster router.
  • the expansion component includes at least one single-level router and one central router.
  • each single-level router is connected to the central router in a cascade manner: a cascade optical port is generally designed on the single-level router, and the cascade optical port is configured. The forwarding of data packets is not working.
  • the cascading optical port is used only when the switching unit in the single-level router needs to be upgraded to the cascading switching unit in the router cluster. It is connected to the central router through a fiber optic cable, so that the switching unit in the original single-level router is connected as a switching unit in the cascade switching unit.
  • each switching unit is relatively independent, there is basically no direct interaction. Therefore, when upgrading the router to be upgraded, it can be upgraded in batches, that is, some of the switching units are upgraded first. Configuration, so that another part of the exchange unit is still in normal working condition.
  • the selection module 302 needs to determine which switching units need to be upgraded in the current upgrade batch before the upgrade. In order to determine which switching units need to be upgraded, that is, to determine the current switching unit to be upgraded, two factors need to be determined: first, the number of switching units to be upgraded is currently selected; further, the corresponding number of switching units to be upgraded are respectively Which.
  • the selection module 302 determines the number of switching units to be upgraded, it may be performed in a randomly selected manner. For example, if there are 8 switching units in the router to be upgraded, then one switching unit may be selected as the current batch of the switching unit to be upgraded. You can also upgrade three switching units in the current batch. Of course, in addition to the random selection method, the number of switching units to be upgraded may be determined according to some principles, for example, “the principle of minimum packet loss rate”. Here, there are 8 switching units in a router as an example to measure the packet loss rate. The minimum principle is explained.
  • the number of switching units in the router is adapted to the routing conversion pressure that the router needs to bear. That is, the processing capability of the eight switching units for data packets may be exactly equal to that received by each access unit. The total amount of data packets to be processed. In this case, if any one of the switching units is not in the normal working state, the other seven switching units cannot bear the working pressure of the eight switching units, which may result in User data packets cannot be processed to form a packet loss. From the perspective of practical application, in order to ensure the prevention of packet loss, the working capacity of the eight switching units in the router may be higher than the number of packets actually needed to be processed. For example, eight switching units in a router.
  • Each switching unit can process 4 data packets per second, and there may be only 28 data packets that need to be forwarded by the router every second. In this scenario, even if one switching unit does not need In the working state, the other seven switching units can also ensure that data packets are processed normally without causing packet loss. This is called the redundancy of the switching unit.
  • the switching unit presents a "7+1" redundancy feature, which means that one of the eight switching units can be inactive. Affects the normal performance of the entire router. For some routers with better performance, the redundancy characteristics may be better. For example, the router is also a router with 8 switching units.
  • the redundancy of another router switching unit is “6+2”, that is, it can simultaneously Up to two switching units can be in an abnormal working state without affecting the normal data packet processing of the router. Therefore, in order to ensure the normal network requirements of the user, when the switching unit is upgraded, the selecting module 302 can determine the current number of switching units to be upgraded according to the redundancy capability of the switching unit in the router to be upgraded.
  • the selecting module 302 After determining the number of switching units to be upgraded, the selecting module 302 needs to select a corresponding number of switching units from the plurality of switching units of the router as the units to be exchanged, if each access unit in the router to be upgraded is allocated to each switching unit for forwarding processing.
  • the number of data packets is not average, which may cause some of the switching units to be busy, while the other part is relatively idle.
  • the selection module 302 can select the switching unit that is currently in the idle state to perform the upgrade configuration: according to the size of each switching unit traffic, select at least one switching unit as the to-be-upgraded exchange according to the order of the traffic volume from small to large.
  • the number of selected switching units is smaller than the total number of switching units in the router to be upgraded.
  • the current redundancy capacity of the switching unit in the router to be upgraded is determined in an upgrade batch. Up to N switching units can be upgraded, and the selection module 302 selects N switching units with less traffic from the switching units of the router to be upgraded as the switching unit to be upgraded of the current upgrade batch, and N should be greater than or equal to 1. But less than the total number of switching units in the router to be upgraded. Because the upgraded switching unit is to be upgraded, it needs to be configured to be initialized as a cascading switching unit.
  • the switching unit to be upgraded needs to be restarted, which may cause the switching unit to be upgraded.
  • the service is lost, thereby affecting the user experience. Therefore, in order to minimize this effect, the selection module 302 selects the switching unit with less current traffic as the switching unit to be upgraded.
  • the access unit determines, by the load balancing algorithm, which switching unit should send the received data packet to the switching unit to ensure that the working pressure of each switching unit is balanced.
  • Common load balancing algorithms are classified into static load balancing and dynamic load balancing. Static load balancing is divided into polling algorithm, ratio algorithm, priority algorithm, etc. Dynamic load balancing algorithm is divided into minimum connection number and fastest response.
  • the load balancing algorithm is various. In this embodiment, the specific method for performing load balancing is not limited, because no matter which specific algorithm is used, the number of data packets to be processed on each switching unit in the router is similar.
  • the access unit allocates pending packets to each switching unit in a load balancing manner, the number of pending data packets on each switching unit in the router to be upgraded should be similar at any time.
  • the selection module 302 can randomly select a corresponding number of switching units as the switching units to be upgraded.
  • the sending module 304 is configured to deliver an upgrade instruction for the switching unit to be upgraded.
  • the upgrade module 306 is configured to upgrade the to-be-upgraded switching unit to a cascade switching unit according to the upgrade instruction, and initialize a communication link between the cascade switching unit and a corresponding switching unit in the central router.
  • the exchange unit between the switch unit to be upgraded and the center router is upgraded before the upgrade of the switch unit to be upgraded is completed.
  • the communication link between the two is not established. At this time, the communication link is still in the "down" state. Therefore, after receiving the upgrade command, the upgrade module 306 not only needs to upgrade the exchange order according to the upgrade instruction.
  • the element is configured as a cascading switching unit, and the communication link is also initialized so that the cascading switching unit and the corresponding switching unit in the central router can perform normal communication.
  • the upgrading module 306 can open a unicast mask between each access unit and the cascading switching unit, so that the cascading switching unit starts to work.
  • the cascading switching unit When the cascading switching unit is in normal working, it will receive the data packet transmitted by the access unit, and then transmit the data packet to the corresponding switching unit in the central router through the communication link initialized during the upgrade process.
  • the switching unit selects a router for forwarding, and the router may be a router that transmits the data packet to the central router, such as the single-level router 11 in FIG. 1 or other routers cascaded with the central router, such as a single-stage router. Router 12.
  • the exchange unit in the central router 10 may still The data message is forwarded to the single-stage router 11, and an access unit is selected by the single-stage router 11 and then sent out.
  • the selection module 302 may select another exchange unit that has not been upgraded as the exchange unit to be upgraded, and the sending module 304 and the upgrade module 306 then continue to cycle the upgrade process until all the upgrades are to be performed. All switching units in the router are upgraded. It can be understood that, in this embodiment, all the switching units in the upgraded router are not required to be upgraded, and part of the upgrade may be upgraded according to actual needs, and the other part is not upgraded, and the work of the single-level router continues to work.
  • the upgrade unit to be upgraded for different batches needs to issue an upgrade instruction separately, from the perspective of the router administrator, only one upgrade instruction may be manually input, and then the selection module 302 The upgrade unit is selected and sent by the sending module 304. After the upgrade module 306 upgrades the batch to be upgraded, the status information of the upgrade is obtained, and then the module 302 is automatically selected again. Select the switch unit to be upgraded, and then cycle the upgrade process until the upgrade of the router to be upgraded is completed.
  • the upgrade device 30 of the single-level router to the cluster router includes a selection module 302, a sending module 304, and an upgrade module 306, and further includes a restriction module 308.
  • the upgrade command sent by the sending module 304 is for the switching unit to be upgraded selected by the selecting module 302, and the other switching units are still in the normal working state.
  • the switching unit to be upgraded cannot be in the working state, and the data packet transmitted by the accessing unit cannot be forwarded. Therefore, in order to prevent the packet loss from affecting the user experience, in this embodiment, the limiting module 308 can limit the switching access units of the to-be-upgraded router to send the pending message to the switching unit to be upgraded.
  • the limiting module 308 limits the manner in which the access unit sends the to-be-processed message to the to-be-upgraded switching unit, including: closing at least one of a unicast mask or a multicast mask of the switching unit to be upgraded.
  • the methods for closing the unicast mask or multicast mask of the switching unit to be upgraded include forced shutdown and graceful shutdown.
  • the upgrade command for the switching unit to be upgraded is delivered, there may be a data message to be processed on each of the to-be-upgraded switching units.
  • the limiting module 308 directly closes the unicast mask. Or a multicast mask, then these data packets will be lost.
  • This shutdown mode is forced to close, and the forced shutdown mode will inevitably affect User business, thereby reducing the user experience.
  • the restriction module 308 in this embodiment also provides an elegant closed mode.
  • the so-called graceful shutdown means that if there is still data in the transmission buffer, the first It sends out, and after receiving a response to all the data, the restriction module 308 begins the shutdown process.
  • the restriction module 308 prohibits the access unit from sending the unicast packet and/or the multicast packet to the to-be-upgraded switching unit in an elegantly closed manner to ensure that the user data packet is not lost when the upgrade is started, and in the subsequent upgrade process. Because the access unit is restricted, the data packet to be sent is not sent to the switching unit to be upgraded in the upgrade state, but the data packet to be processed is allocated to other switching units for processing. If the number of switching units to be upgraded is determined according to the redundancy capability of the switching unit of the router, the other switching units that are not in the upgraded state may have sufficient capability to forward the data packets allocated by the access unit, and The occurrence of packet loss ensures the normal operation of the user's business.
  • the upgrade device 30 of the single-level router to the cluster router in this embodiment may be deployed on the central router or on the router to be upgraded, and the functions of the selection module 302, the upgrade module 306, and the restriction module 308 may be performed by the router.
  • the CPU is implemented, and the transmitting module 304 can be implemented by a communication device in the router.
  • the upgrading device of the single-level router to the cluster router selects the switching unit to be upgraded in batches by the selecting module, so that the upgrade of the switching unit in the router to be upgraded is divided into different batches, and the switching to be upgraded is performed.
  • the other switching units can work normally to provide services for the user.
  • the number of switching units to be upgraded by the selecting module is determined according to the redundancy capability of the switching unit in the router to be upgraded, Ensure that the switching unit to be upgraded is in the process of being upgraded, and the other switching units can process all the data packets normally, so that no packet loss occurs.
  • the limiting module will gracefully shut down the routers to be upgraded.
  • modules or steps of the above embodiments of the present disclosure may be implemented by a general computing device, which may be concentrated on a single computing device or distributed among multiple computing devices. On the network, optionally, they may be implemented by program code executable by the computing device, such that they may be stored in a computer storage medium (ROM/RAM, disk, optical disk) by a computing device, and at some In some cases, the steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps may be fabricated into a single integrated circuit module. . Therefore, the present disclosure is not limited to any specific combination of hardware and software.
  • the method for upgrading a single-level router to a cluster router can be applied to a router, and is upgraded by a batch of switching units in the router to be upgraded and initialized between the switching unit and the corresponding switching unit in the central router.
  • the way of the communication link can ensure that some of the switching units are in a normal working state when upgrading some of the switching units, and the services on the router to be upgraded are not interrupted at the same time due to the upgrade of the router to be upgraded, thereby reducing the number of services.
  • the impact of router upgrades on users has improved the user experience.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供一种单级路由器到集群路由器的升级方法及装置,通过分批次的形式对待升级路由器中的待升级交换单元进行升级配置,并初始化升级后的级联交换单元与中心路由器中对应交换单元之间的通信链路,这种方式能够保证在对部分交换单元进行升级配置的时候,待升级路由器当中还有另外一部分交换单元处于正常工作状态,为用户提供服务,避免了相关技术中因为对待升级路由器的升级而造成待升级路由器上所有业务同时中断的问题,从而减少了路由器升级对用户的影响,提高了用户体验。

Description

单级路由器到集群路由器的升级方法及装置 技术领域
本公开涉及通讯技术领域,尤其涉及单级路由器到集群路由器的升级方法及装置。
背景技术
随着网络的普及,人们工作和生活越来越多依赖网络,除了常见的网络购物、网络娱乐、网络工作和学习以外,甚至连人们的就医、出行都需要网络的参与。为了通过网络来达到人们的需求,网络中随时都在对不计其数的数据报文进行传递转发,路由器就是将这些数据报文转发传递到目的地的设备,因此,路由器的重要性不言而喻。
路由器是互联网的主要结点设备,路由器通过路由决定数据的转发。转发策略称为路由选择(routing),这也是路由器名称(router,转发者)的由来。作为不同网络之间互相连接的枢纽,路由器***构成了基于TCP/IP的国际互联网络Internet的主体脉络,也可以说,路由器构成了Internet的骨架。它的处理速度是网络通信的主要瓶颈之一,它的可靠性则直接影响着网络互连的质量。
为了给用户更好的网络体验,需要满足越来越高的网速的要求,因此,网络通信带宽的提升迫在眉睫。而对路由器进行升级,通过增大路由器的交换容量以提高网络带宽的方式是一种提高网速的通用可行的方案。例如,原本是通过一个单级路由器对数据报文进行转发,该单级路由器中有8个交换单元,那么在同一时刻,这个单级路由器最多可以处理8个数据报文。现在将原有的单级路由器升级为“1+2模式”的集群路由器,如图1所示,“1+2模式”的集群路由器就是由一个中心路由器10和两个单级路由器11和12组成,单级路由器11和12中原有的交换单元作为级联交换单元与中间路由器10中的交换单元连接。当单级路由器11或者单级路由器12的接入单元接收到数据报文之后,级联交换单元并不会像作为单级路由器工作时一样直接确定该数据报文的转发路由,而是通过其与中心路由器10之间的级联光纤将数据报文传输给中心路由器10的交换单元,由中心路由器10为数据路由报文选择一个单级路由器对其进行转发处理,然后发送到对应的单级路由器上,假定这里是将数据报文传输到单级路由器12上,则单级路由器12的级联交换单元在接收到数据报文后可以为其选择一个接入单元进行外发。通过这种方式,可以同时对16个数据报文进行处理,也就是说,“1+2模式”的集群路由器的交换容量比单级路由器的交换容量扩大了一倍,网络通信带宽也随之增加一倍。
相关技术中,将单级路由器升级成为集群路由器的方式是将新增的扩容部件和原有单级路由器的交换单元通过级联光纤连接好之后,通过整机重启的方式来对原单级路由器的交换单元进行升级,对路由器中交换单元进行升级的过程实际上就是将待升级交换单元配置成级联交换单元,因为在集群路由器当中,原单级路由器中的交换单元会以级联交换单元的形式进行工作,使单级路由器切换为集群路由器中的一个部分。不难发现,通过重启 将原单级路由器的交换单元配置成级联交换单元的过程会使原单级路由器中进行的业务都中断,直到集群路由器启动完毕,业务才能恢复,这个过程可能会持续数分钟。而业务的中断会导致本来需要通过该单级路由器来进行数据报文转发以实现网络通信的用户的通信中断,从而影响用户体验。
发明内容
本公开实施例提供的单级路由器到集群路由器的升级方法及装置,主要解决的技术问题是:解决相关技术中将单级路由器升级到集群路由器的时候需要对单级路由器进行数分钟的整机重启,从而影响到用户体验的问题。
为解决上述技术问题,本公开实施例提供一种单级路由器到集群路由器的升级方法,包括:
当待升级路由器与中心路由器正常连接时,按批次确定所述待升级路由器中当前的待升级交换单元;
下发针对所述待升级交换单元的升级指令;
根据所述升级指令将所述待升级交换单元升级成级联交换单元,并初始化所述级联交换单元与所述中心路由器中对应交换单元之间的通信链路。
本公开实施例还提供一种单级路由器到集群路由器的升级装置,包括:
选择模块,用于当待升级路由器与中心路由器正常连接时,按批次确定所述待升级路由器中当前的待升级交换单元;
发送模块,用于下发针对所述待升级交换单元的升级指令;
升级模块,用于根据所述升级指令将所述待升级交换单元升级成级联交换单元,并初始化所述级联交换单元与所述中心路由器中对应交换单元之间的通信链路。
本公开实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的任一项的单级路由器到集群路由器的升级方法。
本公开的有益效果是:
根据本公开实施例提供的单级路由器到集群路由器的升级方法、装置以及计算机存储介质,通过分批次的对待升级路由器中的交换单元进行升级并初始化该交换单元与中心路由器中对应交换单元之间的通信链路的方式,能够保证在对部分交换单元进行升级的时候还有部分交换单元处于正常工作状态,不会因为对待升级路由器的升级造成待升级路由器上所有的业务同时中断,从而减少了路由器升级对用户的影响,提高了用户体验。
附图说明
图1为升级完成后集群路由器的一种结构组成示意图;
图2为本公开实施例一提供的单级路由器到集群路由器的升级方法的一种流程图;
图3为本公开实施例二提供的单级路由器到集群路由器的升级装置的一种结构示意图;
图4为本公开实施例二提供的单级路由器到集群路由器的升级装置的另一种结构示意图。
具体实施方式
下面通过具体实施方式结合附图对本公开实施例作进一步详细说明。
实施例一:
为了解决相关技术中通过对待升级路由器进行整机重启的方式将交换单元升级成级联交换单元的过程造成使待升级路由器上运行的业务去全部中断,影响用户体验的问题,本实施例提供一种单级路由器到集群路由器的升级方法,该方法可以在单级路由器到集群路由器的升级装置上实施,该单级路由器到集群路由器的升级装置可以部署在中心路由器上,或待升级路由器上,由中心路由器或者待升级路由器的CPU(Central Processing Unit,中央处理器)来完成其功能,或者,该单级路由器到集群路由器的升级装置也可以部署在中心路由器和待升级路由器之外,其功能可以由设置有CPU的其他装置或设备来实现。下面对本实施例提供的单级路由器到集群路由器的升级方法进行阐述,请参考图2:
S202、单级路由器到集群路由器的升级装置按批次确定待升级路由器中当前的待升级交换单元。
一个路由器中包括多个交换单元和多个接入单元,接入单元与路由器的端口之间可能还有实现其他功能的单元,这里不进行重点阐述,当路由器的端口接收到待转发的数据报文之后会传输给接入单元,接入单元一般按照负载均衡的原则将数据报文比较平均的分配到各个交换单元上,由交换单元为数据报文确定转发路由并从相应的接入单元发出,实现数据报文的转发。
根据前面的介绍,应当明白的是,对路由器进行升级就是通过增加扩容部件,使原本的单级路由器变成集群路由器中的一个部分。扩容部件中包括至少一个单级路由器和一个中心路由器,在扩容部件中,各单级路由器与中心路由器采用级联的方式连接:单级路由器上一般都设计的了级联光口,级联光口在数据报文的转发工作并不会处于工作状态,只有在需要将单级路由器中的交换单元升级成为路由器集群中的级联交换单元的时候才会使用到级联光口,级联光口与中心路由器通过光纤连接,让原单级路由器中交换单元作为级联交换单元中的交换单元连接。
由于各个交换单元之间是相对独立的,基本不会有什么直接的交互,所以在对待升级路由器进行升级的时候,可以采用分批次升级的方式进行,即单级路由器到集群路由器的升级装置对其中的一部分交换单元先进行升级配置,让另外一部分交换单元依然处于正常工作状态。单级路由器到集群路由器的升级装置采用这种方式进行路由器升级时,需要在升级之前确定当前升级批次中需要对哪些交换单元进行升级。为了确定当前需要对哪些交 换单元进行升级,也即确定当前的待升级交换单元,需要确定两个因素:首先,当前选择待升级交换单元的数目;进一步地,对应数目的待升级交换单元分别是哪些。
在确定待升级交换单元数目的时候,单级路由器到集群路由器的升级装置可以通过随机选择的方式进行,例如,待升级路由器中共有8个交换单元,那么单级路由器到集群路由器的升级装置可以先选择1个交换单元作为当前批次的待升级交换单元,也可以在当前批次中先对三个交换单元进行升级。当然除了随机选择的方式,单级路由器到集群路由器的升级装置也可以按照一些原则来确定待升级交换单元的数目,例如,“丢包率最小原则”,这里还是以一个路由器中有8个交换单元为例来对“丢包率最小原则”进行说明。
理论上来说,路由器中的交换单元的数目与该路由器需要承担的路由转换压力是适配的,也就是说,8个交换单元对数据报文的处理能力可能刚好等于各个接入单元接收到的待处理数据报文的总量,在这种情况下,如果其中任意一个交换单元没有处于正常工作状态下,那么其他7个交换单元没有办法承担8个交换单元的工作压力,这样就可能会导致用户的数据报文无法被处理从而形成丢包。而从实际应用的角度来说,为了保证防止丢包情况的发生,路由器中8个交换单元的工作能力可能会比实际需要处理的报文数量要高,例如,一个路由器中8个交换单元,每个交换单元每秒可以处理4份数据报文,而实质上每一秒钟需要该路由器进行转发处理的数据报文可能只有28份,在这种情境下,其实即使有一个交换单元不需要处于工作状态,其他的7个交换单元也能保证数据报文得到正常处理,不造成丢包情况。这就叫做交换单元的冗余性,在这个示例当中,交换单元呈现“7+1”的冗余特性,也就是说8个交换单元中可以有一个交换单元处于非工作状态而不影响整个路由器的正常性能。对于部分性能更好的路由器,其冗余特性可能也会更好,例如,同样是8个交换单元的路由器,这里另外一种路由器交换单元的冗余特性为“6+2”,即可以同时最多可以有两个交换单元处于非正常工作状态而不影响路由器正常的数据报文处理。因此,为了保证用户的正常网络需求,单级路由器到集群路由器的升级装置在选择交换单元升级的时候,可以根据待升级路由器中交换单元的冗余能力来确定当前待升级交换单元的数目。
当确定待升级交换单元的数目之后,需要从路由器的多个交换单元中选择对应数目的交换单元作为待交换单元,如果待升级路由器中各接入单元分配给各个交换单元进行转发处理的数据报文的数量并不平均,那么就可能会造成部分交换单元处于繁忙状态,而另外一部分则处于相对较闲的状态。在这种情况下,就可以选择当前处于空闲状态的交换单元来进行升级配置:根据各交换单元业务量的大小,按照业务量从小到大的顺序选择至少一个交换单元作为待升级交换单元,但值得注意的是,选择出来的交换单元的个数小于待升级路由器中交换单元的总数,简单来说,假设当前根据待升级路由器中交换单元的冗余能力确定在一个升级批次中最多可以对N个交换单元进行升级,单级路由器到集群路由器的升级装置就从待升级路由器的各交换单元中选择业务量较少的N个交换单元作为当前升级批次的待升级交换单元,N应当大于等于1,但小于待升级路由器中交换单元的总数。 因为在对待升级交换单元进行升级的时候,要对其进行配置,使其初始化为级联交换单元,在初始化的过程中需要重启该待升级交换单元,所以可能会造成该待升级交换单元上的业务丢失,从而影响用户体验,因此,为了尽量减小这种影响,选择当前业务量较少的交换单元作为待升级交换单元。
在部分路由器中,当接入单元在接收到数据报文后,会通过负载均衡算法确定应当将接收到的数据报文发送给哪一个交换单元进行处理,以保证各个交换单元的工作压力均衡。常见的负载均衡算法分为静态负载均衡和动态负载均衡,其中静态负载均衡分为轮询算法、比率算法、优先权算法等,而动负载均衡算法又分为最少连接数、最快反映等。负载均衡算法多种多样,在本实施例中并不限定进行负载均衡的具体方式,因为无论使用何种具体算法,都会让路由器中各个交换单元上待处理的数据报文数量差不多。因此,如果接入单元是通过负载均衡的方式为各交换单元分配待处理报文,那其实无论是在什么时刻,待升级路由器中各交换单元上待处理数据包报文的数量都应该差不多。在这种情况下,单级路由器到集群路由器的升级装置可以随机选择对应数目的交换单元作为待升级交换单元。
S204、单级路由器到集群路由器的升级装置下发针对待升级交换单元的升级指令。
单级路由器到集群路由器的升级装置下发的升级指令时针对S202中选择出来的待升级交换单元的,其他交换单元仍然处于正常工作状态。由于升级过程中待升级交换单元不能处于工作状态,也不能够接入单元传输的数据报文进行正常的转发处理,因此,为了防止丢包影响用户体验,在本实施例中,在下发针对待升级交换单元的升级指令之后,单级路由器到集群路由器的升级装置可以限制待升级路由器各交换接入单元向待升级交换单元发送待处理报文。单级路由器到集群路由器的升级装置限制接入单元向待升级交换单元发送待处理报文的方式包括:关闭待升级交换单元的单播掩码或组播掩码中的至少一个。
单级路由器到集群路由器的升级装置关闭待升级交换单元单播掩码或组播掩码的方式包括强制关闭和优雅关闭两种。由于下发针对待升级交换单元的升级指令的时候,各待升级交换单元上可能还有正待处理的数据报文,如果在接收到升级指令的时候,就直接关闭单播掩码或组播掩码,那么这些数据报文就会丢失,这种关闭方式就属于强制关闭,强制关闭的方式必然会影响到用户业务,从而降低用户体验。为了尽量避免路由器升级过程对用户体验造成负面影响,所以,本实施例还提供一种优雅关闭的方式,所谓优雅关闭是指,如果发送缓存中还有数据未发出则先将其发出去,并且在收到所有数据的响应之后,再开始关闭过程。
通过优雅关闭的方式禁止接入单元向待升级交换单元发送单播报文和/或组播报文能够保证在在开始升级时不会丢失用户数据报文,同时,在后续升级过程中,由于接入单元受到限制,所以不会向正处于升级状态的待升级交换单元发完送数据报文,而是将待处理的数据报文分配给其他的交换单元进行处理。而如果是根据路由器交换单元的冗余能力来确定待升级交换单元的数目,那么其他未处于升级状态的交换单元会有足够的能力对接入 单元分配的数据报文进行转发处理,也不会造成丢包的发生,保证了用户业务的正常运行。
S206、单级路由器到集群路由器的升级装置根据升级指令将待升级交换单元升级成级联交换单元,并初始化级联交换单元与中心路由器中对应交换单元之间的通信链路。
虽然在升级之前,待升级交换单元与中心路由器中对应的交换单元之间已经通过级联光线连好了,但是在待升级交换单元的升级完成之前,待升级交换单元与中心路由器中间对应交换单元之间的通信链路并没有建立完成,这个时候,通信链路还处于“down”的状态,因此,在接收到升级指令之后,不仅要根据升级指令将待升级交换单元配置成级联交换单元,而且还要将通信链路进行初始化,使之可以进行正常通信。
在当前待升级交换单元升级成级联交换单元之后,单级路由器到集群路由器的升级装置可以打开各接入单元到该级联交换单元之间的单播掩码,使该级联交换单元开始工作。级联交换单元在正常工作的时候,会接收接入单元传输的数据报文,然后通过升级过程中初始化形成的通信链路,将该数据报文传输给中心路由器中对应的交换单元,由中心交换单元为其选择进行转发的路由器,这个路由器可以是向中心路由器传输该数据报文的路由器,如图1中的单级路由器11,也可以是其他与中心路由器级联的路由器,如单级路由器12。但由于目前升级尚未完成,单级路由器12上可能还并未部署业务,所以,在待升级路由器,即图1中的单级路由器11升级完成之前,中心路由器10中的交换单元可能还是会将数据报文转发给单级路由器11,由单级路由器11为其选择一个接入单元然后外发。
若当前待升级交换单元的升级完成之后,单级路由器到集群路由器的升级装置可以选择另外的、尚未进行升级的交换单元作为待升级交换单元,然后继续循环上述升级过程,直到所有待升级路由器中所有的交换单元都升级完成。可以理解的是,本实施例中并不要求对待升级路由器中所有的交换单元都进行升级,单级路由器到集群路由器的升级装置可以根据实际需求升级一部分,另外一部分不进行升级,继续以单级路由器的工作方式进行工作。
本公开实施例提供的单级路由器到集群路由器的升级方法,通过将待升级路由器中交换单元的升级分批次进行,保证部分交换单元在升级过程中不能正常工作的时候还能有其他交换单元能够正常工作,为用户提供服务;进一步的,由于待升级交换单元的数目是根据待升级路由器中交换单元的冗余能力来确定的,所以能够保证待升级交换单元在升级的同时,其他交换单元能够正常处理所有的数据报文,从而不会造成丢包现象;另外,在升级之前,会通过优雅关闭的方式关闭待升级路由器中各接入单元到待升级交换单元之间的单播掩码和/或组播掩码,因此,可以保证在下发升级指令之后,不会因为待升级交换单元的关闭而对用户业务造成负面影响,提高了用户体验度。
实施例二:
本实施例提供一种单级路由器到集群路由器的升级装置,请参考图3:
该单级路由器到集群路由器的升级装置30包括选择模块302、发送模块304和升级模块306。
选择模块302用于按批次确定待升级路由器中当前的待升级交换单元。一个路由器中包括多个交换单元和多个接入单元,接入单元与路由器的端口之间可能还有实现其他功能的单元,这里不进行重点阐述,当路由器的端口接收到待转发的数据报文之后会传输给接入单元,接入单元一般按照负载均衡的原则将数据报文比较平均的分配到各个交换单元上,由交换单元为数据报文确定转发路由并从相应的接入单元发出,实现数据报文的转发。
根据前面的介绍,应当明白的是,对路由器进行升级就是通过增加扩容部件,使原本的单级路由器变成集群路由器中的一个部分。扩容部件中包括至少一个单级路由器和一个中心路由器,在扩容部件中,各单级路由器与中心路由器采用级联的方式连接:单级路由器上一般都设计了级联光口,级联光口在数据报文的转发工作并不会处于工作状态,只有在需要将单级路由器中的交换单元升级成为路由器集群中的级联交换单元的时候才会使用到级联光口,级联光口与中心路由器通过光纤连接,让原单级路由器中交换单元作为级联交换单元中的交换单元连接。
由于各个交换单元之间是相对独立的,基本不会有什么直接的交互,所以在对待升级路由器进行升级的时候,可以采用分批次升级的方式进行,即对其中的一部分交换单元先进行升级配置,让另外一部分交换单元依然处于正常工作状态。采用这种方式进行路由器升级时,选择模块302需要在升级之前确定当前升级批次中需要对哪些交换单元进行升级。为了确定当前需要对哪些交换单元进行升级,也即确定当前的待升级交换单元,需要确定两个因素:首先,当前选择待升级交换单元的数目;进一步地,对应数目的待升级交换单元分别是哪些。
在选择模块302确定待升级交换单元数目的时候,可以通过随机选择的方式进行,例如,待升级路由器中共有8个交换单元,那么可以先选择1个交换单元作为当前批次的待升级交换单元,也可以在当前批次中先对三个交换单元进行升级。当然除了随机选择的方式,也可以按照一些原则来确定待升级交换单元的数目,例如,“丢包率最小原则”,这里还是以一个路由器中有8个交换单元为例来对“丢包率最小原则”进行说明。
理论上来说,路由器中的交换单元的数目与该路由器需要承担的路由转换压力是适配的,也就是说,8个交换单元对数据报文的处理能力可能刚好等于各个接入单元接收到的待处理数据报文的总量,在这种情况下,如果其中任意一个交换单元没有处于正常工作状态下,那么其他7个交换单元没有办法承担8个交换单元的工作压力,这样就可能会导致用户的数据报文无法被处理从而形成丢包。而从实际应用的角度来说,为了保证防止丢包情况的发生,路由器中8个交换单元的工作能力可能会比实际需要处理的报文数量要高,例如,一个路由器中8个交换单元,每个交换单元每秒可以处理4份数据报文,而实质上每一秒钟需要该路由器进行转发处理的数据报文可能只有28份,在这种情境下,其实即使有一个交换单元不需要处于工作状态,其他的7个交换单元也能保证数据报文得到正常处理,不造成丢包情况。这就叫做交换单元的冗余性,在这个示例当中,交换单元呈现“7+1”的冗余特性,也就是说8个交换单元中可以有一个交换单元处于非工作状态而不 影响整个路由器的正常性能。对于部分性能更好的路由器,其冗余特性可能也会更好,例如,同样是8个交换单元的路由器,这里另外一种路由器交换单元的冗余特性为“6+2”,即可以同时最多可以有两个交换单元处于非正常工作状态而不影响路由器正常的数据报文处理。因此,为了保证用户的正常网络需求,在进行交换单元升级的时候,选择模块302可以根据待升级路由器中交换单元的冗余能力来确定当前待升级交换单元的数目。
当确定待升级交换单元的数目之后,选择模块302需要从路由器的多个交换单元中选择对应数目的交换单元作为待交换单元,如果待升级路由器中各接入单元分配给各个交换单元进行转发处理的数据报文的数量并不平均,那么就可能会造成部分交换单元处于繁忙状态,而另外一部分则处于相对较闲的状态。在这种情况下,选择模块302就可以选择当前处于空闲状态的交换单元来进行升级配置:根据各交换单元业务量的大小,按照业务量从小到大的顺序选择至少一个交换单元作为待升级交换单元,但值得注意的是,选择出来的交换单元的个数小于待升级路由器中交换单元的总数,简单来说,假设当前根据待升级路由器中交换单元的冗余能力确定在一个升级批次中最多可以对N个交换单元进行升级,选择模块302就从待升级路由器的各交换单元中选择业务量较少的N个交换单元作为当前升级批次的待升级交换单元,N应当大于等于1,但小于待升级路由器中交换单元的总数。因为在对待升级交换单元进行升级的时候,需要对其进行配置,使其初始化为级联交换单元,在初始化的过程中需要重启该待升级交换单元,所以可能会造成该待升级交换单元上的业务丢失,从而影响用户体验,因此,为了尽量减小这种影响,选择模块302选择当前业务量较少的交换单元作为待升级交换单元。
在部分路由器中,当接入单元在接收到数据报文后,会通过负载均衡算法确定应当将接收到的数据报文发送给哪一个交换单元进行处理,以保证各个交换单元的工作压力均衡。常见的负载均衡算法分为静态负载均衡和动态负载均衡,其中静态负载均衡分为轮询算法、比率算法、优先权算法等,而动负载均衡算法又分为最少连接数、最快反映等。负载均衡算法多种多样,在本实施例中并不限定进行负载均衡的具体方式,因为无论使用何种具体算法,都会让路由器中各个交换单元上待处理的数据报文数量差不多。因此,如果接入单元是通过负载均衡的方式为各交换单元分配待处理报文,那其实无论是在什么时刻,待升级路由器中各交换单元上待处理数据包报文的数量都应该差不多。在这种情况下,选择模块302可以随机选择对应数目的交换单元作为待升级交换单元。
发送模块304用于下发针对待升级交换单元的升级指令。
升级模块306用于根据升级指令将待升级交换单元升级成级联交换单元,并初始化该级联交换单元与中心路由器中对应交换单元之间的通信链路。
虽然在升级之前,待升级交换单元与中心路由器中对应的交换单元之间已经通过级联光线连好了,但是在待升级交换单元的升级完成之前,待升级交换单元与中心路由器中间对应交换单元之间的通信链路并没有建立完成,这个时候,通信链路还处于“down”的状态,因此,在接收到升级指令之后,升级模块306不仅要根据升级指令将待升级交换单 元配置成级联交换单元,而且还要将通信链路进行初始化,使级联交换单元与中心路由器中对应的交换单元可以进行正常通信。
在当前待升级交换单元升级成级联交换单元之后,升级模块306可以打开各接入单元到该级联交换单元之间的单播掩码,使该级联交换单元开始工作。级联交换单元在正常工作的时候,会接收接入单元传输的数据报文,然后通过升级过程中初始化形成的通信链路,将该数据报文传输给中心路由器中对应的交换单元,由中心交换单元为其选择进行转发的路由器,这个路由器可以是向中心路由器传输该数据报文的路由器,如图1中的单级路由器11,也可以是其他与中心路由器级联的路由器,如单级路由器12。但由于目前升级尚未完成,单级路由器12上可能还并未部署业务,所以,在待升级路由器,即图1中的单级路由器11升级完成之前,中心路由器10中的交换单元可能还是会将数据报文转发给单级路由器11,由单级路由器11为其选择一个接入单元然后外发。
若当前待升级交换单元的升级完成之后,选择模块302又可以选择另外的、尚未进行升级的交换单元作为待升级交换单元,发送模块304和升级模块306然后继续循环上述升级过程,直到所有待升级路由器中所有的交换单元都升级完成。可以理解的是,本实施例中并不要求对待升级路由器中所有的交换单元都进行升级,可以根据实际需求升级一部分,另外一部分不进行升级,继续以单级路由器的工作方式进行工作。
另外,在本实施例中,虽然针对不同批次升级的待升级交换单元需要分别下发升级指令,但是从路由器管理员的角度来说,可以只需要人工输入一次升级指示,然后由选择模块302选择出对应的待升级交换单元并由发送模块304下发升级指令,当升级模块306对该批次的待升级交换单元升级完成之后,可以获取到升级完成的状态信息,然后选择模块302再次自动地选择待升级交换单元,然后循环升级的过程,直至待升级路由器升级完成。
在本实施例提供另外一种示例当中,如图4所示,单级路由器到集群路由器的升级装置30包括选择模块302、发送模块304和升级模块306以外,还包括限制模块308。
发送模块304下发的升级指令是针对选择模块302选择出来的待升级交换单元的,其他交换单元仍然处于正常工作状态。由于升级过程中待升级交换单元不能处于工作状态,也不能够接入单元传输的数据报文进行正常的转发处理,因此,为了防止丢包影响用户体验,在本实施例中,在下发针对待升级交换单元的升级指令之后,限制模块308可以限制待升级路由器各交换接入单元向待升级交换单元发送待处理报文。限制模块308限制接入单元向待升级交换单元发送待处理报文的方式包括:关闭待升级交换单元的单播掩码或组播掩码中的至少一个。
关闭待升级交换单元单播掩码或组播掩码的方式包括强制关闭和优雅关闭两种。由于下发针对待升级交换单元的升级指令的时候,各待升级交换单元上可能还有正待处理的数据报文,如果在接收到升级指令的时候,限制模块308就直接关闭单播掩码或组播掩码,那么这些数据报文就会丢失,这种关闭方式属于强制关闭,强制关闭的方式必然会影响到 用户业务,从而降低用户体验。为了尽量避免路由器升级过程对用户体验造成负面影响,所以,本实施例中的限制模块308还提供一种优雅关闭的方式,所谓优雅关闭是指,如果发送缓存中还有数据未发出则先将其发出去,并且在收到所有数据的响应之后,限制模块308再开始关闭过程。
限制模块308通过优雅关闭的方式禁止接入单元向待升级交换单元发送单播报文和/或组播报文能够保证在在开始升级时不会丢失用户数据报文,同时,在后续升级过程中,由于接入单元受到限制,所以不会向正处于升级状态的待升级交换单元发完送数据报文,而是将待处理的数据报文分配给其他的交换单元进行处理。而如果是根据路由器交换单元的冗余能力来确定待升级交换单元的数目,那么其他未处于升级状态的交换单元会有足够的能力对接入单元分配的数据报文进行转发处理,也不会造成丢包的发生,保证了用户业务的正常运行。
本实施例中的单级路由器到集群路由器的升级装置30可以部署在中心路由器上也可以部署在待升级路由器上,其中选择模块302、升级模块306以及限制模块308的功能都可以由路由器中的CPU来实现,而发送模块304则可以由路由器中的通信装置来实现。
本公开实施例提供的单级路由器到集群路由器的升级装置,由选择模块分批次地选择待升级交换单元,从而将待升级路由器中交换单元的升级分成不同的批次进行,在待升级交换单元在升级过程中能有其他交换单元能够正常工作,为用户提供服务;进一步的,由于选择模块选择待升级交换单元的数目是根据待升级路由器中交换单元的冗余能力来确定的,所以能够保证待升级交换单元在升级的同时,其他交换单元能够正常处理所有的数据报文,从而不会造成丢包现象;另外,在升级时,限制模块会通过优雅关闭的方式关闭待升级路由器中各接入单元到待升级交换单元之间的单播掩码和/或组播掩码,因此,可以保证在下发升级指令之后,不会因为待升级交换单元的关闭而对用户业务造成负面影响,提高了用户体验度。
显然,本领域的技术人员应该明白,上述本公开实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在计算机存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本公开不限制于任何特定的硬件和软件结合。
以上内容是结合具体的实施方式对本公开实施例所作的进一步详细说明,不能认定本公开的具体实施只局限于这些说明。对于本公开所属技术领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本公开的保 护范围。
工业实用性
本公开实施例提供的单级路由器到集群路由器的升级方法,可应用于路由器中,通过分批次的对待升级路由器中的交换单元进行升级并初始化该交换单元与中心路由器中对应交换单元之间的通信链路的方式,能够保证在对部分交换单元进行升级的时候还有部分交换单元处于正常工作状态,不会因为对待升级路由器的升级造成待升级路由器上所有的业务同时中断,从而减少了路由器升级对用户的影响,提高了用户体验。

Claims (11)

  1. 一种单级路由器到集群路由器的升级方法,包括:
    当待升级路由器与中心路由器正常连接时,按批次确定所述待升级路由器中当前的待升级交换单元;
    下发针对所述待升级交换单元的升级指令;
    根据所述升级指令将所述待升级交换单元升级成级联交换单元,并初始化所述级联交换单元与所述中心路由器中对应交换单元之间的通信链路。
  2. 如权利要求1所述的单级路由器到集群路由器的升级方法,其中,按批次确定所述待升级路由器中当前的待升级交换单元包括:
    根据所述待升级路由器中交换单元的冗余能力确定各批次进行升级的待升级交换单元的数目;
    从所述待升级路由器中选择对应数目的交换单元作为当前的待升级交换单元。
  3. 如权利要求1所述的单级路由器到集群路由器的升级方法,其中,所述按批次确定所述待升级路由器中当前待升级的交换单元包括:根据各所述交换单元业务量的大小,选择至少一个所述交换单元作为待升级交换单元,选择出来的所述交换单元的个数小于所述待升级路由器中交换单元的总数。
  4. 如权利要求1-3任一项所述的单级路由器到集群路由器的升级方法,其中,所述根据所述升级指令将所述待升级交换单元升级成级联交换单元之前包括:
    限制所述待升级路由器各交换接入单元向所述待升级交换单元发送待处理报文。
  5. 如权利要求4所述的单级路由器到集群路由器的升级方法,其中,限制所述待升级路由器各交换接入单元向所述待升级交换单元发送待处理报文包括:通过优雅关闭的方式禁止各所述接入单元向所述待升级交换单元发送单播报文或组播报文中的至少一个。
  6. 如权利要求4所述的单级路由器到集群路由器的升级方法,其中,初始化所述级联交换单元与所述中心路由器中对应交换单元之间的通信链路之后还包括:打开所述待升级路由器中各接入单元到所述级联交换单元之间的单播掩码。
  7. 一种单级路由器到集群路由器的升级装置,其中,包括:
    选择模块,设置为当待升级路由器与中心路由器正常连接时,按批次确定所述待升级路由器中当前的待升级交换单元;
    发送模块,设置为下发针对所述待升级交换单元的升级指令;
    升级模块,设置为根据所述升级指令将所述待升级交换单元升级成级联交换单元,并初始化所述级联交换单元与所述中心路由器中对应交换单元之间的通信链路。
  8. 如权利要求7所述的单级路由器到集群路由器的升级装置,其中,所述选择模块设置为:根据所述待升级路由器中交换单元的冗余能力确定各批次进行升级的待升级交换单元的数目,并从所述待升级路由器中选择对应数目的交换单元作为当前的待升级交换单元。
  9. 如权利要求7或8所述的单级路由器到集群路由器的升级装置,其中,还包括:
    限制模块,设置为限制所述待升级路由器各交换接入单元向所述待升级交换单元发送待处理报文。
  10. 如权利要求9所述的单级路由器到集群路由器的升级装置,其中,所述限制模块设置为通过优雅关闭的方式禁止各所述接入单元向所述待升级交换单元发送单播报文或组播报文中的任意一个。
  11. 一种存储介质,设置为存储程序代码,所述程序代码用于执行权利要求1至6中任一项所述的单级路由器到集群路由器的升级方法。
PCT/CN2017/087118 2016-06-27 2017-06-05 单级路由器到集群路由器的升级方法及装置 WO2018001044A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610482532.2 2016-06-27
CN201610482532.2A CN107547222A (zh) 2016-06-27 2016-06-27 单级路由器到集群路由器的升级方法及装置

Publications (1)

Publication Number Publication Date
WO2018001044A1 true WO2018001044A1 (zh) 2018-01-04

Family

ID=60786675

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/087118 WO2018001044A1 (zh) 2016-06-27 2017-06-05 单级路由器到集群路由器的升级方法及装置

Country Status (2)

Country Link
CN (1) CN107547222A (zh)
WO (1) WO2018001044A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710285A (zh) * 2018-11-22 2019-05-03 网宿科技股份有限公司 一种设备升级方法及***

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110011822A (zh) * 2018-12-19 2019-07-12 北京乐我无限科技有限责任公司 边缘服务器的升级方法、装置、管理服务器及***
CN109951334B (zh) * 2019-03-20 2022-04-26 深圳市信锐网科技术有限公司 一种交换机升级方法、装置、网络控制器及可读存储介质
CN112532541B (zh) * 2019-09-19 2023-04-07 恒为科技(上海)股份有限公司 一种交换机的启动方法及装置
CN114567551B (zh) * 2022-02-25 2023-08-29 中国农业银行股份有限公司 一种集群的升级方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852156A (zh) * 2005-11-03 2006-10-25 华为技术有限公司 不中断业务对处理***的程序版本进行升级的方法
CN1968153A (zh) * 2006-10-25 2007-05-23 华为技术有限公司 一种热升级网络处理器的方法及装置
CN101394309A (zh) * 2008-10-29 2009-03-25 华为技术有限公司 一种集群***扩容方法、装置及集群***
CN101888304A (zh) * 2009-05-15 2010-11-17 华为技术有限公司 一种路由设备的升级方法、装置和***
CN103856349A (zh) * 2012-12-07 2014-06-11 华为技术有限公司 多核路由器的版本升级处理方法及多核路由器

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9030947B2 (en) * 2012-10-12 2015-05-12 Futurewei Technologies, Inc. Methods for zero loss and nonstop packet processing during system software upgrades

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852156A (zh) * 2005-11-03 2006-10-25 华为技术有限公司 不中断业务对处理***的程序版本进行升级的方法
CN1968153A (zh) * 2006-10-25 2007-05-23 华为技术有限公司 一种热升级网络处理器的方法及装置
CN101394309A (zh) * 2008-10-29 2009-03-25 华为技术有限公司 一种集群***扩容方法、装置及集群***
CN101888304A (zh) * 2009-05-15 2010-11-17 华为技术有限公司 一种路由设备的升级方法、装置和***
CN103856349A (zh) * 2012-12-07 2014-06-11 华为技术有限公司 多核路由器的版本升级处理方法及多核路由器

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710285A (zh) * 2018-11-22 2019-05-03 网宿科技股份有限公司 一种设备升级方法及***
CN109710285B (zh) * 2018-11-22 2022-09-16 网宿科技股份有限公司 一种设备升级方法及***

Also Published As

Publication number Publication date
CN107547222A (zh) 2018-01-05

Similar Documents

Publication Publication Date Title
WO2018001044A1 (zh) 单级路由器到集群路由器的升级方法及装置
US11036529B2 (en) Network policy implementation with multiple interfaces
US9407579B1 (en) Software defined networking pipe for network traffic inspection
EP3586494B1 (en) Load balancing in distributed computing systems
US8223636B2 (en) Dynamic adjustment of number of connection setup requests to be initiated to be processed
US9455916B2 (en) Method and system for changing path and controller thereof
US20140198649A1 (en) Extended link aggregation (lag) for use in multiple switches
US20220261270A1 (en) Reusing software application containers
US20160285771A1 (en) Technique for achieving low latency in data center network environments
CN113364809B (zh) 分流网络数据以执行负载平衡
CN113542145B (zh) 以太网链路聚合组负载分担的方法以及网络设备
US8924915B2 (en) Use of metadata for seamless updates
US7224669B2 (en) Static flow rate control
US20230327981A1 (en) Efficient traffic redirection for an mclag for controlled unavailability events
CN115484232A (zh) Dhcp服务器的部署方法、装置、设备及存储介质
US20030185157A1 (en) Ethernet switch with rate control and associated method
EP2406923B1 (en) System and methods for a managed application server restart
US7852865B2 (en) System and method for preferred service flow of high priority messages
US20230319148A1 (en) Minimizing connection delay for a data session
US9467419B2 (en) System and method for N port ID virtualization (NPIV) login limit intimation to converged network adaptor (CNA) in NPIV proxy gateway (NPG) mode
US11374856B1 (en) System and method for performing synchronization of maximum transmission unit with router redundancy
WO2021103822A1 (zh) 用于获取共用最大分段大小mss的方法及装置
US20230370938A1 (en) Traffic sending method, apparatus, and system, and storage medium
Xu et al. Optimal Service Function Chain Placement Modeling for Minimizing Setup and Operation Cost
US20190222468A1 (en) Remote in-band management of a network interface controller

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: 17819041

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: 17819041

Country of ref document: EP

Kind code of ref document: A1