WO2024086991A1 - 一种节点保护方法、装置、电子设备及介质 - Google Patents

一种节点保护方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2024086991A1
WO2024086991A1 PCT/CN2022/127132 CN2022127132W WO2024086991A1 WO 2024086991 A1 WO2024086991 A1 WO 2024086991A1 CN 2022127132 W CN2022127132 W CN 2022127132W WO 2024086991 A1 WO2024086991 A1 WO 2024086991A1
Authority
WO
WIPO (PCT)
Prior art keywords
sid
service message
node
backup
end node
Prior art date
Application number
PCT/CN2022/127132
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 PCT/CN2022/127132 priority Critical patent/WO2024086991A1/zh
Priority to CN202280003757.9A priority patent/CN118251871A/zh
Publication of WO2024086991A1 publication Critical patent/WO2024086991A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks

Definitions

  • the present application relates to the field of communication technology, and in particular to a node protection method, device, electronic device and medium.
  • VoIP Voice over Internet Protocol
  • VoIP Voice over Internet Protocol
  • the present application provides a node protection method, device, electronic device and medium to reduce the service delay when a link or node fails.
  • the specific technical solution is as follows:
  • the present application provides a node protection method, which is applied to a first node and includes:
  • the first service message includes an IPv6 header and an SRH, where the IPv6 header includes a destination address, and the SRH includes a SID list, where the SID list includes a backup SID and a SID of an upper node of a primary path for forwarding the first service message;
  • the SRH further includes a SL; after acquiring the first service message, the method further includes:
  • the first SL is used as the current SL, and the process of obtaining the first SL according to the difference between the current SL and the fixed value and obtaining the first SID corresponding to the first SL from the SID list is repeated until the first SID of the reachable end node is obtained from the SID list;
  • the destination address is modified to the first SID of the reachable end node, a third service message is obtained, and the third service message is forwarded to the end node indicated by the first SID.
  • the method further includes:
  • the IPv6 header and the SRH are deleted to obtain a fourth service message
  • the end node indicated by the backup SID is a tail node on a backup path for forwarding the first service message
  • the end node indicated by the backup SID is the second node, and a BE path exists between the first node and the second node.
  • the SID encapsulated in the second-to-last element in the SID list is the SID of the tail node on the primary path, and the SID encapsulated in the last element is the backup SID.
  • obtaining the first service message includes:
  • the IPv6 header and the SRH are encapsulated in the outer layer of the fifth service message to obtain the first service message.
  • the present application provides a node protection device, which is applied to a first node, and includes:
  • An acquisition module configured to acquire a first service message, wherein the first service message includes an IPv6 header and an SRH, wherein the IPv6 header includes a destination address, and the SRH includes a SID list, wherein the SID list includes a backup SID and a SID of an upper node of a primary path for forwarding the first service message;
  • a sending module is used to forward a second service message to the end node indicated by the backup SID, wherein the second service message includes the destination address, the destination address is the backup SID, and the destination address is modified after determining that each end node on the primary path is an unreachable end node and the end node indicated by the backup SID is a reachable end node.
  • the SRH further includes a SL; the device further includes a modification module;
  • the acquisition module is further configured to obtain a first SL according to a difference between a current SL and a fixed value, and obtain a first SID corresponding to the first SL from the SID list; if the end node indicated by the first SID is unreachable, use the first SL as the current SL, and repeatedly perform the process of obtaining a first SL according to a difference between the current SL and the fixed value, and obtaining a first SID corresponding to the first SL from the SID list, until the first SID of a reachable end node is obtained from the SID list;
  • the modification module is used to modify the destination address to the backup SID if the first SID of the reachable end node is the backup SID, so as to obtain the second service message;
  • the modification module is further configured to modify the destination address to the first SID of the reachable end node if the first SID of the reachable end node is not the backup SID, so as to obtain a third service message;
  • the sending module is further used to forward the third service message to the end node indicated by the first SID.
  • the device further includes:
  • a deleting module configured to delete the IPv6 header and the SRH if the destination address is a SID configured with a specified additional behavior, to obtain a fourth service message
  • the sending module is further used to forward the fourth service message.
  • the end node indicated by the backup SID is a tail node on a backup path for forwarding the first service message
  • the end node indicated by the backup SID is the second node, and a BE path exists between the first node and the second node.
  • the SID encapsulated in the second-to-last element in the SID list is the SID of the tail node on the primary path, and the SID encapsulated in the last element is the backup SID.
  • the acquisition module is specifically configured to:
  • the IPv6 header and the SRH are encapsulated in the outer layer of the fifth service message to obtain the first service message.
  • the present application provides an electronic device, the electronic device comprising:
  • a machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions prompt the processor to perform the following steps:
  • the first service message includes an IPv6 header and an SRH, where the IPv6 header includes a destination address, where the SRH includes a SID list, where the SID list includes a backup SID and a SID of an upper node of a primary path for forwarding the first service message;
  • the SRH further includes a SL; and the machine executable instruction further causes the processor to perform the following steps:
  • the first SL is used as the current SL, and the process of obtaining the first SL according to the difference between the current SL and the fixed value and obtaining the first SID corresponding to the first SL from the SID list is repeated until the first SID of the reachable end node is obtained from the SID list;
  • the destination address is modified to the first SID of the reachable end node, a third service message is obtained, and the third service message is forwarded to the end node indicated by the first SID.
  • the machine executable instruction further causes the processor to perform the following steps:
  • the destination address is a SID configured with a specified additional behavior, deleting the IPv6 header and the SRH to obtain a fourth service message;
  • the end node indicated by the backup SID is a tail node on a backup path for forwarding the first service message
  • the end node indicated by the backup SID is the second node, and a BE path exists between the first node and the second node.
  • the SID encapsulated in the second-to-last element in the SID list is the SID of the tail node on the primary path, and the SID encapsulated in the last element is the backup SID.
  • the machine executable instruction specifically causes the processor to perform the following steps:
  • the IPv6 header and the SRH are encapsulated in the outer layer of the fifth service message to obtain the first service message.
  • an embodiment of the present application provides a machine-readable storage medium storing machine-executable instructions. When called and executed by a processor, the machine-executable instructions prompt the processor to perform the method described in the first aspect above.
  • an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect above.
  • the second service message can be forwarded to the end node indicated by the backup SID.
  • the first node on the main path can forward the first service message to the end node indicated by the backup SID, thereby reducing the service delay caused by node or link failure and improving network reliability.
  • Figure 1 is a schematic diagram of an SRv6 SID format
  • FIG2 is a schematic diagram of an SRv6 message format
  • FIG3 is an exemplary schematic diagram of an SRv6 message forwarding process
  • FIG4 is a flow chart of a node protection method provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of an SRH format provided in an embodiment of the present application.
  • FIG6 is a flow chart of another node protection method provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG8 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG9 is a schematic diagram of the structure of a node protection device provided in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • Segment Routing uses the source node path selection mechanism, and pre-encapsulates the SID (Segment Identifier) of the segment (Segment) that the forwarding path will pass through at the source node.
  • SID Segment Identifier
  • the SR node forwards the message according to the SID of the message. Except for the source node, other nodes do not need to maintain the path status.
  • Segment Routing IPv6 refers to the implementation of SR based on the IPv6 forwarding plane.
  • SRv6 can insert a routing extension header, namely the Segment Routing Header (SRH), into the IPv6 message, and add the SIDs of all the segments that the forwarding path must pass through in the SRH, namely the SID list, thereby explicitly specifying the forwarding path of the IPv6 message.
  • SRv6 provides a flexible and efficient control method for Software Defined Wide Area Network (SD-WAN), which has the characteristics of simple deployment and easy expansion, and can better realize traffic scheduling and path optimization, ensure the quality of key services, balance traffic distribution, improve dedicated line utilization and reduce line costs.
  • SD-WAN Software Defined Wide Area Network
  • nodes in an SRv6 network are divided into the following roles:
  • Source node responsible for inserting SRH into the IPv6 header of the IPv6 message, or encapsulating the IPv6 header and inserting SRH into the outer layer of the message.
  • the source node is used to introduce the message flow into the SRv6 path defined by the Segment List in the SRH.
  • Transit nodes Located on the SRv6 path of the message, they do not participate in SRv6 processing and only perform ordinary IPv6 message forwarding. Transit nodes can be nodes that support SRv6 or nodes that do not support SRv6.
  • Endpoint node If the IPv6 destination address of the received SRv6 message is the SRv6 SID configured on the Endpoint node, it is processed according to the instructions of the SRv6 SID and the SRH is updated. In subsequent embodiments, the Endpoint node is referred to as an end node.
  • Tail node the last endpoint node of the SRv6 forwarding path.
  • a node can have different roles in different SRv6 paths.
  • a node can be a source node in one SRv6 path and a transit node or endpoint node in other SRv6 paths.
  • SRv6 SID is used to define a certain network function and represent a certain network instruction.
  • the format of SRv6 SID is the form of IPv6 address, as shown in Figure 1.
  • SRv6 SID consists of four parts: Locator, Function, Arguments, and MBZ (Must be zero) fields.
  • Locator is used to identify the network segment to which the SID belongs.
  • the Locator is unique in the SR domain.
  • MBZ (Must be zero): When the sum of the bits of Locator, Function and Arguments is less than 128 bits, the remaining bits are padded with 0.
  • the SRv6 message encapsulation format is: add a new IPv6 header and SRH to the outer layer of the original three-layer data message.
  • SRH is a routing extension header with a routing type value of 4.
  • the format of the SRv6 message is shown in Figure 2.
  • the SRv6 message includes the IPv6 header, SRH, and the original message.
  • the IPv6 header includes: Version, Traffic class, Flow Label, Payload Length, Next header, Hop limit, Source Address (SA), Destination Address (DA), and the length of the source address and destination address can be 128 bits.
  • SA Source Address
  • DA Destination Address
  • the value of Next header is 43, indicating that the next header is a routing extension header.
  • SRH includes:
  • Next Header 8 bits in length, used to identify the type of the next message header.
  • SRH length (Hdr Ext Length) the length is 8 bits, indicating the length of the SRH header in units of 8 bytes, excluding the first 8 bytes.
  • Routing Type length is 8 bits, value is 4, indicating that it carries SRH.
  • Segment index (Segments Left, SL), with a length of 8 bits, indicates the number of the next SID to be found.
  • the initial value is n-1, where n indicates the number of SIDs encapsulated in the SRH.
  • the value of SL decreases by 1 every time an endpoint node is passed.
  • the last hop (Last Entry) is 8 bits long and its value is the number of the first SID in the actual forwarding path of the message in the SRH.
  • Flags 8 bits in length, which is flag information.
  • Tag with a length of 16 bits, is used to mark a group of messages with the same characteristics.
  • Segment List is a list of SIDs, which are arranged in descending order of the nodes on the packet forwarding path. That is, Segment List[0] represents the last SID on the forwarding path, Segment List[1] represents the second to last SID on the forwarding path, and so on. Since SID is in the format of an IPv6 address, each SID is a 128-bit IPv6 address.
  • Optional Type Length Value objects(variable) is an optional type length value object variable.
  • device A in FIG3 is a source node
  • device C and device E are endpoint nodes
  • device B and device D are transit nodes.
  • Step 1 After receiving the IPv6 message as the source node, device A encapsulates the SRH and IPv6 header for the IPv6 message, and then searches the routing table according to the destination address in the encapsulated IPv6 header, thereby forwarding the encapsulated message to device B.
  • Step 2 After receiving the message, device B searches the routing table according to the destination address in the IPv6 header and forwards the message to device C.
  • Step 4 After receiving the message, device D searches the routing table according to the destination address in the IPv6 header and forwards the message to device E.
  • an embodiment of the present application provides a node protection method, which is applied to a first node.
  • the first node may be an end node on an SRv6 TE path. As shown in FIG4 , the method includes:
  • the first service message includes an IPv6 header and an SRH, where the IPv6 header includes a destination address, and the SRH includes a SID list, where the SID list includes a backup SID and a SID of an upper node of a primary path for forwarding the first service message.
  • S402 Forward a second service message to an end node indicated by the backup SID, where the second service message includes a destination address, and the destination address is the backup SID.
  • the destination address is modified after determining that each end node on the primary path is an unreachable end node and the end node indicated by the backup SID is a reachable end node.
  • the first node After the first node receives the first service message, it can determine whether each end node in the SID list is reachable in turn. If it is determined that each end node on the main path is unreachable and the end node indicated by the backup SID is reachable, the destination address in the IPv6 header of the first node can be modified to the backup SID, thereby obtaining the second service message and forwarding the second service message.
  • the first node after the first node obtains the first service message, it can forward the second service message to the end node indicated by the backup SID when it is determined that each end node on the main path is an unreachable end node and the end node indicated by the backup SID is a reachable end node.
  • the first node on the main path can forward the first service message to the end node indicated by the backup SID, thereby reducing the service delay caused by node or link failure and improving network reliability.
  • the SID encapsulated in the second-to-last element in the SID list is the SID of the tail node on the primary path, and the SID encapsulated in the last element is the backup SID.
  • the penultimate element in the SID list i.e., Segment List[1] encapsulates the SID of the tail node on the primary path.
  • the last element i.e., Segment List[0] encapsulates the backup SID.
  • the SRH includes the SID of the upper node of the main path.
  • the embodiment of the present application adds a backup SID on this basis. It can be seen that the embodiment of the present application only involves changes to the data forwarding plane, and does not extend the routing protocol of the control plane. The implementation is relatively simple and has little impact on the existing SRv6 network.
  • the SRH further includes a SL.
  • the method includes:
  • the first service message includes an IPv6 header and an SRH, where the IPv6 header includes a destination address, and the SRH includes a SID list, where the SID list includes a backup SID and a SID of an upper node of a primary path for forwarding the first service message.
  • S601 is the same as S401.
  • S602 Obtain a first SL according to a difference between a current SL and a fixed value, and obtain a first SID corresponding to the first SL from a SID list.
  • the first SID corresponding to the first SL is SID3 encapsulated in the Segment List[3] position in the SRH.
  • S603 If the end node indicated by the first SID is unreachable, use the first SL as the current SL and repeat S602 until the first SID of the reachable end node is obtained from the SID list.
  • the process can be stopped when the first SID of the reachable end node is obtained.
  • the first node may modify the destination address of the first service message to the first SID, and then forward it to the end node indicated by the first SID.
  • the first SID may be a backup SID or the SID of the end node on the primary path. If the first SID is a backup SID, S604 is executed, otherwise S606 is executed.
  • S604 If the first SID of the reachable end node is a backup SID, modify the destination address to the backup SID to obtain a second service message.
  • the first SID is the backup SID
  • the destination address in the IPv6 header of the first business message can be modified to the backup SID, and the value of SL can be updated to 0, thereby obtaining the second business message.
  • S605 Forward a second service message to the end node indicated by the backup SID, where the second service message includes a destination address, and the destination address is the backup SID.
  • S605 is the same as the above S402.
  • S606 If the first SID of the reachable end node is not a backup SID, modify the destination address to the first SID of the reachable end node, obtain a third service message, and forward the third service message to the end node indicated by the first SID.
  • the SL in the SRH needs to be updated to point to the value of the first SID, that is, the SL in the SRH of the third service message indicates the Segment List encapsulated with the first SID.
  • the destination address in the IPv6 header of the first service message can be modified to SID1, and the value of SL is updated to 1 to obtain a third service message, and the third service message is forwarded.
  • the first node when the first node determines that the next-hop end node is unreachable, it can determine whether the subsequent end nodes are reachable based on the SID list hop by hop until the first SID of the reachable end node is obtained, and then the first service message can be modified based on the first SID of the reachable end node, and the modified service message can be forwarded to the reachable end node.
  • the reachable end node is not a backup SID, that is, some end nodes on the main path fail, or some links fail
  • the first node can skip the failed end node or link and forward the service message to the reachable end node, so that the service message can be forwarded in time.
  • the first node can forward the modified service message to the end node indicated by the backup SID, so as to realize rapid path switching in the case of a main path failure, and also enable the service message to be forwarded in time, avoiding long service delays, and improving the reliability of the SRv6 network.
  • the first node may be a tail node on the primary path, and the SID of the tail node on the primary path is configured with a specified additional behavior (Flavor).
  • the specified additional behavior can be called the penultimate segment decapsulation (PSD) flavor.
  • PSD penultimate segment decapsulation
  • the specified additional behavior is used to define the decapsulation behavior of the penultimate hop node.
  • the decapsulation behavior refers to removing the outer encapsulation of the service message and forwarding the inner original message.
  • the first node After obtaining the first service message, if the first node determines that the destination address is a SID locally configured with a specified additional behavior, it deletes the IPv6 header and the SRH, obtains a fourth service message, and forwards the fourth service message.
  • the original service message of the inner layer encapsulation ie, the fourth service message
  • the first node can forward the fourth service message based on the routing table.
  • the SL of the first service message received by the first node is 1, and the destination address is the same as the SID encapsulated in the Segment List[1] position in the SRH. If the first node receives the first service message, it means that there is no failure in the primary path.
  • the first node as the tail node, can decapsulate the first service message and continue to transmit it without further forwarding it to the backup node indicated by Segment List[0] in the SID list according to the SID list, so that the original service message encapsulated in the first service message can be forwarded to the destination address of the original service message as soon as possible.
  • the first node when the first node is an intermediate node or a tail node on the main path, the first node obtains the first service message by receiving the first service message sent by a third node, and the third node is the previous hop node of the first node on the main path.
  • the first node When the first node is the source node, the first node obtains the first message by receiving the fifth business message. If the next hop of the routing table entry matched by the fifth business message is the SRv6 policy, and the SRv6 policy includes a primary path and a backup path, then the IPv6 header and SRH are encapsulated in the outer layer of the fifth business message to obtain the first business message.
  • the source node can learn the routing information of each node in the SRv6 network, and then determine the optimal path and the suboptimal path according to the routing optimization strategy.
  • the optimal path can be used as the main path, the suboptimal path as the backup path, and the tail node of the suboptimal path as the backup node.
  • the source node can encapsulate the IPv6 header and SRH in the outer layer of the fifth service message.
  • the source address of the IPv6 header is the address of the source node
  • the destination address is the address of the end node located at the next hop of the source node in the SID list of the primary path.
  • the SID list corresponding to the primary path includes n SIDs
  • the SL value in the SRH is n
  • Segment List[n] to Segment List[1] in the SRH are the n SIDs in the SID list
  • Segment List[0] in the SRH is the SID of the tail node of the backup path.
  • the format of the SRH in the first service message can be seen in Figure 5.
  • the end node indicated by the backup SID is the tail node on the backup path for forwarding the first service message.
  • the node protection method provided in the embodiment of the present application is introduced below in conjunction with specific scenarios.
  • PE1-->P1-->P2-->PE3 is the main path
  • PE1 is the source node
  • P1 and P2 are intermediate nodes
  • PE3 is the tail node.
  • PE2-->P3-->P4-->PE4 is the backup path
  • PE2 is the source node
  • P3 and P4 are intermediate nodes
  • PE4 is the tail node.
  • PE1's Locator is A0::1
  • P1's Locator is A1::1
  • P2's End is A2::1
  • PE3 has Locator A3::1 and VPN SID A3::100
  • VPN SID A3::100 has PSD additional behavior.
  • PE4 has Locator prefix A4::1/64 and VPN SID A4::200.
  • Fig. 7 is an example of a scenario, and the nodes on the primary path and the backup path shown in Fig. 7 are all end nodes. In actual implementation, there may also be transit nodes on the primary path and the backup path.
  • Each end node in Figure 7 can publish routes by flooding, thereby announcing its own SID to other end nodes.
  • the source node PE1 can learn the dual-homing route of CE2, and then determine the primary path and backup path to CE2 according to the route optimization strategy, and use the tail node on the primary path as the primary tail node, and the tail node on the backup path as the backup tail node.
  • the traffic from CE1 to CE2 is forwarded along the primary path PE1-->P1-->P2-->PE3, the primary tail node is PE3, the backup tail node is PE4, and the backup SID of PE3 is PE4's VPN SID A4::200.
  • PE1 When PE1 receives a message from CE1 to CE2, the message is forwarded as follows:
  • Step 1 PE1 determines that the message from CE1 to CE2 needs to be forwarded through the path PE1-->P1-->P2-->PE3.
  • PE1 can add an IPv6 header and SRH to the message.
  • the destination address of the IPv6 header is the SID of P1, that is, A1::1.
  • Step 2 PE1 forwards the message to P1 according to A1::1.
  • Step 3 P1 forwards the message to P2 according to the next Segment List A2::1.
  • Step 4 When P2 receives a message with a destination address of END.X SID A2::1, P2 can forward the message on the link between P2 and PE3 based on END.X SID A2::1. At this time, the destination address of the message is PE3's VPN SID A3::100.
  • Step 5 After PE3 receives the message with the destination address of VPN SID A3::100, it determines that VPN SID A3::100 has the PSD additional behavior, and judges that the local node is the penultimate hop node according to SL. It then performs the penultimate hop decapsulation and table lookup forwarding processing, deletes the IPv6 header and SRH, and forwards the inner original service message to CE2.
  • the above steps 1 to 5 are the message forwarding process when there is no failure in the primary path.
  • steps 4 and 5 can be replaced by:
  • FIB forwarding information base
  • the packet is forwarded to PE4 based on the outbound interface and next hop information.
  • steps 3 to 5 can be replaced by:
  • the SL is reduced by 1 again, that is, the current SL becomes 0.
  • the packet is forwarded to PE4 based on the outbound interface and next hop information.
  • the escape function after the failure of the critical forwarding path of SRv6 can also be implemented.
  • the source node After receiving the fifth service message mentioned above, if the source node determines that the next hop of the routing table entry matching the destination address of the fifth service message is the SRv6 policy, it is also necessary to determine whether the tail node of the main path included in the SRv6 policy has a backup node.
  • the backup node can be an escape device.
  • the end node indicated by the backup SID included in the SID list in the above embodiment is the second node, and there is a best-effort (BE) path between the first node and the second node.
  • BE best-effort
  • the second node can also be called an escape device, that is, when a node in the main path fails, message forwarding can be achieved through the escape device.
  • FIG 8 is an example of this scenario.
  • PE1 is the source node
  • P1 and P2 are intermediate nodes
  • PE2 is the tail node.
  • the SID of PE2 has PSD Flavor.
  • the IPv6 bearer network also deploys a public escape device PE3.
  • PE3 There are BE paths between PE1, P1, P2 and PE3, and the BE path can be used as a backup path.
  • PE1 When PE1 receives a message from CE1 to CE2, it can add an IPv6 header and SRH to the message.
  • the destination address of the IPv6 header is the SID of P1
  • the position of Segment List[3] in SRH is the SID of P1
  • the position of Segment List[2] is the SID of P2
  • the position of Segment List[1] is the SID of PE2
  • the position of Segment List[0] is the SID of PE3.
  • the message is forwarded through PE1-->P1-->P2-->PE2.
  • PE2 After PE2 receives the message, it determines that the destination address of the message is its own SID, and the SID is configured with PSD Flavor. It then deletes the IPv6 header and SRH of the message and sends the inner original service message to CE2.
  • P2 fails, after P1 receives the message, if it determines that both P2 and PE2 are unreachable, it can modify the destination address of the message to the SID of PE3, update the SL to 0, and forward the modified message to PE3 based on the BE path.
  • the message when the message does not have a backup SRv6 TE forwarding path, the message can also be forwarded to the escape device based on the BE forwarding mode, and the escape device forwards the message to the CE, further reducing the service delay in the event of node or link failure and improving the reliability of the SRv6 network.
  • the embodiment of the present application further provides a node protection device, which is applied to a first node.
  • the device includes:
  • the acquisition module 901 is used to acquire a first service message, where the first service message includes an IPv6 header and an SRH, where the IPv6 header includes a destination address, and the SRH includes a SID list, where the SID list includes a backup SID and a SID of an upper node of a primary path for forwarding the first service message;
  • the sending module 902 is used to forward the second service message to the end node indicated by the backup SID, the second service message includes a destination address, the destination address is the backup SID, and the destination address is modified after determining that each end node on the primary path is an unreachable end node and the end node indicated by the backup SID is a reachable end node.
  • the SRH further includes a SL; the apparatus further includes a modification module;
  • the acquisition module 901 is further configured to obtain a first SL according to a difference between a current SL and a fixed value, and obtain a first SID corresponding to the first SL from the SID list; if the end node indicated by the first SID is unreachable, the first SL is used as the current SL, and the process of obtaining the first SL according to the difference between the current SL and the fixed value and obtaining the first SID corresponding to the first SL from the SID list is repeated until the first SID of the reachable end node is obtained from the SID list;
  • a modification module used for modifying the destination address to the backup SID if the first SID of the reachable end node is a backup SID, so as to obtain a second service message
  • the modification module is further used to modify the destination address to the first SID of the reachable end node if the first SID of the reachable end node is not a backup SID, so as to obtain a third service message;
  • the sending module 902 is further configured to forward the third service message to the end node indicated by the first SID.
  • the device further includes:
  • a deletion module configured to delete the IPv6 header and the SRH if the destination address is a SID configured with a specified additional behavior, to obtain a fourth service message
  • the sending module 902 is further configured to forward the fourth service message.
  • the end node indicated by the backup SID is a tail node on a backup path for forwarding the first service message
  • the end node indicated by the backup SID is the second node, and a BE path exists between the first node and the second node.
  • the SID encapsulated in the penultimate element in the SID list is the SID of the tail node on the primary path, and the SID encapsulated in the last element is the backup SID.
  • the acquisition module 901 is specifically configured to:
  • next hop of the routing table entry matched by the fifth service message is the SRv6 policy, and the SRv6 policy includes a primary path and a backup path, an IPv6 header and SRH are encapsulated in the outer layer of the fifth service message to obtain the first service message.
  • the embodiment of the present application further provides an electronic device, which may be a first node.
  • the electronic device includes:
  • the system includes a processor 1001, a machine-readable storage medium 1002, and a transceiver 1004.
  • the machine-readable storage medium 1002 stores machine-executable instructions that can be executed by the processor 1001; the machine-executable instructions prompt the processor 1001 to perform the following steps:
  • the first service message includes an IPv6 header and an SRH, where the IPv6 header includes a destination address, and the SRH includes a SID list, where the SID list includes a backup SID and a SID of an upper node of a primary path for forwarding the first service message;
  • the second service message is forwarded to the end node indicated by the backup SID, the second service message includes a destination address, the destination address is the backup SID, and the destination address is modified after determining that each end node on the primary path is an unreachable end node and the end node indicated by the backup SID is a reachable end node.
  • the SRH further includes the SL; the machine executable instructions cause the processor 1001 to perform the following steps:
  • the first SL is used as the current SL, and the process of obtaining the first SL according to the difference between the current SL and the fixed value and obtaining the first SID corresponding to the first SL from the SID list is repeated until the first SID of the reachable end node is obtained from the SID list;
  • the destination address is modified to the backup SID to obtain a second service message
  • the destination address is modified to the first SID of the reachable end node, a third service message is obtained, and the third service message is forwarded to the end node indicated by the first SID.
  • machine executable instructions cause the processor 1001 to perform the following steps:
  • the IPv6 header and the SRH are deleted to obtain a fourth service message
  • the end node indicated by the backup SID is a tail node on a backup path for forwarding the first service message
  • the end node indicated by the backup SID is the second node, and a BE path exists between the first node and the second node.
  • the SID encapsulated in the penultimate element in the SID list is the SID of the tail node on the primary path, and the SID encapsulated in the last element is the backup SID.
  • the machine executable instructions when the electronic device is a source node, the machine executable instructions cause the processor 1001 to perform the following steps:
  • next hop of the routing table entry matched by the fifth service message is the SRv6 policy, and the SRv6 policy includes a primary path and a backup path, an IPv6 header and SRH are encapsulated in the outer layer of the fifth service message to obtain the first service message.
  • the electronic device may further include a communication bus 1003.
  • the processor 1001, the machine-readable storage medium 1002, and the transceiver 1004 communicate with each other through the communication bus 1003.
  • the communication bus 1003 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus 1003 may be divided into an address bus, a data bus, a control bus, and the like.
  • the transceiver 1004 may be a wireless communication module. Under the control of the processor 1001 , the transceiver 1004 exchanges data with other devices.
  • the machine-readable storage medium 1002 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage.
  • the machine-readable storage medium 1002 may also be at least one storage device located away from the aforementioned processor.
  • Processor 1001 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • an embodiment of the present application further provides a machine-readable storage medium, which stores machine-executable instructions that can be executed by a processor.
  • the processor is prompted by the machine-executable instructions to implement the steps of any of the above-mentioned node protection methods.
  • a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of any node protection method in the above embodiments.
  • each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
  • the segment identification determination device equipment and machine-readable storage medium.
  • the machine-readable storage medium embodiment since it is basically similar to the segment identification determination method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the segment identification determination method embodiment.

Landscapes

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

Abstract

本申请提供一种节点保护方法、装置、电子设备及介质,涉及通信技术领域,该方法包括:获取第一业务报文,第一业务报文包括IPv6头以及SRH,IPv6头包括目的地址,SRH包括SID列表,SID列表包括备份SID以及用于转发第一业务报文的主路径上端节点的SID;向备份SID指示的端节点转发第二业务报文,第二业务报文包括目的地址,目的地址为备份SID,目的地址为在确定主路径上的每个端节点均为不可达端节点且备份SID指示的端节点为可达端节点后修改。可以降低链路或节点发生故障时的业务时延。

Description

一种节点保护方法、装置、电子设备及介质 技术领域
本申请涉及通信技术领域,尤其涉及一种节点保护方法、装置、电子设备及介质。
背景技术
交互式多媒体服务应用,例如,基于网际协议的语音通话(Voice over Internet Protocol,VoIP),对网络丢包非常敏感,通常只能容忍数十毫秒的网络丢包。而网络中的链路或节点发生故障时,恢复业务传输所需的时间通常为数百毫秒甚至达到数秒,无法满足业务要求。
发明内容
有鉴于此,本申请提供了一种节点保护方法、装置、电子设备及介质,用以降低链路或节点发生故障时的业务时延。具体技术方案如下:
第一方面,本申请提供了一种节点保护方法,所述方法应用于第一节点,所述方法包括:
接收第二节点发送的获取第一业务报文,所述第一业务报文包括IPv6头以及SRH,所述IPv6头包括目的地址,所述SRH包括SID列表,所述SID列表包括备份SID以及用于转发所述第一业务报文的主路径上端节点的SID;
向所述备份SID指示的端节点转发第二业务报文,所述第二业务报文包括所述目的地址,所述目的地址为所述备份SID,所述目的地址为在确定每个端节点的SID指所述主路径上示的每个端节点均为不可达端节点且所述备份SID指示的端节点为可达端节点后修改。
在一种可能的实现方式中,所述SRH还包括SL;在所述获取第一业务报文之后,所述方法还包括:
根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID;
若所述第一SID指示的端节点不可达,则将所述第一SL作为当前SL,重复执行根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID的过程,直至从所述SID列表中获取可达端节点的第一SID为止;
若所述可达端节点的第一SID为所述备份SID,则将所述目的地址修改为所述备份SID,得到所述第二业务报文;
若所述可达端节点的第一SID不是所述备份SID,则将所述目的地址修改为所述可达端节点的第一SID,得到第三业务报文,向所述第一SID指示的端节点转发所述第三业务报文。
在一种可能的实现方式中,在所述获取第一业务报文之后,所述方法还包括:
若所述目的地址为被配置有指定附加行为的SID,则删除所述IPv6头和所述SRH, 得到第四业务报文;
转发所述第四业务报文。
在一种可能的实现方式中,所述备份SID指示的端节点为用于转发所述第一业务报文的备份路径上的尾节点;或者,
所述备份SID指示的端节点为第二节点,所述第一节点与所述第二节点之间具有BE路径。
在一种可能的实现方式中,所述SID列表中倒数第二个元素中封装的SID为所述主路径上的尾节点的SID,最后一个元素中封装的SID为所述备份SID。
在一种可能的实现方式中,当所述第一节点为源节点时,所述获取第一业务报文,包括:
接收第五业务报文;
若所述第五业务报文匹配的路由表项的下一跳为SRv6策略,且所述SRv6策略包括主路径和备份路径,则在所述第五业务报文的外层封装所述IPv6头以及所述SRH,得到所述第一业务报文。
第二方面,本申请提供一种节点保护装置,所述装置应用于第一节点,所述装置包括:
获取模块,用于获取第一业务报文,所述第一业务报文包括IPv6头以及SRH,所述IPv6头包括目的地址,所述SRH包括SID列表,所述SID列表包括备份SID以及用于转发所述第一业务报文的主路径上端节点的SID;
发送模块,用于向所述备份SID指示的端节点转发第二业务报文,所述第二业务报文包括所述目的地址,所述目的地址为所述备份SID,所述目的地址为在确定所述主路径上的每个端节点均为不可达端节点且所述备份SID指示的端节点为可达端节点后修改。
在一种可能的实现方式中,所述SRH还包括SL;所述装置还包括修改模块;
所述获取模块,还用于根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID;若所述第一SID指示的端节点不可达,则将所述第一SL作为当前SL,重复执行根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID的过程,直至从所述SID列表中获取可达端节点的第一SID为止;
所述修改模块,用于若所述可达端节点的第一SID为所述备份SID,则将所述目的地址修改为所述备份SID,得到所述第二业务报文;
所述修改模块,还用于若所述可达端节点的第一SID不是所述备份SID,则将所述目的地址修改为所述可达端节点的第一SID,得到第三业务报文;
所述发送模块,还用于向所述第一SID指示的端节点转发所述第三业务报文。
在一种可能的实现方式中,所述装置还包括:
删除模块,用于若所述目的地址为被配置有指定附加行为的SID,则删除所述IPv6头和所述SRH,得到第四业务报文;
所述发送模块,还用于转发所述第四业务报文。
在一种可能的实现方式中,所述备份SID指示的端节点为用于转发所述第一业务报文 的备份路径上的尾节点;或者,
所述备份SID指示的端节点为第二节点,所述第一节点与所述第二节点之间具有BE路径。
在一种可能的实现方式中,所述SID列表中倒数第二个元素中封装的SID为所述主路径上的尾节点的SID,最后一个元素中封装的SID为所述备份SID。
在一种可能的实现方式中,当所述第一节点为源节点时,所述获取模块,具体用于:
接收第五业务报文;
若所述第五业务报文匹配的路由表项的下一跳为SRv6策略,且所述SRv6策略包括主路径和备份路径,则在所述第五业务报文的外层封装所述IPv6头以及所述SRH,得到所述第一业务报文。
第三方面,本申请提供一种电子设备,所述电子设备包括:
处理器;
收发器;
机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;所述机器可执行指令促使所述处理器执行以下步骤:
获取第一业务报文,所述第一业务报文包括IPv6头以及SRH,所述IPv6头包括目的地址,所述SRH包括SID列表,所述SID列表包括备份SID以及用于转发所述第一业务报文的主路径上端节点的SID;
向所述备份SID指示的端节点转发第二业务报文,所述第二业务报文包括所述目的地址,所述目的地址为所述备份SID,所述目的地址为在确定所述主路径上的每个端节点均为不可达端节点且所述备份SID指示的端节点为可达端节点后修改。
在一种可能的实现方式中,所述SRH还包括SL;所述机器可执行指令还促使所述处理器执行以下步骤:
根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID;
若所述第一SID指示的端节点不可达,则将所述第一SL作为当前SL,重复执行根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID的过程,直至从所述SID列表中获取可达端节点的第一SID为止;
若所述可达端节点的第一SID为所述备份SID,则将所述目的地址修改为所述备份SID,得到所述第二业务报文;
若所述可达端节点的第一SID不是所述备份SID,则将所述目的地址修改为所述可达端节点的第一SID,得到第三业务报文,向所述第一SID指示的端节点转发所述第三业务报文。
在一种可能的实现方式中,所述机器可执行指令还促使所述处理器执行以下步骤:
若所述目的地址为被配置有指定附加行为的SID,则删除所述IPv6头和所述SRH,得到第四业务报文;
转发所述第四业务报文。
在一种可能的实现方式中,所述备份SID指示的端节点为用于转发所述第一业务报文的备份路径上的尾节点;或者,
所述备份SID指示的端节点为第二节点,所述第一节点与所述第二节点之间具有BE路径。
在一种可能的实现方式中,所述SID列表中倒数第二个元素中封装的SID为所述主路径上的尾节点的SID,最后一个元素中封装的SID为所述备份SID。
在一种可能的实现方式中,当所述电子设备为源节点时,所述机器可执行指令具体促使所述处理器执行以下步骤:
接收第五业务报文;
若所述第五业务报文匹配的路由表项的下一跳为SRv6策略,且所述SRv6策略包括主路径和备份路径,则在所述第五业务报文的外层封装所述IPv6头以及所述SRH,得到所述第一业务报文。
第四方面,本申请实施例提供一种机器可读存储介质,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:上述第一方面所述的方法。
第五方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的方法。
采用上述技术方案,第一节点获取到第一业务报文后,在确定主路径上的每个端节点均为不可达端节点,且备份SID指示的端节点为可达端节点的情况下,可以将第二业务报文转发给备份SID指示的端节点。也就是说,在主路径中的节点发生故障或者节点间的链路发生故障的情况下,无需先丢包,然后由备份路径重新传输业务报文,而是可以由主路径上的第一节点向备份SID指示的端节点转发第一业务报文,从而可以降低因节点或链路故障导致的业务时延,提升网络可靠性。
附图说明
为了更清楚地说明本发明实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一种SRv6 SID格式的示意图;
图2为一种SRv6报文格式的示意图;
图3为一种SRv6报文转发过程的示例性示意图;
图4为本申请实施例提供的一种节点保护的方法的流程图;
图5为本申请实施例提供的一种SRH格式的示意图;
图6为本申请实施例提供的另一种节点保护的方法的流程图;
图7为本申请实施例提供的一种应用场景的示意图;
图8为本申请实施例提供的另一种应用场景的示意图;
图9为本申请实施例提供的一种节点保护装置的结构示意图;
图10为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
为使本发明的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本发明进一步详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为方便理解,对本申请实施例涉及到的相关概念进行解释说明。
1、SRv6简介。
段路由(Segment Routing,SR)采用源节点路径选择机制,预先在源节点封装转发路径所要经过段(Segment)的SID(Segment Identifier,段标识),当报文经过SR节点时,SR节点根据报文的SID对报文进行转发。除源节点外,其它节点无需维护路径状态。
IPv6段路由(Segment Routing IPv6,SRv6)是指基于IPv6转发平面实现SR。SRv6可以在IPv6报文中插入一个路由扩展头,即段路由头(Segment Routing Header,SRH),并在SRH中添加转发路径所要经过的所有段的SID,即SID列表,从而显式指定该IPv6报文的转发路径。SRv6为软件定义广域网(Software Defined Wide Area Network,SD-WAN)提供了一种灵活高效的控制手段,具有部署简单、容易扩展的特点,能够更好地实现流量调度和路径优化,保障关键业务质量、均衡流量分布、提高专线利用率和降低线路成本。
按照功能的不同,SRv6网络中的节点分为如下几种角色:
源节点:负责在IPv6报文的IPv6头中插入SRH,或者在报文外层封装IPv6头并插入SRH。源节点用于将报文流引入SRH中段列表(Segment List)定义的SRv6路径。
中转节点:位于报文的SRv6路径上,不参与SRv6处理,只执行普通的IPv6报文转发。中转节点可以是支持SRv6的节点,也可以是不支持SRv6的节点。
Endpoint节点:若接收到的SRv6报文的IPv6目的地址是Endpoint节点上配置的SRv6SID,则按SRv6 SID的指令进行处理,并更新SRH。在后续实施例中,将Endpoint节点称为端节点。
尾节点:SRv6转发路径的最后一个Endpoint节点。
同一个节点在不同SRv6路径中可以是不同的角色,比如节点在一个SRv6路径里是源节点,在其他SRv6路径中可以是中转节点或者Endpoint节点。
SRv6 SID用于定义某种网络功能、代表某种网络指令。SRv6 SID的格式为IPv6地址的形式,如图1所示,SRv6 SID由Locator(定位符)、Function(功能)、Arguments(参数)和MBZ(Must be zero,须为零)字段四部分组成。
其中,Locator:用于标识SID所属的网段,Locator在SR域内唯一。
Function:用于标识与SID绑定的本地操作指令,SR域内指定节点收到流量后,根据SRv6 SID的Function字段执行相关操作。
Arguments:用于定义报文的流和服务等信息。
MBZ(Must be zero):当Locator、Function和Arguments的位数之和小于128bits时,将其他位使用0补齐。
2、SRv6报文格式。
SRv6的报文封装格式为:在原始三层数据报文外层添加新的IPv6头和SRH。SRH是路由类型取值为4的一种路由扩展头。SRv6报文的格式如图2所示,SRv6报文中包括IPv6头、SRH和原始报文。
其中,IPv6头中包括:版本号(Version)、流量等级(Traffic class)、流标签(Flow Label)、负载长度(Payload Length)、下一个报头(Next header)、跳数限制(Hop limit)、源地址(Source Address,SA)、目的地址(Destination Address,DA),源地址和目的地址的长度均可以为128bits。其中,Next header取值为43,表示下一个报头为路由扩展头。
SRH中包括:
下一个报头(Next Header),长度为8bits,用于标识下一个报文头的类型。
SRH长度(Hdr Ext Length),长度为8bits,表示以8个字节为单位的SRH头的长度,不包括第一个8个字节。
路由类型(Routing Type),长度为8bits,取值为4,表示携带的是SRH。
段索引(Segments Left,SL),长度为8bits,表示需要查找的下一个SID的编号,初始取值为n-1,n表示SRH中封装的SID的数量,每经过一个endpoint节点,SL的值减1。
最后一跳(Last Entry),长度为8bits,取值为SRH中报文实际转发路径的第一个SID的编号。
标志位(Flags),长度为8bits,为标志位信息。
标签(Tag),长度为16bits,用于标记具有相同特性的一组报文。
段列表(Segment List),为SID列表,按照报文转发路径上节点从远到近的顺序进行排列,即Segment List[0]表示转发路径的最后一个SID,Segment List[1]表示转发路径的倒数第二个SID,以此类推。由于SID为IPv6地址的格式,所以每个SID均为一个128bits的IPv6地址(128bits IPv6 address)。
Optional Type Length Value objects(variable),为可选类型长度值对象变量。
3、SRv6报文转发过程。
如图3所示,图3中的设备A为源节点,设备C和设备E为Endpoint节点,设备B和设备D为中转节点。
步骤1、设备A作为源节点接收到IPv6报文后,为IPv6报文封装SRH和IPv6头,然后根据封装的IPv6头中的目的地址查找路由表,从而将封装后的报文转发给设备B。
由于从设备A至设备D的路径需要经过设备C和设备E两个Endpoint节点,因此,SRH中的SL=1,SRH中封装的SID列表中包括Segment List[0]=E、Segment List[1]=C。
IPv6头中的源地址为设备A的地址,目的地址为SL指示的地址,即SL=1指示的Segment List[1]的地址,也就是设备C的地址。
步骤2、设备B接收到报文后,根据IPv6头中的目的地址查找路由表,将报文转发给设备C。
步骤3、设备C检查SRH中的SL,如果SL>0,则将SL值减1,将IPv6头中的目的地址更新为SL指示的地址,即SL=0对应的Segment List[0],也就是设备E的地址。然 后设备C将报文转发给设备D。
步骤4、设备D接收到报文后,根据IPv6头中的目的地址查找路由表,将报文转发给设备E。
步骤5、作为尾节点的设备E接收到报文,检查SRH头中的SL值,发现SL=0,则对报文进行解封装,删除封装IPv6头和SRH,根据原始报文的目的地址进行报文转发。
为了降低链路或节点发生故障时的业务时延,本申请实施例提供一种节点保护方法,该方法应用于第一节点,第一节点可以为SRv6 TE路径上的一个端节点,如图4所示,该方法包括:
S401、获取第一业务报文,第一业务报文包括IPv6头以及SRH,IPv6头包括目的地址,SRH包括SID列表,SID列表包括备份SID以及用于转发第一业务报文的主路径上端节点的SID。
S402、向备份SID指示的端节点转发第二业务报文,第二业务报文包括目的地址,目的地址为备份SID。
其中,目的地址为在确定主路径上的每个端节点均为不可达端节点且备份SID指示的端节点为可达端节点后修改。
第一节点接收到第一业务报文后,可依次判断SID列表中的每个端节点是否可达,若确定主路径上的每个端节点均不可达,且备份SID指示的端节点可达,则可将第一节点的IPv6头中的目的地址修改为备份SID,从而得到第二业务报文,并转发该第二业务报文。
采用该方法,第一节点获取到第一业务报文后,在确定主路径上的每个端节点均为不可达端节点,且备份SID指示的端节点为可达端节点的情况下,可以将第二业务报文转发给备份SID指示的端节点。也就是说,在主路径中的节点发生故障或者节点间的链路发生故障的情况下,无需先丢包,然后由备份路径重新传输业务报文,而是可以由主路径上的第一节点向备份SID指示的端节点转发第一业务报文,从而可以降低因节点或链路故障导致的业务时延,提升网络可靠性。
在本申请实施例中,SID列表中倒数第二个元素中封装的SID为主路径上的尾节点的SID,最后一个元素中封装的SID为备份SID。
如图5所示,本申请实施例的SRH中,SID列表中倒数第二个元素即Segment List[1]位置封装的是主路径上尾节点的SID。最后一个元素即Segment List[0]位置封装的是备份SID。SL的初始值为n,且Last Entry=n。图5中包括的其他字段的介绍可参考上述实施例中对图2中的SRH的介绍。
在相关技术中,SRH中包括主路径上端节点的SID,本申请实施例在此基础上增加了备份SID,可见本申请实施例只涉及到了数据转发平面的改动,未扩展控制平面的路由协议,实现较为简单,且对已有SRv6网络的影响较小。
在本申请的一些实施例中,SRH还包括SL,如图6所示,该方法包括:
S601、获取第一业务报文,第一业务报文包括IPv6头以及SRH,IPv6头包括目的地址,SRH包括SID列表,SID列表包括备份SID以及用于转发第一业务报文的主路径上端 节点的SID。
其中,S601与S401相同。
S602、根据当前SL与固定值的差值得到第一SL,从SID列表中获取第一SL对应的第一SID。
例如,若第一SL=3,则第一SL对应的第一SID为SRH中Segment List[3]位置封装的SID3。
S603、若第一SID指示的端节点不可达,则将第一SL作为当前SL,重复执行S602,直至从SID列表中获取可达端节点的第一SID为止。
例如,若SID3指示的端节点不可达,则将SL=3作为当前SL,从SID列表中获取SL=2对应的Segment List[2]位置封装的SID2;
若SID2指示的端节点仍不可达,则从SID列表中获取SL=1对应的Segment List[1]位置封装的SID1;
若SID1指示的端节点仍不可达,则从SID列表中获取SL=0对应的Segment List[0]位置封装的SID0。
按照上述过程,在获取到可达端节点的第一SID时,即可停止。
在获取到可达端节点的第一SID时,第一节点可将第一业务报文的目的地址修改为第一SID,然后转发给第一SID指示的端节点。第一SID可能为备份SID,也可能为主路径上端节点的SID,若第一SID为备份SID,则执行S604,否则执行S606。
S604、若可达端节点的第一SID为备份SID,则将目的地址修改为备份SID,得到第二业务报文。
其中,依据SRv6相关协议的规定,还需将SRH中的SL更新为指向该备份SID的值,即第二业务报文的SRH中的SL=0。
结合S603中的例子,若最终确定Segment List[0]位置封装的SID对应的端节点可达,则可确定第一SID为备份SID,则可将第一业务报文的IPv6头中的目的地址修改为备份SID,将SL的取值更新为0,从而得到第二业务报文。
S605、向备份SID指示的端节点转发第二业务报文,第二业务报文包括目的地址,目的地址为备份SID。
其中,S605与上述S402相同。
S606、若可达端节点的第一SID不是备份SID,则将目的地址修改为可达端节点的第一SID,得到第三业务报文,向第一SID指示的端节点转发第三业务报文。
其中,依据SRv6相关协议的规定,还需将SRH中的SL更新为指向该第一SID的值,即第三业务报文的SRH中的SL指示封装有该第一SID的Segment List。
例如,结合S603中的例子,若可达端节点的第一SID为SID1,则可将第一业务报文的IPv6头中的目的地址修改为SID1,并将SL的取值更新为1,得到第三业务报文,并转发该第三业务报文。
采用该方法,第一节点在确定下一跳端节点不可达时,可基于SID列表逐跳判断后续的端节点是否可达,直至获取到可达端节点的第一SID为止,进而可基于可达端节点的第 一SID修改第一业务报文,并则可向该可达端节点转发修改后的业务报文。在可达端节点不是备份SID的情况下,即主路径上的部分端节点故障,或者部分链路故障,第一节点可跳过故障的端节点或链路,向可达端节点转发业务报文,可以使得业务报文被及时转发。在可达端节点是备份SID的情况下,第一节点可以向备份SID指示的端节点转发修改后的业务报文,实现了在主路径故障的情况下快速进行路径切换,也能够使得业务报文被及时转发,避免出现长时间的业务时延,提高了SRv6网络的可靠性。
在本申请的一些实施例中,第一节点可以为主路径上的尾节点,主路径上的尾节点的SID被配置有指定附加行为(Flavor)。
作为示例,该指定附加行为可以称为倒数第二跳解封装(Penultimate Segment Decapsulation,PSD)Flavor,指定附加行为用于定义倒数第二跳端节点的解封装行为,该解封装行为是指去除业务报文的外层封装,并转发内层的原始报文。
第一节点获取第一业务报文后,若确定目的地址为本地被配置有指定附加行为的SID,则删除IPv6头和SRH,得到第四业务报文,并转发第四业务报文。
可以理解的是,将第一业务报文的IPv6头和SRH删除后,即可得到内层封装的原始业务报文,即第四业务报文。然后第一节点可基于路由表转发第四业务报文。
这种情况下,第一节点接收到的第一业务报文的SL=1,目的地址与SRH中Segment List[1]位置封装的SID相同。若第一节点接收到该第一业务报文,说明主路径不存在故障,第一节点作为尾节点可以将第一业务报文解封装后继续传输,而无需进一步根据SID列表转发给SID列表中Segment List[0]指示的备份节点,使得第一业务报文中封装的原始业务报文可以被尽快转发至原始业务报文的目的地址。
在本申请实施例中,在第一节点为主路径上的中间端节点或者为尾节点的情况下,第一节点获取第一业务报文的方式为:接收第三节点发送的第一业务报文,第三节点为主路径上第一节点的上一跳节点。
在第一节点为源节点的情况下,第一节点获取第一报文的方式为:接收第五业务报文,若第五业务报文匹配的路由表项的下一跳为SRv6策略,且SRv6策略包括主路径和备份路径,则在第五业务报文的外层封装IPv6头以及SRH,得到第一业务报文。
其中,源节点可以学习SRv6网络中各节点的路由信息,进而根据路由优选策略,确定最优路径和次优路径。可以将最优路径作为主路径,将次优路径作为备份路径,将次优路径的尾节点作为备份节点。
源节点可以在第五业务报文的外层封装IPv6头以及SRH,此时,IPv6头的源地址为源节点的地址,目的地址为主路径的SID列表中,位于源节点下一跳的端节点的地址。假设主路径对应的SID列表中包括n个SID,SRH中的SL值为n,SRH中的Segment List[n]至Segment List[1]为该SID列表中的n个SID,SRH中的Segment List[0]为备份路径的尾节点的SID。此时第一业务报文中SRH的格式可参见图5。
在上述实施例中,备份SID指示的端节点为用于转发第一业务报文的备份路径上的尾节点。
以下结合具体的场景对本申请实施例提供的节点保护方法进行介绍。
如图7所示,图7中用户边缘设备(Customer Edge,CE)1至CE2之间存在两条SRv6 TE转发路径,其中,PE1-->P1-->P2-->PE3为主路径,PE1为源节点,P1、P2为中间节点,PE3为尾节点。
PE2-->P3-->P4-->PE4为备份路径,PE2为源节点,P3、P4为中间节点,PE4为尾节点。
假设PE1的Locator为A0::1,P1的Locator为A1::1,P2的End.X SID为A2::1,PE3有Locator A3::1和VPN SID A3::100,且该VPN SID A3::100具有PSD附加行为。PE4有Locator前缀A4::1/64和VPN SID A4::200。
需要说明的是,图7为一种场景的示例,图7中示出的主路径和备份路径上的节点均为端节点。在实际实现中,主路径和备份路径上还可以有中转节点。
图7中的各端节点均可通过泛洪的方式发布路由,从而将自身的SID通告给其他端节点。源节点PE1可学习到CE2的双归属路由,进而根据路由优选策略,可确定出去往CE2的主路径和备份路径,并将主路径上的尾节点作为主用尾节点,将备份路径上的尾节点作为备份尾节点。正常情况下,CE1到CE2的流量沿主路径PE1-->P1-->P2-->PE3转发,主用尾节点为PE3,备用尾节点为PE4,且PE3的备份SID为PE4的VPN SID A4::200。
当PE1接收到CE1到CE2的报文时,对该报文的转发过程为:
步骤1、PE1确定CE1到CE2的报文需要经过PE1-->P1-->P2-->PE3路径转发该报文,PE1可为该报文添加IPv6头和SRH。
其中,IPv6头的目的地址为P1的SID,即A1::1。SRH中的segment list为<A1::1,A2::1,A3::100,A4::200>,即Segment List[3]的位置为P1的A1::1,Segment List[2]的位置为P2的A2::1,Segment List[1]的位置为PE3的A4::100,Segment List[0]的位置为PE4的A4::200,SL=3。
步骤2、PE1根据A1::1将报文转发给P1。
步骤3、P1根据下一个Segment List A2::1将报文转发给P2。
步骤4、P2接收到目的地址为END.X SID A2::1的报文时,P2可根据END.X SID A2::1在P2与PE3之间的链路上转发报文。此时报文的目的地址为PE3的VPN SID A3::100。
步骤5、PE3收到目的地址为VPN SID A3::100的报文后,确定该VPN SID A3::100具有PSD附加行为,且根据SL判断出本地为倒数第二跳节点,则执行倒数第二跳解封装和查表转发处理,将IPv6头和SRH删除,将内层原始业务报文转发给CE2。
上述步骤1-步骤5为主路径不存在故障的情况下的报文转发流程。
在PE3发生故障的情况下,步骤4和步骤5可替换为:
P2接收到目的地址为END.X SID A2::1的报文时,先将报文中的SL减1,,则SL变为1。然后P2按照SL=1从Segment List中获取下一个Segment List[1],即PE3的SID。按Segment List[1]的SID查转发信息库(Forward Information dataBase,FIB)转发表,发现到PE3的路由不可达,则依次进行如下处理:
将SL减1,即当前SL变为0;
将报文的IPv6头中的目的地址修改为当前SL指向的Segment List[0],即PE4的 A4::200;
使用新的目的地址查找FIB转发表,获取出接口和下一跳信息;
根据出接口和下一跳信息,将报文转发到PE4。
进而,PE4接收到报文后,确定SL=0,且目的地址为自身的VPN SID,则可将报文的IPv6头和SRH删除,并将内层原始业务报文转发给CE2。
另外,在中间节点发生故障的情况下,假设P2发生故障,则步骤3至步骤5可替换为:
P1接收到目的地址为A1::1的报文,先将报文中的SL减1,则SL变为2。然后P1按照SL=2从Segment List中获取下一个Segment List[2],即P2的SID。按Segment List[2]的SID查FIB转发表,发现到P2的路由不可达,则依次进行如下处理:
将SL减1,即当前SL变为1;
用当前SL=1指向的Segment List[1](即PE3的SID)查找FIB转发表。
若确定到PE3的路由不可达,则再次将SL减1,即当前SL变为0。
用当前SL=0指向的Segment List[0](即PE4的SID)查找FIB转发表,若确定到PE4的路由可达,则将报文的IPv6头中的目的地址修改为PE4的SID,即A4::200;
然后使用新的目的地址查找FIB转发表,获取出接口和下一跳信息;
根据出接口和下一跳信息,将报文转发到PE4。
进而,PE4接收到报文后,确定SL=0,且目的地址为自身的VPN SID,则可将报文的IPv6头和SRH删除,并将内层原始业务报文转发给CE2,从而使得原始业务报文进入CE2所在的VPN私网。
可见,无论是尾节点发生故障还是中间节点发生故障,均可实现快速的路径切换,使得报文被转发到可达的端节点,可以提升SRv6的网络性能。
在本申请实施例的另一场景中,还可实现SRv6的关键转发路径故障后的逃生功能。
源节点在接收到上述第五业务报文后,若确定第五业务报文的目的地址匹配的路由表项的下一跳为SRv6策略,还需判断该SRv6策略包括的主路径的尾节点是否具有备份节点,在该场景中,备份节点可以为一台逃生设备。
相应地,上述实施例中SID列表中包括的备份SID指示的端节点为第二节点,第一节点与第二节点之间具有尽力而为(Best-effort,BE)路径。其中,第二节点也可称为逃生设备,即主路径中的节点发生故障时,可通过逃生设备实现报文转发。
如图8所示,图8为该场景的一种示例,CE1至CE2之间存在IPv6承载网内转发路径PE1-->P1-->P2-->PE2,PE1为源节点,P1、P2为中间节点,PE2为尾节点。PE2的SID具有PSD Flavor。
IPv6承载网还部署有一台公共的逃生设备PE3,PE1、P1、P2与PE3之间均具有BE路径,BE路径可作为备份路径。
PE1接收到CE1到CE2的报文时,可为该报文添加IPv6头和SRH。
其中,IPv6头的目的地址为P1的SID,SRH中的Segment List[3]的位置为P1的SID,Segment List[2]的位置为P2的SID,Segment List[1]的位置为PE2的SID,Segment List[0] 的位置为PE3的SID。
正常情况下,该报文通过PE1-->P1-->P2-->PE2转发,PE2接收到该报文后,确定报文的目的地址为自身的SID,且该SID被配置有PSD Flavor,则将该报文的IPv6头和SRH删除,将内层原始业务报文发送给CE2。
若PE1与PE2之间发生故障,例如P2故障,P1接收到报文后,若确定P2和PE2均不可达,则可将报文的目的地址修改为PE3的SID,并将SL更新为0,基于BE路径将修改后的报文转发给PE3。
PE3接收到报文后,确定目的地址为自身的SID,且SL=0,则可将报文的IPv6头和SRH删除,并将内层原始业务报文转发给CE2。
通过上述方法,在报文不具有备份的SRv6 TE转发路径的情况下,还可基于BE转发方式将报文转发给逃生设备,由逃生设备将报文转发给CE,进一步降低了节点或链路故障情况下的业务时延,提高了SRv6网络的可靠性。
对应于上述方法实施例,本申请实施例还提供一种节点保护装置,该装置应用于第一节点,如图9所示,该装置包括:
获取模块901,用于获取第一业务报文,第一业务报文包括IPv6头以及SRH,IPv6头包括目的地址,SRH包括SID列表,SID列表包括备份SID以及用于转发第一业务报文的主路径上端节点的SID;
发送模块902,用于向备份SID指示的端节点转发第二业务报文,第二业务报文包括目的地址,目的地址为备份SID,目的地址为在确定主路径上的每个端节点均为不可达端节点且备份SID指示的端节点为可达端节点后修改。
在一种实现方式中,SRH还包括SL;该装置还包括修改模块;
获取模块901,还用于根据当前SL与固定值的差值得到第一SL,从SID列表中获取第一SL对应的第一SID;若第一SID指示的端节点不可达,则将第一SL作为当前SL,重复执行根据当前SL与固定值的差值得到第一SL,从SID列表中获取第一SL对应的第一SID的过程,直至从SID列表中获取可达端节点的第一SID为止;
修改模块,用于若可达端节点的第一SID为备份SID,则将目的地址修改为备份SID,得到第二业务报文;
修改模块,还用于若可达端节点的第一SID不是备份SID,则将目的地址修改为可达端节点的第一SID,得到第三业务报文;
发送模块902,还用于向第一SID指示的端节点转发第三业务报文。
在一种实现方式中,该装置还包括:
删除模块,用于若目的地址为被配置有指定附加行为的SID,则删除IPv6头和SRH,得到第四业务报文;
发送模块902,还用于转发第四业务报文。
在一种实现方式中,备份SID指示的端节点为用于转发第一业务报文的备份路径上的尾节点;或者,
备份SID指示的端节点为第二节点,第一节点与第二节点之间具有BE路径。
在一种实现方式中,SID列表中倒数第二个元素中封装的SID为主路径上的尾节点的SID,最后一个元素中封装的SID为备份SID。
在一种实现方式中,当第一节点为源节点时,获取模块901,具体用于:
接收第五业务报文;
若第五业务报文匹配的路由表项的下一跳为SRv6策略,且SRv6策略包括主路径和备份路径,则在第五业务报文的外层封装IPv6头以及SRH,得到第一业务报文。
对应于上述方法实施例,本申请实施例还提供一种电子设备,该电子设备可以为第一节点,如图10所示,该电子设备包括:
包括处理器1001、机器可读存储介质1002和收发器1004。机器可读存储介质1002存储有能够被处理器1001执行的机器可执行指令;机器可执行指令促使处理器1001执行以下步骤:
获取第一业务报文,第一业务报文包括IPv6头以及SRH,IPv6头包括目的地址,SRH包括SID列表,SID列表包括备份SID以及用于转发第一业务报文的主路径上端节点的SID;
向备份SID指示的端节点转发第二业务报文,第二业务报文包括目的地址,目的地址为备份SID,目的地址为在确定主路径上的每个端节点均为不可达端节点且备份SID指示的端节点为可达端节点后修改。
在一种实现方式中,SRH还包括SL;机器可执行指令促使处理器1001执行以下步骤:
根据当前SL与固定值的差值得到第一SL,从SID列表中获取第一SL对应的第一SID;
若第一SID指示的端节点不可达,则将第一SL作为当前SL,重复执行根据当前SL与固定值的差值得到第一SL,从SID列表中获取第一SL对应的第一SID的过程,直至从SID列表中获取可达端节点的第一SID为止;
若可达端节点的第一SID为备份SID,则将目的地址修改为备份SID,得到第二业务报文;
若可达端节点的第一SID不是备份SID,则将目的地址修改为可达端节点的第一SID,得到第三业务报文,向第一SID指示的端节点转发第三业务报文。
在一种实现方式中,机器可执行指令促使处理器1001执行以下步骤:
若目的地址为被配置有指定附加行为的SID,则删除IPv6头和SRH,得到第四业务报文;
转发第四业务报文。
在一种实现方式中,备份SID指示的端节点为用于转发第一业务报文的备份路径上的尾节点;或者,
备份SID指示的端节点为第二节点,第一节点与第二节点之间具有BE路径。
在一种实现方式中,SID列表中倒数第二个元素中封装的SID为主路径上的尾节点的SID,最后一个元素中封装的SID为备份SID。
在一种实现方式中,当电子设备为源节点时,机器可执行指令促使处理器1001执行以下步骤:
接收第五业务报文;
若第五业务报文匹配的路由表项的下一跳为SRv6策略,且SRv6策略包括主路径和备份路径,则在第五业务报文的外层封装IPv6头以及SRH,得到第一业务报文。
如图10所示,该电子设备还可以包括通信总线1003。处理器1001、机器可读存储介质1002及收发器1004之间通过通信总线1003完成相互间的通信,通信总线1003可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线1003可以分为地址总线、数据总线、控制总线等。
收发器1004可以为无线通信模块,收发器1004在处理器1001的控制下,与其他设备进行数据交互。
机器可读存储介质1002可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。另外,机器可读存储介质1002还可以是至少一个位于远离前述处理器的存储装置。
处理器1001可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
基于同一种发明构思,本申请实施例还提供了一种机器可读存储介质,机器可读存储介质存储有能够被处理器执行的机器可执行指令。处理器被机器可执行指令促使实现上述任一节点保护方法的步骤。
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一节点保护方法的步骤。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于段标识确定装置、设备及机器可读存储介质。机器可读存储介质实施例而言,由于其基本相似于段标识确定方法实施例,所以描述的比较简单,相关之处参见段标识确定方法实施例的部分说明即可。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。

Claims (19)

  1. 一种节点保护方法,其特征在于,所述方法应用于第一节点,所述方法包括:
    获取第一业务报文,所述第一业务报文包括IPv6头以及SRH,所述IPv6头包括目的地址,所述SRH包括SID列表,所述SID列表包括备份SID以及用于转发所述第一业务报文的主路径上端节点的SID;
    向所述备份SID指示的端节点转发第二业务报文,所述第二业务报文包括所述目的地址,所述目的地址为所述备份SID,所述目的地址为在确定所述主路径上的每个端节点均为不可达端节点且所述备份SID指示的端节点为可达端节点后修改。
  2. 根据权利要求1所述的方法,其特征在于,所述SRH还包括SL;在所述获取第一业务报文之后,所述方法还包括:
    根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID;
    若所述第一SID指示的端节点不可达,则将所述第一SL作为当前SL,重复执行根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID的过程,直至从所述SID列表中获取可达端节点的第一SID为止;
    若所述可达端节点的第一SID为所述备份SID,则将所述目的地址修改为所述备份SID,得到所述第二业务报文;
    若所述可达端节点的第一SID不是所述备份SID,则将所述目的地址修改为所述可达端节点的第一SID,得到第三业务报文,向所述第一SID指示的端节点转发所述第三业务报文。
  3. 根据权利要求1所述的方法,其特征在于,在所述获取第一业务报文之后,所述方法还包括:
    若所述目的地址为被配置有指定附加行为的SID,则删除所述IPv6头和所述SRH,得到第四业务报文;
    转发所述第四业务报文。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,
    所述备份SID指示的端节点为用于转发所述第一业务报文的备份路径上的尾节点;或者,
    所述备份SID指示的端节点为第二节点,所述第一节点与所述第二节点之间具有BE路径。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,
    所述SID列表中倒数第二个元素中封装的SID为所述主路径上的尾节点的SID,最后一个元素中封装的SID为所述备份SID。
  6. 根据权利要求1所述的方法,其特征在于,当所述第一节点为源节点时,所述获取第一业务报文,包括:
    接收第五业务报文;
    若所述第五业务报文匹配的路由表项的下一跳为SRv6策略,且所述SRv6策略包括主 路径和备份路径,则在所述第五业务报文的外层封装所述IPv6头以及所述SRH,得到所述第一业务报文。
  7. 一种节点保护装置,其特征在于,所述装置应用于第一节点,所述装置包括:
    获取模块,用于获取第一业务报文,所述第一业务报文包括IPv6头以及SRH,所述IPv6头包括目的地址,所述SRH包括SID列表,所述SID列表包括备份SID以及用于转发所述第一业务报文的主路径上端节点的SID;
    发送模块,用于向所述备份SID指示的端节点转发第二业务报文,所述第二业务报文包括所述目的地址,所述目的地址为所述备份SID,所述目的地址为在确定所述主路径上的每个端节点均为不可达端节点且所述备份SID指示的端节点为可达端节点后修改。
  8. 根据权利要求7所述的装置,其特征在于,所述SRH还包括SL;所述装置还包括修改模块;
    所述获取模块,还用于根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID;若所述第一SID指示的端节点不可达,则将所述第一SL作为当前SL,重复执行根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID的过程,直至从所述SID列表中获取可达端节点的第一SID为止;
    所述修改模块,用于若所述可达端节点的第一SID为所述备份SID,则将所述目的地址修改为所述备份SID,得到所述第二业务报文;
    所述修改模块,还用于若所述可达端节点的第一SID不是所述备份SID,则将所述目的地址修改为所述可达端节点的第一SID,得到第三业务报文;
    所述发送模块,还用于向所述第一SID指示的端节点转发所述第三业务报文。
  9. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    删除模块,用于若所述目的地址为被配置有指定附加行为的SID,则删除所述IPv6头和所述SRH,得到第四业务报文;
    所述发送模块,还用于转发所述第四业务报文。
  10. 根据权利要求7-9任一项所述的装置,其特征在于,
    所述备份SID指示的端节点为用于转发所述第一业务报文的备份路径上的尾节点;或者,
    所述备份SID指示的端节点为第二节点,所述第一节点与所述第二节点之间具有BE路径。
  11. 根据权利要求7-9任一项所述的装置,其特征在于,
    所述SID列表中倒数第二个元素中封装的SID为所述主路径上的尾节点的SID,最后一个元素中封装的SID为所述备份SID。
  12. 根据权利要求7所述的装置,其特征在于,当所述第一节点为源节点时,所述获取模块,具体用于:
    接收第五业务报文;
    若所述第五业务报文匹配的路由表项的下一跳为SRv6策略,且所述SRv6策略包括主 路径和备份路径,则在所述第五业务报文的外层封装所述IPv6头以及所述SRH,得到所述第一业务报文。
  13. 一种电子设备,其特征在于,所述电子设备包括:
    处理器;
    收发器;
    机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;所述机器可执行指令促使所述处理器执行以下步骤:
    获取第一业务报文,所述第一业务报文包括IPv6头以及SRH,所述IPv6头包括目的地址,所述SRH包括SID列表,所述SID列表包括备份SID以及用于转发所述第一业务报文的主路径上端节点的SID;
    向所述备份SID指示的端节点转发第二业务报文,所述第二业务报文包括所述目的地址,所述目的地址为所述备份SID,所述目的地址为在确定所述主路径上的每个端节点均为不可达端节点且所述备份SID指示的端节点为可达端节点后修改。
  14. 根据权利要求13所述的电子设备,其特征在于,所述SRH还包括SL;所述机器可执行指令还促使所述处理器执行以下步骤:
    根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID;
    若所述第一SID指示的端节点不可达,则将所述第一SL作为当前SL,重复执行根据当前SL与固定值的差值得到第一SL,从所述SID列表中获取所述第一SL对应的第一SID的过程,直至从所述SID列表中获取可达端节点的第一SID为止;
    若所述可达端节点的第一SID为所述备份SID,则将所述目的地址修改为所述备份SID,得到所述第二业务报文;
    若所述可达端节点的第一SID不是所述备份SID,则将所述目的地址修改为所述可达端节点的第一SID,得到第三业务报文,向所述第一SID指示的端节点转发所述第三业务报文。
  15. 根据权利要求13所述的电子设备,其特征在于,所述机器可执行指令还促使所述处理器执行以下步骤:
    若所述目的地址为被配置有指定附加行为的SID,则删除所述IPv6头和所述SRH,得到第四业务报文;
    转发所述第四业务报文。
  16. 根据权利要求13-15任一项所述的电子设备,其特征在于,
    所述备份SID指示的端节点为用于转发所述第一业务报文的备份路径上的尾节点;或者,
    所述备份SID指示的端节点为第二节点,所述第一节点与所述第二节点之间具有BE路径。
  17. 根据权利要求13-15任一项所述的电子设备,其特征在于,
    所述SID列表中倒数第二个元素中封装的SID为所述主路径上的尾节点的SID,最后 一个元素中封装的SID为所述备份SID。
  18. 根据权利要求13所述的电子设备,其特征在于,当所述电子设备为源节点时,所述机器可执行指令具体促使所述处理器执行以下步骤:
    接收第五业务报文;
    若所述第五业务报文匹配的路由表项的下一跳为SRv6策略,且所述SRv6策略包括主路径和备份路径,则在所述第五业务报文的外层封装所述IPv6头以及所述SRH,得到所述第一业务报文。
  19. 一种机器可读存储介质,其特征在于,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:实现权利要求1-6任一所述的方法步骤。
PCT/CN2022/127132 2022-10-24 2022-10-24 一种节点保护方法、装置、电子设备及介质 WO2024086991A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2022/127132 WO2024086991A1 (zh) 2022-10-24 2022-10-24 一种节点保护方法、装置、电子设备及介质
CN202280003757.9A CN118251871A (zh) 2022-10-24 2022-10-24 一种节点保护方法、装置、电子设备及介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/127132 WO2024086991A1 (zh) 2022-10-24 2022-10-24 一种节点保护方法、装置、电子设备及介质

Publications (1)

Publication Number Publication Date
WO2024086991A1 true WO2024086991A1 (zh) 2024-05-02

Family

ID=90829676

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/127132 WO2024086991A1 (zh) 2022-10-24 2022-10-24 一种节点保护方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN118251871A (zh)
WO (1) WO2024086991A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180359176A1 (en) * 2017-06-12 2018-12-13 Cisco Technology, Inc. Centralized segment routing dataplane based backup path validation
CN111901235A (zh) * 2017-12-01 2020-11-06 华为技术有限公司 处理路由的方法和装置、以及数据传输的方法和装置
CN112491926A (zh) * 2020-12-11 2021-03-12 迈普通信技术股份有限公司 SRv6路径质量测量方法、装置、电子设备及存储介质
CN113472658A (zh) * 2021-06-29 2021-10-01 新华三信息安全技术有限公司 一种报文封装方法、报文转发方法及装置
CN113794637A (zh) * 2021-08-20 2021-12-14 新华三信息安全技术有限公司 Sid列表的处理方法及装置
CN113852548A (zh) * 2021-09-15 2021-12-28 新华三信息安全技术有限公司 一种报文处理方法及装置
CN115037675A (zh) * 2022-05-31 2022-09-09 新华三技术有限公司合肥分公司 一种报文转发方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180359176A1 (en) * 2017-06-12 2018-12-13 Cisco Technology, Inc. Centralized segment routing dataplane based backup path validation
CN111901235A (zh) * 2017-12-01 2020-11-06 华为技术有限公司 处理路由的方法和装置、以及数据传输的方法和装置
CN112491926A (zh) * 2020-12-11 2021-03-12 迈普通信技术股份有限公司 SRv6路径质量测量方法、装置、电子设备及存储介质
CN113472658A (zh) * 2021-06-29 2021-10-01 新华三信息安全技术有限公司 一种报文封装方法、报文转发方法及装置
CN113794637A (zh) * 2021-08-20 2021-12-14 新华三信息安全技术有限公司 Sid列表的处理方法及装置
CN113852548A (zh) * 2021-09-15 2021-12-28 新华三信息安全技术有限公司 一种报文处理方法及装置
CN115037675A (zh) * 2022-05-31 2022-09-09 新华三技术有限公司合肥分公司 一种报文转发方法及装置

Also Published As

Publication number Publication date
CN118251871A (zh) 2024-06-25

Similar Documents

Publication Publication Date Title
WO2020182156A1 (zh) 网络中报文转发的方法、网络节点、网络系统
US11979322B2 (en) Method and apparatus for providing service for traffic flow
EP3151485A1 (en) Egress node protection in evpn all-active topology
CN113381933B (zh) SRv6网络中双向转发检测的方法与系统
WO2020156166A1 (zh) 用于处理报文的方法和装置
EP3148124B1 (en) System and method for eliminating undetected interest looping in information-centric networks
US7583674B2 (en) Switch and method for supporting internet protocol (IP) network tunnels
US11012350B2 (en) Network interworking with no cross-domain state
WO2021088433A1 (zh) 一种报文的处理方法,装置和系统
CN111213345B (zh) 用于发送或接收包含控制信息的报文的设备、方法和系统
US11929923B2 (en) Packet transmission method and apparatus
WO2020249035A1 (zh) 一种实现业务功能处理的方法及装置
WO2021238207A1 (zh) 一种通告信息的处理方法、装置及存储介质
CN113950811B (zh) 扩展bgp保护以用于sr路径入口保护
WO2024086991A1 (zh) 一种节点保护方法、装置、电子设备及介质
CN113542126B (zh) 广义SRv6全路径压缩方法及装置
WO2024098244A1 (zh) 一种节点保护方法、装置、电子设备及介质
CN113055268A (zh) 隧道流量负载均衡的方法、装置、设备及介质
WO2024000136A1 (zh) 报文发送
US10924395B2 (en) Seamless multipoint label distribution protocol (mLDP) transport over a bit index explicit replication (BIER) core
WO2024083219A1 (zh) 报文处理方法、装置、设备及存储介质
WO2024094082A1 (zh) 一种信息传输方法、装置、节点及存储介质
WO2024000139A1 (zh) 报文转发
CN110535675B (zh) 一种组播快速切换的方法及装置
WO2022257773A1 (zh) 路由检测方法、设备、系统及存储介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2022962979

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022962979

Country of ref document: EP

Effective date: 20240528

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22962979

Country of ref document: EP

Kind code of ref document: A1