WO2021027828A1 - 一种链路状态信息的处理方法及装置 - Google Patents
一种链路状态信息的处理方法及装置 Download PDFInfo
- Publication number
- WO2021027828A1 WO2021027828A1 PCT/CN2020/108587 CN2020108587W WO2021027828A1 WO 2021027828 A1 WO2021027828 A1 WO 2021027828A1 CN 2020108587 W CN2020108587 W CN 2020108587W WO 2021027828 A1 WO2021027828 A1 WO 2021027828A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- state information
- link state
- network device
- csg
- link
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
- H04L45/03—Topology update or discovery by updating link state protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/122—Shortest path evaluation by minimising distances, e.g. by selecting a route with minimum of number of hops
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/14—Routing performance; Theoretical aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/22—Alternate routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/28—Routing or path finding of packets in data switching networks using route fault recovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/28—Flow control; Congestion control in relation to timing considerations
Definitions
- This application relates to the field of communication technology, and in particular to a method and device for processing link state information.
- the traffic on that path will be switched to other paths for transmission. For example, traffic is transmitted from the source node to the destination node through path A. When all links to the destination node on an intermediate node in path A fail, the source node will switch the traffic to path B for transmission. Wherein, path B no longer passes through the intermediate node.
- path B no longer passes through the intermediate node.
- the traffic may suffer serious packet loss problems, reducing the reliability of network transmission.
- the embodiments of the present application provide a method and device for processing link state information, so as to reduce packet loss of traffic during path switching, thereby improving the reliability of network transmission.
- an embodiment of the present application provides a method for processing link state information.
- the first network device receives the first link state information sent by the second network device, the first link state information is the link state information of the third network device, and the first link state information is used to indicate the first link state information.
- the network device deletes the second link state information of the third network device, and the second link state information includes the segment identifier (English: segment identifier, SID for short) of the third network device.
- the first network device may delete the third link state information received from the second network device according to the first link state information, and the third link state information carries information for calculating a route to the third network device.
- the first network device When the second link state information on the first network device is deleted, the first network device deletes the SID of the third network device provided according to the second link state information, and the SID of the third network device is the first network Provided by the route that the device passes through the second network device to the third network device.
- the first network device When the third link state information on the first network device is deleted, the first network device will delete the route calculated based on the third link state information, that is, the route from the first network device to the third network device through the second network device routing. Then, the first network device recalculates a route to the third network device, and the recalculated route does not pass through the second network device.
- the first network device can switch the traffic from the path passing through the second network device to the path not passing through the second network device. Therefore, for the first link state information for instructing the first network device to delete the second link state information and the fourth link state information for instructing the first network device to delete the third link state information, in the first In the case that the order of the link state information and the fourth link state information cannot be guaranteed during transmission, even if the first network device has not received the fourth link from the second network device when the first link state information is received Status information, the first network device will also delete the second link status information and the third link status information, thus avoiding the link failure of the first network device between the second network device and the third network device At the same time, the route from the second network device to the third network device is continuously used for traffic forwarding, thereby reducing traffic packet loss and improving the reliability of network transmission.
- the first link state information carries an indication identifier
- the indication identifier is used to instruct the network device that receives the first link state information to delete the third link state information . Therefore, by carrying the indication identifier in the first link state information, the second network device can specify to the first network device whether to delete the second link state information and the third link state information synchronously, so that the route withdrawal processing method Can be configured more flexibly.
- the first network device may delete the third link state information when it is determined that the first link state information carries the indication identifier. Therefore, by carrying the indication identifier in the first link state information, the second network device can specify to the first network device whether to delete the second link state information and the third link state information synchronously, so that the route withdrawal processing method Can be configured more flexibly.
- the first link state information is carried in an open shortest path first OSPF protocol link state announcement LSA
- the indication identifier is carried in the options field of the LSA header . It can be seen that the second network device can issue to the first network device an indication identifier for instructing to synchronously delete the second link state information and the third link state information through the options field of the LSA header.
- the embodiments of the present application provide a method for processing link state information.
- the first network device receives the first link state information sent by the second network device, and the first link state information carries information for calculating a route to the third network device. Further, the first network device may determine whether the first network device stores the second link state information received from the second network device according to the first link state information, and the second link state information carries the third network device SID. When it is determined that the first network device stores the second link state information, the first network device updates the route to the third network device according to the first link state information.
- the first network device will update the route to the third network device according to the first link state information only when it is determined that the second link state information is received and stored.
- the first network device It can not only update a route from the second network device to the third network device based on the first link state information, but also create a forwarding entry corresponding to the route in the forwarding table based on the SID carried in the second link state information In this way, the first network device can switch the traffic from the path that does not pass through the second network device back to the path through the second network device, avoiding the link between the second network device and the third network device from the first network device.
- the route from the second network device to the third network device cannot be used for traffic forwarding, thereby reducing traffic packet loss and improving the reliability of network transmission.
- the first network device may start a timer. During the timing of the timer, the first network device may determine whether the first network device receives the second link state information sent by the second network device. It can be seen that the first network device can wait until the second link state information is received after receiving the first link state information through the timing operation of the timer.
- the first network device may Status information, updating the route to the third network device. It can be seen from this that the first network device can implement the timing operation of the timer to update the route to the third network device according to the first link state information after the first network device receives the second link state information.
- the first network device in a case where the first network device determines that the second link state information has not been received after the timer expires, the first network device can avoid A link state information updates the route to the third network device. It can be seen that the first network device can implement the timer operation to realize that the first network device will not update the route to the third network device according to the first link state information before receiving the second link state information.
- the first link state information carries an indication identifier
- the indication identifier is used to indicate that the network device that has received the first link state information is working according to the first link state information
- the second network device can specify to the first network device whether to store the first link state information and the second link state information synchronously, so that the route update processing method Can be configured more flexibly.
- the first network device may determine whether the first network device stores the first network device when the first network device determines that the first link state information carries the indication identifier.
- the second link state information Therefore, by carrying the indicator in the first link state information, the second network device can specify to the first network device whether to store the first link state information and the second link state information synchronously, so that the route update processing method Can be configured more flexibly.
- the first link state information is carried in the link state announcement LSA of the OSPF protocol, and the indication identifier is carried in the options field of the header of the LSA. It can be seen from this that the second network device can issue an indication to the first network device through the options field of the LSA header to indicate the synchronous storage of the first link state information and the second link state information.
- an embodiment of the present application provides a first network device, including: a receiving unit and a processing unit.
- the receiving unit is configured to receive first link state information sent by the second network device, where the first link state information is link state information of the third network device; and the processing unit is configured to respond to receiving the first link state information.
- Link state information deleting the second link state information received by the first network device from the second network device, the second link state information carrying the segment identifier of the third network device;
- the processing unit is further configured to delete the third link state information received from the second network device according to the first link state information, and the third link state information carries the information used to calculate the arrival of the third network The routing information of the device.
- the first link state information carries an indication identifier
- the indication identifier is used to instruct the network device that has received the first link state information to delete the third link state information.
- the processing unit is specifically configured to determine that the first link state information carries the indication identifier, and delete the third link state information.
- the first link state information is carried in an open shortest path first OSPF protocol link state announcement LSA, and the indication identifier is carried in the options field of the LSA header .
- the first network device provided in the third aspect corresponds to the method provided in the first aspect. Therefore, the various possible implementation modes and technical effects achieved by the first network device provided in the third aspect can be referred to the foregoing
- the first aspect provides an introduction to the method.
- an embodiment of the present application provides a first network device, including: a receiving unit, a judgment unit, and a processing unit.
- the receiving unit is configured to receive the first link state information sent by the second network device, and the first link state information carries information used to calculate the route to the third network device;
- a link state information determines whether the first network device stores the second link state information received from the second network device, and the second link state information carries the segment of the third network device Identification;
- the processing unit is used to update the route to the third network device according to the first link state information when it is determined that the first network device stores the second link state information.
- the processing unit is further used to start a timer when the judgment unit determines that the first network device does not store the second link state information; the judgment unit is also used to start the timer During the timing, it is determined whether the first network device receives the second link state information sent by the second network device.
- the processing unit unit is further configured to update the arrival according to the first link state information in the case that the judgment unit determines that the second link state information is received before the timer expires.
- the route of the third network device is further configured to update the arrival according to the first link state information in the case that the judgment unit determines that the second link state information is received before the timer expires.
- the processing unit is further configured to avoid updating according to the first link state information when the judgment unit determines that the second link state information has not been received after the timer expires. The route to the third network device.
- the first link state information carries an indication identifier
- the indication identifier is used to indicate that the network device that has received the first link state information is working according to the first link state information When updating the route of the third network device, determine whether the second link state information is stored.
- the judging unit is specifically configured to judge whether the first network device stores the second link when it is determined that the first link state information carries the indication identifier. Road status information.
- the first link state information is carried in the link state announcement LSA of the OSPF protocol, and the indication identifier is carried in the options field of the header of the LSA.
- first network device provided in the fourth aspect corresponds to the method provided in the second aspect. Therefore, the various possible implementation modes and technical effects achieved by the first network device provided in the fourth aspect can be referred to the foregoing
- the second aspect provides an introduction to the method.
- an embodiment of the present application also provides a network device, which includes a memory and a processor; wherein the memory is used to store program code; the processor is used to run instructions in the program code to make the The network device executes any implementation manner of the first aspect or any implementation manner of the second aspect.
- the embodiments of the present application also provide a computer program product, which when running on a computer, causes the computer to execute any one of the implementation manners of the first aspect or any one of the implementation manners of the second aspect.
- the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, which when run on a computer or processor, causes the computer or processor to execute the aforementioned first Any implementation on the one hand or any implementation method on the second.
- Figure 1 is a schematic diagram of a network system framework involved in an application scenario in an embodiment of the application
- FIG. 2 is a schematic flowchart of a method for processing link state information in an embodiment of this application
- FIG. 3 is a schematic structural diagram of an LSA header in an embodiment of the application.
- FIG. 4 is a schematic diagram of the structure of the options field in an LSA Header in an embodiment of the application
- FIG. 5 is a schematic flowchart of a method for processing link state information in an embodiment of this application.
- FIG. 6 is a schematic flowchart of a method for processing link state information in an embodiment of this application.
- FIG. 7 is a schematic structural diagram of an apparatus for processing link state information in an embodiment of this application.
- FIG. 8 is a schematic structural diagram of an apparatus for processing link state information in an embodiment of this application.
- FIG. 9 is a schematic structural diagram of a network device in an embodiment of this application.
- Fig. 10 is a schematic structural diagram of a network device in an embodiment of this application.
- CSG 101 can switch traffic from SR tunnel A To SR tunnel B for transmission, where SR tunnel B passes through nodes including CSG 101, CSG 102, ASG 104, P 106, ASG 108, and CSG 109.
- CSG 101 switches traffic from SR tunnel A to SR tunnel B for transmission, if the link between ASG 103 and P device 105 and/or the link between ASG 103 and ASG 104 recovers from the failure, The path from ASG 103 to CSG 109 is reachable, and CSG 101 can switch traffic from SR tunnel B back to SR tunnel A for transmission.
- the network adopts the Open Shortest Path First (English: Open Shortest Path First, referred to as OSPF) protocol
- OSPF Open Shortest Path First
- the ASG 103 will send two different link state information to the CSG 101 to notify the CSG 101 to no longer use SR tunnel A to send traffic to the CSG 109.
- a kind of link state information A is used to instruct the CSG 101 to delete the link state information E previously received from the ASG 103.
- the link state information E carries the SID of the CSG 109.
- the link state information A can be carried in the OSPF definition Opaque (English: opaque) link state advertisement (English: link state advertisement, LSA for short).
- Another type of link state information B is used to instruct CSG 101 to delete the link state information F previously received from ASG 103.
- Link state information B carries information used to calculate the route to CSG 109.
- Link state information B can It is carried in OSPF-defined network summary LSA (English: network summary LSA) and other types of LSAs are sent.
- a kind of link state information C carries the SID of the CSG 109, which is used to instruct the CSG 101 to provide the SID of the CSG 109 for the route to the CSG 109 according to the link state information C.
- the link state information C can be carried in the OSPF definition opaque LSA.
- link state information D carries information for calculating the route to CSG 109, and is used to instruct CSG 101 to update the route to CSG 109 according to link state information D.
- Link state information D can be carried in the network defined by OSPF Summary LSA and other types of LSA.
- CSG 101 may first receive link state information A and then link state information B, or it may receive link state information first After information B, link state information A is received.
- CSG 101 When CSG 101 receives link state information A, CSG 101 deletes the link state information E previously received from ASG 103 in its link state database (English: link state database, abbreviated as: LSDB).
- the road status information E carries the SID of CSG 109.
- the LSDB of the CSG 101 also stores the link state information F previously received from the ASG 103, where the link state information F carries the information used to calculate the arrival of the CSG 109 routing information.
- the CSG 101 When the link state F in the LSDB is not deleted, the CSG 101 will not delete the route calculated from the link state information F through the ASG 103 to the CSG 109, and the CSG 101 will not be sent according to the ASG 104 recorded in the LSDB
- the link state information of the ASG 104 is recalculated to reach the CSG 109. Therefore, the CSG 101 does not switch the traffic from the SR tunnel A to the SR tunnel B for forwarding.
- the link state information E is deleted from the LSDB, the CSG 101 will delete the SID of the CSG 109 corresponding to the route through the ASG 103 to the CSG 109. Therefore, the CSG 101 cannot continue to use the SR tunnel A for traffic forwarding.
- the CSG 101 will not delete the link state information F in its LSDB until the CSG 101 receives the link state information B.
- the CSG 101 will delete the route calculated according to the link state information F through the ASG 103 to the CSG 109. Then, according to the link state information sent by the ASG 104, the route from the ASG 104 to the CSG 109 is calculated, so that the traffic is switched from the SR tunnel A to the SR tunnel B for forwarding.
- link state information A and link state information B cannot guarantee the sequence during transmission, if CSG 101 first receives link state information A and then link state information B, the link state information is received in CSG 101 During the period when A but not receiving link state information B, CSG 101 cannot continue to use SR tunnel A for traffic forwarding, nor can it switch traffic from SR tunnel A to SR tunnel B for forwarding, which will cause traffic loss. package.
- link state information C and link state information D are also carried in different packets for transmission, the order of link state information C and link state information D cannot be guaranteed during transmission. Therefore, when ASG 103 When the link with the P device 105 and/or the link between the ASG 103 and the ASG 104 recovers from the failure, the CSG 101 may first receive the link state information C and then the link state information D, and The link state information D may be received first, and then the link state information C may be received.
- the CSG 101 When the CSG 101 receives the link state information D, the CSG 101 will record the link state information D in its LSDB. When link state information D is recorded in the LSDB, CSG 101 will calculate the route from ASG 103 to CSG 109 based on the link state information D, and update the route from ASG 104 to CSG 109 to ASG 103 to CSG 109 In this way, CSG 101 will no longer use SR tunnel B for traffic forwarding. But if the CSG 101 has not received the link state information C at this time, and the link state information C is not recorded in the LSDB of the CSG 101, the CSG 101 cannot provide CSG for the route through the ASG 103 to the CSG 109 according to the link state information C.
- the CSG 101 After the CSG 101 receives the link state information C, the CSG 101 records the link state information C in its LSDB. When the link state information C is recorded in the LSDB, the CSG 101 can provide the SID of the CSG 109 for the route through the ASG 103 to the CSG 109 according to the link state information C. Therefore, the CSG 101 can use the SR tunnel A for traffic forwarding.
- link state information C and link state information D cannot guarantee the sequence during transmission, if CSG 101 first receives link state information D and then link state information C, the link state information is received in CSG 101 During D but not receiving the link state information C, CSG 101 can neither continue to use SR tunnel B for traffic forwarding, nor can it switch traffic from SR tunnel B back to SR tunnel A for forwarding, resulting in packet loss. .
- CSG 101 can delete link state information E in its LSDB And link state information F. In this way, even if the CSG 101 has not received the link state information B at this time, both the link state information E and the link state information F in the LSDB of the CSG 101 can be deleted.
- CSG 101 will not only delete the SID of CSG 109 provided by the route through ASG 103 to CSG 109, but also delete the route through ASG 103 to CSG 109, thus avoiding the link of CSG 101 between ASG 103 and CSG 109
- CSG 101 will calculate the route from ASG 104 to CSG 109 based on the link state information sent by ASG 104 recorded in the LSDB and provide the SID of CSG 109 for the route from ASG 104 to CSG 109, so that CSG 101 can The traffic is switched from SR tunnel A to SR tunnel B for forwarding.
- CSG 101 can determine whether the link state has been recorded in its LSDB Information C. If the CSG 101 has received the link state information C at this time, and the link state information C has been recorded in the LSDB of the CSG 101, the CSG 101 can record the link state information D in its LSDB. If the CSG 101 has not received the link state information C at this time, the CSG 101 waits until the link state information C is recorded in its LSDB before recording the link state information D in its LSDB.
- the LSDB of the CSG 101 will record the link state information D while the link state information C is recorded. Therefore, when the CSG 101 updates the route according to the LSDB, it can not only update the route to the CSG 109 through the ASG 103 according to the link state information D, but also according to the link state information C to reach the CSG 109 through the ASG 103 The route provides the SID of CSG 109, so that CSG 101 can switch the traffic back to SR tunnel A for forwarding.
- the CSG 101 can continue to use the SR tunnel B for traffic forwarding, thereby avoiding traffic loss.
- the network shown in Figure 1 may be an OSPF network.
- ASG 103 and ASG 104 may be devices at the junction of two OSPF areas (English: area).
- area 1 includes CSG 101, CSG 102, ASG 103, and ASG 104
- area 2 includes ASG 103, ASG 104, P 105, P 106, ASG 107, and ASG 108.
- ASG 103 and AGS 104 may be devices at the junction of two OSPF processes (English: process).
- the process OSPF 1 includes CSG 101, CSG 102, ASG 103, and ASG 104
- the process OSPF 2 includes ASG 103, ASG 104, P 105, P 106, ASG 107, and ASG 108.
- the network shown in Fig. 1 may also be an intermediate system to intermediate system (English: intermediate system to intermediate system, referred to as IS-IS) network.
- an embodiment of the present application provides a method 200 for processing link state information.
- the method 200 may include:
- the CSG 101 receives the link state information sent by the ASG 103.
- ASG 103 can send to CSG 101 link state information A for instructing CSG 101 to delete link state information E, and ASG 103 will also send Instruct the CSG 101 to delete the link state information B of the link state information F.
- the link state information E and the link state information F are sent by the ASG 103 to the CSG 101, and have been recorded in the LSDB of the CSG 101.
- the link state information E carries the SID of the CSG 109
- the link state information F carries information for calculating the route to the CSG 109.
- the information used to calculate the route to CSG 109 may include the device identification of CSG 109, the device identification of ASG 103, etc.
- the device identification of CSG 109 may be the Internet Protocol (English: Internet Protocol, abbreviated: IP) address of CSG 109,
- the device identifier of the ASG 103 may be the IP address of the ASG 103.
- ASG 103 can send link state information C carrying the SID of CSG 109 to CSG 101, and ASG 103 will also send to CSG 101 to indicate that the CSG 101 update arrives at CSG 109 Link state information D of the route.
- the link state information D carries information used to calculate the route to CSG109.
- the information used to calculate the route to CSG 109 may include the device identifier of CSG 109, the device identifier of ASG 103, etc.
- the device identifier of CSG 109 may be the IP address of CSG 109, and the device identifier of ASG 103 may be the IP of ASG 103. address.
- ASG 103 may send link state information A and link state information B at the same time, or may send link state information A first and then link state information B, or may send link state information B first and then link state information A .
- CSG 101 may receive link state information A and link state information B at the same time, or it may receive link state information A first and then link state information B, or it may receive link state information B first and then receive it Link state information A.
- the ASG 103 may send link state information C and link state information D at the same time, or may send link state information C first and then link state D, or may send link state information D first and then link state information C.
- CSG 101 may receive link state information C and link state information D at the same time, or may receive link state information C first and then link state information D, or may receive link state information D first and then receive Link state information C.
- the network where CSG 101 and ASG 103 are located may be an OSPF network
- the link state information sent by ASG 103 to CSG 101 may be carried in the LSA defined by the OSPF protocol.
- link state information A, link state information C, and link state information E may be carried in opaque LSA and sent by ASG 103 to CSG 101.
- Link state information B, link state information D, and link state information F can be carried in router LSA (English: router LSA), network LSA (English: network LSA), network summary LSA, autonomous system border router (English: Autonomous system boundary router, abbreviation: ASBR) summary LSA (English: ASBR summary LSA), autonomous system (English: autonomous system, abbreviation: AS) external LSA (English: AS external LSA) or incomplete stub area (English: not so Stubby area, abbreviated as: NSSA)
- the ASG 103 sends to the CSG 101.
- the ASG 103 may be a device at the junction of two OSPF areas or a device at the junction of two OSPF processes.
- both CSG 101 and ASG 103 are located in OSPF area 1
- ASG 103 is also located in OSPF area 2
- ASG 103 receives the traffic sent by CSG 101 from OSPF area 1 and sends the traffic to OSPF area 2, so that the traffic is transmitted to CSG 109.
- CSG 101 and ASG 103 are both located in OSPF process 1
- AGS 103 is also located in OSPF process 2
- ASG 103 receives the traffic sent by CSG 101 from OSPF process 1 and sends the traffic to OSPF process 2, so that the traffic is transmitted to CSG 109 .
- the network where CSG 101 and ASG 103 are located can also be an IS-IS network, then the link state information sent by ASG 103 to CSG 101 can be carried in the link state message defined in the IS-IS protocol (English: Link State PDU) , Referred to as: LSP).
- IS-IS protocol English: Link State PDU
- the CSG 101 deletes the link state information E and the link state information F in the LSDB according to the link state information A.
- the routing table of the CSG 101 records route 1 through the ASG 103 to the CSG 109.
- link state information E is stored in the LSDB of CSG 101
- the routing table of CSG 101 records the SID of CSG 109 for route 1
- the forwarding table of CSG 101 records forwarding entry 1
- forwarding entry 1 Contains the SID of CSG 109 and the next hop network device of CSG 101 in Route 1. In this way, CSG 101 can use SR tunnel A for traffic forwarding.
- the CSG 101 can delete the link state information E and the link state information F in its LSDB, where the link state information A can be used to instruct the CSG 101 to delete it.
- the link state information A can be regarded as the link state information of the CSG 109. In this way, even if the CSG 101 has not received the link state information B at this time, both the link state information E and the link state information F in the LSDB of the CSG 101 can be deleted.
- CSG 101 will calculate route 2 through ASG 104 to CSG 109 based on the link status information sent by ASG 104 recorded in the LSDB, record route 2 in the routing table and record the SID of CSG 109 for route 2 in the routing table , And then create forwarding entry 2 in the forwarding table, where forwarding entry 2 records the SID of CSG 109 and the next hop of CSG 101 in Route 2. In this way, CSG 101 can use SR tunnel B for traffic forwarding.
- the link state information A may carry the first indication identifier, which is used to instruct the CSG 101 to delete the link state information F in the LSDB.
- the CSG 101 After the CSG 101 receives the link state information A, if the CSG 101 reads the first indicator from the link state information A, the CSG 101 deletes the link state information from the LSDB of the CSG 101 according to the link state information A
- the link state information F can be deleted in the LSDB of the CSG 101 according to the first indication in the link state information A.
- the CSG 101 can delete the link state information E in the LSDB of the CSG 101 according to the link state information A, and avoid using the link state information A in the LSDB.
- the link state information F is deleted from the LSDB of CSG 101. It can be seen that by carrying the first indication identifier in the link state information A, the ASG 103 can specify to the CSG 101 whether to delete the link state information E and the link state information F simultaneously, so that the route withdrawal processing method can be more flexible Configuration.
- the first indication identifier may be carried in the LSA header (English: header) of the first LSA.
- the first LSA may use the LSA header as shown in FIG. 3.
- the first indication identifier may be carried in the options (English: options) field of the LSA header.
- the options field in the LSA header of the first LSA may adopt the structure shown in FIG. 4.
- the external attributes bit (English: external attributes bit, EA bit for short) has been clearly cancelled. Therefore, in the options field of the LSA header of the first LSA, the EA bit can be replaced with the SR bit, which is used to carry the first indication identifier. Specifically, if the SR bit in the first LSA is set, the link state information A carries the first indication identifier. If the SR bit of the first LSA is not set, the link state information A does not carry the first indication identifier.
- the LSA header shown in Figure 3 includes the link state lifetime (English: LS age) field, the options field, the link state type (English: LS type), and the link state identifier (English: link State ID) field, advertising router (English: advertising router) field, link state sequence number (English: LS sequence number), link state checksum (English: LS checksum) and length (English: length) fields.
- the options field shown in Figure 4 includes DN bit (used to prevent loops), O bit (used to identify whether to receive transparent LSA), EA bit (used to identify whether to receive LSA with external attributes), DC bit (used to Used to identify the circuit processed by the router), N/P bit (used to identify the LSA with processing type 7), MC bit (used to identify whether to forward multicast packets), E bit (used to identify the method of flooding LSA) And MT bit (used to identify multi-topology capabilities).
- DN bit used to prevent loops
- O bit used to identify whether to receive transparent LSA
- EA bit used to identify whether to receive LSA with external attributes
- DC bit used to Used to identify the circuit processed by the router
- N/P bit used to identify the LSA with processing type 7
- MC bit used to identify whether to forward multicast packets
- E bit used to identify the method of flooding LSA
- MT bit used to identify multi-topology capabilities
- the CSG 101 deletes the link state information F in the LSDB according to the link state information B.
- the CSG 101 can delete the link state information F in its LSDB.
- the routing table of CSG 101 will delete route 1.
- CSG 101 will calculate Route 2 based on the link state information sent by ASG 104 recorded in the LSDB, record Route 2 in the routing table and record the SID of CSG 109 for Route 2 in the routing table, and then create it in the forwarding table Forwarding entry 2. In this way, CSG 101 can use SR tunnel B for traffic forwarding.
- the link state information B may carry a second indication identifier for instructing the CSG 101 to delete the link state information E in the LSDB.
- the CSG 101 After the CSG 101 receives the link state information B, if the CSG 101 reads the second indicator from the link state information B, the CSG 101 can delete the link state in the LSDB of the CSG 101 according to the link state information B.
- link state information E can be deleted in the LSDB of CSG 101 according to the second indicator in link state information B, or CSG 101 can also ignore the second indicator to avoid link state information
- the second indication in B indicates that the link state information E is deleted in the LSDB of CSG 101.
- the CSG 101 can delete the link state information F in the LSDB of the CSG 101 according to the link state information B, and avoid the link state information B in the LSDB.
- the link state information E is deleted from the LSDB of CSG 101. It can be seen that by carrying the second indication identifier in the link state information B, the ASG 103 can specify to the CSG 101 whether to delete the link state information E and the link state information F simultaneously, so that the processing method of route withdrawal can be more flexible Configuration.
- the second indication identifier may be carried in the LSA header of the second LSA.
- the second LSA may use the LSA header as shown in FIG. 3.
- the second indication identifier may be carried in the options field of the LSA header of the second LSA.
- the options field in the LSA header of the second LSA may adopt the structure shown in FIG. 4. Among them, EA bit has been clearly cancelled. Therefore, in the options field of the LSA header of the second LSA, the EA bit can be replaced with the SR bit, which is used to carry the second indication identifier. Specifically, if the SR bit in the second LSA is set, the link state information B carries the second indication identifier. If the SR bit of the second LSA is not set, the link state information B does not carry the second indication identifier.
- the CSG 101 records the link state information C in the LSDB of the CSG 101.
- the CSG 101 can record the link state information C in its LSDB. If the CSG 101 has not received the link state information D at this time, the CSG 101 will not update the route 1 calculated based on the link state information D to the routing table, so it will not delete the route 2 and its CSG in the routing table. The SID will not delete the forwarding entry 2 in the forwarding table, so CSG 101 will continue to use SR tunnel B for traffic forwarding. It can be seen that when the sequence of link state information C and link state information D cannot be guaranteed during transmission, even if CSG 101 first receives link state information C and then link state information D, the link state information D is received in CSG 101. During the period when the link state information C is not received but the link state information D is not received, the CSG 101 will continue to use the SR tunnel B for traffic forwarding, thereby avoiding traffic loss.
- the link state information C may carry a third indication identifier, which is used to instruct the CSG 101 to synchronously record the link state information C and the link state information D in the LSDB.
- the CSG 101 After the CSG 101 receives the link state information C, if the CSG 101 reads the third indicator from the link state information C, the CSG 101 can use the third indicator in the link state information C to indicate When both the information C and the link state information D are received, the link state information C and the link state information D are synchronously recorded in the LSDB, or the CSG 101 can also ignore the third indication information and change the link state information C is recorded in the LSDB of CSG 101, without having to determine whether link state information D has been received at this time, and it is not necessary to ensure that link state information C and link state information D are recorded in the LSDB of CSG 101 at the same time.
- the CSG 101 can record the link state information C in the LSDB of the CSG 101 without having to guarantee the link state information C and the link state information D It is also recorded in the LSDB of CSG 101. It can be seen that by carrying the third indicator in the link state information C, the ASG 103 can specify to the CSG 101 whether to update the link state information C and the link state information D simultaneously, so that the route update processing method can be more flexible Configuration.
- the third indication identifier can be carried in the LSA header of the third LSA.
- the third LSA may adopt the LSA header as shown in FIG. 3.
- the third indication identifier may be carried in the options field of the LSA header of the third LSA.
- the options field in the LSA header of the third LSA may adopt the structure shown in FIG. 4.
- EA bit has been clearly cancelled. Therefore, in the options field of the LSA header of the third LSA, the EA bit can be replaced with the SR bit, which is used to carry the third indication identifier. Specifically, if the SR bit in the third LSA is set, the link state information C carries the third indication identifier. If the SR bit of the third LSA is not set, the link state information C does not carry the third indication identifier.
- link state information is link state information D
- the CSG 101 has recorded link state information C in the LSDB of CSG 101
- the CSG 101 can determine whether the link state information C has been recorded in its LSDB. If the CSG 101 has received the link state information C at this time, and the link state information C has been recorded in the LSDB of the CSG 101, the CSG 101 can record the link state information D in its LSDB. If the CSG 101 has not received the link state information C at this time, the CSG 101 waits until the link state information C is recorded in its LSDB before recording the link state information D in its LSDB. In this way, even if the CSG 101 first receives the link state information D and then the link state information C, the LSDB of the CSG 101 will record the link state information D while the link state information C is recorded.
- the CSG 101 can calculate route 1 based on the link state information D, replace route 2 in the routing table with route 1, and delete forwarding table entry 2 in the forwarding table. In this way, CSG 101 no longer uses SR tunnel B for traffic forwarding.
- link state information C is recorded in the LSDB
- CSG 101 can record the SID of CSG 109 for route 1 in the routing table according to link state information C when route 1 has been recorded in the routing table. In this way, CSG 101 can use SR tunnel A for traffic forwarding.
- the CSG 101 can continue to use the SR tunnel B for traffic forwarding. After the CSG 101 receives the link state information C and the link state information D, the CSG 101 can switch traffic from SR tunnel B back to SR tunnel A for forwarding, thereby avoiding traffic loss. In specific implementation, when the CSG 101 receives the link state information D, the CSG 101 can determine whether the link state information C is recorded in the CSG 101 LSDB.
- the CSG 101 can also record the link state information D in the LSDB of the CSG 101, so that the CSG 101 can update the link state information D in the LSDB to the CSG 109 routing. If the link state information C is not recorded in the LSDB of CSG 101, CSG 101 can start a timer (English: timer) to wait for the preset time. For example, each time the timer starts and waits for 1 second, it will time out and restart, and restart after 2 times. The timeout reaches the preset time, that is, the preset time is 3 seconds.
- timer English: timer
- the CSG 101 can also record the link state information D in the CSG 101 in the LSDB. If the CSG 101 has not received the link state information C after the preset time controlled by the timer, and the link state information C has not been recorded in the LSDB of the CSG 101, the CSG 101 can discard the link state information D.
- the link state information D may carry a fourth indication identifier, which is used to instruct the CSG 101 to synchronously record the link state information C and the link state information D in the LSDB.
- the CSG 101 After the CSG 101 receives the link state information D, if the CSG 101 reads the fourth indicator from the link state information D, the CSG 101 can, according to the fourth indicator in the link state information D, have been received
- link state information C and link state information C are recorded in the LSDB of CSG 101
- link state information D is recorded in the LSDB of CSG 101.
- the CSG 101 can record the link state information D in the LSDB of the CSG 101, without ensuring that the link state information C is recorded in the LSDB Then record the link state information D in the LSDB. It can be seen that by carrying the fourth indication identifier in the link state information D, the ASG 104 can specify to the CSG 101 whether to update the link state information C and the link state information D simultaneously, so that the route update processing method can be more flexible Configuration.
- the fourth indication identifier can be carried in the LSA header of the fourth LSA.
- the fourth LSA may use the LSA header as shown in FIG. 3.
- the fourth indication identifier may be carried in the options field of the LSA header of the fourth LSA.
- the options field in the LSA header of the fourth LSA may adopt the structure shown in FIG. 4.
- EA bit has been clearly cancelled. Therefore, in the options field of the LSA header of the fourth LSA, the EA bit can be replaced with the SR bit, which is used to carry the fourth indication identifier.
- the link state information D carries the fourth indication identifier. If the SR bit of the fourth LSA is not set, the link state information D does not carry the fourth indication identifier.
- CSG 101 when the order of link state information A and link state information B cannot be guaranteed during transmission, regardless of whether the link state information A is received in CSG 101 but the link state information is not received In the case of information B, or when CSG 101 receives link state information B but not link state information A, CSG 101 can switch traffic from SR tunnel A to SR tunnel B for forwarding, thereby avoiding Traffic packet loss.
- FIG. 5 is a schematic flowchart of a method for processing link state information in an embodiment of the application.
- the method 500 may include:
- a first network device receives first link state information sent by a second network device, where the first link state information is information of a third network device;
- the first network device In response to receiving the first link state information, the first network device deletes the second link state information received by the first network device from the second network device, and the second link The path status information carries the segment identifier of the third network device;
- the first network device deletes the third link state information received from the second network device according to the first link state information, where the third link state information carries the Link state information of the route of the third network device.
- the first link state information may be used to instruct the first network device to delete the link state information about the third network device stored thereon, that is, the second link state information and the third link state information , Then the first link state information can be regarded as the information of the third network device.
- the first link state information carries an indication identifier
- the indication identifier is used to instruct the network device that has received the first link state information to delete the third link state information.
- deleting the third link state information received from the second network device by the first network device according to the first link state information includes: determining, at the first network device, the If the indication identifier is carried in the first link state information, the third link state information is deleted.
- the first link state information is carried in an open shortest path first OSPF protocol link state advertisement LSA, and the indication identifier is carried in the options field of the LSA header of the link state information .
- the first network device mentioned in method 500 may be CSG 101 mentioned in method 200, and the second network device mentioned in method 500 may be ASG 103 mentioned in method 200, and in method 500
- the third network device mentioned may be CSG 109 mentioned in method 200, and the first link state information mentioned in method 500 may be link state information A mentioned in method 200, which is mentioned in method 500
- the second link state information may be the link state information E mentioned in the method 200
- the third link state information mentioned in the method 500 may be the link state information F mentioned in the method 200.
- the indication mark of and may be the first indication mark mentioned in the method 200. Therefore, for various specific implementation manners of the method 500, reference may be made to the related introduction in the method 200, which will not be repeated in this embodiment.
- FIG. 6 is a schematic flowchart of a method for processing link state information in an embodiment of the application.
- the method 600 may include:
- the first network device receives first link state information sent by the second network device, where the first link state information carries information used to calculate a route to the third network device.
- the first network device determines, according to the first link state information, whether the first network device stores the second link state information received from the second network device, and the second link
- the status information carries the segment identifier of the third network device
- the first network device determines that the first network device stores the second link state information
- the first network device updates to the first link state information according to the first link state information. Route of the third network device.
- the method 600 further includes: in the case that the first network device determines that the first network device does not store the second link state information, starting a timer; During the timing, it is determined whether the first network device receives the second link state information sent by the second network device.
- the method 600 further includes: in a case in which the first network device determines that the second link state information is received before the timer expires, the first network device is The first link state information updates the route to the third network device.
- the method 600 further includes: when the first network device determines that the second link state information has not been received after the timer expires, the first network device Avoid updating the route to the third network device according to the first link state information.
- the first link state information carries an indication identifier
- the indication identifier is used to indicate that the network device that has received the first link state information is updating according to the first link state information.
- determining whether the first network device stores the second link state information received from the second network device according to the first link state information includes: In the case where the first network device determines that the first link state information carries the indication identifier, it is determined whether the first network device stores the second link state information.
- the first link state information is carried in the link state advertisement LSA of the OSPF protocol, and the indication identifier is carried in the options field of the LSA header of the LSA.
- the first network device mentioned in method 600 may be CSG 101 mentioned in method 200
- the second network device mentioned in method 600 may be ASG 103 mentioned in method 200
- the third network device mentioned may be CSG 109 mentioned in method 200
- the first link state information mentioned in method 600 may be link state information D mentioned in method 200, which is mentioned in method 600
- the second link state information may be the link state information C mentioned in the method 200
- the indicator mentioned in the method 600 may be the fourth indicator mentioned in the method 200. Therefore, for various specific implementation manners of the method 600, reference may be made to related introductions in the method 600, and details are not described in this embodiment.
- Fig. 7 is a schematic structural diagram of an apparatus for processing link state information in an embodiment of the application.
- the device 700 is a first network device and includes:
- the receiving unit 701 is configured to receive first link state information sent by a second network device, where the first link state information is link state information of the third network device;
- the processing unit 702 is configured to delete the second link state information received by the first network device from the second network device in response to receiving the first link state information, and the second link state
- the information carries the segment identifier of the third network device
- the processing unit 702 is further configured to delete the third link state information received from the second network device according to the first link state information, and the third link state information carries the information used to calculate the arrival point. Describe the routing information of the third network device.
- the first link state information carries an indication identifier
- the indication identifier is used to instruct the network device that has received the first link state information to delete the third link state information.
- the processing unit 702 is specifically configured to delete the third link state information when it is determined that the first link state information carries the indication identifier.
- the first link state information is carried in an open shortest path first OSPF protocol link state advertisement LSA, and the indication identifier is carried in the options field of the LSA header of the LSA.
- the apparatus 700 shown in FIG. 7 may be the CSG 101 mentioned in the method 200 shown in FIG. 2. Therefore, for various specific embodiments of the apparatus 700, please refer to the related introduction of the method 200. The examples will not be repeated.
- FIG. 8 is a schematic structural diagram of a processing device for link state information in an embodiment of the application.
- the device 800 is a first network device and includes:
- the receiving unit 801 is configured to receive first link state information sent by a second network device, where the first link state information carries link state information used to calculate a route to the third network device;
- the determining unit 802 is configured to determine, according to the first link state information, whether the first network device stores the second link state information received from the second network device, the second link state information Carrying the segment identifier of the third network device;
- the processing unit 803 is further configured to start a timer when the judgment unit 802 determines that the first network device does not store the second link state information;
- the determining unit 802 is further configured to determine whether the first network device receives the second link state information sent by the second network device during the timing of the timer.
- the processing unit is further configured to, in a case where the judgment unit 802 determines that the second link state information is received before the timer expires, update the information that reaches the Route of the third network device.
- the processing unit 803 is configured to avoid updating arrivals according to the first link state information when the judgment unit 802 determines that the second link state information has not been received after the timer expires. The route of the third network device.
- the first link state information carries an indication identifier
- the indication identifier is used to indicate that the network device that has received the first link state information is updating according to the first link state information.
- the judging unit 802 is specifically configured to judge whether the first network device stores the second link when it is determined that the first link state information carries the indication identifier. Road status information.
- the first link state information is carried in the link state advertisement LSA of the OSPF protocol, and the indication identifier is carried in the options field of the LSA header of the LSA.
- the device 800 shown in FIG. 8 may be the CSG 101 mentioned in the method 200 shown in FIG. 2. Therefore, for various specific embodiments of the device 800, please refer to the related introduction of the method 800. The examples will not be repeated.
- Fig. 9 is a schematic structural diagram of a network device in an embodiment of the application.
- the network device 900 includes a memory 901, a processor 902, and a communication interface 903; the memory 901 is used to store program codes; the processor 902 is used to run instructions in the program codes, so that the network device 900 executes the method 500 Any implementation method; the communication interface 903 is used to send information to or receive information sent by other network devices.
- Fig. 10 is a schematic structural diagram of a network device in an embodiment of this application.
- the network device 1000 includes a memory 1001, a processor 1002, and a communication interface 1003; wherein the memory 1001 is used to store program code; the processor 1002 is used to run instructions in the program code, so that the network device 1000 executes the method 600 Any implementation method; the communication interface 903 is used to send information to or receive information sent by other network devices.
- the embodiment of the present application also provides a computer program product, which when running on a computer, causes the computer to execute the method of any one of the aforementioned methods 500 or the method of any one of the methods 600.
- the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when it runs on a computer or a processor, the computer or the processor executes the aforementioned method 500 Any implementation method or any implementation method in method 600.
- the computer software product can be stored in a storage medium, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, An optical disc, etc., includes a number of instructions to enable a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the method described in each embodiment of the application or some parts of the embodiment.
- a computer device which may be a personal computer, a server, or a network communication device such as a router
- the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
- the description is relatively simple, and for related parts, please refer to the partial description of the method embodiment.
- the device embodiments described above are merely illustrative.
- the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place. , Or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement it without creative work.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请实施例公开了一种链路状态信息的处理方法装置。该方法包括:第一网络设备接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息为第三网络设备的链路状态信息;响应于接收到所述第一链路状态信息,所述第一网络设备删除所述第一网络设备从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;所述第一网络设备根据所述第一链路状态信息删除从所述第二网络设备接收到的第三链路状态信息,所述第三链路状态信息携带有用于计算到达所述第三网络设备的路由的信息。因此,即使链路状态信息在传输时不能保证顺序,第一网络设备也能够减少流量丢包。
Description
本申请要求于2019年8月14日提交中国国家知识产权局、申请号201910749340.7、申请名称为“一种链路状态信息的处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,特别是涉及一种链路状态信息的处理方法及装置。
在网络中,当某条路径上出现故障时,该路径上的流量会被切换其他路径上进行传输。例如,流量通过路径A从源节点传输到目的节点,当路径A中的某个中间节点上所有通往目的节点的链路都出现了故障,源节点会将流量切换到路径B上进行传输,其中,路径B不再经过该中间节点。但是,在路径切换的过程中,流量可能会出现严重的丢包问题,降低网络传输的可靠性。
发明内容
基于此,本申请实施例提供了一种链路状态信息的处理方法及装置,以减少流量在路径切换过程中出现的丢包,从而提高网络传输的可靠性。
第一方面,本申请实施例提供了一种链路状态信息的处理方法。根据该方法,第一网络设备接收第二网络设备发送的第一链路状态信息,第一链路状态信息为第三网络设备的链路状态信息,第一链路状态信息用于指示第一网络设备删除第三网络设备的第二链路状态信息,第二链路状态信息包含有第三网络设备的段标识(英文:segment identifier,简称:SID)。进一步,第一网络设备可以根据第一链路状态信息删除从第二网络设备接收到的第三链路状态信息,第三链路状态信息携带有用于计算到达第三网络设备的路由的信息。当第一网络设备上的第二链路状态信息被删除时第一网络设备会删除根据第二链路状态信息提供的第三网络设备的SID,该第三网络设备的SID是为第一网络设备经过第二网络设备到达第三网络设备的路由提供的。当第一网络设备上的第三链路状态信息被删除时第一网络设备会删除根据第三链路状态信息计算出的路由,即第一网络设备经过第二网络设备到达第三网络设备的路由。然后,第一网络设备就会重新计算一条到达第三网络设备的路由,该重新计算的路由不经过第二网络设备。这样,第一网络设备就能够将流量从经过第二网络设备的路径切换到不经过第二网络设备的路径上。因此,对于用于指示第一网络设备删除第二链路状态信息的第一链路状态信息和用于指示第一网络设备删除第三链路状态信息的第四链路状态信息,在第一链路状态信息和第四链路状态信息在传输时不能保证顺序的情况下,即使第一网络设备在接收到第一链路状态信息时还未从第二网络设备接收到的第四链路状态信息,第一网络设备也会将第二链路状态信息和第三链路状态信息都删除,这样就避免了第一网络设备在第二网络设备与第三网络设备之间的链路故障时继续使用经过第二网络设备到达第三网络设备的路由进行流量转发,从而减少了流量丢包,提高 了网络传输的可靠性。
在一种可能的设计中,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备删除所述第三链路状态信息。因此,通过在第一链路状态信息中携带指示标识,第二网络设备可以向第一网络设备指定是否同步删除第二链路状态信息和第三链路状态信息,从而使得路由撤销的处理方式能够更为灵活地配置。
在一些可能的设计中,所述第一网络设备可以在确定所述第一链路状态信息中携带有所述指示标识的情况下,删除所述第三链路状态信息。因此,通过在第一链路状态信息中携带指示标识,第二网络设备可以向第一网络设备指定是否同步删除第二链路状态信息和第三链路状态信息,从而使得路由撤销的处理方式能够更为灵活地配置。
在一些可能的设计中,所述第一链路状态信息携带在开放式最短路径优先OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的报文头的选项options字段中。由此可见,第二网络设备可以通过LSA的报文头的options字段向第一网络设备发布用于指示同步删除第二链路状态信息和第三链路状态信息的指示标识。
第二方面,本申请实施例提供了一种链路状态信息的处理方法。根据该方法,第一网络设备接收到第二网络设备发送第一链路状态信息,第一链路状态信息携带有用于计算到达第三网络设备的路由的信息。进一步地,第一网络设备可以根据第一链路状态信息判断第一网络设备是否存储有从第二网络设备接收到的第二链路状态信息,第二链路状态信息携带有第三网络设备的SID。第一网络设备在确定第一网络设备存储有第二链路状态信息的情况下根据第一链路状态信息更新到达第三网络设备的路由。由此可见,在第一链路状态信息和第二链路状态信息在传输时不能保证顺序的情况下,即使第一网络设备在接收到第一链路状态信息时还未收到第二链路状态信息,第一网络设备也会在确定接收到并存储有第二链路状态信息的情况下才会根据第一链路状态信息更新到达第三网络设备的路由,因此,第一网络设备不仅能够根据第一链路状态信息更新出一条经过第二网络设备到达第三网络设备的路由,而且也能够根据第二链路状态信息携带的SID在转发表中建立该路由对应的转发表项,这样第一网络设备就能够将流量从不经过第二网络设备的路径切回经过二网络设备的路径,避免了第一网络设备在第二网络设备与第三网络设备之间的链路从故障中恢复时不能使用经过第二网络设备到达第三网络设备的路由进行流量转发,从而减少了流量丢包,提高了网络传输的可靠性。
在一些可能的设计中,在所述第一网络设备确定所述第一网络设备未存储所述第二链路状态信息的情况下,所述第一网络设备可以启动定时器。在所述定时器计时期间,所述第一网络设备可以判断所述第一网络设备是否接收到所述第二网络设备发送的所述第二链路状态信息。由此可见,第一网络设备可以通过定时器的计时操作来实现在接收到第一链路状态信息之后等待至第二链路状态信息的接收。
在一些可能的设计中,在所述第一网络设备确定在所述定时器超时之前接收到所述第二链路状态信息的情况下,所述第一网络设备可以根据所述第一链路状态信息,更新到达所述第三网络设备的路由。由此可见,第一网络设备可以通过定时器的计时操作来实现第一网络设备接收到第二链路状态信息之后根据第一链路状态信息更新到达第三网络设备 的路由。
在一些可能的设计中,在所述第一网络设备确定在所述定时器超时之后仍未接收到所述第二链路状态信息的情况下,所述第一网络设备可以避免根据所述第一链路状态信息更新到达所述第三网络设备的路由。由此可见,第一网络设备可以通过定时器的操作来实现第一网络设备接收到第二链路状态信息之前不会根据第一链路状态信息更新到达第三网络设备的路由。
在一些可能的设计中,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备在根据所述第一链路状态信息更新所述第三网络设备的路由时,判断是否存储有所述第二链路状态信息。因此,通过在第一链路状态信息中携带指示标识,第二网络设备可以向第一网络设备指定是否同步存储第一链路状态信息和第二链路状态信息,从而使得路由更新的处理方式能够更为灵活地配置。
在一些可能的设计中,第一网络设备可以在所述第一网络设备确定所述第一链路状态信息携带有所述指示标识的情况下,判断所述第一网络设备是否存储有所述第二链路状态信息。因此,通过在第一链路状态信息中携带指示标识,第二网络设备可以向第一网络设备指定是否同步存储第一链路状态信息和第二链路状态信息,从而使得路由更新的处理方式能够更为灵活地配置。
在一些可能的设计中,所述第一链路状态信息携带在OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的报文头的选项options字段中。由此可见,第二网络设备可以通过LSA头的options字段向第一网络设备发布用于指示同步存储第一链路状态信息和第二链路状态信息的指示标识。
第三方面,本申请实施例提供了一种第一网络设备,包括:接收单元和处理单元。其中,接收单元用于接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息为第三网络设备的链路状态信息;处理单元用于响应于接收到所述第一链路状态信息,删除所述第一网络设备从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;处理单元还用于根据所述第一链路状态信息删除从所述第二网络设备接收到的第三链路状态信息,所述第三链路状态信息携带有用于计算到达所述第三网络设备的路由的信息。
在一些可能的设计中,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备删除所述第三链路状态信息。
在一些可能的设计中,所述处理单元,具体用于确定所述第一链路状态信息中携带有所述指示标识,删除所述第三链路状态信息。
在一些可能的设计中,所述第一链路状态信息携带在开放式最短路径优先OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的报文头的选项options字段中。
需要说明的是,第三方面提供的第一网络设备,对应于第一方面提供的方法,故第三方面提供的第一网络设备的各种可能的实现方式以及达到的技术效果,可以参照前述第一方面提供的方法的介绍。
第四方面,本申请实施例提供了一种第一网络设备,包括:接收单元、判断单元和处理单元。其中,接收单元用于接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息携带有用于计算到达第三网络设备的路由的信息;判断单元用于根据所述第一链 路状态信息判断所述第一网络设备是否存储有从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;处理单元用于在确定所述第一网络设备存储有所述第二链路状态信息的情况下,根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
在一些可能的设计中,处理单元还用于在判断单元确定所述第一网络设备未存储所述第二链路状态信息的情况下,启动定时器;判断单元还用于在所述定时器计时期间,判断所述第一网络设备是否接收到所述第二网络设备发送的所述第二链路状态信息。
在一些可能的设计中,处理单元单元还用于在判断单元确定在所述定时器超时之前接收到所述第二链路状态信息的情况下,根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
在一些可能的设计中,处理单元还用于在判断单元确定在所述定时器超时之后仍未接收到所述第二链路状态信息的情况下,避免根据所述第一链路状态信息更新到达所述第三网络设备的路由。
在一些可能的设计中,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备在根据所述第一链路状态信息更新所述第三网络设备的路由时,判断是否存储有所述第二链路状态信息。
在一些可能的设计中,所述判断单元,具体用于在确定所述第一链路状态信息携带有所述指示标识的情况下,判断所述第一网络设备是否存储有所述第二链路状态信息。
在一些可能的设计中,所述第一链路状态信息携带在OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的报文头的选项options字段中。
需要说明的是,第四方面提供的第一网络设备,对应于第二方面提供的方法,故第四方面提供的第一网络设备的各种可能的实现方式以及达到的技术效果,可以参照前述第二方面提供的方法的介绍。
第五方面,本申请实施例还提供了一种网络设备,该网络设备包括存储器和处理器;其中,存储器用于存储程序代码;处理器,用于运行所述程序代码中的指令,使得该网络设备执行前述第一方面任意一种实现方式或第二方面任意一种实现方式的方法。
第六方面,本申请实施例还提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行前述第一方面任意一种实现方式或第二方面任意一种实现方式的方法。
第七方面,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得该计算机或处理器执行前述第一方面任意一种实现方式或第二方面任意一种实现方式的方法。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1为本申请实施例中一应用场景所涉及的网络系统框架示意图;
图2为本申请实施例中一种链路状态信息的处理方法的流程示意图;
图3为本申请实施例中一种LSA header的结构示意图;
图4为本申请实施例中一种LSA Header中options字段的结构示意图;
图5为本申请实施例中一种链路状态信息的处理方法的流程示意图;
图6为本申请实施例中一种链路状态信息的处理方法的流程示意图;
图7为本申请实施例中一种链路状态信息的处理装置的结构示意图;
图8为本申请实施例中一种链路状态信息的处理装置的结构示意图;
图9为本申请实施例中一种网络设备的结构示意图;
图10为本申请实施例中一种网络设备的结构示意图。
下面结合附图,对本申请的实施例进行描述。
例如,在图1所示的场景示例中,当ASG(英文:aggregation site gateway,简称:ASG)103与运营商(英文:provider,简称:P)设备105之间的链路和/或ASG 103与ASG 104之间的链路没有故障时,从ASG 103到CSG 109的路径可达,流量通过从基站侧网关(英文:Cell site gateway,简称CSG)101到CSG 109的段路由(英文:segment routing,简称:SR)隧道A进行传输,其中,SR隧道A经过的节点包括CSG 101、ASG 103、P设备105、ASG 107和CSG 109。当ASG 103与P设备105之间的链路以及ASG 103与ASG 104之间的链路都出现了故障时,从ASG 103到CSG 109的路径不可达,CSG 101可以将流量从SR隧道A切换到SR隧道B进行传输,其中,SR隧道B经过的节点包括CSG 101、CSG 102、ASG 104、P 106、ASG 108和CSG 109。此外,在CSG 101将流量从SR隧道A切换到SR隧道B进行传输之后,如果ASG 103与P设备105之间的链路和/或ASG 103与ASG 104之间的链路从故障中恢复,从ASG 103到CSG 109的路径可达,CSG 101可以将流量从SR隧道B切回到SR隧道A进行传输。
在有些情况下,如网络采用开放式最短路径优先(英文:Open Shortest Path First,简称:OSPF)协议,当ASG 103与P设备105之间的链路以及ASG 103与ASG 104之间的链路都出现了故障时,ASG 103会向CSG 101发送两种不同的链路状态信息,以通知CSG 101不再使用SR隧道A向CSG 109发送流量。其中,一种链路状态信息A用于指示CSG 101删除此前从ASG 103接收到的链路状态信息E,链路状态信息E携带有CSG 109的SID,链路状态信息A可以携带在OSPF定义的不透明(英文:opaque)链路状态通告(英文:link state advertisement,简称:LSA)中发送。另一种链路状态信息B用于指示CSG 101删除此前从ASG 103接收到的链路状态信息F,链路状态信息B携带有用于计算到达CSG 109的路由的信息,链路状态信息B可以携带在OSPF定义的网络汇总LSA(英文:network summary LSA)等类型的LSA中发送。类似地,当ASG 103与P设备105之间的链路和/或ASG 103与ASG 104之间的链路从故障中恢复时,ASG 103也会向CSG 101发送两种不同的链路状态信息,以通知CSG 101再次使用SR隧道A向CSG 109发送流量。其中,一种链路状态信息C携带有CSG 109的SID,用于指示CSG 101根据链路状态信息C为到达CSG 109的路由提供CSG 109的SID,链路状态信息C可以携带在OSPF定义的opaque LSA中。另一种链路状态信息D携带有用于计算到达CSG 109的路由的信息,用于指示CSG 101根据链路状态信息D更新到达CSG 109的路由,链路状态信息D可以携带在OSPF定义的network summary LSA等类型的LSA中。
由于链路状态信息A和链路状态信息B是携带在不同的报文中进行传输,链路状态信息A和链路状态信息B在传输时不能保证顺序,因此,当ASG 103与P设备105之间的链路以及ASG 103与ASG 104之间的链路都出现了故障时,CSG 101可能先接收到链路状态信息A后接收到链路状态信息B,也可能先接收到链路状态信息B后接收到链路状态信息A。
当CSG 101接收到链路状态信息A时,CSG 101会在其链路状态数据库(英文:link state database,简称:LSDB)中删除此前从ASG 103接收到的链路状态信息E,其中,链路状态信息E携带有CSG 109的SID。但如果此时CSG 101还未接收到链路状态信息B,CSG 101的LSDB中还存储有此前从ASG 103接收到的链路状态信息F,其中,链路状态信息F携带有用于计算到达CSG 109的路由的信息。当LSDB中的链路状态F没有被删除时,CSG 101并不会删除根据链路状态信息F计算出的经过ASG 103到达CSG 109的路由,CSG 101也不会根据LSDB中记录的ASG 104发送的链路状态信息重新计算出经过ASG 104到达CSG 109的路由,因此,CSG 101并不会将流量从SR隧道A切换到SR隧道B进行转发。而当LSDB中删除了链路状态信息E,CSG 101会删除与经过ASG 103到达CSG 109的路由对应的CSG 109的SID,因此,CSG 101也不能继续使用SR隧道A进行流量转发。直到CSG 101接收到链路状态信息B之后,CSG 101才会在其LSDB中删除链路状态信息F。当LSDB中的链路状态信息F被删除后,CSG 101会删除根据链路状态信息F计算出的经过ASG 103到达CSG 109的路由。然后,根据ASG 104发送的链路状态信息计算出经过ASG 104到达CSG 109的路由,从而将流量从SR隧道A切换到了SR隧道B进行转发。可见,由于链路状态信息A和链路状态信息B在传输时不能保证顺序,如果CSG 101先接收到链路状态信息A再接收到链路状态信息B,在CSG 101接收到链路状态信息A但未接收到链路状态信息B的这段时间,CSG 101既不能继续使用SR隧道A进行流量转发,也不能将流量从SR隧道A切换到SR隧道B进行转发,从而就会导致流量丢包。
进一步地,由于链路状态信息C和链路状态信息D是也携带在不同的报文中进行传输,链路状态信息C和链路状态信息D在传输时不能保证顺序,因此,当ASG 103与P设备105之间的链路和/或ASG 103与ASG 104之间的链路从故障中恢复时,CSG 101可能先接收到链路状态信息C,然后接收到链路状态信息D,也可能先接收到链路状态信息D,然后接收到链路状态信息C。
当CSG 101接收到链路状态信息D时,CSG 101会将链路状态信息D记录其LSDB中。当LSDB中记录了链路状态信息D,CSG 101会根据链路状态信息D计算出经过ASG 103到达CSG 109的路由,并将从经过ASG 104到达CSG 109的路由更新为经过ASG 103到达CSG 109的路由,这样CSG 101就不会再使用SR隧道B进行流量转发。但如果此时CSG 101还未接收到链路状态信息C,CSG 101的LSDB中没有记录链路状态信息C,CSG 101就不能根据链路状态信息C为经过ASG 103到达CSG 109的路由提供CSG 109的SID,因此,CSG 101也无法使用SR隧道A进行流量转发。直到CSG 101接收到链路状态信息C之后,CSG 101将链路状态信息C记录到其LSDB。当LSDB中记录了链路状态信息C,CSG 101才能够根据链路状态信息C为经过ASG 103到达CSG 109 的路由提供CSG 109的SID,因此,CSG 101才能够使用SR隧道A进行流量转发。可见,由于链路状态信息C和链路状态信息D在传输时不能保证顺序,如果CSG 101先接收到链路状态信息D再接收到链路状态信息C,在CSG 101接收到链路状态信息D但未接收到链路状态信息C的这段时间,CSG 101既不能继续使用SR隧道B进行流量转发,也不能将流量从SR隧道B切回到SR隧道A进行转发,从而导致流量丢包。
为了避免先接收到链路状态信息A再接收到链路状态信息B而导致的流量丢包,当CSG 101接收到链路状态信息A时,CSG 101可以在其LSDB中删除链路状态信息E和链路状态信息F。这样,即使此时CSG 101还未收到链路状态信息B,在CSG 101的LSDB中链路状态信息E和链路状态信息F也可以都被删除。因此,CSG 101不仅会删除经过ASG 103到达CSG 109的路由提供的CSG 109的SID,而且也会删除经过ASG 103到达CSG 109的路由,从而避免CSG 101在ASG 103与CSG 109之间的链路出现故障时继续使用SR隧道A进行流量转发,从而避免流量丢包。进一步,CSG 101会根据LSDB中记录的ASG 104发送的链路状态信息计算出从经过ASG 104到达CSG 109的路由并为经过ASG 104到达CSG 109的路由提供CSG 109的SID,这样CSG 101能够将流量从SR隧道A切换到了SR隧道B进行转发。由此可见,在链路状态信息A和链路状态信息B在传输时不能保证顺序的情况下,即使CSG 101先接收到链路状态信息A再接收到链路状态信息B,在CSG 101接收到链路状态信息A但未接收到链路状态信息B的这段时间,CSG 101能够将流量从SR隧道A切换到SR隧道B进行转发,从而避免流量丢包。
为了避免上述先接收链路状态信息D后接收链路状态信息C而导致的丢包问题,在CSG 101接收到链路状态信息D之后,CSG 101可以判断其LSDB中是否已记录了链路状态信息C。若此时CSG 101已接收到了链路状态信息C,并且链路状态信息C已经记录到CSG 101的LSDB,CSG 101可以将链路状态信息D记录到其LSDB。若此时CSG 101还未接收到链路状态信息C,CSG 101等待至链路状态信息C记录到其LSDB之后再将链路状态信息D记录到其LSDB。这样,即使CSG 101先收到链路状态信息D后收到链路状态信息C,CSG 101的LSDB中也会在记录了链路状态信息C的情况下记录链路状态信息D。因此,CSG 101根据LSDB更新路由时,既能够根据链路状态信息D将到达CSG 109的路由更新经过ASG 103到达CSG 109的路由,又能够根据链路状态信息C为经过ASG 103到达CSG 109的路由提供CSG 109的SID,这样CSG 101就能够将流量切回SR隧道A进行转发。因此,在链路状态信息C和链路状态信息D在传输时不能保证顺序的情况下,即使CSG 101先接收到链路状态信息D再接收到链路状态信息C,在CSG 101接收到链路状态信息D但未接收到链路状态信息C的这段时间,CSG 101能够继续使用SR隧道B进行流量转发,从而避免流量丢包。
需要说明的是,图1所示的网络可以是OSPF网络。例如,ASG 103、ASG 104可以是两个OSPF区域(英文:area)交界处的设备。如,area 1包括CSG 101、CSG 102、ASG 103和ASG 104,area 2包括ASG 103、ASG 104、P 105、P 106、ASG 107和ASG 108。又如,ASG 103、AGS 104可以是两个OSPF进程(英文:process)交界处的设备。如,进程OSPF 1包括CSG 101、CSG 102、ASG 103和ASG 104,进程OSPF 2包括ASG 103、ASG 104、P 105、P 106、ASG 107和ASG 108。此外,图1所示的网络 也可以是中间系统到中间系统(英文:intermediate system to intermediate system,简称:IS-IS)网络。
可以理解的是,上述场景仅是本申请实施例提供的一个场景示例,本申请实施例并不限于此场景。
结合图1所示的场景,本申请实施例提供了一种链路状态信息的处理方法200,如图2所示,该方法200可以包括:
201、CSG 101接收ASG 103发送的链路状态信息。
在SR网络中,当ASG 103到CSG 109的链路出现故障时,ASG 103可以向CSG 101发送用于指示CSG 101删除链路状态信息E的链路状态信息A,ASG 103还会发送用于指示CSG 101删除链路状态信息F的链路状态信息B。其中,链路状态信息E和链路状态信息F为由ASG 103发送给CSG 101的,并且已经记录在CSG 101的LSDB中。链路状态信息E携带有CSG 109的SID,链路状态信息F携带有用于计算到达CSG 109的路由的信息。该用于计算到达CSG 109的路由的信息可以包括CSG 109的设备标识、ASG 103的设备标识等,CSG 109的设备标识可以是CSG 109的互联网协议(英文:Internet Protocol,简称:IP)地址,ASG 103的设备标识可以是ASG 103的IP地址。
当ASG 103到CSG 109的链路故障排除时,ASG 103可以向CSG 101发送携带有CSG 109的SID的链路状态信息C,ASG 103还会向CSG 101发送用于指示CSG 101更新到达CSG 109的路由的链路状态信息D。其中,链路状态信息D携带有用于计算到达CSG 109的路由的信息。该用于计算到达CSG 109的路由的信息可以包括CSG 109的设备标识、ASG 103的设备标识等,CSG 109的设备标识可以是CSG 109的IP地址,ASG 103的设备标识可以是ASG 103的IP地址。
可以理解的是,由于链路状态信息A和链路状态信息B是携带在两个不同的报文中发送,链路状态信息A和链路状态信息B在传输时不能保证顺序。ASG 103可能同时发送链路状态信息A和链路状态信息B,也可能先发送链路状态信息A再发送链路状态信息B,还可能先发送链路状态信息B再发送链路状态信息A。CSG 101可能同时接收到链路状态信息A和链路状态信息B,也可能先接收到链路状态信息A再接收到链路状态信息B,还可能先接收到链路状态信息B再接收到链路状态信息A。此外,由于链路状态信息C和链路状态信息D也是携带在两个不同的报文中发送,链路状态信息C和链路状态信息D在传输时也不能保证顺序。ASG 103可能同时发送链路状态信息C和链路状态信息D,也可能先发送链路状态信息C再发送链路状态D,还可能先发送链路状态信息D再发送链路状态信息C。CSG 101可能同时接收到链路状态信息C和链路状态信息D,也可能先接收到链路状态信息C再接收到链路状态信息D,还可能先接收到链路状态信息D再接收到链路状态信息C。
举例来说,CSG 101和ASG 103所在的网络可以是OSPF网络,则ASG 103向CSG 101发送的链路状态信息可以携带在OSPF协议定义的LSA中。具体地,链路状态信息A、链路状态信息C和链路状态信息E可以是携带在opaque LSA中由ASG 103向CSG 101发送。链路状态信息B、链路状态信息D和链路状态信息F可以是携带在 路由器LSA(英文:router LSA)、网络LSA(英文:network LSA)、network summary LSA、自治系统边界路由器(英文:autonomous system boundary router,简称:ASBR)汇总LSA(英文:ASBR summary LSA)、自治系统(英文:autonomous system,简称:AS)外部LSA(英文:AS external LSA)或非完全末节区域(英文:not so stubby area,简称:NSSA)LSA中由ASG 103向CSG 101发送。
在一些实施方式中,若CSG 101和ASG 103所在的网络是OSPF网络,则ASG 103可以是两个OSPF area交界处的设备或者两个OSPF进程交界处的设备。例如,CSG 101和ASG 103都位于OSPF area 1,ASG 103也位于OSPF area 2,ASG 103从OSPF area 1接收CSG 101发送的流量并将流量向OSPF area 2发送,从而使流量传输到CSG 109。又如,CSG 101和ASG 103都位于OSPF process 1,AGS 103也位于OSPF process 2,ASG 103从OSPF process 1接收CSG 101发送的流量并将流量向OSPF process 2发送,从而使流量传输到CSG 109。
此外,CSG 101和ASG 103所在的网络也可以是IS-IS网络,则ASG 103向CSG 101发送的链路状态信息可以携带在IS-IS协议定义的链路状态报文(英文:Link State PDU,简称:LSP)中。
202、若所述链路状态信息为链路状态信息A,CSG 101根据所述链路状态信息A,在LSDB中删除链路状态信息E和链路状态信息F。
当CSG 101的LSDB中存储有链路状态信息F时,CSG 101的路由表中记录有经过ASG 103到达CSG 109的路由1。当CSG 101的LSDB中存储有链路状态信息E时,CSG 101的路由表中为路由1记录了CSG 109的SID,并且,CSG 101的转发表中记录有转发表项1,转发表项1包含CSG 109的SID和路由1中CSG 101的下一跳网络设备。这样,CSG 101就可以使用SR隧道A进行流量转发。
当CSG 101接收到链路状态信息A时,CSG 101可以在其LSDB中删除链路状态信息E和链路状态信息F,其中,该链路状态信息A可以用于指示CSG 101删除其上保存的关于CSG 109的链路状态信息,即,链路状态信息E和链路状态信息F,那么,该链路状态信息A即可视作该CSG 109的链路状态信息。这样,即使此时CSG 101还未收到链路状态信息B,在CSG 101的LSDB中链路状态信息E和链路状态信息F也可以都被删除。当CSG 101的LSDB中删除了链路状态信息E,CSG 101的路由表中会删除路由1的CSG 109的SID,路由1没有CSG 109的SID时CSG 101的转发表中也会删除转发表项1。这样,CSG 101就不再使用SR隧道A进行流量转发。当CSG 101的LDSB中删除了链路状态信息F,CSG 101的路由表中会删除路由1。然后,CSG 101会根据LSDB中记录的ASG 104发送的链路状态信息计算出经过ASG 104到达CSG 109的路由2,将路由2记录到路由表并在路由表中为路由2记录CSG 109的SID,再在转发表中建立转发表项2,其中,转发表项2记录有CSG 109的SID和路由2中CSG 101的下一跳。这样,CSG 101可以使用SR隧道B进行流量转发。由此可见,在链路状态信息A和链路状态信息B在传输时不能保证顺序的情况下,即使CSG 101先接收到链路状态信息A再接收到链路状态信息B,在CSG 101接收到链路状态信息A但未接收到链路状态信息B的这段时间,CSG 101也能够将流量从SR隧道A切换到SR隧道B进行转发,从而避免流量丢包。
在一些实施方式中,链路状态信息A可以携带有第一指示标识,以用于指示CSG 101在LSDB中删除链路状态信息F。在CSG 101接收到链路状态信息A之后,如果CSG 101从链路状态信息A中读取到第一指示标识,CSG 101除了根据链路状态信息A在CSG 101的LSDB中删除链路状态信息E之外,还可以根据链路状态信息A中的第一指示标识在CSG 101的LSDB中删除链路状态信息F。如果CSG 101从链路状态信息A中读取不到第一指示标识,CSG 101可以根据链路状态信息A在CSG 101的LSDB中删除链路状态信息E,而避免根据链路状态信息A在CSG 101的LSDB中删除链路状态信息F。可见,通过在链路状态信息A中携带第一指示标识,ASG 103可以向CSG 101指定是否同步删除链路状态信息E和链路状态信息F,从而使得路由撤销的处理方式能够更为灵活地配置。
若链路状态信息A携带在OSPF协议定义的第一LSA中发送,第一指示标识可以携带在第一LSA的LSA头(英文:header)。参考因特网工程任务组(英文:Internet Engineering Task Force,简称:IETF)请求注解(英文:Request For Comments,简称:RFC)2328的说明,第一LSA可以采用如图3所示的LSA header。其中,第一指示标识可以携带在LSA header的选项(英文:options)字段。参考IETF的RFC5250的说明,第一LSA的LSA header中的options字段可以采用如图4所示的结构。其中,外部属性比特位(英文:external attributes bit,简称:EA bit)已经明确被取消了。因此,在第一LSA的LSA header的options字段中,EA bit可以被替换为SR bit,该SR bit用于携带第一指示标识。具体地,若第一LSA中的SR bit被置位,链路状态信息A携带有第一指示标识。若第一LSA的SR bit没有置位,链路状态信息A没有携带第一指示标识。
需要说明的是,在图3所示的LSA header中包括链路状态生存时间(英文:LS age)字段、options字段、链路状态类型(英文:LS type)、链路状态标识(英文:link state ID)字段、通告路由器(英文:advertising router)字段、链路状态序列号(英文:LS sequence number)、链路状态校验和(英文:LS checksum)和长度(英文:length)字段。在图4所示的options字段中包括DN bit(用于防止环路)、O bit(用于标识是否接收透明LSA)、EA bit(用于标识是否接收外部属性的LSA)、DC bit(用于标识路由器处理的电路)、N/P bit(用于标识处理类型为7的LSA)、MC bit(用于标识是否转发组播报文)、E bit(用于标识泛洪LSA的方式)和MT bit(用于标识多拓扑能力)。
203、若所述链路状态信息为链路状态信息B,CSG 101根据所述链路状态信息B,在LSDB中删除链路状态信息F。
当CSG 101接收到链路状态信息B时,CSG 101可以在其LSDB中删除链路状态信息F。当LSDB中删除了链路状态信息F时,CSG 101的路由表会删除路由1。然后,CSG 101会根据LSDB中记录的ASG 104发送的链路状态信息计算出路由2,将路由2记录到路由表并在路由表中为路由2记录CSG 109的SID,再在转发表中建立转发表项2。这样,CSG 101可以使用SR隧道B进行流量转发。由此可见,在链路状态信息A和链路状态信息B在传输时不能保证顺序的情况下,即使CSG 101先接收到链路状态信息B再接收到链路状态信息A,在CSG 101接收到链路状态信息B但未接收到链 路状态信息A的这段时间,CSG 101也能够将流量从SR隧道A切换到SR隧道B进行转发,从而避免流量丢包。
在一些实施方式中,链路状态信息B可以携带有第二指示标识,以用于指示CSG 101在LSDB中删除链路状态信息E。在CSG 101接收到链路状态信息B之后,如果CSG 101从链路状态信息B中读取到第二指示标识,CSG 101可以除了根据链路状态信息B在CSG 101的LSDB中删除链路状态信息F之外,还可以根据链路状态信息B中的第二指示标识在CSG 101的LSDB中删除链路状态信息E,或者,CSG 101也可以忽略第二指示标识,避免根据链路状态信息B中的第二指示标识在CSG 101的LSDB中删除链路状态信息E。如果CSG 101从链路状态信息B中读取不到第二指示标识,CSG 101可以根据链路状态信息B在CSG 101的LSDB中删除链路状态信息F,而避免根据链路状态信息B在CSG 101的LSDB中删除链路状态信息E。可见,通过在链路状态信息B中携带第二指示标识,ASG 103可以向CSG 101指定是否同步删除链路状态信息E和链路状态信息F,从而使得路由撤销的处理方式能够更为灵活地配置。
若链路状态信息B携带在OSPF协议定义的第二LSA中,第二指示标识可以携带在第二LSA的LSA header。参考IETF的RFC2328的说明,第二LSA可以采用如图3所示的LSA header。其中,第二指示标识可以携带在第二LSA的LSA header的options字段。参考IETF的RFC5250的说明,第二LSA的LSA header中的options字段可以采用如图4所示的结构。其中,EA bit已经明确被取消了。因此,在第二LSA的LSA header的options字段中,EA bit可以被替换为SR bit,该SR bit用于携带第二指示标识。具体地,若第二LSA中的SR bit被置位,链路状态信息B携带有第二指示标识。若第二LSA的SR bit没有置位,链路状态信息B没有携带第二指示标识。
204、若所述链路状态信息为链路状态信息C,CSG 101将所述链路状态信息C记录到CSG 101的LSDB中。
当CSG 101接收到链路状态信息C时,CSG 101可以将链路状态信息C记录到其LSDB中。如果此时CSG 101还未接收到链路状态信息D,CSG 101不会将根据链路状态信息D计算出的路由1更新到路由表,因而不会删除路由表中的路由2及其CSG 109的SID,也不会删除转发表中的转发表项2,这样CSG 101会继续使用SR隧道B进行流量转发。可见,在链路状态信息C和链路状态信息D在传输时不能保证顺序的情况下,即使CSG 101先接收到链路状态信息C再接收到链路状态信息D,在CSG 101接收到链路状态信息C但未接收到链路状态信息D的这段时间,CSG 101会继续使用SR隧道B进行流量转发,从而避免流量丢包。
在一些实施方式中,链路状态信息C可以携带有第三指示标识,以用于指示CSG 101在LSDB中同步记录链路状态信息C和链路状态信息D。在CSG 101接收到链路状态信息C之后,如果CSG 101从链路状态信息C中读取到第三指示标识,CSG 101可以根据链路状态信息C中的第三指示标识,在链路状态信息C和链路状态信息D都接收到的情况下,同步将链路状态信息C和链路状态信息D都记录到LSDB,或者,CSG 101也可以忽略第三指示信息,将链路状态信息C记录到CSG 101的LSDB中,而不必确定此时是否已接收到链路状态信息D,也不必保证链路状态信息C和链路状态信息D同时记录在CSG 101的LSDB中。如果CSG 101从链路状态信息C中读取不到第三指示标 识,CSG 101可以将链路状态信息C记录到CSG 101的LSDB中,而不必保证链路状态信息C和链路状态信息D同时记录在CSG 101的LSDB中。可见,通过在链路状态信息C中携带第三指示标识,ASG 103可以向CSG 101指定是否同步更新链路状态信息C和链路状态信息D,从而使得路由更新的处理方式能够更为灵活地配置。
若链路状态信息C携带在OSPF协议定义的第三LSA中,第三指示标识可以携带在第三LSA的LSA header。参考IETF的RFC2328的说明,第三LSA可以采用如图3所示的LSA header。其中,第三指示标识可以携带在第三LSA的LSA header的options字段。参考IETF的RFC5250的说明,第三LSA的LSA header中的options字段可以采用如图4所示的结构。其中,EA bit已经明确被取消了。因此,在第三LSA的LSA header的options字段中,EA bit可以被替换为SR bit,该SR bit用于携带第三指示标识。具体地,若第三LSA中的SR bit被置位,链路状态信息C携带有第三指示标识。若第三LSA的SR bit没有置位,链路状态信息C没有携带第三指示标识。
205、若所述链路状态信息为链路状态信息D,CSG 101在CSG 101的LSDB中已记录链路状态信息C的情况下,将所述链路状态信息D记录到CSG 101的LSDB中。
当CSG 101接收到链路状态信息D时,CSG 101可以判断其LSDB中是否已记录了链路状态信息C。若此时CSG 101已接收到了链路状态信息C,并且链路状态信息C已经记录到CSG 101的LSDB,CSG 101可以将链路状态信息D记录到其LSDB。若此时CSG 101还未接收到链路状态信息C,CSG 101等待至链路状态信息C记录到其LSDB之后再将链路状态信息D记录到其LSDB。这样,即使CSG 101先收到链路状态信息D再收到链路状态信息C,CSG 101的LSDB中也会在记录了链路状态信息C的情况下记录链路状态信息D。当LSDB中记录了链路状态信息D时,CSG 101可以根据链路状态信息D计算出路由1,将路由表中的路由2替换成路由1,并在转发表中删除转发表项2。这样,CSG 101不再使用SR隧道B进行流量转发。当LSDB中记录了链路状态信息C时,CSG 101可以在路由1已记录到路由表的情况下,根据链路状态信息C在路由表中为路由1记录CSG 109的SID。这样,CSG 101就可以使用SR隧道A进行流量转发。因此,在链路状态信息C和链路状态信息D在传输时不能保证顺序的情况下,即使CSG 101先接收到链路状态信息D再接收到链路状态信息C,在CSG 101接收到链路状态信息D但未接收到链路状态信息C的这段时间,CSG 101可以继续使用SR隧道B进行流量转发,而在CSG 101接收到链路状态信息C和链路状态信息D之后,CSG 101可以将流量从SR隧道B切回到SR隧道A进行转发,从而避免流量丢包。具体实现时,当CSG 101接收到链路状态信息D时,CSG 101可以判断链路状态信息C是否记录在CSG 101LSDB中。如果链路状态信息C已记录在CSG 101的LSDB中,CSG 101可以将链路状态信息D也记录到CSG 101的LSDB,从而CSG 101可以根据LSDB中的链路状态信息D更新到达CSG 109的路由。如果链路状态信息C没有记录在CSG 101的LSDB中,CSG 101可以启动定时器(英文:timer)等待预设时间,如,定时器每次启动等待1秒则超时重启,重启2次之后再超时则达到预设时间,即预设时间为3秒。在定时器控制的预设时间之内,如果CSG 101接收到了链路状态信息C并将链路状态信息C记录到CSG 101的LSDB中,则CSG 101可以将链路状态信息D也记录到CSG 101的LSDB中。如果在定时器控制的预设时间 之后,CSG 101还未收到链路状态信息C,链路状态信息C还未记录到CSG 101的LSDB中,则CSG 101可以将链路状态信息D丢弃。
在一些实施方式中,链路状态信息D可以携带有第四指示标识,以用于指示CSG 101在LSDB中同步记录链路状态信息C和链路状态信息D。在CSG 101接收到链路状态信息D之后,如果CSG 101从链路状态信息D中读取到第四指示标识,CSG 101可以根据链路状态信息D中的第四指示标识,在已接收到链路状态信息C并将链路状态信息C记录到CSG 101的LSDB中之后,将链路状态信息D记录到CSG 101的LSDB中。如果CSG 101从链路状态信息D中读取不到第四指示标识,CSG 101可以将链路状态信息D记录到CSG 101的LSDB中,而不必保证在链路状态信息C记录到LSDB的情况下再将链路状态信息D记录到LSDB。可见,通过在链路状态信息D中携带第四指示标识,ASG 104可以向CSG 101指定是否同步更新链路状态信息C和链路状态信息D,从而使得路由更新的处理方式能够更为灵活地配置。
若链路状态信息D携带在OSPF协议定义的第四LSA中,第四指示标识可以携带在第四LSA的LSA header。参考IETF的RFC2328的说明,第四LSA可以采用如图3所示的LSA header。其中,第四指示标识可以携带在第四LSA的LSA header的options字段。参考IETF的RFC5250的说明,第四LSA的LSA header中的options字段可以采用如图4所示的结构。其中,EA bit已经明确被取消了。因此,在第四LSA的LSA header的options字段中,EA bit可以被替换为SR bit,该SR bit用于携带第四指示标识。具体地,若第四LSA中的SR bit被置位,链路状态信息D携带有第四指示标识。若第四LSA的SR bit没有置位,链路状态信息D没有携带第四指示标识。
在本实施例中,一方面,在链路状态信息A和链路状态信息B在传输时不能保证顺序的情况下,无论是在CSG 101接收到链路状态信息A但未接收到链路状态信息B的情况下,还是在CSG 101接收到链路状态信息B但未接收到链路状态信息A的情况下,CSG 101都能够将流量从SR隧道A切换到SR隧道B进行转发,从而避免流量丢包。另一方面,在链路状态信息C和链路状态信息D在传输时不能保证顺序的情况下,无论是在CSG 101接收到链路状态信息C但未接收到链路状态信息D的情况下,还是在CSG 101接收到链路状态信息D但未接收到链路状态信息C的情况下,CSG 101都可以继续使用SR隧道B进行流量转发,直到CSG 101接收到链路状态信息C和链路状态信息D之后,CSG 101可以将流量从SR隧道B切回到SR隧道A进行转发,从而避免流量丢包。
图5为本申请实施例中一种链路状态信息的处理方法的流程示意图。该方法500可以包括:
501、第一网络设备接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息为第三网络设备的信息;
502、响应于接收到所述第一链路状态信息,所述第一网络设备删除所述第一网络设备从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;
503、所述第一网络设备根据所述第一链路状态信息删除从所述第二网络设备接收 到的第三链路状态信息,所述第三链路状态信息携带有用于计算到达所述第三网络设备的路由的链路状态信息。
可以理解的是,第一链路状态信息可以用于指示第一网络设备删除其上保存的关于第三网络设备的链路状态信息,即,第二链路状态信息和第三链路状态信息,那么,该第一链路状态信息即可视作该第三网络设备的信息。
在一些实施方式中,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备删除所述第三链路状态信息。
在一些实施方式中,所述第一网络设备根据所述第一链路状态信息删除从所述第二网络设备接收到的第三链路状态信息包括:在所述第一网络设备确定所述第一链路状态信息中携带有所述指示标识的情况下,删除所述第三链路状态信息。
在一些实施方式中,所述第一链路状态信息携带在开放式最短路径优先OSPF协议的链路状态通告LSA,所述指示标识携带在所述链路状态信息的LSA头的选项options字段中。
需要说明的是,方法500中提及的第一网络设备可以是方法200中提及的CSG 101,方法500中提及的第二网络设备可以是方法200中提及的ASG 103,方法500中提及的第三网络设备可以是方法200中提及的CSG 109,方法500中提及的第一链路状态信息可以是方法200中提及的链路状态信息A,方法500中提及的第二链路状态信息可以是方法200中提及的链路状态信息E,方法500中提及的第三链路状态信息可以是方法200中提及的链路状态信息F,方法500中提及的指示标识可以是方法200中提及的第一指示标识。因此,方法500的各种具体实现方式,可以参见方法200中的相关介绍,本实施例不再赘述。
图6为本申请实施例中一种链路状态信息的处理方法的流程示意图。该方法600可以包括:
601、第一网络设备接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息携带有用于计算到达第三网络设备的路由的信息;
602、所述第一网络设备根据所述第一链路状态信息判断所述第一网络设备是否存储有从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;
603、在所述第一网络设备确定所述第一网络设备存储有所述第二链路状态信息的情况下,所述第一网络设备根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
在一些实施方式中,所述方法600还包括:在所述第一网络设备确定所述第一网络设备未存储所述第二链路状态信息的情况下,启动定时器;在所述定时器计时期间,判断所述第一网络设备是否接收到所述第二网络设备发送的所述第二链路状态信息。
在一些实施方式中,所述方法600还包括:在所述第一网络设备确定在所述定时器超时之前接收到所述第二链路状态信息的情况下,所述第一网络设备根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
在一些实施方式中,所述方法600还包括:在所述第一网络设备确定在所述定时 器超时之后仍未接收到所述第二链路状态信息的情况下,所述第一网络设备避免根据所述第一链路状态信息更新到达所述第三网络设备的路由。
在一些实施方式中,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备在根据所述第一链路状态信息更新所述第三网络设备的路由时,判断是否存储有所述第二链路状态信息。
在一些实施方式中,所述第一网络设备根据所述第一链路状态信息判断所述第一网络设备是否存储有从所述第二网络设备接收到的第二链路状态信息包括:在所述第一网络设备确定所述第一链路状态信息携带有所述指示标识的情况下,判断所述第一网络设备是否存储有所述第二链路状态信息。
在一些实施方式中,所述第一链路状态信息携带在OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的LSA头的选项options字段中。
需要说明的是,方法600中提及的第一网络设备可以是方法200中提及的CSG 101,方法600中提及的第二网络设备可以是方法200中提及的ASG 103,方法600中提及的第三网络设备可以是方法200中提及的CSG 109,方法600中提及的第一链路状态信息可以是方法200中提及的链路状态信息D,方法600中提及的第二链路状态信息可以是方法200中提及的链路状态信息C,方法600中提及的指示标识可以是方法200中提及的第四指示标识。因此,方法600的各种具体实现方式,可以参见方法600中的相关介绍,本实施例不再赘述。
图7为本申请实施例中一种链路状态信息的处理装置的结构示意图。该装置700为第一网络设备,包括:
接收单元701,用于接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息为第三网络设备的链路状态信息;
处理单元702,用于响应于接收到所述第一链路状态信息,删除所述第一网络设备从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;
所述处理单元702,还用于根据所述第一链路状态信息删除从所述第二网络设备接收到的第三链路状态信息,所述第三链路状态信息携带有用于计算到达所述第三网络设备的路由的信息。
在一些实施方式中,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备删除所述第三链路状态信息。
在一些实施方式中,所述处理单元702,具体用于在确定所述第一链路状态信息中携带有所述指示标识的情况下,删除所述第三链路状态信息。
在一些实施方式中,所述第一链路状态信息携带在开放式最短路径优先OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的LSA头的选项options字段中。
可以理解的是,图7所示的装置700可以是图2所示的方法200中提及的CSG 101,因此,装置700的各种具体实施例方式,可以参见方法200的相关介绍,本实施例不再赘述。
图8为本申请实施例中一种链路状态信息的处理装置的结构示意图。该装置800为第一网络设备,包括:
接收单元801,用于接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息携带有用于计算到达第三网络设备的路由的链路状态信息;
判断单元802,用于根据所述第一链路状态信息判断所述第一网络设备是否存储有从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;
处理单元803,在确定所述第一网络设备存储有所述第二链路状态信息的情况下,根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
在一些实施方式中,
所述处理单元803,还用于在所述判断单元802确定所述第一网络设备未存储所述第二链路状态信息的情况下,启动定时器;
判断单元802,还用于在所述定时器计时期间,判断所述第一网络设备是否接收到所述第二网络设备发送的所述第二链路状态信息。
在一些实施方式中,
所述处理单元,还用于在所述判断单元802确定在所述定时器超时之前接收到所述第二链路状态信息的情况下,根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
在一些实施方式中,
所述处理单元803,用于在所述判断单元802确定在所述定时器超时之后仍未接收到所述第二链路状态信息的情况下,避免根据所述第一链路状态信息更新到达所述第三网络设备的路由。
在一些实施方式中,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备在根据所述第一链路状态信息更新所述第三网络设备的路由时,判断是否存储有所述第二链路状态信息。
在一些实施方式中,所述判断单元802,具体用于在确定所述第一链路状态信息携带有所述指示标识的情况下,判断所述第一网络设备是否存储有所述第二链路状态信息。
在一些实施方式中,所述第一链路状态信息携带在OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的LSA头的选项options字段中。
可以理解的是,图8所示的装置800可以是图2所示的方法200中提及的CSG 101,因此,装置800的各种具体实施例方式,可以参见方法800的相关介绍,本实施例不再赘述。
图9为本申请实施例中一种网络设备的结构示意图。该网络设备900包括存储器901、处理器902和通信接口903;其中,存储器901用于存储程序代码;处理器902,用于运行所述程序代码中的指令,使得该网络设备900执行方法500中任意一种实现方式的方法;通信接口903,用于向其他网络设备发送信息或接收其他网络设备发送 的信息。
图10为本申请实施例中一种网络设备的结构示意图。该网络设备1000包括存储器1001、处理器1002和通信接口1003;其中,存储器1001用于存储程序代码;处理器1002,用于运行所述程序代码中的指令,使得该网络设备1000执行方法600中任意一种实现方式的方法;通信接口903,用于向其他网络设备发送信息或接收其他网络设备发送的信息。
此外,本申请实施例还提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行前述方法500中任意一种实现方式的方法或方法600中任意一种实现方式的方法。
此外,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得该计算机或处理器执行前述方法500中任意一种实现方式的方法或方法600中任意一种实现方式的方法。
本申请实施例中提到的“第一链路状态信息”、“第一网络设备”等名称中的“第一”只是用来做名字标识,并不代表顺序上的第一。该规则同样适用于“第二”等。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如只读存储器(英文:read-only memory,ROM)/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如路由器等网络通信设备)执行本申请各个实施例或者实施例的某些部分所述的方法。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本申请示例性的实施方式,并非用于限定本申请的保护范围。
Claims (21)
- 一种链路状态信息的处理方法,其特征在于,包括:第一网络设备接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息为第三网络设备的链路状态信息;响应于接收到所述第一链路状态信息,所述第一网络设备删除所述第一网络设备从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;所述第一网络设备根据所述第一链路状态信息删除从所述第二网络设备接收到的第三链路状态信息,所述第三链路状态信息携带有用于计算到达所述第三网络设备的路由的信息。
- 根据权利要求1所述的方法,其特征在于,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备删除所述第三链路状态信息。
- 根据权利要求2所述的方法,其特征在于,所述第一网络设备根据所述第一链路状态信息删除从所述第二网络设备接收到的第三链路状态信息包括:在所述第一网络设备确定所述第一链路状态信息中携带有所述指示标识的情况下,删除所述第三链路状态信息。
- 根据权利要求2或3所述的方法,其特征在于,所述第一链路状态信息携带在开放式最短路径优先OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的报文头的选项options字段中。
- 一种链路状态信息的处理方法,其特征在于,包括:第一网络设备接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息携带有用于计算到达第三网络设备的路由的信息;所述第一网络设备根据所述第一链路状态信息判断所述第一网络设备是否存储有从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;在所述第一网络设备确定所述第一网络设备存储有所述第二链路状态信息的情况下,所述第一网络设备根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
- 根据权利要求5所述的方法,其特征在于,所述方法还包括:在所述第一网络设备确定所述第一网络设备未存储所述第二链路状态信息的情况下,所述第一网络设备启动定时器;在所述定时器计时期间,所述第一网络设备判断所述第一网络设备是否接收到所述第二网络设备发送的所述第二链路状态信息。
- 根据权利要求6所述的方法,其特征在于,所述方法还包括:在所述第一网络设备确定在所述定时器超时之前接收到所述第二链路状态信息的情况下,所述第一网络设备根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
- 根据权利要求6所述的方法,其特征在于,所述方法还包括:在所述第一网络设备确定在所述定时器超时之后仍未接收到所述第二链路状态信息的情况下,所述第一网络设备避免根据所述第一链路状态信息更新到达所述第三网络设备的路由。
- 根据权利要求5-8任一权利要求所述的方法,其特征在于,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备在根据所述第一链路状态信息更新所述第三网络设备的路由时,判断是否存储有所述第二链路状态信息。
- 根据权利要求9所述的方法,其特征在于,所述第一网络设备根据所述第一链路状态信息判断所述第一网络设备是否存储有从所述第二网络设备接收到的第二链路状态信息包括:在所述第一网络设备确定所述第一链路状态信息携带有所述指示标识的情况下,判断所述第一网络设备是否存储有所述第二链路状态信息。
- 根据权利要求9所述的方法,其特征在于,所述第一链路状态信息携带在OSPF协议的链路状态通告LSA中,所述指示标识携带在所述LSA的报文头的选项options字段中。
- 一种第一网络设备,其特征在于,包括:接收单元,用于接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息为第三网络设备的链路状态信息;处理单元,用于响应于接收到所述第一链路状态信息,删除所述第一网络设备从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;所述处理单元,还用于根据所述第一链路状态信息删除从所述第二网络设备接收到的第三链路状态信息,所述第三链路状态信息携带有用于计算到达所述第三网络设备的路由的信息。
- 根据权利要求12所述的第一网络设备,其特征在于,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备删除所述第三链路状态信息。
- 根据权利要求13所述的第一网络设备,其特征在于,所述处理单元,具体用于:在确定所述第一链路状态信息中携带有所述指示标识的情况下,删除所述第三链路状态信息。
- 一种第一网络设备,其特征在于,包括:接收单元,用于接收第二网络设备发送的第一链路状态信息,所述第一链路状态信息携带有用于计算到达第三网络设备的路由的信息;判断单元,用于根据所述第一链路状态信息判断所述第一网络设备是否存储有从所述第二网络设备接收到的第二链路状态信息,所述第二链路状态信息携带有所述第三网络设备的段标识;处理单元,在确定所述第一网络设备存储有所述第二链路状态信息的情况下,根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
- 根据权利要求15所述的第一网络设备,其特征在于,所述处理单元,还用于在所述判断单元确定所述第一网络设备未存储所述第二链路状态信息的情况下,启动定时器;所述判断单元,还用于在所述定时器计时期间,判断所述第一网络设备是否接收到所述第二网络设备发送的所述第二链路状态信息。
- 根据权利要求16所述的第一网络设备,其特征在于,所述处理单元,还用于在所述判断单元确定在所述定时器超时之前接收到所述第二链路状态信息的情况下,根据所述第一链路状态信息,更新到达所述第三网络设备的路由。
- 根据权利要求16所述的第一网络设备,其特征在于,所述处理单元,还用于在所述判断单元确定在所述定时器超时之后仍未接收到所述第二链路状态信息的情况下,避免根据所述第一链路状态信息更新到达所述第三网络设备的路由。
- 根据权利要求15-18任一权利要求所述的第一网络设备,其特征在于,所述第一链路状态信息携带有指示标识,所述指示标识用于指示接收到所述第一链路状态信息的网络设备在根据所述第一链路状态信息更新所述第三网络设备的路由时,判断是否存储有所述第二链路状态信息。
- 根据权利要求19所述的第一网络设备,其特征在于,所述判断单元,具体用于:在确定所述第一链路状态信息携带有所述指示标识的情况下,判断所述第一网络设备是否存储有所述第二链路状态信息。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得所述计算机执行权利要求1-11任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP20852393.6A EP4012987B1 (en) | 2019-08-14 | 2020-08-12 | Method and apparatus for processing link state information |
| US17/650,688 US12003412B2 (en) | 2019-08-14 | 2022-02-11 | Method and apparatus for processing link state information |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910749340.7 | 2019-08-14 | ||
| CN201910749340.7A CN110266587B (zh) | 2019-08-14 | 2019-08-14 | 一种链路状态信息的处理方法及装置 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US17/650,688 Continuation US12003412B2 (en) | 2019-08-14 | 2022-02-11 | Method and apparatus for processing link state information |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021027828A1 true WO2021027828A1 (zh) | 2021-02-18 |
Family
ID=67912097
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/108587 Ceased WO2021027828A1 (zh) | 2019-08-14 | 2020-08-12 | 一种链路状态信息的处理方法及装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US12003412B2 (zh) |
| EP (1) | EP4012987B1 (zh) |
| CN (2) | CN110266587B (zh) |
| WO (1) | WO2021027828A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110266587B (zh) * | 2019-08-14 | 2019-12-13 | 华为技术有限公司 | 一种链路状态信息的处理方法及装置 |
| CN112714006B (zh) * | 2019-10-24 | 2024-05-17 | 中兴通讯股份有限公司 | 链路故障状态通告方法、装置、设备及介质 |
| CN113014481B (zh) * | 2019-12-20 | 2022-06-24 | 华为技术有限公司 | 传输链路状态通告的方法、装置、设备及存储介质 |
| CN114465946B (zh) * | 2020-11-09 | 2023-08-04 | 华为技术有限公司 | 获取转发表项的方法、装置以及系统 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150139028A1 (en) * | 2013-11-18 | 2015-05-21 | Huawei Technologies Co., Ltd. | Method for controlling generation of routing information, method for generating routing information and apparatuses thereof |
| CN107241269A (zh) * | 2016-03-29 | 2017-10-10 | 丛林网络公司 | 提供商边缘网络设备及用于网络的方法 |
| CN108768845A (zh) * | 2018-04-03 | 2018-11-06 | 新华三技术有限公司 | 一种多归属主机路由同步方法及装置 |
| CN109194579A (zh) * | 2018-11-19 | 2019-01-11 | 盛科网络(苏州)有限公司 | 一种IPv6实现分段路由的方法及装置 |
| CN109218200A (zh) * | 2018-11-26 | 2019-01-15 | 新华三技术有限公司 | 一种报文处理方法及装置 |
| CN110266587A (zh) * | 2019-08-14 | 2019-09-20 | 华为技术有限公司 | 一种链路状态信息的处理方法及装置 |
Family Cites Families (34)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8199646B1 (en) * | 1999-12-07 | 2012-06-12 | Nortel Networks Limited | System, device, and method for distributing link state information in a communication network |
| US7515551B2 (en) * | 2005-01-18 | 2009-04-07 | Cisco Technology, Inc. | Techniques for reducing adjacencies in a link-state network routing protocol |
| US8320361B2 (en) * | 2009-02-27 | 2012-11-27 | Cisco Technology, Inc. | Advertising alternate paths at border gateway protocol route reflectors |
| CN102006240B (zh) * | 2010-12-09 | 2012-05-23 | 北京星网锐捷网络技术有限公司 | 一种在mpls网络中转发报文的方法、装置及系统 |
| CN102025552B (zh) * | 2011-01-12 | 2013-06-05 | 杭州华三通信技术有限公司 | 链路状态通告的备份方法及设备 |
| US9369371B2 (en) * | 2012-10-05 | 2016-06-14 | Cisco Technologies, Inc. | Method and system for path monitoring using segment routing |
| US9537718B2 (en) * | 2013-03-15 | 2017-01-03 | Cisco Technology, Inc. | Segment routing over label distribution protocol |
| US9325609B2 (en) * | 2013-08-23 | 2016-04-26 | Futurewei Technologies, Inc. | Segmented source routing in a network |
| US9660897B1 (en) * | 2013-12-04 | 2017-05-23 | Juniper Networks, Inc. | BGP link-state extensions for segment routing |
| US9450862B2 (en) * | 2014-03-11 | 2016-09-20 | Futurewei Technologies, Inc. | Virtual private network migration and management in centrally controlled networks |
| US9516118B2 (en) * | 2014-05-12 | 2016-12-06 | Telefonaktiebolaget L M Ericsson (Publ) | Scalable segment identifier allocation in segment routing |
| WO2016012043A1 (en) * | 2014-07-24 | 2016-01-28 | Telefonaktiebolaget L M Ericsson (Publ) | Segment routing in a multi-domain network |
| CN105450437B (zh) * | 2014-09-19 | 2020-03-06 | 中兴通讯股份有限公司 | 一种分配sid的方法和sr节点 |
| US9634928B2 (en) * | 2014-09-29 | 2017-04-25 | Juniper Networks, Inc. | Mesh network of simple nodes with centralized control |
| US20160095032A1 (en) * | 2014-09-30 | 2016-03-31 | Alcatel-Lucent Usa Inc. | Placement and use of wireless network functions in a virtualization environment |
| US10063463B2 (en) * | 2014-12-16 | 2018-08-28 | Cisco Technology, Inc. | Node protection for segment routing adjacency segments |
| CN105871722B (zh) * | 2015-01-19 | 2020-02-14 | 中兴通讯股份有限公司 | 标签构造以及标签报文转发方法及装置 |
| CN106549866B (zh) * | 2015-09-22 | 2020-04-28 | 华为技术有限公司 | 处理报文的方法、网络设备及系统 |
| EP3417577B1 (en) * | 2016-02-15 | 2020-01-15 | Telefonaktiebolaget LM Ericsson (PUBL) | Ospf extensions for flexible path stitching and selection for traffic transiting segment routing and mpls networks |
| US10164875B2 (en) * | 2016-02-22 | 2018-12-25 | Cisco Technology, Inc. | SR app-segment integration with service function chaining (SFC) header metadata |
| CN107171977B (zh) * | 2016-03-08 | 2021-08-17 | 中兴通讯股份有限公司 | 报文转发方法及装置 |
| US11032197B2 (en) * | 2016-09-15 | 2021-06-08 | Cisco Technology, Inc. | Reroute detection in segment routing data plane |
| CN106878186B (zh) * | 2017-02-04 | 2019-11-29 | 华为技术有限公司 | 网络中路由更新的方法、网络设备和系统 |
| US10447815B2 (en) * | 2017-03-08 | 2019-10-15 | Microsoft Technology Licensing, Llc | Propagating network configuration policies using a publish-subscribe messaging system |
| US20180262454A1 (en) * | 2017-03-08 | 2018-09-13 | Linkedin Corporation | Network routing using a publish-subscribe messaging system |
| US10389635B2 (en) * | 2017-05-31 | 2019-08-20 | Juniper Networks, Inc. | Advertising selected fabric paths for service routes in virtual nodes |
| US10742599B2 (en) * | 2017-06-30 | 2020-08-11 | Juniper Networks, Inc. | Conflict resolution in segment routing |
| US10382592B2 (en) * | 2017-07-12 | 2019-08-13 | Juniper Networks, Inc. | Segment routing label switched path for non-segment routing enabled routers |
| CN109510768B (zh) * | 2017-09-14 | 2021-02-12 | 华为技术有限公司 | 链路状态通告lsa发送方法、装置和系统 |
| US10498644B2 (en) * | 2017-09-27 | 2019-12-03 | Hewlett Packard Enterprise Development Lp | Grace link state advertisement (LSA) from a virtual stack device |
| CN111901235B (zh) * | 2017-12-01 | 2025-07-04 | 华为技术有限公司 | 处理路由的方法和装置、以及数据传输的方法和装置 |
| CN110535766B (zh) * | 2018-05-25 | 2021-10-22 | 华为技术有限公司 | 一种生成路由的方法和设备 |
| US11088939B1 (en) * | 2018-10-22 | 2021-08-10 | Juniper Networks, Inc. | Reducing open shortest path first protocol link flap |
| US11418428B2 (en) * | 2020-09-30 | 2022-08-16 | Juniper Networks, Inc. | Recomputation of multipaths in a segment routing-enabled network |
-
2019
- 2019-08-14 CN CN201910749340.7A patent/CN110266587B/zh active Active
- 2019-08-14 CN CN201910963348.3A patent/CN112398729B/zh active Active
-
2020
- 2020-08-12 WO PCT/CN2020/108587 patent/WO2021027828A1/zh not_active Ceased
- 2020-08-12 EP EP20852393.6A patent/EP4012987B1/en active Active
-
2022
- 2022-02-11 US US17/650,688 patent/US12003412B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150139028A1 (en) * | 2013-11-18 | 2015-05-21 | Huawei Technologies Co., Ltd. | Method for controlling generation of routing information, method for generating routing information and apparatuses thereof |
| CN107241269A (zh) * | 2016-03-29 | 2017-10-10 | 丛林网络公司 | 提供商边缘网络设备及用于网络的方法 |
| CN108768845A (zh) * | 2018-04-03 | 2018-11-06 | 新华三技术有限公司 | 一种多归属主机路由同步方法及装置 |
| CN109194579A (zh) * | 2018-11-19 | 2019-01-11 | 盛科网络(苏州)有限公司 | 一种IPv6实现分段路由的方法及装置 |
| CN109218200A (zh) * | 2018-11-26 | 2019-01-15 | 新华三技术有限公司 | 一种报文处理方法及装置 |
| CN110266587A (zh) * | 2019-08-14 | 2019-09-20 | 华为技术有限公司 | 一种链路状态信息的处理方法及装置 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4012987A4 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20220166706A1 (en) | 2022-05-26 |
| CN112398729B (zh) | 2022-03-29 |
| CN110266587A (zh) | 2019-09-20 |
| US12003412B2 (en) | 2024-06-04 |
| EP4012987A1 (en) | 2022-06-15 |
| EP4012987B1 (en) | 2025-03-19 |
| CN110266587B (zh) | 2019-12-13 |
| CN112398729A (zh) | 2021-02-23 |
| EP4012987A4 (en) | 2022-10-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11611509B2 (en) | Communication method, communications device, and communications system | |
| US7957306B2 (en) | Providing reachability information in a routing domain of an external destination address in a data communications network | |
| US8902728B2 (en) | Constructing a transition route in a data communications network | |
| US7532631B2 (en) | Method and apparatus for accelerating border gateway protocol convergence | |
| US7508772B1 (en) | Partial graceful restart for border gateway protocol (BGP) | |
| US12003412B2 (en) | Method and apparatus for processing link state information | |
| US8456982B2 (en) | System and method for fast network restoration | |
| CN102611628B (zh) | 用于实现传输路径切换的方法和装置 | |
| CN113228572A (zh) | 用于分段路由(sr)代理段标识(sid)的内部网关协议(igp) | |
| WO2020135395A1 (zh) | 一种跨内部网关协议的前缀标识通告方法和装置 | |
| CN113056891B (zh) | 源路由隧道入节点保护 | |
| US12438807B2 (en) | Route processing method and related device | |
| US20210119906A1 (en) | Loop Avoidance Communications Method, Device, and System | |
| CN102957573A (zh) | 一种路径检测的实现方法及节点 | |
| CN102202004B (zh) | 路由错误处理方法、装置和路由设备 | |
| US20230006917A1 (en) | Route Determining Method and Apparatus and Network Device | |
| CN111224870B (zh) | 一种SR-MPLS Anycast场景下的故障修复方法、设备和存储介质 | |
| CN113785542B (zh) | 用于内部网关协议(igp)快速收敛的系统和方法 | |
| WO2019001487A1 (zh) | 一种路径数据的删除方法、一种消息转发方法和装置 | |
| US9143399B2 (en) | Minimizing the number of not-via addresses | |
| WO2022218132A1 (zh) | 路由更新方法、装置及系统 | |
| CN115499369B (zh) | 路径保护方法及装置 | |
| EP4716175A1 (en) | Message advertisement method, apparatus, storage medium and electronic apparatus | |
| CN115460122A (zh) | 信息处理方法、网络节点设备及计算机可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20852393 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2020852393 Country of ref document: EP Effective date: 20220307 |