WO2023045793A1 - 一种环路的检测方法和装置 - Google Patents

一种环路的检测方法和装置 Download PDF

Info

Publication number
WO2023045793A1
WO2023045793A1 PCT/CN2022/118349 CN2022118349W WO2023045793A1 WO 2023045793 A1 WO2023045793 A1 WO 2023045793A1 CN 2022118349 W CN2022118349 W CN 2022118349W WO 2023045793 A1 WO2023045793 A1 WO 2023045793A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
message
sid
interface
forwarding
Prior art date
Application number
PCT/CN2022/118349
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 华为技术有限公司
Priority to EP22871841.7A priority Critical patent/EP4346181A1/en
Publication of WO2023045793A1 publication Critical patent/WO2023045793A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/18Loop-free operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling

Definitions

  • the present application relates to the communication field, and more specifically, to a loop detection method and device.
  • Segment routing is a technology used to forward packets. SR divides the network into one or more segments, and arranges each segment and the network nodes in the network in an orderly manner to obtain a forwarding packet. Path, which is similar in nature to source routing.
  • SR segment routing-traffic engineering
  • SR-BE segment routing-best effort
  • the interior gateway protocol (interior gateway protocol, IGP) calculates the optimal label switched path (label switched path, LSP) through the shortest path first algorithm (shortest path first, SPF), also known as
  • IGP can also calculate and generate a topology-independent loop-free alternate (TI-LFA) that can provide link and node protection for SR-BE, also known as backup path.
  • TI-LFA topology-independent loop-free alternate
  • This application provides a loop detection method and device, in order to determine whether there is a loop between nodes by judging whether the interface when receiving the message is consistent with the outgoing interface when the message is forwarded, so that when there is a loop In the case of an unconnected path, timely adjust the packet forwarding operation to avoid problems such as port congestion and service packet loss.
  • the present application provides a loop detection method, which can be performed by the first node, or can also be performed by components (such as chips, chip systems, etc.) configured in the first node. Applications are not limited to this.
  • the method includes: the first node receives a message from the second node through the first interface, the outer layer of the message encapsulates a node segment identifier (segment identifier, SID), and the node SID is used to identify the destination node; A node determines, based on the node SID, that the outbound interface used to forward the message is the first interface; the first node determines that there is a loop in the forwarding path of the message.
  • SID segment identifier
  • the first node determines whether there is a loop between the first node and the previous hop node by judging whether the interface when receiving the message is consistent with the outgoing interface when forwarding the message, if the two are consistent It is determined that there is a loop under certain circumstances, and then the packet forwarding operation can be adjusted in time, so as to avoid problems such as port congestion and service packet loss.
  • the first node may forward packets based on SR-BE, or may be based on the SR of the sixth generation (version 6) Internet protocol (internet protocol, IP) (IPv6). (SRv6 for short) BE forwards the message.
  • IPv6 Internet protocol
  • the SID of the outer layer encapsulation node of the above message has the following two possible situations:
  • a possible situation is that the first node forwards the message based on traditional SR-BE, and the node SID corresponds to a multiprotocol label switching (multiprotocol label switching, MPLS) label.
  • MPLS multiprotocol label switching
  • the packet outer encapsulation node SID refers to a label corresponding to the node SID determined based on the sum of the node SID and the start address of a segment routing global block (segment routing global block, SRGB).
  • segment routing global block segment routing global block, SRGB
  • the outgoing label carried by the first node when forwarding the message is the sum of the starting address of the SRGB of the next-hop node and the node SID of the destination node.
  • the first node forwards the message based on SRv6BE, and the node SID corresponds to the SRv6 SID.
  • the packet outer encapsulation node SID refers to the SRv6 SID encapsulated based on the destination address.
  • the method further includes: the first node determines the node SID carried by the label and the node SID carried by the incoming label based on the node SID carried by the incoming label encapsulated in the packet. The same; the first node determines that there is a loop in the forwarding path of the message.
  • the first node determines that the interface between the first node and the second node exists by determining that the interface when receiving the message is the same as the outgoing interface when forwarding the message, and that the node SID carried by the outgoing label is the same as the node SID carried by the incoming label.
  • a loop can effectively avoid misjudgment that there is a loop in the forwarding path of the packet in the case of SR-TE. It can be understood that if SR-BE is fully deployed in the network, it can be determined whether there is a loop between the first node and the previous hop node by judging whether the interface when receiving the message is consistent with the outgoing interface when the message is forwarded.
  • the first interface can be determined by judging whether the interface when receiving the message is consistent with the outgoing interface when forwarding the message. Check whether there is a loop between a node and the previous hop node; if an SR-TE tunnel is deployed on the network, and the type of label stack in the SR-TE tunnel is a mixed label stack composed of node SID and adjacent SID, in other words, report The outer layer of the text encapsulates the node SID and the label stack adjacent to the SID.
  • the first node also needs to determine whether the node SID carried by the label is the same as the node SID carried by the incoming label based on the node SID carried by the incoming label.
  • a mixed label stack consisting of node SIDs and adjacent SIDs misjudged that there was a loop on the path when forwarding packets.
  • the method further includes: the first node adjusts a message forwarding operation to avoid forwarding the message to the second node through the first interface.
  • a possible design is that the first node directly discards the message when there is a loop in the forwarding path of the message. By directly discarding the packet when there is a loop in the forwarding path of the packet, port congestion can be avoided and other services with the same priority will be affected.
  • the first node forwards the packet through the standby path, specifically, the first node forwards the packet to the next-hop node through the second interface, wherein the path to the destination node through the second interface It is the backup path for forwarding packets.
  • the first node forwards packets through the backup path, which can avoid problems such as service packet loss and port congestion.
  • the present application provides a loop detection device, which can implement the above first aspect and the method in any possible implementation manner of the first aspect.
  • the apparatus comprises corresponding means for carrying out the method described above.
  • the units included in the device may be implemented by software and/or hardware.
  • the present application provides a loop detection device, and the loop detection device includes a processor.
  • the processor is coupled with the memory, and can be used to execute a computer program in the memory, so as to implement the first aspect and the loop detection method in any possible implementation manner of the first aspect.
  • the device further includes a memory.
  • the device further includes a communication interface, and the processor is coupled to the communication interface.
  • the present application provides a computer-readable storage medium, in which a computer program or instruction is stored, and when the computer program or instruction is executed, the first aspect and any of the first aspect can be realized.
  • the present application provides a computer program product.
  • the computer program product includes a computer program.
  • the computer program is run, the first aspect and the loop in any possible implementation manner of the first aspect can be realized. Detection method.
  • the present application provides a system-on-a-chip, where the system-on-a-chip includes a processor and may further include a memory, configured to implement the first aspect and the loop detection method in any possible implementation manner of the first aspect.
  • the system-on-a-chip may consist of chips, or may include chips and other discrete devices.
  • FIG. 1 is a schematic diagram of two types of SIDs provided by the embodiment of the present application.
  • FIG. 2 is a schematic diagram of the SR-BE forwarding process provided by the embodiment of the present application.
  • FIG. 3 is a schematic diagram of an application scenario applicable to the method provided by the embodiment of the present application.
  • FIG. 4 is a schematic diagram of another application scenario applicable to the method provided by the embodiment of the present application.
  • Fig. 5 is a schematic diagram of another application scenario applicable to the method provided by the embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a loop detection method provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the first node determining the outbound interface based on the node SID provided by the embodiment of the present application;
  • FIG. 8 is a schematic diagram of a first node forwarding a message provided by an embodiment of the present application.
  • FIG. 9 is another schematic diagram of forwarding a message by a first node provided in an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of a loop detection device provided in an embodiment of the present application.
  • FIG. 11 is another schematic block diagram of a loop detection device provided by an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with basically the same function and effect.
  • the first node and the second node are used to distinguish different network nodes, and their sequence is not limited.
  • words such as “first” and “second” do not limit the number and execution order, and words such as “first” and “second” do not necessarily limit the difference.
  • SR It is a technology used to forward packets. SR divides the network into one or more segments, assigns identifiers (identifiers, IDs) to these segments and network nodes in the network, that is, SIDs, and arranges the SIDs in an orderly manner, that is, for each segment and network node Arranging the nodes in an orderly manner, a forwarding path can be obtained, which is similar in nature to source routing.
  • the SR is divided into two types: SR-TE and SR-BE. The method provided in the embodiment of the present application can be applied to both the traditional SR-BE technology and the SRv6BE technology.
  • SID It is equivalent to the MPLS label in the traditional MPLS technology. In the SR-BE technology, the SID can be mapped to an MPLS label at the forwarding level. There are two types of SIDs, Node SID (Node SID) and Adjacency SID (Adjacency SID). Figure 1 shows a schematic diagram of two types of SIDs.
  • Node SID is a special prefix SID (Prefix SID), used to identify a specific network node, configure the IP address as a prefix under the loopback (Loopback) interface of the node, then
  • the Node SID of this node is the Prefix SID.
  • the Node SID can also be called the Prefix SID.
  • the Node SID assigned by node A is 101
  • the Node SID assigned by node B is 102
  • the Node SID assigned by node C is 103.
  • 101 can identify node A
  • 102 can identify node B
  • 103 can identify node C.
  • Adjacency SID is used to identify a certain adjacency of a network node in the network, and has a certain directionality. For example, the Adjacency SID from node A to node B is 1001, and node B The Adjacency SID to node C is 1002. In this embodiment of the application, the Node SID is used to identify the destination node.
  • Segment routing global block The range of MPLS labels reserved for SR specified by the user. For example, the SRGB of a certain network node is [16000, 23999], where 16000 is the starting address of the SRGB.
  • SR-BE IGP calculates the optimal LSP through SPF. It is a tunneling technology.
  • the Node SID of the destination node is diffused to each node through the IGP protocol, and each node is calculated based on the local SRGB Label value, use the intermediate system to intermediate system (intermediate system to intermediate system, IS-IS) routing protocol or open shortest path first (open shortest path first, OSPF) routing protocol to calculate the label forwarding path, find the next hop node, and guide the report The message is forwarded to the destination node.
  • intermediate system to intermediate system intermediate system to intermediate system
  • IS-IS intermediate system to intermediate system
  • OSPF open shortest path first
  • the IGP can also calculate and generate a TI-LFA that can provide link and node protection for the SR-BE tunnel, which can also be called a backup path.
  • a link or node fails, the traffic will be quickly switched to the backup path, and packets will be forwarded through the backup path.
  • Fig. 2 is an example of the SR-BE forwarding process provided by the embodiment of the present application.
  • the message needs to be forwarded from node A to node D, and the message is input from node A.
  • Node A sends the message to the next hop node (that is, node B), the SRGB of node B is [26000, 65535], the action is swap, and node B receives the message.
  • the label encapsulated in the outer layer of the message is 26100.
  • the label encapsulated when the message enters the node B is recorded as the incoming label, that is, the incoming label is 26100, mark the label encapsulated when the message is output from node B as the outgoing label.
  • the node B After the node B receives the message, it determines the label that needs to be encapsulated when sending the message to the next hop node based on the label switching table, that is, the outgoing label. It should be understood that the packet carrying the outgoing label enters the next-hop node, which is equivalent to the incoming label when the packet enters the next-hop node. Node B exchanges the label encapsulated in the outer layer of the message, and replaces the incoming label 26100 with the outgoing label 36100, which is the sum of the starting address of the SRGB of the next-hop node and the Node SID.
  • node C After the message reaches the destination node (that is, node D), the action is to pop the stack (pop), delete the label 16100 encapsulated on the outer layer of the message, and continue forwarding according to the IP.
  • SRv6 is the application of SR technology on the IPv6 network plane.
  • SRv6 technology adds a segment routing header (SRH) header in the IPv6 message, which is used to store the SRv6SID list in the 128-bit (bits) IPv6 address format, and the SRv6SID can define the path information of a specific node as well as service and function information .
  • the SRv6 SID list contains only one SID, and the destination address of the IPv6 packet header can be set as the SID without inserting the SRH.
  • the outer SID of the message encapsulates the IP address of the destination node.
  • SR-BE is fully deployed on the packet forwarding path, and the MPLS label encapsulated on the outer layer of the packet will trigger route convergence on network nodes when the link fails or recovers, and each network node restarts
  • the time for sending the LSP to the forwarding plane is inconsistent, resulting in the formation of loops between some network nodes.
  • the following will briefly describe the scenarios in which a loop is formed when a link fails and when the link recovers in the SR-BE technology.
  • the message is forwarded from node A to node D, and each network element deploys the IS-IS protocol.
  • the optimal SR-BE LSP that is, the main path
  • the backup path from node A to node D is A ⁇ B ⁇ C ⁇ D.
  • the message is input from node A, and when the link A ⁇ D is faultless, the message is forwarded along the main path A ⁇ D.
  • the link A ⁇ D fails, the service traffic of node A is quickly switched to the backup path A ⁇ B ⁇ C ⁇ D, and no loop will be formed at this time.
  • the routes of each node converge, but the route convergence speed of node A is faster than that of node B, that is to say, when the route of node A is converged, the route of node B may not be converged yet.
  • the route of node A is converged. After the convergence, the path sent to the forwarding plane is A ⁇ B ⁇ C ⁇ D.
  • the next hop node of node A is updated to node B, and the route of node B may not be completed yet. Convergence, in other words, the forwarding plane of Node B has not received the newly calculated LSP.
  • the SR-BE LSP from node B to node D is originally B ⁇ A ⁇ D
  • traffic in the opposite direction is formed at node B, and a loop is formed between node A and node B.
  • the route of node B is converged, and the converged SR-BE LSP is B ⁇ C ⁇ D, the loop disappears.
  • the SR-BE LSP from node A to node D is A ⁇ B ⁇ C ⁇ D
  • the SR-BE LSP from node B to node D is B ⁇ C ⁇ D.
  • the route of node B has completed convergence, and the path delivered to the forwarding plane after convergence is B ⁇ A ⁇ D, and the next hop node of node B is updated to node A, but node A may not have completed convergence, and node A
  • the path to node D is still A ⁇ B ⁇ C ⁇ D, and a loop is formed between node A and node B.
  • the routing of node A completes convergence, the converged primary path is A ⁇ D, and the backup path is A ⁇ B ⁇ C ⁇ D. Packets are forwarded from node A to node D through the primary path A ⁇ D, and the loop disappears.
  • FIG. 3 and FIG. 4 are only examples. In other embodiments, there may be more or fewer network nodes or other label switching paths on the packet forwarding path. The embodiment does not limit this.
  • SR-TE is deployed in the forwarding path of the packet, and the mixed label stack composed of Node SID and adjacent SID is encapsulated outside the packet.
  • part of the packet is based on Node SID forwarding, partly based on adjacent SID forwarding.
  • the message is forwarded from node A to node F, and the outer layer of the message encapsulates the mixed label stack composed of Node SID and adjacent SID.
  • the message is forwarded along the backup path, and then each node Taking node B as an example, the label switching path is calculated based on the Node SID for the packet from node A to node B.
  • the route convergence of node A is completed, and the path sent to the forwarding plane is A ⁇ B ⁇ C ⁇ D ⁇ E ⁇ F, that is, the next hop node is node B, but the route of node B has not been converged, then continue to forward according to the original path B ⁇ A ⁇ F, and a loop is formed between node A and node B.
  • this application provides a loop detection method, based on whether the interface when the first node receives the message is consistent with the outgoing interface when the message is forwarded, to determine the link between the first node and the previous hop node. Whether there is a loop, for example, if the two are consistent, it is determined that there is a loop, and then the forwarding operation of the message can be adjusted in time, so as to avoid problems such as port congestion and service packet loss.
  • FIG. 6 is a schematic flowchart of a loop detection method 600 provided by an embodiment of the present application.
  • the method 600 shown in FIG. 6 may include S610 to S640, and each step in the method 600 will be described in detail below.
  • the first node may be an intermediate node, and for an LSP channel, both ends of the first node may use Ethernet interfaces to connect to adjacent network nodes.
  • the last hop node of the first node is recorded as the second node, and the second node may be an intermediate node or an edge node, which is not limited in the embodiment of the present application.
  • one end of the edge node is connected to an adjacent network node through an Ethernet interface, and the other end is connected to a user equipment through a user interface.
  • the first node receives the packet from the second node through the first interface.
  • the outer layer of the message encapsulates the Node SID, and the Node SID is used to identify the destination node.
  • the second node is an up-hop node of the first node
  • the first interface is an interface through which the first node connects to the second node.
  • the above destination node is the tail node of the SR-BE tunnel in the packet forwarding path.
  • the destination node can be the tail node of the SR-BE tunnel, and can also be called the destination node of the packet.
  • the SID and adjacent SIDs form an SR-TE tunnel with a mixed label stack, in other words, part of the packet is forwarded based on the Node SID, and part of the packet is forwarded based on the adjacent SID. It is the destination node of the message.
  • the first node may forward the packet based on traditional SR-BE, or may forward the packet based on SRv6BE.
  • the Node SID corresponds to the MPLS label
  • the outer label of the message encapsulates the Node SID label.
  • the Node SID encapsulated in the outer layer of the message refers to the label corresponding to the Node SID determined based on the sum of the Node SID and the starting address of the SRGB (incoming label, outgoing label as described above).
  • the outgoing label carried by the first node when forwarding the message is the sum of the starting address of the SRGB of the next-hop node and the Node SID of the destination node.
  • the Node SID corresponds to the SRv6SID.
  • the destination address of the IPv6 header can be set as the SID, and the Node SID encapsulated in the outer layer of the message refers to the SRv6SID encapsulated based on the destination address.
  • a possible situation is that the second node perceives that the main path for forwarding the message fails, for example, the second node perceives that the second node is connected to the next hop node on the main path for forwarding the message. If the interface is down, the second node determines that the link of the main path is faulty, and the second node forwards the packet along the backup path.
  • the next hop node on the backup path is the first node, that is, the second node sends the packet to the A node.
  • the first node receives a message from the second node through the first interface.
  • the second node perceives that the link failure of the primary path for forwarding the message is restored.
  • the second node may determine whether the link failure is restored by determining whether the interface is restored.
  • the link failure recovers, and when the forwarding plane of the second node does not receive a new LSP, the second node still forwards according to the path planned when the link failed.
  • the second node sends the message to the first node, and correspondingly, the first node receives the message from the second node through the first interface.
  • the first node can only perceive the link failure of the adjacent node.
  • the second node such as node A
  • the first node such as node B
  • node B cannot automatically switch to the backup path to forward the message like node A.
  • the second node sends the message to the first node, and correspondingly, the first node receives the message from the second node through the first interface, where the first interface connects the first node to the second node.
  • the node's interface
  • the first node determines whether the outbound interface used to forward the message is the first interface.
  • the first node After the first node receives the message, it can record the interface receiving the message, that is, the first interface, and further determine the outbound interface for forwarding the message, wherein the outbound interface refers to the first node outputting the message time interface. It can be understood that the first node determines that the outbound interface used to forward the message is the first interface, which means that the first node determines that the interface for receiving the message and the interface for sending the message are the same interface, that is, the next interface of the first node The one-hop node is the second node.
  • the first node determines that the outbound interface used to forward the message is not the first interface, in other words, the first node determines that the interface receiving the message is not the same interface as the interface sending the message, the first node and the previous hop There is no loop between nodes, and there is no need to execute S630 and S640.
  • the first node After receiving the message, the first node determines the outbound interface for forwarding the message based on the Node SID encapsulated in the outer layer of the message.
  • the Node SID corresponds to the MPLS label
  • the Node SID corresponds to the SRv6SID.
  • Fig. 7 is a schematic diagram of an outbound interface determined by a first node for forwarding a packet.
  • the Node SID corresponds to the MPLS label
  • the process in which the first node determines the outgoing interface for forwarding the message based on the Node SID is described in detail below in conjunction with FIG. 7 .
  • the first node determines that the outbound interface is the first interface.
  • the first node receives a message from the first interface, and the outer layer of the message is encapsulated with an incoming label, and the incoming label carries the Node SID of the destination node.
  • the first node queries the label switching table based on the incoming label, and determines the index of the next-hop forwarding table based on the label switching table. According to the index, the next-hop forwarding table is queried, and the next-hop forwarding table contains the upper and lower hops of the primary path and the standby path Information about the node, such as the outgoing label, the SRGB of the next-hop node, and the outgoing interface. Then the first node can determine according to the next-hop forwarding table that the outbound interface of the main path used to forward the message is the first interface.
  • the first node determines that the Node SID carried by the label is the same as the Node SID carried by the incoming label.
  • the Node SID corresponds to the MPLS label, that is, the outer layer of the message encapsulates the label determined by the first node based on the sum of the Node SID and the starting address of the SRGB.
  • the Node SID corresponds to the MPLS label, that is, the outer layer of the message encapsulates the label determined by the first node based on the sum of the Node SID and the starting address of the SRGB.
  • the outer layer of the packet encapsulates the Node SID and adjacent SID, and the first node also needs to determine the outgoing node based on the Node SID carried by the incoming label.
  • the Node SID carried by the label is the same as the Node SID carried by the incoming label, so as to avoid misjudgment that there is a loop on the path when SR-TE forwards based on adjacent labels.
  • the first node determines that the Node SID carried by the outgoing label is the same as the Node SID carried by the incoming label, and the outgoing interface is the first interface.
  • the first node receives a message from the first interface, and the outer layer of the message is encapsulated with an incoming label, and the incoming label carries the Node SID of the destination node.
  • the first node calculates the Node SID based on the incoming label in the packet header, that is, the difference between the incoming label and the local SRGB is the Node SID carried by the incoming label.
  • the first node queries the label exchange table based on the incoming label, obtains the next-hop forwarding table index, queries the next-hop forwarding table according to the next-hop forwarding table index, and obtains the next-hop forwarding table according to the outgoing
  • the label determines the Node SID carried by the label, that is, the difference between the label and SRGB.
  • the first node can conclude that the Node SID carried by the outgoing label is the same as the Node SID carried by the incoming label, and the outgoing interface is the first interface.
  • the information of the next-hop forwarding table can be carried in the label switching table. information.
  • next-hop forwarding table stores information about the primary path and the backup path, and in some embodiments, the next-hop forwarding table only contains information about the primary path, that is, no Information about the backup path.
  • the process of the first node determining the outbound interface for forwarding the message based on the Node SID is described below.
  • SIDs can be collectively referred to as virtual private network (virtual private network, VPN) SIDs, wherein, in the IPv4VPN scenario, the SID can be called "END.DT4SID", and in the IPv6VPN scenario, the SID can be Called "END.DT6SID".
  • the Node SID corresponds to the SRv6 SID, which can be understood as the packet outer layer encapsulates the VPN SID based on the destination address.
  • the SID in the SRv6BE technology is called VPN SID below. It should be understood that the SRv6 SID mentioned above can be understood as the SID in the SRv6BE technology, which has the same meaning as the VPN SID described here.
  • the first node receives a message from the first interface.
  • the Node SID encapsulated in the outer layer of the message refers to the VPN SID encapsulated based on the destination address.
  • the outer layer of the message is the IP address of the destination node.
  • the first node first judges that the outer layer of the message is encapsulated with a VPN SID, and then judges whether the interface receiving the message is consistent with the outgoing interface used to forward the message. Specifically, the first node queries the routing forwarding table based on the destination address, determines the index of the next hop forwarding table based on the routing forwarding table, queries the next hop forwarding table according to the index, and determines the forwarding table for forwarding the message according to the next hop forwarding table.
  • the outbound interface of the primary path of the document is the first interface.
  • the first node determines that a loop exists in the packet forwarding path.
  • the first node determines whether the outbound interface used to forward the message is the first interface, if the outbound interface used to forward the message is the first interface, then perform S630 and S640; if the outbound interface used to forward the message If the interface is not the first interface, there is no loop in the forwarding path of the packet, and the packet can be forwarded along the original path.
  • the first node determines that the outgoing interface used to forward the message is the first interface, and then determines that there is a loop in the forwarding path of the message, that is, there is a loop between the first node and the second node. There is a loop.
  • the first node determines that the outbound interface used to forward the message is the first interface and that the Node SID carried by the inbound label of the message encapsulation is the same as the Node SID carried by the outbound label, and then determine There is a loop in the packet forwarding path, that is, there is a loop between the first node and the second node.
  • the first node adjusts a packet forwarding operation.
  • the first node After the first node determines that there is a loop in the forwarding path of the message, it can adjust the forwarding operation of the message in the following two ways to prevent the first node from forwarding the message from the first interface to the second node.
  • a possible implementation method is that the first node directly discards the message to avoid port congestion, thereby affecting services of other priorities, until the forwarding plane of the first node receives a new LSP, and the message is forwarded along the new path.
  • the first node forwards the message through the backup path. After determining that there is a loop in the forwarding path of the message, the first node may forward the message based on the standby path for forwarding the message stored in the next-hop forwarding table.
  • the first node determines the second interface connected to the next-hop node according to the backup path used to forward the message, and forwards the message from the second interface to the destination node.
  • the path from the first node to the destination node through the second interface is The standby path used to forward the message, that is, when the standby path can be found from the next-hop forwarding table, the first node forwards the message through the standby path. Until the forwarding plane of the first node receives a new LSP, the message is forwarded along the new path.
  • the first node may determine whether there is a backup path based on the next-hop forwarding table, and then further select how to process the message. Exemplarily, after determining that there is a loop in the forwarding path of the message, the first node further determines whether a standby path for forwarding the above message can be found in the next-hop forwarding table. If the first node finds the backup path for forwarding the message, it will forward the message according to the backup path; if it does not find the backup path for forwarding the message, it will discard the message to avoid port congestion and affect other priorities. business.
  • FIG. 8 is an example of packet forwarding by the first node. It should be noted that FIG. 8 is based on SR-BE forwarding of packets, and when the link from node A to node D fails, the detailed process of packet forwarding by the first node.
  • node A is used as the second node and node B is used as the first node as an example for description.
  • the range of the local SRGB of node A is [1000, 4000]
  • the range of the local SRGB of node B is [2000, 5000]
  • the destination node is node D, that is, the end node where the SR-BE tunnel is deployed is node D.
  • Node A senses the failure of the link from node A to node D, and switches to the backup path A ⁇ B ⁇ C ⁇ D to forward packets.
  • node A has delivered the calculated new LSP to the forwarding plane, that is, A ⁇ B ⁇ C ⁇ D.
  • the main path before convergence is B ⁇ A ⁇ D
  • the backup path is B ⁇ C ⁇ D.
  • Node B has not delivered the new SR-BE LSP to the forwarding plane.
  • Node B receives the message from node A from interface 3 (that is, the first interface), and queries the label switching table based on the incoming label 2100 encapsulated in the outer layer of the message.
  • the index of the next hop forwarding table in the label switching table is 10, according to Index 10 queries the next-hop forwarding table.
  • next-hop forwarding table stores relevant information of the backup path, and node B can forward packets from interface 4 (ie, the second interface), and the next-hop node is node C.
  • interface 4 ie, the second interface
  • the next-hop node is node C.
  • the message is forwarded along the standby path until node B converges, and the new SR-BE LSP is delivered to the forwarding plane.
  • the node B exchanges the incoming label 2100 encapsulated in the message with the outgoing label 3100 , and the outgoing label encapsulated by the node B when forwarding the message from the interface 4 is 3100 .
  • the new SR-BE LSP is issued to the forwarding plane, and the new SR-BE LSP is B ⁇ C ⁇ D, and the message is forwarded along B ⁇ C ⁇ D.
  • node C it is also possible to determine whether there is a loop between node C and node B through the above method, and for the sake of brevity, details will not be described here.
  • FIG. 9 is another example of packet forwarding by the first node. It should be noted that, FIG. 9 is based on SR-BE forwarding of packets, and when the link from node A to node D recovers from a fault, the detailed flow of packet forwarding by the first node.
  • node A is used as the second node
  • node B is used as the first node as an example for description.
  • the range of local SRGB of node A is [1000, 4000]
  • the range of local SRGB of node B is [2000, 5000]
  • the destination node is node D.
  • Node A perceives that the link failure between node A and node D is restored, and the routes of each network node converge. It makes the following assumptions: the convergence speed of node A is slower than that of node B.
  • node B has calculated the new SR-BE
  • the LSP is delivered to the forwarding plane, that is, the primary path is B ⁇ A ⁇ D, the backup path is B ⁇ C ⁇ D, and the path from node B to node D before convergence is B ⁇ C ⁇ D; for node A, before convergence
  • the SR-BE LSP is A ⁇ B ⁇ C ⁇ D. Node A has not yet converged, that is, the new SR-BE LSP has not been delivered to the forwarding plane, so node A continues to send the message to node B.
  • Node B has converged, and its forwarding plane has received a new SR-BE LSP.
  • Node B receives the message from node A from interface 3 (that is, the first interface), and queries the label switching table based on the incoming label 2100 encapsulated in the outer layer of the message.
  • the index of the next hop forwarding table in the label switching table is 10, according to Index 10 queries the next-hop forwarding table.
  • the next-hop forwarding table when packets are forwarded along the main path, the outgoing label is 2100, the SRGB is 2000, and the outgoing interface is interface 3.
  • interface 3 is the first interface. Therefore, there is a loop between node A and node B.
  • next-hop forwarding table stores relevant information of the backup path, and node B can forward packets from interface 4 (ie, the second interface), and the next-hop node is node C.
  • interface 4 ie, the second interface
  • the next-hop node is node C.
  • the forwarding plane of node A receives a new SR-BE LSP
  • the message is forwarded along the new SR-BE LSP.
  • the node B exchanges the incoming label 2100 encapsulated in the message with the outgoing label 3100 , and the outgoing label encapsulated by the node B when forwarding the message from the interface 4 is 3100 .
  • the loop detection device provided by the embodiment of the present application will be described in detail below with reference to FIG. 10 and FIG. 11 .
  • FIG. 10 is a schematic block diagram of a loop detection apparatus 1000 provided by an embodiment of the present application.
  • the apparatus 1000 may include: a transceiver unit 1010 and a processing unit 1020 .
  • Each unit in the apparatus 1000 can be used to implement the corresponding process executed by the first node in the method 600 shown in FIG. 6 .
  • the transceiver unit 1010 can be used to receive a message from the second node through the first interface, the outer layer of the message encapsulates the Node SID, the The Node SID is used to identify the destination node; the processing unit 1020 can be used to determine based on the Node SID that the outbound interface for forwarding the message is the first interface; it can also be used to determine that there is a loop in the forwarding path of the message.
  • the transceiver unit 1010 can be used to receive a message from the second node through the first interface, the outer layer of the message encapsulates the Node SID, the The Node SID is used to identify the destination node; the processing unit 1020 can be used to determine based on the Node SID that the outbound interface for forwarding the message is the first interface; it can also be used to determine that there is a loop in the forwarding path of the message.
  • each functional unit in each embodiment of the present application may be integrated into one processor, or physically exist separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • FIG. 11 is another schematic block diagram of a loop detection apparatus 1100 provided by an embodiment of the present application.
  • the apparatus 1100 may be a system-on-a-chip, or may also be an apparatus configured with a system-on-a-chip to implement the loop detection function in the foregoing method embodiments.
  • the system-on-a-chip may be composed of chips, or may include chips and other discrete components.
  • the apparatus 1100 may include a processor 1110 and a communication interface 1120 .
  • the communication interface 1120 can be used to communicate with other devices through a transmission medium, so that the devices used in the device 1100 can communicate with other devices.
  • the communication interface 1120 may be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of realizing a sending and receiving function.
  • the processor 1110 may use the communication interface 1120 to input and output data, and be used to implement the loop detection method described in the embodiment corresponding to FIG. 6 .
  • the apparatus 1100 may be used to realize the function of the first node in the foregoing method embodiment.
  • the processor 1110 can be used to control the communication interface 1120 to receive a message from the second node, and the outer layer of the message Encapsulating the Node SID, the Node SID is used to identify the destination node; the processor 1110 can also be used to determine that the outgoing interface for forwarding the message is the first interface based on the Node SID; it can also be used to determine that there is a loop.
  • the processor 1110 can be used to control the communication interface 1120 to receive a message from the second node, and the outer layer of the message Encapsulating the Node SID, the Node SID is used to identify the destination node; the processor 1110 can also be used to determine that the outgoing interface for forwarding the message is the first interface based on the Node SID; it can also be used to determine that there is a loop.
  • the device 1100 further includes at least one memory 1130 for storing program instructions and/or data.
  • the memory 1130 is coupled to the processor 1110 .
  • the coupling in the embodiments of the present application is an indirect coupling or a communication connection between devices, units or modules, which may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the processor 1110 may operate in cooperation with the memory 1130 .
  • Processor 1110 may execute program instructions stored in memory 1130 . At least one of the at least one memory may be included in the processor.
  • a specific connection medium among the processor 1110, the communication interface 1120, and the memory 1130 is not limited.
  • the processor 1110 , the communication interface 1120 and the memory 1130 are connected through a bus 1140 .
  • the bus 1140 is represented by a thick line in FIG. 11 , and the connection manner between other components is only for schematic illustration and is not limited thereto.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 11 , but it does not mean that there is only one bus or one type of bus.
  • the present application also provides a computer program product, the computer program product including: a computer program (also referred to as code, or instruction), when the computer program is executed, the computer is made to execute the method of the embodiment shown in FIG. 6 .
  • a computer program also referred to as code, or instruction
  • the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program (also called a code, or an instruction).
  • a computer program also called a code, or an instruction.
  • the processor in this embodiment of the present application may be an integrated circuit chip that has a signal processing capability.
  • each step of the above-mentioned method embodiments may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the above-mentioned processor can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other possible Program logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • Program logic devices discrete gate or transistor logic devices, discrete hardware components.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the memory in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory can be random access memory (RAM), which acts as external cache memory.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM direct memory bus random access memory
  • direct rambus RAM direct rambus RAM
  • unit may be used to denote a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution.
  • the units described as discrete components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be 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, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • each functional unit may be fully or partially implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product comprises one or more computer instructions (programs). When the computer program instructions (program) are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (digital video disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD) )wait.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a digital versatile disc (digital video disc, DVD)
  • a semiconductor medium for example, a solid state disk (solid state disk, SSD)
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

Landscapes

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

Abstract

提供了一种环路的检测方法和装置,该方法包括:第一节点从第一接口接收来自第二节点的报文,该报文外层封装节点段标识,该节点段标识用于标识目的节点;第一节点基于节点段标识,确定用于转发报文的出接口是第一接口;第一节点确定报文的转发路径中存在环路。通过确定第一节点接收报文时的接口与转发该报文时的出接口是否一致,确定报文的转发路径中是否存在环路,以便于在报文的转发路径中存在环路的情况下,进一步调整报文的转发路径,如将报文沿备路径转发、将报文丢弃等,从而避免了端口堵塞,业务丢包等问题。

Description

一种环路的检测方法和装置
本申请要求于2021年9月26日递交中国国家知识产权局、申请号为202111130398.7、发明名称为“一种环路的检测方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,并且更具体地,涉及一种环路的检测方法和装置。
背景技术
段路由(segment routing,SR)是用于转发报文的一种技术,SR将网络分为一个或多个段,且将各个段和网络中的网络节点进行有序排列,就可以得到一条转发路径,其本质类似于源路由。
SR分为流量工程段路由(segment routing-traffic engineering,SR-TE)和尽力而为段路由(segment routing-best effort,SR-BE)。其中,在SR-BE技术中,内部网关协议(interior gateway protocol,IGP)通过最短路径优先算法(shortest path first,SPF)计算得到最优的标签交换路径(label switched path,LSP),也可称为主路径,同时,IGP也可以计算生成一条能为SR-BE提供链路及节点保护的拓扑无关的无环路备份路径(topology-independent loop-free alternate,TI-LFA),也可称为备路径。当某处链路或节点发生故障时,流量会快速切换到备路径,报文通过备路径转发。正常情况下,报文沿着主路径转发。
当链路出现故障或故障恢复时,会触发各网络节点收敛,导致每个网络节点都会重新计算LSP,由于各网络节点性能的差异,进而导致生成LSP后下发到转发面的时间不一致,导致形成短暂环路。环路可能会影响业务传输,比如引起业务丢包、端口拥塞,进而影响其他同优先级的业务等。
因此,确定各网络节点之间是否存在环路是至关重要的。
发明内容
本申请提供了一种环路的检测方法和装置,以期通过判断接收报文时的接口与转发该报文时的出接口是否一致,来确定节点之间是否存在环路,以便于在存在环路的情况下,及时调整对报文的转发操作,从而避免端口拥塞、业务丢包等问题。
第一方面,本申请提供了一种环路的检测方法,该方法可以由第一节点来执行,或者,也可以由配置在第一节点中的部件(如芯片、芯片系统等)执行,本申请对此不作限定。
示例性地,该方法包括:第一节点从第一接口接收来自第二节点的报文,该报文外层封装节点段标识(segment identifier,SID),该节点SID用于标识目的节点;第一节点基于节点SID,确定用于转发报文的出接口是第一接口;第一节点确定报文的转发路径中存在环路。
基于上述技术方案,第一节点通过判断接收报文时的接口与转发该报文时的出接口是 否一致,来确定该第一节点与上一跳节点之间是否存在环路,如二者一致的情况下确定存在环路,进而可以及时调整对报文的转发操作,从而避免引起端口堵塞,业务丢包等问题。
结合第一方面,在第一方面可能的实现方式中,第一节点可以基于SR-BE转发报文,也可以基于第六代(version 6)因特网协议(internet protocol,IP)(IPv6)的SR(简称SRv6)BE转发该报文。且两种情况下转发报文时报文外层封装的节点SID不同。
上述报文外层封装节点SID有如下两种可能的情况:
一种可能的情况是,第一节点基于传统的SR-BE转发报文,节点SID对应于多协议标签交换(multiprotocol label switching,MPLS)标签。
具体地,报文外层封装节点SID是指基于节点SID与段路由全局块(segment routing global block,SRGB)的起始地址的和确定的对应于节点SID的标签。例如,第一节点转发报文时所携带的出标签是下一跳节点的SRGB的起始地址与目的节点的节点SID的和。
另一种可能的情况是,第一节点基于SRv6BE转发报文,节点SID对应于SRv6SID。具体地,报文外层封装节点SID是指基于目的地址封装的SRv6SID。
结合第一方面,在第一方面可能的实现方式中,所述方法还包括:第一节点基于报文封装的入标签携带的节点SID,确定出标签携带的节点SID与入标签携带的节点SID相同;第一节点确定报文的转发路径中存在环路。
第一节点通过确定接收报文时的接口与转发该报文时的出接口一致,且出标签携带的节点SID与入标签携带的节点SID相同,来确定第一节点与第二节点之间存在环路,可以有效地避免在SR-TE的情况下误判该报文的转发路径中存在环路。可以理解,若网络中完全部署SR-BE,则可以通过判断接收报文时的接口与转发该报文时的出接口是否一致,来确定该第一节点与上一跳节点之间是否存在环路;若网络中完全部署SRv6BE,换言之,报文外层只封装了目的地址的节点SID,则可以通过判断接收报文时的接口与转发该报文时的出接口是否一致,来确定该第一节点与上一跳节点之间是否存在环路;若网络中部署SR-TE隧道,且SR-TE隧道中标签栈的类型为节点SID和邻接SID组成的混合标签栈的形式,换言之,报文外层封装节点SID和邻接SID的标签栈,则第一节点还需要基于入标签携带的节点SID,确定出标签携带的节点SID与入标签携带的节点SID是否相同,避免在SR-TE基于节点SID和邻接SID组成的混合标签栈转发报文的情况下误判该路径存在环路。
结合第一方面,在第一方面可能的实现方式中,所述方法还包括:第一节点调整报文的转发操作,避免通过第一接口向第二节点转发该报文。
一种可能的设计是,第一节点在报文的转发路径中存在环路的情况下,直接丢弃该报文。通过在报文的转发路径中存在环路时,直接丢弃该报文,可以避免端口堵塞,影响其他同优先级的业务。
另一种可能的设计是,第一节点通过备路径转发该报文,具体地,第一节点通过第二接口向下一跳节点转发该报文,其中,经过第二接口到目的节点的路径为用于转发报文的备路径。第一节点通过备路径转发报文,可以避免业务丢包、端口堵塞等问题。
第二方面,本申请提供了一种环路的检测装置,可以实现上述第一方面以及第一方面任一种可能的实现方式中的方法。该装置包括用于执行上述方法的相应的单元。该装置包括的单元可以通过软件和/或硬件方式实现。
第三方面,本申请提供了一种环路的检测装置,该环路的检测装置包括处理器。该处理器与存储器耦合,可用于执行存储器中的计算机程序,以实现第一方面以及第一方面任一种可能实现方式中的环路的检测方法。
可选地,该装置还包括存储器。
可选地,该装置还包括通信接口,处理器与通信接口耦合。
第四方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序或指令,当该计算机程序或指令被执行时,以实现第一方面以及第一方面任一种可能实现方式中的环路的检测方法。
第五方面,本申请提供了一种计算机程序产品,该计算机程序产品包括计算机程序,当该计算机程序被运行时,以实现第一方面以及第一方面任一种可能实现方式中的环路的检测方法。
第六方面,本申请提供了一种芯片系统,该芯片系统包括处理器,还可以包括存储器,用于实现第一方面以及第一方面任一种可能实现方式中的环路的检测方法。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
应当理解的是,本申请的第二方面至第六方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
附图说明
图1是本申请实施例提供的SID的两种类型的示意图;
图2是本申请实施例提供的SR-BE转发流程的示意图;
图3是适用于本申请实施例提供的方法的应用场景示意图;
图4是适用于本申请实施例提供的方法的又一应用场景示意图;
图5是适用于本申请实施例提供的方法的再一应用场景示意图;
图6是本申请实施例提供的环路的检测方法的流程示意图;
图7是本申请实施例提供的第一节点基于节点SID确定出接口的示意图;
图8是本申请实施例提供的第一节点转发报文的示意图;
图9是本申请实施例提供的第一节点转发报文的又一示意图;
图10是本申请实施例提供的环路的检测装置的示意性框图;
图11是本申请实施例提供的环路的检测装置的另一示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
为了便于清楚描述本申请实施例的技术方案,在本申请实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一节点和第二节点是为了区分不同的网络节点,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的 那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为了更好地理解本申请实施例提供的环路的检测方法,下面首先对本申请中涉及到的术语作简单说明。
1、SR:是用于转发报文的一种技术。SR将网络分为一个或多个段(segment),为这些段和网络中的网络节点分配标识(identifier,ID),即SID,并对SID进行有序排列,也就是,对各个段和网络中的节点进行有序排列,就可以得到一条转发路径,其本质类似于源路由。SR分为SR-TE和SR-BE两种类型,本申请实施例提供的方法既可以适用于传统的SR-BE技术中,也可以适用于SRv6BE技术中。
2、SID:相当于传统MPLS技术中的MPLS标签,在SR-BE技术中,SID在转发层面即可映射为MPLS标签。SID分为两种类型,分别是节点SID(Node SID)和邻接SID(Adjacency SID)。图1示出了SID的两种类型的示意图。
图1中的a)是Node SID的一示例,Node SID是特殊的前缀SID(Prefix SID),用于标识特定的网络节点,在节点的环回(Loopback)接口下配置IP地址作为前缀,则此节点的Node SID就是Prefix SID,换言之,Node SID也可以称为Prefix SID。例如,A节点分配的Node SID为101,B节点分配的Node SID为102,C节点分配的Node SID为103,换言之,101可以标识A节点,102可以标识B节点,103可以标识C节点。
图1中的b)是Adjacency SID的一示例,Adjacency SID用于标识网络中某个网络节点的某个邻接,具有一定的方向性,例如,A节点到B节点的Adjacency SID为1001,B节点到C节点的Adjacency SID为1002。在本申请实施例中,使用Node SID标识目的节点。
3、段路由全局块(segment routing global block,SRGB):用户指定的为SR预留的MPLS标签范围。例如,某一网络节点的SRGB为[16000,23999],其中,16000是该SRGB的起始地址。
4、SR-BE:IGP通过SPF计算得到最优的LSP,是一种隧道技术,在SR-BE技术中,目的节点的Node SID通过IGP协议扩散到各个节点,每个节点基于本地的SRGB计算标签值,使用中间系统到中间系统(intermediate system to intermediate system,IS-IS)路由协议或开放最短路径优先(open shortest path first,OSPF)路由协议计算标签转发路径,找到下一跳节点,指导报文转发到目的节点。
在SR-BE技术中,IGP也可以计算生成一条能为SR-BE隧道提供链路及节点保护的TI-LFA,也可称为备路径。当某处链路或节点发生故障时,流量会快速切换到备路径,报文通过备路径转发。
图2是本申请实施例提供的SR-BE转发流程的一示例。如图2所示,报文需要从A节点转发到D节点,报文从A节点输入,IGP协议将目的节点(即D节点)的Node SID=100扩散到各个网络节点,A节点的SRGB为[16000,23999],动作是压栈(push),A节点在报文外层封装标签26100,该标签26100为下一跳节点的SRGB的起始地址与Node SID的和。A节点将报文发送给下一跳节点(即B节点),B节点的SRGB为[26000,65535],动作是交换(swap),B节点接收报文,此时报文外层封装的标签为26100。
在本申请实施例中,为了便于区分报文进入B节点时所封装的标签与输出B节点时所 封装的标签,将报文进入B节点时所封装的标签记为入标签,即入标签为26100,将报文从B节点输出时所封装的标签记为出标签。
B节点接收报文后,基于标签交换表确定出将报文发送至下一跳节点时需要封装的标签,即出标签。应理解,报文携带该出标签进入下一跳节点,即相当于报文进入下一跳节点时的入标签。B节点交换报文外层封装的标签,将入标签26100替换为出标签36100,该标签36100为下一跳节点的SRGB的起始地址与Node SID的和。
可以理解,C节点的转发过程与B节点类似,此处不再详述。报文到达目的节点(即D节点)后,动作是弹栈(pop),删除报文外层封装的标签16100,按IP继续转发即可。
5、SRv6:SRv6是SR技术在IPv6网络平面的应用。SRv6技术在IPv6报文中新增段路由头(segment routing header,SRH)的报头,用于存储128比特(bits)IPv6地址格式的SRv6SID列表,SRv6SID可以定义特定节点的路径信息以及服务和功能信息。在SRv6BE技术中,SRv6SID列表中只包含一个SID,可以将IPv6报文头部的目的地址设置为该SID,不需要插入SRH。换言之,SRv6BE技术中,报文的外层的SID封装的是目的节点的IP地址。
下面对适用于本申请实施例提供的环路的检测方法的应用场景作简单描述。
一种可能的场景是,报文的转发路径中完全部署SR-BE,则报文外层封装的MPLS标签,当链路故障或故障恢复时,都会触发网络节点的路由收敛,各网络节点重新计算LSP,由于各网络节点控制面的性能差异,进而导致将LSP下发到转发面的时间不一致,导致某些网络节点之间形成环路。下面将分别对SR-BE技术中,链路出现故障时和故障恢复时形成环路的情景做简单描述。
下面结合图3,对SR-BE链路出现故障时形成环路的情景进行介绍。
如图3所示,报文由A节点转发至D节点,各网元部署IS-IS协议,使能SR后,由A节点到D节点的最优的SR-BE LSP(即主路径)为A→D,由A节点到D节点的备路径为A→B→C→D。报文从A节点输入,当A→D的链路无故障时,报文沿主路径A→D转发。当A→D的链路出现故障时,A节点的业务流量快速切换至备路径A→B→C→D,此时不会形成环路。随后各节点的路由收敛,但A节点的路由的收敛速度比B节点快,也就是说,当A节点的路由完成收敛时,B节点的路由可能还没有完成收敛。
示例性地,A节点的路由完成收敛,收敛后下发至转发面的路径是A→B→C→D,A节点的下一跳节点更新为B节点,而B节点的路由可能还没有完成收敛,换言之,B节点的转发面并没有接收到新计算的LSP。假设B节点到D节点的SR-BE LSP原来为B→A→D,可以看出,在B节点形成了相反方向的流量,则A节点和B节点之间形成环路。当B节点的路由完成收敛,收敛后的SR-BE LSP为B→C→D,则环路消失。
下面结合图4,对SR-BE链路故障恢复时形成环路的情景进行介绍。
如图4所示,在A→D之间的链路故障恢复前,A节点到D节点的SR-BE LSP是A→B→C→D,B节点到D节点的SR-BE LSP是B→C→D。当A→D之间的链路故障恢复时,各网络节点的路由收敛,B节点的路由收敛的速度可能比A节点快。
示例性地,B节点的路由完成收敛,收敛后下发至转发面的路径是B→A→D,B节点的下一跳节点更新为A节点,但是A节点可能还没有完成收敛,A节点到D节点的路径依然是A→B→C→D,则A节点和B节点之间形成环路。当A节点的路由完成收敛,收 敛后的主路径为A→D,备路径为A→B→C→D,报文从A节点到D节点通过主路径A→D转发,环路消失。
应理解,图3和图4所描述的情景仅为示例,在另一些实施例中,报文的转发路径上可以存在更多或更少数量的网络节点,或其他的标签交换路径,本申请实施例对此不作限定。
另一种可能的场景是,报文的转发路径中部署了SR-TE,且报文外封装的是Node SID和邻接SID组成的混合标签栈,换言之,报文在整个转发路径中一部分基于Node SID转发,一部分基于邻接SID转发。SR-TE LSP转发标签栈有两种:一种是邻接SID组成的标签栈,另一种Node SID和邻接SID组成的混合标签栈。如图5所示,报文从A节点转发到F节点,报文外层封装Node SID和邻接SID组成的混合标签栈,当链路出现故障时,报文沿着备路径转发,随后各个节点的路由收敛,以B节点为例,报文从A节点到B节点基于Node SID计算标签交换路径,A节点的路由收敛完成,下发至转发面的路径是A→B→C→D→E→F,即下一跳节点是B节点,但B节点的路由未收敛完成,则继续按照原来的路径B→A→F转发,则A节点和B节点之间形成环路。
可以理解的是,在SR-BE技术中,当链路出现故障或故障恢复时,由于不同网络节点的设备的性能差异,或某一网络节点的控制面繁忙,导致收敛速度不一致,换言之,新计算的LSP下发到转发面的时间不一致,进而导致形成短暂环路,而环路可能会影响业务传输,比如引起业务丢包、端口拥塞,进而影响其他同优先级的业务等。因此,判断出节点之间是否存在环路是至关重要的。
基于此,本申请提供了一种环路的检测方法,基于第一节点接收报文时的接口与转发该报文时的出接口是否一致,来确定该第一节点与上一跳节点之间是否存在环路,如,在二者一致的情况下确定存在环路,进而可以及时调整对报文的转发操作,从而避免引起端口堵塞,业务丢包等问题。
图6是本申请实施例提供的环路的检测方法600的流程示意图,图6所示的方法600可以包括S610至S640,下面将详细说明方法600中的各个步骤。
应理解,图6所示的方法中以第一节点为执行主体来描述。该第一节点可以是中间节点,对于一条LSP通道来说,第一节点的两端均可以使用以太接口与相邻的网络节点连接。在本申请实施例中,第一节点的上一跳节点记为第二节点,第二节点有可能是中间节点,也可能是边缘节点,本申请实施例对此不作限定。其中,边缘节点的一端使用以太接口与相邻的网络节点连接,另一端使用用户接口与用户设备连接。
S610、第一节点从第一接口接收来自第二节点的报文。
其中,所述报文外层封装Node SID,该Node SID用于标识目的节点。第二节点是第一节点的上一跳节点,第一接口是第一节点连接第二节点的接口。
应理解,上述目的节点是报文的转发路径中SR-BE隧道的尾节点。例如,报文的转发路径上完全部署了SR-BE隧道时,该目的节点可以是SR-BE隧道的尾节点,也可以称为报文的目的节点,当报文的转发路径上部署了Node SID和邻接SID组成混合标签栈的SR-TE隧道时,换言之,报文一部分基于Node SID转发,一部分基于邻接SID转发,则该目的节点为基于Node SID转发报文的路径的尾节点,不能称之为报文的目的节点。
可选地,第一节点可以基于传统的SR-BE转发所述报文,也可以基于SRv6BE转发 所述报文。
当第一节点基于传统的SR-BE转发所述报文时,Node SID对应于MPLS标签,报文的外层的标签封装的是Node SID标签。具体地,所述报文外层封装Node SID是指基于Node SID与SRGB的起始地址的和确定的对应于Node SID的标签(如前所述的入标签、出标签)。例如,第一节点转发所述报文时所携带的出标签是下一跳节点的SRGB的起始地址与目的节点的Node SID的和。
当第一节点基于SRv6BE转发报文时,Node SID对应于SRv6SID。前已述及,SRv6BE技术中,可以将IPv6头的目的地址设置为SID,所述报文外层封装Node SID是指基于目的地址封装的SRv6SID。
需要说明的是,第二节点将所述报文发送给第一节点的两种情况如下:
一种可能的情况是,第二节点感知到用于转发所述报文的主路径出现故障,例如,第二节点感知第二节点连接用于转发报文的主路径上的下一跳节点的接口宕机,则第二节点确定主路径的链路出现故障,第二节点将报文沿备路径转发,该备路径上下一跳节点为第一节点,即第二节点将报文发送至第一节点,相应地,第一节点从第一接口接收来自第二节点的报文。
另一种可能的情况是,第二节点感知到用于转发所述报文的主路径链路故障恢复,例如,第二节点可以通过确定接口是否恢复来确定链路故障是否恢复。链路故障时,第二节点的下一跳节点为第一节点,链路故障恢复,第二节点的转发面未接收到新的LSP时,第二节点依然按照链路故障时规划的路径转发上述报文,即第二节点将报文发送给第一节点,相应地,第一节点从第一接口接收来自第二节点的报文。
应理解,第一节点只能感知相邻节点的链路故障,如图3所示的A节点到D节点的链路故障时,第二节点(如A节点)可以感知链路故障,进而切换至备路径转发报文,但第一节点(如B节点)无法感知A节点到D节点的链路故障,因此,B节点无法同A节点一样,自动切换至备路径转发所述报文。
综合上述两种情况下,第二节点将报文发送给第一节点,相应地,第一节点从第一接口接收来自第二节点的报文,其中,第一接口为第一节点连接第二节点的接口。
S620、第一节点基于Node SID,确定用于转发报文的出接口是否是第一接口。
第一节点接收报文后,可以记录下接收该报文的接口,即第一接口,进一步确定出用于转发该报文的出接口,其中,出接口是指第一节点输出所述报文时的接口。可以理解,第一节点确定用于转发报文的出接口是第一接口,是指第一节点确定接收所述报文的接口和发送该报文的接口是同一接口,即第一节点的下一跳节点为第二节点。若第一节点确定用于转发报文的出接口不是第一接口,换言之,第一节点确定接收所述报文的接口和发送该报文的接口不是同一接口,则第一节点和上一跳节点之间不存在环路,无需执行S630和S640。
第一节点接收报文后,基于报文外层封装的Node SID,确定用于转发该报文的出接口。前已述及,报文外层封装的Node SID有两种可能的情况,分别是Node SID对应于MPLS标签和Node SID对应于SRv6SID。图7是第一节点确定用于转发报文的出接口的示意图。下面结合图7详细描述Node SID对应于MPLS标签时,第一节点基于Node SID确定用于转发所述报文的出接口的过程。
一种可能的实现方式是,第一节点确定出接口为第一接口。如图7所示,第一节点从第一接口接收报文,该报文外层封装有入标签,该入标签携带有目的节点的Node SID。第一节点基于入标签查询标签交换表,基于标签交换表确定下一跳转发表的索引,根据索引,查询到下一跳转发表,下一跳转发表中有主路径和备路径上下一跳节点的相关信息,如出标签、下一跳节点的SRGB、以及出接口。则第一节点可以根据下一跳转发表确定出用于转发报文的主路径的出接口是第一接口。
作为可选的步骤,第一节点基于报文封装的入标签携带的Node SID,确定出标签携带的Node SID与入标签携带的Node SID相同。
应理解,Node SID对应于MPLS标签,即报文外层封装的是第一节点基于Node SID与SRGB的起始地址的和确定的标签,由上文可知,有两种可能的场景,一种是网络中完全部署SR-BE隧道,另一种是部署基于Node SID和邻接SID组成的混合标签栈的SR-TE隧道。因此,当网络中部署基于Node SID和邻接SID组成的混合标签栈的SR-TE隧道时,报文外层封装Node SID和邻接SID,第一节点还需要基于入标签携带的Node SID,确定出标签携带的Node SID与入标签携带的Node SID相同,避免在SR-TE基于邻接标签转发的情况下误判该路径存在环路。
另一种可能的实现方式是,第一节点确定出标签携带的Node SID与入标签携带的Node SID相同,且出接口为第一接口。如图7所示,第一节点从第一接口接收报文,该报文外层封装有入标签,该入标签携带有目的节点的Node SID。第一节点基于该报文头部的入标签计算出Node SID,即入标签和本地的SRGB的差值为入标签携带的Node SID。进一步地,第一节点基于该入标签查询标签交换表,得到下一跳转发表索引,根据下一跳转发表索引,查询下一跳转发表,根据下一跳转发表中主路径上的出标签确定出标签携带的Node SID,即出标签与SRGB的差值。第一节点可以得出出标签携带的Node SID与入标签携带的Node SID相同,且出接口为第一接口。
需要说明的是,在一些实施例中,下一跳转发表的信息可以携带待标签交换表中,换言之,标签交换表中无需存储下一跳转发表的索引,直接存储下一跳节点的相关信息。
还应理解,在上述实施例中,下一跳转发表中存储有主路径和备路径的相关信息,在一些实施例中,下一跳转发表中只有主路径的相关信息,即查询不到备路径的相关信息。
下面描述Node SID对应于SRv6SID时,第一节点基于Node SID确定用于转发报文的出接口的过程。
需要说明的是,在SRv6BE技术中,SID可以统称为虚拟专用网络(virtual private network,VPN)SID,其中,在IPv4VPN场景中,SID可以称为“END.DT4SID”,在IPv6VPN场景中,SID可以称为“END.DT6SID”。在本申请实施例中,Node SID对应于SRv6SID可以理解为报文外层基于目的地址封装VPN SID。为了便于清楚地描述本申请实施例,下面将SRv6BE技术中的SID称为VPN SID。应理解,上文所述的SRv6SID可以理解为SRv6BE技术中的SID,与此处描述的VPN SID含义相同。
第一节点从第一接口接收报文,该报文外层封装Node SID是指基于目的地址封装的VPN SID,换言之,该报文外层是目的节点的IP地址。第一节点首先判断报文外层封装的是VPN SID,再判断接收报文的接口和用于转发报文的出接口是否一致。具体地,第一节点基于目的地址查询路由转发表,基于路由转发表确定下一跳转发表的索引,根据索引, 查询到下一跳转发表,根据下一跳转发表确定出用于转发报文的主路径的出接口是第一接口。
S630、第一节点确定报文的转发路径中存在环路。
在S620中,第一节点确定用于转发报文的出接口是否是第一接口,若用于转发报文的出接口是第一接口,则执行S630和S640;若用于转发报文的出接口不是第一接口,则报文的转发路径中不存在环路,继续按照原路径转发即可。
第一节点确定报文的转发路径中存在环路有如下两种可能的设计:
一种可能的设计是,第一节点基于Node SID,确定用于转发报文的出接口是第一接口之后,确定报文的转发路径中存在环路,即第一节点和第二节点之间存在环路。
另一种可能的设计是,第一节点基于Node SID,确定用于转发报文的出接口是第一接口且报文封装的入标签携带的Node SID与出标签携带的Node SID相同之后,确定报文的转发路径中存在环路,即第一节点和第二节点之间存在环路。
S640、第一节点调整对报文的转发操作。
第一节点确定报文的转发路径中存在环路之后,可以通过如下两种方式调整对报文的转发操作,避免第一节点从第一接口向第二节点转发该报文。
一种可能的实现方式是,第一节点直接丢弃报文,避免端口拥塞,进而影响其他优先级的业务,直至第一节点的转发面接收到新的LSP时,报文沿着新路径转发。
另一种可能的实现方式是,第一节点通过备路径转发报文。第一节点确定报文的转发路径中存在环路后,可以基于下一跳转发表中存储的用于转发报文的备路径转发该报文。第一节点根据用于转发该报文的备路径,确定与下一跳节点连接的第二接口,从第二接口向目的节点转发报文,第一节点通过第二接口到目的节点的路径为用于转发所述报文的备路径,也就是说,当能够从下一跳转发表中查询到备路径时,第一节点通过备路径转发报文。直至当第一节点的转发面接收到新的LSP时,报文沿着新路径转发。
可以理解,上述两种实现方式仅为调整对报文的转发操作的两个示例。在一些实施例中,第一节点可以基于下一跳转发表确定是否存在备路径,再进一步选择如何处理报文。示例性地,第一节点确定报文的转发路径中存在环路之后,进一步确定下一跳转发表中是否可以查询到用于转发上述报文的备路径。若第一节点查询到用于转发报文的备路径,则按照备路径转发报文;若没有查询到用于转发报文的备路径,则丢弃报文,避免端口拥塞,影响其他优先级的业务。
图8是第一节点转发报文的一示例。需要说明的是,图8是基于SR-BE转发报文,A节点到D节点的链路发生故障时,第一节点转发报文的详细流程。
如图8所示,以A节点为第二节点,B节点为第一节点为例来进行描述。A节点本地的SRGB的范围为[1000,4000],B节点本地的SRGB的范围为[2000,5000],目的节点为D节点,即部署SR-BE隧道的尾节点为D节点。A节点感知到A节点到D节点的链路故障,切换至备路径A→B→C→D转发报文。随后各节点的路由收敛,A节点的收敛速度比B节点快,即A节点已经将计算的新的LSP下发至转发面,即A→B→C→D。对于B节点来说,收敛前的主路径是B→A→D,备路径是B→C→D。B节点尚未将新的SR-BE LSP下发至转发面。
B节点从接口3(即第一接口)接收来自于A节点的报文,基于报文外层封装的入标 签2100查询标签交换表,标签交换表中下一跳转发表的索引为10,根据索引10查询下一跳转发表,下一跳转发表中,沿主路径转发报文时,出标签为2100,SRGB为2000,出接口为接口3。可以看出出标签携带的Node SID为2100-2000=100,入标签携带的Node SID为2100-2000=100,接口3即第一接口,因此,A节点和B节点之间存在环路。
由图中的下一跳转发表可知,下一跳转发表中存储有备路径的相关信息,B节点可以从接口4(即第二接口)转发报文,下一跳节点为C节点,对于B节点而言,报文沿着备路径转发,直至B节点收敛完成,新的SR-BE LSP下发至转发面。应理解,B节点将报文封装的入标签2100交换为出标签3100,B节点从接口4转发报文时所封装的出标签为3100。
收敛完成后,对于B节点而言,新的SR-BE LSP下发至转发面,新的SR-BE LSP为B→C→D,报文沿着B→C→D转发。
应理解,对于C节点也可以通过上述方法确定出C节点与B节点之间是否存在环路,为了简洁,此处不再详述。
图9是第一节点转发报文的又一示例。需要说明的是,图9是基于SR-BE转发报文,A节点到D节点的链路故障恢复时,第一节点转发报文的详细流程。
如图9所示,以A节点为第二节点,B节点为第一节点为例来进行描述。A节点本地的SRGB的范围为[1000,4000],B节点本地的SRGB的范围为[2000,5000],目的节点为D节点。A节点感知到A节点到D节点的链路故障恢复,各网络节点的路由收敛,做出如下假设:A节点的收敛速度比B节点慢,换言之,B节点已经将计算的新的SR-BE LSP下发至转发面,即主路径是B→A→D,备路径是B→C→D,收敛前B节点到D节点的路径为B→C→D;对于A节点来说,收敛前的SR-BE LSP是A→B→C→D,A节点尚未收敛完成,即未将新的SR-BE LSP下发至转发面,则A节点继续将报文发送给B节点。
B节点已收敛完成,其转发面接收到新的SR-BE LSP。B节点从接口3(即第一接口)接收来自于A节点的报文,基于报文外层封装的入标签2100查询标签交换表,标签交换表中下一跳转发表的索引为10,根据索引10查询下一跳转发表,下一跳转发表中,沿主路径转发报文时,出标签为2100,SRGB为2000,出接口为接口3。可以看出出标签携带的Node SID为2100-2000=100,入标签携带的Node SID为2100-2000=100,接口3即第一接口,因此,A节点和B节点之间存在环路。
由图中的下一跳转发表可知,下一跳转发表中存储有备路径的相关信息,B节点可以从接口4(即第二接口)转发报文,下一跳节点为C节点,对于A节点而言,当A节点的转发面接收到新的SR-BE LSP时,报文沿着新的SR-BE LSP转发。应理解,B节点将报文封装的入标签2100交换为出标签3100,B节点从接口4转发报文时所封装的出标签为3100。
基于上述技术方案,通过确定第一节点接收报文时的接口与转发该报文时的出接口是否一致,确定报文的转发路径中是否存在环路,在报文的转发路径中存在环路的情况下,进一步调整报文的转发路径,如将报文沿备路径转发、将报文丢弃等,从而及时地破坏报文转发路径中的环路,避免了端口堵塞,业务丢包等问题。
下文将结合图10和图11详细说明本申请实施例提供的环路的检测装置。
图10是本申请实施例提供的环路的检测装置1000的示意性框图。如图10所示,该装置1000可以包括:收发单元1010和处理单元1020。该装置1000中的各单元可用于实 现图6所示的方法600中第一节点执行的相应流程。
当该装置1000用于执行上述方法实施例中第一节点执行的步骤时,其中,收发单元1010可用于从第一接口接收来自第二节点的报文,该报文外层封装Node SID,该Node SID用于标识目的节点;处理单元1020可用于基于Node SID,确定用于转发报文的出接口是第一接口;还可以用于确定报文的转发路径中存在环路。具体参见方法实施例中的详细描述,此处不作赘述。
应理解,各单元执行上述相应步骤的具体过程在上述方法实施例中已经详细说明,为了简洁,在此不再赘述。
还应理解,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。另外,在本申请各个实施例中的各功能单元可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
图11是本申请实施例提供的环路的检测装置1100的另一示意性框图。该装置1100可以为芯片系统,或者,也可以为配置了芯片系统,以用于实现上述方法实施例中环路的检测功能的装置。在本申请实施例中,芯片系统可以由芯片构成,也可以包含芯片和其他分立元器件。
如图11所示,该装置1100可以包括处理器1110和通信接口1120。其中,通信接口1120可用于通过传输介质和其它设备进行通信,从而用于装置1100中的装置可以和其它设备进行通信。所述通信接口1120例如可以是收发器、接口、总线、电路或者能够实现收发功能的装置。处理器1110可利用通信接口1120输入输出数据,并用于实现图6对应的实施例中所述的环路的检测方法。具体地,该装置1100可用于实现上述方法实施例第一节点的功能。
示例性地,若该装置1100用于实现本申请实施例提供的方法中第一节点的功能,该处理器1110可用于控制通信接口1120接收来自第二节点的报文,所述报文外层封装Node SID,该Node SID用于标识目的节点;该处理器1110还可用于基于Node SID,确定用于转发报文的出接口是第一接口;还可以用于确定报文的转发路径中存在环路。具体参见方法实施例中的详细描述,此处不作赘述。
可选地,该装置1100还包括至少一个存储器1130,用于存储程序指令和/或数据。存储器1130和处理器1110耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器1110可能和存储器1130协同操作。处理器1110可能执行存储器1130中存储的程序指令。所述至少一个存储器中的至少一个可以包括于处理器中。
本申请实施例中不限定上述处理器1110、通信接口1120以及存储器1130之间的具体连接介质。本申请实施例在图11中以处理器1110、通信接口1120以及存储器1130之间通过总线1140连接。总线1140在图11中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本申请还提供一种计算机程序产品,所述计算机程序产品包括:计算机程序(也可以称为代码,或指令),当所述计算机程序被运行时,使得计算机执行图6所示实施例的方 法。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序(也可以称为代码,或指令)。当所述计算机程序被运行时,使得计算机执行图6所示实施例的方法。
应理解,本申请实施例中的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门电路或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本说明书中使用的术语“单元”、“模块”等,可用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各种说明性逻辑块(illustrative logical block)和步骤(step),能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信 连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分立部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
在上述实施例中,各功能单元的功能可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令(程序)。在计算机上加载和执行所述计算机程序指令(程序)时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (21)

  1. 一种环路的检测方法,其特征在于,包括:
    第一节点从第一接口接收来自第二节点的报文,所述报文外层封装节点段标识SID,所述节点SID用于标识目的节点;
    所述第一节点基于所述节点SID,确定用于转发所述报文的出接口是所述第一接口;
    所述第一节点确定所述报文的转发路径中存在环路。
  2. 如权利要求1所述的方法,其特征在于,所述节点SID对应于多协议标记交换MPLS标签。
  3. 如权利要求2所述的方法,其特征在于,所述方法还包括:
    所述第一节点基于所述报文封装的入标签携带的节点SID,确定出标签携带的节点SID与所述入标签携带的节点SID相同;
    所述第一节点确定所述报文的转发路径中存在环路。
  4. 如权利要求2或3所述的方法,其特征在于,所述第一节点基于尽力而为段路由SR-BE转发所述报文。
  5. 如权利要求1所述的方法,其特征在于,所述节点SID对应于基于第六版因特网协议IPv6的段路由SRv6 SID。
  6. 如权利要求5所述的方法,其特征在于,所述第一节点基于IPv6的尽力而为段路由SRv6 BE转发所述报文。
  7. 如权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:
    所述第一节点避免通过所述第一接口向所述第二节点转发所述报文。
  8. 如权利要求7所述的方法,其特征在于,所述第一节点避免通过所述第一接口向所述第二节点转发所述报文,包括:
    所述第一节点通过第二接口向所述目的节点转发所述报文,所述第一节点通过所述第二接口到所述目的节点的路径为用于转发所述报文的备路径。
  9. 如权利要求7所述的方法,其特征在于,所述第一节点避免通过所述第一接口向所述第二节点转发所述报文,包括:
    所述第一节点丢弃所述报文。
  10. 一种环路的检测装置,其特征在于,包括:
    收发单元,用于从第一接口接收来自第二节点的报文,所述报文外层封装节点段标识SID,所述节点SID用于标识目的节点;
    处理单元,用于基于所述节点SID,确定用于转发所述报文的出接口是所述第一接口;
    所述处理单元还用于确定所述报文的转发路径中存在环路。
  11. 如权利要求10所述的装置,其特征在于,所述节点SID对应于多协议标记交换MPLS标签。
  12. 如权利要求11所述的装置,其特征在于,所述处理单元还用于:
    基于所述报文封装的入标签携带的节点SID,确定出标签携带的节点SID与所述入标签携带的节点SID相同;
    确定所述报文的转发路径中存在环路。
  13. 如权利要求11或12所述的装置,其特征在于,所述处理单元具体用于基于尽力 而为段路由SR-BE转发所述报文。
  14. 如权利要求10所述的装置,其特征在于,所述节点SID对应于基于第六版因特网协议IPv6的段路由SRv6 SID。
  15. 如权利要求14所述的装置,其特征在于,所述处理单元具体用于基于IPv6的尽力而为段路由SRv6 BE转发所述报文。
  16. 如权利要求10至15中任一项所述的装置,其特征在于,所述处理单元还用于:
    避免通过所述第一接口向所述第二节点转发所述报文。
  17. 如权利要求16所述的装置,其特征在于,所述处理单元具体用于:
    通过第二接口向所述目的节点转发所述报文,其中,通过所述第二接口到所述目的节点的路径为用于转发所述报文的备路径。
  18. 如权利要求16所述的装置,其特征在于,所述处理单元具体用于丢弃所述报文。
  19. 一种环路的检测装置,其特征在于,包括:
    存储器,存储有指令;
    处理器,当所述指令被所述处理器运行时,使得所述检测装置执行如权利要求1至9中任一项所述的方法。
  20. 一种计算机可读存储介质,其特征在于,包括计算机程序,当所述计算机程序在处理器上运行时,执行如权利要求1至9中任一项所述的方法。
  21. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被处理器运行时,执行如权利要求1至9中任一项所述的方法。
PCT/CN2022/118349 2021-09-26 2022-09-13 一种环路的检测方法和装置 WO2023045793A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP22871841.7A EP4346181A1 (en) 2021-09-26 2022-09-13 Loop detection method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111130398.7 2021-09-26
CN202111130398.7A CN115883446A (zh) 2021-09-26 2021-09-26 一种环路的检测方法和装置

Publications (1)

Publication Number Publication Date
WO2023045793A1 true WO2023045793A1 (zh) 2023-03-30

Family

ID=85719714

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/118349 WO2023045793A1 (zh) 2021-09-26 2022-09-13 一种环路的检测方法和装置

Country Status (3)

Country Link
EP (1) EP4346181A1 (zh)
CN (1) CN115883446A (zh)
WO (1) WO2023045793A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117527684A (zh) * 2022-07-30 2024-02-06 华为技术有限公司 一种报文传输方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764750A (zh) * 2009-12-07 2010-06-30 福建星网锐捷网络有限公司 报文封装方法和检测转发环路的方法、装置及网络设备
US20170346718A1 (en) * 2016-05-26 2017-11-30 Cisco Technology, Inc. Enforcing strict shortest path forwarding using strict segment identifiers
CN112511418A (zh) * 2020-06-22 2021-03-16 中兴通讯股份有限公司 报文指示方法、装置、设备和存储介质
CN113055295A (zh) * 2018-08-01 2021-06-29 华为技术有限公司 通信方法、通信设备和通信系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764750A (zh) * 2009-12-07 2010-06-30 福建星网锐捷网络有限公司 报文封装方法和检测转发环路的方法、装置及网络设备
US20170346718A1 (en) * 2016-05-26 2017-11-30 Cisco Technology, Inc. Enforcing strict shortest path forwarding using strict segment identifiers
CN113055295A (zh) * 2018-08-01 2021-06-29 华为技术有限公司 通信方法、通信设备和通信系统
CN112511418A (zh) * 2020-06-22 2021-03-16 中兴通讯股份有限公司 报文指示方法、装置、设备和存储介质

Also Published As

Publication number Publication date
EP4346181A1 (en) 2024-04-03
CN115883446A (zh) 2023-03-31

Similar Documents

Publication Publication Date Title
US11533249B2 (en) Route processing method and apparatus, and data transmission method and apparatus
CN111385206B (zh) 报文转发的方法、网络系统、相关设备及计算机存储介质
US20210399985A1 (en) Method for forwarding packet in network, network node, and network system
EP4102785A1 (en) Message processing method and apparatus, and network device and storage medium
US9444677B2 (en) Scalable edge node protection using IPv6 segment routing extension header
US9525619B2 (en) Scalable edge node protection using segment routing
WO2016115823A1 (zh) 标签构造以及标签报文转发方法及装置
US20220131808A1 (en) Packet Forwarding Method and Device, And Computer-Readable Storage Medium
WO2020134139A1 (zh) 一种业务数据的转发方法、网络设备及网络系统
CN112019433B (zh) 一种报文转发方法和装置
WO2020186803A1 (zh) 一种故障保护方法、节点及存储介质
US10110487B1 (en) Signaling priority information for encapsulated packets
KR102245989B1 (ko) 가상사설망의 이중화 관리 방법 및 그 방법이 구현된 네트워크 스위칭장치
WO2016124049A1 (zh) 用于获取端口路径的方法及装置
CN111213345B (zh) 用于发送或接收包含控制信息的报文的设备、方法和系统
WO2021088561A1 (zh) 位索引显式复制网络中负载分担的方法、装置及设备
WO2023045793A1 (zh) 一种环路的检测方法和装置
WO2016197950A1 (zh) 一种路径检测的方法、路由设备及系统
CN112737954B (zh) 报文处理方法、装置、系统、设备及存储介质
WO2022117018A1 (zh) 报文传输的方法和装置
WO2021073357A1 (zh) 报文处理方法、装置、系统、设备及存储介质
KR20210037086A (ko) 가상 애니캐스트 노드를 이용한 네트워크 절체 관리 방법
CN114520762B (zh) BIERv6报文的发送方法以及第一网络设备
CN115883452A (zh) 一种通信方法和通信装置
CN113132222B (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: 22871841

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022871841

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022871841

Country of ref document: EP

Effective date: 20231228