WO2024067084A1 - 一种路径故障检测的方法以及相关装置 - Google Patents

一种路径故障检测的方法以及相关装置 Download PDF

Info

Publication number
WO2024067084A1
WO2024067084A1 PCT/CN2023/118427 CN2023118427W WO2024067084A1 WO 2024067084 A1 WO2024067084 A1 WO 2024067084A1 CN 2023118427 W CN2023118427 W CN 2023118427W WO 2024067084 A1 WO2024067084 A1 WO 2024067084A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
network device
node
path
identifier
Prior art date
Application number
PCT/CN2023/118427
Other languages
English (en)
French (fr)
Inventor
胡志波
董甲甲
席星
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024067084A1 publication Critical patent/WO2024067084A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks

Definitions

  • the present application relates to the field of communication technology, and in particular to a method for detecting a path failure and a related device.
  • the segment routing (SR) node provides a flexible way to select forwarding paths based on the segment routing traffic engineering policy (SR TE Policy) of Internet Protocol Version 6-Segment Routing (IPv6 SR or SRv6), which can meet different forwarding requirements of users.
  • SR TE Policy segment routing traffic engineering policy
  • IPv6 SR or SRv6 Internet Protocol Version 6-Segment Routing
  • IPv6 SR or SRv6 Internet Protocol Version 6-Segment Routing
  • the commonly used path fault detection methods are bidirectional forwarding detection (BFD) protocol or seamless bidirectional forwarding detection (SBFD) protocol.
  • the detection principle of the SBFD protocol is shown in Figure 1.
  • the initiator and the reflector establish a connection through a negotiation mechanism.
  • the initiator and the reflector send SBFD control packets to each other and notify the SBFD descriptor (Discriminator) and other information.
  • the initiator performs path detection, it sends an SBFD control packet to the reflector.
  • the reflector loops back the SBFD control packet to the initiator.
  • the initiator can successfully receive the SBFD control packet from the reflector. Therefore, the initiator can detect the path status between the initiator and the reflector according to whether the SBFD control packet is received.
  • the head node In SR TE Policy, the head node is usually used as the initiator of the detection path in Figure 1. Specifically, the head node adds a segment routing header (SRH) in the SBFD control message to indicate that the SBFD control message is transmitted in a specific SR path.
  • SSH segment routing header
  • the head node detects a failure in a certain path through the SBFD control message, it notifies the network controller of the detection result.
  • the network controller completes the path convergence based on the detection result.
  • the network controller sends the new path to the head node, and the new path bypasses the faulty path.
  • the SBFD control message sent by the head node may bypass the faulty path to reach the destination node.
  • the destination node After receiving the SBFD control message, the destination node loops the SBFD control message back to the head node. Therefore, the head node determines that the shortest path between the head node and the destination node is normal and cannot detect the faulty path.
  • an embodiment of the present application provides a method for detecting a path failure, including:
  • a network device obtains a first message, wherein the first message includes a segment list, wherein the segment list includes a plurality of segment identifiers SIDs arranged in sequence, wherein the segment list identifies a forwarding path of the first message, wherein the segment list includes a segment identifier of a first node and a segment identifier of a second node; the network device forwards the first message according to the segment list; the network device detects a state of a target path according to the first message, wherein the target path is the shortest path between the first node and the second node, and wherein the segment identifier identifying the target path in the segment list indicates a loose path.
  • the segment list of the first message indicates the forwarding path of the first message, and the first message needs to pass through the first node and the second node.
  • the segment list identifies the forwarding path of the first message.
  • the segment identifier identifying the target path in the segment list indicates a loose path.
  • the segment identifier identifying the target path in the segment list indicates that there may be multiple paths between the first node and the second node for forwarding the message.
  • a loose path means that the segment identifier of the segment list does not strictly indicate all the nodes that the message needs to pass through.
  • the segment identifiers included in the segment list are SID1 (P1 node), SID2 (P2 node) and SID3 (PE2 node).
  • the message carrying the segment list can pass through PE1, P3, P1, P2, P8 nodes to reach the PE2 node, and can also pass through PE1, P3, P1, P2, P1, P3, PE1, P4, P5, P6, P7 nodes to reach the PE2 node.
  • the segment identifiers (SID1, SID2 and SID3) included in the segment list indicate a loose path.
  • the shortest path between the first node and the second node is called the target path.
  • the network device detects the state of the target path by forwarding the first message.
  • the network device in the embodiment of the present application can be the head node in the SR policy (or SRv6 policy) (hereinafter referred to as the head node); it can also be the intermediate node in the SR policy (or SRv6 policy) (hereinafter referred to as the intermediate node), and the embodiment of the present application is not limited to this.
  • the first node may be a head node in the SR policy (or SRv6 policy); the first node may also be an intermediate node in the SR policy (or SRv6 policy).
  • the second node may be an intermediate node in the SR policy (or SRv6 policy); the second node may also be a tail node in the SR policy (or SRv6 policy).
  • the network device in the embodiment of the present application is a head node, and the first node is the head node.
  • the network device in the embodiment of the present application and the first node belong to the same node (ie, the head node).
  • the path in the embodiment of the present application may also be referred to as a link, which is not limited in the embodiment of the present application.
  • the method for path fault detection proposed in the embodiment of the present application can be applied in BFD echo (BFD Echo) mode or in BFD asynchronous mode.
  • BFD Echo BFD echo
  • the initiator applies the method proposed in the embodiment of the present application.
  • BFD asynchronous mode for example, BFD detection is performed between node A and node B, and node A and node B send BFD control messages to each other, node A and node B apply the method proposed in the embodiment of the present application.
  • the network device can detect the shortest path indicated by the segment list according to the first message, so the network device can promptly find out whether there is a faulty path in the shortest path between the first node and the second node, thereby avoiding traffic forwarding through a detour path, avoiding bandwidth waste and increasing latency, increasing the available bandwidth of the network device, and improving the data throughput of the network.
  • the first message further includes a first identifier
  • the first identifier indicates that the first message is discarded after N hops of transmission
  • N is a positive integer
  • the value of the first identifier decreases by one after each hop of transmission of the first message, and when the value of the first identifier is 0, the network device discards the first message.
  • the first message is prevented from being forwarded to the second node (i.e., the destination node) through a detour path, so that the network device detects the state of the target path according to the first message.
  • the network device obtains the total number of hops of the target path; the network device determines the value N of the first identifier according to the total number of hops of the target path, where N is greater than or equal to the total number of hops of the target path. Specifically, the network device obtains the total number of hops of the target path, in other words, obtains the number of nodes passed in the target path. Then, the network device designs the first message to be discarded after N hops of transmission according to the total number of hops of the target path, where N is a positive integer and N is greater than or equal to the total number of hops of the target path.
  • the intermediate node When the first message is transmitted in the detour path, it is discarded by the intermediate node (the intermediate node corresponding to the Nth hop) during the transmission due to the restriction of discarding after N hops of transmission.
  • the first message cannot reach the destination of the first message (i.e., the second node) through the detour path, and the second node cannot loop back the first message to the sending end (i.e., the head node) through the detour path.
  • the network device After the network device sends the first message, if the looped first message is not received, the network device determines that the state of the target path is a fault.
  • the first message can be forwarded on a path with a smaller degree of detour to reach the destination node indicated by the segment list.
  • the network device can tolerate a detour path with a smaller degree of detour to avoid frequent end-to-end path switching.
  • N is greater than or equal to the total number of hops of the target path. For example, if the total number of hops of the target path is 5, then N is greater than or equal to 5.
  • N is greater than or equal to the sum of the total number of hops of the target path and the number of hops from the head node to the first node.
  • the shortest path between the head node (network device) and the first node is 3 hops, and the total number of hops of the target path is 5 hops.
  • N is greater than or equal to 8.
  • the network device obtains the first message, including: the network device obtains the second message, the second message includes the segment list; the network device fills the first identifier in the second message to generate the first message.
  • the network device obtains the second message, which can be regarded as the first message without filling the value of the first identifier. Then, the network device determines the value of N according to the total number of hops of the target path. The network device fills the first identifier in the second message (that is, fills the value of N in the first identifier) to generate the first message.
  • the method further includes: the network device receives the first message; Committed access rate (CAR) control, the CAR control of the first message indicates that the threshold value of the transmission rate of the first message per unit time is M, where M is a positive integer.
  • CAR Committed access rate
  • the message is classified and the data flow is controlled to be transmitted at a specific rate.
  • the first message can be controlled by CAR to limit the transmission rate of the first message.
  • the first identifier is carried in a TTL field of an Internet Protocol version 4 IPv4 header of the first message, or the first identifier is carried in a Hop limit field of an Internet Protocol version 6 IPv6 header of the first message.
  • the first message also includes a second identifier, and the second identifier indicates that the network device detects whether the input interface for receiving the first message and the output interface for sending the first message are consistent. Specifically, after receiving the first message carrying the second identifier, the network device detects whether the input interface of the first message and the output interface of the first message are consistent. According to whether the input interface of the first message and the output interface of the first message are consistent, determine to discard the first message. Avoid forwarding the first message from the same port, in other words, avoid forwarding the first message through a detour path to reach the second node (i.e., the destination node).
  • the second identifier indicates that the network device detects whether the input interface for receiving the first message and the output interface for sending the first message are consistent. Specifically, after receiving the first message carrying the second identifier, the network device detects whether the input interface of the first message and the output interface of the first message are consistent. According to whether the input interface of the first message and the output interface of the first message are consistent, determine
  • the first message also includes a second identifier, and the second identifier includes an output interface of the first message.
  • the network device After receiving the first message, the network device obtains the input interface of the first message. Then, the network device detects whether the input interface of the first message is consistent with the second identifier (the output interface of the first message). According to whether the input interface of the first message and the output interface of the first message are consistent, determine to discard the first message. Avoid forwarding the first message from the same port, in other words, avoid forwarding the first message through a detour path to reach the second node (i.e., the destination node).
  • the network device forwards the first message according to the segment list, including: the network device detects whether the input interface for receiving the first message and the output interface for receiving the first message are consistent according to the second identifier; when the network device detects that the input interface for receiving the first message is consistent with the output interface for sending the first message, the network device discards the first message; when the network device detects that the input interface for receiving the first message is inconsistent with the output interface for sending the first message, the network device forwards the first message according to the segment list.
  • the second identifier is carried in the identifier Flags field of the segment routing extension header SRH of the first message.
  • a specific bit for example, the first bit
  • the network device needs to detect whether the outgoing interface and the incoming interface of the first message are consistent, and determine whether to discard the first message based on the detection result; when the specific bit in the identifier Flags field is 0, the network device forwards the first message according to the normal process, that is, there is no need to detect whether the outgoing interface and the incoming interface of the first message are consistent.
  • the network device detects the state of the target path based on the first message, including: when the network device receives the first message from the second node, the network device determines that the state of the target path is normal; when the network device does not receive the first message from the second node, the network device determines that the state of the target path is faulty.
  • the first message is a Bidirectional Forwarding Detection (BFD) protocol message, or the first message is a Seamless Bidirectional Forwarding Detection (SBFD) protocol message.
  • BFD Bidirectional Forwarding Detection
  • SBFD Seamless Bidirectional Forwarding Detection
  • an embodiment of the present application provides a method for detecting a path failure, including:
  • the network device acquires a segment list, the segment list including a segment identifier of a first node and a segment identifier of a second node, the segment list indicating a target path, the target path being the shortest path between the first node and the second node;
  • the network device calculates a second path according to the segment list and the path status information, where the second path is the shortest path between the first node and the second node that does not include a faulty path, and the path status information indicates the faulty path;
  • the network device detects the state of the target path according to the second path.
  • the network device determines the first node and the second node (or other more nodes) according to the segment list. Then the network device calculates the shortest path between the first node and the second node, that is, the target path, according to the shortest path tree (SPT). The network device obtains the path status information. The path status information indicates the status of each path in the current network, that is, the path status information indicates the faulty path. Then the network device calculates the actually reachable path between the first node and the second node according to the segment list and the path status information, and the path is also called the second path. The second path is the shortest path between the first node and the second node that does not include the faulty path.
  • SPT shortest path tree
  • the network device obtains the path status information, and the network device detects the status of the shortest path indicated by the segment list according to the path status information. Therefore, the network device can timely find out whether there is a faulty path in the shortest path between the first node and the second node. Avoid traffic forwarding through detour paths, increase the available bandwidth of network devices, and improve the data throughput of the network.
  • the network device detects the state of the target path based on the second path, including: when the second path passes through repeated nodes, the network device determines that the state of the target path is faulty; when the target path does not pass through repeated nodes, the network device determines that the state of the target path is normal.
  • the network device obtains the path status information from a link state database (LSDB) and/or a segment routing database (SRDB).
  • LSDB link state database
  • SRDB segment routing database
  • an embodiment of the present application provides a network device, including:
  • a transceiver module configured for a network device to obtain a first message, wherein the first message includes a segment list, the segment list includes a plurality of segment identifiers SIDs arranged in sequence, the segment list identifies a forwarding path of the first message, and the segment list includes a segment identifier of a first node and a segment identifier of a second node;
  • the transceiver module is further used to forward the first message according to the segment list;
  • a processing module is used to detect a state of a target path according to the first message, where the target path is the shortest path between the first node and the second node, and a segment identifier in the segment list that identifies the target path indicates a loose path.
  • the first message also includes a first identifier, which indicates that the first message is discarded after being transmitted N hops, where N is a positive integer, and the value of the first identifier is reduced by one after each hop of transmission of the first message.
  • the network device discards the first message.
  • the transceiver module is further used to obtain the total number of hops of the target path
  • the processing module is further used to determine the value N of the first identifier according to the total number of hops of the target path, where N is greater than or equal to the total number of hops of the target path.
  • the transceiver module is further used to obtain a second message, where the second message includes the segment list;
  • the processing module is further used to fill the first identifier in the second message to generate the first message.
  • the processing module is further configured to perform committed access rate CAR control on the first message, where the CAR indicates that a threshold value of a transmission rate of the first message per unit time is M, where M is a positive integer.
  • the first identifier is carried in a TTL field of an Internet Protocol version 4 IPv4 message header of the first message.
  • the first identifier is carried in the hop limit field of the Internet Protocol version 6 IPv6 message header of the first message.
  • the first message further includes a second identifier, and the second identifier instructs the network device to detect whether an input interface for receiving the first message and an output interface for sending the first message are consistent.
  • the processing module is further used to detect, according to the second identifier, whether an input interface for receiving the first message and an output interface for receiving the first message are consistent;
  • the transceiver module is further configured to, when the network device detects that the input interface for receiving the first message is consistent with the output interface for sending the first message, cause the network device to discard the first message;
  • the transceiver module is also used for the network device to forward the first message according to the segment list when it detects that the input interface for receiving the first message is inconsistent with the output interface for sending the first message.
  • the second identifier is carried in an identifier Flags field of a segment routing extension header SRH of the first message.
  • the processing module is further configured to, when the network device receives the first message from the second node, determine that the state of the target path is normal;
  • the processing module is further configured to, when the network device does not receive the first message from the second node, determine that the state of the target path is faulty.
  • the first message is a Bidirectional Forwarding Detection (BFD) protocol message, or the first message is a Seamless Bidirectional Forwarding Detection (SBFD) protocol message.
  • BFD Bidirectional Forwarding Detection
  • SBFD Seamless Bidirectional Forwarding Detection
  • an embodiment of the present application provides a communication device, including: a communication interface;
  • a communication interface used for a network device to obtain a first message
  • the first message includes a segment list, the segment list includes a plurality of segment identifiers SIDs arranged in sequence, the segment list identifies a forwarding path of the first message, and the segment list includes a segment identifier of a first node and a segment identifier of a second node;
  • the communication interface is further used to forward the first message according to the segment list
  • a processor is configured to detect a state of a target path according to the first message, where the target path is a shortest path between the first node and the second node, and a segment identifier in the segment list that identifies the target path indicates a loose path.
  • the first message also includes a first identifier, which indicates that the first message is discarded after being transmitted N hops, where N is a positive integer, and the value of the first identifier is reduced by one after each hop of transmission of the first message.
  • the network device discards the first message.
  • the communication interface is further used to obtain the total number of hops of the target path
  • the processor is further configured to determine a value N of the first identifier according to a total number of hops of the target path, where N is greater than or equal to the total number of hops of the target path.
  • the communication interface is further used to obtain a second message, where the second message includes the segment list;
  • the processor is further configured to fill the first identifier in the second message to generate the first message.
  • the processor is further configured to perform committed access rate CAR control on the first message, where the CAR indicates that a threshold value of a transmission rate of the first message per unit time is M, where M is a positive integer.
  • the first identifier is carried in a TTL field of an Internet Protocol version 4 IPv4 header of the first message, or the first identifier is carried in a Hop limit field of an Internet Protocol version 6 IPv6 header of the first message.
  • the first message further includes a second identifier, and the second identifier instructs the network device to detect whether an input interface for receiving the first message and an output interface for sending the first message are consistent.
  • the processor is further configured to detect, according to the second identifier, whether an input interface for receiving the first message and an output interface for receiving the first message are consistent;
  • the communication interface is further used for, when the network device detects that the input interface for receiving the first message is consistent with the output interface for sending the first message, the network device discards the first message;
  • the communication interface is also used for the network device to forward the first message according to the segment list when the network device detects that the input interface for receiving the first message is inconsistent with the output interface for sending the first message.
  • the second identifier is carried in an identifier Flags field of a segment routing extension header SRH of the first message.
  • the processor is further configured to, when the network device receives the first message from the second node, determine that the state of the target path is normal;
  • the processor is further configured to, when the network device does not receive the first message from the second node, determine that the state of the target path is faulty.
  • the first message is a Bidirectional Forwarding Detection (BFD) protocol message, or the first message is a Seamless Bidirectional Forwarding Detection (SBFD) protocol message.
  • BFD Bidirectional Forwarding Detection
  • SBFD Seamless Bidirectional Forwarding Detection
  • an embodiment of the present application provides a network device, including:
  • a transceiver module configured to obtain a segment list, wherein the segment list includes a segment identifier of a first node and a segment identifier of a second node, wherein the segment list indicates a target path, and the target path is a shortest path between the first node and the second node;
  • a processing module configured to calculate a second path according to the segment list and the path status information, wherein the second path is a shortest path between the first node and the second node that does not include a faulty path, and the path status information indicates the faulty path;
  • the processing module is further configured to detect a state of the target path according to the second path.
  • the processing module is further configured to determine that the state of the target path is a failure when the second path passes through a repeated node;
  • the processing module is further configured to determine that the state of the target path is normal when the target path does not pass through repeated nodes.
  • the transceiver module is also used to obtain the path status information from a link state database (LSDB) and/or a segment routing database (SRDB).
  • LSDB link state database
  • SRDB segment routing database
  • an embodiment of the present application provides a communication device, including: a communication interface;
  • a communication interface configured to obtain a segment list, the segment list including a segment identifier of a first node and a segment identifier of a second node, the segment list indicating a target path, the target path being a shortest path between the first node and the second node;
  • a processor configured to calculate a second path according to the segment list and the path status information, wherein the second path is a shortest path between the first node and the second node that does not include a faulty path, and the path status information indicates the faulty path;
  • the processor is further configured to detect a state of the target path according to the second path.
  • the processor is further configured to determine that the state of the target path is faulty when the second path passes through a repeated node;
  • the processor is further configured to determine that the state of the target path is normal when the target path does not pass through repeated nodes.
  • the communication interface is also used to obtain the path status information from a link state database (LSDB) and/or a segment routing database (SRDB).
  • LSDB link state database
  • SRDB segment routing database
  • an embodiment of the present application provides a method for detecting a path failure, including:
  • the network device obtains a first message, where the first message includes a segment list, and the segment list includes a plurality of segment identifiers SIDs arranged in sequence;
  • the segment list includes forwarding information of each node along a target path, the target path being the shortest path between the first node and the second node;
  • the network device forwards the first message according to the segment list
  • the network device detects the state of the target path according to the first message.
  • the segment list of the first message indicates the forwarding path of the first message, and the first message needs to pass through the first node and the second node.
  • the segment list includes forwarding information of each node along the target path, and the target path is the shortest path between the first node and the second node. In other words, what the segment list indicates is a strict path.
  • the network device detects the state of the target path by forwarding the first message.
  • the network device in the embodiment of the present application can be the head node in the SR policy (or SRv6 policy) (hereinafter referred to as the head node); it can also be the intermediate node in the SR policy (or SRv6 policy) (hereinafter referred to as the intermediate node), and the embodiment of the present application is not limited to this.
  • the first node may be a head node in the SR policy (or SRv6 policy); the first node may also be an intermediate node in the SR policy (or SRv6 policy).
  • the second node may be an intermediate node in the SR policy (or SRv6 policy); the second node may also be a tail node in the SR policy (or SRv6 policy).
  • the network device in the embodiment of the present application is a head node, and the first node is the head node.
  • the network device in the embodiment of the present application and the first node belong to the same node (ie, the head node).
  • the path in the embodiment of the present application may also be referred to as a link, which is not limited in the embodiment of the present application.
  • the network device forwards the first message according to the strict path according to the segment list of the first message.
  • the first message cannot reach the second node through the loose path between the first node and the second node. Therefore, the network device can promptly find out whether there is a faulty path in the shortest path between the first node and the second node. Avoiding traffic forwarding through a detour path, avoiding bandwidth waste and delay increase, increasing the available bandwidth of the network device, and improving the data throughput of the network.
  • the network device obtains a third message, the segment list of the third message includes a plurality of segment identifiers arranged in sequence, and the segment list of the third message is used to indicate a plurality of forwarding paths of the third message;
  • the network device forwards the third message according to the segment list of the third message.
  • the third message carries service data, in other words, the third message is a service message.
  • the segment list of the service message indicates multiple forwarding paths of the third message, in other words, the path indicated by the segment list of the service message is a loose path. Therefore, when the network device forwards the service message, it forwards it according to the loose path. This ensures that the service message arrives at the destination smoothly and ensures the normal operation of the service.
  • the forwarding information includes: a segment identifier of the node, and/or an adjacent segment identifier of the node.
  • the forwarding information may be an adjacent segment identifier End.X SID (abbreviated as SIDX) of the node.
  • End.X SID indicates the outbound interface of the node, and the network device determines the outbound interface for forwarding the message based on End.X SID.
  • the network device forwards the first message according to the segment list, including: when the network device determines that the next hop of the network device in the segment list is unreachable, the network device discards the first message; when the network device determines that the next hop of the network device in the segment list is reachable, the network device forwards the first message according to the segment list. Forward the first message.
  • the first message further includes: a third identifier, wherein the third identifier indicates that the first message does not perform fast reroute FRR.
  • a third identifier is added to the first message, and the third identifier indicates that the first message does not perform fast reroute (fast reroute, FRR).
  • the third identifier is carried in the identifier Flags field of the SRH of the first message.
  • an embodiment of the present application provides a network device, including:
  • a transceiver module configured to obtain a first message, wherein the first message includes a segment list, and the segment list includes a plurality of segment identifiers SIDs arranged in sequence;
  • the segment list includes forwarding information of each node along a target path, the target path being the shortest path between the first node and the second node;
  • the transceiver module is further used to forward the first message according to the segment list;
  • the processing module is used to detect the state of the target path according to the first message.
  • the transceiver module is further used to obtain a third message, the segment list of the third message includes a plurality of segment identifiers arranged in sequence, and the segment list of the third message is used to indicate a plurality of forwarding paths of the third message;
  • the transceiver module is also used to forward the third message according to the segment list of the third message.
  • the forwarding information includes: a segment identifier of the node, and/or an adjacent segment identifier of the node.
  • the processing module is further configured to discard the first message when the network device determines that the next hop of the network device in the segment list is unreachable;
  • the processing module is also used to forward the first message according to the segment list when the network device determines that the next hop of the network device in the segment list is reachable.
  • the first message further includes: a third identifier, wherein the third identifier indicates that fast rerouting FRR is not performed during forwarding of the first message.
  • the third identifier is carried in an identifier Flags field of a segment routing extension header SRH of the first message.
  • an embodiment of the present application provides a communication device, including: a communication interface;
  • a communication interface used to obtain a first message, wherein the first message includes a segment list, and the segment list includes a plurality of segment identifiers SIDs arranged in sequence;
  • the segment list includes forwarding information of each node along a target path, the target path being the shortest path between the first node and the second node;
  • a communication interface further configured to forward the first message according to the segment list
  • the processor is configured to detect a state of the target path according to the first message.
  • the communication interface is further used to obtain a third message, wherein the segment list of the third message includes a plurality of segment identifiers arranged in sequence, and the segment list of the third message is used to indicate a plurality of forwarding paths of the third message;
  • the communication interface is further used to forward the third message according to the segment list of the third message.
  • the forwarding information includes: a segment identifier of the node, and/or an adjacent segment identifier of the node.
  • the processor is further configured to discard the first message when the network device determines that the next hop of the network device in the segment list is unreachable;
  • the processor is further configured to forward the first message according to the segment list when the network device determines that the next hop of the network device in the segment list is reachable.
  • the first message further includes: a third identifier, wherein the third identifier indicates that fast rerouting FRR is not performed during forwarding of the first message.
  • the third identifier is carried in an identifier Flags field of a segment routing extension header SRH of the first message.
  • a communication system comprising the network device of the third aspect or the communication apparatus of the fourth aspect.
  • a communication system comprising the network device of the fifth aspect or the communication apparatus of the sixth aspect.
  • a communication system comprising the network device of the eighth aspect or the communication apparatus of the ninth aspect.
  • a computer storage medium which may be non-volatile; the computer storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method in any one of the implementation modes in the first aspect, the second aspect or the seventh aspect is implemented.
  • the fourteenth aspect of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute a method in any one of the implementations of the first aspect, the second aspect, or the seventh aspect.
  • a chip system which includes a processor and an interface circuit, and is used to support the network device to implement the functions involved in the above aspects, for example, to send or process the data and/or information involved in the above methods.
  • the chip system also includes a memory, which is used to store program instructions and data necessary for the network device.
  • the chip system can be composed of a chip, or it can include a chip and other discrete devices.
  • Figure 1 is a schematic diagram of SBFD
  • FIG2 is an example diagram of a message format in an embodiment of the present application.
  • FIG3 is a schematic diagram of a communication scenario
  • FIG4 is a schematic diagram of an embodiment of a method for path fault detection in an embodiment of the present application.
  • FIG5 is a schematic diagram of an embodiment of a method for path fault detection in an embodiment of the present application.
  • FIG6 is a schematic diagram of another communication scenario in an embodiment of the present application.
  • FIG7 is a schematic diagram of the structure of an IPv4 message header
  • FIG8 is a schematic diagram of the structure of an IPv6 message header
  • FIG9 is a schematic diagram of an application scenario in an embodiment of the present application.
  • FIG10 is a schematic diagram of an application scenario in an embodiment of the present application.
  • FIG11 is a schematic diagram of the structure of the first message in an embodiment of the present application.
  • FIG12 is a schematic diagram of the structure of the first message in an embodiment of the present application.
  • FIG13 is a schematic diagram of an application scenario in an embodiment of the present application.
  • FIG14 is a schematic diagram of the structure of a communication device 1400 provided in an embodiment of the present application.
  • FIG15 is a schematic diagram of the structure of a communication device 1500 provided in an embodiment of the present application.
  • FIG16 is a schematic diagram of the structure of a communication device 1600 provided in an embodiment of the present application.
  • FIG. 17 is a schematic diagram of a network system 1700 proposed in an embodiment of the present application.
  • the naming or numbering of the steps in the present application does not mean that the steps in the method flow must be executed in the time/logical sequence indicated by the naming or numbering.
  • the process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
  • the division of units in this application is a logical division. There may be other divisions in actual applications. For example, multiple units may be combined or integrated into another system, or some features may be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between units may be electrical or other similar forms, which are not limited in this application.
  • the units or subunits described as separate components may or may not be physically separated. It may or may not be a physical unit, or may be distributed in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.
  • SR segment identifiers
  • SID List also called label stack in SR-MPLS
  • the SID List can indicate a forwarding path.
  • a label can be attached to the luggage in the origin area A, "first to area B, then to area C, and finally to area D". In this way, each area only needs to identify the label on the luggage and forward the luggage from one area to another according to the label of the luggage.
  • the head node will add a label to the data packet, and the intermediate node can forward it to the next node according to the label until the data packet reaches the destination node.
  • IPv6 addresses (128 bits) as the representation of SID.
  • network devices that support SRv6 will query the local segment identification table (local sid table) according to the destination address (DA) in the data packet.
  • DA destination address
  • the policy related to the SID in the local segment identification table is followed and the operation corresponding to the policy is performed.
  • the data packet can be forwarded from the outbound interface corresponding to the SID; if the destination address of the data packet does not match each SID in the local segment identification table for the longest match, the IPv6 forwarding table is checked again and the longest match is forwarded according to the IPv6 forwarding table.
  • the value of the DA field in an IPv6 packet is constantly changing. Its value is determined by the SL and Segment List.
  • the pointer SL points to a segment to be processed, for example, Segment List[2]
  • the IPv6 address of Segment List[2] needs to be copied to the DA field.
  • the node can reduce the SL by 1, shift the pointer to the new segment, and copy the segment identifier (i.e., IPv6 address format) corresponding to the SL reduction to the DA field, and then forward the message to the next node.
  • the node can pop up the SRH message header and then process the message. If the node does not support SR, it does not need to process the SRH information in the IPv6 message. It only needs to search the IPv6 routing table based on the IPv6 destination address field and perform normal IPv6 forwarding.
  • SR policy is a traffic engineering mechanism for SR.
  • an SR policy includes a headend, a color identifier, a destination identifier, and a segment identifier list indicating a forwarding path.
  • Headend is used to identify the headend that executes the SR policy
  • color is used to associate SR with service attributes, such as low latency, high bandwidth, etc., to summarize the service capabilities of the SR policy
  • endpoint is used to identify the destination address of the SR policy.
  • an SR policy is determined by (headend, color, endpoint). For the same headend, it can also determine a policy by (color, endpoint).
  • SR policy can include one or more segment identifier lists to achieve load balancing, multi-path backup and other functions.
  • the head node can determine the segment identifier list corresponding to the message according to the SR policy, thereby determining the forwarding path for forwarding the message, and encapsulate the segment identifier list into the message to display or disperse the indicated path.
  • Routing prefix It is composed of an IP address and a subnet mask.
  • the length of the subnet mask can be 128 bits or less.
  • the routing prefix can be written as: A1::1/32 or A1::1/128, where A1::1 is an IP address and 32 or 128 indicates the length of the subnet mask.
  • Subnet prefix It is composed of an IP address and a subnet mask, and represents a subnet. In an IPv6 network, the length of the subnet mask is less than 128 bits. In an example, the subnet prefix can be written as: A1::1/32 or A1::1/64, where A1::1 is an IP address and 32 or 64 indicates the length of the subnet mask.
  • the format of the message in the embodiment of the present application includes but is not limited to: IP message header, segment routing header (segment routing header, SRH), optional type length value objects (Optional Tag Length Value objects), and message payload (payload), where the type length value (Tag Length Value, TLV) is an optional variable in the SRH header, and the message payload is used to carry the data of the message.
  • FIG. 2 is a schematic diagram of a message format in an embodiment of the present application.
  • the message in the embodiment of the present application consists of an IP message header, an SRH, an optional TLV object, and a message payload.
  • the IP message header can be an IPv6 message header. It is understandable that the IP message header can also be an IPv4 message header.
  • SRH segment routing extension header
  • the SRH specifies an IPv6 explicit path and stores the IPv6 Segment List information. Its function is the same as the Segment List in SR MPLS.
  • the head node adds an SRH extension header to the IPv6 message, and the intermediate nodes can forward according to the path information contained in the SRH extension header.
  • segment List segment list
  • MPLS multi-protocol label switching
  • the Segment List composed of multiple segment identifiers (Segment ID, SID) arranged in order is used to indicate the explicit path in SR; the other is the remaining segment (segment left, SL), which is a pointer used to indicate the current segment identifier.
  • the segment list field is used to carry the information of the intermediate nodes or the destination node that the message needs to pass through. It is understandable that Segment List[0] is generally the information of the destination node. It is understandable that the node can first read the value of SL, and then read the corresponding Segment List according to the value of SL. For example, if the node reads the value of SL as 1, the node will read Segment List[1]. The SL and Segment List in the message can be used together to update the next intermediate node that the current message needs to reach through the change of SL during the forwarding process.
  • the message actually includes some existing fields, which are omitted in the present embodiment for brief description and will not be described in detail.
  • the message may also include other fields to achieve other functions, which are not limited in the present embodiment.
  • FIG. 3 is a schematic diagram of a communication scenario.
  • the segment list of the control message indicates the path "(SID1, SID2, SID3)", where SID1 corresponds to the P1 node (hereinafter referred to as P1), SID2 corresponds to the P2 node (hereinafter referred to as P2), and SID3 corresponds to the PE2 node (hereinafter referred to as PE2).
  • part of the shortest path (PE1-P3-P1-P2-P8-PE2) fails.
  • the path between P1 and P2 fails.
  • the control message sent by PE1 arrives at P1 under the instruction of the segment list.
  • P1 sends the control message to PE2 through other paths according to the instructions of the segment list of the control message.
  • the control message goes through PE1 ⁇ P3 ⁇ P1 ⁇ P3 ⁇ PE1 ⁇ P4 ⁇ P5 ⁇ P6 ⁇ P7 ⁇ PE2 ⁇ P8 ⁇ P2 ⁇ P8 ⁇ PE2, and finally reaches PE2.
  • This path is also called a detour path.
  • the above detour path also meets the instructions of the segment list of the control message.
  • PE2 acts as a reflector and loops back the control message to PE1.
  • the looped control message takes the same detour path to reach PE1 (PE1 ⁇ P3 ⁇ P1 ⁇ P3 ⁇ PE1 ⁇ P4 ⁇ P5 ⁇ P6 ⁇ P7 ⁇ PE2 ⁇ P8 ⁇ P2 ⁇ P8 ⁇ PE2). Since PE1 receives the looped control message from PE2, PE1 determines that the path indicated by the segment list "(SID1, SID2, SID3)" is normal. In fact, there is a faulty path (P1 ⁇ P2) in the shortest path (PE1, P3, P1, P2, P8, PE2) indicated by the segment list "(SID1, SID2, SID3)". Therefore, PE1 cannot detect the faulty path. Traffic is still forwarded through the detour path, occupying additional bandwidth and reducing the data throughput of the network.
  • an embodiment of the present application proposes a method for path fault detection, including: a network device obtains a first message, the first message includes a segment list, the segment list includes a plurality of segment identifiers SIDs arranged in sequence, the segment list identifies the forwarding path of the first message, and the segment list includes the segment identifier of the first node and the segment identifier of the second node; the network device forwards the first message according to the segment list; the network device detects the state of the target path according to the first message, the target path is the shortest path between the first node and the second node, and the segment identifier identifying the target path in the segment list indicates a loose path.
  • the network device can detect the shortest path indicated by the segment list according to the first message, so the network device can promptly discover whether there is a faulty path in the shortest path between the first node and the second node. Avoiding traffic forwarding through a detour path improves the available bandwidth of the network device and improves the data throughput of the network.
  • two methods are specifically proposed to detect the state of the shortest path indicated by the segment list (referred to as the target path in the embodiment of the present application). Specifically, they include:
  • the network device forwards the first message, and determines whether a path corresponding to the segment list of the first message (i.e., the target path) is faulty according to whether a looped-back message of the first message is received;
  • the network device determines whether the target path is faulty based on the path status information.
  • the network device in the embodiment of the present application can be the head node (hereinafter referred to as the head node) in the SR policy (or SRv6 policy), such as the PE1 node in Figure 3; it can also be the intermediate node (hereinafter referred to as the intermediate node) in the SR policy (or SRv6 policy), such as the P1 node, P2 node, P3 node or P8 node in Figure 3, etc., which is not limited in the embodiment of the present application.
  • the path in the embodiment of the present application can also be called a link, which is not limited in the embodiment of the present application.
  • FIG. 4 is a schematic diagram of an embodiment of a method for path fault detection in an embodiment of the present application.
  • a method for path fault detection proposed in an embodiment of the present application includes:
  • a network device obtains a first message, where the first message includes a segment list, and the segment list includes a segment identifier of a first node and a segment identifier of a second node.
  • the network device when the network device is a head node, the network device obtains the first message including: the network device generates the first message; when the network device is an intermediate node, the network device obtains the first message including: the network device receives the second message sent from the previous hop node, and then processes the second message to obtain the first message.
  • the first message is a message for detecting the path status.
  • the first message is a bidirectional forwarding detection BFD protocol message, or the first message is a seamless bidirectional forwarding detection SBFD protocol message.
  • a detection message (or control message) in BFD and another example: a detection message (or control message) in SBFD.
  • the first message includes a segment list, which includes a plurality of segment identifiers SID arranged in sequence, and the segment list is used to indicate the forwarding path of the first message, and the segment list includes a segment identifier of a first node and a segment identifier of a second node.
  • the segment list indicates the path between the first node and the second node.
  • a possible message structure of the first message is shown in Figure 2.
  • the segment identifier identifying the target path indicates a loose path.
  • the segment identifier identifying the target path in the segment list indicates that there may be multiple paths between the first node and the second node for forwarding the message.
  • a loose path means that the segment identifier of the segment list does not strictly indicate all the nodes that the message needs to pass through.
  • the segment identifiers included in the segment list are SID1 (P1 node), SID2 (P2 node) and SID3 (PE2 node).
  • the message carrying the segment list can pass through PE1, P3, P1, P2, P8 nodes to reach the PE2 node, and can also pass through PE1, P3, P1, P2, P1, P3, PE1, P4, P5, P6, P7 nodes to reach the PE2 node.
  • the segment identifiers (SID1, SID2 and SID3) included in the segment list indicate a loose path.
  • the segment list included in the first message may also include segment identifiers of other nodes.
  • the segment list included in the first message specifically includes: SID1 (P1 node), SID2 (P2 node) and SID3 (PE2 node).
  • the network device forwards the first message according to the segment list (SID1, SID2 and SID3).
  • the first message needs to pass through the P1 node, the P2 node and the PE2 node.
  • A1 Design a maximum forwarding hop count of the first message. When the number of nodes passed by the first message reaches the maximum forwarding hop count of the first message, the network device discards the first message.
  • the network device obtains the total number of hops of the target path, in other words, obtains the number of nodes passed in the target path. Then, based on the total number of hops of the target path, the network device designs the first message to be discarded after N hops of transmission, where N is a positive integer and N is greater than or equal to the total number of hops of the target path.
  • N is a positive integer and N is greater than or equal to the total number of hops of the target path.
  • the first message cannot reach the destination of the first message (i.e., the second node) through the detour path, and the second node cannot loop back the first message to the sending end (i.e., the head node) through the detour path.
  • the network device After the network device sends the first message, if the looped back first message is not received, the network device determines that the state of the target path is faulty.
  • the first message also includes a first identifier, which indicates that the first message is discarded after being transmitted N hops, where N is a positive integer, and the value of the first identifier decreases by one after each hop of the first message.
  • the network device discards the first message.
  • the first identifier is carried in a TTL field of an Internet Protocol version 4 IPv4 header of the first message.
  • Figure 7 is a schematic diagram of the structure of an IPv4 header.
  • the first identifier can be carried in the TTL field.
  • the first identifier is carried in a hop limit field of an Internet Protocol version 6 IPv6 message header of the first message.
  • FIG8 is a schematic diagram of the structure of an IPv6 message header.
  • the first identifier can be carried in the Hop limit field.
  • first identifier may also be located in other fields of the first message, and this embodiment of the present application does not limit this.
  • the network device obtains the total number of hops of the target path, and then determines the value N of the first identifier according to the total number of hops of the target path, where N is greater than or equal to the total number of hops of the target path.
  • the first message can be forwarded on a path with a smaller degree of detour to reach the destination node indicated by the segment list.
  • the network device can tolerate a detour path with a smaller degree of detour to avoid frequent end-to-end path switching.
  • the network device obtains the second message, which can be regarded as the first message without filling the value of the first identifier. Then, the network device determines the value of N according to the total number of hops of the target path. The network device fills the first identifier in the second message (that is, fills the value of N in the first identifier) to generate the first message.
  • the network device may also perform committed access rate (CAR) control on the first message carrying the first identifier, and the CAR control of the first message indicates that the threshold value of the transmission rate of the first message per unit time is M, where M is a positive integer.
  • CAR committed access rate
  • the messages are classified and the data stream is controlled to be transmitted at a specific rate.
  • the first message may be controlled by CAR to limit the transmission rate of the first message.
  • the network device determines whether to discard the first message according to the outgoing interface of the first message and the incoming interface of the first message.
  • the network device forwards the first message, it detects the outgoing interface and the incoming interface of the first message. Then, the network device determines whether to discard the first message according to whether the outgoing interface of the first message is consistent with the incoming interface of the first message.
  • the network device discards the first message.
  • Figure 9 is a schematic diagram of an application scenario in an embodiment of the present application. Take the network device as a P1 node as an example, and the path between the P1 node and the P2 node fails. After the P1 node receives a message from the P3 node, the P1 node detects whether the incoming interface and the outgoing interface of the message are consistent. Due to the path failure between the P1 node and the P2 node, the P1 node needs to forward the message from the P3 node. The incoming interface and the outgoing interface of the message at the P1 node are both interface A, so the P1 node discards the message.
  • the network device forwards the first message according to the segment list included in the first message.
  • Figure 10 is a schematic diagram of an application scenario in an embodiment of the present application.
  • the P1 node receives a message from the P3 node
  • the P1 node detects whether the incoming interface and the outgoing interface of the message are consistent. Since the path between the P1 node and the P2 node is normal, the P1 node forwards the message from the P2 node according to the instructions of the message segment list.
  • the incoming interface of the message at the P1 node is interface A
  • the outgoing interface of the message at the P1 node is interface B. Therefore, the P1 node forwards the message normally.
  • the first message further includes a second identifier, and the second identifier instructs the network device to detect whether an input interface for receiving the first message and an output interface for sending the first message are consistent.
  • the second identifier is carried in the Flags field of the segment routing extension header SRH of the first message.
  • Figure 11 is a schematic diagram of the structure of the first message in an embodiment of the present application.
  • a specific bit for example, the first bit
  • the network device needs to detect whether the outgoing interface and the incoming interface of the first message are consistent, and determine whether to discard the first message based on the detection result; when the specific bit in the Flags field is 0, the network device forwards the first message according to the normal process, that is, there is no need to detect whether the outgoing interface and the incoming interface of the first message are consistent.
  • the second identifier can also be located in other fields of the first message, and the embodiment of the present application does not limit this.
  • A3. Design the segment list of the first message so that the first message is forwarded strictly along the path indicated by the segment list.
  • the network device calculates the shortest path through multiple nodes of the path according to the shortest path tree (SPT). Then, the network device determines the segment identifier SID of each node passed by the shortest path. The network device generates a segment list of the first message, which includes the segment identifier of each node passed by the target path (i.e., the shortest path). In other words, the network device calculates the shortest path status of each node according to the loose path (loose path).
  • SPT shortest path tree
  • the strict path refers to the path of each node that the message passes through without strict restrictions
  • the strict path is determined (the strict path refers to the path of each node that the message passes through strictly). Then the strict path (i.e., the forwarding information of each node passed by the target path) is filled into the segment list of the first message, and the segment list guides the forwarding of the first message.
  • the network device generates a target path based on a link state database (LSDB) and/or a segment routing database (SRDB).
  • LSDB link state database
  • SRDB segment routing database
  • the segment list of the first message includes forwarding information of each node along the target path, wherein the forwarding information includes a segment identifier (SID) of the node and an outbound interface of the node, or the forwarding information includes an outbound interface of the node, or the forwarding information includes a segment identifier of the node.
  • SID segment identifier
  • FIG. 13 is a schematic diagram of an application scenario in an embodiment of the present application.
  • the PE1 node (as a network device) detects the state of the path P1 (SID1)-P2 (SID2)-PE2 (SID3), and the PE1 node generates the shortest path through P1, P2 and PE2, that is, the target path, based on the path P1 (SID1)-P2 (SID2)-PE2 (SID3).
  • the PE1 node determines the forwarding information of each node in the target path, and the forwarding information can be End.
  • SIDX abbreviated as SIDX
  • End.X SID indicates the outgoing interface of the node, and the network device determines the outgoing interface for forwarding the message based on End.X SID.
  • the PE1 node generates a segment list of the first message, and the segment list specifically includes: SIDX1 (indicating the outgoing interface of the PE1 node), SIDX2 (indicating the outgoing interface of the P3 node), SIDX3 (indicating the outgoing interface of the P1 node), SIDX4 (indicating the outgoing interface of the P2 node) and SIDX5 (indicating the outgoing interface of the P8 node).
  • the segment list indicates that the message is forwarded along the path PE1-P3-P1-P2-P8-PE2 to reach the PE2 node.
  • a third identifier is added to the first message, and the third identifier indicates that the first message does not perform fast reroute (FRR).
  • the third identifier is carried in the identifier Flags field of the SRH of the first message.
  • Figure 12 is a schematic diagram of the structure of the first message in an embodiment of the present application. It should be noted that the third identifier can also be located in other fields of the first message, and the embodiment of the present application does not limit this.
  • the network device forwards the first message according to the segment list.
  • A1. Design the maximum forwarding hop count of the first message.
  • the network device discards the first message. Specifically, the network device determines whether to continue forwarding the first message according to the first identifier included in the first message. When the value N of the first identifier is equal to 0, that is, the first identifier indicates that the first message is discarded after 0 hops of transmission, the network device discards the first message. When the value of the first identifier is greater than 0, the network device forwards the first message normally according to the segment list.
  • FIG. 6 is a schematic diagram of another communication scenario in an embodiment of the present application.
  • Take the PE1 node sending the first message as an example.
  • the segment list of the first message includes: SID1, SID2 and SID3, where SID1 corresponds to the P1 node, SID2 corresponds to the P2 node, and SID3 corresponds to the PE2 node.
  • the PE1 node forwards the first message according to the segment list.
  • the value of the first identifier in the first message ie, TTL
  • the first identifier indicates that the first message is discarded after transmitting 5 hops.
  • the first message arrives at the P1 node.
  • the PE2 node cannot receive the first message from the PE1 node, therefore, the PE1 node cannot receive the looped-back first message (i.e., the looped-back first message from the PE2 node).
  • the PE1 node determines through the first message that the target path (i.e., the shortest path corresponding to the segment lists SID1, SID2, and SID3) is a faulty path.
  • the network device Before actually forwarding the first message, the network device detects whether the outgoing interface of the first message is consistent with the incoming interface of the first message. When the outgoing interface of the first message is consistent with the incoming interface of the first message, the network device discards the first message; when the outgoing interface of the first message is inconsistent with the incoming interface of the first message, the network device forwards the first message according to the segment list of the first message.
  • the network device forwards the first message according to the segment list of the first message.
  • the network device determines that the next hop of the network device in the segment list is unreachable, the network device discards the first message; when the network device determines that the next hop of the network device in the segment list is reachable, the network device forwards the first message according to the segment list.
  • the network device detects a state of a target path according to the first message, where the target path is the shortest path between the first node and the second node.
  • the network device detects the state of the target path according to the first message, and the target path is the state between the first node and the second node.
  • Shortest path For example, the shortest path indicated by the segment list "(SID1, SID2, SID3)" in Figure 3 is "PE1-P3-P1-P2-P8-PE2".
  • the target path is "PE1-P3-P1-P2-P8-PE2".
  • the network device is a head node. After the network device forwards the first message according to the segment list of the first message, if the network device does not receive the looped-back first message, the network device determines that the state of the target path is a faulty path. When the network device receives the looped-back first message after forwarding the first message according to the segment list of the first message, the network device determines that the state of the target path is a normal path.
  • the network device is an intermediate node. Before forwarding a message, the network device determines whether the forwarded message is the first message, that is, the network device determines whether the forwarded message is used to detect the state of the target path. If the forwarded message is the first message and the network device discards the first message, the network device notifies the head node that the state of the target path is abnormal.
  • the network device can detect the shortest path indicated by the segment list according to the first message, so the network device can promptly find out whether there is a faulty path in the shortest path between the first node and the second node, thereby avoiding traffic forwarding through a detour path, increasing the available bandwidth of the network device, and improving the data throughput of the network.
  • FIG5 is a schematic diagram of an embodiment of a method for detecting a path fault in an embodiment of the present application.
  • a method for detecting a path fault proposed in an embodiment of the present application includes:
  • a network device obtains a segment list, where the segment list includes a segment identifier of a first node and a segment identifier of a second node, and the segment list indicates a target path.
  • the network device determines the target path according to the segment list. Specifically, the network device determines the first node and the second node (or other more nodes) according to the segment list. Then the network device calculates the shortest path between the first node and the second node according to the shortest path tree (SPT), that is, the target path.
  • SPT shortest path tree
  • the network device calculates a second path according to the segment list and the path status information, where the second path is the shortest path between the first node and the second node that does not include a faulty path, and the path status information indicates the faulty path.
  • the network device obtains the path status information from the Link State Database (LSDB) and/or the Segment Routing Database (SRDB).
  • the path status information indicates the status of each path in the current network, that is, the path status information indicates the faulty path.
  • the network device calculates the actually reachable path between the first node and the second node based on the segment list and the path status information, and the path is also called the second path.
  • the second path is the shortest path between the first node and the second node that does not include the faulty path.
  • the network device detects a state of the target path according to the second path.
  • the network device determines that the state of the target path is faulty; when the target path does not pass through repeated nodes, the network device determines that the state of the target path is normal.
  • the head node performs the above steps 501-503.
  • any one or more intermediate nodes on the target path may also perform path calculation as roots, that is, the intermediate nodes perform the above steps 501-503.
  • the network device obtains path status information from the link state database LSDB and/or the segment routing database SRDB, and the network device detects the state of the shortest path indicated by the segment list according to the path status information. Therefore, the network device can promptly find out whether there is a faulty path in the shortest path between the first node and the second node. This avoids forwarding traffic through a detour path, improves the available bandwidth of the network device, and improves the data throughput of the network.
  • the network device includes a hardware structure and/or software module corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
  • the embodiment of the present application can divide the functional modules of the network device according to the above method example.
  • each functional module can be divided according to each function, or two or more functions can be integrated into one processing module.
  • the above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
  • the following introduces a communication device in an embodiment of the present application.
  • the communication device introduced below has any function of the network device in the above method embodiment.
  • FIG14 is a schematic diagram of the structure of a communication device 1400 provided in an embodiment of the present application.
  • the communication device 1400 includes: a transceiver module 1401, which is used to execute steps 401 and 402; a processing module 1402, which is used to execute step 403.
  • the transceiver module 1401 is used to execute steps 502 and 503; and the processing module 1402 is used to execute step 501.
  • the transceiver module 1401 is used for the network device to obtain a first message
  • the first message includes a segment list, the segment list includes a plurality of segment identifiers SIDs arranged in sequence, the segment list identifies a forwarding path of the first message, and the segment list includes a segment identifier of a first node and a segment identifier of a second node;
  • the transceiver module 1401 is further configured to forward the first message according to the segment list;
  • the processing module 1402 is used to detect the state of the target path according to the first message, where the target path is the shortest path between the first node and the second node, and the segment identifier identifying the target path in the segment list indicates a loose path.
  • the first message further includes a first identifier, and the first identifier indicates that the first message is discarded after being transmitted N hops, where N is a positive integer.
  • the value of the first identifier decreases by one after each hop of transmission of the first message.
  • the network device discards the first message.
  • the transceiver module 1401 is further used to obtain the total number of hops of the target path;
  • the processing module 1402 is further configured to determine a value N of the first identifier according to a total number of hops of the target path, where N is greater than or equal to the total number of hops of the target path.
  • the transceiver module 1401 is further configured to obtain a second message, where the second message includes the segment list;
  • the processing module 1402 is further configured to fill the first identifier in the second message to generate the first message.
  • the processing module 1402 is further configured to perform committed access rate CAR control on the first message, where the CAR indicates that a threshold value of a transmission rate of the first message per unit time is M, where M is a positive integer.
  • the first identifier is carried in a TTL field of an Internet Protocol version 4 IPv4 header of the first message, or the first identifier is carried in a Hop limit field of an Internet Protocol version 6 IPv6 header of the first message.
  • the first message further includes a second identifier, and the second identifier instructs the network device to detect whether an input interface for receiving the first message and an output interface for sending the first message are consistent.
  • the processing module 1402 is further configured to detect, according to the second identifier, whether an input interface for receiving the first message and an output interface for receiving the first message are consistent;
  • the transceiver module 1401 is further configured to, when the network device detects that the input interface for receiving the first message is consistent with the output interface for sending the first message, discard the first message by the network device;
  • the transceiver module 1401 is also used for the network device to forward the first message according to the segment list when the network device detects that the input interface for receiving the first message is inconsistent with the output interface for sending the first message.
  • the second identifier is carried in an identifier Flags field of a segment routing extension header SRH of the first message.
  • the processing module 1402 is further configured to, when the network device receives the first message from the second node, determine that the state of the target path is normal;
  • the processing module 1402 is further configured to determine, by the network device, that the state of the target path is faulty when the network device does not receive the first message from the second node.
  • the first message is a Bidirectional Forwarding Detection (BFD) protocol message, or the first message is a Seamless Bidirectional Forwarding Detection (SBFD) protocol message.
  • BFD Bidirectional Forwarding Detection
  • SBFD Seamless Bidirectional Forwarding Detection
  • the transceiver module 1401 is used to obtain a segment list, the segment list includes a segment identifier of a first node and a segment identifier of a second node, the segment list indicates a target path, and the target path is a shortest path between the first node and the second node;
  • a processing module 1402 is configured to calculate a second path according to the segment list and the path status information, where the second path is a shortest path between the first node and the second node that does not include a faulty path, and the path status information indicates the faulty path;
  • the processing module 1402 is further configured to detect a state of the target path according to the second path.
  • the processing module 1402 is further configured to determine that the state of the target path is a failure when the second path passes through a repeated node;
  • the processing module 1402 is further configured to determine that the state of the target path is normal when the target path does not pass through repeated nodes.
  • the transceiver module 1401 is also used to obtain the path status information from a link state database (LSDB) and/or a segment routing database (SRDB).
  • LSDB link state database
  • SRDB segment routing database
  • the transceiver module 1401 is used to obtain a first message, where the first message includes a segment list, and the segment list includes a plurality of segment identifiers SIDs arranged in sequence;
  • the segment list includes forwarding information of each node along a target path, the target path being the shortest path between the first node and the second node;
  • the transceiver module 1401 is further configured to forward the first message according to the segment list;
  • the processing module 1402 is configured to detect a state of the target path according to the first message.
  • the transceiver module 1401 is further used to obtain a third message, the segment list of the third message includes a plurality of segment identifiers arranged in sequence, and the segment list of the third message is used to indicate a plurality of forwarding paths of the third message;
  • the transceiver module 1401 is further configured to forward the third message according to the segment list of the third message.
  • the forwarding information includes: a segment identifier of the node, and/or an adjacent segment identifier of the node.
  • the processing module 1402 is further configured to discard the first message when the network device determines that the next hop of the network device in the segment list is unreachable;
  • the processing module 1402 is further configured to forward the first message according to the segment list when the network device determines that the next hop of the network device in the segment list is reachable.
  • the first message further includes: a third identifier, wherein the third identifier indicates that fast rerouting FRR is not performed during forwarding of the first message.
  • the third identifier is carried in an identifier Flags field of a segment routing extension header SRH of the first message.
  • the communication device 1400 can correspond to the network device in the above-mentioned method embodiment.
  • the various units in the communication device 1400 and the above-mentioned other operations and/or functions are respectively for implementing the various steps and methods implemented by the network device in the method embodiment.
  • the specific details can be found in the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.
  • the communication device 1400 executes the above method embodiment, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the communication device 1400 is divided into different functional modules to complete all or part of the functions described above.
  • the communication device 1400 provided in the above embodiment and the embodiment method corresponding to Figure 4 or 5 above belong to the same concept, and the specific implementation process is detailed in the above method embodiment, which will not be repeated here.
  • the present application further provides a communication device.
  • Figure 15 is a schematic diagram of the structure of a communication device 1500 provided in an embodiment of the present application.
  • the communication device 1500 shown in Figure 15 shows certain specific features, those skilled in the art will realize from the embodiments of the present application that, for the sake of brevity, various other features are not shown in Figure 15 to avoid confusing more relevant aspects of the embodiments disclosed in the embodiments of the present application.
  • the communication device 1500 includes one or more processing units (such as CPU) 1501, a network interface 1502, a programming interface 1503, a memory 1504 and one or more communication buses 1505 for interconnecting various components.
  • the communication device 1500 can also omit or increase some functional components or units based on the above examples.
  • the network interface 1502 is used to connect to one or more other communication devices/servers in the network system.
  • the communication bus 1505 includes circuits for interconnecting and controlling communication between system components.
  • the memory 1504 may include non-volatile memory, such as read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), or flash memory.
  • the memory 1504 may also include volatile memory, which may be random access memory (RAM), which is used as an external cache.
  • the memory 1504 or the non-transitory computer-readable storage medium of the memory 1504 stores the following programs, modules, and data structures, or a subset thereof, including, for example, a transceiver unit 15041 and a processing unit 15042 .
  • the communication device 1500 may have any function of the network device in the method embodiment corresponding to FIG. 4 or 5 above.
  • the network interface 1502 is used for the network device to obtain the first message.
  • the first message includes a segment list, the segment list includes a plurality of segment identifiers SIDs arranged in sequence, the segment list identifies a forwarding path of the first message, and the segment list includes a segment identifier of a first node and a segment identifier of a second node;
  • the network interface 1502 is further configured to forward the first message according to the segment list
  • CPU 1501 is configured to detect a state of a target path according to the first message, where the target path is the shortest path between the first node and the second node, and a segment identifier in the segment list that identifies the target path indicates a loose path.
  • the first message also includes a first identifier, which indicates that the first message is discarded after being transmitted N hops, where N is a positive integer, and the value of the first identifier is reduced by one after each hop of transmission of the first message.
  • the network device discards the first message.
  • the network interface 1502 is further used to obtain the total number of hops of the target path;
  • the CPU 1501 is further configured to determine a value N of the first identifier according to a total number of hops of the target path, where N is greater than or equal to the total number of hops of the target path.
  • the network interface 1502 is further used to obtain a second message, where the second message includes the segment list;
  • the CPU 1501 is further configured to fill the first identifier in the second message to generate the first message.
  • the CPU 1501 is further configured to perform committed access rate CAR control on the first message, where the CAR indicates that a threshold value of a transmission rate of the first message per unit time is M, where M is a positive integer.
  • the first identifier is carried in a TTL field of an Internet Protocol version 4 IPv4 message header of the first message.
  • the first identifier is carried in the hop limit field of the Internet Protocol version 6 IPv6 message header of the first message.
  • the first message further includes a second identifier, and the second identifier instructs the network device to detect whether an input interface for receiving the first message and an output interface for sending the first message are consistent.
  • the CPU 1501 is further configured to detect, according to the second identifier, whether an input interface for receiving the first message and an output interface for receiving the first message are consistent;
  • the network interface 1502 is further configured to, when the network device detects that the input interface for receiving the first message is consistent with the output interface for sending the first message, cause the network device to discard the first message;
  • the network interface 1502 is also used for the network device to forward the first message according to the segment list when the network device detects that the input interface for receiving the first message is inconsistent with the output interface for sending the first message.
  • the second identifier is carried in an identifier Flags field of a segment routing extension header SRH of the first message.
  • the CPU 1501 is further configured to, when the network device receives the first message from the second node, determine that the state of the target path is normal;
  • the CPU 1501 is further configured to, when the network device does not receive the first message from the second node, determine that the state of the target path is faulty.
  • the first message is a Bidirectional Forwarding Detection (BFD) protocol message, or the first message is a Seamless Bidirectional Forwarding Detection (SBFD) protocol message.
  • BFD Bidirectional Forwarding Detection
  • SBFD Seamless Bidirectional Forwarding Detection
  • the network interface 1502 is used to obtain a segment list, the segment list including a segment identifier of a first node and a segment identifier of a second node, the segment list indicating a target path, the target path being a shortest path between the first node and the second node;
  • CPU 1501 is configured to calculate a second path according to the segment list and the path status information, where the second path is a shortest path between the first node and the second node that does not include a faulty path, and the path status information indicates the faulty path;
  • the CPU 1501 is further configured to detect a state of the target path according to the second path.
  • the CPU 1501 is further configured to determine that the state of the target path is a fault when the second path passes through a repeated node;
  • the CPU 1501 is further configured to determine that the state of the target path is normal when the target path does not pass through repeated nodes.
  • the network interface 1502 is also used to obtain the path status information from a link state database (LSDB) and/or a segment routing database (SRDB).
  • LSDB link state database
  • SRDB segment routing database
  • the network interface 1502 is used to obtain a first message, wherein the first message includes a segment list, and the segment list includes A plurality of segment identifiers SID arranged in order;
  • the segment list includes forwarding information of each node along a target path, the target path being the shortest path between the first node and the second node;
  • the network interface 1502 is further configured to forward the first message according to the segment list
  • the CPU 1501 is configured to detect the state of the target path according to the first message.
  • the network interface 1502 is further used to obtain a third message, wherein the segment list of the third message includes a plurality of segment identifiers arranged in sequence, and the segment list of the third message is used to indicate a plurality of forwarding paths of the third message;
  • the network interface 1502 is further configured to forward the third message according to the segment list of the third message.
  • the forwarding information includes: a segment identifier of the node, and/or an adjacent segment identifier of the node.
  • CPU1501 is further configured to discard the first message when the network device determines that the next hop of the network device in the segment list is unreachable;
  • CPU1501 is further configured to forward the first message according to the segment list when the network device determines that the next hop of the network device in the segment list is reachable.
  • the first message further includes: a third identifier, wherein the third identifier indicates that fast rerouting FRR is not performed during forwarding of the first message.
  • the third identifier is carried in an identifier Flags field of a segment routing extension header SRH of the first message.
  • the communication device 1500 corresponds to the network device in the above-mentioned method embodiment, and the various modules in the communication device 1500 and the above-mentioned other operations and/or functions are respectively for implementing the various steps and methods implemented by the network device in the above-mentioned method embodiment.
  • the various modules in the communication device 1500 and the above-mentioned other operations and/or functions are respectively for implementing the various steps and methods implemented by the network device in the above-mentioned method embodiment.
  • they will not be repeated here.
  • the data sending and receiving operations can be completed by the network interface 1502 on the communication device 1500, or the processor can call the program code in the memory and cooperate with the network interface 1502 to implement the functions of the sending and receiving unit when necessary.
  • the communication device 1500 is used to execute the path failure detection method provided in the embodiments of the present application, for example, to execute the path failure detection method corresponding to the embodiment shown in FIG. 4 or 5 above.
  • FIG. 16 The specific structure of the communication device described in FIG. 15 of the present application may be as shown in FIG. 16 .
  • FIG. 16 is a schematic diagram of the structure of a communication device 1600 provided in an embodiment of the present application.
  • the communication device 1600 includes: a main control board 1650 and an interface board 1630 .
  • the main control board 1650 is also called a main processing unit (MPU) or a route processor.
  • the main control board 1650 is used to control and manage various components in the communication device 1600, including routing calculation, device management, device maintenance, and protocol processing functions.
  • the main control board 1650 includes: a central processing unit 1651 and a memory 1652.
  • the interface board 1630 is also called a line processing unit (LPU), a line card or a service board.
  • the interface board 1630 is used to provide various service interfaces and implement data packet forwarding.
  • the service interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc.
  • the interface board 1630 includes: a central processor 1631, a network processor 1632, a forwarding table entry memory 1634 and a physical interface card (PIC) 1633.
  • PIC physical interface card
  • the central processor 1631 on the interface board 1630 is used to control and manage the interface board 1630 and communicate with the central processor 1651 on the main control board 1650 .
  • the network processor 1632 is used to implement message forwarding processing.
  • the network processor 1632 may be in the form of a forwarding chip.
  • the physical interface card 1633 is used to implement the physical layer docking function, whereby the original traffic enters the interface board 1630, and the processed message is sent from the physical interface card 1633.
  • the physical interface card 1633 includes at least one physical interface, which is also called a physical port.
  • the physical interface can be a Flexible Ethernet (FlexE) physical interface.
  • the physical interface card 1633 is also called a daughter card, which can be installed on the interface board 1630 and is responsible for converting the photoelectric signal into a message and forwarding the message to the network processor 1632 for processing after checking the legitimacy of the message.
  • the central processor 1631 of the interface board 1630 can also perform the functions of the network processor 1632, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1632 is not required in the interface board 1630.
  • the communication device 1600 includes a plurality of interface boards.
  • the communication device 1600 further includes an interface board 1640.
  • the interface board 1640 includes It includes: a central processor 1641, a network processor 1642, a forwarding table memory 1644 and a physical interface card 1643.
  • the communication device 1600 further includes a switching fabric board 1660.
  • the switching fabric board 1660 may also be referred to as a switch fabric unit (SFU).
  • SFU switch fabric unit
  • the switching fabric board 1660 is used to complete data exchange between the interface boards.
  • the interface board 1630 and the interface board 1640 may communicate via the switching fabric board 1660.
  • the main control board 1650 is coupled to the interface board.
  • the main control board 1650, the interface board 1630, the interface board 1640, and the switching network board 1660 are connected to each other through a system bus and/or a system backplane to achieve intercommunication.
  • an inter-process communication (IPC) channel is established between the main control board 1650 and the interface board 1630, and the main control board 1650 and the interface board 1630 communicate through the IPC channel.
  • IPC inter-process communication
  • the communication device 1600 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 1650 and a central processing unit 1631.
  • the forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1634, a physical interface card 1633, and a network processor 1632.
  • the control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of the device.
  • the control plane sends the generated forwarding table to the forwarding plane.
  • the network processor 1632 forwards the message received by the physical interface card 1633 based on the forwarding table sent by the control plane.
  • the forwarding table sent by the control plane can be stored in the forwarding table entry memory 1634. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
  • the transceiver unit in the communication device 1500 can be equivalent to the physical interface card 1633 or the physical interface card 1643 in the communication device 1600; the acquisition unit 15041 and the processing unit 15042 in the communication device 1500 can be equivalent to the central processing unit 1651 or the central processing unit 1631 in the communication device 1600, and can also be equivalent to the program code or instructions stored in the memory 1652.
  • the operation on the interface board 1640 in the embodiment of the present application is consistent with the operation of the interface board 1630, and for the sake of brevity, it will not be repeated.
  • the communication device 1600 of this embodiment can correspond to the network device in the above-mentioned various method embodiments, and the main control board 1650, the interface board 1630 and/or the interface board 1640 in the communication device 1600 can implement the functions and/or various steps implemented by the network device in the above-mentioned various method embodiments, and for the sake of brevity, it will not be repeated here.
  • main control boards there may be one or more main control boards, and when there are multiple boards, they may include a main main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capability of the communication device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, load sharing and redundant backup can be achieved together. Under the centralized forwarding architecture, the communication device may not need a switching network board, and the interface board bears the processing function of the service data of the entire system.
  • the communication device may have at least one switching network board, and the data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities.
  • the form of the communication device may also be only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the board.
  • the central processor on the interface board and the central processor on the main control board can be merged into one central processor on the board to perform the functions of the two superimposed. Which architecture is adopted depends on the specific networking deployment scenario, and it is not limited here.
  • the above network device can be implemented as a virtualized device.
  • the virtualized device can be a virtual machine (VM), a virtual router or a virtual switch running a program for sending a message.
  • the virtualized device is deployed on a hardware device (e.g., a physical server).
  • a hardware device e.g., a physical server.
  • the network device can be implemented based on a general physical server combined with network functions virtualization (NFV) technology.
  • NFV network functions virtualization
  • the embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to control a network device to execute any one of the implementation methods shown in the aforementioned method embodiments.
  • the embodiments of the present application also provide a computer program product, which includes a computer program code.
  • the computer program code runs on a computer, the computer executes any one of the implementation methods shown in the aforementioned method embodiments.
  • an embodiment of the present application also provides a computer program product, which, when executed on a communication device, enables the communication device to execute the method executed by the network device in the method embodiment corresponding to FIG. 4 or 5 above.
  • the embodiment of the present application further provides a chip system, including a processor and an interface circuit, wherein the interface circuit is used to receive instructions and transmit them to the processor.
  • the processor is used to implement the method in any of the above method embodiments.
  • the chip system further includes a memory
  • the processor in the chip system may be one or more.
  • the processor may be implemented by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, etc.
  • the processor may be a general-purpose processor that implements the method in any of the above method embodiments by reading software codes stored in a memory.
  • the memory in the chip system may be one or more.
  • the memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application.
  • the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips.
  • the present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
  • FIG. 17 is a schematic diagram of a network system 1700 proposed in an embodiment of the present application.
  • the network system 1700 includes: a network device 1701, a network device 1702, and a network device 1703.
  • the network device 1701, the network device 1702, and the network device 1703 may be, for example, a physical device such as a router, a switch, or a gateway, or may be a virtual device that supports route publishing and message forwarding.
  • This embodiment does not limit the specific types of the network device 1701, the network device 1702, and the network device 1703.
  • the network device 1701 obtains a first message, and the segment list of the first message indicates that the forwarding path of the first message includes the network device 1701 and the network device 1703, that is, the segment list of the first message includes the segment identifier of the network device 1701 and the segment identifier of the network device 1703;
  • the network device 1701 forwards the first message according to the segment list of the first message
  • the network device 1701 detects the state of the target path according to the first message, and the target path is the shortest path between the network device 1701 and the network device 1703. Specifically, when the network device 1701 receives the first message looped back from the network device 1703, the network device 1701 determines that the state of the target path is normal; when the network device 1701 does not receive the first message looped back from the network device 1703, the network device 1701 determines that the state of the target path is faulty.
  • the network device 1702 determines that the value of the first identifier in the first message is 0, and then the network device 1702 discards the first message.
  • the network device 1702 After receiving the first message, the network device 1702 detects whether the input interface receiving the first message and the output interface sending the first message in the network device 1702 are consistent according to the indication of the second identifier in the first message. If they are inconsistent, the first message is forwarded; if they are consistent, the first message is discarded.
  • the segment list of the first message includes the segment identifier of the network device 1701, the segment identifier of the network device 1702, and the segment identifier of the network device 1703.
  • the network device 1702 determines that the next hop (i.e., the network device 1703) is unreachable, for example, the path between the network device 1702 and the network device 1703 is faulty, the network device 1702 discards the first message.
  • the network device 1701 After the network device 1701 obtains the segment list, it detects the state of the target path.
  • the network device 1702 can also perform path calculation as a root to detect the state of the target path.
  • the network system 1700 further includes a control management device 1704, which may be a server for managing the network devices 1701, 1702, and 1703.
  • the network device 1701 may be a communication device 1400, 1500, or 1600.
  • the network device 1702 may be a communication device 1400, 1500, or 1600.
  • the network device 1703 may be a communication device 1400, 1500, or 1600.
  • the communication devices in the above-mentioned various product forms respectively have any functions of the network devices in the above-mentioned method embodiments, which will not be described in detail here.
  • B corresponding to A means that B is associated with A, and B can be determined based on A.
  • Determining B based on A does not mean determining B based only on A.
  • B can also be determined based on A and/or other information.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

Landscapes

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

Abstract

本申请公开了一种路径故障检测的方法,该方法包括:网络设备获取第一报文,第一报文包括段列表,段列表包括依次排列的多个段标识SID,段列表标识第一报文的转发路径,段列表包括第一节点的段标识和第二节点的段标识;网络设备根据段列表转发第一报文;网络设备根据第一报文,检测目标路径的状态,目标路径为第一节点与第二节点之间的最短路径。网络设备根据第一报文可以检测段列表指示的最短路径,因此,网络设备可以及时发现第一节点与第二节点之间的最短路径中是否存在故障路径。本申请可以避免流量通过绕行路径转发,避免带宽浪费以及时延增加,提升网络设备的可用带宽,提升网络的数据吞吐量。

Description

一种路径故障检测的方法以及相关装置
本申请要求于2022年09月28日提交中国国家知识产权局、申请号为CN202211192245.X、发明名称为“一种路径故障检测的方法以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种路径故障检测的方法以及相关装置。
背景技术
在业务报文转发过程中,段路由(segment routing,SR)节点基于互联网协议第6版-段路由(Internet Protocol Version6-Segment Routing,IPv6 SR或SRv6)的段路由流量工程策略(segment routing traffic engineering policy,SR TE Policy)提供的灵活选择转发路径的方式,可满足用户不同的转发需求。当头节点(例如SR policy的头节点)与目的节点之间存在多条转发路径时,合理利用SR TE Policy选择转发路径,不仅方便管理人员对网络进行管理和规划,还可有效地减轻网络设备的转发压力。
目前常用的路径故障检测的方法是双向转发检测(bidirectional forwarding detection,BFD)协议或者无缝双向转发检测(Seamless Bidirectional Forwarding Detection,SBFD)协议。SBFD协议的检测原理如图1所示,按照节点的功能划分具体可分为发起端和反射端。首先,发起端和反射端通过协商机制建立连接,发起端与反射端之间互相发送SBFD控制报文(SBFD Control Packet)并通告SBFD描述符(Discriminator)等信息。然后步骤101中,发起端进行路径检测时,向反射端发送SBFD控制报文。步骤102中,反射端接收SBFD控制报文后环回该SBFD控制报文至发起端。当发起端与反射端之间的路径正常时,发起端可以成功接收来自反射端的SBFD控制报文,因此发起端可以根据是否接收该SBFD控制报文检测发起端与反射端之间的路径状态。
在SR TE Policy中,通常由头节点作为图1的发起端检测路径,具体的,头节点在SBFD控制报文中增加分段路由头(segment routing header,SRH)指示该SBFD控制报文在特定的SR路径中传输。当头节点通过SBFD控制报文检测某段路径故障后,将检测结果通知网络控制器。网络控制器根据检测结果,完成路径收敛。网络控制器将新的路径下发至头节点,该新的路径绕开故障路径。
申请人研究发现,在某些SR路径场景下,头节点发出的SBFD控制报文可能会绕过故障路径到达目的节点,目的节点收到该SBFD控制报文后将该SBFD控制报文环回至头节点。因此,头节点判断头节点至目的节点之间的最短路径正常,无法检测到故障路径。
发明内容
第一方面,本申请实施例提出一种路径故障检测的方法,包括:
网络设备获取第一报文,所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID,所述段列表标识所述第一报文的转发路径,所述段列表包括第一节点的段标识和第二节点的段标识;所述网络设备根据所述段列表转发所述第一报文;所述网络设备根据所述第一报文检测目标路径的状态,所述目标路径为所述第一节点与所述第二节点之间的最短路径,所述段列表中标识所述目标路径的段标识指示松散路径。
具体的,第一报文的段列表指示第一报文的转发路径,第一报文需要经过第一节点和第二节点。段列表标识第一报文的转发路径。段列表中标识所述目标路径的段标识指示松散路径,换言之,段列表中标识所述目标路径的段标识指示第一节点和第二节点之间可能存在多条路径用于转发报文。松散路径指的是段列表的段标识未严格指示报文需要经过的所有节点。例如:段列表包括的段标识为SID1(P1节点)、SID2(P2节点)和SID3(PE2节点),携带该段列表的报文可以经过PE1、P3、P1、P2、P8节点到达PE2节点,也可以经过PE1、P3、P1、P2、P1、P3、PE1、P4、P5、P6、P7节点到达PE2节点,该段列表包括的段标识(SID1、SID2和SID3)指示松散路径。
其中,第一节点与第二节点之间的最短路径称为目标路径。本申请实施例中,网络设备通过转发该第一报文检测目标路径的状态。
需要说明的是,本申请实施例中的网络设备可以是SR policy(或者SRv6policy)中的头节点(后文简称为头节点);也可以是SR policy(或者SRv6policy)中的中间节点(后文简称为中间节点),本申请实施例对此不作限制。
本申请实施例中,第一节点可以是SR policy(或者SRv6policy)中的头节点;第一节点也可以是SR policy(或者SRv6policy)中的中间节点。第二节点可以是SR policy(或者SRv6policy)中的中间节点;第二节点也可以是SR policy(或者SRv6policy)中的尾节点。
一种示例中,本申请实施例中的网络设备为头节点,第一节点为头节点。换言之,本申请实施例中的网络设备与第一节点属于同一个节点(即头节点)。
本申请实施例中的路径也可以称为链路,本申请实施例对此不作限制。
需要说明的是,本申请实施例提出的路径故障检测的方法,可应用于BFD回声(BFD Echo)模式下,也可以应用于BFD异步模式下。当本申请实施例应用于BFD Echo模式下,发起端应用本申请实施例提出的方法。当本申请实施例应用于BFD异步模式下,例如A节点与B节点之间执行BFD检测,A节点与B节点之间相互发送BFD控制报文,则A节点和B节点应用本申请实施例提出的方法。
本申请实施例中,网络设备根据第一报文可以检测段列表指示的最短路径,因此,网络设备可以及时发现第一节点与第二节点之间的最短路径中是否存在故障路径。避免流量通过绕行路径转发,避免带宽浪费以及时延增加,提升网络设备的可用带宽,提升了网络的数据吞吐量。
结合第一方面,在第一方面的一种可能实现方式中,所述第一报文还包括第一标识,所述第一标识指示所述第一报文传输N跳后丢弃,N为正整数,其中,所述第一标识的数值在所述第一报文每传输一跳后减一,当所述第一标识的数值为0时,所述网络设备丢弃所述第一报文。本申请实施例中,通过设置第一报文的最大转发跳数,避免第一报文通过绕行路径转发到达第二节点(即目的节点),使得网络设备根据第一报文,检测目标路径的状态。
结合第一方面,在第一方面的一种可能实现方式中,所述网络设备获取所述目标路径的总跳数;所述网络设备根据所述目标路径的总跳数,确定所述第一标识的数值N,N大于或等于所述目标路径的总跳数。具体的,网络设备获取目标路径的总跳数,换言之,获取目标路径中经过的节点的数量。然后网络设备根据目标路径的总跳数,设计第一报文传输N跳后丢弃,N为正整数,N大于或等于目标路径的总跳数。当第一报文在绕行路径中传输时,由于受到传输N跳后丢弃的限制,在传输途中被中间节点(第N跳对应的中间节点)丢弃。第一报文无法通过绕行路径到达第一报文的目的地(即第二节点),第二节点无法通过绕行路径环回该第一报文至发送端(即头节点)。通过上述方法,网络设备发送该第一报文后,若没有收到环回的第一报文,则网络设备确定目标路径的状态为故障。
结合第一方面,在第一方面的一种可能实现方式中,N可以大于目标路径的总跳数,例如目标路径的总跳数为8,N=10。通过上述设计,使得第一报文可以在绕行程度较小的路径上转发达到段列表指示的目的节点。网络设备可以容忍绕行程度较小的绕行路径,避免频繁的端到端路径切换。
结合第一方面,在第一方面的一种可能实现方式中,当网络设备为头节点,第一节点为头节点,即网络设备为第一节点时。N大于或等于目标路径的总跳数。例如:目标路径的总跳数为5跳。则N大于或等于5。
结合第一方面,在第一方面的一种可能实现方式中,当网络设备为头节点,第一节点为中间节点时。N大于或等于目标路径的总跳数与头节点至第一节点的跳数之和。例如:头节点(网络设备)与第一节点之间的最短路径是3跳,目标路径的总跳数为5跳。则N大于或等于8。
结合第一方面,在第一方面的一种可能实现方式中,所述网络设备获取所述第一报文,包括:所述网络设备获取第二报文,所述第二报文包括所述段列表;所述网络设备在所述第二报文中填充所述第一标识,生成所述第一报文。
具体的,网络设备获取第二报文,该第二报文可视为未填充第一标识的数值的第一报文。然后,网络设备根据目标路径的总跳数,确定N值。网络设备在第二报文中填充第一标识(即第一标识中填充N值),生成第一报文。
结合第一方面,在第一方面的一种可能实现方式中,还包括:所述网络设备对所述第一报文进行承 诺访问速率(committed access rate,CAR)控制,对第一报文的CAR控制指示第一报文单位时间内传输速率的阈值为M,M为正整数。具体的,在网络设备的接口处,通过CAR的配置,对报文进行分类,控制数据流按照特定的速率传输。为了避免第一报文的大量重传,影响其他业务,因此可以对第一报文进行CAR控制,限制第一报文的传输速率。
结合第一方面,在第一方面的一种可能实现方式中,所述第一标识承载于所述第一报文的互联网协议第4版IPv4报文头的生存时间TTL字段,或者,所述第一标识承载于所述第一报文的互联网协议第6版IPv6报文头的跳跃限制Hop limit字段。
结合第一方面,在第一方面的一种可能实现方式中,所述第一报文还包括第二标识,所述第二标识指示所述网络设备检测接收所述第一报文的入接口和发送所述第一报文的出接口是否一致。具体的,网络设备收到携带第二标识的第一报文后,检测第一报文的入接口和第一报文的出接口是否一致。根据第一报文的入接口和第一报文的出接口是否一致,确定丢弃该第一报文。避免第一报文从相同端口转发出去,换言之,避免第一报文通过绕行路径转发到达第二节点(即目的节点)。
结合第一方面,在第一方面的一种可能实现方式中,所述第一报文还包括第二标识,第二标识包括第一报文的出接口。网络设备收到第一报文后,获取第一报文的入接口。然后,网络设备检测第一报文的入接口与第二标识(第一报文的出接口)是否一致。根据第一报文的入接口和第一报文的出接口是否一致,确定丢弃该第一报文。避免第一报文从相同端口转发出去,换言之,避免第一报文通过绕行路径转发到达第二节点(即目的节点)。
结合第一方面,在第一方面的一种可能实现方式中,所述网络设备根据所述段列表转发所述第一报文,包括:所述网络设备根据所述第二标识检测接收所述第一报文的入接口和接收所述第一报文的出接口是否一致;当所述网络设备检测接收所述第一报文的入接口与发送所述第一报文的出接口一致时,所述网络设备丢弃所述第一报文;所述网络设备检测接收第一报文的入接口与发送所述第一报文的出接口不一致时,所述网络设备根据所述段列表转发所述第一报文。
结合第一方面,在第一方面的一种可能实现方式中,所述第二标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。示例性的,标识Flags字段中的特定比特位(例如是第一个比特位)作为第二标识。当标识Flags字段中的特定比特位为1时,网络设备需要检测第一报文的出接口和入接口是否一致,并根据检测结果确定是否丢弃该第一报文;当标识Flags字段中的特定比特位为0时,网络设备按照正常流程转发第一报文,即无需检测第一报文的出接口和入接口是否一致。
结合第一方面,在第一方面的一种可能实现方式中,所述网络设备根据所述第一报文,检测所述目标路径的状态,包括:当所述网络设备接收来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为正常;当所述网络设备未收到来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为故障。
结合第一方面,在第一方面的一种可能实现方式中,所述第一报文为双向转发检测BFD协议报文,或者,所述第一报文为无缝双向转发检测SBFD协议报文。
第二方面,本申请实施例提出一种路径故障检测的方法,包括:
网络设备获取段列表,所述段列表包括第一节点的段标识和第二节点的段标识,所述段列表指示目标路径,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
所述网络设备根据所述段列表和路径状态信息,计算得到第二路径,所述第二路径为所述第一节点至所述第二节点之间不包括故障路径的最短路径,所述路径状态信息指示所述故障路径;
所述网络设备根据所述第二路径,检测所述目标路径的状态。
具体的,网络设备根据段列表确定第一节点和第二节点(或者其他更多的节点)。然后网络设备根据最短路径树(shortest path tree,SPT)计算第一节点和第二节点之间的最短路径,即目标路径。网络设备获取所述路径状态信息。该路径状态信息指示当前网络中各个路径的状态,也就是说该路径状态信息指示故障路径。然后网络设备根据段列表和路径状态信息,计算第一节点和第二节点之间实际可达的路径,该路径也称为第二路径。第二路径为第一节点和第二节点之间不包括故障路径的最短路径。
本申请实施例中,网络设备获取路径状态信息,网络设备根据该路径状态信息检测段列表指示的最短路径的状态。因此,网络设备可以及时发现第一节点与第二节点之间的最短路径中是否存在故障路径。 避免流量通过绕行路径转发,提升网络设备的可用带宽,提升了网络的数据吞吐量。
结合第二方面,在第二方面的一种可能实现方式中,所述网络设备根据所述第二路径,检测所述目标路径的状态,包括:当所述第二路径途径重复的节点时,所述网络设备确定所述目标路径的状态为故障;当所述目标路径不途径重复的节点时,所述网络设备确定所述目标路径的状态为正常。
结合第二方面,在第二方面的一种可能实现方式中,所述网络设备从链路状态数据库(Link State Database,LSDB)和/或分段路由数据库(Segment Routing Database,SRDB)中获取所述路径状态信息。
第三方面,本申请实施例提出一种网络设备,包括:
收发模块,用于网络设备获取第一报文,所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID,所述段列表标识所述第一报文的转发路径,所述段列表包括第一节点的段标识和第二节点的段标识;
所述收发模块,还用于根据所述段列表转发所述第一报文;
处理模块,用于根据所述第一报文,检测目标路径的状态,所述目标路径为所述第一节点与所述第二节点之间的最短路径,所述段列表中标识所述目标路径的段标识指示松散路径。
一种可能实现方式中,所述第一报文还包括第一标识,所述第一标识指示所述第一报文传输N跳后丢弃,N为正整数,其中,所述第一标识的数值在所述第一报文每传输一跳后减一,当所述第一标识的数值为0时,所述网络设备丢弃所述第一报文。
一种可能实现方式中,所述收发模块,还用于获取所述目标路径的总跳数;
所述处理模块,还用于根据所述目标路径的总跳数,确定所述第一标识的数值N,N大于或等于所述目标路径的总跳数。
一种可能实现方式中,所述收发模块,还用于获取第二报文,所述第二报文包括所述段列表;
所述处理模块,还用于在所述第二报文中填充所述第一标识,生成所述第一报文。
一种可能实现方式中,所述处理模块,还用于对所述第一报文进行承诺访问速率CAR控制,所述CAR指示所述第一报文单位时间内传输速率的阈值为M,M为正整数。
一种可能实现方式中,所述第一标识承载于所述第一报文的互联网协议第4版IPv4报文头的生存时间TTL字段,
或者,所述第一标识承载于所述第一报文的互联网协议第6版IPv6报文头的跳跃限制Hop limit字段。
一种可能实现方式中,所述第一报文还包括第二标识,所述第二标识指示所述网络设备检测接收所述第一报文的入接口和发送所述第一报文的出接口是否一致。
一种可能实现方式中,所述处理模块,还用于根据所述第二标识检测接收所述第一报文的入接口和接收所述第一报文的出接口是否一致;
所述收发模块,还用于当所述网络设备检测接收所述第一报文的入接口与发送所述第一报文的出接口一致时,所述网络设备丢弃所述第一报文;
所述收发模块,还用于所述网络设备检测接收第一报文的入接口与发送所述第一报文的出接口不一致时,所述网络设备根据所述段列表转发所述第一报文。
一种可能实现方式中,所述第二标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
一种可能实现方式中,所述处理模块,还用于当所述网络设备接收来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为正常;
所述处理模块,还用于当所述网络设备未收到来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为故障。
一种可能实现方式中,所述第一报文为双向转发检测BFD协议报文,或者,所述第一报文为无缝双向转发检测SBFD协议报文。
第四方面,本申请实施例提出一种通信装置,包括:通信接口;
与所述通信接口连接的处理器;
通信接口,用于网络设备获取第一报文,
所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID,所述段列表标识所述第一报文的转发路径,所述段列表包括第一节点的段标识和第二节点的段标识;
所述通信接口,还用于根据所述段列表转发所述第一报文;
处理器,用于根据所述第一报文,检测目标路径的状态,所述目标路径为所述第一节点与所述第二节点之间的最短路径,所述段列表中标识所述目标路径的段标识指示松散路径。
一种可能实现方式中,所述第一报文还包括第一标识,所述第一标识指示所述第一报文传输N跳后丢弃,N为正整数,其中,所述第一标识的数值在所述第一报文每传输一跳后减一,当所述第一标识的数值为0时,所述网络设备丢弃所述第一报文。
一种可能实现方式中,所述通信接口,还用于获取所述目标路径的总跳数;
所述处理器,还用于根据所述目标路径的总跳数,确定所述第一标识的数值N,N大于或等于所述目标路径的总跳数。
一种可能实现方式中,所述通信接口,还用于获取第二报文,所述第二报文包括所述段列表;
所述处理器,还用于在所述第二报文中填充所述第一标识,生成所述第一报文。
一种可能实现方式中,所述处理器,还用于对所述第一报文进行承诺访问速率CAR控制,所述CAR指示所述第一报文单位时间内传输速率的阈值为M,M为正整数。
一种可能实现方式中,所述第一标识承载于所述第一报文的互联网协议第4版IPv4报文头的生存时间TTL字段,或者,所述第一标识承载于所述第一报文的互联网协议第6版IPv6报文头的跳跃限制Hop limit字段。
一种可能实现方式中,所述第一报文还包括第二标识,所述第二标识指示所述网络设备检测接收所述第一报文的入接口和发送所述第一报文的出接口是否一致。
一种可能实现方式中,
所述处理器,还用于根据所述第二标识检测接收所述第一报文的入接口和接收所述第一报文的出接口是否一致;
所述通信接口,还用于当所述网络设备检测接收所述第一报文的入接口与发送所述第一报文的出接口一致时,所述网络设备丢弃所述第一报文;
所述通信接口,还用于所述网络设备检测接收第一报文的入接口与发送所述第一报文的出接口不一致时,所述网络设备根据所述段列表转发所述第一报文。
一种可能实现方式中,所述第二标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
一种可能实现方式中,所述处理器,还用于当所述网络设备接收来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为正常;
所述处理器,还用于当所述网络设备未收到来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为故障。
一种可能实现方式中,所述第一报文为双向转发检测BFD协议报文,或者,所述第一报文为无缝双向转发检测SBFD协议报文。
第五方面,本申请实施例提出一种网络设备,包括:
收发模块,用于获取段列表,所述段列表包括第一节点的段标识和第二节点的段标识,所述段列表指示目标路径,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
处理模块,用于根据所述段列表和路径状态信息,计算得到第二路径,所述第二路径为所述第一节点至所述第二节点之间不包括故障路径的最短路径,所述路径状态信息指示所述故障路径;
所述处理模块,还用于根据所述第二路径,检测所述目标路径的状态。
一种可能实现方式中,所述处理模块,还用于当所述第二路径途径重复的节点时,确定所述目标路径的状态为故障;
所述处理模块,还用于当所述目标路径不途径重复的节点时,确定所述目标路径的状态为正常。
一种可能实现方式中,所述收发模块,还用于从链路状态数据库(Link State Database,LSDB)和/或分段路由数据库(Segment Routing Database,SRDB)中获取所述路径状态信息。
第六方面,本申请实施例提出一种通信装置,包括:通信接口;
与所述通信接口连接的处理器;
通信接口,用于获取段列表,所述段列表包括第一节点的段标识和第二节点的段标识,所述段列表指示目标路径,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
处理器,用于根据所述段列表和路径状态信息,计算得到第二路径,所述第二路径为所述第一节点至所述第二节点之间不包括故障路径的最短路径,所述路径状态信息指示所述故障路径;
所述处理器,还用于根据所述第二路径,检测所述目标路径的状态。
一种可能实现方式中,所述处理器,还用于当所述第二路径途径重复的节点时,确定所述目标路径的状态为故障;
所述处理器,还用于当所述目标路径不途径重复的节点时,确定所述目标路径的状态为正常。
一种可能实现方式中,所述通信接口,还用于从链路状态数据库(Link State Database,LSDB)和/或分段路由数据库(Segment Routing Database,SRDB)中获取所述路径状态信息。
第七方面,本申请实施例提出一种路径故障检测的方法,包括:
网络设备获取第一报文,所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID;
所述段列表包括目标路径途径的每一个节点的转发信息,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
所述网络设备根据所述段列表转发所述第一报文;
所述网络设备根据所述第一报文检测所述目标路径的状态。
具体的,第一报文的段列表指示第一报文的转发路径,第一报文需要经过第一节点和第二节点。该段列表包括目标路径途径的每一个节点的转发信息,目标路径为第一节点与第二节点之间的最短路径。换言之,该段列表所指示的是一条严格路径。本申请实施例中,网络设备通过转发该第一报文检测目标路径的状态。
需要说明的是,本申请实施例中的网络设备可以是SR policy(或者SRv6policy)中的头节点(后文简称为头节点);也可以是SR policy(或者SRv6policy)中的中间节点(后文简称为中间节点),本申请实施例对此不作限制。
本申请实施例中,第一节点可以是SR policy(或者SRv6policy)中的头节点;第一节点也可以是SR policy(或者SRv6policy)中的中间节点。第二节点可以是SR policy(或者SRv6policy)中的中间节点;第二节点也可以是SR policy(或者SRv6policy)中的尾节点。
一种示例中,本申请实施例中的网络设备为头节点,第一节点为头节点。换言之,本申请实施例中的网络设备与第一节点属于同一个节点(即头节点)。
本申请实施例中的路径也可以称为链路,本申请实施例对此不作限制。
本申请实施例中,网络设备根据第一报文的段列表,按照严格路径转发第一报文。在第一报文的段列表的指示下,第一报文不可能通过第一节点与第二节点之间的松散路径到达第二节点,因此,网络设备可以及时发现第一节点与第二节点之间的最短路径中是否存在故障路径。避免流量通过绕行路径转发,避免带宽浪费以及时延增加,提升网络设备的可用带宽,提升了网络的数据吞吐量。
结合第七方面,在第七方面的一种可能实现方式中,网络设备获取第三报文,所述第三报文的段列表包括依次排列的多个段标识,所述第三报文的段列表用于指示所述第三报文的多条转发路径;
所述网络设备根据所述第三报文的段列表转发所述第三报文。
一种可能的实现方式中,第三报文承载业务数据,换言之第三报文为业务报文。业务报文的段列表指示第三报文的多条转发路径,换言之,业务报文的段列表指示的路径是松散路径。因此,网络设备在转发业务报文时,按照松散路径转发。以保障业务报文顺利到达目的地,保障业务的正常运行。
结合第七方面,在第七方面的一种可能实现方式中,所述转发信息包括:所述节点的段标识,和/或,所述节点的邻接段标识。示例性的,该转发信息可以是所述节点的邻接段标识End.X SID(简称为SIDX)。End.X SID指示节点的出接口,网络设备根据End.X SID确定转发该报文的出接口。
结合第七方面,在第七方面的一种可能实现方式中,所述网络设备根据所述段列表转发所述第一报文,包括:当所述网络设备确定所述段列表中所述网络设备的下一跳不可达,所述网络设备丢弃所述第一报文;当所述网络设备确定所述段列表中所述网络设备的下一跳可达,所述网络设备根据所述段列表 转发所述第一报文。
结合第七方面,在第七方面的一种可能实现方式中,所述第一报文还包括:第三标识,其中,所述第三标识指示所述第一报文不执行快速重路由FRR。具体的,为了进一步确保第一报文按照段列表(该段列表指示严格路径)转发,在第一报文中增加第三标识,该第三标识指示第一报文不执行快速重路由(fast reroute,FRR)。示例性的,该第三标识承载于第一报文的SRH的标识Flags字段。
第八方面,本申请实施例提出一种网络设备,包括:
收发模块,用于获取第一报文,所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID;
所述段列表包括目标路径途径的每一个节点的转发信息,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
收发模块,还用于根据所述段列表转发所述第一报文;
所述处理模块,用于根据所述第一报文检测所述目标路径的状态。
一种可能实现方式中,收发模块,还用于获取第三报文,所述第三报文的段列表包括依次排列的多个段标识,所述第三报文的段列表用于指示所述第三报文的多条转发路径;
收发模块,还用于根据所述第三报文的段列表转发所述第三报文。
一种可能实现方式中,所述转发信息包括:所述节点的段标识,和/或,所述节点的邻接段标识。
一种可能实现方式中,处理模块,还用于当所述网络设备确定所述段列表中所述网络设备的下一跳不可达,丢弃所述第一报文;
处理模块,还用于当所述网络设备确定所述段列表中所述网络设备的下一跳可达,根据所述段列表转发所述第一报文。
一种可能实现方式中,所述第一报文还包括:第三标识,其中,所述第三标识指示所述第一报文转发过程中不执行快速重路由FRR。
一种可能实现方式中,所述第三标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
第九方面,本申请实施例提出一种通信装置,包括:通信接口;
与所述通信接口连接的处理器;
通信接口,用于获取第一报文,所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID;
所述段列表包括目标路径途径的每一个节点的转发信息,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
通信接口,还用于根据所述段列表转发所述第一报文;
所述处理器,用于根据所述第一报文检测所述目标路径的状态。
一种可能实现方式中,
通信接口,还用于获取第三报文,所述第三报文的段列表包括依次排列的多个段标识,所述第三报文的段列表用于指示所述第三报文的多条转发路径;
通信接口,还用于根据所述第三报文的段列表转发所述第三报文。
一种可能实现方式中,所述转发信息包括:所述节点的段标识,和/或,所述节点的邻接段标识。
一种可能实现方式中,处理器,还用于当所述网络设备确定所述段列表中所述网络设备的下一跳不可达,丢弃所述第一报文;
处理器,还用于当所述网络设备确定所述段列表中所述网络设备的下一跳可达,根据所述段列表转发所述第一报文。
一种可能实现方式中,所述第一报文还包括:第三标识,其中,所述第三标识指示所述第一报文转发过程中不执行快速重路由FRR。
一种可能实现方式中,所述第三标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
第十方面,提供了一种通信系统,通信系统包括如第三方面的网络设备或第四方面的通信装置。
第十一方面,提供了一种通信系统,通信系统包括如第五方面的网络设备或第六方面的通信装置。
第十二方面,提供了一种通信系统,通信系统包括如第八方面的网络设备或第九方面的通信装置。
本申请第十三方面提供一种计算机存储介质,该计算机存储介质可以是非易失性的;该计算机存储介质中存储有计算机可读指令,当该计算机可读指令被处理器执行时实现第一方面、第二方面或者第七方面中任意一种实现方式中的方法。
本申请第十四方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第一方面或第二方面或者第七方面中任意一种实现方式中的方法。
本申请第十五方面提供一种芯片系统,该芯片系统包括处理器和接口电路,用于支持网络设备实现上述方面中所涉及的功能,例如,发送或处理上述方法中所涉及的数据和/或信息。在一种可能的设计中,芯片系统还包括存储器,存储器,用于保存网络设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
附图说明
图1为SBFD示意图;
图2为本申请实施例中报文格式的示例图;
图3为一种通信场景示意图;
图4为本申请实施例中一种路径故障检测的方法的实施例示意图;
图5为本申请实施例中一种路径故障检测的方法的实施例示意图;
图6为本申请实施例中又一种通信场景示意图;
图7为IPv4报文头的结构示意图;
图8为IPv6报文头的结构示意图;
图9为本申请实施例中一种应用场景示意图;
图10为本申请实施例中一种应用场景示意图;
图11为本申请实施例中第一报文的结构示意图;
图12为本申请实施例中第一报文的结构示意图;
图13为本申请实施例中一种应用场景示意图;
图14为本申请实施例提供的一种通信装置1400的结构示意图;
图15为本申请实施例提供的一种通信装置1500的结构示意图;
图16为本申请实施例提供的一种通信装置1600的结构示意图;
图17为本申请实施例提出的一种网络系统1700示意图。
具体实施方式
下面,对本申请实施例进行描述。显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的描述在适当情况下可以互换,以便使实施例能够以除了在本申请图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行顺序,只要能达到相同或者相类似的技术效果即可。本申请中所出现的单元的划分,是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个单元可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元之间的间接耦合或通信连接可以是电性或其他类似的形式,本申请中均不作限定。并且,作为分离部件说明的单元或子单元可以是也可以不是物理上的分离, 可以是也可以不是物理单元,或者可以分布到多个电路单元中,可以根据实际的需要选择其中的部分或全部单元来实现本申请方案的目的。
首先,介绍本申请实施例涉及的一些技术概念。
1、分段路由(segment routing,SR):
是基于源路由的理念而设计的在网络中转发数据包的一种协议。SR将网络路径划分为一个个段,并且为这些段和网络节点分配分段标识(segment id,SID),通过对SID进行有序排列,可以得到段列表(SID List,在SR-MPLS中也称标签栈),SID List可以指示一条转发路径。通过SR技术,可以指定携带了SID List的数据包经过的节点以及路径,从而满足流量调优的要求。做一个类比,数据包可以比作行李,SR可以比作行李上贴的标签,如果要将行李从A地区发送到D地区,途径B地区和C地区,则可以在始发地A地区给行李贴上一个标签“先到B地区,再到C地区,最后到D地区”,这样一来,各个地区只需识别行李上的标签,依据行李的标签将行李从一个地区转发至另一个地区即可。在SR技术中,头节点会向数据包添加标签,中间节点可以根据标签转发至下一个节点,直至数据包到达目的节点。例如在数据包的包头中,插入<SID1,SID2,SID3>,则数据包packet会首先转发给SID1对应的节点,之后转发给SID2对应的节点,之后转发给SID3对应的节点。其中,SR-MPLS的中英文全称为分段路由多协议标签交换(segment routing multi-protocol label switching)。
2、基于互联网协议第6版(Internet Protocol Version 6,IPv6)的分段路由(SR v6):
是指将SR技术应用在IPv6网络中。使用IPv6地址(128bits)作为SID的表现形式。在转发数据包时,支持SRv6的网络设备会按照数据包中的目的地址((destination address,DA),查询本地段标识表(local sid table),当数据包的目的地址与本地段标识表中的任一SID最长匹配时,则按照本地段标识表中的SID相关的策略,执行该策略对应的操作,例如,可以将数据包从SID对应的出接口转发出去;如果数据包的目的地址与本地段标识表中的每个SID均不最长匹配,则再查IPv6的转发表,按照IPv6的转发表进行最长匹配转发。
在SRv6网络中,IPv6报文的DA字段的值是一个不断变换的,它的取值由SL和Segment List共同决定,当指针SL指向一个当前待处理的段,例如指向Segment List[2]时,需要将Segment List[2]的IPv6地址复制到DA字段。
在转发层面,如果节点支持SR,且该节点的段标识出现在了IPv6报文中的目的地址中,那么该节点在收到报文后,可以将SL进行减1操作,将指针偏移向新的段,并且将SL减一后对应的段标识(即IPv6地址格式)复制到DA字段,再向下一个节点转发报文。通常,当SL字段减为0时,节点可以弹出SRH报文头,然后对报文进行下一步处理。如果节点不支持SR,那么就不需要处理IPv6报文里面的SRH信息,仅依据IPv6目的地址字段,查找IPv6路由表,进行普通的IPv6转发即可。
SR策略(sr policy)是一种SR的流量工程机制。通常,一个SR Policy包括头节点(headend)、颜色标识(color)以及目的标识(endpoint),以及指示转发路径的段标识列表。其中,Headend用于标识执行SR Policy的头节点,Color用于SR与业务属性相关联,例如与低时延、高带宽等业务属性相关联,以概括该SR Policy的服务能力,Endpoint用于标识SR Policy的目的地址。通常,通过(headend,color,endpoint)在确定一条SR Policy。对同一个headend来说,其也可以通过(color,endpoint)来确定一条Policy。SR policy可以包括一个或多个段标识列表,以实现负载均衡,多路径备份等工能。头节点在转发报文时,可以根据该SR policy确定报文对应的段标识列表,从而确定转发该报文的转发路径,并将该段标识列表封装到报文中以显示或分散的指示路径。
路由前缀:由IP地址和子网掩码构成。在IPv6网络中,该子网掩码的长度可以为128位,或小于128位。在一个示例中,该路由前缀的写法可以为:A1::1/32或A1::1/128,其中,A1::1为一个IP地址,32或128表明该子网掩码的长度。
子网前缀:由IP地址和子网掩码构成,表示一个子网,在IPv6网络中,该子网掩码的长度小于128位。在一个示例中,该子网前缀的写法可以为:A1::1/32或A1::1/64,其中,A1::1为一个IP地址,32或64表明该子网掩码的长度。
3、报文格式:
本申请实施例中报文的格式,包括但不限于:IP报文头、段路由扩展头(segment routing header, SRH)、可选的类型长度值对象(Optional Tag Length Value objects),和报文负载(payload),其中,类型长度值(Tag Length Value,TLV)为SRH头中的可选(optional)变量(variable),报文负载用于搭载报文的数据。
为了便于理解,请参阅图2,图2为本申请实施例中报文格式的一种示意图。具体的,本申请实施例中的报文由IP报文头、SRH、可选的TLV对象,和报文负载组成。IP报文头可以是IPv6报文头。可以理解的是,IP报文头也可以是IPv4报文头。
为了基于IPv6转发平面实现SRv6,新增加一种IPv6扩展头,称作段路由扩展头SRH,该SRH指定一个IPv6的显式路径,存储的是IPv6的Segment List信息,其作用与SR MPLS里的Segment List一样。头节点在IPv6报文增加一个SRH扩展头,中间节点就可以按照SRH扩展头里包含的路径信息转发。具体地,在SRH中有两个关键信息,一个是IPv6地址形式的段列表(Segment List),类似于多协议标签交换(multi-protocol label switching,MPLS)网络中的标签栈信息,由有序排列的多个段标识(segment id,SID)构成的Segment List用于指示SR里的显式路径;另外一个则是剩余段(segment left,SL),SL是一个指针,用于指示当前的段标识。
段列表(segment list)字段,用于搭载该报文需要经过的中间节点的信息或目的节点的信息。可以理解的是,Segment List[0]一般为目的节点的信息。可以理解的是,节点首先可以读取SL的值,然后根据SL的值读取相应的Segment List。示例性的,节点读取到SL的值为1,则节点将会读取Segment List[1]。报文中的SL和Segment List配合可以使得报文在转发过程中,通过SL的变更来更新当前报文需要到达的下一个中间节点。
在实际应用中,该报文实际上还包括一些现有的字段,为简要描述,本申请实施例对此省略,不再赘述。该报文还可以包括其他字段,以实现其他功能,本申请实施例对此不做限定。
下面介绍当前BFD或者SBFD在网络存在故障路径情况下,如何检测路径。请参阅图3,图3为一种通信场景示意图。以PE1节点作为发起端发送控制报文为例进行说明。示例性的,该控制报文的段列表指示路径“(SID1、SID2、SID3)”,其中,SID1对应P1节点(后文简称为P1)、SID2对应P2节点(后文简称为P2),SID3对应PE2节点(后文简称为PE2)。当网络正常情况下,也就是P1节点与P2节点之间的路径正常的情况下,该控制报文从PE1发出后,在段列表“(SID1、SID2、SID3)”的指示下走最短路径到达PE2,也就是说该控制报文途径PE1、P3、P1、P2、P8和PE2到达PE2。然后PE2作为反射端,向PE1环回该控制报文。若PE1接收到来自PE2的控制报文,则PE1确定段列表“(SID1、SID2、SID3)”指示的路径为正常。
在某些情况下,上述最短路径(PE1-P3-P1-P2-P8-PE2)中的部分路径发生故障。例如图3示意的,P1与P2之间的路径发生故障。此时,PE1发出的控制报文在段列表的指示下,到达P1。然后P1根据该控制报文的段列表的指示,将该控制报文通过其他路径发送至PE2。具体的,控制报文途径PE1→P3→P1→P3→PE1→P4→P5→P6→P7→PE2→P8→P2→P8→PE2,最终到达PE2,该路径也称为绕行路径。上述绕行路径同样满足该控制报文的段列表的指示。PE2接收该控制报文后,PE2作为反射端,向PE1环回该控制报文。该环回的控制报文走相同的绕行路径到达PE1(PE1←P3←P1←P3←PE1←P4←P5←P6←P7←PE2←P8←P2←P8←PE2)。由于PE1收到来自PE2环回的控制报文,因此PE1确定段列表“(SID1、SID2、SID3)”指示的路径为正常。而实际上段列表“(SID1、SID2、SID3)”指示的最短路径(PE1、P3、P1、P2、P8、PE2)中存在故障路径(P1~P2)。因此,PE1无法检测到故障路径。流量依然通过绕行路径转发,占用额外带宽,降低网络的数据吞吐量。
基于此,本申请实施例提出一种路径故障检测的方法,包括:网络设备获取第一报文,所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID,所述段列表标识所述第一报文的转发路径,所述段列表包括第一节点的段标识和第二节点的段标识;所述网络设备根据所述段列表转发所述第一报文;所述网络设备根据所述第一报文,检测目标路径的状态,所述目标路径为所述第一节点与所述第二节点之间的最短路径,所述段列表中标识所述目标路径的段标识指示松散路径。网络设备根据第一报文可以检测段列表指示的最短路径,因此,网络设备可以及时发现第一节点与第二节点之间的最短路径中是否存在故障路径。避免流量通过绕行路径转发,提升网络设备的可用带宽,提升了网络的数据吞吐量。
下面,介绍本申请实施例,本申请实施例中具体提出了两种方式检测段列表指示的最短路径(本申请实施例称为目标路径)的状态。具体包括:
A、网络设备转发第一报文,并根据是否接收到第一报文环回的报文,确定第一报文的段列表对应的路径(即目标路径)是否故障;
B、网络设备根据路径状态信息,确定目标路径是否故障。
需要说明的是,本申请实施例中的网络设备可以是SR policy(或者SRv6policy)中的头节点(后文简称为头节点),例如图3中的PE1节点;也可以是SR policy(或者SRv6policy)中的中间节点(后文简称为中间节点),例如图3中P1节点、P2节点、P3节点或者P8节点等,本申请实施例对此不作限制。本申请实施例中的路径也可以称为链路,本申请实施例对此不作限制。
首先介绍A、网络设备转发第一报文,并根据是否接收到第一报文环回的报文,确定第一报文的段列表对应的路径(即目标路径)是否故障。请参阅图4,图4为本申请实施例中一种路径故障检测的方法的实施例示意图。本申请实施例提出的一种路径故障检测的方法包括:
401、网络设备获取第一报文,第一报文包括段列表,该段列表包括第一节点的段标识和第二节点的段标识。
本实施例中,当网络设备为头节点时,网络设备获取第一报文包括:网络设备生成第一报文;当网络设备为中间节点时,网络设备获取第一报文包括:网络设备接收来自上一跳节点发送的第二报文,然后对第二报文进行处理得到第一报文。
第一报文是一种用于检测路径状态的报文。示例性的,所述第一报文为双向转发检测BFD协议报文,或者,所述第一报文为无缝双向转发检测SBFD协议报文。例如:BFD中的检测报文(或者控制报文),又例如:SBFD中的检测报文(或者控制报文)。第一报文包括段列表,该段列表包括依次排列的多个段标识SID,该段列表用于指示第一报文的转发路径,该段列表包括第一节点的段标识和第二节点的段标识。换言之,该段列表指示第一节点至第二节点之间的路径。示例性的,第一报文的一种可能报文结构如图2所示。
第一报文包括的段列表中,标识所述目标路径的段标识指示松散路径。换言之,段列表中标识所述目标路径的段标识指示第一节点和第二节点之间可能存在多条路径用于转发报文。松散路径指的是段列表的段标识未严格指示报文需要经过的所有节点。例如:段列表包括的段标识为SID1(P1节点)、SID2(P2节点)和SID3(PE2节点),携带该段列表的报文可以经过PE1、P3、P1、P2、P8节点到达PE2节点,也可以经过PE1、P3、P1、P2、P1、P3、PE1、P4、P5、P6、P7节点到达PE2节点,该段列表包括的段标识(SID1、SID2和SID3)指示松散路径。
可以理解的是,第一报文包括的段列表中,还可以包括其他节点的段标识。例如图3示意的,第一报文包括的段列表具体包括:SID1(P1节点)、SID2(P2节点)和SID3(PE2节点)。则网络设备根据该段列表(SID1、SID2和SID3)转发该第一报文,理论上第一报文需要经过P1节点、P2节点和PE2节点。
具体的,由于本实施例中第一报文存在多种实现方案,下面分别介绍。
A1、设计第一报文的最大转发跳数,当第一报文经过的节点数达到第一报文的最大转发跳数时,网络设备丢弃该第一报文。
具体的,网络设备获取目标路径的总跳数,换言之,获取目标路径中经过的节点的数量。然后网络设备根据目标路径的总跳数,设计第一报文传输N跳后丢弃,N为正整数,N大于或等于目标路径的总跳数。当第一报文在绕行路径中传输时,由于受到传输N跳后丢弃的限制,在传输途中被中间节点(第N跳对应的中间节点)丢弃。第一报文无法通过绕行路径到达第一报文的目的地(即第二节点),第二节点无法通过绕行路径环回该第一报文至发送端(即头节点)。通过上述方法,网络设备发送该第一报文后,若没有收到环回的第一报文,则网络设备确定目标路径的状态为故障。
一种可能的实现方式中,第一报文还包括第一标识,该第一标识指示第一报文传输N跳后丢弃,N为正整数,第一标识的数值在第一报文每传输一跳后减一,当第一标识的数值为0时,网络设备丢弃第一报文。
可选的,所述第一标识承载于所述第一报文的互联网协议第4版IPv4报文头的生存时间TTL字段。例如图7所示,图7为IPv4报文头的结构示意图。第一标识可以承载于TTL字段。
可选的,所述第一标识承载于所述第一报文的互联网协议第6版IPv6报文头的跳跃限制Hop limit字段。例如图8所示,图8为IPv6报文头的结构示意图。第一标识可以承载于Hop limit字段。
需要说明的是,第一标识还可以位于第一报文的其他字段,本申请实施例对此不作限制。
一种可能的实现方式中,网络设备获取目标路径的总跳数,然后网络设备根据目标路径的总跳数,确定第一标识的数值N,N大于或等于目标路径的总跳数。
可选的,本申请实施例中,N可以大于目标路径的总跳数,例如目标路径的总跳数为8,N=10。通过上述设计,使得第一报文可以在绕行程度较小的路径上转发达到段列表指示的目的节点。网络设备可以容忍绕行程度较小的绕行路径,避免频繁的端到端路径切换。
具体的,网络设备获取第二报文,该第二报文可视为未填充第一标识的数值的第一报文。然后,网络设备根据目标路径的总跳数,确定N值。网络设备在第二报文中填充第一标识(即第一标识中填充N值),生成第一报文。
进一步的,网络设备还可以对携带第一标识的第一报文进行承诺访问速率(committed access rate,CAR)控制,对第一报文的CAR控制指示第一报文单位时间内传输速率的阈值为M,M为正整数。具体的,在网络设备的接口处,通过CAR的配置,对报文进行分类,控制数据流按照特定的速率传输。为了避免第一报文的大量重传,影响其他业务,因此可以对第一报文进行CAR控制,限制第一报文的传输速率。
A2、网络设备转发第一报文时,根据第一报文的出接口和第一报文的入接口,确定是否丢弃第一报文。
具体的,网络设备转发第一报文时,检测第一报文的出接口和入接口。然后,网络设备根据第一报文的出接口和第一报文的入接口是否一致,确定是否丢弃第一报文。
当第一报文的出接口和第一报文的入接口一致时,网络设备丢弃第一报文。示例性的,请参阅图9,图9为本申请实施例中一种应用场景示意图。以网络设备是P1节点为例,P1节点与P2节点之间的路径故障。当P1节点接收来自P3节点的报文后,P1节点检测该报文的入接口和出接口是否一致。由于P1节点与P2节点之间的路径故障,因此P1节点需要将报文从P3节点转发出去。该报文在P1节点的入接口和出接口都是接口A,因此,P1节点丢弃该报文。
当第一报文的出接口和第一报文的入接口不一致时,网络设备根据第一报文包括的段列表转发第一报文。示例性的,请参阅图10,图10为本申请实施例中一种应用场景示意图。以网络设备是P1节点为例,当P1节点接收来自P3节点的报文后,P1节点检测该报文的入接口和出接口是否一致。由于P1节点与P2节点之间的路径正常,因此P1节点按照报文段列表的指示将报文从P2节点转发出去。该报文在P1节点的入接口是接口A,该报文在P1节点的出接口是接口B,因此,P1节点正常转发该报文。
一种可能的实现方式中,第一报文还包括第二标识,所述第二标识指示所述网络设备检测接收所述第一报文的入接口和发送所述第一报文的出接口是否一致。
可选的,所述第二标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。为了便于理解,请参阅图11,图11为本申请实施例中第一报文的结构示意图。示例性的,标识Flags字段中的特定比特位(例如是第一个比特位)作为第二标识。当标识Flags字段中的特定比特位为1时,网络设备需要检测第一报文的出接口和入接口是否一致,并根据检测结果确定是否丢弃该第一报文;当标识Flags字段中的特定比特位为0时,网络设备按照正常流程转发第一报文,即无需检测第一报文的出接口和入接口是否一致。
需要说明的是,本申请实施例中第二标识还可以位于第一报文的其他字段中,本申请实施例对此不作限制。
A3、设计第一报文的段列表,使得第一报文严格按照段列表指示的路径转发。
具体的,当网络设备需要检测某一条路径(例如图3中的路径P1-P2-PE2)的路径状态时,首先,网络设备根据最短路径树(shortest path tree,SPT)计算经过该路径的多个节点的最短路径。然后,网络设备确定该最短路径所经过的每一个节点的段标识SID。网络设备生成第一报文的段列表,该段列表包括目标路径(即最短路径)途径的每一个节点的段标识。换言之,网络设备根据松散路径(松散路 径指的是未严格限制报文所经过的每一个节点的路径),确定严格路径(严格路径指的是严格限制报文所经过的每一个节点的路径)。然后将严格路径(即目标路径途径的每一个节点的转发信息)填充至第一报文的段列表,该段列表该指导第一报文的转发。
可选的,网络设备根据链路状态数据库(Link State Database,LSDB)和/或分段路由数据库(Segment Routing Database,SRDB)生成目标路径。
可选的,第一报文的段列表包括目标路径途径的每一个节点的转发信息。该转发信息包括节点的段标识(SID)和节点的出接口,或者,该转发信息包括节点的出接口,或者,该转发信息包括节点的段标识。
示例性的,以图13为例,图13为本申请实施例中一种应用场景示意图。PE1节点(作为网络设备)检测路径P1(SID1)-P2(SID2)-PE2(SID3)的状态,PE1节点根据路径P1(SID1)-P2(SID2)-PE2(SID3),生成途径P1、P2和PE2的最短路径,即目标路径。PE1节点确定目标路径中每一个节点的转发信息,该转发信息可以是End.X SID(简称为SIDX)。End.X SID指示节点的出接口,网络设备根据End.X SID确定转发该报文的出接口。PE1节点生成第一报文的段列表,该段列表具体包括:SIDX1(指示PE1节点的出接口)、SIDX2(指示P3节点的出接口)、SIDX3(指示P1节点的出接口)、SIDX4(指示P2节点的出接口)和SIDX5(指示P8节点的出接口)。该段列表指示报文按照路径PE1-P3-P1-P2-P8-PE2转发到达PE2节点。
在一种可能的实现方式中,为了进一步确保第一报文按照段列表(该段列表指示严格路径)转发,在第一报文中增加第三标识,该第三标识指示第一报文不执行快速重路由(fast reroute,FRR)。示例性的,该第三标识承载于第一报文的SRH的标识Flags字段。例如图12的示意,图12为本申请实施例中第一报文的结构示意图。需要说明的是,第三标识还可以位于第一报文的其他字段,本申请实施例对此不作限制。
402、网络设备根据段列表,转发第一报文。
对应于第一报文的不同实现方案,下面分别介绍。
A1、设计第一报文的最大转发跳数,当第一报文经过的节点数达到第一报文的最大转发跳数时,网络设备丢弃该第一报文。具体的,网络设备根据第一报文包括的第一标识,确定是否继续转发该第一报文。当第一标识的数值N等于0时,即第一标识的指示该第一报文传输0跳后丢弃,则网络设备丢弃该第一报文。当第一标识的数值大于0,则网络设备根据段列表,正常转发该第一报文。
示例性的,请参阅图6,图6为本申请实施例中又一种通信场景示意图。以PE1节点发送第一报文为例进行说明。该第一报文的段列表包括:SID1、SID2和SID3,其中,SID1对应P1节点,SID2对应P2节点,SID3对应PE2节点。PE1节点按照该段列表转发第一报文。该第一报文中第一标识的值(即TTL)为5,该第一标识指示第一报文传输5跳节点后丢弃。
第一报文从PE1节点出发,到达P3节点,则第一标识的值减一(TTL=4)。第一报文到达P1节点。P1节点与P2节点之间的路径故障。因此,P1节点向P3节点转发该第一报文,第一标识的值减一(TTL=3),以此类推,当第一报文转发至P5节点时,由于TTL=0,因此P5节点丢弃该第一报文。PE2节点无法收到来自PE1节点的第一报文,因此,PE1节点无法收到环回的第一报文(即来自PE2节点的环回的第一报文)。PE1节点通过第一报文确定目标路径(即段列表SID1、SID2和SID3对应的最短路径)为故障路径。
A2、网络设备在实际转发第一报文前,检测第一报文的出接口与第一报文的入接口是否一致。当第一报文的出接口与第一报文的入接口一致,则网络设备丢弃第一报文;当第一报文的出接口与第一报文的入接口不一致,则网络设备按照第一报文的段列表转发第一报文。
A3、网络设备根据第一报文的段列表转发第一报文。当所述网络设备确定所述段列表中所述网络设备的下一跳不可达,所述网络设备丢弃所述第一报文;当所述网络设备确定所述段列表中所述网络设备的下一跳可达,所述网络设备根据所述段列表转发所述第一报文。
403、网络设备根据第一报文,检测目标路径的状态,目标路径为第一节点和第二节点之间的最短路径。
本实施例中,网络设备根据第一报文检测目标路径的状态,目标路径为第一节点和第二节点之间的 最短路径。例如,图3中段列表“(SID1、SID2、SID3)”指示的最短路径为“PE1-P3-P1-P2-P8-PE2”,当第一报文携带的段列表为“(SID1、SID2、SID3)”,目标路径为“PE1-P3-P1-P2-P8-PE2”。
一种可能的实现方式中,网络设备为头节点。网络设备根据第一报文的段列表转发第一报文后,未收到环回的第一报文,则网络设备确定目标路径的状态为故障路径。当网络设备根据第一报文的段列表转发第一报文后,收到环回的第一报文,则网络设备确定目标路径的状态为正常路径。
另一种可能的实现方式中,网络设备为中间节点。网络设备在转发报文前,确定转发的报文是否是第一报文,也就是说网络设备确定转发的报文是否用于检测目标路径的状态。若转发的报文是第一报文,且网络设备丢弃该第一报文,则网络设备通知头节点目标路径的状态为异常。
本申请实施例中,网络设备根据第一报文可以检测段列表指示的最短路径,因此,网络设备可以及时发现第一节点与第二节点之间的最短路径中是否存在故障路径。避免流量通过绕行路径转发,提升网络设备的可用带宽,提升了网络的数据吞吐量。
其次,介绍B、网络设备根据路径状态信息,确定目标路径是否故障。请参阅图5,图5为本申请实施例中一种路径故障检测的方法的实施例示意图。本申请实施例提出的一种路径故障检测的方法包括:
501、网络设备获取段列表,该段列表包括第一节点的段标识和第二节点的段标识,该段列表指示目标路径。
本实施例中,网络设备根据段列表,确定目标路径。具体如下:网络设备根据段列表确定第一节点和第二节点(或者其他更多的节点)。然后网络设备根据最短路径树(shortest path tree,SPT)计算第一节点和第二节点之间的最短路径,即目标路径。
502、网络设备根据段列表和路径状态信息,计算得到第二路径,第二路径为第一节点和第二节点之间不包括故障路径的最短路径,路径状态信息指示故障路径。
本实施例中,网络设备从链路状态数据库(Link State Database,LSDB)和/或分段路由数据库(Segment Routing Database,SRDB)中获取所述路径状态信息。该路径状态信息指示当前网络中各个路径的状态,也就是说该路径状态信息指示故障路径。然后网络设备根据段列表和路径状态信息,计算第一节点和第二节点之间实际可达的路径,该路径也称为第二路径。第二路径为第一节点和第二节点之间不包括故障路径的最短路径。
503、网络设备根据第二路径检测目标路径的状态。
本实施例中,具体的,当所述第二路径经过重复的节点时,所述网络设备确定所述目标路径的状态为故障;当所述目标路径不经过重复的节点时,所述网络设备确定所述目标路径的状态为正常。
一种可能的实现方式中,由头节点执行上述步骤501-503。在又一种可能的实现方式中,为了避免头节点(例如图3中的PE1节点)计算工作量过大,目标路径上的任一个或多个中间节点也可以作为根执行算路,即中间节点执行上述步骤501-503。
本申请实施例中,网络设备从链路状态数据库LSDB和/或分段路由数据库SRDB中获取路径状态信息,网络设备根据该路径状态信息检测段列表指示的最短路径的状态。因此,网络设备可以及时发现第一节点与第二节点之间的最短路径中是否存在故障路径。避免流量通过绕行路径转发,提升网络设备的可用带宽,提升了网络的数据吞吐量。
上述主要以方法的角度对本申请实施例提供的方案进行了介绍。可以理解的是,网络设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对网络设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
以下介绍本申请实施例的通信装置,以下介绍的通信装置具有上述方法实施例中的网络设备的任意功能。
图14为本申请实施例提供的一种通信装置1400的结构示意图。如图14所示,一种可能的实现方式中,通信装置1400包括:收发模块1401,用于执行步骤401和402;处理模块1402,用于执行步骤403。又一种可能的实现方式中,收发模块1401,用于执行步骤502和503;处理模块1402,用于执行步骤501。
一种示例中,收发模块1401,用于网络设备获取第一报文,
所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID,所述段列表标识所述第一报文的转发路径,所述段列表包括第一节点的段标识和第二节点的段标识;
所述收发模块1401,还用于根据所述段列表转发所述第一报文;
处理模块1402,用于根据所述第一报文,检测目标路径的状态,所述目标路径为所述第一节点与所述第二节点之间的最短路径,所述段列表中标识所述目标路径的段标识指示松散路径。
一种可能实现方式中,所述第一报文还包括第一标识,所述第一标识指示所述第一报文传输N跳后丢弃,N为正整数,
其中,所述第一标识的数值在所述第一报文每传输一跳后减一,当所述第一标识的数值为0时,所述网络设备丢弃所述第一报文。
一种可能实现方式中,所述收发模块1401,还用于获取所述目标路径的总跳数;
所述处理模块1402,还用于根据所述目标路径的总跳数,确定所述第一标识的数值N,N大于或等于所述目标路径的总跳数。
一种可能实现方式中,所述收发模块1401,还用于获取第二报文,所述第二报文包括所述段列表;
所述处理模块1402,还用于在所述第二报文中填充所述第一标识,生成所述第一报文。
一种可能实现方式中,所述处理模块1402,还用于对所述第一报文进行承诺访问速率CAR控制,所述CAR指示所述第一报文单位时间内传输速率的阈值为M,M为正整数。
一种可能实现方式中,所述第一标识承载于所述第一报文的互联网协议第4版IPv4报文头的生存时间TTL字段,或者,所述第一标识承载于所述第一报文的互联网协议第6版IPv6报文头的跳跃限制Hop limit字段。
一种可能实现方式中,所述第一报文还包括第二标识,所述第二标识指示所述网络设备检测接收所述第一报文的入接口和发送所述第一报文的出接口是否一致。
一种可能实现方式中,所述处理模块1402,还用于根据所述第二标识检测接收所述第一报文的入接口和接收所述第一报文的出接口是否一致;
所述收发模块1401,还用于当所述网络设备检测接收所述第一报文的入接口与发送所述第一报文的出接口一致时,所述网络设备丢弃所述第一报文;
所述收发模块1401,还用于所述网络设备检测接收第一报文的入接口与发送所述第一报文的出接口不一致时,所述网络设备根据所述段列表转发所述第一报文。
一种可能实现方式中,所述第二标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
一种可能实现方式中,所述处理模块1402,还用于当所述网络设备接收来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为正常;
所述处理模块1402,还用于当所述网络设备未收到来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为故障。
一种可能实现方式中,所述第一报文为双向转发检测BFD协议报文,或者,所述第一报文为无缝双向转发检测SBFD协议报文。
又一种示例中,收发模块1401,用于获取段列表,所述段列表包括第一节点的段标识和第二节点的段标识,所述段列表指示目标路径,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
处理模块1402,用于根据所述段列表和路径状态信息,计算得到第二路径,所述第二路径为所述第一节点至所述第二节点之间不包括故障路径的最短路径,所述路径状态信息指示所述故障路径;
所述处理模块1402,还用于根据所述第二路径,检测所述目标路径的状态。
一种可能实现方式中,所述处理模块1402,还用于当所述第二路径途径重复的节点时,确定所述目标路径的状态为故障;
所述处理模块1402,还用于当所述目标路径不途径重复的节点时,确定所述目标路径的状态为正常。
一种可能实现方式中,所述收发模块1401,还用于从链路状态数据库(Link State Database,LSDB)和/或分段路由数据库(Segment Routing Database,SRDB)中获取所述路径状态信息。
又一种示例中,收发模块1401,用于获取第一报文,所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID;
所述段列表包括目标路径途径的每一个节点的转发信息,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
收发模块1401,还用于根据所述段列表转发所述第一报文;
所述处理模块1402,用于根据所述第一报文检测所述目标路径的状态。
一种可能实现方式中,收发模块1401,还用于获取第三报文,所述第三报文的段列表包括依次排列的多个段标识,所述第三报文的段列表用于指示所述第三报文的多条转发路径;
收发模块1401,还用于根据所述第三报文的段列表转发所述第三报文。
一种可能实现方式中,所述转发信息包括:所述节点的段标识,和/或,所述节点的邻接段标识。
一种可能实现方式中,处理模块1402,还用于当所述网络设备确定所述段列表中所述网络设备的下一跳不可达,丢弃所述第一报文;
处理模块1402,还用于当所述网络设备确定所述段列表中所述网络设备的下一跳可达,根据所述段列表转发所述第一报文。
一种可能实现方式中,所述第一报文还包括:第三标识,其中,所述第三标识指示所述第一报文转发过程中不执行快速重路由FRR。
一种可能实现方式中,所述第三标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
通信装置1400可以对应于上述方法实施例中的网络设备,通信装置1400中的各单元和上述其他操作和/或功能分别为了实现方法实施例中的网络设备所实施的各种步骤和方法,具体细节可参见上述方法实施例,为了简洁,在此不再赘述。
通信装置1400执行上述方法实施例时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将通信装置1400的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的通信装置1400与上述图4或5对应的实施例方法属于同一构思,其具体实现过程详见上述方法实施例,这里不再赘述。
为了实现上述实施例,本申请还提供了一种通信装置。可以参阅图15,图15为本申请实施例提供的一种通信装置1500的结构示意图。
图15所示的通信装置1500尽管示出了某些特定特征,但是本领域的技术人员将从本申请实施例中意识到,为了简洁起见,图15未示出各种其他特征,以免混淆本申请实施例所公开的实施方式的更多相关方面。为此,作为示例,在一些实现方式中,通信装置1500包括一个或多个处理单元(如,CPU)1501、网络接口1502、编程接口1503、存储器1504和一个或多个通信总线1505,用于将各种组件互连。在另一些实现方式中,通信装置1500也可以在上述示例基础上省略或增加部分功能部件或单元。
在一些实现方式中,网络接口1502用于在网络系统中和一个或多个其他的通信装置/服务器连接。在一些实现方式中,通信总线1505包括互连和控制系统组件之间的通信的电路。存储器1504可以包括非易失性存储器,例如,只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。存储器1504也可以包括易失性存储器,易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。
在一些实现中,存储器1504或存储器1504的非暂时性计算机可读存储介质存储以下程序、模块和数据结构,或其子集,例如包括收发单元15041和处理单元15042。
在一个可能的实施例中,该通信装置1500可以具有上述图4或5对应的方法实施例中的网络设备中的任意功能。
一种示例中,网络接口1502,用于网络设备获取第一报文,
所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID,所述段列表标识所述第一报文的转发路径,所述段列表包括第一节点的段标识和第二节点的段标识;
所述网络接口1502,还用于根据所述段列表转发所述第一报文;
CPU1501,用于根据所述第一报文,检测目标路径的状态,所述目标路径为所述第一节点与所述第二节点之间的最短路径,所述段列表中标识所述目标路径的段标识指示松散路径。
一种可能实现方式中,所述第一报文还包括第一标识,所述第一标识指示所述第一报文传输N跳后丢弃,N为正整数,其中,所述第一标识的数值在所述第一报文每传输一跳后减一,当所述第一标识的数值为0时,所述网络设备丢弃所述第一报文。
一种可能实现方式中,所述网络接口1502,还用于获取所述目标路径的总跳数;
所述CPU1501,还用于根据所述目标路径的总跳数,确定所述第一标识的数值N,N大于或等于所述目标路径的总跳数。
一种可能实现方式中,所述网络接口1502,还用于获取第二报文,所述第二报文包括所述段列表;
所述CPU1501,还用于在所述第二报文中填充所述第一标识,生成所述第一报文。
一种可能实现方式中,所述CPU1501,还用于对所述第一报文进行承诺访问速率CAR控制,所述CAR指示所述第一报文单位时间内传输速率的阈值为M,M为正整数。
一种可能实现方式中,所述第一标识承载于所述第一报文的互联网协议第4版IPv4报文头的生存时间TTL字段,
或者,所述第一标识承载于所述第一报文的互联网协议第6版IPv6报文头的跳跃限制Hop limit字段。
一种可能实现方式中,所述第一报文还包括第二标识,所述第二标识指示所述网络设备检测接收所述第一报文的入接口和发送所述第一报文的出接口是否一致。
一种可能实现方式中,所述CPU1501,还用于根据所述第二标识检测接收所述第一报文的入接口和接收所述第一报文的出接口是否一致;
所述网络接口1502,还用于当所述网络设备检测接收所述第一报文的入接口与发送所述第一报文的出接口一致时,所述网络设备丢弃所述第一报文;
所述网络接口1502,还用于所述网络设备检测接收第一报文的入接口与发送所述第一报文的出接口不一致时,所述网络设备根据所述段列表转发所述第一报文。
一种可能实现方式中,所述第二标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
一种可能实现方式中,所述CPU1501,还用于当所述网络设备接收来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为正常;
所述CPU1501,还用于当所述网络设备未收到来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为故障。
一种可能实现方式中,所述第一报文为双向转发检测BFD协议报文,或者,所述第一报文为无缝双向转发检测SBFD协议报文。
又一种示例中,网络接口1502,用于获取段列表,所述段列表包括第一节点的段标识和第二节点的段标识,所述段列表指示目标路径,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
CPU1501,用于根据所述段列表和路径状态信息,计算得到第二路径,所述第二路径为所述第一节点至所述第二节点之间不包括故障路径的最短路径,所述路径状态信息指示所述故障路径;
所述CPU1501,还用于根据所述第二路径,检测所述目标路径的状态。
一种可能实现方式中,所述CPU1501,还用于当所述第二路径途径重复的节点时,确定所述目标路径的状态为故障;
所述CPU1501,还用于当所述目标路径不途径重复的节点时,确定所述目标路径的状态为正常。
一种可能实现方式中,所述网络接口1502,还用于从链路状态数据库(Link State Database,LSDB)和/或分段路由数据库(Segment Routing Database,SRDB)中获取所述路径状态信息。
又一种示例中,网络接口1502,用于获取第一报文,所述第一报文包括段列表,所述段列表包括依 次排列的多个段标识SID;
所述段列表包括目标路径途径的每一个节点的转发信息,所述目标路径为所述第一节点与所述第二节点之间的最短路径;
网络接口1502,还用于根据所述段列表转发所述第一报文;
所述CPU1501,用于根据所述第一报文检测所述目标路径的状态。
一种可能实现方式中,
网络接口1502,还用于获取第三报文,所述第三报文的段列表包括依次排列的多个段标识,所述第三报文的段列表用于指示所述第三报文的多条转发路径;
网络接口1502,还用于根据所述第三报文的段列表转发所述第三报文。
一种可能实现方式中,所述转发信息包括:所述节点的段标识,和/或,所述节点的邻接段标识。
一种可能实现方式中,
CPU1501,还用于当所述网络设备确定所述段列表中所述网络设备的下一跳不可达,丢弃所述第一报文;
CPU1501,还用于当所述网络设备确定所述段列表中所述网络设备的下一跳可达,根据所述段列表转发所述第一报文。
一种可能实现方式中,所述第一报文还包括:第三标识,其中,所述第三标识指示所述第一报文转发过程中不执行快速重路由FRR。
一种可能实现方式中,所述第三标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
应理解,通信装置1500对应于上述方法实施例中的网络设备,通信装置1500中的各模块和上述其他操作和/或功能分别为了实现上述方法实施例中的网络设备所实施的各种步骤和方法,具体细节可参见上述图4或5对应的方法实施例,为了简洁,在此不再赘述。
应理解,本申请可以是由通信装置1500上的网络接口1502来完成数据的收发操作,也可以是由处理器调用存储器中的程序代码,并在需要时配合网络接口1502来实现收发单元的功能。
在各种实现中,通信装置1500用于执行本申请实施例提供的路径故障检测的方法,例如是执行上述图4或5所示的实施例所对应的路径故障检测的方法。
本申请图15所述的通信装置具体结构可以为图16所示。
图16为本申请实施例提供的一种通信装置1600的结构示意图,通信装置1600包括:主控板1650和接口板1630。
主控板1650也称为主处理单元(main processing unit,MPU)或路由处理器(route processor),主控板1650用于对通信装置1600中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1650包括:中央处理器1651和存储器1652。
接口板1630也称为线路处理单元(line processing unit,LPU)、线卡(line card)或业务板。接口板1630用于提供各种业务接口并实现数据包的转发。业务接口包括但不限于以太网接口、POS(Packet over SONET/SDH)接口等。接口板1630包括:中央处理器1631、网络处理器1632、转发表项存储器1634和物理接口卡(physical interface card,PIC)1633。
接口板1630上的中央处理器1631用于对接口板1630进行控制管理并与主控板1650上的中央处理器1651通信。
网络处理器1632用于实现报文的转发处理。网络处理器1632的形态可以是转发芯片。
物理接口卡1633用于实现物理层的对接功能,原始的流量由此进入接口板1630,以及处理后的报文从该物理接口卡1633发出。物理接口卡1633包括至少一个物理接口,物理接口也称物理口,物理接口可以为灵活以太(Flexible Ethernet,FlexE)物理接口。物理接口卡1633也称为子卡,可安装在接口板1630上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器1632处理。在一些实施例中,接口板1630的中央处理器1631也可执行网络处理器1632的功能,比如基于通用CPU实现软件转发,从而接口板1630中不需要网络处理器1632。
可选的,通信装置1600包括多个接口板,例如通信装置1600还包括接口板1640,接口板1640包 括:中央处理器1641、网络处理器1642、转发表项存储器1644和物理接口卡1643。
可选的,通信装置1600还包括交换网板1660。交换网板1660也可以称为交换网板单元(switch fabric unit,SFU)。在通信装置有多个接口板1630的情况下,交换网板1660用于完成各接口板之间的数据交换。例如,接口板1630和接口板1640之间可以通过交换网板1660通信。
主控板1650和接口板耦合。例如,主控板1650、接口板1630和接口板1640,以及交换网板1660之间通过系统总线和/或系统背板相连实现互通。在一种可能的实现方式中,主控板1650和接口板1630之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1650和接口板1630之间通过IPC通道进行通信。
在逻辑上,通信装置1600包括控制面和转发面,控制面包括主控板1650和中央处理器1631,转发面包括执行转发的各个组件,比如转发表项存储器1634、物理接口卡1633和网络处理器1632。控制面执行发布路由、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器1632基于控制面下发的转发表对物理接口卡1633收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器1634中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。
应理解,通信装置1500中的收发单元可以相当于通信装置1600中的物理接口卡1633或物理接口卡1643;通信装置1500中的获取单元15041和处理单元15042可以相当于通信装置1600中的中央处理器1651或中央处理器1631,也可以相当于存储器1652中存储的程序代码或指令。
应理解,本申请实施例中接口板1640上的操作与接口板1630的操作一致,为了简洁,不再赘述。应理解,本实施例的通信装置1600可对应于上述各个方法实施例中的网络设备,该通信装置1600中的主控板1650、接口板1630和/或接口板1640可以实现上述各个方法实施例中的网络设备所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,通信装置的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,通信装置可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,通信装置可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。可选的,通信装置的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能。具体采用哪种架构,取决于具体的组网部署场景,此处不做唯一限定。
在一些可能的实施例中,上述网络设备可以实现为虚拟化设备。虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(virtual machine,VM),虚拟路由器或虚拟交换机。虚拟化设备部署在硬件设备上(例如,物理服务器)。例如,可以基于通用的物理服务器结合网络功能虚拟化(network functions virtualization,NFV)技术来实现网络设备。
应理解,上述各种产品形态的通信装置,分别具有上述方法实施例中网络设备的任意功能,此处不再赘述。
本申请实施例还提供的一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机控制网络装置执行如前述方法实施例所示任一项实现方式。
本申请实施例还提供的一种计算机程序产品,计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如前述方法实施例所示任一项实现方式。
进一步地,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在通信装置上运行时,使得通信装置执行上述图4或5对应的方法实施例中网络设备执行的方法。
本申请实施例还提供了一种芯片系统,包括处理器和接口电路,接口电路,用于接收指令并传输至处理器。其中,所述处理器用于实现上述任一方法实施例中的方法。
可选的,该芯片系统还包括存储器,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软 件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现上述任一方法实施例中的方法。
可选的,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
请参阅图17,图17为本申请实施例提出的一种网络系统1700示意图。该网络系统1700包括:网络设备1701、网络设备1702和网络设备1703。网络设备1701、网络设备1702和网络设备1703例如可以为路由器、交换机或网关等物理设备,也可以是支持路由发布和报文转发的虚拟设备等。本实施例对网络设备1701、网络设备1702和网络设备1703的具体类型不做限定。
一种可能的示例中,网络设备1701获取第一报文,第一报文的段列表指示第一报文的转发路径包括网络设备1701和网络设备1703,即第一报文的段列表包括网络设备1701的段标识和网络设备1703的段标识;
网络设备1701根据第一报文的段列表转发第一报文;
网络设备1701根据第一报文,检测目标路径的状态,目标路径为网络设备1701和网络设备1703之间的最短路径。具体的,当网络设备1701接收到来自网络设备1703环回的第一报文,则网络设备1701确定目标路径的状态为正常;当网络设备1701未接收到来自网络设备1703环回的第一报文,则网络设备1701确定目标路径的状态为故障。
例如:网络设备1702收到第一报文后,确定该第一报文中第一标识的数值为0,则网络设备1702丢弃该第一报文。
又例如:网络设备1702收到第一报文后,根据第一报文中第二标识的指示,检测网络设备1702中接收第一报文的入接口和发送第一报文的出接口是否一致。若不一致,则转发该第一报文;若一致,则丢弃该第一报文。
又例如:第一报文的段列表中包括网络设备1701的段标识、网络设备1702的段标识和网络设备1703的段标识。当网络设备1702确定下一跳(即网络设备1703)不可达,例如网络设备1702与网络设备1703之间的路径故障。则网络设备1702丢弃该第一报文。
又例如:网络设备1701获取段列表后,检测目标路径的状态。网络设备1702也可以作为根执行算路,检测目标路径的状态。
可选的,该网络系统1700还包括控制管理装置1704,控制管理装置1704可以是管理上述网络设备1701、网络设备1702和网络设备1703的服务器。可选的,网络设备1701可以是通信装置1400、通信装置1500或者通信装置1600。可选的,网络设备1702可以是通信装置1400、通信装置1500或者通信装置1600。可选的,网络设备1703可以是通信装置1400、通信装置1500或者通信装置1600。
上述各种产品形态的通信装置,分别具有上述方法实施例中网络设备的任意功能,此处不再赘述。
以上对本申请实施例进行了详细介绍,本申请实施例方法中的步骤可以根据实际需要进行顺序调度、合并或删减;本申请实施例装置中的模块可以根据实际需要进行划分、合并或删减。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应理解,在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解, 根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。

Claims (26)

  1. 一种路径故障检测的方法,其特征在于,包括:
    网络设备获取第一报文,
    所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID,所述段列表标识所述第一报文的转发路径,所述段列表包括第一节点的段标识和第二节点的段标识;
    所述网络设备根据所述段列表转发所述第一报文;
    所述网络设备根据所述第一报文检测目标路径的状态,所述目标路径为所述第一节点与所述第二节点之间的最短路径,所述段列表中标识所述目标路径的段标识指示松散路径。
  2. 根据权利要求1所述的方法,其特征在于,
    所述第一报文还包括第一标识,所述第一标识指示所述第一报文传输N跳后丢弃,N为正整数,
    其中,所述第一标识的数值在所述第一报文每传输一跳后减一,当所述第一标识的数值为0时,所述网络设备丢弃所述第一报文。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    所述网络设备获取所述目标路径的总跳数;
    所述网络设备根据所述目标路径的总跳数,确定所述第一标识的数值N,N大于或等于所述目标路径的总跳数。
  4. 根据权利要求2或3所述的方法,其特征在于,所述网络设备获取所述第一报文,包括:
    所述网络设备获取第二报文,所述第二报文包括所述段列表;
    所述网络设备在所述第二报文中填充所述第一标识,生成所述第一报文。
  5. 根据权利要求2-4中任一项所述的方法,其特征在于,所述方法还包括:
    所述网络设备对所述第一报文进行承诺访问速率CAR控制,所述CAR指示所述第一报文单位时间内传输速率的阈值为M,M为正整数。
  6. 根据权利要求2-5中任一项所述的方法,其特征在于,
    所述第一标识承载于所述第一报文的互联网协议第4版IPv4报文头的生存时间TTL字段,
    或者,所述第一标识承载于所述第一报文的互联网协议第6版IPv6报文头的跳跃限制Hop limit字段。
  7. 根据权利要求1所述的方法,其特征在于,
    所述第一报文还包括第二标识,所述第二标识指示所述网络设备检测接收所述第一报文的入接口和发送所述第一报文的出接口是否一致。
  8. 根据权利要求7所述的方法,其特征在于,所述网络设备根据所述段列表转发所述第一报文,包括:
    所述网络设备根据所述第二标识检测接收所述第一报文的入接口和接收所述第一报文的出接口是否一致;
    当所述网络设备检测接收所述第一报文的入接口与发送所述第一报文的出接口一致时,所述网络设备丢弃所述第一报文。
  9. 根据权利要求7或8中任一项所述的方法,其特征在于,所述第二标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述网络设备根据所述第一报文,检测所述目标路径的状态,包括:
    当所述网络设备接收来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为正常;
    当所述网络设备未收到来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为故障。
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,所述第一报文为双向转发检测BFD协议报文,或者,所述第一报文为无缝双向转发检测SBFD协议报文。
  12. 一种网络设备,其特征在于,包括:
    收发模块,用于网络设备获取第一报文,
    所述第一报文包括段列表,所述段列表包括依次排列的多个段标识SID,所述段列表标识所述第一报文的转发路径,所述段列表包括第一节点的段标识和第二节点的段标识;
    所述收发模块,还用于根据所述段列表转发所述第一报文;
    处理模块,用于根据所述第一报文,检测目标路径的状态,所述目标路径为所述第一节点与所述第二节点之间的最短路径,所述段列表中标识所述目标路径的段标识指示松散路径。
  13. 根据权利要求12所述的网络设备,其特征在于,
    所述第一报文还包括第一标识,所述第一标识指示所述第一报文传输N跳后丢弃,N为正整数,
    其中,所述第一标识的数值在所述第一报文每传输一跳后减一,当所述第一标识的数值为0时,所述网络设备丢弃所述第一报文。
  14. 根据权利要求13所述的网络设备,其特征在于,
    所述收发模块,还用于获取所述目标路径的总跳数;
    所述处理模块,还用于根据所述目标路径的总跳数,确定所述第一标识的数值N,N大于或等于所述目标路径的总跳数。
  15. 根据权利要求13或14所述的网络设备,其特征在于,
    所述收发模块,还用于获取第二报文,所述第二报文包括所述段列表;
    所述处理模块,还用于在所述第二报文中填充所述第一标识,生成所述第一报文。
  16. 根据权利要求13-15中任一项所述的网络设备,其特征在于,
    所述处理模块,还用于对所述第一报文进行承诺访问速率CAR控制,所述CAR指示所述第一报文单位时间内传输速率的阈值为M,M为正整数。
  17. 根据权利要求13-16中任一项所述的网络设备,其特征在于,
    所述第一标识承载于所述第一报文的互联网协议第4版IPv4报文头的生存时间TTL字段,
    或者,所述第一标识承载于所述第一报文的互联网协议第6版IPv6报文头的跳跃限制Hop limit字段。
  18. 根据权利要求13所述的网络设备,其特征在于,
    所述第一报文还包括第二标识,所述第二标识指示所述网络设备检测接收所述第一报文的入接口和发送所述第一报文的出接口是否一致。
  19. 根据权利要求18所述的网络设备,其特征在于,
    所述处理模块,还用于根据所述第二标识检测接收所述第一报文的入接口和接收所述第一报文的出接口是否一致;
    所述收发模块,还用于当所述网络设备检测接收所述第一报文的入接口与发送所述第一报文的出接口一致时,所述网络设备丢弃所述第一报文;
    所述收发模块,还用于所述网络设备检测接收第一报文的入接口与发送所述第一报文的出接口不一致时,所述网络设备根据所述段列表转发所述第一报文。
  20. 根据权利要求18或19中任一项所述的网络设备,其特征在于,所述第二标识承载于所述第一报文的段路由扩展头SRH的标识Flags字段。
  21. 根据权利要求12-20中任一项所述的网络设备,其特征在于,
    所述处理模块,还用于当所述网络设备接收来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为正常;
    所述处理模块,还用于当所述网络设备未收到来自所述第二节点的所述第一报文时,所述网络设备确定所述目标路径的状态为故障。
  22. 根据权利要求12-21中任一项所述的网络设备,其特征在于,所述第一报文为双向转发检测BFD协议报文,或者,所述第一报文为无缝双向转发检测SBFD协议报文。
  23. 一种通信装置,其特征在于,包括;
    通信接口;
    与所述通信接口连接的处理器,基于所述通信接口和所述处理器,使得所述通信装置执行如权利要求1-11任一项所述的方法。
  24. 一种通信系统,其特征在于,所述通信系统包括通信装置,所述通信装置用于执行权利要求1-11任一项所述的方法。
  25. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令被处理器执行时,实现权利要求1-11任一项所述的方法。
  26. 一种计算机程序产品,包括程序,其特征在于,当所述程序被处理器执行时,实现权利要求1-11任一项所述的方法。
PCT/CN2023/118427 2022-09-28 2023-09-13 一种路径故障检测的方法以及相关装置 WO2024067084A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211192245.X 2022-09-28
CN202211192245.XA CN117792978A (zh) 2022-09-28 2022-09-28 一种路径故障检测的方法以及相关装置

Publications (1)

Publication Number Publication Date
WO2024067084A1 true WO2024067084A1 (zh) 2024-04-04

Family

ID=90382193

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/118427 WO2024067084A1 (zh) 2022-09-28 2023-09-13 一种路径故障检测的方法以及相关装置

Country Status (2)

Country Link
CN (1) CN117792978A (zh)
WO (1) WO2024067084A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10462045B1 (en) * 2017-02-13 2019-10-29 Cisco Technology, Inc. Topology independent fast reroute for node and SRLG local protection
CN113904972A (zh) * 2021-11-22 2022-01-07 迈普通信技术股份有限公司 路径检测方法、装置、控制器及pe设备
US20220103462A1 (en) * 2020-09-30 2022-03-31 Juniper Networks, Inc. Computing segment identifier lists for multipaths in a segment routing-enabled network
CN114338514A (zh) * 2021-12-27 2022-04-12 中国电信股份有限公司 网络探测方法、装置、介质及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10462045B1 (en) * 2017-02-13 2019-10-29 Cisco Technology, Inc. Topology independent fast reroute for node and SRLG local protection
US20220103462A1 (en) * 2020-09-30 2022-03-31 Juniper Networks, Inc. Computing segment identifier lists for multipaths in a segment routing-enabled network
CN113904972A (zh) * 2021-11-22 2022-01-07 迈普通信技术股份有限公司 路径检测方法、装置、控制器及pe设备
CN114338514A (zh) * 2021-12-27 2022-04-12 中国电信股份有限公司 网络探测方法、装置、介质及电子设备

Also Published As

Publication number Publication date
CN117792978A (zh) 2024-03-29

Similar Documents

Publication Publication Date Title
EP4102785A1 (en) Message processing method and apparatus, and network device and storage medium
US8917729B1 (en) Fast reroute for multiple label switched paths sharing a single interface
US8576721B1 (en) Local forwarding bias in a multi-chassis router
JP7443537B2 (ja) パケット処理方法、パケット処理装置、およびパケット処理システム
CN108574630A (zh) Evpn报文处理方法、设备及系统
CN108574639A (zh) Evpn报文处理方法、设备及系统
CN112565046B (zh) 同步多播路由器能力
EP3764606A1 (en) Resilient multiprotocol label switching (mpls) rings using segment routing
WO2021258823A1 (zh) 路径创建方法、装置及系统
EP3820089A1 (en) Controller provided protection paths
US9832121B1 (en) Next hop instruction associations for forwarding unit programming within a network device
US11956148B2 (en) Packet transmission method and device
US11876706B2 (en) Avoiding loops by preventing further fast reroute (FRR) after an earlier FRR
WO2022222750A1 (zh) 报文转发方法、装置、网络设备及存储介质
WO2022048418A1 (zh) 一种转发报文的方法、设备和系统
US20230412508A1 (en) Packet processing method and related apparatus
US11451478B1 (en) Distributed tactical traffic engineering (TE) using loop free alternative (LFA), remote-LFA (R-LFA) and/or topology independent-LFA (TI-LFA) secondary paths
WO2023284774A1 (zh) 一种报文处理方法以及相关装置
WO2024067084A1 (zh) 一种路径故障检测的方法以及相关装置
WO2024093778A1 (zh) 一种报文处理方法以及相关装置
WO2024104171A1 (zh) 一种资源配置方法和装置
WO2022222884A1 (zh) 转发路径的故障感知方法、装置及系统
US20230379246A1 (en) Method and Apparatus for Performing Protection Switching in Segment Routing SR Network
WO2023236880A1 (zh) 一种报文控制方法以及相关装置
WO2023213216A1 (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: 23870321

Country of ref document: EP

Kind code of ref document: A1