WO2023134416A1 - 一种报文发送方法、确定链路状态的方法、设备及系统 - Google Patents
一种报文发送方法、确定链路状态的方法、设备及系统 Download PDFInfo
- Publication number
- WO2023134416A1 WO2023134416A1 PCT/CN2022/140666 CN2022140666W WO2023134416A1 WO 2023134416 A1 WO2023134416 A1 WO 2023134416A1 CN 2022140666 W CN2022140666 W CN 2022140666W WO 2023134416 A1 WO2023134416 A1 WO 2023134416A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- link state
- link
- unidirectional
- tlv
- identifier
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 106
- 230000015654 memory Effects 0.000 claims description 37
- 238000012545 processing Methods 0.000 claims description 33
- 238000010586 diagram Methods 0.000 description 58
- 241000465502 Tobacco latent virus Species 0.000 description 52
- 230000006870 function Effects 0.000 description 18
- 238000004891 communication Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 8
- 238000001514 detection method Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- 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
-
- 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/70—Routing based on monitoring results
Definitions
- the present application relates to the communication field, in particular to a method for sending a message, a method for determining a link state, a device and a system.
- the network device uses the link detection method to detect the link status of the link with the neighbor device, and sends a link status packet carrying the link status to the neighbor device, so that the neighbor device can obtain the link status.
- the neighbor device of the network device cannot determine the link corresponding to the link state included in the link state message. This will cause the neighbor devices of the network device to be unable to use the link state included in the link state message to calculate the path or monitor the link state.
- the present application provides a message sending method, a method, a device and a system for determining a link state.
- the device that obtains a link state message can determine the link corresponding to the link state based on the link state message, so that the link can be based on the link state message. path calculation or link status monitoring.
- the present application provides a method for sending a message, and the method for sending a message is applied to a first device.
- the first device generates a link state message including the first identifier and the second identifier.
- the first identifier is used to indicate a first neighbor device of the first device.
- the first neighbor device is an endpoint device of a link performing link state detection.
- the second identifier is used to indicate the designated router.
- the designated router is a logical device used to construct the network topology of the network where the first device is located.
- the first device sends the link state packet to the second device, where the second device is a second neighbor device of the first device.
- the link state packet includes a first identifier indicating the first neighbor device.
- the second device can determine, according to the first identifier carried in the link state message, that one end of the link corresponding to the link state is the first neighbor device, and then determine the link corresponding to the link state.
- the designated router includes a designated intermediate system DIS defined by an intermediate system to an intermediate system ISIS.
- the designated router includes a designated router DR defined by Open Shortest Path First OSPF.
- the second device is an IGP neighbor of the first device.
- the link state packet sent by the first device is a link state protocol data unit (LSP) packet.
- LSP link state protocol data unit
- the second device is an IGP neighbor of the first device.
- the link state packet sent by the first device is a link state announcement LSA packet.
- the second device is a Border Gateway Protocol (BGP) neighbor of the first device.
- the link state message is a border gateway protocol-link state BGP-LS message.
- the BGP-LS message further includes a third identifier.
- the third identifier is used to indicate the device that has detected the link state indicated by the link state packet.
- the first identifier is a system identifier System ID of the first neighbor device, or a router identifier Router ID.
- the link state message is a link state protocol data unit (LSP) message
- the first identifier is the System ID.
- the link state message is a link state advertisement LSA message
- the first identifier is the Router ID.
- the link state message is a border gateway protocol-link state BGP-LS message, and the first identifier is a System ID or a Router ID.
- the link state packet includes a Type Length Value TLV, and the TLV carries the first identifier.
- the TLV is the minimum/maximum unidirectional link delay Min/Max Unidirectional Link Delay Sub-TLV, unidirectional link delay Unidirectional Link Delay Sub-TLV, unidirectional delay change Unidirectional Delay Variation Sub-TLV, Unidirectional Link Loss Sub-TLV, Unidirectional Residual Bandwidth Sub-TLV, Unidirectional Available Bandwidth Sub-TLV, Unidirectional Utilized Bandwidth Sub - one or more of TLVs.
- the present application provides a method for determining a link state, and the method is applied to a second device.
- the second device receives a link state message including the first identifier.
- the first identifier is used to indicate a first neighbor device of the first device.
- the first device is a device that generates and sends link packets.
- the second device is a second neighbor device of the first device. According to the first identifier, the second device can determine that one end of the link corresponding to the link state is the first neighbor device of the first device, thereby determining the link state of the link between the third device and the first neighbor device. In this way, based on the first identifier included in the link state packet, the second device can determine the link corresponding to the link state.
- the second device is an Interior Gateway Protocol (IGP) neighbor device of the first device.
- IGP Interior Gateway Protocol
- the link state message is a link state protocol data unit LSP message, or the link state message is a link state announcement LSA message.
- the first neighbor device of the first device is the second device.
- the second device is a Border Gateway Protocol (BGP) neighbor device of the first device.
- BGP Border Gateway Protocol
- the link state message is a Border Gateway Protocol-Link State BGP-LS message.
- the third device is the first device.
- the third device is a third neighbor device of the first device.
- the link state packet further includes a third identifier, where the third identifier corresponds to the first identifier, and the third identifier is used to indicate the third device.
- the second device can determine that the other end of the link corresponding to the link state is the third device based on the third identifier.
- the method further includes:
- the second device calculates a path based on the link state.
- the method further includes:
- the second device sends link state information to the control device, where the link state information is used to indicate the link state.
- the first identifier is a system identifier System ID of the neighbor device, or a router identifier Router ID.
- the link state message is a link state protocol data unit (LSP) message
- the first identifier is the System ID.
- the link state message is a link state advertisement LSA message
- the first identifier is the Router ID.
- the link state message is a border gateway protocol-link state BGP-LS message, and the first identifier is a System ID or a Router ID.
- the link state message includes a Type Length Value TLV, and the TLV carries the identifier.
- the TLV is the minimum/maximum unidirectional link delay Min/Max Unidirectional Link Delay Sub-TLV, unidirectional link delay Unidirectional Link Delay Sub-TLV, unidirectional delay change Unidirectional Delay Variation Sub-TLV, Unidirectional Link Loss Sub-TLV, Unidirectional Residual Bandwidth Sub-TLV, Unidirectional Available Bandwidth Sub-TLV, Unidirectional Utilized Bandwidth Sub - one or more of TLVs.
- the present application provides a device for sending a message, the device is applied to a first device, and the device includes:
- a processing unit configured to generate a link state message, where the link state message includes a first identifier and a second identifier, the first identifier is used to indicate a first neighbor device of the first device, and the second The second identifier is used to indicate the designated router;
- a transceiver unit configured to send the link state message to the second device, where the second device is a second neighbor device of the first device.
- the designated router includes a designated intermediate system DIS defined by an intermediate system to an intermediate system ISIS.
- the designated router includes a designated router DR defined by Open Shortest Path First OSPF.
- the link state message is a link state protocol data unit (LSP) message
- the second device is an Interior Gateway Protocol (IGP) neighbor of the first device.
- LSP link state protocol data unit
- IGP Interior Gateway Protocol
- the link state packet is a link state advertisement LSA packet
- the second device is an IGP neighbor of the first device.
- the link state message is a Border Gateway Protocol-Link State BGP-LS message
- the second device is a Border Gateway Protocol BGP neighbor of the first device.
- the BGP-LS packet further includes a third identifier, where the third identifier is used to indicate a device that has detected the link state indicated by the link state packet.
- the first identifier is a system identifier System ID of the first neighbor device, or a router identifier Router ID.
- the link state packet includes a Type Length Value TLV, and the TLV carries the first identifier.
- the TLV is the minimum/maximum unidirectional link delay Min/Max Unidirectional Link Delay Sub-TLV, unidirectional link delay Unidirectional Link Delay Sub-TLV, unidirectional delay change Unidirectional Delay Variation Sub-TLV, Unidirectional Link Loss Sub-TLV, Unidirectional Residual Bandwidth Sub-TLV, Unidirectional Available Bandwidth Sub-TLV, Unidirectional Utilized Bandwidth Sub - one or more of TLVs.
- the present application provides a device for determining a link state, the device is applied to a second device, and the device includes:
- a transceiver unit configured to receive a link state message, where the link state message includes a first identifier, the first identifier is used to indicate a first neighbor device of the first device, and the first device is used to generate and sending the link state message, the second device is a second neighbor device of the first device;
- a processing unit configured to determine a link state of a link between a third device and the first neighbor device according to the first identifier, where the third device is a device that has detected the link state.
- the second device is an Interior Gateway Protocol (IGP) neighbor device of the first device.
- IGP Interior Gateway Protocol
- the link state packet is a link state protocol data unit (LSP) packet.
- LSP link state protocol data unit
- the link state message is a link state advertisement LSA message.
- the first neighbor device of the first device is the second device.
- the second device is a Border Gateway Protocol (BGP) neighbor device of the first device.
- BGP Border Gateway Protocol
- the link state message is a Border Gateway Protocol-Link State BGP-LS message.
- the third device is the first device.
- the third device is a third neighbor device of the first device.
- the link state packet further includes a third identifier, where the third identifier corresponds to the first identifier, and the third identifier is used to indicate the third device.
- the processing unit is further configured to calculate a path based on the link state.
- the transceiving unit is further configured to send link state information to the control device, where the link state information is used to indicate the link state.
- the first identifier is a system identifier System ID of the neighbor device, or a router identifier Router ID.
- the link state message includes a Type Length Value TLV, and the TLV carries the identifier.
- the TLV is the minimum/maximum unidirectional link delay Min/Max Unidirectional Link Delay Sub-TLV, unidirectional link delay Unidirectional Link Delay Sub-TLV, unidirectional delay change Unidirectional Delay Variation Sub-TLV, Unidirectional Link Loss Sub-TLV, Unidirectional Residual Bandwidth Sub-TLV, Unidirectional Available Bandwidth Sub-TLV, Unidirectional Utilized Bandwidth Sub - one or more of TLVs.
- the present application provides a network system, where the network system includes a first device and a second device.
- the first device is configured to generate a link state message
- the link state message includes a first identifier and a second identifier
- the first identifier is used to indicate a first neighbor device of the first device
- the second identifier is used to instruct the designated router to send the link state packet to the second device.
- the second device is configured to receive a link state message, and determine the link state of the link between the third device and the first neighbor device according to the first identifier, and the third device obtains the detected A device in a link state, the second device is a second neighbor device of the first device.
- the present application provides a network device, the network device includes a processor chip and a memory, the memory is used to store instructions or program codes, and the processor chip is used to call and run the instructions or program codes from the memory, To execute the packet sending method as described in the first aspect or execute the method for determining the link state as described in the second aspect.
- the present application provides a network system, which includes the device for sending a message as described in the third aspect and the device for determining a link state as described in the fourth aspect.
- the present application provides a computer-readable storage medium, including instructions, programs or codes, which, when executed on a computer, cause the computer to execute the message sending method as described in the first aspect, or the message sending method as described in the first aspect.
- the present application provides a chip, including a memory and a processor.
- Memory is used to store instructions or program codes.
- the processor is used to call and run the instruction or program code from the memory, so as to execute the method described in the first aspect above; or, the processor executes the method described in the second aspect.
- the above-mentioned chip only includes a processor, and the processor is used to read and execute instructions or program codes stored in the memory, and when the instructions or program codes are executed, the processor executes the method described in the first aspect ; Or, the processor executes the method described in the second aspect.
- FIG. 1 is a schematic diagram of a network structure provided by an embodiment of the present application.
- FIG. 2 is a schematic diagram of a network topology provided in an embodiment of the present application.
- FIG. 3 is a schematic diagram of interaction between a network device and a second device provided in an embodiment of the present application
- Figure 4a is a schematic diagram of the format of the Min/Max Unidirectional Link Delay Sub-TLV field in the LSP message provided by the embodiment of the present application;
- Figure 4b is a schematic diagram of the format of the Unidirectional Link Delay Sub-TLV field in the LSP message provided by the embodiment of the present application;
- Figure 4c is a schematic diagram of the format of the Unidirectional Delay Variation Sub-TLV field in the LSP message provided by the embodiment of the present application;
- Figure 4d is a schematic diagram of the format of the Unidirectional Link Loss Sub-TLV field in the LSP message provided by the embodiment of the present application;
- Figure 4e is a schematic diagram of the format of the Unidirectional Residual Bandwidth Sub-TLV field in the LSP message provided by the embodiment of the present application;
- Figure 4f is a schematic diagram of the format of the Unidirectional Available Bandwidth Sub-TLV field in the LSP message provided by the embodiment of the present application;
- Fig. 4 g is the schematic diagram of the format of the Unidirectional Utilized Bandwidth Sub-TLV field in the LSP message that the embodiment of the present application provides;
- Figure 5a is a schematic diagram of the format of the Min/Max Unidirectional Link Delay Sub-TLV field in the LSA message provided by the embodiment of the present application;
- Figure 5b is a schematic diagram of the format of the Unidirectional Link Delay Sub-TLV field in the LSA message provided by the embodiment of the present application;
- Figure 5c is a schematic diagram of the format of the Unidirectional Delay Variation Sub-TLV field in the LSA message provided by the embodiment of the present application;
- Figure 5d is a schematic diagram of the format of the Unidirectional Link Loss Sub-TLV field in the LSA message provided by the embodiment of the present application;
- Figure 5e is a schematic diagram of the format of the Unidirectional Residual Bandwidth Sub-TLV field in the LSA message provided by the embodiment of the present application;
- Figure 5f is a schematic diagram of the format of the Unidirectional Available Bandwidth Sub-TLV field in the LSA message provided by the embodiment of the present application;
- Figure 5g is a schematic diagram of the format of the Unidirectional Utilized Bandwidth Sub-TLV field in the LSA message provided by the embodiment of the present application;
- Figure 6a is a schematic diagram of the format of the Min/Max Unidirectional Link Delay Sub-TLV field in the BGP-LS message provided by the embodiment of the present application;
- Figure 6b is a schematic diagram of the format of the Unidirectional Link Delay Sub-TLV field in the BGP-LS message provided by the embodiment of the present application;
- Figure 6c is a schematic diagram of the format of the Unidirectional Delay Variation Sub-TLV field in the BGP-LS message provided by the embodiment of the present application;
- Figure 6d is a schematic diagram of the format of the Unidirectional Link Loss Sub-TLV field in the BGP-LS message provided by the embodiment of the present application;
- Figure 6e is a schematic diagram of the format of the Unidirectional Residual Bandwidth Sub-TLV field in the BGP-LS message provided by the embodiment of the present application;
- Figure 6f is a schematic diagram of the format of the Unidirectional Available Bandwidth Sub-TLV field in the BGP-LS message provided by the embodiment of the present application;
- Figure 6g is a schematic diagram of the format of the Unidirectional Utilized Bandwidth Sub-TLV field in the BGP-LS message provided by the embodiment of the present application;
- FIG. 7 is a schematic structural diagram of the device provided by the embodiment of the present application.
- FIG. 8 is a schematic structural diagram of the device provided by the embodiment of the present application.
- FIG. 9 is a schematic structural diagram of a network system provided by an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of the device provided by the embodiment of the present application.
- FIG. 11 is a schematic structural diagram of a device provided by an embodiment of the present application.
- the network includes a network device 101, a network device 102, a network device 103 and a controller 104.
- the network device 101 and the network device 102 establish an interior gateway protocol (interior gateway protocol, IGP) neighbor, the network device 101 establishes an IGP neighbor with the network device 103, and the network device 102 establishes an IGP neighbor with the network device 103.
- the network device 101 establishes a border gateway protocol (border gateway protocol, BGP) neighbor relationship with the controller 104 .
- the network can run the intermediate system to intermediate system (ISIS) protocol, or the open shortest path first (open shortest path first, OSPF) protocol.
- ISIS intermediate system to intermediate system
- OSPF open shortest path first
- the network devices 101 - 103 will elect a designated router.
- the designated router is a virtual device based on network devices. Specifies the topology used by routers to establish the network.
- the figure is a schematic diagram of a network topology provided by an embodiment of the present application.
- the topology includes five devices of network device 101 -network device 103 , controller 104 and designated router 105 .
- the topology structure also includes the link between the network device 101 and the controller 104 , and the links between the network device 101 - the network device 103 and the designated router 105 respectively. Based on the designated router, the connection relationship between the network device 101 and the network device 103 can be simplified to facilitate path calculation.
- the network device 101 - the network device 103 can detect the link state of the link between this device and the IGP neighbor device.
- network device 101 and network device 102 are in an IGP neighbor relationship
- network device 101 and network device 103 are in an IGP neighbor relationship.
- the network device 101 can detect the link state of the link between the network device 101 and the network device 102 and the link state of the link between the network device 101 and the network device 103 by using a link detection method.
- the network device 101 can send a link state packet carrying a link state to an IGP neighbor device or a BGP neighbor device.
- the link state corresponds to the link between the network device 101 and the designated router 105 in the topology, and cannot correspond to the specific link between the network device 101 and the network device 102.
- the network device 102 After the network device 102 obtains the link state message, it can only determine that the link state indicated by the link state message is the link state of the link between the network device 101 and the neighbor device of the network device 101 . The network device 102 cannot determine whether the neighbor device of the network device 101 is specifically the network device 102 or the network device 103 . Similarly, after obtaining the link state message, the network device 103 can only determine that the link state indicated by the link state message is the link state of the link between the network device 101 and the neighbor device of the network device 101 . The network device 103 also cannot determine whether the neighbor device of the network device 101 is specifically the network device 102 or the network device 103 .
- the network device 101 can also collect link status. For example, the network device 101 acquires the link state of the link between the network device 102 and the designated router 105 sent by the network device 102 . The network device 101 can generate a link state message based on the collected link state. The network device 101 sends a link state message to the controller 104 . Based on the obtained link state message, the controller 104 can obtain the link state of the link between the network device 102 and the designated router 105 . The controller 104 cannot determine whether the obtained link status is the link status of the link between the network device 102 and which neighbor device of the network device 102 . The controller 104 cannot perform path calculation and link state monitoring by acquiring the link state.
- the controller or network device can obtain the link state of the link between the network device that generates the link state and the designated router, and can only determine the detection link state included in the link.
- Network equipment cannot determine the specific network equipment at the other end.
- the controller or the network device cannot determine the link status of the link between the network devices, so that the obtained link status cannot be used for path calculation and link status monitoring.
- the embodiments of the present application provide a packet forwarding method and a method for determining a link state.
- the first device generates a link state packet including the first identifier and the second identifier.
- the first identifier is used to indicate the first neighbor device of the first device.
- the device that acquires the link state message can determine the specific link corresponding to the link state indicated by the link state message.
- the first device sends a link state packet to the second device.
- the second device that is, the second neighbor device of the first device can determine that the link state indicated by the link state message is the connection between the third device and the first neighbor device based on the first identifier included in the obtained link state message.
- the third device is a device that has detected the link state.
- the third device may be a network device.
- the second device can determine a specific link corresponding to the link state, and can calculate a path based on the acquired link state, or monitor the link state.
- the message forwarding method and the method for determining the link state provided in the embodiment of the present application can be applied to the network shown in FIG. 1 .
- the network device 101 and the network device 102 are peers to each other
- the network device 102 and the network device 103 are peers to each other
- the network device 101 and the network device 103 are also peers to each other.
- the network device 101 - the network device 103 may be devices with a forwarding function such as routers and switches.
- the embodiment of the present application provides three exemplary connection modes. Any one of the following three connection modes may be adopted between the network device 101 and the network device 102 .
- the first type the network device 101 and the network device 102 are directly connected through a physical link.
- a direct connection through a physical link may also be referred to as a direct connection.
- the second type the network device 101 is connected to the network device 102 through other physical devices.
- the physical device can transparently transmit packets from the network device 102 to the network device 101 , or transparently transmit packets from the network device 101 to the network device 102 .
- the third type the network device 101 and the network device 102 are connected through a network.
- the network may be a Layer 2 network.
- the network may be a local area network (local area network, LAN) subnet (sub network).
- the network device 101 and the network device 103, and the network device 102 and the network device 103 can be connected by any one of the above three connection methods.
- this figure is a schematic diagram of interaction between a first device and a second device according to an embodiment of the present application, including S301-S304.
- S301 The first device generates a link state packet.
- the first device is a network device capable of generating a link state message and sending the link state message.
- the first device may be any one of network devices 101 - 103 .
- the first device can detect a link state of a link between the first device and the first neighbor device, and generate a link state message based on the detected link state.
- the link state message can be used to notify other neighbor devices of the detected link state.
- the first device can also collect the link state detected by the network device, and generate a link state message based on the collected link state.
- the first device may send a link state packet including the collected link state to the neighbor device.
- the neighbor device can obtain the link status of the link between the network devices included in the network based on the link status message.
- Manner 1 The first device generates a link state message based on the detected link state.
- the first device has a function of detecting a link state.
- the first device is capable of detecting a link state of a link between the first device and a first neighbor device of the first device.
- the first neighbor device may be an IGP neighbor of the first device.
- the first neighbor device may be the network device 102 or the network device 103 .
- the first device can detect the link status based on a two way active measurement protocol (twamp).
- twamp two way active measurement protocol
- the link state detected by the first device may include one or more of delay, loss, and bandwidth.
- the first device can obtain a link delay value or a link delay change value.
- the first device can obtain a link loss value.
- the first device can obtain one or more of the link's remaining bandwidth, available bandwidth, and actually used bandwidth.
- the first device can generate a link state message based on the detection result of the link state.
- Link status messages are used to indicate link status.
- the link state message can include parameters indicating the state of the link, such as the above-mentioned link delay value, link delay change value, link loss value, remaining bandwidth, available bandwidth and actually used bandwidth. one or more.
- the link state packet includes a first identifier and a second identifier.
- the first identifier is used to indicate the first neighbor device of the first device.
- the first neighbor device is also the neighbor device at the other end of the link detected by the first device.
- the first identifier may be a device identifier used to uniquely identify the first neighbor device.
- the second identifier is used to indicate the designated router.
- the designated router is a router elected by the first device and neighbor devices of the first device. Specifically, the designated router may be determined by the first device and IGP neighbor devices of the first device based on IGP protocol election.
- the Designated Router is a pseudonode.
- the designated router is established based on the network devices in the network and is a logical device.
- a designated router may be, for example, a functional module included in a network device. As shown in FIG. 2 , the designated router may be the designated router 105 .
- the type of the link state message, the type of the first identifier, and the type of the designated router are determined by the type of the IGP protocol run by the first device and the neighbor devices of the first device. In different types of IGP protocols, the types of the link state message, the type of the first identifier, and the type of the designated router are different.
- the IGP protocol run by the first device and the neighbor devices of the first device is the ISIS protocol.
- the link state packet generated by the first device is a link state protocol data unit (link state protocol data unit, LSP) packet.
- LSP link state protocol data unit
- each network device corresponds to a different system (System) identifier (identity, ID).
- System ID can identify network devices in the network.
- the first identifier included in the LSP message may be the System ID of the first neighbor device of the network device.
- the designated router indicated by the second identifier may be a designated intermediate system (designated intermediate system, DIS) defined by the ISIS protocol.
- DIS designated intermediate system
- the IGP protocol run by the first device and the neighbor devices of the first device is the OSPF protocol.
- the link state message generated by the first device is a link state announcement (link state advertisement, LSA) message.
- LSA link state announcement
- each network device corresponds to a different router ID (Router ID).
- Router ID can identify network devices in the network.
- the first identifier included in the LSA message may be the Router ID of the first neighbor device of the first device.
- the designated router indicated by the second identifier may be a designated router (designated router, DR) defined by the OSPF protocol.
- Manner 2 The first device generates a link state message based on the collected link state.
- the first device can collect link states generated by network devices in the network, and generate link state packets based on the collected link states.
- the link status collected by the first device may include one or more of link status detected by the first device and link status obtained from other network devices.
- the first device in this embodiment of the present application may be a network device 101 .
- the network device 101 acquires the link state packet sent by the network device 102 .
- the link state packet sent by the network device 102 includes a first identifier indicating the network device 103 .
- the network device 101 can generate a link status message based on the collected link status indicated by the link status message sent by the network device 102 and the detected link status of the link between the network device 101 and the network device 102 .
- the first identifier is used to indicate the network device at the non-link state detection end among the network devices at both ends of the link.
- the first identifier is used to indicate the network device 103 .
- the first identifier is used to indicate the network device 102 .
- the link state message further includes a third identifier.
- the third identifier corresponds to the first identifier.
- the third identifier is used to indicate the network device that detects and generates the link state.
- the third identifier may be used to indicate the first device. Based on the first identifier and the third identifier, the device that acquires the link state message can determine that the link state message indicates a link state of the link between the first device and the first neighbor device.
- the first identifier is used to indicate the network device 102
- the third identifier corresponding to the first identifier is used to indicate the network device 101 .
- the third identifier may indicate a third neighbor device of the first device. Based on the first identifier and the third identifier, the device acquiring the link state message can determine that the link state message indicates a link state of the link between the third neighbor device and the first neighbor device.
- the first identifier is used to indicate the network device 103
- the third identifier corresponding to the first identifier is used to indicate the network device 102 .
- the network device 103 is a second neighbor device of the network device 101
- the network device 102 is a third neighbor device of the network device 101 .
- the link state message generated by the first device may be a border gateway protocol link state (border gateway protocol-link state, BGP-LS) message.
- border gateway protocol-link state border gateway protocol-link state, BGP-LS
- the BGP-LS protocol supports the first device to collect link information based on the IGP protocol.
- the network where the first device is located can run the ISIS protocol or the OSPF protocol.
- the network where the first device is located runs the ISIS protocol
- the first identifier included in the BGP-LS packet is the System ID of the first neighbor device of the first device.
- the third identifier included in the BGP-LS message is the System ID of the third neighbor device of the first device or the System ID of the first device.
- the network where the first device is located runs the OSPF protocol
- the first identifier included in the BGP-LS packet is the Router ID of the first neighbor device of the first device.
- the third identifier included in the BGP-LS message is the Router ID of the third neighbor device of the first device or the Router ID of the first device.
- the link state packet generated by the first device includes a type length value (type length value, TLV).
- TLV carries a first identifier indicating a first neighbor device of the first device.
- the specific type of TLV is related to the type of the link state indicated by the link state message and the type of the link state message.
- the embodiments of the present application respectively provide specific types of TLVs included in the above three link state packets, please refer to the following for details.
- S302 The first device sends a link state packet to the second device.
- the second device is a second neighbor device of the first device.
- the second device may be a network device, a controller, or a route reflector (route reflector, RR).
- the RR may be connected to the controller, and is used to forward the link state message sent by the first device to the controller.
- the second device may be a first neighbor device of the first device, or may be a device different from the first neighbor device. That is to say, the second device may be a neighboring device at the other end of the detection link of the first device, or may be another neighboring device of the first device.
- the first device may be a network device 101, and a first neighbor device of the first device and a second neighbor device of the first device are the same neighbor device.
- the first neighbor device and the second neighbor device are network devices 102 .
- the network device 101 detects the link status of the link with the network device 102 .
- the network device 101 generates a link state packet based on the detected link state, and sends the generated link state packet to the network device 102 .
- the first device may be a network device 101, and a first neighbor device of the first device and a second neighbor device of the first device are different neighbor devices.
- the first neighbor device is the network device 102 .
- the second neighbor device is the network device 103 .
- the network device 101 detects the link status of the link with the network device 102 .
- the network device 101 generates a link state packet based on the detected link state, and sends the generated link state packet to the network device 103 .
- the first neighbor device is the network device 102 .
- the second neighbor device is the controller 104 .
- the network device 101 detects the link status of the link with the network device 102 .
- the network device 101 generates a link state packet based on the detected link state, and sends the generated link state packet to the controller 104 .
- the second device that is, the second neighbor device of the first device, may be an IGP neighbor of the first device, or may be a BGP neighbor of the first device.
- the neighbor type of the second device is related to the type of the link state packet.
- the second device may be an IGP neighbor of the first device.
- Link state packets can be LSP packets or LSA packets.
- the second device may be a BGP neighbor of the first device.
- Link state packets may be BGP-LS packets.
- S303 The second device receives the link state message.
- the second device determines the link state of the link between the third device and the first neighbor device of the first device according to the first identifier.
- the second device can determine that one end of the link corresponding to the link state indicated by the link state message is the first neighbor device indicated by the first identification.
- the second device can determine, based on the first device that generates and sends the link state message, that the link indicated by the link state message is the link between the first device and the first neighbor device .
- the device that generates the link state message is the first device that detects and obtains the link state.
- the second device can determine the link between the first device and the first neighbor device indicated by the first identifier. link state.
- the link state packet includes a third identifier indicating the third device.
- the third identifier corresponds to the first identifier.
- the second device can determine the third device based on the third identification.
- the third device may be the first device, or may be a third neighbor device of the first device.
- the first device can collect the link status detected by the first device.
- the link state packet generated by the first device includes a third identifier, and the third identifier is used to indicate the third device, that is, the network device that generates the link state.
- the second device can determine that the link status indicated by the link status message is the link status of the link between the third device and the first neighbor device.
- the first device is a network device 101
- the second device is a controller 104 .
- the link status message sent by the network device 101 acquired by the controller 104 includes a first identifier indicating the network device 102 and a third identifier indicating the network device 101 .
- the controller 104 can determine that the third device is the network device 101 based on the third identifier.
- the controller 104 can determine the network device 102 based on the first identification.
- the controller 104 can determine the link status of the link between the network device 101 and the network device 102 based on the link status message.
- the first device can collect a link state detected by a third neighbor device of the first device.
- the third neighbor device is a network device different from both the first neighbor device and the second neighbor device.
- the link state packet generated by the first device includes a third identifier, and the third identifier is used to indicate the third neighbor device.
- the second device can determine that the link status indicated by the link status packet is the link status of the link between the third neighbor device of the first device and the first neighbor device of the first device .
- the first device is the network device 101
- the second device is the controller 104
- the first neighbor device of the first device is the network device 103
- the third neighbor device of the first device is the network device 102 .
- the link status message sent by the network device 101 acquired by the controller 104 includes a first identifier indicating the network device 103 and a third identifier indicating the network device 102 .
- the controller 104 can determine that the third device is the network device 102 based on the third identifier.
- the controller 104 can then determine that the other end of the link is the network device 103 based on the first identifier.
- the controller 104 can determine the link status of the link between the network device 102 and the network device 103 based on the link status message.
- the second device may be a device with a path calculation function.
- the second device may be, for example, a network device with a path calculation function or a control device with a path calculation function.
- the second device is able to calculate a path based on the obtained link state.
- the second device may also be a device connected to the control device.
- the second device may be, for example, a network device connected to the control device, or a control device connected to other control devices.
- the second device may forward the link state information indicating the link state to the control device, so that the control device uses the determined link state to monitor the link state or calculate the path.
- the TLVs carrying the first identifier included in the three link state packets are respectively introduced below.
- the TLV included in the link state message may be extended, and the first identifier may be added to the TLV.
- the first type the link state message is an LSP message.
- the link state detected by the first device may include one or more of delay, loss, and bandwidth.
- the TLVs included in the link state packets indicating different link state types are introduced respectively below.
- TLV is Min/Max Unidirectional Link Delay (Min/Max Unidirectional Link Delay) Sub-TLV.
- the Min/Max Unidirectional Link Delay Sub-TLV field includes a type (Type) field, a length (Length) field, a neighbor system identification (Neighbor System-ID) field, a reserved (RESERVED) field, a maximum delay (Max Delay) field and Minimum delay (Min Delay) field.
- the value of the Type field identifies the type of the Min/Max Unidirectional Link Delay Sub-TLV field.
- the value of the Length field is the length of the Min/Max Unidirectional Link Delay Sub-TLV.
- the Neighbor System-ID field can carry the first identifier.
- the Max Delay field can carry the maximum one-way link delay value.
- the Min Delay field can carry the minimum one-way link delay value.
- TLV is Unidirectional Link Delay (Unidirectional Link Delay) Sub-TLV.
- the Unidirectional Link Delay Sub-TLV field includes a type (Type) field, a length (Length) field, a neighbor system identification (Neighbor System-ID) field, a reserved (RESERVED) field and a delay (Delay) field.
- Type type
- Length length
- RVED reserved
- Delay delay
- the value of the Type field identifies the type of the Unidirectional Link Delay Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Link Delay Sub-TLV.
- the Neighbor System-ID field can carry the first identifier.
- the Delay field carries the one-way link delay value.
- TLV is Unidirectional Delay Variation (Unidirectional Delay Variation) Sub-TLV.
- the Unidirectional Delay Variation Sub-TLV field includes a type (Type) field, a length (Length) field, a neighbor system identification (Neighbor System-ID) field, a reservation (RESERVED) field, and a delay variation (Delay Variation) field.
- Type type
- Length length
- RVED reservation
- Delay Variation delay variation
- the value of the Type field identifies the type of the Unidirectional Delay Variation Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Delay Variation Sub-TLV.
- the Neighbor System-ID field can carry the first identifier.
- the Delay Variation field carries the one-way link delay variation value.
- TLV is Unidirectional Link Loss (Unidirectional Link Loss) Sub-TLV.
- the Unidirectional Link Loss Sub-TLV field includes a type (Type) field, a length (Length) field, a neighbor system identification (Neighbor System-ID) field, a reservation (RESERVED) field and a link loss (Link Loss) field.
- Type type
- Length length
- RVED reservation
- Link Loss link loss
- the value of the Type field identifies the type of the Unidirectional Link Loss Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Link Loss Sub-TLV.
- the Neighbor System-ID field can carry the first identifier.
- the Link Loss field carries the unidirectional link loss value.
- TLV is Unidirectional Residual Bandwidth (Unidirectional Residual Bandwidth) Sub-TLV.
- the Unidirectional Residual Bandwidth Sub-TLV field includes a type (Type) field, a length (Length) field, a neighbor system identification (Neighbor System-ID) field and a residual bandwidth (Residual Bandwidth) field.
- Type type
- Length length
- Neighbor System-ID neighbor system identification
- Residual Bandwidth residual bandwidth
- the value of the Type field identifies the type of the Unidirectional Residual Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Residual Bandwidth Sub-TLV.
- the Neighbor System-ID field can carry the first identifier.
- the Residual Bandwidth field carries the remaining bandwidth.
- TLV is Unidirectional Available Bandwidth (Unidirectional Available Bandwidth) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Available Bandwidth Sub-TLV field in the LSP message provided by the embodiment of the present application.
- the Unidirectional Available Bandwidth Sub-TLV field includes a type (Type) field, a length (Length) field, a neighbor system identification (Neighbor System-ID) field and an available bandwidth (Available Bandwidth) field.
- the value of the Type field identifies the type of the Unidirectional Available Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Available Bandwidth Sub-TLV.
- the Neighbor System-ID field can carry the first identifier.
- the Available Bandwidth field carries the available bandwidth.
- TLV is Unidirectional Utilized Bandwidth (Unidirectional Utilized Bandwidth) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Utilized Bandwidth Sub-TLV field in the LSP message provided by the embodiment of the present application.
- the Unidirectional Utilized Bandwidth Sub-TLV field includes a type (Type) field, a length (Length) field, a neighbor system identification (Neighbor System-ID) field and an actual bandwidth (Utilized Bandwidth) field.
- the value of the Type field identifies the type of the Unidirectional Utilized Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Utilized Bandwidth Sub-TLV.
- the Neighbor System-ID field can carry the first identifier.
- the Utilized Bandwidth field carries the actual bandwidth used.
- the second type is an LSA message.
- LSA packets can include the following seven types of TLVs.
- TLV is Min/Max Unidirectional Link Delay (Min/Max Unidirectional Link Delay) Sub-TLV.
- the Min/Max Unidirectional Link Delay Sub-TLV field includes a type (Type) field, a length (Length) field, a router identifier (Router Identifier) field, a reservation (RESERVED) field, a maximum delay (Max Delay) field and the minimum delay (Min Delay) field.
- the value of the Type field identifies the type of the Min/Max Unidirectional Link Delay Sub-TLV field.
- the value of the Length field is the length of the Min/Max Unidirectional Link Delay Sub-TLV.
- the Router Identifier field can carry the first identifier.
- the Max Delay field carries the maximum one-way link delay value.
- the Min Delay field can carry the minimum one-way link delay value.
- TLV is Unidirectional Link Delay (Unidirectional Link Delay) Sub-TLV.
- the Unidirectional Link Delay Sub-TLV field includes a type (Type) field, a length (Length) field, a router identifier (Router Identifier) field, a reserved (RESERVED) field and a delay (Delay) field.
- Type type
- Length length
- RVED router identifier
- Delay delay
- the value of the Type field identifies the type of the Unidirectional Link Delay Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Link Delay Sub-TLV.
- the Router Identifier field can carry the first identifier.
- the Delay field carries the one-way link delay value.
- TLV is Unidirectional Delay Variation (Unidirectional Delay Variation) Sub-TLV.
- the Unidirectional Delay Variation Sub-TLV field includes a Type (Type) field, a Length (Length) field, a Router Identifier (Router Identifier) field, a Reserved (RESERVED) field, and a Delay Variation (Delay Variation) field.
- Type Type
- Length Length
- Router Identifier Router Identifier
- Reserved RESET
- Delay Variation Delay Variation
- the value of the Type field identifies the type of the Unidirectional Delay Variation Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Delay Variation Sub-TLV.
- the Router Identifier field can carry the first identifier.
- the Delay Variation field carries the one-way link delay variation value.
- TLV is Unidirectional Link Loss (Unidirectional Link Loss) Sub-TLV.
- the Unidirectional Link Loss Sub-TLV field includes a Type (Type) field, a Length (Length) field, a Router Identifier (Router Identifier) field, a Reserved (RESERVED) field, and a Link Loss (Link Loss) field.
- Type Type
- Length Length
- Router Identifier Router Identifier
- Reserved RESET
- Link Loss Link Loss
- the value of the Type field identifies the type of the Unidirectional Link Loss Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Link Loss Sub-TLV.
- the Router Identifier field can carry the first identifier.
- the Link Loss field carries the unidirectional link loss value.
- TLV is Unidirectional Residual Bandwidth (Unidirectional Residual Bandwidth) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Residual Bandwidth Sub-TLV field in the LSA message provided by the embodiment of the present application.
- the Unidirectional Residual Bandwidth Sub-TLV field includes a Type (Type) field, a Length (Length) field, a Router Identifier (Router Identifier) field, and a Residual Bandwidth (Residual Bandwidth) field.
- the value of the Type field identifies the type of the Unidirectional Residual Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Residual Bandwidth Sub-TLV.
- the Router Identifier field can carry the first identifier.
- the Residual Bandwidth field carries the remaining bandwidth.
- TLV is Unidirectional Available Bandwidth (Unidirectional Available Bandwidth) Sub-TLV.
- the Unidirectional Available Bandwidth Sub-TLV field includes a Type (Type) field, a Length (Length) field, a Router Identifier (Router Identifier) field, and an Available Bandwidth (Available Bandwidth) field.
- Type Type
- Length Length
- Router Identifier Router Identifier
- Available Bandwidth Available Bandwidth
- the value of the Type field identifies the type of the Unidirectional Available Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Available Bandwidth Sub-TLV.
- the Router Identifier field can carry the first identifier.
- the Available Bandwidth field carries the available bandwidth.
- TLV is Unidirectional Utilized Bandwidth (Unidirectional Utilized Bandwidth) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Utilized Bandwidth Sub-TLV field in the LSA message provided by the embodiment of the present application.
- the Unidirectional Utilized Bandwidth Sub-TLV field includes a type (Type) field, a length (Length) field, a router identifier (Router Identifier) field and an actual bandwidth (Utilized Bandwidth) field.
- the value of the Type field identifies the type of the Unidirectional Utilized Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Utilized Bandwidth Sub-TLV.
- the Router Identifier field can carry the first identifier.
- the Utilized Bandwidth field carries the actual bandwidth used.
- the third type the link state message is a BGP-LS message.
- BGP-LS messages can include the following seven types of TLVs.
- TLV is Min/Max Unidirectional Link Delay (Min/Max Unidirectional Link Delay) Sub-TLV.
- this figure is a schematic diagram of the format of the Min/Max Unidirectional Link Delay Sub-TLV field in the BGP-LS message provided by the embodiment of the present application.
- the Min/Max Unidirectional Link Delay Sub-TLV field includes a type (Type) field, a length (Length) field, a reserved (RESERVED) field, a maximum delay (Max Delay) field and a minimum delay (Min Delay ) field.
- the Min/Max Unidirectional Link Delay Sub-TLV field also includes an IS-IS Neighbor System-ID field or an OSPF Router Identifier field.
- the value of the Type field identifies the type of the Min/Max Unidirectional Link Delay Sub-TLV field.
- the value of the Length field is the length of the Min/Max Unidirectional Link Delay Sub-TLV.
- the IS-IS Neighbor System-ID field or the OSPF Router Identifier field can carry the first identifier.
- the Max Delay field can carry the maximum one-way link delay value.
- the Min Delay field can carry the minimum one-way link delay value.
- TLV is Unidirectional Link Delay (Unidirectional Link Delay) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Link Delay Sub-TLV field in the BGP-LS message provided by the embodiment of the present application.
- the Unidirectional Link Delay Sub-TLV field includes a type (Type) field, a length (Length) field, a reserved (RESERVED) field and a delay (Delay) field.
- the Unidirectional Link Delay Sub-TLV field also includes an IS-IS Neighbor System-ID field or an OSPF Router Identifier field.
- the value of the Type field identifies the type of the Unidirectional Link Delay Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Link Delay Sub-TLV.
- the IS-IS Neighbor System-ID field or the OSPF Router Identifier field can carry the first identifier.
- the Delay field carries the one-way link delay value.
- TLV is Unidirectional Delay Variation (Unidirectional Delay Variation) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Delay Variation Sub-TLV field in the BGP-LS message provided by the embodiment of the present application.
- the Unidirectional Delay Variation Sub-TLV field includes a type (Type) field, a length (Length) field, a reserved (RESERVED) field and a delay variation (Delay Variation) field.
- the Unidirectional Delay Variation Sub-TLV field also includes an IS-IS Neighbor System-ID field or an OSPF Router Identifier field.
- the value of the Type field identifies the type of the Unidirectional Delay Variation Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Delay Variation Sub-TLV.
- the IS-IS Neighbor System-ID field or the OSPF Router Identifier field can carry the first identifier.
- the Delay Variation field carries the unidirectional link delay variation value.
- TLV is Unidirectional Link Loss (Unidirectional Link Loss) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Link Loss Sub-TLV field in the BGP-LS message provided by the embodiment of the present application.
- the Unidirectional Link Loss Sub-TLV field includes a type (Type) field, a length (Length) field, a reserved (RESERVED) field and a link loss (Link Loss) field.
- the Unidirectional Link Loss Sub-TLV field also includes an IS-IS Neighbor System-ID field or an OSPF Router Identifier field.
- the value of the Type field identifies the type of the Unidirectional Link Loss Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Link Loss Sub-TLV.
- the IS-IS Neighbor System-ID field or the OSPF Router Identifier field can carry the first identifier.
- the Link Loss field carries the unidirectional link loss value.
- TLV is Unidirectional Residual Bandwidth (Unidirectional Residual Bandwidth) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Residual Bandwidth Sub-TLV field in the BGP-LS message provided by the embodiment of the present application.
- the Unidirectional Residual Bandwidth Sub-TLV field includes a type (Type) field, a length (Length) field and a residual bandwidth (Residual Bandwidth) field.
- the Unidirectional Residual Bandwidth Sub-TLV field also includes an IS-IS Neighbor System-ID field or an OSPF Router Identifier field.
- the value of the Type field identifies the type of the Unidirectional Residual Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Residual Bandwidth Sub-TLV.
- the IS-IS Neighbor System-ID field or the OSPF Router Identifier field can carry the first identifier.
- the Residual Bandwidth field carries the remaining bandwidth.
- TLV is Unidirectional Available Bandwidth (Unidirectional Available Bandwidth) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Available Bandwidth Sub-TLV field in the BGP-LS message provided by the embodiment of the present application.
- the Unidirectional Available Bandwidth Sub-TLV field includes a type (Type) field, a length (Length) field and an available bandwidth (Available Bandwidth) field.
- the Unidirectional Available Bandwidth Sub-TLV field also includes an IS-IS Neighbor System-ID field or an OSPF Router Identifier field.
- the value of the Type field identifies the type of the Unidirectional Available Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Available Bandwidth Sub-TLV.
- the IS-IS Neighbor System-ID field or the OSPF Router Identifier field can carry the first identifier.
- the Available Bandwidth field carries the available bandwidth.
- TLV is Unidirectional Utilized Bandwidth (Unidirectional Utilized Bandwidth) Sub-TLV.
- this figure is a schematic diagram of the format of the Unidirectional Utilized Bandwidth Sub-TLV field in the BGP-LS message provided by the embodiment of the present application.
- the Unidirectional Utilized Bandwidth Sub-TLV field includes a type (Type) field, a length (Length) field and an actual bandwidth (Utilized Bandwidth) field.
- the Unidirectional Utilized Bandwidth Sub-TLV field also includes an IS-IS Neighbor System-ID field or an OSPF Router Identifier field.
- the value of the Type field identifies the type of the Unidirectional Utilized Bandwidth Sub-TLV field.
- the value of the Length field is the length of the Unidirectional Utilized Bandwidth Sub-TLV.
- the IS-IS Neighbor System-ID field or the OSPF Router Identifier field can carry the first identifier.
- the Utilized Bandwidth field carries the actual bandwidth used.
- a new type of TLV may also be added for carrying the first identifier.
- the newly added TLV can be LAN Min/Max Unidirectional Link Delay (LAN Min/Max Unidirectional Link Delay) Sub-TLV, LAN Unidirectional Link Delay (LAN Unidirectional Link Delay) Sub-TLV, LAN Single LAN Unidirectional Delay Variation Sub-TLV, LAN Unidirectional Link Loss Sub-TLV, LAN Unidirectional Residual Bandwidth Sub-TLV, LAN Unidirectional Available Bandwidth One or more of (LAN Unidirectional Available Bandwidth) Sub-TLV and LAN Unidirectional Utilized Bandwidth (LAN Unidirectional Utilized Bandwidth) Sub-TLV.
- FIG. 7 shows a possible structural diagram of a device for sending packets involved in the above embodiment, and the device 700 can realize the function of the first device in the example shown in FIG. 3 .
- the device 700 includes: a processing unit 701 and a transceiver unit 702 .
- the processing unit 701 is configured to support the device 700 to execute S301 in FIG. 3; the transceiver unit 702 is configured to support the device 700 to execute S302 in FIG. 3; and/or other processes performed by the first device in the technologies described herein.
- the processing unit 701 is configured to perform various processing operations performed by the first device in the above method embodiments; the transceiver unit 702 is configured to perform various processing operations performed by the first device in the above method embodiments.
- the processing unit 701 is configured to generate a link state message; the transceiver unit 702 is configured to send the link state message to the second device.
- the specific execution process please refer to the detailed description of the corresponding steps in the above embodiment shown in FIG. 3 , which will not be repeated here.
- FIG. 8 shows a possible structural diagram of a device for determining a link state involved in the above embodiment, and the device 800 can implement the function of the second device in the example shown in FIG. 3 .
- the device 800 includes: a transceiver unit 801 and a processing unit 802 .
- the transceiving unit 801 is configured to support the device 800 to execute S303 in FIG. 3; the processing unit 802 is configured to support the device 800 to execute S304 in FIG. 3; and/or other processes executed by the second device in the technology described herein.
- the transceiving unit 801 is configured to perform various transceiving operations performed by the second device in the above method embodiments; the processing unit 802 is configured to perform various processing operations performed by the second device in the above method embodiments.
- the transceiver unit 801 is configured to receive a link status message; the processing unit 802 is configured to determine a link status of a link between the third device and the first neighbor device of the first device according to the first identifier.
- the specific execution process please refer to the detailed description of the corresponding steps in the above embodiment shown in FIG. 3 , which will not be repeated here.
- each functional unit in the embodiment of the present application may be integrated into one processing unit, or each unit may physically exist separately, or two or more units may be integrated into one unit.
- the acquisition unit and the processing unit may be the same unit or different units.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
- an embodiment of the invention provides a network system 900, which is used to implement the method for sending a message and the method for determining a link state in the foregoing method embodiment.
- the network system 900 includes a first device 901 and a second device 902 .
- the first device 901 may implement the function of the first device in the embodiment shown in FIG. 3
- the second device 902 may implement the function of the second device in the embodiment shown in FIG. 3 .
- For the specific execution process please refer to the detailed description of the corresponding steps in the above embodiment shown in FIG. 3 , which will not be repeated here.
- FIG. 10 is a schematic structural diagram of a device 1000 provided in an embodiment of the present application.
- the device 700 in FIG. 7 and the device 800 in FIG. 8 may be implemented by the device shown in FIG. 10 .
- the device 1000 includes at least one processor 1001 , a communication bus 1002 and at least one network interface 1004 , and optionally, the device 1000 may also include a memory 1003 .
- the processor 1001 may be a general-purpose central processing unit (central processing unit, CPU), a specific application integrated circuit (application-specific integrated circuit, ASIC) or one or more integrated circuits (integrated circuit) for controlling the program execution of the application scheme , IC).
- the processor can be used to process the message, so as to implement the message sending method or the method for determining the link state provided in the embodiment of the present application.
- the processor can be used to generate a link state message.
- the processor may be used to determine the link between the third device and the first neighbor device of the first device according to the first identifier.
- the link status and specific function implementation please refer to the processing part corresponding to the second device in the method embodiment.
- Communication bus 1002 is used to transfer information between processor 1001 , network interface 1004 and memory 1003 .
- the memory 1003 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, and the memory 1003 can also be a random access memory (random access memory, RAM) or can store information and other types of dynamic storage devices for instructions, and can also be compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray optical discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
- the memory 1003 may exist independently, and is connected to the processor 1001 through the communication bus 1002 .
- the memory 1003 can also be integrated with the processor 1001.
- the memory 1003 is used to store program codes or instructions for implementing the solutions of the present application, and the execution is controlled by the processor 1001 .
- the processor 1001 is used to execute program codes or instructions stored in the memory 1003 .
- One or more software modules may be included in the program code.
- the processor 1001 may also store program codes or instructions for executing the solution of the present application. In this case, the processor 1001 does not need to read the program codes or instructions from the memory 1003 .
- the network interface 1004 can be a device such as a transceiver for communicating with other devices or a communication network, and the communication network can be Ethernet, radio access network (RAN) or wireless local area networks (wireless local area networks, WLAN).
- the network interface 1004 may be used to receive messages sent by other nodes in the segment routing network, and may also send messages to other nodes in the segment routing network.
- the network interface 1004 may be an Ethernet interface (ethernet) interface, a fast ethernet (fast ethernet, FE) interface or a gigabit ethernet (gigabit ethernet, GE) interface, etc.
- the device 1000 may include multiple processors, for example, the processor 1001 and the processor 405 shown in FIG. 10 .
- processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
- FIG. 11 is a schematic structural diagram of a device 1100 provided in an embodiment of the present application.
- the first device and the second device in FIG. 3 can be realized by the device shown in FIG. 11 .
- the device 1100 includes a main control board and one or more interface boards.
- the main control board is communicatively connected with the interface board.
- the main control board is also called a main processing unit (main processing unit, MPU) or a route processing card (route processor card).
- the main control board includes a CPU and a memory. Route calculation, device management and maintenance functions.
- the interface board is also called a line processing unit (line processing unit, LPU) or a line card (line card), and is used to receive and send packets.
- line processing unit line processing unit
- LPU line processing unit
- line card line card
- the communication between the main control board and the interface board or between the interface board and the interface board is through a bus.
- the interface boards communicate through the SFU.
- the device 1100 also includes the SFU.
- the SFU communicates with the main control board and the interface board.
- the SFU is used to forward the interface board.
- the data between them, the SFU can also be called a switch fabric unit (SFU).
- the interface board includes a CPU, a memory, a forwarding engine, and an interface card (interface card, IC), where the interface card may include one or more network interfaces.
- the network interface may be an Ethernet interface, an FE interface, or a GE interface.
- the CPU communicates with the memory, the forwarding engine and the interface card respectively.
- the memory can be used to store forwarding tables.
- the forwarding engine is used to forward the received message based on the forwarding table stored in the memory.
- the forwarding engine may be a network processor (network processor, NP).
- the interface card is also called a daughter card, which can be installed on the interface board. It is responsible for converting the photoelectric signal into a data frame, and checking the validity of the data frame before forwarding it to the forwarding engine for processing or the CPU of the interface board.
- the CPU can also perform the function of the forwarding engine, such as implementing soft forwarding based on a general-purpose CPU, so that no forwarding engine is needed in the interface board.
- the forwarding engine may be implemented by an ASIC or a field programmable gate array (field programmable gate array, FPGA).
- the memory storing the forwarding table can also be integrated into the forwarding engine as a part of the forwarding engine.
- the embodiment of the present application also provides a chip system, including: a processor, the processor is coupled with a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the The chip system implements the method executed by the first device or the second device in the above embodiment shown in FIG. 3 .
- processors in the chip system there may be one or more processors in the chip system.
- the processor can be realized by hardware or by software.
- the processor may be a logic circuit, an integrated circuit, or the like.
- the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
- the memory can be integrated with the processor, or can be set separately from the processor, which is not limited in this application.
- the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
- the setting method of the processor is not specifically limited.
- the system-on-a-chip can be an FPGA, an ASIC, a system on chip (SoC), a CPU, an NP, or a digital signal processing circuit (digital signal processor, DSP), can also be a microcontroller (micro controller unit, MCU), can also be a programmable controller (programmable logic device, PLD) or other integrated chips.
- SoC system on chip
- DSP digital signal processing circuit
- MCU microcontroller
- PLD programmable controller
- each step in the foregoing method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions in the form of software.
- the method steps disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
- the embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when run on a computer, cause the computer to execute the method in the foregoing embodiments.
- At least one (one) means one or more, and “multiple” means two or more.
- At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items.
- at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
- “A and/or B” is considered to include A alone, B alone, and A+B.
- the disclosed system, device and method can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical module division.
- multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be obtained according to actual needs to achieve the purpose of the solution of this embodiment.
- each module unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software module units.
- the integrated unit is implemented in the form of a software module unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for enabling a computer device (which may be a personal computer, a server, or a first device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
- the functions described in the present invention may be implemented by hardware, software, firmware or any combination thereof.
- the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
- Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
- a storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请公开了一种报文转发方法、确定链路状态的方法、设备及系统,在本申请提供的方法中,第一设备生成包括第一标识和第二标识的链路状态报文。其中,第一标识用于指示第一设备的第一邻居设备。基于第一标识,获取链路状态报文的设备能够确定链路状态报文指示的链路状态对应的具体链路。第一设备向第二设备发送链路状态报文。第二设备为第一设备的第二邻居设备。第二设备基于获取的链路状态报文包括的第一标识,能够确定链路状态报文指示的链路状态是第三设备与第一邻居设备之间链路的链路状态。第二设备能够确定链路状态对应的具体链路,从而能够基于获取的链路状态计算路径,或者对链路状态进行监测。
Description
本申请要求于2022年01月14日提交中国国家知识产权局、申请号为202210042399.4、发明名称为“一种报文发送方法、确定链路状态的方法、设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信领域,特别是涉及一种报文发送方法、确定链路状态的方法、设备及系统。
为了计算网络中的路径,或者是对网络中的链路的状态进行监测,通常需要获取网络设备之间链路的链路状态。网络设备利用链路检测方法检测与邻居设备之间链路的链路状态,并向邻居设备发送携带链路状态的链路状态报文,以便邻居设备获取链路状态。
但是,网络设备的邻居设备在接收到链路状态报文后,无法确定链路状态报文包括的链路状态所对应的链路。这会导致网络设备的邻居设备无法利用链路状态报文包括的链路状态计算路径或者对链路状态进行监测。
发明内容
本申请提供了一种报文发送方法、确定链路状态的方法、设备及系统,获取链路状态报文的设备能够基于链路状态报文确定链路状态对应的链路,从而能够基于链路状态进行路径计算或者链路状态的监测。
第一方面,本申请提供了一种报文发送方法,该报文发送方法应用于第一设备。在该报文发送方法中,第一设备生成包括第一标识和第二标识的链路状态报文。第一标识用于指示第一设备的第一邻居设备。第一邻居设备为进行链路状态检测的链路的端点设备。第二标识用于指示指定路由器。其中,指定路由器是一个逻辑设备,用于构建第一设备所在的网络的网络拓扑。第一设备向第二设备发送链路状态报文,其中,第二设备为第一设备的第二邻居设备。链路状态报文包括指示第一邻居设备的第一标识。第二设备能够根据链路状态报文携带的第一标识确定链路状态对应的链路一端为第一邻居设备,进而确定链路状态对应的链路。
在一种可能的实现方式中,所述指定路由器包括中间系统到中间系统ISIS定义的指定中间系统DIS。
在一种可能的实现方式中,所述指定路由器包括开放式最短路径优先OSPF定义的指定路由器DR。
在一种可能的实现方式中,第二设备是第一设备的IGP邻居。对应的,第一设备发送的链路状态报文为链路状态协议数据单元LSP报文。
在一种可能的实现方式中,第二设备是第一设备的IGP邻居。对应的,第一设备发送的链路状态报文为链路状态公告LSA报文。
在一种可能的实现方式中,第二设备是第一设备的边界网关协议BGP邻居。对应的,链路状态报文为边界网关协议-链路状态BGP-LS报文。
在一种可能的实现方式中,BGP-LS报文还包括第三标识。第三标识用于指示检测得到所述链路状态报文指示的链路状态的设备。
在一种可能的实现方式中,所述第一标识为所述第一邻居设备的系统标识System ID,或者路由器标识Router ID。作为一种示例,链路状态报文为链路状态协议数据单元LSP报文时,第一标识为System ID。作为另一种示例,链路状态报文为链路状态公告LSA报文时,第一标识为Router ID。作为又一种示例,链路状态报文为边界网关协议-链路状态BGP-LS报文,第一标识为System ID或者Router ID。
在一种可能的实现方式中,所述链路状态报文包括类型长度值TLV,所述TLV携带所述第一标识。
在一种可能的实现方式中,所述TLV为最小/最大单向链路时延Min/Max Unidirectional Link Delay Sub-TLV、单向链路时延Unidirectional Link Delay Sub-TLV、单向时延变化Unidirectional Delay Variation Sub-TLV、单向链路损失Unidirectional Link Loss Sub-TLV、单向剩余带宽Unidirectional Residual Bandwidth Sub-TLV、单向可用带宽Unidirectional Available Bandwidth Sub-TLV、单向实际使用带宽Unidirectional Utilized Bandwidth Sub-TLV中的一种或者多种。
第二方面,本申请提供一种确定链路状态的方法,该方法应用于第二设备。在该方法中,第二设备接收包括第一标识的链路状态报文。第一标识用于指示第一设备的第一邻居设备。其中,第一设备是生成和发送链路报文的设备。第二设备为第一设备的第二邻居设备。第二设备根据第一标识能够确定链路状态对应的链路的一端为第一设备的第一邻居设备,从而确定第三设备与第一邻居设备之间链路的链路状态。如此,基于链路状态报文包括的第一标识,第二设备能够确定链路状态对应的链路。
在一种可能的实现方式中,所述第二设备为所述第一设备的内部网关协议IGP邻居设备。
在一种可能的实现方式中,链路状态报文为链路状态协议数据单元LSP报文,或者,链路状态报文为链路状态公告LSA报文。
在一种可能的实现方式中,所述第一设备的第一邻居设备为所述第二设备。
在一种可能的实现方式中,所述第二设备为所述第一设备的边界网关协议BGP邻居设备。
在一种可能的实现方式中,所述链路状态报文为边界网关协议-链路状态BGP-LS报文。
在一种可能的实现方式中,所述第三设备为所述第一设备。
在一种可能的实现方式中,所述第三设备为所述第一设备的第三邻居设备。
在一种可能的实现方式中,所述链路状态报文还包括第三标识,所述第三标识与所述第一标识对应,所述第三标识用于指示所述第三设备。第二设备能够基于第三标识确定链路状态对应的链路的另一端为第三设备。
在一种可能的实现方式中,所述方法还包括:
所述第二设备基于所述链路状态计算路径。
在一种可能的实现方式中,所述方法还包括:
所述第二设备向控制设备发送链路状态信息,所述链路状态信息用于指示所述链路状态。
在一种可能的实现方式中,所述第一标识为所述邻居设备的系统标识System ID,或者路由器标识Router ID。作为一种示例,链路状态报文为链路状态协议数据单元LSP报文时,第一标识为System ID。作为另一种示例,链路状态报文为链路状态公告LSA报文时,第一标识为Router ID。作为又一种示例,链路状态报文为边界网关协议-链路状态BGP-LS报文,第一标识为System ID或者Router ID。
在一种可能的实现方式中,所述链路状态报文包括类型长度值TLV,所述TLV携带所述标识。
在一种可能的实现方式中,所述TLV为最小/最大单向链路时延Min/Max Unidirectional Link Delay Sub-TLV、单向链路时延Unidirectional Link Delay Sub-TLV、单向时延变化Unidirectional Delay Variation Sub-TLV、单向链路损失Unidirectional Link Loss Sub-TLV、单向剩余带宽Unidirectional Residual Bandwidth Sub-TLV、单向可用带宽Unidirectional Available Bandwidth Sub-TLV、单向实际使用带宽Unidirectional Utilized Bandwidth Sub-TLV中的一种或者多种。
第三方面,本申请提供一种用于报文发送的设备,所述设备应用于第一设备,所述设备包括:
处理单元,用于生成链路状态报文,所述链路状态报文包括第一标识和第二标识,所述第一标识用于指示所述第一设备的第一邻居设备,所述第二标识用于指示指定路由器;
收发单元,用于向所述第二设备发送所述链路状态报文,所述第二设备为所述第一设备的第二邻居设备。
在一种可能的实现方式中,所述指定路由器包括中间系统到中间系统ISIS定义的指定中间系统DIS。
在一种可能的实现方式中,所述指定路由器包括开放式最短路径优先OSPF定义的指定路由器DR。
在一种可能的实现方式中,所述链路状态报文为链路状态协议数据单元LSP报文,所述第二设备是所述第一设备的内部网关协议IGP邻居。
在一种可能的实现方式中,所述链路状态报文为链路状态公告LSA报文,所述第二设备是所述第一设备的IGP邻居。
在一种可能的实现方式中,所述链路状态报文为边界网关协议-链路状态BGP-LS报文,所述第二设备是所述第一设备的边界网关协议BGP邻居。
在一种可能的实现方式中,所述BGP-LS报文还包括第三标识,所述第三标识用于指示检测得到所述链路状态报文指示的链路状态的设备。
在一种可能的实现方式中,所述第一标识为所述第一邻居设备的系统标识System ID,或者路由器标识Router ID。
在一种可能的实现方式中,所述链路状态报文包括类型长度值TLV,所述TLV携带所述第一标识。
在一种可能的实现方式中,所述TLV为最小/最大单向链路时延Min/Max Unidirectional Link Delay Sub-TLV、单向链路时延Unidirectional Link Delay Sub-TLV、单向时延变化Unidirectional Delay Variation Sub-TLV、单向链路损失Unidirectional Link Loss Sub-TLV、单向剩余带宽Unidirectional Residual Bandwidth Sub-TLV、单向可用带宽Unidirectional Available Bandwidth Sub-TLV、单向实际使用带宽Unidirectional Utilized Bandwidth Sub-TLV中的一种或者多种。
第四方面,本申请提供一种确定链路状态的设备,所述设备应用于第二设备,所述设备包括:
收发单元,用于接收链路状态报文,所述链路状态报文包括第一标识,所述第一标识用于指示第一设备的第一邻居设备,所述第一设备用于生成和发送所述链路状态报文,所述第二设备为所述第一设备的第二邻居设备;
处理单元,用于根据所述第一标识确定第三设备与所述第一邻居设备之间链路的链路状态,所述第三设备为检测得到所述链路状态的设备。
在一种可能的实现方式中,所述第二设备为所述第一设备的内部网关协议IGP邻居设备。
在一种可能的实现方式中,所述链路状态报文为链路状态协议数据单元LSP报文。
在一种可能的实现方式中,所述链路状态报文为链路状态公告LSA报文。
在一种可能的实现方式中,所述第一设备的第一邻居设备为所述第二设备。
在一种可能的实现方式中,所述第二设备为所述第一设备的边界网关协议BGP邻居设备。
在一种可能的实现方式中,所述链路状态报文为边界网关协议-链路状态BGP-LS报文。
在一种可能的实现方式中,所述第三设备为所述第一设备。
在一种可能的实现方式中,所述第三设备为所述第一设备的第三邻居设备。
在一种可能的实现方式中,所述链路状态报文还包括第三标识,所述第三标识与所述第一标识对应,所述第三标识用于指示所述第三设备。
在一种可能的实现方式中,所述处理单元,还用于基于所述链路状态计算路径。
在一种可能的实现方式中,所述收发单元,还用于向控制设备发送链路状态信息,所述链路状态信息用于指示所述链路状态。
在一种可能的实现方式中,所述第一标识为所述邻居设备的系统标识System ID,或者路由器标识Router ID。
在一种可能的实现方式中,所述链路状态报文包括类型长度值TLV,所述TLV携带所述标识。
在一种可能的实现方式中,所述TLV为最小/最大单向链路时延Min/Max Unidirectional Link Delay Sub-TLV、单向链路时延Unidirectional Link Delay Sub-TLV、单向时延变化Unidirectional Delay Variation Sub-TLV、单向链路损失Unidirectional Link Loss Sub-TLV、单向剩余带宽Unidirectional Residual Bandwidth Sub-TLV、单向可用带宽Unidirectional Available Bandwidth Sub-TLV、单向实际使用带宽Unidirectional Utilized Bandwidth Sub-TLV中的一种或者多种。
第五方面,本申请提供一种网络系统,该网络系统包括第一设备和第二设备。其中,第一设备,用于生成链路状态报文,所述链路状态报文包括第一标识和第二标识,所述第一标识用于指示所述第一设备的第一邻居设备,所述第二标识用于指示指定路由器,向第二设备发送链路状态报文。第二设备,用于接收链路状态报文,并根据所述第一标识确定第三设备与所述第一邻居设备之间链路的链路状态,所述第三设备为检测得到所述链路状态的设备,所述第二设备为所述第一设备的第二邻居设备。
第六方面,本申请提供一种网络设备,所述网络设备包括处理器芯片和存储器,存储器用于存储指令或程序代码,处理器芯片用于从存储器中调用并运行所述指令或程序代码,以执行如第一方面所述的报文发送方法或者执行如第二方面所述的确定链路状态的方法。
第七方面,本申请提供一种网络系统,该网络系统包括如第三方面所述的用于报文发送的设备和如第四方面所述的确定链路状态的设备。
第八方面,本申请提供一种计算机可读存储介质,包括指令、程序或代码,当其在计算机上执行时,使得所述计算机执行如第一方面所述的报文发送方法,或者如第二方面所述的确定链路状态的方法。
第九方面,本申请提供了一种芯片,包括存储器和处理器。存储器用于存储指令或程序代码。处理器用于从存储器中调用并运行该指令或程序代码,以执行上述第一方面所述的方法;或,处理器执行第二方面所述的方法。
在一种可能的设计中,上述芯片仅包括处理器,处理器用于读取并执行存储器中存储的指令或程序代码,当指令或程序代码被执行时,处理器执行第一方面所述的方法;或,处理器执行第二方面所述的方法。
图1为本申请实施例提供的一种网络结构示意图;
图2为本申请实施例提供的一种网络的拓扑结构的示意图;
图3为本申请实施例提供的一种网络设备和第二设备的交互示意图;
图4a为本申请实施例提供的LSP报文中Min/Max Unidirectional Link Delay Sub-TLV字段的格式示意图;
图4b为本申请实施例提供的LSP报文中Unidirectional Link Delay Sub-TLV字段的格式示意图;
图4c为本申请实施例提供的LSP报文中Unidirectional Delay Variation Sub-TLV字段的格式示意图;
图4d为本申请实施例提供的LSP报文中Unidirectional Link Loss Sub-TLV字段的格式示意图;
图4e为本申请实施例提供的LSP报文中Unidirectional Residual Bandwidth Sub-TLV字段的格式示意图;
图4f为本申请实施例提供的LSP报文中Unidirectional Available Bandwidth Sub-TLV字段的格式示意图;
图4g为本申请实施例提供的LSP报文中Unidirectional Utilized Bandwidth Sub-TLV字 段的格式示意图;
图5a为本申请实施例提供的LSA报文中Min/Max Unidirectional Link Delay Sub-TLV字段的格式示意图;
图5b为本申请实施例提供的LSA报文中Unidirectional Link Delay Sub-TLV字段的格式示意图;
图5c为本申请实施例提供的LSA报文中Unidirectional Delay Variation Sub-TLV字段的格式示意图;
图5d为本申请实施例提供的LSA报文中Unidirectional Link Loss Sub-TLV字段的格式示意图;
图5e为本申请实施例提供的LSA报文中Unidirectional Residual Bandwidth Sub-TLV字段的格式示意图;
图5f为本申请实施例提供的LSA报文中Unidirectional Available Bandwidth Sub-TLV字段的格式示意图;
图5g为本申请实施例提供的LSA报文中Unidirectional Utilized Bandwidth Sub-TLV字段的格式示意图;
图6a为本申请实施例提供的BGP-LS报文中Min/Max Unidirectional Link Delay Sub-TLV字段的格式示意图;
图6b为本申请实施例提供的BGP-LS报文中Unidirectional Link Delay Sub-TLV字段的格式示意图;
图6c为本申请实施例提供的BGP-LS报文中Unidirectional Delay Variation Sub-TLV字段的格式示意图;
图6d为本申请实施例提供的BGP-LS报文中Unidirectional Link Loss Sub-TLV字段的格式示意图;
图6e为本申请实施例提供的BGP-LS报文中Unidirectional Residual Bandwidth Sub-TLV字段的格式示意图;
图6f为本申请实施例提供的BGP-LS报文中Unidirectional Available Bandwidth Sub-TLV字段的格式示意图;
图6g为本申请实施例提供的BGP-LS报文中Unidirectional Utilized Bandwidth Sub-TLV字段的格式示意图;
图7为本申请实施例提供的设备的结构示意图;
图8为本申请实施例提供的设备的结构示意图;
图9为本申请实施例提供的网络系统的结构示意图;
图10为本申请实施例提供的设备的结构示意图;
图11为本申请实施例提供的设备的结构示意图。
下面结合附图,对本申请的实施例进行描述。
参见图1所示,该图为本申请实施例提供的一种网络结构示意图。该网络包括网络设 备101、网络设备102、网络设备103以及控制器104。网络设备101和网络设备102建立内部网关协议(interior gateway protocol,IGP)邻居,网络设备101与网络设备103建立IGP邻居,网络设备102与网络设备103建立IGP邻居。网络设备101与控制器104建立边界网关协议(border gateway protocol,BGP)邻居。
网络具体能够运行中间系统到中间系统(intermediate system to intermediate system,ISIS)协议,或者是开放式最短路径优先(open shortest path first,OSPF)协议。基于ISIS协议或者OSPF协议,网络设备101-网络设备103会选举出一个指定路由器。指定路由器是基于网络设备建立的虚拟设备。指定路由器用于建立网络的拓扑结构。
参见图2所示,该图为本申请实施例提供的一种网络的拓扑结构的示意图。拓扑结构包括网络设备101-网络设备103、控制器104以及指定路由器105这五个设备。拓扑结构还包括网络设备101与控制器104之间的链路,以及网络设备101-网络设备103分别与指定路由器105之间的链路。基于指定路由器,能够简化网络设备101-网络设备103之间的连接关系,便于计算路径。
网络设备101-网络设备103能够检测本设备与IGP邻居设备之间链路的链路状态。以网络设备101为例,网络设备101与网络设备102为IGP邻居关系,网络设备101与网络设备103为IGP邻居关系。网络设备101能够采用链路检测方法检测网络设备101与网络设备102之间链路的链路状态,以及网络设备101与网络设备103之间链路的链路状态。网络设备101能够向IGP邻居设备或者是BGP邻居设备发送携带链路状态的链路状态报文。在网络设备101发送的链路状态报文中,链路状态对应于拓扑结构中网络设备101与指定路由器105之间的链路,并不能对应于具体的网络设备101与网络设备102之间链路,或者网络设备101与网络设备103之间链路。
网络设备102在获取到链路状态报文后,只能确定链路状态报文指示的链路状态是网络设备101与网络设备101的邻居设备之间链路的链路状态。网络设备102无法确定网络设备101的邻居设备具体是网络设备102还是网络设备103。类似的,网络设备103在获取到链路状态报文后,也只能确定链路状态报文指示的链路状态是网络设备101与网络设备101的邻居设备之间链路的链路状态。网络设备103也无法确定网络设备101的邻居设备具体是网络设备102还是网络设备103。
网络设备101还可以采集链路状态。比如,网络设备101获取网络设备102发送的网络设备102与指定路由器105之间链路的链路状态。网络设备101基于采集的链路状态,能够生成链路状态报文。网络设备101向控制器104发送链路状态报文。控制器104基于获取的链路状态报文,能够获取网络设备102与指定路由器105之间链路的链路状态。控制器104无法确定获取的链路状态是网络设备102与网络设备102的哪个邻居设备之间链路的链路状态。控制器104无法利用获取链路状态进行路径计算以及链路状态的监测。
由此可知,基于包括指定路由器的拓扑结构,控制器或者网络设备能够得到生成链路状态的网络设备与指定路由器之间链路的链路状态,仅能确定链路包括的检测链路状态的网络设备,不能确定另一端的具体的网络设备。控制器或者网络设备无法确定网络设备之间链路的链路状态,导致无法使用获取的链路状态进行路径计算以及链路状态的监测。
基于上述问题,本申请实施例提供一种报文转发方法及确定链路状态的方法。在本申 请实施例提供的方法中,第一设备生成包括第一标识和第二标识的链路状态报文。其中,第一标识用于指示第一设备的第一邻居设备。基于第一标识,获取链路状态报文的设备能够确定链路状态报文指示的链路状态对应的具体链路。第一设备向第二设备发送链路状态报文。第二设备,也就是第一设备的第二邻居设备基于获取的链路状态报文包括的第一标识,能够确定链路状态报文指示的链路状态是第三设备与第一邻居设备之间链路的链路状态。其中,第三设备为检测得到链路状态的设备。第三设备可以是网络设备。第二设备能够确定链路状态对应的具体链路,能够基于获取的链路状态计算路径,或者对链路状态进行监测。
下面先对本申请实施例提供的报文转发方法以及确定链路状态的方法的适用场景进行介绍。
本申请实施例提供的报文转发方法以及确定链路状态的方法能够适用于图1所示的网络。需要说明的是,网络设备101与网络设备102互为对等体,网络设备102与网络设备103互为对等体,网络设备101与网络设备103也互为对等体。网络设备101-网络设备103可以为路由器、交换机等具有转发功能的设备。
以网络设备101与网络设备102为例,本申请实施例提供三种示例性的连接方式。网络设备101与网络设备102之间可以采用以下三种连接方式中的任意一种连接。
第一种:网络设备101与网络设备102通过物理链路直接连接。通过物理链路直接连接也可以称为直连。
第二种:网络设备101与网络设备102通过其它物理设备连接。该物理设备能够向网络设备101透传来自网络设备102的报文,或者向网络设备102透传来自网络设备101的报文。
第三种:网络设备101与网络设备102通过网络连接。该网络可以是二层网络。具体的,该网络可以是局域网(local area network,LAN)子网(sub network)。
类似的,网络设备101与网络设备103之间,以及网络设备102与网络设备103之间能够采用上述三种连接方式中的任意一种连接方式连接。
下面对本申请实施例提供的报文转发的方法和确定链路状态的方法进行介绍。
参见图3所示,该图为本申请实施例提供的一种第一设备和第二设备的交互示意图,包括S301-S304。
S301:第一设备生成链路状态报文。
第一设备是能够生成链路状态报文并且发送链路状态报文的网络设备。
在本申请实施例中,结合上述图1所示,第一设备可以是网络设备101-网络设备103中的任意一个网络设备。
第一设备能够检测第一设备与第一邻居设备之间链路的链路状态,并基于检测得到的链路状态生成链路状态报文。该链路状态报文能够用于向其他邻居设备通告检测得到的链路状态。
第一设备也能够采集网络设备检测得到的链路状态,并基于采集得到的链路状态生成链路状态报文。第一设备可以向邻居设备发送包括采集到的链路状态的链路状态报文。邻居设备能够基于该链路状态报文获取网络包括的网络设备之间链路的链路状态。
下面分别对这两种第一设备生成链路状态报文的方式进行介绍。
方式一:第一设备基于检测得到链路状态生成链路状态报文。
第一设备具有检测链路状态的功能。第一设备能够检测第一设备与第一设备的第一邻居设备之间链路的链路状态。
其中,第一邻居设备可以是第一设备的IGP邻居。结合图1所示,以本申请实施例中的第一设备为网络设备101为例,第一邻居设备可以是网络设备102或者网络设备103。
作为一种示例,第一设备能够基于双向主动测量协议(two way active measurement protocol,twamp)检测链路状态。
第一设备检测的链路状态可以包括时延、损失以及带宽等一种或者多种。对于检测链路的时延,第一设备能够得到链路时延值或者是链路时延变化值。对于检测链路的损失,第一设备能够得到链路损失值。对于检测链路的带宽,第一设备能够得到链路的剩余带宽、可用带宽和实际使用带宽中的一个或者多个。
第一设备基于链路状态的检测结果,能够生成链路状态报文。链路状态报文用于指示链路状态。作为一种示例,链路状态报文能够包括指示链路状态的参数,比如上述链路时延值、链路时延变化值、链路损失值、剩余带宽、可用带宽和实际使用带宽中的一个或者多个。
链路状态报文包括第一标识和第二标识。
其中,第一标识用于指示第一设备的第一邻居设备。第一邻居设备也就是第一设备检测的链路另一端的邻居设备。第一标识可以是用于唯一标识第一邻居设备的设备标识。
第二标识用于指示指定路由器。其中,指定路由器是第一设备和第一设备的邻居设备选举出的路由器。具体的,指定路由器可以是第一设备和第一设备的IGP邻居设备基于IGP协议选举确定的。
指定路由器是一个伪节点。指定路由器基于网络中的网络设备建立,是一个逻辑设备。指定路由器例如可以是网络设备包括的功能模块。结合图2所示,指定路由器可以是指定路由器105。
链路状态报文的类型、第一标识的类型以及指定路由器的类型由第一设备和第一设备的邻居设备所运行的IGP协议的类型确定。在不同类型的IGP协议中,链路状态报文的类型、第一标识的类型以及指定路由器的类型不同。
作为一种示例,第一设备和第一设备的邻居设备所运行的IGP协议为ISIS协议。
第一设备生成的链路状态报文为链路状态协议数据单元(link state protocol data unit,LSP)报文。
基于ISIS协议,每个网络设备对应于不同的系统(System)标识(identity,ID)。System ID能够标识网络中的网络设备。对应的,LSP报文包括的第一标识可以是网络设备的第一邻居设备的System ID。
第二标识指示的指定路由器,可以是ISIS协议定义的指定中间系统(designated intermediate system,DIS)。
作为另一种示例,第一设备和第一设备的邻居设备所运行的IGP协议为OSPF协议。
第一设备生成的链路状态报文为链路状态公告(link state advertisement,LSA)报文。
基于OSPF协议,每个网络设备对应于不同的路由器标识(Router ID)。Router ID能够标识网络中的网络设备。对应的,LSA报文包括的第一标识可以是第一设备的第一邻居设备的Router ID。
第二标识指示的指定路由器,可以是OSPF协议定义的指定路由器(designated router,DR)。
方式二:第一设备基于采集得到的链路状态生成链路状态报文。
第一设备能够采集网络中的网络设备生成的链路状态,并基于采集的链路状态生成链路状态报文。
需要说明的是,第一设备采集得到的链路状态可以包括由第一设备检测得到的链路状态,和从其它网络设备获取的链路状态中的一种或者多种。
结合上述图1为例,本申请实施例中的第一设备可以是网络设备101。网络设备101获取网络设备102发送的链路状态报文。网络设备102发送的链路状态报文包括指示网络设备103的第一标识。
网络设备101能够基于采集得到的网络设备102发送的链路状态报文指示的链路状态,以及检测得到的网络设备101与网络设备102之间链路的链路状态,生成链路状态报文。第一标识用于指示链路两端的网络设备中非链路状态检测一端的网络设备。对于网络设备102与网络设备103之间链路的链路状态,第一标识用于指示网络设备103。对于网络设备101与网络设备102之间链路的链路状态,第一标识用于指示网络设备102。
为了区别不同链路的链路状态,链路状态报文还包括第三标识。第三标识与第一标识对应。第三标识用于指示检测生成链路状态的网络设备。
作为一种示例,第三标识可以用于指示第一设备。基于第一标识和第三标识,获取链路状态报文的设备能够确定链路状态报文指示第一设备与第一邻居设备之间链路的链路状态。
以上述网络设备101生成的链路状态报文为例,第一标识用于指示网络设备102,第一标识对应的第三标识用于指示网络设备101。
作为另一种示例,第三标识可以用指示第一设备的第三邻居设备。基于第一标识和第三标识,获取链路状态报文的设备能够确定链路状态报文指示第三邻居设备与第一邻居设备之间链路的链路状态。
以上述网络设备101生成的链路状态报文为例,第一标识用于指示网络设备103,第一标识对应的第三标识用于指示网络设备102。其中,网络设备103为网络设备101的第二邻居设备。网络设备102为网络设备101的第三邻居设备。
在本申请实施例中,第一设备生成的链路状态报文可以是边界网关协议链路状态(border gateway protocol-link state,BGP-LS)报文。
需要说明的是,BGP-LS协议支持第一设备基于IGP协议收集链路信息。第一设备所在的网络能够运行ISIS协议或者OSPF协议。
作为一种示例,第一设备所在的网络运行ISIS协议,BGP-LS报文包括的第一标识为第一设备的第一邻居设备的System ID。
对应的,BGP-LS报文包括的第三标识为第一设备的第三邻居设备的System ID或者第 一设备的System ID。
作为另一种示例,第一设备所在的网络运行OSPF协议,BGP-LS报文包括的第一标识为第一设备的第一邻居设备的Router ID。
对应的,BGP-LS报文包括的第三标识为第一设备的第三邻居设备的Router ID或者第一设备的Router ID。
在一种可能的实现方式中,第一设备生成的链路状态报文包括类型长度值(type length value,TLV)。该TLV携带指示第一设备的第一邻居设备的第一标识。
其中,TLV的具体类型与链路状态报文指示的链路状态的类型以及链路状态报文的类型有关。作为一些示例,本申请实施例分别提供上述三种链路状态报文包括的TLV的具体类型,具体请参见下文。
S302:第一设备向第二设备发送链路状态报文。
第二设备为第一设备的第二邻居设备。第二设备可以是网络设备、控制器或路由反射器(route reflector,RR)。其中,RR可以与控制器连接,用于向控制器转发第一设备发送的链路状态报文。
第二设备可以是第一设备的第一邻居设备,也可以是与第一邻居设备不同的设备。也就是说,第二设备可以是第一设备检测链路另一端的邻居设备,也可以是第一设备的其它邻居设备。
作为一种示例,结合图1所示,第一设备可以是网络设备101,第一设备的第一邻居设备和第一设备的第二邻居设备是相同的邻居设备。第一邻居设备和第二邻居设备是网络设备102。网络设备101检测与网络设备102之间链路的链路状态。网络设备101基于检测得到的链路状态,生成链路状态报文,并向网络设备102发送生成的链路状态报文。
作为另一种示例,结合图1所示,第一设备可以是网络设备101,第一设备第一邻居设备和第一设备的第二邻居设备是不同的邻居设备。比如,第一邻居设备是网络设备102。第二邻居设备是网络设备103。网络设备101检测与网络设备102之间链路的链路状态。网络设备101基于检测得到的链路状态,生成链路状态报文,并向网络设备103发送生成的链路状态报文。又比如,第一邻居设备是网络设备102。第二邻居设备是控制器104。网络设备101检测与网络设备102之间链路的链路状态。网络设备101基于检测得到的链路状态,生成链路状态报文,并向控制器104发送生成的链路状态报文。
需要说明的是,第二设备,也就是第一设备的第二邻居设备,可以是第一设备的IGP邻居,也可以是第一设备的BGP邻居。第二设备的邻居类型与链路状态报文的类型相关。
在一种可能的实现方式中,第二设备可以是第一设备的IGP邻居。链路状态报文可以是LSP报文或者LSA报文。
在另一种可能的实现方式中,第二设备可以是第一设备的BGP邻居。链路状态报文可以是BGP-LS报文。
S303:第二设备接收链路状态报文。
S304:第二设备根据第一标识确定第三设备与第一设备的第一邻居设备之间链路的链路状态。
第二设备基于链路状态报文包括的第一标识,能够确定链路状态报文指示的链路状态 所对应的链路的一端为第一标识指示的第一邻居设备。
在一种可能的实现方式中,第二设备能够基于生成和发送链路状态报文的第一设备确定链路状态报文指示的链路为第一设备与第一邻居设备之间的链路。
具体的,例如,对于为LSP报文或者LSA报文的链路状态报文,生成链路状态报文的设备,也就是第三设备,为检测得到链路状态的第一设备。
第二设备基于链路状态报文为LSP报文或者LSA报文,以及链路状态报文包括的第一标识,能够确定第一设备与第一标识指示的第一邻居设备之间链路的链路状态。
在另一种可能的实现方式中,链路状态报文包括指示第三设备的第三标识。第三标识与第一标识对应。第二设备能够基于第三标识确定第三设备。
其中,第三设备可以是第一设备,也可以是第一设备的第三邻居设备。
作为一种示例,第一设备能够采集由第一设备检测得到的链路状态。对应的,第一设备生成的链路状态报文包括第三标识,第三标识用于指示第三设备,也就是生成链路状态的网络设备。第二设备基于第三标识和第一标识,能够确定链路状态报文指示的链路状态为第三设备和第一邻居设备之间链路的链路状态。
例如,结合图1所示,第一设备为网络设备101,第二设备为控制器104。控制器104获取的由网络设备101发送的链路状态报文,包括指示网络设备102的第一标识和指示网络设备101的第三标识。控制器104基于第三标识,能够确定第三设备为网络设备101。控制器104基于第一标识能够确定网络设备102。控制器104能够基于链路状态报文确定网络设备101与网络设备102之间链路的链路状态。
作为另一种示例,第一设备能够采集由第一设备第三邻居设备检测得到的链路状态。第三邻居设备是与第一邻居设备和第二邻居设备均不同的网络设备。对应的,第一设备生成的链路状态报文包括第三标识,第三标识用于指示第三邻居设备。第二设备基于第三标识和第一标识,能够确定链路状态报文指示的链路状态为第一设备的第三邻居设备和第一设备的第一邻居设备之间链路的链路状态。
例如,结合图1所示,第一设备为网络设备101,第二设备为控制器104,第一设备的第一邻居设备为网络设备103,第一设备的第三邻居设备为网络设备102。控制器104获取的由网络设备101发送的链路状态报文包括指示网络设备103的第一标识和指示网络设备102的第三标识。控制器104基于第三标识,能够确定第三设备为网络设备102。控制器104再基于第一标识能够确定链路的另一端为网络设备103。控制器104能够基链路状态报文能够确定网络设备102与网络设备103之间链路的链路状态。
在一种可能的实现方式中,第二设备可以是具有路径计算功能的设备。第二设备,例如可以是具有路径计算功能的网络设备或者是具有路径计算功能的控制设备。第二设备能够基于获取的链路状态计算路径。
在另一种可能的实现方式中,第二设备也可以是与控制设备连接的设备。第二设备,例如可以是与控制设备连接的网络设备,也可以是与其它控制设备连接的控制设备。第二设备可以向控制设备转发指示链路状态的链路状态信息,以便控制设备利用确定的链路状态进行链路状态的监测,或者是路径的计算。
下面分别介绍三种链路状态报文包括的携带第一标识的TLV。
在一种可能的实现方式中,可以扩展链路状态报文包括的TLV,在TLV中增加第一标识。
第一种:链路状态报文为LSP报文。
第一设备检测的链路状态可以包括时延、损失以及带宽等一种或者多种。下面分别对指示不同链路状态类型的链路状态报文包括的TLV进行介绍。
第一:TLV为最小/最大单向链路时延(Min/Max Unidirectional Link Delay)Sub-TLV。
参见图4a,该图为本申请实施例提供的LSP报文中Min/Max Unidirectional Link Delay Sub-TLV字段的格式示意图。该Min/Max Unidirectional Link Delay Sub-TLV字段包括类型(Type)字段、长度(Length)字段、邻居系统标识(Neighbor System-ID)字段、保留(RESERVED)字段、最大时延(Max Delay)字段以及最小时延(Min Delay)字段。
其中,Type字段的值标识该Min/Max Unidirectional Link Delay Sub-TLV字段的类型。Length字段的值为该Min/Max Unidirectional Link Delay Sub-TLV的长度。Neighbor System-ID字段能够携带第一标识。Max Delay字段能够携带最大单向链路时延值。Min Delay字段能够携带最小单向链路时延值。
第二:TLV为单向链路时延(Unidirectional Link Delay)Sub-TLV。
参见图4b,该图为本申请实施例提供的LSP报文中Unidirectional Link Delay Sub-TLV字段的格式示意图。在该图中,该Unidirectional Link Delay Sub-TLV字段包括类型(Type)字段、长度(Length)字段、邻居系统标识(Neighbor System-ID)字段、保留(RESERVED)字段以及时延(Delay)字段。
其中,Type字段的值标识该Unidirectional Link Delay Sub-TLV字段的类型。Length字段的值为该Unidirectional Link Delay Sub-TLV的长度。Neighbor System-ID字段能够携带第一标识。Delay字段携带单向链路时延值。
第三:TLV为单向时延变化(Unidirectional Delay Variation)Sub-TLV。
参见图4c,该图为本申请实施例提供的LSP报文中Unidirectional Delay Variation Sub-TLV字段的格式示意图。在该图中,该Unidirectional Delay Variation Sub-TLV字段包括类型(Type)字段、长度(Length)字段、邻居系统标识(Neighbor System-ID)字段、保留(RESERVED)字段以及时延变化(Delay Variation)字段。
其中,Type字段的值标识该Unidirectional Delay Variation Sub-TLV字段的类型。Length字段的值为该Unidirectional Delay Variation Sub-TLV的长度。Neighbor System-ID字段能够携带第一标识。Delay Variation字段携带单向链路时延变化值。
第四:TLV为单向链路损失(Unidirectional Link Loss)Sub-TLV。
参见图4d,该图为本申请实施例提供的LSP报文中Unidirectional Link Loss Sub-TLV字段的格式示意图。在该图中,该Unidirectional Link Loss Sub-TLV字段包括类型(Type)字段、长度(Length)字段、邻居系统标识(Neighbor System-ID)字段、保留(RESERVED)字段以及链路损失(Link Loss)字段。
其中,Type字段的值标识该Unidirectional Link Loss Sub-TLV字段的类型。Length字段的值为该Unidirectional Link Loss Sub-TLV的长度。Neighbor System-ID字段能够携带第一标识。Link Loss字段携带单向链路损失值。
第五:TLV为单向剩余带宽(Unidirectional Residual Bandwidth)Sub-TLV。
参见图4e,该图为本申请实施例提供的LSP报文中Unidirectional Residual Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Residual Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段、邻居系统标识(Neighbor System-ID)字段以及剩余带宽(Residual Bandwidth)字段。
其中,Type字段的值标识该Unidirectional Residual Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Residual Bandwidth Sub-TLV的长度。Neighbor System-ID字段能够携带第一标识。Residual Bandwidth字段携带剩余带宽。
第六:TLV为单向可用带宽(Unidirectional Available Bandwidth)Sub-TLV。
参见图4f,该图为本申请实施例提供的LSP报文中Unidirectional Available Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Available Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段、邻居系统标识(Neighbor System-ID)字段以及可用带宽(Available Bandwidth)字段。
其中,Type字段的值标识该Unidirectional Available Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Available Bandwidth Sub-TLV的长度。Neighbor System-ID字段能够携带第一标识。Available Bandwidth字段携带可用带宽。
第七:TLV为单向实际使用带宽(Unidirectional Utilized Bandwidth)Sub-TLV。
参见图4g,该图为本申请实施例提供的LSP报文中Unidirectional Utilized Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Utilized Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段、邻居系统标识(Neighbor System-ID)字段以及实际使用带宽(Utilized Bandwidth)字段。
其中,Type字段的值标识该Unidirectional Utilized Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Utilized Bandwidth Sub-TLV的长度。Neighbor System-ID字段能够携带第一标识。Utilized Bandwidth字段携带实际使用带宽。
第二种:链路状态报文为LSA报文。
LSA报文能够包括以下七类TLV。
第一:TLV为最小/最大单向链路时延(Min/Max Unidirectional Link Delay)Sub-TLV。
参见图5a,该图为本申请实施例提供的LSA报文中Min/Max Unidirectional Link Delay Sub-TLV字段的格式示意图。在该图中,该Min/Max Unidirectional Link Delay Sub-TLV字段包括类型(Type)字段、长度(Length)字段、路由器标识(Router Identifier)字段、保留(RESERVED)字段、最大时延(Max Delay)字段以及最小时延(Min Delay)字段。
其中,Type字段的值标识该Min/Max Unidirectional Link Delay Sub-TLV字段的类型。Length字段的值为该Min/Max Unidirectional Link Delay Sub-TLV的长度。Router Identifier字段能够携带第一标识。Max Delay字段携带最大单向链路时延值。Min Delay字段能够携带最小单向链路时延值。
第二:TLV为单向链路时延(Unidirectional Link Delay)Sub-TLV。
参见图5b,该图为本申请实施例提供的LSA报文中Unidirectional Link Delay Sub-TLV字段的格式示意图。在该图中,该Unidirectional Link Delay Sub-TLV字段包括类型(Type) 字段、长度(Length)字段、路由器标识(Router Identifier)字段、保留(RESERVED)字段以及时延(Delay)字段。
其中,Type字段的值标识该Unidirectional Link Delay Sub-TLV字段的类型。Length字段的值为该Unidirectional Link Delay Sub-TLV的长度。Router Identifier字段能够携带第一标识。Delay字段携带单向链路时延值。
第三:TLV为单向时延变化(Unidirectional Delay Variation)Sub-TLV。
参见图5c,该图为本申请实施例提供的LSA报文中Unidirectional Delay Variation Sub-TLV字段的格式示意图。在该图中,该Unidirectional Delay Variation Sub-TLV字段包括类型(Type)字段、长度(Length)字段、路由器标识(Router Identifier)字段、保留(RESERVED)字段以及时延变化(Delay Variation)字段。
其中,Type字段的值标识该Unidirectional Delay Variation Sub-TLV字段的类型。Length字段的值为该Unidirectional Delay Variation Sub-TLV的长度。Router Identifier字段能够携带第一标识。Delay Variation字段携带单向链路时延变化值。
第四:TLV为单向链路损失(Unidirectional Link Loss)Sub-TLV。
参见图5d,该图为本申请实施例提供的LSA报文中Unidirectional Link Loss Sub-TLV字段的格式示意图。在该图中,该Unidirectional Link Loss Sub-TLV字段包括类型(Type)字段、长度(Length)字段、路由器标识(Router Identifier)字段、保留(RESERVED)字段以及链路损失(Link Loss)字段。
其中,Type字段的值标识该Unidirectional Link Loss Sub-TLV字段的类型。Length字段的值为该Unidirectional Link Loss Sub-TLV的长度。Router Identifier字段能够携带第一标识。Link Loss字段携带单向链路损失值。
第五:TLV为单向剩余带宽(Unidirectional Residual Bandwidth)Sub-TLV。
参见图5e,该图为本申请实施例提供的LSA报文中Unidirectional Residual Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Residual Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段、路由器标识(Router Identifier)字段以及剩余带宽(Residual Bandwidth)字段。
其中,Type字段的值标识该Unidirectional Residual Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Residual Bandwidth Sub-TLV的长度。Router Identifier字段能够携带第一标识。Residual Bandwidth字段携带剩余带宽。
第六:TLV为单向可用带宽(Unidirectional Available Bandwidth)Sub-TLV。
参见图5f,该图为本申请实施例提供的LSA报文中Unidirectional Available Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Available Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段、路由器标识(Router Identifier)字段以及可用带宽(Available Bandwidth)字段。
其中,Type字段的值标识该Unidirectional Available Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Available Bandwidth Sub-TLV的长度。Router Identifier字段能够携带第一标识。Available Bandwidth字段携带可用带宽。
第七:TLV为单向实际使用带宽(Unidirectional Utilized Bandwidth)Sub-TLV。
参见图5g,该图为本申请实施例提供的LSA报文中Unidirectional Utilized Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Utilized Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段、路由器标识(Router Identifier)字段以及实际使用带宽(Utilized Bandwidth)字段。
其中,Type字段的值标识该Unidirectional Utilized Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Utilized Bandwidth Sub-TLV的长度。Router Identifier字段能够携带第一标识。Utilized Bandwidth字段携带实际使用带宽。
第三种:链路状态报文为BGP-LS报文。
与上述LSP报文包括的TLV类似,BGP-LS报文能够包括以下七类TLV。
第一:TLV为最小/最大单向链路时延(Min/Max Unidirectional Link Delay)Sub-TLV。
参见图6a,该图为本申请实施例提供的BGP-LS报文中Min/Max Unidirectional Link Delay Sub-TLV字段的格式示意图。在该图中,该Min/Max Unidirectional Link Delay Sub-TLV字段包括类型(Type)字段、长度(Length)字段、保留(RESERVED)字段、最大时延(Max Delay)字段以及最小时延(Min Delay)字段。Min/Max Unidirectional Link Delay Sub-TLV字段还包括ISIS邻居系统标识(IS-IS Neighbor System-ID)字段或者OSPF路由器标识(OSPF Router Identifier)字段。
其中,Type字段的值标识该Min/Max Unidirectional Link Delay Sub-TLV字段的类型。Length字段的值为该Min/Max Unidirectional Link Delay Sub-TLV的长度。IS-IS Neighbor System-ID字段或者OSPF Router Identifier字段能够携带第一标识。Max Delay字段能够携带最大单向链路时延值。Min Delay字段能够携带最小单向链路时延值。
第二:TLV为单向链路时延(Unidirectional Link Delay)Sub-TLV。
参见图6b,该图为本申请实施例提供的BGP-LS报文中Unidirectional Link Delay Sub-TLV字段的格式示意图。在该图中,该Unidirectional Link Delay Sub-TLV字段包括类型(Type)字段、长度(Length)字段、保留(RESERVED)字段以及时延(Delay)字段。Unidirectional Link Delay Sub-TLV字段还包括ISIS邻居系统标识(IS-IS Neighbor System-ID)字段或者OSPF路由器标识(OSPF Router Identifier)字段。
其中,Type字段的值标识该Unidirectional Link Delay Sub-TLV字段的类型。Length字段的值为该Unidirectional Link Delay Sub-TLV的长度。IS-IS Neighbor System-ID字段或者OSPF Router Identifier字段能够携带第一标识。Delay字段携带单向链路时延值。
第三:TLV为单向时延变化(Unidirectional Delay Variation)Sub-TLV。
参见图6c,该图为本申请实施例提供的BGP-LS报文中Unidirectional Delay Variation Sub-TLV字段的格式示意图。在该图中,该Unidirectional Delay Variation Sub-TLV字段包括类型(Type)字段、长度(Length)字段、保留(RESERVED)字段以及时延变化(Delay Variation)字段。Unidirectional Delay Variation Sub-TLV字段还包括ISIS邻居系统标识(IS-IS Neighbor System-ID)字段或者OSPF路由器标识(OSPF Router Identifier)字段。
其中,Type字段的值标识该Unidirectional Delay Variation Sub-TLV字段的类型。Length字段的值为该Unidirectional Delay Variation Sub-TLV的长度。IS-IS Neighbor System-ID字段或者OSPF Router Identifier字段能够携带第一标识。Delay Variation字段携带单向链路时 延变化值。
第四:TLV为单向链路损失(Unidirectional Link Loss)Sub-TLV。
参见图6d,该图为本申请实施例提供的BGP-LS报文中Unidirectional Link Loss Sub-TLV字段的格式示意图。在该图中,该Unidirectional Link Loss Sub-TLV字段包括类型(Type)字段、长度(Length)字段、保留(RESERVED)字段以及链路损失(Link Loss)字段。Unidirectional Link Loss Sub-TLV字段还包括ISIS邻居系统标识(IS-IS Neighbor System-ID)字段或者OSPF路由器标识(OSPF Router Identifier)字段。
其中,Type字段的值标识该Unidirectional Link Loss Sub-TLV字段的类型。Length字段的值为该Unidirectional Link Loss Sub-TLV的长度。IS-IS Neighbor System-ID字段或者OSPF Router Identifier字段能够携带第一标识。Link Loss字段携带单向链路损失值。
第五:TLV为单向剩余带宽(Unidirectional Residual Bandwidth)Sub-TLV。
参见图6e,该图为本申请实施例提供的BGP-LS报文中Unidirectional Residual Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Residual Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段以及剩余带宽(Residual Bandwidth)字段。Unidirectional Residual Bandwidth Sub-TLV字段还包括ISIS邻居系统标识(IS-IS Neighbor System-ID)字段或者OSPF路由器标识(OSPF Router Identifier)字段。
其中,Type字段的值标识该Unidirectional Residual Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Residual Bandwidth Sub-TLV的长度。IS-IS Neighbor System-ID字段或者OSPF Router Identifier字段能够携带第一标识。Residual Bandwidth字段携带剩余带宽。
第六:TLV为单向可用带宽(Unidirectional Available Bandwidth)Sub-TLV。
参见图6f,该图为本申请实施例提供的BGP-LS报文中Unidirectional Available Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Available Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段以及可用带宽(Available Bandwidth)字段。Unidirectional Available Bandwidth Sub-TLV字段还包括ISIS邻居系统标识(IS-IS Neighbor System-ID)字段或者OSPF路由器标识(OSPF Router Identifier)字段。
其中,Type字段的值标识该Unidirectional Available Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Available Bandwidth Sub-TLV的长度。IS-IS Neighbor System-ID字段或者OSPF Router Identifier字段能够携带第一标识。Available Bandwidth字段携带可用带宽。
第七:TLV为单向实际使用带宽(Unidirectional Utilized Bandwidth)Sub-TLV。
参见图6g,该图为本申请实施例提供的BGP-LS报文中Unidirectional Utilized Bandwidth Sub-TLV字段的格式示意图。在该图中,该Unidirectional Utilized Bandwidth Sub-TLV字段包括类型(Type)字段、长度(Length)字段以及实际使用带宽(Utilized Bandwidth)字段。Unidirectional Utilized Bandwidth Sub-TLV字段还包括ISIS邻居系统标识(IS-IS Neighbor System-ID)字段或者OSPF路由器标识(OSPF Router Identifier)字段。
其中,Type字段的值标识该Unidirectional Utilized Bandwidth Sub-TLV字段的类型。Length字段的值为该Unidirectional Utilized Bandwidth Sub-TLV的长度。IS-IS Neighbor System-ID字段或者OSPF Router Identifier字段能够携带第一标识。Utilized Bandwidth字段携带实际使用带宽。
在另一种可能的实现方式中,还可以增加新类型的TLV用于携带第一标识。
例如,新增的TLV可以是局域网最小/最大单向链路时延(LAN Min/Max Unidirectional Link Delay)Sub-TLV、局域网单向链路时延(LAN Unidirectional Link Delay)Sub-TLV、局域网单向时延变化(LAN Unidirectional Delay Variation)Sub-TLV、局域网单向链路损失(LAN Unidirectional Link Loss)Sub-TLV、局域网单向剩余带宽(LAN Unidirectional Residual Bandwidth)Sub-TLV、局域网单向可用带宽(LAN Unidirectional Available Bandwidth)Sub-TLV以及局域网单向实际使用带宽(LAN Unidirectional Utilized Bandwidth)Sub-TLV中的一个或者多个。
不同类型的链路状态报文包括的新增的TLV的具体格式可以参见上述扩展的TLV的格式,在此不再赘述。
图7示出了上述实施例中所涉及的用于报文发送的设备的一种可能的结构示意图,该设备700可以实现图3所示实例中第一设备的功能。参阅图7,该设备700包括:处理单元701和收发单元702。
这些单元可以执行上述方法示例中第一设备的相应功能。处理单元701,用于支持设备700执行图3中S301;收发单元702,用于支持设备700执行图3中的S302;和/或本文所描述的技术中第一设备执行的其它过程。例如,处理单元701,用于执行上述方法实施例中第一设备执行的各种处理操作;收发单元702,用于执行上述方法实施例中第一设备的各种处理的操作。举例来说,处理单元701,用于生成链路状态报文;收发单元702,用于向第二设备发送链路状态报文。具体执行过程请参考上述图3所示实施例中相应步骤的详细描述,这里不再一一赘述。
图8示出了上述实施例中所涉及的用于确定链路状态的设备的一种可能的结构示意图,该设备800可以实现图3所示实例中第二设备的功能。参阅图8,该设备800包括:收发单元801和处理单元802。
这些单元可以执行上述方法示例中第二设备的相应功能。收发单元801,用于支持设备800执行图3中的S303;处理单元802,用于支持设备800执行图3中的S304;和/或本文所描述的技术中第二设备执行的其它过程。例如,收发单元801,用于执行上述方法实施例中第二设备执行的各种收发操作;处理单元802,用于执行上述方法实施例中第二设备的各种处理操作。举例来说,收发单元801,用于接收链路状态报文;处理单元802,用于根据第一标识确定第三设备与第一设备的第一邻居设备之间链路的链路状态。具体执行过程请参考上述图3所示实施例中相应步骤的详细描述,这里不再一一赘述。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。例如,上述实施例中,获取单元和处理单元可以是同一个单元,也不同的单元。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
参阅图9所示,发明实施例提供了一种网络系统900,该网络系统900用于实现前述 方法实施例中的报文发送的方法和确定链路状态的方法。该网络系统900包括第一设备901和第二设备902。第一设备901可以实现图3所示的实施例中的第一设备的功能,第二设备902可以实现图3所示的实施例中第二设备的功能。具体执行过程请参考上述图3所示实施例中相应步骤的详细描述,这里不再一一赘述。
图10是本申请实施例提供的一种设备1000的结构示意图。图7中的设备700和图8中的设备800可以通过图10所示的设备来实现。参见图10,该设备1000包括至少一个处理器1001,通信总线1002以及至少一个网络接口1004,可选地,该设备1000还可以包括存储器1003。
处理器1001可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路(integrated circuit,IC)。处理器可以用于对报文进行处理,以实现本申请实施例中提供的报文发送方法或者确定链路状态的方法。
比如,当图3中的第一设备通过图10所示的设备来实现时,该处理器可以用于生成链路状态报文,具体功能实现可参考方法实施例中对应第一设备的处理部分。又比如,当图3中的第二设备通过图10所示的设备来实现时,该处理器可以用于根据第一标识确定第三设备与第一设备的第一邻居设备之间链路的链路状态,具体功能实现可参考方法实施例中对应第二设备的处理部分。
通信总线1002用于在处理器1001、网络接口1004和存储器1003之间传送信息。
存储器1003可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,存储器1003还可以是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1003可以是独立存在,通过通信总线1002与处理器1001相连接。存储器1003也可以和处理器1001集成在一起。
可选地,存储器1003用于存储执行本申请方案的程序代码或指令,并由处理器1001来控制执行。处理器1001用于执行存储器1003中存储的程序代码或指令。程序代码中可以包括一个或多个软件模块。可选地,处理器1001也可以存储执行本申请方案的程序代码或指令,在这种情况下处理器1001不需要到存储器1003中读取程序代码或指令。
网络接口1004可以为收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。在本申请实施例中,网络接口1004可以用于接收分段路由网络中的其他节点发送的报文,也可以向分段路由网络中的其他节点发送报文。网络接口1004可以为以太接口(ethernet)接口、快速以太(fast ethernet,FE)接口或千兆以太(gigabit ethernet,GE)接口等。
在具体实现中,作为一种实施例,设备1000可以包括多个处理器,例如图10中所示的处理器1001和处理器405。这些处理器中的每一个可以是一个单核(single-CPU)处理 器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
图11是本申请实施例提供的一种设备1100的结构示意图。图3中的第一设备和第二设备可以通过图11所示的设备来实现。参见图11所示的设备结构示意图,设备1100包括主控板和一个或多个接口板。主控板与接口板通信连接。主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板包括CPU和存储器,主控板负责对设备1100中各个组件的控制和管理,包括路由计算、设备管理和维护功能。接口板也称为线处理单元(line processing unit,LPU)或线卡(line card),用于接收和发送报文。在一些实施例中,主控板与接口板之间或接口板与接口板之间通过总线通信。在一些实施例中,接口板之间通过交换网板通信,在这种情况下设备1100也包括交换网板,交换网板与主控板、接口板通信连接,交换网板用于转发接口板之间的数据,交换网板也可以称为交换网板单元(switch fabric unit,SFU)。接口板包括CPU、存储器、转发引擎和接口卡(interface card,IC),其中接口卡可以包括一个或多个网络接口。网络接口可以为Ethernet接口、FE接口或GE接口等。CPU与存储器、转发引擎和接口卡分别通信连接。存储器可以用于存储转发表。转发引擎用于基于存储器中保存的转发表转发接收到的报文。转发引擎可以是网络处理器(network processor,NP)。接口卡也称为子卡,可安装在接口板上,负责将光电信号转换为数据帧,并对数据帧进行合法性检查后转发给转发引擎处理或接口板CPU。在一些实施例中,CPU也可执行转发引擎的功能,比如基于通用CPU实现软转发,从而接口板中不需要转发引擎。在一些实施例中,转发引擎可以通过ASIC或现场可编程门阵列(field programmable gate array,FPGA)实现。在一些实施例中,存储转发表的存储器也可以集成到转发引擎中,作为转发引擎的一部分。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述图3所示实施例中第一设备或第二设备所执行的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是FPGA,可以是ASIC,还可以是系统芯片(system on chip,SoC),还可以是CPU,还可以是NP,还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行前述实施例中的方法。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包括,例如,包括了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请中“至少一项(个)”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。本申请中认为“A和/或B”包括单独A,单独B,和A+B。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑模块划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要获取其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各模块单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件模块单元的形式实现。
所述集成的单元如果以软件模块单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者第一设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存 储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
Claims (54)
- 一种报文发送方法,其特征在于,所述方法包括:第一设备生成链路状态报文,所述链路状态报文包括第一标识和第二标识,所述第一标识用于指示所述第一设备的第一邻居设备,所述第二标识用于指示指定路由器;所述第一设备向第二设备发送所述链路状态报文,所述第二设备为所述第一设备的第二邻居设备。
- 根据权利要求1所述的方法,其特征在于,所述指定路由器包括中间系统到中间系统ISIS定义的指定中间系统DIS。
- 根据权利要求1所述的方法,其特征在于,所述指定路由器包括开放式最短路径优先OSPF定义的指定路由器DR。
- 根据权利要求1或2所述的方法,其特征在于,所述链路状态报文为链路状态协议数据单元LSP报文,所述第二设备是所述第一设备的内部网关协议IGP邻居。
- 根据权利要求1或3所述的方法,其特征在于,所述链路状态报文为链路状态公告LSA报文,所述第二设备是所述第一设备的IGP邻居。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述链路状态报文为边界网关协议-链路状态BGP-LS报文,所述第二设备是所述第一设备的边界网关协议BGP邻居。
- 根据权利要求6所述的方法,其特征在于,所述BGP-LS报文还包括第三标识,所述第三标识用于指示检测得到所述链路状态报文指示的链路状态的设备。
- 根据权利要求1、6或7所述的方法,其特征在于,所述第一标识为所述第一邻居设备的系统标识System ID,或者路由器标识Router ID。
- 根据权利要求1-8任一项所述的方法,其特征在于,所述链路状态报文包括类型长度值TLV,所述TLV携带所述第一标识。
- 根据权利要求9所述的方法,其特征在于,所述TLV为最小/最大单向链路时延Min/Max Unidirectional Link Delay Sub-TLV、单向链路时延Unidirectional Link Delay Sub-TLV、单向时延变化Unidirectional Delay Variation Sub-TLV、单向链路损失Unidirectional Link Loss Sub-TLV、单向剩余带宽Unidirectional Residual Bandwidth Sub-TLV、单向可用带宽Unidirectional Available Bandwidth Sub-TLV、单向实际使用带宽Unidirectional Utilized Bandwidth Sub-TLV中的一种或者多种。
- 一种确定链路状态的方法,其特征在于,所述方法包括:第二设备接收链路状态报文,所述链路状态报文包括第一标识,所述第一标识用于指示第一设备的第一邻居设备,所述第一设备用于生成和发送所述链路状态报文,所述第二设备为所述第一设备的第二邻居设备;所述第二设备根据所述第一标识确定第三设备与所述第一邻居设备之间链路的链路状态,所述第三设备为检测得到所述链路状态的设备。
- 根据权利要求11所述的方法,其特征在于,所述第二设备为所述第一设备的内部网关协议IGP邻居设备。
- 根据权利要求11或12所述的方法,其特征在于,所述链路状态报文为链路状态协议数据单元LSP报文。
- 根据权利要求11或12所述的方法,其特征在于,所述链路状态报文为链路状态公告LSA报文。
- 根据权利要求11-14任一项所述的方法,其特征在于,所述第二设备为所述第一设备的第一邻居设备。
- 根据权利要求11所述的方法,其特征在于,所述第二设备为所述第一设备的边界网关协议BGP邻居设备。
- 根据权利要求16所述的方法,其特征在于,所述链路状态报文为边界网关协议-链路状态BGP-LS报文。
- 根据权利要求11-17任一项所述的方法,其特征在于,所述第三设备为所述第一设备。
- 根据权利要求16或17所述的方法,其特征在于,所述第三设备为所述第一设备的第三邻居设备。
- 根据权利要求18或19所述的方法,其特征在于,所述链路状态报文还包括第三标识,所述第三标识与所述第一标识对应,所述第三标识用于指示所述第三设备。
- 根据权利要求11-20任一项所述的方法,其特征在于,所述方法还包括:所述第二设备基于所述链路状态计算路径。
- 根据权利要求11-21任一项所述的方法,其特征在于,所述方法还包括:所述第二设备向控制设备发送链路状态信息,所述链路状态信息用于指示所述链路状态。
- 根据权利要求11、16和17任一项所述的方法,其特征在于,所述第一标识为所述邻居设备的系统标识System ID,或者路由器标识Router ID。
- 根据权利要求11-23任一项所述的方法,其特征在于,所述链路状态报文包括类型长度值TLV,所述TLV携带所述标识。
- 根据权利要求24所述的方法,其特征在于,所述TLV为最小/最大单向链路时延Min/Max Unidirectional Link Delay Sub-TLV、单向链路时延Unidirectional Link Delay Sub-TLV、单向时延变化Unidirectional Delay Variation Sub-TLV、单向链路损失Unidirectional Link Loss Sub-TLV、单向剩余带宽Unidirectional Residual Bandwidth Sub-TLV、单向可用带宽Unidirectional Available Bandwidth Sub-TLV、单向实际使用带宽Unidirectional Utilized Bandwidth Sub-TLV中的一种或者多种。
- 一种用于报文发送的设备,其特征在于,所述设备应用于第一设备,所述设备包括:处理单元,用于生成链路状态报文,所述链路状态报文包括第一标识和第二标识,所述第一标识用于指示所述第一设备的第一邻居设备,所述第二标识用于指示指定路由器;收发单元,用于向所述第二设备发送所述链路状态报文,所述第二设备为所述第一设备的第二邻居设备。
- 根据权利要求26所述的设备,其特征在于,所述指定路由器包括中间系统到中间系统ISIS定义的指定中间系统DIS。
- 根据权利要求26所述的设备,其特征在于,所述指定路由器包括开放式最短路径优先OSPF定义的指定路由器DR。
- 根据权利要求26或27所述的设备,其特征在于,所述链路状态报文为链路状态协议数据单元LSP报文,所述第二设备是所述第一设备的内部网关协议IGP邻居。
- 根据权利要求26或28所述的设备,其特征在于,所述链路状态报文为链路状态公告LSA报文,所述第二设备是所述第一设备的IGP邻居。
- 根据权利要求26-28任一项所述的设备,其特征在于,所述链路状态报文为边界网关协议-链路状态BGP-LS报文,所述第二设备是所述第一设备的边界网关协议BGP邻居。
- 根据权利要求31所述的设备,其特征在于,所述BGP-LS报文还包括第三标识,所述第三标识用于指示检测得到所述链路状态报文指示的链路状态的设备。
- 根据权利要求25、31或32所述的设备,其特征在于,所述第一标识为所述第一邻居设备的系统标识System ID,或者路由器标识Router ID。
- 根据权利要求26-33任一项所述的设备,其特征在于,所述链路状态报文包括类型长度值TLV,所述TLV携带所述第一标识。
- 根据权利要求34所述的设备,其特征在于,所述TLV为最小/最大单向链路时延Min/Max Unidirectional Link Delay Sub-TLV、单向链路时延Unidirectional Link Delay Sub-TLV、单向时延变化Unidirectional Delay Variation Sub-TLV、单向链路损失Unidirectional Link Loss Sub-TLV、单向剩余带宽Unidirectional Residual Bandwidth Sub-TLV、单向可用带宽Unidirectional Available Bandwidth Sub-TLV、单向实际使用带宽Unidirectional Utilized Bandwidth Sub-TLV中的一种或者多种。
- 一种确定链路状态的设备,其特征在于,所述设备应用于第二设备,所述设备包括:收发单元,用于接收链路状态报文,所述链路状态报文包括第一标识,所述第一标识用于指示第一设备的第一邻居设备,所述第一设备用于生成和发送所述链路状态报文,所述第二设备为所述第一设备的第二邻居设备;处理单元,用于根据所述第一标识确定第三设备与所述第一邻居设备之间链路的链路状态,所述第三设备为检测得到所述链路状态的设备。
- 根据权利要求36所述的设备,其特征在于,所述第二设备为所述第一设备的内部网关协议IGP邻居设备。
- 根据权利要求36或37所述的设备,其特征在于,所述链路状态报文为链路状态协议数据单元LSP报文。
- 根据权利要求36或37所述的设备,其特征在于,所述链路状态报文为链路状态公告LSA报文。
- 根据权利要求36-39任一项所述的设备,其特征在于,所述第一设备的第一邻居设备为所述第二设备。
- 根据权利要求36所述的设备,其特征在于,所述第二设备为所述第一设备的边界网关协议BGP邻居设备。
- 根据权利要求41所述的设备,其特征在于,所述链路状态报文为边界网关协议-链路状态BGP-LS报文。
- 根据权利要求36-42任一项所述的设备,其特征在于,所述第三设备为所述第一设备。
- 根据权利要求41或42所述的设备,其特征在于,所述第三设备为所述第一设备的第三邻居设备。
- 根据权利要求43或44所述的设备,其特征在于,所述链路状态报文还包括第三标识,所述第三标识与所述第一标识对应,所述第三标识用于指示所述第三设备。
- 根据权利要求36-45任一项所述的设备,其特征在于,所述处理单元,还用于基于所述链路状态计算路径。
- 根据权利要求36-46任一项所述的设备,其特征在于,所述收发单元,还用于向控制设备发送链路状态信息,所述链路状态信息用于指示所述链路状态。
- 根据权利要求36、41和42任一项所述的设备,其特征在于,所述第一标识为所述邻居设备的系统标识System ID,或者路由器标识Router ID。
- 根据权利要求36-48任一项所述的设备,其特征在于,所述链路状态报文包括类型长度值TLV,所述TLV携带所述标识。
- 根据权利要求49所述的设备,其特征在于,所述TLV为最小/最大单向链路时延Min/Max Unidirectional Link Delay Sub-TLV、单向链路时延Unidirectional Link Delay Sub-TLV、单向时延变化Unidirectional Delay Variation Sub-TLV、单向链路损失Unidirectional Link Loss Sub-TLV、单向剩余带宽Unidirectional Residual Bandwidth Sub-TLV、单向可用带宽Unidirectional Available Bandwidth Sub-TLV、单向实际使用带宽Unidirectional Utilized Bandwidth Sub-TLV中的一种或者多种。
- 一种网络系统,其特征在于,所述网络系统包括第一设备和第二设备;所述第一设备,用于生成链路状态报文,向所述第二设备发送所述链路状态报文,所述链路状态报文包括第一标识和第二标识,所述第一标识用于指示所述第一设备的第一邻居设备,所述第二标识用于指示指定路由器,所述第二设备为所述第一设备的第二邻居设备;所述第二设备,用于接收链路状态报文,根据所述第一标识确定第三设备与所述第一邻居设备之间链路的链路状态,所述第三设备为检测得到所述链路状态的设备。
- 一种设备,其特征在于,所述设备包括处理器芯片和存储器,存储器用于存储指令或程序代码,处理器芯片用于从存储器中调用并运行所述指令或程序代码,以执行如权利要求1至10任一项所述的报文发送方法,或者执行如权利要求11至25任一项所述的确定链路状态的方法。
- 一种网络系统,其特征在于,所述网络系统包括如权利要求26至35任一项所述的用于报文发送的设备和如权利要求36至50任一项所述的确定链路状态的设备。
- 一种计算机可读存储介质,其特征在于,包括指令、程序或代码,当其在计算机上执行时,使得所述计算机执行如权利要求1至10任一项所述的报文发送方法,或者执行如权利要求11至25任一项所述的确定链路状态的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210042399.4 | 2022-01-14 | ||
CN202210042399.4A CN116489238A (zh) | 2022-01-14 | 2022-01-14 | 一种报文发送方法、确定链路状态的方法、设备及系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023134416A1 true WO2023134416A1 (zh) | 2023-07-20 |
Family
ID=87212481
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/140666 WO2023134416A1 (zh) | 2022-01-14 | 2022-12-21 | 一种报文发送方法、确定链路状态的方法、设备及系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116489238A (zh) |
WO (1) | WO2023134416A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101094112A (zh) * | 2007-07-23 | 2007-12-26 | 华为技术有限公司 | 测试网络设备路由协议性能的方法、装置和系统 |
CN102123088A (zh) * | 2011-02-21 | 2011-07-13 | 杭州华三通信技术有限公司 | 建立te隧道的方法及设备 |
WO2014113957A1 (zh) * | 2013-01-24 | 2014-07-31 | 华为技术有限公司 | 一种链路管理方法、设备和通信系统 |
CN109218178A (zh) * | 2017-07-05 | 2019-01-15 | 华为技术有限公司 | 一种报文处理方法及网络设备 |
CN112118180A (zh) * | 2018-12-29 | 2020-12-22 | 华为技术有限公司 | 一种规划路径的方法、装置和系统 |
-
2022
- 2022-01-14 CN CN202210042399.4A patent/CN116489238A/zh active Pending
- 2022-12-21 WO PCT/CN2022/140666 patent/WO2023134416A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101094112A (zh) * | 2007-07-23 | 2007-12-26 | 华为技术有限公司 | 测试网络设备路由协议性能的方法、装置和系统 |
CN102123088A (zh) * | 2011-02-21 | 2011-07-13 | 杭州华三通信技术有限公司 | 建立te隧道的方法及设备 |
WO2014113957A1 (zh) * | 2013-01-24 | 2014-07-31 | 华为技术有限公司 | 一种链路管理方法、设备和通信系统 |
CN109218178A (zh) * | 2017-07-05 | 2019-01-15 | 华为技术有限公司 | 一种报文处理方法及网络设备 |
CN112118180A (zh) * | 2018-12-29 | 2020-12-22 | 华为技术有限公司 | 一种规划路径的方法、装置和系统 |
Also Published As
Publication number | Publication date |
---|---|
CN116489238A (zh) | 2023-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3041179B1 (en) | A method and apparatus for use in network management | |
US11349687B2 (en) | Packet processing method, device, and system | |
US8989048B2 (en) | Node system ID change in link state protocol network | |
US20200396162A1 (en) | Service function chain sfc-based communication method, and apparatus | |
US9699077B2 (en) | Method for determining a packet forwarding path, network device, and control device | |
EP2933977B1 (en) | Method, network element and network for integrity check in live connectivity frames | |
US20120155245A1 (en) | Method and System for Rebuilding Single Ring Network Topology | |
JP2014042258A (ja) | Mplsネットワークにおいて完全な論理接続を提供するための方法および装置 | |
US9088499B2 (en) | Routing generation for implementation of fiber channel over ethernet | |
US10862735B2 (en) | Method and apparatus for implementing operation, administration, and maintenance function | |
CN114448877B (zh) | 路径切换方法、设备及系统 | |
EP2399370A2 (en) | Maximum transmission unit (mtu) size discovery mechanism and method for data-link layers | |
JP2023063332A (ja) | Igpフラッディングトポロジー不一致を処理するためのシステムおよび方法 | |
WO2022194023A1 (zh) | 报文处理的方法、网络设备及控制器 | |
JP7119174B2 (ja) | ネットワークトポロジディスカバリ方法、ネットワークトポロジディスカバリ装置及びネットワークトポロジディスカバリシステム | |
US20230198897A1 (en) | Method, network device, and system for controlling packet sending | |
WO2023134416A1 (zh) | 一种报文发送方法、确定链路状态的方法、设备及系统 | |
US8614958B2 (en) | Systems and methods of snooping connectivity fault messages to configure maintenance end point for alarm suppression messages | |
US20210297321A1 (en) | Sparse link-state flooding | |
US9450835B2 (en) | Method for turning off routers in a communications network and router implementing this method | |
CN114338508A (zh) | 一种检测路由环路的方法、设备及系统 | |
WO2022257854A1 (zh) | 一种报文发布方法、转发路径处理方法及装置 | |
WO2022267083A1 (zh) | 确定路径的方法和装置 | |
US8396955B2 (en) | Systems and methods for discovery of network topology using service OAM | |
WO2015055103A1 (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: 22920047 Country of ref document: EP Kind code of ref document: A1 |