IPv6 network-oriented routing information management method and electronic equipment
By mapping the destination prefix and source prefix into row numbers and column numbers in the IPv6 network, combining the association between the two-dimensional index table and the forwarding information table, the storage structure and forwarding mechanism of the routing information are optimized, and the storage pressure problem caused by the surge in the number of routes is solved, efficient and reliable routing management is achieved, and the performance of the power network is improved.
Patent Information
- Application Number
- CN202510546467.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-07-29
AI Technical Summary
In IPv6 networks, the surge in the number of routes causes routers to bear huge storage pressure. Traditional routing storage methods occupy a large amount of storage space and may lead to excessive forwarding delays and network congestion, affecting the reliability and efficiency of the power network.
By mapping the destination prefix and the source prefix into row numbers and column numbers respectively, combining the association between the two-dimensional index table and the forwarding information table, the storage structure and forwarding mechanism of routing information are optimized, and the simplification of routing storage and rapid forwarding process are achieved.
It significantly saves routing storage space, reduces router storage costs, improves routing search efficiency and network performance, and ensures the stability and reliability of the power network.
Smart Images

Figure CN120389981A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a method for managing routing information for an IPv6 network and an electronic device. Background Art
[0002] With the rapid development of the Internet, Internet Protocol Version 6 (IPv6), as the next-generation Internet protocol, has gradually become the core of modern network architectures. In an IPv6 network, two-dimensional routing, as an emerging routing technology, can effectively meet the diverse requirements of complex power grids.
[0003] However, after introducing two-dimensional routing, the number of routes has further increased sharply, resulting in a huge storage pressure on routers. Therefore, how to efficiently manage a large amount of routing information has become an urgent need to improve the performance of power networks. Summary of the Invention
[0004] In view of this, the purpose of this application is to propose a method for managing routing information for an IPv6 network and an electronic device to solve the above technical problems.
[0005] Based on the above purpose, the first aspect of this application provides a method for managing routing information for an IPv6 network, including:
[0006] Upon receiving routing information, determining an operation type corresponding to the routing information, where the routing information at least includes a destination end address and a source address;
[0007] According to the operation type, using the destination end address to edit a destination prefix table in a pre-stored forwarding information base to obtain an edited destination prefix table, and determining a target routing index row number from the edited destination prefix table, where the destination prefix table includes the corresponding relationship between different end addresses and routing index row numbers;
[0008] According to the operation type, using the source address to edit a source prefix table in a pre-stored forwarding information base to obtain an edited source prefix table, and determining a target routing index column number from the edited source prefix table, where the source prefix table includes the corresponding relationship between different source addresses and routing index column numbers;
[0009] Edit the index table in the pre-stored forwarding information base by using the target routing index row number and the target routing index column number according to the operation type, to obtain an edited index table, and determine a target routing index value from the edited index table, where the index table includes the corresponding relationships between different routing index row numbers and routing index column numbers and routing index values;
[0010] Edit the forwarding information table in the pre-stored forwarding information base by using the target routing index value according to the operation type, to obtain an edited forwarding information table.
[0011] Based on the same inventive concept, a second aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and running on the processor. When the processor executes the computer program, the method described in the first aspect above is implemented.
[0012] As can be seen from the above, the routing information management method and the electronic device provided by the present application for IPv6 networks determine the operation type according to the received routing information, and respectively edit the destination prefix table and the source prefix table in the forwarding information base by using the target destination address and the target source address, so as to accurately locate the corresponding target routing index row number and column number. Subsequently, the index table is edited in combination with these index information to quickly obtain the target routing index value. Finally, the forwarding information table is edited by using the target routing index value to realize the dynamic update of the forwarding information. This series of operations not only simplifies the routing information management process, but also significantly improves the efficiency and accuracy of information processing, laying a solid foundation for the improvement of the power network performance, and further enabling the power network to more flexibly and efficiently respond to the complex and changing large amount of routing information requirements, ensuring the stability and reliability of the network operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.
[0014] Figure 1 It is a flowchart of the routing information management method for IPv6 networks according to an embodiment of the present application;
[0015] Figure 2 It is a schematic diagram of the routing information management process for IPv6 networks according to an embodiment of the present application;
[0016] Figure 3Schematic diagram of the routing information forwarding process according to an embodiment of the present application;
[0017] Figure 4 Schematic diagram of the intelligent power grid communication network scenario according to an embodiment of the present application;
[0018] Figure 5 Schematic diagram of the routing information forwarding process according to another embodiment of the present application;
[0019] Figure 6 Block diagram of the structure of the management device for routing information oriented to the IPv6 network according to an embodiment of the present application;
[0020] Figure 7 Schematic diagram of the electronic device according to an embodiment of the present application. Detailed implementation manners
[0021] To make the objectives, technical solutions and advantages of the present application clearer and more understandable, the following further details the present application in conjunction with specific embodiments and with reference to the accompanying drawings.
[0022] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the ordinary meanings understood by those of ordinary skill in the art to which the present application pertains. The "first", "second" and similar terms used in the embodiments of the present application do not denote any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or items appearing before this term cover the elements or items listed after this term and their equivalents, without excluding other elements or items. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0023] It can be understood that, before using the technical solutions of the various embodiments of the present application, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner and the user's authorization will be obtained.
[0024] For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to the software or hardware such as an electronic device, an application program, a server or a storage medium that performs the operations of the technical solutions of the present application according to the prompt message.
[0025] As an optional but non-limiting implementation manner, in response to receiving an active request from a user, the manner of sending a prompt message to the user can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0026] It can be understood that the above notification and user authorization acquisition process is only illustrative and does not limit the implementation manner of this application. Other manners that comply with relevant laws and regulations can also be applied to the implementation manner of this application.
[0027] With the rapid development of the Internet, as the next-generation Internet protocol, IPv6 has gradually become the core of modern network architectures. Compared with the Internet Protocol version 4 (IPv4), IPv6 not only provides a much larger address space but also simplifies network configuration, enhances network scalability and security. In the power industry, especially in smart grid and Internet of Things applications, the advantages of IPv6 are becoming increasingly obvious and it has become the basis for realizing device interconnection and data transmission.
[0028] In an IPv6 network, as an emerging routing technology, two-dimensional routing can effectively meet the diverse requirements of complex power grids. By introducing source prefixes, two-dimensional routing can more precisely control data flow directions, optimize the use of network resources, and thus significantly improve the forwarding efficiency of traffic. This method is particularly important in power companies because the structure of power networks is complex and there is a wide variety of equipment, and traditional routing methods are difficult to meet the requirements of efficient and reliable communication. For example, time-sensitive traffic belonging to the alarm service needs to take a higher-priority path. The application of two-dimensional routing enables power networks to better adapt to dynamically changing traffic demands and ensures the timely transmission of critical data.
[0029] However, with the expansion of network scale, IPv6 networks face many challenges in routing storage and forwarding. The existing number of one-dimensional routes is already quite large, and after introducing two-dimensional routing, the number of routes has increased further sharply, resulting in huge storage pressure on routers. And the storage efficiency and forwarding delay of routing tables are often key factors affecting network performance. Therefore, how to efficiently manage and forward a large amount of routing information has become an urgent need to improve the performance of power networks. Traditional routing storage methods usually store routing information item by item, which not only occupies a large amount of storage space but may also lead to problems such as excessive forwarding delay and network congestion. These deficiencies not only reduce the overall efficiency of the network but may also cause communication failures in the power system at critical moments, affecting the reliability of power supply. Therefore, it is particularly necessary to optimize the two-dimensional routing storage and forwarding mechanism in IPv6 networks.
[0030] In summary, this application proposes an optimized storage and forwarding method for the IPv6 two-dimensional Forwarding Information Base (FIB), aiming to improve the network's storage efficiency and forwarding speed by improving the storage structure of routing information and the forwarding mechanism. The core of this method is to map the destination prefix and source prefix to row numbers and column numbers respectively, and combine the association between the two-dimensional index table and the forwarding information table to achieve the simplification of routing storage and the acceleration of the forwarding process. Compared with traditional methods, this application can save 85% - 95% of the storage space in large-scale networks, thereby reducing the storage cost of routers, improving the efficiency of route lookup, and enhancing the overall performance of the network. In addition, to ensure the accuracy of lookup, this application also proposes an active filling mechanism. For entries that do not exist in the two-dimensional index table, according to the filling principle, they are filled as the next-hop index of the entry with the length just less than that of the source prefix in the same row. This application can not only significantly save routing storage space but also reduce forwarding latency, providing efficient and reliable network support for power grid companies. Through this innovation, the power industry will be able to better cope with the challenges of future network development and achieve the comprehensive upgrade of smart grids.
[0031] An embodiment of this application provides a method for managing routing information for an IPv6 network. The operation type is determined based on the received routing information, and the destination prefix table and source prefix table in the forwarding information base are respectively edited using the target destination address and target source address to accurately locate the corresponding target route index row number and column number. Subsequently, the index table is edited in combination with this index information to quickly obtain the target route index value. Finally, the forwarding information table is edited using this target route index value to achieve the dynamic update of forwarding information. This series of operations not only simplifies the management process of routing information for an IPv6 network but also significantly improves the efficiency and accuracy of information processing, laying a solid foundation for the improvement of power network performance. As a result, the power network can more flexibly and efficiently respond to the complex and changing large number of routing information requirements, ensuring the stability and reliability of network operation.
[0032] As Figure 1 shown, the method of this embodiment includes:
[0033] Step 101, in response to receiving routing information, determine the operation type corresponding to the routing information, where the routing information includes at least a target destination address and a target source address.
[0034] In this step, based on the received routing information, analyze and judge the specific operation type to be executed. The routing information includes at least a target destination address and a target source address. The target destination address represents the destination address that the data packet needs to reach, and the source address represents the sender address of the data packet.
[0035] In addition, the routing information may also contain other fields, such as protocol type, port number, Time to Live, etc.
[0036] Among them, the operation type refers to the specific operation performed on the destination prefix table, such as adding, deleting, modifying, or querying, etc. These operations are usually initiated by network administrators or automated scripts to meet the needs of network topology changes, routing policy adjustments, etc.
[0037] For example, in a router or switch, after receiving a data packet, it is necessary to decide how to process the data packet based on the routing information (such as the destination end address and the source address of the target). For example, forwarding to the next hop, discarding, or performing deep packet inspection (DPI).
[0038] Step 102, edit the destination prefix table in the pre-stored forwarding information base using the operation type and the target end address to obtain an edited destination prefix table, and determine the target routing index row number from the edited destination prefix table, where the destination prefix table includes the corresponding relationship between different end addresses and routing index row numbers.
[0039] In this step, the forwarding information base is a data structure used by the router to quickly find routing information. It contains the corresponding relationship between the destination address and the Next Hop, guiding how to forward data packets.
[0040] The destination prefix table is a part of the Forwarding Information Base (FIB), which records the corresponding relationship between different end addresses (or prefixes) and routing index row numbers.
[0041] Edit the destination prefix table according to the operation type (such as adding, deleting): adding (inserting a new target end address and its corresponding routing index row number into the table), deleting (removing the specified target end address and its corresponding routing index row number), modifying (updating the existing target end address or its corresponding routing index row number).
[0042] Among them, a routing index row is a record in the FIB, which contains the following information: the target end address or prefix, the next hop address (the next hop router or interface to which the data packet should be forwarded), the outgoing interface (the physical or logical interface through which the data packet should pass), and other routing attributes (such as Metric, routing source, etc.).
[0043] The router receives an operation request for the FIB, which includes the operation type and the destination address. According to the operation type, the destination prefix table is correspondingly added, deleted, or modified. Then, from the edited destination prefix table, the target routing index row number corresponding to the target end address is found and determined.
[0044] The optimization and timely update of the FIB can ensure that data packets can be efficiently forwarded to the target network, guaranteeing the efficient and stable operation of the network.
[0045] Step 103: According to the operation type, use the target source address to edit the source prefix table in the pre-stored forwarding information base to obtain an edited source prefix table, and determine the target routing index column number from the edited source prefix table, where the source prefix table includes the correspondence between different source addresses and routing index column numbers.
[0046] In this step, the target source address is the sending address of the network data packet. During the routing forwarding process, the target source address is used to determine the source of the data packet and help the device select an appropriate routing path.
[0047] The FIB is a data structure used to store routing information in network devices. The source prefix table is a sub-table in the FIB, specifically used to record the mapping relationship between the source address and the routing index.
[0048] Each row contains a source address (or source address prefix) and its corresponding routing index column number, which is used for routing decisions based on the source address.
[0049] For example, in some network scenarios, the forwarding path of a data packet may depend not only on the target end address but also on the target source address.
[0050] According to the operation type, perform corresponding edit operations on the source prefix table: add (insert a new target source address and routing index column number), delete (remove the specified target source address and routing index column number), modify (update the routing index column number of the specified source address)
[0051] After the edit process, the source prefix table will be updated to the edited source prefix table.
[0052] The routing index column number is a field in the source prefix table, which is used to identify the routing information associated with a certain source address. From the edited source prefix table, the routing index column number corresponding to the source address can be extracted to support routing decisions based on the source address.
[0053] In some network scenarios, the forwarding path of a data packet may need to be selected according to the source address. For example, in an enterprise network, devices in different departments may forward traffic through different egress routes.
[0054] Administrators can achieve more fine-grained traffic control by editing the source prefix table to specify specific routing policies for specific source addresses.
[0055] Step 104: Edit the index table in the pre-stored forwarding information base using the target routing index row number and the target routing index column number according to the operation type, obtain the edited index table, and determine the target routing index value from the edited index table. Here, the index table includes the correspondence between different routing index row numbers, routing index column numbers, and routing index values.
[0056] In this step, the index table is a two-dimensional structure composed of rows and columns. The routing index row number and the routing index column number represent the rows and columns in this two-dimensional table respectively, and they jointly determine a specific position in the index table.
[0057] The forwarding information base is a database that stores network forwarding-related information. The index table is a part of this database, which records the correspondence between the routing index row number, the routing index column number, and the routing index value.
[0058] Edit the index table according to the specified operation type. This may include adding new routing index values at specific positions, deleting existing routing index values, modifying existing routing index values, or querying the routing index value at a certain position, etc.
[0059] After the editing process, the content of the index table may have changed. This changed index table is the edited index table.
[0060] In the edited index table, query or determine the routing index value at a specific position as needed. This value may have existed before, or it may be a newly added or modified value.
[0061] Step 105: Edit the forwarding information table in the pre-stored forwarding information base using the target routing index value according to the operation type, and obtain the edited forwarding information table.
[0062] In this step, the target routing index value is the key value used to uniquely identify a certain piece of forwarding information in the forwarding information table. The forwarding information table contains multiple pieces of forwarding information, and each piece of information corresponds to a route. The routing index value can quickly locate the specific forwarding information that needs to be operated on. For example, in a complex network environment, there may be a large amount of routing information, and the specific routing entry can be efficiently found through the routing index value.
[0063] The forwarding information table is a sub-table of the forwarding information library, which organizes the forwarding information in tabular form. Each row represents a piece of forwarding information. The forwarding information table includes the correspondence between the routing index value and the forwarding information (i.e., the next hop and / or the outgoing interface), which is used to indicate the key fields for packet forwarding.
[0064] Modify the forwarding information in the forwarding information table accordingly according to the operation type. If it is an addition operation, insert a new piece of forwarding information into the forwarding information table; if it is a deletion operation, remove the specified forwarding information from the forwarding information table; if it is a modification operation, update the corresponding fields in the forwarding information table.
[0065] After the above editing process, the content in the forwarding information table has changed, and a new forwarding information table is obtained. This new forwarding information table reflects the latest changes in the network state, and the network device will forward packets according to this new forwarding information table. For example, when a new route is added to the network, after the addition operation, the forwarding information table contains the forwarding information of this new route, and the network device can correctly forward the packets to the new destination according to this information.
[0066] The whole process is that the network device, according to the changes in the network state (reflected by the operation type), uses the routing index value to quickly locate the forwarding information that needs to be modified, and performs corresponding editing processing on the forwarding information table in the forwarding information library to ensure the accuracy and timeliness of the forwarding information table, so as to realize the correct forwarding of packets in the network.
[0067] Through the above solution, determine the operation type according to the received routing information, and use the target destination address and the target source address to edit the destination prefix table and the source prefix table in the pre-stored forwarding information library respectively, and accurately locate the corresponding target routing index row number and column number. Subsequently, edit the index table in combination with these index information to quickly obtain the target routing index value. Finally, use this target routing index value to edit the forwarding information table to realize the dynamic update of the forwarding information. This series of operations not only simplifies the management process of routing information for IPv6 networks, but also significantly improves the efficiency and accuracy of information processing, laying a solid foundation for the improvement of power network performance, and further enabling the power network to more flexibly and efficiently handle a large number of complex and changing routing information requirements, ensuring the stability and reliability of network operation.
[0068] In some embodiments, in step 102, the editing process of the destination prefix table in the pre-stored forwarding information library by using the target destination address according to the operation type to obtain the edited destination prefix table, and determining the target routing index row number from the edited destination prefix table includes:
[0069] Step A1, in response to the operation type being adding routing information and determining that there is no address corresponding to the target end address in the destination prefix table, add a storage row after the last storage row in the destination prefix table, and generate a row number for the newly added storage row.
[0070] Step A2, store the correspondence between the target end address and the row number of the newly added storage row in the newly added storage row, obtain the edited destination prefix table, and use the row number of the newly added storage row in the edited destination prefix table as the target routing index row number.
[0071] In the above solution, if the operation type is adding routing information, it is necessary to check whether the target address (i.e., the destination address in the routing information) already exists in the destination prefix table.
[0072] Determine whether the target address already exists in the destination prefix table by looking up whether there is an entry corresponding to the target end address in the destination prefix table.
[0073] If it exists, it means that there is already corresponding routing information for this target end address and no addition is required. If it does not exist, it means that there is no corresponding routing information for this target end address and addition is required.
[0074] The newly added entry will be placed in the newly added storage row after the last storage row in the destination prefix table.
[0075] After completing the addition operation, an edited destination prefix table will be obtained.
[0076] This table contains the original entries and the newly added destination address entries.
[0077] Then record the row number corresponding to the newly added target end address as the target routing index row number, which is used to identify the specific position of this routing information in the destination prefix table.
[0078] So that when querying, modifying, or deleting this routing information subsequently, it can be quickly located through the routing index row.
[0079] In some embodiments, in step 102, the editing the destination prefix table in the pre-stored forwarding information base using the target end address according to the operation type to obtain an edited destination prefix table, and determining the target routing index row number from the edited destination prefix table includes:
[0080] Step B1, in response to the operation type being deletion of routing information and determining that there is an address corresponding to the target destination address in the destination prefix table, mark the target destination address as to be deleted in the destination prefix table.
[0081] Step B2, store the correspondence between the target destination address marked as to be deleted and the line number corresponding to the target destination address, and obtain an edited destination prefix table.
[0082] Step B3, search for the line number corresponding to the target destination address in the edited destination prefix table, and use the line number corresponding to the target destination address as the target routing index line number.
[0083] In the above solution, if the operation type is deletion of routing information, it indicates that the current operation intention is to remove or delete a specific routing information.
[0084] Before performing the deletion operation, it is necessary to check the destination prefix table to confirm that there is indeed an entry that matches the target destination address in the routing information to be deleted.
[0085] If it is confirmed that there is an address corresponding to the target destination address in the destination prefix table, the entry will not be immediately deleted from the table, but will be marked as to be deleted.
[0086] This approach may be to ensure that before the deletion operation is executed, further verification or other related operations (such as logging, notifying other systems, etc.) can be performed.
[0087] After this operation, what is obtained is an edited destination prefix table, which contains entries marked as to be deleted.
[0088] After marking the entry to be deleted, it is necessary to determine the specific position of the entry in the destination prefix table, that is, the line number where it is located. In order to accurately remove the entry from the table later, because when directly operating on a data structure (such as an array, a list, or a database table), it is usually necessary to know the exact position of the element to be operated on.
[0089] Finally, record the found line number corresponding to the target destination address as the target routing index line number. This target routing index line number will be used for subsequent deletion operations, that is, using this line number to locate and remove the entry marked as to be deleted in the destination prefix table.
[0090] In some embodiments, in step 103, the editing the source prefix table in the pre-stored forwarding information base using the target source address according to the operation type to obtain an edited source prefix table, and determining the target routing index column number from the edited source prefix table includes:
[0091] Step C1, in response to the operation type being adding routing information and determining that there is no address corresponding to the target source address in the source prefix table, add a storage row after the last storage row in the source prefix table, and generate the column sequence number of the newly added storage row.
[0092] Step C2, store the correspondence between the target source address and the column sequence number of the newly added storage row in the newly added storage row, obtain the edited source prefix table, and use the column sequence number of the newly added storage row in the edited source prefix table as the target routing index column sequence number.
[0093] In the above solution, if the operation type is adding routing information, it is necessary to first check whether there is already a record corresponding to the target source address in the source prefix table. If it exists, there is no need to repeat the addition. If it does not exist, the addition operation needs to be continued.
[0094] If there is no record corresponding to the target source address in the source prefix table, add the target source address to the source prefix table.
[0095] The newly added target source address will be used as a new record in the source prefix table.
[0096] After adding the source address and allocating the column sequence number, the structure of the source prefix table changes, and the edited source prefix table is obtained. The updated source prefix table contains the correspondence between the target source address stored in the newly added storage row and its corresponding column sequence number.
[0097] Using the column sequence number corresponding to the newly added target source address as the target routing index column sequence number means that in subsequent route lookups or operations, the corresponding routing rules can be quickly located through the target routing index column sequence. This ensures the integrity and uniqueness of the source prefix table and provides an effective index basis for subsequent routing operations.
[0098] In some embodiments, in step 103, the editing the source prefix table in the pre-stored forwarding information base using the target source address according to the operation type to obtain an edited source prefix table, and determining the target routing index column sequence number from the edited source prefix table includes:
[0099] Step D1, in response to the operation type being deleting routing information and determining that there is an address corresponding to the target source address in the source prefix table, mark the target source address as to be deleted in the source prefix table.
[0100] Step D2: Store the correspondence between the target source address marked for deletion and the column serial number corresponding to the target source address to obtain an edited source prefix table.
[0101] Step D3: Search for the column serial number corresponding to the target source address in the edited source prefix table, and use the column serial number corresponding to the target source address as the target routing index column serial number.
[0102] In the above solution, if the operation type is to delete routing information, check whether there is already a record in the source prefix table that matches the target source address.
[0103] If there is an address corresponding to the target source address in the source prefix table, it indicates that the routing information may exist and can be further processed.
[0104] If not, there is no need to perform subsequent deletion operations (it may directly return an error or prompt "address does not exist").
[0105] If there is an address corresponding to the target source address in the source prefix table, the record is not directly deleted, but marked for deletion. After being marked for deletion, the record remains temporarily in the source prefix table but is marked as a special status (for example, setting a flag bit or field value). This is to ensure that additional checks or operations (such as correlation verification) can be performed before deletion.
[0106] Support batch deletion operations to avoid data loss due to failures during operations.
[0107] The target routing index column serial number is used for subsequent operations (such as actually deleting records, updating records, etc.), facilitating quick positioning and processing, and providing an index basis for subsequent operations.
[0108] In some embodiments, in step 104, the editing process of the index table in the pre-stored forwarding information library by using the target routing index row serial number and the target routing index column serial number according to the operation type to obtain an edited index table, and determining the target routing index value from the edited index table includes:
[0109] Step E1: In response to the operation type being to add routing information and determining that there is no index value corresponding to the target routing index row serial number and the target routing index column serial number in the index table, add a new storage row after the last storage row in the index table and generate a routing index value for the newly added storage row.
[0110] Step E2, store the correspondence between the target routing index row number and the target routing index column number and the routing index value of the newly added storage row in the newly added storage row, obtain the edited index table, and set the target routing index value as the routing index value of the newly added storage row.
[0111] In the above solution, the index table can be understood as a two-dimensional data structure (such as a table), where the rows and columns respectively correspond to certain identifiers (such as routing index row sequences, routing index column numbers), and each intersection stores an index value.
[0112] If the operation type is to add routing information, further check whether there is already an index value corresponding to the routing index row sequence and the routing index column number in the index table.
[0113] In the index table, each index value is uniquely determined by a specific row (routing index row number) and column (routing index column number).
[0114] If there is no index value corresponding to the target routing index row number and the target routing index column number in the index table, add a storage row after the last storage row in the index table, and generate a routing index value for the newly added storage row. This step actually assigns a new unique identifier (index value) to the newly added routing information.
[0115] After the above processing, the index table is updated, with the corresponding index value and the correspondence between the target routing index row number and the target routing index column number added. At this time, the index table is called the edited index table.
[0116] Extract the index value corresponding to the target routing index row number and the target routing index column number from the edited index table. This index value is the target routing index value corresponding to the newly added routing information.
[0117] In some embodiments, in step 104, the editing the index table in the pre-stored forwarding information library using the target routing index row number and the target routing index column number according to the operation type to obtain an edited index table, and determining the target routing index value from the edited index table includes:
[0118] Step F1, in response to the operation type being to delete routing information and determining that there is an index value corresponding to the target routing index row number and the target routing index column number in the index table, mark the index value corresponding to the target routing index row number and the target routing index column number in the index table as to be deleted.
[0119] Step F2, store the serial numbers of the target routing index rows and the target routing index columns marked for deletion, and the correspondence between the serial numbers of the target routing index rows and the target routing index columns and the corresponding index values, to obtain an edited index table.
[0120] Step F3, search the edited index table for the index value corresponding to the target routing index row number and the target routing index column number, and use the index value corresponding to the target routing index row number and the target routing index column number as the target routing index value.
[0121] In the above solution, if the operation type is to delete routing information, it is necessary to check the data structure of the index table to determine whether there is an index value corresponding to the given target routing index row number and target routing index column number.
[0122] The target routing index row number and the target routing index column number can be understood as the row and column identifiers of routing information in a two-dimensional table (or similar structure), used to locate specific data.
[0123] If there is indeed an index value in the index table corresponding to the specified target routing index row number and routing index column number, mark this index value for deletion (possibly implemented through a certain status field or flag bit), and use the index table storing the correspondence between the serial numbers of the target routing index rows and the target routing index columns marked for deletion and the index values corresponding to the target routing index row numbers and the target routing index column numbers as the edited index table:
[0124] Search the edited index table for the index value corresponding to the target routing index row number and the target routing index column number.
[0125] Extract this index value and use it as the final target routing index value for processing or return.
[0126] This kind of logic may be used for the routing table management of network devices (such as routers), allowing users to delete specified routing information.
[0127] Marking for deletion may be for implementing delayed deletion or batch processing, to avoid data inconsistency caused by directly modifying the index table.
[0128] In some embodiments, in step 105, the editing the forwarding information table in the pre-stored forwarding information library using the target routing index value according to the operation type to obtain an edited forwarding information table includes:
[0129] Step G1, in response to the operation type being adding routing information and determining that there is no forwarding information corresponding to the target routing index value in the forwarding information table, extract the target forwarding information from the routing information and add a storage row after the last storage row in the forwarding information table.
[0130] Step G2, store the correspondence between the target forwarding information and the target routing index value in the newly added storage row to obtain an edited forwarding information table.
[0131] In the above solution, if the operation type is adding routing information, check the forwarding information table to determine whether there is already forwarding information corresponding to the target routing index value.
[0132] The target routing index value is usually the unique identifier of the routing information (such as the target IP address, subnet mask, interface identifier, etc.), which is used to quickly locate and match routing rules.
[0133] If there is no corresponding record in the forwarding information table, it means that the routing information to be added currently has not been recorded, so an addition operation needs to be performed.
[0134] If it is confirmed that there is no corresponding record in the forwarding information table, extract the necessary fields or data from the currently received routing information to construct a target forwarding information.
[0135] The target forwarding information may include specific contents such as the target address, next-hop address, interface name, priority, metric value, etc., which are used to describe how the data packet should be forwarded.
[0136] Insert the extracted target forwarding information into the forwarding information table to complete the addition operation.
[0137] This step usually involves an insert operation on the database or an update of the data structure in memory.
[0138] After the addition operation is completed, the content of the forwarding information table has changed, and a new record has been added. Store the correspondence between the target forwarding information and the target routing index value in the newly added storage row. At this time, the forwarding information table is updated to an edited forwarding information table because it contains the latest routing rules.
[0139] This kind of logic usually appears in network devices (such as routers, switches) or software-defined network (SDN) controllers, which is used to dynamically manage the routing table to ensure that network data can be correctly forwarded according to the latest rules.
[0140] In some embodiments, in step 105, the process of editing the forwarding information table in the pre-stored forwarding information base using the target routing index value according to the operation type to obtain an edited forwarding information table includes:
[0141] Step H1, in response to the operation type being deleting routing information, search for the forwarding information corresponding to the target routing index value in the forwarding information table.
[0142] Step H2, if there is no other routing index value corresponding to the forwarding information in the forwarding information table, then delete the correspondence between the forwarding information corresponding to the target routing index value and the target routing index value in the forwarding information table to obtain an edited forwarding information table.
[0143] In the above solution, if the operation type is deleting routing information, search for the forwarding information corresponding to the given routing index value in the forwarding information table.
[0144] Among them, the target routing index value can be understood as a key value used to uniquely identify a certain routing information, and through it, the specific forwarding information can be located in the forwarding information table.
[0145] After finding the forwarding information corresponding to the target routing index value, it is necessary to further check whether there is any other routing index value in the forwarding information table associated with this forwarding information. Here, the association means that this forwarding information is referenced or relied on by other routing index values.
[0146] If there is no other routing index value corresponding to this forwarding information in the forwarding information table (that is, this forwarding information is not referenced or relied on by other routing index values), then it can be considered that this forwarding information is isolated and can be safely deleted.
[0147] When it is confirmed that the forwarding information is isolated, delete the forwarding information corresponding to this routing index value in the forwarding information table.
[0148] After the deletion operation is completed, the forwarding information table has been edited and the unnecessary forwarding information has been removed. The forwarding information table obtained at this time is the updated version.
[0149] The above method ensures that the deletion operation is only performed when the forwarding information is not referenced or relied on by other routing index values, thereby maintaining the integrity and consistency of the forwarding information table.
[0150] In some embodiments, after step 105, the method further includes:
[0151] Step I1, in response to receiving a routing data packet, the routing data packet includes the current destination address and the current source address of the data packet header.
[0152] Step I2: Look up the current routing index row number corresponding to the current destination address from the edited destination prefix table.
[0153] Step I3: Look up the current routing index column number corresponding to the current source address from the edited source prefix table.
[0154] Step I4: Look up the current routing index value corresponding to the current routing index row number and the current routing index column number from the edited index table.
[0155] Step I5: Look up the current forwarding information corresponding to the current routing index value from the edited forwarding information table, where the current forwarding information includes the next-hop address and the egress interface information.
[0156] Step I6: Transmit the routing data packet according to the next-hop address and the egress interface information.
[0157] In the above solution, when a router receives a data packet, its header contains: the current destination address (Destination Address) and the current source address (Source Address).
[0158] Among them, the current destination address represents the target Internet Protocol (IP) address of the data packet. The current source address represents the IP address of the sender of the data packet.
[0159] The edited destination prefix table represents the latest destination prefix table, which stores the correspondence between different destination addresses and routing index row numbers.
[0160] The router looks up the entry matching the current destination address in the edited destination prefix table to obtain the corresponding current routing index row number (for example, row number 3).
[0161] The edited source prefix table represents the latest source prefix table, which stores the correspondence between different source addresses and routing index column numbers.
[0162] The router looks up the entry matching the current source address to obtain the corresponding current routing index column number (for example, column number 5).
[0163] Locate the specific routing index value through the previous routing index row number and the current routing index column number. For example, using row number (3) and column number (5), look up the value at the intersection in the index table, which is the current routing index value (for example, 42).
[0164] The edited forwarding information label represents the latest forwarding information table, which stores the correspondence between the routing index value and the forwarding information. For example, according to the index value (42), the corresponding current forwarding information is retrieved from the edited forwarding information label table, which usually includes the next-hop address (Next Hop) and the outgoing interface information (Outgoing Interface).
[0165] Among them, the next-hop address represents the IP address of the next router to which the data packet should be sent. The outgoing interface information represents the local physical / logical interface.
[0166] Based on the retrieved next-hop address and outgoing interface, the router forwards the data packet from the correct port to complete the routing process. For example, if the next-hop address is 203.0.113.1 and the outgoing interface is Eth2. Then the data packet is sent out from the outgoing interface Eth2 of the router and sent to the next router 203.0.113.1.
[0167] In some embodiments, a method for managing routing information for an IPv6 network proposed in this application has a core of separating and storing the destination prefix and the source prefix, mapping them to the row number and column number of a two-dimensional FIB index table respectively, and combining with the FIB forwarding information table to achieve the simplification of routing storage and the acceleration of the forwarding process.
[0168] Specifically as follows:
[0169] The pre-stored forwarding information base consists of four tables, namely the two-dimensional FIB destination prefix table (i.e., the destination prefix table), the two-dimensional FIB source prefix table (i.e., the source prefix table), the two-dimensional FIB index table (i.e., the index table), and the FIB forwarding information table (i.e., the forwarding information table).
[0170] The two-dimensional FIB destination prefix table (as shown in Table 1) has two columns: the destination prefix, and the row where the two-dimensional FIB index table is located;
[0171] Table 1
[0172] Purpose Prefix Row of Two-Dimensional FIB Index Table DestPrefix1 R1 DestPrefix2 R2 …… ……
[0173] The two-dimensional FIB source prefix table (as shown in Table 2) has two columns: the source prefix, and the column where the two-dimensional FIB index table is located. For each two-dimensional FIB entry, the destination prefix and the source prefix are stored separately in their respective tables. Among them, each destination prefix corresponds to a row number, and each source prefix corresponds to a column number.
[0174] Table 2
[0175] Source Prefix Column of Two-Dimensional FIB Index Table SrcPrefix1 C1 SrcPrefix2 C2 …… ……
[0176] Through the row number and column number, a two-dimensional FIB array element in the two-dimensional FIB index table (as shown in Table 3) can be uniquely determined. The element value of this two-dimensional FIB array is an index that points to the FIB forwarding information of this entry in the FIB forwarding information table (as shown in Table 4): next hop, outgoing interface, etc. This structure can be effectively adapted to common forwarding hardware such as Field Programmable Gate Array (FPGA) and ternary content addressable memory (TCAM). In addition, this structure also supports storing one-dimensional FIB entries, which will be specifically described in the implementation use cases.
[0177] Table 3
[0178] C1 C2 …… R1 Z1 Z3 Z2 R2 Z1 Z1 Z2 …… …… …… ……
[0179] Table 4
[0180] Index Next Hop Output Interface Z1 NextHop1 port01 Z2 NextHop2 port02 Z3 NextHop3 port03 …… …… ……
[0181] Specifically, it is implemented according to the following steps (as Figure 2 shown):
[0182] Step 1, initialize the two-dimensional FIB storage structure;
[0183] Step 1.1, create four tables: two-dimensional FIB destination prefix table (Table 1), two-dimensional FIB source prefix table (Table 2), two-dimensional FIB index table (Table 3), and FIB forwarding information table (Table 4);
[0184] Step 1.2, determine the storage rules of the destination prefix table and the source prefix table, and allocate row numbers for each destination prefix and column numbers for each source prefix respectively;
[0185] Step 1.3, initialize the two-dimensional FIB index table and set all elements to null values;
[0186] Step 2, receive routing messages;
[0187] Step 2.1, the router receives routing messages from dynamic protocols or static configurations, extracts routing information, including destination prefix, source prefix, and next hop information;
[0188] Step 2.2, judge the message type: if it is a new routing message, jump to Step 3; if it is a delete routing message, jump to Step 7;
[0189] Step 3, compare and update the destination prefix table: strictly compare the destination prefix in the destination prefix table to check if the destination prefix exists;
[0190] Step 3.1, if the destination prefix does not exist, add the prefix and assign a unique line number;
[0191] Step 3.2, if the destination prefix already exists, directly obtain the corresponding line number;
[0192] Step 4, compare and update the source prefix table: strictly compare the source prefix in the source prefix table to check if the source prefix exists;
[0193] Step 4.1, if the source prefix does not exist, add the prefix and assign a unique column number;
[0194] Step 4.2, if the source prefix already exists, directly obtain the corresponding column number;
[0195] Step 5, update the two-dimensional FIB index table;
[0196] Step 5.1, based on the row number (Row) and column number (Column) obtained in Step 3 and Step 4, locate the specific position in the two-dimensional FIB index table;
[0197] Step 5.2, compare the next-hop information (i.e., forwarding information): search for the next-hop information (including the next-hop address, outgoing interface, etc.) in the FIB forwarding information table;
[0198] Step 5.2.1, if the next-hop information does not exist, add the information and assign an index value z;
[0199] Step 5.2.2, if the next-hop information already exists, directly obtain the corresponding index value z;
[0200] Step 5.3, compare the current value in the two-dimensional FIB index table with the index value z;
[0201] Step 5.3.1, if they are equal, it means the route already exists, jump to Step 8;
[0202] Step 5.3.2, if they are not equal, update the value at the corresponding position in the two-dimensional FIB index table to z;
[0203] Step 5.4, run the active filling mechanism to update the copied route entries;
[0204] Step 5.4.1, search in the source prefix table for all existing source prefixes that are longer than the current source prefix and can match the current prefix;
[0205] Step 5.4.2, obtain the corresponding column numbers {y1, y2,..., yn} of these source prefixes;
[0206] Step 5.4.3, traverse the corresponding row numbers and column numbers {A[x][y1], A[x][y2], ……, A[x][yn]} in the two-dimensional FIB index table, and update all values marked as "copied" to the current index value z until a real existing routing entry is encountered;
[0207] Step 6, after the storage and update processing of the new route is completed, jump to Step 14;
[0208] Step 7, search the destination prefix table: strictly compare the destination prefix in the destination prefix table to find the corresponding row number Row;
[0209] Step 7.1, if the destination prefix already exists, obtain the corresponding row number Row;
[0210] Step 7.2, if the destination prefix does not exist, it means that the route does not exist, then directly end the deletion process and jump to Step 13;
[0211] Step 8, search the source prefix table: strictly compare the source prefix in the source prefix table to find the corresponding column number Column;
[0212] Step 8.1, if the source prefix already exists, obtain the corresponding column number Column;
[0213] Step 8.2, if the source prefix does not exist, it means that the route does not exist, then directly end the deletion process and jump to Step 13;
[0214] Step 9, clear the values in the two-dimensional FIB index table;
[0215] Step 9.1, according to the row number Row and column number Column obtained in Step 7 and Step 8, locate the specific position in the two-dimensional FIB index table;
[0216] Step 9.2, clear the value at the corresponding position in the two-dimensional FIB index table, that is, set it to a null value;
[0217] Step 10, check and update the FIB forwarding information table;
[0218] Step 10.1, obtain the next-hop index value z corresponding to the deleted route;
[0219] Step 10.2, check whether there are other routes in the FIB forwarding information table using this next-hop information;
[0220] Step 10.2.1, if there are no other routes using this next-hop information, then delete this next-hop information from the FIB forwarding information table;
[0221] Step 10.2.2, if there are other routes using this next-hop information, then retain this next-hop information;
[0222] Step 11, run the active filling mechanism to update the copied routing entries;
[0223] Step 11.1, search in the source prefix table for all existing source prefixes that are longer than the current source prefix length and can match the current prefix;
[0224] Step 11.2, obtain the column numbers {y1, y2,..., yn} corresponding to these source prefixes;
[0225] Step 11.3, traverse the corresponding row numbers and column numbers {A[x][y1], A[x][y2],..., A[x][yn]} in the two-dimensional FIB index table, and update all values marked as "copied" to the index values corresponding to the nearest real routing entry until a real existing routing entry is encountered;
[0226] Step 12, delete the destination prefix and the source prefix;
[0227] Step 12.1, check whether there are other associated routes in the current row of the destination prefix table;
[0228] Step 12.1.1, if so, do not process and jump to Step 12.2;
[0229] Step 12.1.2, if there are no other associated routes, delete the destination prefix from the destination prefix table;
[0230] Step 12.2, check whether there are other associated routes in the current column of the source prefix table;
[0231] Step 12.2.1, if so, do not process and jump to Step 13;
[0232] Step 12.2.2, if there are no other associated routes, delete the source prefix from the source prefix table;
[0233] Step 13, after the storage and update processing of the route deletion is completed, jump to Step 14;
[0234] Step 14, end.
[0235] As an optional embodiment, the present application also proposes a two-dimensional FIB routing information forwarding method, which is for the management of routing information for an IPv6 network in view of the structure of the pre-stored forwarding information library mentioned above. The principle of table lookup and forwarding is: after the longest match of the destination prefix, then the longest match of the source prefix. It is specifically implemented according to the following steps (as Figure 3 shown):
[0236] Step 301, when the router receives a data packet, obtain the source and destination addresses of the data packet header;
[0237] Step 302: Check the two-dimensional FIB destination prefix table (Table 1) to obtain the row number (Row).
[0238] Step 303: Check the two-dimensional FIB source prefix table (Table 2) to obtain the column number (Column).
[0239] Step 304: Locate the position in the two-dimensional FIB index table (Table 3) according to the row number (Row) and column number (Column) obtained in Steps 1 and 2, and obtain the forwarding information index (Index) (i.e., obtain the index value).
[0240] Step 305: Check the FIB forwarding information table (Table 4) according to the forwarding information index (Index) obtained in Step 304 to obtain information such as the next hop and outgoing interface (i.e., the next hop information).
[0241] Step 306: The router forwards the data packet according to the result of the table lookup.
[0242] Step 307: End.
[0243] Compared with the traditional technology, the advantage of this application is that by optimizing the storage structure and table lookup mechanism, it significantly reduces the occupancy of routing storage space, reduces the forwarding delay, and at the same time supports ordinary forwarding and IPv6 Segment Routing (SRv6) forwarding, adapts to hardware such as FPGA and TCAM, and provides an efficient and reliable solution for the efficient routing storage and forwarding in the complex network environment of the power industry.
[0244] In some embodiments, the method for managing routing information for IPv6 networks proposed in this application optimizes the storage method of two-dimensional routing into a separate storage method based on a destination prefix table, a source prefix table, a two-dimensional index table, and an FIB forwarding information table, avoiding the redundancy problem of repeatedly storing destination prefixes and source prefixes in the traditional method. Taking a network with 1,000 destination prefixes and 500 source prefixes as an example, the traditional method needs to store 500,000 complete two-dimensional routes, occupying approximately 20 MB of storage space, while this invention only needs to store approximately 2 MB of data, saving approximately 90% of the storage space. This optimization is particularly significant in large-scale networks, and the saving ratio is usually between 85% and 95%. The specific implementation is as follows (illustrated with examples):
[0245] As Figure 4As shown in the figure, a certain power grid company has deployed an intelligent grid communication network to support key services such as power dispatching, power consumption information collection, and Internet of Things device management. The network includes four routers R1, R2, R3, and R4, which are located in different regions and are responsible for the communication requirements of their respective regions. The routers exchange IPv6 routing information dynamically through the OSPFv3 protocol to achieve efficient communication across the network. In the network topology, R1 is connected to R2 through interface eth0; R2 is connected to R1 through interface eth0 and to R4 through interface eth1; R4 is connected to R2 through interface eth0 and to terminal devices (such as power dispatching centers or power consumption information collection devices) through interface eth2. The IPv6 addresses of each interface have been configured, and the OSPFv3 protocol has been enabled.
[0246] In this network, R4 is responsible for advertising the routing information to reach terminal devices (such as power dispatching centers). After R2 receives or configures two-dimensional routing by itself, it needs to update the relevant table entries to ensure the accuracy and efficiency of route lookup. At the same time, R1 needs to forward a data packet through R2. The destination address of the data packet is 3000:2::2, and the source address is 2001:1::1, and it finally reaches the terminal device of R4.
[0247] Taking R2 as an example, the content of the present invention is described, and the efficient processing of route update and data packet forwarding is achieved through the following steps, specifically as follows:
[0248] In the initial state of R2, it has learned basic routing information through the Open Shortest Path First (OSPF) protocol, including the source prefix of 2001:: / 64. Among them, the initial content of the destination prefix table is shown in Table 5:
[0249] Table 5
[0250] Purpose Prefix Row Number 3000:1:: / 64 1
[0251] The initial content of the source prefix table is shown in Table 6:
[0252] Table 6
[0253] Source Prefix Column Number 2001:: / 64 1
[0254] The initial content of the index table is shown in Table 7:
[0255] Table 7
[0256] 2001:: / 64 3000:1:: / 64 z0
[0257] The initial content of the forwarding information table is shown in Table 8:
[0258] Table 8
[0259] Index Next Hop Output Interface z0 2001:1::1 eth0
[0260] R4 advertises two-dimensional routing information (routing entries where neither the destination prefix nor the source prefix exists) to R2 via OSPF. The two-dimensional routing information is shown in Table 9 as follows:
[0261] Table 9
[0262] Purpose Prefix Source Prefix Next Hop Output Interface 3000:2:: / 64 2001:1:: / 64 2001:3::2 eth1
[0263] After receiving this route, R2 updates the two-dimensional FIB table according to the following steps;
[0264] Step 401, update the destination prefix table: Search for the destination prefix 3000:2:: / 64 and find that it does not exist. Add this prefix and assign line number 2. The updated destination prefix table is shown in Table 10:
[0265] Table 10
[0266] Purpose Prefix Column Number 3000:1:: / 64 1 3000:2:: / 64 2
[0267] Step 402, update the source prefix table: Search for the source prefix 2001:1:: / 64 and find that it does not exist. Add this prefix and assign column number 2. The updated source prefix table is shown in Table 11:
[0268] Table 11
[0269] Source Prefix Column Number 2001:: / 64 1 2001:1:: / 64 2
[0270] Step 403, update the two-dimensional FIB index table;
[0271] Step 4031, locate the positions of line number 2 and column number 2 in the two-dimensional FIB index table;
[0272] Step 4032, search the FIB forwarding information table and find that there is no next hop 2001:3::2 and outgoing interface eth1. Then assign index value z1;
[0273] Step 4033, update the value at the corresponding position in the two-dimensional FIB index table to z1. The updated index table is shown in Table 12:
[0274] Table 12
[0275] 2001:: / 64 2001:1:: / 64 3000:1:: / 64 z0 Empty 3000:2:: / 64 Empty z1
[0276] Step 4034, update the FIB forwarding information table, and add an entry with index z1 to the FIB forwarding information table. The updated forwarding information table is shown in Table 13:
[0277] Table 13
[0278] Index Next Hop Output Interface z0 2001:1::1 eth0 z1 2001:3::2 eth1
[0279] R2 configures the following two-dimensional routing information (routing entries where the destination prefix does not exist and the source prefix exists), and this routing information is shown in Table 14:
[0280] Table 14
[0281] Purpose Prefix Source Prefix Next Hop Output Interface 3000:3:: / 64 2001:: / 64 2001:4::3 eth2
[0282] R2 updates the two-dimensional FIB table according to the following steps;
[0283] Step 405, update the destination prefix table: Search for the destination prefix 3000:3:: / 64, and find that it does not exist, then add this prefix and assign the line number 3. The updated destination prefix table is shown in Table 15:
[0284] Table 15
[0285] Purpose Prefix Column Number 3000:1:: / 64 1 3000:2:: / 64 2 3000:3:: / 64 3
[0286] Step 406, update the source prefix table: Search for the source prefix 2001:2:: / 64, which already exists, and the column number is 1. The updated source prefix table is shown in Table 16:
[0287] Table 16
[0288] Source Prefix Column Number 2001:: / 64 1 2001:1:: / 64 2
[0289] Step 407, update the two-dimensional index table;
[0290] Step 4071, locate the positions of line number 3 and column number 1 in the two-dimensional index table;
[0291] Step 4072, search the FIB forwarding information table, and find that there is no entry for the next hop 2001:4::3 and the outgoing interface eth2, then assign the index value z2;
[0292] Step 4073, update the value at the corresponding position in the two-dimensional index table to z2. The updated index table is shown in Table 17:
[0293] Table 17
[0294] 2001:: / 64 2001:1:: / 64 3000:1:: / 64 z0 Empty 3000:2:: / 64 Empty z1 3000:3:: / 64 z2 Empty
[0295] Step 408, update the FIB forwarding information table, and add an entry with the index z2 to the FIB forwarding information table. The updated forwarding information table is shown in Table 18:
[0296] Table 18
[0297] Index Next Hop Output Interface z0 2001:1::1 eth0 z1 2001:3::2 eth1 z2 2001:4::3 eth2
[0298] R2 configures the following two-dimensional routing information (routing entries where the destination prefix exists and the source prefix does not), and this routing information is shown in Table 19:
[0299] Table 19
[0300] Purpose Prefix Source Prefix Next Hop Output Interface 3000:1:: / 64 2001:2:: / 64 2001:5::4 eth3
[0301] R2 updates the two-dimensional FIB table according to the following steps;
[0302] Step 409, update the destination prefix table: Search for the destination prefix 3000:1:: / 64, which already exists, and the row number is 1;
[0303] Step 410, update the source prefix table: Search for the source prefix 2001:2:: / 64 and find that it does not exist, then add this prefix and assign the column number 3. The updated source prefix table is shown in Table 20:
[0304] Table 20
[0305] Source Prefix Column Number 2001:: / 64 1 2001:1:: / 64 2 2001:2:: / 64 3
[0306] Step 411, update the two-dimensional index table;
[0307] Step 4111, locate the position of row number 1 and column number 3 in the two-dimensional index table;
[0308] Step 4112, search the FIB forwarding information table and find that there is no entry for the next hop 2001:5::4 and the outgoing interface eth3, then assign the index value z3;
[0309] Step 4113, update the value at the corresponding position in the two-dimensional index table to z3. The updated index table is shown in Table 21:
[0310] Table 21
[0311] 2001:: / 64 2001:1:: / 64 2001:2:: / 64 3000:1:: / 64 z0 Empty z3 3000:2:: / 64 Empty z1 Empty 3000:3:: / 64 z2 Empty Empty
[0312] Step 412, update the FIB forwarding information table, add an entry with the index z2 in the FIB forwarding information table. The updated forwarding information table is shown in Table 22:
[0313] Table 22
[0314] Index Next Hop Output Interface z0 2001:1::1 eth0 z1 2001:3::2 eth1 z2 2001:4::3 eth2 z3 2001:5::4 eth3
[0315] R2 configures the following two-dimensional routing information (routing entries where both the source and destination prefixes exist, but the source prefix lengths are different), and this routing information is shown in Table 23:
[0316] Table 23
[0317] Purpose Prefix Source Prefix Next Hop Output Interface 3000:1:: / 64 2001:2:: / 64 2001:5::4 eth3
[0318] R2 updates the two-dimensional FIB table according to the following steps;
[0319] Step 413, update the destination prefix table: Search for the destination prefix 3000:1:: / 64, which already exists, and the row number is 1;
[0320] Step 414, update the source prefix table: Search for the source prefix 2001:1:: / 48 and find that it does not exist, then add this prefix and assign the column number 4. The updated source prefix table is shown in Table 24:
[0321] Table 24
[0322]
[0323]
[0324] Step 415, update the two-dimensional index table;
[0325] Step 4151, locate the positions of row number 1 and column number 4 in the two-dimensional index table;
[0326] Step 4152, search the FIB forwarding information table and find that there is no entry for the next hop 2001:6::5 and the outgoing interface eth4, then assign the index value z4;
[0327] Step 4153, update the value at the corresponding position in the two-dimensional index table to z4. The updated index table is shown in Table 25:
[0328] Table 25
[0329] 2001:: / 64 2001:1:: / 64 2001:2:: / 64 2001:1:: / 48 3000:1:: / 64 z0 Empty z3 z4 3000:2:: / 64 Empty z1 Empty Empty 3000:3:: / 64 z2 Empty Empty Empty
[0330] Step 4154, according to the filling mechanism, use the next-hop index corresponding to the source prefix 2001:1:: / 48, which is shorter than 2001:1:: / 64, that is, the next-hop index z4 corresponding to 2001:1:: / 64;
[0331] Step 4155, update the positions of row number 1 and column number 2 in the two-dimensional index table to the filled index value z4. The updated index table is shown in Table 26:
[0332] Table 26
[0333] 2001:: / 64 2001:1:: / 64 2001:2:: / 64 2001:1:: / 48 3000:1:: / 64 z0 z4 z3 z4 3000:2:: / 64 Empty z1 Empty Empty 3000:3:: / 64 z2 Empty Empty Empty
[0334] Step 416, update the FIB forwarding information table, add an entry with the index z2 in the FIB forwarding information table. The updated forwarding information table is shown in Table 27:
[0335] Table 27
[0336] Index Next Hop Output Interface z0 2001:1::1 eth0 z1 2001:3::2 eth1 z2 2001:4::3 eth2 z3 2001:5::4 eth3 z4 2001:6::5 eth4
[0337] R2 configures the following two-dimensional routing information, as shown in Table 28:
[0338] Table 28
[0339] Purpose Prefix Next Hop Output Interface 3000:4:: / 64 2001:7::6 eth5
[0340] R2 updates the two-dimensional FIB table according to the following steps;
[0341] Step 417, update the destination prefix table: Search for the destination prefix 3000:4:: / 64. Since it is not found, add this prefix and assign line number 4. The updated destination prefix table is shown in Table 29:
[0342] Table 29
[0343] Purpose Prefix Column Number 3000:1:: / 64 1 3000:2:: / 64 2 3000:3:: / 64 3 3000:4:: / 64 4
[0344] Step 418, update the two-dimensional index table;
[0345] Step 4181, locate the position of line number 4 in the two-dimensional index table;
[0346] Step 4182, search the FIB forwarding information table. Since the entry with the next hop 2001:7::6 and the outgoing interface eth5 is not found, assign the index value z5;
[0347] Step 4183, update the value at the corresponding position in the two-dimensional index table to z5. The updated index table is shown in Table 30:
[0348] Table 30
[0349] 2001:: / 64 2001:1:: / 64 2001:2:: / 64 2001:1:: / 48 :: / 0 3000:1:: / 64 z0 z4 z3 z4 Empty 3000:2:: / 64 Empty z1 Empty Empty Empty 3000:3:: / 64 z2 Empty Empty Empty Empty 3000:4:: / 64 Empty Empty Empty Empty z5
[0350] Step 419, update the FIB forwarding information table. Add an entry with the index z2 to the FIB forwarding information table. The updated forwarding information table is shown in Table 31:
[0351] Table 31
[0352] Index Next Hop Output Interface z0 2001:1::1 eth0 z1 2001:3::2 eth1 z2 2001:4::3 eth2 z3 2001:5::4 eth3 z4 2001:6::5 eth4 z5 2001:7::6 eth5
[0353] R1 needs to forward a data packet through R2. The destination address is 3000:2::2, the source address is 2001:1::1, and it finally reaches the terminal device of R4. R2 processes the data packet according to the following steps;
[0354] Step 420, search the destination prefix table. Search for the destination prefix 3000:2:: / 64 and match line number 2;
[0355] Step 421, search the source prefix table. Search for the source prefix 2001:1:: / 64 and match column number 2;
[0356] Step 422: Locate the position of row number 2 and column number 2 in the two-dimensional index table, and obtain the index value z1;
[0357] Step 423: Search the FIB forwarding information table: According to the index value z1, search the forwarding information table to obtain the next hop 2001:3::2 and the outgoing interface eth1;
[0358] Step 424: Forward the data packet: R2 forwards the data packet to R4 through interface eth1;
[0359] R4 revoked the following two-dimensional routing information, as shown in Table 32:
[0360] Table 32
[0361] Purpose Prefix Source Prefix Next Hop Output Interface 3000:2:: / 64 2001:1:: / 64 2001:3::2 eth1
[0362] R2 needs to delete this route and update the two-dimensional FIB table;
[0363] Step 425: Search for the destination prefix 3000:2:: / 64, with row number 2;
[0364] Step 426: Search for the source prefix 2001:1:: / 64, with column number 2;
[0365] Step 427: Clear the two-dimensional FIB index table;
[0366] Step 4271: Locate the position of row number 2 and column number 2 in the two-dimensional FIB index table, and set the value to null. The updated index table is shown in Table 33:
[0367] Table 33
[0368] 2001:: / 64 2001:1:: / 64 2001:2:: / 64 2001:1:: / 48 :: / 0 3000:1:: / 64 z0 z4 z3 z4 Empty 3000:2:: / 64 Empty Empty Empty Empty Empty 3000:3:: / 64 z2 Empty Empty Empty Empty 3000:4:: / 64 Empty Empty Empty Empty z5
[0369] Step 428: Update the FIB forwarding information table, search for the index z1, and if no other routes use it, delete the index z1 from the FIB forwarding information table. The updated forwarding information table is shown in Table 34:
[0370] Table 34
[0371] Index Next Hop Output Interface z0 2001:1::1 eth0 z2 2001:4::3 eth2 z3 2001:5::4 eth3 z4 2001:6::5 eth4 z5 2001:7::6 eth5
[0372] Step 429: Check if there are other associated routes for the source prefix 2001:1:: / 64, and retain this prefix in the source prefix table;
[0373] Step 430: Check if there are no other associated routes for the destination prefix 3000:2:: / 64, and delete this prefix from the destination prefix table. The updated destination prefix table is shown in Table 35:
[0374] Table 35
[0375] Purpose Prefix Column Number 3000:1:: / 64 1 3000:3:: / 64 3 3000:4:: / 64 4
[0376] Step 431, end.
[0377] As Figure 5 shown, step 501: Obtain the source IPv6 address and the destination IPv6 address of the header in the data packet;
[0378] Step 502: Look up the destination prefix table to obtain the row number;
[0379] Step 503: Look up the source prefix table to obtain the column number;
[0380] Step 504: Locate the position of the Application Delivery Network (ADN) routing table according to the row number and the column number to obtain the forwarding information index (or pointer);
[0381] Step 505: Obtain information such as the next hop and the outgoing interface or the stack information of the Status Register (SR) according to the forwarding information index (or pointer);
[0382] Step 506: Forward the data packet according to the result of the table lookup.
[0383] It should be noted that the method of the embodiment of the present application can be executed by a single device, such as a computer or a server, etc. The method of this embodiment can also be applied to a distributed scenario and completed by the cooperation of multiple devices. In this case of a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiment of the present application, and these multiple devices will interact with each other to complete the described method.
[0384] It should be noted that some embodiments of the present application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order than in the above embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0385] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a management device for routing information for an IPv6 network.
[0386] Referring to Figure 6 , the management device for routing information for an IPv6 network includes:
[0387] An operation type determination module 601, configured to determine an operation type corresponding to the routing information in response to receiving the routing information, where the routing information at least includes a destination end address and a source address;
[0388] A destination prefix table editing module 602, configured to edit a destination prefix table in a pre-stored forwarding information base by using the destination end address according to the operation type, obtain an edited destination prefix table, and determine a target routing index row number from the edited destination prefix table, where the destination prefix table includes a correspondence between different end addresses and routing index row numbers;
[0389] A source prefix table editing module 603, configured to edit a source prefix table in a pre-stored forwarding information base by using the source address according to the operation type, obtain an edited source prefix table, and determine a target routing index column number from the edited source prefix table, where the source prefix table includes a correspondence between different source addresses and routing index column numbers;
[0390] An index table editing module 604, configured to edit an index table in a pre-stored forwarding information base by using the target routing index row number and the target routing index column number according to the operation type, obtain an edited index table, and determine a target routing index value from the edited index table, where the index table includes a correspondence between different routing index row numbers and routing index column numbers and a routing index value;
[0391] A forwarding information table editing module 605, configured to edit a forwarding information table in a pre-stored forwarding information base by using the target routing index value according to the operation type, obtain an edited forwarding information table.
[0392] In some embodiments, the destination prefix table editing module 602 is specifically configured to:
[0393] In response to the operation type being adding routing information and determining that there is no address corresponding to the destination end address in the destination prefix table, a new storage row is added after the last storage row in the destination prefix table, and a row number of the newly added storage row is generated;
[0394] Store the correspondence between the destination end address and the row number of the newly added storage row in the newly added storage row, obtain an edited destination prefix table, and use the row number of the newly added storage row in the edited destination prefix table as the target routing index row number.
[0395] In some embodiments, the destination prefix table editing module 602 is specifically configured to:
[0396] In response to the operation type being deletion of routing information and determining that there is an address corresponding to the target destination address in the destination prefix table, mark the target destination address as to be deleted in the destination prefix table;
[0397] Store the correspondence between the target destination address marked as to be deleted and the row number corresponding to the target destination address to obtain an edited destination prefix table;
[0398] Search for the row number corresponding to the target destination address in the edited destination prefix table, and use the row number corresponding to the target destination address as the target routing index row number.
[0399] In some embodiments, the source prefix table editing module 603 is specifically configured to:
[0400] In response to the operation type being addition of routing information and determining that there is no address corresponding to the target source address in the source prefix table, add a storage row after the last storage row in the source prefix table and generate a column number for the newly added storage row;
[0401] Store the correspondence between the target source address and the column number of the newly added storage row in the newly added storage row to obtain an edited source prefix table, and use the column number of the newly added storage row in the edited source prefix table as the target routing index column number.
[0402] In some embodiments, the source prefix table editing module 603 is specifically configured to:
[0403] In response to the operation type being deletion of routing information and determining that there is an address corresponding to the target source address in the source prefix table, mark the target source address as to be deleted in the source prefix table;
[0404] Store the correspondence between the target source address marked as to be deleted and the column number corresponding to the target source address to obtain an edited source prefix table;
[0405] Search for the column number corresponding to the target source address in the edited source prefix table, and use the column number corresponding to the target source address as the target routing index column number.
[0406] In some embodiments, the index table editing module 604 is specifically configured to:
[0407] In response to the operation type being adding routing information, and it is determined that there is no index value corresponding to the target routing index row number and the target routing index column number in the index table, a new storage row is added after the last storage row in the index table, and a routing index value passing through the newly added storage row is generated;
[0408] In the newly added storage row, store the correspondence between the target routing index row number and the target routing index column number and the routing index value of the newly added storage row, obtain the index table after editing processing, and use the routing index value of the newly added storage row as the target routing index value.
[0409] In some embodiments, the index table editing module 604 is specifically configured to:
[0410] In response to the operation type being deleting routing information, and it is determined that there is an index value corresponding to the target routing index row number and the target routing index column number in the index table, mark the index value corresponding to the target routing index row number and the target routing index column number in the index table as to be deleted;
[0411] Store the correspondence between the target routing index row number and the target routing index column number marked as to be deleted and the index value corresponding to the target routing index row number and the target routing index column number, obtain the index table after editing processing;
[0412] Search for the index value corresponding to the target routing index row number and the target routing index column number in the index table after editing processing, and use the index value corresponding to the target routing index row number and the target routing index column number as the target routing index value.
[0413] In some embodiments, the forwarding information table editing module 605 is specifically configured to:
[0414] In response to the operation type being adding routing information, and it is determined that there is no forwarding information corresponding to the target routing index value in the forwarding information table, extract the target forwarding information from the routing information, and add a new storage row after the last storage row in the forwarding information table;
[0415] In the newly added storage row, store the correspondence between the target forwarding information and the target routing index value, obtain the forwarding information table after editing processing.
[0416] In some embodiments, the forwarding information table editing module 605 is specifically configured to:
[0417] In response to the operation type being deletion of routing information, look up the forwarding information corresponding to the target routing index value from the forwarding information table;
[0418] In response to there being no other routing index value corresponding to the forwarding information in the forwarding information table, delete the correspondence between the forwarding information corresponding to the target routing index value and the target routing index value in the forwarding information table, obtaining an edited forwarding information table.
[0419] For convenience of description, when describing the above device, it is divided into various modules according to functions and described separately. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0420] The device in the above embodiment is used to implement the corresponding management method of routing information for the IPv6 network in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0421] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the management method of routing information for the IPv6 network described in any of the above embodiments.
[0422] Figure 7 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 701, a memory 702, an input / output interface 703, a communication interface 704, and a bus 705. Among them, the processor 701, the memory 702, the input / output interface 703, and the communication interface 704 are communicatively connected to each other inside the device through the bus 705.
[0423] The processor 701 may be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0424] The memory 702 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 702 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 702 and called and executed by the processor 701.
[0425] The input / output interface 703 is used to connect to the input / output module to implement information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.
[0426] The communication interface 704 is used to connect to a communication module (not shown in the figure) to implement communication interaction between this device and other devices. Among them, the communication module can implement communication in a wired manner (such as USB, network cable, etc.) or in a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0427] The bus 705 includes a path for transmitting information between various components of the device (such as the processor 701, the memory 702, the input / output interface 703, and the communication interface 704).
[0428] It should be noted that although the above device only shows the processor 701, the memory 702, the input / output interface 703, the communication interface 704, and the bus 705, in the specific implementation process, this device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary for implementing the solutions of the embodiments of this specification and does not necessarily include all the components shown in the figure.
[0429] The electronic device in the above embodiment is used to implement the corresponding management method for routing information for the IPv6 network in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0430] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the management method for routing information for the IPv6 network as described in any of the foregoing embodiments.
[0431] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device.
[0432] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the management method of routing information for an IPv6 network as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0433] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application is limited to these examples; under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, and they are not provided in detail for the sake of brevity.
[0434] In addition, for the sake of simplicity of description and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. In addition, the devices may be shown in block diagram form in order to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application will be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0435] Although the present application has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0436] Embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the present application. Accordingly, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included within the protection scope of the present application.
Claims
1. A method for managing routing information for an IPv6 network, characterized in that Including: In response to receiving routing information, determining an operation type corresponding to the routing information, where the routing information at least includes a target destination address and a target source address; According to the operation type, using the target destination address to edit a destination prefix table in a pre-stored forwarding information base to obtain an edited destination prefix table, and determining a target routing index row number from the edited destination prefix table, where the destination prefix table includes the correspondence between different destination addresses and routing index row numbers; According to the operation type, using the target source address to edit a source prefix table in a pre-stored forwarding information base to obtain an edited source prefix table, and determining a target routing index column number from the edited source prefix table, where the source prefix table includes the correspondence between different source addresses and routing index column numbers; According to the operation type, using the target routing index row number and the target routing index column number to edit an index table in a pre-stored forwarding information base to obtain an edited index table, and determining a target routing index value from the edited index table, where the index table includes the correspondence between different routing index row numbers and routing index column numbers and the routing index value; According to the operation type, using the target routing index value to edit a forwarding information table in a pre-stored forwarding information base to obtain an edited forwarding information table.
2. The method according to claim 1, wherein The step of, according to the operation type, using the target destination address to edit a destination prefix table in a pre-stored forwarding information base to obtain an edited destination prefix table, and determining a target routing index row number from the edited destination prefix table, includes: In response to the operation type being adding routing information and determining that there is no address corresponding to the target destination address in the destination prefix table, adding a storage row after the last storage row in the destination prefix table and generating a row number of the newly added storage row; Storing the correspondence between the target destination address and the row number of the newly added storage row in the newly added storage row to obtain an edited destination prefix table, and using the row number of the newly added storage row in the edited destination prefix table as the target routing index row number.
3. The method according to claim 1, characterized in that, The step of, according to the operation type, using the target destination address to edit a destination prefix table in a pre-stored forwarding information base to obtain an edited destination prefix table, and determining a target routing index row number from the edited destination prefix table, includes: In response to the operation type being deleting routing information and determining that there is an address corresponding to the target destination address in the destination prefix table, marking the target destination address as to be deleted in the destination prefix table; Storing the correspondence between the target destination address marked as to be deleted and the row number corresponding to the target destination address to obtain an edited destination prefix table; Find the row number corresponding to the target destination address from the edited destination prefix table, and use the row number corresponding to the target destination address as the target routing index row number.
4. The method according to claim 1, characterized in that, The editing process of the source prefix table in the pre-stored forwarding information base using the target source address according to the operation type to obtain an edited source prefix table, and determining the target routing index column number from the edited source prefix table includes: In response to the operation type being adding routing information and determining that there is no address corresponding to the target source address in the source prefix table, add a storage row after the last storage row in the source prefix table, and generate the column number of the newly added storage row; Store the correspondence between the target source address and the column number of the newly added storage row in the newly added storage row to obtain an edited source prefix table, and use the column number of the newly added storage row in the edited source prefix table as the target routing index column number.
5. The method according to claim 1, wherein The editing process of the source prefix table in the pre-stored forwarding information base using the target source address according to the operation type to obtain an edited source prefix table, and determining the target routing index column number from the edited source prefix table includes: In response to the operation type being deleting routing information and determining that there is an address corresponding to the target source address in the source prefix table, mark the target source address as to be deleted in the source prefix table; Store the correspondence between the target source address marked as to be deleted and the column number corresponding to the target source address to obtain an edited source prefix table; Find the column number corresponding to the target source address from the edited source prefix table, and use the column number corresponding to the target source address as the target routing index column number.
6. The method according to claim 1, wherein The editing process of the index table in the pre-stored forwarding information base using the target routing index row number and the target routing index column number according to the operation type to obtain an edited index table, and determining the target routing index value from the edited index table includes: In response to the operation type being adding routing information and determining that there is no index value corresponding to the target routing index row number and the target routing index column number in the index table, add a storage row after the last storage row in the index table, and generate the routing index value of the newly added storage row; Store the correspondence between the target routing index row number and the target routing index column number, and the routing index value of the newly added storage row in the newly added storage row to obtain an edited index table, and use the routing index value of the newly added storage row as the target routing index value.
7. The method according to claim 1, wherein The editing process of the index table in the pre-stored forwarding information base using the target routing index row number and the target routing index column number according to the operation type to obtain an edited index table, and determining the target routing index value from the edited index table includes: In response to the operation type being deletion of routing information and it being determined that there is an index value corresponding to the target routing index row number and the target routing index column number in the index table, mark the index value corresponding to the target routing index row number and the target routing index column number in the index table as to be deleted; Store the correspondence between the target routing index row number and the target routing index column number marked as to be deleted and the index value corresponding to the target routing index row number and the target routing index column number, to obtain an index table after editing processing; Search for the index value corresponding to the target routing index row number and the target routing index column number from the index table after editing processing, and use the index value corresponding to the target routing index row number and the target routing index column number as the target routing index value.
8. The method according to claim 1, wherein The editing processing of the forwarding information table in the pre-stored forwarding information library by using the target routing index value according to the operation type to obtain an edited forwarding information table includes: In response to the operation type being addition of routing information and it being determined that there is no forwarding information corresponding to the target routing index value in the forwarding information table, extract target forwarding information from the routing information, and add a storage row after the last storage row in the forwarding information table; Store the correspondence between the target forwarding information and the target routing index value in the newly added storage row, to obtain an edited forwarding information table.
9. The method according to claim 1, characterized in that, The editing processing of the forwarding information table in the pre-stored forwarding information library by using the target routing index value according to the operation type to obtain an edited forwarding information table includes: In response to the operation type being deletion of routing information, search for the forwarding information corresponding to the target routing index value from the forwarding information table; In response to there being no other routing index value corresponding to the forwarding information in the forwarding information table, delete the correspondence between the forwarding information corresponding to the target routing index value and the target routing index value in the forwarding information table, to obtain an edited forwarding information table.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 9.