Session-based routing information updating method and network equipment

By introducing routing change perception module and routing age information into network devices, and only updating routing information when traffic matches, the problem of untimely and inefficient session updates during routing changes in the prior art is solved, and traffic forwarding efficiency is improved.

CN119135603AInactive Publication Date: 2024-12-13CHENGDU BEISHANG TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411341580.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the session routing information update efficiency is low, resulting in untimely update of sessions when routing changes, which may lead to traffic interruption, and the efficiency of re-finding of routing tables when routing changes is not high, affecting CPU utilization and traffic forwarding efficiency.

Method used

Design a session-based routing information update method, including session module, routing module and routing change perception module, storing routing age information and atomically triggering routing changes, and only updating routing information when traffic matches, avoiding frequent re-finding of routes surface.

Benefits of technology

It improves the timeliness and efficiency of routing information updates, avoids traffic interruption, reduces CPU utilization, and improves the traffic forwarding efficiency of network equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135603A_ABST
    Figure CN119135603A_ABST
Patent Text Reader

Abstract

The invention relates to a session-based routing information updating method and network equipment, and belongs to the technical field of network communication. The network equipment comprises a session module, a routing module and a routing change sensing module, the session module is used for storing flow connection information; the routing module comprises a routing information storage sub-module and a routing management sub-module, and the routing information storage sub-module is used for storing complete information of routing; the management routing sub-module is used for adding, deleting, modifying and moving storage routing information; and the routing change sensing module is used for sensing the routing information change of the routing module and atomically triggering the change of the routing age. According to the invention, the problem of session routing information updating in the prior art can be solved, and the traffic forwarding efficiency of the network equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of network communications, and in particular relates to a session-based routing information updating method and network equipment. Background Art

[0002] Currently, when traffic passes through a communication device, the communication device will create a uniquely identifiable session through the IP five-tuple (source address, destination address, source port, destination port, and transport layer protocol). At the same time, the traffic will store the relevant routing information found in the session after passing through the routing module. When the device's routing changes, the routing information stored in the session may have become invalid. If subsequent messages of the same flow are still forwarded according to the routing information recorded in the current session, the traffic may not be able to reach the destination. Therefore, it is necessary to refresh the routing information recorded in the session in a timely manner.

[0003] In the current related technology, the processing method for updating session routing information is: when a routing change occurs, all sessions are compared with the changed routing to analyze whether the session routing information needs to be updated. If the changed routing is better than the routing information stored in the session, or the route stored in the session is deleted, the session's stored routing information needs to be updated. However, this processing method is not efficient. When the number of sessions is large, reaching millions or tens of millions, and there are many routing changes, this processing method will be very slow and accompanied by lock operations, which will seriously affect normal business processing.

[0004] In the current technical solution, there are three ways to handle session updates: Technology 1: After the route changes, the sessions are processed in batches to extend the processing time. A small number of sessions are processed each time, and the sessions are processed once per second. This way, the CPU utilization will not be so high and normal business can be processed in a timely manner.

[0005] Technology 2: After the route changes, all sessions re-search the routing table to update the routing information. This method can periodically check whether there is a route change. If there is a route change, all sessions are traversed and each session re-searches the routing table. If the search result is different from the saved route, it is updated.

[0006] Technology 3: Add routing change collection function and session update function. The routing change collection function periodically collects routing change information within a unit time. If the changed information is collected, the changed information will be backed up for the routing update module to query and update the routing information of the session. The update module must traverse all session information. When the update module is working, the routing collection module will continue to collect a new round of information.

[0007] The above three methods all have technical defects: The drawback of technology 1 is that the session may not be updated in time, which may cause traffic interruption.

[0008] The defect of the second technique is that when the route changes, the efficiency of re-searching the routing table for all sessions to update the session routing information is still not very high. In addition, if a new route change occurs during the update of all sessions, it is necessary to traverse the session from the beginning. When a large number of routes change, the CPU utilization rate will be very high, and the session cannot be updated in time.

[0009] The defect of technology three is: technology three solves the problem of technology two that if new routing changes occur during the process of updating all sessions, the sessions need to be traversed from the beginning, but it retains the defect of technology one and the defect that when the routing changes, all sessions re-search the routing table to update the session routing information is still not very efficient in technology two. Summary of the invention

[0010] 1. Technical issues to be resolved The technical problem to be solved by the present invention is how to provide a session-based routing information updating method and network device to solve the above-mentioned defects existing in the session routing information updating in the prior art.

[0011] (II) Technical solution In order to solve the above technical problems, the present invention proposes a session-based routing information updating network device, the network device comprising: a session module, a routing module and a routing change perception module; A session module, used to store connection information of traffic, wherein the connection information includes: IP five-tuple information, traffic matching routing information and routing age information; The routing module includes: a routing information storage submodule and a routing management submodule. The routing information storage submodule is used to store complete routing information, that is, a routing table; the routing management submodule is used to add, delete, modify, and move the stored routing information; The routing change perception module is used to perceive the routing information changes of the routing module and atomically trigger the change of the routing age.

[0012] Furthermore, when the routing management submodule performs operations of adding, deleting, modifying, and moving the stored routing information, the routing change perception module will perceive the routing change information and trigger the change of the routing age.

[0013] Furthermore, if any route in the submodule storing route information changes, the route age must be updated.

[0014] Furthermore, after the traffic queries the routing information stored in the routing module, the session module refreshes the routing information to the routing information corresponding to the session in the session module.

[0015] Furthermore, when the route age information stored in the session module is different from the route age in the route change perception module, the route age information in the route change perception module is refreshed to the route age information corresponding to the session in the session module.

[0016] The present invention also provides a session-based routing information updating method, the method comprising the following steps: S1, when the network device starts, the routing module, routing change perception module and session module are initialized; S2. When the network device is started, the user configures routing information for the routing module through the management routing submodule according to the needs, and the routing information is stored in the storage routing information submodule; S3, when the route change perception module perceives the route change, it atomically updates the route age; S4. When the first packet of traffic enters the network device, the session module will create a session. After the message passes through the routing module to find the route, the session module will refresh the routing information found from the routing information storage submodule to the session, and refresh the routing age information recorded by the routing change perception module to the session; S5. When the subsequent packets of the same flow pass through the routing module, there is no need to look up the routing information stored in the routing module. Instead, the routing information recorded in the session can be used to complete the routing forwarding. S6. When any routing information changes, the routing change perception module will perceive the routing change and trigger the update of the routing age; S7. After the subsequent packets of the traffic match the session, compare whether the route age recorded in the session is the same as the route age recorded by the current route change perception module. If they are the same, it means that the route has not changed and there is no need to search the route again. If they are not the same, it means that the route has changed and needs to be searched again. S8. After re-finding the route, the newly found route information is refreshed to the session, and the route age information is refreshed at the same time, that is, the route age recorded by the route change perception module is refreshed to the route age information recorded in the session.

[0017] Furthermore, in step S3, if any route in the submodule storing route information changes, the route age must be updated.

[0018] Furthermore, in step S6, the user modifies the routing information through the management routing submodule according to demand, which will cause the routing information to change.

[0019] Furthermore, in step S6, an interface down / up event may cause routing information to change.

[0020] Furthermore, the route age can only be increased one by one.

[0021] (III) Beneficial effects The present invention provides a session-based routing information update method and network device, and the present invention has the following technical effects: 1. The present invention can solve the problem that when the route changes, the session routing information may not be updated in time, resulting in traffic interruption.

[0022] 2. The present invention can solve the problem of low efficiency caused by the need to re-search the routing table to update the session routing information when the routing changes.

[0023] 3. The present invention can solve the problem that when the routing changes frequently, it is necessary to traverse the session from the beginning when updating all session routing information.

[0024] 4. The present invention can improve the traffic forwarding efficiency of network equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 The present invention provides a session-based routing information updating method and a network device block diagram. DETAILED DESCRIPTION

[0026] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0027] In view of the deficiencies of the prior art, the present invention provides a session-based routing information updating method and network device.

[0028] The network device at least includes: a session module, a routing module and a routing change perception module.

[0029] The session module is used to store the connection information of the traffic, wherein the connection information includes: IP five-tuple information, traffic matching routing information, routing age information and other related information.

[0030] The routing module includes: a routing information storage submodule and a routing management submodule. The routing information storage submodule is used to store complete routing information, that is, a routing table; the routing management submodule is used to add, delete, modify, move, and other operations on the stored routing information.

[0031] The routing change perception module is used to perceive the routing information changes (addition, deletion, modification, movement, etc.) of the routing module and atomically trigger the change of routing age.

[0032] like Figure 1 As shown, when the routing management submodule performs operations such as adding, deleting, modifying, and moving the stored routing information, the routing change perception module will perceive the routing change information and trigger the change of the routing age.

[0033] After the traffic queries the routing information stored in the routing module, the session module refreshes the routing information to the routing information corresponding to the session in the session module.

[0034] When the route age information stored in the session module is different from the route age in the route change perception module, the route age information in the route change perception module will be refreshed to the route age information corresponding to the session in the session module.

[0035] The way the router's age changes is similar to the way a person's age changes, and it can only increase one by one.

[0036] The session-based routing information updating method of the present invention comprises the following steps: S1. When the network device starts, it initializes the routing module, routing change perception module, session module and other related traffic forwarding processing modules.

[0037] S2. After the network device is started, the user configures routing information for the routing module through the management routing submodule according to the demand, and the routing information is stored in the storage routing information submodule.

[0038] S3. When the route change perception module perceives the route change, it atomically (multi-core) updates the route age.

[0039] If any route in the submodule storing route information changes, the route age must be updated.

[0040] Among them, in a multi-core system, if you want to change a global variable, you need to ensure its atomicity (similar to a locking operation, not allowing other cores to read and write this variable).

[0041] S4. When the first packet of traffic enters the network device, the session module will create a session. After the message passes through the routing module to find the route, the session module will refresh the routing information found from the routing information storage submodule to the session, and at the same time refresh the routing age information recorded by the routing change perception module to the session.

[0042] S5. When subsequent messages of the same flow pass through the routing module, there is no need to look up the routing information stored in the routing module. Instead, the routing information recorded in the session can be used to complete the routing forwarding.

[0043] S6. When the user modifies the routing information through the management routing submodule according to the needs or the interface down / up and other related events cause any routing information to change, the routing change perception module will perceive the routing change and trigger the update of the routing age.

[0044] S7. After the subsequent packets of the traffic match the session, compare whether the route age recorded in the session is the same as the route age recorded in the current route change perception module. If they are the same, it means that the route has not changed and there is no need to re-check the route; if they are different, it means that the route has changed and needs to be re-searched.

[0045] S8. After re-finding the route, the newly found route information is refreshed to the session, and the route age information is refreshed at the same time (the route age recorded by the route change perception module is refreshed to the route age information recorded in the session). Embodiment 1:

[0046] 1. When the network device starts, the routing module, routing change perception module, session module and other related traffic forwarding processing modules are initialized.

[0047] 2. After the device is started, the user configures five routes for the device according to needs: route1, route2, route3, route4, and route5.

[0048] 3. After the route change perception submodule perceives the route change, it updates the route age to age1.

[0049] 4. When three flows s1, s2, and s3 arrive at the device, three sessions session1, session2, and session3 are created.

[0050] At this time, the session information is: session1-NULL-0, session2-NULL-0, session3-NULL-0.

[0051] 5. After the traffic passes through the routing module, it matches route1, route3, and route4 respectively. At the same time, the session route age 1 is recorded respectively.

[0052] At this time, the session information is: session1-route1-age1, session2-route3-age1, session3-route4-age1.

[0053] 6. After the session is created, the traffic of s1 and s3 stops.

[0054] 7. At this time, the user deletes route3. The route change perception module senses that the route information has changed and updates the route age to age2.

[0055] 8. When the subsequent message of s2 matches session2, the route age (age1) on the session is compared with the route age (age2) of the route change perception module. It is different, so it is necessary to re-search the route. The re-searched route matches route5, and the route information and route age on the session are refreshed.

[0056] At this time, the session information is: session1-route1-age1, session2-route5-age2, session3-route4-age1.

[0057] 9. At this time, the user modifies the information of route2 according to the needs. At this time, the route change perception module perceives that the route information has changed and updates the route age to age3.

[0058] 10. At this time, the subsequent messages of s2 and s3 enter the device matching session and successfully match session2 and session3. It is found that the route age age2 recorded on session2 and the route age age1 recorded on session3 are different from the route age age3 of the route change perception module, so it is necessary to re-search the route. After re-searching the route, s2 matches route5 and s3 matches route2, and the route information and route age on the session are refreshed.

[0059] At this time, the session information is: session1-route1-age1, session2-route5-age3, session3-route2-age3.

[0060] 11. Session 1 has no subsequent messages until the session ages. The key points of the present invention are as follows:

[0061] 1. Add routing age information to the session.

[0062] 2. When the route changes, the routing information recorded in the session will not be actively modified. Only when the message matches the session will the update of the session routing information be triggered.

[0063] 3. Every time the route changes, the route age of the routing module will be triggered.

[0064] 1. The present invention can solve the problem that when the route changes, the session routing information may not be updated in time, resulting in traffic interruption.

[0065] 2. The present invention can solve the problem of low efficiency caused by the need to re-search the routing table to update the session routing information when the routing changes.

[0066] 3. The present invention can solve the problem that when the routing changes frequently, it is necessary to traverse the session from the beginning when updating all session routing information.

[0067] 4. The present invention can improve the traffic forwarding efficiency of network equipment.

[0068] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A session-based routing information updating network device, characterized in that: The network device includes: a session module, a routing module and a routing change perception module; A session module, used to store connection information of traffic, wherein the connection information includes: IP five-tuple information, traffic matching routing information and routing age information; The routing module includes: a routing information storage submodule and a routing management submodule. The routing information storage submodule is used to store complete routing information, that is, a routing table; the routing management submodule is used to add, delete, modify, and move the stored routing information; The routing change perception module is used to perceive the routing information changes of the routing module and atomically trigger the change of the routing age.

2. The session-based routing information updating network device according to claim 1, characterized in that: When the routing management submodule performs operations of adding, deleting, modifying, and moving the stored routing information, the routing change perception module will perceive the routing change information and trigger the change of the routing age.

3. The session-based routing information updating network device according to claim 2, characterized in that: If any route in the route information storage submodule changes, the route age must be updated.

4. The session-based routing information updating network device according to claim 1, characterized in that: After the traffic queries the routing information stored in the routing module, the session module refreshes the routing information to the routing information corresponding to the session in the session module.

5. The session-based routing information updating network device according to claim 1, characterized in that: When the route age information stored in the session module is different from the route age in the route change perception module, the route age information in the route change perception module will be refreshed to the route age information corresponding to the session in the session module.

6. A session-based routing information update method, characterized in that: The method comprises the following steps: S1, when the network device starts, the routing module, routing change perception module and session module are initialized; S2. When the network device is started, the user configures routing information for the routing module through the management routing submodule according to the needs, and the routing information is stored in the storage routing information submodule; S3, when the route change perception module perceives the route change, it atomically updates the route age; S4. When the first packet of traffic enters the network device, the session module will create a session. After the message passes through the routing module to find the route, the session module will refresh the routing information found from the routing information storage submodule to the session, and refresh the routing age information recorded by the routing change perception module to the session; S5. When the subsequent packets of the same flow pass through the routing module, there is no need to look up the routing information stored in the routing module. Instead, the routing information recorded in the session can be used to complete the routing forwarding. S6. When any routing information changes, the routing change perception module will perceive the routing change and trigger the update of the routing age; S7. After the subsequent packets of the traffic match the session, compare whether the route age recorded in the session is the same as the route age recorded by the current route change perception module. If they are the same, it means that the route has not changed and there is no need to search the route again. If they are not the same, it means that the route has changed and needs to be searched again. S8. After re-finding the route, the newly found route information is refreshed to the session, and the route age information is refreshed at the same time, that is, the route age recorded by the route change perception module is refreshed to the route age information recorded in the session.

7. The session-based routing information updating method according to claim 6, characterized in that: In step S3, if any route in the submodule storing route information changes, the route age must be updated.

8. The session-based routing information updating method according to claim 6, characterized in that: In step S6, the user modifies the routing information through the management routing submodule according to the demand, which will cause the routing information to change.

9. The session-based routing information updating method according to claim 6, characterized in that: In step S6, the interface down / up event may cause the routing information to change.

10. The session-based routing information updating method according to claim 6, characterized in that: The route age can only be increased one by one.

Citation Information

Patent Citations

  • Universal port user agent capable of caching route information among sessions and associated method

    CN101233730A

  • Session information updating method and device, storage medium and electronic equipment

    CN116032992A

  • A method and network appratus for processing the BGP route’s next hop change

    WO2007041926A1