A method for detecting and avoiding routing loops in a three-layer network
By encapsulating data packets from top to bottom in a layer three network and using the addressing rules of the IP protocol, detecting and evading the routing loop, the routing loop problem after network topology changes is solved, and the IP protocol network is realized. Loop detection and evasion.
Patent Information
- Application Number
- CN202211672411.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-12-26
AI Technical Summary
After the network topology changes, the network convergence speed does not match the packet forwarding speed, resulting in a contradictory routing loop problem in routing table entries.
By encapsulating data packets from top to bottom from the sender, using the addressing rules of the IP protocol, the routing loop is detected and circumvented in a layer three network. The specific steps include after the layer three forwarding device receives the detection message, network addressing is performed based on the destination IP address of the network layer, finding the IP address of the next hop network device, and identifying the loop by comparing the history table entry.
实现了在基于IP协议的网络中检测并规避任意位置的路由环路,解决了网络收敛速度与报文转发速度不匹配导致的路由环路问题,适用于动态和静态路由的网络。
Smart Images

Figure CN116319550B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method for detecting and avoiding routing loops in a three-layer network. Background Art
[0002] In the field of network engineering, in medium and large-scale three-layer networking scenarios. When there are a large number of network elements in the network and the network topology is large, routing loops often occur due to uncoordinated network convergence speed or operation and maintenance errors. This problem causes data packets to be continuously sent in a loop in the network, making it impossible for the network to converge normally, and ultimately causing a serious waste of network resources. Since the routing forwarding equipment in the network cannot automatically sense the network routing loop that causes the loop, when the network operation and maintenance personnel locate the location of the loop, a large amount of network resources have been wasted and even a series of concurrent problems have been caused. Therefore, it is necessary to propose more timely and effective solutions to this type of problem.
[0003] The existing technology reverse poisoning can solve the routing loop problem to a certain extent. This technology combines routing poisoning and horizontal splitting to ensure that all NEs in the network can receive update information of unreachable routes. The specific solution is:
[0004] 1. Horizontal Split Technology: The specific implementation principle of this technology is to not announce the route information again from the direction where the route information is learned, nor to learn the route information from the direction where the route information is announced. This ensures that the route information will only be updated and fed back in one direction in the NE of the network. For example Figure 1 The three routers NE1, NE2 and NE3 in the example: After NE2 learns the routing information of network B from NE1, it will no longer send routing announcements of network B to NE1. Similarly, NE3 will not send routing announcements of network B to NE2. When network B is unreachable, NE1 will send routing updates of network B to NE2, but will not learn the routing updates of network B sent by NE2.
[0005] 2. Route poisoning technology: The specific implementation of this technology is that when a route is perceived to be unreachable, the route information is marked as infinite in metric and an update is initiated to the entire network. For example, the three routers NE1, NE2 and NE3 in Figure 1: When NE1 finds that network B has a fault and the route is unreachable, it immediately marks the metric of network B's route information as infinite and initiates an update to the neighbors in the network, indicating that the path has failed; when other NEs in the network receive such updates, they notify their neighbors in turn to avoid the occurrence of network loops.
[0006] 3. Reverse poisoning technology: Using the example of split horizon and route poisoning technology, when NE1 finds that network B is unreachable, it starts to converge the network. When NE2 in the network receives the route unreachable message from NE1, it sends a route announcement with a metric value marked as infinite in the reverse direction to NE1. The process is executed in sequence to ensure that all routing devices in the network can complete convergence.
[0007] The existing reverse poisoning technology updates the routes to all routing devices in the network through the convergence of dynamic routing protocols when the network converges, thus avoiding the generation of routing loops when the network converges. However, since this technology relies on the convergence and dynamic update of routes in the network, it is not applicable in some scenarios, such as when a network is networked using static routes or when external routes are referenced, which leads to abnormal dynamic routing convergence.
[0008] In the existing network environment, there is a routing loop problem caused by the mismatch between the network convergence speed and the message forwarding speed after the network topology changes due to defects in the routing forwarding technology, resulting in conflicting routing table entries. Summary of the invention
[0009] The present invention aims at the routing loop problem caused by the conflicting routing table entries resulting from the mismatch between the network convergence speed and the message forwarding speed after the network topology changes due to the defects of routing forwarding technology. A method for detecting and avoiding routing loops in a three-layer network is proposed. By encapsulating data messages from the sending end from top to bottom, routing loops at any position can be detected and avoided in the network forwarding based on the IP protocol, thus solving the routing loop problem caused by the conflicting routing table entries resulting from the mismatch between the network convergence speed and the message forwarding speed after the network topology changes.
[0010] The specific implementation contents of the present invention are as follows:
[0011] A method for detecting and avoiding routing loops in a three-layer network. In a network that communicates based on a TCP / IP architecture, data messages are encapsulated from a sending end from top to bottom according to a five-layer structure; the five-layer structure includes: application layer, transport layer, network layer (DFL load layer), data link layer, and physical layer.
[0012] In order to better implement the present invention, further, when the three-layer forwarding device receives the DFL detection message, it first performs network addressing in the three-layer forwarding table according to the destination IP specified by the network layer, and then finds the next-hop network device IP address corresponding to the target network according to the three-layer forwarding table item matching rule, and finally rewrites and re-encapsulates the DFL detection message until the DFL detection message is sent to the target host.
[0013] In order to better implement the present invention, further, detecting a routing loop on a forwarding path specifically includes the following steps:
[0014] Step 1: The first forwarding loop detector specifies the destination IP address of the second forwarding loop detector and initiates DFL detection;
[0015] Step 2: The Layer 3 forwarding device receives the DFL detection message sent by the neighbor and decapsulates the DFL detection message to the network layer according to the set routing forwarding process;
[0016] Step 3: Obtain the destination IP information contained in the network layer, search the forwarding table of the Layer 3 forwarding device, and write the corresponding next hop information into the load information of the forwarding loop detector;
[0017] Step 4: The DFL detection message compares the next hop information of the current information with the next hop information entered last time according to the next hop information entered;
[0018] Step 5: If the historical record contains an entry that is the same as the currently entered next hop information, a routing loop announcement is triggered; if the DFL detection message does not find duplicate next hop information when it reaches the second forwarding loop detector, the routing loop announcement is not triggered.
[0019] In order to better implement the present invention, further, the specific operation of triggering the routing loop announcement in step 5 is: first, notify the current three-layer forwarding device, invalidate the corresponding forwarding table entry, and do not forward through the current entry, then switch the source and destination IP addresses of the DFL detection message, generate a DFL announcement message, and finally send the DFL announcement message back to the first loop detector and inform the loop location in the network. The DFL announcement message does not record the forwarded next hop information.
[0020] In order to better implement the present invention, further, the specific operation of not triggering the routing loop announcement in step 5 is: the first forwarding loop detector sends a DFL notification message indicating that there is no routing loop in the network path A->B to the second forwarding loop detector, and simultaneously triggers bidirectional loop detection, and the second forwarding loop detector initiates a DFL detection message with the destination IP address of the first forwarding loop detector to detect whether a routing loop is generated in the network path B->A.
[0021] In order to better implement the present invention, further, when there is no loop in the network path, the first forwarding loop detector initiates routing loop detection to the second forwarding loop detector, specifically including the following steps:
[0022] Step A1: the first forwarding loop detector sends a DFL detection message to the second forwarding loop detector;
[0023] Step A2: The DFL detection message records the next hop information of the destination address found by the layer 3 forwarding network node of the current layer 3 network forwarding device into the DFL message;
[0024] Step A3: When a DFL detection message records a new next hop information, the new next hop information is compared with the existing next hop information in the record. If no duplicate is found, the forwarding continues.
[0025] Step A4: When the DFL detection message arrives at the second forwarding loop detector, if no duplicate next-hop information is found, there is no loop in the path in the network from the first forwarding loop detector to the second forwarding loop detector, and the second forwarding loop detector sends a DFL notification message back to the first forwarding loop detector, informing that no routing loop is detected.
[0026] In order to better implement the present invention, further, when there is a loop in the network path, the first forwarding loop detector initiates routing loop detection to the second forwarding loop detector, specifically including the following steps:
[0027] Step B1: the first forwarding loop detector sends a DFL detection message to the second forwarding loop detector;
[0028] Step B2: The DFL detects that the message passes through the loop in the forwarding path for the first time, and records the corresponding next hop information into the forwarding loop detector load;
[0029] Step B3: The DFL detection message passes through the loop in the forwarding path for the second time, and the DFL detection message is forwarded to the loop again through the forwarding table entry. The DFL detection message will record the next hop information again. When the DFL detection message uses the recorded next hop information to compare with the historical record table entry, if it is found that the same next hop information already exists in the historical next hop information, a loop notification is triggered;
[0030] Step B4: Notify the current Layer 3 forwarding device to invalidate the corresponding forwarding table entry, thereby eliminating the loop;
[0031] Step B5: Change the source and destination IP addresses of the DFL detection message, and change the type of the DFL detection message to a DFL notification message;
[0032] Step B6: Sending a DFL notification message carrying the routing loop location and the loop forwarding entry back to the first loop detector.
[0033] The present invention has the following beneficial effects:
[0034] (1) The present invention encapsulates data packets from the sending end from top to bottom according to a logically rigorous five-layer structure, and can detect and avoid routing loops at any location in a network forwarding based on the IP protocol.
[0035] (2) The present invention is directly carried on the IP protocol and uses the IP addressing rules for detection. Regardless of whether the network is converged and forwarded by various types of dynamic routing or constructed by static routing, as long as data transmission is carried out through the IP protocol addressing rules, DFL can be applied in the network.
[0036] (3) When a loop is detected in the present invention, the DFL notification message will record the announced host name and repeated next hop information, accurately locating the location where the routing loop occurs.
[0037] (4) The present invention supports bidirectional loop detection. On the basis of unidirectional detection, loop detection is performed on the round-trip path, and time-based polling is supported. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the structure of the connection between the router and the network in the horizontal split technology;
[0039] Figure 2 It is a schematic diagram of the five-layer structure of the package;
[0040] Figure 3 This is a flowchart of DFL operations. DETAILED DESCRIPTION
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. It should be understood that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, and therefore should not be regarded as limiting the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technical personnel in this field without making creative work are within the scope of protection of the present invention.
[0042] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "disposed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0043] The complete English explanations of professional terms and abbreviations are as follows:
[0044] NE: Network Element. It consists of one or more disks or frames and can independently complete certain network data message forwarding functions. In a broad sense, it represents an element or device in the network, that is, the smallest unit that can be monitored and managed in network management.
[0045] TCP / IP: Transmission Control Protocol / Internet Protocol. It represents a protocol suite for data transmission between different networks, of which TCP and IP are the two most representative protocols. The TCP / IP protocol suite also represents a five-layer architecture, which includes the application layer, transport layer, network layer, data link layer, and physical layer from top to bottom.
[0046] Embodiment 1:
[0047] This embodiment proposes a method for detecting and avoiding routing loops in a three-layer network. Figure 2 As shown, in a network based on TCP / IP architecture for communication, data messages are encapsulated from top to bottom from the sending end according to a five-layer structure; the five-layer structure includes: application layer, transport layer, network layer (DFL load layer), data link layer, and physical layer.
[0048] When the Layer 3 forwarding device receives a DFL detection message, it first performs network addressing in the Layer 3 forwarding table according to the destination IP specified by the network layer, then finds the next-hop network device IP address corresponding to the target network according to the Layer 3 forwarding table entry matching rule, and finally rewrites and re-encapsulates the DFL detection message until the DFL detection message is sent to the target host.
[0049] Working principle: This embodiment can detect and avoid routing loops at any location in a network forwarded based on the IP protocol by encapsulating data packets from top to bottom from the sending end, thus solving the routing loop problem caused by conflicting routing table entries caused by the mismatch between the network convergence speed and the packet forwarding speed after the network topology changes. This embodiment uses the IP addressing rules for detection. Whether it is a network that is converged and forwarded by various dynamic routes or constructed by static routes, as long as data is transmitted through the IP protocol addressing rules, DFL can be applied in the network.
[0050] Embodiment 2:
[0051] This embodiment describes the specific steps of detecting a routing loop on a forwarding path based on the above-mentioned embodiment 1.
[0052] The specific steps include:
[0053] Step 1: The first forwarding loop detector specifies the destination IP address of the second forwarding loop detector and initiates DFL detection;
[0054] Step 2: The Layer 3 forwarding device receives the DFL detection message sent by the neighbor and decapsulates the DFL detection message to the network layer according to the set routing forwarding process;
[0055] Step 3: Obtain the destination IP information contained in the network layer, search the forwarding table of the Layer 3 forwarding device, and write the corresponding next hop information into the load information of the forwarding loop detector;
[0056] Step 4: The DFL detection message compares the next hop information of the current information with the next hop information entered last time according to the next hop information entered;
[0057] Step 5: If the historical record contains an entry that is the same as the currently entered next hop information, a routing loop announcement is triggered; if the DFL detection message does not find duplicate next hop information when it reaches the second forwarding loop detector, the routing loop announcement is not triggered.
[0058] The specific operation of triggering the routing loop announcement in step 5 is: first, notify the current three-layer forwarding device, invalidate the corresponding forwarding table entry, and do not forward through the current entry, then change the source and destination IP addresses of the DFL detection message, generate a DFL announcement message, and finally send the DFL announcement message back to the first loop detector and inform the loop location in the network. The DFL announcement message does not record the forwarded next hop information.
[0059] The specific operation of not triggering the routing loop announcement in step 5 is: the first forwarding loop detector sends a DFL announcement message indicating that there is no routing loop in the network path A->B to the second forwarding loop detector, and simultaneously triggers bidirectional loop detection, and the second forwarding loop detector initiates a DFL detection message with the destination IP address of the first forwarding loop detector to detect whether a routing loop is generated in the network path B->A.
[0060] When there is no loop in the network path, the first forwarding loop detector initiates routing loop detection to the second forwarding loop detector, specifically including the following steps:
[0061] Step A1: the first forwarding loop detector sends a DFL detection message to the second forwarding loop detector;
[0062] Step A2: The DFL detection message records the next hop information of the destination address found by the layer 3 forwarding network node of the current layer 3 network forwarding device into the DFL message;
[0063] Step A3: When a DFL detection message records a new next hop information, the new next hop information is compared with the existing next hop information in the record. If no duplicate is found, the forwarding continues.
[0064] Step A4: When the DFL detection message arrives at the second forwarding loop detector, if no duplicate next-hop information is found, there is no loop in the path in the network from the first forwarding loop detector to the second forwarding loop detector, and the second forwarding loop detector sends a DFL notification message back to the first forwarding loop detector, informing that no routing loop is detected.
[0065] When there is a loop in the network path, the first forwarding loop detector initiates routing loop detection to the second forwarding loop detector, specifically including the following steps:
[0066] Step B1: the first forwarding loop detector sends a DFL detection message to the second forwarding loop detector;
[0067] Step B2: The DFL detects that the message passes through the loop in the forwarding path for the first time, and records the corresponding next hop information into the forwarding loop detector load;
[0068] Step B3: The DFL detection message passes through the loop in the forwarding path for the second time, and the DFL detection message is forwarded to the loop again through the forwarding table entry. The DFL detection message will record the next hop information again. When the DFL detection message uses the recorded next hop information to compare with the historical record table entry, if it is found that the same next hop information already exists in the historical next hop information, a loop notification is triggered;
[0069] Step B4: Notify the current Layer 3 forwarding device to invalidate the corresponding forwarding table entry, thereby eliminating the loop;
[0070] Step B5: Change the source and destination IP addresses of the DFL detection message, and change the type of the DFL detection message to a DFL notification message;
[0071] Step B6: Sending a DFL notification message carrying the routing loop location and the loop forwarding entry back to the first loop detector.
[0072] The other parts of this embodiment are the same as those of the above-mentioned embodiment 1, and thus will not be described in detail.
[0073] Embodiment 3:
[0074] This embodiment is based on any one of the above embodiments 1-2. Figure 3 As shown, a specific embodiment is described in detail.
[0075] This embodiment proposes a method for detecting and avoiding routing loops that rely on layer 3 forwarding in TCP / IP, which is hereinafter referred to as DFL, Detector of Forward Loops. The method can detect and avoid routing loops at any location in a network that forwards based on the IP protocol.
[0076] In a network based on TCP / IP architecture, data packets are encapsulated from top to bottom from the sender according to a logically rigorous five-layer structure. After reaching the three-layer forwarding device in the network, the destination IP specified in the IP layer header is used to search the three-layer forwarding table for network addressing, and the next-hop network device IP address corresponding to the target network is found according to the forwarding table item matching rules. Finally, the message is rewritten and re-encapsulated until it is sent to the target host.
[0077] The implementation of DFL is carried on the IP layer. By recording and checking the next hop of routing forwarding, the node with loop in the network can be located. DFL message is identified by a specific protocol number in the IP header. When the message is looking up the routing forwarding table, if the next hop address information of the message is successfully found, the next hop information is recorded in the DFL message content. Figure 2 shown.
[0078] The implementation of DFL is a typical server-client mode, which is the same as the principle of conventional IP message forwarding. The DFL server A in the network initiates the first packet of the DFL detection message by specifying the destination IP address of the DFL server B in the network. When the DFL client device in the network (usually a three-layer forwarding device) receives the DFL detection message sent by the neighbor, it decapsulates the message to the network layer according to the conventional routing forwarding process. After obtaining the destination IP information contained in the network layer, it searches the device's forwarding table and writes the corresponding next hop information into the DFL load information. Each time the DFL detection message enters a next hop information, it will traverse and compare the next hop information entered previously. If the historical record contains an entry that is the same as the next hop information entered this time, a routing loop notification will be triggered: 1. Notify the DFL client here, so that the corresponding forwarding table entry is invalid and no longer forwarded through this entry; 2. Reverse the source and destination IP addresses of the DFL message, and send the notification message back to DFL server A to inform the loop location in the network. The notification message no longer records the forwarded next hop information. If the DFL detection message does not find duplicate next hop information when it reaches DFL server B, the routing loop notification will not be triggered: DFL server B sends a notification message to DFL server A that there is no routing loop in the network path A->B, and at the same time triggers bidirectional loop detection. DFL server B initiates a DFL detection message with the destination IP address of DFL server A to detect whether a routing loop occurs in the network path B->A. The following uses a simple network topology Figure 3 Let's talk about the entire DFL operation process:
[0079] Scenario 1: DFL-Server1 initiates routing loop detection to DFL-Server2. There is no loop in the network.
[0080] Forwarding path: 1-2-3-4-5;
[0081] 1. Server1 sends a DFL detection message to Server2, with the source IP address being IP1-1 and the destination IP address being IP5-2;
[0082] 2. Every time the detection message passes through a layer 3 forwarding network node that is a DFL client, the node's next hop information of the destination address found is recorded in the DFL message. In forwarding path 1, the recorded next hop information is IP1-2; in forwarding path 2, the recorded next hop information is IP2-2, and so on;
[0083] 3. Every time a new next hop information is recorded in the detection message, the next hop information is compared with the existing next hop information in the record. When forwarding path 3, the next hop information is recorded as IP3-2, and then IP3-2 is compared with the already recorded IP2-2 and IP1-2. If no duplicates are found, forwarding continues;
[0084] 4. When the detection message reaches Server2, if no next-hop information duplication is found, it is considered that there is no loop in the path Server1-Server2 in the network. At this time, Server2 sends a notification message back to Server1 to inform that no routing loop is detected;
[0085] 5. If bidirectional detection is enabled, Server2 will simultaneously send a DFL detection message with source IP address IP5-2 and destination IP address IP1-1. The workflow of the detection message in the network is the same as step 2-4.
[0086] Scenario 2: DFL-Server1 initiates routing loop detection to DFL-Server2, and a loop exists in the network;
[0087] Forwarding path: 1-2-6-7-8-6-7-8…;
[0088] 1. Server1 sends a DFL detection message to Server2, with the source IP address being IP1-1 and the destination IP address being IP5-2;
[0089] 2. When the detection message passes through forwarding paths 6, 7, and 8 for the first time, the corresponding next-hop information IP6-2, IP7-2, and IP3-1 will be recorded in the DFL payload;
[0090] 3. Due to the routing loop, when the message reaches DFL-Client2 for the second time, it will be forwarded to path 6 again through the forwarding table. At this time, the detection message will record the next hop information IP6-2 again. When the detection message uses IP6-2 to compare with the historical record table, it is found that the same next hop information IP6-2 already exists in the historical next hop information, which triggers a loop notification.
[0091] 4. First, invalidate the routing table entry corresponding to forwarding path 6 in DFL-Client2 to eliminate the loop. Then swap the source and destination IP addresses of the detection message, and change the DFL message type to a notification message. Finally, a DFL notification message carrying the routing loop location and the loop forwarding table entry will be sent back to Server1.
[0092] After receiving the DFL notification, Server1 informs the administrator of the loop-related information in the network to help the administrator locate the loop point in the network;
[0093] The DFL message structure is constructed according to certain specifications, as shown in the following table;
[0094] Table 1 DFL message structure table
[0095]
[0096] The following are some of the fields explained:
[0097] 1. Version: used to identify the DFL message version, occupying 4 bits. Its main function is to ensure that the DFL node versions communicating within the network are consistent.
[0098] 2.TTL: Life cycle, occupies 8 bits. It is used to identify the scope of the DFL message. The value decreases by one after each layer 3 forwarding device. The default value is 32 and can be customized.
[0099] 3. Type: Used to identify the type of DFL message, occupying 4 bits. Currently, it is mainly used to distinguish DFL detection messages from notification messages.
[0100] 4. Checksum: occupies 16 bits, this part stores the check result of the DFL header.
[0101] 5. Flag bit: used to mark various states of DFL messages in the network, occupying 16 bits. Currently including status-loop occurred, status-no loop detected, status-network unreachable (next hop not found), information-whether to enable dual-line detection
[0102] 6. Encryption: used to determine whether to encrypt or compress the data in the message, occupies 8 bits.
[0103] 7. Extension: reserved for future use, occupies 8 bits. The default value is all 0;
[0104] 8. Server host name: records the server information that sends the DFL message, occupying 32 bits. The default value is the IP address of the server's outbound interface, which can be customized on the server;
[0105] 9. Announcement host name: records the client information that sends back the DFL announcement, occupying 32 bits. The default value is the IP address of the client's outbound interface, which can be customized on the client. When the DFL message type is not changed to an announcement message, the value here is all 0;
[0106] In modern network construction with TCP / IP architecture as the mainstream, more than 90% of the networks are based on the forwarding rules of IP protocol addressing for data transmission. The DFL method is directly carried on the IP protocol. Whether it is a network that is converged and forwarded by various dynamic routes or constructed by static routes, as long as data is transmitted through the addressing rules of the IP protocol, DFL can be applied in the network. In addition, the DFL detection method starts from the starting point of the forwarding path, and can enter and compare all the next hop information in the path, and can accurately detect all routing loops on the forwarding path.
[0107] The other parts of this embodiment are the same as any of the above embodiments 1-2, so they are not repeated here.
[0108] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for detecting and avoiding routing loops in a three-layer network, characterized in that: When the Layer 3 forwarding device receives the DFL detection message, it first searches for the network address in the Layer 3 forwarding table according to the destination IP address specified by the network layer, then finds the next-hop network device IP address corresponding to the target network according to the Layer 3 forwarding table entry matching rule, and finally rewrites and re-encapsulates the DFL detection message until the DFL (Detector of Forward Loops) detection message is sent to the target host. Detecting a routing loop on a forwarding path specifically includes the following steps: Step 1: The first forwarding loop detector specifies the destination IP address of the second forwarding loop detector and initiates DFL detection; Step 2: The Layer 3 forwarding device receives the DFL detection message sent by the neighbor and decapsulates the DFL detection message to the network layer according to the set routing forwarding process; Step 3: Obtain the destination IP information contained in the network layer, search the forwarding table of the Layer 3 forwarding device, and write the corresponding next hop information into the load information of the forwarding loop detector; Step 4: The DFL detection message compares the next hop information of the current information with the next hop information entered last time according to the next hop information entered; Step 5: If the historical record contains an entry that is the same as the currently entered next hop information, a routing loop notification is triggered; if the DFL detection message does not find duplicate next hop information when it reaches the second forwarding loop detector, the routing loop notification is not triggered; The specific operation of triggering the routing loop notification in step 5 is: first, notify the current three-layer forwarding device, invalidate the corresponding forwarding table entry, and do not forward through the current entry, then change the source and destination IP addresses of the DFL detection message, generate a DFL notification message, and finally send the DFL notification message back to the first loop detector and inform the loop location in the network. The DFL notification message does not record the forwarded next hop information; The specific operation of not triggering the routing loop announcement in step 5 is: the first forwarding loop detector sends a DFL announcement message indicating that there is no routing loop in the network path A->B to the second forwarding loop detector, and simultaneously triggers bidirectional loop detection, and the second forwarding loop detector initiates a DFL detection message with the destination IP address of the first forwarding loop detector to detect whether a routing loop is generated in the network path B->A.
2. A method for detecting and avoiding routing loops in a three-layer network as claimed in claim 1, characterized in that: When there is no loop in the network path, the first forwarding loop detector initiates routing loop detection to the second forwarding loop detector, specifically including the following steps: Step A1: the first forwarding loop detector sends a DFL detection message to the second forwarding loop detector; Step A2: The DFL detection message records the next hop information of the destination address found by the layer 3 forwarding network node of the current layer 3 network forwarding device into the DFL message; Step A3: When a DFL detection message records a new next hop information, the new next hop information is compared with the existing next hop information in the record. If no duplicate is found, the forwarding continues. Step A4: When the DFL detection message arrives at the second forwarding loop detector, if no duplicate next-hop information is found, there is no loop in the path in the network from the first forwarding loop detector to the second forwarding loop detector, and the second forwarding loop detector sends a DFL notification message back to the first forwarding loop detector, informing that no routing loop is detected.
3. A method for detecting and avoiding routing loops in a three-layer network as claimed in claim 1, characterized in that: When there is a loop in the network path, the first forwarding loop detector initiates routing loop detection to the second forwarding loop detector, specifically including the following steps: Step B1: the first forwarding loop detector sends a DFL detection message to the second forwarding loop detector; Step B2: The DFL detects that the message passes through the loop in the forwarding path for the first time, and records the corresponding next hop information into the forwarding loop detector load; Step B3: The DFL detection message passes through the loop in the forwarding path for the second time, and the DFL detection message is forwarded to the loop again through the forwarding table entry. The DFL detection message will record the next hop information again. When the DFL detection message uses the recorded next hop information to compare with the historical record table entry, if it is found that the same next hop information already exists in the historical next hop information, a loop notification is triggered; Step B4: Notify the current Layer 3 forwarding device to invalidate the corresponding forwarding table entry, thereby eliminating the loop; Step B5: Change the source and destination IP addresses of the DFL detection message, and change the type of the DFL detection message to a DFL notification message; Step B6: Sending a DFL notification message carrying the routing loop location and the loop forwarding entry back to the first loop detector.
Citation Information
Patent Citations
System and method for tunnel-based malware detection
US20200389469A1
Message processing method and network device
WO2017129011A1
