Network topology determination method, apparatus and device, and computer readable storage medium
By adding effective time information to the routing calculation algorithm, determining the network topology in advance and switching the routing calculation algorithm, the major problems of packet loss and processing overhead caused by network topology changes in the existing technology are solved, and the flexible topology of time-varying networks is realized Switch and efficient routing calculations.
Patent Information
- Application Number
- CN202310919266.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-29
- Filing Date
- 2023-07-24
- Publication Date
- 2024-12-31
AI Technical Summary
When the network topology changes in the prior art, the switching efficiency of the routing calculation algorithm is low, resulting in packet loss and processing overhead, making it difficult to meet the flexible topology switching needs of time-varying networks.
Add effective time information to the routing calculation algorithm, determine the network topology in advance, and use different routing calculation algorithms to correspond to different valid times to realize flexible switching and periodic switching of network topology to avoid packet loss.
It improves the efficiency of network topology determination and routing information calculation efficiency, reduces packet loss, realizes flexible topology switching in time-varying networks, and improves service transmission performance.
Smart Images

Figure CN119232630A_ABST
Abstract
Description
[0001] This application claims priority to Chinese patent application No. 202310787428.4 filed on June 29, 2023, with invention name “A time-varying network routing method, device and system”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a method, apparatus, device and computer-readable storage medium for determining a network topology. Background Art
[0003] With the development of communication technology, the requirements of different services or scenarios for the network have gradually diversified, and thus flexible algorithms (flex-algo) and multi-topology algorithms have emerged as routing calculation algorithms based on network topology constraints. Different routing calculation algorithms can determine different network topologies according to different network topology constraints, and then different routing calculation algorithms can calculate routing information of different network topologies. Therefore, before calculating the route based on any routing calculation algorithm, it is necessary to first determine the network topology of any routing calculation algorithm. Summary of the invention
[0004] The present application provides a method, apparatus, device and computer-readable storage medium for determining a network topology, which are used to determine a network topology used at the effective time of a routing calculation algorithm before the effective time of the routing calculation algorithm.
[0005] In a first aspect, a method for determining a network topology is provided. The method determines a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, a first network topology used at the effective time of the first routing calculation algorithm is determined, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.
[0006] The method adds first effective time information to a first routing calculation algorithm so that the first routing calculation algorithm becomes effective at the effective time of the first routing calculation algorithm, and then determines in advance before the effective time of the first routing calculation algorithm a first network topology used at the effective time of the first routing calculation algorithm so that the first network topology determined in advance can be directly used at the effective time of the first routing calculation algorithm, thereby improving the efficiency of determining the first network topology, and further improving the efficiency of calculating routing information of the first network topology based on the first routing calculation algorithm.
[0007] In a possible implementation, after determining the first network topology used at the effective time of the first routing calculation algorithm based on the first effective time information and the first network topology constraint, the first routing information of the first network topology is calculated based on the first routing calculation algorithm at a second time, and the second time is before the effective time of the first routing calculation algorithm. The difference between the second time and the effective time of the first routing calculation algorithm is less than the difference threshold, and the difference threshold can be flexibly adjusted according to the application scenario. For example, the difference threshold can be a smaller value, so that the second time is closer to the effective time of the first routing calculation algorithm. Since the first routing calculation algorithm calculates the route in the first network topology, the first routing information is used to forward the message in the first network topology.
[0008] Therefore, the first routing information of the first network topology can be calculated in advance based on the routing calculation algorithm before the effective time of the first routing calculation algorithm, so that the first routing information calculated in advance can be directly used to forward messages during the effective time of the first routing calculation algorithm, and there is no need to calculate the first routing information during the effective time of the first routing calculation algorithm, which improves the efficiency of message forwarding based on the first routing information and avoids message loss in the process of calculating the first routing information.
[0009] In a possible implementation, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology. That is, the effective time of the first routing calculation algorithm can be determined based on the effective time of the first network topology. For scenarios where the network connection state changes, the network topology before and after the network connection state changes is different, that is, different time periods correspond to different network topologies, that is, any network topology is valid within the corresponding effective time period, and the effective time period refers to the time period between the effective time and the expiration time. Therefore, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the switching of the network topology can be achieved by switching the routing calculation algorithm, thereby avoiding packet loss caused by changes in the network topology.
[0010] In a possible implementation, the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology. By carrying the change period of the effective time in the first effective time information, the first routing calculation algorithm can be periodically effective, which improves the flexibility of the time constraint of the first routing calculation algorithm. In addition, the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology, so that the periodic switching of the network topology can be achieved by periodically switching the routing calculation algorithm, avoiding packet loss caused by using the first routing calculation algorithm outside the effective time of the first network topology.
[0011] In a possible implementation, the first network topology constraint includes a link color constraint, the link color constraint is used to constrain the color of the links included in the first network topology, different colors are used to distinguish different valid times, and the colors of the links included in the first network topology conform to the link color constraint. By coloring the links differently for different valid times, the first network topology corresponding to the specified color can be determined through the link color constraint, and the first network topology is valid during the valid time indicated by the specified color.
[0012] In a possible implementation, the method further determines a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different; based on the second effective time information and the second network topology constraint, the second network topology used in the effective time of the second route calculation algorithm is determined, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm. The method makes the application of the route calculation method more flexible by defining different route calculation algorithms corresponding to different effective times.
[0013] In a possible implementation, the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information. In the case of defining multiple routing calculation algorithms with different effective times, the change period of the effective time of the routing calculation algorithm can be determined according to the effective time information of each routing calculation algorithm, so that the multiple routing calculation algorithms can be used periodically and cyclically.
[0014] In a possible implementation, the first routing calculation algorithm may be a flex-algo or a multi-topology algorithm.
[0015] In the case where the first route calculation algorithm is flex-algo, before determining the first route calculation algorithm according to the first time, an intermediate system to intermediate system protocol (ISIS) link state protocol data unit (linkstate PDU, LSP) message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm is carried in a flexible algorithm define (FAD) sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the FAD sub-TLV; or, an open shortest path first (OSPF) link state advertisement (link state advertisement, LSA) message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first effective time information is carried in the effective time sub-TLV field of the FAD TLV; or, a border gateway protocol (BGP) message for announcing the first route calculation algorithm is received. protocol, BGP) update message, the first route calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first effective time information is carried in the effective time sub-TLV field of the FAD TLV.
[0016] The method provides multiple ways to announce flexible algorithms, and also provides ways to carry the effective time information of flexible algorithms, which provides a guarantee for the implementation of the method. PDU is the abbreviation of protocol data unit, TLV is the abbreviation of type, length, value field, and sub-TLV is the abbreviation of subtype, length, value field.
[0017] In the case where the first route calculation algorithm is a multi-topology algorithm, before determining the first route calculation algorithm according to the first time, an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm being carried in a time-varying multi-topology (multi-topology, MT) information sub-TLV field of the ISIS LSP message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in a time-varying MT information TLV field of the OSPF LSA message, and the first effective time information is carried in an effective time sub-TLV field of the time-varying MT information TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in a time-varying MT information TLV field of the BGP update message, and the first effective time information is carried in an effective time sub-TLV field of the time-varying MT information TLV.
[0018] The method provides multiple ways to notify the multi-topology algorithm, and also provides ways to carry the effective time information of the multi-topology algorithm, thereby providing a guarantee for the implementation of the method.
[0019] In a second aspect, a device for determining a network topology is provided, the device comprising: a processing module for performing operations other than the operations related to receiving and / or sending in the first aspect or any possible implementation of the first aspect; a transceiver module for performing operations related to receiving and / or sending in the first aspect or any possible implementation of the first aspect.
[0020] In a possible implementation, the transceiver module includes a receiving module and / or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.
[0021] In a possible implementation, a processing module is used to determine a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, determine the first network topology used at the effective time of the first routing calculation algorithm, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.
[0022] In a possible implementation, the processing module is further configured to calculate first routing information of the first network topology based on the first routing calculation algorithm at a second time, where the second time is before the effective time of the first routing calculation algorithm.
[0023] In a possible implementation manner, the validity period of the first routing calculation algorithm corresponds to the validity period of the first network topology.
[0024] In a possible implementation manner, the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.
[0025] In a possible implementation, the first network topology constraint includes a link color constraint, which is used to constrain the colors of links included in the first network topology, different colors are used to distinguish different valid times, and the colors of links included in the first network topology comply with the link color constraint.
[0026] In a possible implementation, the processing module is further used to determine a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different; based on the second effective time information and the second network topology constraint, determine the second network topology used at the effective time of the second route calculation algorithm, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.
[0027] In a possible implementation manner, the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information.
[0028] In a possible implementation, the first routing calculation algorithm is a flex-algo or a multi-topology algorithm.
[0029] In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module is used to receive an ISIS link state data unit LSP message used to announce the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the FAD sub-TLV.
[0030] In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module is used to receive an OSPF LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
[0031] In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
[0032] In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module is used to receive an ISIS LSP message used to announce the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the time-varying MT information sub-TLV.
[0033] In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module is used to receive an open shortest route first protocol OSPF link state advertisement LSA message used to announce the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying multi-topology MT information TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.
[0034] In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in a time-varying multi-topology MT information TLV field of the BGPupdate message, and the first valid time information is carried in a valid time sub-TLV field of the time-varying MT information TLV.
[0035] In a third aspect, a network device is provided, comprising: a processor, the processor being coupled to a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor, so that the network device implements the method for determining the network topology as described in the first aspect or any one of the first aspects.
[0036] Optionally, the number of the processors is one or more, and the number of the memories is one or more.
[0037] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0038] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0039] In a fourth aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to enable a computer to implement the methods in the above aspects.
[0040] In a fifth aspect, a computer program (product) is provided, wherein the computer program (product) comprises: a computer program code, and when the computer program code is executed by a computer, the computer executes the methods in the above aspects.
[0041] In a sixth aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the methods in the above aspects.
[0042] In the seventh aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the methods in the above aspects.
[0043] It should be understood that the beneficial effects achieved by the technical solutions of the second to seventh aspects of the present application and the corresponding possible implementation methods can be referred to the technical effects of the first aspect and its corresponding possible implementation methods mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1A schematic diagram of a change in resource utilization rate of a cell base station provided in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of an implementation environment of a method for determining a network topology provided in an embodiment of the present application;
[0046] Figure 3 A flowchart of a method for determining a network topology provided in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of the format of a FAD sub-TLV field provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of the format of a FAD TLV field provided in an embodiment of the present application;
[0049] Figure 6 A schematic diagram of the format of a time-varying MT information sub-TLV field provided in an embodiment of the present application;
[0050] Figure 7 A schematic diagram of the format of a time-varying MT information TLV field provided in an embodiment of the present application;
[0051] Figure 8 A schematic diagram of the format of a valid time sub-TLV field provided in an embodiment of the present application;
[0052] Fig. 9 A schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application;
[0053] Fig.10 A schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application;
[0054] Fig.11 A schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application;
[0055] Fig.12 A schematic diagram of a process of switching network topology provided in an embodiment of the present application;
[0056] Fig.13 A schematic diagram of another process of switching network topology provided in an embodiment of the present application;
[0057] Fig.14 A schematic diagram of another process of switching network topology provided in an embodiment of the present application;
[0058] Fig.15 A schematic diagram of the structure of a device for determining a network topology provided in an embodiment of the present application;
[0059] Fig.16 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0060] Fig.17 A schematic diagram of the structure of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0062] In an embodiment of the present application, a network whose network topology changes over time is referred to as a time-varying network. For example, for a network where there is a tidal effect on network traffic, since there are obvious differences in traffic in different time periods, a network topology with a large network connection scale can be used to forward messages during time periods with large traffic. When a time period with small traffic is reached, some network connections in the network topology are closed, and a network topology with a small network connection scale is used for message forwarding to ensure that there is no network congestion during time periods with large traffic, and to avoid waste of resources during time periods with small traffic. In this scenario, changes in network topology are caused by changes in network connection status. The network connection status refers to the network connection status that can affect the forwarding path of the message. The network connection status includes but is not limited to the status of the link, the status of the network node, or the status of the route.
[0063] Taking mobile network as an example, see Figure 1 The schematic diagram of the change of resource utilization of the cell base station in one day is shown, and the resource utilization of the cell base station shows an obvious tidal effect in one day. Among them, the resource utilization is proportional to the traffic size. The resource utilization between 0:00 and 7:00 is small, that is, the traffic is small, which can be called a small traffic time period, and the resource utilization between 7:00-24:00 is large, that is, the traffic is large, which can be called a large traffic time period. Therefore, a network topology with a small network connection scale can be used between 0:00 and 7:00, and a network topology with a large network connection scale can be used between 7:00 and 24:00. That is to say, in a network where there is a tidal effect on network traffic, taking the traffic change time period including a large traffic time period and a small traffic time period as an example, two network topologies can be formed, namely, a first network topology under a large traffic time period and a second network topology under a small traffic time period, and switching between the two network topologies according to time during the message forwarding process, thereby forming a time-varying network.
[0064] For another example, in a satellite network, due to the periodicity and predictability of the operation of the satellite constellation, the satellite network can be divided into multiple discrete network topologies on the time axis, and the network topology within each time slice can be regarded as fixed. In other words, in a satellite network, the network topology has regular and predictable changes, thus forming a time-varying network. For another example, in a network that prioritizes energy consumption, the network connection will be adaptively closed or opened according to the real-time changes in network traffic. For example, the network device is turned off when it is idle to reduce the energy waste caused by idle network devices. It can be seen that in a network that prioritizes energy consumption, the network topology will also change with the changes in the energy consumption of the network devices, and the changes in the energy consumption of the network devices are also predictable, which also forms a time-varying network.
[0065] The embodiments of the present application only illustrate time-varying networks using tidal networks, satellite networks, and energy-prioritized networks as examples. For other time-varying networks with predictable changes in network topology, the embodiments of the present application will no longer illustrate them one by one. In the scenario of time-varying networks, how to control network traffic to switch to different network topologies in different time periods is an urgent problem to be solved, and the transmission of network traffic in different network topologies is based on routing information. Therefore, how the routing calculation algorithm switches to use different network topologies for routing calculation in different time periods is an urgent problem to be solved.
[0066] In the related art, taking the routing calculation algorithm as flex-algo as an example, flex-algo can allow network devices to calculate routes based on specific network topology constraints and path calculation constraints, so that different flex-algos can meet the needs of different business scenarios, such as high-bandwidth services or low-latency services, and thus flex-algo can more simply and flexibly implement the network's traffic engineering (TE) capabilities. Among them, before performing routing calculations based on path calculation constraints, it is necessary to first determine the network topology based on the network topology constraints, so as to perform routing calculations based on the path calculation constraints in the determined network topology, and obtain the routing information corresponding to the determined network topology. Among them, the network topology that changes over time refers to changes in the physical network topology, and the network topology determined in the physical network topology based on the routing calculation algorithm is the logical network topology.
[0067] Since the flex-algo in the related art calculates the route at the same time, when the network topology changes, the network device needs to redetermine the network topology corresponding to all flex-algos and perform route calculations based on the changed network topology, which makes the processing overhead of the network device large. In addition, in the process of redetermining the network topology corresponding to all flex-algos and performing route calculations, since the physical network topology has changed, the network traffic is still transmitted in the network topology before the change, which easily leads to packet loss of traffic, thereby affecting the service transmission performance.
[0068] That is to say, the flex-algo in the related art only implements network topology constraints and path calculation constraints based on the spatial dimension, so that network traffic with the same traffic characteristics but different arrival times will be guided to use the routing information calculated based on the same flex-algo for forwarding, so that network traffic arriving when the network topology changes needs to wait for the route to be recalculated based on the same flex-algo before switching to the changed network topology for forwarding. Therefore, the method in the related art is less efficient in switching network topology.
[0069] The embodiment of the present application provides a method for determining network topology, by adding effective time information to the routing calculation algorithm, so that the routing calculation algorithm has an effective time constraint in the time dimension, and then can perform routing calculation based on different routing calculation algorithms according to time. Since different routing calculation algorithms use different network topologies for calculating routing, switching different routing calculation algorithms according to time can achieve flexible switching of network topology. This method can be applied to any network system, for example, to the above-mentioned time-varying network, to achieve flexible switching of network topologies in different time periods according to the time-varying properties of the time-varying network.
[0070] For example, see Figure 2 , Figure 2 This is a diagram of an implementation environment of a method for determining a network topology provided in an embodiment of the present application. Figure 2As shown, the implementation environment includes multiple network devices, any network device can be connected to another network device through a link, and the link connection relationship between each network device can be configured according to network requirements. The network device can be a switch or a router, etc., and one network device corresponds to a node of the network. Among them, the state change of the link and the state change of the node will cause the change of the network topology. For example, if the state of network device 2 changes from valid to invalid, the state of link 1 and link 3 also changes from valid to invalid, then the network topology after the change lacks link 1 and link 3 compared to the network topology before the change. Exemplarily, when the network device is powered off or turned off, the state of the network device is invalid; when the network device is powered on or turned on, the state of the network device is valid. When the link is closed or disconnected, the state of the link is invalid; when the link is opened or connected, the state of the link is valid.
[0071] In the embodiments of the present application, Figure 2 The network devices in the implementation environment shown may also include more or less, that is, the embodiment of the present application does not limit the number of network devices. Among them, the network devices mentioned in the embodiments of the present application, in addition to network devices such as switches and routers, may also be a part of the components on the network device, such as a single board or line card on the network device, or a functional module on the network device, or a chip for implementing the method provided in the embodiment of the present application, which is not specifically limited in the embodiment of the present application. When the network device is a chip, the transceiver module used to implement the method may be, for example, an interface circuit of the chip, and the processing module may be a processing circuit with processing functions in the chip. The connection method between network devices includes, but is not limited to, direct connection via Ethernet cable or optical cable.
[0072] See also Figure 3 , Figure 3 A flowchart of a method for determining a network topology provided in an embodiment of the present application. The method for determining a network topology can be applied to Figure 2 In the implementation environment shown, for example, Figure 2 Any network device in the implementation environment shown executes the method. Figure 3 As shown, the method for determining the network topology includes but is not limited to the following steps 301 and 302.
[0073] Step 301, determining a first routing calculation algorithm according to a first time, the first routing calculation algorithm including first effective time information and a first network topology constraint, the first effective time information including the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm.
[0074] In the embodiment of the present application, in addition to the first network topology constraint, the first route calculation algorithm also includes first effective time information, which is used to constrain the effective time of the first route calculation algorithm, so that during the effective time of the first route calculation algorithm, the routing information calculated based on the first route calculation algorithm is used to forward the message. Therefore, the first route calculation algorithm can be determined at a first time before the effective time of the first route calculation algorithm, without having to determine all route calculation algorithms at the same time.
[0075] Optionally, the present application embodiment does not limit the content of the first effective time information, and it only needs to constrain the effective time of the first route calculation algorithm. For example, the first effective time information includes the effective time, which is the time when the first route calculation algorithm starts to take effect; or, the first effective time information includes the effective time and the expiration time, which is the time when the first route calculation algorithm starts to fail, and the time period between the effective time and the expiration time is the effective time period from the beginning of the first route calculation algorithm to its failure; or, the first effective time information includes the effective time and the duration period, and the duration period starting from the effective time is the effective time period from the beginning of the first route calculation algorithm to its failure.
[0076] In a possible implementation, when the first effective time information includes an effective time, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology. That is, the effective time of the first routing calculation algorithm can be determined based on the effective time of the first network topology. For the scenario where the network connection state changes, the network topology before and after the network connection state changes is different, that is, the network topology effective at different times is different, that is, any network topology is effective within the corresponding effective time period. Therefore, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the switching of the network topology can be achieved by switching the routing calculation algorithm, thereby avoiding packet loss caused by changes in the network topology.
[0077] The effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the effective time of the first routing calculation algorithm is the same as the effective time of the first network topology. Exemplarily, if the network connection included in the first network topology becomes effective at the first effective time, the effective time of the first network topology is the first effective time, and the first routing calculation algorithm also becomes effective at the first effective time, and the first network topology has been determined to be obtained before the first effective time, so that when the first effective time is reached, the network device can directly switch the current network topology to the first network topology, and ensure that the network connection state of the first network topology is valid at the first effective time.
[0078] Similarly, when the first effective time information includes the effective time and the expiration time, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the expiration time of the first routing calculation algorithm corresponds to the expiration time of the first network topology. When the first effective time information includes the effective time and the duration period, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the duration period of the first routing calculation algorithm corresponds to the duration period of the first network topology. This makes the effective time information of the routing calculation algorithm correspond to the time information of the change of the network connection state of the network topology.
[0079] In a possible implementation, for a time-varying network whose network topology changes periodically, the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period indicates multiple periodic effective times of the first routing calculation algorithm. For example, the effective time of the first routing calculation algorithm is 10 o'clock, and the change period of the effective time of the first routing calculation algorithm is one day, then the first routing calculation algorithm takes effect at 10 o'clock every day. For another example, the effective time of the first routing calculation algorithm is 10 o'clock and the expiration time is 22 o'clock, and the change period of the effective time of the first routing calculation algorithm is one day, then the first routing calculation algorithm takes effect at 10 o'clock every day and becomes invalid at 22 o'clock every day.
[0080] In an embodiment of the present application, the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology. By carrying the change period of the effective time in the first effective time information, the first routing calculation algorithm can be periodically effective, which improves the flexibility of the time constraint of the first routing calculation algorithm. In addition, the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology, so that the switching of the network topology can be achieved periodically by periodically switching the routing calculation algorithm, avoiding the packet loss caused by using the first routing calculation algorithm outside the effective time of the first network topology.
[0081] For a time-varying network whose network topology has no obvious periodic changes but predictable changes, the method can define two routing calculation algorithms at the same time. For example, when it is predicted that the network topology changes at the first target time and the second target time, a first routing calculation algorithm and a second routing calculation algorithm can be defined. The effective time of the first routing calculation algorithm can be the first target time, and the invalid time can be the second target time. The effective time of the second routing calculation algorithm can be the second target time, and the invalid time can be the third target time. The third target time can be any time after the second target time. Alternatively, the effective time of the first routing calculation algorithm can also be different from the first target time, and the invalid time can also be different from the second target time, that is, the effective time and invalid time of the first routing calculation algorithm can be different from the time when the physical network topology changes. For example, the effective time and invalid time of the first routing calculation algorithm can be flexibly set to different fixed values according to the actual changes in the network topology of the time-varying network.
[0082] In a possible implementation, the method further includes: determining a second route calculation algorithm according to a third time, the second route calculation algorithm including second effective time information and a second network topology constraint, the second effective time information indicating the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint being used to determine the network topology corresponding to the second route calculation algorithm, and the third time being before the effective time of the second route calculation algorithm. Thus, different route calculation algorithms corresponding to different effective times can be defined, making the application of the route calculation method more flexible.
[0083] The effective time of the first route calculation algorithm is different from the effective time of the second route calculation algorithm, the expiration time of the first route calculation algorithm may be the same as or different from the effective time of the second route calculation algorithm, when the expiration time of the first route calculation algorithm is later than the effective time of the second route calculation algorithm, the effective time period of the first route calculation algorithm overlaps with the effective time period of the second route calculation algorithm, and when the expiration time of the first route calculation algorithm is the same as the effective time of the second route calculation algorithm, the effective time period of the first route calculation algorithm is continuous with the effective time period of the second route calculation algorithm.
[0084] In an embodiment of the present application, the third time may be the same as or different from the first time. When the third time is the same as the first time, the first routing calculation algorithm and the second routing calculation algorithm may be determined at the same time. Since the network topology changes in this case do not have obvious periodic changes, if the first effective time information also includes the change period of the effective time of the first routing calculation algorithm, the change period of the effective time of the first routing calculation algorithm may be determined based on the first effective time information and the second effective time information. In the case of defining multiple routing calculation algorithms with different effective times, the change period of the effective time of the routing calculation algorithm may be determined based on the effective time information of each routing calculation algorithm, so that the multiple routing calculation algorithms can be used periodically and cyclically.
[0085] For example, the change period of the effective time of the first route calculation algorithm is the time period between the effective time in the first effective time information and the expiration time in the second effective time information; or, the change period of the effective time of the first route calculation algorithm is the sum of the effective time period indicated by the first effective time information and the effective time period indicated by the second effective time information. Optionally, the content of the second effective time information can refer to the content of the first effective time information, which is not repeated here. Exemplarily, the second effective time information also includes the change period of the effective time of the second route calculation algorithm, and the change period of the effective time of the second route calculation algorithm can be the same as the change period of the effective time of the first route calculation algorithm.
[0086] Before determining the first route calculation algorithm according to the first time, it is necessary to first obtain the first route calculation algorithm so that the first route calculation algorithm can be directly determined from multiple route calculation algorithms at the first time. Optionally, the first route calculation algorithm can be obtained by defining the first route calculation algorithm according to the change time information of the network connection state, or by receiving a message for notifying the first route calculation algorithm to obtain the first route calculation algorithm.
[0087] In a possible implementation, the algorithm type of the first routing calculation algorithm or the second routing calculation algorithm may be any routing calculation algorithm that performs routing calculation based on network topology constraints, such as a flex-algo or a multi-topology algorithm. For flex-algo, the network topology constraint may refer to a constraint condition that a link must satisfy. For example, the first network topology constraint may include a link color constraint, which is used to constrain the color of the links included in the first network topology. Different colors are used to distinguish different valid times. The color of the links included in the first network topology complies with the link color constraint.
[0088] The link color constraint constrains the colors of the links included in the first network topology in two ways, including but not limited to the following two ways: the first way is to indicate the colors of the links included in the first network topology through the link color constraint, for example, if the link color constraint indicates yellow, the color of the links included in the first network topology is yellow; the second way is to indicate the colors of the links excluded from the first network topology through the link color constraint, for example, if the link color constraint indicates yellow, the colors of the links included in the first network topology do not include yellow. By coloring the links differently for different effective times, the first network topology corresponding to the specified color can be determined through the link color constraint, and the first network topology is valid during the effective time indicated by the specified color.
[0089] As for the multi-topology algorithm, since the multi-topology algorithm refers to running multiple independent network topologies within an ISIS autonomous system, different routing information of different network topologies can be calculated based on the shortest path first (SPF) through multiple independent network topologies to achieve mutual shielding between multiple independent network topologies. Therefore, in the case where the first routing calculation algorithm is the multi-topology algorithm, the first network topology constraint can refer to the link identifiers of multiple links, and the links included in the first network topology belong to the links corresponding to the link identifiers in the first network topology constraint.
[0090] In the case where the first route calculation algorithm is flex-algo, before determining the first route calculation algorithm according to the first time, an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the FAD sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first effective time information is carried in the effective time sub-TLV field of the FAD TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first effective time information is carried in the effective time sub-TLV field of the FAD TLV. Thus, a plurality of methods for announcing flexible algorithms are provided, and methods for carrying the effective time information of flexible algorithms are also provided, respectively, which provides a guarantee for the implementation of the method.
[0091] Exemplarily, the FAD sub-TLV field carrying the first flexible algorithm may be as follows: Figure 4As shown. Figure 4 As shown, the FAD sub-TLV field includes a type field, a length field, a flexible algorithm (Flex-Algo) field, a metric type (Metric-Type) field, a calculation type (Calc-Type) field, a priority (Priority) field, a valid time sub-TLV field, and a sub-TLVs field. The format definition of the FAD sub-TLV field can refer to the relevant description in the request for comments (RFC) 9350. Optionally, the FAD sub-TLV field can be carried in the Router CAPABILITY TLV-242 field of the ISIS LSP message. For detailed description, refer to the relevant description in RFC7981.
[0092] Among them, the type field is used to uniquely identify the FAD sub-TLV, for example, the value of the type field is 26; the length field indicates the total length of the FAD sub-TLV field after removing the type field and the length field, for example, the unit of the length field is bytes; the Flex-Algo field indicates the identification (ID) of the first flexible algorithm, and the value of the Flex-Algo field is a value from 128 to 255; the Metric-Type field indicates the path calculation constraint of the first flexible algorithm, and the path calculation constraint is the metric type used when calculating the route, for example, when the value of the Metric-Type field is 1, it means that the route is calculated based on the minimum unidirectional link delay, and when the value of the Metric-Type field is 2, it means that the route is calculated based on the TE metric; the Calc-Type field indicates the calculation method of the first flexible algorithm, for example, the calculation method of SPF; the Priority field indicates the priority announced by the first flexible algorithm, and the value of the Priority field is a value from 0 to 255; the valid time sub-TLV field is used to carry the first valid time information; the sub-TLVs field is a variable length and is used to carry other constraints of the first flexible algorithm.
[0093] Exemplarily, the FAD TLV field carrying the first flexible algorithm may be as follows: Figure 5 shown. Figure 5 The meaning of each field shown can be found in Figure 4 The relevant introduction of each field in is not repeated here. Optionally, such as Figure 5The FAD TLV field shown in FIG. 1 may be carried in the Router Information (RI) LSA field of the OSPF LSA message. For detailed description, see the relevant description in RFC7770; or, Figure 5 The FAD TLV field shown may be carried in the BGP-LS routing attribute corresponding to the node network layer reachability information (NLRI) of the BGP update message. For detailed description, refer to the relevant description in RFC9351.
[0094] In the case where the first route calculation algorithm is a multi-topology algorithm, before determining the first route calculation algorithm according to the first time, an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm is carried in the time-varying MT information sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the time-varying MT information sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the time-varying MT information TLV field of the OSPF LSA message, and the first effective time information is carried in the effective time sub-TLV field of the time-varying MT information TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the time-varying MT information TLV field of the BGP update message, and the first effective time information is carried in the effective time sub-TLV field of the time-varying MT information TLV. A plurality of ways for announcing the multi-topology algorithm are provided, and ways for carrying the effective time information of the multi-topology algorithm are also provided, respectively, to provide a guarantee for the implementation of the method.
[0095] Exemplarily, the time-varying MT information sub-TLV field carrying the first flexible algorithm may be as follows: Figure 6As shown. Among them, the time-varying MT information sub-TLV field includes a type field, a length field, a reserved field, an MT ID field, and a valid time sub-TLV field. Among them, the type field is used to uniquely identify the time-varying MT information sub-TLV; the length field indicates the total length of the time-varying MT information sub-TLV field after removing the type field and the length field, for example, the unit of the length field is bytes; the reserved field is an unallocated field; the MT ID field indicates the ID of the first multi-topology algorithm, which is 12 bits in length. For detailed introduction, please refer to the relevant description in RFC5120; the valid time sub-TLV field is used to carry the first valid time information.
[0096] Optionally, the time-varying MT information sub-TLV field of the ISIS LSP message may include multiple multi-topology algorithms such as a second multi-topology algorithm and a third multi-topology algorithm in addition to the first multi-topology algorithm. Figure 6 As shown, the time-varying MT information sub-TLV field can carry multiple MT ID fields corresponding to multiple multi-topology algorithms, for example, MTID1 field and MT ID2 field, and each MT ID field includes a corresponding valid time sub-TLV field. Optionally, the time-varying MT information sub-TLV field can be carried in the Router CAPABILITY TLV-242 field of the ISIS LSP message. For detailed description, refer to the relevant description in RFC7981. In addition, a new time-varying MT information TLV field can be defined in the ISIS LSP message to carry the time-varying MT information sub-TLV field.
[0097] Exemplarily, the time-varying MT information TLV field carrying the first flexible algorithm may be as follows: Figure 7 shown. Figure 7 The meaning of each field shown can be found in Figure 6 The relevant introduction of each field in is not repeated here. Optionally, such as Figure 7 The time-varying MT information TLV field shown in FIG. 1 can be carried in the RI LSA field of the OSPF LSA message. For detailed description, refer to the relevant description in RFC7770. In addition, a new LSA can be defined in the OSPF LSA message to carry the time-varying MT information TLV field; or, Figure 7The time-varying MT information TLV field shown can be carried in the BGP-LS routing attribute corresponding to the Node NLRI of the BGP update message. For detailed introduction, please refer to the relevant description in RFC9351. In addition, a new NLRI type can be defined in the BGP update message to carry the time-varying MT information TLV field, or the time-varying MT information TLV field can be carried in the local node descriptor (LocalNode Descriptors) field of the existing Node NLRI.
[0098] Since the effective time information provided by the embodiment of the present application may include different contents, the format diagram of the effective time sub-TLV field carrying the effective time information is also different. Figure 8-11 The format diagram of the validity time sub-TLV field shown is used as an example for explanation.
[0099] exist Figure 8 In the validity time sub-TLV field shown, the length of the type field is 1 or 2 bytes, which is used to uniquely identify the structure of the first routing calculation algorithm; the length of the length field is 1 or 2 bytes, which is used to indicate the length of the field structure of the validity time information except the length field and the type field; the length of the enable time field is 4 bytes, which is used to indicate the first effective time of the first routing calculation algorithm; the length of the disable time field is 4 bytes, which is used to indicate the first invalid time of the first routing calculation algorithm. Compared with Figure 8 , Fig. 9 The validity time sub-TLV field shown in the figure adds a period field. The length of the period field is 4 bytes, which is used to indicate the change period of the validity time of the first routing calculation algorithm. For an introduction to other fields, see Figure 8 The relevant contents in will not be repeated here.
[0100] In an embodiment of the present application, the valid time sub-TLV field can carry multiple valid time information through multiple change time units. For example, a change time unit includes a corresponding change time information index (index), a control flag (flags), and a triplet of valid time, expiration time and period. Therefore, the valid time sub-TLV can also include information such as the number of change time units.
[0101] For example, see Fig.10 The validity period sub-TLV field shown is compared to Figure 8 , Fig.10The initial time field, number field and reserved field are added. Among them, the initial time field is an 8-byte timestamp in seconds. For example, the value of the initial time field is the number of seconds that have passed since January 1, 1970, excluding leap seconds; the number field is 1 byte long, which is used to indicate the number of variable time information in the field structure of the time constraint; the unit field is 1 byte long, which is used to indicate the time unit of the variable time information for subsequent expansion. Exemplarily, the meaning of the unit field can be as shown in Table 1. Taking the unit value (value) of 0 as an example, it indicates that the unit of the valid time, invalid time and period in the variable time unit is microseconds. The case where the unit value is 9-255 has not been assigned yet.
[0102] Table 1
[0103] unit value meaning 0 Microseconds 1 millisecond 2 Second 3 minute 4 Hour 5 sky 6 week 7 moon 8 Year 9-255 Unassigned
[0104] See also Fig.11 The validity period sub-TLV field shown is compared to Fig. 9 , Fig.11 Added initial time field, number field and reserved field. Fig.10 , Fig.11 The index field, flags field, and period field are added. For each change time unit in the effective time sub-TLV, the index field is the first field of the change time unit. The index field is the index of the change time unit, which uniquely identifies a change time unit that carries effective time information; the flags field is a control flag bit, and each bit in the flags field represents a corresponding control operation. For example, the lowest bit of the flags field is used as a deletion control bit. When the lowest bit of the flags field is 1, it means that the effective time information in the change time unit is deleted. The index field and the flags field can be used to implement operations such as deletion and modification of the effective time information of the first routing calculation algorithm that has been published.
[0105] Step 302: Determine a first network topology used during the effective time of a first route calculation algorithm based on first effective time information and a first network topology constraint. The first route calculation algorithm and the first network topology are determined before the effective time of the first route calculation algorithm.
[0106] In the embodiment of the present application, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm. Therefore, before the effective time of the first routing calculation algorithm, the first network topology used during the effective time of the first routing calculation algorithm can be determined in advance by determining the first effective time information and the first network topology constraint. The first network topology can be generated at the first time, or it can be generated before the first time. The first network topology determined in advance is directly selected at the first time. In short, the first network topology is determined before the effective time of the first routing calculation algorithm.
[0107] Optionally, when the first network topology is generated at the first time, the method for generating the first network topology based on the first effective time information and the first network topology constraint can be to determine the physical network topology that is effective at the effective time of the first routing calculation algorithm based on the first effective time information and the time change information of the network connection state, and then determine the first network topology that satisfies the first network topology constraint in the physical network topology. The difference between the first time and the effective time of the first routing calculation algorithm is not limited in the embodiment of the present application. The smaller the difference between the first time and the effective time of the first routing calculation algorithm, the closer the first network topology generated at the first time is to the actual physical network topology, thereby avoiding changes in the physical network topology between the first time and the effective time of the first routing calculation algorithm.
[0108] In the case where the first network topology constraint includes a link color constraint, since different colors are used to distinguish different valid times, the method for generating the first network topology based on the first valid time information and the first network topology constraint can be to directly determine the first network topology that meets the link color constraint based on the color attribute included in the link. For example, the link includes a yellow attribute, and the yellow color indicates the first valid time period, which means that the link is valid in the first valid time period. Then the network topology composed of links with yellow attributes is the network topology that is valid in the first valid time period. In other words, by coloring the links differently for different valid times, the first network topology corresponding to the specified color can be determined through the link color constraint, and the first network topology is valid during the valid time indicated by the specified color.
[0109] Similar to the first route calculation algorithm, when the second route calculation algorithm is also determined, the second network topology used at the effective time of the second route calculation algorithm can be determined based on the second effective time information and the second network topology constraint, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.
[0110] In summary, by adding the first effective time information to the first route calculation algorithm, the first route calculation algorithm takes effect at the effective time of the first route calculation algorithm, and then by determining in advance before the effective time of the first route calculation algorithm the first network topology used at the effective time of the first route calculation algorithm, the route can be directly calculated using the first network topology determined in advance at the effective time of the first route calculation algorithm, thereby improving the efficiency of determining the first network topology, and thereby improving the efficiency of calculating the routing information of the first network topology based on the route calculation algorithm.
[0111] In an embodiment of the present application, after determining the first network topology used at the first effective time based on the first effective time information and the first network topology constraint, the method can also calculate the first routing information of the first network topology based on the first routing calculation algorithm at a second time, and the second time is before the effective time of the first routing calculation algorithm, and the second time is the same as the first time or after the first time. Among them, the difference between the second time and the effective time of the first routing calculation algorithm is less than the difference threshold, and the difference threshold can be flexibly adjusted according to the application scenario. For example, the difference threshold can be a smaller value, so that the second time is closer to the effective time of the first routing calculation algorithm. Since the first routing calculation algorithm calculates the route in the first network topology, the first routing information is used to forward the message in the first network topology.
[0112] Therefore, the first routing information of the first network topology can be calculated in advance based on the routing calculation algorithm before the effective time of the first routing calculation algorithm, so that the first routing information calculated in advance can be directly used to forward messages during the effective time of the first routing calculation algorithm, and there is no need to calculate the first routing information during the effective time of the first routing calculation algorithm, which improves the efficiency of message forwarding based on the first routing information and avoids message loss in the process of calculating the first routing information.
[0113] In the embodiment of the present application, after calculating the first routing information of the first network topology based on the first routing calculation algorithm, the message can be forwarded in the first network topology according to the calculated first routing information. Exemplarily, the network device determines to forward the network traffic based on the first routing information according to the arrival time of the network traffic within the effective time period of the first routing calculation algorithm, thereby achieving the effect of directing the network traffic to the first network topology for forwarding.
[0114] The following examples illustrate the method provided by the embodiments of the present application based on different time-varying networks. Fig.12 A flow chart of performing network topology switching for a time-varying network with periodic topology changes, for example, the time-varying network with periodic topology changes may be a tidal network; Fig.13 and Fig.14The present invention is a flow chart of performing network topology switching for a time-varying network whose topology changes do not have obvious periodicity. For example, the time-varying network whose topology changes do not have obvious periodicity may be a satellite network or a network with energy consumption priority.
[0115] See also Fig.12 , Taking the tidal network and flexible algorithm as an example, for the high-flow time period and low-flow time period of the tidal network, two flexible algorithms, the first flexible algorithm and the second flexible algorithm, can be defined, and then the network topology switching can be achieved through the following steps 1-6.
[0116] 1. Link coloring and notification of link changes. Any network device in the Tidal network assigns different color attributes to any directly connected link based on the change rules of link opening and closing. Different colors are used to mark different valid time periods of the link. This process is called link coloring. For example, a link that is open in both high-traffic time periods and low-traffic time periods is assigned a green attribute, and a link that is only open in low-traffic time periods is assigned a yellow attribute. Fig.12 In the figure, the time period of small traffic is (t0-t1), the time period of large traffic is (t1-t2), the straight line represents the green attribute of the link, and the dotted line represents the yellow attribute of the link.
[0117] Each network device in the tidal network notifies each other of the coloring attribute information of the links directly connected to each network device. This process is called notifying link changes. In addition to notifying each other of the coloring attribute information of the links directly connected to each network device, each network device notifies each other of other attribute information of the links, such as the interruption and metric value of the links directly connected to each network device. Furthermore, each network device in the tidal network can obtain the attribute information of each link in the tidal network, thereby enabling the network topology that is effective in low-traffic time periods and the network topology that is effective in high-traffic time periods to be prepared in advance.
[0118] 2. Define flexible algorithms. The first flexible algorithm and the second flexible algorithm can be defined on any one or more network devices in the tidal network. The first effective time information included in the first flexible algorithm indicates a low-traffic time period, and the second effective time information included in the second flexible algorithm indicates a high-traffic time period, that is, the effective time period and change period of the flexible algorithm are the same as the effective time period and change period of the network topology corresponding to the flexible algorithm. Optionally, the effective time, expiration time and change period of the flexible algorithm can be input externally, for example, they can be sent to the network device through a controller, or obtained through manual configuration.
[0119] Optionally, the first network topology constraint included in the first flexible algorithm is a link color constraint, for example, the first network topology constraint indicates that only links with green attributes are used to determine the network topology; the second network topology constraint included in the second flexible algorithm is also a link color constraint, for example, the second network topology constraint indicates that links with green attributes and yellow attributes are used to determine the network topology. Fig.12 In the embodiment of the present application, the flexible algorithm ID of the first flexible algorithm is defined as 128, and the first effective time information of the first flexible algorithm is (t0-t1, T); the flexible algorithm ID of the second flexible algorithm is defined as 129, and the second effective time information of the second flexible algorithm is (t1-t2, T), where T is the change period. In the embodiment of the present application, the first flexible algorithm or the second flexible algorithm may also include other constraints, such as metric type, metric value range, etc., and the network topology is determined by the other constraints and the first effective time information.
[0120] 3. Announcement of flexible algorithms. The network device used to define the flexible algorithm can announce the flexible algorithm of the time-varying network to other network devices, and announce the segment ID locator (SID locator) or Internet protocol (IP) prefix corresponding to the flexible algorithm together with the flexible algorithm. Optionally, the flexible algorithm is carried in the FAD TLV of the message for announcement. Fig.12 In the FAD TLV, the flexible algorithm ID: 128, the valid time information: (t0-t1, T), the flexible algorithm ID: 129, the valid time information is (t1-t2, T). Among them, the SID of the algorithm (algo): 128 is 10065, and the SID of algo: 129 is 20065.
[0121] 4. Generate logical topology. Each network device in the tidal network can generate a first network topology used during the effective time of the first flexible algorithm according to the state of each link of the tidal network during the effective time period of the first flexible algorithm by executing the method provided in the embodiment of the present application. The first network topology corresponds to Fig.12 The dotted line in the network topology represents the network topology; the second network topology used in the effective time of the second flexible algorithm is generated according to the state of each link of the tidal network during the effective time period of the second flexible algorithm, and the second network topology corresponds to Fig.12 The solid lines in the figure represent the network topology.
[0122] 5. Calculate routing information. During or before the effective time of the first flexible algorithm, in the first network topology corresponding to the first flexible algorithm, perform routing calculation based on the routing constraints of the first flexible algorithm to obtain first routing information; during or before the effective time of the second flexible algorithm, in the second network topology corresponding to the second flexible algorithm, perform routing calculation based on the routing constraints of the second flexible algorithm to obtain second routing information. Optionally, when notification information of link changes in the first network topology is received outside the effective time period of the first flexible algorithm, the notification information is stored until the first flexible algorithm is about to take effect, for example, 5 minutes before the effective time of the first flexible algorithm, the network topology is determined and routing calculation is performed based on the latest notification information of link changes, which can reduce unnecessary routing calculations and updates and dispatches of forwarding table entries.
[0123] 6. Select SID encapsulation and forwarding. Taking the first message as an example, the head node device of the Tide Network that receives the first message encapsulates the SID or IP prefix corresponding to different flexible algorithms in the first message according to the arrival time of the first message to obtain the second message. For example, the SID of algo:128 encapsulated in the first message arriving between (t0-t1) is 10065, and the SID of algo:129 encapsulated in the first message arriving between (t1-t2) is 20065. Furthermore, the intermediate node device that transmits the second message can look up the corresponding forwarding table entry according to the SID in the second message and forward it.
[0124] See also Fig.13 , Taking satellite network and flexible algorithm as an example, since the network topology of satellite network does not have obvious periodic changes, but the network topology of satellite network is predictable. Fig.13 In the 1. Notification of link changes shown in the figure, in a predictable link change scenario, any network device in the satellite network can publish the state changes of the directly connected links in the future period of time to other devices in the satellite network, or can also send the state changes of the network topology in the future period of time to each network device in the satellite network through management. For example, the predicted state change of link 1 in the future period of time is to open at time t0 and close at time t1.
[0125] for Fig.14In the 2 shown, in the definition of flexible algorithms, the first flexible algorithm and the second flexible algorithm can be defined on any network device in the satellite network. The effective time period of the first flexible algorithm corresponds to the current time period (t2-t3), and the effective time period of the second flexible algorithm corresponds to the next time period (t3-t4). t2, t3, and t4 can be flexibly set according to the actual changes in the time-varying network, where t2 can be the same as t0, and t3 can be the same as t1. This achieves packet loss-free forwarding between different time periods and avoids excessive routing table entries. The time period length is set according to the time-varying network scenario. Optionally, in Fig.14 In the scenario shown, the change period T of the effective time of the first flexible algorithm and the second flexible algorithm is the sum of the two time periods. Fig.14 The implementation methods of 3, 4, 5 and 6 are the same as Fig.13 The contents of 3, 4, 5 and 6 are the same and will not be repeated here.
[0126] See also Fig.15 , Fig.15 Another way to define flexible algorithms in satellite network scenarios is to define multiple non-periodic flexible algorithms and update them continuously over time. Fig.15 2. Define the routing algorithm, but do not define the effective time change cycle. Fig.15 1, 3, 4, 5, 6 and Fig.14 The consistency in the above will not be repeated here. Fig.14 The process of 5 and 6 is not shown. Fig.14 , Fig.15 In the case where the expiration time of the first flexible algorithm is reached or is about to be reached, the flexible algorithm for the next time period is redefined based on the process of defining the flexible algorithm in 7, that is, the process of 2-5 needs to be re-executed. Optionally, the flexible algorithm defined in 7 can define a new flexible algorithm ID and a new SID locator or IP prefix, or it can be the same as the flexible algorithm ID and SID locator or IP prefix of the first flexible algorithm after expiration, but the effective time information becomes (t5-t6), and t5 can be the same as t4.
[0127] In summary, the method can obtain the predictable time information of the change of the network connection state or the time information of the change of the periodically changing network connection state in advance, and then can construct multiple network topologies that are valid in different time periods by adding the valid time information in the routing calculation algorithm, so that when the network connection state changes, the network topology valid at that time can be directly used to calculate the route, thereby realizing flexible switching of network topologies in time-varying networks. Alternatively, on the basis of constructing multiple network topologies that are valid in different time periods, multiple routing information of multiple network topologies that are valid in different time periods is further constructed, so that when the network connection state changes, the routing information valid at that time is directly used to forward the message, thereby realizing flexible switching of forwarding paths in time-varying networks.
[0128] The above describes the method for determining the network topology of the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a device for determining the network topology. Fig.15 is a schematic diagram of a network topology determination device provided in an embodiment of the present application, the device is applied to the above Figure 2 Any network device shown. Fig.15 As shown in the following multiple modules, the Fig.15 The network topology determination device shown can perform Figure 3 It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Fig.15 As shown, the device comprises:
[0129] Processing module 1501, for executing Figure 3 Other operations besides the receiving and / or sending related operations performed by the method for determining the network topology shown;
[0130] The transceiver module 1502 is used to execute Figure 3 The method for determining the network topology shown here includes receiving and / or sending related operations.
[0131] In a possible implementation, the transceiver module 1502 includes a receiving module and / or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.
[0132] In a possible implementation, the processing module 1501 is used to determine a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, determine the first network topology used at the effective time of the first routing calculation algorithm, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.
[0133] In a possible implementation, the processing module 1501 is further configured to calculate first routing information of the first network topology based on the first routing calculation algorithm at a second time, where the second time is before the effective time of the first routing calculation algorithm.
[0134] In a possible implementation manner, the validity period of the first routing calculation algorithm corresponds to the validity period of the first network topology.
[0135] In a possible implementation manner, the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.
[0136] In a possible implementation, the first network topology constraint includes a link color constraint, which is used to constrain the colors of links included in the first network topology, different colors are used to distinguish different valid times, and the colors of links included in the first network topology comply with the link color constraint.
[0137] In a possible implementation, the processing module 1501 is further used to determine a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different; based on the second effective time information and the second network topology constraint, determine the second network topology used at the effective time of the second route calculation algorithm, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.
[0138] In a possible implementation manner, the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information.
[0139] In a possible implementation, the first routing calculation algorithm is a flex-algo or a multi-topology algorithm.
[0140] In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive an ISIS link state data unit LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the FAD sub-TLV.
[0141] In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive an OSPF LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
[0142] In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
[0143] In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module 1502 is used to receive an ISIS LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the time-varying MT information sub-TLV.
[0144] In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module 1502 is used to receive an open shortest route first protocol OSPF link state announcement LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying multi-topology MT information TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.
[0145] In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module 1502 is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying multi-topology MT information TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.
[0146] It should be understood that the above Fig.15 When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here. Fig.15 The beneficial effects of the provided device can be found in Figure 3 The beneficial effects of the method shown are not described here in detail.
[0147] See also Fig.16 , Fig.16 A schematic diagram of the structure of a network device 2000 provided by an exemplary embodiment of the present application is shown. Fig.16 The network device 2000 shown is used to perform the above Figure 3 The operations involved in the method for determining the network topology shown in the figure. The network device 2000 is, for example, a switch, a router, etc. The network device 2000 can be implemented by a general bus architecture.
[0148] like Fig.16 As shown, the network device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .
[0149] The processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0150] Optionally, the network device 2000 further includes a bus. The bus is used to transmit information between the components of the network device 2000. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.16 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.
[0151] The memory 2003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 via a bus. The memory 2003 can also be integrated with the processor 2001.
[0152] The communication interface 2004 uses any transceiver type device for communicating with other devices or communication networks, and the communication network can be Ethernet, radio access network (radio access network, RAN) or wireless local area network (wireless local area networks, WLAN) and the like. The communication interface 2004 can include a wired communication interface and can also include a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (Fast Ethernet, FE) interface, a Gigabit Ethernet (Gigabit Ethernet, GE) interface, an Asynchronous Transfer Mode (Asynchronous Transfer Mode, ATM) interface, a wireless local area network (wireless local area networks, WLAN) interface, a cellular network communication interface or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 2004 can be used for the network device 2000 to communicate with other devices.
[0153] In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as Fig.160 and CPU1 shown in FIG. Each of these processors may be a single-core CPU processor or a multi-core CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0154] In a specific implementation, as an embodiment, the network device 2000 may include multiple processors, such as Fig.16 2001 and 2005 are shown in FIG. Each of these processors may be a single-core CPU or a multi-core CPU. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0155] In a specific implementation, as an embodiment, the network device 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 2001 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0156] In some embodiments, the memory 2003 is used to store the program code 2010 for executing the solution of the present application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the method for determining the network topology provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself can also store the program code or instruction for executing the solution of the present application.
[0157] In a specific embodiment, the network device 2000 of the embodiment of the present application may correspond to the first network device in each of the above-mentioned method embodiments, and the processor 2001 in the network device 2000 reads the instruction in the memory 2003, so that Fig.16 The network device 2000 shown is capable of performing Figure 3 All or part of the operations performed by the method shown.
[0158] Specifically, the processor 2001 is used to determine a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, determine the first network topology used at the effective time of the first routing calculation algorithm, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.
[0159] For the sake of brevity, other optional implementations are not described here in detail.
[0160] The network device 2000 may also correspond to the above Fig.15 In the network topology determination device shown, each functional module in the network topology determination device is implemented by software of the network device 2000. In other words, the functional modules included in the network topology determination device are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003.
[0161] in, Figure 3 Each step of the method for determining the network topology shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the network device 2000. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0162] See also Fig.17 , Fig.17 FIG. 2 shows a schematic diagram of the structure of a network device 2100 provided by another exemplary embodiment of the present application. Fig.17 The network device 2100 shown is used to perform the above Figure 3 All or part of the operations involved in the method for determining the network topology shown. The network device 2100 is, for example, a switch, a router, etc. The network device 2100 can be implemented by a general bus architecture.
[0163] like Fig.17 As shown, the network device 2100 includes: a main control board 2110 and an interface board 2130 .
[0164] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 2110 is used to control and manage various components in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processing unit 2111 and a memory 2112.
[0165] The interface board 2130 is also called a line processing unit (LPU), a line card (linecard) or a service board. The interface board 2130 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 2130 includes: a central processing unit 2131, a network processor 2132, a forwarding table entry memory 2134 and a physical interface card (physical interface card, PIC) 2133.
[0166] The central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main control board 2110 .
[0167] The network processor 2132 is used to implement the forwarding processing of the message. The network processor 2132 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 by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward the received message based on the forwarding table stored in the forwarding table entry memory 2134. If the destination address of the message is the address of the network device 2100, the message is sent to the CPU (such as the central processor 2131) for processing; if the destination address of the message is not the address of the network device 2100, the next hop and the output interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address. Among them, the processing of the uplink message may include: processing of the message input interface, forwarding table search; the processing of the downlink message may include: forwarding table search, etc. In some embodiments, the central processor can also perform the function 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.
[0168] The physical interface card 2133 is used to implement the physical layer docking function, whereby the original traffic enters the interface board 2130, and the processed message is sent out from the physical interface card 2133. The physical interface card 2133, also called a daughter card, can be installed on the interface board 2130, and is responsible for converting the photoelectric signal into a message and forwarding the message to the network processor 2132 for processing after checking the legitimacy of the message. In some embodiments, the central processor 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.
[0169] Optionally, the network device 2100 includes multiple interface boards, for example, the network device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation methods of the components in the interface board 2140 are the same or similar to those of the interface board 2130, and are not described in detail here.
[0170] Optionally, the network device 2100 further includes a switching fabric board 2120. The switching fabric board 2120 may also be referred to as a switch fabric unit (SFU). When the network device 2100 has multiple interface boards, the switching fabric board 2120 is used to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 may communicate via the switching fabric board 2120.
[0171] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 and the interface board 2130 and the interface board 2140 communicate through the IPC channel.
[0172] Logically, the network device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the network device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2132 forwards the message received by the physical interface card 2133 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.
[0173] It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, network devices may not need switching network boards, and the interface board is responsible for processing the service data of the entire system. In a distributed forwarding architecture, network devices may have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with distributed architectures are greater than those of network devices with centralized architectures. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of network device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.
[0174] In a specific embodiment, the network device 2100 corresponds to the above Fig.15 In some embodiments, Fig.15 The processing module 1501 in the network topology determination device shown is equivalent to the central processor 2111 or the network processor 2132 in the network device 2100 , and the transceiver module 1502 is equivalent to the physical interface card 2133 in the network device 2100 .
[0175] It should be understood that the processor may be a CPU, or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced reduced instruction set machine (ARM) architecture.
[0176] Further, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0177] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (DR RAM).
[0178] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor so that a computer implements any of the above methods for determining a network topology.
[0179] The embodiments of the present application also provide a computer program (product), which, when executed by a computer, can enable a processor or a computer to execute the corresponding steps and / or processes in the above method embodiments.
[0180] An embodiment of the present application also provides a chip, including a processor, for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes any of the above methods for determining a network topology.
[0181] An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute any of the above methods for determining the network topology.
[0182] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (solid state disk)), etc.
[0183] Those of ordinary skill in the art will appreciate that, in conjunction with the various method steps and modules described in the embodiments disclosed herein, they can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0184] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0185] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or divided between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.
[0186] The computer program code for realizing the method for the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0187] In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like.
[0188] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0189] A machine-readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0190] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0191] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.
[0192] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0193] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0194] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0195] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is the quantity and execution order limited. 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 only used to distinguish one element from another. For example, without departing from the scope of various examples, the first effective time information can be referred to as the second effective time information, and similarly, the second effective time information can be referred to as the first effective time information. Both the first effective time information and the second effective time information can be effective time information, and in some cases, can be separate and different effective time information.
[0196] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean 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 the present application.
[0197] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
[0198] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0199] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0200] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0201] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.
[0202] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0203] It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0204] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for determining a network topology, characterized in that: The method comprises: Determine a first route calculation algorithm according to a first time, the first route calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first route calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first route calculation algorithm, and the first time is before the effective time of the first route calculation algorithm; A first network topology used during the validity period of the first route calculation algorithm is determined based on the first validity period information and the first network topology constraint, wherein the first route calculation algorithm and the first network topology are determined before the validity period of the first route calculation algorithm.
2. The method according to claim 1, characterized in that After determining the first network topology used during the effective time of the first routing calculation algorithm based on the first effective time information and the first network topology constraint, the method further includes: At a second time, first routing information of the first network topology is calculated based on the first routing calculation algorithm, and the second time is before the effective time of the first routing calculation algorithm.
3. The method according to claim 1 or 2, characterized in that: The validity period of the first routing calculation algorithm corresponds to the validity period of the first network topology.
4. The method according to any one of claims 1 to 3, characterized in that: The first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.
5. The method according to any one of claims 1 to 4, characterized in that: The first network topology constraint includes a link color constraint, and the link color constraint is used to constrain the colors of the links included in the first network topology. Different colors are used to distinguish different valid times. The colors of the links included in the first network topology comply with the link color constraint.
6. The method according to claim 1 or 2, characterized in that: The method further comprises: Determine a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, and the effective time of the first route calculation algorithm is different from the effective time of the second route calculation algorithm; A second network topology used at the effective time of the second route calculation algorithm is determined based on the second effective time information and the second network topology constraint, the second route calculation algorithm and the second network topology being determined before the effective time of the second route calculation algorithm.
7. The method according to claim 6, characterized in that The first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information.
8. The method according to any one of claims 1 to 7, characterized in that: The first routing calculation algorithm is a flexible algorithm flex-algo or a multi-topology algorithm.
9. The method according to any one of claims 1 to 8, characterized in that: The first routing calculation algorithm is a flexible algorithm flex-algo; Before determining the first route calculation algorithm according to the first time, the method further includes: An Intermediate System to Intermediate System Protocol ISIS Link State Data Unit LSP message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in the flexible algorithm definition FAD subtype, length, value sub-TLV field of the ISIS LSP message, and the first validity time information is carried in the validity time sub-TLV field of the FAD sub-TLV.
10. The method according to any one of claims 1 to 8, characterized in that: The first route calculation algorithm is a flexible algorithm flex-algo; before determining the first route calculation algorithm according to the first time, the method further includes: An Open Shortest Route First (OSPF) link state advertisement (LSA) message is received for announcing the first route calculation algorithm. The first route calculation algorithm is carried in the flexible algorithm definition type, length, and value FAD TLV field of the OSPF LSA message. The first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
11. The method according to any one of claims 1 to 8, characterized in that: The first routing calculation algorithm is a flexible algorithm flex-algo; Before determining the first route calculation algorithm according to the first time, the method further includes: A Border Gateway Protocol (BGP) update message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in the flexible algorithm definition type, length, and value FAD TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
12. The method according to any one of claims 1 to 8, characterized in that: The first routing calculation algorithm is a multi-topology algorithm; before determining the first routing calculation algorithm according to the first time, the method further includes: An Intermediate System to Intermediate System Protocol ISIS Link State Data Unit LSP message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in the time-varying multi-topology MT information subtype, length, and value sub-TLV fields of the ISIS LSP message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information sub-TLV.
13. The method according to any one of claims 1 to 8, characterized in that: The first routing calculation algorithm is a multi-topology algorithm; before determining the first routing calculation algorithm according to the first time, the method further includes: An Open Shortest Route First protocol OSPF link state advertisement LSA message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in the time-varying multi-topology MT information type, length, and value TLV fields of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.
14. The method according to any one of claims 1 to 8, characterized in that: The first routing calculation algorithm is a multi-topology algorithm; before determining the first routing calculation algorithm according to the first time, the method further includes: A Border Gateway Protocol (BGP) update message for announcing the first routing calculation algorithm is received, wherein the first routing calculation algorithm is carried in the time-varying multi-topology MT information type, length, and value TLV fields of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.
15. A device for determining network topology, characterized in that: The device comprises: A processing module, used to perform other operations other than the operations related to receiving and / or sending in the method for determining the network topology according to any one of claims 1 to 14; A transceiver module, used to perform reception and / or transmission related operations in the method for determining the network topology according to any one of claims 1 to 14.
16. A network device, characterized in that: The network device includes: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor so that the network device implements the method for determining the network topology described in any one of claims 1-14.
17. A computer-readable storage medium, characterized in that: The computer storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor so that the computer implements the method for determining the network topology as described in any one of claims 1-14.
18. A computer program product, characterized in that The computer program product comprises: a computer program code, wherein the computer program code is loaded and executed by a computer so as to enable the computer to implement the method for determining the network topology according to any one of claims 1 to 14.
