CN107147576B - Route calculation method and device - Google Patents

Route calculation method and device Download PDF

Info

Publication number
CN107147576B
CN107147576B CN201610116792.8A CN201610116792A CN107147576B CN 107147576 B CN107147576 B CN 107147576B CN 201610116792 A CN201610116792 A CN 201610116792A CN 107147576 B CN107147576 B CN 107147576B
Authority
CN
China
Prior art keywords
link
network
router
field value
route
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
CN201610116792.8A
Other languages
Chinese (zh)
Other versions
CN107147576A (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.)
Guangdong Gaohang Intellectual Property Operation Co ltd
Shanghai Pengxi Semiconductor Co ltd
Original Assignee
Shanghai Pengxi Semiconductor 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 Shanghai Pengxi Semiconductor Co Ltd filed Critical Shanghai Pengxi Semiconductor Co Ltd
Priority to CN201610116792.8A priority Critical patent/CN107147576B/en
Publication of CN107147576A publication Critical patent/CN107147576A/en
Application granted granted Critical
Publication of CN107147576B publication Critical patent/CN107147576B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/123Evaluation of link metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a route calculation method and a device, wherein the method comprises the following steps: receiving a link state message synchronized by at least one neighbor router, wherein the link state message comprises a field value corresponding to a link in a network, and the field value is used for indicating the stability degree of the link; sorting all links according to the field value of each link in the network, wherein the high stability is prior to the low stability; and based on the sorted link sequence, preferentially calculating and storing the route on the link with high stability. By adopting the embodiment of the invention, the route on the stable link can be preferentially calculated and stored, and the normal operation of the route bearing service on the stable link is ensured.

Description

Route calculation method and device
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for calculating a route.
Background
In order to ensure the reliability of links in a conventional network, backup protection is performed through a plurality of links, and in this scenario, a loop problem may be encountered, and a Spanning Tree Protocol (STP) and other related damage protocols must be deployed to prevent a network broadcast storm from being generated. Although the STP network solves the problem of loops, the STP network has the problems that links cannot share load and the utilization rate is not high. Although Multiple Spanning Tree Protocol (MSTP) can improve the load sharing capability of the link, it cannot completely solve the problem, and it is difficult to maintain the whole network.
Meanwhile, with the rise of virtualization, a large two-layer network is increasingly required, and virtual machines can be freely migrated among physical servers. Conventional STP networks clearly do not meet the requirements in this scenario. As shown IN fig. 1, Transparent Interconnection of Lots of Links (TRILL) forms a two-layer routing network using MAC-IN-MAC technology, and devices can be fully connected. Devices in the TRILL network are called Routing Bridges (RBs), and each RB has a unique routing id nickname. Network loops can be prevented by means of TRILL routing, and traffic can be load-shared by equivalent routing (ECMP) formed between links. The TRILL routing protocol forms a Unicast route and a Multicast route in the network to respectively instruct forwarding of known Unicast traffic and forwarding of Broadcast Unknown Unicast Multicast (BUM) traffic.
In the TRILL network, whenever a Link State DataBase (LSDB) of an RB is refreshed, the RB is triggered to recalculate a route, in the prior art, route calculation and issue storage unordered control of each Link is performed, and when a forwarding resource of the RB is insufficient, a route of an unstable Link often preempts resources, which causes interruption of a route bearer service of an original stable Link.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for calculating a route, which can preferentially calculate and store a route on a stable link, and ensure normal operation of a route bearer service on the stable link.
A first aspect of an embodiment of the present invention provides a method for calculating a route, where the method may include:
receiving a link state message synchronized by at least one neighbor router, wherein the link state message comprises a field value corresponding to a link in a network, and the field value is used for indicating the stability degree of the link;
sorting all links according to the field value of each link in the network, wherein the high stability is prior to the low stability;
and based on the sorted link sequence, preferentially calculating and storing the route on the link with high stability. In the method, a field value is added in the link state message to indicate the stability degree of the link, so that the route on the link with high stability degree is preferentially calculated through the size sequencing of the field values, and the normal operation of the route bearing service on the link with high stability degree is ensured.
Based on the first aspect, in a first possible implementation manner of the first aspect, the field value includes a value in a type length value TLV field, and the value is increased whenever a link state packet associated with the link is periodically synchronized in a network. The field value is further limited to be a value, and the value increase is increased when the network synchronizes the link state message associated with the link, so that the time length for establishing the link can be conveniently recorded, that is, the stability degree of the link is reflected, the route of the stable link is conveniently calculated preferentially, and the normal operation of the route bearing service of the stable link is ensured.
Based on the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, if a first link in the network is established for a target router and the network for the first time, field values corresponding to the first link are accumulated from 0;
the target router is a newly added router in the network, or the target router is a router which recovers to operate after being disconnected from the network due to failure. Further defining that a target router in the network is firstly connected with the network, and accumulating the field values corresponding to the first link from 0, namely counting the total establishment duration from the beginning of the link, so as to ensure that newly expanded routes are not calculated to store and preempt forwarding resources first when a router is newly added in the network, or the traffic is not led to the routes between the routers which are recovered to operate after the failure and the network are disconnected too early, so that packet loss is avoided.
In a third possible implementation manner of the first aspect, based on the first possible implementation manner of the first aspect, the method further includes:
when detecting that a second link between the target neighbor router and any one of the at least one neighbor router fails, zeroing a field value corresponding to the second link;
detecting whether a hello message sent by the target neighbor router is received in real time;
if yes, determining that the second link is recovered, and accumulating the field values corresponding to the second link from 0;
and when detecting that the field value corresponding to the second link reaches a preset threshold value, issuing a link state message including the second link state information to the at least one neighbor router. Further, when the link between the router and the neighbor router is disconnected, the purpose of delayed release of the link state information is controlled through the field value, so that the traffic cannot be introduced into the link too early to cause packet loss.
Based on the third feasible implementation manner of the first aspect, in a fourth feasible implementation manner of the first aspect, the link state packet including the second link state information includes a field value corresponding to the second link, where the field value is the preset threshold, and when the link state packet of the second link is periodically synchronized in the network, the field value corresponding to the second link is accumulated based on the preset threshold. Further limiting that when the link delays to release the link state information of the link after the link is recovered due to the fault, the corresponding field value before the link is released can be continuously maintained, so that the routing on the stable link is guaranteed to be calculated and stored preferentially, and the convergence speed of the link routing is improved.
A second aspect of the embodiments of the present invention provides a route calculation apparatus, including:
a receiving module, configured to receive a link state packet synchronized by at least one neighboring router, where the link state packet includes a field value corresponding to a link in a network, and the field value is used to indicate a stability degree of the link;
the sorting module is used for sorting all the links according to the field value of each link in the network, wherein the high stability degree is prior to the low stability degree;
and the route calculation module is used for preferentially calculating and storing the route on the link with high stability degree based on the sorted link sequence. In the method, a field value is added in the link state message to indicate the stability degree of the link, so that the route on the link with high stability degree is preferentially calculated through the size sequencing of the field values, and the running of the route bearing service on the link with high stability degree is ensured.
Based on the second aspect, in a first possible implementation manner of the second aspect, the field value includes a value in a type length value TLV field, and the value is increased whenever a link state packet associated with the link is periodically synchronized in a network. The field value is further limited to be a value, and the value increase is increased when the network synchronizes the link state message associated with the link, so that the time length for establishing the link can be conveniently recorded, that is, the stability degree of the link is reflected, the route of the stable link is conveniently calculated preferentially, and the normal operation of the route bearing service of the stable link is ensured.
Based on the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, if a first link in the network is a target router and a connection is established with the network for the first time, field values corresponding to the first link are accumulated from 0;
the target router is a newly added router in the network, or the target router is a router which recovers to operate after being disconnected from the network due to failure. Further defining that a target router in the network is firstly connected with the network, and accumulating the field values corresponding to the first link from 0, namely counting the total establishment duration from the beginning of the link, so as to ensure that newly expanded routes are not calculated to store and preempt forwarding resources first when a router is newly added in the network, or the traffic is not led to the routes between the routers which are recovered to operate after the failure and the network are disconnected too early, so that packet loss is avoided.
In a third possible implementation manner of the second aspect, based on the first possible implementation manner of the second aspect, the apparatus further includes:
the processing module is used for resetting a field value corresponding to a second link to zero when a second link failure between the processing module and any one target neighbor router in the at least one neighbor router is detected;
the detection module is used for detecting whether the hello message sent by the target neighbor router is received in real time;
the processing module is further configured to determine that the second link is recovered and accumulate field values corresponding to the second link from 0 if a hello packet sent by the target neighbor router is received;
and the issuing module is used for issuing a link state message including the second link state information to the at least one neighbor router when detecting that the field value corresponding to the second link reaches a preset threshold value. Further, when the link between the router and the neighbor router is disconnected, the purpose of delayed release of the link state information is controlled through the field value, so that the traffic cannot be introduced into the link too early to cause packet loss.
Based on the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the link state packet including the second link state information includes a field value corresponding to the second link, where the field value is the preset threshold, and when the link state packet of the second link is periodically synchronized in the network, the field value corresponding to the second link is accumulated based on the preset threshold. Further limiting that when the link delays to release the link state information of the link after the link is recovered due to the fault, the corresponding field value before the link is released can be continuously maintained, so that the routing on the stable link is guaranteed to be calculated and stored preferentially, and the convergence speed of the link routing is improved.
In the embodiment of the invention, a link state message synchronized by at least one neighbor router is received, the link state message comprises a field value corresponding to a link in a network, the field value is used for representing the stability degree of the link, all links are sequenced according to the field value of each link in the network, the high stability degree is prior to the low stability degree, and the route on the link with the high stability degree is preferentially calculated and stored based on the sequenced link sequence, so that the route on the link with the high stability degree occupies equipment forwarding resources in advance, and the normal operation of the route bearing service on the link with the high stability degree is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a TRILL network according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a route calculation method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another route calculation method according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating capacity expansion of a TRILL network according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a link failure of a TRILL network according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a route calculation apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another route calculation apparatus according to an embodiment of the present invention.
Detailed Description
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, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The routing computing apparatus of the embodiment of the present invention may be a routing device or a part of a routing device, and the routing device may include a router, which is not limited in the present invention.
The application scenario of the embodiment of the present invention may be a TRILL network, and may also be other routing protocol networks.
The route calculation method provided by the embodiment of the present invention will be described and explained with reference to fig. 2 to 5.
Fig. 2 is a schematic flow chart of a route calculation method according to an embodiment of the present invention; as shown in fig. 2, the route calculation method includes:
s200, receiving a link state message synchronized by at least one neighbor router, wherein the link state message comprises a field value corresponding to a link in a network, and the field value is used for indicating the stability degree of the link;
in the embodiment of the present invention, the Link State message carries Link State information, and optionally, in an Open Shortest Path first protocol (OSPF), the Link State message may be a Link State protocol data unit (Link State PDUs, LSP) or a Link State Advertisement (LSA).
In the routing network, each router establishes an adjacency with its neighbor routers by using Hello messages, and periodically sends link-state messages (LSA, LSP, etc.) to each neighbor router, and each neighbor router sequentially forwards the link-state messages (flooding) to its neighbors after receiving the link-state messages. Meanwhile, each router needs to keep a backup of the link state messages received by it in its own LSDB, and the LSDBs of all routers should be the same.
Each router calculates the Shortest path to each router using Dijkstra algorithm, that is, Shortest Path First (SPF) algorithm, according to the network topology in the LSDB, and outputs the result to the routing table. It should be noted that, usually, an upper-layer software protocol of the router calculates each entry in the routing table by using an SPF algorithm, and issues the entry to a forwarding resource (a bottom-layer hardware chip) of the router for storage.
When a routing network changes, for example, a router is newly added in the network, or a link in the network fails, LSDB content of the router may be refreshed and trigger the router to recalculate a route, and when forwarding resources of the router are insufficient, and an upper layer software protocol calculates a route and issues no sequential control, it may cause a link just up (a link with low stability degree) to calculate and issue first, and preempt original route forwarding resources, resulting in service interruption carried by the route of the original stable link.
In order to solve the above problem, the embodiment of the present invention extends a link state packet, where the link state packet includes a field value corresponding to a link represented by the link state packet in a network, and the field value may represent a stability degree of the link.
Optionally, the field Value may be a Value in a Type Length Value (TLV) field, and here, it is described that a link state packet is an LSP packet, the LSP packet is extended, and a TLV field is added in the packet. The value in this field takes values from 0 to 255, and accumulates in sequence as the LSP period associated with this link in the network spreads, and the value does not increase until 255.
It should be noted that, when a certain link in the network is a target router and is first connected to the network, the field values corresponding to the link are accumulated from 0, for example, the target router is a newly added router in the network, as shown in fig. 4, when a target router RB6 is newly added in the network, RB6 establishes an adjacency relation with RB2 and RB4, respectively, and since the links established between RB6 and RB2 and RB4 are newly established links, they are not stable, and in the process of route convergence, the embodiment of the present invention preferentially converges routes on stable links. The corresponding field values of the link between RB6 and RB2 are accumulated from 0, and each time the LSP of the link is periodically synchronized in the network, the corresponding field value of the link is increased by 1 until 255 is not accumulated.
Similarly, as shown in fig. 5, the target router is a router which recovers operation after being disconnected from the network due to a failure, and due to the disconnection of the failed link between RB1 and RB2, when the link subsequently recovers operation, the link is also an extremely unstable link, so that the field value corresponding to the link still accumulates from 0, each time the LSP of the link is periodically synchronized in the network, the field value corresponding to the link is incremented by 1 until the LSP is not accumulated any more than 255, and the larger the field value, the higher the stability of the link.
S201, sorting all links according to the field value of each link in the network, wherein the high stability is prior to the low stability;
in the embodiment of the invention, the LSDB of the router stores a network topology map and the field value of each link in the network, and when the network topology structure changes, the router recalculates the routing table. When calculating each route in the routing table, all links are sorted according to the size of the field value of each link in the network, where the field value indicates the stability degree of the link, and it should be noted that the sorting order is higher in stability degree than lower in stability degree.
It should be noted that, in general, the field value of the link just up is relatively small, while the field value of the link which is always stable is relatively large, for example, the field value of all stable links is 255.
S202, based on the sorted link sequence, the route on the link with high stability degree is preferentially calculated and stored.
In the embodiment of the invention, based on the ordered link sequence, the upper layer software protocol of the router preferentially calculates the route on the link with high stability degree (namely, the link ordered at the top). It should be noted that the calculation method of the route still refers to the SPF algorithm in the OSPF routing protocol for calculation.
When the upper software protocol of the router calculates the route, the route is issued to the lower forwarding resource of the router for storage, the route calculated preferentially can preferentially preempt the forwarding resource for storage, and under the condition that the forwarding resource of the router is insufficient, the route of the stable link can preempt the forwarding resource, so that the interruption of the original stable link bearing service can not occur.
In the embodiment of the invention, a link state message synchronized by at least one neighbor router is received, the link state message comprises a field value corresponding to a link in a network, the field value is used for representing the stability degree of the link, all links are sequenced according to the field value of each link in the network, the high stability degree is prior to the low stability degree, and the route on the link with the high stability degree is preferentially calculated and stored based on the sequenced link sequence, so that the route on the link with the high stability degree occupies equipment forwarding resources in advance, and the normal operation of the route bearing service on the link with the high stability degree is ensured.
Fig. 3 is a schematic flow chart of another route calculation method according to an embodiment of the present invention; as shown in fig. 3, the route calculation method includes:
s300, receiving a link state message synchronized by at least one neighbor router, wherein the link state message comprises a field value corresponding to a link in a network, and the field value is used for indicating the stability degree of the link;
s301, sorting all links according to the field value of each link in the network, wherein the high stability is prior to the low stability;
s302, based on the sorted link sequence, the route on the link with high stability degree is preferentially calculated and stored.
Referring to steps S200 to S202 of fig. 2, steps S300 to S302 of the embodiment of the present invention are not described herein again.
S303, when detecting that a second link between the target neighbor router and any one of the at least one neighbor router fails, zeroing a field value corresponding to the second link;
in the embodiment of the invention, after the adjacency relation is established between the router and the neighbor router, the adjacency relation is maintained through periodic exchange Link update messages (LSUs), when the router detects that the target neighbor router does not send the LSUs, the failure of a second Link between the router and the target router is determined, and the field value corresponding to the second Link is reset to zero.
S304, detecting whether a hello message sent by the target neighbor router is received in real time;
in the embodiment of the invention, each router detects whether the Hello message sent by the target neighbor router is received or not by establishing an adjacency relation between the Hello message and the neighbor router thereof.
S305, if receiving, determining that the second link is recovered, and accumulating the field values corresponding to the second link from 0;
in the embodiment of the invention, if a Hello message sent by a target neighbor router is received, a second link between the target neighbor router and the Hello message is determined to be recovered, and after the second link is recovered, the field value corresponding to the second link is accumulated again from 0 according to the LSP synchronization period.
S306, when detecting that the field value corresponding to the second link reaches a preset threshold value, issuing a link state message including the second link state information to the at least one neighbor router.
In this embodiment of the present invention, when it is detected that the field value corresponding to the second link reaches a preset threshold value, for example, the field value is a value of a TLV field in an LSP packet, the preset threshold value may be 255, and the preset threshold value may be set by a user.
When the field value corresponding to the second link is detected to reach the preset threshold value, the link state message comprising the second link state information is issued to the at least one neighbor router, so that the purpose of delayed issuing of the link route after fault recovery can be achieved. Usually, link state changes occur in the whole network, when LSDB is refreshed, the router needs to recalculate the route, and it takes a certain time for the route calculation of the upper layer software protocol to be sent to the lower layer forwarding resource, if the fault recovery link state information is issued too early, the traffic will be introduced to the link too early, and the router forwarding resource does not store the routing table entry yet, thereby causing packet loss.
The link state packet including the second link state information includes a field value corresponding to the second link, where the field value is the preset threshold, and when the link state packet of the second link is periodically synchronized in the network, the field value corresponding to the second link is accumulated based on the preset threshold.
In the embodiment of the invention, a link state message synchronized by at least one neighbor router is received, the link state message comprises a field value corresponding to a link in a network, the field value is used for representing the stability degree of the link, all links are sequenced according to the field value of each link in the network, the high stability degree is prior to the low stability degree, and the route on the link with the high stability degree is preferentially calculated and stored based on the sequenced link sequence, so that the route on the link with the high stability degree occupies equipment forwarding resources in advance, and the normal operation of the route bearing service on the link with the high stability degree is ensured.
The following describes a specific implementation of the routing computation apparatus provided in the embodiment of the present invention with reference to fig. 6 to 7.
Referring to fig. 6, a schematic structural diagram of a route calculation device according to an embodiment of the present invention is shown in fig. 6, where the route calculation device according to the embodiment includes: a receiving module 100, a sorting module 101 and a route calculation module 102.
A receiving module 100, configured to receive a link state packet synchronized by at least one neighboring router, where the link state packet includes a field value corresponding to a link in a network, and the field value is used to indicate a stability degree of the link;
a sorting module 101, configured to sort all links according to a field value of each link in a network, where a high stability degree is prior to a low stability degree;
and the route calculation module 102 is configured to preferentially calculate and store the route on the link with the high stability degree based on the sorted link order.
Optionally, as shown in the figure, the route computing device may further include a processing module 103, a detection module 104, and a publishing module 105;
a processing module 103, configured to, when a failure of a second link between the second link and any one target neighbor router of the at least one neighbor router is detected, zero a field value corresponding to the second link;
the detection module 104 is configured to detect whether a hello packet sent by the target neighbor router is received in real time;
the processing module 103 is further configured to determine that the second link is recovered and accumulate field values corresponding to the second link from 0 if a hello packet sent by the target neighbor router is received;
the issuing module 105 is configured to issue a link status packet including the second link status information to the at least one neighbor router when it is detected that a field value corresponding to the second link reaches a preset threshold.
The link state packet including the second link state information includes a field value corresponding to the second link, where the field value is the preset threshold, and when the link state packet of the second link is periodically synchronized in the network, the field value corresponding to the second link is accumulated based on the preset threshold.
In the embodiment of the invention, a link state message synchronized by at least one neighbor router is received, the link state message comprises a field value corresponding to a link in a network, the field value is used for representing the stability degree of the link, all links are sequenced according to the field value of each link in the network, the high stability degree is prior to the low stability degree, and the route on the link with the high stability degree is preferentially calculated and stored based on the sequenced link sequence, so that the route on the link with the high stability degree occupies equipment forwarding resources in advance, and the normal operation of the route bearing service on the link with the high stability degree is ensured.
It is understood that the specific implementation of each module in the routing computing device described above may be further referred to in the related description of the method embodiments.
Referring to fig. 7, which is a schematic structural diagram of another route calculation device according to an embodiment of the present invention, as shown in the figure, the route calculation device 20 includes a processor 201, a memory 202, a transceiver 203, and a bus 204, the processor 201, the memory 202, and the transceiver 203 are all connected to the bus 204, the memory 202 is used for storing an execution instruction, and the processor 201 invokes the execution instruction stored in the memory 202:
the transceiver 203 is configured to receive a link state packet synchronized by at least one neighboring router, where the link state packet includes a field value corresponding to a link in a network, and the field value is used to indicate a stability degree of the link;
the processor 201 is configured to sort all links according to the field value of each link in the network, where a high degree of stability is prior to a low degree of stability;
the processor 201 is further configured to preferentially calculate and store routes on links with high stability based on the sorted link order.
Optionally, the field value includes a value in a type length value TLV field, and the value is increased whenever a link state packet associated with the link is periodically synchronized in a network.
Optionally, if a first link in the network is a first connection established between the target router and the network, field values corresponding to the first link are accumulated from 0;
the target router is a newly added router in the network, or the target router is a router which recovers to operate after being disconnected from the network due to failure.
The processor 201 is further configured to, when detecting a failure of a second link with any target neighbor router of the at least one neighbor router, zero a field value corresponding to the second link;
the processor 201 is further configured to detect whether a hello packet sent by the target neighbor router is received in real time;
if yes, the processor 201 is further configured to determine that the second link is recovered, and accumulate field values corresponding to the second link from 0;
when detecting that the field value corresponding to the second link reaches a preset threshold, the transceiver 203 is further configured to issue a link status packet including the second link status information to the at least one neighbor router.
Optionally, the link state packet including the second link state information includes a field value corresponding to the second link, where the field value is the preset threshold, and when the link state packet of the second link is periodically synchronized in the network, the field value corresponding to the second link is accumulated based on the preset threshold.
In the embodiment of the invention, a link state message synchronized by at least one neighbor router is received, the link state message comprises a field value corresponding to a link in a network, the field value is used for representing the stability degree of the link, all links are sequenced according to the field value of each link in the network, the high stability degree is prior to the low stability degree, and the route on the link with the high stability degree is preferentially calculated and stored based on the sequenced link sequence, so that the route on the link with the high stability degree occupies equipment forwarding resources in advance, and the normal operation of the route bearing service on the link with the high stability degree is ensured.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The modules or units in the terminal of the embodiment of the invention can be combined, divided and deleted according to actual needs.
The components such as the microcontroller according to the embodiment of the present invention may be implemented by a general-purpose Integrated Circuit, such as a CPU, or an Application Specific Integrated Circuit (ASIC).
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A method of route computation, comprising:
receiving a link state message synchronized by at least one neighbor router, wherein the link state message comprises a field value corresponding to a link in a network, and the field value is used for indicating the stability degree of the link, wherein if the link is a link established for the first time in the network or the link is a link which is recovered to operate after a fault in the network, the field values corresponding to the link are accumulated from 0, and the field values are sequentially accumulated along with the periodic synchronization of the link state message associated with the link in the network;
sorting all links according to the field value of each link in the network, wherein the high stability is prior to the low stability;
and based on the sorted link sequence, preferentially calculating and storing the route on the link with high stability.
2. The method of claim 1, wherein the field value comprises a value in a type length value, TLV, field, the value being incremented each time a link state packet associated with the link is periodically synchronized in a network.
3. The method of claim 2, wherein the first established link in the network comprises: a first router in the network establishes a link with other routers except the first router in the network when the first router establishes connection for the first time, wherein the first router is a newly added router in the network;
the link in the network which recovers operation after the fault comprises: and recovering the running link after the second router in the network is disconnected with other routers except the second router in the network due to faults.
4. The method of claim 2, wherein the method further comprises:
when detecting that a second link between the target neighbor router and any one of the at least one neighbor router fails, zeroing a field value corresponding to the second link;
detecting whether a hello message sent by the target neighbor router is received in real time;
if yes, determining that the second link is recovered, and accumulating the field values corresponding to the second link from 0;
and when detecting that the field value corresponding to the second link reaches a preset threshold value, issuing a link state message including the second link state information to the at least one neighbor router.
5. The method according to claim 4, wherein the link state packet including the second link state information includes a field value corresponding to the second link, and the field value is the preset threshold, and when the link state packet of the second link is periodically synchronized in the network, the field value corresponding to the second link is accumulated based on the preset threshold.
6. A route calculation apparatus, comprising:
a receiving module, configured to receive a link state packet synchronized by at least one neighboring router, where the link state packet includes a field value corresponding to a link in a network, and the field value is used to indicate a stability degree of the link, where if the link is a link first established in the network or the link is a link that recovers from a fault in the network, the field values corresponding to the link are accumulated from 0, and the field values are sequentially accumulated when the link state packet associated with the link in the network is periodically synchronized;
the sorting module is used for sorting all the links according to the field value of each link in the network, wherein the high stability degree is prior to the low stability degree;
and the route calculation module is used for preferentially calculating and storing the route on the link with high stability degree based on the sorted link sequence.
7. The apparatus of claim 6, wherein the field value comprises a value in a type length value, TLV, field, the value increasing whenever a link state packet associated with the link is periodically synchronized in a network.
8. The apparatus of claim 7,
the link established for the first time in the network includes: a first router in the network establishes a link with other routers except the first router in the network when the first router establishes connection for the first time, wherein the first router is a newly added router in the network;
the link in the network which recovers operation after the fault comprises: and recovering the running link after the second router in the network is disconnected with other routers except the second router in the network due to faults.
9. The apparatus of claim 7, wherein the apparatus further comprises:
the processing module is used for resetting a field value corresponding to a second link to zero when a second link failure between the processing module and any one target neighbor router in the at least one neighbor router is detected;
the detection module is used for detecting whether the hello message sent by the target neighbor router is received in real time;
the processing module is further configured to determine that the second link is recovered and accumulate field values corresponding to the second link from 0 if a hello packet sent by the target neighbor router is received;
and the issuing module is used for issuing a link state message including the second link state information to the at least one neighbor router when detecting that the field value corresponding to the second link reaches a preset threshold value.
10. The apparatus of claim 9, wherein the link state packet including the second link state information includes a field value corresponding to the second link, and wherein the field value is the preset threshold, and when the link state packet of the second link is periodically synchronized in the network, the field value corresponding to the second link is accumulated based on the preset threshold.
CN201610116792.8A 2016-03-01 2016-03-01 Route calculation method and device Active CN107147576B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610116792.8A CN107147576B (en) 2016-03-01 2016-03-01 Route calculation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610116792.8A CN107147576B (en) 2016-03-01 2016-03-01 Route calculation method and device

Publications (2)

Publication Number Publication Date
CN107147576A CN107147576A (en) 2017-09-08
CN107147576B true CN107147576B (en) 2021-01-15

Family

ID=59783084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610116792.8A Active CN107147576B (en) 2016-03-01 2016-03-01 Route calculation method and device

Country Status (1)

Country Link
CN (1) CN107147576B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109510768B (en) 2017-09-14 2021-02-12 华为技术有限公司 Method, device and system for transmitting Link State Advertisement (LSA)
CN112134776B (en) * 2019-06-25 2022-08-26 华为技术有限公司 Method for generating multicast forwarding table item and access gateway

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7693047B2 (en) * 2005-11-28 2010-04-06 Cisco Technology, Inc. System and method for PE-node protection
CN104219170A (en) * 2014-09-04 2014-12-17 暨南大学 Packet scheduling method based on probability retransmission in wireless network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7774461B2 (en) * 2004-02-18 2010-08-10 Fortinet, Inc. Mechanism for determining a congestion metric for a path in a network
CN101001201A (en) * 2006-01-13 2007-07-18 华为技术有限公司 Method for setting count request delay
CN101572674A (en) * 2009-06-12 2009-11-04 杭州华三通信技术有限公司 Routing computation method and device thereof
CN101984632A (en) * 2010-11-15 2011-03-09 中兴通讯股份有限公司 Load distributing method, device and server in distributed cache system
CN105247823B (en) * 2013-09-13 2018-10-02 华为技术有限公司 The method and apparatus for adjusting link overhead

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7693047B2 (en) * 2005-11-28 2010-04-06 Cisco Technology, Inc. System and method for PE-node protection
CN104219170A (en) * 2014-09-04 2014-12-17 暨南大学 Packet scheduling method based on probability retransmission in wireless network

Also Published As

Publication number Publication date
CN107147576A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
JP5095823B2 (en) Transport control server, network system, and transport control method
US9049131B2 (en) Network system and load balancing method
US9794167B2 (en) Bicasting using non-congruent paths in a loop-free routing topology having routing arcs
EP2737671B1 (en) Method and apparatus for resilient routing of control traffic in a split-architecture system
Yang et al. Keep forwarding: Towards k-link failure resilient routing
CN103428031B (en) A kind of inter-domain link fast failure recovery method based on software defined network
US8248920B2 (en) Alternate spanning tree for faster indirect link failure recovery
CN110535763B (en) Route backup method, device, server and readable storage medium
EP2360880B1 (en) Optimized fast re-route in MPLS-TP ring topologies
EP3011709A1 (en) Methods and systems with enhanced robustness for multi-chassis link aggregation group
WO2017190672A1 (en) Message forwarding method and apparatus
CN103460647A (en) Technique for operating network node
CN102364900B (en) Based on the data transmission method of FRR and equipment in a kind of IRF system
CN105340230A (en) Virtual chassis topology management
CN110417665B (en) EVPN networking system and method for multiple Fabric scenes of data center
CN102347885B (en) A kind of method and apparatus of route handoff
US20150186202A1 (en) Method and Device for Sending Inter-Domain Fault Information
CN101083625B (en) Method and apparatus for expediting link convergence
CN109361596A (en) Route computing method, device and electronic equipment
CN107147576B (en) Route calculation method and device
US20190097926A1 (en) Grace Link State Advertisement (LSA) from a Virtual Stack Device
CN113615132A (en) Fast flooding topology protection
CN114726772A (en) Efficient route protection method based on optimized network topology structure
CN103634218B (en) The method and device of fast route convergence
CN102316029B (en) Fast rerouting method and routing equipment

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
TA01 Transfer of patent application right

Effective date of registration: 20201229

Address after: 201800 room 1026, 10th floor, No.3 Lane 733, Hewang Road, Jiading District, Shanghai

Applicant after: Shanghai Pengxi Semiconductor Co.,Ltd.

Address before: Unit 2414-2416, main building, no.371, Wushan Road, Tianhe District, Guangzhou City, Guangdong Province

Applicant before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Effective date of registration: 20201229

Address after: Unit 2414-2416, main building, no.371, Wushan Road, Tianhe District, Guangzhou City, Guangdong Province

Applicant after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant