CN117221192A - BFD event processing method and device and network monitoring method using same - Google Patents

BFD event processing method and device and network monitoring method using same Download PDF

Info

Publication number
CN117221192A
CN117221192A CN202311345597.9A CN202311345597A CN117221192A CN 117221192 A CN117221192 A CN 117221192A CN 202311345597 A CN202311345597 A CN 202311345597A CN 117221192 A CN117221192 A CN 117221192A
Authority
CN
China
Prior art keywords
bfd
ospf
neighbor
interface
ping packet
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.)
Pending
Application number
CN202311345597.9A
Other languages
Chinese (zh)
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.)
Kyland Technology Co Ltd
Original Assignee
Kyland Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyland Technology Co Ltd filed Critical Kyland Technology Co Ltd
Priority to CN202311345597.9A priority Critical patent/CN117221192A/en
Publication of CN117221192A publication Critical patent/CN117221192A/en
Pending legal-status Critical Current

Links

Abstract

The application relates to a BFD event processing method, a BFD event processing device and a network monitoring method applying the BFD event processing device, wherein the BFD event processing method comprises the following steps: receiving a BFD session timeout event reported by a BFD process through the OSPF process, and increasing an overhead value of an OSPF interface to trigger the OSPF process to recalculate a flow path of network traffic; sending a ping packet to neighbor equipment with neighbor relation with an interface through an OSPF process; when the response message of the neighbor equipment to the ping packet is received normally, maintaining the neighbor relation and the added overhead value; and deleting the neighbor relation when the received response message is abnormal. The application does not reestablish the adjacency after receiving the overtime event, but increases the interface overhead, sends the ping packet to the neighbor device, and reestablishes the adjacency according to the response of the neighbor device when the overtime event is determined to be error-free, thus eliminating the network interruption and the waste of CPU resources caused by immediately disconnecting the adjacency.

Description

BFD event processing method and device and network monitoring method using same
Technical Field
The present application relates to the field of network communications technologies, and in particular, to a BFD event processing method and apparatus, and a network monitoring method, computing device, and storage medium applying the BFD event processing method and apparatus.
Background
On the network, the link failure or topology change can lead to the route recalculation, and since the link failure cannot be completely avoided, it is very important to improve the network availability and shorten the convergence time of the routing protocol. The existing scheme is to link the three-layer routing protocol with bidirectional forwarding detection (Bidirectional Forwarding Detection, BFD), and the BFD can rapidly sense link faults and further inform the three-layer protocol, so that the response of the three-layer protocol to network topology change is accelerated.
The open shortest path first (Open Shortest Path First, OSPF) protocol and BFD linkage are described in detail. The "ip OSPF BFD enable" command is typically configured under the OSPF interface to enable the OSPF-associated BFD function, and when the neighbor of the OSPF under the interface reaches either the TWO-WAY (a neighbor relationship state may be established between TWO routers) or the FULL state (an adjacency already formed state), the OSPF process applies to BFD to establish a BFD session for monitoring link stability. BFD may implement a diagnostic rate on the order of milliseconds, so BFD tends to be perceived prior to OSPF when a failure occurs in the network. The BFD transmits the fault information to the OSPF process, the OSPF process directly deletes the neighbor relation and notifies the BFD to delete the previously created session, and then network convergence is performed again, the OSPF recalculates the routing table without considering the router uploading the fault information and notifies other routers in the network to update their routing information. When the neighbor under the OSPF interface reaches the stable state again, the adjacency is re-established, and the BFD monitoring session is re-applied to ensure the quick response to the link failure.
The above scheme can realize quick response of network faults, but has a problem: most of network fault information is informed by BFD after the OSPF and the BFD are linked, which requires that the information informed by the BFD is accurate, otherwise misjudgment is caused to influence the communication of a normal link. However, BFD may have a "false alarm", for example, some devices BFD are controlled by the main CPU to receive and send a message to maintain a neighbor relationship, but forwarding of three layers of messages is implemented by a dedicated switching chip, and if the CPU processes too much things in a certain time, a situation of packet loss of a local message may occur. Because BFD needs to perform rapid message interaction, the message loss is likely to cause the BFD to have overtime, and the OSPF process can quickly converge to reestablish the adjacency after receiving the BFD overtime event, so that the original normal link can not communicate and larger CPU resource occupation can be caused by the reestablishment of the adjacency.
Disclosure of Invention
The application provides a BFD event processing method and device, and a network monitoring method, computing equipment and storage medium applying the BFD event processing method and device, and aims to solve the problem that an original normal link cannot be communicated and a reestablished adjacency relationship causes larger occupation of CPU resources after an OSPF process receives a BFD overtime event to quickly converge and reestablish the adjacency relationship.
To achieve the above object, a first aspect of the present application provides a BFD event processing method, including:
receiving a BFD session timeout event reported by a BFD process through the OSPF process, and increasing an overhead value of an OSPF interface to trigger the OSPF process to recalculate a flow path of network traffic;
sending a ping packet to neighbor equipment corresponding to the interface through an OSPF process; wherein the neighbor device comprises a neighbor device having a neighbor relationship with the interface;
when receiving a response message of the neighbor device to the ping packet through an OSPF process is normal, maintaining the neighbor relation and maintaining an overhead value of the OSPF interface as an increased value;
and deleting the neighbor relation when the response message of the neighbor equipment to the ping packet is abnormal through an OSPF process.
To achieve the above object, a second aspect of the present application provides a network monitoring method, including:
configuring an OSPF interface to be linked with BFD;
establishing a neighbor relation of neighbor equipment corresponding to the interface through an OSPF process, and establishing a BFD session with the neighbor equipment through a BFD process, wherein the BFD session is used for monitoring a link state from the interface to the neighbor equipment;
the BFD event processing method described in the first aspect above is performed when a BFD session timeout event occurs.
To achieve the above object, a third aspect of the present application provides a BFD event processing apparatus, including:
the BFD event processing module is used for receiving the BFD session timeout event reported by the BFD process through the OSPF process, and increasing the overhead value of the OSPF interface to trigger the OSPF process to recalculate the flow path of the network flow;
the ping packet sending module is used for sending a ping packet to the neighbor equipment corresponding to the interface through an OSPF process; wherein the neighbor device comprises a neighbor device having a neighbor relationship with the interface;
the BFD event processing module is further configured to:
when receiving a response message of the neighbor device to the ping packet through an OSPF process is normal, maintaining the neighbor relation and maintaining an overhead value of the OSPF interface as an increased value;
and deleting the neighbor relation when the response message of the neighbor equipment to the ping packet is abnormal through an OSPF process.
A fourth aspect of the application provides a computing device comprising:
a processor, and
a memory having stored thereon program instructions which, when executed by the processor, cause the processor to perform the method of any of the above first aspects.
A fifth aspect of the present application provides a computer readable storage medium having stored thereon program instructions which when executed by a computer cause the computer to implement the method of any of the first aspects described above.
Therefore, the application does not quickly converge and reestablish the adjacency after the OSPF process receives the overtime event, but increases the interface overhead firstly, then determines whether the BFD overtime event is accurate or false according to the response of the ping packet by sending the ping packet to the neighbor device, and quickly converges and reestablishes the adjacency if the BFD overtime event is accurate, thereby eliminating the disconnection adjacency that the three-layer routing protocol can not have brain when the BFD misreports, and causing unnecessary network interruption and waste of more CPU resources.
Drawings
FIG. 1 is a flow chart of an embodiment of a BFD event processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of a BFD event processing method according to an embodiment of the present application;
FIG. 3 is a flowchart of an embodiment of a network monitoring method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a BFD event processing device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a computing device provided by an embodiment of the application.
It should be understood that in the foregoing structural schematic diagrams, the sizes and forms of the respective block diagrams are for reference only and should not constitute an exclusive interpretation of the embodiments of the present application. The relative positions and inclusion relationships between the blocks presented by the structural diagrams are merely illustrative of structural relationships between the blocks, and are not limiting of the physical connection of embodiments of the present application.
Detailed Description
The technical scheme provided by the application is further described below by referring to the accompanying drawings and examples. It should be understood that the system structure and the service scenario provided in the embodiments of the present application are mainly for illustrating possible implementation manners of the technical solutions of the present application, and should not be interpreted as the only limitation to the technical solutions of the present application. As one of ordinary skill in the art can know, with the evolution of the system structure and the appearance of new service scenarios, the technical scheme provided by the application is applicable to similar technical problems.
It should be understood that the BFD event processing scheme provided by the embodiment of the present application includes a BFD event processing method and apparatus. Because the principles of solving the problems in these technical solutions are the same or similar, in the following description of the specific embodiments, some repetition is not described in detail, but it should be considered that these specific embodiments have mutual references and can be combined with each other.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. If there is a discrepancy, the meaning described in the present specification or the meaning obtained from the content described in the present specification is used. In addition, the terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application. For the purpose of accurately describing the technical content of the present application, and for the purpose of accurately understanding the present application, the following explanation or definition is given for the terms used in the present specification before the explanation of the specific embodiments;
(1) OSFP process function: establishing/deleting a neighbor relation between two routers;
(2) BFD process function: creating a BFD session, deleting the BFD session, wherein the session is used for monitoring the link state between the switching device and the neighbor device, and session events (up, down, time-out) corresponding to the link state report the OSFP process.
(3) Events of BFD session: the following may be included:
init (initialization): this is the initial state of the BFD session, indicating that it is in the process of initialization.
Up (normal): indicating that the BFD session has been successfully established and the network is in a normal state.
Down (failure): if the link fails, or there are other problems in the network, the state of the BFD session may change from Up to Down. This is a key step in fault detection, and BFD may quickly notify upper layer protocols, such as OSPF, to perform network convergence.
Fault: in some cases, a BFD session may experience a failure state. This often means that there are serious problems in the network and normal data transmission is not possible.
Wait: the BFD session may enter a waiting state when a device fails or the link is being initialized. This means that other devices are waiting for initialization or failover to complete.
(4) The BFD session timeout event refers to that the BFD session does not receive a message from the peer within a period of time, and the timeout time generally refers to the longest time for the peer to wait for a response after the message is sent. When the BFD session times out, a change in the BFD session state may be triggered, for example, from the Init state to the Down state, or from the Up state to the Down state.
(5) The OSPF interface refers to a network interface that operates in the OSPF protocol. In the OSPF protocol, each interface has an OSPF interface identifier that identifies the location of the interface in the OSPF protocol. The OSPF interface may be a physical interface or a logical interface. The physical interface refers to a physical line connected to a router, such as ethernet, POS, etc.; the logical interface refers to a virtual interface inside the router, such as a tunnel interface, a broadcast interface, and the like. The OSPF interface may configure various parameters such as IP address, subnet mask, network type, etc. to meet the needs of the network.
(6) Overhead of interface: the resources that the interface needs to consume when transmitting data include hardware resources, software resources, network resources, and the like. The overhead of the interface can be measured by indexes such as bandwidth, delay, packet loss rate, error rate and the like of the interface. In the OSPF protocol, the overhead of an interface is represented by the overhead value of the OSPF interface: interface overhead value = bandwidth reference value/interface bandwidth, the magnitude of this value reflects the performance of the interface, smaller values indicate better interface links, larger values indicate worse interfaces.
[ BFD event processing method ] one embodiment of the method
The first embodiment of the application provides a BFD event processing method, which is applied to a switching device, wherein an OSPF protocol and BFD are installed on the switching device, and the OSPF protocol and the BFD are linked. As shown in fig. 1, the method includes:
s110: receiving a BFD session timeout event reported by a BFD process through the OSPF process, and increasing an overhead value of an OSPF interface to trigger the OSPF process to recalculate a flow path of network traffic;
s120: sending a ping packet to neighbor equipment corresponding to the interface through an OSPF process; wherein the neighbor device comprises a neighbor device having a neighbor relationship with the interface;
s130: when receiving a response message of the neighbor device to the ping packet through an OSPF process is normal, maintaining the neighbor relation and maintaining an overhead value of the OSPF interface as an increased value;
s140: and deleting the neighbor relation when the response message of the neighbor equipment to the ping packet is abnormal through an OSPF process.
Therefore, the application does not quickly converge and reestablish the adjacency after the OSPF process receives the overtime event, but increases the interface overhead firstly, then determines whether the BFD overtime event is accurate or false according to the response of the ping packet by sending the ping packet to the neighbor device, and quickly converges and reestablishes the adjacency if the BFD overtime event is accurate, thereby eliminating the disconnection adjacency that the three-layer routing protocol can not have brain when the BFD misreports, and causing unnecessary network interruption and waste of more CPU resources.
In these embodiments, in step S110, the OSFP process receives a BFD session timeout event reported by the BFD process, which indicates that there may be a failure in the link corresponding to the OSPF interface, and the state of the BFD session on the link may be changed from the Init state to the Down state, or from the Up state to the Down state. Since the link may fail at this time, the network traffic may not pass, and it is necessary to switch the flow path of the network traffic. Switching the flow path of network traffic requires triggering the OSPF protocol to recalculate the routing table by increasing the overhead value of the OSPF interface.
After triggering the OSPF process to recalculate the flow path of the network traffic, the OSPF process calculates a routing table based on a router corresponding to the OSPF interface with an increased overhead value, when the router is calculated to have a standby path, the network traffic is switched to the standby path, and when the router is calculated to have no standby path, the network traffic still leaves the original link (at this time, the overhead value of the OSPF interface in the link is increased). For example, if a receives a BFD session timeout event, the router path a-B-D increases the overhead value of a, calculates the shortest path again based on a, if there is a backup path a-C-D before, switches directly to the backup path a-C-D, if there is no backup path, and if there is a backup path a-B-D after the recalculation, the network traffic will still go through a-B-D.
In some embodiments, increasing the overhead value of the OSPF interface (S110) includes:
and increasing the overhead value in the LSA message of the OSPF interface.
In these embodiments, the OSPF protocol includes an LSA packet type: a type LSA (Router LSA), a type LSA messages are used to exchange network routing information between routers. Specifically, a type of LSA message includes a routing prefix, mask, overhead, router link segments, link types of connections, and routers of connections, etc. of the link. Therefore, the overhead value of the OSPF interface can be increased by changing the overhead value in the LSA message of the OSPF protocol corresponding to the OSPF interface.
In some embodiments, the sending, by the OSPF process, a ping packet to a neighboring device corresponding to the interface includes:
sending a plurality of ping packets to neighbor equipment corresponding to the interface through an OSPF process;
when the response message of the neighbor device to the ping packet is received normally through an OSPF process, and when the response message of the neighbor device to the ping packet is received abnormally through the OSPF process, the method comprises the following steps:
when response messages of the neighbor devices to the ping packet in a preset proportion are received through an OSPF process, the response messages are indicated to be normal;
and when response messages of the neighbor devices to the ping packet in a preset proportion are not received through the OSPF process, the abnormal receiving of the response messages is indicated.
In these embodiments, the purpose of sending the ping packet to the neighbor device corresponding to the interface in step S120 through the OSPF process is to detect whether there is a problem in the link between the interface and the corresponding neighbor device. In order to avoid errors, the number of ping packets sent by the present application is multiple (may be three).
In step S130, the criteria of normal and abnormal receiving responses are set such that the receiving of the response messages with the preset proportion is normal and the receiving of the response messages with the preset proportion is abnormal. The preset proportion is set according to the number of the sent ping packets, and generally more than 60% of the number of the ping packets can be set, for example, three ping packets are sent, the response message which responds to more than two ping packets is considered normal, and the response message which responds to one ping packet is considered abnormal. Wherein, the preset proportion is rounded.
In some embodiments, in step S130, if the OSPF process receives the response message of the neighbor device within a specified time, the link state is considered to be normal, the BFD session timeout event is a false report, the neighbor relation between the OSPF interface and the neighbor device is maintained, and the increased overhead value is maintained continuously, where the traffic is still going through the backup path (or the original path after the overhead value is increased).
If the OSPF process does not receive the response message of the neighbor device within the specified time, the BFD session timeout event is considered to be accurate, the neighbor relation is deleted according to the previous processing mechanism, meanwhile, a message for deleting the corresponding session is sent to the BFD process, and after the neighbor of the OSPF reaches the steady state, the BFD session is applied to be established again for monitoring the link state.
In some embodiments, after maintaining the neighbor relation, further comprising:
and when the UP event of the BFD session is received through the OSPF process, recovering the overhead value of the OSPF interface to be the value before the increase.
In these embodiments, in step S130, after determining that the BFD session timeout event is a false report, the neighbor relationship between the OSPF interface and the neighbor device and the increased overhead value are maintained, and if the OSPF process receives the BFD session UP event reported by the BFD process, the overhead value of the OSPF interface is restored to the previous value. At this point, the network traffic switches back to the original link and the BFD session continues to monitor the link state. If the OSPF process does not receive the BFD session UP event reported by the BFD process, the neighbor relation is maintained all the time, and the increased interface overhead value is maintained so as to calculate whether a backup path exists in time, and if the backup path exists, the flow walks the backup path to ensure the normal flow of the flow.
In some embodiments, after deleting the neighbor relation, further comprising:
and recovering the overhead value of the OSPF interface to be a value before increasing.
In these embodiments, in step S130, after determining that the BFD session timeout event is correct, the neighbor relation and the BFD session are deleted, and the added overhead value needs to be recovered at this time, and after reaching the steady state, the neighbor of OSPF applies again to create the BFD session for monitoring the link state.
In some embodiments, after receiving the BFD session timeout event reported by the BFD process through the OSPF process, the method further includes:
acquiring a set BFD event processing mark, and if the BFD event processing mark is valid, increasing an overhead value of an OSPF interface; and if the BFD event processing mark is invalid, deleting the neighbor relation through an OSPF process.
In these embodiments, the present application sets a BFD event handling flag, which may be set to 1 or 0.1 indicates that the BFD event handling flag is valid, and indicates that the method can be used to handle the BFD session timeout event, that is, the OSPF process will not delete the neighbors temporarily, and will not notify the BFD process to delete the relevant session, but will increase the overhead value of the OSPF interface, and send a ping packet through the OSPF process to confirm whether the link is normal or not, and then handle the neighbor relation. And 0 represents that the BFD event processing mark is invalid, and represents that the prior BFD session timeout event processing method, namely the OSPF process deletes the neighbor and notifies the BFD process to delete the related session.
The application adds a new processing mechanism on the basis of keeping the existing BFD session timeout event processing mechanism, and the two different processing mechanisms can be distinguished by configuration so as to realize more flexible, timely and effective processing of network communication faults.
[ BFD event processing method ]
Application scene: and the OSPF protocol and the BFD are installed on the switch A and the switch B, the switch A and the switch B establish a neighbor relation through the OSPF protocol, and when the switch A cannot receive the message of the switch B, the BFD process of the switch A reports the BFD session timeout event to the OSPF process on the switch A, and the OSPF process processes the BFD session timeout event, wherein the specific process is as follows.
Fig. 2 is a flowchart of a specific implementation of a BFD event processing method according to an embodiment of the present application, as shown in fig. 2, where the method includes:
s210: the OSPF process of switch a attempts to establish a neighbor relation with switch B.
S220: the OSPF process of switch a maintains a neighbor relation with switch B.
S230: the OSPF process of the exchanger A receives the BFD session timeout event uploaded by the BFD process;
s240: the OSPF process of the switch A increases the overhead value of the OSPF interface on the switch A;
s250: the OSPF process of the switch A sends a ping packet to the switch B and waits for the response of the switch B to the ping packet;
s260: the OSPF process of the switch A judges whether the response packet of the switch B to the ping packet can be timely received or not:
s270: if the response packet can be received in time, the OSPF process of the switch A maintains the neighbor relation between the switch A and the switch B, and maintains the overhead value after the OSPF interface on the switch A is increased;
s280: judging whether a BFD session UP event uploaded by a BFD process is received by an OSPF process of the switch A, if so, returning to execute S220 before recovering the overhead value after the OSPF interface on the switch A is increased to be increased; if the BFD session UP event cannot be received, continuing to execute S270;
s290: if the response packet cannot be received in time, the OSPF process of the switch A deletes the neighbor relation between the switch A and the switch B, and the OSPF process on the switch A applies for deleting the BFD session, and returns to execute S210 to reestablish the neighbor relation.
[ one embodiment of a network monitoring method ]
Based on the above-mentioned BFD event processing method, the present application further provides a network monitoring method, and fig. 3 is a flowchart of an embodiment of a network monitoring method provided by an embodiment of the present application, as shown in fig. 3, where the method includes:
s310: configuring an OSPF interface to be linked with BFD;
s320: establishing a neighbor relation of neighbor equipment corresponding to the interface through an OSPF process, and establishing a BFD session with the neighbor equipment through a BFD process, wherein the BFD session is used for monitoring a link state from the interface to the neighbor equipment;
s330: the BFD event processing method described above is performed when a BFD session timeout event occurs.
The details of S330 may be referred to in the above embodiment of the BFD event processing method, which is not described herein.
[ embodiment of BFD event processing device ]
An embodiment of the present application provides a BFD event processing apparatus, which may be used to implement the BFD event processing method in the foregoing embodiment, and as shown in fig. 4, the BFD event processing apparatus 400 has a BFD event processing module 401 and a ping packet sending module 402.
The BFD event processing module is used for receiving the BFD session timeout event reported by the BFD process through the OSPF process, and increasing the overhead value of the OSPF interface to trigger the OSPF process to recalculate the flow path of the network flow;
the ping packet sending module is used for sending a ping packet to the neighbor equipment corresponding to the interface through an OSPF process; wherein the neighbor device comprises a neighbor device having a neighbor relationship with the interface;
the BFD event processing module is further configured to:
when receiving a response message of the neighbor device to the ping packet through an OSPF process is normal, maintaining the neighbor relation and maintaining an overhead value of the OSPF interface as an increased value;
and deleting the neighbor relation when the response message of the neighbor equipment to the ping packet is abnormal through an OSPF process.
Reference may be made specifically to the detailed description of the method embodiments, which are not described here in detail.
[ embodiments of the computing device of the present application ]
Fig. 5 is a schematic diagram of a computing device 900 provided by an embodiment of the application. The computing device may be used as a BFD event processing apparatus to perform the various alternative embodiments of the BFD event processing method described above, where the computing device may be a terminal, or may be a chip or a chip system within the terminal. As shown in fig. 5, the computing device 900 includes: processor 910, memory 920, and communication interface 930.
It should be appreciated that the communication interface 930 in the computing device 900 shown in fig. 5 may be used to communicate with other devices and may include, in particular, one or more transceiver circuits or interface circuits.
Wherein the processor 910 may be coupled to a memory 920. The memory 920 may be used to store the program codes and data. Accordingly, the memory 920 may be a storage unit internal to the processor 910, an external storage unit independent of the processor 910, or a component including a storage unit internal to the processor 910 and an external storage unit independent of the processor 910.
Optionally, computing device 900 may also include a bus. The memory 920 and the communication interface 930 may be connected to the processor 910 through a bus. The bus may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, an unbiased line is shown in FIG. 5, but does not represent only one bus or one type of bus.
It should be appreciated that in embodiments of the present application, the processor 910 may employ a central processing unit (central processing unit, CPU). The processor may also be other general purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), off-the-shelf programmable gate arrays (field programmable gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Or the processor 910 may employ one or more integrated circuits for executing associated programs to perform techniques provided by embodiments of the present application.
The memory 920 may include read only memory and random access memory and provide instructions and data to the processor 910. A portion of the processor 910 may also include nonvolatile random access memory. For example, the processor 910 may also store information of the device type.
When the computing device 900 is running, the processor 910 executes computer-executable instructions in the memory 920 to perform any of the operational steps of the methods described above, as well as any of the alternative embodiments.
It should be understood that the computing device 900 according to the embodiments of the present application may correspond to a respective subject performing the methods according to the embodiments of the present application, and that the above and other operations and/or functions of the respective modules in the computing device 900 are respectively for implementing the respective flows of the methods according to the embodiments, and are not described herein for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The embodiments of the present application also provide a computer-readable storage medium having stored thereon a computer program for executing the above-described method when executed by a processor, the method comprising at least one of the aspects described in the respective embodiments above.
The computer storage media of embodiments of the application may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
In addition, the terms "first, second, third, etc." or module a, module B, module C, etc. in the description and the claims are used merely to distinguish similar objects from a specific ordering of the objects, it being understood that the specific order or sequence may be interchanged if allowed to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described.
In the above description, reference numerals indicating steps such as S110, S120, … …, etc. do not necessarily indicate that the steps are performed in this order, and the order of the steps may be interchanged or performed simultaneously as the case may be.
The term "comprising" as used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Thus, it should be interpreted as specifying the presence of the stated features, integers, steps or components as referred to, but does not preclude the presence or addition of one or more other features, integers, steps or components, or groups thereof. Thus, the expression "a device comprising means a and B" should not be limited to a device consisting of only components a and B.
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Thus, appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments as would be apparent to one of ordinary skill in the art from this disclosure.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the above embodiments, but may include many other equivalent embodiments without departing from the spirit of the application, which fall within the scope of the application.

Claims (10)

1. A method for BFD event processing, comprising:
receiving a BFD session timeout event reported by a BFD process through the OSPF process, and increasing an overhead value of an OSPF interface to trigger the OSPF process to recalculate a flow path of network traffic;
sending a ping packet to neighbor equipment corresponding to the interface through an OSPF process; wherein the neighbor device comprises a neighbor device having a neighbor relationship with the interface;
when receiving a response message of the neighbor device to the ping packet through an OSPF process is normal, maintaining the neighbor relation and maintaining an overhead value of the OSPF interface as an increased value;
and deleting the neighbor relation when the response message of the neighbor equipment to the ping packet is abnormal through an OSPF process.
2. The method of claim 1 wherein said increasing the overhead value of the OSPF interface comprises:
and increasing the overhead value in the LSA message of the OSPF interface.
3. The method of claim 1, wherein the sending, by the OSPF process, a ping packet to a neighbor device corresponding to the interface comprises:
sending a plurality of ping packets to neighbor equipment corresponding to the interface through an OSPF process;
when the response message of the neighbor device to the ping packet is received normally through an OSPF process, and when the response message of the neighbor device to the ping packet is received abnormally through the OSPF process, the method comprises the following steps:
when response messages of the neighbor devices to the ping packet in a preset proportion are received through an OSPF process, the response messages are indicated to be normal;
and when response messages of the neighbor devices to the ping packet in a preset proportion are not received through the OSPF process, the abnormal receiving of the response messages is indicated.
4. The method of claim 1, further comprising, after maintaining the neighbor relation:
and when the BFD session UP event reported by the BFD process is received through the OSPF process, recovering the overhead value of the OSPF interface to be the value before the increase.
5. The method of claim 1, further comprising, after deleting the neighbor relation:
and recovering the overhead value of the OSPF interface to be a value before increasing.
6. The method of claim 1, further comprising, after receiving a BFD session timeout event reported by a BFD process by the OSPF process:
acquiring a set BFD event processing mark, and if the BFD event processing mark is valid, increasing an overhead value of an OSPF interface; and if the BFD event processing mark is invalid, deleting the neighbor relation through an OSPF process.
7. A method of network monitoring, comprising:
configuring an OSPF interface to be linked with BFD;
establishing a neighbor relation of neighbor equipment corresponding to the interface through an OSPF process, and establishing a BFD session with the neighbor equipment through a BFD process, wherein the BFD session is used for monitoring a link state from the interface to the neighbor equipment;
the BFD event processing method of any of claims 1-6 is performed when a BFD session timeout event occurs.
8. A BFD event processing apparatus, comprising:
the BFD event processing module is used for receiving the BFD session timeout event reported by the BFD process through the OSPF process, and increasing the overhead value of the OSPF interface to trigger the OSPF process to recalculate the flow path of the network flow;
the ping packet sending module is used for sending a ping packet to the neighbor equipment corresponding to the interface through an OSPF process; wherein the neighbor device comprises a neighbor device having a neighbor relationship with the interface;
the BFD event processing module is further configured to:
when receiving a response message of the neighbor device to the ping packet through an OSPF process is normal, maintaining the neighbor relation and maintaining an overhead value of the OSPF interface as an increased value;
and deleting the neighbor relation when the response message of the neighbor equipment to the ping packet is abnormal through an OSPF process.
9. A computing device, comprising:
a processor, and
a memory having stored thereon program instructions that, when executed by the processor, cause the processor to perform the method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that it has stored thereon program instructions, which when executed by a computer, cause the computer to perform the method of any of claims 1 to 7.
CN202311345597.9A 2023-10-17 2023-10-17 BFD event processing method and device and network monitoring method using same Pending CN117221192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311345597.9A CN117221192A (en) 2023-10-17 2023-10-17 BFD event processing method and device and network monitoring method using same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311345597.9A CN117221192A (en) 2023-10-17 2023-10-17 BFD event processing method and device and network monitoring method using same

Publications (1)

Publication Number Publication Date
CN117221192A true CN117221192A (en) 2023-12-12

Family

ID=89044561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311345597.9A Pending CN117221192A (en) 2023-10-17 2023-10-17 BFD event processing method and device and network monitoring method using same

Country Status (1)

Country Link
CN (1) CN117221192A (en)

Similar Documents

Publication Publication Date Title
US9571383B2 (en) Rerouting technique
EP2243255B1 (en) Method and system for dynamic link failover management
KR101706439B1 (en) Redundant network connections
EP2533475B1 (en) Method and system for host route reachability in packet transport network access ring
EP3029883B1 (en) Network protection method and apparatus, next-ring node, and system
CN110891018B (en) Network traffic recovery method and device, SDN controller and storage medium
CN111447101B (en) Link detection method, device, computer equipment and storage medium
US9313090B2 (en) Tunnel fault detection method and traffic engineering node
CN110417564B (en) Full-mesh link protection method, device, equipment and storage medium
WO2012062069A1 (en) Method and device for sending bidirectional forwarding detection message
JP4532253B2 (en) Frame transfer apparatus and frame loop suppression method
US10033573B2 (en) Protection switching method, network, and system
WO2021109997A1 (en) Anti-fiber breakage method and device for segment routing tunnel, ingress node and storage medium
JP5004758B2 (en) Layer 2 network and network connection device
EP2523401B1 (en) Virtual networks within a physical network
KR101589384B1 (en) Method of failover for bgp routing
CN117221192A (en) BFD event processing method and device and network monitoring method using same
CN113872860B (en) Path switching method and device
EP2953299B1 (en) Protection switching method, system and node
CN107623607B (en) BFD session connection establishment method and device
CN112637054B (en) Networking optimization method and device for IP bearing network, computing equipment and storage medium
WO2021115162A1 (en) Link protection method, device, ingress node, and storage medium
CN112564931B (en) Fault processing method, device and storage medium
CN117768382A (en) Backup link switching method, device, medium and equipment for realizing redundant DRP (data packet processing) ring
CN114363342A (en) Fault convergence method and related device and load balancing cluster thereof

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