A method for quickly updating routing in OLSR protocol

By introducing MPR nodes into the OLSR protocol to generate TC messages and manage routing tables and duplicate sets, and independently update routes, the problems of large routing update calculations and repeated calculations in the OLSR protocol are solved, and a more efficient routing update process is achieved.

CN119789180BActive Publication Date: 2025-09-30THE 54TH RESEARCH INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY GROUP CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411870614.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-09-30
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

The OLSR protocol requires a large amount of computation and involves repeated calculations when updating routes. Especially when some routing information changes, the existing method needs to recalculate all routes, resulting in low efficiency.

Method used

A routing update method based on the periodic generation of TC messages by MPR nodes is adopted. By defining routing tables and repeat sets, routes to different nodes are updated independently to avoid repeated calculations. This includes the management of routing destination addresses, next-hop addresses, number of hops, validity period, and priority, as well as conditional judgment and processing rules for TC messages.

Benefits of technology

This reduces repeated calculations during the routing update process, improves the update efficiency, and makes routing updates more concise and efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119789180B_ABST
    Figure CN119789180B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of wireless self-organizing networks, and in particular to a method for quickly updating routes in an OLSR protocol. When a node receives a TC message, it determines whether enough routing information has been recorded based on the records in the repeated set. If it is the latest message and more routes can be recorded, the determination is continued; if it is the first time the message is received, the route set reaching the node from which the message originates is cleared. Then, a route pointing to the address from which the message originates is recorded, with its next hop address being the source address of the IP packet header to which the message belongs; and the route set with the node from which the message originates as the penultimate hop is cleared. Then, for each non-MPR node carried in the message, a route pointing to the node address is recorded, with its next hop address being the source address of the IP packet header to which the message belongs. The present invention does not need to recalculate all routes reaching all nodes in the network each time, thus avoiding a large amount of repeated calculations and making the update process more concise and efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless self-organizing networks, and in particular to a fast routing update method in an OLSR protocol used in wireless self-organizing networks. Background Art

[0002] In the OLSR protocol, whenever information in the link set, neighbor set, two-hop neighbor set, or topology set changes, a node must update its routing table. The node first deletes all entries in the current routing table. Then, based on the information in the link set and neighbor set, it re-establishes routing entries for all one-hop neighbors. Next, based on the information in the two-hop neighbor set, it re-establishes routing entries for all two-hop neighbors. After these steps are complete, the node searches the topology set and existing routing entries for the corresponding information, sequentially establishing routing entries for more distant nodes until all routing entries for all other nodes in the network have been re-established.

[0003] The main problems with the above methods are:

[0004] 1. Every time the route is updated, the routing table must be cleared first and then all routes are recalculated, so the amount of calculation is very large.

[0005] 2. The information change that triggers the route update sometimes only affects some routes. In this case, recalculating all routes means that many calculations are actually repeated. Summary of the Invention

[0006] The current route update method in the OLSR protocol is computationally intensive and requires a lot of repeated calculations. To address this problem, the present invention designs a route update method that can independently update routes to different nodes, avoiding a large amount of repeated calculations and completing route updates more quickly.

[0007] The technical solution adopted in the present invention is:

[0008] A method for quickly updating routes in an OLSR protocol includes the following steps:

[0009] Step 1: Select an MPR node according to the MPR selection method. The MPR node periodically generates a TC message containing symmetric one-hop neighbors that are not MPRs. The node's routing table and repeat set are defined. Each entry in the routing table includes the destination address R_dest_addr of the route and the set of routes to the destination address. The routing set records multiple routes, each of which includes the next hop address R_next_addr, the last address before reaching the destination address R_last_addr, the number of hops R_dist, the validity period R_time, and the priority R_priority. The repeat set includes the number of records D_rec_num, the originator address of the message, and the message sequence number Message Sequence Number.

[0010] Step 2: When a node receives a TC message, it forwards it immediately if it can be forwarded according to the current rules. It also checks whether the TC message meets any of the following conditions. If so, it does not participate in the routing update. If not, it records it in the duplicate set and increases the number of records D_rec_num by 1. Then, it executes step 3.

[0011] 1) The message's Originator Address and Message Sequence Number combination has been recorded in the duplicate set, and the number of records with the same value for this combination exceeds a predefined threshold;

[0012] 2) The Message Sequence Number of the message is smaller than the largest Message Sequence Number among all messages with the same OriginatorAddress recorded in the duplicate set;

[0013] Step 3: Process the originator address in the message:

[0014] If this is the first time this TC message is received, all routes with the Originator Address as the destination address in the current routing table are deleted;

[0015] Add a route with the Originator Address as the destination address. If this is the first time this TC message is received, the priority is set to the highest level. After the first time this TC message is received, the priority is lowered.

[0016] Step 4: Process the existing route with Originator Address as R_last_addr:

[0017] If the number of records in the duplicate set D_rec_num is 1, the route with the originator address as R_last_addr in the route set of each routing table entry is deleted, and the R_priority of each route is adjusted according to the R_dist of the remaining routes in the set. The route with the smaller hop count has a higher priority.

[0018] Step 5: Process each Advertised Neighbor Main Address in the message:

[0019] Add a route with the Advertised Neighbor Main Address as the destination address. Record the hop count of this route as the hop count in the message plus 1. Adjust the priority of multiple routes with the same destination address. The one with the smaller hop count has a higher priority.

[0020] Furthermore, the following processes are also included:

[0021] Step 6: When a node discovers a new symmetric one-hop neighbor, it updates the route according to the following rules:

[0022] Add a route with the new symmetric one-hop neighbor's address as the destination address, set its priority to the highest level, and reduce the priority of other existing routes with the new symmetric one-hop neighbor's address as the destination address by one level.

[0023] Furthermore, the following processes are also included:

[0024] Step 7: When a node discovers that its symmetric one-hop neighbor becomes asymmetric, it updates the route according to the following rules:

[0025] For each routing table entry, check each route in the routing set of the routing table entry. If R_next_addr is this one-hop neighbor, delete the corresponding route; if the routing set of the table entry is not empty at the end, reorder the routes in the set based on the current priority to obtain a new priority; otherwise, delete the corresponding routing table entry.

[0026] Furthermore, the specific process of step 3 is:

[0027] If there is no entry in the routing table with R_dest_addr equal to the Originator Address, a new routing entry is created with R_dest_addr set to the Originator Address. A new route is also created with R_next_addr set to the address of the node forwarding the message, i.e., the source address in the IP header. R_last_addr is left blank, R_dist is set to the hop count in the message, R_time is set to the current time plus the topology hold time TOP_HOLD_TIME, and R_priority is set to the highest priority.

[0028] Otherwise, the entry with R_dest_addr equal to Originator Address is processed as follows:

[0029] If the number of records in the duplicate set D_rec_num is 1, clear the routing set of the corresponding entry;

[0030] Add a new route to the route set. In the route, R_next_addr is set to the node address of the forwarding message, R_last_addr is empty, R_dist is set to the Hop Count in the message, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is equal to the lowest priority in the route set and one level lower.

[0031] Furthermore, the specific process of step 5 is as follows:

[0032] First, check whether the neighbor corresponding to the Advertised Neighbor Main Address is a one-hop neighbor. If it is, no action is taken. Otherwise, perform the following processing:

[0033] If there is no entry in the routing table with R_dest_addr equal to the Advertised Neighbor Main Address, a new routing entry is created with R_dest_addr set to the Advertised Neighbor Main Address. A new route is added to the routing set with R_next_addr set to the address of the node forwarding the message, R_last_addr set to the Originator Address of the message, R_dist set to the Hop Count in the message plus 1, R_time equal to the current time plus TOP_HOLD_TIME, and R_priority set to the highest priority.

[0034] Otherwise, for the entry whose R_dest_addr is equal to the Advertised Neighbor Main Address, a new route is added to the route set. The R_next_addr in the route is set to the address of the node forwarding the message, the R_last_addr is set to the Originator Address of the message, the R_dist is set to the Hop Count in the message plus 1, and the R_time is equal to the current time plus the TOP_HOLD_TIME. Then, for all routes in the route set, the R_priority of each route is adjusted according to R_dist. The route with a smaller hop count has a higher priority.

[0035] Furthermore, the specific process of step 6 is as follows:

[0036] If there is no entry in the routing table with R_dest_addr equal to the address of the new symmetric one-hop neighbor, then a new routing entry is added with R_dest_addr set to the address of the new symmetric one-hop neighbor, and a new route is added to the routing set with R_next_addr set to the address of the new symmetric one-hop neighbor, R_last_addr is empty, R_dist is set to 1, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is set to the highest priority;

[0037] Otherwise, for the entry whose R_dest_addr is equal to the address of the new symmetric one-hop neighbor, a new route is added to the route set, R_next_addr in the route is set to the address of the new symmetric one-hop neighbor, R_last_addr is empty, R_dist is set to 1, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is set to the highest priority; for other routes in the route set, R_priority is reduced by one level compared to the current value.

[0038] The advantages of the present invention compared to the prior art are:

[0039] Each time the OLSR protocol updates routes, it first clears the current routing table and then recalculates routes to all other nodes in the network based on neighbor and topology information. Compared to existing route update methods, this method does not require recalculating all routes to all nodes in the network each time. Instead, it independently updates routes to corresponding nodes based on TC messages, avoiding extensive recalculation and making the update process more concise and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 In the embodiment of the present invention, node 4 updates the routing map based on the TC message of node 1.

[0041] Figure 2 In the embodiment of the present invention, node 4 updates the routing map based on the TC message of node 6.

[0042] Figure 3 In the embodiment of the present invention, node 4 updates the routing map based on the TC message of node 3. DETAILED DESCRIPTION

[0043] The present invention will be further explained below with reference to the accompanying drawings.

[0044] In the OLSR protocol, each MPR node periodically generates and sends TC messages, while also forwarding TC messages received from its own MPRselector. A TC message originating from node A may reach node B via different paths. Therefore, the different paths that the message received by node B takes can be considered different routes from node B to node A. Based on this concept, when the TC message originating from node A reaches all other nodes in the network, the routes from these nodes to node A are established or updated, while other routes in the routing table do not need to be updated.

[0045] In smaller networks, non-MPR nodes can also generate and send TC messages. This allows all nodes to obtain a route to the node that originated the message based on the received TC message. If the network is larger, to reduce the number of TC messages, only MPR nodes can generate and send TC messages. This means that routes to non-MPR nodes cannot be directly obtained using the above approach. In this case, although non-MPR nodes cannot send TC messages, they will appear in TC messages originating from their selected MPR nodes. Therefore, when node B receives a TC message originating from node A, in addition to establishing or updating a route to node A, it can also establish or update a route to node A's MPR selector node, which is not an MPR. Based on the above approach, the following route update method can be obtained.

[0046] A method for quickly updating routes in an OLSR protocol includes the following steps:

[0047] Step 1: Select the MPR node according to the MPR selection method. The MPR node periodically generates a TC message, which contains the symmetric one-hop neighbors that are not MPRs. The node's routing table and repeat set are defined. Each entry in the routing table includes the destination address R_dest_addr of the route and the set of routes to the destination address. The routing set records multiple routes, each of which includes the next hop address R_next_addr, the last address before reaching the destination address R_last_addr, the number of hops R_dist, the validity time R_time, and the priority R_priority. The repeat set includes the number of records D_rec_num, the originating address of the message, and the message sequence number Message Sequence Number.

[0048] Step 2: When a node receives a TC message, it forwards it immediately if it can be forwarded according to the current rules. It also checks whether the TC message meets any of the following conditions. If so, it does not participate in the routing update. If not, it records it in the duplicate set and increases the number of records D_rec_num by 1. Then, it executes step 3.

[0049] 1) The message's Originator Address and Message Sequence Number combination has been recorded in the duplicate set, and the number of records with the same value for this combination exceeds a predefined threshold;

[0050] 2) The Message Sequence Number of the message is smaller than the largest Message Sequence Number among all messages with the same OriginatorAddress recorded in the duplicate set.

[0051] Step 3: Process the originator address in the message:

[0052] If this is the first time this TC message is received, all routes with the Originator Address as the destination address in the current routing table are deleted;

[0053] Add a route with the Originator Address as the destination address. If this is the first time this TC message is received, the priority is set to the highest level; after the first time this TC message is received, the priority is lowered.

[0054] The specific process of step 3 is as follows:

[0055] If there is no entry in the routing table with R_dest_addr equal to the Originator Address, a new routing entry is created with R_dest_addr set to the Originator Address. A new route is also created with R_next_addr set to the address of the node forwarding the message, i.e., the source address in the IP header. R_last_addr is left blank, R_dist is set to the hop count in the message, R_time is set to the current time plus the topology hold time TOP_HOLD_TIME, and R_priority is set to the highest priority.

[0056] Otherwise, the entry with R_dest_addr equal to Originator Address is processed as follows:

[0057] If the number of records in the duplicate set D_rec_num is 1, clear the routing set of the corresponding entry;

[0058] Add a new route to the route set. In the route, R_next_addr is set to the node address of the forwarding message, R_last_addr is empty, R_dist is set to the Hop Count in the message, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is equal to the lowest priority in the route set and one level lower.

[0059] Step 4: Process the existing route with Originator Address as R_last_addr:

[0060] If the number of records D_rec_num in the duplicate set is 1, the route with the originator address as R_last_addr in the route set of each routing table entry is deleted, and the R_priority of each route is adjusted according to the R_dist of the remaining routes in the set. The smaller the hop count, the higher the priority.

[0061] Step 5: Process each Advertised Neighbor Main Address in the message:

[0062] Add a route with the Advertised Neighbor Main Address as the destination address. Record the hop count of this route as the hop count in the message plus 1. Adjust the priority of multiple routes with the same destination address. The one with the smaller hop count has a higher priority.

[0063] The specific process of step 5 is as follows:

[0064] First, check whether the neighbor corresponding to the Advertised Neighbor Main Address is a one-hop neighbor. If it is, no action is taken. Otherwise, perform the following processing:

[0065] If there is no entry in the routing table with R_dest_addr equal to the Advertised Neighbor Main Address, a new routing entry is created with R_dest_addr set to the Advertised Neighbor Main Address. A new route is added to the routing set with R_next_addr set to the address of the node forwarding the message, R_last_addr set to the Originator Address of the message, R_dist set to the Hop Count in the message plus 1, R_time equal to the current time plus TOP_HOLD_TIME, and R_priority set to the highest priority.

[0066] Otherwise, for the entry whose R_dest_addr is equal to the Advertised Neighbor Main Address, a new route is added to the route set. The R_next_addr in the route is set to the address of the node forwarding the message, the R_last_addr is set to the Originator Address of the message, the R_dist is set to the Hop Count in the message plus 1, and the R_time is equal to the current time plus the TOP_HOLD_TIME. Then, for all routes in the route set, the R_priority of each route is adjusted according to R_dist. The route with a smaller hop count has a higher priority.

[0067] Step 6: When a node discovers a new symmetric one-hop neighbor, it updates the route according to the following rules:

[0068] Add a route with the new symmetric one-hop neighbor's address as the destination address, set its priority to the highest level, and reduce the priority of other existing routes with the new symmetric one-hop neighbor's address as the destination address by one level.

[0069] The specific process of step 6 is as follows:

[0070] If there is no entry in the routing table with R_dest_addr equal to the address of the new symmetric one-hop neighbor, then a new routing entry is added with R_dest_addr set to the address of the new symmetric one-hop neighbor, and a new route is added to the routing set with R_next_addr set to the address of the new symmetric one-hop neighbor, R_last_addr is empty, R_dist is set to 1, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is set to the highest priority;

[0071] Otherwise, for the entry whose R_dest_addr is equal to the address of the new symmetric one-hop neighbor, a new route is added to the route set, R_next_addr in the route is set to the address of the new symmetric one-hop neighbor, R_last_addr is empty, R_dist is set to 1, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is set to the highest priority; for other routes in the route set, R_priority is reduced by one level compared to the current value.

[0072] Step 7: When a node discovers that its symmetric one-hop neighbor becomes asymmetric, it updates the route according to the following rules:

[0073] For each routing table entry, check each route in the routing set of the routing table entry. If R_next_addr is this one-hop neighbor, delete the corresponding route; if the routing set of the table entry is not empty at the end, reorder the routes in the set based on the current priority to obtain a new priority; otherwise, delete the corresponding routing table entry.

[0074] The above process is described below with reference to an example in the accompanying drawings. In this example, nodes 0, 1, 3, 5, and 6 are MPR nodes.

[0075] exist Figure 1 In this example, node 1 generates a TC message that includes node 2. This message passes through node 0 and reaches node 4. Node 4 then records the route from node 0 to node 1 and the route from node 0 to node 2. This message also passes through nodes 6 and 5 and reaches node 4. Node 4 then records the route from node 5 to node 1 and the route from node 5 to node 2.

[0076] exist Figure 2 In this example, node 6 generates a TC message that includes node 7. This message passes through node 5 and reaches node 4. Node 4 then records the route from node 5 to node 6 and the route from node 5 to node 7. This message also passes through nodes 1 and 0 and reaches node 4. Node 4 then records the route from node 0 to node 6 and the route from node 0 to node 7.

[0077] exist Figure 3 In this example, node 3 generates a TC message that includes nodes 2 and 7. This message passes through nodes 6 and 5 to reach node 4. Node 4 then records the route from node 5 to node 3, as well as the routes from node 5 to node 2 and node 5 to node 7. This message also passes through nodes 6, 1, and 0 to reach node 4. Node 4 then records the route from node 0 to node 3, as well as the routes from node 0 to node 2 and node 7.

Claims

1. A method for quickly updating routing in an OLSR protocol, characterized in that: The following processes are included: Step 1: Select an MPR node according to the MPR selection method. The MPR node periodically generates a TC message containing symmetric one-hop neighbors that are not MPRs. The node's routing table and repeat set are defined. Each entry in the routing table includes the destination address R_dest_addr of the route and the set of routes to the destination address. The routing set records multiple routes, each of which includes the next hop address R_next_addr, the last address before reaching the destination address R_last_addr, the number of hops R_dist, the validity period R_time, and the priority R_priority. The repeat set includes the number of records D_rec_num, the originator address of the message, and the message sequence number Message Sequence Number. Step 2: When a node receives a TC message, it forwards it immediately if it can be forwarded according to the current rules. It also checks whether the TC message meets any of the following conditions. If so, it does not participate in the routing update. If not, it records it in the duplicate set and increases the number of records D_rec_num by 1. Then, it executes step 3. 1) The message's Originator Address and Message Sequence Number combination has been recorded in the duplicate set, and the number of records with the same value for this combination exceeds a predefined threshold; 2) The Message Sequence Number of the message is smaller than the largest Message Sequence Number among all messages with the same OriginatorAddress recorded in the duplicate set; Step 3: Process the originator address in the message: If this is the first time this TC message is received, all routes with the Originator Address as the destination address in the current routing table are deleted; Add a route with the Originator Address as the destination address. If this is the first time this TC message is received, the priority is set to the highest level. After the first time this TC message is received, the priority is lowered. Step 4: Process the existing route with Originator Address as R_last_addr: If the number of records in the duplicate set D_rec_num is 1, the route with the originator address as R_last_addr in the route set of each routing table entry is deleted, and the R_priority of each route is adjusted according to the R_dist of the remaining routes in the set. The route with the smaller hop count has a higher priority. Step 5: Process each Advertised Neighbor Main Address in the message: Add a route with the Advertised Neighbor Main Address as the destination address. Record the hop count of this route as the hop count in the message plus 1. Adjust the priority of multiple routes with the same destination address. The one with the smaller hop count has a higher priority.

2. The method for quickly updating routing in an OLSR protocol according to claim 1, wherein: The following procedures are also included: Step 6: When a node discovers a new symmetric one-hop neighbor, it updates the route according to the following rules: Add a route with the new symmetric one-hop neighbor's address as the destination address, set its priority to the highest level, and reduce the priority of other existing routes with the new symmetric one-hop neighbor's address as the destination address by one level.

3. The method for quickly updating routing in an OLSR protocol according to claim 1 or 2, wherein: The following procedures are also included: Step 7: When a node discovers that its symmetric one-hop neighbor becomes asymmetric, it updates the route according to the following rules: For each routing table entry, check each route in the routing set of the routing table entry. If R_next_addr is this one-hop neighbor, delete the corresponding route; if the routing set of the table entry is not empty at the end, reorder the routes in the set based on the current priority to obtain a new priority; otherwise, delete the corresponding routing table entry.

4. The method for quickly updating routing in an OLSR protocol according to claim 1, wherein: The specific process of step 3 is as follows: If there is no entry in the routing table with R_dest_addr equal to the Originator Address, a new routing entry is created with R_dest_addr set to the Originator Address. A new route is also created with R_next_addr set to the address of the node forwarding the message, i.e., the source address in the IP header. R_last_addr is left blank, R_dist is set to the hop count in the message, R_time is set to the current time plus the topology hold time TOP_HOLD_TIME, and R_priority is set to the highest priority. Otherwise, the entry with R_dest_addr equal to Originator Address is processed as follows: If the number of records in the duplicate set D_rec_num is 1, clear the routing set of the corresponding entry; Add a new route to the route set. In the route, R_next_addr is set to the node address of the forwarding message, R_last_addr is empty, R_dist is set to the Hop Count in the message, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is equal to the lowest priority in the route set and one level lower.

5. The method for quickly updating routing in an OLSR protocol according to claim 4, wherein: The specific process of step 5 is as follows: First, check whether the neighbor corresponding to the Advertised Neighbor Main Address is a one-hop neighbor. If it is, no action is taken. Otherwise, perform the following processing: If there is no entry in the routing table with R_dest_addr equal to the Advertised Neighbor Main Address, a new routing entry is created with R_dest_addr set to the Advertised Neighbor Main Address. A new route is added to the routing set with R_next_addr set to the address of the node forwarding the message, R_last_addr set to the Originator Address of the message, R_dist set to the Hop Count in the message plus 1, R_time equal to the current time plus TOP_HOLD_TIME, and R_priority set to the highest priority. Otherwise, for the entry whose R_dest_addr is equal to the Advertised Neighbor Main Address, a new route is added to the route set. The R_next_addr in the route is set to the address of the node forwarding the message, the R_last_addr is set to the Originator Address of the message, the R_dist is set to the Hop Count in the message plus 1, and the R_time is equal to the current time plus the TOP_HOLD_TIME. Then, for all routes in the route set, the R_priority of each route is adjusted according to R_dist. The route with a smaller hop count has a higher priority.

6. The method for quickly updating routing in an OLSR protocol according to claim 5, wherein: The specific process of step 6 is as follows: If there is no entry in the routing table with R_dest_addr equal to the address of the new symmetric one-hop neighbor, then a new routing entry is added with R_dest_addr set to the address of the new symmetric one-hop neighbor, and a new route is added to the routing set with R_next_addr set to the address of the new symmetric one-hop neighbor, R_last_addr is empty, R_dist is set to 1, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is set to the highest priority; Otherwise, for the entry whose R_dest_addr is equal to the address of the new symmetric one-hop neighbor, a new route is added to the route set, R_next_addr in the route is set to the address of the new symmetric one-hop neighbor, R_last_addr is empty, R_dist is set to 1, R_time is set to the current time plus TOP_HOLD_TIME, and R_priority is set to the highest priority; for other routes in the route set, R_priority is reduced by one level compared to the current value.

Citation Information

Patent Citations

  • Channel-based routing algorithm of wireless self-organizing network

    CN104113855A

  • Method and system for implementing cross-multi-relation database sorting based on distributed stream calculation

    CN104965891A