WO2023088145A1 - 一种报文处理方法、装置及设备 - Google Patents
一种报文处理方法、装置及设备 Download PDFInfo
- Publication number
- WO2023088145A1 WO2023088145A1 PCT/CN2022/130827 CN2022130827W WO2023088145A1 WO 2023088145 A1 WO2023088145 A1 WO 2023088145A1 CN 2022130827 W CN2022130827 W CN 2022130827W WO 2023088145 A1 WO2023088145 A1 WO 2023088145A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- segment identifier
- packet
- srh
- node
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 17
- 238000005538 encapsulation Methods 0.000 claims abstract description 54
- 230000005540 biological transmission Effects 0.000 claims abstract description 28
- 238000000034 method Methods 0.000 claims description 103
- 238000012545 processing Methods 0.000 claims description 56
- 238000004891 communication Methods 0.000 claims description 43
- 230000015654 memory Effects 0.000 claims description 42
- 230000006870 function Effects 0.000 claims description 36
- 238000012217 deletion Methods 0.000 claims description 26
- 230000037430 deletion Effects 0.000 claims description 26
- 230000006399 behavior Effects 0.000 claims description 16
- 239000000796 flavoring agent Substances 0.000 claims description 12
- 235000019634 flavors Nutrition 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 21
- 239000004744 fabric Substances 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 235000008694 Humulus lupulus Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- RGNPBRKPHBKNKX-UHFFFAOYSA-N hexaflumuron Chemical compound C1=C(Cl)C(OC(F)(F)C(F)F)=C(Cl)C=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F RGNPBRKPHBKNKX-UHFFFAOYSA-N 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- 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/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
-
- 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
-
- 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
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- 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/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
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2212/00—Encapsulation of packets
-
- 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/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/164—Adaptation or special uses of UDP protocol
Definitions
- the present application relates to the technical field of communication, and in particular to a message processing method, device and equipment.
- Segment routing is a protocol designed based on the concept of source routing to forward data packets on the network, and supports the explicit designation of the data packet forwarding path at the source node.
- IPv6 Internet Protocol Version 6
- SRv6 segment routing
- forwarding path information is carried by a segment routing header (SRH) that includes a segment identification list (SID list).
- SID list includes a plurality of segment identifiers (SIDs) arranged in sequence, each representing a plurality of segments, and each segment is an instruction or an instruction set for processing a message.
- the SRH is encapsulated in the message, and the SR network carries the process of processing the message through the segment identifier list therein.
- each SID in the SRv6 network is 128 bits (bit), and each time a SID is added to the SID list, the length of the SRH will increase by 128 bits, and the length of the message will also increase by 128 bits.
- the increase in the packet length will lead to the occupation of a large amount of network resources during the forwarding process, resulting in low utilization of network link bandwidth.
- the length of the SRH is too long, it will increase the difficulty of packet processing, making it difficult for the existing equipment to process the SRH effectively.
- a flavor is added to the SID to change the forwarding behavior of the node represented by the SID.
- the attachment behavior supported by SRv6SID may include: the penultimate Endpoint node performs SRH removal operation (Penultimate Segment POP of the SRH, PSP).
- the SRH can be removed at the penultimate Endpoint node.
- the tail node does not need to check the SRH information, but only needs to search the Local SID table according to the destination IPv6 address for processing.
- the present application provides a packet processing method, device and equipment to solve the problem that the existence of SRH affects the transmission efficiency of SRv6 packets.
- a packet processing method may include: a first device receives a first packet sent by a second device, where the first packet includes a first SRH.
- the first SRH may include one or more segment identifiers, and the one or more segment identifiers are used to indicate a segment for transmitting the first message.
- the first device After receiving the first packet, the first device will determine whether the first packet contains a first segment identifier, where the first segment identifier is a segment identifier corresponding to the first device.
- the first device deletes the first SRH in the first packet, and performs encapsulation to generate a second packet arts.
- the first device forwards the second packet according to the destination address in the second packet.
- the first device may delete the first SRH in the first message according to the actual situation, and perform an encapsulation operation to generate a second message, in which The first SRH is not included, thereby reducing bandwidth occupied by transmitting the second message and improving message transmission efficiency. That is, in the embodiment of the present application, when the first device needs to perform an encapsulation operation, the function of deleting the segment routing header on demand can be configured to reduce the occupation of bandwidth resources.
- the first device in response to determining that the first packet contains the first segment identifier, deletes the first SRH for the first packet, and executes The encapsulation operation generates the second message, including: the first device determines that the remaining SL of the segment in the first SRH is equal to 1 or the updated SL is equal to 0; in response to determining that the first message contains the first segment identifier and the SL is equal to 1 or the updated SL is equal to 0, the first device deletes the first SRH on the first packet, and performs an encapsulation operation to generate the second packet.
- the type of the first segment identifier is a binding segment identifier.
- the first segment identifier is a segment identifier of the End.B6 type bound to the SRv6 policy, or a segment identifier of the End.BM type bound to the SR-MPLS policy.
- the first segment identifier is an endpoint End.B6.Dod type segment identifier for on-demand deletion of an endpoint bound to an SRv6 policy, or an on-demand deletion of an endpoint bound to an SR-MPLS policy
- the first device performs an operation of deleting the first SRH on the first packet, and performs an encapsulation operation to generate a second packet, including: the first device converts the first The first SRH in a message is deleted, and a first message header is encapsulated in the first message to generate the second message.
- the first device when the first device deletes the first SRH, it can encapsulate the first packet header in the outer layer of the first packet, so as to perform the transmission of the second packet through the newly encapsulated first packet header path.
- the first packet header is an Internet Protocol Version 6 IPv6 basic header, an IPv6 header including the second SRH, or a Multiprotocol Label Switching MPLS header.
- the first device may determine the type of the encapsulated first packet header according to the actual application situation, for example, encapsulate the IPv6 basic header or encapsulate the IPv6 header containing the second SRH, wherein the second SRH may include One or more segment identifiers, where the one or more segment identifiers are used to indicate the segment for transmitting the second packet, or encapsulate the MPLS header.
- the first packet header includes path information, and the path information is used to indicate a transmission path of the second packet.
- the path information corresponds to the first segment identifier.
- the first SRH includes a second segment identifier
- the second segment identifier is used to indicate the next segment to transmit the first packet
- the path information is related to the second segment identifier. Segment ID corresponds.
- the second packet further includes a second packet header, and a destination address of the second packet header is identified by the second segment.
- the segment identifier list in the second SRH includes the path information, or the label stack of the MPLS header includes the path information.
- the second device is a host
- the payload of the first packet is a packet generated by the second device
- the second device is a forwarding device
- the first A message payload is a message received by the second device.
- the device to which the device that generates the first message is connected to the network and the device that is connected to the network when the device that finally receives the first message belongs to a different network domain .
- the method further includes: the first device sending the first segment identifier and indication information to the second device, the indication information being used to indicate that the first device has Ability to perform SRH delete operations.
- the first device may issue its own segment identifier and indication information to the second device, so as to indicate that the first device has the ability to delete the SRH through the indication information.
- the first device may directly issue the first piece of identification and indication information to the second device, or the first device may issue the first piece of identification and indication information to the second device through a controller.
- the indication information includes the function part identified in the first paragraph, or the indication information is an additional behavior flavor corresponding to the identification in the first paragraph.
- a method for issuing a segment identifier includes: a first device acquires a first segment identifier, the first segment identifier corresponds to the first device, and the first segment identifier is used to indicate The first device has the capability of performing an SRH deletion operation; and sends the first segment identifier to the second device.
- the second device can encapsulate the first identification into the corresponding message, so that when the message can be forwarded to the first device, the first device will Delete the SRH in the packet.
- the method further includes: the first device sends indication information corresponding to the first segment identifier to the second device, where the indication information is used to indicate that the segment corresponding to the third segment identifier has the ability to perform SRH deletion ability to operate.
- the indication information includes the Function part of the first paragraph identification, or the indication information is an additional behavior flavor corresponding to the first paragraph identification, or the indication information is a part of the first paragraph identification.
- the first device may directly send the locally generated first identifier to the second device, or may send the first identifier to the second device through a controller.
- the first segment identifier is a segment identifier of type End.B6, or a segment identifier of type End.BM.
- the first segment identifier is a segment identifier of type End.B6.Dod, or a segment identifier of type End.BM.Dod.
- a message processing device configured to apply to a first device, and includes: a receiving unit, configured to receive a first message sent by a second device, and the first message includes The first segment routing header SRH; a determining unit, configured to determine that the first message contains a first segment identifier, and the first segment identifier is a segment identifier corresponding to the first device; a generating unit, configured to respond to the determination
- the first message includes the first segment identifier, the operation of deleting the first SRH is performed on the first message, and an encapsulation operation is performed to generate a second message; a sending unit is configured to send the second message.
- the generating unit is specifically configured to determine that the remaining SL in the first SRH is equal to 1 or the updated SL is equal to 0; in response to determining that the first packet contains the first The segment identifier and the SL are equal to 1 or the updated SL is equal to 0, delete the first SRH for the first message, and perform an encapsulation operation to generate a second message.
- the type of the first segment identifier is a binding segment identifier.
- the first segment identifier is a segment identifier of the End.B6 type bound to the SRv6 policy, or a segment identifier of the End.BM type bound to the SR-MPLS policy.
- the first segment identifier is an endpoint End.B6.Dod type segment identifier for on-demand deletion of an endpoint bound to an SRv6 policy, or an on-demand deletion of an endpoint bound to an SR-MPLS policy
- the generating unit is specifically configured to delete the first SRH in the first packet, and encapsulate the first packet header in the first packet to generate the second message.
- the first packet header is an Internet Protocol Version 6 IPv6 basic header, an IPv6 header including the second SRH, or a Multiprotocol Label Switching MPLS header.
- the first packet header includes path information, and the path information is used to indicate a transmission path of the second packet.
- the path information corresponds to the first segment identifier.
- the first SRH includes a second segment identifier
- the second segment identifier is used to indicate the next segment to transmit the first packet
- the path information is related to the second segment identifier. Segment ID corresponds.
- the second packet further includes a second packet header, and a destination address of the second packet header is identified by the second segment.
- the segment identifier list in the second SRH includes the path information, or the label stack of the MPLS header includes the path information.
- the second device is a host
- the payload of the first packet is a packet generated by the second device
- the second device is a forwarding device
- the first A message payload is a message received by the second device.
- the device to which the device that generates the first message is connected to the network and the device that is connected to the network when the device that finally receives the first message belongs to a different network domain .
- the sending unit is further configured to send the first segment identifier and indication information to the second device, and the indication information is used to indicate that the first device has the ability to perform SRH deletion. ability to operate.
- the indication information is included in the Function part of the first segment identifier, or the indication information is an additional behavior flavor corresponding to the first segment identifier.
- an apparatus for issuing a segment identifier which is applied to a first device, and may include: an acquisition unit configured to acquire a first segment identifier, the first segment identifier corresponding to the first device, It is used to indicate that the first device has the capability of performing an SRH deletion operation; the sending unit is configured to send the first segment identifier to the second device, so that the second device encapsulates the first segment identifier into a corresponding message.
- the sending unit is further configured to send indication information corresponding to the first segment identifier to the second device, where the indication information is used to indicate that the segment corresponding to the first segment identifier has the ability to perform an SRH deletion operation Ability.
- the indication information includes the Function part of the first paragraph identification, or the indication information is an additional behavior flavor corresponding to the first paragraph identification, or the indication information is a part of the first paragraph identification.
- the sending unit is specifically configured to forward the first segment of identification to the second device through the controller.
- the first segment identifier is a segment identifier of type End.B6, or a segment identifier of type End.BM.
- the first segment identifier is a segment identifier of type End.B6.Dod, or a segment identifier of type End.BM.Dod.
- a packet processing system in a fifth aspect of the present application, includes: a first device and a second device.
- the second device is configured to send a first message to the first device, where the first message includes the first SRH; the first device is configured to perform the first aspect or any implementation described in the first aspect. Packet processing method.
- the first device may also be configured to execute the release segment identification method described in the second aspect or any implementation manner of the second aspect.
- a communication device in the sixth aspect of the present application, includes: a processor and a memory; the memory is used to store instructions or computer programs; the processor is used to execute all The above instruction or computer program, so that the communication device executes the message processing method described in the first aspect or any implementation manner of the first aspect, or executes the second aspect or any implementation manner described in the second aspect The method for publishing segment IDs described above.
- a computer-readable storage medium including instructions, which, when run on a computer, cause the computer to perform the message processing described in the first aspect or any implementation manner of the first aspect method, or execute the method for publishing segment identifiers described in the second aspect or any implementation manner of the second aspect.
- a chip including a memory and a processor.
- Memory is used to store instructions or program codes.
- the processor is used to call and run the instruction or program code from the memory, so as to execute the message processing method described in the first aspect or any implementation manner of the first aspect; or, the processor executes the above-mentioned second aspect or the second The method for publishing segment identifiers described in any one of the implementation manners of the aspect.
- a chip in the ninth aspect of the present application, includes a processor, but does not include a memory.
- the processor is used to read and execute instructions or program codes stored in the memory outside the chip.
- the processor executes the message processing method described in the first aspect or any implementation of the first aspect; or, the processor executes the publishing method described in the second aspect or any implementation of the second aspect Method for segment identification.
- the second device sends a first message to the first device, and the first message includes a first routing header SRH.
- the first device After receiving the first packet sent by the second device, the first device will judge whether the first packet includes a first segment identifier, and the first segment identifier is a segment identifier corresponding to the first device. When it is determined that the first packet includes the first segment identifier, the first device will delete the first SRH operation on the first packet, and perform an encapsulation operation to generate a second packet, so as to forward the second packet.
- the first device may delete the first SRH in the first message according to the actual situation, and perform encapsulation The operation generates a second message, and the second message does not include the first SRH, thereby reducing bandwidth occupied by transmitting the second message and improving message transmission efficiency. That is, in this application, when the first device needs to perform an encapsulation operation, the function of deleting the segment routing header on demand can be configured to reduce the occupation of bandwidth resources.
- FIG. 1 is a schematic diagram of an SRv6 packet format
- Figure 2a is a schematic diagram of SRv6 packet transmission
- Figure 2b is a schematic diagram of SRv6 packet transmission in an application scenario
- Figure 2c is a schematic diagram of SRv6 packet transmission in another application scenario
- Figure 2d is a schematic diagram of SRv6 packet transmission in another application scenario
- FIG. 2e is a schematic diagram of a message processing scenario provided by an embodiment of the present application.
- FIG. 3 is a flow chart of a message processing method provided in an embodiment of the present application.
- FIG. 4 is a schematic diagram of another packet processing scenario provided by the embodiment of the present application.
- FIG. 5 is a schematic diagram of another packet processing scenario provided by the embodiment of the present application.
- FIG. 6 is a schematic diagram of a cross-domain message processing scenario provided by an embodiment of the present application.
- FIG. 7 is a flow chart of a method for identifying release segments provided by an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a message processing device provided in an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of a release segment identification device provided by an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of a communication device provided in an embodiment of the present application.
- FIG. 11 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
- the packet processing process can be divided into several segments, and each segment is a specific processing behavior performed by a specific network device. Several segments are respectively executed by network devices on the message forwarding path to form the entire message processing process. Each segment has a corresponding segment identifier, or SID.
- a network device in an SRv6 network explicitly specifies the forwarding path of the packet by inserting a routing extension header SRH into the IPv6 packet, and adding the SIDs of all segments that the path passes through, that is, the SID List, in the SRH.
- nodes in the SRv6 network are divided into three roles: source node, transit node, and termination (Endpoint) node.
- a network node and a network device have the same meaning, and both refer to a switch, a router, a virtual routing device, a virtual forwarding device, or other forwarding devices.
- the source node is responsible for inserting the SRH extension header into the IPv6 header of the IPv6 message, or adding the IPv6 header outside the message and inserting the SRH extension header. This node introduces the packet flow into the SRv6 path defined by the Segment List in the SRH.
- the destination address of the IPv6 header can be set to the SID, and the SRH does not need to be inserted. Of course, SRH can also be inserted. If the Segment List contains multiple SIDs, the SRH needs to be inserted.
- the source node can be a host that generates SRv6 packets, or an edge device in an SRv6 domain.
- Transit node On the SRv6 path of the message, it does not participate in SRv6 processing, and only performs ordinary IPv6 message forwarding.
- the transit node can be a node that supports SRv6, or a node that does not support SRv6.
- Endpoint node performs SRv6-related processing on received SRv6 packets.
- the IPv6 destination address of the received SRv6 message must be the SID configured on the Endpoint node, and the node needs to process according to the SID instruction and update the SRH.
- SRv6 defines multiple types of SIDs. Different SIDs have different functions and indicate different forwarding actions. Among them, the SID is used to define a certain network function and represent a certain network command. SRv6SID adopts the form of IPv6 address. For example, End SID: used to identify a destination address prefix in the network. The forwarding action corresponding to the End SID is to reduce the value of SL in the SRH by 1, and take out the next SID from the SRH according to the SL and update it to the destination address of the IPv6 packet header, and then forward according to the IPv6 destination address lookup table.
- the SID of the Endpoint (endpoint with cross-connect to an array of layer-3adjacencies, End.X) cross-connected to the L3 adjacency array: used to identify a link in the network, the forwarding action corresponding to the End.X SID is based on The Layer 3 interface bound to the SID is forwarded to a specific next hop.
- SID additional behavior can change the forwarding behavior of SRv6 SID, so as to adapt to various business requirements.
- the supported SRv6SID additional behaviors include: ultimate segment pop of the SRH (USP), penultimate segment pop of the SRH (PSP), last hop decapsulation (ultimate segment decapsulation, USD), etc.
- USP ultimate segment pop of the SRH
- PSP penultimate segment pop of the SRH
- USD last hop decapsulation
- the SRH can be removed at the penultimate Endpoint node.
- the tail node does not need to check the SRH information, but only needs to search the Local SID table according to the destination IPv6 address for processing.
- the SRv6 node maintains a Local SID table, which records the SRv6SID generated by the node, as well as the operation instructions and forwarding information bound to the SRv6SID, such as virtual private network (virtual private network, VPN) instances, outgoing interfaces, and next hops.
- the SRv6 node After receiving the SRv6 message, the SRv6 node searches the Local SID table according to the SID in the message, and executes the forwarding action corresponding to the SID according to the search result.
- the packet encapsulation format of IPv6SR is: adding a new IPv6 basic header and SRH in front of the original data packet.
- FIG. 1 shows a schematic structural diagram of an SRv6 packet format.
- the packet header of the SRv6 packet includes an IPv6 packet header and an SRH.
- the IPv6 message header includes a version (Version) field, a traffic type (Traffic Type) field, a flow label (Flow Label) field, a payload length (Payload Length) field, a next message header (Next Header) field, and a hop count Limit (Hop Limit) field, source address (Source Address) field and destination address (Destination Address, DA) field.
- version (Version) field a traffic type (Traffic Type) field, a flow label (Flow Label) field, a payload length (Payload Length) field, a next message header (Next Header) field, and a hop count Limit (Hop Limit) field, source address (Source Address) field and destination address (Destination Address, DA) field.
- RRC Request for Comments
- SRH includes the next header (Next Header) field, header extension length (Hdr Ext Len) field, routing type (Routing Type) field, segment remaining (Segment Left) field, last index (Last Entry) field, mark ( Flags) field, tag (Tag) field and SID list.
- the meaning of each field can refer to the explanation in RFC8754.
- the SL field is also called the SL pointer. During the message forwarding process, the SL pointer points to each element in the SID list in turn, that is, with the different values of SL, segment[SL] is used to represent each element in the SID list .
- the SID list is composed of a plurality of elements segment list[0] to segment list[n] arranged in sequence, each element is a SID, and the length of each element is 128 bits.
- the SIDs in the SID list can be arranged from back to front, segment list[0] corresponds to the last executed segment, segment list[1] corresponds to the penultimate executed segment, and so on.
- the SRH includes the SL field.
- the head node of the forwarding path sets the value of the SL field to N minus 1 (N-1), where N is the SID included in the SID list quantity.
- N is the SID included in the SID list quantity.
- the network device corresponding to each SID in the SID list of the SRH that is, the endpoint node on the forwarding path, sequentially reduces the value of the SL field in the SRH of the packet by 1, that is, the value of the SL field The value is updated, and the segment list[SL] is copied to the DA field of the IPv6 header of the message, that is, the content of the DA field is updated.
- the application scenario includes an SRv6 network
- the SRv6 network includes network device A-network device E, wherein network device A is the source node, and network device E is the final destination node of the message.
- Network device C and network device E are Endpoint nodes, and network device B and network device D are transit nodes.
- the process of packet forwarding through the SRv6 path is as follows:
- the source address (Source Address, SA) in the IPv6 basic header is an address on node A
- node B After node B receives the message, it searches the routing table according to the destination address DA in the IPv6 header, and forwards the message to node C.
- node C After node C receives the message, it performs the following operations:
- node D After node D receives the message, it searches the routing table according to the destination address DA in the IPv6 header, and forwards the message to node E.
- the source node A when it encapsulates the SRH header, it may perform encapsulation in a reduced (Reduced) SRH manner.
- the encapsulated SRH header will not include the first segment identifier.
- the SRH header does not include the first SID (node C), but includes the second SID (node E).
- the End type SID supports PSP operation, so after receiving the message, node C can delete the SRH after updating the destination address DA in the IPv6 message header, so that when sending the message to node D, No need to carry SRH, reducing the waste of bandwidth resources.
- the SRH includes a binding segment identifier (binding SID, BSID), and the BSID will be bound to a SID list to indicate a forwarding path.
- binding SID binding SID
- the head node in the SR network receives a legal BSID, it will perform BSID-related operations.
- the defined BSID-related operations can be: according to the difference of the BSID function, Insert a new SRH header, or insert a new outer IPv6 header containing SRH.
- the bound segment identifier may include a segment identifier bound to an SRv6 policy (endpoint bound to an SRv6 policy, End.B6) type and an endpoint bound to an SR-MPLS policy (endpoint bound to an SR-MPLS policy , End.BM) type segment identification.
- End.B6 may include a segment identifier of type End.B6.Encaps and a segment identifier of type End.B6.Encaps.Red.
- the SRH of the SRv6 message sent by Node A to Node B includes the segment identifier x1 and the next segment Identify D, that is, SRH(D, x1).
- Node B reads the next segment identifier D from the SRH, and uses the segment identifier D to update the destination address in the header of the original IPv6 message.
- next hop is node C
- SRH(D, x1) is always carried in the message during the whole forwarding process.
- Node B When Node B is configured with the End.BM type binding segment identifier y1, after receiving the SRv6 message sent by Node A, Node B reads the next segment identifier D from the segment routing header SRH, and uses the segment identifier D updates the destination address in the original IPv6 packet header.
- the segment identifier x2 is the segment identifier of the End.B6.Encaps type configured on the B node, and the SRH of the SRv6 message sent by the A node to the B node includes the segment identifier x2 and the next segment identifier D, That is SRH(D, x2).
- Node B reads the next segment identifier D from the SRH, and uses the segment identifier D to update the destination address in the header of the original IPv6 message.
- the node B can look up the path information (B-P-C) to the device indicated by the segment identifier D from the routing table according to the segment identifier D, and then encapsulate an IPv6 header and an SRH according to the path information.
- the newly inserted SRH includes segment identifiers of node C and node P in turn, the source address of the newly encapsulated IPv6 message header is node B, and the destination address is node P.
- the node B sends the SRv6 message to the node P.
- the P node After receiving the SRv6 message, the P node reads the next segment identifier C from the segment routing header SRH, uses the segment identifier C to update the destination address in the outer IPv6 message header, and sends the message to node C.
- the P node can perform a PSP pop-up operation on the outbound SRH.
- the C node When the C node receives the message destination address as C, it will strip the IPv6
- the IPv6 packet header is forwarded, and the destination address of the inner layer IPv6 packet header is D.
- the PSP operation will not be performed on the SRH(D, x2), and the SRH(D, x2) will be carried on the B-P-C-D forwarding path.
- the segment identifier y2 is the segment identifier of the End.BM type configured on node B.
- node B After receiving the SRv6 message sent by node A, node B reads the next segment identifier D from the segment routing header SRH, and uses The segment identifier D updates the destination address in the original IPv6 packet header.
- node B can search the routing table for the path information (B-P-C) to the device indicated by the segment identifier D according to the segment identifier D, and repackage an MPLS label stack according to the path information, which includes formulating the MPLS path ( P, C).
- the node B sends the SRv6 message to the P node.
- the P node After receiving the SRv6 message, the P node sends the message to the node C according to the node specified in the MPLS label stack.
- node C receives the destination address of the packet as C, it strips the MPLS label and forwards the packet according to the inner IPv6 header whose destination address is D.
- the PSP operation will not be performed on the SRH(D,x2), and the SRH(D,x2) will be carried on the B-P-C-D forwarding path.
- the node where the currently defined binding segment identifier is located can encapsulate the received message carrying SRH, but is not allowed to perform pop-up operation on the received message carrying SRH, resulting in relatively high message transmission overhead. big.
- the message sent by node A to node D has only one final destination node D after specifying the source routing node except the node B where the BSID is located.
- the segment identifier x2 is the segment identifier of the End.B6.Insert type configured on node B.
- node B After receiving the SRv6 message sent by node A, node B reads the next segment from the segment routing header SRH Identify D, and determine the path information (P-C) of the device where the segment identifier D is located according to the segment identifier D, and add a new SRH between the original IPv6 packet header and the original SRH according to the path information, and add a new SRH to the new SRH A list of segment identifiers (C, P).
- Node B sends the message to Node P, and Node P reads the next segment identifier C from the outer SRH, uses the segment identifier C to update the destination address in the IPv6 message, and sends the updated message to Node C.
- node C After receiving the message, node C reads the segment identifier D from the inner SRH, and updates the destination address in the IPv6 message, so as to send the message to node D.
- the embodiment of the present application provides a message processing method, which is used to solve the problem of wasting bandwidth because the node where the segment identifier of a specific type is located cannot perform the pop-up operation of the segment routing header.
- the segment identifier x3 is the segment identifier of the End.B6.Encaps type configured on the B node, and the B node receives the SRv6 sent by the A node.
- the SL in the SRv6 message sent by node A to node B is still 1.
- this figure is a flow chart of a message transmission method provided in the embodiment of the present application. As shown in FIG. 3, the method may include:
- S301 The second device sends a first packet to the first device.
- the second device may send the first packet to the first device according to the destination address in the IPv6 header of the first packet, where the destination address in the IPv6 packet header is the first segment identifier corresponding to the first device.
- the first packet includes a first segment routing header SRH
- the first SRH may include one or more segment identifiers, and the one or more segment identifiers are used to indicate different segments for transmitting the first packet.
- the one or more segment identifiers may include the first segment identifier, or may not include the first segment identifier.
- the second device adopts the Reduced SRH mode to install the first SRH in the first message, the first SRH does not include the first segment identifier, but the destination address of the first message includes the first segment identifier.
- the second device may be a source node, a transit node or an Endpoint node.
- the second device When the second device is the source node, it may be the host that generates the first packet, or an edge device of the SRv6 network.
- the second device When the second device is an intermediate node, it only performs ordinary IPv6 message forwarding; when the second device is an Endpoint node, it performs SRv6-related processing on the received SRv6 message, and the segment identifier of the second device must be The destination address in the IPv6 header of the received SRv6 packet.
- the payload of the first packet is a packet generated by the second device, for example, the payload of the first packet is a user datagram protocol (user datagram protocol, UDP) header and a UDP payload.
- the payload of the first packet is a packet received by the second device, for example, the payload of the first packet may be an IPv4 packet, an IPv6 packet or an Ethernet packet.
- the second device When the second device is a source node, it will perform an SRH encapsulation operation on the obtained IPv6 message to obtain the first message, or when the second device is an Endpoint node, it will perform an update operation on the SRH to obtain the first message. Therefore, before the second device performs the encapsulation operation or updates the SRH, the first device will send the first segment identification and indication information to the second device, so that the second device can learn the segment identification and indication information of the first device.
- the indication information is used to indicate that the first device has the capability of performing the SRH deletion operation, and the indication information may include the Function part identified in the first segment, or the indication information is an additional behavior flavor corresponding to the identification in the first segment, or the indication information Part of the first paragraph tag itself.
- the first device may directly send the first identification and instruction information to the second device, or the first device may send the first identification and instruction information to the second device through the controller. Send the first identification and instruction information.
- the first device may also send the type of the first segment identifier to the second device, and the type of the first segment identifier may be a binding segment identifier, such as End.B6.Encaps, End.B6.Encaps.Red, End.B6.Encaps.Red, End .BM type.
- the type identified in the first paragraph is a predefined new type, for example, the predefined new types are End.B6.Encaps.DoD, End.B6.Encaps.Red.DOD, End.BM.DoD, where DoD means Delete on demand (delete on demand) the SRH header of the received message.
- the device to which the device generating the first message is connected when accessing the network and the device to which the device that finally receives the first message is connected to the network may be located in the same network domain or in different network domains.
- the network domain may be an autonomous system (autonomous system, AS) domain, an interior gateway protocol (interior gateway protocols, IGP) domain or a management domain.
- the management domain may include, for example, multiple AS domains, and the multiple AS domains are uniformly managed by the controller.
- the first device determines that the first packet includes the first segment identifier.
- the first device After receiving the first message, the first device will determine whether the first message includes the first segment identifier. If the first message includes the first segment identifier, the first device will The instruction performs a corresponding processing operation on the first packet. Specifically, the first device will determine whether the destination address in the first message is the first segment identification, if yes, it indicates that the first message is sent to the first device, then the first device will use the first segment identification command to perform the corresponding operation.
- the first device In response to determining that the first packet contains the first segment identifier, the first device performs an operation of deleting the first SRH on the first packet, and performs an encapsulation operation to generate a second packet.
- the first device When the first device determines that the first packet contains the first identifier, the first device deletes the first SRH in the first packet, and performs an encapsulation operation on the first packet to obtain the second packet.
- the first device may first perform a delete operation on the first SRH, and then perform an encapsulation operation on the first packet, or the first device may first perform an encapsulation operation on the first packet, and then perform a delete operation on the first SRH.
- the embodiments are not limited here.
- the first device When the first SRH also includes the second-segment identifier, before the first device deletes the first SRH, the first device will also read the second-segment identifier from the first-segment routing header, and update the first-segment identifier according to the second-segment identifier. Destination address in the message.
- the first device is Node B in Figure 2e.
- the node B will read the second segment identifier D from SRH(D, x2), and update the destination address in the IPv6 header to D.
- the second segment identifier is used to indicate the next segment of the first message to be transmitted.
- the encapsulation operation performed by the first device may include encapsulating the first packet header on the first packet to generate the second packet.
- the first packet header may be an IPv6 basic header, an IPv6 header including the second SRH, or an MPLS header, and the first packet header may include path information, so as to indicate the transmission path of the second packet through the path information.
- the first device encapsulates the IPv6 header including the second SRH in the outer layer of the first packet to generate the second packet.
- the second SRH includes multiple segment identifiers corresponding to the path information
- the source address of the first packet header is the address of the first device
- the destination address is the first segment identifier in the second SRH.
- the first device is node B in Figure 2e
- the determined path information is B-P-C
- the second SRH is (C, P).
- the first device When the type of the first segment identifier is End.BM or End.BM.DoD, the first device will encapsulate the MPLS header in the outer layer of the first message to generate the second message.
- the MPLS label stack of the MPLS header includes path information.
- the path information may be determined by the first device according to the first segment identifier, or when the first SRH includes the second segment identifier, the first device may determine it according to the second segment identifier.
- the corresponding relationship between the first segment identifier and the path information may be pre-configured on the first device. After the first device determines that the first packet includes the first segment identifier, it may obtain the first segment identifier and the above-mentioned corresponding relationship. path information. Alternatively, after reading the second identifier, the first device may use the second identifier as the destination address to search for path information from the routing table. That is, the first device may search for path information to the device where the second segment identifier is located by iterating the routing table.
- the first device determines the path information according to the second segment identifier and a pre-configured correspondence, where the correspondence includes the second segment identifier and the path information. That is, the first device can be pre-configured with a corresponding relationship, which is used to indicate the path information corresponding to the device where the second segment of identification is located.
- the first device reads the second segment of identification, according to the second segment of identification And the above corresponding relationship determines the path information, without routing iteration, and improves the packet forwarding efficiency.
- the second message further includes a second message header, and the destination address of the second message header is the second segment identifier.
- the second packet header is an IPv6 basic header, and is obtained by updating the IPv6 basic header in the first packet.
- the message sent by node B to node P is the second message
- S304 The first device sends the second packet.
- the first device After the first device generates the second message, it will forward the second message according to the first message header in the second message. Specifically, the first device sends the second packet to the device corresponding to the destination address in the header of the first packet.
- the second SRH may include a third segment identifier and a fourth segment identifier arranged in sequence, and the fourth segment identifier may be the last executed segment identifier among the plurality of segment identifiers included in the second SRH, and the third The instruction corresponding to the segment identifier is to perform an encapsulation operation, and the third segment identifier is the segment identifier of the third device.
- the first device sends the second packet to the third device.
- the first device receives the first packet sent by the second device, the first packet includes the first SRH and the first SRH includes the first segment identifier.
- the first segment identifier is a segment identifier corresponding to the first device, and the instruction corresponding to the first segment identifier is to perform an encapsulation operation.
- the first device After receiving the first packet sent by the second device, the first device will determine whether the first packet contains the first segment of the identifier.
- the first device After determining that the first packet contains the first segment identifier, the first device deletes the first SRH and performs an encapsulation operation to generate a second packet and send the second packet, wherein the second packet
- the first SRH is no longer included in the second packet, thereby reducing the bandwidth occupied by the second packet transmission and improving packet transmission efficiency. That is, in the embodiment of the present application, when the first device needs to perform an encapsulation operation, the function of deleting the segment routing header of the received message can be added as needed, so that the first device can delete the segment routing header in the message as needed, Reduce the occupation of bandwidth resources.
- the second device may be a host or a forwarding device, such as a router.
- the payload of the first packet is a packet generated by the second device.
- the payload of the first packet is a packet received by the second device.
- x is an SRv6BSID on Node B, for example, it can be End.B6.Encaps.DOD or End.B6.Encaps.Red.Dod type;
- y is the Another SRv6BSID, such as End.BM.DoD type, etc.
- the forwarding process of the message is as follows:
- Step 1 Node A sends a first packet to Node B.
- the segment identification information sent by node B is received before node A sends the first packet to node B.
- the segment identification information sent by Node B includes SID value (IPv6 address), segment identification type (such as End.B6.Encps, End.BM, etc.) and indication information.
- the indication information is used to indicate that the Node B has the ability to delete the segment routing header SRH in the received message as required.
- the indication information and the segment identifier can be combined into one field as one field.
- node A After receiving the segment identification information sent by node B, node A encapsulates the segment identification information in the obtained message, and uses the SID of node B as the destination node, thereby obtaining the first message.
- the payload in the first packet is a packet directly sent by node A, for example, may include a UDP header and a UDP payload.
- the payload in the first message is a message received by node A, which may be an IPv4 message, an IPv6 message or an Ethernet message.
- the SRH will not include the segment identifier of node B, but will include the segment identifier of node D, but the IPv6 basic header remains unchanged.
- Step 2 Node B reads the segment identifier D from the segment routing header SRH of the first message.
- Step 3 Node B updates the destination address in the IPv6 basic header in the first packet according to the segment identifier D.
- node B After node B receives the first message sent by node A, it reads the next segment identifier from the SRH of the first message, that is, the segment identifier D, and uses the destination address in the IPv6 basic header in the first message Update to segment ID D.
- Step 4 Node B obtains the path information to node D according to the segment identifier D.
- node B can know that the final destination node of the first message is node D by acquiring the segment identifier D, and obtain the path information to node D according to the segment identifier D.
- the node B may iterate the routing table according to the segment identifier D to obtain the path information, or the node B may obtain the path information according to the segment identifier D and the pre-configured correspondence between the path information and the segment identifier.
- pre-configuration is configured on Node B (segment identifier D: B-C), and when Node B obtains segment identifier D, it determines that the segment identifier D corresponds to B->C path information according to the above relationship.
- Step 5 Node B deletes the segment routing header SRH, and encapsulates the first message according to the path information to obtain the second message.
- the condition for deleting the SRH in the received message is to delete the SRH in the first message.
- the node B re-encapsulates the first packet according to the determined path information.
- MPLS label stack MPLS label stack
- Step 6 Node B sends the second packet to Node C.
- Step 7 Node C pops out the outer IPv6 basic header or the MPLS label stack in the second packet.
- Step 8 Node C sends the second message to node D according to the destination address in the inner IPv6 basic header in the second message.
- the nodes corresponding to the multiple segment identifiers that need to perform encapsulation operations are all configured with the SRH function that deletes received messages on demand to save transmission bandwidth .
- the SRH function that deletes received messages on demand to save transmission bandwidth.
- A.x is a certain SRv6BSID on node A, which can be the type of End.B6.Encaps or End.B6.Encaps.Red;
- A.y is a certain SRv6BSID on node A, which can be End.B6.Encaps or End.
- B.x is a certain SRv6BSID on node B, which can be the type of End.B6.Encaps or End.B6.Encaps.Red;
- B.y is a certain SRv6BSID on node B, which can be End.
- payload (Payload) is a message directly sent by host H1, for example, it can be UDP header + UDP Payload.
- Step 1 Node A receives the IPv6 packet sent by H1.
- the destination address of the IPv6 packet is A.x
- the A.x address is an SRv6BSID on node A.
- Node A encapsulates the message accordingly, and what is encapsulated is a tunnel starting from node A and ending at node D; the end point D of the tunnel can be determined when configuring A.x, or it can be determined by node A according to the received
- the next SID of the destination address of the message, namely H2 is determined through routing iteration; at the same time, node A updates the destination address in the IPv6 header to the next SID, namely H2.
- the encapsulation corresponding to the segment identifier A.x is an IPv6 basic header and an SRH header, wherein the SRH header specifies that the SID List is B.x and D, the source address of the IPv6 basic header is A, and the destination address is B.x.
- Step 2 Node B receives the destination address of the IPv6 message is B.x, and this B.x address is an SRv6BSID on Node B; Node B encapsulates the message accordingly, and the encapsulated is a node B as the starting point and Node C as the end point The tunnel; the end point C of the tunnel can be determined when B.x is configured, or it can be determined by node B through routing iteration according to the next SID of the destination address of the received message, that is, D; at the same time, node B converts IPv6
- node B Since there is only one D after the SID of B.x, which meets the condition of deleting the SRH in the received message on demand, node B will also delete the SRH in the received IPv6 message on demand, and then encapsulate it after deleting .
- Step 3 After node C receives the IPv6 message, it strips the outermost IPv6 basic header and forwards it according to the inner layer IPv6 basic header.
- the destination address of the inner layer message header is D.
- Step 4 After node D receives the IPv6 message, it strips the outermost IPv6 basic header, and forwards the message according to the inner layer IPv6 basic header.
- the destination address of the inner layer message header is H2. Say it is the transit node of this message.
- Step 1 Node A receives the destination address of the IPv6 message as A.y, and this A.y address is an SRv6BSID on node A (encapsulation operation is required); node A encapsulates the message accordingly, and what is encapsulated is an SRv6BSID with node A as The starting point is a tunnel with node D as the end point; the end point D of the tunnel can be determined when A.y is configured, or it can be determined by node A according to the next SID of the destination address of the received message, which is H2; at the same time, node A updates the destination address in the IPv6 header to the next SID, namely H2.
- node A Since there is only one H2 after the SID of A.y, which meets the condition of deleting the SRH in the received message on demand, node A will delete the SRH (H2, A.y) in the received IPv6 message on demand, and delete Then package it.
- the encapsulation corresponding to the segment identifier A.y is an IPv6 basic header and an SRH header, wherein the SRH header specifies the SID List as B.y and D, and the destination address as B.y. After the packet is encapsulated, node A sends the packet to node B.
- Step 2 Node B receives the IPv6 message, the destination address of the IPv6 message is B.y, and this B.y address is an SRv6BSID on B (encapsulation operation needs to be performed); Node B encapsulates the message accordingly, and the encapsulated is A tunnel with B as the starting point and C as the end point; the end point C of the tunnel can be determined when B.y is configured, or can be determined by node B according to the next SID of the destination address of the received message, which is D; At the same time, node B updates the destination address in the IPv6 basic header to the next SID, namely D.
- Node B Since there is only one D after the SID of B.y, which meets the condition of deleting the SRH in the received message on demand, node B will delete the SRH in the received IPv6 message on demand, and then encapsulate after deletion.
- Node B encapsulation is an MPLS label stack (C). After the packet is encapsulated, node B sends the packet to node C.
- Step 3 Node C receives the IPv6 message, strips the outermost MPLS label stack of the IPv6 message, and forwards it according to the IPv6 header of the message.
- the destination address of the message is D. For C, Say it is the transit node of this message.
- Step 4 Node D receives the IPv6 message, strips the IPv6 basic header of the outermost layer of the IPv6 message, and forwards it according to the IPv6 basic header of the message.
- the destination address of the message is H2, for For D, it is the transit node of this message.
- the device connected when the source node accesses the network and the device connected when the destination node accesses the network are respectively located in different network domains.
- the network domain may be an autonomous system AS domain, an interior gateway protocol IGP domain or a management domain.
- the management domain may include, for example, multiple AS domains, and the multiple AS domains are uniformly managed by the controller. For example, in the application scenario shown in Figure 6, host H1 accesses the network through node A, node A and node B belong to IGP domain 1, host H2 accesses the network through node C, and node C and node D belong to IGP domain 2.
- the domain composed of node A and node B can run the intermediate system-to-intermediate system (IS-IS) protocol, and the domain composed of node C and node D can run open shortest path first (open shortest path first).
- OSPF intermediate system-to-intermediate system
- BGP border gateway protocol
- IGP IGP protocols
- segment identifier A.x is an SRv6BSID on node A, which can be End.B6.Encaps or End.B6.Encaps.Red type
- segment identifier A.y is another SRv6BSID on node A, which can be End.BM type
- Payload It is a message directly sent by host H1, for example, it can be UDP header + UDP Payload.
- Step 1 Node A receives the IPv6 message sent by H1, the destination address in the message is A.x, and the A.x address is an SRv6BSID on node A (encapsulation operation is required).
- Node A encapsulates the message accordingly, and what is encapsulated is a tunnel with A as the starting point and D as the end point; the end point D of the tunnel can be determined when configuring A.x, or it can be determined by node A according to the received message It is determined by the next SID of the destination address, namely H2; at the same time, node A updates the destination address in the IPv6 header to the next SID, namely H2.
- node A When node A encapsulates the received message, there is only one H2 after A.x, which meets the condition of deleting the SRH in the received message on demand, then node A will encapsulate the SRH (H2, A.x ) to be deleted on demand, and then encapsulated after deletion.
- the encapsulation corresponding to the segment identifier A.x is an IPv6 basic header and an SRH header, wherein the SRH header specifies SID List as B, C and D, the source address of the IPv6 basic header is A, and the destination address is B.
- Step 2 Node B receives the IPv6 message sent by node A.
- the destination address of the IPv6 message is B.
- the destination address B can be a SID of type End or End.X configured on node B; node B will read Take the next SID in the SID List, which is C, update the destination address in the outer IPv6 header to C, and send the updated IPv6 message to node C.
- Step 3 Node C receives the IPv6 message sent by node B, the destination address of the IPv6 message is C, for example, the destination address C can be a SID of type End or End.X configured on node C; node C will read Take the next SID in the SID List, which is D, update the destination address in the outer IPv6 header to D, and send the updated IPv6 message to node D.
- node C since node C is configured with a SID of type End or End.X, and there is only one D after C in the SRH, node C can perform a PSP eject operation on the SRH. Therefore, the IPv6 message sent by node C to node D does not include the SRH.
- Step 4 After node D receives the message sent by node C, the destination address of the IPv6 message is D, then node D strips the outermost IPv6 header and forwards it according to the inner IPv6 header.
- the destination address of the inner layer IPv6 header is H2, which is the transit node of the message for D, and node D sends the message to the H2 node according to the destination address H2 of the inner layer message.
- Step 1 Node A receives the IPv6 message sent by H1, the destination address in the message is A.y, and this A.y address is an SRv6BSID on node A (encapsulation operation is required); node A encapsulates the message accordingly , what is encapsulated is a tunnel with A as the starting point and D as the end point; the end point D of the tunnel can be determined when A.y is configured, or it can be the next SID of node A according to the destination address of the received message, that is, H2 and determined; at the same time, node A updates the destination address in the IPv6 header to the next SID, that is, H2.
- node A When node A encapsulates the received message, there is only one H2 after A.y, which meets the condition of deleting the SRH in the received message on demand, then node A will encapsulate the SRH (H2, A.y) in the received IPv6 message ) to be deleted on demand, and then encapsulated after deletion.
- the encapsulation corresponding to the segment identifier A.y is an MPLS label stack, and the label switch path (label switch path, LSP) represented by the MPLS label stack will pass through B, C, and D in sequence.
- Step 2 After receiving the MPLS message, node B sends it to node C along the path of the LSP according to the label stack.
- Step 3 Node C receives the MPLS message, and sends it to node D along the path of the LSP according to the label stack.
- Step 4 Node D receives the MPLS message, strips the MPLS label stack in the message, and forwards the message according to the inner layer IPv6 header; the destination address of the inner layer IPv6 header is H2, which is this for D The transit node of the message, the node D sends the message to the H2 node according to the destination address H2 of the inner message.
- this figure is a flow chart of a method for publishing a segment identifier provided in an embodiment of the present application. As shown in FIG. 7, the method may include:
- S701 The first device acquires the first segment of identification.
- the first device may generate a first segment identifier locally, where the first segment identifier corresponds to the first device and is used to indicate that the first device has the capability of performing an SRH deletion operation.
- the first segment identifier may be a segment identifier of type End.B6, or a segment identifier of type End.BM.
- the first segment identifier is a segment identifier of type End.B6.Dod, or a segment identifier of type End.BM.Dod.
- the first device When the first device acquires the first segment identifier, it may also acquire indication information corresponding to the first segment identifier, where the indication information is used to indicate that the segment (first device) corresponding to the first segment identifier has the ability to perform the delete SRH deletion operation. ability.
- the indication information may include the Function part identified in the first paragraph, or the indication information is an additional behavior flavor corresponding to the first paragraph identification, or the indication information is a part of the first paragraph identification.
- the indication information may include the Function part identified in the first paragraph, or the indication information is an additional behavior flavor corresponding to the first paragraph identification, or the indication information is a part of the first paragraph identification.
- S702 The first device sends the first identifier to the second device.
- the first device After the first device obtains the first segment of identification, it will send the first segment of identification to the second device, so that the second device will encapsulate the first segment of identification into the corresponding message, and then when the message is forwarded to the second If there is one device, the first device may delete the SRH in the message according to the indication of the first segment identifier. Wherein, the second device may encapsulate the first segment identifier into the destination address of the packet, or encapsulate the first segment identifier into the SRH of the packet. At the same time, the first device may also send indication information corresponding to the first segment identifier to the second device.
- the first device may directly send the first identification and indication information to the second device, or send the first identification and indication information to the second device through the controller.
- embodiments of the present application provide a message processing device, a release segment identification device, and a network device, which will be described below with reference to the accompanying drawings.
- FIG. 8 this figure is a schematic structural diagram of a message processing device provided by an embodiment of the present application. As shown in FIG. 8 , the device can realize the function of the first device in the above-mentioned method embodiment.
- a unit 801 a determining unit 802 , a generating unit 803 and a sending unit 804 .
- the receiving unit 801 is configured to receive a first packet sent by the second device, where the first packet includes a first segment routing header SRH.
- a determining unit 802 configured to determine that the first packet includes a first segment identifier, where the first segment identifier is a segment identifier corresponding to the first device. For the specific implementation of the determining unit 802, reference may be made to the related description of S302.
- the generating unit 803 is configured to, in response to determining that the first packet contains the first segment identifier, perform an operation of deleting the first SRH on the first packet, and perform an encapsulation operation to generate a second packet.
- the generating unit 803 reference may be made to the related description of S303.
- the generating unit 803 is specifically configured to determine that the remaining SL in the first SRH is equal to 1 or the updated SL is equal to 0; in response to determining that the first packet contains the An identifier and the SL is equal to 1 or the updated SL is equal to 0, the first SRH is deleted for the first message, and an encapsulation operation is performed to generate a second message.
- the type of the first segment identifier is a binding segment identifier.
- the first segment identifier is a segment identifier of the End.B6 type bound to the SRv6 policy, or a segment identifier of the End.BM type bound to the SR-MPLS policy.
- the first segment identifier is an endpoint End.B6.Dod type segment identifier for on-demand deletion of an endpoint bound to an SRv6 policy, or an on-demand deletion of an endpoint bound to an SR-MPLS policy
- the generating unit 803 is specifically configured to delete the first SRH in the first packet, and encapsulate the first packet header in the first packet to generate the Describe the second message.
- the first packet header is an Internet Protocol Version 6 IPv6 basic header, an IPv6 header including the second SRH, or a Multiprotocol Label Switching MPLS header.
- the first packet header includes path information, and the path information is used to indicate a transmission path of the second packet.
- the path information corresponds to the first segment identifier.
- the first SRH includes a second segment identifier
- the second segment identifier is used to indicate the next segment to transmit the first packet
- the path information is related to the second segment identifier. Segment ID corresponds.
- the second packet further includes a second packet header, and a destination address of the second packet header is identified by the second segment.
- the segment identifier list in the second SRH includes the path information, or the label stack of the MPLS header includes the path information.
- the second device is a host
- the payload of the first packet is a packet generated by the second device
- the second device is a forwarding device
- the first A message payload is a message received by the second device.
- the device to which the device that generates the first message is connected to the network and the device that is connected to the network when the device that finally receives the first message belongs to a different network domain .
- the device further includes: a sending unit;
- the sending unit is configured to send the first segment identifier and indication information to the second device, where the indication information is used to indicate that the first device is capable of performing an SRH deletion operation.
- the sending unit For the specific implementation of the sending unit, reference may be made to the related description of S301 above.
- the indication information is included in the Function part of the first segment identifier, or the indication information is an additional behavior flavor corresponding to the first segment identifier.
- this figure is a structural diagram of an apparatus for publishing a segment identifier provided in an embodiment of the present application.
- the apparatus 900 can realize the functions of the above-mentioned first device, and the apparatus may include: an acquisition unit 901 and Sending unit 902.
- the acquiring unit 901 is configured to acquire a first segment identifier, where the first segment identifier corresponds to the first device, and is used to indicate that the first device has a capability of performing an SRH deletion operation.
- the acquiring unit 901 reference may be made to the related description of S701 above.
- the sending unit 902 is configured to send the first segment identifier to the second device, so that the second device encapsulates the first segment identifier into a corresponding packet.
- the sending unit 902 reference may be made to the related description of S702 above.
- the sending unit is further configured to send indication information corresponding to the first segment identifier to the second device, where the indication information is used to indicate that the segment corresponding to the first segment identifier has the ability to perform an SRH deletion operation Ability.
- the indication information includes the Function part of the first paragraph identification, or the indication information is an additional behavior flavor corresponding to the first paragraph identification, or the indication information is a part of the first paragraph identification.
- the sending unit 902 is specifically configured to send the first segment identifier to the second device through the controller.
- the first segment identifier is a segment identifier of type End.B6, or a segment identifier of type End.BM.
- the first segment identifier is a segment identifier of type End.B6.Dod, or a segment identifier of type End.BM.Dod.
- Fig. 10 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
- the communication device may be, for example, the first device, the second device, or the third device in the method embodiment, or it may be the embodiment shown in Fig. 8
- the device implementation of the device 800 in the embodiment shown in FIG. 9 may also be the device realization of the device 900 in the embodiment shown in FIG. 9 .
- the communication device 1000 includes at least a processor 1010 .
- the communication device 1000 may also include a communication interface 1020 and a memory 1030 .
- the number of processors 1010 in the communication device 1000 may be one or more, and one processor is taken as an example in FIG. 10 .
- the processor 1010, the communication interface 1020, and the memory 1030 may be connected through a bus system or other methods, wherein, in FIG. 10 , connection through a bus system 1040 is taken as an example.
- the processor 1010 may be a CPU, an NP, or a combination of a CPU and an NP.
- the processor 1010 may further include a hardware chip.
- the aforementioned hardware chip may be an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD) or a combination thereof.
- the aforementioned PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL) or any combination thereof.
- the processor 1010 may perform an operation of deleting the first SRH on the first packet in the above method example, and perform related functions such as an encapsulation operation.
- the communication interface 1020 is used to receive and send packets, specifically, the communication interface 1020 may include a receiving interface and a sending interface. Wherein, the receiving interface may be used to receive messages, and the sending interface may be used to send messages.
- the number of communication interfaces 1020 may be one or more.
- the memory 1030 may include a volatile memory (English: volatile memory), such as a random-access memory (random-access memory, RAM); the memory 1030 may also include a non-volatile memory (English: non-volatile memory), such as a fast Flash memory (English: flash memory), hard disk (hard disk drive, HDD) or solid-state drive (solid-state drive, SSD); the memory 1030 may also include a combination of the above types of memory.
- volatile memory such as a random-access memory (random-access memory, RAM)
- non-volatile memory such as a fast Flash memory (English: flash memory), hard disk (hard disk drive, HDD) or solid-state drive (solid-state drive, SSD)
- the memory 1030 may also include a combination of the above types of memory.
- the memory 1030 stores operating systems and programs, executable modules or data structures, or their subsets, or their extended sets, where the programs may include various operating instructions for implementing various operations.
- the operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
- the processor 1010 can read the program in the memory 1030 to implement the message processing method provided in the embodiment of the present application.
- the memory 1030 may be a storage device in the communication device 1000 , or may be a storage device independent of the communication device 1000 .
- the bus system 1040 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus or the like.
- PCI peripheral component interconnect
- EISA extended industry standard architecture
- the bus system 1040 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 10 , but it does not mean that there is only one bus or one type of bus.
- FIG. 11 is a schematic structural diagram of another communication device 1100 provided by the embodiment of the present application.
- the communication device may be, for example, the first device, the second device, or the third device in the method embodiment, or it may also be the communication device shown in FIG. 8
- the communication device 1100 includes: a main control board 1110 and an interface board 1130 .
- the main control board 1110 is also called a main processing unit (main processing unit, MPU) or a route processing card (route processor card). Equipment maintenance, protocol processing functions.
- the main control board 1110 includes: a CPU 1111 and a memory 1112 .
- the interface board 1130 is also called a line interface unit card (line processing unit, LPU), a line card (line card), or a service board.
- the interface board 1130 is used to provide various service interfaces and implement data packet forwarding.
- the service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc., and the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients).
- the interface board 1130 includes: a central processing unit 1131 , a network processor 1132 , a forwarding entry storage 1134 and a physical interface card (ph8sical interface card, PIC) 1133 .
- the CPU 1131 on the interface board 1130 is used to control and manage the interface board 1130 and communicate with the CPU 1111 on the main control board 1110 .
- the network processor 1132 is configured to implement message forwarding processing.
- the form of the network processor 1132 may be a forwarding chip.
- the processing of the uplink message includes: processing of the inbound interface of the message, lookup of the forwarding table; processing of the downlink message: lookup of the forwarding table, and so on.
- the physical interface card 1133 is used to realize the interconnection function of the physical layer, through which the original traffic enters the interface board 1130 , and the processed packets are sent out from the physical interface card 1133 .
- the physical interface card 1133 includes at least one physical interface, which is also called a physical port.
- the physical interface card 1133 is also called a daughter card, which can be installed on the interface board 1130, and is responsible for converting the photoelectric signal into a message, checking the validity of the message and forwarding it to the network processor 1132 for processing.
- the central processing unit 1131 of the interface board 1103 can also execute the functions of the network processor 1132 , such as implementing software forwarding based on a general-purpose CPU, so that the physical interface card 1133 does not need the network processor 1132 .
- the communication device 1100 includes multiple interface boards.
- the communication device 1100 further includes an interface board 1140
- the interface board 1140 includes: a central processing unit 1141 , a network processor 1142 , a forwarding entry storage 1144 and a physical interface card 1143 .
- the communications device 1100 further includes a switching fabric unit 1120 .
- the SFU 1120 may also be called a SFU (switch fabric unit, SFU).
- SFU switch fabric unit
- the SFU board 1120 is used to complete the data exchange between the interface boards.
- the interface board 1130 and the interface board 1140 may communicate through the switching fabric board 1120 .
- the main control board 1110 is coupled to the interface board 1130 .
- the main control board 1110, the interface board 1130, the interface board 1140, and the switching fabric board 1120 are connected to the system backplane through the system bus to implement intercommunication.
- an inter-process communication protocol IPC
- IPC inter-process communication
- the communication device 1100 includes a control plane and a forwarding plane.
- the control plane includes a main control board 1110 and a central processing unit 1131.
- the forwarding plane includes various components for performing forwarding, such as a forwarding entry storage 1134, a physical interface card 1133, and a network processing device 1132.
- the control plane executes routers, generates forwarding tables, processes signaling and protocol packets, configures and maintains device status, and other functions.
- the control plane sends the generated forwarding tables to the forwarding plane.
- the network processor 1132 The issued forwarding table looks up and forwards the packets received by the physical interface card 1133 .
- the forwarding table issued by the control plane may be stored in the forwarding table item storage 1134 . In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
- the sending unit and the receiving unit in the embodiment shown in FIG. 8 may be different physical interface cards, for example, the receiving unit 801 is equivalent to the physical interface card 1133 , and the sending unit 804 is equivalent to the physical interface card 1134 .
- the determining unit 802 or the generating unit 803 in the apparatus 800 may be equivalent to one or more of the central processing unit 1111 , the central processing unit 1131 , and the central processing unit 1141 in the communication device 1100 .
- the operations on the interface board 1140 in the embodiment of the present application are consistent with the operations on the interface board 1130 , and are not repeated for brevity.
- the communication device 1100 in this embodiment may correspond to the address requesting device or address assignment in each of the foregoing method embodiments, and the main control board 1110, the interface board 1130 and/or the interface board 1140 in the communication device 1100 may implement the above-mentioned
- the functions of the first device, the second device, or the third device in each method embodiment have functions and/or various steps implemented, and are not repeated here.
- main control boards there may be one or more main control boards, and when there are multiple main control boards, it may include an active main control board and a standby main control board.
- the communication device can have at least one SFU, and the data exchange between multiple interface boards can be realized through the SFU to provide large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of communication devices with a distributed architecture are greater than those with a centralized architecture.
- the form of the communication device can also be that there is only one board, that is, there is no switching fabric board, and the functions of the interface board and the main control board are integrated on this board.
- the central processing unit and the main control board on the interface board The central processing unit on the board can be combined into one central processing unit on the board to perform the superimposed functions of the two.
- This form of equipment has low data exchange and processing capabilities (for example, low-end switches or routers, etc.) equipment). Which architecture to use depends on the specific networking deployment scenario.
- the foregoing first device, second device, or third device may be implemented as a virtualization device.
- the virtualization device may be a virtual machine (English: Virtual Machine, VM) running a program for sending packets, and the virtual machine is deployed on a hardware device (for example, a physical server).
- a virtual machine refers to a complete computer system that is simulated by software and has complete hardware system functions and runs in a completely isolated environment.
- the virtual machine can be configured as the first device and the second device.
- the first device and the second device may be implemented based on a common physical server combined with a Network Functions Virtualization (Network Functions Virtualization, NFV) technology.
- the first device and the second device are virtual hosts, virtual routers or virtual switches. Those skilled in the art can combine the NFV technology to virtualize the first device, the second device or the third device with the above-mentioned functions on a general physical server by reading this application, which will not be repeated here.
- the embodiment of the present application also provides a chip, including a processor and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processor; the processor, for example, can be a specific implementation form of the device 800 shown in FIG. 8 , which can be used to execute the method of obtaining the address prefix above.
- the processor is coupled with a memory, and the memory is used to store a program or an instruction, and when the program or instruction is executed by the processor, the system-on-a-chip implements the method in any one of the above method embodiments.
- processors in the chip system there may be one or more processors in the chip system.
- the processor can be realized by hardware or by software.
- the processor may be a logic circuit, an integrated circuit, or the like.
- the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
- the memory can be integrated with the processor, or can be set separately from the processor, which is not limited in this application.
- the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips.
- the setting method of the processor is not specifically limited.
- the chip system may be a field programmable gate array (field programmable gate array, FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (central processor unit, CPU), it can also be a network processor (network processor, NP), it can also be a digital signal processing circuit (digital signal processor, DSP), it can also be a microcontroller (micro controller unit, MCU), and can also be a programmable logic device (programmable logic device, PLD) or other integrated chips.
- FPGA field programmable gate array
- ASIC application specific integrated circuit
- SoC system on chip
- An embodiment of the present application also provides a packet processing system, and the system includes: a first device and a second device.
- the second device is configured to send a first packet to the first device, where the first packet includes the first SRH; and the first device is configured to execute the packet processing method described in FIG. 3 .
- the first device is further configured to execute the method for publishing a segment identifier described in FIG. 7 .
- the embodiment of the present application also provides a computer-readable storage medium, including an instruction or a computer program, which, when run on a computer, causes the computer to execute the method for processing a message or the method for issuing a segment identifier provided in the above embodiments.
- the embodiment of the present application also provides a computer program product including an instruction or a computer program, which, when run on a computer, causes the computer to execute the method for processing a message or the method for issuing a segment identifier provided in the above embodiments.
- the embodiment of the present application also provides a chip, including a memory and a processor.
- Memory is used to store instructions or program codes.
- the processor is used to call and run the instruction or program code from the memory, so as to execute the message processing method; or, the processor executes the method for issuing segment identifiers.
- the embodiment of the present application also provides a chip.
- the chip includes a processor but does not include a memory.
- the processor is used to read and execute instructions or program codes stored in the memory outside the chip. When the instructions or program codes are executed When, the processor executes the message processing method; or, the processor executes the method for issuing segment identifiers.
- the disclosed system, device and method can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of units is only a logical business division. In actual implementation, there may be other division methods.
- multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- a unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each business unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software business units.
- the integrated unit is realized in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
- the services described in the present invention may be implemented by hardware, software, firmware or any combination thereof.
- the services may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
- Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
- a storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请公开了一种报文处理方法,第二设备向第一设备发送第一报文,该第一报文中包括第一段路由头SRH,在第一设备接收第二设备发送的第一报文后,将判断第一报文中是否包括第一段标识。在确定出第一报文包括第一段标识时,第一设备将删除第一SRH,并执行封装操作生成第二报文,并对第二报文进行转发。也就是,当第一段标识对应的功能或指令为执行封装操作时,第一设备在接收到第一报文后,可以根据实际情况将第一报文中的第一SRH删除,并执行封装操作生成第二报文,该第二报文中不包括第一SRH,从而减少传输第二报文所占用的带宽,提高报文传输效率。
Description
本申请要求于2021年11月17日提交的申请号为202111367033.6、申请名称为“一种报文处理方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,尤其涉及一种报文处理方法、装置及设备。
段路由(segment routing,SR)是一种基于源路由理念设计的、在网络上转发数据包的协议,支持在源节点显式指定数据包转发路径。当SR部署在互联网协议版本6(Internet Protocol Version 6,IPv6)数据平面上时,称为IPv6segment routing(SRv6)。在SRv6应用中,转发路径信息由包含段标识列表(SID list)的段路由头(segment routing header,SRH)携带。SID list包括依次排列的多个段标识(SID),分别表示多个段,每个段为处理报文的指令或指令集合。SRH被封装在报文中,通过其中的段标识列表承载SR网络对该报文的处理过程。
SRv6网络中的每个SID的长度为128比特(bit),则SID list中每增加一个SID,SRH的长度就会增加128bit,报文的长度也会增加128bit。一方面,报文长度增加将导致转发过程中占用大量的网络资源,导致网络链路带宽利用率低。另一方面,SRH长度过长将增加报文处理难度,造成现有设备难以对SRH进行有效处理。为减轻网络节点的传输压力,在SID附加行为(flavor),以改变SID所表示节点的转发行为。其中,SRv6SID支持的附件行为可以包括:倒数第二个Endpoint节点执行SRH移除操作(Penultimate Segment POP of the SRH,PSP)。为了减轻SRv6网络尾节点的负担,可以在倒数第二个Endpoint节点将SRH移除,尾节点不需要查看SRH信息,只需根据目的IPv6地址查找Local SID表进行处理。
然而,在相关通信标准中定义了只有特定类型的SID才支持PSP操作,例如End、End。X和End.T类型的SID,对于其它类型的SID无法实现PSP操作,导致报文传输开销较大,影响传输效率。
发明内容
本申请提供了一种报文处理方法、装置及设备,以解决SRH的存在影响SRv6报文传输效率的问题。
在本申请的第一方面,提供了一种报文处理方法,该方法可以包括:第一设备接收第二设备发送的第一报文,该第一报文包括第一SRH。其中,第一SRH中可以包括一个或多个段标识,该一个或多个段标识用于指示传输第一报文的段。在第一设备接收到第一报文后,将确定第一报文是否包含第一段标识,该第一段标识为第一设备对应的段标识。如果第一报文包含第一段标识,表明该第一报文为发送给第一设备的报文,则第一设备删除第一报文中的第一SRH,并执行封装操作生成第二报文。第一设备将根据第二报文中的目的地址转发第二报文。
在该实现方式中,第一设备在接收到第一报文后,可以根据实际情况将第一报文中的 第一SRH删除,并执行封装操作生成第二报文,该第二报文中不包括第一SRH,从而减少传输第二报文所占用的带宽,提高报文传输效率。即,本申请实施例中在第一设备需要执行封装操作时,可以配置按需删除段路由头的功能,减少对带宽资源的占用。
在一种具体的实现方式中,所述响应于确定所述第一报文包含所述第一段标识,所述第一设备对所述第一报文执行删除所述第一SRH,并执行封装操作生成第二报文,包括:第一设备确定第一SRH中段剩余SL等于1或更新后的SL等于0;响应于确定第一报文包含第一段标识以及SL等于1或更新后的SL等于0,第一设备对第一报文执行删除第一SRH,并执行封装操作生成第二报文。在该实现方式中,第一设备在确定更新前的SL-1或更新后的SL=0时,表明第一段标识为SRH中的倒数第二个段标识,当从第一SRH中读取最后一个段标识后,后续转发设备不再利用第一SRH,则第一设备将第一报文中第一SRH删除,减少后续传输过程中对于带宽资源的占用。
在一种具体的实现方式中,所述第一段标识的类型为绑定段标识。
在一种具体的实现方式中,所述第一段标识为绑定到SRv6策略的端点End.B6类型的段标识,或为绑定到SR-MPLS策略的端点End.BM类型的段标识。
在一种具体的实现方式中,所述第一段标识为按需删除绑定到SRv6策略的端点End.B6.Dod类型的段标识,或为按需删除绑定到SR-MPLS策略的端点End.BM.Dod类型的段标识。
在一种具体的实现方式中,所述第一设备对所述第一报文执行删除所述第一SRH操作,并执行封装操作生成第二报文包括:所述第一设备将所述第一报文中的所述第一SRH删除,并对所述第一报文封装第一报文头生成所述第二报文。在该实现方式中,第一设备在删除第一SRH时,可以在第一报文的外层封装第一报文头,以通过新封装的第一报文头来执行第二报文的传输路径。
在一种具体的实现方式中,所述第一报文头为互联网协议第六版IPv6基础头、包含第二SRH的IPv6头或者多协议标签交换MPLS头。在该实现方式中,第一设备可以根据实际应用情况来确定所封装的第一报文头的类型,例如封装IPv6基础头或者封装包含第二SRH的IPv6头,其中,第二SRH中可以包括一个或多个段标识,该一个或多个段标识用于指示传输第二报文的段,或者封装MPLS头。
在一种具体的实现方式中,所述第一报文头中包含路径信息,所述路径信息用于指示所述第二报文的传输路径。
在一种具体的实现方式中,所述路径信息与所述第一段标识对应。
在一种具体的实现方式中,所述第一SRH包括第二段标识,所述第二段标识用于指示传输所述第一报文的下一个段,所述路径信息与所述第二段标识对应。
在一种具体的实现方式中,所述第二报文还包含第二报文头,所述第二报文头的目的地址为所述第二段标识。
在一种具体的实现方式中,所述第二SRH中的段标识列表包含所述路径信息,或者所述MPLS头的标签栈包含所述路径信息。
在一种具体的实现方式中,所述第二设备为主机,所述第一报文的载荷为所述第二设 备所生成的报文,或所述第二设备为转发设备,所述第一报文的载荷为所述第二设备所接收的报文。
在一种具体的实现方式中,生成所述第一报文的设备接入网络时所连接的设备与最终接收所述第一报文的设备接入网络时所连接的设备属于不同的网络域。
在一种具体的实现方式中,所述方法还包括:所述第一设备向所述第二设备发送所述第一段标识以及指示信息,所述指示信息用于指示所述第一设备具有执行SRH删除操作的能力。在该实现方式中,第一设备可以向第二设备发布自身的段标识以及指示信息,以通过该指示信息指示第一设备具有删除SRH的能力。具体地,第一设备可以直接向第二设备发布第一段标识和指示信息,或者第一设备通过控制器向第二设备发布第一段标识和指示信息。
其中,指示信息包含在第一段标识的功能Function部分,或者指示信息为对应第一段标识的附加行为flavor。
在本申请第二方面,提供了一种发布段标识的方法,该方法包括:第一设备获取第一段标识,所述第一段标识与第一设备对应,该第一段标识用于指示第一设备具有执行SRH删除操作的能力;将该第一段标识发送给第二设备。第二设备在接收到第一段标识后,可以将第一段标识封装到对应的报文中,以使得该报文可以被转发到第一设备时,第一设备根据第一段标识的指示删除报文中的SRH。
在一种具体的实现方式中,所述方法还包括:第一设备向第二设备发送第一段标识对应的指示信息,该指示信息用于指示第三段标识所对应的段具有执行SRH删除操作的能力。
在一种具体的实现方式中,指示信息包含在第一段标识的功能Function部分,或者指示信息为对应第一段标识的附加行为flavor,或者指示信息为第一段标识的一部分。
在一种具体的实现方式中,第一设备可以直接向第二设备发送本地所生成的第一段标识,也可以通过控制器向第二设备发送第一段标识。
在一种具体的实现方式中,第一段标识为End.B6类型的段标识,或为End.BM类型的段标识。
在一种具体的实现方式中,第一段标识为End.B6.Dod类型的段标识,或为End.BM.Dod类型的段标识。
在本申请第三方面,提供了一种报文处理装置,所述装置应用于第一设备,包括:接收单元,用于接收第二设备发送的第一报文,所述第一报文包括第一段路由头SRH;确定单元,用于确定所述第一报文包含第一段标识,所述第一段标识为所述第一设备对应的段标识;生成单元,用于响应于确定所述第一报文包含所述第一段标识,对所述第一报文执行删除所述第一SRH操作,并执行封装操作生成第二报文;发送单元,用于发送所述第二报文。
在一种具体的实现方式中,所述生成单元,具体用于确定所述第一SRH中段剩余SL等于1或更新后的SL等于0;响应于确定所述第一报文包含所述第一段标识以及所述SL等于1或更新后的SL等于0,对所述第一报文执行删除所述第一SRH,并执行封装操作生成第二报文。
在一种具体的实现方式中,所述第一段标识的类型为绑定段标识。
在一种具体的实现方式中,所述第一段标识为绑定到SRv6策略的端点End.B6类型的段标识,或为绑定到SR-MPLS策略的端点End.BM类型的段标识。
在一种具体的实现方式中,所述第一段标识为按需删除绑定到SRv6策略的端点End.B6.Dod类型的段标识,或为按需删除绑定到SR-MPLS策略的端点End.BM.Dod类型的段标识。
在一种具体的实现方式中,所述生成单元,具体用于将所述第一报文中的所述第一SRH删除,并对所述第一报文封装第一报文头生成所述第二报文。
在一种具体的实现方式中,所述第一报文头为互联网协议第六版IPv6基础头、包含第二SRH的IPv6头或者多协议标签交换MPLS头。
在一种具体的实现方式中,所述第一报文头中包含路径信息,所述路径信息用于指示所述第二报文的传输路径。
在一种具体的实现方式中,所述路径信息与所述第一段标识对应。
在一种具体的实现方式中,所述第一SRH包括第二段标识,所述第二段标识用于指示传输所述第一报文的下一个段,所述路径信息与所述第二段标识对应。
在一种具体的实现方式中,所述第二报文还包含第二报文头,所述第二报文头的目的地址为所述第二段标识。
在一种具体的实现方式中,所述第二SRH中的段标识列表包含所述路径信息,或者所述MPLS头的标签栈包含所述路径信息。
在一种具体的实现方式中,所述第二设备为主机,所述第一报文的载荷为所述第二设备所生成的报文,或所述第二设备为转发设备,所述第一报文的载荷为所述第二设备所接收的报文。
在一种具体的实现方式中,生成所述第一报文的设备接入网络时所连接的设备与最终接收所述第一报文的设备接入网络时所连接的设备属于不同的网络域。
在一种具体的实现方式中,所述发送单元,还用于向所述第二设备发送所述第一段标识以及指示信息,所述指示信息用于指示所述第一设备具有执行SRH删除操作的能力。
在一种具体的实现方式中,所述指示信息包含在所述第一段标识的功能Function部分,或者所述指示信息为对应所述第一段标识的附加行为flavor。
在本申请第四方面,提供了一种发布段标识的装置,该装置应用于第一设备,可以包括:获取单元,用于获取第一段标识,该第一段标识与第一设备对应,用于指示第一设备具有执行SRH删除操作的能力;发送单元,用于将该第一段标识发送给第二设备,以使得第二设备将第一段标识封装到对应报文中。
在一种具体的实现方式中,所述发送单元,还用于向第二设备发送第一段标识对应的指示信息,该指示信息用于指示第一段标识所对应的段具有执行SRH删除操作的能力。
在一种具体的实现方式中,指示信息包含在第一段标识的功能Function部分,或者指示信息为对应第一段标识的附加行为flavor,或者指示信息为第一段标识的一部分。
在一种具体的实现方式中,发送单元,具体用于通过控制器向第二设备转发第一段标 识。
在一种具体的实现方式中,第一段标识为End.B6类型的段标识,或为End.BM类型的段标识。
在一种具体的实现方式中,第一段标识为End.B6.Dod类型的段标识,或为End.BM.Dod类型的段标识。
在本申请第五方面,提供了一种报文处理系统,该系统包括:第一设备和第二设备。其中,第二设备,用于向第一设备发送第一报文,该第一报文包括第一SRH;第一设备用于执行第一方面或第一方面任意一种实现方式中所述的报文处理方法。
在一种可能的实现方式中,第一设备还可以用于执行上述第二方面或第二方面任意一种实现方式中所述的发布段标识方法。
在本申请第六方面,提供了一种通信设备,所述设备包括:处理器和存储器;所述存储器,用于存储指令或计算机程序;所述处理器,用于执行所述存储器中的所述指令或计算机程序,以使得所述通信设备执行第一方面或第一方面任意一种实现方式中所述的报文处理方法,或者执行第二方面或第二方面任意一种实现方式中所述的发布段标识的方法。
在本申请第七方面,提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行第一方面或第一方面任意一种实现方式中所述的报文处理方法,或者执行第二方面或第二方面任意一种实现方式中所述的发布段标识的方法。
在本申请第八方面,提供了一种芯片,包括存储器和处理器。存储器用于存储指令或程序代码。处理器用于从存储器中调用并运行该指令或程序代码,以执行第一方面或第一方面任意一种实现方式中所述的报文处理方法;或,处理器执行上述第二方面或第二方面任意一种实现方式中所述的发布段标识的方法。
在本申请第九方面,提供了一种芯片,上述芯片包括处理器,但不包括存储器,处理器用于读取并执行所述芯片外的存储器中存储的指令或程序代码,当指令或程序代码被执行时,处理器执行第一方面或第一方面任意一种实现方式中所述的报文处理方法;或,处理器执行第二方面或第二方面任意一种实现方式中所述的发布段标识的方法。
通过本申请提供的技术方案,第二设备向第一设备发送第一报文,该第一报文中包括第一段路由头SRH。在第一设备接收第二设备发送的第一报文后,将判断第一报文中是否包括第一段标识,该第一段标识为第一设备对应的段标识。在确定出第一报文包括第一段标识时,第一设备将对第一报文执行删除第一SRH操作,并执行封装操作生成第二报文,以对第二报文进行转发。也就是,当第一段标识对应的功能或指令为执行封装操作时,第一设备在接收到第一报文后,可以根据实际情况将第一报文中的第一SRH删除,并执行封装操作生成第二报文,该第二报文中不包括第一SRH,从而减少传输第二报文所占用的带宽,提高报文传输效率。即,本申请中在第一设备需要执行封装操作时,可以配置按需删除段路由头的功能,减少对带宽资源的占用。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请 中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一种SRv6报文格式示意图;
图2a为一种SRv6报文传输示意图;
图2b为一种应用场景中SRv6报文传输示意图;
图2c为另一种应用场景中SRv6报文传输示意图;
图2d为另一种应用场景中SRv6报文传输示意图;
图2e为本申请实施例提供的一种报文处理场景示意图;
图3为本申请实施例提供的一种报文处理方法流程图;
图4为本申请实施例提供的另一种报文处理场景示意图;
图5为本申请实施例提供的又一种报文处理场景示意图;
图6为本申请实施例提供的一种跨域报文处理场景示意图;
图7为本申请实施例提供的一种发布段标识方法流程图;
图8为本申请实施例提供的一种报文处理装置结构示意图;
图9为本申请实施例提供的一种发布段标识装置结构示意图;
图10为本申请实施例提供的一种通信设备结构示意图;
图11为本申请实施例提供的另一种通信设备结构示意图。
为了使本技术领域的人员更好地理解本发明中的方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。
为便于理解本申请实施例提供的技术方案,下面将先对本申请实施例涉及的技术进行说明。
在SRv6网络中,可以将对报文的处理过程划分为若干个段,每个段是特定的网络设备所执行的特定处理行为。若干个段由报文转发路径上的网络设备分别执行,构成整个报文处理过程。每个段具有相应的段标识,即SID。SRv6网络中网络设备通过在IPv6报文中插入一个路由扩展头SRH,并在SRH中添加路径所要经过的所有段的SID,即SID List,来显式指定该报文的转发路径。
按照功能的不同,SRv6网络中的节点分为三种角色:源节点、中转节点和终结(Endpoint)节点。在本申请实施例中,网络节点与网络设备的含义相同,均指交换机、路由器、虚拟路由设备、虚拟转发设备或其他转发设备。其中,源节点:负责在IPv6报文的IPv6头中插入SRH扩展头,或者在报文外加上IPv6头并插入SRH扩展头。该节点将报文流引入SRH中Segment List定义的SRv6路径。如果Segment List中只包含一个SID,并且不需要在SRH中携带信息,则可以将IPv6头的目的地址设置为该SID,不需要插入SRH。当然,也可以插入SRH。如果Segment List中包含多个SID,则需要插入SRH。源节点可以是产生SRv6报文的主机,也可以是SRv6域的边缘设备。
中转节点:在报文的SRv6路径上,不参与SRv6处理,只执行普通的IPv6报文转发。 中转节点可以是支持SRv6的节点,也可以是不支持SRv6的节点。
Endpoint节点:对接收到的SRv6报文进行SRv6相关处理。接收到的SRv6报文的IPv6目的地址必须是Endpoint节点上配置的SID,该节点需要按SID的指令进行处理,并更新SRH。
SRv6定义了多种类型的SID,不同SID具有不同的作用,指示不同的转发动作。其中,SID用来定义某种网络功能、代表某种网络指令。SRv6SID采用IPv6地址形式。例如,End SID:用于标识网络中的某个目的地址前缀。End SID对应的转发动作是将SRH中的SL的值减1,并根据SL从SRH取出下一个SID更新到IPv6报文头的目的地址,再根据IPv6目的地址查表转发。交叉连接到L3邻接阵列的Endpoint(endpoint with cross-connect to an array of layer-3adjacencies,End.X)的SID:用于标识网络中的某条链路,End.X SID对应的转发动作是根据该SID绑定的三层接口转发给特定下一跳。
SID附加行为(Flavors)可以改变SRv6SID的转发行为,以便适配多种业务需求。目前,支持的SRv6SID附加行为包括:最后一跳弹出SRH(ultimate segment pop of the SRH,USP)、倒数第二跳弹出SRH(penultimate segment pop of the SRH,PSP)、最后一跳解封装(ultimate segment decapsulation,USD)等。为了减轻SRv6网络尾节点的负担,可以在倒数第二个Endpoint节点将SRH移除,尾节点不需要查看SRH信息,只需根据目的IPv6地址查找Local SID表进行处理。
SRv6节点维护一个Local SID表,记录本节点生成的SRv6SID,以及与SRv6SID绑定的操作指令和转发信息,例如虚拟专用网络(virtual private network,VPN)实例、出接口和下一跳等。SRv6节点接收到SRv6报文后,根据报文中的SID,查找Local SID表,并根据查找结果执行SID对应的转发动作。IPv6SR的报文封装格式为:在原始数据报文前面添加新的IPv6基本头和SRH。例如图1所示的SRv6报文格式结构示意图,该SRv6报文的报文头包括IPv6报文头和SRH。其中,IPv6报文头包括版本(Version)字段、流量类型(Traffic Type)字段、流标识(Flow Label)字段、载荷长度(Payload Length)字段、下一个报文头(Next Header)字段、跳数限制(Hop Limit)字段、源地址(Source Address)字段以及目的地址(Destination Address,DA)字段。各个字段的含义可以参考请求评议(Request for Comments,RFC)8200中的解释。SRH包括下一个报文头(Next Header)字段、头扩展长度(Hdr Ext Len)字段、路由类型(Routing Type)字段、段剩余(Segment Left)字段、最后一个索引(Last Entry)字段、标记(Flags)字段、标签(Tag)字段以及SID list。各个字段的含义可以参考RFC8754中的解释。其中,SL字段也称为SL指针,在报文转发过程中,SL指针依次指向SID list中的各个元素,即随着SL取值的不同,segment[SL]用于表示SID list中的各个元素。
其中,SID list由依次排列的多个元素segment list[0]至segment list[n]组成,每个元素为一个SID,每个元素的长度为128比特。并且,SID list中的SID可以由后至前排列,segment list[0]对应最后执行的段,segment list[1]对应倒数第二执行的段,以此类推。
如上所述,SRH中包括SL字段,当SRH被封装在报文中时,转发路径的头节点将SL字段的值设置为N减1(N-1),其中N为SID list中包括的SID的数量。在报文的转发过 程中,SRH的SID list中各个SID对应的网络设备,也即转发路径上的endpoint node,依次将报文的SRH中的SL字段的值减1,也即对SL字段的值进行更新,并将segment list[SL]拷贝至报文的IPv6头的DA字段中,即对DA字段的内容进行更新。
参见图2a所示的应用场景,该应用场景包括SRv6网络,该SRv6网络包括网络设备A-网络设备E,其中网络设备A为源节点,网络设备E为报文的最终目的节点。网络设备C和网络设备E为Endpoint节点,网络设备B和网络设备D为中转节点。报文通过SRv6路径转发的过程为:
(1)源节点A收到报文后,执行如下操作:
封装SRH头。由于从节点A到节点E的路径必须经过C、E两个节点,因此,SRH中SL为2-1,即SL=1,封装的SID列表信息为Segment List[0]=E、Segment List[1]=C。
封装IPv6基础头。IPv6基本头中的源地址(Source Address,SA)为节点A上的一个地址,目的地址(destination address,DA)为SL指示的地址,即SL=1对应的Segment List[1](节点C的地址)。
根据封装的IPv6头中的目的地址查找路由表,将封装后的报文转发给节点B。
(2)节点B收到报文后,根据IPv6头中的目的地址DA查找路由表,将报文转发给节点C。
(3)节点C收到报文后,执行如下操作:
检查SRH头中的SL值,如果SL>0,则将SL值减1,目的地址DA更新为SL指示的地址,即SL=0对应的Segment List[0](节点E的地址);
根据IPv6头中的目的地址DA查找路由表,将报文转发给节点D;
(4)节点D收到报文后,根据IPv6头中的目的地址DA查找路由表,将报文转发给节点E。
(5)尾节点E收到报文,检查SRH头中的SL值,发现SL=0,对报文进行解封装,删除封装IPv6基本头和SRH,根据原始报文的目的地址进行报文转发。
另外,源节点A在封装SRH头时,可以采用压缩(Reduced)SRH的方式进行封装,在采用上述方式封装SRH头时,所封装的SRH头中将不包括第一个段标识。具体地,SRH头中不包含第一个SID(节点C),包含第二个SID(节点E)。其中,SRH中的SL仍为1,当报文到达节点C后,由节点C对其执行减1操作,更新为SL=0。
通过上述可知,End类型SID支持PSP操作,因此C节点在接收到报文后,在将IPv6报文头中的目的地址DA更新之后,可以将SRH删除,从而在向节点D发送报文时,无需再携带SRH,减少对带宽资源的浪费。
然而,当SRH中包括的段标识用于指示执行封装操作且该段标识为SRH中倒数第二个段标识时,无法实现PSP操作。例如SRH中包括绑定段标识(binding SID,BSID),该BSID会绑定到一个SID list上,指示一条转发路径。当SR网络中的头节点收到一个合法的BSID时,会执行BSID相关的操作,在IPv6段路由(IPv6segment routing,SRv6)网络中,定义的BSID相关的操作可以为:根据BSID函数的不同,插入一个新的SRH头,或者是插入一个新的包含SRH的外层IPv6头。其中,绑定段标识可以包括绑定到SRv6策略的端 点(endpoint bound to an SRv6 policy,End.B6)类型的段标识和绑定到SR-MPLS策略的端点(endpoint bound to an SR-MPLS policy,End.BM)类型的段标识。其中,End.B6可以包括End.B6.Encaps类型的段标识和End.B6.Encaps.Red类型的段标识。
例如图2b所示的应用场景示例,当B节点上配置有End.B6.Encaps类型的绑定段标识x1,A节点向B节点发送的SRv6报文的SRH中包括段标识x1和下一个段标识D,即SRH(D,x1)。B节点从SRH中读取下一个段标识D,并利用该段标识D更新原IPv6报文头中的目的地址。同时根据段标识D从路由表中查找到达段标识D所指示设备的路径信息(下一跳为节点C),并根据查找到的路径信息封装一个新的IPv6基础头(SA=B,DA=C),并基于新的IPv6报文头进行转发,发送给节点C。C节点在接收到报文目的地址为C时,对外层IPv6报文头进行剥离,并根据内层IPv6报文头进行转发,该内层IPv6报文头中的目的地址是D。可见,在整个转发过程中SRH(D,x1)一直携带在报文中。
需要说明的是,当A节点采用Reduced SRH方式来装SRv6报文中的SRH时,A节点向B节点发送的SRv6报文的SRH中不包括段标识x1,包括段标识D,即SRH=(D),但IPv6基础头保持不变,源地址SA=A、目的地址DA=x1。
当B节点上配置有End.BM类型的绑定段标识y1时,B节点在接收A节点发送的SRv6报文后,从段路由头SRH中读取下一个段标识D,并利用该段标识D更新原IPv6报文头中的目的地址。同时根据段标识D从路由表中查找到达段标识D所指示设备的路径信息(下一跳为节点C),并根据查找到的路径信息封装一个多协议标签交换(Multi-Protocol Label Switching,MPLS)标签栈,在该MPLS标签栈指定C节点为MPLS路径的节点,并基于MPLS标签栈进行转发,发送给节点C。C节点在接收到报文目的地址为C时,弹出报文中的MPLS标签栈,并根据内层IPv6报文头进行转发,该内层IPv6报文头中的目的地址是D。可见,在整个转发过程中SRH(D,y1)一直携带在报文中。
其中,当A节点采用Reduced SRH方式来装SRv6报文中的SRH时,A节点向B节点发送的SRv6报文的SRH中不包括段标识y1,包括段标识D,即SRH=(D),但IPv6基础头保持不变,源地址SA=A、目的地址DA=y1。
再例如图2c所示,段标识x2为B节点上配置的End.B6.Encaps类型的段标识,A节点向B节点发送的SRv6报文的SRH中包括段标识x2和下一个段标识D,即SRH(D,x2)。B节点从SRH中读取下一个段标识D,并利用该段标识D更新原IPv6报文头中的目的地址。同时B节点可以根据段标识D从路由表中查找到达段标识D所指示设备的路径信息(B-P-C),并根据该路径信息再封装一个IPv6头和一个SRH。其中新插入的SRH中依次包括节点C和节点P的段标识,新封装的IPv6报文头的源地址为节点B,目的地址为节点P。B节点在封装完成后向P节点发送SRv6报文。P节点在接收到SRv6报文后,从段路由头SRH中读取下一个段标识C,并利用段标识C更新外层IPv6报文头中的目的地址,并将报文发送给节点C。其中,P节点向C节点发送报文时,可以将外出SRH做PSP弹出操作,C节点在接收到报文目的地址为C时,对外层的IPv6报文头进行剥离操作,并对根据内层IPv6报文头进行转发,该内层IPv6报文头的目的地址是D。在整个转发过程中,均不会对SRH(D,x2)执行PSP操作,在B-P-C-D的转发路径上均会携带SRH(D,x2)。
其中,当A节点采用Reduced SRH方式来装SRv6报文中的SRH时,A节点向B节点发送的SRv6报文的SRH中不包括段标识x2,包括段标识D,即SRH=(D),但IPv6基础头保持不变,源地址SA=A、目的地址DA=x2。
同理,段标识y2为B节点上配置的End.BM类型的段标识,B节点在接收到A节点发送的SRv6报文后,从段路由头SRH中读取下一个段标识D,并利用该段标识D更新原IPv6报文头中的目的地址。同时B节点可以根据段标识D从路由表中查找到达段标识D所指示设备的路径信息(B-P-C),并根据该路径信息再封装一个MPLS标签栈,该MPLS标签栈中包括制定了MPLS路径(P,C)。B节点在封装完成后向P节点发送SRv6报文,P节点在接收到SRv6报文后,根据MPLS标签栈中所指定的节点向节点C发送报文。C节点在接收到报文目的地址为C时,对MPLS标签进行剥离操作,并对根据内层IPv6报文头进行转发,该内层IPv6报文头的目的地址是D。在整个转发过程中,均不会对SRH(D,x2)执行PSP操作,在B-P-C-D的转发路径上均会携带SRH(D,x2)。
其中,当A节点采用Reduced SRH方式来装SRv6报文中的SRH时,A节点向B节点发送的SRv6报文的SRH中不包括段标识y2,包括段标识D,即SRH=(D),但IPv6基础头保持不变,源地址SA=A、目的地址DA=y2。
通过前述可知,由于目前定义的绑定段标识所在的节点可以对接收到的携带SRH的报文进行封装、但不允许对接收到的携带SRH报文进行弹出操作,从而导致报文传输开销较大。例如图2b或图2c中,A节点发送给D节点的报文在指定了源路由节点除了BSID所在的B节点之后只有一个最终目的节点D。当报文到达B节点之后,B节点在根据SRH(D,x1)更新完IPv6报文头后,后续的节点不再需要SRH(D,x1),但由于BSID所在的节点不允许对SRH进行弹出操作,导致在后续报文的转发过程中均携带SRH(D,x1),浪费B节点与C节点以及C节点与D节点之间的带宽。
为避免在绑定段标识所在节点额外封装一个新的IPv6报文头,定义了在原有的IPv6报文头和SRH之间再插入一个SRH。例如图2d所示,段标识x2为B节点上配置的End.B6.Insert类型的段标识,B节点在接收到A节点发送的SRv6报文后,从段路由头SRH中读取下一个段标识D,并根据该段标识D确定到达段标识D所在设备的路径信息(P-C),并根据该路径信息在原IPv6报文头和原SRH之间添加新的SRH,在该新的SRH中添加段标识列表(C,P)。B节点将报文发送给P节点,P节点从外层的SRH中读取下一个段标识C,并利用该段标识C更新IPv6报文中的目的地址,并将更新后的报文发送给节点C。节点C在接收到报文后,从内层的SRH中读取段标识D,并更新IPv6报文中的目的地址,以将报文发送给节点D。当A节点采用Reduced SRH方式来装SRv6报文中的SRH时,A节点向B节点发送的SRv6报文的SRH中不包括段标识x2,包括段标识D,即SRH=(D),但IPv6基础头保持不变,源地址SA=A、目的地址DA=x2。
通过图2c和图2d比较可知,相较于图2c而言,减少了封装开销。但目前的RFC8200标准定义一个IPv6报文头对应一个SRH,而上述报文中存在2个SRH,与标准相违背。而且,额外插入SRH的方案仅适用于End.B6类型的绑定段标识,不适用于End.BM类型的绑定段标识。
基于此,本申请实施例提供了一种报文处理方法,用于解决由于特定类型段标识所在的节点无法执行段路由头弹出操作导致浪费带宽的问题。
为便于理解,参见图2e所示的应用场景示意图,在该应用场景示意图中,段标识x3为B节点上配置的End.B6.Encaps类型的段标识,B节点在接收到A节点发送的SRv6报文后,从段路由头SRH中读取下一个段标识D,并将IPv6报文头(SA=A,DA=x3)更新为(SA=A,DA=D),并删除SRH(D,x3)。同时并确定到达段标识D所在设备的路径信息(P-C),并根据该路径信息封装新的IPv6报文头和新的SRH,在新的IPv6报文头中(SA=B,DA=P)、新的SRH中添加段标识列表(C,P)。B节点将报文发送给P节点,P节点从外层的SRH中读取下一个段标识C,并利用该段标识C更新外层IPv6报文头中的目的地址为C,并将更新后的报文发送给节点C。节点C在接收到报文后,将外层的IPv6头和SRH剔除,并根据内层IPv6报文头中的目的地址将报文发送给节点D。
当A节点采用Reduced SRH方式来装SRv6报文中的SRH时,A节点向B节点发送的SRv6报文的SRH中不包括段标识x3,包括段标识D,即SRH=(D),但IPv6基础头保持不变,源地址SA=A、目的地址DA=x3。其中,A节点发送给B节点的SRv6报文中的SL仍为1。
为便于理解本申请实施例的具体实现,下面将以图2e所示的应用场景为例对本申请实施例提供的报文传输方法进行说明。
参见图3,该图为本申请实施例提供的一种报文传输方法流程图,如图3所示,该方法可以包括:
S301:第二设备向第一设备发送第一报文。
本实施例中,第二设备可以根据第一报文IPv6头的目的地址向第一设备发送第一报文,该IPv6报文头中目的地址为第一设备所对应的第一段标识。其中,第一报文包括第一段路由头SRH,该第一SRH可以包括一个或多个段标识,该一个或多个段标识用于指示传输第一报文的不同段。该一个或多个段标识中可以包括第一段标识,也可以不包括第一段标识。例如第二设备采用Reduced SRH方式来装第一报文中的第一SRH时,第一SRH中不包括第一段标识,但第一报文的目的地址中包括第一段标识。
其中,第二设备可以为源节点、中转节点或Endpoint节点。当第二设备为源节点时,其可以为产生第一报文的主机,也可以为SRv6网络的边缘设备。当第二设备为中间节点时,其仅执行普通的IPv6报文的转发;当第二设备为Endpoint节点时,其对接收到的SRv6报文进行SRv6相关处理,第二设备的段标识必须为所接收到的SRv6报文中IPv6头中的目的地址。当第二设备为主机时,第一报文的载荷为第二设备所生成的报文,例如第一报文的载荷是用户数据包协议(user datagram protocol,UDP)头和UDP载荷。当第二设备为转发设备时,第一报文的载荷为第二设备所接收的报文,例如第一报文的载荷可以是IPv4报文、IPv6报文或以太网报文。
当第二设备为源节点时,将对所获取的IPv6报文进行SRH封装操作,以获得第一报文,或者在第二设备为Endpoint节点时,其将对SRH执行更新操作以获得第一报文。因此在第二设备进行封装操作或更新SRH前,第一设备将向第二设备发送第一段标识和指示信 息,以使得第二设备可以获知第一设备的段标识以及指示信息。其中,指示信息用于指示第一设备具有执行SRH删除操作的能力,该指示信息可以包含在第一段标识的功能Function部分,或者指示信息为对应第一段标识的附加行为flavor,或者指示信息为第一段标识本身的一部分。在第一设备向第二设备发送第一段标识和指示信息时,可以由第一设备直接向第二设备发送第一段标识和指示信息,也可以由第一设备通过控制器向第二设备发送第一段标识和指示信息。
其中,第一设备还可以向第二设备发送第一段标识的类型,该第一段标识的类型可以为绑定段标识,例如为End.B6.Encaps、End.B6.Encaps.Red、End.BM类型。或者第一段标识的类型为预先定义的新类型,例如,预先定义的新类型为End.B6.Encaps.DoD、End.B6.Encaps.Red.DOD、End.BM.DoD,其中,DoD表示按需删除(delete on demand)所接收报文的SRH头。
其中,生成第一报文的设备接入网络时所连接的设备与最终接收第一报文的设备接入网络时所连接的设备可以位于同一网络域或者不同的网络域。网络域可以为自治系统(autonomous system,AS)域、内部网关协议(interior gateway protocols,IGP)域或者管理域。该管理域例如可以包括多个AS域,该多个AS域由控制器统一进行管理。
S302:第一设备确定第一报文包含第一段标识。
第一设备在接收到第一报文后,将确定第一报文中是否包括第一段标识,如果第一报文中包括第一段标识,则第一设备将根据第一段标识对应的指令对第一报文进行相应的处理操作。具体地,第一设备将确定第一报文中目的地址是否为第一段标识,如果是,则表明该第一报文是发送给第一设备的,则第一设备将根据第一段标识的指令执行相应操作。
S303:响应于确定第一报文包含第一段标识,第一设备对第一报文执行删除第一SRH操作,并执行封装操作生成第二报文。
在第一设备确定出第一报文包含第一段标识时,则第一设备删除第一报文中的第一SRH,并对第一报文执行封装操作获得第二报文。其中,第一设备可以先对第一SRH执行删除操作,再对第一报文执行封装操作,或者第一设备可以先对第一报文执行封装操作,再对第一SRH执行删除操作,本实施例在此不做限定。
在一种具体的实施方式中,在第一设备确定出第一报文包含第一段标识后,还可以确定第一SRH中的段剩余字段SL是否为1或更新后的SL是否为0,如果是,表明第一设备所对应的第一段标识为第一段路由头中倒数第二个段标识,在利用SL=0所指示的段标识更新目的地址后,后续的节点不再需要该第一SRH,则第一设备将第一SRH删除,减少后续报文传输所占用的带宽资源。具体地,可以通过以下伪代码实现:
在第一SRH中还包括第二段标识时,第一设备删除第一SRH之前,第一设备还将从第一段路由头中读取第二段标识,并根据第二段标识更新第一报文中的目的地址。例如,第一设备为图2e中的节点B,该节点B在接收到节点A发送的SRv6报文时,发现该报文的IPv6头中的目的地址DA=x3,该段标识x3为节点B上所配置的段标识,则节点B将从SRH(D,x2)中读取第二段标识D,将IPv6头中的目的地址更新为D。其中,第二段标识用于指示传输第一报文的下一个段。
其中,第一设备所执行封装操作可以包括对第一报文封装第一报文头以生成第二报文。其中,第一报文头可以为IPv6基础头、包含第二SRH的IPv6头或者MPLS头,该第一报文头中可以包含路径信息,以通过该路径信息指示第二报文的传输路径。
当第一段标识的类型为End.B6.Encaps、End.B6.Encaps.Red、End.B6.Encaps.DoD或End.B6.Encaps.Red.DoD且第一设备与下一跳设备之间无转发节点时,封装新的IPv6基础头即可,无需添加新的SRH头。如第一设备为图2b中的节点B,确定的路径信息为B-C,则在报文的外层封装新的IPv6基础头(SA=B,DA=C)即可。
进一步地,当路径信息对应多个段标识时,第一设备将在第一报文的外层封装包含第二SRH的IPv6头,以生成第二报文。其中,第二SRH包括路径信息对应的多个段标识,第一报文头的源地址为第一设备的地址且目的地址为所述第二SRH中第一个段标识。例如,第一设备为图2e中节点B,确定的路径信息为B-P-C,则第一设备封装的IPv6基础头(SA=B,DA=P),第二SRH为(C,P)。当B节点采用Reduced SRH方式封装第二SRH时,该第二SRH中不包括节点P的段标识,包括节点C的段标识。即第二SRH(C)、IPv6(SA=B,DA=P)。
当第一段标识的类型为End.BM或End.BM.DoD时,第一设备将在第一报文的外层封装MPLS头,以生成第二报文。其中,MPLS头的MPLS标签栈包括路径信息。
本实施例中,路径信息可以由第一设备根据第一段标识确定,或者当第一SRH包括第二段标识时,第一设备可以根据第二段标识确定。具体地,可以预先在第一设备上配置第一段标识与路径信息的对应关系,第一设备在确定第一报文包括第一段标识后,可以根据该第一段标识以及上述对应关系获取路径信息。或者,第一设备在读取到第二段标识后,可以将第二段标识作为目的地址从路由表中查找路径信息。即,第一设备可以通过路由表迭代的方式查找到达第二段标识所在设备的路径信息。或者第一设备根据第二段标识以及预先配置的对应关系确定路径信息,其中,对应关系中包括第二段标识和路径信息。即,第一设备上可以预先配置对应关系,该对应关系用于指示到达第二段标识所在的设备所对应的路径信息,第一设备在读取到第二段标识时,根据第二段标识以及上述对应关系确定路径信息,无需进行路由迭代,提高报文转发效率。
其中,第二报文还包含第二报文头,该第二报文头的目的地址为第二段标识。通常情况下,该第二报文头为IPv6基础头,通过更新第一报文中的IPv6基础头获得。例如图2e中,B节点发送给P节点的报文为第二报文,该第二报文的第一报文头为IPv6(SA=B,DA=P)和SRH(C,P)、第二报文头为IPv6(SA=A,DA=D)。
S304:第一设备发送第二报文。
在第一设备生成第二报文后,将根据第二报文中第一报文头对第二报文进行转发。具体地,第一设备将第二报文发送给第一报文头中目的地址所对应的设备。
其中,第二SRH中可以包括依次排列的第三段标识和第四段标识,该第四段标识可以为第二SRH中所包括的多个段标识中最后一个被执行的段标识,第三段标识对应的指令为执行封装操作且第三段标识为第三设备的段标识。当第二报文的第一报文头中目的地址为第三段标识时,第一设备向第三设备发送第二报文。
需要说明的是,在第三段标识对应的指令为执行封装操作且第三段标识的指示信息用于指示第三设备具有执行SRH删除操作能力时,则第三设备在接收到第二报文后,也可以执行S302-S303相应的操作,具体可以参见上述描述。
可见,第一设备接收到第二设备发送的第一报文,该第一报文包括第一SRH且该第一SRH包括第一段标识。其中,第一段标识为第一设备对应的段标识且第一段标识对应的指令为执行封装操作。在第一设备接收到第二设备发送的第一报文后,将确定第一报文是否包含第一段标识。在确定出第一报文中包含第一段标识后,则第一设备将第一SRH删除,并执行封装操作,以生成第二报文,并发送第二报文,其中,第二报文中不再包括第一SRH,从而减少传输第二报文所占用的带宽,提高报文传输效率。即,本申请实施例中在第一设备需要执行封装操作时,可以增加按需删除所接收报文的段路由头的功能,从而使得第一设备可以按需删除报文中的段路由头,减少对带宽资源的占用。
需要说明的是,本实施例中,第二设备可以为主机或者为转发设备,如路由器,当第二设备为主机时,第一报文的载荷为第二设备所生成的报文。当第二设备为转发设备时,第一报文的载荷为第二设备所接收的报文。为便于理解,参见图4所示的应用场景示意图,其中x为节点B上的一个SRv6BSID,例如可以是End.B6.Encaps.DOD或End.B6.Encaps.Red.Dod类型;y为B上的另一个SRv6BSID,例如可以是End.BM.DoD类型等,报文的转发过程如下:
步骤1:节点A向节点B发送第一报文。
本实施例中,在节点A向节点B发送第一报文之前,接收节点B发送的段标识信息。其中,节点B所发送的段标识信息包括SID值(IPv6地址)、段标识类型(如End.B6.Encps、End.BM等)以及指示信息。其中,指示信息用于指示B节点具有按需删除所接收报文中的段路由头SRH的能力。其中,指示信息和段标识可以合二为一,作为一个字段。
节点A在接收到B节点发送的段标识信息后,将该段标识信息封装在所获取的报文中,并将B节点的SID作为目的节点,从而获得第一报文。其中,当节点A为主机时,第一报文中的载荷Payload为节点A直接发出的报文,例如可以包括UDP头和UDP载荷。当节点A为路由器时,第一报文中的载荷为节点A所收到的报文,可以是一个IPv4报文、IPv6报文或以太网报文。
当节点B所发布的段标识类型为End.B6.Encaps或End.B6.Encaps.Red类型且SID值为x时,则节点A所封装的IPv6基础头为(SA=A,DA=x),SRH(D,x)。即,第一报文需要经过x所对应的节点到达最终目的节点为节点D。当节点B所发布的段标识类型为End.BM且SID值为y时,则节点A所封装的IPv6基础头为(SA=A,DA=y),SRH(D, y)。即,第一报文需要经过y所对应的节点到达最终目的节点为节点D。
当A节点采用Reduced SRH方式封装报文的SRH时,该SRH中将不包括节点B的段标识,包括节点D的段标识,但IPv6基础头保持不变。
步骤2:节点B从第一报文的段路由头SRH中读取段标识D。
步骤3:节点B根据段标识D更新第一报文中的IPv6基础头中的目的地址。
在节点B接收到节点A发送的第一报文后,从第一报文的SRH中读取下一个段标识,即段标识D,并将第一报文中的IPv6基础头中的目的地址更新为段标识D。
步骤4:节点B根据段标识D获取到达节点D的路径信息。
本实施例中,节点B通过获取该段标识D可以获知该第一报文的最终目的节点为节点D,并根据段标识D获取到达节点D的路径信息。其中,节点B可以根据段标识D迭代路由表获取路径信息,或者节点B根据段标识D以及预先配置的路径信息与段标识之间的对应关系来获取路径信息。例如,预先配置在节点B上配置(段标识D:B-C),则节点B在获取到段标识D时,根据上述关系确定该段标识D对应于B->C的路径信息。
步骤5:节点B将段路由头SRH删除,并根据路径信息对第一报文进行封装,获得第二报文。
本实施例中,节点B接收的第一报文中的SRH中的SL=1(指向SID List中倒数第2个SID,BISD),在执行SL减1操作后,SL=0,符合按需删除所接收报文中的SRH的条件,则删除第一报文中的SRH。同时,节点B根据确定出的路径信息对第一报文进行再次封装。具体地,对于节点B的段标识为x时,节点B在第一报文的外层封装新的IPv6基础头,该IPv6基础头为(SA=B,DA=C);当节点B的段标识为y时,节点B在第一报文的外层封装新的MPLS头(MPLS标签栈),该MPLS标签栈为(C)。
步骤6:节点B向节点C发送第二报文。
步骤7:节点C将第二报文中的外层IPv6基础头或者MPLS标签栈弹出。
步骤8:节点C根据第二报文中的内层IPv6基础头中的目的地址向节点D发送第二报文。
在节点C接收到第二报文后,根据第二报文的外层IPv6基础头中的目的地址确定自身为目的地址对应的节点,则将外层IPv6基础头(SA=B,DA=C)或者MPLS标签栈(C))弹出,再根据内层IPv6基础头中的目的地址向节点D发送第二报文,从而将报文发送给最终目的节点。其中,节点C对于第二报文而言为该报文的传输节点,不执行其他操作。
在实际应用场景中,可能存在多个需要执行封装操作的段标识时,针对该多个需要执行封装操作的段标识对应的节点均配置按需删除所接收报文的SRH功能,以节省传输带宽。为便于理解,下面将结合附图对本申请实施例进行说明。参见图5,该图为本申请实施例提供的分层嵌套应用场景。其中,A.x为节点A上的某一个SRv6BSID,可以是End.B6.Encaps或者End.B6.Encaps.Red的类型;A.y为节点A上的某一个SRv6BSID,可以是End.B6.Encaps或者End.B6.Encaps.Red的类型;B.x为节点B上的某一个SRv6BSID,可以是End.B6.Encaps或者End.B6.Encaps.Red的类型;B.y为节点B上的某一个SRv6BSID,可以是End.BM类型;载荷(Payload)是主机H1直接发出的报文,例如可以是UDP头+UDP Payload。
本实施例中,对于节点A上的SID A.x,有如下的过程:
步骤1:节点A接收H1发送的IPv6报文,该IPv6报文目的地址为A.x,此A.x地址为节点A上的一个SRv6BSID。节点A据此对报文进行封装,封装的是一个以节点A为起点、节点D为终点的隧道;该隧道的终点D可以是配置A.x时确定的、也可以是由节点A根据所接收的报文的目的地址的下一个SID即H2通过路由迭代而确定的;同时,节点A将IPv6头中的目的地址更新为下一个SID即H2。
当节点H1采用Reduced SRH方式封装报文的SRH时,其发送给节点A的报文中SRH中将不包括节点A的段标识A.x,包括节点H2的段标识H2,但IPv6基础头保持不变(SA=H1,DA=A.x)。
节点A对收到的报文进行封装时,在A.x之后只有一个H2,符合按需删除所接收报文中的SRH的条件,则节点A将对接收的IPv6报文中的SRH进行按需删除,在删除之后再进行封装。本实施例中,段标识A.x对应的封装是一个IPv6基础头和一个SRH头,其中SRH头指定SID List为B.x和D,IPv6基础头的源地址为A、目的地址为B.x。报文封装好后节点A将报文发送给节点B。
当A节点采用Reduced SRH方式封装报文的SRH时,该SRH中将不包括节点B的段标识B.x,包括节点D的段标识D,SRH(D),但IPv6基础头保持不变(SA=A,DA=B.x)。
步骤2:节点B收到IPv6报文目的地址为B.x,此B.x地址为节点B上的一个SRv6BSID;节点B据此对报文进行封装,封装的是一个以节点B为起点、节点C为终点的隧道;该隧道的终点C可以是配置B.x时确定的、也可以是由B节点根据所接收的报文的目的地址的下一个SID即D通过路由迭代而确定的;同时,节点B将IPv6基础头(SA=A,DA=B,x)更新为(SA=A,DA=D)。
由于在B.x这一个SID之后只有一个D,符合按需删除所接收报文中的SRH的条件,则节点B还会对接收的IPv6报文中的SRH进行按需删除,在删除之后再进行封装。本例中,段标识B.x对应的封装是一个IPv6基础头(SA=B,DA=C)。报文封装好后节点B将报文发送给节点C。
步骤3:节点C接收到IPv6报文后,对最外层的IPv6基础头进行剥离,并根据内层IPv6基础头进行转发,内层报文头的目的地址为D、对于C来说它是这个报文的transit节点。
步骤4:节点D接收到IPv6报文后,对最外层的IPv6基础头进行剥离,并根据内层IPv6基础头对报文进行转发,内层报文头的目的地址为H2、对于D来说它是这个报文的transit节点。
同理,本实施例中,对于节点A配置的SID A.y,有如下的过程:
步骤1:节点A收到IPv6报文目的地址为A.y,此A.y地址为节点A上的一个SRv6BSID(需要执行封装操作);节点A据此对报文进行封装,封装的是一个以节点A为起点、节点D为终点的隧道;该隧道的终点D可以是配置A.y时确定的、也可以是由节点A根据所接收的报文的目的地址的下一个SID即H2而确定的;同时,节点A将IPv6头中的目的地 址更新为下一个SID即H2。
当节点H1采用Reduced SRH方式封装报文的SRH时,其发送给节点A的报文中SRH中将不包括节点A的段标识A.y,包括节点H2的段标识H2,但IPv6基础头保持不变(SA=H1,DA=A.y)。
由于在A.y这一个SID之后只有一个H2,符合按需删除所接收报文中的SRH的条件,则节点A将对接收的IPv6报文中的SRH(H2,A.y)进行按需删除,在删除之后再进行封装。其中,段标识A.y对应的封装是一个IPv6基础头和一个SRH头,其中SRH头指定SID List为B.y和D、目的地址为B.y。报文封装好后节点A将报文发送给节点B。
当A节点采用Reduced SRH方式封装报文的SRH时,该SRH中将不包括节点B的段标识B.y,包括节点D的段标识D,SRH(D),但IPv6基础头保持不变(SA=A,DA=B.y)。
步骤2:节点B接收到IPv6报文,该IPv6报文的目的地址为B.y,此B.y地址为B上的一个SRv6BSID(需要执行封装操作);节点B据此对报文进行封装,封装的是一个以B为起点、C为终点的隧道;该隧道的终点C可以是配置B.y时确定的、也可以是由节点B根据所接收的报文的目的地址的下一个SID即D而确定的;同时,节点B将IPv6基础头中的目的地址更新为下一个SID即D。
由于在B.y这一个SID之后只有一个D,符合按需删除所接收报文中的SRH的条件,则节点B将对接收的IPv6报文中的SRH进行按需删除,在删除之后再进行封装。其中,节点B封装是一个MPLS标签栈(C)。报文封装好后节点B将报文发送给节点C。
步骤3:节点C接收到IPv6报文,对该IPv6报文的最外层的MPLS标签栈进行剥离,并根据该报文的IPv6头进行转发,该报文的目的地址为D、对于C来说它是这个报文的transit节点。
步骤4:节点D接收到IPv6报文,对该IPv6报文的对最外层的IPv6基础头进行剥离,并根据该报文的IPv6基础头进行转发,该报文的目的地址为H2、对于D来说它是这个报文的transit节点。
另外,存在源节点接入网络时所连接的设备与目的节点接入网络时所连接的设备分别位于不同的网络域。其中,网络域可以为自治系统AS域、内部网关协议IGP域或者管理域。该管理域例如可以包括多个AS域,该多个AS域由控制器统一进行管理。例如图6所示的应用场景,主机H1通过节点A接入网络,节点A和节点B是IGP域1,主机H2通过节点C接入网络,节点C和节点D是IGP域2。其中节点A和节点B组成的域可以运行中间系统到中间系统(intermediate system-to-intermediate system,IS-IS)协议,节点C和节点D组成的域运行开放式最短路径优先(open shortest path first,OSPF)协议,节点B和节点C之间使用边界网关协议(border gateway protocol,BGP)。其中,IS-IS协议和OSPF协议均为IGP协议。
其中,段标识A.x为节点A上的一个SRv6BSID,可以是End.B6.Encaps或者End.B6.Encaps.Red类型;段标识A.y为节点A上的另一个SRv6BSID,可以是End.BM类型;Payload是主机H1直接发出的报文,例如可以是UDP头+UDP Payload。
本实施例中,针对节点A上的SID A.x,有如下的过程:
步骤1:节点A接收到H1发送的IPv6报文,该报文中目的地址为A.x,此A.x地址为节点A上的一个SRv6BSID(需要执行封装操作)。节点A据此对报文进行封装,封装的是一个以A为起点、D为终点的隧道;该隧道的终点D可以是配置A.x时确定的、也可以是由节点A根据所接收的报文的目的地址的下一个SID即H2而确定的;同时,节点A将IPv6头中的目的地址更新为下一个SID即H2。
当节点H1采用Reduced SRH方式封装报文的SRH时,其发送给节点A的报文中SRH中将不包括节点A的段标识A.x,包括节点H2的段标识H2,但IPv6基础头保持不变(SA=H1,DA=A.x)。
节点A对收到的报文进行封装时,在A.x之后只有一个H2,符合按需删除所接收报文中的SRH的条件,则节点A将对接收的IPv6报文中的SRH(H2,A.x)进行按需删除,在删除之后再进行封装。本实施例中,段标识A.x对应的封装是一个IPv6基础头和一个SRH头,其中SRH头指定SID List为B、C和D,IPv6基础头的源地址为A、目的地址为B。报文封装好后节点A将报文发送给节点B。
当A节点采用Reduced SRH方式封装报文的SRH时,该SRH中将不包括节点B的段标识B,包括节点C的段标识C和节点D的段标识D,SRH(D,C),但IPv6基础头保持不变(SA=A,DA=B)。
步骤2:节点B接收到A节点发送的IPv6报文,该IPv6报文目的地址为B,例如该目的地址B可以是一个节点B上配置的End或者End.X类型的SID;节点B将读取SID List中的下一个SID即C,将外层IPv6头中的目的地址更新为C,并向节点C发送更新后的IPv6报文。
步骤3:节点C接收到节点B发送的IPv6报文,该IPv6报文目的地址为C,例如该目的地址C可以是一个C节点上配置的End或者End.X类型的SID;节点C将读取SID List中的下一个SID即D,将外层的IPv6头中的目的地址更新为D,并向节点D进行发送更新后的IPv6报文。
需要说明的是,由于节点C配置的是End或者End.X类型的SID,且SRH中在C之后只有一个D,C节点可以对该SRH执行PSP弹出操作。因此,节点C向节点D发送的IPv6报文中不包括SRH。
步骤4:节点D在接收到节点C发送的报文后,该IPv6报文目的地址为D,则节点D对最外层的IPv6头剥离,并根据内层的IPv6头进行转发。其中,内层IPv6头的目的地址为H2、对于D来说它是这个报文的transit节点,节点D按照内层报文的目的地址H2发送给H2节点。
本实施例中,针对节点A上的SID A.y,有如下的过程:
步骤1:节点A接收到H1发送的IPv6报文,该报文中的目的地址为A.y,此A.y地址为节点A上的一个SRv6BSID(需要执行封装操作);节点A据此对报文进行封装,封装的是一个以A为起点、D为终点的隧道;该隧道的终点D可以是配置A.y时确定的、也可以是由节点A根据所接收的报文的目的地址的下一个SID即H2而确定的;同时,节点A将IPv6头中的目的地址更新为下一个SID即H2。
当节点H1采用Reduced SRH方式封装报文的SRH时,其发送给节点A的报文中SRH中将不包括节点A的段标识A.y,包括节点H2的段标识H2,但IPv6基础头保持不变(SA=H1,DA=A.y)。
节点A对收到的报文进行封装时,在A.y之后只有一个H2,符合按需删除所接收报文中的SRH的条件,则节点A将对接收的IPv6报文中的SRH(H2,A.y)进行按需删除,在删除之后再进行封装。本实施例中,段标识A.y对应的封装是一个MPLS标签栈,该MPLS标签栈所代表的标签交换路径(label switch path,LSP)会依次经过B、C和D。报文封装好后节点A将报文发送给节点B。
步骤2:节点B接收到MPLS报文后,根据标签栈沿着LSP的路径往节点C进行发送。
步骤3:节点C接收到MPLS报文、根据标签栈沿着LSP的路径往节点D进行发送。
步骤4:节点D接收到MPLS报文,并报文中的MPLS标签栈进行剥离,根据内层IPv6头对报文进行转发;内层IPv6头的目的地址为H2、对于D来说它是这个报文的transit节点,节点D按照内层报文的目的地址H2发送给H2节点。
参见图7,该图为本申请实施例提供的一种发布段标识的方法流程图,如图7所示,该方法可以包括:
S701:第一设备获取第一段标识。
本实施例中,第一设备可以在本地生成第一段标识,该第一段标识与第一设备对应,用于指示第一设备具有执行SRH删除操作的能力。
其中,第一段标识可以为End.B6类型的段标识,或为End.BM类型的段标识。或者第一段标识为End.B6.Dod类型的段标识,或为End.BM.Dod类型的段标识。关于第一段标识的类型的相关描述可以参见图3所示方法实施例中的相关描述。
第一设备在获取第一段标识时,还可以获取该第一段标识对应的指示信息,该指示信息用于指示第一段标识所对应的段(第一设备)具有执行删除SRH删除操作的能力。其中,指示信息可以包含在第一段标识的功能Function部分,或者指示信息为对应第一段标识的附加行为flavor,或者指示信息为第一段标识的一部分。其中,关于指示信息的相关描述可以参见图3所示方法实施例中的相关描述。
S702:第一设备向第二设备发送第一段标识。
第一设备在获取到第一段标识后,将向第二设备发送该第一段标识,以使得第二设备将第一段标识封装到对应的报文中,进而当报文被转发到第一设备时,该第一设备可以根据第一段标识的指示删除报文中的SRH。其中,第二设备可以将第一段标识封装到报文的目的地址,或者将第一段标识封装到报文的SRH中。同时,第一设备还可以向第二设备发送与第一段标识对应的指示信息。
其中,第一设备可以直接向第二设备发送第一段标识以及指示信息,或者通过控制器向第二设备发送第一段标识以及指示信息。
基于上述方法实施例,本申请实施例提供了一种报文处理装置、发布段标识装置和网络设备,下面将结合附图进行说明。
参见图8,该图为本申请实施例提供的一种报文处理装置结构示意图,如图8所述, 该装置能够实现上述方法实施例中第一设备的功能,该装置800可以包括:接收单元801、确定单元802、生成单元803和发送单元804。
接收单元801,用于接收第二设备发送的第一报文,所述第一报文包括第一段路由头SRH。
确定单元802,用于确定所述第一报文包含第一段标识,所述第一段标识为所述第一设备对应的段标识。其中,关于确定单元802的具体实现可以参见S302的相关描述。
生成单元803,用于响应于确定所述第一报文包含所述第一段标识,对所述第一报文执行删除所述第一SRH操作,并执行封装操作生成第二报文。其中,关于生成单元803的具体实现可以参见S303的相关描述。
发送单元804,用于发送所述第二报文。
在一种具体的实现方式中,所述生成单元803,具体用于确定所述第一SRH中段剩余SL等于1或更新后的SL等于0;响应于确定所述第一报文包含所述第一段标识以及所述SL等于1或更新后的SL等于0,对所述第一报文执行删除所述第一SRH,并执行封装操作生成第二报文。
在一种具体的实现方式中,所述第一段标识的类型为绑定段标识。
在一种具体的实现方式中,所述第一段标识为绑定到SRv6策略的端点End.B6类型的段标识,或为绑定到SR-MPLS策略的端点End.BM类型的段标识。
在一种具体的实现方式中,所述第一段标识为按需删除绑定到SRv6策略的端点End.B6.Dod类型的段标识,或为按需删除绑定到SR-MPLS策略的端点End.BM.Dod类型的段标识。
在一种具体的实现方式中,所述生成单元803,具体用于将所述第一报文中的所述第一SRH删除,并对所述第一报文封装第一报文头生成所述第二报文。
在一种具体的实现方式中,所述第一报文头为互联网协议第六版IPv6基础头、包含第二SRH的IPv6头或者多协议标签交换MPLS头。
在一种具体的实现方式中,所述第一报文头中包含路径信息,所述路径信息用于指示所述第二报文的传输路径。
在一种具体的实现方式中,所述路径信息与所述第一段标识对应。
在一种具体的实现方式中,所述第一SRH包括第二段标识,所述第二段标识用于指示传输所述第一报文的下一个段,所述路径信息与所述第二段标识对应。
在一种具体的实现方式中,所述第二报文还包含第二报文头,所述第二报文头的目的地址为所述第二段标识。
在一种具体的实现方式中,所述第二SRH中的段标识列表包含所述路径信息,或者所述MPLS头的标签栈包含所述路径信息。
在一种具体的实现方式中,所述第二设备为主机,所述第一报文的载荷为所述第二设备所生成的报文,或所述第二设备为转发设备,所述第一报文的载荷为所述第二设备所接收的报文。
在一种具体的实现方式中,生成所述第一报文的设备接入网络时所连接的设备与最终 接收所述第一报文的设备接入网络时所连接的设备属于不同的网络域。
在一种具体的实现方式中,所述装置还包括:发送单元;
所述发送单元,用于向所述第二设备发送所述第一段标识以及指示信息,所述指示信息用于指示所述第一设备具有执行SRH删除操作的能力。其中,关于发送单元的具体实现可以参见上述S301的相关描述。
在一种具体的实现方式中,所述指示信息包含在所述第一段标识的功能Function部分,或者所述指示信息为对应所述第一段标识的附加行为flavor。
需要说明的是,本实施例中各个单元的实现可以参见上述方法实施例中的相关描述,本实施例在此不再赘述。
参见图9,该图为本申请实施例提供的一种发布段标识的装置结构图,如图9所示,该装置900能够实现上述第一设备的功能,该装置可以包括:获取单元901和发送单元902。
获取单元901,用于获取第一段标识,该第一段标识与第一设备对应,用于指示第一设备具有执行SRH删除操作的能力。其中,关于获取单元901的具体实现可以参见上述S701的相关描述。
发送单元902,用于将该第一段标识发送给第二设备,以使得第二设备将第一段标识封装到对应报文中。其中,关于发送单元902的具体实现可以参见上述S702的相关描述。
在一种具体的实现方式中,所述发送单元,还用于向第二设备发送第一段标识对应的指示信息,该指示信息用于指示第一段标识所对应的段具有执行SRH删除操作的能力。
在一种具体的实现方式中,指示信息包含在第一段标识的功能Function部分,或者指示信息为对应第一段标识的附加行为flavor,或者指示信息为第一段标识的一部分。
在一种具体的实现方式中,发送单元902,具体用于通过控制器向第二设备发送第一段标识。
在一种具体的实现方式中,第一段标识为End.B6类型的段标识,或为End.BM类型的段标识。
在一种具体的实现方式中,第一段标识为End.B6.Dod类型的段标识,或为End.BM.Dod类型的段标识。
需要说明的是,本实施例中各个单元的实现可以参见上述方法实施例中的相关描述,本实施例在此不再赘述。
图10为本申请实施例提供的一种通信设备的结构示意图,该通信设备例如可以是方法实施例中的第一设备、第二设备或第三设备,或者也可以是图8所示实施例中装置800的设备实现,或者也可以是图9所示实施例中装置900的设备实现。
请参阅图10所示,通信设备1000至少包括处理器1010。通信设备1000还可以包括通信接口1020和存储器1030。其中通信设备1000中的处理器1010的数量可以一个或多个,图10中以一个处理器为例。本申请实施例中,处理器1010、通信接口1020和存储器1030可通过总线系统或其它方式连接,其中,图10中以通过总线系统1040连接为例。
处理器1010可以是CPU、NP、或者CPU和NP的组合。处理器1010还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit, ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
当通信设备为第一设备时,处理器1010可以执行上述方法实例中对第一报文执行删除第一SRH操作,并执行封装操作等相关功能。
通信接口1020用于接收和发送报文,具体地,通信接口1020可以包括接收接口和发送接口。其中,接收接口可以用于接收报文,发送接口可以用于发送报文。通信接口1020的个数可以为一个或多个。
存储器1030可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(random-access memory,RAM);存储器1030也可以包括非易失性存储器(英文:non-volatile memory),例如快闪存储器(英文:flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器1030还可以包括上述种类的存储器的组合。
可选地,存储器1030存储有操作系统和程序、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,程序可包括各种操作指令,用于实现各种操作。操作系统可包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。处理器1010可以读取存储器1030中的程序,实现本申请实施例提供的报文处理方法。
其中,存储器1030可以为通信设备1000中的存储器件,也可以为独立于通信设备1000的存储装置。
总线系统1040可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线系统1040可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
图11是本申请实施例提供的另一种通信设备1100的结构示意图,该通信设备例如可以是方法实施例中的第一设备、第二设备或第三设备,或者也可以是图8所示实施例中装置800的设备实现,或者也可以是图9所示实施例中装置900的设备实现。
通信设备1100包括:主控板1110和接口板1130。
主控板1110也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板1110对网络设备1100中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1110包括:中央处理器1111和存储器1112。
接口板1130也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板1130用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板1130包括:中央处理器1131、网络处理器1132、转发表项存储器1134和物理接口卡(ph8sical interface card,PIC)1133。
接口板1130上的中央处理器1131用于对接口板1130进行控制管理并与主控板1110上的中央处理器1111进行通信。
网络处理器1132用于实现报文的转发处理。网络处理器1132的形态可以是转发芯片。具体而言,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。
物理接口卡1133用于实现物理层的对接功能,原始的流量由此进入接口板1130,以及处理后的报文从该物理接口卡1133发出。物理接口卡1133包括至少一个物理接口,物理接口也称物理口。物理接口卡1133也称为子卡,可安装在接口板1130上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器1132处理。在一些实施例中,接口板1103的中央处理器1131也可执行网络处理器1132的功能,比如基于通用CPU实现软件转发,从而物理接口卡1133中不需要网络处理器1132。
可选地,通信设备1100包括多个接口板,例如通信设备1100还包括接口板1140,接口板1140包括:中央处理器1141、网络处理器1142、转发表项存储器1144和物理接口卡1143。
可选地,通信设备1100还包括交换网板1120。交换网板1120也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板1130的情况下,交换网板1120用于完成各接口板之间的数据交换。例如,接口板1130和接口板1140之间可以通过交换网板1120通信。
主控板1110和接口板1130耦合。例如。主控板1110、接口板1130和接口板1140,以及交换网板1120之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板1110和接口板1130之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1110和接口板1130之间通过IPC通道进行通信。
在逻辑上,通信设备1100包括控制面和转发面,控制面包括主控板1110和中央处理器1131,转发面包括执行转发的各个组件,比如转发表项存储器1134、物理接口卡1133和网络处理器1132。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器1132基于控制面下发的转发表对物理接口卡1133收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器1134中。在一些实施例中,控制面和转发面可以完全分离,不在同一设备上。
应理解,图8所示实施例中的发送单元和接收单元可以是不同的物理接口卡,例如,接收单元801相当于物理接口卡1133、发送单元804相当于物理接口卡1134。装置800中的确定单元802或生成单元803等可以相当于通信设备1100中的中央处理器1111、中央处理器1131、中央处理器1141中的一个或多个。
应理解,本申请实施例中接口板1140上的操作与接口板1130的操作一致,为了简洁,不再赘述。应理解,本实施例的通信设备1100可对应于上述各个方法实施例中的地址请求设备或地址分配,该通信设备1100中的主控板1110、接口板1130和/或接口板1140可以实现上述各个方法实施例中的第一设备、第二设备或第三设备所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
应理解,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。 接口板可能有一块或多块,通信设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,通信设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,通信设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的通信设备的数据接入和处理能力要大于集中式架构的设备。可选地,通信设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等通信设备)。具体采用哪种架构,取决于具体的组网部署场景。
在一些可能的实施例中,上述第一设备、第二设备或第三设备可以实现为虚拟化设备。例如,虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(英文:Virtual Machine,VM),虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。可以将虚拟机配置为第一设备、第二设备。例如,可以基于通用的物理服务器结合网络功能虚拟化(Network Functions Virtualization,NFV)技术来实现第一设备、第二设备。第一设备、第二设备为虚拟主机、虚拟路由器或虚拟交换机。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出具有上述功能的第一设备、第二设备或第三设备,此处不再赘述。
应理解,上述各种产品形态的通信设备,分别具有上述方法实施例中第一设备、第二设备或第三设备任意功能,此处不再赘述。
本申请实施例还提供了一种芯片,包括处理器和接口电路,接口电路,用于接收指令并传输至处理器;处理器,例如可以是图8示出的装置800的一种具体实现形式,可以用于执行上述地址前缀获取的方法。其中,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor, DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
本申请实施例还提供了一种报文处理系统,该系统包括:第一设备和第二设备。其中,第二设备,用于向第一设备发送第一报文,该第一报文包括第一SRH;第一设备用于执行图3所述的报文处理方法。
在一种可能的实现方式中,第一设备,还用于执行图7所述的发布段标识的方法。
本申请实施例还提供了一种计算机可读存储介质,包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上实施例提供的报文处理方法或发布段标识的方法。
本申请实施例还提供了一种包含指令或计算机程序的计算机程序产品,当其在计算机上运行时,使得计算机执行以上实施例提供的报文处理方法或发布段标识的方法。
本申请实施例还提供了一种芯片,包括存储器和处理器。存储器用于存储指令或程序代码。处理器用于从存储器中调用并运行该指令或程序代码,以执行所述的报文处理方法;或,处理器执行所述的发布段标识的方法。
本申请实施例还提供了一种芯片,上述芯片包括处理器,但不包括存储器,处理器用于读取并执行所述芯片外的存储器中存储的指令或程序代码,当指令或程序代码被执行时,处理器执行所述的报文处理方法;或,处理器执行所述的发布段标识的方法。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑业务划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各业务单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件业务单元的形式实现。
集成的单元如果以软件业务单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的业务可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些业务存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已。
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
Claims (34)
- 一种报文处理方法,其特征在于,包括:第一设备接收第二设备发送的第一报文,所述第一报文包括第一段路由头SRH;所述第一设备确定所述第一报文包含第一段标识,所述第一段标识为所述第一设备对应的段标识;响应于确定所述第一报文包含所述第一段标识,所述第一设备对所述第一报文执行删除所述第一SRH操作,并执行封装操作生成第二报文;所述第一设备发送所述第二报文。
- 根据权利要求1所述的方法,其特征在于,所述响应于确定所述第一报文包含所述第一段标识,所述第一设备对所述第一报文执行删除所述第一SRH,并执行封装操作生成第二报文,包括:所述第一设备确定所述第一SRH中段剩余SL等于1或更新后的SL等于0;响应于确定所述第一报文包含所述第一段标识以及所述SL等于1或更新后的SL等于0,第一设备对所述第一报文执行删除所述第一SRH,并执行封装操作生成第二报文。
- 根据权利要求1或2所述的方法,其特征在于,所述第一段标识的类型为绑定段标识。
- 根据权利要求1至3任一项所述的方法,其特征在于,所述第一段标识为绑定到SRv6策略的端点End.B6类型的段标识,或为绑定到SR-MPLS策略的端点End.BM类型的段标识。
- 根据权利要求1至3任一项所述的方法,其特征在于,所述第一段标识为按需删除绑定到SRv6策略的端点End.B6.Dod类型的段标识,或为按需删除绑定到SR-MPLS策略的端点End.BM.Dod类型的段标识。
- 根据权利要求1至5任一项所述的方法,其特征在于,所述第一设备对所述第一报文执行删除所述第一SRH操作,并执行封装操作生成第二报文包括:所述第一设备将所述第一报文中的所述第一SRH删除,并对所述第一报文封装第一报文头生成所述第二报文。
- 根据权利要求6所述的方法,其特征在于,所述第一报文头为互联网协议第六版IPv6基础头、包含第二SRH的IPv6头或者多协议标签交换MPLS头。
- 根据权利要求6所述的方法,其特征在于,所述第一报文头中包含路径信息,所述路径信息用于指示所述第二报文的传输路径。
- 根据权利要求8所述的方法,其特征在于,所述路径信息与所述第一段标识对应。
- 根据权利要求8所述的方法,其特征在于,所述第一SRH包括第二段标识,所述第二段标识用于指示传输所述第一报文的下一个段,所述路径信息与所述第二段标识对应。
- 根据权利要求10所述的方法,其特征在于,所述第二报文还包含第二报文头,所述第二报文头的目的地址为所述第二段标识。
- 根据权利要求8-11任一项所述的方法,其特征在于,所述第二SRH中的段标识列表包含所述路径信息,或者所述MPLS头的标签栈包含所述路径信息。
- 根据权利要求1-12任一项所述的方法,其特征在于,所述第二设备为主机,所述第一报文的载荷为所述第二设备所生成的报文,或所述第二设备为转发设备,所述第一报文的载荷为所述第二设备所接收的报文。
- 根据权利要求1-13任一项所述的方法,其特征在于,生成所述第一报文的设备接入网络时所连接的设备与最终接收所述第一报文的设备接入网络时所连接的设备属于不同的网络域。
- 根据权利要求1-14任一项所述的方法,其特征在于,所述方法还包括:所述第一设备向所述第二设备发送所述第一段标识以及指示信息,所述指示信息用于指示所述第一设备具有执行SRH删除操作的能力。
- 根据权利要求15所述的方法,其特征在于,所述指示信息包含在所述第一段标识的功能Function部分,或者所述指示信息为对应所述第一段标识的附加行为flavor。
- 一种报文处理装置,其特征在,所述装置应用于第一设备,包括:接收单元,用于接收第二设备发送的第一报文,所述第一报文包括第一段路由头SRH;确定单元,用于确定所述第一报文包含第一段标识,所述第一段标识为所述第一设备对应的段标识;生成单元,用于响应于确定所述第一报文包含所述第一段标识,对所述第一报文执行删除所述第一SRH操作,并执行封装操作生成第二报文;发送单元,用于发送所述第二报文。
- 根据权利要求17所述的装置,其特征在于,所述生成单元,具体用于确定所述第一SRH中段剩余SL等于1或更新后的SL等于0;响应于确定所述第一报文包含所述第一段标识以及所述SL等于1或更新后的SL等于0,对所述第一报文执行删除所述第一SRH,并执行封装操作生成第二报文。
- 根据权利要求17或18所述的装置,其特征在于,所述第一段标识的类型为绑定段标识。
- 根据权利要求17至19任一项所述的装置,其特征在于,所述第一段标识为绑定到SRv6策略的端点End.B6类型的段标识,或为绑定到SR-MPLS策略的端点End.BM类型的段标识。
- 根据权利要求17至19任一项所述的装置,其特征在于,所述第一段标识为按需删除绑定到SRv6策略的端点End.B6.Dod类型的段标识,或为按需删除绑定到SR-MPLS策略的端点End.BM.Dod类型的段标识。
- 根据权利要求17至21任一项所述的装置,其特征在于,所述生成单元,具体用于将所述第一报文中的所述第一SRH删除,并对所述第一报文封装第一报文头生成所述第二报文。
- 根据权利要求22所述的装置,其特征在于,所述第一报文头为互联网协议第六版IPv6基础头、包含第二SRH的IPv6头或者多协议标签交换MPLS头。
- 根据权利要求22所述的装置,其特征在于,所述第一报文头中包含路径信息,所述路径信息用于指示所述第二报文的传输路径。
- 根据权利要求24所述的装置,其特征在于,所述路径信息与所述第一段标识对应。
- 根据权利要求24所述的装置,其特征在于,所述第一SRH包括第二段标识,所述第二段标识用于指示传输所述第一报文的下一个段,所述路径信息与所述第二段标识对应。
- 根据权利要求26所述的装置,其特征在于,所述第二报文还包含第二报文头,所述第二报文头的目的地址为所述第二段标识。
- 根据权利要求27-27任一项所述的装置,其特征在于,所述第二SRH中的段标识列表包含所述路径信息,或者所述MPLS头的标签栈包含所述路径信息。
- 根据权利要求17-28任一项所述的装置,其特征在于,所述第二设备为主机,所述第一报文的载荷为所述第二设备所生成的报文,或所述第二设备为转发设备,所述第一报文的载荷为所述第二设备所接收的报文。
- 根据权利要求17-29任一项所述的装置,其特征在于,生成所述第一报文的设备接入网络时所连接的设备与最终接收所述第一报文的设备接入网络时所连接的设备属于不同的网络域。
- 根据权利要求17-30任一项所述的装置,其特征在于,所述发送单元,还用于向所述第二设备发送所述第一段标识以及指示信息,所述指示信息用于指示所述第一设备具有执行SRH删除操作的能力。
- 根据权利要求31所述的装置,其特征在于,所述指示信息包含在所述第一段标识的功能Function部分,或者所述指示信息为对应所述第一段标识的附加行为flavor。
- 一种通信设备,其特征在于,所述设备包括:处理器和存储器;所述存储器,用于存储指令或计算机程序;所述处理器,用于执行所述存储器中的所述指令或计算机程序,以使得所述通信设备执行权利要求1-16任意一项所述的方法。
- 一种计算机可读存储介质,其特征在于,包括指令,当其在计算机上运行时,使得计算机执行以上权利要求1-16任意一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP22894682.8A EP4418634A1 (en) | 2021-11-17 | 2022-11-09 | Packet processing method, apparatus and device |
US18/663,207 US20240297844A1 (en) | 2021-11-17 | 2024-05-14 | Packet Processing Method and Apparatus, and Device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111367033.6A CN116137632A (zh) | 2021-11-17 | 2021-11-17 | 一种报文处理方法、装置及设备 |
CN202111367033.6 | 2021-11-17 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/663,207 Continuation US20240297844A1 (en) | 2021-11-17 | 2024-05-14 | Packet Processing Method and Apparatus, and Device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023088145A1 true WO2023088145A1 (zh) | 2023-05-25 |
Family
ID=86334176
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/130827 WO2023088145A1 (zh) | 2021-11-17 | 2022-11-09 | 一种报文处理方法、装置及设备 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20240297844A1 (zh) |
EP (1) | EP4418634A1 (zh) |
CN (1) | CN116137632A (zh) |
WO (1) | WO2023088145A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105871721A (zh) * | 2015-01-19 | 2016-08-17 | 中兴通讯股份有限公司 | 一种段路由处理方法、处理装置及发送装置 |
CN109561021A (zh) * | 2017-09-25 | 2019-04-02 | 华为技术有限公司 | 一种报文转发的方法及网络设备 |
US20190104058A1 (en) * | 2017-10-04 | 2019-04-04 | Cisco Technology, Inc. | Segment Routing Network Processing of Packets including Operations Signaling and Processing of Packets in Manners Providing Processing and/or Memory Efficiencies |
CN110557329A (zh) * | 2018-05-30 | 2019-12-10 | 中兴通讯股份有限公司 | 一种报文转发的方法、装置和节点 |
CN112787927A (zh) * | 2021-03-26 | 2021-05-11 | 新华三信息安全技术有限公司 | 一种分段路由报文转发方法、装置及预设逻辑电路单元 |
-
2021
- 2021-11-17 CN CN202111367033.6A patent/CN116137632A/zh active Pending
-
2022
- 2022-11-09 WO PCT/CN2022/130827 patent/WO2023088145A1/zh active Application Filing
- 2022-11-09 EP EP22894682.8A patent/EP4418634A1/en active Pending
-
2024
- 2024-05-14 US US18/663,207 patent/US20240297844A1/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105871721A (zh) * | 2015-01-19 | 2016-08-17 | 中兴通讯股份有限公司 | 一种段路由处理方法、处理装置及发送装置 |
CN109561021A (zh) * | 2017-09-25 | 2019-04-02 | 华为技术有限公司 | 一种报文转发的方法及网络设备 |
US20190104058A1 (en) * | 2017-10-04 | 2019-04-04 | Cisco Technology, Inc. | Segment Routing Network Processing of Packets including Operations Signaling and Processing of Packets in Manners Providing Processing and/or Memory Efficiencies |
CN110557329A (zh) * | 2018-05-30 | 2019-12-10 | 中兴通讯股份有限公司 | 一种报文转发的方法、装置和节点 |
CN112787927A (zh) * | 2021-03-26 | 2021-05-11 | 新华三信息安全技术有限公司 | 一种分段路由报文转发方法、装置及预设逻辑电路单元 |
Also Published As
Publication number | Publication date |
---|---|
US20240297844A1 (en) | 2024-09-05 |
EP4418634A1 (en) | 2024-08-21 |
CN116137632A (zh) | 2023-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110784411B (zh) | 建立bier转发表项的方法、装置和系统 | |
JP7208386B2 (ja) | パケット転送方法、パケット送信装置、およびパケット受信装置 | |
WO2021233267A1 (zh) | SRv6业务链中转发报文的方法、SFF及SF设备 | |
WO2021088433A1 (zh) | 一种报文的处理方法,装置和系统 | |
JP2023549797A (ja) | Bierパケット転送方法、デバイス、及びシステム | |
CN112737954B (zh) | 报文处理方法、装置、系统、设备及存储介质 | |
CN111937358A (zh) | 用于结构边缘设备的多vrf通用设备互联网协议地址 | |
WO2021043232A1 (zh) | 主机网络性能需求可编程化的方法、设备和系统 | |
CN113542111A (zh) | 一种报文转发方法及网络设备 | |
CN111669422B (zh) | 报文的传输方法和设备 | |
CN115426305B (zh) | 报文处理方法、装置、系统及存储介质 | |
WO2022007702A1 (zh) | 一种报文处理方法及网络设备 | |
CN110022263B (zh) | 一种数据传输的方法及相关装置 | |
CN114301839B (zh) | 一种组播报文传输方法及装置 | |
WO2024001701A1 (zh) | 数据处理方法、装置及系统 | |
WO2023016550A1 (zh) | 一种路由发送方法及设备 | |
WO2023088145A1 (zh) | 一种报文处理方法、装置及设备 | |
JP7273125B2 (ja) | BIERv6パケットを送信するための方法および第1のネットワークデバイス | |
WO2021078171A1 (zh) | 一种报文传输方法、设备以及数字处理芯片 | |
CN113542112A (zh) | 一种报文转发方法及网络设备 | |
WO2023125774A1 (zh) | 一种vxlan报文传输方法、网络设备及系统 | |
WO2023125767A1 (zh) | 一种报文传输方法、网络设备及系统 | |
WO2023231438A1 (zh) | 报文发送的方法、网络设备及系统 | |
WO2022048381A1 (zh) | 一种报文传输方法及装置 | |
WO2023208056A1 (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: 22894682 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2022894682 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2022894682 Country of ref document: EP Effective date: 20240516 |