WO2021164249A1 - 一种发送报文的方法、设备及系统 - Google Patents

一种发送报文的方法、设备及系统 Download PDF

Info

Publication number
WO2021164249A1
WO2021164249A1 PCT/CN2020/117006 CN2020117006W WO2021164249A1 WO 2021164249 A1 WO2021164249 A1 WO 2021164249A1 CN 2020117006 W CN2020117006 W CN 2020117006W WO 2021164249 A1 WO2021164249 A1 WO 2021164249A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
label
forwarding path
message
forwarding
Prior art date
Application number
PCT/CN2020/117006
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 EP20919638.5A priority Critical patent/EP4102783A4/en
Priority to MX2022010289A priority patent/MX2022010289A/es
Priority to BR112022016471A priority patent/BR112022016471A2/pt
Priority to KR1020227032781A priority patent/KR20220141884A/ko
Priority to JP2022550215A priority patent/JP7479489B2/ja
Publication of WO2021164249A1 publication Critical patent/WO2021164249A1/zh
Priority to US17/890,710 priority patent/US20230095244A1/en

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/22Alternate 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/26Route discovery packet
    • 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/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/247Multipath using M:N active or standby paths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/645Splitting route computation layer and forwarding layer, e.g. routing according to path computational element [PCE] or based on OpenFlow functionality
    • H04L45/655Interaction between route computation entities and forwarding entities, e.g. for route determination or for flow table update
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for 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/74Address processing for routing
    • H04L45/741Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6

Definitions

  • This application relates to the field of communications, and in particular to a method, device and system for sending messages.
  • network devices will forward packets through the primary forwarding path and the backup forwarding path. If the primary forwarding path is normal, the primary forwarding path is used to forward the message; when the primary forwarding path fails, the backup forwarding path is used to forward the message.
  • forwarding packets through the backup forwarding path will result in waste of network resources or network congestion.
  • using the backup forwarding path to forward packets may cause packet forwarding loop problems, which will Lead to network congestion or waste of network bandwidth resources.
  • the main forwarding path between the network device 101 and the network device 102 is the direct link between the network device 101 and the network device 102, and the backup forwarding path between the network device 101 and the network device 102
  • the path passes through the network device 103, that is, the backup forwarding path is network device 101->network device 103->network device 102.
  • the main forwarding path from the network device 101 to the network device 102 fails, and the network device 101 forwards packets to the network device 102 through the network device 103 on the backup forwarding path, a loop problem may occur.
  • the so-called loop problem means that after the network device 103 receives a message from the network device 101, it returns the message to the network device 101 for some reasons instead of sending the message to the network device 102.
  • Some network devices in special locations in the network use backup forwarding paths to forward packets, which are more likely to cause loop problems, such as network devices connected to the access network and the backbone network.
  • the embodiment of the present application provides a method for sending a message, which can realize that a designated network device does not use an alternate forwarding path to forward a message, thereby reducing technical problems such as waste of network resources or network congestion caused by loop problems to a certain extent. .
  • a method for sending a message which can be applied to a first network device, and specifically includes the following steps: obtaining a first message destined for the destination device, and adding a first message to the first message
  • An indication identifier generates a second packet, and sends the second packet to the second network device through the first forwarding path.
  • the first indication identifier is used to instruct the second network device to avoid using the alternate forwarding path from the second network device to the destination device to send the second packet to the destination device, that is, the second network If the device determines that it cannot send the second packet through the primary forwarding path to the destination device, it may discard the second packet.
  • the second network device avoids using the alternate forwarding path to the destination device to the destination device according to the first indicator when the primary forwarding path from the second network device to the destination device is unreachable. Sending the second message also reduces waste of network resources and network congestion caused by loop problems.
  • the first forwarding path is a backup forwarding path from the first network device to the destination device, and the first network device passes the first forwarding path to the second network Before the device sends the second packet, the method further includes: the first network device determines that a second forwarding path to the destination device is unreachable, and the second forwarding path is from the first network device The main forwarding path to the destination device.
  • the backup forwarding path is used to forward the second packet, and the first indicator is added to the first packet, so as to achieve a Flexible message forwarding mode, that is, when the first network node has forwarded the message through the alternate forwarding path from the first network device to the destination network device, avoid the second network device from using the second network device to the destination network
  • the backup forwarding path of the device forwards packets.
  • the first forwarding path may also be the main forwarding path from the first network device to the destination device.
  • the first message Contains the Internet Protocol (IP) address of the destination device, and the IP address of the destination device can be regarded as the identifier of the destination device.
  • the first forwarding path is a forwarding path corresponding to an aggregation route from the first network device to the destination device, and the second forwarding path is a detailed route corresponding to the first network device to the destination device The forwarding path.
  • the first network device determines that the second forwarding path to the destination device is unreachable: the first network device reaches the destination device according to the IP address of the destination device not matching Or, the first network device matches the detailed route to the destination device according to the IP address of the destination device, and determines that the forwarding path corresponding to the detailed route is unreachable.
  • the first forwarding path is a backup forwarding path of the detailed route to the destination device
  • the determination by the first network device that the second forwarding path to the destination device is unreachable includes: The first network device matches the detailed route to the destination device according to the IP address of the destination device, and determines that the main forwarding path of the detailed route is unreachable.
  • the first forwarding path is the main forwarding path of the aggregation route to the destination device
  • determining that the second forwarding path to the destination device is unreachable by the first network device includes: The first network device matches the aggregation route to the destination device according to the IP address of the destination device, and determines that the main forwarding path of the aggregation route is unreachable.
  • adding a first indication identifier to the first message by the first network device to generate a second message includes: adding a segment to the first message by the first network device A segment router header (SRH) generates the second message, and the first indication identifier is carried in the SRH.
  • SGW segment router header
  • the first indication identifier is carried in a flag (Flags) field, a tag TAG field, or a type length value (TLV) of the SRH.
  • the SRH includes a list of segment identifiers, and the list of segment identifiers includes the first indication identifier.
  • the segment identifier list includes the segment identifier of the second network device, and the segment identifier of the second network device includes the first indication identifier.
  • the locator part of the segment identifier of the second network device includes the first indication identifier, or the function part of the segment identifier of the second network device includes the first indication identifier.
  • the locator part includes the first indication identifier, specifically, all of the locator part may be the first indication identifier, or some bytes of the locator part may be the first indication identifier.
  • the first indication identifier is the segment identifier of the second network device, that is, the segment identifier of the second network device has the indication function indicated by the first indication identifier.
  • the first packet includes the label of the destination device, and the label of the destination device can be regarded as the identifier of the destination device.
  • the first forwarding path is a forwarding path corresponding to the backup forwarding information in a label forwarding entry corresponding to the label of the destination device, that is, the first forwarding path is a backup forwarding path from the first network device to the destination device.
  • the determining, by the first network device, that the second forwarding path to the destination device is unreachable includes: the first network device matches the label forwarding entry according to the label of the destination device, and determining the label forwarding table The forwarding path corresponding to the main forwarding information in the entry is unreachable.
  • the forwarding path corresponding to the main forwarding information may be regarded as the main forwarding path from the first network device to the destination device.
  • the second packet can be forwarded through the alternate forwarding path from the first network device to the destination device to ensure that the second packet Reliability of transmission.
  • the forwarding entry may also include the first indicator and/or the second indicator.
  • adding a first indication identifier to the first message by the first network device to generate a second message includes: adding a tag to the first message by the first network device The stack generates a second message, and the label stack includes the first indication identifier.
  • the label stack includes the label of the second network device, the special label, and the label of the destination device, and the second network The label of the device is adjacent to the special label, and the special label includes the first indicator, that is, the special label may have an indicator function of the first indicator.
  • the label stack includes a label of the second network device and a label of the destination device, and the label of the second network device is the first indication identifier, that is, the second The label of the network device has the indication function of the first indication identifier.
  • the method before the first network device sends the second packet to the second network device through the first forwarding path, the method further includes: the first network device receives The third message of the second network device, where the third message includes an identifier of the second network device and a second indication identifier, and the second indication identifier is used to identify that the second network device supports avoidance The ability to use alternate paths to forward packets.
  • the first network device After the first network device receives the third message, it can add the first indication identifier to the first message according to the second indication identifier to obtain the second message, so as to achieve the purpose of reducing network resource waste and network congestion.
  • the first network device Before receiving the first packet, the first network device also generates a forwarding entry corresponding to the first forwarding path according to the identifier of the second network device and the second indication identifier, and the forwarding entry corresponding to the first forwarding path is
  • the forwarding table entry includes the identifier of the destination device and forwarding information corresponding to the first forwarding path.
  • the first network device can search for the forwarding entry according to the identifier of the destination device included in the first packet to obtain the forwarding information of the first forwarding path, and send the forwarding information to the first forwarding path through the first forwarding path.
  • the second network device sends the above-mentioned second message to realize the forwarding of the second message.
  • the forwarding information includes a list of segment identifiers, the list of segment identifiers includes the identifiers of the second network device, and the identifier of the second network device includes the segments of the second network device.
  • Identification the identification of the destination device includes the IP address of the destination device.
  • the forwarding information includes the label of the second network device, and the identifier of the destination device includes the label of the destination device.
  • the second indication identifier may also be the identifier of the second network device or the label of the second network device. In this case, the identifier of the second network device or the label of the second network device has The indicator function of the second indicator.
  • the third message includes an end node segment identifier (End SID) TLV field, and the End SID TLV includes the second indication identifier.
  • the third message may be, for example, an intermediate system to intermediate system (Intermediate system to intermediate system, ISIS) IPv6 message or an Open Shortest Path First (OSPF) version 3 (version 3, v3) message.
  • ISIS Intermediate system to intermediate system
  • OSPF Open Shortest Path First version 3 (version 3, v3) message.
  • the End SID TLV further includes the identifier of the second network device.
  • the third message includes a prefix SID type length value TLV field, and the prefix SID TLV field includes the second indication identifier.
  • the third message may be, for example, an ISIS message or an OSPF message.
  • the End SID TLV further includes the label of the second network device.
  • the backup forwarding path passes through the first network device, so that resource waste caused by loop problems can be avoided.
  • the first packet comes from a third network device, the third network device belongs to the first network domain, and the destination device belongs to the second network domain.
  • this method can be applied to cross-domain scenarios.
  • the first network domain is an area of a backbone network
  • the second network domain is an area of an access network
  • the first network device is an area connecting the access network and the backbone network.
  • the first forwarding path is a forwarding path in the backbone network.
  • a method for sending a message is provided.
  • the method is applied to a second network device and specifically includes the following steps: receiving a first message to a destination device, the first message coming from the first network device ,
  • the first message includes a first indication identifier.
  • the second network device determines that the main forwarding path from the second network device to the destination device is unreachable.
  • the second network device avoids using a backup forwarding path to send the first packet to the destination device according to the indication of the first indicator, so as to reduce the number of passing through the backup path. Resource waste or network congestion caused by forwarding. Where the second network device avoids using the backup forwarding path to send the message, it can be understood that the second network device does not use the backup forwarding path to send the message.
  • the second network device may determine that the primary forwarding path from the second network device to the destination device is unreachable. There are three possibilities as follows: The way to achieve:
  • the first message includes the IP address of the destination device
  • the main forwarding path is the main forwarding of the aggregation route from the second network device to the destination device.
  • the backup forwarding path is a backup forwarding path of the aggregation route.
  • the first packet includes the IP address of the destination device
  • the main forwarding path is the forwarding path corresponding to the detailed route from the second network device to the destination device
  • the backup forwarding path is a forwarding path corresponding to an aggregation route from the second network device to the destination device.
  • the first message is an SRv6 message
  • the SRH of the SRv6 message includes the first indication identifier
  • the first indication identifier may be carried in the Flags field or the tag TAG field or the TLV field of the SRH.
  • the SRH may include a list of segment identifiers, and the list of segment identifiers includes the first indication identifier.
  • the method further includes: 2.
  • the network device determines that the destination address of the SRv6 packet is the IP address of the second network device, and the second network device obtains the identifier of the destination device from the segment identifier list of the SRv6 packet, and The second network device modifies the destination address of the SRv6 message to the identifier of the destination device.
  • the determining by the second network device that the primary forwarding path to the destination device is unreachable includes: the second network device determines that the destination device has a destination address based on the destination address of the SRv6 packet, that is, the identifier of the destination device.
  • the main forwarding path of the destination device is unreachable.
  • the first message may also be a Multi-Protocol Label Switching (MPLS) message.
  • MPLS Multi-Protocol Label Switching
  • the label stack of the first message includes the first indication identifier.
  • the first packet When the first packet is an MPLS packet, the first packet includes the label of the destination device, and the label stack includes the label of the second network device, the special label, and the label of the destination device, so The special label includes the first indication mark, that is, the special label has the function of the first indication mark.
  • the label stack includes the label of the second network device and the label of the destination device, and the label of the second network device includes the first indication identifier, that is, the label of the second network device has the first indication The function of the logo.
  • the second network device determining that the primary forwarding path from the second network device to the destination device is unreachable includes: the second The network device determines that the top label of the label stack is the label of the second network device; in response to determining that the top label of the label stack is the label of the second network device, matching is performed according to the label of the destination device Reach the label forwarding table that reaches the destination device, and determine that the primary forwarding path corresponding to the primary forwarding information in the label forwarding table is unreachable.
  • the second network device avoids using an alternate forwarding path to send the first message to the destination device according to the indication of the first indication identifier
  • the method includes: the second network device determines that the label of the second network device in the label stack is the next layer of the label as the special label; in response to determining the label of the second network device in the label stack
  • the label of the next layer is the special label, which avoids using the standby forwarding path corresponding to the standby forwarding information in the label forwarding table to send the first packet to the destination device.
  • the special label may also be located at the top of the stack, and the label of the second network device may be located at the next layer of the special label.
  • the backup forwarding path passes through the first network device.
  • the method further includes: a second message sent by the second network device to the first network device, the second message including the identifier of the second network device and the second message
  • Two indication identifier the second indication identifier is used to indicate that the second network device supports the ability to avoid using alternate paths to forward packets
  • the identifier of the second network device includes the IP address or the address of the second network device Describe the label of the second network device.
  • Sending the second packet to the first network device by the second network device can make the first network device know that the second network device has the ability to avoid using the alternate path to forward packets. In this way, when the first network device When the device sends the first packet, the first indication identifier may be carried in the first packet to instruct the second network device to avoid using the alternate path to forward the first packet.
  • the method further includes: The second network device discards the first packet. By discarding the first message, the purpose of avoiding using the alternate forwarding path to send the first message to the destination device is achieved.
  • a method for generating forwarding entries is provided.
  • the method can be applied to a first network device and specifically includes the following steps: receiving a notification message from the second network device, where the notification message includes the first network device.
  • An indication identifier the first network device determines according to the first indication identifier that the second network device has the ability to avoid using an alternate path to forward packets.
  • the first network device In response to determining that the second network device has the ability to avoid using the alternate path to forward the packet, the first network device generates alternate forwarding information for forwarding the packet to the destination device, and the forwarding path corresponding to the alternate forwarding information passes through all the alternate forwarding information. Mentioned second network equipment.
  • the backup forwarding information includes a label stack or a segment identification list, and the label stack or a segment identification list includes an identification of the second network device.
  • the forwarding path corresponding to the primary forwarding information forwards the first packet to the destination device; if it is unreachable, the first network device adds a second indicator to the first packet to generate a second packet, and the second indicator
  • the identifier is used to instruct the second network device to avoid using an alternate forwarding path from the second network device to the destination device to send the second packet to the destination device.
  • the first indicator is included in the forwarding entry, so that the first network device can add the second indicator to the first message.
  • the second message further includes the tag stack or the segment identifier list, and the tag stack or segment identifier list may include the tag or segment identifier of the second network device, so that the first The network device can send the message to the second network device according to the tag or segment identifier of the second network device.
  • a method for generating a forwarding entry is provided.
  • the method can be applied to a second network device.
  • the method specifically includes the following steps: generating a notification message, the message including a first indication identifier, and The first indication identifier is used to indicate that the second network device has the ability to avoid using the alternate forwarding path to forward packets.
  • the second network device sends the notification message to the first network device to trigger the first network device to generate a forwarding entry, and the forwarding path corresponding to the forwarding entry passes through the second network device.
  • the first network device can send a message to the second network device, and the second network device does not forward the message through the alternate forwarding path when forwarding the message, so as to reduce the waste of network resources And network congestion.
  • a method for sending a message is provided, the method is applied to a first network device, and the method includes: the first network device receives a notification message sent by a second network device, the notification message including all The identification of the second network device.
  • the first network device generates a forwarding entry for forwarding the message to the destination device, the forwarding entry includes primary forwarding information and backup forwarding information, and the forwarding path corresponding to the primary forwarding information is in the first network domain ,
  • the forwarding path corresponding to the backup forwarding information passes through the second network device, and the path from the first network device to the second network device on the forwarding path corresponding to the backup forwarding information is in the second network domain,
  • the first network domain is different from the second network domain
  • the backup forwarding information includes the identifier of the second network device.
  • the forwarding path corresponding to the primary forwarding information and the forwarding path corresponding to the backup forwarding information to the destination device pass through different network domains, which can reduce the occupation of the network in the first network domain where the forwarding path corresponding to the primary forwarding information is located. resource.
  • the backup forwarding information includes a list of segment identifiers, the list of segment identifiers includes the identifier of the second network device, and the identifier of the second network device includes the second network device.
  • the segment ID In other scenarios (such as SR-MPLS scenarios), the backup forwarding information includes a label stack, and the label stack or the segment identifier list includes the identifier of the second network device, and the identifier of the second network device Includes the label of the second network device.
  • the notification message further includes a second indication identifier, and the second indication identifier indicates that the second network device has the ability to avoid using an alternate path to forward the message.
  • the method further includes: the first network device obtains a first packet destined for the destination device; and the first network device determines the forwarding path corresponding to the main forwarding information Unreachable; in response to determining that the forwarding path corresponding to the primary forwarding information is unreachable, the first network device adds a first indicator to the first message to generate a second message, and uses the backup Forwarding information to forward the second packet, and the first indication identifier is used to instruct the second network device to avoid using the alternate forwarding path from the second network device to the destination device to send the first packet to the destination device Two messages.
  • a first network device which is used to execute the first aspect or any one of the possible design methods of the first aspect.
  • the first network device includes a unit for executing the first aspect or any one of the possible designs of the first aspect; or, the first network device includes a unit for executing the third aspect or the third aspect Or, the first network device includes a unit for executing the fifth aspect or any one of the possible design methods of the fifth aspect.
  • a second network device which is used to execute the second aspect or any one of the possible design methods of the second aspect.
  • the second network device includes a unit for executing the second aspect or any one of the possible designs of the second aspect; or, the second network device includes a unit for executing the fourth aspect or the fourth aspect Any one of the possible design methods in the unit.
  • a network device which is applied to a network system including multiple network devices, the multiple network devices including a first network device and a second network device, the network device is a first network device, and the first network device Equipment includes: processor and network interface.
  • the network interface is used to receive and send messages.
  • the processor is used to execute the aforementioned first aspect or any one of the possible design methods of the first aspect; or, the processor is used to execute the aforementioned third aspect or any one of the possible designs of the third aspect; or, The processor is used to execute the foregoing fifth aspect or any one of the possible design methods of the fifth aspect.
  • the first network device further includes a memory, and the memory may be used to store instructions or program codes.
  • the processor is used to call instructions or program codes in the memory to execute the aforementioned first aspect or any one of the possible design methods of the first aspect; or, the processor is used to call instructions or program codes in the memory to execute the aforementioned third aspect or Any one of the possible design methods of the third aspect; the processor is configured to call instructions or program codes in the memory to execute the foregoing fifth aspect or any one of the possible design methods of the fifth aspect.
  • a network device which is applied to a network system including multiple network devices.
  • the multiple network devices include a first network device and a second network device.
  • the network device is a second network device.
  • Equipment includes: processor and network interface.
  • the network interface is used to receive and send messages.
  • the processor is used to execute the aforementioned second aspect or any one of the possible design methods of the second aspect; or, the processor is used to execute the aforementioned fourth aspect or any one of the possible designs of the fourth aspect.
  • the second network device further includes a memory, and the memory may be used to store instructions or program codes.
  • the processor is used to call instructions or program codes in the memory to execute the foregoing second aspect or any one of the possible design methods of the second aspect; or, the processor is used to call instructions or program codes in the memory to execute the foregoing fourth aspect or Any one of the possible design methods of the fourth aspect.
  • a message processing system includes the first network device and the second network device provided in the foregoing aspect.
  • a computer-readable storage medium including instructions, programs, or codes, which when executed on a computer, cause the computer to execute the method described in the foregoing aspect.
  • the twelfth aspect provides a computer program product including computer instructions.
  • the network device executes the first aspect, the second aspect, the third aspect, the fourth aspect, and the fourth aspect.
  • the five aspects and the method provided by one of the possible implementations of any of the above five aspects.
  • a chip including a memory and a processor.
  • the memory is used to store instructions or program codes.
  • the processor is used to call and run the instruction or program code from the memory to execute any one of the possible design methods of the first aspect or the first aspect; or, the processor executes any one of the second aspect or the second aspect One possible design method; or, the processor executes the third aspect or any one possible design method of the third aspect; or, the processor executes the fourth aspect or any one of the fourth aspect possible designs Method; or, the processor executes the fifth aspect or any one of the possible design methods of the fifth aspect.
  • the aforementioned chip only includes a processor, and the processor is used to read and execute instructions or program codes stored in the memory.
  • the processor executes the first aspect or the first aspect. Any one of the possible design methods; or, the processor executes the second aspect or any one of the possible design methods of the second aspect; or, the processor executes the third aspect or any one of the possible design methods of the third aspect.
  • Figure 1 is a schematic diagram of a network architecture in a traditional technology
  • FIG. 2 is a schematic diagram of a network architecture applied to an SRv6 scenario provided by an embodiment of the application
  • FIG. 3 is a schematic diagram of a network architecture applied to an SR-MPLS scenario according to an embodiment of the application
  • FIG. 4 is a schematic structural diagram of a network architecture 500 provided by an embodiment of this application.
  • FIG. 5 is a flowchart of a method for sending a message provided by an embodiment of the application
  • FIG. 6 is a schematic diagram of the format of the End SID TLV field in an ISIS IPv6 message provided by an embodiment of this application;
  • FIG. 7 is a schematic diagram of the format of the End SID TLV field in the OSPFv3 message provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of the format of the prefix SID TLV field included in the ISIS message provided by an embodiment of the application;
  • FIG. 9 is a schematic diagram of the format of the prefix SID TLV field included in the OSPF message provided by an embodiment of the application.
  • FIG. 10 is a schematic diagram of the SRH format of an SRv6 message provided by an embodiment of this application.
  • FIG. 11 is a schematic diagram of the format of a) implementation of Bypass SID in the SRv6 scenario provided by an embodiment of the application;
  • FIG. 12 is a schematic diagram of the format of implementation c) of Bypass SID in the SRv6 scenario provided by an embodiment of the application;
  • FIG. 13 is a schematic diagram of the format of the newly added TLV field of the message M3 SRH in the SRv6 scenario provided by an embodiment of the application;
  • Figure 14 (a) is a schematic diagram of a label stack provided by an embodiment of this application.
  • Figure 14(b) is a schematic diagram of another label stack provided by an embodiment of this application.
  • FIG. 15 is a flowchart of a method for sending a message under the network architecture shown in FIG. 16(a) and FIG. 16(b) according to an embodiment of the application;
  • Figure 16(a) is a schematic diagram of a network architecture in an SRv6 scenario provided by an embodiment of the application;
  • FIG. 16(b) is a schematic diagram of a network architecture in another SRv6 scenario provided by an embodiment of this application.
  • FIG. 17 is a flowchart of a method for sending a message under the network architecture shown in FIG. 18 according to an embodiment of the application;
  • FIG. 18 is a schematic diagram of a network architecture in an SR-MPLS scenario provided by an embodiment of the application.
  • FIG. 19 is a schematic diagram of a cross-domain network architecture provided by an embodiment of this application.
  • FIG. 20 is a flowchart of a method for sending a message under the network architecture shown in FIG. 19 according to an embodiment of the application;
  • FIG. 21 is a schematic structural diagram of a network device 2100 provided by an embodiment of this application.
  • FIG. 22 is a schematic structural diagram of a network device 2200 provided by an embodiment of this application.
  • FIG. 23 is a schematic structural diagram of a system 2300 for sending messages according to an embodiment of the application.
  • FIG. 24 is a schematic structural diagram of a device 2400 provided by an embodiment of this application.
  • FIG. 25 is a schematic structural diagram of a device 2500 provided by an embodiment of the application.
  • the IP address of a network device is A2:2::2/128, and the detailed route corresponding to the IP address can be the route corresponding to A2:2::2/128, or the route corresponding to A2:2::/96
  • the route of A2:2::/96 is the address of the network segment to which the address A2:2::2/128 belongs.
  • the route obtained by aggregating multiple detailed routes that can be aggregated together is the summary route.
  • a network device stores the route A1:8::/96 to the network device with the destination address A1:8::/96, and stores the route A1:8::/96 to the network device with the destination address A1:9::/96 Route A1:9::/96.
  • the network device can aggregate these two routes to obtain the aggregated route A1::/84. Then the network device can only publish the aggregated route to other network devices, which can save the storage resources of other network devices.
  • IGP Interior Gateway Protocol
  • Border Gateway Protocol Border Gateway Protocol
  • Route aggregation is also called route aggregation, which refers to the aggregation of routes belonging to multiple different subnets in the same network segment into one aggregation route.
  • the network device advertises the aggregation route to the neighbor network devices of the network device, and no longer publishes the routes of multiple different subnets corresponding to the aggregation route, thereby reducing the number of forwarding entries in the routing table of the neighbor network device, and reducing the number of entries in the routing table of the neighbor network device. Occupation of system resources.
  • the network device does not need to notify the neighboring network device of the route of the subnet, because the routes of the subnet are all based on The aggregation route is notified to neighboring network devices, which avoids route oscillations in the network and improves the stability of the network to a certain extent.
  • FIG. 2 is a schematic diagram of a network architecture using SRv6 technology.
  • the network architecture includes access equipment, aggregation equipment, and regional core equipment.
  • the access equipment may be an access node (ACC)
  • the aggregation equipment may be an aggregation node (AGG).
  • the regional core device may be a regional core node (RC).
  • access equipment includes ACC 201, ACC 202, and ACC 203
  • aggregation equipment includes AGG 204 and AGG 205
  • regional core equipment includes RC 206 and RC 207.
  • the connection relationship between them is: ACC 201 is connected to ACC 202 and AGG 204, ACC 202 is also connected to AGG 205, ACC 203 is connected to AGG 205, AGG 204 is connected to AGG 205 and RC 206, AGG 205 is also connected to RC 207 is connected, and RC 206 is also connected to RC 207.
  • the address of the foregoing device in the network architecture may be an IPv6 address or an Internet Protocol version 4 (IPv4) address.
  • IPv6 address is used as an example to introduce.
  • the IP address (i.e. IPv6 address) of ACC 201 is A1:8::/96
  • the IP address of ACC 202 is A1:9::/96
  • the IP address of ACC 203 is A1:A ::/96.
  • ACC 201, ACC 202, AGG 204, and AGG 205 belong to access ring 1 in the access network
  • ACC 203, AGG 204, and AGG 205 belong to access ring 2 in the access network
  • AGG 204, AGG 205, RC 206 and RC 207 belong to the convergence ring in the backbone network.
  • AGG 204 converges the detailed route A1:8::/96 of ACC 201 in the access ring 1 and the detailed route A1:9::/96 of ACC 202 into the convergent route A1::/84, and the convergent route to the convergent
  • the network devices in the ring are released, and AGG 204 generates detailed routes corresponding to the IP address A1:8::/96 of ACC 201, and generates detailed routes corresponding to the IP address A1:9::/96 of ACC 202.
  • AGG 205 also aggregates the detailed route A1:8::/96 of ACC 201 in the access ring 1 and the detailed route A1:9::/96 of ACC 202 into the aggregate route A1::/84, and sends the aggregate route to The network equipment in the convergence ring is released.
  • AGG 205 generates a detailed route corresponding to the IP address A1:8::/96 of ACC 201, and generates a detailed route corresponding to the IP address A1:9::/96 of ACC 202.
  • AGG 204 generates a forwarding table.
  • the forwarding table includes forwarding entry 1 and forwarding entry 2 as shown in Table 1.
  • Forwarding entry 1 is the detailed route corresponding to IP address A1:8::/96
  • forwarding entry 2 is The detailed route corresponding to the IP address A1:9::/96.
  • forwarding entry 1 includes the IP address A1:8::/96 of ACC 201 and the outgoing interface (specifically refers to the identification of the interface, the same applies to the following), where the outgoing interface is the forwarding from AGG 204 to ACC 201
  • Forwarding table entry 2 includes the IP address A1:9::/96 of ACC 202 and the outgoing interface, which is the interface of AGG 204 on the forwarding path from AGG 204 to ACC 202.
  • the outgoing interface of forwarding entry 1 is the outgoing interface corresponding to the shortest path from AGG 204 to ACC 201
  • the outgoing interface of forwarding entry 2 is the outgoing interface corresponding to the shortest path from AGG 204 to ACC 202.
  • This outgoing interface It can be the interface corresponding to the direct link between AGG 204 and ACC 201.
  • AGG 204 receives the aggregation routes A1::/84 from AGG 205 and RC 206 issued by AGG 205, respectively, and generates corresponding forwarding entry 3 and forwarding entry 4.
  • forwarding entry 3 includes the aggregation route A1::/84 and the outgoing interface, which is the outgoing interface of the direct link between AGG 204 and AGG 205.
  • Forwarding table entry 4 includes aggregation route A1::/84 and an outgoing interface, which is the outgoing interface of the direct link between AGG 204 and RC 206.
  • the cost of the direct link from AGG 204 to AGG 205 is lower than the cost of the link AGG 204-RC 206-RC 207-AGG 205, so the priority of the route corresponding to the direct link from AGG 204 to AGG 205 is higher than that of the link.
  • Route AGG 204-RC 206-RC 207-AGG 205 corresponds to the priority of the route.
  • the forwarding path AGG 204-RC 206-RC 207-AGG 205 can be used as a topology-independent loop-free alternate (TI-LFA) path.
  • Table 3 which is the forwarding entry generated by AGG 205.
  • Table 3 includes forwarding entry 5 and forwarding entry 6.
  • forwarding entry 5 includes the IP address A1:9::/96 of ACC 202 and the outgoing interface, which is the interface of the direct link between AGG 205 and ACC 202.
  • Forwarding table item 6 includes the IP address A1:A::/96 of ACC 203 and the outgoing interface, which is the interface of the direct link between AGG 205 and ACC 203.
  • AGG 205 receives the aggregation routes A1::/84 from AGG 204 and RC 207 issued by AGG 204, respectively, and generates corresponding forwarding entry 7 and forwarding entry 8.
  • forwarding entry 7 includes aggregation route A1::/84, and the outgoing interface of the aggregation route is the outgoing interface of the direct link between AGG 205 and AGG 204.
  • Forwarding table entry 8 includes the aggregation route A1::/84, and the outgoing interface of the aggregation route is the outgoing interface of the direct link between AGG 205 and RC 207.
  • the direct link between AGG 205 and AGG 204 corresponds to routing
  • the priority of the link AGG 205-RC 207-RC 206-AGG 204 corresponds to the priority of the route.
  • RC 206 sends a message to ACC 202.
  • AGG 204 query table 1 matches the IP address of ACC 202 A1:9::/96
  • the routing table entry 2 of the corresponding detailed route then sends the message to the ACC 201 through the outgoing interface of the direct link to the ACC 201 determined according to the routing table entry 2, and the ACC 201 forwards the message to the ACC 202.
  • AGG 204 deletes the detailed routes to ACC 201 and ACC 202, that is, AGG 204 deletes forwarding entry 1 and forwarding entry 2.
  • AGG 204 receives a message from RC 206, according to the destination address of the message, that is, the IP address of ACC 202, the match cannot reach ACC 202.
  • the forwarding entry 2 corresponding to the detailed route is matched to the forwarding entry corresponding to the aggregation route A1::/84.
  • the priority of the route corresponding to forwarding entry 3 is higher than the priority of the route corresponding to forwarding entry 4, so AGG 204 can determine the outbound interface of the direct link with AGG 205 according to forwarding entry 3 to AGG 205 Send the message.
  • AGG 205 After AGG 205 receives the message, it matches forwarding entry 5 according to the IP address of the message, and forwards the message to ACC 202 according to the outbound interface of the direct link to ACC 202 determined by forwarding entry 5 .
  • AGG 205 deletes forwarding entry 5. Therefore, when AGG 205 receives a message from AGG 204, it cannot match forwarding entry 5, that is, it cannot match the detailed route to ACC 202, but it matches forwarding entry 7, that is, it matches to AGG 204. Aggregate route A1::/84. Therefore, AGG 205 returns the message to AGG 204, thereby forming a loop, causing a waste of resources, and even causing network congestion.
  • AGG 204 deletes forwarding entry 3. Then when AGG 204 receives a message from RC 206, according to the destination address of the message, that is, the IP address of ACC 202, it cannot match the forwarding table entry 2 corresponding to the detailed route to ACC 202, and it cannot match the aggregation.
  • the forwarding entry 3 corresponding to the route is matched to the forwarding entry 4 corresponding to the aggregation route A1::/84.
  • the outgoing interface corresponding to the aggregation route A1::/84 in forwarding table entry 4 is the outgoing interface of the link directly connected to RC 206.
  • AGG 204 sends the message to RC 206 through the outgoing interface of the link directly connected to RC 206, and RC 206 sends the message to AGG 205 through RC 207.
  • AGG 205 cannot match the forwarding entry 5 corresponding to the detailed route to ACC 202 according to the IP address of ACC 202, but it can match the aggregation route A1::/84 Corresponding forwarding entry. Because the routing priority corresponding to forwarding entry 7 corresponding to the aggregation route A1::/84 is higher than the routing priority corresponding to the forwarding entry 8 corresponding to the aggregation route A1::/84.
  • AGG 205 matches the forwarding table entry 7 corresponding to the aggregation route A1::/84 according to the IP address of ACC 202, and then passes the message to the AGG 204 The outgoing interface of the direct link is returned to AGG 204, thus forming a loop.
  • AGG 205 cannot match the forwarding table entry 5 corresponding to the detailed route to ACC 202 according to the IP address of ACC 202, nor can it match with the aggregation
  • the forwarding entry 7 corresponding to route A1::/84 is matched to the forwarding entry 8 corresponding to the aggregation route A1::/84, then AGG 205 sends the message according to the outgoing interface of the direct link with RC 207 Return to AGG 204 through RC 207, which also forms a loop, resulting in waste of resources and even network congestion.
  • FIG. 3 is a schematic diagram of a network architecture using SR's Multi-Protocol Label Switching (MPLS) technology.
  • MPLS Multi-Protocol Label Switching
  • the network architecture includes an access device, an aggregation device, and a regional core device.
  • the access device may be an ACC
  • the aggregation device may be an AGG
  • the regional core device may be an RC.
  • the network architecture includes ACC 301, ACC 302, ACC 303, AGG 304, AGG 305, RC 306, and RC 307.
  • ACC 301, ACC 302 and ACC 303 are respectively connected to AGG 304 and AGG 305, and AGG 304 and AGG 305 are respectively connected to RC 306 and RC 307.
  • ACC 301, ACC 302, ACC 303, AGG 304, and AGG 305 belong to IGP domain (domain) 1
  • AGG 304, AGG 305, RC 306, and RC 307 belong to IGP domain 2.
  • the label of ACC 301 is 16001, the label of ACC 302 is 16002, the label of ACC 303 is 16003, the label of AGG 304 is 16101, and the label of AGG 305 is 16102.
  • ACC 301, ACC 302, ACC 303, AGG 304, and AGG 305 respectively publish their own labels in IGP domain 1, and AGG 304 and AGG 305 publish their own labels in IGP domain 2.
  • the AGG 304 confirms the main forwarding path to the ACC 301 according to the received label 16001 from the ACC 301, that is, the direct link from the AGG 304 to the ACC 301, and generates a corresponding forwarding entry 9.
  • forwarding entry 9 includes the label 16001 of ACC 301 and the outgoing interface.
  • the outgoing interface is the outgoing interface of the AGG 304 directly connected to ACC 301.
  • AGG 304 can generate a backup forwarding path to ACC 301, where the backup forwarding path is AGG 304-AGG 305-ACC 301, and generate a corresponding forwarding table entry 10 according to the backup forwarding path. See Table 6.
  • forwarding entry 10 includes the label 16001 of ACC 301 and the outgoing interface, and the outgoing interface is the interface of the AGG 304 that is directly connected to the AGG 305.
  • AGG 305 generates forwarding entry 11 according to the received label 16001 from ACC 301. Refer to Table 7. This forwarding entry 11 includes label 16001 of ACC 301 and the outbound interface. The outbound interface is AGG 305 and ACC 301. The interface of the direct link.
  • AGG 305 can also generate a backup forwarding path to ACC 301, where the backup forwarding path is AGG 305-AGG 304-ACC 301, and generate a corresponding forwarding entry 12 according to the backup forwarding path.
  • forwarding entry 12 includes the label 16001 of ACC 301 and the outgoing interface, and the outgoing interface is the interface of the AGG 305 that is directly connected to the AGG 304.
  • AGG 304 receives a message from RC 306, and the message carries a label 16001 of ACC 301, which identifies the destination node of the message as ACC 301.
  • AGG 304 determines that the direct link with ACC 301 is faulty, AGG 304 matches forwarding entry 10 according to label 16001 of ACC 301, and obtains the outgoing interface corresponding to label 16001 of ACC 301, which is directly connected to AGG 305. Connect the outgoing interface of the link, and press the label 16102 of AGG 305 in the message, and then send the message to AGG 305.
  • AGG 305 After AGG 305 receives the message, if it determines that the direct link with ACC 301 is not faulty, it sends the message to ACC 301; if it determines that the direct link with ACC 301 is faulty, Then the label 16001 of ACC 301 is matched to forwarding entry 12, and the outgoing interface corresponding to label 16001 of ACC 301 is obtained, that is, the outgoing interface of the link directly connected to AGG 304, and the label 16101 of AGG 304 is pressed into the message. , And then send the message to AGG 304, thereby forming a loop, causing a waste of network resources and even network congestion.
  • an embodiment of the present application provides a message sending method to reduce the technical problems of resource waste or network congestion in the network communication process. Before introducing the message sending method, first introduce the network architecture to which the method can be applied.
  • FIG. 4 is a schematic structural diagram of a network architecture 500 provided by an embodiment of the application.
  • the network architecture 500 includes a network device 401, a network device 402, a network device 403, a network device 404, and a network device 405.
  • the network device 401 is connected to the network device 402, the network device 403, and the network device 404 respectively.
  • the network device 404 is connected to the network device 403 and the network device 405 respectively.
  • the network device 401, the network device 402, the network device 403, the network device 404, and the network device 405 may be routers, switches, etc., which are not specifically limited in the embodiments of the present application.
  • the network device 404 sends a notification message to the network device 401, and the notification message includes the identifier of the network device 404 and the indication identifier A.
  • the indication identifier A is used to indicate that the network device 404 supports the ability to avoid using the alternate path to forward packets.
  • the network device 401 After the network device 401 receives the first message destined for the network device 403, the network device 401 searches for the forwarding entry according to the identifier of the network device 403, and obtains the identifier and the outgoing interface of the network device 404.
  • the network device 401 carries the indication identifier A in the first packet to obtain the second packet, and forwards the second packet to the network device 404 through the outgoing interface.
  • the indication identifier A is used to instruct the network device 404 to avoid using the alternate forwarding path from the network device 404 to the network device 403 to send the second packet to the network device 403.
  • the network device 404 determines that the primary forwarding path from the network device 404 to the network device 403 is unreachable, it no longer uses the alternate forwarding path to send the second packet to the network device 403 according to the indication of the indicator A, but directly discards the second packet. Message.
  • the method mainly involves a first network device and a second network device.
  • the first network device may be the network device 401 in FIG. 4, and the second network device may be the network device 404 in FIG. 4.
  • the method for sending messages can be applied to scenarios such as SR-MPLS, SRv6, MPLS, Internet Protocol version 6 (IPv6) or Internet Protocol version 4 (IPv4).
  • SRv6 and SR-MPLS scenarios are used as examples.
  • FIG. 5 is a flowchart of a method for sending a message according to an embodiment of the application.
  • the method for sending messages includes the following steps:
  • the second network device sends a message M1 to the first network device, and the message M1 includes the identifier of the second network device and the indication identifier A.
  • the identifier of the second network device may be a second network device segment identifier (SID), and the segment identifier may be an IPv6 address of the second network device.
  • SID second network device segment identifier
  • the identifier of the second network device may be the label of the second network device.
  • the identifier of the second network device may also be identified in other forms, such as a router identifier (router identifier, router ID), etc., which is not specifically limited in the embodiment of the present application.
  • the identifier of the second network device can be obtained through configuration.
  • the indication identifier A is used to identify that the second network device has the ability to avoid using the alternate forwarding path to forward packets.
  • the ability of the second network device to avoid using the alternate forwarding path to forward the message is specifically: when the second network device forwards the message to the destination device, if there is a primary forwarding path and a backup forwarding path for forwarding the message to the destination device , When the primary forwarding path is unreachable, the backup forwarding path is no longer used to forward the packet to the destination device. This avoids the problem of packet forwarding loops caused by the use of alternate forwarding paths to forward packets, thereby avoiding resource waste or network congestion.
  • the indication identifier A and the identifier of the second network device may be two independent pieces of information, or they may be integrated.
  • the indication identifier A can be obtained by the second network device in a configured manner.
  • the identifier of the second network device can either identify the second network device itself, or can be used to identify that the second network device has support for avoiding the use of alternate forwarding paths to forward packets Ability.
  • the second network device can send the message M1 carrying the identifier of the second network device and the indication identifier A to the first network by flooding equipment.
  • the message M1 may be an announcement message, such as an intermediate system to intermediate system (Intermediate system to intermediate system, ISIS) message or an Open Shortest Path First (Open Shortest Path First, OSPF) message.
  • ISIS Intermediate system to intermediate system
  • OSPF Open Shortest Path First
  • the message M1 is an ISIS IPv6 message or an OSPF version 3 (version 3, v3) message
  • the message M1 may include an Endpoint Segment Identifier (Endpoint Segment Identifier, Endpoint).
  • SID type length value
  • TLV type length value
  • the End SID TLV field includes the Type field, Length field, Flags field, SRv6Endpoint Function field, SID field, Sub-sub-tlv-len field, sub-sub-TLVs field, etc. .
  • the value of the Type field identifies the type of the End SID TLV field.
  • the value of the Length field is the length of the sTLV.
  • the Flags field occupies 8 bits.
  • the value of the SRv6 Endpoint Function field is the legal function values of the End SID TLV.
  • the End SID TLV field may include one or more SID fields, and each SID field is 128 bits (bits).
  • the value of one of the SID fields may include the SID of the second network device.
  • the SID of the second network device includes a locator part and a function part
  • the SID of the second network device is the IPv6 address of the second network device
  • the SID of the second network device can be regarded as the second network The identification of the device.
  • the value of the Sub-sub-tlv-len field corresponds to the length of the Sub-sub-tlv field.
  • the Sub-sub-tlv field is optional.
  • the End SID TLV field includes a Type field, a Length field, a Flags field, a reserved (Reserved) field, an Endpoint Behavior (Endpoint Behavior) field, a SID field, and a sub-TLVs field.
  • the value of the Type field is used to indicate the type of the End SID TLV.
  • the value of the Length field is the length of the End SID TLV.
  • the Flags field occupies 8 bits.
  • the value of the Endpoint Behavior field is determined according to the specific situation, and will not be repeated here.
  • the End SID TLV field may include one or more SID fields, and each SID field is 128 bits.
  • the value of one of the SID fields may include the SID of the second network device, and may also be regarded as the identification of the second network device.
  • the SID field includes a locator part and a function part, and the value of the SID field is the IP address of the second network device.
  • the sub-TLVs field is optional.
  • the value of the Type field in the End SID TLV field is used to indicate that the End SID TLV field is a specific type of End SID TLV, and this type of END SID TLV indicates that the second network device has support for avoiding use The ability of the alternate forwarding path to forward packets. That is, the Type field in the End SID TLV field carries the indication identifier A.
  • the value of the Flags field in the End SID TLV field is used to indicate that the second network device has the function of indicating the identifier A, that is, the flags field carries the indicating identifier A.
  • the flags field carries the indicating identifier A.
  • one or more bits in the Flags field are used to carry the indicator A, for example, the 8th bit of the Flags has a value of 1, which identifies the indicator A.
  • the Flags field carries a bit indicating the flag A, which may be called a bypass (Bypass) Flag, and the bit may be labeled B, which is an abbreviation of Bypass Flags.
  • the SID field of the second network device in the End SID TLV field carries an indication identifier A, and the SID of the second network device may also be referred to as a bypass (Bypass) SID.
  • the function part of Bypass SID includes indication identifier A.
  • Bypass SID is used to identify the second network device, and also has the function of indicating the identifier A.
  • the message M1 is an ISIS message or an OSPF message
  • the message M1 may include a prefix SID TLV field, and the prefix SID TLV field may include the first 2.
  • the prefix SID TLV field includes a Type field, a Length field, a Flags field, an algorithm (Algorithm) field, and one of the following three fields: a SID field, an index (Index) field, and a label (Label) field.
  • the value of the Type field indicates the type of prefix SID TLV.
  • the value of the Length field is the length of the prefix SID TLV field.
  • the value of the Flags field may include a value flag (Value Flag, V-Flag) or a local flag (Local Flag, L-Flag) or others.
  • the value of the Algorithm field indicates the algorithm used by the router to calculate the reachability to other network devices (for example, the shortest path method) or the algorithm used to calculate the prefixes of these other network devices.
  • the value of the SID/Index/Label field includes the label of the second network device, and the label of the second network device can be regarded as the identification of the second network device.
  • the prefix SID TLV field includes a Type field, a Length field, a Flags field, a Reserved field, a multi-topology (MT) ID field, an Algorithm field, and one of the following three fields: SID field, Index field, or Label field.
  • the value of the Type field indicates the type of prefix SID TLV.
  • the value of the Length field is the length of the prefix SID TLV field.
  • the value of the Flags field may include a value flag (Value Flag, V-Flag) or a local flag (Local Flag, L-Flag) or others.
  • the value of the SID/Index/Label field includes the label of the second network device, and the label of the second network device can be regarded as the identification of the second network device.
  • the value of the Type field in the prefix SID TLV field is used to indicate that the prefix SID TLV is a special prefix SID TLV, and this type of TLV is used to indicate that the second network device supports avoiding alternate forwarding paths.
  • the value of the Flags field in the prefix SID TLV field is used to indicate that the second network device has the function of indicating the identifier A, that is, the flags field carries the indicating identifier A.
  • the flags field carries the indicating identifier A.
  • one or more bits in the Flags field are used to carry the indicator A, for example, the 8th bit of the Flags has a value of 1, which identifies the indicator A.
  • the Flags field carries a bit indicating the flag A, which may be called a bypass (Bypass) Flag, and the bit may be labeled B, which is an abbreviation of Bypass Flags. .
  • the value of the SID/Index/Label field is the label of the second network device.
  • the label of the second network device has the function of identifying the second network device and also has an indication indicating the label A. Function.
  • the first network device receives the message M1, and generates a forwarding entry according to the identifier of the destination device.
  • the destination device is a network device that communicates with the first network device.
  • the destination device may be a router, a switch, a terminal device, or a server, etc., which is not specifically limited in the embodiment of the present application.
  • the destination device may be the network device 403 in FIG. 4.
  • the identifier of the target device may be the IP address of the target device.
  • the identifier of the target device may be the label of the target device.
  • the identification of the destination device may also be identified in other forms, such as router ID, etc., which is not specifically limited in the embodiment of the present application.
  • the destination device may send the identification of the destination device to the first network device in a flooding manner in advance, so that the first network device can obtain the identification of the destination device.
  • the first network device After obtaining the message M1, the first network device generates a forwarding entry according to the identification of the destination device and the identification of the second network device in the message M1, and the first forwarding path corresponding to the forwarding entry is from the first network device to the The forwarding path of the destination device.
  • the forwarding entry includes the identification of the destination device and forwarding information of the first forwarding path.
  • the forwarding information can include a list of segment identifiers, the segment identifier list includes the segment identifier of the second network device, and the segment identifier of the second network device is the IP address of the second network device; when applied to SR-MPLS In the scenario, the forwarding information includes the label stack, and the label stack includes the label of the second network device.
  • the forwarding information may not only include the segment identifier of the second network device or the label of the second network device, but also the identifier of the outbound interface, where the outbound interface is the interface to the next-hop network device on the first forwarding path.
  • the first forwarding path from the first network device to the second network device may be a tunnel.
  • the first network device After the first network device receives the message M1, it generates a tunnel to the second network device according to the identifier of the second network device, and the identifier of the outgoing interface corresponding to the next hop network device on the first forwarding path corresponds to the tunnel Interface.
  • the first forwarding path may be regarded as a backup forwarding path from the first network device to the destination device.
  • the backup forwarding path is relative to the main forwarding path.
  • the first network device when the primary forwarding path from the first network device to the destination device is not faulty, the first network device sends a data packet (for example, message M2 hereinafter) to the destination device through the primary forwarding path; and When the primary forwarding path fails, the first network device can send the data message to the second network device through the first forwarding path, and the second network device sends the data message to the destination device.
  • the main forwarding path from the first network device to the destination device may be referred to as the second forwarding path.
  • the first forwarding path and the second forwarding path have the following three possible situations:
  • the second forwarding path is the forwarding path of the detailed route corresponding to the IP address of the destination device, and correspondingly, the first forwarding path is the forwarding path of the aggregation route corresponding to the IP address of the destination device.
  • the second forwarding path is the main forwarding path of the aggregation route corresponding to the IP address of the destination device, and correspondingly, the first forwarding path is the backup forwarding path of the aggregation route corresponding to the IP address of the destination device.
  • the second forwarding path is the main forwarding path of the detailed route corresponding to the IP address of the destination device
  • the corresponding first forwarding path is the backup forwarding path of the detailed route corresponding to the IP address of the destination device.
  • the second forwarding path is the forwarding path corresponding to the primary forwarding information in the label forwarding entry corresponding to the label of the destination device, and correspondingly, the first forwarding path is the corresponding destination.
  • the main forwarding information may include the label and outgoing interface of the destination device.
  • the backup forwarding information may include the label of the destination device, the label stack, and the outgoing interface, and the label stack includes the label of the second network device.
  • the forwarding entry corresponding to the first forwarding path may include special indication information, or the forwarding entry can be set as a special forwarding entry to indicate that the forwarding entry is for the first network when the second forwarding path is unreachable.
  • the forwarding entry corresponding to the first forwarding path may also include an indication identifier A.
  • the first forwarding path may also be the main forwarding path from the first network device to the destination device.
  • the first network device receives the message M2 destined for the destination device.
  • the message M2 may be a data message, that is, a message carrying service data.
  • the message M2 includes the identification of the destination device, that is, the message M2 needs to reach the destination device.
  • the message M2 may come from a third network device, and the third network device may be, for example, the network device 402 in the embodiment shown in FIG. 4.
  • the third network device belongs to the first network domain
  • the destination device belongs to the second network domain.
  • the first network device and the second network device may belong to both the first network domain and the second network domain, and the first network device and the second network device may be operator edge (provider edge, PE) nodes.
  • PE operator edge
  • the first network domain is the area of the backbone network
  • the second network domain is the area of the access network
  • the first network device is the network device connecting the access network and the backbone network
  • the first forwarding path is the forwarding path in the backbone network.
  • the first network domain and the second network domain are both IGP domains, but their IGP domain numbers are different.
  • the first network device is a network device connecting these two IGP domains.
  • the first network domain and the second network domain are both BGP domains, but their BPG domain numbers are different.
  • the first network device is a network device connecting these two BGP domains.
  • the first network device determines the first forwarding path according to the identifier of the destination device.
  • the first network device searches for the aforementioned forwarding entry including the identity of the destination device according to the identity of the destination device in the message M2, and determines the corresponding first forwarding path according to the forwarding entry, that is, from the first forwarding path.
  • a backup forwarding path from the network device to the second network device.
  • S504 specifically includes the following three possible implementation manners:
  • the first forwarding path is the forwarding path of the aggregation route corresponding to the IP address of the destination device
  • the second forwarding path is the forwarding path of the detailed route corresponding to the IP address of the destination device.
  • the step S504 is specifically: when the first network device does not match the detailed route corresponding to the IP address of the destination device according to the IP address of the destination device, or the first network device matches the detailed route corresponding to the IP address of the destination device according to the IP address of the destination device.
  • the first network device determines that the forwarding path corresponding to the aggregation route to the IP address of the destination device is the first forwarding path.
  • the first forwarding path is the backup forwarding path of the aggregation route corresponding to the IP address of the destination device
  • the second forwarding path is the main forwarding path of the aggregation route corresponding to the IP address of the destination device.
  • the step S504 is specifically: when the first network device matches the aggregation route corresponding to the IP address of the destination device according to the IP address of the destination device, and determines that the main forwarding path of the aggregation route is unreachable, the first network device determines the aggregation route of the aggregation route.
  • the backup forwarding path is the first forwarding path.
  • the first forwarding path is the backup forwarding path of the detailed route corresponding to the IP address of the destination device
  • the second forwarding path is the main forwarding path of the detailed route corresponding to the IP address of the destination device.
  • Step S504 is specific: the first network device matches the detailed route corresponding to the IP address of the destination device according to the IP address of the destination device, and determines that the primary forwarding path of the detailed route is unreachable, and the first network device determines the backup forwarding of the detailed route The path is the first forwarding path.
  • the label forwarding entry corresponding to the label of the destination device stored in the first network device may include primary forwarding information and backup forwarding information, where the primary forwarding information It corresponds to the primary forwarding path from the first network device to the destination device, that is, the second forwarding path; the backup forwarding information corresponds to the backup forwarding path from the first network device to the destination device, that is, the first forwarding path.
  • the first network device matches the label forwarding entry according to the label of the destination device and determines that the second forwarding path is unreachable, the first network device can determine the first forwarding path according to the label of the destination device, and forward it through the first forwarding path Message M2.
  • S505 The first network device adds an indication mark B to the message M2 to generate a message M3.
  • the indication identifier B is used to instruct the network device on the first forwarding path to avoid using the alternate path to send the message M3 to the destination device.
  • the network device on the first forwarding path may only include the second network device, or may include other network devices on the first forwarding path except the second network device.
  • the indication identifier B may be carried in the segment router header (SRH) of the message M3.
  • the indication identifier B may be carried in the Flags field of the message M3 SRH.
  • the SRH of the SRv6 message includes the basic header (next header) field, the SRH length (Hdr Ext Len) field, the routing type (Routing Type), the segment left (Segments Left) field, and the last entry (Last Entry). Fields, Flags field, Tag field, Segment List field, and optional TLV objects (Optional Type Length Value objects).
  • the value of the next header field is 43, indicating that the next packet header is a routing extension header.
  • the value of the Hdr Ext Len field is the length of the SRH.
  • the value of the Routing Type field is 4, indicating that it carries SRH.
  • the value of the Segments Left field is the number of the next SID, and the initial value is n-1, where n is the number of SIDs.
  • the value of the Last Entry field is the number of the last SID of the packet forwarding path.
  • the value of the Tag field is used to mark a group of packets with the same characteristics.
  • the value of the Segment List field is a list of SIDs. In this embodiment of the present application, one or more bits in the Flags field are used to carry the indicator B.
  • the 8th bit of the Flags has a value of 1 to identify the indicator B.
  • the flags field carrying the bit indicating the flag B may be called a bypass (Bypass) Flag, and the bit may be labeled B, which is an abbreviation of Bypass Flags.
  • the indication identifier B may be carried in the SID list field of the message M3 SRH.
  • the SID list includes the SID of the second network device
  • the SID of the second network device includes the indication identifier B
  • the SID of the second network device that includes the indication identifier B may also be referred to as the Bypass SID.
  • the SID of the second network device includes a locator part and a function part, and the SID of the second network device includes the IP address of the second network device.
  • the Bypass SID may be a special IPv6 address, which can identify the second network device itself, and can also have an indication function of indicating the identifier B.
  • the value of the Function part can be End.X, which means that after receiving the message, the network device receiving the message M3 will subtract 1 from the value of Segment Left, and replace the value of the SID in the SID list indicated after subtracting 1 by IPv6 The value of the destination address field of the message header, and the next-hop network device forwards the message M3.
  • part of the bytes in the locator of the Bypass SID has the function of indicating the identifier B at the same time.
  • the Function part is the same as the realization method a).
  • the function part of the Bypass SID includes an indication identifier B.
  • the indication identifier B can be carried in the newly added TLV field of the message M3 SRH.
  • the newly added TLV fields include the Type field, the Length field, and the Value field.
  • the value of the Type field is the type of the newly added TLV field
  • the value of the Length field is the length of the TLV field
  • the value of the Value field is the indicator B.
  • the message M3 includes a label stack, indicating that the identifier B can be carried in the label stack of the message M3.
  • the label stack of the message M3 may include the label of the destination device, the label of the second network device, and the special label.
  • the special label has the function of indicating identification B, and the label of the second network device is adjacent to the special label, that is, the special label can be one layer above the label of the second network device, or on the label of the second network device.
  • the label of the second network device is on the top of the label stack, and the special label is next to the label of the second network device. See Figure 14(b), the special label is on the top of the stack. 2.
  • the label of the network device is the label next to the special label.
  • the label stack of the message M3 includes the label of the destination device and the label of the second network device.
  • the label of the second network device also has an indication identifier B. meaning.
  • the message M3 may not include the segment identifier of the second network device.
  • the SID list of the message M3 may also include the SID of the previous hop network device of the second network device on the first forwarding path, and the function part of the SID includes End.X , End.X is an operation defined in SRv6Programming, which means: the previous hop network device forwards the message M3 to the layer 3 (layer 3, L3) outgoing interface corresponding to the SID.
  • S506 The first network device sends the message M3 to the second network device through the first forwarding path.
  • the network device (except the second network device) passing through the tunnel only forwards the message M3, and does not perform corresponding processing according to the indicator B therein.
  • the network device on the first forwarding path avoids using the alternate forwarding path to send the message M3 to the destination device according to the indication identifier B, so as to avoid loop problems.
  • the fourth network device is the network device 405 in FIG. 4, that is, in FIG. 4, the network device 405 and the network device 402 are two independent Network equipment.
  • the fourth network device and the foregoing third network device may be the same network device.
  • the fourth network device may belong to the first network domain, that is, the first forwarding path does not pass through the second network domain. Its purpose is to save network resources in the second network domain, and is suitable for the first network
  • the network resource of the network device in the domain is greater than the network resource of the network device in the second network domain.
  • the second network device receives the message M3 destined for the destination device.
  • the second network device determines that the main forwarding path from the second network device to the destination device is unreachable.
  • the second network device In response to determining that the primary forwarding path is unreachable, the second network device avoids using the alternate forwarding path to send the message M3 to the destination device according to the indication of the indication identifier B.
  • the second network device can determine whether the primary forwarding path to the destination device is reachable according to the identifier of the destination device.
  • the primary forwarding path is relative to the backup forwarding path, and both are forwarding paths from the second network device to the destination device.
  • the second network device when the primary forwarding path is unreachable, the second network device does not send the message M3 to the destination device through the alternate forwarding path according to the indication of the indicator B, so as to reduce resource waste or network congestion.
  • this method can avoid loop problems with the first network device. After the second network device avoids using the alternate forwarding path to send the message M3 to the destination device, the message M3 can be discarded.
  • the identifier of the destination device is the IP address of the destination device.
  • the SRv6 scenario there are three possible scenarios for the primary forwarding path and the backup forwarding path for the second network device to reach the destination device. The following describes S508 and S509 in detail in combination with these three possible scenarios.
  • Case 1 The primary forwarding path from the second network device to the destination device is the forwarding path corresponding to the detailed route to the destination device, and the backup forwarding path from the second network device to the destination device is the forwarding path corresponding to the aggregation route to the destination device. Then, when the second network device does not match the corresponding detailed route according to the IP address of the destination device, it means that the primary forwarding path of the second network device to the destination device is unreachable, so even if there is an aggregation corresponding to the IP address of the destination device Route, the message M3 is not sent through the backup forwarding path corresponding to the aggregation route.
  • the second network device matches the detailed route according to the IP address of the destination device, but the forwarding path corresponding to the detailed route is unreachable, even if there is an aggregate route corresponding to the IP address of the destination device, follow the instructions of the indicator B.
  • the network device also does not send the message M3 through the backup forwarding path corresponding to the aggregation route.
  • the primary forwarding path from the second network device to the destination device is the primary forwarding path of the aggregation route to the destination device
  • the backup forwarding path is the backup forwarding path of the aggregation route to the destination device.
  • Case 3 The primary forwarding path from the second network device to the destination device is the primary forwarding path of the detailed route to the destination device, and the backup forwarding path is the secondary forwarding path of the detailed route to the destination device.
  • the second network device matches the detailed route according to the IP address of the destination device, but the primary forwarding path of the detailed route is unreachable, the second network device does not send the detailed route through the alternate forwarding path of the detailed route according to the indication of the indicator B. Message M3.
  • the second network device when confirming that the primary forwarding path is unreachable, specifically, the second network device first determines that the destination address of the message M3 is the IP address of the second network device, and obtains the destination device's IP address from the segment identifier list of the SRv6 message Logo. Then, the second network device modifies the destination address of the message M3 to the identification of the destination device. The second network device determines that the primary forwarding path to the destination device is unreachable according to the destination address of the message M3.
  • the identifier of the destination device is the label of the destination device.
  • the label forwarding entry corresponding to the label of the destination device stored by the second network device includes primary forwarding information and backup forwarding information, where the primary forwarding information corresponds to the primary forwarding path from the second network device to the destination device, and the backup forwarding The information corresponds to the alternate forwarding path of the second network device to the destination device.
  • the second network device matches the label forwarding table of the target device according to the label of the target device, and determines that the primary forwarding path corresponding to the primary forwarding information in the label forwarding table is unreachable, even if it can be used with the destination device
  • the standby forwarding information corresponding to the label of the tag sends a message M3, and the second network device does not send the message M3 to the destination device through the standby forwarding path corresponding to the standby forwarding information according to the indication of the indication identifier B.
  • the second network device can pop up the special label and the label of the second network device to obtain the special label, and according to the special label
  • the label indicates that the message M3 is not sent through the alternate forwarding path to the destination device.
  • the next-hop network device is the destination device
  • the top label of the label stack is the label of the destination device.
  • the second network device can avoid using the alternate forwarding path to forward the message M3 according to the indication identifier B. Transmission of the message M3 through the alternate forwarding path may cause a loop problem in message forwarding, thereby avoiding network congestion or waste of network bandwidth resources.
  • Figure 15 is a flowchart of the method of sending messages under the network architecture shown in Figure 16 (a) and Figure 16 (b), Figure 16 (a) ) And the network architecture shown in Figure 16(b) are the same as the network architecture shown in Figure 2.
  • the message sending method includes the following steps:
  • AGG 204 generates a forwarding table entry 13 for the detailed route corresponding to the IP address A1:8::/96 of ACC 201, and generates a forwarding table for the detailed route corresponding to the IP address A1:9::/96 of ACC 202 Item 14.
  • AGG 204 aggregates the detailed route A1:8::/96 of ACC 201 in the access ring 1 and the detailed route A1:9::/96 of ACC 202 into the aggregate route A1::/84, and the aggregate route A1: :/84 is released to the network devices in the convergence ring.
  • AGG 204 can be regarded as the first network device in the foregoing.
  • Table 5 which includes forwarding entries generated by AGG 204, and the forwarding entries include forwarding entry 13 and forwarding entry 14.
  • the forwarding entry 13 includes the IP address A1:8::/96 of ACC 201 and the outgoing interface (specifically refers to the identification of the interface, the same applies to the following), where the outgoing interface is the forwarding from AGG 204 to ACC 201 The AGG 204 interface on the path.
  • the forwarding table entry 14 includes the IP address A1:9::/96 of the ACC 202 and the outgoing interface.
  • the outgoing interface is the interface of the AGG 204 on the forwarding path from the AGG 204 to the ACC 202.
  • Both the outgoing interface in forwarding table entry 13 and forwarding table entry 14 are the shortest path interface between AGG 204 and ACC 201, and the shortest path interface may be the outgoing interface of the direct link between AGG 204 and ACC 201.
  • S602 The forwarding table entry 15 of the detailed route corresponding to the IP address A1:9::/96 of ACC 202 and the forwarding table entry of the detailed route corresponding to the IP address A1:A::/96 of ACC 203 are generated on S602: AGG 205 16.
  • AGG 205 aggregates the detailed route A1:9::/96 of ACC 202 in access ring 1 and the detailed route A1:A::/96 of ACC 203 in access ring 2 into aggregate route A1::/84, and combines The aggregation route A1::/84 is advertised to the aggregation ring.
  • the AGG 205 can be regarded as the second network device in the foregoing.
  • forwarding entry 15 includes the IP address A1:9::/96 of ACC 202 and the outgoing interface, which is the outgoing interface of the direct link between AGG 205 and ACC 202.
  • the forwarding entry 16 includes the IP address A1:A::/96 of the ACC 203 and the outgoing interface, which is the outgoing interface of the direct link between the AGG 205 and the ACC 203.
  • AGG 204 receives the aggregation route A1::/84 from AGG 205, and generates a corresponding forwarding entry 17.
  • forwarding entry 17 includes aggregation route A1::/84 and an outgoing interface.
  • the outgoing interface can be set to null 0 or the outgoing interface of the direct link between AGG 204 and AGG 205.
  • AGG 205 receives the aggregation route A1::/84 from AGG 204, and generates a corresponding forwarding entry 18.
  • forwarding entry 18 includes aggregation route A1::/84, and the outgoing interface of the aggregation route is set to null 0 or the outgoing interface of the direct link between AGG 205 and AGG 204. Among them, null 0 is used to indicate that the outgoing interface is unavailable.
  • the AGG 205 sends a message M1 to the network device in the convergence ring.
  • the message M1 includes the SID of the AGG 205 and the indication identifier A.
  • the SID of the AGG 205 may be A2:2::2/128.
  • the SID of the AGG 205 A2:2::2/128 (that is, the IP address of the AGG 205) has the function of identifying the AGG 205.
  • the indication identifier A is used to instruct the network device on the forwarding path to the AGG 205 to avoid using the alternate forwarding path to send the message M3 to the destination device.
  • the SID type of the AGG 205 may be the penultimate segment pop of the SRH (PSP) type.
  • the AGG 204 receives the message M1, and obtains the SID A2:2::2/128 and the indication identifier A of the AGG 205 from the message M1.
  • AGG 204 generates a tunnel to AGG 205 according to the SID of the AGG 205 A2:2::2/128.
  • the tunnel to the AGG 205 passes through the AGG 204-RC 206-RC 207-AGG 205, and this tunnel can be regarded as the first forwarding path mentioned above.
  • AGG 204 generates a backup forwarding table entry for the aggregation route A1::/84, such as forwarding table entry 19, and forwarding table entry 19 is a backup forwarding table entry for forwarding table item 17.
  • the destination address of forwarding entry 19 is A1::/84, which also includes backup forwarding information and the outgoing interface of the tunnel.
  • the backup forwarding information includes a repair list, which contains the SID of AGG 205 .
  • the repair list may also include the SID of other network devices on the tunnel except the SID of AGG 205, such as the SID of RC 206 and the SID of RC 207.
  • AGG 204 confirms that the primary forwarding path to ACC 202 is unreachable, and AGG 204 deletes forwarding entry 14.
  • the main forwarding path from AGG 204 to ACC 202 is AGG 204-ACC 201-ACC 202, and this main forwarding path can be regarded as the second forwarding path above.
  • the AGG 204 can delete forwarding entry 14.
  • AGG 204 receives a message M2 from RC 206, and the message M2 includes the IP address A1:9::/96 of ACC 202.
  • ACC 202 can be regarded as the above-mentioned target device.
  • the message M2 includes an IPv6 message header and a payload
  • the IPv6 message header includes a destination address
  • the destination address is the IP address A1:9::/96 of ACC 202.
  • AGG 204 does not match the detailed route according to the IP address A1:9::/96 of ACC 202, but it can match the aggregation route A1::/84, that is, it can be matched to the forwarding Post item 17 and forward item 19.
  • AGG 204 adds the SID of ACC 202 to the SID list in the message M2SRH A1:9::/96 and the SID of AGG 205 A2:2::2/128, and adds it to the Flags field of the SRH of the message M2 Indicate the identifier B, and modify the value of the destination address field of the IPv6 header of the message M2 to the IP address of AGG 205, thereby obtaining the message M3.
  • the SID list of the message M3 includes both the SID of AGG 205 and the SID of ACC 202.
  • the SID of ACC 202 is stored in the Segment List[0] position in the SRH header
  • the SID of AGG 205 is stored in Segment List[1] in the SRH header
  • Segment Left is set to 1.
  • the AGG 204 sends a message M3 to the AGG 205 according to the interface corresponding to the tunnel.
  • the AGG 205 receives the message M3, and confirms whether the main forwarding path to the ACC 202 is reachable according to the IP address A1:9::/96 of the ACC 202 in the message M3. If it is, the message M3 is sent to the ACC 202 through the main forwarding path; if not, the message M3 is avoided using the backup path to forward the message according to the indication mark B.
  • AGG 205 After AGG 205 receives message M3, it confirms that the destination address is the address of AGG 205, and then reduces the Segment Left value in message M3 by one to 0, using Segment List[0], which is the IP address of ACC 202 A1:9::/96 replaces the destination address in the IPv6 header. AGG 205 confirms whether it can be matched to forwarding entry 15 according to the IP address A1:9::/96 of ACC 202 in the destination address. If it can be matched, it sends a report to ACC 202 through the outgoing interface of the link directly connected to ACC 202. Text M3.
  • the SID of ACC 202 is an End SID of the PSP type
  • the SRH header of the message M3 is popped up before the message M3 is sent. Modify the destination address in the IPv6 packet header to the IP address of ACC 202 before forwarding. If there is no match, or if it matches, but it is confirmed that the direct link with ACC 202 is unreachable, AGG 205 matches the forwarding entry 18 according to the IP address of ACC 202. Regardless of whether the outgoing interface included in the forwarding entry 18 is null 0 or the outgoing interface of the link directly connected to the AGG 204, the AGG 205 no longer uses the entry 18 to forward the message, and directly discards the message M3.
  • AGG 205 matches the outbound interface null 0 corresponding to the aggregation route A1::/84 according to the IP address of ACC 202, it means that the primary forwarding path corresponding to the aggregation route A1::/84 is unreachable, so even if there is The backup forwarding path corresponding to the aggregation route A1::/84, such as AGG 205-RC 207-RC 206-AGG 204, does not use the backup forwarding path to forward packets, thereby avoiding loops between AGG 205 and AGG 204.
  • the AGG 205 when the SID type of the AGG 205 is the last hop SRH segment information pop-up (Ultimate Segment Pop of the SRH, UPS) type, the AGG 205 does not need to pop the SRH before sending the message M3.
  • the AGG 205 can not return the message M3 to the AGG 204 when the main forwarding path to the ACC 202 is unreachable, thereby avoiding the problem of wasting resources or network congestion.
  • the situation that there is no direct link between AGG 204 and AGG 205 is similar to the situation that the direct link between AGG 204 and AGG 205 fails, and will not be repeated here.
  • the SID of the AGG 205 may not be included in the message M3, thereby reducing the length of the SRH and reducing the occupation of network resources when the message is forwarded.
  • FIG. 17 is a flowchart of a method for sending a message under the network architecture shown in FIG. 18.
  • the network architecture shown in FIG. 18 is the same as the network architecture shown in FIG.
  • the method for sending messages includes the following steps:
  • the AGG 304 receives the label 16001 sent by the ACC 301 by flooding in the IGP domain 1, confirms the main forwarding path to the ACC 301 according to the label 16001 of the ACC 301, and generates a forwarding entry 20.
  • AGG 304 can be regarded as the first network device in the foregoing.
  • the forwarding entry 20 includes the label 16001 of the ACC 301 and the outgoing interface, and the outgoing interface is the outgoing interface of the AGG 304 directly connected to the ACC 301.
  • the AGG 305 receives the label 16001 sent by the ACC 301 by flooding in the IGP domain 1, confirms the main forwarding path to the ACC 301 according to the label 16001 of the ACC 301, and generates a forwarding entry 21.
  • AGG 305 can be regarded as the second network device mentioned above.
  • the forwarding entry 21 includes the label 16001 of the ACC 301 and the outgoing interface.
  • the outgoing interface is the outgoing interface of the AGG 305 directly connected to the ACC 301.
  • the AGG 305 advertises a message M1 in the IGP domain 2, and the message M1 includes the label 16202 of the AGG 305.
  • the AGG 304 receives the message M1, and obtains the label 16202 of the AGG 305 from the message M1.
  • the label 16202 is not only used to identify the AGG 305, but also has the indication function of the indicator A in the embodiment shown in FIG. .
  • the AGG 304 generates a tunnel to the AGG 305 according to the label 16202 of the AGG 305.
  • the aggregation device can generate a backup forwarding path to the access device, and the backup forwarding path passes through the area Core equipment.
  • the tunnel between AGG 304 and AGG 305 can pass through RC 306 or RC 307, that is, it can be tunnel 1 of AGG 304-RC 306-AGG 305, or it can be AGG 304-RC 307 -AGG 305 tunnel 2.
  • AGG 304 generates a forwarding entry 22 according to the outgoing interface of the tunnel.
  • the forwarding entry 22 includes the label 16201 of ACC 301, the label 16202 of AGG 305, and the outgoing interface, and the outgoing interface is the outgoing interface of the tunnel.
  • AGG 304 receives the message M2 from RC 306, and the message M2 includes the label 16001 of ACC 301.
  • ACC 301 can be regarded as the above-mentioned target device.
  • AGG 304 confirms that the primary forwarding path of AGG 304 to ACC 301 is unreachable according to label 16001 of ACC 301, and then encapsulates label 16202 of AGG 305 in message M2 to obtain message M3.
  • AGG 304 matches forwarding entry 20 according to label 16001 of ACC 301, when AGG 304 determines the main forwarding path to ACC 301 (that is, the direct link to ACC 301, the direct link can be When regarded as the second forwarding path above) fails, the AGG 304 uses the backup forwarding path to send the message M2.
  • the backup forwarding path is the forwarding path from AGG 304 to AGG 305, which can be regarded as the first forwarding path above.
  • the AGG 304 matches the forwarding entry 22 according to the label 16001 of the ACC 301, and obtains the outgoing interface of the tunnel and the label 16202 of the AGG 305.
  • the AGG 304 encapsulates the label 16202 of the AGG 305 in the message M2 to obtain the message M3.
  • the label 16202 of the AGG 305 may be encapsulated on the top of the label stack in the message M3.
  • the AGG 304 may pop up the label 16001 of the message M2, and then press the label 16001 and the label 16202 to obtain the message M3.
  • AGG 304 sends the message M3 to AGG 305 according to the outgoing interface of the tunnel.
  • AGG 305 receives message M3, pops up label 16202 of AGG 305, matches forwarding entry 21 according to label 16001 of ACC 301 in message M3, and confirms whether the primary forwarding path to ACC 301 is faulty. If there is no fault, Then send the message M3 to ACC 301; if it is confirmed that the main forwarding path to ACC 301 is faulty, according to the indication function of label 16202 of AGG 305, avoid using the backup path to forward the message M3 and discard the message M3.
  • the alternate forwarding path path from AGG 305 to ACC 301 is AGG 305-AGG 304-ACC 301.
  • the main forwarding path from AGG 305 to ACC 301 is the direct link between AGG 305 and ACC 301.
  • the primary forwarding path fails, regardless of whether there is a forwarding entry for the backup forwarding path corresponding to the label 16001 of the ACC 301 on the AGG 305, the AGG 305 discards the message M3 to avoid wasting resources or network congestion.
  • the network architecture includes ACC 501, ACC 502, AGG 503, AGG 504, RC 505, and RC 506 in the IGP domain, and autonomous system border routers (External Border Gateway Protocol, EBGP) domains ( Autonomous System Boundary Router, ASBR 507, ASBR 508, Provider (P) equipment 509, P equipment 510, ASBR 511, and ASBR 512.
  • EBGP Advanced Border Gateway Protocol
  • ACC 501, ACC 502, AGG 503 and AGG 504 belong to IGP domain 1
  • AGG 503, AGG 504, RC 505 and RC 506 belong to IGP domain 2
  • ASBR 507, ASBR 508, P device 509 and P device 510 belong to EBGP domain 1.
  • P device 509, P device 510, ASBR 511, and ASBR 512 belong to EBGP domain 2.
  • AGG 503 and RC 505 are respectively connected to RC 505 and RC 506, RC 506 is connected to ASBR 507, RC 506 is also connected to ASBR 508, and ASBR 508 is also connected to ASBR 507.
  • the RC 505 receives routing information from the ASBR 511 of the ASBR 507, and determines that the next hop network device of the primary forwarding path of the RC 505 to the ASBR 511 is the ASBR 507, and the outgoing interface is the interface directly connected to the ASBR 507.
  • RC 505 can also receive routing information from ASBR 511 of RC 506, and determine that the next hop network device of the alternate forwarding path of RC 505 to ASBR 511 is AGG 503, and the outgoing interface is the outgoing interface of the link directly connected to AGG 503. .
  • RC 505 After RC 505 receives a message from AGG 503 with the destination device ASBR 511, if the primary forwarding path to ASBR 511 fails, or ASBR 507 fails, then RC 505 can send the message to AGG 503, and AGG 503 sends the message to RC 506 so that RC 506 can send the message to the destination device ASBR 511 through ASBR 508.
  • RC 506 returns the message to RC 505, thus forming a loop, resulting in waste of resources and network congestion.
  • FIG. 20 is a flowchart of a method for sending a message under the network architecture.
  • the method for sending messages includes the following steps:
  • the RC 505 obtains the IP address A3::/48 of the ASBR 511, and generates the forwarding entry 23 of the primary forwarding path to the ASBR 511 according to the IP address A3::/48 of the ASBR 511.
  • RC 505 can be regarded as the first network device in the foregoing.
  • forwarding entry 23 includes the IP address A3::/48 of ASBR 511 and the outgoing interface, which is the outgoing interface of the link directly connected to ASBR 507.
  • the RC 506 obtains the IP address A3::/48 of the ASBR 511, and generates the forwarding entry 24 of the primary forwarding path to the ASBR 511 according to the IP address A3::/48 of the ASBR 511.
  • RC 506 can be regarded as the second network device in the foregoing.
  • the next hop network device of the primary forwarding path to ASBR 511 is ASBR 508.
  • the forwarding entry 24 includes the IP address A3::/48 of ASBR 511 and the outgoing interface, which is the outgoing interface of the link directly connected to ASBR 508.
  • the RC 506 sends a message M1 to the RC 505, and the message M1 includes the SID of the RC 506, and the SID may be the IP address A1::1002:0:999.
  • the SID A1::1002:0:999 is used as the IP address of RC 506 to identify RC 506, and as shown in the embodiment shown in 5, the indicator B is used to indicate that RC 506 has support for avoiding the use of alternate forwarding paths to forward reports. Indicative function of the ability of the text.
  • RC 505 receives message M1, generates a tunnel to RC 506 according to the IP address of RC 505, and obtains the outgoing interface of the tunnel.
  • the network device that the tunnel passes through may be RC 505-AGG 503-RC 506, and the tunnel may be regarded as the first forwarding path mentioned above.
  • forwarding entry 25 includes the IP address of ASBR 511, the IP address of RC 506, and the outgoing interface.
  • the RC 505 receives the message M2 from the AGG 503, and the message M2 includes the IP address of the ASBR 511.
  • the ASBR 511 can be regarded as the target device mentioned above.
  • RC 505 confirms that the primary forwarding path to ASBR 511 (that is, the outgoing interface of the link directly connected to ASBR 507) is faulty (for example, the forwarding entry 23 cannot be matched), and RC 505 is based on ASBR 511.
  • the IP address matches the forwarding entry 25, and the IP address A1::1002:0:999 of RC 506 and the identification of the outgoing interface of the tunnel are obtained.
  • the RC 505 can send the message M2 to the ASBR 507, so that the ASBR 507 sends the message M2 to the ASBR 511 through the P device 509.
  • the value of the indicator B and the value of the indicator A are the same.
  • the indicator B is not only used to identify the IP address of the RC 506, but also used to instruct the RC 506 to avoid using the alternate path to send the message M3 to the ASBR 511.
  • the message M3 includes an IPv6 message header and SRH.
  • the IPv6 message header includes the destination address, that is, the IP address A1::1002:0:999 of RC506.
  • the SRH includes the IP address A3::/48 of ASBR 511 and The SID of RC 506 is A1::1002:0:999.
  • the RC 506 receives the message M3, and matches the forwarding entry 24 according to the IP address A3::/48 of the ASBR 511 in the message M3, and the forwarding entry 24 corresponds to the primary forwarding path to the ASBR 511. If the match is found, the message M3 is sent through the primary forwarding path; if the match is not found, even if the RC 506 has a backup forwarding path to the ASBR 511, the message M3 is discarded.
  • RC 506 After RC 506 receives the message M3, it replaces the destination address in the M3 message header with the IP address A3::/48 of ASBR 511, and matches and forwards it according to the IP address A3::/48 of the ASBR 511. Post item 24.
  • the main forwarding path of RC 506 to ASBR 511 is RC 506-ASBR 508-ASBR 510-P device 509-ASBR 511.
  • the backup forwarding path of the RC 506 to the ASBR 511 may be, for example, the RC 506-RC 505-ASBR 507-P device 509-ASBR 511.
  • FIG. 21 shows a schematic diagram of a possible structure of the network device involved in the above embodiment.
  • the network device 2100 can implement the function of the first network device in the example shown in FIG. 5, or the network device 2100 can implement the figure The functions of AGG 204 in the embodiment shown in 15, AGG 304 in the embodiment shown in FIG. 17, or RC 505 in the embodiment shown in FIG. 20.
  • the network device 2100 includes: a processing unit 2101 and a sending unit 2102. These units can perform the corresponding functions of the first network device in the foregoing method example.
  • the processing unit 2101 is used to support the network device 2100 to perform S503-S505 in FIG. 5; the sending unit 2102 is used to support the network device 2100 to perform S506 in FIG.
  • the processing unit 2101 is configured to perform various processing operations performed by the first network device in the foregoing method embodiment; the sending unit 2102 is configured to perform the packet sending operation of the first network device in the foregoing method embodiment.
  • the processing unit 2101 is configured to obtain a first message destined for a destination device, and add a first indication identifier to the first message to generate a second message, where the first indication identifier is used to indicate
  • the second network device avoids using the alternate forwarding path from the second network device to the destination device to send the second packet to the destination device; the sending unit 2102 is configured to send the second packet to the first forwarding path through the first forwarding path. 2.
  • the network device sends the second message.
  • the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the processing unit and the sending unit may be the same unit or different units.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • FIG. 22 shows a schematic diagram of a possible structure of the network device involved in the above embodiment.
  • the network device 2200 can implement the function of the second network device in the example shown in FIG. 5, or the network device 2200 can implement The function of AGG 205 in the embodiment shown in FIG. 15, AGG 305 in the embodiment shown in FIG. 17, or RC 506 in the embodiment shown in FIG. 20.
  • the network device 2200 includes: a receiving unit 2201 and a processing unit 2202. These units can perform the corresponding functions of the second network device in the foregoing method example.
  • the receiving unit 2201 is configured to support the network device 2200 to execute S507 in FIG. 5.
  • the processing unit 2202 is configured to support the network device 2200 to execute S508 and S509 in FIG. 5.
  • the receiving unit 2201 is configured to perform the receiving steps of the message executed by the second network device in the foregoing method embodiment, and the processing unit 2203 is configured to perform various message processing performed by the second network device in the foregoing method embodiment step.
  • the receiving unit 2201 is configured to receive a first packet destined for a destination device, the first packet is from a first network device, and the first packet includes a first indication identifier; the processing unit 2202 uses To determine that the primary forwarding path from the second network device to the destination device is unreachable; in response to determining that the primary forwarding path is unreachable, avoid using the alternate forwarding path to the destination according to the indication of the first indicator.
  • the destination device sends the first packet
  • the backup forwarding path is a path from the second network device to the destination device.
  • an embodiment of the invention provides a message processing system 2300, which is used to implement the message processing method in the foregoing method embodiment.
  • the system 2300 includes a network device 2301 and a network device 2302.
  • the network device 2301 may implement the functions of the first network device in the embodiment shown in FIG. 5 or the network device 2100 in FIG. 21, and the network device 2302 may implement the second network device in the embodiment shown in FIG. 5 or the function of the second network device in FIG. 22 The function of the network device 2200.
  • the network device 2301 may also implement the functions of AGG 204 in the embodiment shown in FIG. 15, AGG 304 in the embodiment shown in FIG. 17, or RC 505 in the embodiment shown in FIG. 20, and the network device 2301 may also implement the embodiment shown in FIG.
  • FIG. 24 is a schematic structural diagram of a device 2400 provided by an embodiment of the present application.
  • the network device 2100 in FIG. 21 and the network device 2200 in FIG. 22 may be implemented by the device shown in FIG. 24.
  • the device 2400 includes at least one processor 2401, a communication bus 2402, and at least one network interface 2404.
  • the device 2400 may further include a memory 2403.
  • the processor 2401 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuit (integrated circuit) used to control the execution of the program of this application. , IC).
  • the processor may be used to process the message, so as to implement the message sending method provided in the embodiment of the present application.
  • the processor may be used to obtain the first message to the destination device, and add the first message to the first message.
  • a second message is generated with an indication identifier, and the first indication identifier is used to instruct the second network device to avoid using the alternate forwarding path from the second network device to the destination device to send the second message to the destination device.
  • the specific function implementation can refer to the processing part of the corresponding first network device in the method embodiment.
  • the second network device in FIG. 5 is implemented by the device shown in FIG.
  • the processor may be used to determine that the primary forwarding path from the second network device to the destination device is unreachable; In response to determining that the primary forwarding path is unreachable, avoid using a backup forwarding path to send the first packet to the destination device according to the indication of the first indicator, where the backup forwarding path is from the second For the path from the network device to the destination device, for specific function implementation, refer to the processing part of the second network device in the method embodiment.
  • the communication bus 2402 is used to transfer information between the processor 2401, the network interface 2404, and the memory 2403.
  • the memory 2403 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions.
  • the memory 2403 can also be a random access memory (RAM) or can store information.
  • RAM random access memory
  • dynamic storage devices for instructions it can also be a compact disc (read-only Memory, CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital universal discs, Blu-ray Optical disks, etc.), magnetic disk storage media or other magnetic storage devices, or any other media that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but are not limited thereto.
  • the memory 2403 may exist independently, and is connected to the processor 2401 through a communication bus 2402.
  • the memory 2403 may also be integrated with the processor 2401.
  • the memory 2403 is used to store program codes or instructions for executing the solutions of the present application, and the processor 2401 controls the execution.
  • the processor 2401 is configured to execute program codes or instructions stored in the memory 2403.
  • the program code may include one or more software modules.
  • the processor 2401 may also store program codes or instructions for executing the solutions of the present application. In this case, the processor 2401 does not need to read the program codes or instructions from the memory 2403.
  • the network interface 2404 may be a device such as a transceiver for communicating with other devices or a communication network.
  • the communication network may be an Ethernet, a wireless access network (RAN), or a wireless local area network (WLAN), etc.
  • the network interface 2404 may be used to receive packets sent by other nodes in the segment routing network, and may also send packets to other nodes in the segment routing network.
  • the network interface 2404 may be an ethernet (ethernet) interface, a fast ethernet (FE) interface, or a gigabit ethernet (GE) interface, etc.
  • the device 2400 may include multiple processors, such as the processor 2401 and the processor 405 shown in FIG. 24.
  • processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • FIG. 25 is a schematic structural diagram of a device 2500 provided by an embodiment of the present application.
  • the first network device and the second network device in FIG. 5 may be implemented by the device shown in FIG. 25.
  • the device 2500 includes a main control board and one or more interface boards.
  • the main control board communicates with the interface board.
  • the main control board is also called the main processing unit (MPU) or route processor card (route processor card).
  • the main control board includes the CPU and memory.
  • the main control board is responsible for the control and management of each component in the device 2500, including Routing calculation, equipment management and maintenance functions.
  • the interface board is also called a line processing unit (LPU) or a line card (line card), which is used to receive and send messages.
  • LPU line processing unit
  • line card line card
  • the main control board and the interface board or the interface board and the interface board communicate through a bus.
  • the interface boards communicate through a switching network board.
  • the device 2500 also includes a switching network board.
  • the switching network board communicates with the main control board and the interface board.
  • the switching network board is used to forward the interface board.
  • the data exchanged between the network board may also be called a switch fabric unit (SFU).
  • the interface board includes a CPU, a memory, a forwarding engine, and an interface card (interface card, IC), where the interface card may include one or more network interfaces.
  • the network interface can be an Ethernet interface, an FE interface, or a GE interface.
  • the CPU communicates with the memory, the forwarding engine, and the interface card respectively.
  • the memory is used to store the forwarding table.
  • the forwarding engine is used to forward the received message based on the forwarding table stored in the memory. If the destination address of the received message is the IP address of the device 2500, the message is sent to the CPU of the main control board or interface board for processing. Processing; if the destination address of the received message is not the IP address of the device 2500, the forwarding table is checked according to the destination, and if the next hop and outbound interface corresponding to the destination address are found from the forwarding table, the message is Forward to the outgoing interface corresponding to the destination address.
  • the forwarding engine may be a network processor (NP).
  • the interface card is also called a daughter card, which can be installed on the interface board, and is responsible for converting the photoelectric signal into a data frame, and then forwarding the data frame to the forwarding engine processing or the interface board CPU after checking the validity of the data frame.
  • the CPU can also perform the function of the forwarding engine, such as implementing soft forwarding based on a general-purpose CPU, so that no forwarding engine is required in the interface board.
  • the forwarding engine may be implemented by an ASIC or a field programmable gate array (FPGA).
  • the memory storing the forwarding table may also be integrated into the forwarding engine as a part of the forwarding engine.
  • An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled with a memory, the memory is used to store a program or instruction, when the program or instruction is executed by the processor, the The chip system implements the method of the first network device or the second network device in the embodiment shown in FIG. 5.
  • processors in the chip system there may be one or more processors in the chip system.
  • the processor can be implemented by hardware or software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor, which is implemented by reading software codes stored in the memory.
  • the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application.
  • the memory may be a non-transitory processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip, or may be set on different chips.
  • the setting method of the processor is not specifically limited.
  • the chip system may be FPGA, ASIC, system on chip (system on chip, SoC), CPU, NP, or digital signal processing circuit (digital signal processor, DSP), it can also be a microcontroller (microcontroller unit, MCU), it can also be a programmable logic device (PLD) or other integrated chips.
  • SoC system on chip
  • DSP digital signal processing circuit
  • MCU microcontroller unit
  • PLD programmable logic device
  • each step in the foregoing method embodiments may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the embodiment of the present application also provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the method in the foregoing embodiment.
  • At least one item (a) refers to one or more, and “multiple” refers to two or more.
  • the following at least one item (a)” or similar expressions refers to any combination of these items, including any combination of a single item (a) or a plurality of items (a).
  • at least one item (a) of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple .
  • “A and/or B” is considered to include A alone, B alone, and A+B.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical module division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual couplings or direct couplings or communication connections may be indirect couplings or communication connections between devices or units through some interfaces, and may be in electrical, mechanical or other forms.
  • the units described as separate 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 they may be distributed on multiple network units. Some or all of the units may be acquired according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each module unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software module unit.
  • the integrated unit is implemented in the form of a software module unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions 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 media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .
  • the functions described in the present invention can be implemented by hardware, software, firmware, or any combination thereof.
  • these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
  • the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
  • the storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

Landscapes

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

Abstract

本申请实施例公开了一种发送报文的方法、设备及系统,实现指定的网络设备不使用备用转发路径转发报文,从而在一定程度上减少诸如环路问题导致的网络资源浪费或网络拥塞的技术问题。其中,方法包括:第一网络设备获得去往目的设备的第一报文;所述第一网络设备在所述第一报文中添加第一指示标识生成第二报文,所述第一指示标识用于指示第二网络设备避免使用从所述第二网络设备到所述目的设备的备用转发路径向所述目的设备发送所述第二报文;所述第一网络设备通过第一转发路径向所述第二网络设备发送所述第二报文。

Description

一种发送报文的方法、设备及系统
本申请要求于2020年2月21日提交中国国家知识产权局、申请号为202010106211.9、发明名称为“一种表项生成的方法、网络节点和系统”的中国专利申请的优先权,还要求于2020年4月15日提交国家知识产权局、申请号为202010295809.7、发明名称为“一种报文转发的方法、网络节点和系统”的中国专利申请的优先权,以及于2020年5月29日提交国家知识产权局、申请号为202010478986.9、发明名称为“一种发送报文的方法、设备及系统”的中国专利申请的优先权,和于2020年7月22日提交国家知识产权局、申请号为202010711897.4、发明名称为“生成转发表项的方法、发送报文的方法、网络设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,特别是涉及一种发送报文的方法、设备及系统。
背景技术
为了提高网络传输的可靠性,在一些网络场景中,网络设备会通过主用转发路径和备用转发路径转发报文。如果主用转发路径正常,则采用主用转发路径转发报文;当主用转发路径故障时,则采用备用转发路径转发报文。但在一些场景中,通过备份转发路径转发报文会导致网络资源的浪费或者网络拥塞,例如在一些网络场景中,使用备份转发路径转发报文可能会引起报文转发的环路问题,从而会导致网络拥塞或网络的带宽资源浪费。
举例来说,参见图1,网络设备101与网络设备102之间的主用转发路径为网络设备101与网络设备102之间的直连链路,网络设备101与网络设备102之间的备用转发路径经过网络设备103,即备用转发路径为网络设备101->网络设备103->网络设备102。当网络设备101到达网络设备102的主用转发路径故障,网络设备101通过备用转发路径上的网络设备103向网络设备102转发报文时就可能会出现环路的问题。所谓环路问题是指网络设备103在接收到来自网络设备101的报文之后,因为一些原因又将该报文返回了网络设备101,而不是将该报文发送给网络设备102。一些处于网络中的特殊位置的网络设备使用备份转发路径转发报文更容易引起环路问题,例如连接接入网和骨干网的网络设备。
所以,如何避免出现诸如环路问题导致的网络资源浪费或网络拥塞是目前需要被解决的技术问题。
发明内容
本申请实施例提供了一种发送报文的方法,可以实现指定的网络设备不使用备用转发路径转发报文,从而在一定程度上减少诸如环路问题导致的网络资源浪费或网络拥塞的技术问题。
第一方面,提供了一种发送报文的方法,该方法可以应用于第一网络设备,具体包括如下步骤:获得去往目的设备的第一报文,在所述第一报文中添加第一指示标识生成第二 报文,并通过第一转发路径向所述第二网络设备发送所述第二报文。其中,所述第一指示标识用于指示第二网络设备避免使用从所述第二网络设备到所述目的设备的备用转发路径向所述目的设备发送所述第二报文,即第二网络设备如果确定不能通过到目的设备的主用转发路径发送第二报文,则可以丢弃该第二报文。这样,第二网络设备在接收到第二报文之后,在从第二网络设备到达目的设备的主用转发路径不可达时,根据第一指示标识避免使用到达目的设备的备用转发路径向目的设备发送第二报文,也就降低了诸如环路问题导致的网络资源浪费和网络拥塞。
在一种可能的设计中,所述第一转发路径为从所述第一网络设备到所述目的设备的备用转发路径,在所述第一网络设备通过第一转发路径向所述第二网络设备发送所述第二报文之前,所述方法还包括:所述第一网络设备确定到达所述目的设备的第二转发路径不可达,所述第二转发路径为从所述第一网络设备到所述目的设备的主用转发路径。也就是说,当第一网络设备到达目的设备的主用转发路径不可达时,采用备用转发路径来转发第二报文,并在第一报文中添加第一指示标识,从而能够实现一种灵活的报文转发方式,即:在第一网络节点已经通过从第一网络设备到目的网络设备的备用转发路径转发报文时,要避免第二网络设备再使用从第二网络设备到目的网络设备的备用转发路径转发报文。当然,第一转发路径还可以是从第一网络设备到目的设备的主用转发路径。
在一种可能的设计中,在一些场景下,例如互联网协议第六版(Internet Protocol version 6,IPv6)的段路由(segment routing,SR)(下文简称“SRv6”),所述第一报文包含所述目的设备的互联网协议(Internet Protocol,IP)地址,该目的设备的IP地址可以视为目的设备的标识。所述第一转发路径为从所述第一网络设备到所述目的设备的汇聚路由对应的转发路径,所述第二转发路径为从所述第一网络设备到所述目的设备的明细路由对应的转发路径。所述第一网络设备确定到所述目的设备的第二转发路径不可达有以下两种可能的实现方式:所述第一网络设备根据所述目的设备的IP地址未匹配到到达所述目的设备的明细路由;或者,所述第一网络设备根据所述目的设备的IP地址匹配到到达所述目的设备的明细路由,并确定所述明细路由对应的转发路径不可达。
在一种可能的设计中,所述第一转发路径为到所述目的设备的明细路由的备用转发路径,所述第一网络设备确定到所述目的设备的第二转发路径不可达包括:所述第一网络设备根据所述目的设备的IP地址匹配到到达所述目的设备的明细路由,并确定所述明细路由的主用转发路径不可达。
在一种可能的设计中,所述第一转发路径为到所述目的设备的汇聚路由的主用转发路径,所述第一网络设备确定到所述目的设备的第二转发路径不可达包括:所述第一网络设备根据所述目的设备的IP地址匹配到到达所述目的设备的汇聚路由,并确定汇聚路由的主用转发路径不可达。
上述三种可能的实现方式并不构成对本申请技术方案的限定,本领域技术人员可以根据实际情况自行设计。
在一种可能的设计中,所述第一网络设备在所述第一报文中添加第一指示标识生成第二报文包括:所述第一网络设备在所述第一报文中添加段路由头(segment router header, SRH)生成所述第二报文,所述第一指示标识携带在所述SRH中。
在一种可能的设计中,所述第一指示标识携带在所述SRH的标志(Flags)字段或标记TAG字段或类型长度值(type length value,TLV)中。
可选地,所述SRH包括段标识列表,所述段标识列表包括所述第一指示标识。所述段标识列表包含所述第二网络设备的段标识,所述第二网络设备的段标识包含所述第一指示标识。具体的,所述第二网络设备的段标识的locator部分包括所述第一指示标识,或者所述第二网络设备的段标识的function部分包括所述第一指示标识。其中,locator部分包括所述第一指示标识具体可以是locator部分的全部为所述第一指示标识,或者locator部分的其中一些字节为所述第一指示标识。可选地,所述第一指示标识就所述第二网络设备的段标识,也就是说所述第二网络设备的段标识具有所述第一指示标识所指示的指示功能。
在另一些场景(例如SR-MPLS场景)中,所述第一报文包含所述目的设备的标签,该目的设备的标签可以视为目的设备的标识。所述第一转发路径为对应所述目的设备的标签的标签转发表项中的备用转发信息对应的转发路径,即第一转发路径为第一网络设备到目的设备的备用转发路径。所述第一网络设备确定到达所述目的设备的第二转发路径不可达包括:所述第一网络设备根据所述目的设备的标签匹配到所述标签转发表项,并确定所述标签转发表项中的主用转发信息对应的转发路径不可达。其中,主用转发信息对应的转发路径可以视为第一网络设备到目的设备的主用转发路径。也就是说,如果第一网络设备到目的设备的主用转发信息对应的转发路径不可达,则可以通过第一网络设备到目的设备的备用转发路径转发第二报文,以保证第二报文传输的可靠性。
在一种可能的设计中,该转发表项中还可以包括第一指示标识和/或第二指示标识。
在一种可能的设计中,所述第一网络设备在所述第一报文中添加第一指示标识生成第二报文包括:所述第一网络设备在所述第一报文中添加标签栈生成第二报文,所述标签栈包括所述第一指示标识。
关于标签栈可以有两种可能的实现方式:作为其中一种可能的实现方式,所述标签栈包括所述第二网络设备的标签、特殊标签和所述目的设备的标签,所述第二网络设备的标签与所述特殊标签相邻,所述特殊标签包括所述第一指示标识,即特殊标签可以具有第一指示标识的指示功能。作为另外一种可能的实现方式,所述标签栈包括所述第二网络设备的标签和所述目的设备的标签,所述第二网络设备的标签也就是所述第一指示标识,即第二网络设备的标签具有第一指示标识的指示功能。
当然,上述两种可能的实现方式并不构成对本申请技术方案的限定,本领域技术人员可以根据实际情况自行设计。
在一种可能的设计中,在所述第一网络设备通过第一转发路径向所述第二网络设备发送所述第二报文之前,所述方法还包括:所述第一网络设备接收来自所述第二网络设备的第三报文,所述第三报文包括所述第二网络设备的标识和第二指示标识,所述第二指示标识用于标识所述第二网络设备支持避免使用备用路径转发报文的能力。当第一网络设备接收到第三报文之后,可以根据该第二指示标识在第一报文中添加第一指示标识得到第二报文,实现降低网络资源浪费和网络拥塞的目的。在接收第一报文之前,所述第一网络设备 还根据第二网络设备的标识和第二指示标识生成对应所述第一转发路径的转发表项,所述对应所述第一转发路径的转发表项包括所述目的设备的标识和对应所述第一转发路径的转发信息。这样,第一网络设备在接收到第一报文之后,可以根据第一报文中包括的目的设备的标识查找该转发表项,得到第一转发路径的转发信息,并通过第一转发路径向第二网络设备发送上述第二报文,实现对第二报文的转发。在一些场景(例如SRv6场景)中所述转发信息包括段标识列表,所述段标识列表包括所述第二网络设备的标识,所述第二网络设备的标识包括所述第二网络设备的段标识,所述目的设备的标识包括所述目的设备的IP地址。在另一些场景(例如SR-MPLS场景)中,所述转发信息包括所述第二网络设备的标签,所述目的设备的标识包括目的设备的标签。在一种可能的设计中,第二指示标识也可是第二网络设备的标识或所述第二网络设备的标签,在这种情况下,第二网络设备的标识或第二网络设备的标签具有第二指示标识的指示功能。
在一种可能的设计中,所述第三报文包括有端节点段标识(End SID)TLV字段,所述End SID TLV中包括有所述第二指示标识。该第三报文例如可以为中间系统到中间系统(Intermediate system to intermediate system,ISIS)IPv6报文或放最短路径优先(Open Shortest Path First,OSPF)第三版(version 3,v3)报文。当所述第二网络设备的标识不具有第二指示标识的指示功能时,所述End SID TLV还包括所述第二网络设备的标识。
在一种可能的设计中,所述第三报文包括有前缀段标识(prefix SID)类型长度值TLV字段,所述prefix SID TLV字段包括有所述第二指示标识。该第三报文例如可以是ISIS报文或OSPF报文。当所述第二网络设备的标签不具有第二指示标识的指示功能时,所述End SID TLV还包括所述第二网络设备的标签。
在一种可能的设计中,所述备用转发路径经过所述第一网络设备,这样可以避免出现因为环路问题而导致的资源浪费问题。
在一种可能的设计中,所述第一报文来自第三网络设备,所述第三网络设备属于第一网络域,所述目的设备属于第二网络域。也就是说,该方法可以应用于跨域的场景。
在一种可能的设计中,所述第一网络域为骨干网的区域,所述第二网络域为接入网的区域,所述第一网络设备为连接所述接入网和所述骨干网的网络设备,所述第一转发路径为所述骨干网中的转发路径。
第二方面,提供了一种发送报文的方法,该方法应用于第二网络设备,具体包括如下步骤:接收去往目的设备的第一报文,所述第一报文来自第一网络设备,所述第一报文包括第一指示标识。所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达。响应于确定所述主用转发路径不可达,所述第二网络设备根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文,以降低通过备用路径转发而造成的资源浪费或网络拥塞问题。其中,第二网络设备避免使用备用转发路径发送报文可以理解为第二网络设备不使用备用转发路径发送报文。
在一种可能的设计中,在一些场景(例如SRv6场景)下,所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达可以有如下三种可能的实现方式:
作为其中一种可能的实现方式,所述第一报文包含所述目的设备的IP地址,所述主用转发路径为从所述第二网络设备到所述目的设备的汇聚路由的主用转发路径,所述备用转发路径为所述汇聚路由的备用转发路径。所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达包括:所述第二网络设备根据所述目的设备的IP地址匹配到所述汇聚路由,并确定所述汇聚路由的主用转发路径不可达。
作为另一种可能的实现方式,所述第一报文包括所述目的设备的IP地址,所述主用转发路径为从所述第二网络设备到所述目的设备的明细路由对应的转发路径,所述备用转发路径为从所述第二网络设备到所述目的设备的汇聚路由对应的转发路径。所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达包括:所述第二网络设备根据所述目的设备的IP地址未匹配到所述明细路由,或者,所述第二网络设备根据所述目的设备的IP地址匹配到所述明细路由,并确定所述明细路由对应的转发路径不可达。
上述二种可能的实现方式并不构成对本申请技术方案的限定,本领域技术人员可以根据实际情况自行设计。
在一种可能的设计中,所述第一报文为SRv6报文,所述SRv6报文的SRH包括所述第一指示标识。
其中,第一指示标识可以携带在所述SRH的Flags字段或标记TAG字段或TLV字段中。或者,所述SRH可以包括段标识列表,所述段标识列表包括所述第一指示标识。
当第一报文为SRv6报文时,在一种可能的设计中,在所述第二网络设备确定到所述目的设备的主用转发路径不可达之前,所述方法还包括:所述第二网络设备确定所述SRv6报文的目的地址为所述第二网络设备的IP地址,所述第二网络设备从所述SRv6报文的段标识列表中获得所述目的设备的标识,所述第二网络设备将所述SRv6报文的目的地址修改为所述目的设备的标识。相应的,所述第二网络设备确定到所述目的设备的主用转发路径不可达包括:所述第二网络设备根据所述SRv6报文的目的地址,也就是目的设备的标识,确定到所述目的设备的主用转发路径不可达。
第一报文还可以为多协议标签交换(Multi-Protocol Label Switching,MPLS)报文,相应的,所述第一报文的标签栈包括所述第一指示标识。
当第一报文为MPLS报文时,所述第一报文包括所述目的设备的标签,所述标签栈包括所述第二网络设备的标签、特殊标签和所述目的设备的标签,所述特殊标签包括所述第一指示标识,即特殊标签具备第一指示标识的功能。或者,所述标签栈包括所述第二网络设备的标签和所述目的设备的标签,所述第二网络设备的标签包括所述第一指示标识,即第二网络设备的标签具备第一指示标识的功能。
当第一报文包括标签栈时,在一种可能的设计中,所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达包括:所述第二网络设备确定所述标签栈的栈顶标签为所述第二网络设备的标签;响应于确定所述标签栈的栈顶标签为所述第二网络设备的标签,根据所述目的设备的标签匹配到到达所述目的设备的标签转发表,并确定所述标签转发表中的主用转发信息对应的所述主用转发路径不可达。
当第一报文包括标签栈时,在一种可能的设计中,所述第二网络设备根据所述第一指 示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文包括:所述第二网络设备确定所述标签栈中所述第二网络设备的标签的下一层标签为所述特殊标签;响应于确定所述标签栈中所述第二网络设备的标签的下一层标签为所述特殊标签,避免使用所述标签转发表中备用转发信息所述对应的所述备用转发路径向所述目的设备发送所述第一报文。当然,在一些实施例中,特殊标签还可以位于栈顶,而第二网络设备的标签可以位于特殊标签的下一层。
在一种可能的设计中,所述备用转发路径经过所述第一网络设备。通过上述方法可以避免将第一报文转发到第一网络设备而形成环路,降低因为环路问题导致的资源浪费和网络拥塞。
在一种可能的设计中,所述方法还包括:所述第二网络设备向所述第一网络设备的第二报文,所述第二报文包括所述第二网络设备的标识和第二指示标识,所述第二指示标识用于指示所述第二网络设备支持避免使用备用路径转发报文的能力,所述第二网络设备的标识包括所述第二网络设备的IP地址或所述第二网络设备的标签。通过第二网络设备向第一网络设备发送第二报文,可以使得第一网络设备知晓第二网络设备具备避免使用备用路径转发报文的能力,这样,当第一网络设备在向第二网络设备发送第一报文时,可以在第一报文中携带第一指示标识,以指示第二网络设备避免使用备用路径转发第一报文。
在一种可能的设计中,在所述第二网络设备根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文之后,所述方法还包括:所述第二网络设备丢弃所述第一报文。通过丢弃第一报文实现了避免使用备用转发路径向目的设备发送第一报文的目的。
第三方面,提供了一种生成转发表项的方法,该方法可以应用于第一网络设备,具体包括如下步骤:接收来自所述第二网络设备的通告报文,所述通告报文包括第一指示标识;所述第一网络设备根据所述第一指示标识确定所述第二网络设备具有避免使用备用路径转发报文的能力。响应于确定所述第二网络设备具有避免使用备用路径转发报文的能力,所述第一网络设备生成用于向目的设备转发报文备用转发信息,所述备用转发信息对应的转发路径经过所述第二网络设备。所述备用转发信息包括标签栈或段标识列表,所述标签栈或段标识列表包括所述第二网络设备的标识。基于该转发表项,当第一网络设备接收到去往目的设备的第一报文时,可以根据该转发表项确定主用转发信息对应的转发路径是否可达,如果可达,则通过该主用转发信息对应的转发路径向目的设备转发第一报文;如果不可达,则第一网络设备在所述第一报文中添加第二指示标识生成第二报文,所述第二指示标识用于指示第二网络设备避免使用从所述第二网络设备到所述目的设备的备用转发路径向所述目的设备发送所述第二报文。这样,当第二网络设备在接收到第二报文之后,在从第二网络设备到目的网络设备的主用转发路径不可达时,避免使用备用转发路径向所述目的设备发送所述第二报文,从而能够降低通过备用路径转发而造成的资源浪费或网络拥塞问题。
在一种可能的设计中,所述第一指示标识包含在所述转发表项中,以使得第一网络设备能够在第一报文中加入第二指示标识。
在一种可能的设计中,所述第二报文还包含所述标签栈或所述段标识列表,标签栈或段标识列表中可以包括第二网络设备的标签或段标识,以使得第一网络设备能够根据第二网络设备的标签或段标识将报文发送给第二网络设备。
第四方面,提供了一种生成转发表项的方法,该方法可以应用于第二网络设备,所述方法具体包括如下步骤:生成通告报文,所述报文包括第一指示标识,所述第一指示标识用于指示所述第二网络设备具有避免使用备用转发路径转发报文的能力。所述第二网络设备向第一网络设备发送所述通告报文,触发所述第一网络设备生成转发表项,所述转发表项对应的转发路径经过所述第二网络设备。也就是说,基于该转发表项,第一网络设备可以向第二网络设备发送报文,而第二网络设备在转发该报文时,不通过备用转发路径转发报文,以降低网络资源浪费和网络拥塞的问题。
第五方面,提供了一种发送报文的方法,该方法应用于第一网络设备,所述方法包括:第一网络设备接收第二网络设备发送的通告报文,所述通告报文包含所述第二网络设备的标识。所述第一网络设备生成用于向目的设备转发报文的转发表项,所述转发表项包括主用转发信息和备用转发信息,所述主用转发信息对应的转发路径在第一网络域内,所述备用转发信息对应的转发路径经过所述第二网络设备,所述备用转发信息对应的转发路径上从所述第一网络设备到所述第二网络设备的路径在第二网络域内,所述第一网络域和所述第二网络域不同,所述备用转发信息包括所述第二网络设备的标识。也就是说,到达目的设备的主用转发信息对应的转发路径和备用转发信息对应的转发路径经过不同的网络域,这样可以减少占用主用转发信息对应的转发路径所在的第一网络域的网络资源。
在一些场景(例如SRv6场景)中,所述备用转发信息包括段标识列表,所述段标识列表包含所述第二网络设备的标识,所述第二网络设备的标识包括所述第二网络设备的段标识。在另一些场景(例如SR-MPLS场景)中,所述备用转发信息包括标签栈,所述标签栈或所述段标识列表包含所述第二网络设备的标识,所述第二网络设备的标识包括第二网络设备的标签。
在一种可能的设计中,所述通告报文包含还包含有第二指示标识,所述第二指示标识指示所述第二网络设备具有避免使用备用路径转发报文的能力。
在一种可能的设计中,所述方法还包括:所述第一网络设备获得去往所述目的设备的第一报文;所述第一网络设备确定所述主用转发信息对应的转发路径不可达;响应于确定所述主用转发信息对应的转发路径不可达,所述第一网路设备在所述第一报文中添加第一指示标识生成第二报文,并通过所述备用转发信息转发所述第二报文,所述第一指示标识用于指示第二网络设备避免使用从所述第二网络设备到所述目的设备的备用转发路径向所述目的设备发送所述第二报文。
第六方面,提供了一种第一网络设备,用于执行第一方面或第一方面的任意一种可能的设计中的方法。具体地,该第一网络设备包括用于执行第一方面或第一方面的任意一种可能的设计中的方法的单元;或,该第一网络设备包括用于执行第三方面或第三方面的任意一种可能的设计中的方法的单元;或,该第一网络设备包括用于执行第五方面或第五方面的任意一种可能的设计中的方法的单元。
第七方面,提供了一种第二网络设备,用于执行第二方面或第二方面的任意一种可能的设计中的方法。具体地,该第二网络设备包括用于执行第二方面或第二方面的任意一种可能的设计中的方法的单元;或,该第二网络设备包括用于执行第四方面或第四方面的任意一种可能的设计中的方法的单元。
第八方面,提供了一种网络设备,应用于包括多个网络设备的网络系统,多个网络设备包括第一网络设备和第二网络设备,该网络设备为第一网络设备,该第一网络设备包括:处理器和网络接口。网络接口用于报文的接收和发送。处理器用于执行前述第一方面或第一方面的任意一种可能的设计中的方法;或,处理器用于执行前述第三方面或第三方面的任意一种可能的设计中的方法;或,处理器用于执行前述第五方面或第五方面的任意一种可能的设计中的方法。
在一种可能的设计中,该第一网络设备还包括存储器,存储器可以用于存储指令或程序代码。处理器用于调用存储器中的指令或程序代码执行前述第一方面或第一方面的任意一种可能的设计中的方法;或,处理器用于调用存储器中的指令或程序代码执行前述第三方面或第三方面的任意一种可能的设计中的方法;处理器用于调用存储器中的指令或程序代码执行前述第五方面或第五方面的任意一种可能的设计中的方法。
第九方面,提供了一种网络设备,应用于包括多个网络设备的网络系统,多个网络设备包括第一网络设备和第二网络设备,该网络设备为第二网络设备,该第二网络设备包括:处理器和网络接口。网络接口用于报文的接收和发送。处理器用于执行前述第二方面或第二方面的任意一种可能的设计中的方法;或,处理器用于执行前述第四方面或第四方面的任意一种可能的设计中的方法。
在一种可能的设计中,该第二网络设备还包括存储器,存储器可以用于存储指令或程序代码。处理器用于调用存储器中的指令或程序代码执行前述第二方面或第二方面的任意一种可能的设计中的方法;或,处理器用于调用存储器中的指令或程序代码执行前述第四方面或第四方面的任意一种可能的设计中的方法。
第十方面,提供了一种报文处理的系统,该系统包含前述方面提供的第一网络设备和第二网络设备。
第十一方面,提供了一种计算机可读存储介质,包括指令、程序或代码,当其在计算机上执行时,使得计算机执行前述方面所述的方法。
第十二方面,提供了一种包括计算机指令的计算机程序产品,当该计算机程序产品在网络设备上运行时,使得网络设备执行第一方面、第二方面、第三方面、第四方面、第五方面以及上述五个方面的任意一种可能的实现方式之一提供的方法。
第十三方面,提供了一种芯片,包括存储器和处理器。存储器用于存储指令或程序代码。处理器用于从存储器中调用并运行该指令或程序代码,以执行上述第一方面或第一方面的任意一种可能的设计中的方法;或,处理器执行第二方面或第二方面任意一种可能的设计中的方法;或,处理器执行第三方面或第三方面任意一种可能的设计中的方法;或,处理器执行第四方面或第四方面任意一种可能的设计中的方法;或,处理器执行第五方面或第五方面任意一种可能的设计中的方法。
在一种可能的设计中,上述芯片仅包括处理器,处理器用于读取并执行存储器中存储的指令或程序代码,当指令或程序代码被执行时,处理器执行第一方面或第一方面的任意一种可能的设计中的方法;或,处理器执行第二方面或第二方面任意一种可能的设计中的方法;或,处理器执行第三方面或第三方面任意一种可能的设计中的方法;或,处理器执行第四方面或第四方面任意一种可能的设计中的方法;或,处理器执行第五方面或第五方面任意一种可能的设计中的方法。
附图说明
图1为传统技术中网络架构的示意图;
图2为本申请实施例提供的应用于SRv6场景的网络架构示意图;
图3为本申请实施例提供的应用于应用SR-MPLS场景的网络架构示意图;
图4为本申请实施例提供的一种网络架构500的结构示意图;
图5为本申请实施例提供的发送报文的方法的流程图;
图6为本申请实施例提供的ISIS IPv6报文中End SID TLV字段的格式示意图;
图7为本申请实施例提供的OSPFv3报文中End SID TLV字段的格式示意图;
图8为本申请实施例提供的ISIS报文包括的prefix SID TLV字段的格式示意图;
图9为本申请实施例提供的OSPF报文包括的prefix SID TLV字段的格式示意图;
图10为本申请实施例提供的SRv6报文的SRH的格式示意图;
图11为本申请实施例提供的SRv6场景下Bypass SID实现方式a)的格式示意图;
图12为本申请实施例提供的SRv6场景下Bypass SID实现方式c)的格式示意图;
图13为本申请实施例提供的SRv6场景下报文M3 SRH的新增TLV字段的格式示意图;
图14(a)为本申请实施例提供的一种标签栈的示意图;
图14(b)为本申请实施例提供的另一种标签栈的示意图;
图15为本申请实施例提供的在图16(a)和图16(b)所示的网络架构下的发送报文方法的流程图;
图16(a)为本申请实施例提供的SRv6场景下网络架构的示意图;
图16(b)为本申请实施例提供的另一个SRv6场景下网络架构的示意图;
图17为本申请实施例提供的在图18所示的网络架构下的发送报文的方法的流程图;
图18为本申请实施例提供的在SR-MPLS场景下的网络架构的示意图;
图19为本申请实施例提供的跨域的网络架构示意图;
图20为本申请实施例提供的在图19所示的网络架构下的发送报文的方法的流程图;
图21为本申请实施例提供的网络设备2100的结构示意图;
图22为本申请实施例提供的网络设备2200的结构示意图;
图23为本申请实施例提供的发送报文的系统2300的结构示意图;
图24为本申请实施例提供的设备2400的结构示意图;
图25为本申请实施例提供的设备2500的结构示意图。
具体实施方式
在介绍具体的技术方案之前,首先介绍一下本申请实施例涉及到的关键术语。
明细路由:标识一个网络设备的IP地址或该网络设备所属网段的地址的路由,具体为该网络设备的IP地址加掩码,或者是该IP地址所属网段的地址加掩码。例如,一个网络设备的IP地址为A2:2::2/128,对应该IP地址的明细路由可以是A2:2::2/128对应的路由,也可以是A2:2::/96对应的路由,其中,地址A2:2::/96为地址A2:2::2/128所属网段的地址。
汇聚路由(Summary Route):对多条能够聚合到一起的明细路由进行汇聚得到的路由为汇聚路由。例如,一个网络设备上存储有到目的地址为A1:8::/96的网络设备的路由A1:8::/96,并且存储有到目的地址为A1:9::/96的网络设备的路由A1:9::/96,网络设备可以将这两条路由进行聚合得到聚合路由A1::/84。然后网络设备可以只将汇聚路由向其他网络设备发布,从而可以节省其他网络设备的存储资源。
下面结合附图,对本申请的实施例进行描述。
传统在转发报文时可能会出现网络资源浪费或网络拥塞的技术问题。下面以报文转发出现环路导致网络资源浪费或网络拥塞为例,结合几个可能的场景详细介绍该技术问题。
场景一:
在中大型网络中,网络设备需要大量的内存资源来存储较为庞大的路由表,传输和处理庞大的路由信息也会占用大量的网络资源。为解决该问题,内部网关协议(Interior Gateway Protocol,IGP)和边界网关协议(Border Gateway Protocol,BGP)提供了路由汇聚功能。
路由汇聚也称为路由聚合,是指网络设备将属于同一个网段内的多个不同子网的路由汇聚成一条汇聚路由。网络设备将该汇聚路由向该网络设备的邻居网络设备发布,不再发布对应该汇聚路由的多个不同子网的路由,从而减少该邻居网络设备的路由表中转发表项的数目,减小对系统资源的占用。另一方面,如果被汇聚的一个网段范围内的某个子网的路由频繁的删除和添加,网络设备并不需要将该子网的路由通知给邻居网络设备,因为子网的路由都是以汇聚路由的形式通告给邻居网络设备,这样避免网络中的路由震荡,在一定程度上提高了网络的稳定性。
汇聚路由的使用虽然可以减少网络设备存储的转发表项的数量,但是在一些链路故障场景中存在环路的问题。
参见图2,该图为应用SRv6技术的网络架构示意图。
在图2中,该网络架构包括接入设备、汇聚设备和区域核心设备,其中,接入设备可以为接入节点(access node,ACC),汇聚设备可以为汇聚节点(aggregate node,AGG),区域核心设备可以为区域核心节点(regional core node,RC)。
其中,接入设备包括ACC 201、ACC 202和ACC 203,汇聚设备包括AGG 204和AGG 205,区域核心设备包括RC 206和RC 207。它们之间的连接关系为:ACC 201分别与ACC 202以及AGG 204连接,ACC 202还与AGG 205连接,ACC 203与AGG 205连接,AGG 204分别与AGG 205和RC 206连接,AGG 205还与RC 207连接,RC 206还与RC 207连接。
网络架构中的上述设备的地址可以是IPv6地址,也可以是互联网协议第四版(Internet Protocol version 4,IPv4)地址。为了描述方便,下面均以IPv6地址为例进行介绍。在图2的网络架构中,ACC 201的IP地址(即IPv6地址)为A1:8::/96,ACC 202的IP地址为A1:9::/96,ACC 203的IP地址为A1:A::/96。
其中,ACC 201、ACC 202、AGG 204和AGG 205属于接入网中的接入环1,ACC 203、AGG 204和AGG 205属于接入网中的接入环2,AGG 204、AGG 205、RC 206和RC 207属于骨干网中的汇聚环。
AGG 204将接入环1中ACC 201的明细路由A1:8::/96以及ACC 202的明细路由A1:9::/96汇聚成汇聚路由A1::/84,并将该汇聚路由向汇聚环中的网络设备发布,同时AGG 204生成与ACC 201的IP地址A1:8::/96对应的明细路由,以及生成与ACC 202的IP地址A1:9::/96对应的明细路由。
AGG 205也将接入环1中ACC 201的明细路由A1:8::/96以及ACC 202的明细路由A1:9::/96汇聚成汇聚路由A1::/84,并将该汇聚路由向汇聚环中的网络设备发布。AGG 205生成与ACC 201的IP地址A1:8::/96对应的明细路由,以及生成与ACC 202的IP地址A1:9::/96对应的明细路由。
AGG 204生成转发表,该转发表包括如表1所示的转发表项1和转发表项2,转发表项1为IP地址A1:8::/96对应的明细路由,转发表项2为IP地址A1:9::/96对应的明细路由。其中,转发表项1包括ACC 201的IP地址A1:8::/96和出接口(具体指的是该接口的标识,下文同理),其中该出接口为从AGG 204到ACC 201的转发路径上的AGG 204的接口。转发表项2包括ACC 202的IP地址A1:9::/96和出接口,该出接口为从AGG 204到ACC 202的转发路径上的AGG 204的接口。具体的,转发表项1的出接口为对应从AGG 204到ACC 201的最短路径的出接口,转发表项2的出接口为对应从AGG 204到ACC 202的最短路径的出接口,该出接口可以是AGG 204与ACC 201之间直连链路对应的接口。
表1
转发表项标识 目的地址 出接口
1 A1:8::/96 与ACC 201直连链路的出接口
2 A1:9::/96 与ACC 201直连链路的出接口
此外,AGG 204分别接收AGG 205发布的来自AGG 205和RC 206的汇聚路由A1::/84,并生成对应的转发表项3和转发表项4。参见表2,转发表项3包括汇聚路由A1::/84和出接口,该出接口为AGG 204的与AGG 205之间直连链路的出接口。转发表项4包括汇聚路由A1::/84和出接口,该出接口为AGG 204的与RC 206之间直连链路的出接口。其中,AGG 204到达AGG 205直连链路的开销(cost)低于链路AGG 204-RC 206-RC 207-AGG 205的开销,所以AGG 204到达AGG 205直连链路对应路由的优先级高于链路AGG 204-RC 206-RC 207-AGG 205对应路由的优先级。转发路径AGG 204-RC 206-RC 207-AGG 205可以作为拓扑无关无环备份(Topology-Independent Loop-free Alternate,TI-LFA)路径。
表2
转发表项标识 目的地址 出接口
3 A1::/84 与AGG 205直连链路的出接口
4 A1::/84 与RC 206直连链路的出接口
参见表3,该表为AGG 205生成的转发表项,表3包括转发表项5和转发表项6。其中,转发表项5包括ACC 202的IP地址A1:9::/96和出接口,该出接口为AGG 205的与ACC 202之间直连链路的接口。转发表项6包括ACC 203的IP地址A1:A::/96和出接口,该出接口为AGG 205的与ACC 203之间直连链路的接口。
表3
转发表项标识 目的地址 出接口
5 A1:9::/96 与ACC 202直连链路的出接口
6 A1:A::/96 与ACC 203直连链路的出接口
此外,AGG 205分别接收AGG 204发布的来自AGG 204和RC 207的汇聚路由A1::/84,并生成对应的转发表项7和转发表项8。参见表4,转发表项7包括汇聚路由A1::/84,该汇聚路由的出接口为AGG 205的与AGG 204之间直连链路的出接口。转发表项8包括汇聚路由A1::/84,该汇聚路由的出接口为AGG 205的与RC 207之间直连链路的出接口。由于AGG 205与AGG 204之间直连链路的开销低于链路AGG 205-RC 207-RC 206-AGG 204之间链路的开销,所以AGG 205与AGG 204之间直连链路对应路由的优先级高于链路AGG 205-RC 207-RC 206-AGG 204对应路由的优先级。
表4
转发表项标识 目的地址 下一跳网络设备的出接口
7 A1::/84 与AGG 204直连链路的出接口
8 A1::/84 与RC 207直连链路的出接口
当AGG 204-ACC 201-ACC 202的链路正常时,RC 206向ACC 202发送的报文,在到达AGG 204时,AGG 204查询表1命中与ACC 202的IP地址A1:9::/96对应的明细路由的路由表项2,然后通过根据路由表项2确定的与ACC 201直连链路的出接口向ACC 201发送该报文,由ACC 201将该报文转发至ACC 202。
而当AGG 204与ACC 201之间的直连链路故障时,AGG 204删除到达ACC 201和ACC 202的明细路由,即AGG 204删除转发表项1和转发表项2。当AGG 204与AGG 205之间的直连链路正常,那么当AGG 204接收到来自RC 206的报文之后,根据该报文的目的地址,即ACC 202的IP地址,匹配不到到达ACC 202的明细路由对应的转发表项2,而是匹配到汇聚路由A1::/84对应的转发表项。具体的,转发表项3对应的路由的优先级高于转发表项4对应的路由的优先级,所以AGG 204可以根据转发表项3确定的与AGG 205直连链路的出接口向AGG 205发送该报文。AGG 205在接收到该报文之后,根据该报文的IP地址匹配到转发表项5,并根据转发表项5确定的与ACC 202直连链路的出接口将该报文转发给ACC 202。
若AGG 205与ACC 202之间的链路故障,那么AGG 205删除转发表项5。所以,当AGG 205接收到来自AGG 204的报文之后,匹配不到转发表项5,即匹配不到到达ACC 202的明细路由,而是匹配到转发表项7,即匹配到到达AGG 204的汇聚路由A1::/84。所以, AGG 205将报文返回给AGG 204,从而形成环路,造成资源的浪费,甚至形成网络拥塞。
进一步的,如果当AGG 204与AGG 205之间的直连链路也故障,那么AGG 204删除转发表项3。那么当AGG 204接收到来自RC 206的报文之后,根据该报文的目的地址,即ACC 202的IP地址,匹配不到到达ACC 202的明细路由对应的转发表项2,也匹配不到汇聚路由对应的转发表项3,而是匹配到汇聚路由A1::/84对应的转发表项4。转发表项4中与汇聚路由A1::/84对应的出接口为与RC 206直连链路的出接口。所以,AGG 204通过与RC 206直连链路的出接口将报文发送给RC 206,由RC 206通过RC 207将该报文发送给AGG 205。当AGG 205与ACC 202之间的链路故障,那么AGG 205根据ACC 202的IP地址匹配不到到达ACC 202的明细路由对应的转发表项5,但可以匹配到与汇聚路由A1::/84对应的转发表项。由于与汇聚路由A1::/84对应的转发表项7对应的路由优先级高于与汇聚路由A1::/84对应的转发表项8对应的路由优先级。所以,如果AGG 204与AGG 205之间的直连链路正常,那么AGG 205根据ACC 202的IP地址匹配到汇聚路由A1::/84对应的转发表项7,进而将该报文通过与AGG 204直连链路的出接口返回给AGG 204,从而形成环路。进一步的,如果AGG 204与AGG 205之间的直连链路也故障,那么AGG 205根据ACC 202的IP地址匹配不到到达ACC 202的明细路由对应的转发表项5,也匹配不到与汇聚路由A1::/84对应的转发表项7,而是匹配到与汇聚路由A1::/84对应的转发表项8,那么AGG 205根据与RC 207直连链路的出接口将该报文通过RC 207返回AGG 204,从而也形成环路,造成资源的浪费,甚至形成网络拥塞。
与AGG 204与AGG 205之间的链路故障类似,当AGG 204与AGG 205之间没有物理链路时,也会存在上述环路问题。
场景二:
参见图3,该图为应用SR的多协议标签交换(Multi-Protocol Label Switching,MPLS)技术的网络架构示意图。
在图3中,该网络架构包括接入设备、汇聚设备和区域核心设备,其中,接入设备可以为ACC,汇聚设备可以为AGG,区域核心设备可以为RC。
具体的,网络架构包括ACC 301、ACC 302、ACC 303、AGG 304、AGG 305、RC 306和RC 307。ACC 301、ACC 302和ACC 303分别与AGG 304和AGG 305连接,AGG 304和AGG 305分别与RC 306和RC 307连接。
其中,ACC 301、ACC 302、ACC 303、AGG 304和AGG 305属于IGP域(domain)1,AGG 304、AGG 305、RC 306和RC 307属于IGP域2。
ACC 301的标签为16001,ACC 302的标签为16002,ACC 303的标签为16003,AGG 304的标签为16101,AGG 305的标签为16102。ACC 301、ACC 302、ACC 303、AGG 304和AGG 305分别在IGP域1中发布自己的标签,并且,AGG 304、AGG 305在IGP域2发布各自的标签。
AGG 304根据接收到的来自ACC 301的标签16001确认到达ACC 301的主用转发路径,即AGG 304到ACC 301的直连链路,并生成对应的转发表项9。参见表5,在该表中,转发表项9包括ACC 301的标签16001和出接口,该出接口为AGG 304的与ACC 301直 连链路的出接口。
表5
转发表项标识 标签 出接口
9 16001 与ACC 301直连链路的出接口
AGG 304可以生成到达ACC 301的备用转发路径,该备用转发路径为AGG 304-AGG 305-ACC 301,并根据该备用转发路径生成对应的转发表项10。参见表6,在该表中,转发表项10包括ACC 301的标签16001和出接口,该出接口为AGG 304的与AGG 305直连链路的接口。
表6
转发表项标识 标签 出接口
10 16001 与AGG 305直连链路的出接口
此外,AGG 305根据接收到的来自ACC 301的标签16001生成转发表项11,参见表7,该转发表项11包括ACC 301的标签16001和到出接口,该出接口为AGG 305的与ACC 301直连链路的接口。
表7
转发表项标识 标签 出接口
11 16001 与ACC 301直连链路的出接口
AGG 305还可以生成到达ACC 301的备用转发路径,该备用转发路径为AGG 305-AGG 304-ACC 301,并根据该备用转发路径生成对应的转发表项12。参见表8,在该表中,转发表项12包括ACC 301的标签16001和出接口,该出接口为AGG 305的与AGG 304直连链路的接口。
表8
转发表项标识 标签 出接口
12 16101 与AGG 304直连链路的出接口
AGG 304接收来自RC 306的报文,该报文携带有ACC 301的标签16001,标识该报文的目的节点为ACC 301。当AGG 304确定出与ACC 301之间的直连链路故障时,AGG 304根据ACC 301的标签16001匹配到转发表项10,得到与ACC 301的标签16001对应的出接口,即与AGG 305直连链路的出接口,并在报文中压入AGG 305的标签16102,然后将该报文发送给AGG 305。AGG 305在接收到报文之后,如果确定出与ACC 301之间的直连链路没有故障,则将该报文发送给ACC 301;如果确定出与ACC 301之间的直连链路故障,则根据ACC 301的标签16001匹配到转发表项12,得到与ACC 301的标签16001对应的出接口,即与AGG 304直连链路的出接口,并在报文中压入AGG 304的标签16101,然后将该报文发送给AGG 304,从而形成环路,造成网络资源浪费,甚至网络拥堵的问题。
通过上述两个场景的例子可知,如果出现环路问题,则会导致报文无法被传递到目的节点,影响网络正常通信。
为了克服该技术问题,本申请实施例提供了一种报文发送方法,实现在网络通信过程 中减少资源浪费或网络拥塞的技术问题。在介绍该报文发送方法之前,首先介绍该方法可以适用的网络架构。
参见图4,该图为本申请实施例提供的一种网络架构500的结构示意图。
在图4中,该网络架构500包括网络设备401、网络设备402、网络设备403、网络设备404和网络设备405。其中,网络设备401分别与网络设备402、网络设备403以及网络设备404连接。网络设备404分别与网络设备403和网络设备405连接。
在本申请实施例中,网络设备401、网络设备402、网络设备403、网络设备404和网络设备405可以为路由器(router)、交换机(switch)等,本申请实施例不做具体限定。
下面结合图4对本申请实施例提供的发送报文的方法进行说明,在该方法中,网络设备404向网络设备401发送通告报文,该通告报文中包括网络设备404的标识和指示标识A,该指示标识A用于指示网络设备404支持避免使用备用路径转发报文的能力。网络设备401接收来到该通告报文之后,获得到网络设备403的转发路径,该转发路径经过网络设备404,并生成与该转发路径对应的转发表项,该转发表项中至少包括网络设备403的标识以及出接口。当网络设备401接收到目的地为网络设备403的第一报文之后,网络设备401根据该网络设备403的标识查找转发表项,得到网络设备404的标识和出接口。网络设备401在第一报文中携带指示标识A得到第二报文,并通过出接口向网络设备404转发该第二报文。其中,指示标识A用于指示网络设备404避免使用从网络设备404到网络设备403的备用转发路径向网络设备403发送所述第二报文。当网络设备404判断从网络设备404到网络设备403的主用转发路径不可达时,根据指示标识A的指示不再使用备用转发路径向网络设备403发送第二报文,而是直接丢弃第二报文。
该方法主要涉及第一网络设备和第二网络设备。其中,第一网络设备可以是图4中的网络设备401,第二网络设备可以是图4中的网络设备404。该发送报文的方法可以应用于SR-MPLS、SRv6、MPLS、互联网协议第六版(Internet Protocol version 6,IPv6)或互联网协议第四版(Internet Protocol version 4,IPv4)等场景。下文在具体介绍本方法时,均以SRv6和SR-MPLS场景为例进行介绍。
参见图5,该图为本申请实施例提供的发送报文的方法的流程图。该发送报文的方法包括如下步骤:
S501:第二网络设备向第一网络设备发送报文M1,报文M1包括第二网络设备的标识和指示标识A。
当该方法应用于SRv6场景时,第二网络设备的标识可以是第二网络设备段标识(segment identifier,SID),该段标识可以为第二网络设备的一个IPv6地址。当该方法应用于SR-MPLS场景时,第二网络设备的标识可以是第二网络设备的标签。当然,第二网络设备的标识还可以用其他形式来标识,例如路由器标识(router identifier,router ID)等,本申请实施例不做具体限定。第二网络设备的标识可以通过配置得到。
指示标识A用于标识第二网络设备具有支持避免使用备用转发路径转发报文的能力。第二网络设备具有避免使用备用转发路径转发报文的能力具体为:第二网路设备在向目的设备转发报文时,如果存在主用转发路径和备用转发路径用于向目的设备转发报文,当主 用转发路径不可达时,不再使用备用转发路径向目的设备转发该报文。从而避免由于使用备用转发路径转发报文引起报文转发环路的问题,从而避免了资源浪费或网络拥塞。在本申请实施例中,指示标识A和第二网络设备的标识可以为两个独立的信息,也可以合为一体。当指示标识A和第二网络设备的标识为两个独立的信息时,指示标识A可以通过被配置的方式使得第二网络设备得到。当指示标识A和第二网络设备的标识合为一体时,第二网络设备的标识既可以标识第二网络设备本身,也可以用于标识第二网络设备具有支持避免使用备用转发路径转发报文的能力。
当第二网络设备得到第二网络设备的标识和指示标识A之后,第二网络设备可以通过泛洪的方式将携带该第二网络设备的标识和指示标识A的报文M1发送给第一网络设备。报文M1可以为通告报文,例如为中间系统到中间系统(Intermediate system to intermediate system,ISIS)报文或开放最短路径优先(Open Shortest Path First,OSPF)报文等。
当本申请实施例应用于SRv6场景时,报文M1为ISIS IPv6报文或OSPF第三版(version 3,v3)报文,那么该报文M1可以包括端节点段标识(Endpoint segment identifier,End SID)类型长度值(type length value,TLV)字段,该End SID TLV字段可以包括第二网络设备的标识和指示标识A。
参见图6,该图为ISIS IPv6报文中End SID TLV字段的格式示意图。在该图中,该End SID TLV字段包括Type字段、Length字段、标识位(Flags)字段、SRv6Endpoint功能(Function)字段、SID字段、Sub-sub-tlv-len字段以及sub-sub-TLVs字段等。
其中,Type字段的值标识该End SID TLV字段的类型。Length字段的值为该sTLV的长度。Flags字段占8比特。SRv6Endpoint Function字段的值为该End SID TLV的合法功能值(legal function values)。该End SID TLV字段中可以包括一个或多个SID字段,每个SID字段为128比特(bits)。其中一个SID字段的值可以包括第二网络设备的SID。具体的,该第二网络设备的SID包括定位符(locator)部分和function部分,该第二网络设备的SID为第二网络设备的IPv6地址,该第二网络设备的SID可以视为第二网络设备的标识。Sub-sub-tlv-len字段的值为对应Sub-sub-tlv字段的长度。Sub-sub-tlv字段为可选。
参见图7,该图为OSPFv3报文中End SID TLV字段的格式示意图。在该图中,该End SID TLV字段包括Type字段、Length字段、Flags字段、保留(Reserved)字段、端节点行为(Endpoint Behavior)字段、SID字段以及sub-TLVs字段等。
其中,Type字段的值用于指示该End SID TLV的类型。Length字段的值为该End SID TLV的长度。Flags字段占8比特。Endpoint Behavior字段的值根据具体情况确定,此处不再赘述。该End SID TLV字段中可以包括一个或多个SID字段,每个SID字段为128bits。其中一个SID字段的值可以包括第二网络设备的SID,也可以视为第二网络设备的标识。具体的,该SID字段包括locator部分和function部分,该SID字段的值为第二网络设备的IP地址。sub-TLVs字段为可选。
对于上述ISIS IPv6报文或OSPFv3报文,指示标识A被携带的方式可以有多种:
作为第一种可能的实现方式,End SID TLV字段中Type字段的值用于指示该End SID TLV字段是一个特定类型的End SID TLV,该类型的END SID TLV指示第二网络设备具有 支持避免使用备用转发路径转发报文的能力。即,End SID TLV字段中Type字段携带指示标识A。
作为第二种可能的实现方式,End SID TLV字段中Flags字段的值用于指示第二网络设备具有指示标识A的功能,即Flags字段中携带指示标识A。例如,Flags字段中一个或多个比特位用于携带指示标识A,例如Flags的第8比特位取值为1,标识该指示标识A。当第一网络设备接收到报文M1,并判断Flags字段第8比特位取值为1时,确定第二网络设备具有支持避免使用备用转发路径转发报文的能力。在本申请实施例中,该Flags字段携带指示标识A的比特位可以被称为旁路(Bypass)Flag,该比特位的可以为标记为B,即为Bypass Flags的简写。
作为第三种可能的实现方式,End SID TLV字段中的第二网络设备的SID字段携带指示标识A,该第二网络设备的SID可以也称为旁路(Bypass)SID。
在第三种可能实现的方式中,又有三种可能的实现方式:
实现方式a),Bypass SID的function部分包括指示标识A。
实现方式b),Bypass SID即用于标识第二网络设备,也具有指示标识A的功能。
实现方式c),Bypass SID的locator的部分比特位具有指示标识A的功能。
当本申请实施例应用于SR-MPLS场景时,报文M1为ISIS报文或OSPF报文,那么该报文M1可以包括前缀段标识(prefix SID)TLV字段,该prefix SID TLV字段可以包括第二网络设备的标识和指示标识A。
参见图8,该图为ISIS报文包括的prefix SID TLV字段的格式示意图。prefix SID TLV字段包括Type字段、Length字段、Flags字段、算法(Algorithm)字段以及以下三种字段的其中一种:SID字段、指示(Index)字段和标签(Label)字段。
其中,Type字段的值指示prefix SID TLV的类型。Length字段的值为prefix SID TLV字段的长度。Flags字段的值可以包括值标识位(Value Flag,V-Flag)或本地标识位(Local Flag,L-Flag)或其他。Algorithm字段的值指示路由器用于计算到达其他网络设备的可达性的算法(例如最短路径法)或计算这些其他网络设备的前缀所采用的算法。SID/Index/Label字段的值包括第二网络设备的标签,第二网络设备的标签可以视为第二网络设备的标识。
参见图9,该图为OSPF报文包括的prefix SID TLV字段的格式示意图。prefix SID TLV字段包括Type字段、Length字段、Flags字段、Reserved字段、多拓扑(multi-topology,MT)ID字段、Algorithm字段以及以下三种字段的其中一种:SID字段、Index字段或Label字段。
其中,Type字段的值指示prefix SID TLV的类型。Length字段的值为prefix SID TLV字段的长度。Flags字段的值可以包括值标识位(Value Flag,V-Flag)或本地标识位(Local Flag,L-Flag)或其他。SID/Index/Label字段的值包括第二网络设备的标签,第二网络设备的标签可以视为第二网络设备的标识。
对于上述ISIS报文或OSPF报文,指示标识A被携带的方式可以有多种:
作为第一种可能的实现方式,prefix SID TLV字段中Type字段的值用于指示该prefix  SID TLV是一个特殊的prefix SID TLV,该类型的TLV用于指示第二网络设备支持避免使用备用转发路径转发报文的能力。即,prefix SID TLV字段中Type字段携带指示标识A。
作为第二种可能的实现方式,prefix SID TLV字段中Flags字段的值用于指示第二网络设备具有指示标识A的功能,即Flags字段中携带指示标识A。例如,Flags字段中一个或多个比特位用于携带指示标识A,例如Flags的第8比特位取值为1,标识该指示标识A。当第一网络设备接收到报文M1,并判断Flags字段第8比特位取值为1时,确定第二网络设备具有支持避免使用备用转发路径转发报文的能力。在本申请实施例中,该Flags字段携带指示标识A的比特位可以被称为旁路(Bypass)Flag,该比特位的可以为标记为B,即为Bypass Flags的简写。。
作为第三种可能的实现方式,SID/Index/Label字段的值,即第二网络设备的标签,第二网络设备的标签具有第二网络设备的标识的功能,也同时具有指示标识A的指示功能。
S502:第一网络设备接收报文M1,根据目的设备的标识生成转发表项。
在本申请实施例中,目的设备为与第一网络设备通信的网络设备。目的设备可以是路由器、交换机、终端设备或服务器等,本申请实施例不做具体限定。例如,当第一网络设备是图4中的网络设备401时,目的设备可以是图4中的网络设备403。
当该方法应用于SRv6场景时,目的设备的标识可以是目的设备的IP地址。当该方法应用于SR-MPLS场景时,目的设备的标识可以是目的设备的标签。当然,目的设备的标识还可以用其他形式来标识,例如router ID等,本申请实施例不做具体限定。
在本申请实施例中,目的设备可以预先通过泛洪的方式向第一网络设备发送目的设备的标识,以使第一网络设备能够获取到目的设备的标识。
在获取到报文M1之后,第一网络设备根据目的设备的标识和报文M1中第二网络设备的标识生成转发表项,该转发表项对应的第一转发路径为从第一网络设备到目的设备的转发路径。其中,转发表项包括目的设备的标识和第一转发路径的转发信息。当应用到SRv6场景时,转发信息可以包括段标识列表,段标识列表中包括第二网络设备的段标识,第二网络设备的段标识为第二网络设备的IP地址;当应用到SR-MPLS场景时,转发信息为包括标签栈,标签栈包括第二网络设备的标签。
转发信息除了可以包括第二网络设备的段标识或第二网络设备的标签以外,还可以包括出接口的标识,该出接口为该第一转发路径上到下一跳网络设备的接口。
作为一种可能实现的方式,从第一网络设备到第二网络设备的第一转发路径可以是隧道。在第一网络设备接收到报文M1之后,根据第二网络设备的标识生成到达第二网络设备的隧道,上述第一转发路径上到下一跳网络设备对应的出接口的标识为对应该隧道的接口。
在本申请实施例中,第一转发路径可以视为第一网络设备到目的设备的备用转发路径。而备用转发路径是相对于主用转发路径而言的。在一些实施例中,当第一网络设备到目的设备的主用转发路径没有故障,则第一网络设备通过主用转发路径向目的设备发送数据报文(例如下文中的报文M2);而当主用转发路径故障,则第一网络设备可以通过第一转发路径向第二网络设备发送该数据报文,由第二网络设备将该数据报文发送给目的设备。在 本申请实施例中,第一网络设备到目的设备的主用转发路径可以称为第二转发路径。
当本申请实施例的应用场景为SRv6时,第一转发路径和第二转发路径有如下三种可能的情况:
情况一:第二转发路径为对应目的设备的IP地址的明细路由的转发路径,相应的,第一转发路径为对应目的设备的IP地址的汇聚路由的转发路径。
情况二:第二转发路径为对应目的设备的IP地址的汇聚路由的主用转发路径,相应的,第一转发路径为对应目的设备的IP地址的汇聚路由的备用转发路径。
情况三:第二转发路径为对应目的设备的IP地址的明细路由的主用转发路径,相应的第一转发路径为对应目的设备的IP地址的明细路由的备用转发路径。
当本申请实施例的应用场景为SR-MPLS时,第二转发路径为对应目的设备的标签的标签转发表项中与主用转发信息对应的转发路径,相应的,第一转发路径为对应目的设备的标签的标签转发表项中与备用转发信息对应的转发路径。主用转发信息可以包括目的设备的标签和出接口。备用转发信息可以包括目的设备的标签、标签栈和出接口,该标签栈包括第二网络设备的标签。在后续对报文M2转发时,可以在报文M2中压标签栈,得到报文M3。
此外,第一转发路径对应的转发表项可以包括特殊的指示信息,或者该转发表项被设置为特殊的转发表项,以表示该转发表项为在第二转发路径不可达时第一网络设备可以去查找的转发表项。可选的,第一转发路径对应的转发表项中还可以包括指示标识A。
在一些实施例中,第一转发路径还可以是第一网络设备到目的设备的主用转发路径。
S503:第一网络设备接收去往目的设备的报文M2。
在本申请实施例中,报文M2可以是数据报文,即携带业务数据的报文。报文M2包括目的设备的标识,即该报文M2需要到达目的设备。
该报文M2可以来自第三网络设备,该第三网络设备可以例如为图4所示实施例中的网络设备402。在一些实施例中,第三网络设备属于第一网络域,目的设备属于第二网络域。那么,第一网络设备和第二网络设备可以既属于第一网络域也属于第二网络域,第一网络设备和第二网络设备可以是运营商边缘(provider edge,PE)节点。
例如,第一网络域为骨干网的区域,第二网络域为接入网的区域,第一网络设备为连接接入网和骨干网的网络设备,第一转发路径为骨干网中的转发路径。
再例如,第一网络域和第二网络域均为IGP域,但他们的IGP域编号不同。第一网络设备为连接这两个IGP域的网络设备。
再例如,第一网络域和第二网络域均为BGP域,但他们的BPG域编号不同。第一网络设备为连接这两个BGP域的网络设备。
S504:第一网络设备根据目的设备的标识确定第一转发路径。
在本申请实施例中,第一网络设备根据报文M2中目的设备的标识查找上述包括该目的设备的标识的转发表项,根据该转发表项确定对应的第一转发路径,即从第一网络设备到第二网络设备的备用转发路径。
当应用场景为SRv6时,结合上文描述的第一转发路径和第二转发路径的三种情况, S504具体包括如下三种可能的实现方式:
1)第一转发路径为对应目的设备的IP地址的汇聚路由的转发路径,第二转发路径为对应目的设备的IP地址的明细路由的转发路径。S504步骤具体为:当第一网络设备根据目的设备的IP地址未匹配到对应目的设备的IP地址的明细路由,或者第一网络设备根据目的设备的IP地址匹配到对应目的设备的IP地址的明细路由,并确定明细路由对应的转发路径不可达时,第一网络设备确定到目的设备的IP地址的汇聚路由对应的转发路径为第一转发路径。
2)第一转发路径为对应目的设备的IP地址的汇聚路由的备用转发路径,第二转发路径为对应目的设备的IP地址的汇聚路由的主用转发路径。S504步骤具体为:当第一网络设备根据目的设备的IP地址匹配到对应目的设备的IP地址的汇聚路由,并确定汇聚路由的主用转发路径不可达时,第一网络设备确定该汇聚路由的备用转发路径为第一转发路径。
3)第一转发路径为对应目的设备的IP地址的明细路由的备用转发路径,第二转发路径为对应目的设备的IP地址的明细路由的主用转发路径。S504步骤具体:为第一网络设备根据目的设备的IP地址匹配到对应目的设备的IP地址的明细路由,并确定明细路由的主用转发路径不可达,第一网络设备确定该明细路由的备用转发路径为第一转发路径。
在另外一些实施例中,当应用场景为SR-MPLS,第一网络设备中存储的与目的设备的标签对应的标签转发表项可以包括主用转发信息和备用转发信息,其中,主用转发信息对应于第一网络设备到达目的设备的主用转发路径,即第二转发路径;备用转发信息对应于第一网络设备到达目的设备的备用转发路径,即第一转发路径。当第一网络设备根据目的设备的标签匹配到标签转发表项,并确定第二转发路径不可达时,第一网络设备可以根据目的设备的标签确定第一转发路径,并通过第一转发路径转发报文M2。
S505:第一网络设备在报文M2中添加指示标识B生成报文M3。
在本申请实施例中,指示标识B用于指示第一转发路径上的网络设备避免使用备用路径向目的设备发送报文M3。其中,第一转发路径上的网络设备可以仅包括第二网络设备,也可以包括除第二网络设备以外的第一转发路径上的其他网络设备。
在SRv6场景中,指示标识B可以携带在报文M3的段路由头(segment router header,SRH)中。
作为第一种可能的实现方式,指示标识B可以携带在报文M3 SRH的Flags字段中。
例如,参见图10,该图为SRv6报文的SRH的格式示意图。在该图中,SRv6报文的SRH包括基本头(next header)字段、SRH长度(Hdr Ext Len)字段、路由类型(Routing Type)、段剩余(Segments Left)字段、最后一跳(Last Entry)字段、Flags字段、标记(Tag)字段、段标识列表(Segment List)字段以及可选的TLV对象(Optional Type Length Value objects)。
其中,next header字段的值为43,表明下一个报文头为路由扩展头。Hdr Ext Len字段的值为SRH的长度。Routing Type字段的值为4,表示携带的是SRH。Segments Left字段的值为下一个SID的编号,初始取值为n-1,n为SID的数目。Last Entry字段的值为报文转发路径最后一个SID的编号。Tag字段的值用于标记具有相同特性的一组报文。Segment  List字段的值为SID列表。在本申请实施例中,Flags字段中一个或多个比特位用于携带指示标识B,例如Flags的第8比特位取值为1,标识该指示标识B。当第二网络设备接收到报文M3,并判断Flags字段第8比特位取值为1时,确定第二网络设备避免使用备用路径向目的设备发送报文M3。在本申请实施例中,该Flags字段携带指示标识B的比特位可以被称为旁路(Bypass)Flag,该比特位的可以为标记为B,即为Bypass Flags的简写。
作为第二种可能的实现方式,指示标识B可以携带在报文M3 SRH的SID list字段中。在这种情况下,SID list包括第二网络设备的SID,该第二网络设备的SID包括指示标识B,该包括指示标识B的第二网络设备的SID也可以称为Bypass SID。
对于SRv6场景,该第二网络设备的SID包括locator部分和function部分,第二网络设备的SID包括第二网络设备的IP地址。在该场景下,有三种可能的实现方式:
实现方式a)参见图11,该Bypass SID的可以是特殊的IPv6地址,其即可以标识第二网络设备本身,也可以具有指示标识B的指示功能。Function部分的值可以是End.X,表示接收报文M3的网络设备在接收到该报文之后,将Segments Left的值减1,并将减1之后指示的SID list中的SID的值替换IPv6报文头的目的地址字段的值,以及向下一跳网络设备转发该报文M3。
实现方式b),该Bypass SID的locator中的部分字节同时具有指示标识B的功能。Function部分同实现方式a)。
实现方式c),参见图12,该Bypass SID的function部分包括指示标识B。
作为第三种可能的实现方式,参见图13,指示标识B可以携带在报文M3 SRH的新增TLV字段中。该新增TLV字段包括Type字段、Length字段和Value字段。其中,Type字段的值为该新增TLV字段的类型,Length字段的值为该TLV字段的长度,Value字段的值为该指示标识B。
上述可能的实现方式并不构成对本申请技术方案的限定,本领域技术人员可以根据实际情况自行设计。
对于SR-MPLS场景,报文M3包括标签栈,指示标识B可以携带在报文M3的标签栈中。
作为第一种可能的实现方式,报文M3的标签栈可以包括目的设备的标签、第二网络设备的标签和特殊标签。其中,特殊标签具有指示标识B的功能,且第二网络设备的标签和特殊标签相邻,即特殊标签可以在第二网络设备的标签的上一层,也可以在第二网络设备的标签的下一层。参见图14(a),第二网络设备的标签在标签栈的栈顶,特殊标签在临近第二网络设备的标签的下一层标签;参见图14(b),特殊标签在栈顶,第二网络设备的标签在临近特殊标签的下一层标签。
作为第二种可能的实现方式,报文M3的标签栈包括目的设备的标签和第二网络设备的标签,其中,第二网络设备的标签除了可以标识第二网络设备,还具有指示标识B的含义。
上述可能的实现方式并不构成对本申请技术方案的限定,本领域技术人员可以根据实际情况自行设计。此外,在SRv6场景下,在一些实施例中,报文M3中可以不包括第二网 络设备的段标识。或者,在SRv6场景下,在一些实施例中,报文M3的SID list中还可以包括第一转发路径上第二网络设备的上一跳网络设备的SID,该SID的function部分包括End.X,End.X是SRv6Programming中定义的操作,含义是:上一跳网络设备将报文M3转发到该SID对应的三层(layer 3,L3)出接口。
S506:第一网络设备通过第一转发路径向第二网络设备发送报文M3。
如前文所提,当第一转发路径为隧道时,隧道经过的网络设备(除了第二网络设备)只对报文M3进行转发,而不根据其中的指示标识B进行相应处理。当第一转发路径不为隧道时,可选的,第一转发路径上的网络设备根据该指示标识B避免使用备用转发路径向目的设备发送该报文M3,以免造成环路问题。
另外,若第一转发路径上的网络设备包括第四网络设备,例如,第四网络设备为图4中的网络设备405,即在图4中,网络设备405和网络设备402为两个独立的网络设备。而在其他的实施例中,第四网络设备与上述第三网络设备可以是同一个网络设备。当目的设备属于第二网络域时,第四网络设备可以属于第一网络域,即第一转发路径不经过第二网络域,其目的在于节约第二网络域的网络资源,适用于第一网络域中网络设备的网络资源大于第二网络域中网络设备的网络资源的情况。
S507:第二网络设备接收去往目的设备的报文M3。
S508:第二网络设备确定从第二网络设备到目的设备的主用转发路径不可达。
S509:响应于确定主用转发路径不可达,第二网络设备根据指示标识B的指示避免使用备用转发路径向目的设备发送报文M3。
由于报文M3中包括目的设备的标识,所以,第二网络设备可以根据该目的设备的标识确定到目的设备的主用转发路径是否可达。其中,主用转发路径是相对于备用转发路径而言的,二者都是第二网络设备到目的设备的转发路径。在本申请实施例中,当主用转发路径不可达时,第二网络设备根据指示标识B的指示不通过备用转发路径向目的设备发送报文M3,以减少资源浪费或网络拥塞的现象。当备用转发路径经过第一网络设备时,通过该方法可以避免出现与第一网络设备之间的环路问题。第二网络设备避免使用备用转发路径向目的设备发送报文M3之后,即可丢弃报文M3。
在SRv6场景的一些实施例中,目的设备的标识为目的设备的IP地址。对于SRv6场景,第二网络设备到达目的设备的主用转发路径和备用转发路径有三种可能的情况,下面结合这三种可能的情况分别对S508和S509进行详细介绍。
情况一:第二网络设备到目的设备的主用转发路径为到目的设备的明细路由对应的转发路径,第二网络设备到目的设备的备用转发路径为到目的设备的汇聚路由对应的转发路径。那么,当第二网络设备根据目的设备的IP地址没有匹配到对应的明细路由时,说明第二网络设备到达目的设备的主用转发路径不可达,所以即便存在与目的设备的IP地址对应的汇聚路由,也不通过该汇聚路由对应的备用转发路径发送该报文M3。或者,虽然第二网络设备根据目的设备的IP地址匹配到明细路由,但明细路由对应的转发路径不可达,则即便存在与目的设备的IP地址对应的汇聚路由,根据指示标识B的指示第二网络设备也不通过该汇聚路由对应的备用转发路径发送该报文M3。
情况二:第二网络设备到目的设备的主用转发路径为到目的设备的汇聚路由的主用转发路径,备用转发路径为到目的设备的汇聚路由的备用转发路径。当第二网络设备根据目的设备的IP地址匹配到汇聚路由,并确定汇聚路由的主用转发路径不可达时,第二网络设备根据指示标识B的指示不通过汇聚路由的备用转发路径向目的设备发送报文M3。
情况三:第二网络设备到目的设备的主用转发路径为到目的设备的明细路由的主用转发路径,备用转发路径为到目的设备的明细路由的备用转发路径。当第二网络设备根据目的设备的IP地址匹配到该明细路由,但该明细路由的主用转发路径不可达,根据指示标识B的指示第二网络设备也不通过明细路由的备用转发路径发送该报文M3。
对于上述三种情况,指示标识B的具体实现请参见S505的相关介绍,此处不再赘述。
此外,在确认主用转发路径不可达时,具体的,第二网络设备首先确定报文M3的目的地址为第二网络设备的IP地址,并从SRv6报文的段标识列表中获得目的设备的标识。然后,第二网络设备将报文M3的目的地址修改为目的设备的标识。第二网络设备根据报文M3的目的地址确定到目的设备的主用转发路径不可达。
在SR-MPLS场景中,目的设备的标识为目的设备的标签。第二网络设备存储的与目的设备的标签对应的标签转发表项包括主用转发信息和备用转发信息,其中,主用转发信息与第二网络设备到达目的设备的主用转发路径对应,备用转发信息与第二网络设备到达目的设备的备用转发路径对应。当第二网络设备根据目的设备的标签匹配到目的设备的标签转发表,并确定所述标签转发表中的主用转发信息对应的所述主用转发路径不可达时,即便能够使用与目的设备的标签对应的备用转发信息发送报文M3,根据指示标识B的指示第二网络设备也不通过与该备用转发信息对应的备用转发路径向目的设备发送报文M3。
具体的,当指示标识B为特殊标签,且与第二网络设备的标签相邻时,第二网络设备可以弹出该特殊标签和第二网络设备的标签,以获取该特殊标签,并根据该特殊标签的指示不通过到达目的设备的备用转发路径发送报文M3。
在弹出特殊标签和第二网络设备的标签之后,如果下一跳网络设备为目的设备,那么标签栈的栈顶标签为目的设备的标签。
综上所述,由于第一网络设备向第二网络设备发送的报文M3中携带有指示标识B,所以使得第二网络设备能够根据该指示标识B避免用备用转发路径转发报文M3,避免出现该报文M3通过备用转发路径传输可能会引起报文转发的环路问题,从而避免网络拥塞或网络的带宽资源浪费。
下面以几个应用场景为例详细介绍本申请实施例提供的发送报文的方法。
场景一:
参见图15、图16(a)和图16(b),图15为在图16(a)和图16(b)所示的网络架构下的发送报文方法的流程图,图16(a)和图16(b)所示的网络架构与图2所示的网络架构相同。
该发送报文方法包括如下步骤:
S601:AGG 204生成与ACC 201的IP地址A1:8::/96对应的明细路由的转发表项13, 以及生成与ACC 202的IP地址A1:9::/96对应的明细路由的转发表项14。AGG 204将接入环1中ACC 201的明细路由A1:8::/96以及ACC 202的明细路由A1:9::/96汇聚成汇聚路由A1::/84,并将该汇聚路由A1::/84向汇聚环中的网络设备发布。
在本申请实施例中,AGG 204可以视为前文中的第一网络设备。参见表5,该表包括AGG 204生成的转发表项,该转发表项包括转发表项13和转发表项14。其中,转发表项13包括ACC 201的IP地址A1:8::/96和出接口(具体指的是该接口的标识,下文同理),其中该出接口为从AGG 204到ACC 201的转发路径上的AGG 204的接口。转发表项14包括ACC 202的IP地址A1:9::/96和出接口,该出接口为从AGG 204到ACC 202的转发路径上的AGG 204的接口。转发表项13和转发表项14中出接口均为AGG 204的与ACC 201之间最短路径的接口,该最短路径的接口可以是AGG 204的与ACC 201之间直连链路的出接口。
表5
转发表项标识 目的地址 出接口
13 A1:8::/96 与ACC 201直连链路的出接口
14 A1:9::/96 与ACC 201直连链路的出接口
S602:AGG 205上生成与ACC 202的IP地址A1:9::/96对应的明细路由的转发表项15和与ACC 203的IP地址A1:A::/96对应的明细路由的转发表项16。AGG 205将接入环1中ACC 202的明细路由A1:9::/96和接入环2中ACC 203的明细路由A1:A::/96汇聚成汇聚路由A1::/84,并将该汇聚路由A1::/84向汇聚环发布。
在本申请实施例中,AGG 205可以视为前文中的第二网络设备。
参见表6,该表为AGG 205生成的转发表项15和转发表项16。其中,转发表项15包括ACC 202的IP地址A1:9::/96和出接口,该出接口为AGG 205的与ACC 202之间直连链路的出接口。转发表项16包括ACC 203的IP地址A1:A::/96和出接口,该出接口为AGG 205的与ACC 203之间直连链路的出接口。
表6
转发表项标识 目的地址 出接口
15 A1:9::/96 与ACC 202直连链路的出接口
16 A1:A::/96 与ACC 203直连链路的出接口
S603:AGG 204接收来自AGG 205的汇聚路由A1::/84,并生成对应的转发表项17。
参见表7,转发表项17包括汇聚路由A1::/84和出接口,该出接口可以被设置为null 0或为AGG 204的与AGG 205之间直连链路的出接口。
表7
Figure PCTCN2020117006-appb-000001
S604:AGG 205接收来自AGG 204的汇聚路由A1::/84,并生成对应的转发表项18。
参见表8,转发表项18包括汇聚路由A1::/84,该汇聚路由的出接口被设置为null 0或为AGG 205的与AGG 204之间直连链路的出接口。其中null 0用于指示该出接口不可用。
表8
Figure PCTCN2020117006-appb-000002
S605:AGG 205向汇聚环中的网络设备发送报文M1,该报文M1中包括AGG 205的SID和指示标识A,AGG 205的SID可以为A2:2::2/128。
在本申请实施例中,该AGG 205的SID A2:2::2/128(也就是AGG 205的IP地址)具有标识AGG 205的作用。指示标识A用于指示到AGG 205的转发路径上的网络设备避免使用备用转发路径向目的设备发送报文M3。
在本申请实施例中,该AGG 205的SID的类型可以为倒数第二跳SRH段信息弹出(Penultimate Segment Pop of the SRH,PSP)类型。
S606:AGG 204接收该报文M1,并从该报文M1中获得AGG 205的SID A2:2::2/128和指示标识A。
S607:AGG 204根据该AGG 205的SID A2:2::2/128生成到达AGG 205的隧道。
在本申请实施例中,到达AGG 205的隧道经过AGG 204-RC 206-RC 207-AGG 205,该隧道可以视为上文中的第一转发路径。
S608:AGG 204生成汇聚路由A1::/84的备用转发表项,如转发表项19,转表表项19为转发表项17的备用转发表项。
参见表9,转发表项19的目的地址为A1::/84,其中还包括备用转发信息和隧道的出接口,备用转发信息包括修复列表(repair list),该repair list包含有AGG 205的SID。可选的,该repair list还可以包括隧道上除AGG 205的SID以外的其他网络设备的SID,例如RC 206的SID和RC 207的SID。
表9
转发表项标识 目的地址 修复列表(repair list) 出接口
19 A1::/84 A2:2::2/128 隧道对应的接口
S609:AGG 204确认到达ACC 202的主用转发路径不可达,AGG 204删除转发表项14。
AGG 204到达ACC 202的主用转发路径为AGG 204-ACC 201-ACC 202,该主用转发路径可以视为上文中的第二转发路径。当该主用转发路径故障,AGG 204可以删除转发表项14。
S610:AGG 204接收来自RC 206的报文M2,该报文M2中包括ACC 202的IP地址A1:9::/96。
在本申请实施例中,ACC 202可以视为上文中的目的设备。
具体的,报文M2中包括IPv6报文头和负载(payload),该IPv6报文头中包括目的地址,该目的地址为ACC 202的IP地址A1:9::/96。
S611:由于转发表项14被删除,所以AGG 204根据ACC 202的IP地址A1:9::/96未匹配到明细路由,但可以匹配到汇聚路由A1::/84,也就是可以匹配到转发表项17和转发表项19。
S612:当AGG 204确认转发表项17中出接口为null 0,或者AGG 204确认转发表项17中出接口为与AGG 205直连链路的出接口,但AGG 204与AGG 205的直连链路故障,那么AGG 204使用转发表项19转发报文M2。
S613:AGG 204在报文M2SRH中的SID list中添加ACC 202的SID A1:9::/96和AGG 205的SID A2:2::2/128,在报文M2的SRH的Flags字段中添加指示标识B,并将报文M2的IPv6报文头目的地址字段的值修改为AGG 205的IP地址,从而得到报文M3。
也就是说,参见图16(a),报文M3的SID list中既包括AGG 205的SID,也包括ACC 202的SID。ACC 202的SID存放在SRH头中的Segment List[0]的位置,AGG 205的SID存放在SRH头中的Segment List[1]位置,Segments Left设置为1。
S614:AGG 204根据隧道对应的接口向AGG 205发送报文M3。
S615:AGG 205接收报文M3,根据报文M3中ACC 202的IP地址A1:9::/96确认到达ACC 202的主用转发路径是否可达。如果是,则通过主用转发路径向ACC 202发送报文M3;如果否,则根据指示标识B避免使用备份路径转发报文M3。
具体的,AGG 205接收到报文M3之后,确认目的地址为AGG 205的地址,然后将报文M3中的Segments Left值减一变为0,使用Segment List[0]也就是ACC 202的IP地址A1:9::/96替换IPv6报文头中的目的地址。AGG 205根据目的地址中ACC 202的IP地址A1:9::/96确认是否能够匹配到转发表项15,如果能匹配上,则通过与ACC 202直连链路的出接口向ACC 202发送报文M3。并且,因为ACC 202的SID是PSP类型的End SID,所以在发送报文M3之前弹出报文M3的SRH头。在转发之前将IPv6报文头中的目的地址修改为ACC 202的IP地址。如果没匹配上,或者匹配上,但确认与ACC 202直连链路不可达,则AGG 205根据ACC 202的IP地址匹配到转发表项18。不管该转发表项18包括的出接口为null 0还是与AGG 204直连链路的出接口,AGG 205都不再使用表项18转发报文,而直接丢弃报文M3。或者,当AGG 205根据ACC 202的IP地址匹配到与汇聚路由A1::/84对应的出接口null 0,说明与汇聚路由A1::/84对应的主用转发路径不可达,所以即便存在与汇聚路由A1::/84对应的备用转发路径,例如AGG 205-RC 207-RC 206-AGG 204,也不用该备用转发路径转发报文,从而避免在AGG 205和AGG 204之间形成环路。
在一些实施例中,当AGG 205的SID的类型为最后一跳SRH段信息弹出(Ultimate Segment Pop of the SRH,UPS)类型,则AGG 205在发送报文M3之前不需要弹出SRH。
由于报文M3中携带有指示标识B,所以AGG 205能够在到达ACC 202的主用转发路径不可达时,不将报文M3返回AGG 204,从而避免出现浪费资源或网络拥塞的问题。
在一些实施例中,AGG 204和AGG 205之间没有直连链路的情况和上述AGG 204和AGG 205之间的直连链路故障的情况类似,此处不再赘述。在一些实施例中,如图16(b)所示,报文M3中可以不包括AGG 205的SID,从而减少SRH了的长度,能够减少报文转发时对网络资源的占用。
场景二:
参见图17和图18,该图17为在该图18所示的网络架构下的发送报文的方法的流程 图,该图18所示的网络架构与图3所示的网络架构相同。
该发送报文的方法包括如下步骤:
S701:AGG 304接收ACC 301通过在IGP域1泛洪发送的标签16001,根据ACC 301的标签16001确认到达ACC 301的主用转发路径,并生成转发表项20。
在本申请实施例中,AGG 304可以视为前文中的第一网络设备。
其中,参见表10,转发表项20包括ACC 301的标签16001和出接口,该出接口为AGG 304的与ACC 301直连链路的出接口。
表10
转发表项标识 标签 出接口
20 16001 与ACC 301直连链路的出接口
S702:AGG 305接收ACC 301通过在IGP域1泛洪发送的标签16001,根据ACC 301的标签16001确认到达ACC 301的主用转发路径,并生成转发表项21。
在本申请实施例中,AGG 305可以视为前文中的第二网络设备。其中,参见表11,转发表项21包括ACC 301的标签16001和出接口,该出接口为AGG 305的与ACC 301直连链路的出接口。
表11
转发表项标识 标签 出接口
21 16001 与ACC 301直连链路的出接口
S703:AGG 305在IGP域2发布报文M1,该报文M1中包括AGG 305的标签16202。
S704:AGG 304接收该报文M1,并从该报文M1中获得AGG 305的标签16202。
在本申请实施例中,标签16202不仅用于标识AGG 305,也具有图5所示实施例中指示标识A的指示功能,即标签16202能够指示AGG 305具有避免使用备用转发路径发送报文的能力。
S705:AGG 304根据该AGG 305的标签16202生成到达AGG 305的隧道。
由于接入设备与汇聚设备之间链路带宽要远远小于汇聚设备与区域核心设备之间的链路带宽,所以,汇聚设备可以生成到达接入设备的备用转发路径,该备用转发路径经过区域核心设备。
在本申请实施例中,AGG 304与AGG 305之间的隧道可以经过RC 306,也可以经过RC 307,即可以是AGG 304-RC 306-AGG 305的隧道1,也可以是AGG 304-RC 307-AGG 305的隧道2。
S706:AGG 304根据隧道的出接口生成转发表项22。
参见表12,转发表项22包括ACC 301的标签16001、AGG 305的标签16202和出接口,该出接口为隧道的出接口。
表12
转发表项标识 入标签 出标签 出接口
22 16001 16202 隧道的出接口
S707:AGG 304接收来自RC 306的报文M2,该报文M2中包括ACC 301的标签16001。
也就是说,报文M2需要到达ACC 301。即在本申请实施例中,ACC 301可以视为上文中的目的设备。
S708:AGG 304根据ACC 301的标签16001确认AGG 304到达ACC 301的主用转发路径不可达,则在报文M2中封装AGG 305的标签16202,得到报文M3。
具体的,虽然AGG 304根据ACC 301的标签16001匹配到转发表项20,但当AGG 304判断出到达ACC 301的主用转发路径(即到达ACC 301的直连链路,该直连链路可以视为上文中的第二转发路径)故障时,AGG 304采用备用转发路径发送报文M2。该备用转发路径为AGG 304到AGG 305的转发路径,可以视为上文中的第一转发路径。具体的,AGG 304根据ACC 301的标签16001匹配到转发表项22,获得隧道的出接口以及AGG 305的标签16202。进而,AGG 304在报文M2中封装AGG 305的标签16202,得到报文M3。AGG 305的标签16202可以被封装在报文M3中标签栈的栈顶。
可选的,在本申请实施例中,AGG 304可以在弹出报文M2的标签16001之后,再压标签16001和标签16202,得到报文M3。
S709:AGG 304根据隧道的出接口向AGG 305发送该报文M3。
S710:AGG 305接收报文M3,弹出AGG 305的标签16202,并根据报文M3中ACC 301的标签16001匹配转发表项21,并确认到达ACC 301的主用转发路径是否故障,如果没有故障,则向ACC 301发送该报文M3;如果确认到达ACC 301的主用转发路径故障,则根据AGG 305的标签16202的指示功能,避免使用备份路径转发报文M3的含义丢弃该报文M3。
可选的,AGG 305到达ACC 301的备用转发路径路径为AGG 305-AGG 304-ACC 301。
在本申请实施例中,AGG 305到达ACC 301的主用转发路径为AGG 305与ACC 301之间的直连链路。当主用转发路径故障,不管AGG 305上是否有与ACC 301的标签16001对应的备用转发路径的转发表项,AGG 305都丢弃报文M3,以免避免出现浪费资源或网络拥塞的问题。
场景三:
参见图19,该图为跨域网络架构示意图。在该图中,该网络架构包括IGP域的ACC 501、ACC 502、AGG 503、AGG 504、RC 505、RC 506,以及外部边界网关协议(External Border Gateway Protocol,EBGP)域的自治系统边界路由器(Autonomous System Boundary Router,ASBR)507、ASBR 508、运营商(Provider,P)设备509、P设备510、ASBR 511和ASBR 512。
其中,ACC 501、ACC 502、AGG 503和AGG 504属于IGP域1,AGG 503、AGG 504、RC 505和RC 506属于IGP域2,ASBR 507、ASBR 508、P设备509和P设备510属于EBGP域1,P设备509、P设备510、ASBR 511和ASBR 512属于EBGP域2。
AGG 503分别与RC 505分别与RC 505和RC 506连接,RC 506和ASBR 507连接,RC 506还与ASBR 508连接,ASBR 508还和ASBR 507连接。
RC 505接收来自ASBR 507的ASBR 511的路由信息,确定RC 505到达ASBR 511的主用转发路径的下一跳网络设备为ASBR 507,出接口为与ASBR 507直连链路的接口。此外,RC 505还可以接收来自RC 506的ASBR 511的路由信息,确定RC 505到达ASBR 511的备用转发路径的下一跳网络设备为AGG 503,出接口为与AGG 503直连链路的出接口。
当RC 505接收到来自AGG 503、目的设备为ASBR 511的报文之后,若到达ASBR 511的主用转发路径故障,或者ASBR 507故障,那么RC 505可以将该报文发送给AGG 503,由AGG 503将该报文发送给RC 506,以便RC 506能够将该报文通过ASBR 508发送到目的设备ASBR 511。
然而,如果按照传统方式,在RC 506和ASBR 508之间故障的情况下,RC 506将报文返回RC 505,从而形成环路,导致资源浪费和网络拥塞。
以图19所示的网络架构为例,参见图20,该图为在该网络架构下的发送报文的方法的流程图。
该发送报文的方法包括如下步骤:
S901:RC 505获取ASBR 511的IP地址A3::/48,根据该ASBR 511的IP地址A3::/48生成到达ASBR 511的主用转发路径的转发表项23。
在本申请实施例中,RC 505可以视为前文中的第一网络设备。
RC 505到达ASBR 511的主用转发路径的下一跳网络设备为ASBR 507。参见表13,转发表项23包括ASBR 511的IP地址A3::/48和出接口,该出接口为与ASBR 507直连链路的出接口。
表13
转发表项标识 目的地址 出接口
23 A3::/48 与ASBR 507直连链路的出接口
902:RC 506获取ASBR 511的IP地址A3::/48,根据该ASBR 511的IP地址A3::/48生成到达ASBR 511的主用转发路径的转发表项24。
在本申请实施例中,RC 506可以视为前文中的第二网络设备。
RC 506到达ASBR 511的主用转发路径的下一跳网络设备为ASBR 508。参见表14,转发表项24包括ASBR 511的IP地址A3::/48和出接口,该出接口为与ASBR 508直连链路的出接口。
表14
转发表项标识 目的地址 出接口
24 A3::/48 与ASBR 508直连链路的出接口
S903:RC 506向RC 505发送报文M1,报文M1中包括RC 506的SID,该SID可以为IP地址A1::1002:0:999。
该SID A1::1002:0:999既用于作为RC 506的IP地址以标识RC 506,又可以如5所示实施例中指示标识B用于指示RC 506具有支持避免使用备用转发路径转发报文的能力的指示功能。
S904:RC 505接收报文M1,根据RC 505的IP地址生成到达RC 506的隧道,得到隧 道的出接口。
该隧道经过的网络设备可以为RC 505-AGG 503-RC 506,该隧道可以视为上文中的第一转发路径。
S905:RC 505生成转发表项25。
参见表15,转发表项25包括ASBR 511的IP地址、RC 506的IP地址和出接口。
表15
转发表项标识 目的地址 repair list 出接口
25 A3::/48 A1::1002:0:999 隧道的出接口
S906:RC 505接收来自AGG 503的报文M2,该报文M2中包括ASBR 511的IP地址。
在本申请实施例中,ASBR 511可以视为上文中的目的设备。
S907:RC 505根据ASBR 511的IP地址确认到达ASBR 511的主用转发路径(即与ASBR 507直连链路的出接口)故障(例如匹配不到转发表项23),进而RC 505根据ASBR511的IP地址匹配到转发表项25,得到RC 506的IP地址A1::1002:0:999和隧道的出接口的标识。
如果到达ASBR 511的主用转发路径没有故障,那么RC 505可以向ASBR 507发送报文M2,以便ASBR 507通过P设备509将报文M2发送给ASBR 511。
S908:RC 505在报文M2中添加指示标识B,得到报文M3,该指示标识B为A1::1002:0:999。
在本申请实施例中,指示标识B的值和指示标识A的值是相同的。且指示标识B不仅用于标识RC 506的IP地址,还用于指示RC 506避免使用备用路径向ASBR 511发送报文M3。
报文M3中包括IPv6报文头和SRH,该IPv6报文头包括目的地址,即RC 506的IP地址A1::1002:0:999,SRH中包括ASBR 511的IP地址A3::/48和RC 506的SID A1::1002:0:999。
S909:RC 505向RC 506发送报文M3。
S910:RC 506接收报文M3,并根据报文M3中ASBR 511的IP地址A3::/48匹配转发表项24,该转发表项24对应于到达ASBR 511的主用转发路径。如果匹配的到,则通过该主用转发路径发送报文M3;如果匹配不到,则即便RC 506具有到达ASBR 511的备用转发路径,也丢弃该报文M3。
具体的,RC 506在接收到报文M3之后,将M3报文头中的目的地址替换为ASBR 511的IP地址A3::/48,并根据该ASBR 511的IP地址A3::/48匹配转发表项24。
其中,RC 506到达ASBR 511的主用转发路径为RC 506-ASBR 508-ASBR 510-P设备509-ASBR 511。RC 506到达ASBR 511的备用转发路径例如可以是RC 506-RC 505-ASBR 507-P设备509-ASBR 511。
需要说明的是,上述三个应用场景中对指示标识A和指示标识B的描述并不构成对本申请技术方案的限定,本领域技术人员可以根据图5所示实施例中记载进行设计。
图21示出了上述实施例中所涉及的网络设备的一种可能的结构示意图,该网络设备2100可以实现图5所示实例中第一网络设备的功能,或者,该网络设备2100可以实现图15所示实施例中AGG 204、图17所示实施例中AGG 304或图20所示实施例中RC 505的功能。参阅图21,该网络设备2100包括:处理单元2101和发送单元2102。这些单元可以执行上述方法示例中第一网络设备的相应功能。处理单元2101,用于支持网络设备2100执行图5中S503-S505;发送单元2102,用于支持网络设备2100执行图5中的S506;和/或本文所描述的技术中第一网络设备执行的其它过程。例如,处理单元2101,用于执行上述方法实施例中第一网络设备执行的各种处理操作;发送单元2102,用于执行上述方法实施例中第一网络设备发送报文的操作。举例来说,处理单元2101,用于获得去往目的设备的第一报文,并在所述第一报文中添加第一指示标识生成第二报文,所述第一指示标识用于指示第二网络设备避免使用从所述第二网络设备到所述目的设备的备用转发路径向所述目的设备发送所述第二报文;发送单元2102,用于通过第一转发路径向所述第二网络设备发送所述第二报文。具体执行过程请参考上述图5或图15或图17或图20所示实施例中相应步骤的详细描述,这里不再一一赘述。
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。例如,上述实施例中,处理单元和发送单元可以是同一个单元,也不同的单元。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
图22示出了上述实施例中所涉及的网络设备的一种可能的结构示意图,该网络设备2200可以实现图5所示实例中第二网络设备的功能,或者,该网络设备2200可以实现图15所示实施例中AGG 205、图17所示实施例中AGG 305或图20所示实施例中RC 506的功能。参阅图22,该网络设备2200包括:接收单元2201和处理单元2202。这些单元可以执行上述方法示例中第二网络设备的相应功能。接收单元2201,用于支持网络设备2200执行图5中的S507。处理单元2202,用于支持网络设备2200执行图5中的S508和S509。例如,接收单元2201,用于执行上述方法实施例中第二网络设备执行的报文的接收步骤,处理单元2203,用于执行上述方法实施例中第二网络设备执行的各种报文的处理步骤。举例来说,接收单元2201,用于接收去往目的设备的第一报文,所述第一报文来自第一网络设备,所述第一报文包括第一指示标识;处理单元2202,用于确定从所述第二网络设备到所述目的设备的主用转发路径不可达;响应于确定所述主用转发路径不可达,根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文,所述备用转发路径为从所述第二网络设备到所述目的设备的路径。具体执行过程请参考上述图5或图15或图17或图20所示实施例中相应步骤的详细描述,这里不再一一赘述。
参阅图23所示,发明实施例提供了一种报文处理的系统2300,该系统2300用于实现 前述方法实施例中的报文处理的方法。该系统2300包括网络设备2301和网络设备2302。网络设备2301可以实现图5所示的实施例中的第一网络设备或图21中的网络设备2100的功能,网络设备2302可以实现图5所示的实施例中第二网络设备或图22中的网络设备2200的功能。网络设备2301还可以实现图15所示实施例中AGG 204、图17所示实施例中AGG 304或图20所示实施例中RC 505的功能,网络设备2301还可以实现图15所示实施例中AGG 205、图17所示实施例中AGG 305或图20所示实施例中RC 506的功能。具体执行过程请参考上述图5或图15或图17或图20所示实施例中相应步骤的详细描述,这里不再一一赘述。
图24是本申请实施例提供的一种设备2400的结构示意图。图21中的网络设备2100和图22中的网络设备2200可以通过图24所示的设备来实现。参见图24,该设备2400包括至少一个处理器2401,通信总线2402以及至少一个网络接口2404,可选地,该设备2400还可以包括存储器2403。
处理器2401可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路(integrated circuit,IC)。处理器可以用于对报文进行处理,以实现本申请实施例中提供的发送报文的方法。
比如,当图5中的第一网络设备通过图24所示的设备来实现时,该处理器可以用于获得去往目的设备的第一报文,并在所述第一报文中添加第一指示标识生成第二报文,所述第一指示标识用于指示第二网络设备避免使用从所述第二网络设备到所述目的设备的备用转发路径向所述目的设备发送所述第二报文,具体功能实现可参考方法实施例中对应第一网络设备的处理部分。又比如,当图5中的第二网络设备通过图24所示的设备来实现时,该处理器可以用于确定从所述第二网络设备到所述目的设备的主用转发路径不可达;响应于确定所述主用转发路径不可达,根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文,所述备用转发路径为从所述第二网络设备到所述目的设备的路径,具体功能实现可参考方法实施例中第二网络设备的处理部分。
通信总线2402用于在处理器2401、网络接口2404和存储器2403之间传送信息。
存储器2403可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,存储器2403还可以是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器2403可以是独立存在,通过通信总线2402与处理器2401相连接。存储器2403也可以和处理器2401集成在一起。
可选地,存储器2403用于存储执行本申请方案的程序代码或指令,并由处理器2401来控制执行。处理器2401用于执行存储器2403中存储的程序代码或指令。程序代码中可 以包括一个或多个软件模块。可选地,处理器2401也可以存储执行本申请方案的程序代码或指令,在这种情况下处理器2401不需要到存储器2403中读取程序代码或指令。
网络接口2404可以为收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(RAN)或无线局域网(wireless local area networks,WLAN)等。在本申请实施例中,网络接口2404可以用于接收分段路由网络中的其他节点发送的报文,也可以向分段路由网络中的其他节点发送报文。网络接口2404可以为以太接口(ethernet)接口、快速以太(fast ethernet,FE)接口或千兆以太(gigabit ethernet,GE)接口等。
在具体实现中,作为一种实施例,设备2400可以包括多个处理器,例如图24中所示的处理器2401和处理器405。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
图25是本申请实施例提供的一种设备2500的结构示意图。图5中的第一网络设备和第二网络设备可以通过图25所示的设备来实现。参见图25所示的设备结构示意图,设备2500包括主控板和一个或多个接口板。主控板与接口板通信连接。主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板包括CPU和存储器,主控板负责对设备2500中各个组件的控制和管理,包括路由计算、设备管理和维护功能。接口板也称为线处理单元(line processing unit,LPU)或线卡(line card),用于接收和发送报文。在一些实施例中,主控板与接口板之间或接口板与接口板之间通过总线通信。在一些实施例中,接口板之间通过交换网板通信,在这种情况下设备2500也包括交换网板,交换网板与主控板、接口板通信连接,交换网板用于转发接口板之间的数据,交换网板也可以称为交换网板单元(switch fabric unit,SFU)。接口板包括CPU、存储器、转发引擎和接口卡(interface card,IC),其中接口卡可以包括一个或多个网络接口。网络接口可以为Ethernet接口、FE接口或GE接口等。CPU与存储器、转发引擎和接口卡分别通信连接。存储器用于存储转发表。转发引擎用于基于存储器中保存的转发表转发接收到的报文,如果接收到的报文的目的地址为设备2500的IP地址,则将该报文发送给主控板或接口板的CPU进行处理;如果接收到的报文的目的地址不是设备2500的IP地址,则根据该目的地查转发表,如果从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。转发引擎可以是网络处理器(network processor,NP)。接口卡也称为子卡,可安装在接口板上,负责将光电信号转换为数据帧,并对数据帧进行合法性检查后转发给转发引擎处理或接口板CPU。在一些实施例中,CPU也可执行转发引擎的功能,比如基于通用CPU实现软转发,从而接口板中不需要转发引擎。在一些实施例中,转发引擎可以通过ASIC或现场可编程门阵列(field programmable gate array,FPGA)实现。在一些实施例中,存储转发表的存储器也可以集成到转发引擎中,作为转发引擎的一部分。
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述 存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述图5所示实施例中第一网络设备或第二网络设备的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是FPGA,可以是ASIC,还可以是系统芯片(system on chip,SoC),还可以是CPU,还可以是NP,还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行前述实施例中的方法。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包括,例如,包括了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请中“至少一项(个)”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。本申请中认为“A和/或B”包括单独A,单独B,和A+B。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑模块划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间 接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要获取其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各模块单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件模块单元的形式实现。
所述集成的单元如果以软件模块单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (52)

  1. 一种发送报文的方法,其特征在于,包括:
    第一网络设备获得去往目的设备的第一报文;
    所述第一网络设备在所述第一报文中添加第一指示标识生成第二报文,所述第一指示标识用于指示第二网络设备避免使用从所述第二网络设备到所述目的设备的备用转发路径向所述目的设备发送所述第二报文;
    所述第一网络设备通过第一转发路径向所述第二网络设备发送所述第二报文。
  2. 根据权利要求1所述的方法,其特征在于,所述第一转发路径为从所述第一网络设备到所述目的设备的备用转发路径,在所述第一网络设备通过第一转发路径向所述第二网络设备发送所述第二报文之前,所述方法还包括:
    所述第一网络设备确定到达所述目的设备的第二转发路径不可达,所述第二转发路径为从所述第一网络设备到所述目的设备的主用转发路径。
  3. 根据权利要求2所述的方法,其特征在于,所述第一报文包含所述目的设备的互联网协议IP地址,所述第一转发路径为从所述第一网络设备到所述目的设备的汇聚路由对应的转发路径,所述第二转发路径为从所述第一网络设备到所述目的设备的明细路由对应的转发路径,所述第一网络设备确定到所述目的设备的第二转发路径不可达包括:
    所述第一网络设备根据所述目的设备的IP地址未匹配到到达所述目的设备的明细路由,或者,
    所述第一网络设备根据所述目的设备的IP地址匹配到到达所述目的设备的明细路由,并确定所述明细路由对应的转发路径不可达。
  4. 根据权利要求1-3任一权利要求所述的方法,其特征在于,所述第一网络设备在所述第一报文中添加第一指示标识生成第二报文包括:
    所述第一网络设备在所述第一报文中添加段路由头SRH生成所述第二报文,所述第一指示标识携带在所述SRH中。
  5. 根据权利要求4所述的方法,其特征在于,所述第一指示标识携带在所述SRH的标志Flags字段或标记TAG字段或类型长度值TLV中。
  6. 根据权利要求4所述的方法,其特征在于,所述SRH包括段标识列表,所述段标识列表包括所述第一指示标识。
  7. 根据权利要求6所述的方法,其特征在于,所述段标识列表包含所述第二网络设备的段标识,所述第二网络设备的段标识的locator部分包括所述第一指示标识,或者所述第二网络设备的段标识的function部分包括所述第一指示标识。
  8. 根据权利要求2所述的方法,其特征在于,所述第一报文包含所述目的设备的标签,所述第一转发路径为对应所述目的设备的标签的标签转发表项中的备用转发信息对应的转发路径,所述第一网络设备确定到达所述目的设备的第二转发路径不可达包括:
    所述第一网络设备根据所述目的设备的标签匹配到所述标签转发表项,并确定所述标签转发表项中的主用转发信息对应的转发路径不可达。
  9. 根据权利要求1或2或8所述的方法,其特征在于,所述第一网络设备在所述第一 报文中添加第一指示标识生成第二报文包括:
    所述第一网络设备在所述第一报文中添加标签栈生成第二报文,所述标签栈包括所述第一指示标识。
  10. 根据权利要求9所述的方法,其特征在于,所述标签栈包括所述第二网络设备的标签、特殊标签和所述目的设备的标签,所述第二网络设备的标签与所述特殊标签相邻,所述特殊标签包括所述第一指示标识;或者,
    所述标签栈包括所述第二网络设备的标签和所述目的设备的标签,所述第二网络设备的标签包括所述第一指示标识。
  11. 根据权利要求1至10任一权利要求所述的方法,其特征在于,在所述第一网络设备通过第一转发路径向所述第二网络设备发送所述第二报文之前,所述方法还包括:
    所述第一网络设备接收来自所述第二网络设备的第三报文,所述第三报文包括所述第二网络设备的标识和第二指示标识,所述第二指示标识用于标识所述第二网络设备支持避免使用备用路径转发报文的能力;
    所述第一网络设备根据所述第二指示标识生成对应所述第一转发路径的转发表项,所述对应所述第一转发路径的转发表项包括所述目的设备的标识和对应所述第一转发路径的转发信息,所述转发信息包括标签栈或段标识列表,所述标签栈或段标识列表包括所述第二网络设备的标识,所述第二网络设备的标识包括所述第二网络设备的段标识或所述第二网络设备的标签。
  12. 根据权利要求11所述的方法,其特征在于,所述第三报文包括有端节点段标识类型长度值End SID TLV字段,所述End SID TLV中包括有所述第二指示标识。
  13. 根据权利要求11所述的方法,其特征在于,所述第三报文包括有前缀段标识类型长度值prefix SID TLV字段,所述prefix SID TLV字段包括有所述第二指示标识。
  14. 根据权利要求1至13任一权利要求所述的方法,其特征在于,所述备用转发路径经过所述第一网络设备。
  15. 根据权利要求1至14任一权利要求所述的方法,其特征在于,所述第一报文来自第三网络设备,所述第三网络设备属于第一网络域,所述目的设备属于第二网络域。
  16. 根据权利要求1至15任一权利要求所述的方法,其特征在于,所述第一网络域为骨干网的区域,所述第二网络域为接入网的区域,所述第一网络设备为连接所述接入网和所述骨干网的网络设备,所述第一转发路径为所述骨干网中的转发路径。
  17. 一种发送报文的方法,其特征在于,包括:
    第二网络设备接收去往目的设备的第一报文,所述第一报文来自第一网络设备,所述第一报文包括第一指示标识;
    所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达;
    响应于确定所述主用转发路径不可达,所述第二网络设备根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文,所述备用转发路径为从所述第二网络设备到所述目的设备的路径。
  18. 根据权利要求17所述的方法,其特征在于,所述第一报文包含所述目的设备的互 联网协议IP地址,所述主用转发路径为从所述第二网络设备到所述目的设备的汇聚路由的主用转发路径,所述备用转发路径为所述汇聚路由的备用转发路径,所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达包括:
    所述第二网络设备根据所述目的设备的IP地址匹配到所述汇聚路由,并确定所述汇聚路由的主用转发路径不可达。
  19. 根据权利要求17所述的方法,其特征在于,所述第一报文包括所述目的设备的IP地址,所述主用转发路径为从所述第二网络设备到所述目的设备的明细路由对应的转发路径,所述备用转发路径为从所述第二网络设备到所述目的设备的汇聚路由对应的转发路径,所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达包括:
    所述第二网络设备根据所述目的设备的IP地址未匹配到所述明细路由,或者,
    所述第二网络设备根据所述目的设备的IP地址匹配到所述明细路由,并确定所述明细路由对应的转发路径不可达。
  20. 根据权利要求17至19任一权利要求所述的方法,其特征在于,所述第一报文为基于互联网第六版的段路由SRv6报文,所述SRv6报文的段路由头SRH包括所述第一指示标识。
  21. 根据权利要求20所述的方法,其特征在于,所述SRH包括段标识列表,所述段标识列表包括所述第一指示标识。
  22. 根据权利要求20或21所述的方法,其特征在于,在所述第二网络设备确定到所述目的设备的主用转发路径不可达之前,所述方法还包括:
    所述第二网络设备确定所述SRv6报文的目的地址为所述第二网络设备的IP地址,所述第二网络设备从所述SRv6报文的段标识列表中获得所述目的设备的标识,
    所述第二网络设备将所述SRv6报文的目的地址修改为所述目的设备的标识;
    所述第二网络设备确定到所述目的设备的主用转发路径不可达包括:
    所述第二网络设备根据所述SRv6报文的目的地址确定到所述目的设备的主用转发路径不可达。
  23. 根据权利要求17所述的方法,其特征在于,所述第一报文为多协议标签交换MPLS报文,所述第一报文的标签栈包括所述第一指示标识。
  24. 根据权利要求23所述的方法,其特征在于,所述第一报文包括所述目的设备的标签,所述标签栈包括所述第二网络设备的标签、特殊标签和所述目的设备的标签,所述特殊标签包括所述第一指示标识;或者,
    所述标签栈包括所述第二网络设备的标签和所述目的设备的标签,所述第二网络设备的标签包括所述第一指示标识。
  25. 根据权利要求23或24所述的方法,其特征在于,所述第二网络设备确定从所述第二网络设备到所述目的设备的主用转发路径不可达包括:
    所述第二网络设备确定所述标签栈的栈顶标签为所述第二网络设备的标签;
    响应于确定所述标签栈的栈顶标签为所述第二网络设备的标签,根据所述目的设备的标签匹配到到达所述目的设备的标签转发表,并确定所述标签转发表中的主用转发信息对 应的所述主用转发路径不可达。
  26. 根据权利要求24所述的方法,其特征在于,所述第二网络设备根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文包括:
    所述第二网络设备确定所述标签栈中所述第二网络设备的标签的下一层标签为所述特殊标签;
    响应于确定所述标签栈中所述第二网络设备的标签的下一层标签为所述特殊标签,避免使用所述标签转发表中备用转发信息对应的所述备用转发路径向所述目的设备发送所述第一报文。
  27. 根据权利要求17至26任一权利要求所述的方法,其特征在于,所述备用转发路径经过所述第一网络设备。
  28. 根据权利要求17至27任一权利要求所述的方法,其特征在于,所述方法还包括:
    所述第二网络设备向所述第一网络设备发送第二报文,所述第二报文包括所述第二网络设备的标识和第二指示标识,所述第二指示标识用于指示所述第二网络设备支持避免使用备用路径转发报文的能力,所述第二网络设备的标识包括所述第二网络设备的IP地址或所述第二网络设备的标签。
  29. 根据权利要求17至28任一权利要求所述的方法,其特征在于,在所述第二网络设备根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文之后,所述方法还包括:
    所述第二网络设备丢弃所述第一报文。
  30. 一种网络设备,其特征在于,应用于包括多个网络设备的网络系统,所述多个网络设备包括第一网络设备和第二网络设备,所述网络设备为所述第一网络设备,所述网络设备包括:
    处理单元,用于获得去往目的设备的第一报文,并在所述第一报文中添加第一指示标识生成第二报文,所述第一指示标识用于指示第二网络设备避免使用从所述第二网络设备到所述目的设备的备用转发路径向所述目的设备发送所述第二报文;
    发送单元,用于通过第一转发路径向所述第二网络设备发送所述第二报文。
  31. 根据权利要求30所述的网络设备,其特征在于,所述第一转发路径为从所述第一网络设备到所述目的设备的备用转发路径;
    所述处理单元,还用于在所述第一网络设备通过第一转发路径向所述第二网络设备发送所述第二报文之前,确定到达所述目的设备的第二转发路径不可达,所述第二转发路径为从所述第一网络设备到所述目的设备的主用转发路径。
  32. 根据权利要求31所述的网络设备,其特征在于,所述第一报文包含所述目的设备的互联网协议IP地址,所述第一转发路径为从所述第一网络设备到所述目的设备的汇聚路由对应的转发路径,所述第二转发路径为从所述第一网络设备到所述目的设备的明细路由对应的转发路径,所述处理单元确定到所述目的设备的第二转发路径不可达包括;
    所述处理单元根据所述目的设备的IP地址未匹配到到达所述目的设备的明细路由,或者,根据所述目的设备的IP地址匹配到到达所述目的设备的明细路由,并确定所述明细路 由对应的转发路径不可达。
  33. 根据权利要求30-32任一权利要求所述的网络设备,其特征在于,
    所述处理单元,用于在所述第一报文中添加段路由头SRH生成所述第二报文,所述第一指示标识携带在所述SRH中。
  34. 根据权利要求33所述的网络设备,其特征在于,所述第一指示标识携带在所述SRH的标志Flags字段或标记TAG字段或类型长度值TLV中。
  35. 根据权利要求33所述的网络设备,其特征在于,所述SRH包括段标识列表,所述段标识列表包括所述第一指示标识。
  36. 根据权利要求31所述的网络设备,其特征在于,所述第一报文包含所述目的设备的标签,所述第一转发路径为对应所述目的设备的标签的标签转发表项中的备用转发信息对应的转发路径,所述处理单元确定到达所述目的设备的第二转发路径不可达包括;
    所述处理单元根据所述目的设备的标签匹配到所述标签转发表项,并确定所述标签转发表项中的主用转发信息对应的转发路径不可达。
  37. 根据权利要求30或31或36所述的网络设备,其特征在于,
    所述处理单元,用于在所述第一报文中添加标签栈生成第二报文,所述标签栈包括所述第一指示标识。
  38. 根据权利要求37所述的网络设备,其特征在于,所述标签栈包括所述第二网络设备的标签、特殊标签和所述目的设备的标签,所述第二网络设备的标签与所述特殊标签相邻,所述特殊标签包括所述第一指示标识;或者,
    所述标签栈包括所述第二网络设备的标签和所述目的设备的标签,所述第二网络设备的标签包括所述第一指示标识。
  39. 根据权利要求30至38任一权利要求所述的网络设备,其特征在于,所述网络设备还包括:
    接收单元,用于在所述发送单元通过第一转发路径向所述第二网络设备发送所述第二报文之前,接收来自所述第二网络设备的第三报文,所述第三报文包括所述第二网络设备的标识和第二指示标识,所述第二指示标识用于标识所述第二网络设备支持避免使用备用路径转发报文的能力;
    所述处理单元,用于根据所述第二指示标识生成对应所述第一转发路径的转发表项,所述对应所述第一转发路径的转发表项包括所述目的设备的标识和对应所述第一转发路径的转发信息,所述转发信息包括标签栈或段标识列表,所述标签栈或段标识列表包括所述第二网络设备的标识,所述第二网络设备的标识包括所述第二网络设备的段标识或所述第二网络设备的标签。
  40. 一种网络设备,其特征在于,应用于包括多个网络设备的网络系统,所述多个网络设备包括第一网络设备和第二网络设备,所述网络设备为所述第二网络设备,所述网络设备包括:
    接收单元,用于接收去往目的设备的第一报文,所述第一报文来自第一网络设备,所述第一报文包括第一指示标识;
    处理单元,用于确定从所述第二网络设备到所述目的设备的主用转发路径不可达,响应于确定所述主用转发路径不可达,根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文,所述备用转发路径为从所述第二网络设备到所述目的设备的路径。
  41. 根据权利要求40所述的网络设备,其特征在于,所述第一报文包含所述目的设备的互联网协议IP地址,所述主用转发路径为从所述第二网络设备到所述目的设备的汇聚路由的主用转发路径,所述备用转发路径为所述汇聚路由的备用转发路径,所述处理单元确定从所述第二网络设备到所述目的设备的主用转发路径不可达包括;
    所述处理单元根据所述目的设备的IP地址匹配到所述汇聚路由,并确定所述汇聚路由的主用转发路径不可达。
  42. 根据权利要求40所述的网络设备,其特征在于,所述第一报文包括所述目的设备的IP地址,所述主用转发路径为从所述第二网络设备到所述目的设备的明细路由对应的转发路径,所述备用转发路径为从所述第二网络设备到所述目的设备的汇聚路由对应的转发路径,所述处理单元确定从所述第二网络设备到所述目的设备的主用转发路径不可达包括;
    所述处理单元根据所述目的设备的IP地址未匹配到所述明细路由,或者,根据所述目的设备的IP地址匹配到所述明细路由,并确定所述明细路由对应的转发路径不可达。
  43. 根据权利要求40至42任一权利要求所述的网络设备,其特征在于,所述第一报文为基于互联网第六版的段路由SRv6报文,所述SRv6报文的段路由头SRH包括所述第一指示标识。
  44. 根据权利要求43所述的网络设备,其特征在于,
    所述处理单元,用于在所述处理单元确定到所述目的设备的主用转发路径不可达之前,确定所述SRv6报文的目的地址为所述第二网络设备的IP地址,所述第二网络设备从所述SRv6报文的段标识列表中获得所述目的设备的标识,将所述SRv6报文的目的地址修改为所述目的设备的标识,根据所述SRv6报文的目的地址确定到所述目的设备的主用转发路径不可达。
  45. 根据权利要求40所述的网络设备,其特征在于,所述第一报文为多协议标签交换MPLS报文,所述第一报文的标签栈包括所述第一指示标识。
  46. 根据权利要求45所述的网络设备,其特征在于,所述第一报文包括所述目的设备的标签,所述标签栈包括所述第二网络设备的标签、特殊标签和所述目的设备的标签,所述特殊标签包括所述第一指示标识;或者,
    所述标签栈包括所述第二网络设备的标签和所述目的设备的标签,所述第二网络设备的标签包括所述第一指示标识。
  47. 根据权利要求45或46所述的网络设备,其特征在于,
    所述处理单元,用于确定所述标签栈的栈顶标签为所述第二网络设备的标签;响应于确定所述标签栈的栈顶标签为所述第二网络设备的标签,根据所述目的设备的标签匹配到到达所述目的设备的标签转发表,并确定所述标签转发表中的主用转发信息对应的所述主用转发路径不可达。
  48. 根据权利要求46所述的网络设备,其特征在于,
    所述处理单元,用于确定所述标签栈中所述第二网络设备的标签的下一层标签为所述特殊标签;响应于确定所述标签栈中所述第二网络设备的标签的下一层标签为所述特殊标签,避免使用所述标签转发表中备用转发信息对应的所述备用转发路径向所述目的设备发送所述第一报文。
  49. 根据权利要求40至48任一权利要求所述的网络设备,其特征在于,
    所述处理单元,用于在根据所述第一指示标识的指示避免使用备用转发路径向所述目的设备发送所述第一报文之后,丢弃所述第一报文。
  50. 一种网络系统,其特征在于,所述网络系统包括如权利要求30-39任一项所述的第一网络设备和如权利要求40-49任一项所述的第二网络设备。
  51. 一种计算机可读存储介质,其特征在于,包括指令、程序或代码,当其在计算机上执行时,使得所述计算机执行如权利要求1至29任一权利要求所述的方法。
  52. 一种芯片,其特征在于,包括存储器和处理器,存储器用于存储指令或程序代码,处理器用于从存储器中调用并运行该指令或程序代码,以执行如权利要求1至29任一权利要求所述的方法。
PCT/CN2020/117006 2020-02-21 2020-09-23 一种发送报文的方法、设备及系统 WO2021164249A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
EP20919638.5A EP4102783A4 (en) 2020-02-21 2020-09-23 METHOD, DEVICE AND MESSAGE SENDING SYSTEM
MX2022010289A MX2022010289A (es) 2020-02-21 2020-09-23 Método, dispositivo y sistema de envío de paquetes.
BR112022016471A BR112022016471A2 (pt) 2020-02-21 2020-09-23 Método de envio de pacote, dispositivo de rede, sistema, mídia de armazenamento legível por computador, e chip
KR1020227032781A KR20220141884A (ko) 2020-02-21 2020-09-23 패킷 송신 방법, 디바이스 및 시스템
JP2022550215A JP7479489B2 (ja) 2020-02-21 2020-09-23 パケット送信方法、デバイス、およびシステム
US17/890,710 US20230095244A1 (en) 2020-02-21 2022-08-18 Packet sending method, device, and system

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
CN202010106211 2020-02-21
CN202010106211.9 2020-02-21
CN202010295809 2020-04-15
CN202010295809.7 2020-04-15
CN202010478986.9A CN113300951B (zh) 2020-02-21 2020-05-29 一种发送报文的方法、设备及系统
CN202010478986.9 2020-05-29
CN202010711897.4A CN113300954A (zh) 2020-02-21 2020-07-22 生成转发表项的方法、发送报文的方法、网络设备及系统
CN202010711897.4 2020-07-22

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/890,710 Continuation US20230095244A1 (en) 2020-02-21 2022-08-18 Packet sending method, device, and system

Publications (1)

Publication Number Publication Date
WO2021164249A1 true WO2021164249A1 (zh) 2021-08-26

Family

ID=77318018

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2020/117006 WO2021164249A1 (zh) 2020-02-21 2020-09-23 一种发送报文的方法、设备及系统
PCT/CN2020/118633 WO2021164258A1 (zh) 2020-02-21 2020-09-29 生成转发表项的方法、发送报文的方法、网络设备及系统

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/118633 WO2021164258A1 (zh) 2020-02-21 2020-09-29 生成转发表项的方法、发送报文的方法、网络设备及系统

Country Status (8)

Country Link
US (2) US20220407801A1 (zh)
EP (2) EP4102783A4 (zh)
JP (2) JP7479489B2 (zh)
KR (2) KR20220141884A (zh)
CN (5) CN113300951B (zh)
BR (2) BR112022016471A2 (zh)
MX (2) MX2022010289A (zh)
WO (2) WO2021164249A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992567A (zh) * 2021-10-26 2022-01-28 新华三信息安全技术有限公司 一种报文转发方法及装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115811493A (zh) * 2021-09-14 2023-03-17 华为技术有限公司 一种信息传输方法以及相关设备
CN116074243A (zh) * 2021-11-03 2023-05-05 华为技术有限公司 一种报文传输方法、装置及设备
WO2023116226A1 (zh) * 2021-12-23 2023-06-29 华为技术有限公司 一种路由通告的方法及相关设备
CN114696890B (zh) * 2022-03-30 2023-06-20 中国联合网络通信集团有限公司 承载网络及其中断处理方法、设备、存储介质
CN117640484A (zh) * 2022-08-09 2024-03-01 华为技术有限公司 一种路由信息传输方法及装置
CN115426217A (zh) * 2022-09-30 2022-12-02 上海地面通信息网络股份有限公司 一种基于vxlan的互联网接入控制系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090245259A1 (en) * 2004-12-10 2009-10-01 Cisco Technology, Inc. Fast reroute (frr) protection at the edge of a rfc 2547 network
CN101599898A (zh) * 2009-07-01 2009-12-09 北京邮电大学 多链路故障环境下采用lfa方式的路由器避免环路的方法
WO2016050031A1 (zh) * 2014-09-29 2016-04-07 中兴通讯股份有限公司 一种以太网传输路径的切换方法、装置及以太网系统
CN108390828A (zh) * 2018-01-17 2018-08-10 新华三技术有限公司 报文转发方法及装置
CN110113259A (zh) * 2019-04-26 2019-08-09 新华三技术有限公司 路径状态通知方法、路径切换方法、转发设备及系统

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7852772B2 (en) * 2005-10-20 2010-12-14 Cisco Technology, Inc. Method of implementing a backup path in an autonomous system
CN102185749B (zh) * 2011-06-07 2014-12-10 北京交通大学 采用树形拓扑关系避免路由环路的方法
CN104158749A (zh) * 2013-05-14 2014-11-19 华为技术有限公司 软件定义网络中报文转发方法、网络设备及软件定义网络
CN104426771A (zh) * 2013-09-09 2015-03-18 华为技术有限公司 一种报文转发的方法及装置
CN104579942B (zh) * 2013-10-17 2019-04-16 中兴通讯股份有限公司 网络报文的转发方法及装置
CN105450437B (zh) * 2014-09-19 2020-03-06 中兴通讯股份有限公司 一种分配sid的方法和sr节点
JP2016092756A (ja) 2014-11-11 2016-05-23 日本電気株式会社 制御装置、通信システム、ループ抑止方法及びプログラム
US10063463B2 (en) * 2014-12-16 2018-08-28 Cisco Technology, Inc. Node protection for segment routing adjacency segments
CN106559324A (zh) * 2015-09-24 2017-04-05 华为技术有限公司 一种基于等价多路径转发报文的方法及网络设备
CN107872332B (zh) * 2016-09-23 2020-12-22 华为技术有限公司 一种报文转发路径的探测方法及相关装置
US10742599B2 (en) * 2017-06-30 2020-08-11 Juniper Networks, Inc. Conflict resolution in segment routing
CN113839871A (zh) * 2017-09-25 2021-12-24 华为技术有限公司 一种报文转发的方法及网络设备
CN107864091B (zh) * 2017-10-31 2020-04-03 新华三技术有限公司 链路故障的处理方法及装置
CN108111432B (zh) * 2017-12-27 2021-07-02 新华三技术有限公司 报文转发方法及装置
CN110324165B (zh) * 2018-03-30 2021-05-11 华为技术有限公司 网络设备的管理方法、装置及系统
CN112491701A (zh) * 2018-04-13 2021-03-12 华为技术有限公司 转发报文方法和装置
CN110677345B (zh) * 2018-07-02 2021-12-17 华为技术有限公司 一种用户报文传输方法及通信设备
CN113055295A (zh) 2018-08-01 2021-06-29 华为技术有限公司 通信方法、通信设备和通信系统
CN109981458B (zh) * 2019-03-08 2022-07-26 华为技术有限公司 一种确定报文转发路径的方法、网络节点及系统
CN110535782B (zh) * 2019-06-15 2023-06-20 华为技术有限公司 一种实现QoS保障的报文处理方法、设备和系统
CN110752993B (zh) * 2019-10-24 2022-02-25 新华三信息安全技术有限公司 一种报文转发方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090245259A1 (en) * 2004-12-10 2009-10-01 Cisco Technology, Inc. Fast reroute (frr) protection at the edge of a rfc 2547 network
CN101599898A (zh) * 2009-07-01 2009-12-09 北京邮电大学 多链路故障环境下采用lfa方式的路由器避免环路的方法
WO2016050031A1 (zh) * 2014-09-29 2016-04-07 中兴通讯股份有限公司 一种以太网传输路径的切换方法、装置及以太网系统
CN108390828A (zh) * 2018-01-17 2018-08-10 新华三技术有限公司 报文转发方法及装置
CN110113259A (zh) * 2019-04-26 2019-08-09 新华三技术有限公司 路径状态通知方法、路径切换方法、转发设备及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992567A (zh) * 2021-10-26 2022-01-28 新华三信息安全技术有限公司 一种报文转发方法及装置

Also Published As

Publication number Publication date
JP2023514630A (ja) 2023-04-06
CN117640489A (zh) 2024-03-01
JP7479489B2 (ja) 2024-05-08
KR20220141884A (ko) 2022-10-20
CN113300951A (zh) 2021-08-24
US20220407801A1 (en) 2022-12-22
EP4102783A4 (en) 2023-08-02
BR112022016476A2 (pt) 2022-10-04
KR20220143902A (ko) 2022-10-25
EP4096172A1 (en) 2022-11-30
CN115552861B (zh) 2024-03-15
US20230095244A1 (en) 2023-03-30
BR112022016471A2 (pt) 2022-10-04
CN113300954A (zh) 2021-08-24
EP4102783A1 (en) 2022-12-14
CN117459443A (zh) 2024-01-26
CN113300951B (zh) 2023-10-24
CN115552861A (zh) 2022-12-30
WO2021164258A1 (zh) 2021-08-26
MX2022010289A (es) 2022-11-10
JP2023515112A (ja) 2023-04-12
MX2022010288A (es) 2022-11-10
EP4096172A4 (en) 2023-05-31

Similar Documents

Publication Publication Date Title
WO2021164249A1 (zh) 一种发送报文的方法、设备及系统
JP7419510B2 (ja) Bier転送項目構築方法、装置、およびシステム
JP7208386B2 (ja) パケット転送方法、パケット送信装置、およびパケット受信装置
US10361954B2 (en) Method and apparatus for processing modified packet
WO2020135395A1 (zh) 一种跨内部网关协议的前缀标识通告方法和装置
WO2021000752A1 (zh) 一种在数据中心网络中转发报文的方法及相关装置
EP3823225A1 (en) Communication method, communication device and communication system
US11362954B2 (en) Tunneling inter-domain stateless internet protocol multicast packets
CN112868214B (zh) 分组内的协调负载转移oam记录
WO2021143279A1 (zh) 段路由业务处理方法和装置、路由设备及存储介质
JP7273125B2 (ja) BIERv6パケットを送信するための方法および第1のネットワークデバイス
CN113872843A (zh) 一种路由生成方法、路由处理方法及装置
WO2023016550A1 (zh) 一种路由发送方法及设备
WO2023138351A1 (zh) 一种流量转发方法、报文发送方法、消息发送方法及装置
US10924395B2 (en) Seamless multipoint label distribution protocol (mLDP) transport over a bit index explicit replication (BIER) core
WO2022257854A1 (zh) 一种报文发布方法、转发路径处理方法及装置
WO2023213216A1 (zh) 一种报文处理的方法及相关设备
WO2024061184A1 (zh) 对应关系的获取方法、参数通告方法、装置、设备及介质
US20230318966A1 (en) Packet Transmission Method, Correspondence Obtaining Method, Apparatus, and System
WO2024007762A1 (zh) 一种路由发布方法、通信方法及装置
CN114025025B (zh) SRv6 SID的发布方法及网络设备
WO2024032187A1 (zh) 一种路由信息传输方法及装置
US20230269174A1 (en) Route Advertisement Method, Route Loop Check Method, and Device
WO2023173989A1 (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: 20919638

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022550215

Country of ref document: JP

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112022016471

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 20227032781

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020919638

Country of ref document: EP

Effective date: 20220905

ENP Entry into the national phase

Ref document number: 112022016471

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20220818