CN106130783B - Port fault processing method and device - Google Patents

Port fault processing method and device Download PDF

Info

Publication number
CN106130783B
CN106130783B CN201610570754.XA CN201610570754A CN106130783B CN 106130783 B CN106130783 B CN 106130783B CN 201610570754 A CN201610570754 A CN 201610570754A CN 106130783 B CN106130783 B CN 106130783B
Authority
CN
China
Prior art keywords
port
irf
member device
main
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
CN201610570754.XA
Other languages
Chinese (zh)
Other versions
CN106130783A (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.)
New H3C Information 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 CN201610570754.XA priority Critical patent/CN106130783B/en
Publication of CN106130783A publication Critical patent/CN106130783A/en
Application granted granted Critical
Publication of CN106130783B publication Critical patent/CN106130783B/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/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/065Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis involving logical or physical relationship, e.g. grouping and hierarchies
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults

Abstract

The embodiment of the invention discloses a port fault processing method and a device, wherein the method comprises the following steps: the member equipment in the IRF system sets the IRF port with the fault to be in an invalid state, only allows the IRF port to send a first heartbeat message, and cannot send a data message; when the member device is a slave member device and the IRF port with the fault is a master port, the member device screens the proxy master port to inform the neighbor device to set the port corresponding to the IRF port with the fault as an invalid state, so that the loss of data messages on a fault link is avoided; when the member device receives the identity information of the new main port sent by the main member device, the port corresponding to the new main port is set as the new main port of the member device. Wherein the primary port on the primary member device is a port for maintaining the IRF system stable. Therefore, the main port on the main member device in the IRF system is in an effective state, and the situation of IRF link splitting in the IRF system is reduced.

Description

Port fault processing method and device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for processing a port fault.
Background
An IRF (Intelligent Resilient Framework) system connects a plurality of devices together, and after configuration, virtualizes the devices into one device.
In the star-type IRF system, as shown in fig. 1, each member device may be connected together through a two-layer network to form an IRF link, and may transmit a data packet and an IRF protocol packet at the same time without requiring direct connection of a physical line, where the IRF protocol packet may be a heartbeat packet.
In practical applications, a large amount of data traffic may pass through the IRF links between the member devices in the star-type IRF system, and in order to increase the bandwidth of the IRF links, the member devices are usually connected together through a two-layer network by using a plurality of physical ports (i.e., IRF ports) to form a plurality of available IRF links (e.g., 3 IRF links shown in fig. 2).
In order to load data traffic on each IRF link evenly, a hash algorithm is generally used to share all packets (IRF protocol packets and data packets) on each link. The implementation method has no problem under the condition that the whole network is normal, that is, the star-type IRF system can normally operate, and the message can also be normally forwarded, but if a fault occurs on a certain IRF link (the fault can include the situations that a port is disconnected, the two-layer network part is not communicated and the like), the situation that member equipment at one end of the IRF link considers that the IRF link is intact and continuously sends the message through the IRF link, and member equipment at the other end cannot receive the message due to the fault can occur, so that a large number of messages are discarded, further the IRF link in the IRF system is split, and a large number of services (services communicated through the split IRF link) are not communicated.
As shown in fig. 3, device B-IRF2 has failed to Port2/1 of the two-layer network, but Port1/1 of device a-IRF1 and Port3/1 of device C-IRF3 are still normal, so device a-IRF1 will still send part of the packet from Port1/1 to device B-IRF2, device C-IRF3 will still send part of the packet from Port3/1 to device B-IRF2, and Port2/1 of device B-IRF2 has failed, so that the packets sent by Port1/1 or Port3/1 cannot be received, and these packets will be discarded in the IRF link. This may directly result in the IRF link in the IRF system being split and a large amount of traffic (traffic communicated over the split IRF link) being unavailable.
Disclosure of Invention
The embodiment of the invention discloses a port fault processing method and a port fault processing device, which are used for avoiding the loss of a message on a fault link caused by the fault of an IRF port of member equipment and further reducing the condition of IRF link splitting.
The specific scheme is as follows:
in one aspect, an embodiment of the present invention provides a port fault processing method, which is applied to a member device in an IRF system, and the method includes:
when a first heartbeat message is not received through any IRF port of the member equipment within a preset time length, determining that the port has a fault, and setting the working state of the port from an initial effective state to an invalid state, wherein the IRF port in the effective state allows the first heartbeat message and the data message to be sent; the IRF port in the invalid state only allows to send a first heartbeat message;
when the member device is a slave member device and the port is a master port, selecting one port meeting a first predetermined screening rule from other IRF ports of the member device, and determining the selected port as a proxy master port of the member device, wherein the master port is: the member device is set after receiving a second heartbeat message which is sent by the main member device and informs the main member device that a port corresponding to the port is a main port used for maintaining the stability of the IRF system, and sets other IRF ports as slave ports;
sending a third heartbeat message carrying the working state of the port to all the neighbor devices through the proxy main port, so that the ports corresponding to the ports are set to be in an invalid state after all the neighbor devices receive the third heartbeat message;
when a fourth heartbeat message which is sent by the main member equipment and carries the identity information of the new main port is received, the port corresponding to the new main port is set as the new main port of the main member equipment, wherein the fourth heartbeat message is sent after the main member equipment selects a new main port from other IRF ports of the main member equipment according to a second preset screening rule after receiving the third heartbeat message.
Optionally, selecting one port meeting the first predetermined screening rule from other IRF ports of the member device specifically includes:
and selecting a port with the minimum port number from other IRF ports of the member equipment to obtain the selected port.
Optionally, after determining that the port fails, the method further includes:
when the member device is a main member device and the port is a main port, selecting one port which meets the second preset screening rule from other IRF ports of the member device, and determining the selected port as a new main port of the member device;
and sending a fifth heartbeat message carrying the working state of the port and the identity information of the new main port to all the neighbor devices through the new main port, so that after all the neighbor devices receive the fifth heartbeat message, the port corresponding to the port is set to be in an invalid state, and the port corresponding to the new main port is set to be the main port.
Optionally, after determining that the port fails, the method further includes:
when the member device is a main member device and the port is a main port, selecting a port which accords with a third preset screening rule from other IRF ports of the member device, and determining the selected port as a standby main port of the member device;
sending the third heartbeat message to all the neighbor devices through the alternative main port, so that after all the neighbor devices receive the third heartbeat message, the ports corresponding to the ports are set to be in an invalid state;
selecting one port which accords with the second preset screening rule from other IRF ports of the member equipment, and determining the selected port as a new main port of the member equipment;
and sending a sixth heartbeat message carrying the identity information of the new main port to all the neighbor devices through the new main port, so that all the neighbor member devices set the port corresponding to the new main port as the main port after receiving the sixth heartbeat message.
Optionally, after determining that the port fails, the method further includes:
and when the port is a slave port, sending the third heartbeat message to all neighbor devices through the master port of the member device, so that all the neighbor devices set the port corresponding to the port in an invalid state after receiving the third heartbeat message.
Optionally, the method further includes:
and after receiving the first heartbeat message through the port, restoring the working state of the port to an effective state, and sending the third heartbeat message to all the neighbor devices through the current main port of the member device, so that all the neighbor devices restore the port corresponding to the port to the effective state after receiving the third heartbeat message.
In one aspect, an embodiment of the present invention provides a port fault processing apparatus, which is applied to a member device in an IRF system, and the apparatus includes: the device comprises a first determining module, a first setting module, a first screening module, a second determining module, a first sending module and a second setting module;
the first determining module is configured to determine that a port fails when a first heartbeat packet is not received through any IRF port of the member device within a predetermined time period;
the first setting module is configured to set the working state of the port from an initial valid state to an invalid state when the first determining module determines that the port has a fault, where the IRF port in the valid state allows sending a first heartbeat packet and a data packet; the IRF port in the invalid state only allows to send a first heartbeat message;
the first screening module is configured to select, when the member device is a slave member device and the port is a master port, one port that meets a first predetermined screening rule from other IRF ports of the member device;
the second determining module is configured to determine the selected port as a proxy master port of the member device, where the master port is: the member device is set after receiving a second heartbeat message which is sent by the main member device and informs the main member device that a port corresponding to the port is a main port used for maintaining the stability of the IRF system, and sets other IRF ports as slave ports;
the first sending module is configured to send a third heartbeat packet carrying the working state of the port to all neighboring devices through the proxy master port, so that after receiving the third heartbeat packet, all neighboring devices set the port corresponding to the port to an invalid state;
the second setting module is configured to set, when receiving a fourth heartbeat packet which is sent by a master member device and carries identity information of a new master port, a port corresponding to the new master port as a new master port of the master device, where the fourth heartbeat packet is sent after the master member device receives the third heartbeat packet and selects a new master port from other IRF ports of the master member device according to a second predetermined screening rule.
Optionally, the first screening module is specifically configured to select a port with a smallest port number from other IRF ports of the member device, so as to obtain the selected port.
Optionally, the apparatus further includes a second screening module, a third determining module, and a second sending module;
the second screening module is configured to, after it is determined that the port has a fault, select a port that meets the second predetermined screening rule from other IRF ports of the member device when the member device is a master member device and the port is a master port;
the third determining module is configured to determine the selected port as a new primary port of the member device;
and the second sending module is used for sending a fifth heartbeat message carrying the working state of the port and the identity information of the new main port to all the neighbor devices through the new main port, so that after all the neighbor devices receive the fifth heartbeat message, the port corresponding to the port is set to be in an invalid state, and the port corresponding to the new main port is set to be the main port.
Optionally, the apparatus further comprises: the device comprises a third screening module, a fourth determining module, a third sending module, a fourth screening module, a fifth determining module and a fourth sending module;
the third screening module is configured to, after it is determined that the port has a fault, select a port that meets a third predetermined screening rule from other IRF ports of the member device when the member device is a master member device and the port is a master port;
the fourth determining module is configured to determine the selected port as the alternative primary port of the member device;
the third sending module is configured to send the third heartbeat packet to all neighboring devices through the alternative master port, so that after receiving the third heartbeat packet, all neighboring devices set the ports corresponding to the ports to be in an invalid state;
the fourth screening module is configured to select one port that meets the second predetermined screening rule from other IRF ports of the member device;
the fifth determining module is configured to determine the selected port as a new primary port of the member device;
the fourth sending module is configured to send a sixth heartbeat packet carrying the identity information of the new master port to all neighboring devices through the new master port, so that after receiving the sixth heartbeat packet, all neighboring member devices set a port corresponding to the new master port as the master port.
Optionally, the apparatus further comprises: a fifth sending module;
the fifth sending module is configured to send the third heartbeat packet to all neighboring devices through the master port of the member device when the port is the slave port after determining that the port has a fault, so that all neighboring devices set the port corresponding to the port in an invalid state after receiving the third heartbeat packet.
Optionally, the apparatus further comprises: a recovery sending module;
the recovery sending module is configured to recover the working state of the port to an effective state after receiving the first heartbeat message through the port, and send the third heartbeat message to all neighboring devices through the current master port of the member device, so that all neighboring devices recover the port corresponding to the port to an effective state after receiving the third heartbeat message.
In the scheme, the member equipment in the IRF system sets the IRF port with the fault as an invalid state, so that the IRF port can only send a first heartbeat message and cannot send a data message; further, when the member device is a slave member device and the IRF port with the fault is a master port, the proxy master port is re-screened from other IRF ports of the member device to notify the neighbor device to set the port corresponding to the IRF port with the fault to an invalid state, so that the situation that when the port at one end on the IRF link fails, and the port at the opposite end continuously sends a data message to the port with the fault due to the unknown fault, so that the data message is lost is avoided. And when receiving the heartbeat message which is sent by the main member device and carries the identity information of the new main port, the member device sets the port corresponding to the new main port as the new main port of the member device. The main port on the main member device is used for maintaining the stability of the IRF system, and the main port on the main member device in the IRF system is in an effective state, so that the situation of IRF link splitting in the IRF system is reduced.
Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a star IRF system according to an embodiment of the present invention;
FIG. 2 is a partial schematic diagram of a multi-link star IRF system according to an embodiment of the present invention;
FIG. 3 is a partial schematic diagram of a multi-link star IRF system (link failure) according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a port fault handling method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a port fault handling apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a port fault processing method and device, which are used for avoiding message loss on a fault link caused by port faults of member equipment and further reducing the condition of IRF link splitting.
First, a port failure processing method provided in an embodiment of the present invention is described below.
It should be noted that, if a link failure (for example, a port failure) occurs during the setup of the multi-link star IRF system, a network administrator may remove and solve the occurred failure at the first time, so that the significance of the failure solution during the setup of the IRF system is not great. The ports mentioned in the embodiments of the present invention are all IRF ports. The method for establishing the IRF system is substantially the same as that in the prior art, and is not described herein.
Specifically, the port failure processing method provided in the embodiment of the present invention may be applied to any member device of an IRF system, and as shown in fig. 4, the method may include the following steps:
s401: and when the first heartbeat message is not received through any IRF port of the member equipment within the preset time, determining that the port has a fault.
In this step, the predetermined duration may be set according to a sending frequency of the member device sending the first heartbeat packet.
S402: and setting the working state of the port from the initial valid state to the invalid state.
In the step, the IRF port in the effective state allows to send a first heartbeat message and a data message; the IRF port in the invalid state is only allowed to send the first heartbeat message.
In the invention, after the IRF system is successfully established, the working state of each IRF port of the member equipment is set to be an effective state by default, valid marks can be used, the member equipment can send data messages through the set IRF port in the effective state, and also can send first heartbeat messages to neighbor equipment through the set IRF port in the effective state at a certain sending frequency so as to detect the connection condition of links between the member equipment. The first heartbeat message may be a Hello message. Subsequently, the second heartbeat message, the third heartbeat message, the fourth heartbeat message, the fifth heartbeat message and the sixth heartbeat message may be Hello messages.
It should be noted that, after it is determined that the port fails, the working state of the port is set from the initial valid state to the invalid state, which is mainly for subsequently enabling the neighbor device to send only the first heartbeat packet, so that the neighbor device maintains the neighbor relationship with the non-failed member device, and does not send the data packet any more, thereby reducing the packet loss. Wherein the invalid state may use an invalid flag.
S403: and when the member device is a slave member device and the port is a master port, selecting one port which meets the first preset screening rule from other IRF ports of the member device.
In this step, the main port is set by the member device after receiving, through the port, a second heartbeat message that notifies that the port corresponding to the port on the main member device is the main port for maintaining the stability of the IRF system, where the second heartbeat message is sent by the main member device, and sets other IRF ports as slave ports.
In the present invention, after the main member device is elected, the main member device selects an IRF port with the highest priority from all IRF ports of the main member device (for example, the port number is smaller and the priority is higher), and sets the IRF port as a main port, sets other IRF ports as slave ports, and subsequently uses the main port to maintain the stability of the IRF system. In addition, the master member device may also notify all the neighbor devices of the set identity information of the master port through a Hello message (i.e., a second heartbeat message), so that after all the neighbor devices receive the Hello message, the port corresponding to the master port of the master member device is set as the master port, and other IRF ports are set as slave ports. Of course, to facilitate distinguishing between master and slave ports, different flag bits may be used for marking.
It should be noted that the stability of the IRF system of the present invention is maintained by the main port of each member device, that is, each member device only uses the first heartbeat packet received by the main port to select the main member device, and only uses the main port to decide whether IRF link splitting occurs. Under the condition that the working states of all IRF ports of the member equipment are effective, if a first heartbeat message is received through a main port, processing the first heartbeat message according to the existing processing mode; if the first heartbeat message is received from the port, no processing is carried out.
Further, in this step, selecting one port that meets the first predetermined screening rule from other IRF ports of the member device specifically includes:
and selecting a port with the minimum port number from other IRF ports of the member equipment to obtain the selected port.
Of course, the present invention may also adopt other screening methods, which are not listed herein.
S404: the selected port is determined to be the proxy master port for the member device.
S405: and sending a third heartbeat message carrying the working state of the port to all the neighbor devices through the proxy main port, so that all the neighbor devices set the ports corresponding to the ports to be in an invalid state after receiving the third heartbeat message.
In the invention, after all the neighbor devices receive the third heartbeat message, the ports corresponding to the ports are set to be in an invalid state, so that the ports corresponding to the ports can only send the first heartbeat message, and the condition that the data message is lost because the port at the opposite end cannot receive the data message due to faults is avoided.
It should be noted that, for the master member device in the present invention, after receiving the third heartbeat packet, in addition to executing the above operations, the master member device may re-screen a new master port from other IRF ports according to a certain screening rule, and notify the identity information of the new master port to its own neighbor devices (all slave member devices) to change the roles of the corresponding ports, so as to better maintain the stability of the IRF system and avoid frequent IRF link splitting due to port failure.
S406: and when a fourth heartbeat message which is sent by the main member equipment and carries the identity information of the new main port is received, setting the port corresponding to the new main port as the new main port of the port.
In this step, the fourth heartbeat message is sent after the main member device selects a new main port from other IRF ports of the main member device according to a second predetermined screening rule after receiving the third heartbeat message.
The second predetermined filtering rule may be the same as or different from the first predetermined filtering rule. Accordingly, the third predetermined filtering rule mentioned later may be the same as or different from the second predetermined filtering rule and the first predetermined filtering rule.
By applying the embodiment of the invention, the member equipment in the IRF system sets the IRF port with the fault to be in an invalid state, so that the IRF port can only send the first heartbeat message and can not send the data message; further, when the member device is a slave member device and the IRF port with the fault is a master port, the proxy master port is re-screened from other IRF ports of the member device to notify the neighbor device to set the port corresponding to the IRF port with the fault to an invalid state, so that the situation that when the port at one end on the IRF link fails, and the port at the opposite end continuously sends a data message to the port with the fault due to the unknown fault, so that the data message is lost is avoided. And when receiving the heartbeat message which is sent by the main member device and carries the identity information of the new main port, the member device sets the port corresponding to the new main port as the new main port of the member device. The main port on the main member device is used for maintaining the stability of the IRF system, and the main port on the main member device in the IRF system is in an effective state, so that the situation of IRF link splitting in the IRF system is reduced.
Further, in the present invention, after determining that the port has failed, if the member device is a master member device and the port is a master port, the member device may perform the following first processing operation or may perform a second processing operation:
the first method comprises the following steps: selecting one port meeting the second preset screening rule from other IRF ports of the member equipment, and determining the selected port as a new main port of the member equipment;
and sending a fifth heartbeat message carrying the working state of the port and the identity information of the new main port to all the neighbor devices through the new main port, so that after all the neighbor devices receive the fifth heartbeat message, the port corresponding to the port is set to be in an invalid state, and the port corresponding to the new main port is set to be the main port.
And the second method comprises the following steps: selecting one port which accords with a third preset screening rule from other IRF ports of the member equipment, and determining the selected port as a standby main port of the member equipment;
sending the third heartbeat message to all the neighbor devices through the alternative main port, so that after all the neighbor devices receive the third heartbeat message, the ports corresponding to the ports are set to be in an invalid state;
selecting one port meeting the second preset screening rule from other IRF ports of the member equipment, and determining the selected port as a new main port of the member equipment;
and sending a sixth heartbeat message carrying the identity information of the new main port to all the neighbor devices through the new main port, so that all the neighbor member devices set the port corresponding to the new main port as the main port after receiving the sixth heartbeat message.
It should be noted that, in the present invention, after determining that the port fails, the member device, regardless of whether the member device is a master member device or a slave member device, may perform: and sending the third heartbeat message to all the neighbor devices through the main port of the member device, so that all the neighbor devices set the ports corresponding to the ports to be in an invalid state after receiving the third heartbeat message. Therefore, all the neighbor devices do not send data messages through the IRF link where the port is located any more, and packet loss is reduced.
Furthermore, in the present invention, when the port of the member device fails, the port needs to be recovered to ensure normal data communication.
After the recovering, it may further be performed for the member device to: after receiving the first heartbeat message through the port, the working state of the port is recovered to be an effective state, and the third heartbeat message is sent to all the neighbor devices through the current main port of the member device. After all the neighbor devices receive the third heartbeat message, the ports corresponding to the ports are recovered to be in an effective state, and therefore normal transmission of data messages is guaranteed.
The port fault handling method provided by the embodiment of the present invention is described below by using a specific embodiment. The first, second, third and fourth subsequently occurring Hello messages are all Hello messages in the IRF system.
As shown in fig. 2, after the IRF system is successfully established, assuming that the priority of the device a-IRF1 is greater than the priorities of the device B-IRF2 and the device C-IRF3, the device a-IRF1 is a master member device, and the device B-IRF2 and the device C-IRF3 are all slave member devices.
For device a-IRF1, assuming that port1/1 is selected as the master port according to the second predetermined filtering rule, port1/2 and port1/3 are set as slave ports, and a second heartbeat packet (second Hello packet) is sent to device B-IRF2 and device C-IRF3 through port1/1, and identity information that port1/1 is the master port is notified to device B-IRF2 and device C-IRF 3. Subsequently, after receiving the second Hello message, the device B-IRF2 sets the Port2/1 corresponding to the Port1/1 as a master Port, and sets the ports 2/2 and 2/3 as slave ports; after receiving the second Hello packet, the device C-IRF3 sets Port3/1 corresponding to Port1/1 as the master Port, and sets Port3/2 and Port3/3 as the slave ports.
In addition, in the initial state, port1/1, port1/2 and port1/3 of device a-IRF1, port2/1, port2/2 and port2/3 of device B-IRF2, and port3/1, port3/2 and port3/3 of device C-IRF3 are all set to be valid states (valid), that is, a first heartbeat message (first Hello message) and a data message can be sent between each other. It should be noted that each device only processes the first heartbeat packet received through the primary port.
As shown in fig. 3, assuming that a port2/1 connected to a two-layer network on the device B-IRF2 is loose, the device B-IRF2 cannot receive the first Hello message sent by the device a-IRF1 or the device C-IRF3 through the port2/1 within a predetermined time period, in this case, device B-IRF2 determines that port2/1 failed, sets port2/1 to an inactive state, since port2/1 is the master port of device B-IRF2, at this time, device B-IRF2 selects one from port2/2 and port2/3 as a proxy master port according to a first predetermined filtering rule, assuming that the port number of port2/2 is smaller than the port number of port2/3, determines port2/2 as a proxy master port, and sending a third heartbeat message (a third Hello message) carrying the working state of the port2/1 to the device A-IRF1 and the device C-IRF3 through the port 2/2. Subsequently, device a-IRF1 sets corresponding port1/1 to be in an invalid state (only sends a first heartbeat packet), selects one of port1/2 and port1/3 as a master port, and determines port1/2 as the master port of device a-IRF1, assuming that the port number of port1/2 is smaller than the port number of port1/3, device a-IRF1 sends a fourth heartbeat packet (fourth Hello packet) to device B-IRF2 and device C-IRF3, where the fourth Hello packet carries the identity information of the new master port of device a-IRF1 (at this time, port1/2), device B-IRF2 receives the fourth Hello packet, and determines corresponding port2/2 as the new master port of device B-IRF 2.
After receiving the third Hello message, the device C-IRF3 sets the corresponding port3/1 to an invalid state (only sends the first heartbeat message); after receiving the fourth Hello message, determining the corresponding port3/2 as a new master port of the device C-IRF 3.
When device B-IRF2 receives the first Hello packet sent by device a-IRF1 or device C-IRF3 again through failed port2/1, port2/1 is set to an active state, and a third heartbeat packet (third Hello packet) carrying the recovery of the working state of port2/1 is sent to device a-IRF1 and device C-IRF3 through port2/2, and after device a-IRF1 receives the third Hello packet, port1/1 is set to an active state, and at this time, port1/1 may send both the first Hello packet and the data packet to device B-IRF 2.
After receiving the third Hello packet, the device C-IRF3 sets the port3/1 to an active state, and at this time, the port3/1 may send the first Hello packet to the device B-IRF2 and the device a-IRF1, and may send a data packet.
Assuming that port2/2 or port2/3 of device B-IRF2 fails, device B-IRF2 sends a third heartbeat packet to device a-IRF1 and device C-IRF3 through port 2/1. After the subsequent device A-IRF1 receives the third heartbeat message, the port1/2 of the device A-IRF1 is set to be in an invalid state; after receiving the third heartbeat message, the device C-IRF3 sets the port3/2 of the device C-IRF3 to an invalid state.
For the processing procedure of the failure of port1/1 and the processing procedure of the failure of port1/2 or port1/3 of the device a-IRF1, see the related description in the above method, which is not illustrated here.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a port failure processing apparatus, which may be applied to a member device in an IRF system, and as shown in fig. 5, the apparatus may include: a first determination module 501, a first setup module 502, a first filtering module 503, a second determination module 504, a first sending module 505, and a second setup module 506.
The first determining module 501 is configured to determine that a port fails when a first heartbeat packet is not received through any IRF port of the member device within a predetermined time period;
the first setting module 502 is configured to set the working state of the port from an initial valid state to an invalid state when the first determining module determines that the port has a fault, where an IRF port in the valid state allows sending a first heartbeat packet and a data packet; the IRF port in the invalid state only allows to send a first heartbeat message;
the first screening module 503 is configured to select, when the member device is a slave member device and the port is a master port, one port that meets a first predetermined screening rule from other IRF ports of the member device;
the second determining module 504 is configured to determine the selected port as a proxy master port of the member device, where the master port is: the member device is set after receiving a second heartbeat message which is sent by the main member device and informs the main member device that a port corresponding to the port is a main port used for maintaining the stability of the IRF system, and sets other IRF ports as slave ports;
the first sending module 505 is configured to send a third heartbeat packet carrying the working state of the port to all neighboring devices through the proxy master port, so that after receiving the third heartbeat packet, all neighboring devices set the port corresponding to the port to an invalid state;
the second setting module 506 is configured to, when a fourth heartbeat packet carrying identity information of a new master port and sent by a master member device is received, set a port corresponding to the new master port as a new master port of the master device, where the fourth heartbeat packet is sent after the master member device receives the third heartbeat packet and selects a new master port from other IRF ports of the master member device according to a second predetermined screening rule.
By applying the embodiment of the invention, the member equipment in the IRF system sets the IRF port with the fault to be in an invalid state, so that the IRF port can only send the first heartbeat message and can not send the data message; further, when the member device is a slave member device and the IRF port with the fault is a master port, the proxy master port is re-screened from other IRF ports of the member device to notify the neighbor device to set the port corresponding to the IRF port with the fault to an invalid state, so that the situation that when the port at one end on the IRF link fails, and the port at the opposite end continuously sends a data message to the port with the fault due to the unknown fault, so that the data message is lost is avoided. And when receiving the heartbeat message which is sent by the main member device and carries the identity information of the new main port, the member device sets the port corresponding to the new main port as the new main port of the member device. The main port on the main member device is used for maintaining the stability of the IRF system, and the main port on the main member device in the IRF system is in an effective state, so that the situation of IRF link splitting in the IRF system is reduced.
In a specific implementation manner, the first screening module 503 is specifically configured to select a port with a minimum port number from other IRF ports of the member device, and obtain the selected port.
In a specific implementation manner, the apparatus further includes a second screening module, a third determining module, and a second sending module;
the second screening module is configured to, after it is determined that the port has a fault, select a port that meets the second predetermined screening rule from other IRF ports of the member device when the member device is a master member device and the port is a master port;
the third determining module is configured to determine the selected port as a new primary port of the member device;
and the second sending module is used for sending a fifth heartbeat message carrying the working state of the port and the identity information of the new main port to all the neighbor devices through the new main port, so that after all the neighbor devices receive the fifth heartbeat message, the port corresponding to the port is set to be in an invalid state, and the port corresponding to the new main port is set to be the main port.
In a specific implementation manner, the apparatus further includes: the device comprises a third screening module, a fourth determining module, a third sending module, a fourth screening module, a fifth determining module and a fourth sending module;
the third screening module is configured to, after it is determined that the port has a fault, select a port that meets a third predetermined screening rule from other IRF ports of the member device when the member device is a master member device and the port is a master port;
the fourth determining module is configured to determine the selected port as the alternative primary port of the member device;
the third sending module is configured to send the third heartbeat packet to all neighboring devices through the alternative master port, so that after receiving the third heartbeat packet, all neighboring devices set the ports corresponding to the ports to be in an invalid state;
the fourth screening module is configured to select one port that meets the second predetermined screening rule from other IRF ports of the member device;
the fifth determining module is configured to determine the selected port as a new primary port of the member device;
the fourth sending module is configured to send a sixth heartbeat packet carrying the identity information of the new master port to all neighboring devices through the new master port, so that after receiving the sixth heartbeat packet, all neighboring member devices set a port corresponding to the new master port as the master port.
In a specific implementation manner, the apparatus further includes: a fifth sending module;
the fifth sending module is configured to send the third heartbeat packet to all neighboring devices through the master port of the member device when the port is the slave port after determining that the port has a fault, so that all neighboring devices set the port corresponding to the port in an invalid state after receiving the third heartbeat packet.
In a specific implementation manner, the apparatus further includes: a recovery sending module;
the recovery sending module is configured to recover the working state of the port to an effective state after receiving the first heartbeat message through the port, and send the third heartbeat message to all neighboring devices through the current master port of the member device, so that all neighboring devices recover the port corresponding to the port to an effective state after receiving the third heartbeat message.
For the system/apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A port fault processing method is applied to member equipment in an Intelligent Resilient Framework (IRF) system, and comprises the following steps:
when a first heartbeat message is not received through any IRF port of the member equipment within a preset time length, determining that any IRF port has a fault, and setting the working state of any IRF port from an initial effective state to an invalid state, wherein the IRF port in the effective state allows the first heartbeat message and the data message to be sent; the IRF port in the invalid state only allows to send a first heartbeat message;
when the member device is a slave member device and any IRF port is a master port, selecting a port meeting a first predetermined screening rule from other IRF ports of the member device, and determining the selected port as a proxy master port of the member device, wherein the master port is: the member device is set after receiving a second heartbeat message which is sent by the main member device through any one IRF port and informs the main member device that a port corresponding to the IRF port is a main port used for maintaining the stability of the IRF system, and sets other IRF ports as slave ports, wherein the port corresponding to the IRF port is a port which is in communication connection with the IRF port;
sending a third heartbeat message carrying the working state of any IRF port to all neighbor equipment through the proxy main port, so that after all the neighbor equipment receives the third heartbeat message, the port corresponding to any IRF port is set to be in an invalid state;
when a fourth heartbeat message which is sent by a main member device and carries identity information of a new main port is received, a port corresponding to the new main port is set as a new main port of the main member device, wherein the fourth heartbeat message is sent after the main member device selects a new main port from other IRF ports of the main member device according to a second preset screening rule after receiving the third heartbeat message, and the port corresponding to the new main port is a port which is in communication connection with the new main port.
2. The method according to claim 1, wherein selecting one port that meets a first predetermined screening rule from other IRF ports of the member device specifically comprises:
and selecting a port with the minimum port number from other IRF ports of the member equipment to obtain the selected port.
3. The method according to claim 1, wherein after determining that any of the IRF ports is malfunctioning, the method further comprises:
when the member device is a main member device and any one IRF port is a main port, selecting one port which meets the second preset screening rule from other IRF ports of the member device, and determining the selected port as a new main port of the member device;
and sending a fifth heartbeat message carrying the working state of any IRF port and the identity information of the new main port to all the neighbor devices through the new main port, so that after all the neighbor devices receive the fifth heartbeat message, the port corresponding to any IRF port is set to be in an invalid state, and the port corresponding to the new main port is set to be the main port.
4. The method according to claim 1, wherein after determining that any of the IRF ports is malfunctioning, the method further comprises:
when the member device is a main member device and any one IRF port is a main port, selecting a port which meets a third preset screening rule from other IRF ports of the member device, and determining the selected port as a standby main port of the member device;
sending the third heartbeat message to all the neighbor devices through the alternative main port, so that after all the neighbor devices receive the third heartbeat message, the port corresponding to any one IRF port is set to be in an invalid state;
selecting one port which accords with the second preset screening rule from other IRF ports of the member equipment, and determining the selected port as a new main port of the member equipment;
and sending a sixth heartbeat message carrying the identity information of the new main port to all the neighbor devices through the new main port, so that all the neighbor member devices set the port corresponding to the new main port as the main port after receiving the sixth heartbeat message.
5. The method according to any of claims 1 to 4, wherein after determining that any of the IRF ports is malfunctioning, the method further comprises:
and when any IRF port is a slave port, sending the third heartbeat message to all neighbor devices through the master port of the member device, so that all the neighbor devices set the port corresponding to any IRF port to be in an invalid state after receiving the third heartbeat message.
6. The method of claim 5, further comprising:
and after receiving the first heartbeat message through any IRF port, restoring the working state of any IRF port to an effective state, and sending the third heartbeat message to all neighbor devices through the current main port of the member device, so that all the neighbor devices restore the port corresponding to any IRF port to an effective state after receiving the third heartbeat message.
7. A port fault processing device applied to member equipment in an Intelligent Resilient Framework (IRF) system, the device comprising: the device comprises a first determining module, a first setting module, a first screening module, a second determining module, a first sending module and a second setting module;
the first determining module is configured to determine that any IRF port fails when a first heartbeat packet is not received through any IRF port of the member device within a predetermined time period;
the first setting module is configured to set a working state of any IRF port from an initial valid state to an invalid state when the first determining module determines that the IRF port fails, where the IRF port in the valid state allows a first heartbeat packet and a data packet to be sent; the IRF port in the invalid state only allows to send a first heartbeat message;
the first screening module is configured to select, when the member device is a slave member device and any IRF port is a master port, one port that meets a first predetermined screening rule from other IRF ports of the member device;
the second determining module is configured to determine the selected port as a proxy master port of the member device, where the master port is: the member device is set after receiving a second heartbeat message which is sent by the main member device through any one IRF port and informs the main member device that a port corresponding to the IRF port is a main port used for maintaining the stability of the IRF system, and sets other IRF ports as slave ports, wherein the port corresponding to the IRF port is a port which is in communication connection with the IRF port;
the first sending module is configured to send a third heartbeat packet carrying the working state of any IRF port to all neighboring devices through the proxy master port, so that after receiving the third heartbeat packet, all neighboring devices set a port corresponding to any IRF port to an invalid state;
the second setting module is configured to set, when receiving a fourth heartbeat message that is sent by a master member device and carries identity information of a new master port, a port corresponding to the new master port as a new master port of the master device, where the fourth heartbeat message is sent after the master member device selects a new master port from other IRF ports of the master member device according to a second predetermined screening rule after receiving the third heartbeat message, and the port corresponding to the new master port is a port that is in communication connection with the new master port.
8. The apparatus of claim 7, wherein the first filtering module is specifically configured to select a port with a smallest port number from other IRF ports of the member device, and obtain the selected port.
9. The apparatus of claim 7, further comprising a second filtering module, a third determining module, and a second sending module;
the second screening module is configured to, after determining that the any IRF port has a fault, select, when the member device is a master member device and the any IRF port is a master port, a port that meets the second predetermined screening rule from other IRF ports of the member device;
the third determining module is configured to determine the selected port as a new primary port of the member device;
and the second sending module is used for sending a fifth heartbeat message carrying the working state of any IRF port and the identity information of the new main port to all the neighbor devices through the new main port, so that after all the neighbor devices receive the fifth heartbeat message, the ports corresponding to any IRF port are set to be in an invalid state, and the ports corresponding to the new main port are set to be the main port.
10. The apparatus of claim 7, further comprising: the device comprises a third screening module, a fourth determining module, a third sending module, a fourth screening module, a fifth determining module and a fourth sending module;
the third screening module is configured to, after determining that the any IRF port has a fault, select a port that meets a third predetermined screening rule from other IRF ports of the member device when the member device is a master member device and the any IRF port is a master port;
the fourth determining module is configured to determine the selected port as the alternative primary port of the member device;
the third sending module is configured to send the third heartbeat packet to all neighboring devices through the alternative master port, so that after receiving the third heartbeat packet, all neighboring devices set a port corresponding to the any IRF port to an invalid state;
the fourth screening module is configured to select one port that meets the second predetermined screening rule from other IRF ports of the member device;
the fifth determining module is configured to determine the selected port as a new primary port of the member device;
the fourth sending module is configured to send a sixth heartbeat packet carrying the identity information of the new master port to all neighboring devices through the new master port, so that after receiving the sixth heartbeat packet, all neighboring member devices set a port corresponding to the new master port as the master port.
11. The apparatus of any one of claims 7 to 10, further comprising: a fifth sending module;
the fifth sending module is configured to send the third heartbeat packet to all neighbor devices through the master port of the member device when any IRF port is a slave port after determining that the any IRF port has a fault, so that after receiving the third heartbeat packet, all neighbor devices set a port corresponding to the any IRF port to an invalid state.
12. The apparatus of claim 11, further comprising: a recovery sending module;
the recovery sending module is configured to recover the working state of any IRF port to an effective state after receiving the first heartbeat message through any IRF port, and send the third heartbeat message to all neighboring devices through the current main port of the member device, so that all neighboring devices recover a port corresponding to any IRF port to an effective state after receiving the third heartbeat message.
CN201610570754.XA 2016-07-18 2016-07-18 Port fault processing method and device Active CN106130783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610570754.XA CN106130783B (en) 2016-07-18 2016-07-18 Port fault processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610570754.XA CN106130783B (en) 2016-07-18 2016-07-18 Port fault processing method and device

Publications (2)

Publication Number Publication Date
CN106130783A CN106130783A (en) 2016-11-16
CN106130783B true CN106130783B (en) 2020-12-11

Family

ID=57289002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610570754.XA Active CN106130783B (en) 2016-07-18 2016-07-18 Port fault processing method and device

Country Status (1)

Country Link
CN (1) CN106130783B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109787790B (en) * 2017-11-10 2022-04-15 中兴通讯股份有限公司 Communication method, device and storage medium based on double-link management port
CN108337159B (en) * 2018-01-31 2021-05-28 新华三技术有限公司 Port operation control method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8401008B2 (en) * 2006-01-25 2013-03-19 Nec Corporation Network node, frame transfer program and frame transfer method
CN105099906B (en) * 2010-09-26 2018-11-09 新华三技术有限公司 Reduce the method and hardware control unit of link polymerization terminal port message dropping
CN102480409B (en) * 2010-11-22 2014-10-22 杭州华三通信技术有限公司 Method for realizing rapid ring protection protocol (RRPP) loop shunting uplink, RRPP loop and device
CN102315975B (en) * 2011-10-17 2014-03-19 杭州华三通信技术有限公司 Fault processing method based on intelligent resilient framework (IRF) system and equipment thereof

Also Published As

Publication number Publication date
CN106130783A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
CN102098201B (en) Method for realizing L2TP user access backup and network system
CN101588304B (en) Implementation method of VRRP and device
CN101702663B (en) Method and device for updating ring network topology information
EP1919138B1 (en) A method for implementing backup of the uplink
CN101729426B (en) Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)
CN107465613B (en) Link aggregation interface communication state switching method and device
WO2012000234A1 (en) Method, apparatus and system for fast switching between links
CN106878072B (en) Message transmission method and device
US20130235718A1 (en) Path switch-back method and apparatus in transport network
CN102088372B (en) Heartbeat detecting method, system and equipment
EP2254289B1 (en) Method, device, and system for establishing label switching path in fast rerouting switching
CN112218321B (en) Master-slave link switching method, device, communication equipment and storage medium
CN102857316B (en) A kind of method and system realizing source looped network protection
WO2017000096A1 (en) Link recovery method and network device
CN106130783B (en) Port fault processing method and device
CN101909006A (en) BFD (Bidirectional Forwarding Detection) message sending and receiving methods as well as device and communication system thereof
KR101075462B1 (en) Method to elect master nodes from nodes of a subnet
CN111327524B (en) Flow forwarding method and system, SDN controller and computer readable storage medium
CN103414591A (en) Method and system for fast converging when port failure is recovered
EP2573977A1 (en) Subnet protection method and device for transport multi-protocol label switching (tmpls) network
CN108337162B (en) System and method for supporting dual-homing protection
EP2953299B1 (en) Protection switching method, system and node
CN115152192B (en) PCE controlled network reliability
CN113098709B (en) Network recovery method and device based on distributed networking system and computer equipment
CN105871524B (en) A kind of method and system based on TIPC protocol realization two-node cluster hot backup

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou science and Technology Industrial Park, high tech Industrial Development Zone, Zhejiang Province, No. six and road, No. 310

Applicant before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230625

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.