CN108259217B - Equipment upgrading method and device - Google Patents

Equipment upgrading method and device Download PDF

Info

Publication number
CN108259217B
CN108259217B CN201710918999.1A CN201710918999A CN108259217B CN 108259217 B CN108259217 B CN 108259217B CN 201710918999 A CN201710918999 A CN 201710918999A CN 108259217 B CN108259217 B CN 108259217B
Authority
CN
China
Prior art keywords
forwarding table
forwarding
slave
equipment
master
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.)
Active
Application number
CN201710918999.1A
Other languages
Chinese (zh)
Other versions
CN108259217A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710918999.1A priority Critical patent/CN108259217B/en
Publication of CN108259217A publication Critical patent/CN108259217A/en
Application granted granted Critical
Publication of CN108259217B publication Critical patent/CN108259217B/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
    • 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
    • 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/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Abstract

The application provides a device upgrading method and a device, and the method can comprise the following steps: when the member equipment is the main equipment, finding a first forwarding table item associated with the slave equipment to be upgraded in all local forwarding table items, and setting the first forwarding table item to be forbidden to be used and deleted; receiving a synchronization request sent by the slave equipment after upgrading is completed, eliminating the setting of forbidding use and deletion of the first forwarding table entry, and synchronizing the first forwarding table entry without the setting and all other forwarding table entries recorded locally to the slave equipment; and after all the forwarding table entries recorded locally are successfully synchronized to the slave equipment, the equipment is switched from the master equipment to the slave equipment, and upgrading is carried out. By using the method provided by the application, the time for cutting off the flow is reduced while the upgrading time for upgrading the equipment in the IRF is not increased.

Description

Equipment upgrading method and device
Technical Field
The present application relates to the field of computer communications, and in particular, to a device upgrading method and apparatus.
Background
The core idea of the IRF (Intelligent Resilient Framework) is to connect multiple devices together through stacked links, and virtualize the devices into one virtual device after necessary configuration. The virtualization technology can be used for integrating hardware resources and software processing capacity of a plurality of devices, and realizing cooperative work, unified management and uninterrupted maintenance of the plurality of devices.
In the IRF, equal-cost multipath load sharing is generally formed for the master and slave devices in the IRF. During the upgrade of the slave device, the forwarding path is switched to the master device. When the slave device is upgraded, the slave device needs to wait for a set time period. Within a set time length from the time when the upgrading of the slave device is completed, the master device needs to learn a new route corresponding to an interface of the slave device after the upgrading of the slave device is completed, and generate a forwarding table entry of the learned new route. The master device may send all forwarding entries on the master device down to the slave device. After a preset time period, the master and slave devices execute master-slave switching. After switching, the original slave device is used for guiding message forwarding, and the original master device is upgraded.
However, the set time duration is usually set manually, and when the set time duration is too short, the master device does not learn all new routes, and does not synchronize all new route-generated forwarding entries to the slave device, and role switching between the master device and the slave device is performed, so that all forwarding entries corresponding to the slave device interfaces are not received by the switched original slave device, and meanwhile, the switched original master device is upgraded, so that part of the traffic paths are obstructed, and thus a flow break is caused. When the set time length is too long, the whole upgrading time is prolonged.
Disclosure of Invention
In view of this, the present application provides a device upgrading method and apparatus, so as to reduce the time for cutting off the flow while not increasing the upgrading time of the device upgrading in the IRF.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, there is provided a device upgrade method applied to a member device of the intelligent resilient framework IRF, the method including:
when the member equipment is the main equipment, finding a first forwarding table item associated with the slave equipment to be upgraded in all local forwarding table items, and setting the first forwarding table item to be forbidden to be used and deleted;
receiving a synchronization request sent by the slave equipment after upgrading is completed, eliminating the setting of forbidding use and deletion of the first forwarding table entry, and synchronizing the first forwarding table entry without the setting and all other forwarding table entries recorded locally to the slave equipment;
and after all the forwarding table entries recorded locally are successfully synchronized to the slave equipment, the equipment is switched from the master equipment to the slave equipment, and upgrading is carried out.
Optionally, the finding of the first forwarding table entry associated with the slave device to be upgraded in all local forwarding table entries includes:
determining an interface and a next hop corresponding to the equipment identifier of the slave equipment according to a preset corresponding relation between the equipment identifier and the interface and the next hop;
and searching forwarding table entries containing the keywords in all local forwarding table entries by taking the determined interface and the next hop as the keywords, and determining the searched forwarding table entries as the first forwarding table entries.
Optionally, after the device is upgraded, the method further includes:
sending a synchronization request to the master device after master-slave switching;
receiving a synchronous forwarding table entry of the master equipment after the master-slave switching; the received forwarding table entry includes a second forwarding table entry associated with the device.
Optionally, the received second forwarding table entry is provided with an aging flag;
the method further comprises the following steps:
when the route is learned, checking whether a second forwarding table item matched with the route exists locally;
if not, adding a forwarding table item matched with the route in the local area;
and if so, deleting the aging mark of the second forwarding table entry.
Optionally, the method further comprises:
detecting whether the time length of the second forwarding table entry provided with the aging mark locally recorded exceeds a preset time length; and if so, deleting the second forwarding table entry provided with the aging mark.
According to a second aspect of the present application, there is provided a device upgrade apparatus, which is applied to a member device of the intelligent resilient framework IRF, the apparatus including:
a setting unit, configured to find a first forwarding entry associated with a slave device to be upgraded in all local forwarding entries when the member device is a master device, and set the first forwarding entry to be prohibited from being used and deleted;
a synchronization unit, configured to receive a synchronization request sent after the slave device completes upgrading, eliminate the setting of prohibiting use and deletion of the first forwarding entry, and synchronize the first forwarding entry without the setting and all other forwarding entries recorded locally to the slave device;
and the switching and upgrading unit is used for switching the equipment from the main equipment to the slave equipment and executing upgrading after all the forwarding table entries recorded locally are successfully synchronized to the slave equipment.
Optionally, the setting unit is further configured to determine an interface and a next hop corresponding to the device identifier of the slave device according to a preset correspondence between the device identifier and the interface and the next hop; and searching forwarding table entries containing the keywords in all local forwarding table entries by taking the determined interface and the next hop as the keywords, and determining the searched forwarding table entries as the first forwarding table entries.
Optionally, the apparatus further comprises:
the acquisition unit is used for sending a synchronization request to the master equipment after master-slave switching; receiving the synchronous forwarding table item of the main equipment after the main equipment and the slave equipment are switched; the received forwarding table entry includes a second forwarding table entry associated with the device.
Optionally, the received second forwarding table entry is provided with an aging flag;
the apparatus further comprises:
an updating unit, configured to check whether a local forwarding table entry exists in a second forwarding table entry matched to the route when the route is learned; if not, adding a forwarding table item matched with the route in the local area; and if so, deleting the aging mark of the second forwarding table entry.
Optionally, the apparatus further comprises: a deleting unit, configured to detect whether a duration locally recorded by the second forwarding entry provided with the aging flag exceeds a preset duration; and if so, deleting the second forwarding table entry provided with the aging mark.
In the present application, the master device may determine a first forwarding table entry associated with the slave device to be upgraded. After the upgrading of the slave device is completed, the master device may synchronize all forwarding entries including the first forwarding entry, which are locally recorded, to the slave device. After synchronization is completed, the master and slave devices can perform master and slave role switching. After the switching, the original master device executes upgrading, and the original slave device performs message forwarding based on the first forwarding table entry.
On one hand, after the original slave device is switched to the master device, all the outgoing interfaces are the first forwarding table entries of the slave device interface, so that all the traffic flowing through the slave device can be forwarded, thereby reducing the cut-off. On the other hand, the time required for the original master device to synchronize all the forwarding table entries to the original slave device is much shorter than the set time length (the time length for the original master device to learn the route, generate the forwarding table entries according to the learned route, and issue the forwarding table entries to the slave device), so the upgrade time of the devices in the IRF can be greatly shortened.
Therefore, the method provided by the application can realize the smooth transition of the upgrade of the slave equipment and the guidance of message forwarding of the original master equipment and the original slave equipment after the master equipment and the slave equipment execute the master role switching and the slave role switching.
Drawings
FIG. 1 is an exemplary diagram of an IRF shown in an exemplary embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for upgrading a device according to an exemplary embodiment of the present application;
fig. 3 is a flowchart illustrating an upgrading method after a master device is switched to a slave device in an IRF according to an exemplary embodiment of the present application;
fig. 4 is a hardware structure diagram of a member device where a device upgrading apparatus is located according to an exemplary embodiment of the present application;
fig. 5 is a block diagram illustrating an apparatus upgrading device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Each member device in the IRF may be called a member device, and the member devices may be divided into two roles, i.e., a master device and a slave device, according to different functions. The master is responsible for managing the entire IRF. The slave device may operate as a backup device to the master device. When the master equipment fails, the IRF system can automatically select a new master equipment from the slave equipment to take over the original master equipment.
Equal cost multi-path load sharing can be formed on the master and slave devices of the IRF. In the IRF, the master device may learn a route based on a route advertisement sent by the neighbor device, generate a forwarding table based on the learned route, and send the forwarding table to the slave device.
However, during the upgrade process of the slave device, the slave device deletes all forwarding entries on the slave device. And in the process of upgrading the slave device, and because the slave device is being upgraded, the master device does not learn the route corresponding to the slave device interface, and the forwarding table entry and the routing table entry of which the output interface on the master device is the slave device interface are deleted.
When the slave device is upgraded, the slave device needs to wait for a set time period.
Within a set time length from when the upgrading of the slave device is completed, the master device may newly learn a route corresponding to an interface of the slave device, and generate a forwarding table entry of the route corresponding to the interface of the slave device (an outgoing interface of the forwarding table entry is the slave device interface). The master device may send all forwarding entries of the local record, including the forwarding entry of which the output interface is the slave device interface, to the slave device, so that the slave device may use the output interface to direct the packet forwarding for the forwarding entry of the slave device interface.
And after the set time length from the time when the upgrading of the slave equipment is completed, the master equipment and the slave equipment complete the switching of the master role and the slave role. After switching, the original slave device becomes the master device in the current IRF to participate in message forwarding, and the original master device becomes the slave device in the current IRF to execute upgrading.
However, the set time duration is usually set manually, and when the set time duration is set to be too short, the master device does not learn all routes corresponding to the slave device interfaces, and the master device does not issue all forwarding entries of which the outgoing interfaces are the slave device interfaces to the slave device, so that only the forwarding entries of part of paths exist on the slave device. And after the master device and the slave device execute master and slave role switching, the original slave device is used for guiding message forwarding, and the original master device is used for upgrading. At this time, the original slave device only has forwarding entries of part of paths, which results in the disconnection of part of traffic paths and causes the interruption of traffic. When the set time length is too long, the whole upgrading time is prolonged.
For example, as shown in fig. 1, fig. 1 is an exemplary diagram of an IRF shown in an exemplary embodiment of the present application;
assume that the three-tier switches 1 and 2 in fig. 1 are combined into one IRF virtual appliance. The three-layer switch 1 is a master device, and the three-layer switch 2 is a slave device. Equal cost multi-path load sharing may be formed on the three-tier switch 1 and the three-tier switch 2. Taking the downstream traffic as an example, path 1 and path 2 as shown in fig. 1 may be formed.
During the upgrade of the three-layer switch 2, the three-layer switch 1 directs the forwarding of the message (the message is forwarded through the path 1), the forwarding table entries and routing table entries of the interfaces on the three-layer switch 2, such as the interface 4 and the interface 2, recorded on the three-layer switch 1 are deleted, and the three-layer switch 1 cannot learn the routes corresponding to the interfaces on the three-layer switch 2, such as the interface 4 and the interface 2, because the three-layer switch 2 is upgraded.
When the upgrade of the three-layer switch 2 is completed, the three-layer switch 2 needs to wait for a set time period. Within a set time length from the time when the three-layer switch 2 is upgraded, since the three-layer switch 2 completes the upgrade, the three-layer switch 1 can learn that the outgoing interface is the route of the interface on the three-layer switch 2 such as the interface 4 and the interface 2, and generate the forwarding table entry of the interface on the three-layer switch 2 such as the interface 4 and the interface 2. The three-layer switch 1 may issue all the forwarding entries of the local record, including the forwarding entries of the interfaces on the three-layer switch 2, such as the interface 4 and the interface 2, to the three-layer switch 2, so that the three-layer switch 2 may instruct the packet forwarding by using the issued forwarding entries.
After a set time period from when the upgrade of the three-layer switch 2 is completed, the three-layer switch 1 is switched to the slave device and performs the upgrade, and the three-layer switch 2 is switched to the master device.
However, the set time duration is usually set manually, and when the set time duration is too short, the three-layer switch 1 does not learn all new routes corresponding to the interfaces (such as the interfaces 4 and 2) of the three-layer switch 2, and the three-layer switch 1 does not issue all forwarding entries of which the outgoing interfaces are the interfaces of the three-layer switch 2 to the slave device, so that only part of the forwarding entries of the paths exist on the three-layer switch 2. When the three-layer switch 1 is switched to the slave device and the three-layer switch 2 is switched to the master device, the three-layer switch 2 is used for guiding message forwarding, and the three-layer switch 1 is used for upgrading. At this time, the three-layer switch 2 only has forwarding entries of part of the paths, so that part of the traffic paths are blocked, and thus, the flow is cut off. When the preset time period is too long, the whole upgrading time is prolonged.
In view of the above, in the present application, the master device may determine a first forwarding table entry associated with the slave device to be upgraded. After the upgrading of the slave device is completed, the master device may synchronize all forwarding entries including the first forwarding entry, which are locally recorded, to the slave device. After synchronization is completed, the master and slave devices can perform master and slave role switching. After the switching, the original master device executes upgrading, and the original slave device performs message forwarding based on the first forwarding table entry.
On one hand, after the original slave device is switched to the master device, all the outgoing interfaces are the first forwarding table entries of the slave device interface, so that all the traffic flowing through the original slave device can be forwarded, thereby reducing the cut-off. On the other hand, the time required for the original master device to synchronize all the forwarding table entries to the original slave device is much shorter than the set time length (the time length for the original master device to learn the route, generate the forwarding table entries according to the learned route, and issue the forwarding table entries to the slave device), so the upgrade time of the devices in the IRF can be greatly shortened.
Therefore, the method provided by the application can realize the smooth transition of the upgrade of the slave equipment and the guidance of message forwarding of the original master equipment and the original slave equipment after the master equipment and the slave equipment execute the master role switching and the slave role switching.
Referring to fig. 2, fig. 2 is a flow chart illustrating a method for upgrading a device according to an exemplary embodiment of the present application; the method may include the following steps.
Step 201: and the slave equipment sends a notification message to the master equipment, wherein the notification message is used for indicating that the equipment is the slave equipment to be upgraded.
Step 202: the main equipment finds a first forwarding table entry associated with the slave equipment to be upgraded in all local forwarding table entries, and sets the first forwarding table entry to be forbidden to be used and deleted.
In the embodiment of the application, after the slave device receives the upgrading instruction, the slave device can start the software package to execute upgrading. Meanwhile, the slave device may send a notification message to the master device, where the notification message carries device information of the slave device, such as an IP address and a device identifier of the slave device. After receiving the notification message, the master device may determine that the slave device sending the notification message is the slave device to be upgraded.
The master device may find a first forwarding table entry associated with the slave device to be upgraded in all local forwarding table entries.
In an alternative implementation, the first forwarding table entry associated with the slave device may be understood as a forwarding table entry of an interface on the slave device, where the outbound interface is an interface on the slave device.
The main device records the corresponding relationship between the device identification of the member device in the IRF and the interface and the next hop.
After receiving the notification message, the master device may obtain the slave device identifier from the notification message. And then searching an interface and a next hop which are matched with the slave equipment identification in the corresponding relation. Then, the main device may use the found interface and next hop as keywords, search for a forwarding table entry containing the keyword from all local forwarding table entries, and determine the found forwarding table entry as a first forwarding table entry.
After the primary device finds the first forwarding table entry, the primary device may set the first forwarding table entry to be prohibited from being used and deleted.
In an optional implementation manner, after determining the first forwarding entry, the main device may add a first tag to the first forwarding entry, where the forwarding entry added with the first tag is prohibited from being used for forwarding the packet and is prohibited from being deleted.
It should be noted that the first forwarding table entry is not used for forwarding a packet, so as to prevent the master device from forwarding traffic to the upgrading slave device, which results in traffic being discarded and causing a flow break; the reason why the first forwarding table entry is prohibited from being deleted is that after the slave device is upgraded, all forwarding table entries corresponding to the interface of the slave device can be acquired from the master device, so that the upgraded slave device does not cut off a flow when the message is directed to be forwarded. The first forwarding table entry remains undeleted during the slave upgrade even if the route changes.
Step 203: and after the upgrading is completed, the slave equipment sends a synchronization request to the master equipment.
Step 204: and the master equipment receives the synchronization request sent after the upgrading of the slave equipment is completed, eliminates the setting of forbidding use and deletion of the first forwarding table entry, and synchronizes the first forwarding table entry without the setting and all other forwarding table entries recorded locally to the slave equipment.
Step 205: and after the main equipment successfully synchronizes all the forwarding table entries recorded locally to the slave equipment, the main equipment switches the local equipment from the main equipment to the slave equipment and performs upgrading.
In this embodiment of the present application, after the upgrade of the slave device is completed, the slave device may send a synchronization request to the master device.
After receiving the synchronization request, the master device may eliminate the setting of prohibiting use and deletion of the first forwarding table entry.
In an optional implementation manner, after receiving the synchronization request sent by the slave device, the master device may modify the first flag on the first forwarding entry into a second flag, where the first forwarding entry added with the second flag can be used to participate in packet forwarding and may be deleted.
It should be noted that the first forwarding table entry added with the second mark may be used for message forwarding, so that after the slave device receives the first forwarding table entry with the second mark synchronized by the master device, the slave device may directly use the first forwarding table entry to guide message forwarding. The first forwarding table entry with the second flag added thereto may be deleted in order to update the forwarding table entry after the device learns a new route from the route advertisement of the neighboring device. Wherein the second mark may also be referred to as an aging mark.
The master device may synchronize the first forwarding entry from which the setting is removed and all other forwarding entries of the local record to the slave device, and send a synchronization end message to the slave device after synchronizing the first forwarding entry and all other forwarding entries of the local record to the slave device.
The slave device may transmit a response message to the synchronization end message to the master device after receiving the synchronization end message. After receiving the response message, the master device can switch the device from the master device to the slave device, and simultaneously inform the upgraded slave device to switch to the master device.
When there are a plurality of slave devices to be upgraded, the master device may switch the present device to the slave device after receiving the response message of the synchronization end message sent by all the upgraded slave devices, and perform the upgrade after the switching. Meanwhile, the master device may select an upgraded slave device according to the priority of the slave device and notify the selected slave device of upgrading to the master device, or designate an upgraded slave device and notify the designated slave device of switching to the master device, which is not specifically limited herein.
Step 206: when the original slave device learns the route, the original slave device executes the operations of updating, deleting and adding the local forwarding table entry.
For clarity of description, the original slave device that is the master device in the current IRF after performing the master-slave switching is referred to as an original slave device.
In this embodiment of the present application, the second forwarding entry is provided with an aging flag, for example, the second flag described above. The second label is described herein as an aging label.
After the original slave device receives the route advertisement sent by the neighbor device, the original slave device can learn the route according to the route advertisement.
The original slave device may check whether a second forwarding table item matching the route exists locally, and if the second forwarding table item matching the route does not exist locally, the original slave device may add a second forwarding table item matching the route in the local forwarding table items. If a second forwarding entry matching the route exists locally, the second marker (aging marker) on the second forwarding entry may be deleted.
In the embodiment of the application, the original slave device may detect whether the time length of a second forwarding entry provided with a second mark locally recorded exceeds a preset time length; and if so, deleting the second forwarding table entry provided with the second mark.
In implementation, the original slave device may start a timer when the original slave device is upgraded, and delete the locally recorded forwarding table entry carrying the second tag after a preset time duration.
The upgrade performed after the master device is switched to the slave device and the operation after the upgrade are described in detail below.
Referring to fig. 3, fig. 3 is a flowchart illustrating an upgrading method after a master device is switched to a slave device in an IRF according to an exemplary embodiment of the present application. The process may include the following steps.
For clarity of description, the master device whose role is switched to the slave device is referred to as the original master device, and the upgraded slave device whose role is switched to the master device is referred to as the original slave device.
Step 301: the original master device sends a notification message to the original slave device;
step 302: after receiving the notification message, the original slave device may find a second forwarding table associated with the original master device from all local forwarding tables, and set the second forwarding table to be prohibited from being used and deleted.
In the embodiment of the application, when the original main device executes the upgrade, the original main device can start the software package to execute the upgrade. Meanwhile, the original master device may send a notification message to the original slave device, where the notification message carries device information of the original master device, such as an IP address and a device identifier of the original master device. Wherein the notification message is functionally similar to the notification message described above, except that for ease of description, the slave device is sent to the master device
After the original slave device receives the notification message, the original slave device may find a second forwarding table entry associated with the original master device from all local forwarding table entries.
In an alternative implementation, the second forwarding table entry associated with the original host device may be understood as a forwarding table entry of an interface on the original host device as the outgoing interface.
The original slave device records the corresponding relationship between the device identifier of the member device in the IRF and the interface and the next hop.
After receiving the notification message, the original slave device may obtain the original master device identifier from the notification message. Then, in the corresponding relation, the interface and the next hop which are matched with the original main equipment identification are searched. Then, the original slave device may use the found interface and next hop as keywords, search for a forwarding table entry containing the keyword from all local forwarding table entries, and determine the found forwarding table entry as a second forwarding table entry.
After the original slave device finds the second forwarding table entry, the original slave device may set the second forwarding table entry to prohibit use and deletion.
In an optional implementation manner, after determining the second forwarding table entry, the original slave device may add a first tag to the second forwarding table entry, and the forwarding table entry added with the first tag is prohibited from being used for forwarding the packet and is prohibited from being deleted.
Step 303: after the original master equipment finishes upgrading, a synchronization request is sent to the original slave equipment;
step 304: after receiving the synchronization request sent after the upgrading of the slave device, the original slave device eliminates the setting of forbidding use and deletion of the second forwarding table entry, and synchronizes the second forwarding table entry without the setting and all other forwarding table entries recorded locally to the original master device.
In this embodiment of the present application, after the original master device is upgraded, the original master device may send a synchronization request to the original slave device.
After the original slave device receives the synchronization request, the setting that the second forwarding table entry is forbidden to use and delete can be eliminated.
In an optional implementation manner, after receiving the synchronization request sent by the original master device, the original slave device may modify the first tag on the second forwarding entry into a second tag, where the second forwarding entry added with the second tag can be used to participate in packet forwarding and may be deleted.
The original slave device may synchronize the second forwarding table entry from which the setting is removed and all other forwarding table entries of the local record to the original master device, and send a synchronization end message to the original master device after synchronizing the second forwarding table entry and all other forwarding table entries of the local record to the original master device.
After receiving the synchronization end message, the original master device may send a response message for the synchronization end message to the original slave device.
After the original slave device receives the response message, the role of the original slave device can be switched to the slave device according to the strategy configured by the developer, and the original master device after being upgraded is informed to be switched to the master device. Of course, the original slave device and the original master device may not switch the master and slave roles.
Step 305: the original master device may perform update, add, and delete operations on the local record forwarding entry based on the route learned by the current master device in the IRF.
The original master device may detect whether a second forwarding table item matching the route exists locally based on the route learned by the current master device in the IRF. If so, the original master device may delete the second identifier on the second forwarding entry matching the route. If not, the original master device can locally add a forwarding table entry matched with the route.
In addition, the original main device may further start a timer from the time when the original main device completes upgrading, and after a preset time duration, the original main device may delete the second forwarding table entry still marked with the second mark.
The above description of the upgrade of the member devices in the IRF is completed.
In the present application, the master device may determine a first forwarding table entry associated with the slave device to be upgraded. After the upgrading of the slave device is completed, the master device may synchronize all forwarding entries including the first forwarding entry, which are locally recorded, to the slave device. After synchronization is completed, the master and slave devices can perform master and slave role switching. After the switching, the original master device executes upgrading, and the original slave device performs message forwarding based on the first forwarding table entry.
On one hand, after the original slave device is switched to the master device, all the outgoing interfaces are the first forwarding table entries of the slave device interface, so that all the traffic flowing through the slave device can be forwarded, thereby reducing the cut-off. On the other hand, the time required for the original master device to synchronize all the forwarding table entries to the original slave device is much shorter than the set time length (the time length for the original master device to learn the route, generate the forwarding table entries according to the learned route, and issue the forwarding table entries to the slave device), so the upgrade time of the devices in the IRF can be greatly shortened.
Therefore, the method provided by the application can realize the smooth transition of the upgrade of the slave equipment and the guidance of message forwarding of the original master equipment and the original slave equipment after the master equipment and the slave equipment execute the master role switching and the slave role switching.
The method for upgrading the device is described in detail with reference to fig. 1 by using a specific example.
Assume that the three-tier switches 1 and 2 in fig. 1 are combined into one IRF virtual appliance. The three-layer switch 1 is a master device, and the three-layer switch 2 is a slave device. Equal cost multi-path load sharing may be formed on the three-tier switch 1 and the three-tier switch 2. Taking the downstream traffic as an example, path 1 and path 2 as shown in fig. 1 may be formed.
After the three-layer switch 2 receives the upgrade instruction, the three-layer switch 2 may start the software package to perform the upgrade. Further, the three-tier switch 2 may also send a notification message to the three-tier switch 1.
After receiving the notification message sent by the three-layer switch 2, the three-layer switch 1 may obtain the device identifier of the three-layer switch 2 carried in the notification message. The device information of the three-layer switch 2 may report the IP address, the device number, and the like of the three-layer switch 2.
In general, the correspondence between the device identifiers of the member devices in the IRF and the interfaces and the next hops is recorded in the three-layer switch 1.
After the three-layer switch 1 receives the notification message sent by the three-layer switch 2, the three-layer switch 1 may search for the interface and the next hop that are matched with the device identifier of the three-layer switch 2 in the correspondence. Then, the three-layer switch 1 may use the found interface and next hop as keywords, search for a forwarding table entry including the keyword from all local forwarding table entries, and determine the found forwarding table entry as the first forwarding table entry. The three-layer switch 1 may add a first tag to the found first forwarding entry, and the forwarding entry added with the first tag is prohibited from being used for forwarding the packet and is prohibited from being deleted.
After the three-tier switch 2 completes the upgrade, the three-tier switch 2 may send a synchronization request message to the three-tier switch 1. After receiving the synchronization request message sent by the three-layer switch 2, the three-layer switch 1 may modify the first flag of the first forwarding table entry into a second flag. The first forwarding table entry with the second flag added thereto may be used for packet forwarding and may be deleted. After the modification is completed, the three-layer switch 1 may send all the forwarding table entries including the first forwarding table entry added with the second flag, which are locally recorded, to the three-layer switch 2, and send a synchronization end message to the three-layer switch 2 after all the forwarding table entries are synchronized.
The three-tier switch 2 may receive the three-tier switch 1 and synchronize all of the forwarding entries. After receiving the synchronization end message sent by the three-layer switch 1, the three-layer switch 2 may return a response message to the synchronization end message to the three-layer switch 1. After receiving the response message sent by the three-layer switch 2, the three-layer switch 1 can switch the role of the device from the master device to the slave device, execute the upgrade after the role is switched, and indicate the slave device which finishes the upgrade to be switched to the master device.
When there are a plurality of slave devices to be upgraded, the three-layer switch 1 may switch the device from the master device to the slave device after receiving the response message of the synchronization end message sent by all the upgraded slave devices, and perform the upgrade after the switching. Meanwhile, the three-layer switch 1 may select an upgraded slave device to be switched to the master device according to the priority of the slave device, or designate an upgraded slave device to be switched to the master device, which is not specifically limited herein.
Assume here that three-tier switch 1 instructs three-tier switch 2 to switch roles to master.
After the three-layer switch 2 receives the route advertisement sent by the neighbor device, the three-layer switch 2 can learn the route according to the route advertisement. The three-tier switch 2 may check whether a second forwarding entry matching the learned route exists locally.
If yes, deleting a second mark on a second forwarding table item matched with the route;
and if not, adding the forwarding table item matched with the route.
In addition, the three-layer switch 2 may also start a timer from the time when the slave device is upgraded, and after a preset time period, the three-layer switch 2 may delete the first forwarding table entry still marked with the second mark.
The upgrade is performed for the three-layer switch 1 and the procedure after the upgrade can be described as follows.
In the embodiment of the present application, the three-tier switch 1 may initiate a software package to perform the upgrade. Meanwhile, the three-layer switch 1 may send a notification message to the three-layer switch 2, where the notification message carries the device identifier of the three-layer switch 1.
In general, the correspondence between the device identifiers of the member devices in the IRF and the interfaces and the next hops is recorded in the three-layer switch 2.
After the three-layer switch 2 receives the notification message sent by the three-layer switch 1, the three-layer switch 2 may search for an interface and a next hop that are matched with the device identifier of the three-layer switch 1 in the correspondence. Then, the three-layer switch 2 may use the found interface and next hop as keywords, search for a forwarding table entry including the keyword from all local forwarding table entries, and determine the found forwarding table entry as a second forwarding table entry. Three-tier switch 2 may add a first tag to the second forwarding entry. And the second forwarding table entry added with the first mark is forbidden to be used for message forwarding and deletion.
After the three-tier switch 1 completes the upgrade, the three-tier switch 1 may send a synchronization request message to the three-tier switch 2. After receiving the synchronization request message sent by the third-layer switch 1, the third-layer switch 2 may modify the first tag of the second forwarding entry into a second tag. The second forwarding table entry with the second label added thereto may be used for packet forwarding and may be deleted. After the modification is completed, the three-layer switch 2 may send all the forwarding entries including the second forwarding entry added with the second tag, which are locally recorded, to the three-layer switch 1, and send a synchronization completion message to the three-layer switch 1 after all the forwarding entries are synchronized.
The three-tier switch 1 may receive all forwarding entries synchronized by the three-tier switch 2. After receiving the synchronization end message sent by the three-layer switch 2, the three-layer switch 1 may return a response message to the synchronization end message to the three-layer switch 2. After receiving the response message sent by the three-layer switch 1, the three-layer switch 2 can switch the role of the device from the master device to the slave device according to the strategy configured by the developer, and simultaneously inform the upgraded original master device of switching to the master device. Of course, the original slave device and the original master device may not perform role switching.
In addition, the three-layer switch 1 may detect whether a second forwarding table entry matching the route exists locally based on the route learned by the current master device in the IRF. If so, the third layer switch 1 may delete the second identifier on the second forwarding entry matching the route. If not, the three-layer switch 1 can locally add a forwarding table entry matched with the route.
In addition, the three-layer switch 1 may also start a timer from the time when the upgrade of the device is completed, and after a preset time period, the three-layer switch 1 may delete the second forwarding table entry still marked with the second mark.
Corresponding to the embodiment of the device upgrading method, the application also provides an embodiment of a device upgrading device.
The embodiment of the device upgrading device can be applied to member devices. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading a corresponding computer program instruction in the nonvolatile memory into the memory by the processor of the member device where the device is located to operate. From a hardware aspect, as shown in fig. 4, a hardware structure diagram of a member device where the device upgrade apparatus of the present application is located is shown, where in addition to the processor, the memory, the network output interface, and the nonvolatile memory shown in fig. 4, the member device where the apparatus is located in the embodiment may also include other hardware generally according to the actual function of the member device, and details of this are not repeated.
Referring to fig. 5, fig. 5 is a block diagram of an apparatus upgrading device according to an exemplary embodiment of the present application. The device upgrading apparatus may include:
a setting unit 501, configured to find a first forwarding entry associated with a slave device to be upgraded in all local forwarding entries when the member device is a master device, and set the first forwarding entry to be prohibited from being used and deleted;
a synchronizing unit 502, configured to receive a synchronization request sent after the slave device completes upgrading, eliminate the setting of prohibiting use and deletion of the first forwarding entry, and synchronize the first forwarding entry without the setting and all other forwarding entries recorded locally to the slave device;
a switching upgrade unit 503, configured to switch the local device from the master device to the slave device and perform upgrade after all forwarding entries recorded locally are successfully synchronized to the slave device.
Optionally, the setting unit 501 is further configured to determine an interface and a next hop corresponding to the device identifier of the slave device according to a preset correspondence between the device identifier and the interface and the next hop; and searching forwarding table entries containing the keywords in all local forwarding table entries by taking the determined interface and the next hop as the keywords, and determining the searched forwarding table entries as the first forwarding table entries.
Optionally, the apparatus further comprises:
an obtaining unit 504, configured to send a synchronization request to a master device after master-slave switching; receiving the synchronous forwarding table item of the main equipment after the main equipment and the slave equipment are switched; the received forwarding table entry includes a second forwarding table entry associated with the device.
Optionally, the received second forwarding table entry is provided with an aging flag;
the apparatus further comprises:
an updating unit 505, configured to check whether a local forwarding table entry exists in the second forwarding table entry matched to the route when the route is learned; if not, adding a forwarding table item matched with the route in the local area; and if so, deleting the aging mark of the second forwarding table entry.
Optionally, the apparatus further comprises: a deleting unit 506, configured to detect whether a duration locally recorded by the second forwarding entry provided with the aging flag exceeds a preset duration; and if so, deleting the second forwarding table entry provided with the aging mark.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A device upgrading method is applied to member devices of an Intelligent Resilient Framework (IRF), and comprises the following steps:
when the member equipment is the main equipment, finding a first forwarding table item associated with the slave equipment to be upgraded in all local forwarding table items, and setting the first forwarding table item to be forbidden to be used and deleted;
receiving a synchronization request sent by the slave equipment after upgrading is completed, eliminating the setting of forbidding use and deletion of the first forwarding table entry, and synchronizing the first forwarding table entry without the setting and all other forwarding table entries recorded locally to the slave equipment;
after all the forwarding table entries recorded locally are successfully synchronized to the slave equipment, the equipment is switched from the master equipment to the slave equipment, and upgrading is carried out;
wherein, the finding of the first forwarding table entry associated with the slave device to be upgraded in all local forwarding table entries includes:
determining an interface and a next hop corresponding to the equipment identifier of the slave equipment according to a preset corresponding relation between the equipment identifier and the interface and the next hop;
and searching forwarding table entries containing the keywords in all local forwarding table entries by taking the determined interface and the next hop as the keywords, and determining the searched forwarding table entries as the first forwarding table entries.
2. The method of claim 1, wherein after the upgrading of the device is completed, the method further comprises:
sending a synchronization request to the master device after master-slave switching;
receiving a synchronous forwarding table entry of the master equipment after the master-slave switching; the received forwarding table entry includes a second forwarding table entry associated with the device.
3. The method of claim 2, wherein the received second forwarding entry is provided with an aging flag;
the method further comprises the following steps:
when the route is learned, whether a second forwarding table item matched with the route exists locally is checked;
if not, adding a forwarding table item matched with the route in the local area;
and if so, deleting the aging mark of the second forwarding table entry.
4. The method of claim 3, further comprising:
detecting whether the time length of the second forwarding table entry provided with the aging mark locally recorded exceeds a preset time length;
and if so, deleting the second forwarding table entry provided with the aging mark.
5. An apparatus upgrading device, applied to member devices of an Intelligent Resilient Framework (IRF), the apparatus comprising:
a setting unit, configured to find a first forwarding entry associated with a slave device to be upgraded in all local forwarding entries when the member device is a master device, and set the first forwarding entry to be prohibited from being used and deleted;
a synchronization unit, configured to receive a synchronization request sent after the slave device completes upgrading, eliminate the setting of prohibiting use and deletion of the first forwarding entry, and synchronize the first forwarding entry without the setting and all other forwarding entries recorded locally to the slave device;
a switching upgrade unit, configured to switch the local device from the master device to the slave device and perform upgrade after all forwarding entries recorded locally are successfully synchronized to the slave device;
the setting unit is further configured to determine an interface and a next hop corresponding to the device identifier of the slave device according to a preset correspondence between the device identifier and the interface and the next hop; and searching forwarding table entries containing the keywords in all local forwarding table entries by taking the determined interface and the next hop as the keywords, and determining the searched forwarding table entries as the first forwarding table entries.
6. The apparatus of claim 5, further comprising:
the acquisition unit is used for sending a synchronization request to the master equipment after master-slave switching; receiving the synchronous forwarding table item of the main equipment after the main equipment and the slave equipment are switched; the received forwarding table entry includes a second forwarding table entry associated with the device.
7. The apparatus of claim 6, wherein the received second forwarding entry is provided with an aging flag;
the apparatus further comprises:
an updating unit, configured to check whether a local forwarding table entry exists in a second forwarding table entry matched to the route when the route is learned; if not, adding a forwarding table item matched with the route in the local area; and if so, deleting the aging mark of the second forwarding table entry.
8. The apparatus of claim 7, further comprising: a deleting unit, configured to detect whether a duration locally recorded by the second forwarding entry provided with the aging flag exceeds a preset duration; and if so, deleting the second forwarding table entry provided with the aging mark.
CN201710918999.1A 2017-09-30 2017-09-30 Equipment upgrading method and device Active CN108259217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710918999.1A CN108259217B (en) 2017-09-30 2017-09-30 Equipment upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710918999.1A CN108259217B (en) 2017-09-30 2017-09-30 Equipment upgrading method and device

Publications (2)

Publication Number Publication Date
CN108259217A CN108259217A (en) 2018-07-06
CN108259217B true CN108259217B (en) 2021-05-28

Family

ID=62721238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710918999.1A Active CN108259217B (en) 2017-09-30 2017-09-30 Equipment upgrading method and device

Country Status (1)

Country Link
CN (1) CN108259217B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1933448A (en) * 2006-08-17 2007-03-21 华为技术有限公司 Business fast convergent method and network equipment
CN101136845A (en) * 2006-08-30 2008-03-05 中兴通讯股份有限公司 Multi-protocol routing configuration device and method
CN101465859A (en) * 2009-01-13 2009-06-24 中兴通讯股份有限公司 Method and device for triggering main and standby interface board inverse switch
CN101515891A (en) * 2009-04-02 2009-08-26 杭州华三通信技术有限公司 Method for processing border gateway protocol routing and router
CN102185718A (en) * 2011-05-12 2011-09-14 杭州华三通信技术有限公司 System upgrading method and device
CN106603401A (en) * 2017-02-16 2017-04-26 迈普通信技术股份有限公司 Rapid rerouting method and apparatus thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7962619B2 (en) * 2006-09-29 2011-06-14 Ciena Corporation Methods and systems for extensible markup language control of network equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1933448A (en) * 2006-08-17 2007-03-21 华为技术有限公司 Business fast convergent method and network equipment
CN101136845A (en) * 2006-08-30 2008-03-05 中兴通讯股份有限公司 Multi-protocol routing configuration device and method
CN101465859A (en) * 2009-01-13 2009-06-24 中兴通讯股份有限公司 Method and device for triggering main and standby interface board inverse switch
CN101515891A (en) * 2009-04-02 2009-08-26 杭州华三通信技术有限公司 Method for processing border gateway protocol routing and router
CN102185718A (en) * 2011-05-12 2011-09-14 杭州华三通信技术有限公司 System upgrading method and device
CN106603401A (en) * 2017-02-16 2017-04-26 迈普通信技术股份有限公司 Rapid rerouting method and apparatus thereof

Also Published As

Publication number Publication date
CN108259217A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN108667695B (en) Backup method and device for BRAS transfer control separation
US20170286158A1 (en) Migration Of Virtual Machines
US20120134259A1 (en) Mobile gateways in pool for session resilience
CN109842694B (en) Method for synchronizing MAC addresses, network equipment and computer readable storage medium
CN103516612B (en) Distribution router generates method and the distribution router of route table items
CN101969384B (en) Compatibility judging method, device and network equipment for switching between active and standby main control boards
CN109428740B (en) Method and device for recovering equipment failure
CN102624635A (en) Method and device for realizing graceful restart
CN105162704A (en) Multicast replication method and device in Overlay network
EP2599270B1 (en) A network device and method of routing traffic
CN105472049B (en) CGN backup protection method and device for carrier-grade network address conversion
CN107547283B (en) Management method and device of distributed aggregation group
CN105589744A (en) Virtual machine migration method and apparatus
CN104580472A (en) Flow table item processing method and device
CN104618127A (en) Master and standby storage node switching method and system
CN108540386B (en) Method and device for preventing service flow interruption
CN103532851B (en) Data flow processing method in distributed aggregated link network and device
EP4354825A1 (en) Path protection method, node device, controller, and storage medium
CN108243102B (en) Method for realizing fast rerouting and PE equipment
CN108259217B (en) Equipment upgrading method and device
CN106603401B (en) Fast rerouting method and device
CN106230717B (en) Route obtaining method and device in cluster system
CN103428085A (en) Method and device for rapidly switching RIP (routing information protocol) routings
CN102281158A (en) Line fault processing method and device
CN102594656B (en) A kind of route iteration method and route exchange device

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