CN110971527B - Routing information determination method and device - Google Patents

Routing information determination method and device Download PDF

Info

Publication number
CN110971527B
CN110971527B CN201911212030.8A CN201911212030A CN110971527B CN 110971527 B CN110971527 B CN 110971527B CN 201911212030 A CN201911212030 A CN 201911212030A CN 110971527 B CN110971527 B CN 110971527B
Authority
CN
China
Prior art keywords
source
prefix
destination address
routing
routing information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911212030.8A
Other languages
Chinese (zh)
Other versions
CN110971527A (en
Inventor
林长望
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Semiconductor Technology Co Ltd
Original Assignee
New H3C Semiconductor Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Semiconductor Technology Co Ltd filed Critical New H3C Semiconductor Technology Co Ltd
Priority to CN201911212030.8A priority Critical patent/CN110971527B/en
Publication of CN110971527A publication Critical patent/CN110971527A/en
Application granted granted Critical
Publication of CN110971527B publication Critical patent/CN110971527B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery

Abstract

The invention provides a method and a device for determining routing information, and relates to the technical field of routing calculation. The method comprises the steps of obtaining the same prefix and information of the issuing sources, combining system identifications of a plurality of issuing sources corresponding to the same prefix and a routing attribute value which is generated by each issuing source and contains the prefix to generate node identifications of virtual nodes corresponding to the plurality of issuing sources with the prefix, and calculating routing information of the virtual nodes to reach main and standby next-hop nodes corresponding to a destination address through a preset algorithm, so that the routing information of the main and standby next-hop nodes with the destination address with the prefix can directly inherit the routing information of the virtual nodes to reach the main and standby next-hop nodes corresponding to the destination address, the problems of large calculation amount and overlong calculation time caused by traversal calculation are avoided, and the routing calculation efficiency is effectively improved.

Description

Routing information determination method and device
Technical Field
The present invention relates to the technical field of routing computation, and in particular, to a method and an apparatus for determining routing information.
Background
When network message transmission is performed, routing computation is usually required to obtain a path of a destination to which a message is to arrive. The efficiency of route calculation is improved, and the transmission efficiency of the message can be accelerated to a certain extent, so that the network operation speed is improved.
The prefix can be divided into a single-source prefix and a multi-source prefix according to the number of the publishing sources corresponding to the prefix, and the multi-source prefix is also a prefix generated by a plurality of publishing sources. In the prior art, when performing routing calculation of a multi-source prefix (routing information of a master-slave next-hop node), it is necessary to traverse all distribution sources corresponding to the prefix, calculate, for each distribution source, routing information from the distribution source to the master-slave next-hop node having a destination address of the prefix, and select optimal routing information from the calculated plurality of routing information.
In the prior art, when performing routing calculation, routing information that all the publishing sources corresponding to the prefix reach the active-standby next-hop node corresponding to the destination address having the prefix needs to be calculated and optimized, and the calculation amount is relatively large, and the calculation time is too long, so that the efficiency of routing calculation is low.
Disclosure of Invention
In view of the above deficiencies in the prior art, the present invention provides a method and an apparatus for determining routing information, so as to solve the problems of long routing computation time and low computation efficiency in the prior art.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, the present invention provides a method for determining routing information, including:
receiving a plurality of protocol messages, each protocol message comprising: a prefix and a system identifier, where the system identifier is used to represent a publishing source of each protocol packet, and the protocol packets have the same prefix;
determining a virtual node which represents that a plurality of publishing sources with the same prefix commonly correspond to according to the same prefix and a plurality of system identifications;
and calculating the routing information of the virtual node to reach the main next hop node corresponding to the destination address according to a preset SPF algorithm, wherein the destination address is contained in the network segment indicated by the prefix.
And calculating the routing information of the virtual node to the next hop node corresponding to the destination address according to a preset FRR algorithm.
Optionally, before determining, according to the same prefix and the multiple system identifiers, a virtual node that represents a common correspondence between multiple publishing sources having the same prefix, the method further includes:
searching whether a prefix of each protocol message is recorded in a preset list;
if yes, recording the system identification of each protocol message in the table entry corresponding to the prefix of each protocol message in the preset list.
Optionally, the determining, according to the same prefix and a plurality of system identifiers, a virtual node that represents a common correspondence of a plurality of publishing sources having the same prefix includes:
and combining the routing attribute values with the same prefix and the plurality of system identifications to obtain the node identifications corresponding to the virtual nodes.
Optionally, the method further comprises:
obtaining a first set of routing attribute values and a second set of routing attribute values, the first set of routing attribute values comprising: a route attribute value for each of the plurality of publication sources to reach the destination address, the second set of route attribute values comprising: a router reaching a route attribute value for each of the plurality of publication sources; selecting a target publication source from the plurality of publication sources according to the first set of routing attribute values and the second set of routing attribute values;
the routing information of the virtual node to the main next hop node corresponding to the destination address is as follows: the target issuing source reaches the routing information of the main next hop node corresponding to the destination address;
the routing information of the virtual node to the standby next hop node corresponding to the destination address is as follows: and the target issuing source reaches the routing information of the standby next hop node corresponding to the destination address.
Optionally, the selecting a target publication source from the plurality of publication sources according to the first set of routing attribute values and the second set of routing attribute values includes: finding out a plurality of Cost values belonging to the same issuing source from the first group of routing attribute values and the second group of routing attribute values respectively;
accumulating a plurality of Cost values belonging to the same release source to obtain a total Cost value of the release source;
and selecting the minimum Cost total value from the Cost total values of a plurality of issuing sources, and taking the issuing source corresponding to the minimum Cost total value as the target issuing source. In a second aspect, the present invention further provides a routing information determining apparatus, including: the device comprises a receiving module, a determining module and a calculating module;
the receiving module is configured to receive a plurality of protocol packets, where each protocol packet includes: a prefix and a system identifier, where the system identifier is used to represent a publishing source of each protocol packet, and the protocol packets have the same prefix;
the determining module is configured to determine, according to the same prefix and the multiple system identifiers, a virtual node that represents a common correspondence of the multiple publishing sources having the same prefix;
the calculating module is used for calculating the route information of the virtual node reaching the main next hop node corresponding to the destination address according to a preset SPF algorithm, wherein the destination address is contained in the network segment indicated by the prefix; and calculating the routing information of the virtual node to the next hop node corresponding to the destination address according to a preset FRR algorithm.
Optionally, the apparatus further comprises: the device comprises a searching module and a recording module;
the searching module is used for searching whether the prefix of each protocol message is recorded in a preset list;
and the recording module is used for recording the system identifier of each protocol message in the table entry corresponding to the prefix of each protocol message in the preset list if the prefix of each protocol message in the preset list is positive.
Optionally, the determining module is specifically configured to combine the route attribute value with the same prefix and the plurality of system identifiers to obtain a node identifier corresponding to the virtual node.
Optionally, a selection module is further included;
the selection module is configured to obtain a first set of routing attribute values and the second set of routing attribute values, where the first set of routing attribute values includes:
a route attribute value for each of the plurality of publication sources to reach the destination address, the second set of route attribute values comprising: a router attribute value for the router to reach each of the plurality of publication sources; selecting a target publication source from the plurality of publication sources according to the first set of routing attribute values and the second set of routing attribute values;
the routing information of the virtual node to the main next hop node corresponding to the destination address is as follows: the target issuing source reaches the routing information of the main next hop node corresponding to the destination address;
the routing information of the virtual node to the standby next hop node corresponding to the destination address is as follows: and the target issuing source reaches the routing information of the standby next hop node corresponding to the destination address.
Optionally, the routing attribute value includes: a Cost value; the selecting module is specifically configured to find out, from the first group of route attribute values and the second group of route attribute values, multiple Cost values belonging to the same publishing source;
accumulating a plurality of Cost values belonging to the same release source to obtain a total Cost value of the release source;
and selecting the minimum Cost total value from the Cost total values of a plurality of issuing sources, and taking the issuing source corresponding to the minimum Cost total value as the target issuing source. In a third aspect, the present invention further provides a device for determining routing information, including: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when the routing information determination device runs, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to execute the steps of the routing information determination method according to the first aspect.
In a fourth aspect, the present invention further provides a storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the routing information determining method according to the first aspect.
Therefore, by applying the method and the device for determining the routing information provided by the invention, the method comprises the following steps: receiving a plurality of protocol messages, each protocol message comprising: the system identification is used for representing the issuing source of each protocol message, and a plurality of protocol messages have the same prefix; determining a virtual node which represents that a plurality of publishing sources with the same prefix commonly correspond to according to the same prefix and a plurality of system identifications; calculating routing information of a virtual node to reach a main next hop node corresponding to a destination address according to a preset SPF algorithm, wherein the destination address is contained in a network segment indicated by the prefix; and calculating the routing information of the standby next hop node corresponding to the virtual node reaching the destination address according to a preset FRR algorithm.
The method comprises the steps of obtaining the same prefix and information of the issuing sources, combining system identifications of a plurality of issuing sources corresponding to the same prefix and a route attribute value which is generated by each issuing source and contains the prefix to generate node identifications of virtual nodes corresponding to the plurality of issuing sources with the prefix, and calculating route information of the virtual nodes reaching main and standby next-hop nodes corresponding to a destination address through a preset algorithm, so that the route information of the main and standby next-hop nodes reaching the destination address with the prefix can directly inherit the route information of the virtual nodes reaching the main and standby next-hop nodes corresponding to the destination address, the problems of large calculation amount and overlong calculation time caused by traversal calculation are avoided, and the route calculation efficiency is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a general block diagram of a routing information determining method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for determining routing information according to an embodiment of the present invention;
fig. 3 is a schematic overall flow chart of a multi-source virtual node generation method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another method for determining routing information according to an embodiment of the present invention;
fig. 5 is a schematic overall flow chart of a method for calculating routing information of a main-standby next-hop node corresponding to a multi-source virtual node reaching a destination address according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a method for determining routing information according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a routing information determining apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another routing information determining apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of another routing information determining apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a routing information determining device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
To facilitate understanding of the aspects of the embodiments of the present invention, prior to describing the aspects of the embodiments of the present invention, the following explanation of technical terms related to the embodiments of the present invention may be made.
IS-IS: the IS-IS belongs to IGP (Interior Gateway Protocol) and IS used in an autonomous system. The IS-IS a link state protocol, and performs route calculation using an SPF (Shortest Path First) algorithm.
OSPF: OSPF belongs to IGP (Interior Gateway Protocol) and is used to decide a route within a single Autonomous System (AS). OSPF is a link-state routing protocol.
FRR: FRR (Fast Reroute) uses a link state database to calculate a backup path in advance, and stores the backup path in an FIB (optimal routing entry in a routing table) table, and when a failure occurs in a primary path, a Fast switchover to the backup path is possible, thereby reducing the time required for routing convergence.
Single source: the index of a prefix IS the system ID (system identification) of IS-IS, and the prefix belongs to only one publishing source, namely one device. The main next hop of the publishing source is calculated by SPF, and the standby next hop of the publishing source is calculated by FRR: such as LFA (Loop-free Alternate), TI-LFA (Topology-Independent Loop-free Alternate), R-LFA (Remote Loop-free Alternate) calculation. When the issuing source of the prefix is a single source, both the main next hop of the prefix and the FRR backup next hop inherit from the issuing source.
Multi-source: the prefix issuing source is multiple, that is, one prefix is generated by multiple issuing sources at the same time. When the main next hop of the issuing source is calculated, all issuing sources need to be traversed to carry out optimization, the optimal next hop is calculated, then the calculation of the backup next hop is carried out, and all issuing sources also need to be traversed to run an FRR algorithm to carry out the optimal backup next hop calculation.
It should be noted that, in the embodiment of the present invention, a message transmission protocol adopted inside the router IS-IS, the router may receive the message information sent from the previous-stage router through the IS-IS protocol, and similarly, the router may transmit the message information to the next-stage router through the IS-IS protocol. Optionally, the routing information determining method provided by the embodiment of the present invention is also applicable to the OSPF protocol.
Fig. 1 is a general block diagram of a routing information determining method according to an embodiment of the present invention; as shown in fig. 1, the general block diagram of the routing information determining method may include: the LSP message, the prefix, the multi-source virtual node, and the next hop information, where the LSP message and the prefix both include a plurality of, for example, the LSP message may include: LSP message 1, LSP message 2, LSP message 3, the prefix may include: prefix 1, prefix 2, prefix 3. Different LSP messages are analyzed, and different prefixes or the same prefix can be obtained.
The multi-source virtual node may be composed of a plurality of single publishing sources, and the next hop information is routing information of a next hop corresponding to the multi-source virtual node, which includes a main next hop and a standby next hop. The neighbor router may receive the LSP packet and parse the packet to obtain a prefix and a system identifier included in the packet, where the system identifier is used to indicate a publishing source of the received packet. For a prefix having multiple distribution sources, for example, prefix 1 in fig. 1, where prefix 1 corresponds to multiple distribution sources, each distribution source generates a route attribute value containing prefix 1, in order to facilitate calculation of a route, a system identifier corresponding to prefix 1 and representing multiple distribution sources may be combined with the route attribute values containing prefix 1 generated by each distribution source, so as to generate a node identifier of a virtual node corresponding to multiple distribution sources having the same prefix.
It can be understood that the virtual nodes may be the virtual nodes corresponding to the publishing source a, the publishing source B, and the publishing source C, that is, the publishing sources having the same prefix 1 correspond to each other; alternatively, it can be understood that the virtual node is a virtual set of multiple publishing sources with the same prefix 1, and the publishing source a, the publishing source B, and the publishing source C are included in the virtual set.
When the routing information of the main and standby next hop nodes corresponding to a certain destination address is calculated by the multi-source virtual node, all the publishing sources in the multi-source virtual node are not required to be traversed, a target publishing source can be selected from the multi-source virtual node, and the routing information of the main and standby next hop nodes corresponding to the target publishing source reaching the certain destination address is used as the routing information of the main and standby next hop nodes corresponding to the certain destination address reached by the multi-source virtual node, so that the routing calculation time is shortened to a certain extent. In the embodiment of the invention, a certain destination address is contained in the network segment indicated by the same prefix.
Fig. 2 is a schematic flowchart of a method for determining routing information according to an embodiment of the present invention; the execution subject of the method may be a router. As shown in fig. 2, the method may include:
s101, receiving a plurality of protocol messages, wherein each protocol message comprises: the system identifier is used for representing the issuing source of each protocol message, and a plurality of protocol messages have the same prefix.
In the embodiment of the present invention, the publishing source may also be understood as a router that performs message transmission, and a message may be transmitted between multiple publishing sources, so that the message is transmitted from a source network device to a destination network device. The router obtains the prefix and the system identification by receiving and analyzing the protocol message.
It can be understood that the protocol packet received by the router includes a route to the destination address generated by the publishing source, and the route also includes a route attribute value to the destination address of the publishing source sending the protocol packet. The router determines the prefix to which the destination address belongs according to the destination address.
The system mark is used to represent the publishing source of each message, and the prefix is generated by the publishing source. The prefix may be understood as a prefix of the destination IP address. The embodiment of the invention explains how to determine the routing information aiming at the multi-source prefix (one prefix corresponds to a plurality of issuing sources), so that a plurality of received protocol messages have the same prefix.
Optionally, in this embodiment of the present invention, the received protocol packet may include: LSP messages (Link State PDUs), LSA messages (Link-State advertisements), etc. The following embodiments of the present invention take LSP packets as an example for explanation.
S102, according to the same prefix and the system identifications, determining a virtual node which represents the common correspondence of the issuing sources with the same prefix.
Optionally, for a multi-source prefix, a prefix generally corresponds to multiple publishing sources, that is, there are multiple different publishing sources that all generate routes to reach an IP address with the same prefix, and in order to facilitate calculation of the routes, the multiple publishing sources corresponding to the multi-source prefix may be taken as a whole to save route calculation time.
For example: the distribution source 1 generates a route to the IP address (1.1.1.1), the distribution source 2 generates a route to the IP address (1.1.1.2), and the distribution source 3 generates a route to the IP address (1.1.1.3). The prefixes of the IP addresses corresponding to the 3 distribution sources are all 1.1.1, and thus, the prefix 1.1.1 can be considered as a multi-source prefix, and corresponds to a plurality of distribution sources, including: publication source 1, publication source 2, and publication source 3.
In this way, the system identifier for indicating the distribution source 1, the system identifier for indicating the distribution source 2, the system identifier for indicating the distribution source 3, and the route attribute value containing the prefix 1 generated by each distribution source can be combined to generate the node identifier of the virtual node corresponding to the plurality of distribution sources having the same prefix.
Optionally, the number of the publishing sources included in the virtual node is not limited to the above 3, and all publishing sources whose prefixes satisfy 1.1.1 may be merged into the virtual node.
S103, according to a preset SPF algorithm, routing information of the virtual node to reach a main next hop node corresponding to a destination address is calculated, and the destination address is contained in a network segment indicated by the prefix.
And S104, calculating the routing information of the standby next hop node corresponding to the virtual node reaching the destination address according to a preset FRR algorithm.
It should be noted that the destination address is all IP addresses in the network segment indicated by the same prefix. For example: IP address: (1.1.1.1), (1.1.1.2), (1.1.1.3) … … (1.1.1.225), etc.
In some embodiments, for a multi-source prefix, when calculating routing information to a main and standby next hop node corresponding to a destination address having the prefix, in order to improve calculation efficiency, the routing information to the main and standby next hop node having the destination address of the prefix may inherit the routing information from a virtual node corresponding to a plurality of publishing sources of the prefix to the main and standby next hop node having the destination address, that is, the routing information from the virtual node to the main and standby next hop node having the destination address is obtained by calculation, and thus, the routing information to the main and standby next hop node having the destination address of the prefix may directly inherit the routing information from the main and standby next hop node having the virtual node.
Assuming that there are 3 publishing sources with prefixes 1.1.1, generating a virtual node corresponding to a plurality of publishing sources with prefixes 1.1.1 together according to the step S102, and calculating to obtain routing information of a virtual node to reach a master-slave next-hop node corresponding to a destination address (1.1.1.1), then the routing information to reach the master-slave next-hop node corresponding to the destination address with prefixes 1.1.1 can be considered as a, that is, only the routing information of the virtual node to reach the master-slave next-hop node of the destination address corresponding to the plurality of publishing sources together with the prefixes needs to be calculated, and the routing information of all the master-slave next-hop nodes of the virtual nodes to reach the destination address with the publishing sources together does not need to be calculated, so that the routing calculation amount is reduced to a great extent, the calculation time is shortened, and the calculation efficiency is improved.
It should be noted that, in the embodiment of the present invention, the traditional route calculation method is adopted to calculate the route information of the active/standby next hop node corresponding to the virtual node reaching the destination address, and optionally, the route information of the active/standby next hop node corresponding to the virtual node reaching the destination address may be calculated by adopting an SPF algorithm; the routing information of the node of the next hop corresponding to the virtual node reaching the destination address can be calculated by an FRR algorithm (such as LFA, TI-LFA, R-LFA). Optionally, the specific calculation process of the SPF algorithm and the FRR algorithm is an existing method, and is not described in detail here.
To sum up, the method for determining routing information according to the embodiment of the present invention combines the system identifiers of the multiple distribution sources corresponding to the same prefix and the routing attribute value generated by each distribution source and including the prefix by obtaining the same prefix and the distribution source information to generate the node identifiers of the virtual nodes corresponding to the multiple distribution sources having the prefix, and calculates the routing information of the virtual nodes reaching the active/standby next-hop nodes corresponding to the destination address through a preset algorithm, so that the routing information of the active/standby next-hop nodes reaching the destination address having the prefix can directly inherit the routing information of the virtual nodes reaching the active/standby next-hop nodes corresponding to the destination address, thereby avoiding the problems of large calculation amount and excessively long calculation time caused by traversal calculation, and effectively improving the routing calculation efficiency.
Fig. 3 is a schematic overall flow diagram of a multi-source virtual node generation method provided in an embodiment of the present invention, and as shown in fig. 3, the method may include:
s1001, receiving an LSP message;
s1002, extracting prefixes and publishing source information;
s1003, searching whether the preset list contains the prefix or not;
s1004, if the preset list contains prefixes, judging whether the publishing source information is recorded;
s1005, if the distribution source information is recorded, ending the processing;
s1006, if the publishing source information is not recorded, recording the publishing source information, and associating the publishing source with the same prefix in the preset list;
s1007, if the prefix is not contained in the preset list, adding the prefix into the preset list;
s1008, traversing all the publishing sources of the prefix, and combining all the prefix attributes and the system identification of the publishing sources of the prefix to be used as the node identification of the virtual node corresponding to the prefix.
Alternatively, for the specific explanation of fig. 3, the following corresponding description may be referred to for understanding.
Fig. 4 is a flowchart of another method for determining routing information according to an embodiment of the present invention, and optionally, as shown in fig. 4, before determining, according to the same prefix and multiple system identifiers, a virtual node that represents a common correspondence between multiple distribution sources having the same prefix in step S102, the method may further include:
s201, searching whether a preset list records the prefix of each protocol message.
And S202, if so, recording the system identifier of each protocol message in a table entry corresponding to the prefix of each protocol message in a preset list.
Optionally, different prefixes extracted from all currently received protocol packets may be stored in the preset list, where a plurality of publishing sources corresponding to each different prefix may collectively correspond to a virtual node.
In the embodiment of the invention, after receiving the LSP message, the router analyzes the LSP message to obtain the prefix, whether the prefix exists can be searched in the preset list, if the prefix does not exist, the prefix can be added into the preset list, and meanwhile, the issuing source for sending the protocol message is recorded.
For example: prefixes contained in the preset list include: 1.1.1, 2.2.2, 3.3.3, and the analyzed prefix is 1.1.2, the publishing source is a publishing source a, the prefix 1.1.2 appears for the first time and does not exist in the preset list, the prefix may be added to the preset list to record the publishing source a, and when the prefix 1.1.2 appears again later, if the received prefix is 1.1.2 and the publishing source is a publishing source B, the publishing source B may be recorded and associated with the prefix 1.1.2, that is, the prefix 1.1.2 corresponds to both the publishing source a and the publishing source B, and the publishing source a and the publishing source B are a plurality of publishing sources corresponding to the prefix 1.1.2.
Optionally, if the analyzed prefix already exists in the preset list, for example, the analyzed prefix is 1.1.1, and the publishing source is the publishing source C, the publishing source C may be recorded and directly associated with other publishing sources associated with the existing prefix 1.1.1, so as to determine all publishing sources corresponding to the prefix 1.1.1.
It should be noted that the analyzed prefix already exists in the preset list, and when performing distribution source recording, it is also necessary to determine whether the distribution source has been recorded, and if so, the recording is not repeated, and if not, the recording is performed and is associated with the prefix. For example: if the prefix 1.1.1 already exists in the preset list and the associated publishing source already includes the publishing source C, then when the prefix 1.1.1 is analyzed again, the analyzed publishing source is also the publishing source C, and then the publishing source C does not need to be repeatedly recorded.
By the method, each prefix can be accurately associated with the corresponding multiple publishing sources, so that the multiple publishing sources corresponding to any prefix can be conveniently determined according to the association relationship, and the virtual node corresponding to the multiple publishing sources is conveniently generated.
Optionally, in step S102, determining, according to the same prefix and a plurality of system identifiers, a virtual node that represents a common correspondence between a plurality of publishing sources having the same prefix, may include: and combining the routing attribute values with the same prefix and the plurality of system identifications to obtain the node identifications corresponding to the virtual nodes. Optionally, as listed above, the publishing source 1 generates a route to the IP address (1.1.1.1), the publishing source 2 generates a route to the IP address (1.1.1.2), and the publishing source 3 generates a route to the IP address (1.1.1.3), wherein prefixes of the IP addresses 1.1.1.1, 1.1.1.2, 1.1.1.3 are all 1.1.1, i.e. prefixes are the same, so that the prefix 1.1.1 can be considered as a multi-source prefix, corresponding to a plurality of publishing sources, including: publication source 1, publication source 2, and publication source 3.
It should be noted that the route attribute value of the same prefix, that is, the route attribute value generated by each of the multiple publishing sources that generate the same prefix, is also included in the present invention. In some embodiments, the route attribute values generated by each publication source may include: cost value, tag value, etc. When the node identifiers of the virtual nodes are obtained according to the combination of the routing attribute values of the same prefix and the multiple system identifiers, all the routing attribute values of the same prefix and the system identifiers may be randomly combined or sequentially combined to obtain the node identifiers of the virtual nodes corresponding to the multiple issuing sources having the prefix.
Optionally, in this embodiment of the present invention, the route attribute value may default to: cost value. It can be assumed that: the cost value of the publishing source 1 to reach the IP address with prefix 1.1.1 (1.1.1.1) is 0, the cost value of the publishing source 2 to reach the IP address with prefix 1.1.1 (1.1.1.1) is 10, and the cost value of the publishing source 3 to reach the IP address with prefix 1.1.1 (1.1.1.1) is 20. Of course, in practical applications, the routing attribute value is not limited to the cost value.
The system id, i.e. the system id of IS-IS, assumes that the system id indicating the publishing source 1 IS a, the system id indicating the publishing source 2 IS B, and the system id indicating the publishing source 3 IS C.
In this way, generating the node identifier corresponding to the virtual node by combining the system identifier indicating each publishing source and the cost value of each publishing source reaching the IP address (1.1.1.1) having the prefix may include: the release source a cost is 0, the release source B cost is 10, and the release source C cost is 20.
However, in the embodiment of the present invention, the obtained route attribute value includes a cost value and a tag value, and the generated node identifier of the virtual node may include: the release source a cost is 0tag1, the release source B cost is 10tag2, and the release source Ccost is 20tag 3.
It should be noted that, the combination manner of the route attribute value and the system identifier in the node identifiers of the virtual nodes listed above is only an example, the specific combination manner of the route attribute value and the system identifier is random and not fixed, the above description continues with the multiple distribution sources and the route attribute values as an example, and the node identifiers corresponding to the generated virtual nodes may also be: the cost 0 publication source A, cost 10 publication source B, cost 20 publication source C.
Fig. 5 is a schematic overall flow chart of a method for calculating routing information of a main-standby next-hop node corresponding to a multi-source virtual node reaching a destination address according to an embodiment of the present invention, as shown in fig. 5, the method may include:
s2001, calculating routing information of the virtual node to a main-standby next hop corresponding to a destination address;
s2002, traversing all the publishing sources in the virtual node, and calculating the sum of the routing attribute value of the publishing source reaching the destination address and the routing attribute value of the publishing source reaching the virtual node by the router, which belong to the same publishing source;
s2003, determining a publishing source with the minimum sum as a target publishing source from the virtual nodes, and forming an equivalent publishing source if the publishing sources with the same cost value exist;
s2004, calculating the routing information of the target release source to the main next hop node corresponding to the destination address according to a preset algorithm, taking the routing information of the target release source to the main next hop node corresponding to the destination address as the routing information of the virtual node to the main next hop node corresponding to the destination address, and recording the routing information to the virtual node;
s2005, calculating routing information of the virtual node to a standby next hop node corresponding to the destination address;
s2006, calculating routing information of the virtual node to a standby next hop node corresponding to the destination address according to different configured algorithms of the FRR;
s2007, LFA algorithm, calculating loop-free next hop;
s2008, TI-LFA, P and Q nodes are selected preferably;
s2009 and R-LFA, and overlapping P and Q nodes are selected preferably;
s2010, calculating routing information of a standby next hop node corresponding to the virtual node reaching destination address;
s2011 records the routing information of the standby next hop node corresponding to the virtual node reaching the destination address.
Optionally, before the routing information of the standby next hop node corresponding to the destination address is calculated by using the routing information determining method provided in the embodiment of the present invention, whether the prefix is a single-source prefix or a multi-source prefix may be determined according to prefixes and system identification information included in the received multiple messages, and if the prefix is a multi-source prefix, the routing information of the standby next hop node corresponding to the destination address to which the virtual node reaches is calculated by using the method in steps S2001-S2011. For the calculation of the routing information of the single-source prefix and the primary/standby next-hop node corresponding to the destination address having the prefix, the embodiment of the present invention is not specifically described.
Alternatively, for the specific explanation of fig. 5, the following corresponding description may be referred to for understanding.
Optionally, the method for determining routing information provided in the embodiment of the present invention is mainly described in the context of calculating routing information to reach a primary and standby next-hop node corresponding to a destination address having a multi-source prefix, and the calculation of a single-source prefix is similar to that in the prior art and will not be described in detail here.
Optionally, the method for determining routing information provided in the embodiment of the present invention may further include: obtaining a first set of route attribute values and a second set of route attribute values, the first set of route attribute values comprising: a second set of route attribute values for each of the plurality of publication sources to reach the destination address, the second set of route attribute values comprising: the router reaches the route attribute value of each of the plurality of publication sources. And selecting a target publishing source from the plurality of publishing sources according to the first set of routing attribute values and the second set of routing attribute values.
Then, the routing information of the virtual node to the main next-hop node corresponding to the destination address is: the target issuing source reaches the routing information of the main next hop node corresponding to the destination address; the routing information of the virtual node to the next-hop-standby node corresponding to the destination address is as follows: and the target issuing source reaches the routing information of the standby next hop node corresponding to the destination address.
It should be noted that, the route attribute value: the cost value refers to the link cost to reach the destination address pointed by a certain route. Generally, paths to any destination address may include multiple paths, some paths are relatively short, some paths are relatively long, the short path is generally used as an optimal path, and the transmission efficiency is relatively high when message transmission is performed through the short path. Optionally, the smaller the cost value is, that is, the lower the cost of a link to a destination address indicated by a certain route is, correspondingly, the path indicated by the publishing source corresponding to the smallest cost is also relatively shorter.
Optionally, in this embodiment of the present invention, selecting a target publishing source from a plurality of publishing sources according to the first set of routing attribute values and the second set of routing attribute values may include:
respectively finding out a plurality of cost values belonging to the same issuing source from the first group of routing attribute values and the second group of routing attribute values; accumulating a plurality of cost values belonging to the same release source to obtain a total cost value of the release source;
and selecting the minimum cost total value from the cost total values of the plurality of release sources, and taking the release source corresponding to the minimum cost total value as a target release source. It should be noted that, for any packet, in the process of transmitting from the source network device to the destination network device, the packet may be mutually transmitted to the destination address through the multiple distribution sources, that is, before the packet is transmitted to the distribution source included in the virtual node, the packet may be transmitted from the distribution source a to the distribution source B, then from the distribution source B to the distribution source C, and then from the distribution source C to the distribution source D included in the virtual node.
Thus, when packet 1 is transmitted from the distribution source a to the distribution source B, the corresponding route attribute value: the cost value is 20, the corresponding cost value of the message 1 is 30 when the message 1 is transmitted from the publishing source B to the publishing source C, the corresponding cost value of the message 1 is 10 when the message 1 is transmitted from the publishing source C to the publishing source D, and the cost value of the message 1 when the message 1 is transmitted from the publishing source D to the destination network device corresponding to the destination address is 10.
As can be seen, the first set of routing attribute values belonging to the distribution source D in the virtual node is 10. If the second group of route attribute values belonging to the distribution source D is 20+30+10, which is 60, the cost values (the first group of route attribute values and the second group of route attribute values) belonging to the distribution source D in the virtual nodes are accumulated, and the total cost value of the distribution source D is 70.
Assume that message 2, when transmitted from publishing source a1 to publishing source B1, has the corresponding route attribute value: the cost value is 10, when the message 2 is transmitted from the publishing source B1 to the publishing source C1, the corresponding cost value is 10, when the message 2 is transmitted from the publishing source C1 to the publishing source D1 included in the virtual node, the corresponding cost value is 10, and when the message 1 is transmitted from the publishing source D1 to the destination network device corresponding to the destination address, the cost value is 30.
As can be seen, the first set of route attribute values belonging to the distribution source D1 in the virtual node is 30. If the second group of route attribute values belonging to the distribution source D1 is 10+10+10 equal to 30, the cost values (the first group of route attribute values and the second group of route attribute values) belonging to the distribution source D1 in the virtual node are accumulated, and the total cost value of the distribution source D1 is 60. That is, in the virtual node, the total cost value of the publishing source D1 is the smallest. Then publication source D1 in the virtual node may be determined to be the target publication source.
Optionally, after the target publishing source corresponding to the virtual node is determined, the route information of the virtual node to reach the main next-hop node corresponding to the destination address is as follows: the target issuing source reaches the routing information of the main next hop node corresponding to the destination address; the routing information of the node corresponding to the virtual node to reach the destination address and having the next hop may be: and the target issuing source reaches the routing information of the standby next hop node corresponding to the destination address.
That is, by calculating the determined routing information of the target distribution source to the main and standby next hop nodes corresponding to the destination address, it can be determined that the virtual node corresponding to the multiple distribution sources with the prefix collectively reaches the routing information of the main and standby next hop nodes corresponding to the destination address, so that the routing information of the main and standby next hop nodes reaching the destination address with the prefix can inherit the routing information of the virtual node to the main and standby next hop nodes corresponding to the destination address.
In some embodiments, in the virtual node, the total cost values corresponding to the publishing source D and the publishing source D1 are the same, that is, the publishing source D and the publishing source D1 form an equivalent route, so that it may be determined that the target publishing sources are the publishing source D and the publishing source D1.
It should be noted that, in the prior art, when calculating the routing information of the primary and secondary next hop nodes reaching the destination address with the prefix 1.1.1, routing information of each distribution source corresponding to the prefix to the primary and secondary next hop nodes corresponding to the destination address is calculated, and then the routing information of the primary and secondary next hop nodes reaching the destination address with the prefix 1.1.1 is determined by screening the calculated routing information of the distribution source a, the distribution source B, and the distribution source C to the primary and secondary next hop nodes corresponding to the destination address.
In the embodiment of the present invention, it is only necessary to calculate the route information of the main and standby next hop nodes corresponding to the target address reached by the determined target publishing source, for example, when the determined target publishing source is the publishing source a, it is only necessary to calculate the route information of the main and standby next hop nodes corresponding to the target address reached by the publishing source a, and use the route information of the main and standby next hop nodes as the route information of the virtual node reaching the main and standby next hop nodes corresponding to the target address, so that the route information of the main and standby next hop nodes reaching the target address with the prefix 1.1.1 directly inherits the route information of the virtual node reaching the main and standby next hop nodes corresponding to the target address with the prefix 1.1.1.1, that is, it is assumed that the calculated route information of the main and standby next hop nodes reaching the target address (1.1.1.1.1) by the publishing source is x, and the route information of the standby next hop nodes is y, then, the route information of the main next-hop node corresponding to the virtual node arrival destination address (1.1.1.1) is x, and the route information of the standby next-hop node is y. Thus, it can be determined that the route information to the main next hop node having the destination address of prefix 1.1.1 (1.1.1.1) is x, and the route information of the standby next hop node is y.
When the determined target publishing source is the publishing source a and the publishing source B, the routing information that the publishing source a and the publishing source B respectively reach the main and standby next hop nodes corresponding to the destination address (1.1.1.1) may be calculated, the routing information that the virtual node reaches the main and standby next hop nodes corresponding to the destination address (1.1.1.1) may simultaneously include the routing information that the publishing source a reaches the main and standby next hop nodes corresponding to the destination address (1.1.1.1) and the routing information that the publishing source B reaches the main and standby next hop nodes corresponding to the destination address (1.1.1.1.1), and similarly, it may be determined that the routing information that the main and standby next hop nodes reach the destination address (1.1.1.1.1) with the prefix 1.1.1 is directly inherited from the routing information that the virtual node reaches the main and standby next hop nodes corresponding to the destination address (1.1.1.1.1).
For the case of equivalent routing, the routing information of the active/standby next-hop node reaching the destination address with the prefix may include multiple pieces, and the router may perform packet transmission by using different paths through the routing information of the different next-hop nodes. Compared with the prior art, the routing information determining method provided by the embodiment of the invention can obviously reduce the complexity of routing calculation and improve the efficiency of routing calculation.
In some embodiments, the arrival of the target publishing source at the active/standby next-hop node corresponding to the destination address may be calculated by a preset algorithm. The specific calculation process may adopt a route calculation method in the prior art, and details are not described in the embodiment of the present invention.
Fig. 6 IS a schematic diagram of a routing information determining method according to an embodiment of the present invention, and as shown in fig. 6, an IS-IS neighbor IS respectively established by a distribution source 1, a distribution source 2, a distribution source 3, and a distribution source 4, where identification systems corresponding to the distribution sources are: 11.0000.0000.0001.00, 11.0000.0000.0002.00, 11.0000.0000.0003.00, 11.0000.0000.0004.00.
The cost values of the release source 1 reaching the release source 2, the release source 3 and the release source 4 are 10 (that is, the second group of routing attribute values corresponding to the release source 2 is 10, the second group of routing attribute values corresponding to the release source 3 is 10, and the second group of routing attribute values corresponding to the release source 4 is 10); the cost value of the release source 2 to reach the IP address (1.1.1.1, 1.1.1.2 …, 1.1.1.255) is 0 (i.e. the first set of routing attribute values corresponding to the release source 2 is 0); the cost of the publishing source 3 to reach the IP address (1.1.1.1, 1.1.1.2, …, 1.1.1.255) is 10 (i.e. the first set of routing attribute values corresponding to the publishing source 3 is 10); the cost of the publishing source 4 to reach the IP address (1.1.1.1, 1.1.1.2, …, 1.1.1.255) is 20 (i.e. the first set of routing attribute values corresponding to the publishing source 4 is 20).
The following illustrates a process of calculating routing information of a primary/standby next-hop node reaching a destination address (1.1.1.1) by using the routing information determining method provided in the embodiment of the present invention.
The publishing source 1 receives the protocol messages sent by the publishing source 2, the publishing source 3 and the publishing source 4 respectively, and obtains the system identifier and the prefix contained in the protocol message corresponding to each publishing source. The protocol messages sent by the release source 2, the release source 3, and the release source 4 all include routes with destination addresses of 1.1.1.1, the routes also include route attribute values (for example, a cost value, a tag value, and the like) when each release source reaches the destination address of 1.1.1.1, the release source 1 determines that prefixes released by the 3 release sources are all 1.1.1 according to the destination address 1.1.1, and the release source 1 determines that the prefix 1.1.1 is a multi-source prefix and corresponds to the 3 release sources.
The protocol messages sent by the publishing source 2, the publishing source 3, and the publishing source 4 further include a system identifier indicating each publishing source, for example: the system identification of publication source 2 is 11.0000.0000.0002.00, the system identification of publication source 3 is 11.0000.0000.0003.00, and the system identification of publication source 4 is 11.0000.0000.0004.00.
Then, the publishing source 1 determines the virtual nodes corresponding to the publishing source 2, the publishing source 3 and the publishing source 4. The publishing source 1 may obtain the node identifier of the virtual node by combining the system identifiers indicating the publishing source 2, the publishing source 3, and the publishing source 4 and the route attribute value containing the prefix 1.1.1 generated by each publishing source.
Since the cost value of the publishing source 1 to the publishing source 2 is 10 (i.e., the second set of routing attribute values of the publishing source 2 is 10), the cost value of the publishing source 2 to the IP address (1.1.1.1) is 0 (i.e., the first set of routing attribute values of the publishing source 2 is 0); the cost value of the publishing source 1 to the publishing source 3 is 10 (i.e. the second set of routing attribute values of the publishing source 3 is 10), and the cost value of the publishing source 3 to the IP address (1.1.1.1) is 10 (i.e. the first set of routing attribute values of the publishing source 3 is 10); the cost value from the publishing source 1 to the publishing source 4 is 10 (i.e., the second set of routing attribute values for the publishing source 4 is 10), and the cost value from the publishing source 4 to the IP address (1.1.1.1) is 20 (i.e., the first set of routing attribute values for the publishing source 4 is 20).
The total cost value of the distribution source 2 is 10 through the accumulation processing of the first group of routing attribute values and the second group of routing attribute values belonging to the distribution source 2, the total cost value of the distribution source 3 is 20 through the accumulation processing of the first group of routing attribute values and the second group of routing attribute values belonging to the distribution source 3, and the total cost value of the distribution source 4 is 30 through the accumulation processing of the first group of routing attribute values and the second group of routing attribute values belonging to the distribution source 4. That is, the total cost value of the publishing source 2 in the virtual node is the minimum, so the publishing source 2 can be selected as the target publishing source.
Optionally, the publishing source 1 calculates the routing information of the target publishing source to reach the next-hop node corresponding to the destination address (1.1.1.1), as the routing information of the virtual node to reach the next-hop node corresponding to the destination address (1.1.1.1). For the calculation of the routing information of the next hop node corresponding to the target distribution source reaching the destination address (1.1.1.1), a preset routing algorithm can be adopted for calculation. That is, according to a preset SPF algorithm, the routing information of the main next hop node corresponding to the target distribution source reaching destination address (1.1.1.1) is calculated, and according to a preset FRR algorithm, the routing information of the backup main next hop node corresponding to the target distribution source reaching destination address (1.1.1.1) is calculated. Similarly, the foregoing calculation process may be repeated for the calculation of the routing information for the virtual node to reach the next-hop node corresponding to the other destination address in the network segment, for example, (1.1.1.2 … ….1.1.255). The destination address such as (1.1.1.2 … ….1.1.255) and the destination address such as (1.1.1.1) can share the virtual node, inherit the routing information of the virtual node to reach the main and standby next-hop nodes of the destination address, thereby effectively improving the calculation efficiency of the route.
To sum up, an embodiment of the present invention provides a method for determining routing information, including: receiving a plurality of protocol messages, each protocol message comprising: the system identification is used for representing the issuing source of each protocol message, and a plurality of protocol messages have the same prefix; determining a virtual node which represents that a plurality of publishing sources with the same prefix commonly correspond to according to the same prefix and a plurality of system identifications; calculating routing information of a virtual node to reach a main next hop node corresponding to a destination address according to a preset SPF algorithm, wherein the destination address is contained in a network segment indicated by the prefix; and calculating the routing information of the standby next hop node corresponding to the virtual node reaching the destination address according to a preset FRR algorithm.
The method comprises the steps of obtaining the same prefix and information of the issuing sources, combining system identifications of a plurality of issuing sources corresponding to the same prefix and a route attribute value which is generated by each issuing source and contains the prefix to generate node identifications of virtual nodes corresponding to the plurality of issuing sources with the prefix, and calculating route information of the virtual nodes reaching main and standby next-hop nodes corresponding to a destination address through a preset algorithm, so that the route information of the main and standby next-hop nodes reaching the destination address with the prefix can directly inherit the route information of the virtual nodes reaching the main and standby next-hop nodes corresponding to the destination address, the problems of large calculation amount and overlong calculation time caused by traversal calculation are avoided, and the route calculation efficiency is effectively improved.
Fig. 7 is a schematic structural diagram of a routing information determining apparatus according to an embodiment of the present invention, and as shown in fig. 7, the apparatus may include: a receiving module 501, a determining module 502 and a calculating module 503;
a receiving module 501, configured to receive multiple protocol packets, where each protocol packet includes: the system identification is used for representing the issuing source of each protocol message, and a plurality of protocol messages have the same prefix;
a determining module 502, configured to determine, according to the same prefix and multiple system identifiers, a virtual node that represents a common correspondence of multiple publishing sources having the same prefix;
a calculating module 503, configured to calculate, according to a preset SPF algorithm, routing information of a virtual node to a primary next-hop node corresponding to a destination address, where the destination address is included in a network segment indicated by the prefix; and calculating the routing information of the standby next hop node corresponding to the virtual node reaching the destination address according to a preset FRR algorithm.
Optionally, as shown in fig. 8, the apparatus may further include: a searching module 504 and a recording module 505;
the searching module 504 is used for searching whether a prefix of each protocol message is recorded in a preset list;
and a recording module 505, configured to record, if yes, a system identifier of each protocol packet in a table entry corresponding to a prefix of each protocol packet in the preset list.
Optionally, the determining module 502 is specifically configured to combine the route attribute value with the same prefix and multiple system identifiers to obtain a node identifier corresponding to the virtual node.
Optionally, as shown in fig. 9, the apparatus may further include a selection module 506;
a selecting module 506, configured to obtain a first set of route attribute values and a second set of route attribute values, where the first set of route attribute values includes: a second set of route attribute values for each of the plurality of publication sources to reach the destination address, the second set of route attribute values comprising: the router reaches the route attribute value of each publishing source in a plurality of publishing sources;
selecting a target distribution source from a plurality of distribution sources according to the first group of routing attribute values and the second group of routing attribute values;
the routing information of the virtual node to the main next-hop node corresponding to the destination address is as follows: the target issuing source reaches the routing information of the main next hop node corresponding to the destination address;
the routing information of the virtual node to the next-hop-standby node corresponding to the destination address is as follows: and the target issuing source reaches the routing information of the standby next hop node corresponding to the destination address.
Optionally, the routing attribute value includes: cost value; a selecting module 506, specifically configured to find out, from the first group of route attribute values and the second group of route attribute values, multiple cost values belonging to the same publishing source;
accumulating a plurality of cost values belonging to the same release source to obtain a total cost value of the release source;
and selecting the minimum cost total value from the cost total values of the plurality of release sources, and taking the release source corresponding to the minimum cost total value as a target release source. The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 10 is a schematic structural diagram of a routing information determining device according to an embodiment of the present invention, where the device may be a computing device with a data processing function. The apparatus may include: a processor 701, a memory 702. The memory 702 is used for storing programs, and the processor 701 calls the programs stored in the memory 702 to execute the above method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, an embodiment of the present invention further provides a program product, for example, a computer-readable storage medium, including a program, which, when executed by a processor, is configured to perform the above-mentioned method embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (8)

1. A method for determining routing information, the method being applied to a router and comprising:
receiving a plurality of protocol messages, each protocol message comprising: a prefix and a system identifier, where the system identifier is used to represent a publishing source of each protocol packet, and the protocol packets have the same prefix;
determining a virtual node which represents that a plurality of publishing sources with the same prefix commonly correspond to according to the same prefix and a plurality of system identifications;
calculating routing information of the virtual node to reach a main next hop node corresponding to a destination address according to a preset Shortest Path First (SPF) algorithm, wherein the destination address is contained in the network segment indicated by the prefix;
calculating the routing information of the virtual node to the next hop node corresponding to the destination address according to a preset fast reroute (FRR) algorithm;
wherein the determining, according to the same prefix and the plurality of system identifiers, a virtual node that represents a common correspondence of a plurality of publishing sources having the same prefix includes:
and combining the routing attribute values with the same prefix and the plurality of system identifications to obtain the node identifications corresponding to the virtual nodes.
2. The method of claim 1, wherein prior to determining the virtual node that represents a common correspondence of multiple publication sources having the same prefix based on the same prefix and multiple system identifications, further comprising:
searching whether a prefix of each protocol message is recorded in a preset list;
if yes, recording the system identification of each protocol message in the table entry corresponding to the prefix of each protocol message in the preset list.
3. The method of claim 1, wherein the method further comprises:
obtaining a first set of routing attribute values and a second set of routing attribute values, the first set of routing attribute values comprising: a route attribute value for each of the plurality of publication sources to reach the destination address, the second set of route attribute values comprising: a router attribute value for the router to reach each of the plurality of publication sources;
selecting a target publication source from the plurality of publication sources according to the first set of routing attribute values and the second set of routing attribute values; the routing information of the virtual node to the main next hop node corresponding to the destination address is as follows: the target issuing source reaches the routing information of the main next hop node corresponding to the destination address;
the routing information of the virtual node to the standby next hop node corresponding to the destination address is as follows: and the target issuing source reaches the routing information of the standby next hop node corresponding to the destination address.
4. The method of claim 3, wherein the route attribute value comprises: a Cost value;
selecting a target publication source from the plurality of publication sources according to the first set of routing attribute values and the second set of routing attribute values, comprising:
finding out a plurality of Cost values belonging to the same issuing source from the first group of routing attribute values and the second group of routing attribute values respectively;
accumulating a plurality of Cost values belonging to the same release source to obtain a total Cost value of the release source;
and selecting the minimum Cost total value from the Cost total values of a plurality of issuing sources, and taking the issuing source corresponding to the minimum Cost total value as the target issuing source.
5. A routing information determining apparatus, comprising: the device comprises a receiving module, a determining module and a calculating module;
the receiving module is configured to receive a plurality of protocol packets, where each protocol packet includes: a prefix and a system identifier, where the system identifier is used to represent a publishing source of each protocol packet, and the protocol packets have the same prefix;
the determining module is configured to determine, according to the same prefix and the multiple system identifiers, a virtual node that represents a common correspondence of the multiple publishing sources having the same prefix;
the calculation module is configured to calculate, according to a preset shortest path first SPF algorithm, routing information of the virtual node to reach a primary next hop node corresponding to a destination address, where the destination address is included in the network segment indicated by the prefix; calculating the routing information of the virtual node to the next hop node corresponding to the destination address according to a preset fast reroute (FRR) algorithm;
the determining module is specifically configured to combine the route attribute value with the same prefix and the plurality of system identifiers to obtain a node identifier corresponding to the virtual node.
6. The apparatus of claim 5, further comprising: the device comprises a searching module and a recording module;
the searching module is used for searching whether the prefix of each protocol message is recorded in a preset list;
and the recording module is used for recording the system identifier of each protocol message in the table entry corresponding to the prefix of each protocol message in the preset list if the prefix of each protocol message in the preset list is positive.
7. The apparatus of claim 5, further comprising a selection module;
the selection module is configured to obtain a first set of routing attribute values and a second set of routing attribute values, where the first set of routing attribute values includes: a route attribute value for each of the plurality of publication sources to reach the destination address, the second set of route attribute values comprising: a router reaching a route attribute value for each of the plurality of publication sources;
selecting a target publication source from the plurality of publication sources according to the first set of routing attribute values and the second set of routing attribute values;
the routing information of the virtual node to the main next hop node corresponding to the destination address is as follows: the target issuing source reaches the routing information of the main next hop node corresponding to the destination address;
the routing information of the virtual node to the standby next hop node corresponding to the destination address is as follows: and the target issuing source reaches the routing information of the standby next hop node corresponding to the destination address.
8. The apparatus of claim 7, wherein the route attribute value comprises: a Cost value;
the selecting module is specifically configured to find out, from the first group of route attribute values and the second group of route attribute values, multiple Cost values belonging to the same publishing source;
accumulating a plurality of Cost values belonging to the same release source to obtain a total Cost value of the release source;
and selecting the minimum Cost total value from the Cost total values of a plurality of issuing sources, and taking the issuing source corresponding to the minimum Cost total value as the target issuing source.
CN201911212030.8A 2019-11-29 2019-11-29 Routing information determination method and device Active CN110971527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911212030.8A CN110971527B (en) 2019-11-29 2019-11-29 Routing information determination method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911212030.8A CN110971527B (en) 2019-11-29 2019-11-29 Routing information determination method and device

Publications (2)

Publication Number Publication Date
CN110971527A CN110971527A (en) 2020-04-07
CN110971527B true CN110971527B (en) 2020-10-16

Family

ID=70032478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911212030.8A Active CN110971527B (en) 2019-11-29 2019-11-29 Routing information determination method and device

Country Status (1)

Country Link
CN (1) CN110971527B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532521B (en) * 2020-10-30 2021-07-09 中盈优创资讯科技有限公司 Outflow node information identification method for NetFlow flow
CN114363191B (en) * 2021-12-24 2023-11-10 中国联合网络通信集团有限公司 Route diffusion simulation method and device based on node and IP address

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611628A (en) * 2012-04-05 2012-07-25 杭州华三通信技术有限公司 Method and device for converting transmission routes
CN109861915A (en) * 2017-11-30 2019-06-07 中兴通讯股份有限公司 Forward method, apparatus, computer equipment and the readable storage medium storing program for executing of table handling
CN110233801A (en) * 2019-05-31 2019-09-13 北京星网锐捷网络技术有限公司 Route renewing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8018941B2 (en) * 2008-09-30 2011-09-13 At&T Intellectual Property I, L.P. Demand-based distribution of internet protocol routing information across a network
TW201312980A (en) * 2011-05-03 2013-03-16 Interdigital Patent Holdings Content identification, retrieval and routing in the Internet
US9391876B2 (en) * 2014-03-18 2016-07-12 Telefonaktiebolaget L M Ericsson (Publ) Better alternate paths for multi homed IS-IS prefixes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611628A (en) * 2012-04-05 2012-07-25 杭州华三通信技术有限公司 Method and device for converting transmission routes
CN109861915A (en) * 2017-11-30 2019-06-07 中兴通讯股份有限公司 Forward method, apparatus, computer equipment and the readable storage medium storing program for executing of table handling
CN110233801A (en) * 2019-05-31 2019-09-13 北京星网锐捷网络技术有限公司 Route renewing method and device

Also Published As

Publication number Publication date
CN110971527A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
US10757012B2 (en) Path computation in a segment routing network
US6968393B1 (en) Method and apparatus for an attribute oriented routing update
US7860106B2 (en) System and method for routing table computation and analysis
US9401858B2 (en) Loop avoidance during network convergence in switched networks
US9559954B2 (en) Indexed segment ID
CN112787841B (en) Fault root cause positioning method and device and computer storage medium
EP2899921B1 (en) End-to-end route tracing over a named-data network
US7869349B2 (en) Method and system for deducing network routes by querying routers
US20040153573A1 (en) Distributed router for dynamically managing forwarding information and method thereof
CN110971527B (en) Routing information determination method and device
CN109361596B (en) Route calculation method and device and electronic equipment
CN110061921B (en) Cloud platform data packet distribution method and system
Zhang et al. Bidirectional multi-constrained routing algorithms
EP3767886A1 (en) Cluster oriented dynamic routing
US10536368B2 (en) Network-aware routing in information centric networking
CN113810287B (en) Data retrieval and pushing method based on NDN and SDN
JPWO2006059787A1 (en) Overlay link computing device and its computing method and program
US20070025346A1 (en) System and method for creating a routing table
WO2013091523A1 (en) Route backup method and device
CN108111422A (en) A kind of data high-speed multichannel retransmission method and device based on DPDK
CN111865787A (en) Traffic statistical method, network equipment and storage medium
WO2016177112A1 (en) Method and device for implementing link state message refresh
JP2011244312A (en) Node device, optimal path determination method, and program
CN115460137A (en) Method, device and equipment for generating forwarding table item
JP5144225B2 (en) Information search apparatus and entry information registration method in information search apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant