CN112152919A - Route maintenance method, device, equipment and computer readable storage medium - Google Patents

Route maintenance method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112152919A
CN112152919A CN202011009984.1A CN202011009984A CN112152919A CN 112152919 A CN112152919 A CN 112152919A CN 202011009984 A CN202011009984 A CN 202011009984A CN 112152919 A CN112152919 A CN 112152919A
Authority
CN
China
Prior art keywords
destination
address
packet loss
route
forwarding layer
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
CN202011009984.1A
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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202011009984.1A priority Critical patent/CN112152919A/en
Publication of CN112152919A publication Critical patent/CN112152919A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Abstract

The application provides a route maintenance method, which is applied to a network device, wherein the network device comprises a control layer and a forwarding layer, and the method comprises the following steps: the forwarding layer detects whether the network equipment is in an abnormal packet loss state; if the network equipment is in an abnormal packet loss state, the forwarding layer inquires a target IP address carried in each packet loss message and feeds back each inquired target IP address to the control layer; after the control layer receives each destination IP address fed back by the forwarding layer, for each destination IP address, if the correct route of the destination IP address exists in the routing table, the correct route of the destination IP address is issued to the forwarding layer again. The method and the device can automatically recover the route when the route is abnormal, so that the network can recover normal operation as soon as possible.

Description

Route maintenance method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for maintaining a route.
Background
At present, in an existing network device, the network device includes a control layer and a forwarding layer, and in an actual working process of the network device, there are a plurality of kinds of information that may cause forwarding of the control layer to be incorrectly issued to the forwarding layer. In particular, if there are abnormal or unpredictable problems with the network devices that result in the change of routes not being correctly notified to the forwarding layer, these problems can cause significant network problems, and common triggering conditions that cause route changes include: the method includes the steps of main/standby device switching, abnormal board card restarting, Address Resolution Protocol (ARP) table item updating, dynamic routing change, interface oscillation and the like.
When the traffic is abnormal, in the existing solution, the network device may notify the administrator of the abnormal traffic condition through log feedback or direct feedback by the user, and after the administrator checks the abnormal traffic packet loss, the administrator determines the direct reason for the packet loss and re-issues the configuration recovery network. By the adoption of the solving method, unknown bugs (namely bugs) can be accurately found, and problems can be correctly solved. However, the solution has the defects of long problem solving period and long network influencing time.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, a device, and a computer-readable storage medium for route maintenance, which can automatically recover a route when the route is abnormal, so as to enable a network to recover normal operation as soon as possible.
Specifically, the method is realized through the following technical scheme:
a route maintenance method is applied to a network device, the network device comprises a control layer and a forwarding layer, and the method comprises the following steps:
the forwarding layer detects whether the network equipment is in an abnormal packet loss state;
if the network equipment is in an abnormal packet loss state, the forwarding layer inquires a destination IP address carried in each packet loss message and feeds back each inquired destination IP address to the control layer;
after the control layer receives each destination IP address fed back by the forwarding layer, for each destination IP address, if the correct route of the destination IP address exists in the routing table, the correct route of the destination IP address is issued to the forwarding layer again.
A route maintenance apparatus, the apparatus being applied to a network device, the network device including a control layer and a forwarding layer, the apparatus comprising:
a detection unit, configured to detect, by the forwarding layer, whether the network device is in an abnormal packet loss state;
a feedback unit, configured to query, by the forwarding layer, a destination IP address carried in each packet-lost packet if the network device is in an abnormal packet loss state, and feed back each queried destination IP address to the control layer;
and the issuing unit is used for issuing the correct route of the destination IP address to the forwarding layer again for each destination IP address if the correct route of the destination IP address exists in a routing table after the control layer receives each destination IP address fed back by the forwarding layer.
An electronic device, comprising: a processor, a memory;
the memory for storing a computer program;
the processor is used for executing the route maintenance method by calling the computer program.
A computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the above-described route maintenance method.
According to the technical scheme provided by the application, the forwarding layer detects whether the network equipment is in an abnormal packet loss state; if the network equipment is in an abnormal packet loss state, the forwarding layer inquires a target IP address carried in each packet loss message and feeds back each inquired target IP address to the control layer; after the control layer receives each destination IP address fed back by the forwarding layer, for each destination IP address, if the correct route of the destination IP address exists in the routing table, the correct route of the destination IP address is issued to the forwarding layer again. In the embodiment of the application, the control layer inquires the correct route of the packet loss and issues the correct route to the forwarding layer, so that the forwarding layer can forward the packet loss based on the correct route.
Drawings
Fig. 1 is a schematic flow chart of a route maintenance method according to the present application;
FIG. 2 is a message diagram of the present application;
FIG. 3 is a schematic diagram of a route maintenance device shown in the present application;
fig. 4 is a schematic structural diagram of an electronic device shown in the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, fig. 1 is a flowchart illustrating a route maintenance method according to an embodiment of the present application, where the method is applied to a network device, and the network device may include a control layer and a forwarding layer. Specifically, in this embodiment of the present application, the network device may belong to a frame-type framework device, where the frame-type framework device includes a plurality of slot positions, one of the slot positions is a master control board, and service boards are inserted into other slot positions; the main control board, that is, the control layer, may have an independent Central Processing Unit (CPU); the service board, that is, the forwarding layer, may have an independent CPU and a Field-Programmable Gate Array (FPGA for short), where the FPGA is a chip that can change an internal structure through programming, and network traffic may be processed on the service board, that is, forwarding may be performed on the CPU of the service board or may be performed on the FPGA of the service board.
The route maintenance method shown in fig. 1 includes the following steps S101 to S103:
s101: the forwarding layer detects whether the network equipment is in an abnormal packet loss state;
s102: if the network equipment is in an abnormal packet loss state, the forwarding layer inquires a target IP address carried in each packet loss message and feeds back each inquired target IP address to the control layer;
s103: after the control layer receives each destination IP address fed back by the forwarding layer, for each destination IP address, if the correct route of the destination IP address exists in the routing table, the correct route of the destination IP address is issued to the forwarding layer again.
The following specifically describes each of the above steps S101 to S103.
First, S101 will be specifically described.
In S101, a forwarding layer (i.e., a service board CPU or a service board FPGA) may count data packets received by a network device and lost data packets (i.e., packet loss), store the counts, and determine whether to trigger abnormal detection on a packet loss state of the network device based on the count results.
In this embodiment, when a large number of data packets received by the network device are increased, it is not necessary to detect whether the packet loss state is abnormal; on the contrary, the network device can detect whether the packet loss state is abnormal or not under the condition that the number of the data packets received by the network device is not increased obviously.
In an implementation manner of the embodiment of the present application, the forwarding layer may determine whether to trigger the anomaly detection according to the following manner, and therefore, before S101, the method may further include step a 1-step A3:
step A1: and counting the number of the data packets received by the network equipment by taking the first preset time length as an interval.
The time length of the first preset time period is not limited in the embodiment, for example, the first preset time period is 5 minutes.
The forwarding layer may count the number of data packets received within a first preset time interval every time the first preset time interval elapses, for example, the forwarding layer may count the number of data packets received within a 5 minute interval every time the forwarding layer receives data packets within a 5 minute interval.
Step A2: and taking the number of the data packets obtained by the last statistics as a first total packet count, and taking the number of the data packets obtained by the current statistics as a second total packet count.
For convenience of illustration, the first total packet count may be denoted as t1 and the second total packet count may be denoted as t 2.
For example, if the first preset time duration in step a1 is 5 minutes, in this step a2, the number of packets counted in the last 5 minutes is t1, and the number of packets counted in the current 5 minutes is t 2.
Step A3: if the difference between the second total packet count and the first total packet count is less than or equal to the first preset multiple of the first total packet count, step S101 is executed.
The first preset multiple may be denoted as a, and the first preset multiple is greater than 0 and less than 1, for example, the first preset multiple is 0.25. In this embodiment, when (t2-t1) > a × t1, it is considered that a large number of packets received by the network device are significantly increased, and at this time, it may not be detected whether the packet loss state of the network device is abnormal; on the contrary, when (t2-t1) is less than or equal to a × t1, it is determined that the number of data packets received by the network device is not significantly increased, and at this time, it may be determined whether the packet loss state of the network device is abnormal.
When the number of data packets received by the network device is not increased significantly, if the number of packet losses of the network device is increased significantly, it may be determined that the network device is in an abnormal packet loss state. In an implementation manner of the embodiment of the present application, the forwarding layer may detect whether the network device is in an abnormal packet loss state according to the following manner, that is, the S101 may specifically include steps B1-B2:
step B1: and counting the total packet loss of the network equipment by taking the first preset time length as an interval.
The forwarding layer may count the total packet loss of the network device once every first preset time interval, for example, once every 5 minutes.
Step B2: and if the total packet loss obtained by the current statistics is a second preset multiple of the historical statistics result, determining that the network equipment is in an abnormal packet loss state, wherein the historical statistics result is the average packet loss number of every second preset time period in a specified time period before the current statistics time.
For example, assuming that the first preset time duration in step B1 is 5 minutes, and the "total packet loss counted currently" in step B2 is the total packet loss in 6:00-6:05 in the afternoon of the current day, the "current statistical time" in step B2 is 6: 05; and the "specified time period before the current statistical time" in step B2 may be the time from the day's zero point to 6:05 pm of the day, or may be 24 hours before 6:05 pm of the day. It should be noted that, in this embodiment, the specific duration of the "specified time period before the current statistical time" is not limited, and may be preset manually according to the requirement.
In this embodiment, the second preset duration is less than the first preset duration, and the second preset multiple is greater than 1. However, the time length of the second preset time period is not limited in this embodiment, and the size of the multiple of the second preset time period is also not limited in this embodiment, for example, the second preset time period is 1 minute, and the second preset time period is 50 times.
In step B2, if the total packet loss obtained by the current statistics is a second preset multiple of the historical statistics result, it is determined that the network device is in an abnormal packet loss state. For example, if the packet loss total obtained by the current statistics is the packet loss total obtained by the statistics in the current 5 minutes, the historical statistics result is the average packet loss number per minute in the current 1 day, and the second preset multiple is 50, when the packet loss total in the current 5 minutes is 50 times of the average packet loss number per minute in the current 1 day, it is determined that the network device at this time belongs to the abnormal packet loss state.
It should be noted that the forwarding layer may calculate and store various types of data. For example, the total number of packets in 30 days, the total number of packets in 1 day, the average total number of packets in 1 day, the total number of packets per minute in 1 day, and the total number of packets per 5 minutes; the total number of lost packets in 30 days, the total number of lost packets in 1 day, the average number of lost packets in 1 day, the number of lost packets per minute in 1 day, the total number of lost packets in 5 minutes, and the like. The embodiment of the present application may select from these statistical manners, and use the statistical manner for the "first preset duration, the second preset duration" and the like in the above steps.
Next, S102 will be specifically described.
In S102, if the forwarding layer determines that the network device is in an abnormal packet loss state through S101, the forwarding layer may count the next packet losses, query a destination IP address of the packet in each packet loss, and feed back the queried different destination IP addresses to the control layer, so as to query whether each destination IP address has a corresponding correct route through S103.
In an implementation manner of this embodiment, the step S102 may specifically include the following steps C1-C3:
step C1: and counting each packet loss of the network equipment within a third preset time length.
When determining that the network device is in the abnormal packet loss state, the forwarding layer may count each packet loss of the network device in every third preset time period with a third preset time period as an interval, where the time length of the third preset time period is not limited in this embodiment, for example, the third preset time period is 5 minutes, and the third preset time period may be the same as or different from the first preset time period.
And executing subsequent steps for each packet loss counted in the current third preset time.
Step C2: and inquiring the destination IP address carried in each packet loss message, and counting packet loss counts corresponding to different destination IP addresses.
For each packet loss obtained by statistics within the current third preset time period, for example, each packet loss within continuous 5 minutes is counted, a destination IP address of a packet in each packet loss is recorded, for each different recorded destination IP address, a packet loss count corresponding to each IP address is counted, and the different destination IP addresses and the packet loss count corresponding to each destination IP address are recorded in an abnormal packet loss IP linked list, it needs to be noted that the abnormal packet loss IP linked list is emptied before the destination IP addresses are recorded.
It should be further noted that, in this embodiment, the specification of the abnormal packet loss IP linked list may be limited, for example, the specification of the abnormal packet loss IP linked list is 1 ten thousand nodes, that is, the abnormal packet loss IP linked list may record at most 1 ten thousand IP addresses and a packet loss count corresponding to each destination IP address.
Step C3: and sequencing all the target IP addresses according to the corresponding packet loss counts, selecting at least one target IP address based on the sequencing result, and feeding back the target IP address to the control layer.
For each different destination IP address recorded in the abnormal packet loss IP linked list, the destination IP addresses may be sorted according to their corresponding packet loss counts in a descending order, and then, a preset number of destination IP addresses sorted in the front is selected, for example, the first 100 destination IP addresses are selected. It can be understood that if the number of the destination IP addresses recorded in the abnormal packet loss IP linked list is less than the preset number, all the destination IP addresses recorded in the abnormal packet loss IP linked list are selected.
Then, the selected destination IP addresses are fed back to the control layer, so that the control layer inquires whether each destination IP address has its correct route through S103.
In this embodiment, the forwarding layer may feed back each destination IP address queried in S102 to the control layer in the following manner:
the forwarding layer sends a routing request message to the control layer, wherein the routing request message carries the inquired destination IP addresses.
Specifically, referring to the message diagram shown in fig. 2, at least one destination IP address (for example, the top 100 destination IP addresses in the abnormal packet loss IP linked list) selected based on the sorting result in step C3 may be assembled into the routing request message, and the forwarding layer sends the routing request message to the control layer, that is, the forwarding layer feeds back the destination IP addresses of the abnormal packet loss to the control layer. In addition, the number of times of sending the routing request message and the sending interval may be preset so that when the forwarding layer sends the routing request message to the control layer, the routing request message is sent according to the number of times of sending and the sending interval, for example, a timer may be set, and the sending is performed once per minute and five times in total, which aims to improve the possibility that the control layer receives the routing request message.
Next, S103 will be specifically described.
After the control layer receives each destination IP address fed back by the forwarding layer, the control layer can inquire a route in a route table according to each destination IP address, and for each destination IP address, if a route corresponding to the destination IP address is inquired, the control layer can determine that the route at the bottom layer is abnormal and needs to resend a correct route, so the control layer can put the destination IP address and route information into a route confirmation chain table and send the correct route of the destination IP address to the forwarding layer, and for a packet loss carrying the destination IP address in a message, the forwarding layer can forward the packet loss according to the correct route; otherwise, if the route corresponding to the destination IP address is not queried, the control layer does not have the route of the destination IP address, and at this time, the destination IP address may be placed in the route negative linked list.
In this embodiment, if the forwarding layer feeds back each destination IP address to the control layer by sending a routing request message to the control layer, the control layer may analyze the routing request message to obtain each destination IP address carried by the routing request message. Referring to fig. 2, for each destination IP address, when the control layer confirms that the correct route of the destination IP address exists in the routing table, the control layer may re-issue the correct route of the destination IP address to the forwarding layer by issuing a route confirmation message (the route confirmation message carries the correct route of the destination IP address) to the forwarding layer. In specific implementation, the control layer may compose a route confirmation message with each destination IP address and corresponding correct route information in the route confirmation linked list, and issue the route confirmation message to the forwarding layer, and the forwarding layer, after receiving the route confirmation message, parses the route information therein and stores the route information in the corresponding route table.
Further, in an implementation manner of the embodiment of the present application, after "the forwarding layer queries the destination IP address carried in each packet-lost packet" in S102, the method may further include: and recording packet loss counts corresponding to different destination IP addresses and different destination IP addresses in an abnormal packet loss IP linked list. For a description of this step, refer to the step C2 mentioned above, and the description thereof is omitted here.
Based on this, after "re-issuing the correct route of the destination IP address to the forwarding layer" in S103, the method may further include: and the forwarding layer clears the target IP address and the packet loss count corresponding to the target IP address from the abnormal packet loss IP linked list.
Specifically, if the forwarding layer receives the route confirmation message sent by the control layer, it can parse one or more destination IP addresses and correct route information of each destination IP address from the route confirmation message, so that the forwarding layer can correctly forward packet loss according to the route, and at the same time, can remove the parsed destination IP addresses from the abnormal packet loss IP linked list.
Further, after "for each destination IP address" in S103, the method may further include:
if the correct route of the destination IP address does not exist in the routing table of the control layer, the forwarding layer clears the destination IP address and the packet loss count corresponding to the destination IP address from the abnormal packet loss IP link table, and marks the destination IP address so as to not record the destination IP address in the abnormal packet loss IP link table when the destination IP address is inquired again.
Specifically, referring to fig. 2, for each destination IP address, when the control layer determines that the correct route of the destination IP address does not exist in the routing table, the control layer may form a route negative message from each destination IP address in the route negative linked list, and issue the route negative message to the forwarding layer, so as to inform the forwarding layer that the destination IP addresses do not have corresponding correct routes in the routing table of the control layer. If the forwarding layer receives the route negative message sent by the control layer, one or more destination IP addresses can be analyzed from the route negative message, and the analyzed destination IP addresses are removed from the abnormal packet loss IP chain table and marked.
At this time, the abnormal packet loss IP linked list is completely emptied, and the abnormal monitoring process of S101 is resumed, it should be noted that when the destination IP address of the packet in the packet loss is subsequently queried, if the queried destination IP address is the labeled destination IP address, the destination IP address is not put into the abnormal packet loss IP linked list.
In this embodiment, regarding the route acknowledgement message and the route negative message, the number of times of sending and the sending interval thereof may be preset so as to send according to the number of times of sending and the sending interval when the control layer sends the message to the forwarding layer, for example, a timer may be set, and the sending is performed once per minute and five times in total, which aims to improve the possibility that the forwarding layer receives the message.
In the route maintenance method provided by the embodiment of the application, a forwarding layer detects whether a network device is in an abnormal packet loss state; if the network equipment is in an abnormal packet loss state, the forwarding layer inquires a target IP address carried in each packet loss message and feeds back each inquired target IP address to the control layer; after the control layer receives each destination IP address fed back by the forwarding layer, for each destination IP address, if the correct route of the destination IP address exists in the routing table, the correct route of the destination IP address is issued to the forwarding layer again. In the embodiment of the application, the control layer inquires the correct route of the packet loss and issues the correct route to the forwarding layer, so that the forwarding layer can forward the packet loss based on the correct route.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a configuration of a route maintenance apparatus according to an embodiment of the present application, where the apparatus is applied to a network device, the network device includes a control layer and a forwarding layer, and the apparatus includes:
a detecting unit 310, configured to detect, by the forwarding layer, whether the network device is in an abnormal packet loss state;
a feedback unit 320, configured to, if the network device is in an abnormal packet loss state, query, by the forwarding layer, a destination IP address carried in each packet loss packet, and feed back, to the control layer, each queried destination IP address;
the issuing unit 330 is configured to, after the control layer receives each destination IP address fed back by the forwarding layer, for each destination IP address, if it is determined that a correct route of the destination IP address exists in the routing table, re-issue the correct route of the destination IP address to the forwarding layer.
In an embodiment of the present application, the apparatus further includes:
the statistical unit is used for counting the number of data packets received by the network equipment by taking a first preset time length as an interval before detecting whether the network equipment is in an abnormal packet loss state; taking the number of the data packets obtained by the last statistics as a first total packet count, and taking the number of the data packets obtained by the current statistics as a second total packet count; if the difference between the second total packet count and the first total packet count is less than or equal to a first preset multiple of the first total packet count, triggering the detection unit 310 to detect whether the network device is in an abnormal packet loss state, where the first preset multiple is greater than 0 and less than 1.
In this embodiment of the application, the detecting unit 310 is specifically configured to:
counting the total packet loss of the network equipment by taking the first preset time length as an interval;
if the total packet loss obtained by the current statistics is a second preset multiple of the historical statistical result, determining that the network equipment is in an abnormal packet loss state; the historical statistical result is the average packet loss number of every second preset time length in a specified time period before the current statistical time, the second preset multiple is greater than 1, and the second preset time length is smaller than the first preset time length.
In this embodiment of the application, the feedback unit 320 is specifically configured to:
counting each packet loss of the network equipment within a third preset time length;
inquiring the destination IP address carried in each packet loss message, and counting packet loss counts corresponding to different destination IP addresses;
and sequencing all the target IP addresses according to the corresponding packet loss counts, selecting at least one target IP address based on a sequencing result, and feeding back the target IP address to the control layer.
In this embodiment of the application, the feedback unit 320 is specifically configured to: sending a routing request message to the control layer, wherein the routing request message carries the inquired destination IP addresses;
correspondingly, the issuing unit 330 is specifically configured to: and sending a route confirmation message to the forwarding layer, wherein the route confirmation message carries the correct route of the destination IP address.
In an embodiment of the present application, the apparatus further includes:
a recording unit, configured to record, after querying, at the forwarding layer, a destination IP address carried in each packet-lost packet, packet-lost counts corresponding to different destination IP addresses and different destination IP addresses in an abnormal packet-lost IP linked list;
and the clearing unit is used for clearing the destination IP address and the packet loss count corresponding to the destination IP address from the abnormal packet loss IP chain table by the forwarding layer after the correct route of the destination IP address is re-issued to the forwarding layer.
In an embodiment of the present application, the apparatus further includes:
and a marking unit, configured to, for each destination IP address, if the routing table does not have a correct route for the destination IP address, clear, by the forwarding layer, the destination IP address and a packet loss count corresponding to the destination IP address from the abnormal packet loss IP link table, and mark the destination IP address so that when the destination IP address is queried again, the destination IP address is not recorded in the abnormal packet loss IP link table any more.
It should be noted that the detecting unit 310, the feedback unit 320, the counting unit, the recording unit, the clearing unit, and the marking unit may be a functional module in a forwarding layer, or a functional module outside the forwarding layer and the control layer; the issuing unit 330 may be a functional module in the control layer, or may be a functional module outside the forwarding layer and the control layer.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
An embodiment of the present application further provides an electronic device, a schematic structural diagram of the electronic device is shown in fig. 4, where the electronic device 4000 includes at least one processor 4001, a memory 4002, and a bus 4003, and the at least one processor 4001 is electrically connected to the memory 4002; the memory 4002 is configured to store at least one computer executable instruction, and the processor 4001 is configured to execute the at least one computer executable instruction to perform the steps of any one of the route maintenance methods as provided by any one of the embodiments or any one of the alternative embodiments of the present application.
Further, the processor 4001 may be an FPGA (Field-Programmable Gate Array) or other devices with logic processing capability, such as an MCU (micro controller Unit) and a CPU (Central processing Unit).
It should be noted that, the forwarding layer and the control layer in the embodiment of the present application may both have the electronic device, and are used to implement corresponding steps in the above-mentioned route maintenance method.
By applying the embodiment of the application, the control layer inquires the correct route of the packet loss and sends the correct route to the forwarding layer, so that the forwarding layer can forward the packet loss based on the correct route.
The embodiments of the present application further provide another computer-readable storage medium, which stores a computer program, where the computer program is used for implementing, when executed by a processor, the steps of any one of the route maintenance methods provided in any one of the embodiments or any one of the alternative embodiments of the present application.
The computer-readable storage medium provided by the embodiments of the present application includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random Access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Erasable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a readable storage medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer).
It should be noted that, in the embodiment of the present application, both the forwarding layer and the control layer may have the computer-readable storage medium, so as to implement the corresponding steps in the route maintenance method described above.
By applying the embodiment of the application, the control layer inquires the correct route of the packet loss and sends the correct route to the forwarding layer, so that the forwarding layer can forward the packet loss based on the correct route.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A route maintenance method is applied to a network device, the network device comprises a control layer and a forwarding layer, and the method comprises the following steps:
the forwarding layer detects whether the network equipment is in an abnormal packet loss state;
if the network equipment is in an abnormal packet loss state, the forwarding layer inquires a destination IP address carried in each packet loss message and feeds back each inquired destination IP address to the control layer;
after the control layer receives each destination IP address fed back by the forwarding layer, for each destination IP address, if the correct route of the destination IP address exists in the routing table, the correct route of the destination IP address is issued to the forwarding layer again.
2. The method according to claim 1, wherein before detecting whether the network device is in an abnormal packet loss state, the method further comprises:
counting the number of data packets received by the network equipment by taking a first preset time length as an interval;
taking the number of the data packets obtained by the last statistics as a first total packet count, and taking the number of the data packets obtained by the current statistics as a second total packet count;
and if the difference between the second total packet count and the first total packet count is smaller than or equal to a first preset multiple of the first total packet count, executing the step of detecting whether the network equipment is in an abnormal packet loss state, wherein the first preset multiple is larger than 0 and smaller than 1.
3. The method of claim 2, wherein the detecting whether the network device is in an abnormal packet loss state comprises:
counting the total packet loss of the network equipment by taking the first preset time length as an interval;
if the total packet loss obtained by the current statistics is a second preset multiple of the historical statistical result, determining that the network equipment is in an abnormal packet loss state; the historical statistical result is the average packet loss number of every second preset time length in a specified time period before the current statistical time, the second preset multiple is greater than 1, and the second preset time length is smaller than the first preset time length.
4. The method according to claim 1, wherein the querying a destination IP address carried in each packet-lost packet, and feeding back each queried destination IP address to the control layer comprises:
counting each packet loss of the network equipment within a third preset time length;
inquiring the destination IP address carried in each packet loss message, and counting packet loss counts corresponding to different destination IP addresses;
and sequencing all the target IP addresses according to the corresponding packet loss counts, selecting at least one target IP address based on a sequencing result, and feeding back the target IP address to the control layer.
5. The method according to claim 1, wherein the feeding back the queried respective destination IP addresses to the control layer comprises:
sending a routing request message to the control layer, wherein the routing request message carries the inquired destination IP addresses;
correspondingly, the re-issuing the correct route of the destination IP address to the forwarding layer includes:
and sending a route confirmation message to the forwarding layer, wherein the route confirmation message carries the correct route of the destination IP address.
6. The method according to any one of claims 1 to 5, wherein after the forwarding layer queries the destination IP address carried in each packet-lost packet, the method further includes:
recording packet loss counts corresponding to different destination IP addresses and different destination IP addresses in an abnormal packet loss IP chain table;
then, after the re-issuing the correct route of the destination IP address to the forwarding layer, the method further includes:
and the forwarding layer clears the target IP address and the packet loss count corresponding to the target IP address from the abnormal packet loss IP linked list.
7. The method of claim 6, further comprising:
for each destination IP address, if the routing table does not have a correct route of the destination IP address, the forwarding layer removes the destination IP address and the packet loss count corresponding to the destination IP address from the abnormal packet loss IP linked list, and marks the destination IP address so that when the destination IP address is queried again, the destination IP address is not recorded in the abnormal packet loss IP linked list any more.
8. A routing maintenance apparatus, applied to a network device, the network device including a control layer and a forwarding layer, the apparatus comprising:
a detection unit, configured to detect, by the forwarding layer, whether the network device is in an abnormal packet loss state;
a feedback unit, configured to query, by the forwarding layer, a destination IP address carried in each packet-lost packet if the network device is in an abnormal packet loss state, and feed back each queried destination IP address to the control layer;
and the issuing unit is used for issuing the correct route of the destination IP address to the forwarding layer again for each destination IP address if the correct route of the destination IP address exists in a routing table after the control layer receives each destination IP address fed back by the forwarding layer.
9. An electronic device, comprising: a processor, a memory;
the memory for storing a computer program;
the processor configured to execute the route maintenance method according to any one of claims 1 to 7 by calling the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the route maintenance method according to any one of claims 1 to 7.
CN202011009984.1A 2020-09-23 2020-09-23 Route maintenance method, device, equipment and computer readable storage medium Pending CN112152919A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011009984.1A CN112152919A (en) 2020-09-23 2020-09-23 Route maintenance method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011009984.1A CN112152919A (en) 2020-09-23 2020-09-23 Route maintenance method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112152919A true CN112152919A (en) 2020-12-29

Family

ID=73896197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011009984.1A Pending CN112152919A (en) 2020-09-23 2020-09-23 Route maintenance method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112152919A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516612A (en) * 2012-06-20 2014-01-15 北京华为数字技术有限公司 Method for generating routing table items in a distributed router, and distributed router
CN105939216A (en) * 2016-03-16 2016-09-14 杭州迪普科技有限公司 Message transmission method and device
WO2016154823A1 (en) * 2015-03-27 2016-10-06 华为技术有限公司 Data transmission method, apparatus and system
US20170026269A1 (en) * 2014-04-04 2017-01-26 Huawei Technologies Co., Ltd. OAM Packet Processing Method, Network Device, and Network System
CN107682257A (en) * 2017-11-21 2018-02-09 凌云天博光电科技股份有限公司 Data transmission method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516612A (en) * 2012-06-20 2014-01-15 北京华为数字技术有限公司 Method for generating routing table items in a distributed router, and distributed router
US20170026269A1 (en) * 2014-04-04 2017-01-26 Huawei Technologies Co., Ltd. OAM Packet Processing Method, Network Device, and Network System
WO2016154823A1 (en) * 2015-03-27 2016-10-06 华为技术有限公司 Data transmission method, apparatus and system
CN105939216A (en) * 2016-03-16 2016-09-14 杭州迪普科技有限公司 Message transmission method and device
CN107682257A (en) * 2017-11-21 2018-02-09 凌云天博光电科技股份有限公司 Data transmission method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱小琴等: "基于深度强化学习的电力通信网路由策略", 《科学技术创新》 *

Similar Documents

Publication Publication Date Title
US9485155B2 (en) Traffic analysis of data flows
CN108156046B (en) Distributed routing detection method and device
US7036049B2 (en) System and method for collecting statistics for a communication network
CN103081407B (en) Fail analysis device, trouble analysis system and failure analysis methods
CN101895446B (en) Detection method of broadcast storm and device thereof
CN109495567B (en) Static routing deployment method, device and system
CN107517110B (en) Single board configuration self-recovery method and device in distributed system
CN100495992C (en) Duplicated address detection method used for address conflict and network node equipment
CN105745870A (en) Removing lead filter from serial multiple-stage filter used to detect large flows in order to purge flows for prolonged operation
CN102904975A (en) Method and associated device for message processing
CN101188530B (en) Method and device for IPv4 and IPv6 network failure detection and location
JP2000306147A (en) Remote monitor system, automatic setting device of near end value for life-limited article management in the system, computer readable recording medium with stored automatic setting program
CN108234315A (en) Image network flow control protocol in a kind of virtualized network environment
GB2418799A (en) Managing network slowdown by identifying a hop along a path which exceeds a hop limit within the path.
US20190356593A1 (en) Data plane with heavy hitter detector
JPWO2015198400A1 (en) Financial product transaction system and financial product transaction control method
CN109144736A (en) A kind of method and device exporting alert message
CN102143011B (en) Device and method for realizing network protection
CN113812116A (en) Network behavior model construction method and device and computer readable medium
CN109067622A (en) State detection method, apparatus and network server
CN112152919A (en) Route maintenance method, device, equipment and computer readable storage medium
CN111835641B (en) Fault detection method, server and acquisition equipment
CN110855566A (en) Method and device for dragging upstream flow
CN107395523B (en) Control method and network architecture
JP5221594B2 (en) Network monitoring apparatus, network monitoring method, and network monitoring program

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201229

RJ01 Rejection of invention patent application after publication