WO2021036328A1 - 一种在sr网络中转发报文的方法、设备和系统 - Google Patents
一种在sr网络中转发报文的方法、设备和系统 Download PDFInfo
- Publication number
- WO2021036328A1 WO2021036328A1 PCT/CN2020/088788 CN2020088788W WO2021036328A1 WO 2021036328 A1 WO2021036328 A1 WO 2021036328A1 CN 2020088788 W CN2020088788 W CN 2020088788W WO 2021036328 A1 WO2021036328 A1 WO 2021036328A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- identifier
- identifiers
- message
- segment
- network device
- Prior art date
- Legal status (The legal status 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 status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
- H04L49/252—Store and forward routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/50—Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/34—Source routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/741—Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
- H04L45/748—Address table lookup; Address filtering using longest matching prefix
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/30—Peripheral units, e.g. input or output ports
- H04L49/3009—Header conversion, routing tables or routing tags
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Definitions
- This application relates to the field of communications, and in particular to a method, network equipment, and system for forwarding packets in a segment routing (SR) network.
- SR segment routing
- SR is a protocol designed based on the concept of source routing to forward data packets on the network. It supports the explicit designation of the data packet forwarding path at the source node.
- IPv6 Internet Protocol Version 6
- SRv6 segment routing SRv6
- MPLS Multiple Protocol Label Switch
- SRv6 extends the segment routing header (SRH) on the basis of IPv6.
- the SRH includes a segment list (segment list), and the segment list includes a plurality of segment identifications (segment identification, SID) arranged in sequence, and each SID corresponds to a node or link in a packet forwarding path.
- the SRH is encapsulated in a message, and the segment list is used to carry the forwarding and processing process of the message by the SR network.
- each SID is a 128-bit (bit) IPv6 address. Since each SID occupies 128 bits in the message, each additional SID in the segment list will increase the length of the SRH by 128 bits, and correspondingly, the length of the message will also increase by 128 bits.
- the increase of the packet length will cause a large amount of network resources, such as bandwidth, to be occupied during the forwarding process.
- the message forwarding path includes 100 nodes
- the SRH includes 100 SIDs
- the segment list length is as high as 1600 bytes
- the segment list length is too long, which reduces the efficiency of message transmission in the SR network.
- the present application provides a method, device, and system for forwarding messages, which are used to solve the technical problem that the length of the segment list is too long and the message transmission efficiency in the SR network is reduced.
- a method for forwarding messages includes: receiving a first message, the first message header of the first message includes a segment list for forwarding the first message, the segment list includes a plurality of identifiers arranged in sequence, so Each of the multiple identifiers corresponds to a network device or a link, and the segment list includes a first element with a length of 128 bits, and the first element includes adjacent ones of the multiple identifiers.
- the first message includes a first pointer; the position of the first identifier in the first element is determined according to the value of the first pointer, and the first identifier is the at least two One of the identifiers; copy at least one identifier starting with the first identifier into the second header of the first message to generate a second message; send the second message .
- the segment list may be the segment list in the SRH of the SRv6 message.
- the 128-bit element in the segment list can store at least two identifiers corresponding to the network device, and each identifier does not need to occupy 128 bits, thereby reducing the length of the segment list, reducing the length of the message, and improving the message Transmission efficiency.
- the number of identifiers stored in each 128-bit element can be adjusted according to the actual situation of the network. When a 128-bit element contains multiple identifiers, these identifiers can be understood as compressed segment identifiers (micro segment ID, USID). Through the first pointer included in the message header, the position of the compressed segment identifier inside the element can be obtained accurately and quickly.
- the multiple identifiers are mapped to multiple segment identifiers one by one, and each segment identifier of the multiple segment identifiers corresponds to a network device or a link, and the multiple Each segment identifier in the segment identifier includes a first part and a second part, the first part of each segment identifier of the plurality of segment identifiers is the prefix part, and the prefix parts of the plurality of segment identifiers are the same, and Each identifier of the plurality of identifiers respectively includes the second part of the segment identifier to which each identifier is mapped.
- the USID can be obtained by omitting part of the content in the SID. Since the BLOCK part of the SID of all network devices is the same in a domain, the USID can be obtained by omitting the BLOCK of the SID and put the USID in the segment list, thereby reducing the length of the segment list.
- the second packet header includes a destination address (destiantion address, DA) field, and the destination address field includes a first part and a second part;
- the first identifier is Copying the at least one initial identifier to the second message header of the first message includes: copying at least one identifier starting from the first identifier to the second part of the destination address field.
- the first identifier is the identifier to be added to the DA field, which may also be referred to as the identifier to be added, and the first identifier may be USID.
- the network device A pointer determines the first identifier among multiple identifiers, copies at least one identifier starting with the first identifier into the DA field, and the prefix part of the SID is also directly put into the DA field, so that the prefix part of the SID and At least one identifier starting from the first identifier is combined to guide message forwarding.
- the lengths of the multiple identifiers are the same; the at least one identifier starting with the first identifier is copied to the second header of the first message Before the middle, the method further includes: determining the quantity of the at least one identifier according to the length of the plurality of identifiers and the length of the prefix part.
- the DA field one part is occupied by the prefix part, and the other part is occupied by at least one USID copied to the DA field.
- the network device can determine the number of at least one USID that can be copied to the DA field according to the length of the USID and the length of the prefix part.
- the segment list does not include the prefix part.
- the head node adds the SRH to the message, it also stores the currently pending USID and the BLOCK part corresponding to the USID in the DA field, where the USID adjacent to the BLOCK part in the DA field can be called the active USID. Therefore, for the active USID and other USIDs corresponding to the same prefix part as the active USID, the prefix part corresponding to these USIDs may no longer be stored in the segment list, but only the USIDs themselves. Thus, the length of the segment list is reduced.
- the first message includes a destination address field, the destination address field includes a second identifier, and the second identifier is one of the multiple identifiers;
- the method further includes: determining, according to the switching flag in the second identifier, that the segment list includes the second identifier and the second identifier.
- the copying at least one identifier starting with the first identifier into the second header of the first message includes: adding the at least one identifier Is copied into the second message header to form a forwarding identifier stack, and the at least one identifier is of a different type from the second identifier.
- the segment list can also include other types of identifiers, such as MPLS labels or Internet Protocol version 4 (Internet Protocol, IPv4) addresses.
- the network device builds a forwarding label stack in the message header, and copies these other types of labels to the forwarding label stack. in. Therefore, the method can be compatible with more network scenarios, and the entire forwarding path can be programmed through the segment list to improve forwarding efficiency.
- the first message includes a quantity flag; the at least one identifier starting with the first identifier is copied to the second message of the first message before the header, the method further includes: determining the quantity of the at least one identifier according to the value of the quantity flag.
- at least one identifier is other types of identifiers, such as MPLS labels or IPv4 addresses. Before copying these other types of identifiers to the forwarding identifier stack, the network device can first determine the number of these other types of identifiers according to the quantity identifiers, thereby Copy the corresponding number of other types of identifiers to the forwarding identifier stack.
- the determining the position of the first identifier in the first element according to the value of the first pointer includes: determining the number of redundant identifiers in the destination address field, so The type of the redundant identifier is different from the second identifier; the value of the first pointer is corrected according to the number of redundant identifiers; the value of the first pointer is determined to be in the first pointer according to the corrected value of the first pointer Position in an element.
- the first identifier is the first identifier among at least one other type of identifier, and the redundant identifier is another type of identifier that has been added to the DA field.
- the network device corrects the value of the first pointer according to the number of other types of identifiers that have been added to the DA field, and determines at least one identifier to be added to the DA field in the segment list according to the corrected value of the first pointer Starting position.
- the copying at least one identifier starting with the first identifier to the forwarding identifier stack includes: using the last identifier of the at least one identifier as the last identifier. An identifier is added to the destination address field of the first message.
- the network device also copies the compressed segment identifiers after other types of identifiers in the segment list into the DA field, so that after the forwarding identifier stack is popped out, it continues to forward packets according to the DA field.
- the at least one identifier is an MPLS label or an IPv4 address.
- the other type of identification may be an MPLS label or an IPv4 address.
- the first pointer is included in the first packet header.
- the first pointer can be in the specific field of the SRH or in the segment list.
- the method further includes: The value of the first pointer is modified so that the modified value of the first pointer is used to indicate the position of the second identifier in the first element, and the second identifier does not belong to the at least one identifier.
- the network device modifies the value of the first pointer so that the value of the first pointer always points to the identifier to be added, so that subsequent network devices on the forwarding path can continue to determine the identifier to be added according to the value of the first pointer.
- the method further includes: Modify the value of the first pointer so that the modified value of the first pointer is used to indicate the position of the second identifier in the second element, and the second identifier does not belong to the at least one identifier, The second element is different from the first element.
- the network device may point the first pointer to the identifier in the next element, for example, reset the value of the first pointer to 0, thereby pointing to the starting position of the next element.
- a method for forwarding messages includes: receiving a first message; obtaining a segment list, the segment list corresponding to a forwarding path of the first message, the forwarding path includes a plurality of network devices, and the segment list includes a plurality of Each identifier of the plurality of identifiers respectively corresponds to a network device of the plurality of network devices or a link in the forwarding path, and the segment list includes the first segment list with a length of 128 bits.
- the first element includes at least two adjacent identifiers among the plurality of identifiers; adding the segment list to the first message to generate a second message, the second message including A first pointer, the value of the first pointer is used to indicate the position of a first identifier in the first element, and the first identifier is one of the at least two identifiers; sending the second message .
- the segment list may be the segment list in the SRH of the SRv6 message.
- the 128-bit element in the segment list can store at least two identifiers corresponding to the network device, and each identifier does not need to occupy 128 bits, thereby reducing the length of the segment list, reducing the length of the message, and improving the message Transmission efficiency.
- the number of identifiers stored in each 128-bit element can be adjusted according to the actual situation of the network.
- the ingress node on the message forwarding path adds a first pointer to the message header, which is used to indicate the position of the different identifiers inside the element, so that the middle of the message forwarding path The node can accurately and quickly obtain the position of the mark inside the element.
- each segment identifier of the plurality of segment identifiers includes a first part and a second part, the first part of each segment identifier is a prefix part, and the plurality of segment identifiers The prefix part is the same, and each of the plurality of identifiers respectively includes the second part of the segment identifier to which each identifier is mapped.
- the USID can be obtained by omitting part of the content in the SID. Since the BLOCK part of the SID of all network devices in a domain is the same, the USID can be obtained by omitting the BLOCK part of the SID and put the USID in the segment list, thereby reducing the length of the segment list.
- the message header of the first message includes a destination address field, and the destination address field includes a first part and a second part; and the adding the first message to the first message Segment list to generate the second message, including: adding the prefix part to the first part of the destination address field; adding one or one of the multiple identifiers to the second part of the destination address field Multiple logos. Since the prefix part of the SID is omitted from the USID in the segment list, the ingress node on the forwarding path directly adds the prefix part to the DA field, and also adds the first identifier in the segment list to the DA field, so that the SID The prefix part of and the first identifier are combined to guide message forwarding.
- the segment list does not include the prefix part.
- the prefix part of the SID is stored in the DA field, and only the USID is stored in the segment list, and the prefix part of the SID is no longer stored.
- the length of the segment list is reduced.
- At least one of the multiple identifiers is an MPLS label or an IPv4 address.
- the second message includes a quantity flag, and the value of the quantity flag is used to indicate the quantity of the at least one identifier.
- the segment list may also include other types of identifiers.
- the ingress node of the forwarding path adds a quantity flag to the message to indicate the quantity of other types of identifiers.
- the first pointer is located in a message header of the second message.
- the first pointer can be in the specific field of the SRH or in the segment list.
- the second message further includes a second pointer, and the value of the second pointer is used to indicate the position of the first element in the segment list.
- the second pointer may be a segment left (SL) pointer.
- the obtaining the segment list includes: receiving the segment list.
- the segment list may be received by the ingress node of the forwarding path from the controller in the network.
- the obtaining the segment list includes: determining the forwarding path of the first packet, and generating the segment list corresponding to the forwarding path.
- the segment list may be generated by the entry node of the forwarding path.
- a method for generating a segment list for forwarding a message includes: determining a forwarding path of the message, and the forwarding path includes a plurality of network devices;
- the segment list corresponding to the forwarding path is generated, the segment list includes the plurality of identifiers arranged in sequence, and each identifier of the plurality of identifiers corresponds to a network of the plurality of network devices.
- the segment list includes a first element with a length of 128 bits, and the first element includes at least two adjacent identifiers among the plurality of identifiers.
- the method may be executed by a network device that generates a segment list, and the network device that generates the segment list may be a controller in the network, or an ingress node of a packet forwarding path in the network.
- the segment list may be the segment list in the SRH of the SRv6 message.
- the network device stores at least two identifiers corresponding to the network device in an element with a length of 128 bits in the segment list, instead of storing only one identifier per 128 bits, thereby reducing the length of the segment list, reducing the length of the message, and improving the message Transmission efficiency.
- the number of identifiers stored in each 128-bit element can be adjusted according to the actual situation of the network. When a 128-bit element contains multiple identifiers, these identifiers can be understood as compressed segment identifiers (USID).
- the multiple identifiers are mapped to multiple segment identifiers one by one, and each segment identifier in the multiple segment identifiers corresponds to a network device or one of the multiple network devices.
- each of the plurality of segment identifiers includes a first part and a second part, the first part of each of the segment identifiers is a prefix part, and each of the plurality of identifiers Each identifier respectively includes the second part of the segment identifier to which each identifier is mapped.
- the USID can be obtained by omitting part of the content in the SID. Since the BLOCK part of the SID of all network devices in a domain is the same, the USID can be obtained by omitting the BLOCK part of the SID and put the USID in the segment list, thereby reducing the length of the segment list.
- the segment identifiers in the plurality of segment identifiers further include a third part, the third part is a filling part, the filling parts of the multiple segment identifiers are the same, and the multiple identifiers
- the mark in does not include the filling part.
- the function field in the USID may be a compressed function field, and the length of the compressed function field is less than the length of the uncompressed function field. Therefore, the length of the USID is less than the length of the SID, and the USID is put into the segment list, thereby reducing the length of the segment list.
- the multiple segment identifiers include a first segment identifier, and the segment list does not include a prefix part of the first segment identifier.
- the multiple segment identifiers include a first segment identifier, and the segment list does not include a prefix part of the first segment identifier. Only the USID is stored in the segment list, and the prefix part of the SID is no longer stored. Thus, the length of the segment list is reduced.
- the multiple segment identifiers further include a second segment identifier
- the prefix part of the first segment identifier is different from the prefix part of the second segment identifier
- the segment list includes the The prefix part of the second paragraph identification.
- At least one of the multiple identifiers is a segment identifier, an MPLS label, or an IPv4 address.
- the segment list further includes a quantity flag, and the value of the quantity flag is used to indicate the quantity of the at least one other identifier.
- the method further includes: sending the segment list to the ingress device of the forwarding path; or The segment list is encapsulated in a message, and the message is sent.
- the network device that generates the segment list is the controller in the network
- the controller generates the segment list and sends it to the ingress node of the forwarding path, so that the ingress node encapsulates the segment list into the message and instructs the message to be forwarded.
- the network device that generates the segment list is the ingress node of the message forwarding path, the ingress node encapsulates the segment list into the message to guide the message forwarding.
- a network device that executes the first aspect or any one of the possible implementations of the first aspect, or the fifteenth aspect or the method in any one of the fifteenth aspects.
- the network device includes a unit for executing the method in the first aspect or any one of the possible implementation manners of the first aspect, or the fifteenth aspect or any one of the possible implementation manners of the fifteenth aspect.
- a network device that executes the second aspect or any one of the possible implementation manners of the second aspect, or the sixteenth aspect or the method in any one of the sixteenth aspect.
- the network device includes a unit configured to execute the second aspect or any one possible implementation manner of the second aspect, or the sixteenth aspect or any one possible implementation manner of the sixteenth aspect.
- a network device that executes the third aspect or the method in any one of the possible implementation manners of the third aspect.
- the network device includes a unit for executing the third aspect or the method in any one of the possible implementation manners of the third aspect.
- a network device in a seventh aspect, includes a processor, a communication interface, and a memory.
- the communication interface can be a transceiver.
- the memory may be used to store program code, and the processor is used to call the program code in the memory to execute any one of the foregoing first aspect or any possible implementation of the first aspect, or any one of the fifteenth aspect or the fifteenth aspect. The implementation method of, will not be repeated here.
- a network device in an eighth aspect, includes a processor, a communication interface, and a memory.
- the communication interface can be a transceiver.
- the memory may be used to store program code, and the processor is used to call the program code in the memory to execute any one of the foregoing second aspect or any possible implementation of the second aspect, or any one of the sixteenth aspect or the sixteenth aspect. The implementation method of, will not be repeated here.
- a network device in a ninth aspect, includes a processor, a communication interface, and a memory.
- the communication interface can be a transceiver.
- the memory may be used to store program code, and the processor is used to call the program code in the memory to execute the foregoing third aspect or any one of the possible implementation manners of the third aspect, which will not be repeated here.
- a network system in a tenth aspect, includes the network device provided by the foregoing fourth, fifth, or sixth aspect, or the network system includes the network device provided by the foregoing seventh, eighth, or ninth aspect.
- a computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute the first, second, and third aspects described above.
- the twelfth aspect provides a computer program product including computer program instructions.
- the network device executes the first aspect, the second aspect, the third aspect, and the fifteenth aspect.
- the sixteenth aspect, any possible implementation of the first aspect, any possible implementation of the second aspect, any possible implementation of the third aspect, any one of the fifteenth aspect One possible implementation manner or the method provided in any one of the possible implementation manners of the sixteenth aspect.
- a chip including a memory and a processor, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the first aspect and any possible aspects of the first aspect.
- the processor executes the method in the second aspect or any possible implementation of the second aspect, or the processor executes the third aspect or the method in any possible implementation of the third aspect, or The processor executes the fifteenth aspect or the method in any one possible implementation manner of the fifteenth aspect, or the processor executes the sixteenth aspect or the method in any one possible implementation manner of the sixteenth aspect.
- the aforementioned chip only includes a processor, and the processor is used to read and execute a computer program stored in the memory.
- the processor executes the first aspect or any possible implementation method of the first aspect.
- the processor executes the method in the second aspect or any possible implementation manner of the second aspect, or the processor executes the method in the third aspect or any possible implementation manner of the third aspect, or the processor executes the fifteenth aspect Aspect or the method in any possible implementation manner of the fifteenth aspect, or the processor executes the method in the sixteenth aspect or any one of the possible implementation manners of the sixteenth aspect.
- a method for forwarding messages includes: receiving a first message, the first message header of the first message includes a segment list for forwarding the first message, the segment list includes a plurality of identifiers arranged in sequence, so The identifier in the multiple identifiers corresponds to a network device or a link, the segment list includes a first element and a second element, and the length of the first element and the second element is 128 bits, and the first element and the second element are 128 bits in length.
- An element includes at least two adjacent identifiers among the plurality of identifiers; the second header of the first message includes a destination address field, the destination address field includes the first identifier, and the first An identifier is one of the multiple identifiers; the second element is added to the destination address field according to the indication of the first identifier to generate a second message; and the second message is sent.
- the segment list may be the segment list in the SRH of the SRv6 message.
- the 128-bit element in the segment list can store at least two identifiers corresponding to the network device, and each identifier does not need to occupy 128 bits, thereby reducing the length of the segment list, reducing the length of the message, and improving the message Transmission efficiency.
- these identifiers can be understood as compressed segment identifiers (USID).
- USID compressed segment identifiers
- the segment list can also store a segment identifier (SID) with a length of 128 bits, that is, the SID and the USID are stored in the segment list at the same time.
- SID and USID correspond to different adding methods, so it is necessary to set a switching flag between USID and SID.
- the network device can obtain the switching flag from the DA field and take corresponding actions according to the instructions of the switching flag. For example, when the SID is added to the DA field, the entire 128-bit element in the segment list is added to the DA field. Thus, the message forwarding is ensured.
- a method for forwarding messages includes: receiving a first message, the first message header of the first message includes a segment list for forwarding the first message, the segment list includes a plurality of identifiers arranged in sequence, so Each of the multiple identifiers corresponds to a network device or a link, and the segment list includes a first element with a length of 128 bits, and the first element includes adjacent ones of the multiple identifiers.
- the first message includes a first pointer; the position of the first identifier in the segment list is determined according to the value of the first pointer, and the first identifier is in the at least two identifiers Copying at least one identifier starting with the first identifier to the second header of the first message to generate a second message; sending the second message.
- the segment list may be the segment list in the SRH of the SRv6 message.
- the 128-bit element in the segment list can store at least two identifiers corresponding to the network device, and each identifier does not need to occupy 128 bits, thereby reducing the length of the segment list, reducing the length of the message, and improving the message Transmission efficiency.
- the number of identifiers stored in each 128-bit element can be adjusted according to the actual situation of the network. When a 128-bit element contains multiple identifiers, these identifiers can be understood as compressed segment identifiers (micro segment ID, USID). Through the first pointer included in the message header, the position of the compressed segment identifier inside the element can be obtained accurately and quickly.
- the multiple identifiers are mapped to multiple segment identifiers one by one, and each segment identifier of the multiple segment identifiers corresponds to a network device or a link, and the multiple Each segment identifier in the segment identifier includes a first part and a second part, the first part of each segment identifier of the plurality of segment identifiers is the prefix part, and the prefix parts of the plurality of segment identifiers are the same, and Each identifier of the plurality of identifiers respectively includes the second part of the segment identifier to which each identifier is mapped.
- the USID can be obtained by omitting part of the content in the SID. Since the BLOCK part of the SID of all network devices is the same in a domain, the USID can be obtained by omitting the BLOCK of the SID and put the USID in the segment list, thereby reducing the length of the segment list.
- the second packet header includes a destination address (destiantion address, DA) field, and the destination address field includes a first part and a second part;
- the first identifier is Copying the at least one initial identifier to the second message header of the first message includes: copying at least one identifier starting from the first identifier to the second part of the destination address field.
- the first identifier is the identifier to be added to the DA field, which may also be referred to as the identifier to be added, and the first identifier may be USID.
- the network device A pointer determines the first identifier among multiple identifiers, copies at least one identifier starting with the first identifier into the DA field, and the prefix part of the SID is also directly put into the DA field, so that the prefix part of the SID and At least one identifier starting from the first identifier is combined to guide message forwarding.
- the lengths of the multiple identifiers are the same; the at least one identifier starting with the first identifier is copied to the second header of the first message Before the middle, the method further includes: determining the quantity of the at least one identifier according to the length of the plurality of identifiers and the length of the prefix part.
- the DA field one part is occupied by the prefix part, and the other part is occupied by at least one USID copied to the DA field.
- the network device can determine the number of at least one USID that can be copied to the DA field according to the length of the USID and the length of the prefix part.
- the segment list does not include the prefix part.
- the head node adds the SRH to the message, it also stores the currently pending USID and the BLOCK part corresponding to the USID in the DA field, where the USID adjacent to the BLOCK part in the DA field can be called the active USID. Therefore, for the active USID and other USIDs corresponding to the same prefix part as the active USID, the prefix part corresponding to these USIDs may no longer be stored in the segment list, but only the USIDs themselves. Thus, the length of the segment list is reduced.
- the first message includes a destination address field, the destination address field includes a second identifier, and the second identifier is one of the multiple identifiers;
- the method further includes: determining, according to the switching flag in the second identifier, that the segment list includes the second identifier and the second identifier. Identifiers with different types of identifiers; the copying at least one identifier starting with the first identifier into the second header of the first message includes: copying the at least one identifier Into the second message header to form a forwarding identifier stack, and the at least one identifier is of a different type from the second identifier.
- the segment list can also include other types of identifiers, such as MPLS labels or Internet Protocol version 4 (Internet Protocol, IPv4) addresses.
- the network device builds a forwarding label stack in the message header, and copies these other types of labels to the forwarding label stack. in. Therefore, the method can be compatible with more network scenarios, and the entire forwarding path can be programmed through the segment list to improve forwarding efficiency.
- the first message includes a quantity flag; the at least one identifier starting with the first identifier is copied to the second message of the first message before the header, the method further includes: determining the quantity of the at least one identifier according to the value of the quantity flag.
- at least one identifier is other types of identifiers, such as MPLS labels or IPv4 addresses. Before copying these other types of identifiers to the forwarding identifier stack, the network device can first determine the number of these other types of identifiers according to the quantity identifiers, thereby Copy the corresponding number of other types of identifiers to the forwarding identifier stack.
- the copying at least one identifier starting with the first identifier to the forwarding identifier stack includes: using the last identifier of the at least one identifier as the last identifier. An identifier is added to the destination address field of the first message.
- the network device also copies the compressed segment identifiers after other types of identifiers in the segment list into the DA field, so that after the forwarding identifier stack is popped out, it continues to forward packets according to the DA field.
- the at least one identifier is an MPLS label or an IPv4 address.
- the other type of identification may be an MPLS label or an IPv4 address.
- the first pointer is included in the first packet header.
- the first pointer can be in the specific field of the SRH or in the segment list.
- the method further includes: The value of the first pointer is modified so that the modified value of the first pointer is used to indicate the position of the second identifier in the segment list, and the second identifier does not belong to the at least one identifier.
- the network device modifies the value of the first pointer so that the value of the first pointer always points to the identifier to be added, so that subsequent network devices on the forwarding path can continue to determine the identifier to be added according to the value of the first pointer.
- a method for forwarding messages includes: receiving a first message; obtaining a segment list, the segment list corresponding to a forwarding path of the first message, the forwarding path includes a plurality of network devices, and the segment list includes a plurality of Each identifier of the plurality of identifiers respectively corresponds to a network device of the plurality of network devices or a link in the forwarding path, and the segment list includes the first segment list with a length of 128 bits.
- the first element includes at least two adjacent identifiers among the plurality of identifiers; adding the segment list to the first message to generate a second message, the second message including The first pointer, the value of the first pointer is used to indicate the position of the first identifier in the segment list, and the first identifier is one of the at least two identifiers; and the second message is sent.
- the segment list may be the segment list in the SRH of the SRv6 message.
- the 128-bit element in the segment list can store at least two identifiers corresponding to the network device, and each identifier does not need to occupy 128 bits, thereby reducing the length of the segment list, reducing the length of the message, and improving the message Transmission efficiency.
- the number of identifiers stored in each 128-bit element can be adjusted according to the actual situation of the network.
- the ingress node on the message forwarding path adds a first pointer to the message header, which is used to indicate the position of the different identifiers in the segment list, so that the message forwarding path is The intermediate node can accurately and quickly obtain the position of the identifier in the segment list.
- each segment identifier of the plurality of segment identifiers includes a first part and a second part, the first part of each segment identifier is a prefix part, and the plurality of segment identifiers The prefix part is the same, and each of the plurality of identifiers respectively includes the second part of the segment identifier to which each identifier is mapped.
- the USID can be obtained by omitting part of the content in the SID. Since the BLOCK part of the SID of all network devices in a domain is the same, the USID can be obtained by omitting the BLOCK part of the SID and put the USID in the segment list, thereby reducing the length of the segment list.
- the message header of the first message includes a destination address field, and the destination address field includes a first part and a second part; and the adding the first message to the first message Segment list to generate the second message, including: adding the prefix part to the first part of the destination address field; adding one or one of the multiple identifiers to the second part of the destination address field Multiple logos. Since the prefix part of the SID is omitted from the USID in the segment list, the ingress node on the forwarding path directly adds the prefix part to the DA field, and also adds the first identifier in the segment list to the DA field, so that the SID The prefix part of and the first identifier are combined to guide message forwarding.
- the segment list does not include the prefix part.
- the prefix part of the SID is stored in the DA field, and only the USID is stored in the segment list, and the prefix part of the SID is no longer stored.
- the length of the segment list is reduced.
- At least one of the multiple identifiers is an MPLS label or an IPv4 address.
- the second message includes a quantity flag, and the value of the quantity flag is used to indicate the quantity of the at least one identifier.
- the segment list may also include other types of identifiers.
- the ingress node of the forwarding path adds a quantity flag to the message to indicate the quantity of other types of identifiers.
- the first pointer is located in a message header of the second message.
- the first pointer can be in the specific field of the SRH or in the segment list.
- the obtaining the segment list includes: receiving the segment list.
- the segment list may be received by the ingress node of the forwarding path from the controller in the network.
- the obtaining the segment list includes: determining the forwarding path of the first packet, and generating the segment list corresponding to the forwarding path.
- the segment list may be generated by the entry node of the forwarding path.
- FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the application
- FIG. 2 is a schematic diagram of a format of an SID provided by an embodiment of the application.
- FIG. 3 is a schematic diagram of the structure of a message provided by an embodiment of the application.
- FIG. 4 is a schematic structural diagram of a segment list provided by an embodiment of this application.
- FIG. 5 is a schematic structural diagram of a SID provided by an embodiment of this application.
- FIG. 6 is a schematic structural diagram of a segment list provided by an embodiment of this application.
- FIG. 7 is a schematic structural diagram of a segment list provided by an embodiment of this application.
- FIG. 8 is a schematic structural diagram of a segment list provided by an embodiment of this application.
- FIG. 9 is a schematic diagram of the structure of a message provided by an embodiment of the application.
- FIG. 10 is a schematic diagram of the structure of a message provided by an embodiment of this application.
- FIG. 11 is a schematic diagram of the structure of a message provided by an embodiment of the application.
- FIG. 12 is a schematic diagram of the structure of a message provided by an embodiment of this application.
- FIG. 13 is a schematic diagram of the structure of a message provided by an embodiment of the application.
- FIG. 14 is a schematic diagram of the structure of a message provided by an embodiment of the application.
- FIG. 15 is a schematic diagram of the structure of a message provided by an embodiment of the application.
- FIG. 16 is a schematic diagram of the structure of a message provided by an embodiment of the application.
- FIG. 17 is a schematic diagram of the structure of a message provided by an embodiment of the application.
- FIG. 18 is a flowchart of a method for processing a message according to an embodiment of the application.
- FIG. 19 is a flowchart of a method for processing a message according to an embodiment of the application.
- FIG. 20 is a schematic structural diagram of a network device provided by an embodiment of this application.
- FIG. 21 is a schematic structural diagram of a network device provided by an embodiment of this application.
- FIG. 22 is a schematic structural diagram of a network device provided by an embodiment of this application.
- FIG. 23 is a schematic structural diagram of a network device provided by an embodiment of this application.
- FIG. 24 is a schematic structural diagram of a network device provided by an embodiment of this application.
- FIG. 25 is a schematic structural diagram of a network system provided by an embodiment of this application.
- FIG. 1 shows a possible application scenario of an embodiment of the present application.
- the network of this application scenario includes network equipment, specifically: network equipment S, network equipment 1, network equipment 2, network equipment 3, network equipment 4, network equipment 5, network equipment 6, network equipment 7, network equipment 8, network Device 9, network device 10, network device 11, and network device 12.
- These network devices can be switches, routers or repeaters.
- the network device S may be an entrance device of the network.
- the network device may also include a controller, which is not shown in FIG. 1.
- the controller can be connected to network devices 1 to 10.
- the controller may generate a segment list corresponding to the forwarding path of the message, and send the segment list to the network entry device.
- the controller may send control messages containing network configuration information to the network devices 1-12.
- the network devices in the embodiments of the present application may also be referred to as network nodes or nodes.
- the network device S is a network device that supports SR.
- the network devices 1 to 12 may be network devices that support SR.
- the network devices may be network devices that support SRv6, or the network devices may also be network devices that support MPLS.
- the network device 1 to the network device 12 may also be network devices that support IPv4 but do not support SR.
- each segment In the SR network, the message processing process is composed of multiple segments, and each segment is an instruction or a set of instructions for processing the message.
- each segment has a corresponding segment identifier, that is, SID.
- the segment identifier includes two types: node segment identifier (node SID) and adjacent segment identifier (adjacent SID).
- Figure 2 shows the format of the SID in the SRv6 network. As shown in Figure 2, each SID may include a location (Locator) field and a function (Function) field.
- the location field in the SID is used to locate the specific network device that executes the instruction or instruction set included in the segment.
- the location field includes a prefix (BLOCK) part and a sequence number (Node ID) part.
- BLOCK prefix part of the SID of the network device
- Node ID sequence number
- the prefix part of the SID of the network device may be the same.
- the sequence number part of the SID of each network device is different, and each sequence number part is used to uniquely identify a network device in the domain.
- the network device that is uniquely determined by the sequence number part of the SID is the network device that executes the segment identified by the SID.
- the function field in the SID is used to indicate the specific content of the instruction or instruction set included in the segment, that is, the function in the SRv6 network.
- the functions in the SRv6 network may also involve parameters, which are represented by the Argument field in the SID (not shown in Figure 2). When the function does not involve parameters, the parameter field may not be included in the SID.
- the total length of the SID in the SRv6 network is 128 bits.
- the location field and the function field are respectively specific lengths, and these specific lengths can be changed through network settings.
- the position field is 48 bits and the function field is 80 bits, or the position field is 64 bits and the function field is 64 bits, or the position field is 48 bits, the function field is 64 bits, and the parameter field is 16 bits.
- FIG. 3 shows the message format in the SRv6 network.
- the header of the message includes an IPv6 header and an SRH.
- the IPv6 header includes a destination address (DA) field.
- the SRH includes a segment list, and the segment list includes multiple SIDs arranged in sequence. . These SIDs can be node segment identifiers, adjacent segment identifiers, or a combination of node segment identifiers and adjacent segment identifiers.
- the segment list can be encapsulated in the message by the ingress node on the message forwarding path, and subsequent network devices on the message forwarding path can process the message according to the segment list in the message.
- the message is sent by an ingress node on the forwarding path, and a specific network device on the forwarding path receives the message.
- the network device determines that the DA field of the IPv6 header of the message includes the SID of the network device, and then processes the message according to the instruction set corresponding to the segment identified by the SID.
- the specific manner of processing the message may be, for example, forwarding the message.
- the network device also needs to update the DA field.
- the segment list includes multiple SIDs arranged in sequence, namely Segment List[0] to Segment List[n].
- the multiple SIDs respectively correspond to multiple network devices on the packet forwarding path, and the multiple network devices respectively execute instruction sets corresponding to multiple segments.
- the SL pointer can point to multiple SIDs in the segment list in turn.
- the value of the SL pointer is updated every time a segment is executed. After each update, the position of the SL pointer in the segment list is offset by the length of an SID, that is, 128 bits.
- the multiple segments represented by multiple SIDs in the segment list are executed sequentially, and the value of the SL pointer is constantly updated. Therefore, the SL pointer is used to indicate the number of remaining segments in the segment list to be processed. In other words, each value of the SL pointer corresponds to a specific number of remaining segments to be processed in the segment list, and the SL pointer always points to the currently pending SID.
- the multiple SIDs are arranged in the reverse order in the segment list, that is, the SID of the first executed segment is arranged at the end of the segment list.
- the SIDs of the subsequently executed sections are arranged upwards, and the SID of the last executed section is arranged at the top of the section list.
- Segment List[n] represents the first executed segment
- Segment List[0] represents the last executed segment.
- the value of the SL pointer is 3, which means that the number of remaining segments to be processed in the segment list is 4. It can also be understood that the SL pointer points to the current SID to be processed, that is, the fourth SID counted from bottom to top; SL The value of the pointer is 0, which means that the number of remaining segments to be processed is 1.
- the SL pointer points to the current SID to be processed, that is, the last SID counted from bottom to top, that is, the Segment List[ in Figure 3 0].
- the SID is copied to the DA field in the IPv6 packet header for subsequent processing of the packet according to the content in the DA field.
- the specific manner of processing the message may be, for example, forwarding the message.
- the processing method may be forwarding, that is, the message is forwarded through the network shown in FIG. 1.
- network device S sends a message to network device 10, and the forwarding path of the message sequentially passes through network device 1, network device 2, network device 3, network device 4, network device 5, network device 6, network device 7, and network device.
- the forwarding path also includes network device 1 to network device 10, a total of 10 network devices.
- the segment list of the entire message forwarding process includes 10 SIDs.
- the length of each SID is 128 bits, and the length of the segment list is 160 bytes.
- the embodiment of the present application provides a method for forwarding a message, and a device and system based on the method. These methods, equipment and systems are based on the same inventive concept.
- a compressed segment identifier with a smaller length can be used instead of a 128-bit SID, thereby reducing the length of the segment list, thereby reducing the length of the message, and improving the transmission efficiency and processing efficiency of the network.
- the embodiment of the present invention provides a method for forwarding a message.
- the method involves each node on the forwarding path of the message.
- the network device S sends a message to the network device 10, and the forwarding path of the message sequentially passes through the network device 1, the network device 2, the network device 3, the network device 4, the network device 5, and the network device 6. , Network equipment 7, network equipment 8, network equipment 9.
- the steps of the method include:
- the network device S receives the message.
- the network device S is a network entry device in the network, and is an entry node of the forwarding path of the message.
- the network device S receives a message, and the message may be a message generated by a host (not shown in FIG. 1), and the host may be a terminal device such as a personal computer, a mobile phone, or a tablet computer.
- the network device S needs to determine the forwarding path of the received message.
- the network device S may find a forwarding path for forwarding the message from a plurality of stored forwarding paths according to the characteristics of the message, so as to determine the forwarding path of the message.
- the stored multiple forwarding paths may be received by the network device S from the controller in the network.
- the feature of the message may be any one element or a combination of multiple elements in the quintuple of the message.
- the quintuple includes elements: the source IP address, source port, destination IP address, and destination of the message. Port and protocol number.
- the network device S may also calculate a forwarding path for forwarding the message according to the information carried in the message and the network topology information.
- the forwarding path includes multiple network devices.
- the network device S sends a message to the network device 10, and the forwarding path of the message sequentially passes through the network device 1, the network device 2, the network device 3, the network device 4, the network device 5, and the network device 6. , Network equipment 7, network equipment 8, network equipment 9.
- the network device S obtains the segment list.
- the segment list may be the segment list in the SRH of the SRv6 message. As shown in FIG. 4, the segment list at this time corresponds to the forwarding path of the message, the forwarding path includes network device 1 to network device 10, and the segment list includes a plurality of SIDs arranged in sequence. Among the multiple SIDs Each SID of corresponds to one of the multiple network devices or a link in the forwarding path, and the length of each SID is 128 bits.
- the segment list may be received by the network device S from the controller and stored in the device. Specifically, the network device S finds the forwarding path for forwarding the message from the stored multiple forwarding paths, and finds the corresponding List of segments in the forwarding path.
- the segment list may also be generated by the network device S. Specifically, the network device S calculates a forwarding path for forwarding the message according to the information carried in the message, and generates a segment list corresponding to the forwarding path.
- the forwarding path of a message can also be represented by multiple segments.
- Each segment is executed by a specific network device, and each segment has a corresponding SID. Therefore, for a segment, there is a correspondence between the SID of this segment and the network device that executes the segment, that is, the SID corresponds to a network device, or it can be said that the SID is the SID of a network device.
- the segment identifier of the network device 1 may be A:1:01:11::, the length of the segment identifier is 128 bits, and "::" represents all 0 bytes.
- A:1:01 is the position field
- the length is 48 bits
- A:1/48 is the BLOCK part
- the length is 32 bits
- "/48” means the 48-bit mask
- 01 is the serial number part
- the length is 16 bits
- 11:: is the function field
- the length is 80 bits.
- network equipment 2, network equipment 3, network equipment 4, network equipment 5, network equipment 6, network equipment 7, network equipment 8, network equipment 9, or network equipment 10 can also be network equipment in the same domain.
- the segment identifiers of these network devices can be A:1:02:22::,A:1:03:33::,A:1:04:44::,A:1:05:55::, A:1:06:66::,A:1:07:77::,A:1:08:88::,A:1:09:99::,A:1:0a:aa::.
- each SID In order to reduce the length of each SID, a certain part or parts of the SID can be omitted to form a compressed segment ID (microsegment ID, USID). These USIDs can be placed in the segment list instead of the SID to reduce the length of the segment list. .
- the BLOCK part of the SID of all network devices can be the same, in order to reduce the length of each SID in the segment list, the BLOCK part of the SID can be omitted to form a USID. That is to say, the SID of the network device is divided into two parts, the first part is the BLOCK part, and the second part is the rest of the SID except the BLOCK part. When putting in the segment list, the same BLOCK part is omitted.
- the SID of the network device 1 in Figure 1 is A:1:01:11::, where A:1/48 is the BLOCK part, 01 is the serial number part, and the length is 16 bits.
- the remaining part is 01:11::, and the length is 96 bits.
- network device 2, network device 3, network device 4, network device 5, network device 6, network device 7, network device 8, network device 9, or network device 10 can omit the BLOCK part of the location field of the SID.
- the remaining parts are 02:22::,03:33::,04:44::,05:55::,06:66::,07:77::,08:88::,09:99 ::,0a:aa::.
- the length of these remaining parts is less than the length of the SID.
- the function field of the SID may also be set to a compressed format, and the function field of the compressed format is smaller than the function field of the uncompressed format.
- all functional fields are divided into two parts: compressed functional fields and non-compressed functional fields.
- FIG. 5 shows the SID including the compressed function field, and the SID including the non-compressed function field.
- the compressed function field is used to indicate frequently used functions
- the non-compressed function field is used to indicate uncommon functions.
- the length of the compressed functional field is less than the length of the non-compressed functional field. For example, the length of the compressed functional field is 16 bits, and the length of the non-compressed functional field is 80 bits.
- the compressed function field is followed by a padding part, and the padding part is the same specific content, so that the length of the entire SID is still 128 bits.
- the filling part may be all zeros. Therefore, in order to reduce the length of the SID, when the function field in the SID is a compressed function field, the padding part after the compressed function field can be omitted to form a USID.
- the SID of the network device 1 in FIG. 1 may be A:1:01:11::, where 11 is a function field, and is a compressed function field, the length is 16 bits, that is, the length of the padding part is 64 bits.
- the padding part after the compressed function field of the SID is omitted, and the remaining part is A:1:01:11, and the length is 64 bits.
- the remaining parts are A:1:02:22, A:1:03:33, A:1:04:44, A:1:05:55, A:1:06:66, A: 1:07:77, A:1:08:88, A:1:09:99, A:1:0a:aa.
- the length of these remaining parts is less than the length of the SID.
- the first bit of the compressed function field and the first bit of the uncompressed function field may be set to different values. Therefore, for the obtained SID, the network device can determine whether the function field of the SID is a compressed function field or an uncompressed function field through the first bit of the function field. For example, the first bit of a compressed functional field is 0, and the first bit of a non-compressed functional field is 1, or the first bit of a compressed functional field is 1, and the first bit of a non-compressed functional field is 1. The bit is 0.
- the length of the remaining part can be further reduced.
- the USID includes the sequence number part of the location field of the SID and the compressed function field.
- the BLOCK part of the SID of the network device 1 in FIG. 1 and the padding part after the compressed function field can be omitted at the same time, and the remaining part is 01:11 and the length is 32 bits.
- network equipment 2 network equipment 3, network equipment 4, network equipment 5, network equipment 6, network equipment 7, network equipment 8, network equipment 9, or network equipment 10 SID location field BLOCK part and compression function
- the padding part after the field can be omitted, and the remaining parts are 02:22,03:33,04:44,05:55,06:66,07:77,08:88,09:99,0a:aa.
- the length of these remaining parts is less than the length of the SID.
- the length of the USID is less than 128 bits.
- the length of the USID is variable.
- the length of the USID is determined by the sum of the length of the sequence number part of the location field of the SID and the length of the compressed function field.
- the length of the USID can be 16 bits, 32 bits, or 64 bits, and so on.
- the compressed function fields of all SIDs have the same length, and all USIDs have the same length.
- SIDs are arranged in sequence according to the order of the corresponding network equipment on the forwarding path, forming a segment list. Replacing the SID in the segment list with the corresponding USID can reduce the length of the segment list, thereby reducing the length of the message and improving network efficiency.
- the space in the segment list is divided into multiple elements, and the SL pointer points to different elements after each update.
- the space occupied by each SID can be divided into one element, that is, the length of each element is 128 bits, and the position pointed to by the SL pointer in the segment list is still offset by 128 bits after each update.
- multiple elements in the segment list can be sorted.
- the element initially pointed to by the SL pointer can be called the first element, and other elements can be deduced by analogy. Since the length of the USID is less than 128 bits, for example, the length of the USID can be 32 bits.
- the network device S stores multiple USIDs, for example, at least two USIDs, in the 128-bit element of the segment list, thereby reducing the segment list
- the BLOCK part of the location field of the SID may be included in the segment list, and the BLOCK part may be included in the first element in the segment list.
- the BLOCK part of the location field of the SID may not be included in the segment list.
- Figure 6 shows the structure of the segment list. For example, when the length of the USID is 32 bits, each element in the segment list stores 4 USIDs. For example, the first element stores USID1, USID2, USID3, and USID4, and the second element stores USID5, USID6, USID7, and USID8.
- the network device S obtains the segment list.
- the segment list corresponds to the forwarding path of the first packet, the forwarding path includes a plurality of network devices, the segment list includes a plurality of identifiers arranged in sequence, and the identifiers in the plurality of identifiers correspond to the plurality of network devices.
- the segment list includes an element with a length of 128 bits, and the element includes at least two adjacent identifiers among the plurality of identifiers.
- the multiple USIDs in the segment list are arranged in sequence according to the order of the corresponding network device on the forwarding path.
- the arrangement of multiple USIDs within the element is not limited. Multiple USIDs can be arranged in order or in reverse order within the element.
- the order of the 4 USIDs stored in the first element can be USID1, USID2, USID3 and USID4 from top to bottom.
- the order of the 4 USIDs can also be USID4, USID3 from top to bottom. , USID2 and USID1.
- the network device that generates the segment list can choose whether to generate the segment list including the USID.
- the network device can publish masks of different lengths, corresponding to compressed function fields and non-compressed function fields, respectively.
- the length of the mask identified by the compressed segment is the sum of the length of the position field in the SID and the length of the compressed function field
- the length of the mask identified by the uncompressed segment is the length of the position field in the SID and the length of the uncompressed function field.
- the length of the mask identified by the compressed segment is less than the length of the mask identified by the uncompressed segment.
- the compressed mask length corresponding to the network device 1 is 64 bits
- the uncompressed mask length corresponding to the network device 1 is 128 bits.
- the network device that generates the segment list obtains the above-mentioned masks of different lengths issued by other network devices.
- the segment list including the USID is bound to the mask of the compressed segment identifier.
- the network device that generates the segment list generates the segment list including the SID, it binds the segment list including the SID with the uncompressed mask. Therefore, after the segment list is encapsulated in the message, the network device that forwards the message can obtain the SID or USID from the segment list by using masks of different lengths.
- the segment list can include USID and other types of identifiers at the same time.
- the other types of identifiers may be SIDs, that is to say, SIDs may still be mixed in the segment list adopting USID.
- SIDs may still be mixed in the segment list adopting USID.
- some network devices may not have the ability to process USIDs.
- the segment list can still store 128-bit SIDs corresponding to these network devices.
- network compatibility is improved.
- the segment list stores the SID9 corresponding to the network device 9, that is, A:1:09:99:: with a length of 128 bits.
- the network device that generates the segment list may decide to put the USID or SID of these network devices in the segment list according to whether other network devices have the ability to process USIDs.
- the network device that generates the segment list may be a controller in the network, or an ingress node of a packet forwarding path, for example, the network device S shown in FIG. 1.
- the network device S obtains a compression capability flag corresponding to the network device 9, and the compression capability flag is used to indicate whether the network device 9 has the ability to process the USID.
- the network device S stores the USID corresponding to the network device 9 in the generated segment list.
- the network device S stores the SID corresponding to the network device 9 in the generated segment list.
- a prompt flag is included in the previous USID identified by the segment in the segment list, and the prompt flag is used to indicate the current USID
- the latter identifier is an SID with a length of 128 bits.
- the prompt flag may be included in the compressed function field part of the USID.
- two associated compressed function fields can be set for each USID. When the reminder flag is included in the USID, one of the compressed function fields is used, and when the reminder flag is not included in the USID, the other compressed function field is used. Field. As shown in Fig. 6, two associated compressed function fields can be set for USID8, 87 and 88 respectively.
- the reminder flag may be included in the USIDs other than the last USID among the consecutive multiple USIDs, that is, the reminder flag
- the prompt flag may be included in the compressed function field part of the USID.
- two associated compressed function fields can be set for each USID. When the reminder flag is included in the USID, one of the compressed function fields is used, and when the reminder flag is not included in the USID, the other compressed function field is used. Field. As shown in Fig. 6, two associated compressed function fields can be set for USID7, 77 and 78 respectively.
- a reminder flag can be set at a fixed length every interval.
- the reminder flag is used to indicate the type of the identifier in the next fixed length, that is, to indicate the next fixed length.
- the fixed length may be 128 bits.
- the prompt mark may be located in the last mark in the fixed length, and the prompt mark may also be an independent mark, which is not included in any mark corresponding to the network device.
- the different values of the prompt flag correspond to different types of identifications.
- a reminder flag can be set every 128 bits. The reminder flag is located in the last identifier of the 128 bits.
- the reminder flag in USID8 When the value of the reminder flag in USID8 is 0, it means that the type of the identifier in the next 128 bits is SID, specifically, the next 128 bits are identified as SID9, and when the value of the prompt flag in USID4 is 1, it means that the type identified in the next 128 bits is USID, specifically, the next 128 bits are identified as USID5 , USID6, USID7 and USID8.
- a reminder flag may also be set at a fixed length every interval, and the reminder flag is used to indicate whether the next fixed length still belongs to the current identifier. Therefore, the boundary of the current identification can be determined according to the prompt flag, and then the current identification is determined as an SID with a length of 128 bits or a USID with a length of less than 128 bits.
- the fixed length may be 32 bits.
- the fixed length can also be 8 bits, 16 bits, and so on.
- the reminder flag may be located in one bit position.
- the prompt flag may be located in the first bit or the last bit in the fixed length. As shown in Figure 6, a reminder flag can be set every 32 bits.
- the reminder flag is located in the last bit of the 32 bits.
- the value of this bit is 1, it means that the next fixed length still belongs to the current flag, and When the value of this bit is 0, it means that the next fixed length no longer belongs to the current identifier.
- the value of the last bit is 0, which means that the following 32 bits no longer belong to the current identity, that is, the following 32 bits are USID8.
- the value of the last bit is 0, which means that the following 32 bits no longer belong to the current identity, that is, the following 32 bits are the first 32 bits of SID9.
- the value of the last bit is 1, indicating that the subsequent 32 bits still belong to the current identity, that is, the subsequent 32 bits are the second 32 bits of SID9.
- the BLOCK part of the SID needs to be placed in the starting position of the next element of the SID in the segment list.
- the segment list stores a 128-bit SID9 corresponding to the network device 9, and the next element in the segment list stores a BLOCK at the start position.
- the BLOCK can be A:1 and the length is 32 bits.
- multiple USIDs are stored in sequence, and after multiple USIDs are stored, if there are still extra bits at the end of the element, these extra bits can be filled. For example, fill these extra bits with all zeros.
- the BLOCK part of the SID of all network devices is the same, but between different domains, the BLOCK part of the SID of the network device is different.
- the BLOCK part of the SID of the network device is different.
- the BLOCK part needs to be placed at the beginning of an element, that is, the BLOCK part is placed at the beginning of the next element of the USID of the previous hop network device, and then after the BLOCK part, put the The USID of the network device.
- Fig. 7 shows a structure of a segment list.
- the network device 9 and the network device 8 belong to different domains, and the SID of the network device 8 is A:1:8:88::,
- the SID of network device 9 is A2:9:99::, that is, the BLOCK part of the SID of network device 8 is A:1, the BLOCK part of the SID of network device 9 is A2, and the USID8 of network device 8 is 8:88.
- the USID9 of device 9 is 9:99.
- the USID9 corresponding to the network device is stored in the next element of USID8, and the BLOCK is stored before USID9.
- the BLOCK is A2 and the length is 32 bits.
- the network device S adds a segment list to the message. Specifically, the network device S adds a segment list to the SRH of the message.
- the message further includes an SL pointer.
- the SRH includes an SL pointer, and the SL pointer points to a certain element in the segment list.
- the intermediate node on the forwarding path adds the SID stored in the element pointed to by the SL pointer to the destination address (DA) field in the IPv6 header of the outer layer of the SRH.
- the SL pointer is used to indicate the element currently to be processed in the segment list.
- the message includes a first pointer, the value of the first pointer is used to indicate the position in the element of the first identifier that needs to be copied into the message header, and the new pointer may be referred to as a PI pointer.
- the SL in the message can become the second pointer.
- the value of the SL pointer is used to indicate the positions of different elements in the segment list, and the value of the PI pointer is used to indicate the positions of different USIDs in the element.
- the intermediate node on the forwarding path can determine the identifier currently to be added in the element of the segment list according to the value of the PI pointer, for example, the USID currently to be added.
- the location of the PI pointer may be in the message header, and the message header may be an SRH or IPv6 message header.
- the PI pointer may be located in the PI field of the SRH, or the PI pointer may be located in the DA field of the IPv6 packet header.
- the PI pointer can also be located in the segment list.
- the PI pointer can be located in the first USID in each element in the segment list.
- the PI pointer may be adjacent to the SL pointer.
- Two adjacent pointers may be located in a specific field of the SRH, such as but not limited to the SL field.
- the PI pointer is part of the SL field in SRH.
- the last few bits in the SL field can be divided into PI pointers, and the other parts in the SL field can be used as SL pointers.
- the last two bits in the SL field can be divided into PI pointers, and the other parts in the SL field can be used as SL pointers. That is, the PI pointer may be the last two bits in the SL field, that is, the least significant bit and the second least significant bit.
- the SL pointer is used to indicate the element currently to be processed in the segment list
- the PI pointer is used to indicate the position of the first identifier that needs to be copied into the message header in the current element to be processed.
- the whole composed of the SL pointer and the PI pointer can also be regarded as a new pointer, and the SL pointer and the PI pointer are respectively part of the new pointer.
- the message may only include a first pointer, and the value of the first pointer is used to indicate the position in the segment list of the first identifier that needs to be copied into the message header.
- the new first pointer may be called For the XL pointer.
- the XL pointer is a one-dimensional pointer.
- the XL pointer may be located in a specific field in the SRH, such as the SL field, that is, the entire SL field may be used as the XL pointer.
- the XL pointer may sequentially point to multiple identifiers in the segment list, and the multiple identifiers may be multiple types of identifiers, such as SID or USID.
- the position pointed to by the XL pointer in the segment list is offset by the length of the identifier corresponding to the segment. For example, when the identifier of the offset is SID, the length is 128 bits, and when the identifier of the offset is USID, the length is less than 128 bits.
- the XL pointer is used to indicate the position of the currently to-be-processed identifier in the segment list.
- the network device S also adds the BLOCK part of the SID to the DA field of the IPv6 header in the message.
- the network device S also adds at least one identifier to the DA field.
- the at least one identification may be multiple identifications.
- the multiple identities can be multiple USIDs, or a combination of USIDs and other types of identities.
- the DA field of the IPv6 header in the message can also be divided into two parts.
- the BLOCK part omitted from the segment list is placed in the first part of the DA field, and at least one identifier is placed in the second part of the DA field.
- the number of at least one identifier added by the network device S in the DA field is determined by the length of the BLOCK and the length of the identifier.
- the network device S adds as many identifiers as possible to the part other than the BLOCK in the DA field.
- the number of multiple USIDs may be the integer part of (128-L BLOCK )/L USID , where L BLOCK is the length of BLOCK and L USID is the length of USID.
- L BLOCK is the length of BLOCK
- L USID is the length of USID.
- 3 USIDs are added to the DA field.
- the number of multiple identifiers including a combination of the USID and other types of identifiers may also be the integer part of (128-L BLOCK )/L USID.
- the length of BLOCK is 32 bits
- the length of USID is 32 bits
- the length of MPLS label is 32 bits
- a combination of 2 USIDs and 1 MPLS label is added to the DA field.
- Figure 9 shows the structure of a message with a segment list and a PI pointer added.
- the PI pointer is located in the PI field of the SRH.
- the network device S adds the BLOCK part of the SID to the DA field.
- 3 USIDs are added.
- the three USIDs are USID1, USID2, and USID3.
- the value of the PI pointer is 3, which means that the first 3 USIDs in this element of the segment list have been added to the DA field.
- the identifier to be added in the element can be determined, that is, the fourth USID, USID4.
- the network device S sends the message.
- the network device S When the network device S sends the message, it will determine the next hop network device of the message according to the content of the DA field and the longest matching rule.
- the DA field includes BLOCK and multiple USIDs arranged in sequence. The combination of BLOCK and the first USID constitutes the SID corresponding to the first USID. Therefore, the determined next-hop network device is the network device corresponding to the first USID.
- the network device S queries the local routing table according to the longest matching rule according to the content in the DA field in the header of the message. Specifically, the part composed of BLOCK+USID1 is A:1:01:11, which is matched with the entries in the routing table, and is successfully matched with SID1, that is, network device S determines that the next hop network device is network device 1, thus The message including the segment list is sent to the network device 1.
- the network device 1 After receiving the message, the network device 1 queries the local segment identification table (local SID table) according to the longest matching rule according to the content of the DA field, and determines the message processing action.
- the DA field includes a BLOCK and multiple USIDs arranged in sequence. The combination of the BLOCK and the first USID constitutes the SID corresponding to the first USID. Therefore, the determined message processing action is the message processing action corresponding to the functional field in the first USID, and can also be referred to as the message processing action corresponding to the first USID.
- a message including a segment list is sent by network device S to network device 1, and network device 1 according to the DA field in the message
- the longest matching rule queries the local segment identification table, and the part consisting of BLOCK+USID1 matches the entry in the local segment identification table successfully, and the network device 1 executes the packet forwarding processing action corresponding to the USID1.
- the message forwarding processing action may include updating the DA field. Specifically, the network device 1 deletes a bit of USID length in the part after the BLOCK in the DA field, moves the remaining part forward, and fills all 0s in the blank part at the end.
- the network device 1 further determines whether the part after the BLOCK in the DA field is all 0. If it is not all 0, the network device 1 queries the local routing table according to the longest matching rule according to the content in the DA field, and continues to forward the message.
- the processing actions of the other intermediate nodes on the message may be the same as the foregoing message processing actions of the network device 1. That is to say, the processing actions of the multiple intermediate nodes on the forwarding path to the message all include updating the DA field and judging whether the part after the BLOCK in the DA field is all 0.
- the network device 1 is updating the DA field, the USID1 after the BLOCK in the DA field is deleted, the rest moves forward, and the blank part at the end is filled with all 0s.
- the DA field includes BLOCK, USID2, and USID3, and the structure of the message is shown in FIG. 11.
- the network device 1 judges that the part after the BLOCK in the DA field is not all 0, and then continues to forward the message.
- the content of the DA field successfully matches the SID of the network device 2 according to the longest matching rule, that is, the part composed of BLOCK+USID2 matches the SID of the network device 2 successfully, and the network device 1 sends the message to the network device 2.
- the network device 2 queries the local segment identification table according to the longest matching rule according to the DA field in the message, and the part consisting of BLOCK+USID2 is matched successfully, and the corresponding message processing action is executed.
- the network device 2 updates the DA field, that is, deletes the USID2 in the DA field, moves the remaining part forward, and fills all 0s in the blank at the end.
- the DA field includes BLOCK and USID3, and the structure of the message is shown in FIG. 12. The network device 2 judges that the part after the BLOCK in the DA field is not all 0, and then continues to forward the message.
- the content of the DA field successfully matches the SID of the network device 3 according to the longest matching rule, that is, the part composed of BLOCK+USID3 matches the SID of the network device 3 successfully, and the network device 2 sends the message to the network device 3.
- the network device 3 receives the message.
- the network device 3 further determines that there is a remaining identifier after the BLOCK in the DA field. If there is no remaining identifier, for example, the part after the BLOCK is all 0, then the network Device 3 needs to continue to copy the ID to the DA field.
- the network device performing the copy action may be referred to as a copy node, that is, the network device 3 is a copy node.
- the copy node determines the position of the first identifier in the first element according to the value of the first pointer.
- the first pointer is the PI pointer
- the first identifier is the identifier currently to be added.
- the network device 3 first determines the current element according to the value of the SL pointer. The network device 3 then determines the current identifier to be added in the current element according to the value of the PI pointer. Determine the current identifier to be added according to the value of the PI pointer. The current identifier to be added is the first identifier.
- the network device 3 queries the local segment identification table according to the longest matching rule according to the DA field in the message, and the part consisting of BLOCK+USID3 matches successfully and executes the corresponding forwarding action.
- the network device 3 updates the DA field, that is, deletes the USID3 in the DA field, moves the remaining part forward, and fills all 0s in the blank at the end.
- only BLOCK is included in the DA field.
- the network device 3 judges that the part after the BLOCK in the DA field is all 0, that is, it needs to add the USID to the DA field.
- the network device 3 determines the current element according to the value of the SL pointer.
- the value of the SL pointer in the message may be 4, and the network device 3 determines that the current element is the first element in the segment list. Furthermore, the network device 3 determines that the current identifier to be added is the fourth USID in the current element, that is, USID4, according to the value of the PI pointer of 3.
- the copy node copies at least one identifier starting from the first identifier to the header of the first message.
- the packet header may be an IPv6 packet header.
- the copy node determines the number of the at least one USID.
- the copy node determines the integer part of (128-L BLOCK )/L USID, and uses the value of the integer part as the quantity of the at least one USID.
- the copy node compares the integer part of (128-L BLOCK )/L USID and the number of remaining USIDs in the current element that are not added to the DA field, and uses the smaller value of the two as the value of the at least one USID Quantity.
- the copy node modifies the value of the PI pointer in the message so that the value of the PI pointer after the modification points to the current identifier to be added in the segment list.
- the identifier to be added may be referred to as a third identifier, and the third identifier may be the next identifier of the last USID in the at least one USID in the segment list.
- the identifier to be added may be a USID, which is located in the next element of the current element in the segment list, that is, all USIDs in the current element have been added to the DA field.
- the USID may be the first USID in the latter element.
- the value of the modified PI pointer is used to indicate the position of the USID in the latter element.
- the value of the modified PI pointer may be 0.
- the copy node modifies the value of the SL pointer in the message so that the modified value of the SL pointer points to the next element of the current element in the segment list .
- the network device 3 determines that the identifier currently to be added is USID4. In addition, the network device 3 determines that the number of remaining USIDs that are not added to the DA field in the current element is 1, that is, there is only USID4. Since the length of the USID is 32 bits and the length of the BLOCK is 32 bits, the integer part of (128-L BLOCK )/L USID is 3, which is greater than the number of remaining USIDs. Therefore, the network device 3 determines that the number of at least one USID to be added to the DA field is one. The network device 3 adds the USID4 to the DA field of the IPv6 header of the message, and the message structure at this time is shown in FIG. 14.
- the network device 3 modifies the value of the SL pointer in the message by subtracting the value of the SL pointer by 1, and the modified value of the SL pointer is 3, pointing to the segment list The second element in.
- the network device 3 modifies the value of the PI pointer, and the modified PI pointer value is 0, which points to the first USID in the second element, that is, USID5.
- the network device 3 sends the message.
- the message continues to be forwarded along the forwarding path, and the intermediate node on the forwarding path continues to update the DA field in the message.
- the copy node on the forwarding path continues to update the DA field in the message. For example, after at least one USID added in the DA field is processed, the copy node will continue to add at least one identifier starting from the current identifier to be added to the DA field of the message according to the value of the PI pointer.
- the at least one identifier starting from the current identifier to be added may be a USID.
- the processing procedure of the copy node is similar to the above description, and will not be repeated here.
- the at least one USID is multiple USIDs.
- the at least one USID is a plurality of USIDs, the plurality of USIDs are adjacent to each other in the segment list.
- the copy node modifies the value of the PI pointer in the message, so that the value of the PI pointer after the modification points to the identifier currently to be added.
- the current to be added The identifier of is the next identifier of the last USID in the at least one USID in the segment list.
- the currently to-be-added identifier may be a USID, and both the USID and the at least one USID may be located in the current element.
- the value of the modified PI pointer is used to indicate the position of the USID in the current element.
- the currently to-be-added identifier may be a USID, which is located in the next element of the current element in the segment list, that is, all USIDs in the current element have been added to the DA field.
- the USID may be the first USID in the latter element.
- the value of the modified PI pointer is used to indicate the position of the USID in the latter element.
- the value of the modified PI pointer may be 0.
- the copy node modifies the value of the SL pointer in the message so that the modified value of the SL pointer points to the next element of the current element in the segment list .
- the network device 4 receives the message, and processes the message according to BLOCK+USID4 in the DA field. In addition, the network device 4 updates the DA field, deletes the USID4 in the DA field, moves the remaining part forward, and fills all 0s in the blank part at the end. At this time, only BLOCK is included in the DA field. Then the network device 4 is a copy node. The network device 4 judges that the part after the BLOCK in the DA field is all 0, and the network device 4 continues to add an identifier to the DA field of the message.
- the network device 4 determines that the current element is the second element in the segment list according to the value of the SL pointer in the message, and determines that the current identifier to be added is the first USID in the second element according to the value of the PI pointer, that is, USID5 .
- the network device 4 determines that the integer part of (128-L BLOCK )/L USID is 3, determines that the number of remaining USIDs that are not added to the DA field in the current element is 4, and uses the smaller value of the two, that is, 3 as the addition To the number of USIDs in the DA field.
- the network device 4 adds three USIDs starting with USID5 to the DA field, and the three USIDs are USID5, USID6, and USID7.
- the message structure at this time is shown in FIG. 15.
- the network device 4 modifies the value of the PI pointer so that the value of the PI pointer points to the USID to be added, that is, USID8.
- the message continues to be forwarded to the network device 8 through the network device 5, the network device 6, and the network device 7.
- the message processing actions of these network devices are similar to those of the network device 1, the network device 2, the network device 3, and the network device 4.
- the network device 7 is also a copy node, which will not be repeated here.
- the at least one identifier starting from the current identifier to be added may be an SID with a length of 128 bits.
- the prompt identifier is included in the previous USID of the SID in the segment list.
- the copy node processes the previous USID, it can determine that the next identifier of the USID is an SID with a length of 128 bits according to the prompt flag.
- the copy node adds an SID with a length of 128 bits to the DA field of the message. In other words, the BLOCK part in the DA field will also be covered.
- the copy node modifies the value of the PI pointer in the message, so that the value of the PI pointer after the modification points to the identifier currently to be added.
- the current to be added The identifier of is the next identifier of the last USID in the at least one USID in the segment list.
- the currently to-be-added identifier may be an SID with a length of 128 bits.
- the SID occupies all the space in an element, for example, the value of the PI pointer after modification may be 0.
- the network device 8 is also a copy node.
- the network device 8 receives the message, processes the message according to the BLOCK+USID8 in the DA field, finds that the USID8 includes a prompt flag, and determines that the next identifier of the USID8 in the segment list is an SID with a length of 128 bits.
- the network device 8 determines that the current element is the third element in the segment list according to the value of the SL pointer in the message, and adds the SID in this element to the DA field, that is, adds SID9 to the DA field.
- the message structure at this time is As shown in Figure 16.
- the message may only include the XL pointer.
- the network device S adds at least one identifier to the DA field, and the identifier may be a USID.
- the copy node determines the position of the first identifier in the segment list according to the value of the XL pointer, and copies at least one identifier starting from the first identifier to the header of the first message. Specifically, The copy node adds at least one identifier starting from the first identifier to the DA field.
- the copy node modifies the value of the XL pointer in the message, so that the modified value of the XL pointer still points to the current identifier to be added in the segment list.
- at least one identifier starting from the first identifier is an identifier, that is, the first identifier, that is, each time it is added to the DA field
- the number of identifiers in can be one, and the position pointed to by the XL pointer in the segment list is offset by the length of one identifier at a time.
- the network device S adds the BLOCK part of the SID in the DA field, and after the BLOCK in the DA field, adds 1 USID, that is, USID1.
- the value of the XL pointer can be modified before or after the USID is added.
- the network device S sets the XL pointer in the message to point to USID2, which indicates that the current identifier to be added is USID2 in the segment list.
- the network device S queries the local routing table according to the longest matching rule according to the content in the DA field in the message header of the message.
- the part composed of BLOCK+USID1 is A:1:01:11, which is matched with the entries in the routing table, and is successfully matched with SID1, that is, network device S determines that the next hop network device is network device 1, thus The message including the segment list is sent to the network device 1.
- network device 1 queries the local segment identification table according to the longest matching rule. If the part consisting of BLOCK+USID1 matches the entry in the local segment identification table successfully, then network device 1 executes the corresponding USID1 Message processing action.
- the network device corresponding to each identifier in the segment list is a copy node, that is, the network device 1 is also a copy node.
- the network device 1 determines the position of the currently to be added USID2 in the segment list according to the value of the XL pointer, and copies the USID2 into the DA field.
- the network device 1 modifies the value of the XL pointer in the message, and the modified XL pointer points to USID3, that is, indicates that the current identifier to be added is USID3 in the segment list.
- the message continues to be forwarded to network device 10 through network device 3, network device 4, network device 5, network device 6, network device 7, network device 8, and network device 9.
- the message processing actions of these network devices are respectively the same as those of network devices.
- the device 1 is similar and will not be repeated here.
- the segment list can include USID and other types of identifiers at the same time.
- the other type of identification may be an MPLS label or an IPv4 address, that is to say, an MPLS label or an IPv4 address may also be mixed in the list of segments using the USID.
- some network devices may not support SRv6, but can support MPLS, or can support IPv4.
- the segment list directly stores the MPLS labels or IPv4 addresses corresponding to these network devices . Thereby, network compatibility is improved, and network efficiency is improved.
- the network device S sends a message to the network device 10, and the forwarding path of the message sequentially passes through the network device 1, the network device 2, the network device 3, the network device 4, the network device 5, and the network device 6. , Network equipment 7, network equipment 8, network equipment 9. Among them, network device 3, network device 4, network device 5, and network device 6 do not support SRv6, but can support MPLS.
- the USID and MPLS label and/or IPv4 address are arranged in sequence according to the order of the corresponding network device on the forwarding path.
- the length of each MPLS label can be 32 bits, and the length of each IPv4 address can also be 32 bits.
- the length of the MPLS label or IPv4 address can be the same as the length of the USID, or it can be different from the length of the USID.
- Figure 8 shows the structure of the segment list at this time. Since network equipment 3, network equipment 4, network equipment 5, and network equipment 6 do not support SRv6, but can support MPLS, the segment list can be stored corresponding to these network equipment.
- MPLS labels namely M3, M4, M5 and M6.
- the segment list also stores the USID or SID corresponding to other network devices.
- the length of the MPLS label is 32 bits, which is the same length as the USID.
- these MPLS labels can be stored in one element with the USID. As shown in Figure 8, the first element in the segment list contains USID1, USID2, M3 and M4, and the second element stores M5, M6, USID7 and USID8. .
- the storage method of IPv4 addresses is similar to that of MPLS labels, so I won't repeat them here.
- the network device S adds a handover flag to the message, and the handover flag may be located in the segment list.
- the handover flag may be located in a specific identifier in the segment list, and the specific identifier is called, for example, the second identifier.
- the second identifier may be in the previous USID of the first MPLS label or IPv4 address.
- the handover flag may be an independent identifier that is added between the last USID and the first MPLS label or IPv4 address.
- the switch flag is used to indicate that the next identifier in the segment list will include the MPLS label and/or IPv4 address, so that when the network device reads the previous USID, it can determine that the USID is at the end of the segment list.
- An identifier will include an MPLS label and/or IPv4 address. The specific process will be described in detail below.
- the network device S when the network device S adds at least one identifier to the DA field, the network device S will determine whether each of the added at least one identifier includes the handover flag, and if a certain identifier includes Switching the flag, the network device S will not add the last flag of this flag to the DA field after adding this flag to the DA field.
- at least one identifier added to the DA field is all USID, and does not include other types of identifiers.
- the network device S when the segment list includes MPLS labels and/or IPv4 addresses, the network device S also adds a quantity flag to the message, and the value of the quantity flag is used to indicate the number of MPLS labels and/or IPv4 addresses in the segment list .
- the position of the quantity indicator may be in the message header, and the message header may be an SRH or an IPv6 message header.
- the quantity flag may be located in a specific field of the SRH, or the quantity flag may be located in the DA field of the IPv6 packet header.
- the quantity flag can also be located in the segment list.
- the quantity indicator when the segment list includes consecutively arranged multiple MPLS labels or IPv4 addresses, the quantity indicator may be located in the previous USID of the first MPLS label or IPv4 address.
- the PI pointer is used to indicate the positions of different USIDs, MPLS labels or IPv4 addresses in this element.
- the switching flag and the number flag may be the same flag, that is, the number flag also functions as a switching flag.
- the segment list includes multiple MPLS labels or IPv4 addresses arranged consecutively, and the number flag may be located in the previous USID of the first MPLS label or IPv4 address.
- FIG. 10 shows the structure of the message with the segment list and PI pointer added, and the segment list includes the MPLS label.
- the network device S adds the BLOCK part of the SID to the DA field. After the BLOCK in the DA field, add 2 USIDs and 1 MPLS label. As shown in Figure 10, two USIDs are USID1 and USID2, and one MPLS label is M3.
- the value of the PI pointer is 3, which means that the first 3 identifiers in this element of the segment list have been added to the DA field. According to the value of the PI pointer, the identifier to be added in the element, namely M3, can be determined, and the specific content will be described in detail below.
- intermediate nodes on the forwarding path can copy other types of identifiers to the forwarding identifier stack in the message, and the forwarding identifier The stack is used to guide message forwarding.
- the intermediate node that performs the above copy behavior may be called a copy node.
- the copy node on the forwarding path processes the current USID, it can determine that the latter identifier in the segment list will include the MPLS label or the IPv4 address through the above-mentioned switching flag or the number flag. At this time, the current identifier to be added should be the first MPLS label or IPv4 address. The copy node then determines the first MPLS label or IPv4 address according to the value of the PI pointer.
- the copy node can directly determine the first MPLS label or IPv4 address in the segment list according to the value of the PI pointer.
- the copy node may respectively obtain other identifiers that have been added to the DA field and other identifiers that have not been added to the DA field.
- the copy node can also determine the number N of MPLS labels or IPv4 addresses that have been added to the DA field, where N is an integer, and then the value of the PI pointer can be corrected according to the value of the PI pointer and the number N.
- the value of the subsequent PI pointer determines the first MPLS label or IPv4 address in the segment list. Specifically, the copy node corrects the value of the PI pointer by subtracting the value of the number N from the value of the PI pointer.
- the above process can also be regarded as the rollback of the PI pointer in the segment list.
- the DA field in the message includes BLOCK, USID2, and M3, and the USID2 includes a quantity flag, and the value of the quantity flag can be 4.
- the value of the PI pointer in the message can be 3.
- the foregoing copy node may be the network device 2.
- the network device 2 queries the local segment identification table according to the longest matching rule according to the DA field in the message, the part consisting of BLOCK+USID2 matches successfully, and executes the corresponding forwarding action.
- the network device 2 processes the current USID2, it is determined by the number flag included in the USID2, the USID2 will include the MPLS label in the latter identifier in the segment list, and the number of MPLS labels is 4. At this time, the current identifier to be added should be the first MPLS label.
- Network device 2 determines that the current USID2 is not the last USID in the DA field, there are 32 non-zero bits after USID2 in the DA field, and there is an MPLS label after USID2, which means that the first MPLS label has been added To the DA field.
- the network device 2 determines that the value of the PI pointer after the correction should be 2 according to the value of the PI pointer of 3 and the number of MPLS labels that have been added to the DA field as 1.
- the first An MPLS label should be the third identifier in the current element, that is, M3.
- the copy node when the at least one identifier starting from the first identifier is at least one other type of identifier, such as an MPLS label or an IPv4 address, the copy node adds these other types of identifiers to the second message
- the header is used to form a forwarding identification stack, such as an MPLS label stack or an IPv4 address stack.
- the copy node can obtain other identifiers that have been added to the DA field and other identifiers that have not been added to the DA field. , And add the other identifiers of these two parts to the second message header to form a forwarding identifier stack; optionally, the copy node can also determine the first one in the segment list according to the value of the corrected PI pointer. The location of other types of identifiers to obtain all other types of identifiers from the segment list.
- the copy node determines the number of the at least one MPLS label or IPv4 address.
- the intermediate node uses the value of the quantity flag as the quantity of the at least one MPLS label or IPv4 address.
- the at least one MPLS label or IPv4 address corresponds to at least one network device supporting MPLS or IPv4.
- the message may enter the SRv6 network again.
- these USIDs can be copied into the DA field by the intermediate node.
- these USIDs can also be copied into the DA field by the last network device among the at least one network device supporting MPLS or IPv4.
- the copy node modifies the value of the PI pointer in the message to make the value of the PI pointer after modification It points to other identifiers in the segment list, and this other identifier may be called a third identifier, for example.
- the third identifier may be the next identifier in the segment list of the last USID among the above-mentioned USIDs copied into the DA field.
- the third identifier may be located in the same element in the segment list as the last USID, or may be located in a different element in the segment list from the last USID.
- the first element and the second element may be the same or different.
- the copy node also modifies the value of the SL pointer in the message, so that the modified SL pointer points to the second element.
- the second element may be the next element of the first element in the segment list.
- the above-mentioned copy node may be the network device 2, and the structure of the message received by the network device 2 is shown in FIG. 13.
- the network device 2 determines that the first MPLS label should be the third identifier in the current element, that is, M3.
- the network device 2 determines that the number of the at least one MPLS label to be added to the DA field is 4 according to the value of the number flag.
- the network device 2 establishes an MPLS packet header outside the IPv6 packet header of the packet, and the MPLS packet header includes a forwarding identification stack, that is, an MPLS label stack.
- the network device 2 adds 4 MPLS labels starting with M3 to the MPLS label stack.
- the 4 MPLS labels include M3, M4, M5, and M6.
- the network device 2 copies at least one USID after M6 in the segment list into the DA field. Specifically, the network device 2 copies USID7 and USID8 into the DA field.
- network device 2 modifies the value of the SL pointer, the value of the modified SL pointer is 2, which points to the third element in the segment list, and the network device 2 modifies the value of the PI pointer, and the value of the modified PI pointer is 0. Point to the first identifier in the third element, namely SID9. At this time, the structure of the message is shown in Figure 17.
- the network device 2 forwards the message to the network device 3 according to the top label of the MPLS label stack in the MPLS message header, that is, M3.
- M3 on the top of the MPLS label stack is popped out, and M4 becomes the label on the top of the stack.
- the network device 3 forwards the message to the network device 4 according to M4.
- the message then arrives at the network device 4, the network device 5, and the network device 6 in sequence.
- the specific process is similar to the above description, and will not be repeated here.
- the MPLS header in the message is stripped.
- the network device 6 supports both MPLS and SRv6.
- the network device 6 continues to forward the message according to the DA field in the IPv6 header of the message. Referring to the message structure shown in FIG. 17, the DA field includes BLOCK, USID7, and USID8. Thus, the network device 6 forwards the message to the network device 7.
- the specific process is similar to the above description, and will not be repeated here.
- the above is an example of the processing procedure of the MPLS label.
- the processing procedure of the IPv4 address is similar to the above description, and will not be repeated here.
- the embodiment of the present invention provides a method for forwarding a message.
- Figure 18 shows a method flow chart of this method.
- the method involves a network device 401 and a network device 402.
- the network device 401 may be a network entry device in the network, and is used to encapsulate the segment list of the forwarding path of the corresponding message in the message, for example, the network device S shown in FIG. 1.
- the network device 402 may be a forwarding device in the network.
- the network device 402 is the copy node in the above-mentioned embodiment, for example, the network device 3, the network device 4, the network device 7, the network device 8 or the network device shown in FIG. Device 9, or, network device 2 shown in Figure 1.
- the steps of the method include:
- S410 The network device 401 receives the message.
- the network device 401 obtains the segment list.
- the segment list corresponds to the forwarding path of the first packet, the forwarding path includes a plurality of network devices, the segment list includes a plurality of identifiers arranged in sequence, and the identifiers in the plurality of identifiers correspond to the A network device among a plurality of network devices or a link in the forwarding path, the segment list includes an element with a length of 128 bits, and the element includes at least two adjacent identifiers among the plurality of identifiers .
- the network device 401 adds the segment list to the message, the segment list includes a first pointer, the value of the first pointer is used to indicate the position of the first identifier in the element, and the first identifier is Said at least one of the two logos.
- the network device 401 may be a network entry device in the network, and the network device 401 is an entry node of the forwarding path of the packet, for example, the network device S shown in FIG. 1.
- the network device S shown in FIG. 1.
- the network device 402 receives the message.
- the message header of the message includes a list of segments for forwarding the message, and the segment list includes a plurality of identifiers arranged in sequence, and each identifier of the plurality of identifiers corresponds to a network device or a network device.
- the segment list includes a first element with a length of 128 bits, the first element includes at least two adjacent identifiers among the plurality of identifiers, and the first message includes a first pointer.
- the network device 402 determines the position of the first identifier in the first element according to the value of the first pointer.
- S470 The network device 402 copies at least one identifier starting from the first identifier into a header of the message.
- S480 The network device 402 sends the message.
- the network device 402 may be a copy node of the forwarding path of the message, that is, the network device 402 is an intermediate node that copies at least one identifier to the message.
- the at least one identifier copied by the network device 402 may be a USID, an MPLS label or an IPv4 address.
- the network device 402 may be the network device 2, the network device 3, the network device 4, the network device 7, the network device 8 or the network device 9 in 1.
- the network device 2 refer to the description of the network device 2, the network device 3, the network device 4, the network device 7, the network device 8 or the network device 9 in the foregoing embodiment, and the similarities are not repeated here.
- the forwarding path of the message can be generated by the controller or the ingress node of the forwarding path.
- the controller When the controller generates the forwarding path of the message, the controller will also generate a segment list corresponding to the forwarding path, and the segment list may be a segment list including the USID.
- the controller sends the segment list to the entry node of the forwarding path.
- the ingress node of the forwarding path After receiving the message, the ingress node of the forwarding path determines the forwarding path of the message from the several forwarding paths stored in the device, and determines the segment list corresponding to the forwarding path. Encapsulate the segment list into the message for forwarding the message.
- the embodiment of the present invention provides a method for forwarding a message.
- Figure 19 shows a method flow chart of this method.
- the method involves network device 301, network device 302, and network device 303.
- the network device 301 may be a controller in the network, which is used to calculate the forwarding path of the packet and generate a segment list corresponding to the forwarding path.
- the network device 302 may be a network entry device for encapsulating a segment list in a message, for example, the network device S shown in FIG. 1.
- the network device 303 may be a forwarding device in the network for forwarding packets according to the segment list.
- the network device 303 may be the copy node in the above-mentioned embodiment, for example, the network device 2, the network device 3, and the network device 3 shown in FIG. Network device 4, network device 7, network device 8, or network device 9.
- the steps of the method include:
- the network device 301 determines a packet forwarding path, where the forwarding path includes multiple network devices.
- the network device 301 may be a controller in the network.
- the controller calculates the forwarding path used to forward the message.
- the network device 301 generates the segment list corresponding to the forwarding path, the segment list includes the plurality of identifiers arranged in sequence, and each identifier of the plurality of identifiers corresponds to the plurality of networks respectively.
- the network device 301 obtains multiple segment identifiers, and the multiple segment identifiers correspond to at least one network device of the multiple network devices or at least one link in the forwarding path.
- the controller obtains the SID of each network device on the forwarding path.
- the network device 301 obtains multiple identifiers according to the multiple segment identifiers, and the multiple identifiers are mapped to the multiple segment identifiers one by one.
- the controller can convert multiple SIDs into multiple USIDs, and multiple USIDs are mapped to multiple SIDs one by one. Specific methods include omitting the BLOCK part of the SID and/or setting the function field of the SID to a compressed format. For the specific process, refer to the description of step S420, and the similarities will not be repeated.
- the network device 301 generates the segment list corresponding to the forwarding path, the segment list includes the plurality of identifiers arranged in sequence, the segment list includes an element with a length of 128 bits, and the element includes the plurality of identifiers. At least two adjacent marks in the marks. For example, the controller puts multiple USIDs instead of multiple SIDs into the segment list, thereby reducing the length of the segment list.
- the space in the segment list can be divided into multiple elements, and the length of each element can be 128 bits. At least two USIDs can be stored in each element. For the specific process, refer to the description of step S420, and the similarities will not be repeated.
- S320 The network device 301 sends the segment list to the network device 302.
- the network device 302 is a network device in the network, and the network device 302 is an entry node of the forwarding path of the message, for example, the network device S shown in FIG. 1.
- the network device 302 obtains a segment list, the segment list corresponding to the forwarding path of the message, and the segment list includes a plurality of identifiers arranged in sequence, and each identifier of the plurality of identifiers corresponds to one of the plurality of network devices Of a network device.
- S325 The network device 302 receives the message.
- the network device 302 receives the message and determines the forwarding path of the message.
- the network device 302 may find a forwarding path for forwarding the message from a plurality of stored forwarding paths, so as to determine the forwarding path of the message.
- the stored multiple forwarding paths may be received by the network device 302 from the controller.
- the network device 302 adds the segment list to the message, the segment list includes the first pointer, and the value of the first pointer is used to indicate the position of the first identifier in the element.
- An identifier is one of the at least two identifiers.
- step S330 For the specific process of step S330, reference may be made to the description of step S430, and the similarities will not be repeated.
- S335 The network device 302 sends the message.
- step S33 For the specific process of step S335, refer to the description of step S440, and the similarities will not be repeated.
- S340 The network device 303 receives the message.
- step S340 For the specific process of step S340, reference may be made to the description of step S450, and the similarities will not be repeated.
- the network device 303 determines the position of the first identifier in the first element according to the value of the first pointer.
- the first pointer is the newly added PI pointer described above.
- step S345 For the specific process of step S345, reference may be made to the description of step S460, and the similarities will not be repeated.
- the network device 303 copies at least one identifier starting from the first identifier into a header of the message.
- step S350 For the specific process of step S350, refer to the description of step S470, and the similarities will not be repeated.
- step S355 For the specific process of step S355, refer to the description of step S480, and the similarities will not be repeated.
- FIG. 20 is a schematic structural diagram of a device 400 provided by an embodiment of the present application. Any network device in Figure 1 can be implemented by the device shown in Figure 20.
- the network device 401 and the network device 402 in the embodiment shown in FIG. 18, and the network device 301, the network device 302, and the network device 303 in the embodiment shown in FIG. 19 may be implemented by the device shown in FIG. 20.
- the device 2000 includes at least one processor 2001, a communication bus 2002, and at least one communication interface 2004.
- the device 2000 may further include a memory 2003.
- the processor 2001 and the processor 1502 can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and an on-site A field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various logical blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention.
- the processor may also be a combination for realizing computing functions, for example, including a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on. .
- the processor can be used to generate a list of segments, or process the received message, and continue to forward the processed message through the communication interface. To implement the method provided in the embodiment of the present application.
- the processor can be used to generate a segment list, so that the network device can forward the corresponding message according to the segment list.
- the processor can be used to add a segment list to the received message, so that subsequent network devices can follow the segment list in the message The message is forwarded, and the specific function implementation can refer to the processing part of the network entrance device in the method embodiment.
- the forwarding device in the network in FIG. 1 is implemented by the device shown in FIG. 20
- the processor can be used to forward the message according to the segment list in the message
- the specific function implementation can refer to the method implementation The processing part of the forwarding device in the example.
- the communication bus 2002 is used to transfer information between the processor 2001, the communication interface 2004, and the memory and 2003.
- the bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
- PCI peripheral component interconnect
- EISA extended industry standard architecture
- the bus can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used to represent in FIG. 20, but it does not mean that there is only one bus or one type of bus.
- the memory 2003 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions
- the dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be used by a computer Any other media accessed, but not limited to this.
- the memory 2003 may exist independently, and is connected to the processor 2001 through a communication bus 2002.
- the memory 403 may also be integrated with the processor 2001.
- the memory 2003 is used to store program codes or instructions for executing the solutions of the present application, and the processor 2001 controls the execution.
- the processor 2001 is configured to execute the program code stored in the memory 2003.
- One or more software modules can be included in the program code.
- the processor 2001 itself may also store program codes or instructions for executing the solutions of the present application.
- the communication interface 2004 uses any device such as a transceiver to communicate with other devices or communication networks.
- the communication network may be Ethernet, wireless access network (RAN), or wireless local area networks (WLAN).
- the communication interface 2004 may be used to receive messages sent by other nodes in the segment routing network, and may also send messages to other nodes in the segment routing network.
- the communication interface 2004 may be an Ethernet interface (Ethernet) interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, or an asynchronous transfer mode (Asynchronous Transfer Mode, ATM) interface.
- the device 2000 may include multiple processors, such as the processor 2001 and the processor 2005 shown in FIG. 20.
- 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. 21 is a schematic structural diagram of a device 2100 provided by an embodiment of the present application. Any network device other than the controller in FIG. 1 can be implemented by the device shown in FIG. 21.
- the network device 401 and the network device 402 in the embodiment shown in FIG. 18, and the network device 302 and the network device 303 in the embodiment shown in FIG. 19 may be implemented by the device shown in FIG. 21.
- the device 2100 includes a main control board and one or more interface boards, and the main control board is in communication connection with the interface board.
- the main control board is also called the main processing unit (MPU) or the route processor card.
- MPU main processing unit
- the main control board is responsible for the control and management of each component in the device 2100, including routing calculation, device management and maintenance functions .
- the interface board is also called a line processing unit (LPU) or a line card (line card), and is used to forward data.
- the device 2100 may also include a switching network board.
- the switching network board is in communication connection with the main control board and the interface board.
- the switching network board is used to forward data between the interface boards.
- the switching network board may also be called a switching network. Board unit (switch fabric unit, SFU).
- the interface board includes a central processing unit, a memory, a forwarding chip, and a physical interface card (PIC).
- the central processing unit is respectively communicatively connected with the memory, the network processor and the physical interface card.
- the memory is used to store the forwarding table.
- the forwarding chip is used to forward the received data frame based on the forwarding table stored in the memory. If the destination address of the data frame is the address of the device 2100, the data frame is sent to the CPU for processing; if the destination address of the data frame is not the address of the device 2100 Address, the next hop and outbound interface corresponding to the destination address are found from the forwarding table according to the destination address, and the data frame is forwarded to the outbound interface corresponding to the destination address.
- the forwarding chip may be a network processor (NP).
- the PIC 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 forwarding the data frame to the forwarding chip for processing after legality checking.
- the central processing unit can also perform the function of a forwarding chip, such as realizing software forwarding based on a general-purpose CPU, so that no forwarding chip is required in the interface board.
- the communication connection between the main control board, the interface board, and the switching network board can be realized through a bus.
- the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
- the device 2100 includes a control plane and a forwarding plane.
- the control plane includes a main control board and a central processing unit.
- the forwarding plane includes various components that perform forwarding, such as memory, PIC, and NP.
- the control plane performs functions such as routers, generation of forwarding tables, processing of signaling and protocol messages, configuration and maintenance of the state of PE1.
- the control plane delivers the generated forwarding tables to the forwarding plane.
- the NP is based on the control plane’s
- the forwarding table looks up and forwards the message received by the PIC of the device 2100.
- the forwarding table issued by the control plane can be stored in the memory. In some embodiments, the control plane and the forwarding plane may be completely separated and not on the same device.
- FIG. 22 shows a schematic diagram of a possible structure of the network device involved in the foregoing embodiment.
- the network device 1400 can implement the functions of the network device 402 or the network device 303 in the foregoing embodiment.
- the network device 1400 includes: a receiving unit 1401, a processing unit 1402, and a sending unit 1403. These units can perform the corresponding functions of the network device 402 or the network device 303 in the foregoing method. for example,
- the receiving unit 1401 is configured to receive a first message.
- the first message header of the first message includes a segment list used to forward the first message, and the segment list includes a plurality of segments arranged in sequence.
- the identifier in the plurality of identifiers corresponds to a network device or a link
- the segment list includes a first element with a length of 128 bits
- the first element includes adjacent ones of the plurality of identifiers. At least two identifiers
- the first message includes a first pointer and a second pointer.
- the processing unit 1402 is configured to determine the position of the first element in the segment list according to the value of the second pointer, and determine that the first identifier is in the first element according to the value of the first pointer
- the first identifier is one of the at least two identifiers; the at least one identifier starting with the first identifier is copied to the second header of the first message to Generate the second message.
- the sending unit 1403 is configured to send the second message.
- the network device 1400 can also be implemented by the device shown in FIG. 20. At this time, the network device 1400 includes: at least one processor, a communication bus, and at least one communication interface. Optionally, the network device 1400 may further include a memory.
- the processor in the network device 1400 is configured to receive a first message through a communication interface, and the first message header of the first message includes a list of segments used to forward the first message, so
- the segment list includes a plurality of identifiers arranged in sequence, and each identifier of the plurality of identifiers corresponds to a network device or a link, and the segment list includes a first element with a length of 128 bits.
- the element includes at least two adjacent identifiers among the plurality of identifiers, and the first message includes a first pointer; the first identifier in the first element is determined according to the value of the first pointer.
- the first identifier is one of the at least two identifiers; at least one identifier starting with the first identifier is copied to the second header of the first message to generate The second message; the second message is sent through the communication interface 1503.
- the processes S450, S460, S470, and S480 please refer to the detailed descriptions of the processes S340, S345, S350, and S355 in the foregoing embodiment, which will not be repeated here.
- the communication interface in the network device 1400 is used for the network device 1400 to receive and send messages through the network system.
- the specific process please refer to the detailed descriptions of S450, S480, S340, and S355 in the foregoing embodiment, which will not be repeated here.
- the network device 1400 can also be implemented by the device shown in FIG. 21.
- the network device 1400 includes a main control board and one or more interface boards, and the main control board is in communication connection with the interface board.
- the main control board is in communication connection with the interface board.
- FIG. 23 shows a schematic diagram of a possible structure of the network device involved in the foregoing embodiment.
- the network device 1600 can implement the functions of the network device 401 or the network device 302 in the foregoing embodiment.
- the network device 1600 includes: a receiving unit 1601, a processing unit 1602, and a sending unit 1603. These units can perform the corresponding functions of the network device 401 or the network device 302 in the above method. for example,
- the receiving unit 1601 is configured to receive the first message.
- the processing unit 1602 is configured to obtain a segment list, the segment list corresponding to a forwarding path of the first packet, the forwarding path includes a plurality of network devices, the segment list includes a plurality of identifiers arranged in sequence, the The identifier in the plurality of identifiers corresponds to a network device in the plurality of network devices or a link in the forwarding path, the segment list includes a first element with a length of 128 bits, and the first element includes At least two adjacent identifiers among the plurality of identifiers; adding the segment list to the first message to generate a second message, the second message including a first pointer, the first The value of the pointer is used to indicate the position of the first identifier in the first element, and the first identifier is one of the at least two identifiers.
- the sending unit 1603 is configured to send the second message.
- the network device 1600 can also be implemented by the device shown in FIG. 20.
- the network device 1600 includes: at least one processor, a communication bus, and at least one communication interface.
- the network device 1600 may further include a memory.
- the processor in the network device 1600 is configured to receive a first message through a communication interface; obtain a segment list, the segment list corresponds to a forwarding path of the first message, and the forwarding path includes a plurality of A network device, the segment list includes a plurality of identifiers arranged in sequence, each of the plurality of identifiers corresponds to a network device of the plurality of network devices or a link in the forwarding path,
- the segment list includes a first element with a length of 128 bits, and the first element includes at least two adjacent identifiers among the plurality of identifiers; the segment list is added to the first message to generate
- the second message the second message includes a first pointer, the value of the first pointer is used to indicate the position of the first identifier in the first element, and the first identifier is the at least two One of the logos.
- the second message is sent through the communication interface.
- the detailed processing process of the processor please refer to the detailed descriptions of the processes S410, S420, and S430 and the processes S325, S330, and S335 in the foregoing embodiment, which will not be repeated here.
- the communication interface in the network device 1600 is used for the network device 1600 to receive and send messages through the network system.
- the network device 1600 can also be implemented by the device shown in FIG. 21.
- the network device 1600 includes a main control board and one or more interface boards, and the main control board is in communication connection with the interface board.
- the main control board is in communication connection with the interface board.
- FIG. 24 shows a schematic diagram of a possible structure of the network device 301 involved in the foregoing embodiment.
- the network device 1800 can implement the functions of the network device 301 or the network device 401 in the foregoing embodiment.
- the network device 1800 includes: a determining unit 1801 and a processing unit 1802. These units can perform the corresponding functions of the network device 301 or the network device 401 in the foregoing method. for example,
- the determining unit 1801 is configured to determine a forwarding path of a packet, where the forwarding path includes multiple network devices.
- the processing unit 1802 is configured to generate the segment list corresponding to the forwarding path, where the segment list includes the plurality of identifiers arranged in sequence, and each identifier of the plurality of identifiers corresponds to the plurality of identifiers respectively.
- the network device 1800 further includes: a sending unit 1803.
- the sending unit 1803 is configured to send the segment list to the entry device of the forwarding path.
- the processing unit 1802 is further configured to encapsulate the segment list into a message; the sending unit 1803 is configured to send the message.
- the network device 1800 can also be implemented by the device shown in FIG. 20. At this time, the network device 1800 includes: at least one processor, a communication bus, and at least one communication interface. Optionally, the network device 1800 may further include a memory.
- the processor in the network device 1800 is configured to determine a forwarding path of a packet, the forwarding path includes multiple network devices; and the segment list corresponding to the forwarding path is generated, and the segment list includes successively The plurality of identifiers arranged, each of the plurality of identifiers respectively corresponds to a network device of the plurality of network devices or a link in the forwarding path, and the segment list includes a length of A 128-bit first element, where the first element includes at least two adjacent identifiers among the plurality of identifiers.
- the processor in the network device 1800 is further configured to send the segment list through a communication interface.
- the communication interface in the network device 1800 is used for the network device 1900 to receive and send information through the network system.
- the specific process please refer to the detailed description of S320 and S420 in the foregoing embodiment, which will not be repeated here.
- FIG. 25 shows a schematic diagram of a possible structure of a network system provided by an embodiment of the present invention.
- the network system 2200 includes a first network device 2201 and a second network device 2202.
- the first network device 2201 in the network system can execute the processing steps S410, S420, S430, S440 of the network device 401 in the embodiment shown in FIG. 18, or the processing steps of the network device 302 in the embodiment shown in FIG. 19 S325, S330, S335.
- the second network device 2202 in the network system can execute the processing steps S450, S460, and S470 of the network device 402 in the embodiment shown in FIG. 20, or the processing steps S340, S345, and S350 of the network device 303.
- the network system 2200 further includes a third network device 2203.
- the first network device 2203 in the network system can execute the processing steps S310, S315, and S320 of the network device 301 in the embodiment shown in FIG. 19 above.
- the first network device 2201 in the network system may be the network device 1600 in the embodiment shown in FIG. 23, and the second network device 2202 in the network device may be the network device in the embodiment shown in FIG. 22 Device 1400, the third network device 2203 in the network devices may be the network device 1800 in the embodiment shown in FIG. 24.
- the third network device is configured to determine a forwarding path of a message, the forwarding path includes a plurality of network devices; the segment list corresponding to the forwarding path is generated, and the segment list includes sequentially arranged
- the plurality of identifiers each of the plurality of identifiers respectively corresponds to a network device in the plurality of network devices or a link in the forwarding path, and the segment list includes a length of 128 bits
- the first element includes at least two adjacent identifiers in the plurality of identifiers.
- the second network device is configured to receive a first message; obtain a segment list, the segment list corresponding to a forwarding path of the first message, the forwarding path includes a plurality of network devices, and the segment list includes A plurality of identifiers arranged in sequence, each of the plurality of identifiers respectively corresponds to a network device of the plurality of network devices or a link in the forwarding path, and the segment list includes a length of 128
- the first element of the bit the first element includes at least two adjacent identifiers among the plurality of identifiers; adding the segment list to the first message to generate a second message, the first element
- the second message includes a first pointer, the value of the first pointer is used to indicate the position of the first identifier in the first element, and the first identifier is one of the at least two identifiers; sending the The second message.
- obtaining the segment list by the second network device means that the second network device receives the segment list sent by the third network device .
- obtaining the segment list by the second network device means that the second network device generates the segment list.
- the first network device is configured to receive the second message, the first message header of the second message includes the segment list, and the second message includes the first pointer;
- the value of a pointer determines the position of the first identifier in the first element; at least one identifier starting with the first identifier is copied to the second header of the second message, To generate a third message; the sending unit is used to send the third message.
- the embodiment of the present invention also provides a non-transitory storage medium for storing the software instructions used in the foregoing embodiment, which includes a program for executing the method shown in the foregoing embodiment, when it is on a computer or network device When executed, the computer or network device shown is caused to execute the method in the foregoing method embodiment.
- the embodiment of the present invention also provides a computer program product including computer program instructions, which when the computer program product runs on a computer, causes a network node to execute the method in the foregoing method embodiment.
- the "first" of the first message, the first network device, the first identifier, the first pointer, and the quantity identifier mentioned in the embodiment of the present invention is only used as a name identifier, and does not represent the first in order. This rule also applies to "second", “third” and “fourth”. However, the "first” in the first identifier mentioned in the embodiment of the present invention represents the first in order. This rule also applies to the "Nth”.
- a and/or B is considered to include A alone, B alone, and A+B.
- any of the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physically separate.
- the physical unit can be located in one place or distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative work.
- the steps of the method or algorithm described in the disclosure of the embodiment of the present invention may be implemented in a hardware manner, or may be implemented in a manner in which a processor executes software instructions.
- Software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (erasable programmable ROM, EPROM), electrically erasable programmable read-only memory (electrically erasable programmable read-only memory (EPROM, EEPROM), hard disk, mobile hard disk, optical disk, or any other form of storage medium known in the art.
- the storage medium is coupled to the processor, so that the processor can read information from the storage medium.
- the storage medium may also be an integral part of the processor.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
Claims (57)
- 一种转发报文的方法,其特征在于,所述方法包括:接收第一报文,所述第一报文的第一报文头包括用于转发所述第一报文的段列表,所述段列表包括依次排列的多个标识,所述多个标识中的每个标识分别对应于一个网络设备或一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识,所述第一报文包括第一指针;根据所述第一指针的值确定第一标识在所述第一元素中的位置,所述第一标识为所述至少两个标识中的一个;将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的第二报文头中,以生成第二报文;发送所述第二报文。
- 根据权利要求1所述的方法,其特征在于,所述多个标识一一映射到多个段标识,所述多个段标识中的每个段标识分别对应于一个网络设备或一个链路,所述多个段标识中的每个段标识包括第一部分和第二部分,所述多个段标识中的每个段标识的第一部分为前缀部分,所述多个标识中的每个标识分别包括所述每个标识所映射到的段标识的第二部分。
- 根据权利要求2所述的方法,其特征在于,所述第二报文头包括目的地址字段,所述目的地址字段包括第一部分和第二部分,所述目的地址的第一部分包括所述前缀部分;所述将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的所述第二报文头中,包括:将以所述第一标识为起始的至少一个标识拷贝至所述目的地址字段的第二部分中。
- 根据权利要求2或3所述的方法,其特征在于,所述段列表不包括所述前缀部分。
- 根据权利要求2-4任一项所述的方法,其特征在于,所述多个标识的长度相同,所述将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的所述第二报文头中之前,所述方法还包括:根据所述多个标识的长度和所述前缀部分的长度确定所述至少一个标识的数量。
- 根据权利要求1所述的方法,其特征在于,所述第一报文包括目的地址字段,所述目的地址字段包括第二标识,所述第二标识是所述多个标识中的一个;所述根据所述第一指针的值确定所述第一标识在所述第一元素中的位置之前,所述方法还包括:根据所述第二标识中的切换标志,确定所述段列表中包括与所述第二标识的类型不同的标识;所述将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的所述第二报文头中,包括:将所述至少一个标识拷贝至所述第二报文头中以形成转发标识栈,所述至少一 个标识与所述第二标识的类型不同。
- 根据权利要求6所述的方法,其特征在于,所述第一报文包括数量标志;所述将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的所述第二报文头中之前,所述方法还包括:根据所述数量标志的值确定所述至少一个标识的数量。
- 根据权利要求6或7所述的方法,其特征在于,所述根据所述第一指针的值确定所述第一标识在所述第一元素中的位置,包括:确定所述目的地址字段中多余标识的数量,所述多余标识的类型与所述第二标识不同;根据所述多余标识的数量校正所述第一指针的值;根据校正后的所述第一指针的值确定所述第一标识在所述第一元素中位置。
- 根据权利要求6-8任一项所述的方法,其特征在于,所述至少一个标识为多协议标签交换MPLS标签或互联网协议版本4IPv4地址。
- 根据权利要求1-9任一项所述的方法,其特征在于,所述将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的所述第二报文头中之后,所述方法还包括:修改所述第一指针的值,以使得修改后的所述第一指针的值用于指示第三标识在所述第一元素中的位置,所述第三标识不属于所述至少一个标识。
- 根据权利要求1-9任一项所述的方法,其特征在于,所述将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的所述第二报文头中之后,所述方法还包括:修改所述第一指针的值,以使得修改后的所述第一指针的值用于指示第三标识在第二元素中的位置,所述第三标识不属于所述至少一个标识,所述第二元素与所述第一元素不同。
- 根据权利要求1-11任一项所述的方法,其特征在于,所述第一报文还包括第二指针,所述根据所述第一指针的值确定所述第一标识在所述第一元素中的位置之前,所述方法还包括:根据所述第二指针的值确定所述第一元素在所述第一报文中的位置。
- 一种转发报文的方法,其特征在于,所述方法包括:接收第一报文;获得段列表,所述段列表对应于所述第一报文的转发路径,所述转发路径包括多个网络设备,所述段列表包括依次排列的多个标识,所述多个标识中的每个标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识;在所述第一报文中添加所述段列表以生成第二报文,所述第二报文包括第一指针,所述第一指针的值用于指示第一标识在所述第一元素中的位置,所述第一标识为所述至少两个标识中的一个;发送所述第二报文。
- 根据权利要求13所述的方法,其特征在于,所述多个标识一一映射到多个段标识,所述多个段标识中的每个段标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述多个段标识中的每个段标识包括第一部分和第二部分,所述每个段标识的第一部分是前缀部分,所述多个段标识的前缀部分相同,所述多个标识中的每个标识分别包括所述每个标识所映射到的段标识的第二部分。
- 根据权利要求14所述的方法,其特征在于,所述第一报文的报文头包括目的地址字段,所述目的地址字段包括第一部分和第二部分;所述在所述第一报文中添加所述段列表以生成所述第二报文,包括:在所述目的地址字段的第一部分中添加所述前缀部分;在所述目的地址字段的第二部分中添加所述多个标识中的一个或多个标识。
- 根据权利要求14-15任一项所述的方法,其特征在于,所述段列表中不包括所述前缀部分。
- 根据权利要求13所述的方法,其特征在于,所述多个标识中的至少一个标识为多协议标签交换MPLS标签或互联网协议版本4IPv4地址。
- 根据权利要求17所述的方法,其特征在于,所述第二报文包括数量标志,所述数量标志的值用于指示所述至少一个标识的数量。
- 根据权利要求13-18任一项所述的方法,其特征在于,所述第一指针位于所述第二报文的报文头中。
- 根据权利要求13-19任一项所述的方法,其特征在于,所述第二报文还包括第二指针,所述第二指针的值用于指示所述第一元素在所述段列表中的位置。
- 一种生成用于转发报文的段列表的方法,其特征在于,所述方法包括:确定报文的转发路径,所述转发路径包括多个网络设备;生成对应于所述转发路径的所述段列表,所述段列表包括依次排列的所述多个标识,所述多个标识中的每个标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识。
- 根据权利要求21所述的方法,其特征在于,所述多个标识一一映射到多个段标识,所述多个段标识中的每个段标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述多个段标识中的每个段标识包括第一部分和第二部分,所述每个段标识的第一部分是前缀部分,所述多个标识的每个标识分别包括所述每个标识所映射到的段标识的第二部分。
- 根据权利要求22所述的方法,其特征在于,所述多个段标识中的段标识还包括第三部分,所述第三部分为填充部分,所述多个段标识的填充部分相同,所述多个标识中的标识不包括所述填充部分。
- 根据权利要求22或23所述的方法,其特征在于,所述多个段标识包括第一段标识,所述段列表不包括所述第一段标识的前缀部分。
- 根据权利要求24所述的方法,其特征在于,所述多个段标识还包括第二段标识,所述第一段标识的前缀部分和所述第二段标识的前缀部分不同,所述段列表 包括所述第二段标识的前缀部分。
- 根据权利要求21-25任一项所述的方法,其特征在于,所述多个标识中的至少一个标识为段标识、多协议标签交换MPLS标签或互联网协议版本4IPv4地址。
- 根据权利要求21-26任一项所述的方法,其特征在于,所述生成对应于所述转发路径的所述段列表之后,所述方法还包括:向所述转发路径的入口设备发送所述段列表;或者,将所述段列表封装至报文中,并发送所述报文。
- 一种网络设备,其特征在于,所述网络设备包括:接收单元,用于接收第一报文,所述第一报文的第一报文头包括用于转发所述第一报文的段列表,所述段列表包括依次排列的多个标识,所述多个标识中的每个标识分别对应于一个网络设备或一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识,所述第一报文包括第一指针;处理单元,用于根据所述第一指针的值确定第一标识在所述第一元素中的位置,所述第一标识为所述至少两个标识中的一个;将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的第二报文头中,以生成第二报文;发送单元,用于发送所述第二报文。
- 根据权利要求28所述的网络设备,其特征在于,所述多个标识一一映射到多个段标识,所述多个段标识中的每个段标识分别对应于一个网络设备或一个链路,所述多个段标识中的每个段标识包括第一部分和第二部分,所述多个段标识中的每个段标识的第一部分为前缀部分,所述多个标识中的每个标识分别包括所述每个标识所映射到的段标识的第二部分。
- 根据权利要求29所述的网络设备,其特征在于,所述第二报文头包括目的地址字段,所述目的地址字段包括第一部分和第二部分,所述目的地址的第一部分包括所述前缀部分;所述处理单元,还用于将以所述第一标识为起始的至少一个标识拷贝至所述目的地址字段的第二部分中。
- 根据权利要求29或30所述的网络设备,其特征在于,所述多个标识的长度相同;所述处理单元,还用于根据所述多个标识的长度和所述前缀部分的长度确定所述至少一个标识的数量。
- 根据权利要求28所述的网络设备,其特征在于,所述第一报文包括目的地址字段,所述目的地址字段包括第二标识,所述第二标识是所述多个标识中的一个;所述处理单元,还用于根据所述第二标识中的切换标志,确定所述段列表中包括与所述第二标识的类型不同的标识;将所述至少一个标识拷贝至所述第二报文头中以形成转发标识栈,所述至少一个标识与所述第二标识的类型不同。
- 根据权利要求32所述的网络设备,其特征在于,所述第一报文包括数量标志;所述处理单元,还用于根据所述数量标志的值确定所述至少一个标识的数量。
- 根据权利要求32或33所述的网络设备,其特征在于,所述处理单元,还用于确定所述目的地址字段中多余标识的数量,所述多余标识的类型与所述第二标识不同;根据所述多余标识的数量校正所述第一指针的值;根据校正后的所述第一指针的值确定所述第一标识在所述第一元素中位置。
- 根据权利要求32-34任一项所述的网络设备,其特征在于,所述至少一个标识包括多协议标签交换MPLS标签或互联网协议版本4IPv4地址。
- 根据权利要求28-35任一项所述的网络设备,其特征在于,所述处理单元,还用于修改所述第一指针的值,以使得修改后的所述第一指针的值用于指示第三标识在所述第一元素中的位置,所述第三标识不属于所述至少一个标识。
- 根据权利要求28-35任一项所述的网络设备,其特征在于,所述处理单元,还用于修改所述第一指针的值,以使得修改后的所述第一指针的值用于指示第三标识在第二元素中的位置,所述第三标识不属于所述至少一个标识,所述第二元素与所述第一元素不同。
- 一种网络设备,其特征在于,所述网络设备包括:接收单元,用于接收第一报文;处理单元,用于获得段列表,所述段列表对应于所述第一报文的转发路径,所述转发路径包括多个网络设备,所述段列表包括依次排列的多个标识,所述多个标识中的标识对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识;在所述第一报文中添加所述段列表以生成第二报文,所述第二报文包括第一指针,所述第一指针的值用于指示第一标识在所述第一元素中的位置,所述第一标识为所述至少两个标识中的一个;发送单元,用于发送所述第二报文。
- 根据权利要求38所述的网络设备,其特征在于,所述多个标识一一映射到多个段标识,所述多个段标识中的每个段标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述多个段标识中的段标识包括第一部分和第二部分,所述每个段标识的第一部分是前缀部分,所述多个段标识的前缀部分相同,所述多个标识中的每个标识分别包括所述每个标识所映射到的段标识的第二部分。
- 根据权利要求39所述的网络设备,其特征在于,所述第一报文的报文头包括目的地址字段,所述目的地址字段包括第一部分和第二部分;所述处理单元,还用于在所述目的地址字段的第一部分中添加所述前缀部分;在所述目的地址字段的第二部分中添加所述多个标识中的一个或多个标识。
- 根据权利要求38所述的网络设备,其特征在于,所述多个标识中的至少一个标识为多协议标签交换MPLS标签或互联网协议版本4IPv4地址。
- 一种网络设备,其特征在于,所述网络设备包括:确定单元,用于确定报文的转发路径,所述转发路径包括多个网络设备;处理单元,用于生成对应于所述转发路径的段列表,所述段列表包括依次排列的所述多个标识,所述多个标识中的每个标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识。
- 根据权利要求42所述的网络设备,其特征在于,所述多个标识一一映射到多个段标识,所述多个段标识中的每个段标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述多个段标识中的每个段标识包括第一部分和第二部分,所述每个段标识的第一部分是前缀部分,所述多个标识的每个标识分别包括所述每个标识所映射到的段标识的第二部分。
- 根据权利要求43所述的网络设备,其特征在于,所述多个段标识中的段标识还包括第三部分,所述第三部分为填充部分,所述多个段标识的填充部分相同,所述多个标识中的标识不包括所述填充部分。
- 根据权利要求42-44任一项所述的网络设备,其特征在于,所述多个标识中的至少一个标识为段标识、多协议标签交换MPLS标签或互联网协议版本4IPv4地址。
- 根据权利要求42-45任一项所述的网络设备,其特征在于,所述网络设备还包括发送单元,所述发送单元,用于向所述转发路径的入口设备发送所述段列表;或者,所述处理单元,还用于将所述段列表封装至报文中,所述发送单元,用于发送所述报文。
- 一种转发报文的方法,其特征在于,所述方法包括:接收第一报文,所述第一报文的第一报文头包括用于转发所述第一报文的段列表,所述段列表包括依次排列的多个标识,所述多个标识中的每个标识分别对应于一个网络设备或一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识,所述第一报文包括第一指针;根据所述第一指针的值确定第一标识在所述段列表中的位置,所述第一标识为所述至少两个标识中的一个;将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的第二报文头中,以生成第二报文;发送所述第二报文。
- 根据权利要求47所述的方法,其特征在于,所述多个标识一一映射到多个段标识,所述多个段标识中的每个段标识分别对应于一个网络设备或一个链路,所述多个段标识中的每个段标识包括第一部分和第二部分,所述多个段标识中的每个段标识的第一部分为前缀部分,所述多个标识中的每个标识分别包括所述每个标识所映射到的段标识的第二部分。
- 根据权利要求47所述的方法,其特征在于,所述第一报文包括目的地址字段,所述目的地址字段包括第二标识,所述第二标识是所述多个标识中的一个;所述根据所述第一指针的值确定所述第一标识在所述段列表中的位置之前,所述方法还包括:根据所述第二标识中的切换标志,确定所述段列表中包括与所述第二标识的类型不同的标识;所述将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的所述第二报文头中,包括:将所述至少一个标识拷贝至所述第二报文头中以形成转发标识栈,所述至少一个标识与所述第二标识的类型不同。
- 根据权利要求47-49任一项所述的方法,其特征在于,所述将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的所述第二报文头中之后,所述方法还包括:修改所述第一指针的值,以使得修改后的所述第一指针的值用于指示第三标识在所述段列表中的位置,所述第三标识不属于所述至少一个标识。
- 一种转发报文的方法,其特征在于,所述方法包括:接收第一报文;获得段列表,所述段列表对应于所述第一报文的转发路径,所述转发路径包括多个网络设备,所述段列表包括依次排列的多个标识,所述多个标识中的每个标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识;在所述第一报文中添加所述段列表以生成第二报文,所述第二报文包括第一指针,所述第一指针的值用于指示第一标识在所述段列表中的位置,所述第一标识为所述至少两个标识中的一个;发送所述第二报文。
- 根据权利要求51所述的方法,其特征在于,所述多个标识一一映射到多个段标识,所述多个段标识中的每个段标识分别对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述多个段标识中的每个段标识包括第一部分和第二部分,所述每个段标识的第一部分是前缀部分,所述多个段标识的前缀部分相同,所述多个标识中的每个标识分别包括所述每个标识所映射到的段标识的第二部分。
- 根据权利要求51所述的方法,其特征在于,所述多个标识中的至少一个标识为多协议标签交换MPLS标签或互联网协议版本4IPv4地址。
- 一种网络设备,其特征在于,所述网络设备包括:接收单元,用于接收第一报文,所述第一报文的第一报文头包括用于转发所述第一报文的段列表,所述段列表包括依次排列的多个标识,所述多个标识中的每个标识分别对应于一个网络设备或一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识,所述第一报文包括第一指针;处理单元,用于根据所述第一指针的值确定第一标识在所述段列表中的位置,所述第一标识为所述至少两个标识中的一个;将以所述第一标识为起始的至少一个标识拷贝至所述第一报文的第二报文头中,以生成第二报文;发送单元,用于发送所述第二报文。
- 一种网络设备,其特征在于,所述网络设备包括:接收单元,用于接收第一报文;处理单元,用于获得段列表,所述段列表对应于所述第一报文的转发路径,所述转发路径包括多个网络设备,所述段列表包括依次排列的多个标识,所述多个标识中的标识对应于所述多个网络设备中的一个网络设备或所述转发路径中的一个链路,所述段列表包括长度为128比特的第一元素,所述第一元素包括所述多个标识中的相邻的至少两个标识;在所述第一报文中添加所述段列表以生成第二报文,所述第二报文包括第一指针,所述第一指针的值用于指示第一标识在所述段列表中的位置,所述第一标识为所述至少两个标识中的一个;发送单元,用于发送所述第二报文。
- 一种网络系统,其特征在于,所述网络系统包括第一网络设备和第二网络设备,其中,所述第一网络设备是如权利要求28-37任一项所述的网络设备,所述第二网络设备是如权利要求38-41任一项所述的网络设备;或者,所述第一网络设备是如权利要求54所述的网络设备,所述第二网络设备是如权利要求55所述的网络设备。
- 根据权利要求56所述的网络系统,其特征在于,所述网络系统还包括第三网络设备,所述第三网络设备是如权利要求42-46任一项所述的网络设备。
Priority Applications (8)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CA3177466A CA3177466A1 (en) | 2019-08-31 | 2020-05-06 | Method for forwarding packet in sr network, device, and system |
| EP20858296.5A EP4009596B1 (en) | 2019-08-31 | 2020-05-06 | Message forwarding method, device, and system in sr network |
| EP24209114.8A EP4561013A3 (en) | 2019-08-31 | 2020-05-06 | Method for forwarding packet in sr network, device, and system |
| MX2022002448A MX2022002448A (es) | 2019-08-31 | 2020-05-06 | Metodo para reenviar paquetes en red, dispositivo y sistema de sr. |
| KR1020227009215A KR102777222B1 (ko) | 2019-08-31 | 2020-05-06 | Sr 네트워크에서의 패킷 포워딩 방법, 장치 및 시스템 |
| JP2022513191A JP7403635B2 (ja) | 2019-08-31 | 2020-05-06 | Srネットワークでパケットを転送するための方法、装置、及びシステム |
| US17/681,137 US12328260B2 (en) | 2019-08-31 | 2022-02-25 | Method for forwarding packet in SR network, device, and system |
| US19/201,929 US20250337686A1 (en) | 2019-08-31 | 2025-05-08 | Method for forwarding packet in sr network, device, and system |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910819877 | 2019-08-31 | ||
| CN201910819877.6 | 2019-08-31 | ||
| CN201911317222.5 | 2019-12-19 | ||
| CN201911317222.5A CN112448888A (zh) | 2019-08-31 | 2019-12-19 | 一种在sr网络中转发报文的方法、设备和系统 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US17/681,137 Continuation US12328260B2 (en) | 2019-08-31 | 2022-02-25 | Method for forwarding packet in SR network, device, and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021036328A1 true WO2021036328A1 (zh) | 2021-03-04 |
Family
ID=74685479
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/088788 Ceased WO2021036328A1 (zh) | 2019-08-31 | 2020-05-06 | 一种在sr网络中转发报文的方法、设备和系统 |
Country Status (8)
| Country | Link |
|---|---|
| US (2) | US12328260B2 (zh) |
| EP (2) | EP4561013A3 (zh) |
| JP (1) | JP7403635B2 (zh) |
| KR (1) | KR102777222B1 (zh) |
| CN (1) | CN116319617B (zh) |
| CA (1) | CA3177466A1 (zh) |
| MX (1) | MX2022002448A (zh) |
| WO (1) | WO2021036328A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113207192A (zh) * | 2021-03-29 | 2021-08-03 | 新华三信息安全技术有限公司 | 一种报文转发方法及装置 |
| WO2023208056A1 (zh) * | 2022-04-29 | 2023-11-02 | 华为技术有限公司 | 处理报文的方法、装置以及系统 |
| US20230370375A1 (en) * | 2020-09-24 | 2023-11-16 | Zte Corporation | Data processing method and system, encapsulation node, and de-encapsulation node |
| EP4510522A4 (en) * | 2022-05-11 | 2025-06-25 | Huawei Technologies Co., Ltd. | PACKET PROCESSING METHOD, APPARATUS, SYSTEM AND COMPUTER-READABLE STORAGE MEDIUM |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113438160B (zh) * | 2020-03-23 | 2024-05-31 | 中兴通讯股份有限公司 | 路由方法、路由装置及计算机可读存储介质 |
| US11445048B2 (en) * | 2020-08-11 | 2022-09-13 | Cisco Technology, Inc. | Systems and methods for compressing a SID list |
| CN114666259A (zh) * | 2020-12-22 | 2022-06-24 | 华为技术有限公司 | 报文传输的方法、装置、设备、存储介质及系统 |
| CN114900756B (zh) * | 2022-05-10 | 2024-04-09 | 中国联合网络通信集团有限公司 | 数据传输方法及装置、计算机可读存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170250908A1 (en) * | 2016-02-29 | 2017-08-31 | Cisco Technology, Inc. | System and Method for Dataplane-Signaled Packet Capture in a Segment Routing Environment |
| US20180034727A1 (en) * | 2016-07-28 | 2018-02-01 | Cisco Technology, Inc. | Enhanced error signaling and error handling in a network environment with segment routing |
| WO2019005949A1 (en) * | 2017-06-27 | 2019-01-03 | Cisco Technology, Inc. | GATEWAY OF SEGMENT ROUTING |
| CN109688057A (zh) * | 2018-12-13 | 2019-04-26 | Ut斯达康通讯有限公司 | 基于ipv6的段路由网络的报文转发方法及装置 |
| CN109981457A (zh) * | 2017-12-27 | 2019-07-05 | 华为技术有限公司 | 一种报文处理的方法、网络节点和系统 |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9537769B2 (en) * | 2013-03-15 | 2017-01-03 | Cisco Technology, Inc. | Opportunistic compression of routing segment identifier stacks |
| CN106411738A (zh) * | 2015-07-30 | 2017-02-15 | 中兴通讯股份有限公司 | Ipv6报文封装的处理方法和装置 |
| JP6967521B2 (ja) * | 2016-02-15 | 2021-11-17 | テレフオンアクチーボラゲット エルエム エリクソン(パブル) | Ospfを利用して最大ノードおよび/またはリンクセグメント識別子深度を明らかにするための技法 |
| CN109218189B (zh) * | 2017-07-03 | 2022-04-29 | 中兴通讯股份有限公司 | 跨域的路径的标识信息的确定方法、装置及存储介质 |
| US10404600B2 (en) * | 2017-09-12 | 2019-09-03 | Google Llc | Mechanism and apparatus for path protection when using compressed segment routing label stacks |
| CN108429685B (zh) * | 2018-04-28 | 2020-08-04 | 电子科技大学 | 一种基于分段路由技术的服务功能链寻路方法 |
| US11025545B2 (en) * | 2019-06-06 | 2021-06-01 | Cisco Technology, Inc. | Conditional composition of serverless network functions using segment routing |
| CN112583745A (zh) * | 2019-09-27 | 2021-03-30 | 华为技术有限公司 | 一种在sr网络中转发报文的方法、设备和系统 |
-
2019
- 2019-12-19 CN CN202310212097.1A patent/CN116319617B/zh active Active
-
2020
- 2020-05-06 EP EP24209114.8A patent/EP4561013A3/en active Pending
- 2020-05-06 CA CA3177466A patent/CA3177466A1/en active Pending
- 2020-05-06 WO PCT/CN2020/088788 patent/WO2021036328A1/zh not_active Ceased
- 2020-05-06 KR KR1020227009215A patent/KR102777222B1/ko active Active
- 2020-05-06 JP JP2022513191A patent/JP7403635B2/ja active Active
- 2020-05-06 EP EP20858296.5A patent/EP4009596B1/en active Active
- 2020-05-06 MX MX2022002448A patent/MX2022002448A/es unknown
-
2022
- 2022-02-25 US US17/681,137 patent/US12328260B2/en active Active
-
2025
- 2025-05-08 US US19/201,929 patent/US20250337686A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170250908A1 (en) * | 2016-02-29 | 2017-08-31 | Cisco Technology, Inc. | System and Method for Dataplane-Signaled Packet Capture in a Segment Routing Environment |
| US20180034727A1 (en) * | 2016-07-28 | 2018-02-01 | Cisco Technology, Inc. | Enhanced error signaling and error handling in a network environment with segment routing |
| WO2019005949A1 (en) * | 2017-06-27 | 2019-01-03 | Cisco Technology, Inc. | GATEWAY OF SEGMENT ROUTING |
| CN109981457A (zh) * | 2017-12-27 | 2019-07-05 | 华为技术有限公司 | 一种报文处理的方法、网络节点和系统 |
| CN109688057A (zh) * | 2018-12-13 | 2019-04-26 | Ut斯达康通讯有限公司 | 基于ipv6的段路由网络的报文转发方法及装置 |
Non-Patent Citations (1)
| Title |
|---|
| C. FILSFILS, ED. D. DUKES, ED. CISCO SYSTEMS, INC. S. PREVIDI HUAWEI J. LEDDY INDIVIDUAL S. MATSUSHIMA SOFTBANK D. VOYER BELL CANA: "IPv6 Segment Routing Header (SRH); draft-ietf-6man-segment-routing-header-21.txt", IPV6 SEGMENT ROUTING HEADER (SRH); DRAFT-IETF-6MAN-SEGMENT-ROUTING-HEADER-21.TXT; INTERNET-DRAFT: NETWORK WORKING GROUP, INTERNET ENGINEERING TASK FORCE, IETF; STANDARDWORKINGDRAFT, INTERNET SOCIETY (ISOC) 4, RUE DES FALAISES CH- 1205 GENEVA, SWITZER, no. 21, 13 June 2019 (2019-06-13), Internet Society (ISOC) 4, rue des Falaises CH- 1205 Geneva, Switzerland, pages 1 - 32, XP015133345 * |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20230370375A1 (en) * | 2020-09-24 | 2023-11-16 | Zte Corporation | Data processing method and system, encapsulation node, and de-encapsulation node |
| US12381820B2 (en) * | 2020-09-24 | 2025-08-05 | Zte Corporation | Data processing method and system, encapsulation node, and de-encapsulation node |
| CN113207192A (zh) * | 2021-03-29 | 2021-08-03 | 新华三信息安全技术有限公司 | 一种报文转发方法及装置 |
| WO2023208056A1 (zh) * | 2022-04-29 | 2023-11-02 | 华为技术有限公司 | 处理报文的方法、装置以及系统 |
| EP4510522A4 (en) * | 2022-05-11 | 2025-06-25 | Huawei Technologies Co., Ltd. | PACKET PROCESSING METHOD, APPARATUS, SYSTEM AND COMPUTER-READABLE STORAGE MEDIUM |
Also Published As
| Publication number | Publication date |
|---|---|
| MX2022002448A (es) | 2022-03-22 |
| US12328260B2 (en) | 2025-06-10 |
| KR102777222B1 (ko) | 2025-03-05 |
| EP4009596A1 (en) | 2022-06-08 |
| CN116319617B (zh) | 2025-12-12 |
| EP4009596B1 (en) | 2024-11-27 |
| US20220182323A1 (en) | 2022-06-09 |
| CA3177466A1 (en) | 2021-03-04 |
| EP4561013A2 (en) | 2025-05-28 |
| EP4009596A4 (en) | 2022-09-07 |
| JP2022545919A (ja) | 2022-11-01 |
| US20250337686A1 (en) | 2025-10-30 |
| JP7403635B2 (ja) | 2023-12-22 |
| EP4561013A3 (en) | 2025-07-23 |
| KR20220047854A (ko) | 2022-04-19 |
| CN116319617A (zh) | 2023-06-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102777222B1 (ko) | Sr 네트워크에서의 패킷 포워딩 방법, 장치 및 시스템 | |
| CN114365464B (zh) | 一种在sr网络中转发报文的方法、设备和系统 | |
| CN112448888A (zh) | 一种在sr网络中转发报文的方法、设备和系统 | |
| US11349754B2 (en) | Packet processing method and apparatus | |
| US11258698B2 (en) | Multicast forwarding method and related device | |
| EP3944569A1 (en) | Data processing method based on srv6, and related network device | |
| WO2020224503A1 (zh) | SRv6网络生成段列表、报文转发的方法、设备和系统 | |
| KR20210102107A (ko) | 하이브리드 네트워크에서 패킷을 포워딩하기 위한 방법, 디바이스, 및 시스템 | |
| EP4120630A1 (en) | Multicast data packet processing method, and apparatus | |
| CN117640489A (zh) | 一种发送报文的方法、设备及系统 | |
| CN107342939A (zh) | 传输数据的方法和装置 | |
| WO2022111606A1 (zh) | 一种报文传输、段列表生成、压缩段标识获取方法及装置 | |
| JP7609382B2 (ja) | ルートアドバタイズメント方法、装置、及びシステム | |
| CN113141338B (zh) | 一种消息生成方法、处理方法及装置 | |
| US20220393978A1 (en) | Packet processing method, forwarding device, and packet processing system | |
| EP4415325A1 (en) | Message processing method, apparatus and system | |
| CN116418728A (zh) | 一种报文发送的方法、段标识生成的方法及装置 | |
| WO2023231438A1 (zh) | 报文发送的方法、网络设备及系统 | |
| CN116800559A (zh) | 一种报文处理的方法、路由通告的方法及相关设备 | |
| CN115706742A (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: 20858296 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2022513191 Country of ref document: JP 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: 2020858296 Country of ref document: EP Effective date: 20220303 |
|
| ENP | Entry into the national phase |
Ref document number: 20227009215 Country of ref document: KR Kind code of ref document: A |
|
| ENP | Entry into the national phase |
Ref document number: 3177466 Country of ref document: CA |
|
| WWG | Wipo information: grant in national office |
Ref document number: MX/A/2022/002448 Country of ref document: MX |