Method, device, storage medium and system for sending packet and generating route
Patent Information
- Application Number
- CN202110351687.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2041-03-31
AI Technical Summary
[0004]当通信网络的网络拓扑的数目较多且通信网络的规模较大时,通信网络中的每个设备的路由表中的路由表项数目会成倍增加,给路由表的容量和收敛带来巨大挑战
Smart Images

Figure CN115150329B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and in particular to a method, apparatus, storage medium, and system for sending messages and generating routes. Background Technology
[0002] Currently, multiple network topologies can be defined in a communication network. For ease of explanation, any device in the communication network will be referred to as the "first device." The first device can be associated with multiple network topologies, also known as the first device residing in multiple network topologies. To identify the first device in different network topologies, multiple address prefixes can be configured for the first device, with each address prefix corresponding one-to-one with a network topology. For any given address prefix corresponding to a network topology, that address prefix identifies the first device within that network topology. To guide the packet forwarding process in the communication network, the mapping between address prefixes and next-hop information needs to be stored in the routing table. Different address prefixes correspond to different next-hop information, forming a routing table entry.
[0003] In the process of developing this application, the inventors discovered that the prior art has at least the following problems:
[0004] When the number of network topologies in a communication network is large and the network size is large, the number of routing table entries in the routing table of each device in the communication network will increase exponentially, posing a huge challenge to the capacity and convergence of the routing table. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and system for sending messages and generating routes, so as to reduce the size of the routing table and enable the routing table to converge quickly. The technical solution is as follows:
[0006] Firstly, this application provides a method for sending a message. In this method, a first message is obtained, the first message including a first address prefix and first indication information. The first indication information indicates a first network topology, and the first address prefix indicates the destination address of the first message. The first address prefix is used to identify a first device among multiple network topologies, and the first network topology is one of the multiple network topologies. First next-hop information is obtained based on the first address prefix and the first indication information. The device corresponding to the first next-hop information belongs to the first network topology. The first next-hop information is included in target routing information, which includes the first address prefix. The target routing information also includes second next-hop information that can reach the first device. The device corresponding to the second next-hop information belongs to a second network topology among the multiple network topologies, and the second network topology is different from the first network topology. The first message is then sent based on the first next-hop information.
[0007] The first message includes a first address prefix and first indication information. Since the first address prefix identifies the first device across multiple network topologies, and the first indication information indicates the first network topology, the destination routing information includes the first address prefix, first next-hop information corresponding to the first network topology, and second next-hop information corresponding to the second network topology. In this case, the network device, based on the first address prefix and first indication information in the message, obtains the first next-hop information that can reach the first device within the first network topology, and sends the first message based on the first next-hop information. This allows a single routing message to include one address prefix and multiple next-hop information corresponding to multiple network topologies, significantly reducing the number of routing messages, thus reducing the size of the routing table and enabling rapid convergence of the routing table.
[0008] In one possible implementation, the target routing information includes the correspondence between first next-hop information and first indication information. The target routing information is determined based on the first address prefix, and the first next-hop information is determined within the target routing information based on the first indication information. This allows a single routing entry to include one address prefix and multiple next-hop information entries, forming a multi-topology routing table entry. By simultaneously including multiple next-hop information entries corresponding to different topologies in a multi-topology routing table entry, the increase in the number of routing table entries caused by the number of topologies is reduced. Forwarding table entries for multiple topologies can be reused, requiring only one prefix to be sent, thereby reducing the number of routing entries, reducing the capacity of the routing table, and enabling the routing table to converge quickly.
[0009] In another possible implementation, the first indication information includes the identification information of the flexible algorithm corresponding to the first network topology. Since the identification information of the flexible algorithm corresponding to the first network topology is used as the first indication information, there is no need to design new information to indicate the network topology, thus simplifying the implementation of the method.
[0010] In another possible implementation, the first indication information includes a bitmap corresponding to the first network topology. Since the first indication information is a bitmap, this reduces the computational load for obtaining the first down-hop information based on the first indication information.
[0011] In another possible implementation, the target routing information includes multiple next-hop information. A bitwise AND operation is performed between the first indication information and the indication information corresponding to each next-hop information in the target routing information to obtain the result for each next-hop information. The next-hop information with a non-zero result is selected as the first next-hop information. Since the first indication information is a bitmap, the first next-hop information can be obtained by performing a bitwise AND operation between the first indication information and the indication information corresponding to each next-hop information in the target routing information. The bitwise AND operation has a relatively small computational load, reducing the computational effort required to obtain the first next-hop information and thus reducing the consumption of computing resources.
[0012] In another possible implementation, a second message is obtained, which includes a first address prefix and second indication information. The second indication information indicates a second network topology. Second next-hop information is obtained based on the first address prefix and the second indication information. The second message is then sent based on the second next-hop information. In this way, for services sent to the first device, different messages for that service include indication information corresponding to different network topologies; that is, the indication information is carried in the data packets to identify different network topologies. This allows different messages for the service to be sent to the first device through different network topologies, thus achieving load balancing.
[0013] In another possible implementation, the destination field of the first message carries first indication information, which includes the Internet Protocol version 6 hop-by-hop header (HBH), flow label, or destination address field of the first message.
[0014] Secondly, this application provides a method for generating routes. In this method, target routing information including a first address prefix is obtained. The first address prefix is used to identify a first device in multiple network topologies. The target routing information also includes first next-hop information and second next-hop information that can reach the first device. The device corresponding to the first next-hop information belongs to the first network topology, and the device corresponding to the second next-hop information belongs to the second network topology. The first network topology and the second network topology are two different network topologies among the multiple network topologies. Since the first address prefix identifies the first device in multiple network topologies, the obtained target routing information includes an address prefix, first next-hop information corresponding to the first network topology, and second next-hop information corresponding to the second network topology, thus forming a multi-topology routing table entry. By simultaneously including multiple different next-hop information corresponding to different topologies in the multi-topology routing table entry, the increase in the number of routing table entries caused by the number of topologies is reduced. Forwarding table entries for multiple topologies can be reused, requiring only one prefix to be sent, significantly reducing the number of routing information entries, thereby reducing the capacity of the routing table and enabling the routing table to converge quickly.
[0015] In one possible implementation, based on the first address prefix, first next-hop information that can reach the first device in the first network topology and second next-hop information that can reach the first device in the second network topology are calculated separately. Since the first next-hop information in the first network topology and the second next-hop information in the second network topology are calculated separately based on the first address prefix, the first address prefix, the first next-hop information and the second next-hop information can be combined into a single routing information, thereby reducing the number of routing information entries.
[0016] In another possible implementation, the target routing information also includes first indication information corresponding to the first next-hop information and second indication information corresponding to the second next-hop information. The first indication information indicates a first network topology, and the second indication information indicates a second network topology. Thus, when sending a packet, the next-hop information for sending the packet can be determined based on the indication information corresponding to each next-hop information in the target routing information.
[0017] In another possible implementation, the first indication information includes the identification information of the flexible algorithm corresponding to the first network topology, and / or the second indication information includes the identification information of the flexible algorithm corresponding to the second network topology. Since the identification information of the flexible algorithm corresponding to the network topology is used as the indication information, there is no need to design new information to indicate the network topology, thus simplifying the implementation of the method.
[0018] In another possible implementation, the first indication information includes a bitmap corresponding to the first network topology, and / or the second indication information includes a bitmap corresponding to the second network topology. Since the indication information is a bitmap, this reduces the computational load of obtaining next-hop information when sending a message, based on the bitmap corresponding to each network topology in the target routing information.
[0019] In another possible implementation, target routing information is generated based on the first address prefix and the link-state information of the devices included in the communication network. For each device in the communication network, the link-state information includes the device's address prefix, the address prefixes of its neighboring devices communicating with it, and indications of the network topology in which the device resides. Because the link-state information includes indications of the network topology in which the device resides, it ensures that the generated routing information includes indications corresponding to each next-hop.
[0020] Thirdly, this application provides an apparatus for transmitting messages, used to perform the method in the first aspect or any possible implementation of the first aspect. Specifically, the apparatus includes units for performing the method in the first aspect or any possible implementation of the first aspect.
[0021] Fourthly, this application provides an apparatus for generating routes, used to perform the method in the second aspect or any possible implementation thereof. Specifically, the apparatus includes units for performing the method in the second aspect or any possible implementation thereof.
[0022] Fifthly, this application provides an apparatus for transmitting messages, the apparatus including a processor and a memory. The processor and the memory are interconnected via an internal connection. The memory stores a program, and the processor executes the program in the memory, causing the apparatus to perform the method of the first aspect or any possible implementation thereof.
[0023] Sixthly, this application provides an apparatus for generating routes, the apparatus including a processor and a memory. The processor and the memory are interconnected via an internal connection. The memory stores a program, and the processor executes the program in the memory, causing the apparatus to perform the method of the second aspect or any possible implementation thereof.
[0024] In a seventh aspect, this application provides a network device comprising: a main control board and an interface board. The main control board includes: a first processor and a first memory. The interface board includes: a second processor, a second memory, and an interface card. The main control board and the interface board are coupled.
[0025] A first memory can be used to store program code. A first processor is used to call the program code in the first memory to perform the following operations: obtaining a first message, the first message including a first address prefix and first indication information, the first indication information being used to indicate a first network topology, the first address prefix indicating the destination address of the first message, the first address prefix being used to identify a first device in multiple network topologies, the first network topology being one of the multiple network topologies; obtaining first next-hop information based on the first address prefix and the first indication information, the device corresponding to the first next-hop information belonging to the first network topology, the first next-hop information being included in target routing information, the target routing information including the first address prefix, the target routing information also including second next-hop information that can reach the first device, the device corresponding to the second next-hop information belonging to a second network topology in the multiple network topologies, the second network topology being different from the first network topology.
[0026] The second memory can be used to store program code, and the second processor is used to call the program code in the second memory to trigger the interface card to perform the following operation: send the first message based on the first next-hop information.
[0027] Eighthly, this application provides a network device comprising: a main control board and an interface board. The main control board includes: a first processor and a first memory. The interface board includes: a second processor, a second memory, and an interface card. The main control board and the interface board are coupled.
[0028] The first memory can be used to store program code, and the first processor is used to call the program code in the first memory to perform the following operations: obtain target routing information including a first address prefix, the first address prefix being used to identify a first device in multiple network topologies, the target routing information also including first next-hop information and second next-hop information that can reach the first device, the device corresponding to the first next-hop information belonging to the first network topology, the device corresponding to the second next-hop information belonging to the second network topology, and the first network topology and the second network topology being two different network topologies among the multiple network topologies.
[0029] The second memory can be used to store program code, and the second processor is used to call the program code in the second memory to trigger the interface card to perform related operations.
[0030] In one possible implementation, an inter-process communication (IPC) channel is established between the main control board and the interface board, and the main control board and the interface board communicate with each other through the IPC channel.
[0031] Ninthly, this application provides a network system that includes the apparatus provided in the third or fourth aspect, or the apparatus provided in the fifth or sixth aspect, or the network device provided in the seventh or eighth aspect.
[0032] In a tenth aspect, this application provides a computer program product comprising a computer program stored in a computer-readable storage medium, wherein the computer program is loaded by a processor to implement the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.
[0033] In one aspect, this application provides a computer-readable storage medium for storing a computer program, which is loaded by a processor to execute the methods described in the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect.
[0034] In a twelfth aspect, this application provides a chip including a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to perform the methods described in the first aspect, the second aspect, any possible implementation of the first aspect, or any possible implementation of the second aspect. Attached Figure Description
[0035] Figure 1This is a schematic diagram of the structure of a communication network provided in an embodiment of this application;
[0036] Figure 2 This is a flowchart of a method for generating routes provided in an embodiment of this application;
[0037] Figure 3 This is a schematic diagram illustrating multiple paths to a first device provided in an embodiment of this application;
[0038] Figure 4 This is a flowchart of a method for sending a message provided in an embodiment of this application;
[0039] Figure 5 This is a schematic diagram of a device structure for generating messages provided in an embodiment of this application;
[0040] Figure 6 This is a schematic diagram of a device structure for generating routes provided in an embodiment of this application;
[0041] Figure 7 This is a schematic diagram of another device structure for generating messages provided in an embodiment of this application;
[0042] Figure 8 This is a schematic diagram of another device structure for generating routes provided in an embodiment of this application;
[0043] Figure 9 This is a schematic diagram of a device structure provided in an embodiment of this application;
[0044] Figure 10 This is another schematic diagram of the device structure provided in the embodiment of this application;
[0045] Figure 11 This is a schematic diagram of a network system structure provided in an embodiment of this application. Detailed Implementation
[0046] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0047] See Figure 1 This application provides a communication network 10, including:
[0048] Multiple devices may be involved, and any two adjacent devices may communicate. For example, there may be a link connecting these two adjacent devices to enable communication. Of course, there are other ways to achieve communication between adjacent devices, which will not be described here.
[0049] In some embodiments, the plurality of devices include network devices, such as routers, switches, and / or gateways.
[0050] The communication network 10 can be divided into multiple network topologies. For ease of explanation, any device in the communication network 10 will be referred to as the first device. The first device may be associated with one or more network topologies, or it may be said that the first device may be located in one or more network topologies. In each network topology where the first device is located, the same address prefix is used for identification; that is, the first device is identified using an address prefix in each network topology.
[0051] For example, see Figure 1 The communication network 10 includes devices 101, 102, 103, 104, 105, and 106. Device 101 communicates with device 102 via link 201, and with device 104 via link 202. Device 102 communicates with device 103 via link 203, with devices 102 and 105 communicating via link 204 and 205. Device 104 communicates with device 105 via link 206, with devices 103 and 106 communicating via link 207, and with devices 105 and 106 communicating via link 208.
[0052] Figure 1 The communication network 10 shown is divided into three network topologies: network topology 1, network topology 2, and network topology 3. Network topology 1 includes devices 101, 102, 103, and 106. Network topology 2 includes devices 101, 102, 105, and 106. Network topology 3 includes devices 101, 102, 104, 105, and 106.
[0053] For device 102, which belongs to network topologies 1, 2, and 3, we assume its address prefix is "IP102". "IP102" is used to identify device 102 within network topologies 1, 2, and 3. For device 106, which also belongs to network topologies 1, 2, and 3, we assume its address prefix is "IP106". "IP106" is used to identify device 106 within network topologies 1, 2, and 3. Devices 101, 103, 104, and 105 will not be listed or described individually.
[0054] The communication network 10 includes multiple network topologies, each corresponding to a flexible algorithm. These network topologies are generated within the communication network 10 using these flexible algorithms, and each network topology is a logical network.
[0055] These multiple network topologies correspond one-to-one with multiple indication information, meaning each indication information is used to indicate one network topology. For ease of explanation, each of these multiple network topologies is referred to as the first network topology, and the indication information corresponding to the first network topology is referred to as the first indication information. The first indication information is used to indicate the first network topology.
[0056] In some embodiments, the first indication information includes the identification information of the flexible algorithm corresponding to the first network topology, or a bitmap corresponding to the first network topology, etc.
[0057] In some embodiments, the identifier information of the flexible algorithm corresponding to the first network topology is an integer greater than or equal to 128 and less than or equal to 255. For example, the identifier information of the flexible algorithm corresponding to the first network topology can be an integer value such as 128, 129, or 130.
[0058] In some embodiments, the bitmap corresponding to the first network topology includes at least M bits, where M is the number of the plurality of network topologies. The first network topology corresponds to the i-th bit in the bitmap, the value of the i-th bit is a first bit value, and the value of each of the other bits in the bitmap except the i-th bit is a second bit value, where i is the sequence number of the first network topology. The first bit value is 0 and the second bit value is 1; or, the first bit value is 1 and the second bit value is 0.
[0059] For example, still using Figure 1 Taking the network topology 1, network topology 2, and network topology 3 of the communication network 10 shown as an example, network topology 1, network topology 2, and network topology 3 correspond to indicator information 1, indication information 2, and indication information 3, respectively. Indication information 1 includes the identifier information "128" of the flexible algorithm corresponding to network topology 1, or, the bit corresponding to network topology 1. Figure 1 Instruction information 2 includes the identifier "129" for the flexible algorithm corresponding to network topology 2, or the bit corresponding to network topology 2. Figure 2 Instruction information 3 includes the identifier "130" for the flexible algorithm corresponding to network topology 3, or the bit information corresponding to network topology 3. Figure 3 .
[0060] Assume the first bit is 1 and the second bit is 0. The bits corresponding to network topology 1. Figure 1 Includes three bits, the bit corresponding to network topology 2. Figure 2 Includes three bits, and the bit corresponding to network topology 3. Figure 3 This also includes three bits. Furthermore, assuming the indices of network topology 1, network topology 2, and network topology 3 are 1, 2, and 3 respectively, then the bits corresponding to network topology 1... Figure 1 The value is "100", which corresponds to the bit in network topology 2. Figure 2 The bit corresponding to network topology 3 is "010". Figure 3 It is "001".
[0061] See Figure 2 This application provides a method 20 for generating routes, which can be applied to... Figure 1 The communication network 10 shown is used as the execution subject of method 20, which can be any device in the communication network 10. For ease of explanation, this device will be referred to as the second device, including:
[0062] Step 201: The second device obtains the link status information of the devices in the communication network. The link status information of the device includes the address prefix of the device, the address prefix of the neighboring devices communicating with the device, and the indication information of the network topology in which the device is located.
[0063] The devices in the communication network include the second device and other devices besides the second device. The link state information acquired by the second device includes the link state information of other devices besides the second device.
[0064] The link status information acquired by the second device may also include the link status information of the second device itself.
[0065] In step 201, for the link state information of the second device, the second device generates its own link state information. For the link state information of the other device, the second device receives the link state information of the other device.
[0066] The second device is Figure 1 In the communication network shown, any device, for any other device in the network besides the second device (referred to as the first device for ease of explanation), may or may not have the second device as a neighboring device communicating with the first device. The first device generates its own link-state information and sends it to the communication network so that the second device receives the link-state information from the first device.
[0067] In implementation, the first device obtains the address prefixes of each neighboring device that communicates directly with it and the indication information of each network topology to which it belongs, and sends link status information to each neighboring device that communicates directly with it. The link status information includes the address prefix of the first device, the address prefixes of each neighboring device of the first device, and the indication information of each network topology to which the first device belongs.
[0068] For ease of explanation, each neighboring device of the first device is referred to as the third device. The third device receives the link state information, saves the link state information, removes the first device from its neighbor list, and sends the link state information to the remaining neighboring devices. This communication network is a route flooding area, ensuring that devices other than the first device in the network perform the same operations as the third device upon receiving the link state information. This allows the link state information to be sent to all devices in the network except the first device, ensuring that all devices in the network receive the link state information. The devices other than the first device in the network include the second device, so the second device can also receive and save the link state information.
[0069] In some embodiments, the operation of the first device sending link state information is as follows: the first device sends a link-state packet (LSP), which includes the link state information of the first device.
[0070] In some embodiments, for each neighboring device of the first device, the link state information of the first device further includes the type of the link between the first device and the neighboring device and / or at least one service level agreement (SLA) parameter value of the link. The at least one parameter includes one or more of the link's latency, packet loss rate, and bandwidth, and the at least one parameter value includes one or more of the link's latency parameter value, packet loss rate parameter value, and bandwidth parameter value.
[0071] When the link state between the first device and a neighboring device changes, the first device reacquires its own link state information and sends this link state information to every other device in the communication network. Each device in the communication network, excluding the first device, receives this link state information and updates its stored link state information with the received link state information.
[0072] The link between the first device and the neighboring device may be disconnected, or it may be restored after being disconnected, causing a change in the link status between the first device and the neighboring device.
[0073] In some embodiments, the first device and the neighboring device periodically send heartbeat data to each other to detect the link status between them. This heartbeat data may include greeting (hello) packets, etc.
[0074] Next Figure 1 Taking the communication network shown as an example, the second device can be... Figure 1The device 101 shown acquires its own link state information, which includes the address prefix "IP101" of device 101, the address prefix "IP102" of neighboring device 102 communicating with device 101, the address prefix "IP104" of neighboring device 104 communicating with device 101, and indication information 1 for network topology 1, indication information 2 for network topology 2, and indication information 3 for network topology 3 to which device 101 belongs. Device 101 sends this link state information to its neighboring devices 102 and 104.
[0075] Neighbor device 102 receives the link status information, saves it, and sends it to neighbor devices 103, 104, and 105 that are communicating with it. Device 103 receives the link status information, saves it, and sends it to device 106 that is communicating with it. Devices 104, 105, and 106 perform the same operations as devices 102 and 103 after receiving the link status information, and will not be described in detail here.
[0076] From the above process, it can be concluded that the link state information sent by device 101 can be received by other devices in the communication network. Similarly, devices 102, 103, 104, 105, and 106 in the communication network, like device 101, obtain their own link state information and send it to other devices in the communication network. Therefore, for any device in the communication network, this device includes the link state information of device 101, device 102, device 103, device 104, device 105, and device 106.
[0077] Step 202: The second device obtains routing information including a first address prefix based on the link state information of the devices in the communication network. The first address prefix is used to identify the first device in multiple network topologies. The first device is a device in the communication network other than the second device.
[0078] In step 202, the second device selects a device from the communication network (excluding itself) as the first device, and obtains the address prefix of the first device from its link state information as the first address prefix. Based on the first address prefix and the link state information of the devices in the communication network, routing information including the first address prefix is obtained. This routing information can reach the first device.
[0079] The routing information also includes multiple next-hop information that can reach the first device, as well as indication information corresponding to each next-hop information. Each next-hop information corresponds to a network topology, and the first device is located in one of these multiple network topologies, which include the network topology corresponding to each next-hop information.
[0080] For each next-hop information, the network topology corresponding to that next-hop information includes the device corresponding to that next-hop information. The device corresponding to that next-hop information is the next-hop device of the second device. The indication information corresponding to that next-hop information is used to indicate the network topology corresponding to that next-hop information.
[0081] For example, the multiple next-hop information includes first next-hop information and second next-hop information. That is, the routing information also includes first and second next-hop information that can reach the first device. The device corresponding to the first next-hop information belongs to the first network topology, and the device corresponding to the second next-hop information belongs to the second network topology. The first network topology and the second network topology are two different network topologies among the multiple network topologies, and they are the two network topologies to which the first device belongs. The routing information also includes first and second indication information. The first indication information is for indicating the first network topology, and the second indication information is for indicating the second network topology.
[0082] The device corresponding to the first next-hop information is the next-hop device of the second device in the first network topology, and the device corresponding to the second next-hop information is the next-hop device of the second device in the second network topology.
[0083] In some embodiments, the routing information takes the form of a first address prefix and a correspondence between next-hop information and indication information. Each record in the correspondence between next-hop information and indication information includes a next-hop information and an indication of the network topology corresponding to that next-hop information.
[0084] Taking the example of multiple next-hop information including first and second next-hop information, the correspondence includes a first record and a second record. The first record includes the first next-hop information and a first indication information, and the second record includes the second next-hop information and the second indication information. This merges the routes to the first device into a single routing information. This single routing information includes an address prefix (the first address prefix), multiple next-hop information corresponding to multiple network topologies, and indication information corresponding to each next-hop. This significantly reduces the number of routes to the first device, which in turn significantly reduces the number of routes stored in the routing table of the second device, reducing the routing table's capacity and enabling rapid convergence.
[0085] In some embodiments, the link state information of the first device includes the address prefix of the first device (hereinafter referred to as the first address prefix), the address prefixes of the neighboring devices of the first device, and indication information of each network topology to which the first device belongs. The operation for the second device to obtain routing information including the first address prefix is as follows:
[0086] The second device determines the network topology to which the first device belongs based on the indication information of each network topology to which the first device belongs. Based on the first address prefix and the link state information of devices in the communication network, it calculates the next-hop information that can reach the first device in each network topology, obtaining the next-hop information corresponding to each network topology. The next-hop information and the indication information for each network topology are stored in correspondence, obtaining the mapping relationship between next-hop information and indication information. The first address prefix and the mapping relationship between next-hop information and indication information are combined to form a routing information entry, which is then stored in the routing table.
[0087] For example, taking a network topology to which the first device belongs, which includes a first network topology and a second network topology, the second device, based on a first address prefix, calculates the first next-hop information that can reach the first device in the first network topology, and the second next-hop information that can reach the first device in the second network topology. The first next-hop information is stored in correspondence with first indication information, and the second next-hop information is stored in correspondence with second indication information, thus obtaining the correspondence between next-hop information and indication information. That is, this correspondence includes a first record and a second record; the first record includes the first next-hop information and the first indication information, and the second record includes the second next-hop information and the second indication information. The first address prefix and this correspondence between next-hop information and indication information are combined to form a routing information entry, which is then stored in the routing table.
[0088] For each device in the communication network other than the second device, the second device repeats the above process to obtain the routing information to each device and save it in the routing table.
[0089] In some embodiments, the next-hop information obtained by the second device includes the identifier of the device corresponding to the next-hop information, and / or the identifier of an interface on the second device that communicates with the device corresponding to the next-hop information.
[0090] The following example will be used to illustrate step 202 in detail. Figure 1 Taking the communication network shown as an example, the second device can be... Figure 1 The device 102 shown, the first device can be Figure 1As shown, for device 106 in the communication network, device 102 needs to obtain routing information that can reach devices 101, 103, 104, 105, and 106 respectively. Taking device 106 as an example, device 106 belongs to network topology 1, network topology 2, and network topology 3. Based on the address prefix "IP106" of device 106 and the link state information of each device in the communication network, device 102 calculates the next-hop information 1 that can reach device 106 in network topology 1. The device corresponding to the next-hop information 1 is device 103, and the next-hop information 1 includes the address prefix "IP103" of device 103. It also obtains the indication information 1 of network topology 1 (which is the identifier information "128" or bitwise AND of the flexible algorithm corresponding to network topology 1) from the link state information of device 106. Figure 1 The next hop information 1 and the indication information 1 are saved accordingly to obtain record 1. Record 1 includes the next hop information 1 (the address prefix "IP103" of device 103) and the indication information 1 of network topology 1 (the identification information "128" or bit). Figure 1 "100").
[0091] Based on the address prefix "IP106" of device 106 and the link state information of each device in the communication network, device 102 calculates the next-hop information 2 that can reach device 106 in network topology 2. The device corresponding to the next-hop information 2 is device 105, and the next-hop information 2 includes the address prefix "IP105" of device 105. It also obtains the indication information 2 of network topology 2 (which is the identifier information "129" or bit of the flexible algorithm corresponding to network topology 2) from the link state information of device 106. Figure 2 Record 2 is obtained by saving the next-hop information 2 and the indication information 2 ("010"), which includes the next-hop information 2 (the address prefix "IP105" of device 105) and the indication information 2 of network topology 2 (the identification information "129" or bit). Figure 2 “010”).
[0092] Based on the address prefix "IP106" of device 106 and the link state information of each device in the communication network, device 102 calculates the next-hop information 3 that can reach device 106 in network topology 3. The device corresponding to the next-hop information 3 is device 104, and the next-hop information 3 includes the address prefix "IP104" of device 104. It also obtains the indication information 3 of network topology 3 (which is the identifier information "130" or bit of the flexible algorithm corresponding to network topology 3) from the link state information of device 106. Figure 3Record 3 is obtained by saving the next-hop information 3 and the indication information 3 ("001"), which includes the next-hop information 3 (the address prefix "IP104" of device 104) and the indication information 3 of network topology 3 (the identification information "130" or bit). Figure 3 “001”).
[0093] Referring to Table 1 below, the correspondence between the next-hop information and the indication information includes three records, namely Record 1, Record 2 and Record 3 mentioned above. The address prefix "IP106" of device 106 and the correspondence shown in Table 1 are used to form routing information to obtain the routing information to reach device 106, which is then stored in the routing table shown in Table 2.
[0094] Table 1
[0095] Next hop information 1 (IP103) Instruction message 1 (128, or 100) Next hop information 2 (IP105) Instruction message 2 (129, or 010) Next hop information 3 (IP104) Instruction message 3 (130, or 001)
[0096] Table 2
[0097]
[0098] In some embodiments, the operation of the second device storing routing information in the routing table involves the first device configuring an index to identify the correspondence between next-hop information and indication information in the routing information, and storing the correspondence between the first address prefix included in the routing information and the index in the routing table. Because the index has a small data volume, the capacity of the routing table can be significantly reduced.
[0099] For example, for routing information to device 106, the second device configures an index 1, which is used to identify the correspondence between the next-hop information and the indication information as shown in Table 1. The first address prefix "IP106" included in the routing information and the corresponding index 1 are stored in the routing table shown in Table 3 below.
[0100] Table 3
[0101] IP106 Index 1 …… ……
[0102] For the routing information obtained by the second device, which includes the first address prefix, each next-hop information in the routing information corresponds to a path to the first device. For each next-hop information, the path corresponding to the next-hop information is the path between the second device and the first device in the network topology corresponding to that next-hop information.
[0103] For example, taking the routing information shown in Table 2 above as an example, this routing information is the routing information obtained by device 102 to reach device 106, see [reference]. Figure 3The routing information includes next-hop information 1, next-hop information 2, and next-hop information 3, which correspond to paths 1, 2, and 3, respectively. Path 1 is the path between device 102 and device 106 in network topology 1 corresponding to next-hop information 1. Path 2 is the path between device 102 and device 106 in network topology 2 corresponding to next-hop information 2. Path 3 is the path between device 102 and device 106 in network topology 3 corresponding to next-hop information 3.
[0104] For other devices in the communication network besides the first and second devices, the second device continues to operate according to step 202 to obtain routing information to other devices.
[0105] In this embodiment, for the first address prefix of the first device, the first device may belong to multiple network topologies, and the first address prefix is used to identify the first device in these multiple network topologies. Based on the link state information of each device in the communication network and the first address prefix, the next-hop information that can reach the first device in each network topology and the indication information corresponding to the next-hop information are calculated respectively. This yields multiple next-hop information corresponding to the multiple network topologies, and the indication information corresponding to each next-hop information is used to indicate the network topology corresponding to each next-hop information. At this time, a routing information is stored in the routing table. This routing information includes the correspondence between the first address prefix, the next-hop information, and the indication information. This correspondence includes each next-hop information and the indication information corresponding to each next-hop information. Therefore, although the first device belongs to multiple network topologies, only one routing information is stored in the routing table, significantly reducing the number of routing information entries, reducing the capacity of the routing table, and enabling the routing table to converge quickly.
[0106] See Figure 4 This application provides a method 40 for sending messages, which can be applied to... Figure 1 The communication network 10 shown is used as the execution subject of the method 40, which can be any device in the communication network 10. For ease of explanation, this device will be referred to as the second device, including:
[0107] Step 401: The second device obtains a first message. The first message includes a first address prefix and first indication information. The first indication information is used to indicate a first network topology. The first address prefix indicates the destination address of the first message. The first address prefix is used to identify the first device in multiple network topologies. The first network topology is one of the multiple network topologies.
[0108] In step 401, the second device can obtain the first message in the following two ways. Of course, there are other ways to obtain the first message, which will not be listed here. These two methods are:
[0109] Method 1: The second device generates the first message.
[0110] In Method 1, the second device generates the first message when it needs to send a message to the first device through the first network topology.
[0111] In Method 1, the second device can be the head node.
[0112] For example, see Figure 3 At this point, the second device can be Figure 3 The device 102 shown, the first device can be Figure 3 As shown in the diagram, device 106 is assumed to be connected via network topology 1. Specifically, device 102 is the second device, device 106 is the first device, the first address prefix is the address prefix "IP106" of device 106, the first network topology is network topology 1, and the first indication information is indication information 1 for network topology 1. This means the first indication information 1 includes the identifier information "128" or bits of the flexible algorithm corresponding to network topology 1. Figure 1 "100". Device 102 generates the first message, which includes the address prefix "IP106" and indication information 1.
[0113] Method 2: The second device receives the first message.
[0114] In Method 2, the second device is a device in the first network topology. The second device receives the first message sent by the upstream device. The first message is a message that needs to be sent to the first device.
[0115] For example, see Figure 3 Assume the second device is device 102, the first device is device 106, the first address prefix is the address prefix "IP106" of device 106, the first network topology is network topology 1, and the first indication information is indication information 1 of network topology 1. Device 101 is an upstream device of device 102. Device 102 receives a first message sent by device 101. The first message includes the address prefix "IP106" and indication information 1. The first message may be generated by device 101, or it may be received by device 101.
[0116] In some embodiments, the destination field of the first message carries first indication information, including the Internet Protocol version 6 hop by hop option header (HBH), flow label, or destination address field of the first message.
[0117] Step 402: The second device obtains the first next-hop information based on the first address prefix and the first indication information. The device corresponding to the first next-hop information belongs to the first network topology.
[0118] In step 402, the second device can obtain the first next-hop information through the following operations 4021 to 4022. These operations 4021 to 4022 are as follows:
[0119] 4021: The second device determines the target routing information based on the first address prefix.
[0120] The second device uses the first address prefix and the routing table to obtain routing information, including the first address prefix, as the target routing information.
[0121] In some embodiments, each route entry in the routing table includes an address prefix and a mapping between next-hop information and indication information. In 4021, the second device queries the routing table for route information including the first address prefix as the target route information.
[0122] For example, if the routing table is as shown in Table 2 above, after receiving the first packet, device 102 will obtain the target routing information, which includes the first address prefix "IP106" and the first indication information "Indication Information 1", based on the first address prefix "IP106". The target routing information is shown in Table 4 below, including the first address prefix "IP106". The correspondence between the next-hop information and the indication information is also shown in Table 4 below.
[0123] Table 4
[0124]
[0125] In some embodiments, each routing information entry in the routing table includes an address prefix and an index, the index being used to identify the correspondence between next-hop information and indication information. In 4021, the second device queries the routing table for routing information including the first address prefix, and based on the index included in the routing information, obtains the correspondence between the next-hop information identified by the index and the indication information to obtain target routing information, the target routing information including the first address prefix and the correspondence between the next-hop information and the indication information.
[0126] For example, the routing table is as shown in Table 3 above. For device 102, after obtaining the first packet, the first packet includes a first address prefix of "IP106" and a first indication information of indication information 1. Based on the first address prefix "IP106", device 102 obtains routing information including the first address prefix "IP106" from the routing table shown in Table 3. This routing information includes the first address prefix "IP106" and index 1. The mapping relationship between the next-hop information identified by index 1 and the indication information shown in Table 1 is obtained to obtain the target routing information. The target routing information includes the first address prefix "IP106" and the mapping relationship between the next-hop information and the indication information shown in Table 1.
[0127] 4022: The second device determines the first next-hop information in the target routing information based on the first indication information.
[0128] In some embodiments, the first indication information may be the identification information of the flexible algorithm corresponding to the first network topology, and the target routing information includes multiple next-hop information and indication information corresponding to each next-hop information, and the indication information corresponding to each next-hop information is also identification information. Therefore, the second device obtains the next-hop information corresponding to the first indication information from the target routing information as the first next-hop information.
[0129] For example, suppose the first message includes the first indication information "128" which is the identifier information of the flexible algorithm corresponding to network topology 1. For the correspondence between next-hop information and indication information in the target routing information shown in Table 4, the indication information corresponding to each next-hop information in this correspondence is also the identifier information of the flexible algorithm. This correspondence includes three records: record 1, record 2, and record 3. Record 1 includes next-hop information 1 and identifier information "128", record 2 includes next-hop information 2 and identifier information "129", and record 3 includes next-hop information 3 and identifier information "130". Thus, the second device, based on the first indication information "128", obtains the corresponding next-hop information 1 as the first next-hop information.
[0130] In some embodiments, the first indication information may be a bitmap corresponding to the first network topology, and the target routing information includes multiple next-hop information and indication information corresponding to each next-hop information, and the indication information corresponding to each next-hop information is also a bitmap. Therefore, the second device performs a bitwise AND operation between the first indication information and the indication information corresponding to each next-hop information in the target routing information to obtain the operation result corresponding to each next-hop information; and selects the next-hop information whose operation result is non-zero as the first next-hop information.
[0131] For example, suppose the first message includes the first indication information corresponding to network topology 1. Figure 1"100" refers to the correspondence between next-hop information and indication information in the target routing information shown in Table 4. The indication information corresponding to each next-hop information in this correspondence is also a bitmap. This correspondence includes three records: record 1, record 2, and record 3. Record 1 includes next-hop information 1 and bitmap information 2. Figure 1 "100", record 2 includes next-hop information 2 and bit. Figure 2 "010", record 3 includes next-hop information 3 and bit. Figure 3 "001".
[0132] The second device performs a bitwise AND operation between the first indication information "100" and the indication information "100" corresponding to the next hop information 1, resulting in a result of "1" for the next hop information 1; performs a bitwise AND operation between the first indication information "100" and the indication information "010" corresponding to the next hop information 2, resulting in a result of "0" for the next hop information 2; performs a bitwise AND operation between the first indication information "100" and the indication information "001" corresponding to the next hop information 3, resulting in a result of "0" for the next hop information 3; and selects the next hop information 1 with a non-zero result as the first next hop information.
[0133] Step 403: The second device sends the first message based on the first next-hop information.
[0134] That is, the second device sends the first message to the device corresponding to the first next-hop information based on the first next-hop information.
[0135] If the device corresponding to the first next-hop information is not the first device, then the device corresponding to the first next-hop information, like the second device, will execute the above 401-403 procedures to continue sending the first message. If the device corresponding to the first next-hop information is the first device, the first device will receive the first message and end the operation.
[0136] The second device may continue to acquire messages and send them according to steps 401-403 described above. For example, the second device acquires a second message, which includes a first address prefix and second indication information, the second indication information being used to indicate a second network topology. Based on the first address prefix and the second indication information, it acquires second next-hop information, the device corresponding to the second next-hop information belonging to the second network topology; and sends the second message based on the second next-hop information.
[0137] In this embodiment, the first message includes a first address prefix and first indication information for the first device. The first indication information indicates the first network topology to which the first device belongs. The second device then retrieves target routing information, including the first address prefix, from the routing table based on the first address prefix, and retrieves first next-hop information based on the first indication information and the target routing information. This ensures that the target routing information includes a first address prefix, a correspondence between next-hop information and indication information, and this correspondence includes the next-hop information and indication information for each network topology to which the first device belongs. In other words, regardless of the number of network topologies to which the first device belongs, a single route to the first device can be generated, forming a multi-topology routing table entry. By including multiple different next-hop information corresponding to different topologies in the multi-topology routing table entry, the increase in the number of routing table entries caused by the number of topologies is reduced. Forwarding table entries for multiple topologies can be reused, requiring only one prefix to be sent, significantly reducing the number of routing information entries, decreasing the capacity of the routing table, and enabling the routing table to converge quickly.
[0138] See Figure 5 This application provides a message sending device 500, which can be deployed in... Figure 1 or Figure 3 On any device in the communication network 10 or Figure 4 The second device in method 40 shown includes:
[0139] The acquisition unit 501 is used to acquire a first message, the first message including a first address prefix and first indication information, the first indication information is used to indicate a first network topology, the first address prefix indicates the destination address of the first message, the first address prefix is used to identify a first device in multiple network topologies, and the first network topology is one of the multiple network topologies;
[0140] Processing unit 502 is used to obtain first next-hop information based on a first address prefix and first indication information. The device corresponding to the first next-hop information belongs to a first network topology. The first next-hop information is included in target routing information. The target routing information includes the first address prefix. The target routing information also includes second next-hop information that can reach the first device. The device corresponding to the second next-hop information belongs to a second network topology among the multiple network topologies. The second network topology is different from the first network topology.
[0141] The sending unit 503 is used to send a first message based on the first next-hop information.
[0142] Optionally, for the detailed implementation process of the acquisition unit 501 acquiring the first message, please refer to the above. Figure 4 The relevant content in step 401 of method 40 shown will not be described in detail here.
[0143] Optionally, the acquisition unit 501 acquires the first message using method one in step 401, that is, the acquisition unit 501 generates the first message. In method one, the acquisition unit 501 and the processing unit 502 can be the same unit. Alternatively, the acquisition unit 501 acquires the first message using method two in step 401, that is, the acquisition unit 501 receives the first message. In method two, the acquisition unit 501 can be a receiving unit.
[0144] Optionally, for the detailed implementation process of the processing unit 502 obtaining the first next-hop information, please refer to the above. Figure 4 The relevant content in step 402 of method 40 shown will not be described in detail here.
[0145] Optionally, for the detailed implementation process of the processing unit 502 obtaining the first next-hop information, please refer to the above. Figure 4 The relevant content in step 403 of method 40 shown will not be described in detail here.
[0146] Optionally, the target routing information includes the correspondence between the first next-hop information and the first indication information. The processing unit 502 is used for:
[0147] Determine the target routing information based on the first address prefix;
[0148] The first next hop information is determined from the target routing information based on the first indication information.
[0149] Optionally, for the detailed implementation process of processing unit 502 determining the target routing information and the first down-hop information, please refer to the above. Figure 4 The relevant contents of methods 4021 and 4022 shown in the diagram will not be described in detail here.
[0150] Optionally, the first indication information includes the identification information of the flexible algorithm corresponding to the first network topology.
[0151] Optionally, the first indication information includes a bitmap corresponding to the first network topology.
[0152] Optionally, the target routing information includes multiple next-hop information, and the processing unit 502 is used for:
[0153] Perform a bitwise AND operation between the first indication information and the indication information corresponding to each next hop information in the target routing information to obtain the operation result corresponding to each next hop information;
[0154] Select the next-hop information whose result is non-zero as the first next-hop information.
[0155] Optionally, for the detailed implementation process of processing unit 502 and operations, please refer to the above. Figure 4The relevant content in 4022 of method 40 shown will not be described in detail here.
[0156] Optionally, the acquisition unit 501 is further configured to acquire a second message, the second message including a first address prefix and second indication information, the second indication information being used to indicate a second network topology;
[0157] Processing unit 502 is also configured to obtain second next-hop information based on the first address prefix and the second indication information;
[0158] The sending unit 503 is also used to send a second message based on the second next-hop information.
[0159] Optionally, for the detailed implementation process of the acquisition unit 501 acquiring the second message, please refer to the above. Figure 4 The relevant content in step 401 of method 40 shown will not be described in detail here.
[0160] Optionally, for details on how the processing unit obtains the second next-hop information, please refer to the above. Figure 4 The relevant content in step 402 of method 40 shown will not be described in detail here.
[0161] Optionally, for the detailed implementation process of sending the second message by the sending unit 503, please refer to the above. Figure 4 The relevant content in step 403 of method 40 shown will not be described in detail here.
[0162] Optionally, the destination field of the first message carries first indication information, which includes the hop-by-hop HBH option expandable header, flow label, or destination address field of the first message.
[0163] In this embodiment, the first message acquired by the acquisition unit includes a first address prefix and first indication information. Since the first address prefix identifies the first device in multiple network topologies, and the first indication information indicates the first network topology among these multiple network topologies, and the target routing information includes the first address prefix, first next-hop information corresponding to the first network topology, and second next-hop information corresponding to the second network topology, the processing unit can also acquire the first next-hop information that can reach the first device in the first network topology based on the first address prefix and the first indication information. The sending unit then sends the first message based on the first next-hop information. This allows a single routing message to include an address prefix and multiple next-hop information corresponding to multiple network topologies, significantly reducing the number of routing messages and thus reducing the capacity of the routing table, enabling the routing table to converge quickly.
[0164] See Figure 6This application provides a route generation device 600, which can be deployed in... Figure 1 or Figure 3 On any device in the communication network 10 or Figure 2 The second device in method 20 includes:
[0165] Processing unit 601 is used to obtain target routing information including a first address prefix. The first address prefix is used to identify a first device in multiple network topologies. The target routing information also includes first next-hop information and second next-hop information that can reach the first device. The device corresponding to the first next-hop information belongs to the first network topology, and the device corresponding to the second next-hop information belongs to the second network topology. The first network topology and the second network topology are two different network topologies among the multiple network topologies.
[0166] Optionally, for the detailed implementation process of the processing unit 601 obtaining the target routing information, please refer to the above. Figure 2 The relevant content in step 202 of method 20 shown will not be described in detail here.
[0167] Optionally, the processing unit 601 is used for:
[0168] Based on the first address prefix, calculate the first next-hop information that can reach the first device in the first network topology, and the second next-hop information that can reach the first device in the second network topology.
[0169] Optionally, for the detailed implementation process of the processing unit 601 calculating the first next-hop information and the second next-hop information, please refer to the above. Figure 2 The relevant content in step 202 of method 20 shown will not be described in detail here.
[0170] Optionally, the target routing information may also include first indication information corresponding to the first next-hop information and second indication information corresponding to the second next-hop information, wherein the first indication information is used to indicate the first network topology and the second indication information is used to indicate the second network topology.
[0171] Optionally, the first indication information includes the identification information of the flexible algorithm corresponding to the first network topology, and / or the second indication information includes the identification information of the flexible algorithm corresponding to the second network topology.
[0172] Optionally, the first indication information includes a bitmap corresponding to the first network topology, and / or the second indication information includes a bitmap corresponding to the second network topology.
[0173] Optionally, the processing unit 601 is used for:
[0174] Based on the first address prefix and the link state information of the devices included in the communication network, target routing information is generated. For the devices included in the communication network, the link state information of the device includes the address prefix of the device, the address prefix of the neighboring devices communicating with the device, and the indication information of the network topology in which the device is located.
[0175] Optionally, for the detailed implementation process of the processing unit 601 generating the target routing information, please refer to the above. Figure 2 The relevant content in step 202 of method 20 shown will not be described in detail here.
[0176] In this embodiment, the processing unit obtains target routing information including a first address prefix. The first address prefix is used to identify a first device in multiple network topologies. The target routing information also includes first next-hop information and second next-hop information that can reach the first device. The device corresponding to the first next-hop information belongs to the first network topology, and the device corresponding to the second next-hop information belongs to the second network topology. The first network topology and the second network topology are two different network topologies among the multiple network topologies. Since the first address prefix identifies the first device in multiple network topologies, the target routing information obtained by the processing unit includes an address prefix, first next-hop information corresponding to the first network topology, and second next-hop information corresponding to the second network topology, thus forming a multi-topology routing table entry. By including multiple different next-hop information corresponding to different topologies in the multi-topology routing table entry simultaneously, the increase in the number of routing table entries caused by the number of topologies is reduced. Forwarding table entries for multiple topologies can be reused, requiring only one prefix to be sent, significantly reducing the number of routing information, thereby reducing the capacity of the routing table and enabling the routing table to converge quickly.
[0177] See Figure 7 This application provides a schematic diagram of a device 700 for sending messages. The device 700 can be any of the devices provided in the above embodiments, for example, it can be... Figure 1 or Figure 3 Any device in the communication network 10 shown or Figure 4 The device in method 40 shown. The device 700 includes at least one processor 701, internal connections 702, memory 703, and at least one transceiver 704.
[0178] The device 700 is a hardware structure device that can be used to implement... Figure 5 The functional modules in the device 500. For example, those skilled in the art will conceive of them. Figure 5 The acquisition unit 501 and processing unit 502 in the illustrated device 500 can be implemented by the at least one processor 701 calling code in the memory 703. Figure 5The transmitting unit 503 in the illustrated device 500 can be implemented by the at least one transceiver 704.
[0179] The device 700 can also be used to implement the functions of the device in any of the above embodiments.
[0180] The processor 701 described above can be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of programs according to the present application.
[0181] The aforementioned internal connection 702 may include a pathway for transmitting information between the aforementioned components. The internal connection 702 may be a single board or a bus, etc.
[0182] The aforementioned transceiver 704 is used for communicating with other devices or communication networks.
[0183] The aforementioned memory 703 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0184] The memory 703 stores application code that executes the solution of this application, and its execution is controlled by the processor 701. The processor 701 executes the application code stored in the memory 703, and cooperates with at least one transceiver 704, thereby enabling the device 700 to realize the functions of the method of this patent.
[0185] In a specific implementation, as one example, the processor 701 may include one or more CPUs, for example... Figure 7 CPU0 and CPU1 in the CPU.
[0186] In a specific implementation, as one embodiment, the device 700 may include multiple processors, for example... Figure 7 Processors 701 and 707 are mentioned. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0187] See Figure 8 This application provides a schematic diagram of a route generation device 800. The device 800 can be any of the devices provided in the above embodiments, for example, it can be... Figure 1 or Figure 3 Any device in the communication network 10 shown or Figure 2 The second device in method 20 shown. The device 800 includes at least one processor 801, internal connections 802, memory 803, and at least one transceiver 804.
[0188] The device 800 is a hardware structure device that can be used to implement... Figure 6 The functional modules in the device 600. For example, those skilled in the art will conceive of them. Figure 6 The processing unit 601 in the illustrated device 600 can be implemented by the at least one processor 801 calling code in the memory 803.
[0189] The device 800 can also be used to implement the functions of the device in any of the above embodiments.
[0190] The processor 801 described above may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of programs according to the present application.
[0191] The aforementioned internal connection 802 may include a pathway for transmitting information between the aforementioned components. The internal connection 802 may be a single board or a bus, etc.
[0192] The above-mentioned transceiver 804 is used for communicating with other devices or communication networks.
[0193] The aforementioned memory 803 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0194] The memory 803 stores the application code that executes the solution of this application, and its execution is controlled by the processor 801. The processor 801 executes the application code stored in the memory 803, and cooperates with at least one transceiver 804, thereby enabling the device 800 to realize the functions of the method of this patent.
[0195] In a specific implementation, as one example, the processor 801 may include one or more CPUs, for example... Figure 8 CPU0 and CPU1 in the CPU.
[0196] In a specific implementation, as one embodiment, the device 800 may include multiple processors, for example... Figure 8 Processors 801 and 807 are mentioned. Each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0197] See Figure 9 , Figure 9 This application shows a schematic diagram of the structure of a device 900 provided in an exemplary embodiment. Optionally, the device 900 is configured as described above. Figure 4 The second device in method 40 shown. In other words, the above... Figure 4 The second device in method 40 shown can be implemented by device 900.
[0198] The device 900 is, for example, a network device, such as a switch or router. Figure 9 As shown, device 900 includes: main control board 901 and interface board 902.
[0199] The main control board 901, also known as the main processing unit (MPU) or route processor card, is used to control and manage the various components in the device 900, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 901 includes a central processing unit 9011 and a memory 9012.
[0200] Interface board 902, also known as line processing unit (LPU), linecard, or service board, provides various service interfaces and enables packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, Flexible Ethernet Clients (FlexE Clients). Interface board 902 includes: a central processing unit 9021, a network processor 9022, a forwarding table entry memory 9023, and a physical interface card (PIC) 9024.
[0201] The central processing unit 9021 on the interface board 902 is used to control and manage the interface board 902 and communicate with the central processing unit 9011 on the main control board 901.
[0202] The network processor 9022 is used to implement packet forwarding processing. The network processor 9022 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented using an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA). Specifically, the network processor 9022 forwards received packets based on the forwarding table stored in the forwarding table entry memory 9023. If the destination address of the packet is the address of device 900, the packet is sent to the CPU (such as the central processing unit 9021) for processing; if the destination address of the packet is not the address of device 900, the next hop and outgoing interface corresponding to the destination address are looked up in the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Uplink packet processing may include: packet inbound interface processing, forwarding table lookup; downlink packet processing may include: forwarding table lookup, etc. In some embodiments, the central processing unit can also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for a forwarding chip on the interface board.
[0203] The physical interface card 9023 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 902 through this card, and processed packets are sent out from the physical interface card 902. The physical interface card 9023, also known as a daughter card, can be installed on the interface board 902. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 9022 for processing. In some embodiments, the central processing unit can also perform the functions of the network processor 9022, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for the network processor 9022 in the physical interface card 9023.
[0204] Optionally, device 900 includes multiple interface boards. For example, device 900 also includes interface board 903, which includes: a central processing unit 9031, a network processor 9032, a forwarding table entry memory 9033, and a physical interface card 9034. The functions and implementation methods of each component in interface board 903 are the same as or similar to those of interface board 902, and will not be described in detail here.
[0205] Optionally, device 900 also includes a switching fabric board 904. The switching fabric board 904 can also be referred to as a switch fabric unit (SFU). When device 900 has multiple interface boards, the switching fabric board 904 is used to complete data exchange between the interface boards. For example, interface boards 902 and 903 can communicate through the switching fabric board 904.
[0206] The main control board 901 and the interface board 902 are coupled. For example, the main control board 901, interface boards 902 and 903, and the switching network board 904 are interconnected via a system bus and the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 901 and the interface board 902, and the main control board 901 and the interface board 902 communicate with each other through the IPC channel.
[0207] Logically, device 900 includes a control plane and a forwarding plane. The control plane includes a main control board 901 and a central processing unit (CPU), while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 9023, a physical interface card 9024, and a network processor 9022. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the device's status. The control plane distributes the generated forwarding tables to the forwarding plane. In the forwarding plane, the network processor 9022 uses the forwarding tables distributed by the control plane to look up and forward messages received by the physical interface card 9024. The forwarding tables distributed by the control plane can be stored in the forwarding table entry memory 9023. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
[0208] It's worth noting that there may be one or more main control boards (901), including a primary and a backup main control board. There may also be one or more interface boards; the stronger the data processing capability of device 900, the more interface boards it provides. Each interface board may also have one or more physical interface cards. There may be no switching network board (904), or there may be one or more; multiple boards can share the load for redundancy and backup. In a centralized forwarding architecture, device 900 may not need a switching network board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, device 900 can have at least one switching network board (904), which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of device 900 in a distributed architecture are greater than those in a centralized architecture. Alternatively, the device 900 can also be a single board, without a switching network board. The functions of the interface board and the main control board are integrated on this one board. In this case, the central processing unit on the interface board and the central processing unit on the main control board can be combined into one central processing unit on the same board, executing the combined functions of the two. This type of device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario, and no restrictions are imposed here.
[0209] See Figure 10 , Figure 10This application shows a schematic diagram of the structure of a device 1000 provided in an exemplary embodiment. Optionally, the device 1000 is configured as described above. Figure 2 The second device in method 20 shown. In other words, the above... Figure 2 The second device in method 20 shown can be implemented by device 1000.
[0210] Device 1000 is, for example, a network device, such as a switch or router. Figure 10 As shown, device 1000 includes: main control board 1001 and interface board 1002.
[0211] The main control board 1001, also known as the main processing unit (MPU) or route processor card, is used to control and manage the various components in the device 1000, including route calculation, device management, device maintenance, and protocol processing functions. The main control board 1001 includes a central processing unit 10011 and a memory 10012.
[0212] Interface board 1002 is also called a line processing unit (LPU), linecard, or service board. Interface board 1002 provides various service interfaces and implements packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, Flexible Ethernet Clients (FlexE Clients). Interface board 1002 includes: a central processing unit 10021, a network processor 10022, a forwarding table entry memory 10023, and a physical interface card (PIC) 10024.
[0213] The central processing unit 10021 on the interface board 1002 is used to control and manage the interface board 1002 and communicate with the central processing unit 10011 on the main control board 1001.
[0214] The network processor 10022 is used to implement packet forwarding processing. The network processor 10022 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented using an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA). Specifically, the network processor 10022 forwards received packets based on the forwarding table stored in the forwarding table entry memory 10023. If the destination address of the packet is the address of device 1000, the packet is sent to the CPU (such as the central processing unit 10021) for processing; if the destination address of the packet is not the address of device 1000, the next hop and outgoing interface corresponding to the destination address are looked up in the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Uplink packet processing may include: packet ingress interface processing, forwarding table lookup; downlink packet processing may include: forwarding table lookup, etc. In some embodiments, the central processing unit may also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the forwarding chip is not required in the interface board.
[0215] Physical interface card 10023 is used to implement physical layer interfacing functions. Raw traffic enters interface board 1002 through this card, and processed packets are sent out from physical interface card 1002. Physical interface card 10023, also called a daughter card, can be installed on interface board 1002. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to network processor 10022 for processing. In some embodiments, the central processing unit can also perform the functions of network processor 10022, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for network processor 10022 in physical interface card 10023.
[0216] Optionally, device 1000 includes multiple interface boards. For example, device 1000 also includes interface board 1003, which includes: a central processing unit 10031, a network processor 10032, a forwarding table entry memory 10033, and a physical interface card 10034. The functions and implementation methods of each component in interface board 1003 are the same as or similar to those of interface board 1002, and will not be described again here.
[0217] Optionally, the device 1000 also includes a switching fabric board 1004. The switching fabric board 1004 can also be referred to as a switch fabric unit (SFU). When the device 1000 has multiple interface boards, the switching fabric board 1004 is used to complete data exchange between the interface boards. For example, interface boards 1002 and 1003 can communicate through the switching fabric board 1004.
[0218] The main control board 1001 and the interface board 1002 are coupled. For example, the main control board 1001, interface boards 1002 and 1003, and the switching network board 1004 are interconnected via a system bus and the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1001 and the interface board 1002, and the main control board 1001 and the interface board 1002 communicate with each other through the IPC channel.
[0219] Logically, device 1000 includes a control plane and a forwarding plane. The control plane includes a main control board 1001 and a central processing unit (CPU), while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 10023, a physical interface card 10024, and a network processor 10022. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the device's status. The control plane distributes the generated forwarding tables to the forwarding plane. In the forwarding plane, the network processor 10022 uses the forwarding tables distributed by the control plane to look up and forward messages received by the physical interface card 10024. The forwarding tables distributed by the control plane can be stored in the forwarding table entry memory 10023. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
[0220] It's worth noting that there may be one or more main control boards 1001, including a primary and a backup main control board. There may also be one or more interface boards; the stronger the data processing capability of device 1000, the more interface boards it provides. Each interface board may also have one or more physical interface cards. There may be no switching network board 1004, or one or more; multiple boards can share the load for redundancy and backup. In a centralized forwarding architecture, device 1000 may not need a switching network board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, device 1000 can have at least one switching network board 1004, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of device 1000 in a distributed architecture are greater than those in a centralized architecture. Alternatively, the device 1000 can also be a single board, without a switching network board. The functions of the interface board and the main control board are integrated on this one board. In this case, the central processing unit on the interface board and the central processing unit on the main control board can be combined into one central processing unit on the same board, executing the combined functions of the two. This type of device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario, and no restrictions are imposed here.
[0221] See Figure 11 This application provides a network system 1100, which includes a packet sending device 1101 and a route generation device 1102. The packet sending device 1101 may include, for example, Figure 5 The device 500 shown, such as Figure 7 The device 700 shown or as Figure 9 The device 900 shown, the route generation device 1102 may include, as shown in the example, Figure 6 The device 600 shown, such as Figure 8 The device 800 shown or as Figure 10 The device 1000 is described above. Furthermore, in some embodiments, the means for sending messages and the means for generating routes may be the same device.
[0222] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0223] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have substantially the same function and purpose. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms. These terms are merely used to distinguish one element from another. For example, without departing from the various examples described, a first image can be referred to as a second image, and similarly, a second image can be referred to as a first image. Both the first image and the second image can be images, and in some cases, they can be separate and distinct images.
[0224] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0225] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for sending a message, characterized in that, The method applies to a device including target routing information. The target routing information includes a first address prefix for a first device and a correspondence between next-hop information and indication information. The first address prefix is used to identify the first device in multiple network topologies, including a first network topology and a second network topology, where the second network topology differs from the first network topology. The correspondence includes a correspondence between first next-hop information and first indication information, and a correspondence between second next-hop information and second indication information. The device corresponding to the first next-hop information belongs to the first network topology, and the device corresponding to the second next-hop information belongs to the second network topology. The first indication information indicates the first network topology, and the second indication information indicates the second network topology. Both the first and second next-hop information are next-hop information that can reach the first device. The method includes: Obtain a first message, the first message including the first address prefix and the first indication information, the first address prefix indicating the destination address of the first message; Based on the first address prefix and the first indication information, the first next-hop information is obtained from the target routing information; The first message is sent based on the first next-hop information.
2. The method as described in claim 1, characterized in that, The step of obtaining the first next-hop information from the target routing information based on the first address prefix and the first indication information includes: The target routing information is determined based on the first address prefix; The first next-hop information is determined from the target routing information based on the first indication information.
3. The method as described in claim 1 or 2, characterized in that, The first indication information includes the identification information of the flexible algorithm corresponding to the first network topology.
4. The method as described in claim 1 or 2, characterized in that, The first indication information includes a bitmap corresponding to the first network topology.
5. The method as described in claim 4, characterized in that, The step of obtaining the first next-hop information from the target routing information based on the first address prefix and the first indication information includes: Perform a bitwise AND operation between the first indication information and the indication information corresponding to each next hop information in the target routing information to obtain the operation result corresponding to each next hop information; Select the next-hop information whose operation result is non-zero as the first next-hop information.
6. The method as described in claim 1, 2, or 5, characterized in that, The method further includes: Obtain a second message, the second message including a first address prefix and second indication information; The second next-hop information is obtained based on the first address prefix and the second indication information; The second message is sent based on the second next-hop information.
7. The method as described in claim 1, 2, or 5, characterized in that, The target field of the first message carries the first indication information, and the target field includes the Internet Protocol version 6 hop-by-hop header (HBH), flow label, or destination address field of the first message.
8. A method for generating routes, characterized in that, The method includes: Obtain target routing information, which includes a first address prefix of a first device and a correspondence between next-hop information and indication information. The first address prefix is used to identify the first device in multiple network topologies, including a first network topology and a second network topology, wherein the second network topology is different from the first network topology. The correspondence includes a correspondence between first next-hop information and first indication information, and a correspondence between second next-hop information and second indication information. The device corresponding to the first next-hop information belongs to the first network topology, and the device corresponding to the second next-hop information belongs to the second network topology. The first indication information is used to indicate the first network topology, and the second indication information is used to indicate the second network topology. Both the first next-hop information and the second next-hop information are next-hop information that can reach the first device.
9. The method as described in claim 8, characterized in that, The process of obtaining the target routing information includes: Based on the first address prefix, calculate the first next-hop information that can reach the first device in the first network topology, and the second next-hop information that can reach the first device in the second network topology.
10. The method as described in claim 8 or 9, characterized in that, The first indication information includes the identification information of the flexible algorithm corresponding to the first network topology, and / or the second indication information includes the identification information of the flexible algorithm corresponding to the second network topology.
11. The method as described in claim 8 or 9, characterized in that, The first indication information includes a bitmap corresponding to the first network topology, and / or the second indication information includes a bitmap corresponding to the second network topology.
12. The method as described in claim 8, characterized in that, The process of obtaining the target routing information includes: Based on the first address prefix and the link status information of the devices included in the communication network, the target routing information is generated. For the devices included in the communication network, the link status information of the devices includes the address prefix of the device, the address prefix of the neighboring devices communicating with the device, and the indication information of the network topology in which the device is located.
13. An apparatus for transmitting messages, characterized in that, The device includes target routing information, which includes a first address prefix of a first device and a correspondence between next-hop information and indication information. The first address prefix is used to identify the first device in multiple network topologies, including a first network topology and a second network topology, where the second network topology is different from the first network topology. The correspondence includes a correspondence between first next-hop information and first indication information, and a correspondence between second next-hop information and second indication information. The device corresponding to the first next-hop information belongs to the first network topology, and the device corresponding to the second next-hop information belongs to the second network topology. The first indication information is used to indicate the first network topology, and the second indication information is used to indicate the second network topology. Both the first next-hop information and the second next-hop information are next-hop information that can reach the first device. The device includes: An acquisition unit is configured to acquire a first message, the first message including the first address prefix and the first indication information, wherein the first address prefix indicates the destination address of the first message; The processing unit is configured to obtain the first next-hop information from the target routing information based on the first address prefix and the first indication information; The sending unit is used to send the first message based on the first next-hop information.
14. The apparatus as claimed in claim 13, characterized in that, The processing unit is used for: The target routing information is determined based on the first address prefix; The first next-hop information is determined from the target routing information based on the first indication information.
15. The apparatus as claimed in claim 13 or 14, characterized in that, The first indication information includes a bitmap corresponding to the first network topology.
16. The apparatus as claimed in claim 15, characterized in that, The processing unit is used for: Perform a bitwise AND operation between the first indication information and the indication information corresponding to each next hop information in the target routing information to obtain the operation result corresponding to each next hop information; Select the next-hop information whose operation result is non-zero as the first next-hop information.
17. The apparatus as claimed in claim 13, 14 or 16, characterized in that, The acquisition unit is further configured to acquire a second message, the second message including a first address prefix and second indication information, the second indication information being used to indicate the second network topology; The processing unit is further configured to obtain the second next-hop information based on the first address prefix and the second indication information; The sending unit is further configured to send the second message based on the second next-hop information.
18. An apparatus for generating routes, characterized in that, The device includes: A processing unit is configured to obtain target routing information, the target routing information including a first address prefix of a first device, and a correspondence between next-hop information and indication information. The first address prefix is used to identify the first device in multiple network topologies, the multiple network topologies including a first network topology and a second network topology, the second network topology being different from the first network topology. The correspondence includes a correspondence between first next-hop information and first indication information, and a correspondence between second next-hop information and second indication information. The device corresponding to the first next-hop information belongs to the first network topology, the device corresponding to the second next-hop information belongs to the second network topology, the first indication information is used to indicate the first network topology, the second indication information is used to indicate the second network topology, and both the first next-hop information and the second next-hop information are next-hop information that can reach the first device.
19. The apparatus as claimed in claim 18, characterized in that, The processing unit is used for: Based on the first address prefix, calculate the first next-hop information that can reach the first device in the first network topology, and the second next-hop information that can reach the first device in the second network topology.
20. The apparatus as claimed in claim 18, characterized in that, The processing unit is used for: Based on the first address prefix and the link status information of the devices included in the communication network, the target routing information is generated. For the devices included in the communication network, the link status information of the devices includes the address prefix of the device, the address prefix of the neighboring devices communicating with the device, and the indication information of the network topology in which the device is located.
21. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a computer, it implements the method as described in any one of claims 1-12.
22. A network system, characterized in that, The system includes the apparatus as described in any one of claims 13-17 and the apparatus as described in any one of claims 18-20.
Citation Information
Patent Citations
Information management method, devices and system
CN106059924A
