WO2022228533A1 - 处理报文的方法、装置、系统及存储介质 - Google Patents

处理报文的方法、装置、系统及存储介质 Download PDF

Info

Publication number
WO2022228533A1
WO2022228533A1 PCT/CN2022/090012 CN2022090012W WO2022228533A1 WO 2022228533 A1 WO2022228533 A1 WO 2022228533A1 CN 2022090012 W CN2022090012 W CN 2022090012W WO 2022228533 A1 WO2022228533 A1 WO 2022228533A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
identifier
segment
header
packet header
Prior art date
Application number
PCT/CN2022/090012
Other languages
English (en)
French (fr)
Inventor
马云东
肖亚群
王振星
廖婷
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022228533A1 publication Critical patent/WO2022228533A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables

Definitions

  • the present application relates to the field of communications, and in particular, to a method, device, system and storage medium for processing messages.
  • the edge device when the edge device receives the user's service packet, it can use the service packet as the payload, and add a segment routing header (SRH) and the Internet on the basis of the payload.
  • the protocol (internet protocol, IP) header gets the segment routing internet protocol version 6 (SRv6) message.
  • the SRH includes a segment list, and the segment list indicates a forwarding path that can reach the destination address of the service message.
  • the edge device sends SRv6 packets through the forwarding path.
  • the network device on the forwarding path may need to identify the data of the inner layer service packet. For example, in some scenarios, the network device on the forwarding path may need to read the data of the inner layer service packet to collect the quintuple information of the user. At this time, the network device on the forwarding path defaults that the inner layer of the SRH is the service packet, and then performs the read operation.
  • the network device on the forwarding path may continue to add the Layer 2 SRH header and the Layer 2 IP header based on the SRv6 packet.
  • the packet may include multiple layers of SRH headers and IP headers.
  • the network device still considers that the outermost SRH header and IP header are service packets when receiving the packet, and then performs a specified processing operation on the packet, an error may occur.
  • the packets received by the network device include two layers of SRH headers and two layers of IP headers.
  • the read service information is not the service information in the service packet, but the network information in the inner SRH header and the IP header, resulting in a reading error.
  • the present application provides a method, apparatus, system and storage medium for processing a message, so as to instruct a device to process the first message and avoid errors when processing the first message.
  • the technical solution is as follows:
  • the present application provides a method for processing a packet.
  • a first device obtains a first packet, and a packet header of the first packet includes an inner-layer packet header and an outer-layer packet.
  • header the inner packet header is located between the payload of the first packet and the outer packet header, the outer packet header includes the first identifier and the first segment list, and the inner packet header includes the second segment list,
  • the first segment list is used to indicate the first path
  • the second segment list is used to indicate the second path
  • the first path and the second path are used to forward the first packet
  • the first flag is used to identify whether the outer packet header includes business identity.
  • the first device sends the first packet, so that the first packet is processed based on the first identifier.
  • the first identifier is used to identify whether the outer header includes the service identifier, so for the device receiving the first packet, the device can It is determined based on the first identifier whether the outer header of the first packet includes a service identifier, and a corresponding processing manner is adopted to process the first packet based on the determined result. Therefore, the first identifier can be used to instruct the device to process the first packet, thereby avoiding errors when the device processes the packet.
  • the outer packet header includes a first segment route SRH, and the first SRH includes a first identifier and a first segment list. It is easy to find the target field in the first SRH to carry the first identifier, thereby simplifying the implementation difficulty of the solution.
  • the outer layer packet header further includes a first IP header, the first IP header includes the first destination address, and the first segment list includes the first destination address.
  • the inner packet header includes a second SRH and a second IP header
  • the second SRH includes a second segment list
  • the second IP header includes a second destination address
  • the second segment list includes the first segment list.
  • the second destination address is a segment identifier SID of the second device included in the second segment list
  • the first path is a path to reach the second device
  • the service identifier includes a service segment identifier
  • the first identifier is used to identify whether the first segment list includes a service segment identifier.
  • the service identifier includes an identifier of a network segment.
  • the first identifier when the value of the first identifier is the first value, the first identifier is used to identify that the outer packet header includes the service identifier; when the value of the first identifier is the second value When the value is set, the first identifier is used to identify that the outer packet header does not include the service identifier. This simplifies the difficulty of carrying the first identifier in the outer packet header.
  • the target field of the outer packet header includes the first identifier, and the target field includes the type-length value TLV, flags or tags of the outer packet header. Since the target field includes TLV, Flags or Tag, it is easy to find the target field in the first SRH to carry the first identifier, thereby simplifying the implementation difficulty of the solution.
  • the first device receives the second packet, and a packet header of the second packet includes an inner-layer packet header.
  • the first device adds an outer packet header including the first identifier to the second packet to obtain the first packet.
  • the inner packet header includes a second segment list, the second segment list includes a segment identifier corresponding to the first device, and the segment identifier corresponding to the first device includes a policy bound to an SRv6 with encapsulation
  • the first device adds an outer-layer packet header including the first identifier to the second packet according to the indication of the End.B6.Encaps identifier. In this way, through the End.B6.Encaps identifier, a path for sending the first packet can be connected to ensure that the first packet can be successfully transmitted.
  • the inner layer packet header includes a second identifier, and the second identifier is used to identify the type of service information included in the inner layer packet header. In this way, when reading the user information, the inner packet header can be skipped based on the second identifier, and the user information can be read from the payload of the first packet to avoid reading errors.
  • At least one other packet header is further included between the inner packet header and the payload of the first packet.
  • the present application provides a method for processing a packet.
  • a first device receives a first packet, and a packet header of the first packet includes an inner-layer packet header and an outer-layer packet.
  • header the inner packet header is located between the payload of the first packet and the outer packet header, the outer packet header includes the first identifier and the first segment list, and the inner packet header includes the second segment list,
  • the first segment list is used to indicate the first path
  • the second segment list is used to indicate the second path
  • the first path and the second path are used to forward the first packet
  • the first flag is used to identify whether the outer packet header includes business identity.
  • the first device processes the first packet based on the first identifier.
  • the first device can determine the first packet based on the first identifier. Whether the outer header of the message includes a service identifier, and based on the determined result, a corresponding processing method is adopted to process the first message. Therefore, the first identifier can be used to instruct the manner in which the first device processes the first packet, thereby avoiding errors when the first device processes the first packet.
  • the first device determines whether the first identifier is used to identify whether the outer packet header includes a service identifier. When determining that the service identifier is not included, the first device sends the first packet based on the inner packet header. When the first path is faulty, the first device is instructed to send a packet based on the inner packet header through the first identifier, so as to ensure that the first packet can be successfully transmitted.
  • the service identifier includes one or more of a service segment identifier and an identifier of a network slice.
  • the first device reads the first segment identifier from the second segment list; the first device sends the first packet based on the first segment identifier. In this way, when the first path fails, the first device continues to send the first packet from the first segment identifier in the second segment list, thereby improving the success rate of packet sending.
  • the first device when the first device determines, based on the first identifier, that the outer packet header does not include the service identifier, the first device obtains, from the payload of the first packet, the corresponding value of the first packet. User Info.
  • the first identifier is used to instruct the first device to obtain the location of the user information, so as to avoid errors in obtaining the user information by the first device.
  • the service identifier includes a virtual private network segment identifier VPN SID
  • the user information includes quintuple information of the first packet.
  • the first device determines whether the first identifier is used to identify whether the outer packet header includes the service identifier; when the first device determines that the service identifier is included, the first device discards the first message.
  • the outer packet header includes a first segment route SRH, and the first SRH includes a first identifier and a first segment list.
  • the outer packet header further includes a first Internet Protocol IP header, the first IP header includes a first destination address, and the first segment list includes the first destination address.
  • the inner packet header includes a second SRH and a second IP header
  • the second SRH includes a second segment list
  • the second IP header includes a second destination address
  • the second segment list includes the first segment list.
  • the target field of the outer packet header includes the first identifier, and the target field includes the type-length value TLV, flags or tags of the outer packet header. Since the target field includes TLV, Flags or Tag, it is easy to find the target field in the first SRH to carry the first identifier, thereby simplifying the implementation difficulty of the solution.
  • the present application provides an apparatus for processing a message, which is used to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • the apparatus includes a unit for performing the method in the first aspect or any possible implementation manner of the first aspect.
  • the present application provides an apparatus for processing a message, for executing the method in the second aspect or any possible implementation manner of the second aspect.
  • the apparatus includes a unit for performing the method in the second aspect or any one possible implementation manner of the second aspect.
  • the present application provides an apparatus for processing a message, where the apparatus includes a processor and a memory.
  • the processor and the memory may be connected through an internal connection.
  • the memory is used for storing a program
  • the processor is used for executing the program in the memory, so that the apparatus performs the method in the first aspect or any possible implementation manner of the first aspect.
  • the present application provides an apparatus for processing a message, where the apparatus includes a processor and a memory.
  • the processor and the memory may be connected through an internal connection.
  • the memory is used for storing a program
  • the processor is used for executing the program in the memory, so that the apparatus performs the method of the second aspect or any possible implementation manner of the second aspect.
  • the present application provides a network device, the network device comprising: a main control board and an interface board.
  • the main control board includes: a first processor and a first memory.
  • the interface board includes: a second processor, a second memory and an interface card. The main control board and the interface board are coupled.
  • the first memory can be used to store program codes
  • the first processor is used to call the program codes in the first memory to perform the following operations: obtain a first message, and a message header of the first message includes an inner-layer message header and an outer-layer message header.
  • packet header the inner packet header is located between the payload of the first packet and the outer packet header, the outer packet header includes the first identifier and the first segment list, and the inner packet header includes the second segment List, the first segment list is used to indicate the first path, the second segment list is used to indicate the second path, the first path and the second path are used to forward the first packet, and the first identifier is used to identify the outer packet header Whether to include the business ID.
  • the second memory can be used to store program codes
  • the second processor is used to call the program codes in the second memory, and trigger the interface card to perform the following operations: send the first message, so that the device receiving the first message is based on the first identifier Process the first message.
  • the present application provides a network device, the network device comprising: a main control board and an interface board.
  • the main control board includes: a first processor and a first memory.
  • the interface board includes: a second processor, a second memory and an interface card. The main control board and the interface board are coupled.
  • the second memory can be used to store program codes
  • the second processor is used to call the program codes in the second memory, triggering the interface card to perform the following operations: receiving the first packet, the packet header of which includes the inner packet header and outer packet header, the inner packet header is located between the payload of the first packet and the outer packet header, the outer packet header includes the first identifier and the first segment list, the inner packet header It includes a second segment list, the first segment list is used to indicate the first path, the second segment list is used to indicate the second path, the first path and the second path are used to forward the first packet, and the first identifier is used to identify foreign Whether the layer header includes the service identifier.
  • the first memory may be used to store program codes, and the first processor is used to call the program codes in the first memory to perform the following operations: process the first message based on the first identifier.
  • an inter-process communication (inter-process communication, IPC) channel is established between the main control board and the interface board, and the main control board and the interface board communicate through the IPC channel.
  • IPC inter-process communication
  • the present application provides a network system, the network system includes the device provided in the third aspect or the device provided in the fourth aspect, or the network system includes the device provided in the fifth aspect or the sixth aspect.
  • the apparatus, or the network system includes the network device provided in the seventh aspect or the network device provided in the eighth aspect.
  • the present application provides a computer program product, the computer program product includes a computer program stored in a computer-readable storage medium, and the computer program is loaded by a processor to implement the first aspect, the first aspect, and the third aspect.
  • the second aspect any possible implementation manner of the first aspect, or any possible implementation manner of the second aspect.
  • the present application provides a computer-readable storage medium for storing a computer program, where the computer program is loaded by a processor to execute any possible implementation of the first aspect, the second aspect, and the first aspect manner or any possible method of implementing the second aspect.
  • the present application provides a chip, including a memory and a processor, where the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the above-mentioned first aspect, second aspect, Any possible implementation manner of the first aspect or any possible implementation manner of the second aspect.
  • FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a first message and a second message provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another first message and a second message provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another network architecture provided by an embodiment of the present application.
  • FIG. 6 is another flow chart of sending a message provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another first message and a second message provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another first message and a second message provided by an embodiment of the present application.
  • FIG. 9 is a flowchart of a method for processing a message provided by an embodiment of the present application.
  • FIG. 10 is a flowchart of another method for processing a message provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an apparatus for processing a message provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of another apparatus for processing a message provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of another apparatus for processing a message provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of another apparatus for processing a message provided by an embodiment of the present application.
  • 15 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of another device provided by an embodiment of the present application.
  • an embodiment of the present application provides a network architecture 100, including:
  • the operator network includes multiple network devices. Any two customer premises equipment (customer premises equipment, CPE) can communicate through the multiple operator networks. For any two adjacent operator networks, the edge device of one operator network communicates with the edge device of the other operator network.
  • CPE customer premises equipment
  • the network architecture 100 shown in FIG. 1 it includes a first operator network and a second operator network, and the first operator network and the second operator network belong to different operators.
  • the first operator network includes a network device ACC1, a network device AGG1, a network device P1, a network device P7, a network device AGG2 and a network device ACC2.
  • the second operator network includes a network device MC1, a network device MC2, a network device MC3, a network device MC4, a network device P3, a network device P4, a network device P5, and a network device P6.
  • the first operator network includes two parts, the two parts are the first operator network 1 and the first operator network 2 respectively, and the first operator network 1 and the first operator network 2 belong to the same operator.
  • the first operator network 1 includes a network device ACC1, a network device AGG1 and a network device P1
  • the first operator network 2 includes a network device P7, a network device AGG2 and a network device ACC2.
  • the network device MC1, the network device MC2, the network device MC3 and the network device MC4 are the edge devices of the second operator's network
  • the network device P1 and the network device ACC1 are the edge devices of the first operator's network 1, the network device P7 and the network device ACC2 It is a border device of the first operator's network 2 .
  • the border device P1 of the first operator network 1 communicates with the border device MC1 and the border device MC2 of the second operator network
  • the border device P7 of the first operator network 2 communicates with the border device MC3 and the border device MC4 of the second operator network. communication.
  • the paths between the two CPEs for transmitting packets pass through the multiple operator networks.
  • the first CPE communicates with the edge device ACC1 of the first operator network 1
  • the second CPE communicates with the edge device ACC2 of the first operator network 2
  • a path for transmitting a packet between the first CPE and the second CPE passes through the first operator network 1 , the second operator network and the first operator network 2 .
  • the path used for packet transmission between the first CPE and the second CPE is the path from the edge device ACC1 to the edge device ACC2.
  • a portion of the path exists in the second operator's network.
  • the part of the path located in the second operator's network is referred to as the first path, and the path is referred to as the second path.
  • the first path of the path located in the second operator network includes at least one first path, and the at least one first path backs up each other.
  • the network management device configures a second segment list on the border device ACC1 that communicates with the first CPE, where the second segment list is used to indicate the second path.
  • the second segment list includes the segment identifier "AGG1.END” of the network device AGG1, the segment identifier "P1.END” of the border device P1, the segment identifier "P7.END” of the border device P7, and the segment identifier "AGG2" of the network device AGG2 .END", the segment identifier "ACC2.END” of the edge device ACC2, and the service identifier "ACC2.VPN SID” of the edge device ACC2.
  • the service identifier "ACC2.VPN SID” is used to indicate the outbound interface on the border device ACC2 that communicates with the second CPE.
  • the service identifier includes a service segment identifier of the border device ACC2, and the service segment identifier is a virtual private network segment identifier (virtual private network segment, VPN SID), that is, the service segment identifier of ACC2 is "ACC2.VPN SID" Wait.
  • the VPN SID is the private identifier of the edge device ACC2, only the edge device ACC2 can resolve the VPN SID, and other devices except the edge device ACC2 cannot resolve the VPN SID.
  • the next hop device of the edge device P1 is the edge device of the second operator's network.
  • the edge device MC1 of the second operator's network For example, it is assumed to be the edge device MC1 of the second operator's network.
  • the network management device is configured on the edge device P1 in advance to be able to reach the edge device.
  • the routing information of P7, the routing information includes the segment identifier "P7.END" of the border device P7 and the identifier of the outgoing interface, and the outgoing interface communicates with the border device MC1.
  • the network management device configures a first segment list corresponding to the segment identifier "P7.END" of the edge device P7 on the edge device MC1, and the first segment list is used to indicate the first path.
  • the segment identification of the border device P7 includes the identification of the endpoint bound to an SRv6 policy with encapsulation (endpoint bound to an SRv6 policy with encapsulation, End.B6.Encaps), and the End.B6.Encaps identification is used to trigger the use of the border device MC1
  • the first path indicated by the first segment list sends the packet to the border device P7.
  • RRC Request for Comments
  • the first segment list includes M segment identifiers, where M is an integer greater than 1, and a device corresponding to each segment identifier included in the first segment list belongs to the second operator network.
  • the M-1 th segment identifier in the first segment list is the segment identifier of the border device of the second operator network, and the next hop device of the border device is the border device P7 in the first operator network 2 .
  • the Mth segment identifier in the first segment list is the service identifier of the border device, and the service identifier is used to indicate the outbound interface on the border device that communicates with the network of the first operator, so that the next hop of the border device is
  • the device is a border device P7 in the first operator network 2 .
  • the service identifier includes a service segment identifier of the border device, such as the VPN SID of the border device, and the like.
  • the VPN SID is the private identifier of the border device, only the border device can resolve the VPN SID, and other devices other than the border device cannot resolve the VPN SID.
  • the first segment list corresponding to the segment identifier "P7.END” includes the first segment list 1 and the first segment list 2.
  • the first segment list 1 includes the segment identifier "P3.EndX” of the network device P3, the segment identifier "P5.EndX” of the network device P5, the segment identifier "MC3.End” of the border device MC3, and the service identifier "MC3" of the border device MC3 .VPN SID".
  • the service identifier "MC3.VPN SID" is used to indicate the outbound interface on the border device MC3 that communicates with the border device P7, so that the next hop device of the border device MC3 is the border device P7 of the first operator network 2.
  • the first segment list 2 includes the segment identifier "MC2.EndX” of the edge device MC2, the segment identifier "P4.EndX” of the network device P4, the segment identifier "P6.EndX” of the network device P6, and the segment identifier "MC4" of the edge device MC4 .End” and the service identifier "MC4.VPN SID” of the border device MC4.
  • the service identifier "MC4.VPN SID” is used to indicate the outbound interface on the border device MC4 that communicates with the border device P7, so that the next hop device of the border device MC4 is the border device P7 of the first operator network 2.
  • the process of the first CPE sending the service packet to the second CPE may include the following operations of steps 201 to 208, where the operations of steps 201 to 208 are respectively:
  • Step 201 The edge device ACC1 receives the service packet sent by the first CPE, and adds a layer of packet headers to the service packet to obtain a second packet, where the packet header of the layer includes the second SRH, and the second SRH includes the first packet. Two paragraph list.
  • the service packet is the payload of the second packet
  • the second packet includes the packet header of the layer.
  • the packet header of the layer further includes a second IP header
  • the second IP header includes the first segment identifier in the second segment list, that is, the second IP header includes the segment identifier "AGG1.END” of the network device AGG1.
  • the second IP header includes a source address (SA) field and a destination address (DA) field
  • the source address field includes the loopback (loopback) address "ACC1.Lo" of the border device ACC1
  • the destination address field includes the network device AGG1 The segment ID "AGG1.END”.
  • Step 202 The edge device ACC1 sends the second packet based on the second segment list.
  • the edge device ACC1 sends a second packet to the network device AGG1 based on the segment identifier "AGG1.END” included in the second IP header.
  • the network device AGG1 receives the second packet, reads the next segment identifier "P1.END” after the segment identifier "AGG1.END” from the second segment list included in the second packet, and stores the segment identifier "P1.END” included in the second IP header.
  • the segment identifier "AGG1.END” is replaced with the read segment identifier "P1.END”, and the second packet is sent to the network device P1 based on the segment identifier "P1.END” included in the second IP header.
  • the network device P1 is a border device of the first operator's network, and the next-hop device of the border device P1 is located in the second operator's network, so the border device P1 will perform the following step 203.
  • Step 203 The border device P1 receives the second packet, and sends the second packet to the border device MC1 of the second operator network.
  • the boundary device P1 receives the second message, reads the next segment identifier "P7.END” after the segment identifier "P1.END” from the second segment list included in the second message, and converts the The segment identifier "P1.END” included in the second IP header is replaced with the read segment identifier "P7.END”. And, based on the segment identifier "P7.END", the routing information including the segment identifier "P7.END” is obtained, and the routing information also includes the identifier of the outgoing interface communicating with the border device MC1. The second packet is sent to the border device MC1 based on the identifier of the outgoing interface.
  • Step 204 the border device MC1 receives the second packet, and adds a layer of packet header to the second packet to obtain the first packet, where the layer of packet header includes the first SRH, and the first SRH includes the first segment list.
  • the border device MC1 receives the second message, reads the segment identifier "P7.END” of the border device P7 from the second IP header of the second message, and based on the End.B6.Encaps identifier included in the segment identifier "P7.END” add a packet header to the second packet.
  • the packet header of this layer includes a first SRH, the first SRH includes a first segment list, and the first segment list included in the first SRH is a first segment list corresponding to the segment identifier "P7.END" of the boundary device P7 .
  • the one-layer packet header further includes a first IP header, the first IP header includes a source address field and a destination address field, the source address field includes the loopback address "MC1.Lo" of the border device MC1, and the destination address field includes the first segment The first segment ID in the list.
  • the header of the first packet includes an inner packet header and an outer packet header
  • the inner packet header is located between the payload of the first packet and the outer packet header
  • the inner packet header is located between the payload of the first packet and the outer packet header.
  • the header includes the second SRH and the second IP header
  • the outer packet header includes the first SRH and the first IP header.
  • the second IP header in the inner packet header of the first packet includes the segment identifier "P7.END".
  • the first segment list in the first SRH is a first segment corresponding to the segment identifier "P7.END" of the boundary device P7 segment list.
  • the first segment list is the above-mentioned first segment list 1, that is, the first segment list in the first SRH includes the segment identifier "P3.EndX" of the network device P3, the segment identifier "P5.EndX” of the network device P5, the boundary The segment identifier "MC3.End” and the service identifier "MC3.VPN SID" of the device MC3; the first segment identifier "P3.EndX” in the first segment list 1 included in the first IP header.
  • the outer packet of the first packet further includes a first internet protocol version 6 hop by hop option header (HBH), the first HBH
  • HBH hop by hop option header
  • the identifier of the first network fragment is included, and for the first segment list included in the first SRH, the first path indicated by the first segment list is a path in the first network fragment.
  • the inner header of the first packet further includes a second HBH, and the second HBH includes the identifier of the second network fragment.
  • the second path indicated by the second segment list is: Path in the second network shard.
  • the identifier of the first network fragment and the identifier of the second network fragment are also service identifiers.
  • Step 205 The border device MC1 sends the first packet based on the first segment list in the first SRH.
  • the first IP header of the first packet includes the first segment identifier "P3.EndX" in the first segment list, and the border device MC1 sends the network device to the network device based on the segment identifier "P3.EndX" P3 sends the first message.
  • the network device P3 receives the first packet, reads the next segment identifier "P5.EndX” after the segment identifier "P3.EndX” from the first segment list included in the first packet, and stores the segment identifier "P5.EndX” included in the first IP header.
  • the segment identifier "P3.EndX” is replaced with the read segment identifier "P5.EndX”, and the first packet is sent to the network device P5 based on the segment identifier "P5.EndX” included in the first IP header.
  • the network device P5 receives the first packet, reads the next segment identifier "MC3.End” after the segment identifier "P5.EndX” from the first segment list included in the first packet, and stores the segment identifier "MC3.End” included in the first IP header.
  • the segment identifier "P5.EndX” is replaced with the read segment identifier "MC3.End”, and the first packet is sent to the border device MC3 based on the segment identifier "MC3.End” included in the first IP header.
  • Step 206 The border device MC3 receives the first packet, removes the outer header of the first packet, obtains a second packet, and sends the second packet to the border device of the first operator network.
  • the border device MC3 receives the first message, and reads the next segment identifier "MC3.VPN SID" after the segment identifier "MC3.End” from the first segment list included in the first message.
  • the segment identifier "MC3.VPN SID” is the service identifier of the border device MC3, and based on the indication of the service identifier "MC3.VPN SID", the outgoing interface that communicates with the first operator's network is determined, and the outgoing interface is connected to the first operator's network.
  • the edge device P7 of the commercial network communicates. And, based on the service identifier "MC3.VPN SID", the outer packet header is removed from the first packet to obtain a second packet, and the second packet is sent to the border device P7 through the outbound interface.
  • Step 207 The border device P7 receives the second packet, and sends the second packet based on the second segment list in the second packet.
  • the boundary device P7 receives the second message, reads the next segment identifier "AGG2.END” after the segment identifier "P7.END” from the second segment list included in the second message, and stores the second segment identifier "AGG2.END”.
  • the segment identifier "P7.END” included in the second IP header in the message is replaced with the read segment identifier "AGG2.END”, and based on the segment identifier "AGG2.END” included in the second IP header, the second IP header is sent to the network device AGG2. Two messages.
  • the network device AGG2 receives the second packet, reads the next segment identifier "ACC2.END” after the segment identifier "AGG2.END” from the second segment list included in the second packet, and converts the segment identifier "ACC2.END” in the second packet.
  • the segment identifier "AGG2.END” included in the second IP header is replaced with the read segment identifier "ACC2.END”, and the second packet is sent to the network device ACC2 based on the segment identifier "ACC2.END” included in the second IP header.
  • Step 208 The edge device ACC2 receives the second packet, removes the inner packet in the second packet to obtain a service packet, and sends the service packet to the second CPE.
  • the border device ACC2 receives the second packet, and reads the next segment identifier "ACC2.VPN SID" and "ACC2.VPN SID” after the segment identifier "ACC2.END” from the second segment list included in the second packet It is used to indicate the outgoing interface on the edge device ACC2 that communicates with the second CPE. Remove the header of the second packet to obtain the service packet, and send the service packet to the second CPE based on the outbound interface indicated by "ACC2.VPN SID".
  • the network device for convenience of description, the network device is referred to as the first device, and for the first segment list used to indicate the first path, the first segment list includes M Segment ID.
  • the first device obtains the next segment identifier after the first segment identifier from the first segment list included in the first packet as the second segment identifier, and the first segment identifier is the first device segment ID.
  • the first device detects a path failure between the first device and the device corresponding to the second segment identifier, it adopts the midpoint topology independent-loop free alternate (midpoint TI-LFA) technology to send the specified node topology.
  • midpoint TI-LFA midpoint topology independent-loop free alternate
  • the process of sending the first packet by the first device using the midpoint TI-LFA technology is as follows: the first device obtains the next segment identifier after the second segment identifier from the first segment list as the third segment identifier , calculate the path between the first device and the device corresponding to the third segment identifier, and send the first packet to the device corresponding to the third segment identifier through the calculated path.
  • the network device P3 receives the first packet, and obtains the next segment after the segment identifier "P3.EndX" from the first segment list included in the first packet
  • the identifier "P5.EndX” is used as the second segment identifier.
  • the network device P3 obtains the next segment identifier after the second segment identifier "P5.EndX” from the first segment list "MC3.End” is used as the third segment identifier, and the path from the network device P3 to the network device MC3 corresponding to the third segment identifier "MC3.End” is calculated, and the first packet is sent to the network device MC3 through the calculated path.
  • the last segment included in the first segment list of the first packet is identified as the VPN SID of the second device
  • the second device is the M-1th included in the first segment list of the first packet
  • the segment identifies the corresponding device. If the third segment identifier read by the first device from the first segment list is the VPN SID of the second device, since the VPN SID of the second device is the private identifier of the second device, the first device cannot resolve the semantics of the VPN SID , so that the first device cannot calculate the path between the first device and the device corresponding to the third segment identifier. Therefore, if the read third segment is identified as the VPN SID of the second device, the first device cannot use the midpoint TI-LFA technology to send the first packet.
  • the first path may also pass through other operator networks except the second operator network.
  • the border device of the other operator's network may also add a layer of packet headers to the first packet, so that the added first packet A packet includes a layer of outer packet headers and multiple layers of inner packet headers.
  • the border device MC1 For the process of adding a layer of packet header to the first packet by the border device, reference may be made to the process of adding a packet header by the border device MC1, which will not be described in detail here.
  • an embodiment of the present application provides a network architecture 500, including:
  • routing area includes multiple network devices. Any two CPEs can communicate through the multiple routing areas. For any two adjacent routing areas, the two routing areas include common boundary devices.
  • the network architecture 500 includes a first routing area, a second routing area, and a third routing area.
  • the first routing area includes network equipment ACC1, network equipment AGG1 and network equipment P1;
  • the second routing area includes network equipment MC1, network equipment MC2, network equipment MC3, network equipment MC4, network equipment P3, network equipment P4, network equipment P5, Network device P6;
  • the third routing area includes network device P7, network device AGG2 and network device ACC2.
  • the network device MC1 and the network device MC2 are common border devices included in the first routing area and the second routing area;
  • the network device MC3 and the network device MC4 are common border devices included in the second routing area and the third routing area.
  • the paths between the two CPEs for transmitting packets pass through the multiple routing areas.
  • the first CPE communicates with the edge device ACC1 in the first routing area
  • the second CPE communicates with the edge device ACC2 in the third routing area.
  • a path used for packet transmission between the first CPE and the second CPE passes through the first routing area, the second routing area, and the third routing area.
  • the path used for packet transmission between the first CPE and the second CPE is the path from the edge device ACC1 to the edge device ACC2.
  • this path is referred to as the second path.
  • the second path may be longer, so that the second segment list used to indicate the second path includes a larger number of segment identifiers, resulting in a longer length of the second segment list.
  • the second path is divided into multi-segment paths, at least one segment path is selected from the multi-segment paths, and the second segment list includes segment identifiers of start nodes of each selected segment path.
  • the segment path For each segment of the path selected, for convenience of description, the segment path is referred to as the first path, and the segment identifier of the start node of the first path corresponds to the first segment list, which is used to indicate the first path.
  • the segment identifier of the start node of the first path includes an End.B6.Encaps identifier, where the End.B6.Encaps identifier is used to instruct the start node of the first path to send the message using the first segment list.
  • the starting node of the first path is a border device of the routing area.
  • the segment identifier of the starting node of the first path includes the BSID of the starting node and the like.
  • the network management device configures a second segment list on the border device that communicates with the first CPE.
  • the second segment list includes the selected starting node of each segment of the path. BSID.
  • the network management device configures the first segment list on the start node of each selected path segment.
  • a second segment list is configured on the edge device ACC1 that communicates with the first CPE, and the second segment list is used to indicate the second path.
  • the second path includes three paths, which are the path between edge device ACC1 and edge device MC1, the path between edge device MC1 and edge device MC3, and the path between edge device MC3 and edge device ACC2. It is assumed that the network management device selects the path between the edge device MC1 and the edge device MC3 as the first path 1, and selects the path between the edge device MC3 and the edge device ACC2 as the first path 2.
  • the starting node of the first path 1 is the edge device MC1, and the starting node of the first path 2 is the edge device MC3.
  • the network management device configures a second segment list on the edge device ACC1 that communicates with the first CPE.
  • the second segment list includes the segment identifier "AGG1.END” of the network device AGG1, the segment identifier "P1.END” of the network device P1, the edge device The segment identifier "MC1.BSID” of MC1, the segment identifier "MC3.BSID” of the edge device MC3, and the segment identifier "ACC2.End” of the edge device ACC2, the service identifier "ACC2.VPN SID".
  • the second segment list is used to indicate the second path between the edge device ACC1 and the edge device ACC2, and the service identifier "ACC2.VPN SID” is used to indicate the outbound interface on the edge device ACC2 that communicates with the second CPE.
  • the segment identifier "MC1.BSID" of the edge device MC1 includes the first End.B6.Encaps identifier, and the edge device MC1 includes the first segment list 1 corresponding to the segment identifier "MC1.BSID”; the first segment list 1 includes the network The segment identifier "P3.EndX” of the device P3, the segment identifier "P5.EndX” of the network device P5, and the segment identifier "MC3.End” of the edge device MC3; so the first segment list 1 is used to indicate the edge device MC1 and the edge device. First path 1 between MC3.
  • the segment identifier "MC3.BSID" of the edge device MC3 includes the second End.B6.Encaps identifier
  • the edge device MC3 includes the first segment list 2 corresponding to the segment identifier "MC3.BSID”
  • the first segment list 2 includes the network
  • the process of the first CPE sending the service packet to the second CPE may include the following operations of steps 601 to 607, where the operations of steps 601 to 607 are respectively:
  • Step 601 The edge device ACC1 receives the service packet sent by the first CPE, adds a layer of packet headers to the service packet to obtain a second packet, the layer of packet header includes the second SRH, and the second SRH includes the first packet. Two paragraph list.
  • the service packet is the payload of the second packet
  • the second packet includes the packet header of the layer.
  • the packet header of the layer further includes a second IP header
  • the second IP header includes the first segment identifier in the second segment list, that is, the second IP header includes the segment identifier "AGG1.END" of the network device AGG1.
  • the second IP header includes a source address (SA) field and a destination address (DA) field
  • the source address field includes the loopback address "ACC1.Lo" of the border device ACC1
  • the destination address field includes the segment identifier of the network device AGG1 "AGG1.END”.
  • Step 602 the second packet sent by the edge device ACC1 based on the second segment list.
  • the edge device ACC1 sends a second packet to the network device AGG1 based on the segment identifier "AGG1.END” included in the second IP header.
  • the network device AGG1 receives the second packet, reads the next segment identifier "P1.END” after the segment identifier "AGG1.END” from the second segment list included in the second packet, and stores the segment identifier "P1.END” included in the second IP header.
  • the segment identifier "AGG1.END” is replaced with the read segment identifier "P1.END”, and the second packet is sent to the network device P1 based on the segment identifier "P1.END” included in the second IP header.
  • the network device P1 receives the second packet, reads the next segment identifier "MC1.BSID” after the segment identifier "P1.END” from the second segment list included in the second packet, and stores the segment identifier "MC1.BSID” included in the second IP header.
  • the segment identifier "P1.END” is replaced with the read segment identifier "MC1.BSID”, and the second packet is sent to the network device MC1 based on the segment identifier "MC1.BSID" included in the second IP header.
  • the network device MC1 is the start node of the first path 1, so the border device MC1 will perform the following step 603.
  • Step 603 The border device MC1 receives the second packet, adds a layer of packet headers to the second packet to obtain the first packet 1, the layer of packet headers includes the first SRH, and the first SRH includes the first segment list 1.
  • the border device MC1 receives the second message, reads the next segment identifier "MC3.BSID” after the segment identifier "MC1.BSID” from the second segment list included in the second message, and stores the first segment identifier "MC3.BSID”.
  • the segment identifier "MC1.BSID” included in the second IP header is replaced with the read segment identifier "MC3.BSID”.
  • a layer of packet header is added to the second packet, and the layer of packet header includes the first SRH, the first SRH
  • the first segment list 1 is included, and the first segment list 1 included in the first SRH is the first segment list corresponding to the segment identifier "MC1.BSID" of the border device MC1.
  • the one-layer packet header further includes a first IP header, the first IP header includes a source address field and a destination address field, the source address field includes the loopback address "MC1.Lo" of the border device MC1, and the destination address field includes the first segment
  • the first segment in Listing 1 identifies "P3.EndX”.
  • the header of the first packet 1 includes an inner packet header and an outer packet header, and the inner packet header is located between the payload of the first packet 1 and the outer packet header, and the inner packet header is located between the payload of the first packet 1 and the outer packet header.
  • the layer header includes the second SRH and the second IP header, and the outer header includes the first SRH and the first IP header.
  • the outer packet of the first packet further includes the first HBH
  • the first HBH includes the identifier of the first network segment
  • the first segment list included in the first SRH includes the first segment list.
  • the first path indicated by the segment list is the path in the first network segment.
  • the inner header of the first packet further includes a second HBH
  • the second HBH includes the identifier of the second network fragment.
  • the second path indicated by the second segment list is: Path in the second network shard.
  • the identifier of the first network fragment and the identifier of the second network fragment are also service identifiers.
  • Step 604 The border device MC1 sends the first packet 1 based on the first segment list 1 in the first SRH.
  • the first IP header of the first packet 1 includes the first segment identifier "P3.EndX" in the first segment list, and the border device MC1 sends the network to the network based on the segment identifier "P3.EndX".
  • Device P3 sends the first packet.
  • the network device P3 receives the first packet 1, reads the next segment identifier "P5.EndX” after the segment identifier "P3.EndX” from the first segment list included in the first packet 1, and converts the first IP header The included segment identifier "P3.EndX” is replaced with the read segment identifier "P5.EndX”, and the first packet 1 is sent to the network device P5 based on the segment identifier "P5.EndX" included in the first IP header.
  • the network device P5 receives the first packet 1, reads the next segment identifier "MC3.End” after the segment identifier "P5.EndX” from the first segment list included in the first packet 1, and converts the first IP header The included segment identifier "P5.EndX” is replaced with the read segment identifier "MC3.End”, and the first packet 1 is sent to the border device MC3 based on the segment identifier "MC3.End” included in the first IP header.
  • Step 605 The border device MC3 receives the first packet 1, replaces the outer packet header of the first packet 1, and obtains the first packet 2.
  • the outer packet header of the first packet 2 includes the same value as that of the border device MC3.
  • the first segment list 2 corresponding to the segment identifier "MC3.BSID".
  • the boundary device MC3 receives the first packet 1. Since "MC3.End” in the first IP header is the last segment identifier in the first segment list 2, the outer layer of the first packet 1 is removed. header to get the second message. The next segment identifier "ACC2.End” located after the segment identifier "MC3.BSID” is read from the second segment list included in the second message. Replace the segment identifier "MC3.BSID” included in the second IP header with the read segment identifier "ACC2.End”.
  • a layer of packet header is added to the second packet, and the layer of packet header includes the first SRH, the first SRH
  • the first segment list 2 is included, and the first segment list 2 included in the first SRH is the first segment list 2 corresponding to the segment identifier "MC3.BSID" of the border device MC3.
  • the one-layer packet header further includes a first IP header, the first IP header includes a source address field and a destination address field, the source address field includes the loopback address "MC3.Lo" of the border device MC3, and the destination address field includes the first segment
  • the first segment in Listing 2 identifies "P7.END".
  • Step 606 The border device MC3 sends the first packet 2 based on the first segment list 2 in the first SRH.
  • the first IP header of the first packet 2 includes the first segment identifier "P7.END” in the first segment list, and the border device MC3 sends the network to the network based on the segment identifier "P7.END”
  • the device P7 sends the first packet 2.
  • the network device P7 receives the first packet 2, reads the next segment identifier "AGG2.END” after the segment identifier "P7.END” from the first segment list 2 included in the first packet 2, and converts the first IP
  • the segment identifier "P7.END” included in the header is replaced with the read segment identifier "AGG2.END”, and the first packet 2 is sent to the network device AGG2 based on the segment identifier "AGG2.END” included in the first IP header.
  • the network device AGG2 receives the first packet 2, reads the next segment identifier "ACC2.END” after the segment identifier "AGG2.END” from the first segment list 2 included in the first packet 2, and converts the first IP
  • the segment identifier "AGG2.END” included in the header is replaced with the read segment identifier "ACC2.END”, and the first packet 2 is sent to the border device ACC2 based on the segment identifier "ACC2.END” included in the first IP header.
  • Step 607 The border device ACC2 receives the first packet 2, removes the outer packet in the first packet 2 to obtain the second packet, and removes the inner packet header of the second packet to obtain the service packet, and sends the service packet to the first packet.
  • the second CPE sends the service packet.
  • the boundary device ACC2 receives the first packet 2. Since "ACC2.END” is the last segment identifier in the first segment list 2, the outer packet in the first packet 2 is removed to obtain the second packet.
  • the second IP header of the message includes the segment identifier "ACC2.End”.
  • the next segment identifier "ACC2.VPN SID” after the segment identifier "ACC2.End” is read from the second segment list included in the second packet, and "ACC2.VPN SID” is used to indicate the connection with the border device ACC2.
  • the outgoing interface of the second CPE communication Remove the header of the second packet to obtain the service packet, and send the service packet to the second CPE based on the outbound interface indicated by "ACC2.VPN SID".
  • the network device is referred to as the first device, and for the first segment list used to indicate the first path, the first segment list Including M segment identifiers.
  • the first device obtains the next segment identifier after the first segment identifier from the first segment list included in the first packet as the second segment identifier, and the first segment identifier is the first device segment ID.
  • the first device adopts the midpoint TI-LFA technology to send the first message.
  • the process of sending the first packet by the first device using the midpoint TI-LFA technology is as follows:
  • the first device obtains the next segment identifier after the second segment identifier from the first segment list as the third segment identifier, and calculates the The third segment identifies the path between the corresponding devices, and sends the first packet to the device corresponding to the third segment identifier through the calculated path.
  • the first device When the second segment identifier is the last segment identifier in the first segment list, the first device removes the outer header of the first packet to obtain a second packet, and the second IP header of the second packet includes the first Four segment identification.
  • the next segment identifier after the fourth segment identifier is read from the second segment list of the second packet as the fifth segment identifier.
  • the path between the first device and the device corresponding to the fifth segment identifier is calculated, and the second packet is sent to the device corresponding to the fifth segment identifier through the calculated path.
  • the network device P3 receives the first packet 1, and obtains the segment identifier “P3.EndX” after the segment identifier “P3.EndX” from the first segment list 1 included in the first packet 1.
  • the next segment identifier "P5.EndX” is used as the second segment identifier.
  • the network device P3 obtains the next segment after the second segment identifier "P5.EndX” from the first segment list 1
  • the identifier "MC3.End” is used as the third segment identifier, and the path from the network device P3 to the network device MC3 corresponding to the third segment identifier "MC3.End” is calculated, and the first packet 1 is sent to the network device MC3 through the calculated path.
  • the network device P3 removes the outer header of the first packet 1 to obtain the second packet
  • the second IP header of the second packet includes the fourth segment identifier "MC3.BSID”.
  • the next segment identifier after the fourth segment identifier "MC3.BSID” is read from the second segment list of the second message as the fifth segment identifier, and the fifth segment identifier is "ACC2.END”.
  • Calculate the path between the first device and the edge device ACC2 corresponding to the fifth segment identifier "ACC2.END” and send the second packet to the edge device ACC2 through the calculated path.
  • the network device P5 receives the first packet 1, and obtains the next segment identifier "MC3" after the segment identifier "P5.EndX” from the first segment list 1 included in the first packet 1 .End" as the second segment identifier.
  • the network device P5 removes the outer header of the first packet 1 to obtain a second packet.
  • the second IP header includes the fourth segment identification "MC3.BSID”.
  • a certain segment identifier in the first segment list may also be the BSID of a certain device.
  • the device may also add a layer of packet headers to the first packet, so that the added first packet includes an outer layer of packets headers and multi-layer inner headers.
  • the process of adding a layer of packet header to the first packet by the device reference may be made to the process of adding a packet header by the border device MC1 or MC3, which will not be described in detail here.
  • the outer header of the first packet includes the identifier of the first network fragment, and when the identifier of the second segment is the last segment identifier in the first segment list, the first device cannot remove the identifier of the first segment.
  • the outer packet header of the first packet obtains the second packet, and the fifth segment identifier cannot be read from the second segment list of the second packet. The reason is that the path between the first device calculated by the first device and the device corresponding to the fifth segment identifier may not be in the first network segment, so when the second segment identifier is the last segment identifier in the first segment list , you cannot use the inner header to send the message.
  • the device may also need to obtain user information from the packet, where the user information includes quintuple information of the packet.
  • the device when the packet is the above-mentioned second packet, the device skips a layer of the packet header of the second packet, and obtains the user information from the payload of the second packet.
  • the device When the packet is the above-mentioned first packet, the device skips a layer header of the first packet, and obtains the user information from the inner packet header of the first packet. There is only network information in the inner packet header, but no user information, which causes the device to obtain errors.
  • the first path is faulty, so that the device on the first path cannot send the first packet to the downstream device.
  • the last segment included in the first segment list of the first packet is identified as the VPN SID, and the device may not be able to use the midpoint TI-LFA technology to send the first packet.
  • the first path is faulty, so that the device on the first path cannot send the first packet to the downstream device.
  • the last segment identifier included in the first segment list of the first packet is the segment identifier, and the device can use the midpoint TI-LFA technology to send the first packet.
  • the device is in many network conditions, which may cause the device to not know how to process the packet when it receives it. For example, if the device reads user information from the packet, it may read incorrectly.
  • the device may be able to use the midpoint TI-LFA technology to send the first packet, or it may not be able to use the midpoint TI-LFA technology to send the first packet. first message.
  • any of the following embodiments can be adopted to solve it.
  • an embodiment of the present application provides a method 900 for processing packets.
  • the method 900 may be applied to the network architecture 100 shown in FIG. 1 , FIG. 3 , or FIG.
  • the network architecture 500 shown in FIG. 7 or FIG. 8 includes:
  • Step 901 The first device obtains a first packet, the packet header of the first packet includes an inner packet header and an outer packet header, and the inner packet header is located in the payload of the first packet and the outer packet header.
  • the outer header includes the first identifier and the first segment list
  • the inner header includes the second segment list
  • the first segment list is used to indicate the first path
  • the second segment list is used to indicate the first segment list.
  • There are two paths, the first path and the second path are used to forward the first packet, and the first identifier is used to identify whether the outer packet header includes a service identifier.
  • the outer packet header of the first packet includes a first SRH and a first IP header, and the first SRH includes a first identifier and a first segment list.
  • the first IP header includes the first destination address, and the first segment list includes the first destination address, that is, the first destination address is a segment identifier in the first segment list.
  • the inner header of the first packet includes a second SRH and a second IP header
  • the second SRH includes a second segment list
  • the second IP header includes a second destination address
  • the second segment list includes the second destination address, that is,
  • the second destination address is a segment identifier in the second segment list, and the first path can reach the second destination address.
  • the first segment list includes service identifiers, or the first segment list does not include service identifiers.
  • the service identifier is a service segment identifier, and the first identifier is used to identify whether the first segment list includes the service segment identifier.
  • the service segment identifier includes the VPN SID and the like.
  • the outer packet header further includes an identifier of the first network segment.
  • the outer packet header further includes the first HBH, and the first HBH includes the identifier of the first network segment.
  • the identifier of the first network segment is also a service identifier.
  • the outer layer packet header includes the service identifier including the service segment identifier in the first segment list and/or the identifier of the first network fragment in the first HBH.
  • the first identifier is used to identify the outer layer packet.
  • the header includes the business ID.
  • the first device can obtain the first packet in the following two ways, and the two ways are:
  • the first device receives the second packet, and the packet header of the second packet includes the inner packet header; and the outer packet header including the first identifier is added to the second packet to obtain the first packet.
  • the first device When applied to the network architecture 100 shown in FIG. 1 , FIG. 3 or FIG. 4 , the first device is a border device of the second operator’s network, and the second destination address included in the second IP header of the second packet is a certain
  • the segment identifier corresponding to the device, the segment identifier is the segment identifier in the second segment list of the second packet, and the segment identifier includes the End.B6.Encaps identifier.
  • the first device includes at least one first segment list corresponding to the segment identifier.
  • the first device receives the second packet, obtains the segment identifier from the second IP header of the second packet, and obtains at least one first device corresponding to the segment identifier based on the indication of the End.B6.Encaps identifier in the segment identifier.
  • a segment list, select a first segment list, and the last segment identifier in the selected first segment list is the service segment identifier (VPN SID).
  • An outer-layer packet header including a first identifier is added to the second packet, and the first SRH of the outer-layer packet header includes the selected first segment list and a first identifier, and the first identifier is used to identify the outer-layer packet
  • the header includes the business identification.
  • the first device may be a border device MC1 in the network architecture 100 , and the first device MC1 is a border device of the second operator network.
  • the first device MC1 receives the second message, the inner header of the second message includes the second SRH and the second IP header, and the second destination address in the second IP header is the segment identifier "P7. END".
  • the first device MC1 selects the first segment list 1 and the first segment list 2 corresponding to the segment identifier "P7.END” based on the indication of the END.B6.Encaps identifier in the segment identifier "P7.END”. Segment list 1.
  • the outer packet header includes the first SRH and the first IP header
  • the first SRH includes the first segment list 1 and the first identifier
  • the first segment list 1 includes the network device
  • the segment identifier "P3.EndX" of P3 the segment identifier "P5.EndX” of the network device P5, the segment identifier "MC3.End” of the border device, and the service segment identifier "MC3.VPN SID”.
  • the first identifier included in the outer-layer packet header is used to identify that the outer-layer packet header includes a service identifier.
  • the first device is the start node of the first path
  • the second destination address included in the second IP header of the second packet is the first device
  • the corresponding segment identifier, the segment identifier corresponding to the first device is the segment identifier in the second segment list of the second packet, and the segment identifier corresponding to the first device includes the End.B6.Encaps identifier.
  • the first device receives the second packet, reads the next segment identifier after the segment identifier corresponding to the first device from the second segment list of the second packet, and stores the first segment identifier included in the second IP header of the second packet.
  • the second destination address is replaced with the read segment ID.
  • the first device includes a first segment list corresponding to the segment identifier of the first device, the first segment list does not include a service identifier, reads the End.B6.Encaps identifier from the segment identifier corresponding to the first device, and based on the End.B6.Encaps identifier .B6.
  • the indication of the Encaps flag adding an outer packet header including the first flag to the second packet.
  • the first SRH of the outer layer packet header includes the first segment list and a first identifier, where the first identifier is used to identify that the outer layer packet header does not include a service identifier.
  • the first device may be the border device MC1 of the first routing area and the second routing area.
  • the first device MC1 receives the second packet, the inner packet header of the second packet includes the second SRH and the second IP header, and the second destination address in the second IP header is the segment identifier "MC1" of the first device MC1. .BSID".
  • the first device MC1 includes a first segment list 1 corresponding to the segment identifier "MC1.BSID", and the first segment list 1 includes the segment identifier "P3.EndX” of the network device P3 and the segment identifier "P5.EndX” of the network device P5. EndX” and the segment identifier "MC3.End” of the boundary device.
  • an outer packet header is added to the second packet, and the outer packet header includes the first SRH and the first IP header.
  • An SRH includes a first segment list 1 and a first identifier. In this case, the first identifier included in the outer-layer packet header is used to identify that the outer-layer packet header includes a service identifier.
  • the outer-layer packet header may also include the first HBH, and the first HBH includes the identifier of the first network fragment.
  • the first identifier in the outer-layer packet header is used to identify that the outer-layer packet header includes business identity.
  • the outer-layer packet header further includes the first HBH, and the first HBH includes the identifier of the first network fragment.
  • the first identifier in the outer-layer packet header is used to identify that the outer-layer packet header includes business identity.
  • the first identifier when the value of the first identifier is the first value, the first identifier is used to identify that the outer packet header includes the service identifier; when the value of the first identifier is the second value, the first identifier An identifier is used to identify that the outer packet header does not include the service identifier.
  • the target field of the outer packet header includes a first identifier, and the target field includes a type length value (type length value, TLV), a flag (Flags) or a tag (Tag) of the outer packet header.
  • the target field is a field in the first SRH.
  • the target field includes the first and/or second bits in Flags or TLV, etc.
  • the value of the first bit and/or the second bit is 1, indicating the value of the first flag is the first value.
  • the value of the first bit and/or the second bit is 0, indicating that the value of the first identifier is the second value. Or, if the target field is Tag, the first value is 1 or 2, and the second value is 0, etc.
  • the default value of the target field is different from the first value, so the value of the first identifier in the target field is the first value, which can indicate that the target field includes the first identifier, and the first identifier is used to identify the outer report.
  • the header does not include the business identifier.
  • the first identifier is further used to identify the type of service information included in the inner packet header.
  • the service information type included in the inner-layer packet header may be one or more of user information, inner-layer network path, and network fragmentation information.
  • the inner packet header of the first packet further includes a second identifier, and the second identifier is used to identify the service information type of the inner packet header.
  • the service information type is network information.
  • the first device receives the first packet.
  • the first device includes a network device P3 or a network device P5 or the like. Assuming that the first device is the network device P5, the first device P5 receives the first packet sent by the network device P3.
  • At least one other packet header is further included between the inner layer packet header and the payload of the first packet.
  • Step 902 The first device sends the first packet, so that the device receiving the first packet processes the first packet based on the first identifier.
  • step 902 in the case where the first device obtains the first packet through the above-mentioned first manner, the first device sends the first packet based on the first segment identifier included in the first segment list.
  • the first device reads the next segment identifier located after the segment identifier of the first device from the first segment list, and sends the first segment identifier based on the read segment identifier. a message.
  • the first identifier is used to identify whether the outer header includes the service identifier, so that the first identifier is used for receiving the first packet.
  • the device can determine whether the outer header of the first packet includes a service identifier based on the first identifier, and process the first packet in a corresponding processing manner based on the determined result. Therefore, the first identifier can be used to instruct the device to process the first packet, thereby avoiding errors when the device processes the packet.
  • an embodiment of the present application provides a method 1000 for processing packets.
  • the method 1000 may be applied to the network architecture 100 shown in FIG. 1 , FIG. 3 , or FIG.
  • the network architecture 500 shown in FIG. 7 or FIG. 8 includes:
  • Step 1001 The first device receives the first packet, the packet header of the first packet includes the inner packet header and the outer packet header, and the inner packet header is located in the payload of the first packet and the outer packet header. Between the headers, the outer header includes the first identifier and the first segment list, the inner header includes the second segment list, the first segment list is used to indicate the first path, and the second segment list is used to indicate the first segment list. There are two paths, the first path and the second path are used to forward the first packet, and the first identifier is used to identify whether the outer packet header includes a service identifier.
  • the outer packet header of the first packet includes a first SRH and a first IP header, and the first SRH includes a first identifier and a first segment list.
  • the first IP header includes the first destination address, and the first segment list includes the first destination address, that is, the first destination address is a segment identifier in the first segment list.
  • the inner header of the first packet includes the second SRH and the second IP header, the second SRH includes the second segment list, the second IP header includes the second destination address, and the second segment list includes the second destination address, that is, The second destination address is a segment identifier in the second segment list, and the first path can reach the second destination address.
  • the first segment list includes service identifiers, or the first segment list does not include service identifiers.
  • the service identifier is the service segment identifier, and the first identifier is used to identify whether the outer packet header includes the service identifier.
  • the outer packet header includes an identifier of the first network fragment, and the identifier of the first network fragment is also a service identifier.
  • the first identifier is used to identify that the outer packet header includes a service identifier.
  • Step 1002 The first device processes the first packet based on the first identifier.
  • step 1002 the manner in which the first device processes the first packet includes such manners as sending the first packet and/or reading user information from the first packet.
  • the first device determines whether the first identifier is used to identify whether the outer packet header includes a service identifier; when determining that the service identifier is not included, based on the inner layer packet The header sends the first message.
  • the outer header of the first packet does not include a service identifier
  • the first identifier in the outer header is used to identify that the outer header does not include a service identifier.
  • the first device sends the first packet based on the inner packet header and adopts the midpoint TI-LFA technology.
  • the process of sending the first packet is as follows: the first IP header of the first packet includes the segment identifier of the first device, and after receiving the first packet, the first device reads from the first segment list of the first packet Take the next segment ID after the segment ID.
  • the path between the first device and the device corresponding to the read segment identifier is faulty (that is, the first path is faulty)
  • the read segment identifier is the last segment identifier of the first segment list
  • the first device is based on the first segment identifier.
  • An identifier determines whether the outer packet header of the first packet includes a service identifier, and when it is determined that the service identifier is not included, the first packet is sent based on the inner packet header.
  • the first device continues to read the next segment identifier from the first segment list, and calculates the distance between the first device and the device corresponding to the read segment identifier. path, and send the first packet based on the calculated path. Wherein, if the calculated path is still faulty, the first device continues to read the next segment identifier from the first segment list, and calculates the path from the first device to the device corresponding to the read segment identifier.
  • the operation of sending the first packet based on the inner packet header is: the first device reads the first segment identifier from the second segment list, where the first segment identifier is located in the second segment list. After the segment identifier of the second device, the first path can reach the second device; the first device sends the first packet based on the first segment identifier.
  • the second IP header of the inner packet header includes the second destination address
  • the second destination address is the segment identifier in the second segment list in the inner packet header, which is reachable by the first path Segment ID of the second device.
  • the first device removes the outer header of the first packet to obtain the second packet, reads the next segment identifier after the second destination address from the second segment list, and the read segment identifier is the first segment ID, and send the second message based on the read segment ID.
  • the first device P5 receives the first packet, and the first IP header of the first packet includes the segment identifier "P5.EndX" of the first device P5.
  • the first IP header of the first packet includes the segment identifier "P5.EndX" of the first device P5.
  • the next segment identifier "MC3.End” after the segment identifier "P5.EndX” is read. If the path from the first device P5 to the device MC3 corresponding to the segment identifier "MC3.End" is faulty, the first device P5 determines based on the first identifier that the outer header of the first packet does not include the service identifier. The outer packet header is removed to obtain the second packet.
  • the second IP header in the inner header of the second packet includes the segment identifier "MC3.BSID”, and the segment identifier "MC3.BSID” is the segment identifier of the second device that can be reached by the first path, that is, the boundary device MC3 for the second device.
  • the last segment identifier of the first segment list of the first packet is a service segment identifier (VPN SID), and the first identifier in the outer packet header is used to identify The outer packet header includes a service packet.
  • the first path fails, if the segment identifier not executed in the first segment list is the service segment identifier (VPN SID), the first device discards the first packet.
  • the starting node of the first path uses virtual private network fast re-route (VPN FRR) technology to send the message
  • the sending process can be as follows: the starting node of the first path will detect the first A path is faulty, and re-add the outer header to the second packet to obtain a third packet, the outer header includes the other first segment list, and then send the third packet based on the other first segment list arts.
  • VPN FRR virtual private network fast re-route
  • the first device is a network device P5
  • the first packet received by the first device P5 includes the first segment list 1
  • the first device P5 is the device corresponding to the segment identifier MC3.End"
  • the last segment identifier "MC3.VPN SID" of the first segment list 1 is not executed, then the first device P5 discards the first message.
  • border device MC1 adopts VPN FRR technology to send message.That is to say: border device MC1 will detect the first path failure, and add outer layer message on the second message again
  • the header obtains the third packet, and the outer packet header includes other first segment lists, that is, including the first segment list 2, and then sends the third packet based on the first segment list 2.
  • the outer header of the first packet may further include the first HBH, and the first HBH includes the identifier of the first network fragment.
  • the first identifier in the layer header is used to identify that the outer layer header includes a service message.
  • the first device discards the first packet when it is determined based on the first identifier that the outer layer packet header includes a service identifier.
  • the first device For reading user information from the first packet, when the first device determines based on the first identifier that the outer header of the first packet does not include the service identifier, the first device obtains the first packet from the payload of the first packet. User information corresponding to a packet.
  • the service identifier includes the VPN SID, and the user information includes quintuple information of the first packet.
  • the first packet is obtained by adding an outer-layer packet header including the first identifier to the second packet. Therefore, when the first device detects that the outer-layer packet header includes the first identifier, it can determine the header of the first packet.
  • the message header includes an outer-layer message header and an inner-layer message header, and the message header where the first identifier is located is the outer-layer message header.
  • the first identifier is used to identify that the outer packet header does not include the service identifier, indicating that the outer packet header does not include the identifier of the first network segment or the last segment identifier of the first segment list is not the service segment identifier (VPN SID), so that the first device can skip the outer header and inner header of the first packet, and obtain user information from the payload of the first packet.
  • VPN SID service segment identifier
  • the value of the first identifier is the first value, indicating that the first identifier is used to indicate that the outer packet header does not include the service identifier.
  • the first SRH in the outer packet header includes a target field, and the target field carries the first identifier.
  • the first value is different from the default value of the target field. Therefore, when detecting that the value of the target field is the first identifier, the first device determines that the target field includes the first identifier, that is, detects that the outer packet header includes the first identifier. an identification.
  • the inner packet header of the first packet further includes a second identifier, and the second identifier is used to indicate a service information type of the inner layer packet header, where the service information type is network information. Therefore, after skipping the outer header of the first packet, the first device determines, based on the second identifier in the inner header, that the service information type in the inner header is network information, and continues to pass by. The inner packet header of the first packet obtains user information from the payload of the first packet.
  • the first identifier is used to identify whether the outer header includes the service identifier, so the first device can The first identifier determines whether the outer header of the first packet includes a service identifier, and based on the determined result, a corresponding processing method is adopted to process the first packet, for example, obtaining user information from the payload of the first packet, or using Midpont TI-FLA technology sends the first message. Therefore, the first identifier can be used to instruct the manner in which the first device processes the first packet, thereby avoiding errors when the first device processes the first packet.
  • an embodiment of the present application provides an apparatus 1100 for processing packets, where the apparatus 1100 is deployed on the border device MC1 in the embodiment shown in FIG. 1-4 , and the embodiment shown in FIG. 5-8 On the boundary device MC1 or MC2 in the , or, on the first device in the method 900 as shown in FIG. 9 , including:
  • the processing unit 1101 is configured to obtain a first packet, the packet header of the first packet includes an inner packet header and an outer packet header, and the inner packet header is located in the payload of the first packet and the outer packet header. Between the headers, the outer header includes the first identifier and the first segment list, the inner header includes the second segment list, the first segment list is used to indicate the first path, and the second segment list is used to indicate the first segment list. Two paths, the first path and the second path are used to forward the first packet, and the first identifier is used to identify whether the outer packet header includes a service identifier;
  • a sending unit 1102 configured to send a first packet, so that the first packet is processed based on the first identifier.
  • step 901 of the method 900 shown in FIG. 9, which will not be described in detail here.
  • step 902 of the method 900 shown in FIG. 9, which will not be described in detail here.
  • the outer packet header includes the first segment route SRH, and the first SRH includes the first identifier and the first segment list.
  • the outer packet header further includes a first IP header, the first IP header includes the first destination address, and the first segment list includes the first destination address.
  • the inner packet header includes the second SRH and the second IP header
  • the second SRH includes the second segment list
  • the second IP header includes the second destination address
  • the second segment list includes the second destination address
  • the first segment list includes the second destination address.
  • the path can reach the second destination address.
  • the second destination address is a segment identifier SID of the second device included in the second segment list
  • the first path is a path to the second device.
  • the service identifier includes a service segment identifier
  • the first identifier is used to identify whether the first segment list includes a service segment identifier.
  • the service identifier includes an identifier of a network fragment.
  • the first identifier when the value of the first identifier is the first value, the first identifier is used to identify that the outer packet header includes the service identifier; when the value of the first identifier is the second value, the first identifier Used to identify that the outer header does not include the service identifier.
  • the target field of the outer packet header includes the first identifier, and the target field includes the type-length value TLV of the outer packet header, the flags, or the label Tag.
  • the apparatus 1100 further includes: a receiving unit 1103,
  • a receiving unit 1103, configured to receive a second packet, where the packet header of the second packet includes an inner layer packet header;
  • the processing unit 1101 is configured to add an outer packet header including the first identifier to the second packet to obtain the first packet.
  • the receiving unit 1103 receiving the second packet reference may be made to the relevant content in step 901 of the method 900 shown in FIG. 9 , which will not be described in detail here.
  • the detailed implementation of the processing unit 1101 adding the outer layer header including the first identifier to the second packet may refer to the relevant content in step 901 of the method 900 shown in FIG. 9 , and details will not be described here. .
  • the inner packet header includes a second segment list, and the second segment list includes a segment identifier corresponding to the device 1100, and the segment identifier corresponding to the device 1100 includes an End.B6.Encaps identifier;
  • the processing unit 1101 is configured to add an outer packet header including the first identifier to the second packet according to the indication of the End.B6.Encaps identifier.
  • the detailed implementation of the processing unit 1101 adding the outer layer header including the first identifier to the second packet may refer to the relevant content in step 901 of the method 900 shown in FIG. 9 , and details will not be described here. .
  • the inner-layer packet header includes a second identifier, and the second identifier is used to identify the type of service information included in the inner-layer packet header.
  • At least one other packet header is further included between the inner-layer packet header and the payload of the first packet.
  • the first identifier is used to identify whether the outer header includes the service identifier, so the sending unit sends the first packet
  • the device may determine whether the outer header of the first message includes a service identifier based on the first identifier, and take corresponding processing methods to process the first message based on the determined result. Therefore, the first identifier can be used to instruct the device to process the first packet, thereby avoiding errors when the device processes the packet.
  • an embodiment of the present application provides an apparatus 1200 for processing packets, and the apparatus 1200 is deployed on the network device P3 or P5 in the embodiment shown in FIG. 1-4 , etc., as shown in FIG. 5-8
  • Devices such as network devices P3, P5, P7, or AGG1 in the illustrated embodiment, or, on the first device in the method 1000 shown in FIG. 10, include:
  • the receiving unit 1201 is configured to receive a first packet, the packet header of the first packet includes an inner packet header and an outer packet header, and the inner packet header is located in the payload of the first packet and the outer packet header. Between the headers, the outer header includes the first identifier and the first segment list, the inner header includes the second segment list, the first segment list is used to indicate the first path, and the second segment list is used to indicate the first segment list. Two paths, the first path and the second path are used to forward the first packet, and the first identifier is used to identify whether the outer packet header includes a service identifier;
  • the processing unit 1202 is configured to process the first packet based on the first identifier.
  • the apparatus 1200 further includes a sending unit 1203,
  • a processing unit 1202 configured to determine whether the first identifier is used to identify whether the outer packet header includes a service identifier when the first path fails;
  • the sending unit 1202 is configured to send the first packet based on the inner packet header when it is determined that the service identifier is not included.
  • the processing unit 1202 determines whether to include the detailed implementation of the service identifier, and reference may be made to the relevant content in step 1002 of the method 1000 shown in FIG. 10 , which will not be described in detail here.
  • step 1002 of the method 1000 shown in FIG. 10 which will not be described in detail here.
  • the service identifier includes one or more of a service segment identifier and a network fragment identifier.
  • the processing unit 1202 is configured to read the first segment identifier from the second segment list.
  • the first segment identifier is located after the segment identifier of the second device, and the first path can reach the second segment identifier. equipment;
  • the sending unit 1203 is configured to send the first packet based on the first segment identifier.
  • the sending unit 1203 sending the first packet based on the first segment identifier
  • the processing unit 1202 is configured to acquire user information corresponding to the first packet from the payload of the first packet when it is determined based on the first identifier that the outer layer packet header does not include the service identifier.
  • step 1002 of the method 1000 shown in FIG. 10 which will not be described in detail here.
  • the service identifier includes a VPN SID
  • the user information includes quintuple information of the first packet.
  • the processing unit 1202 is configured to, when the first path fails, determine whether the first identifier is used to identify whether the outer layer packet header includes a service identifier; when it is determined that the service identifier is included, discard the first packet.
  • the outer packet header includes the first segment route SRH, and the first SRH includes the first identifier and the first segment list.
  • the outer packet header further includes a first IP header, the first IP header includes the first destination address, and the first segment list includes the first destination address.
  • the inner packet header includes the second SRH and the second IP header
  • the second SRH includes the second segment list
  • the second IP header includes the second destination address
  • the second segment list includes the second destination address
  • the first segment list includes the second destination address.
  • the path can reach the second destination address.
  • the target field of the outer packet header includes the first identifier, and the target field includes the type-length value TLV of the outer packet header, the flags, or the label Tag.
  • the first identifier is used to identify whether the outer header includes the service identifier, so that the processing unit can be based on the first identifier.
  • the identifier determines whether the outer packet header of the first packet includes a service identifier, and adopts a corresponding processing manner to process the first packet based on the determined result. Therefore, the first identifier can be used to instruct the processing unit to process the first packet, thereby avoiding errors when the processing unit processes the first packet.
  • an embodiment of the present application provides a schematic diagram of an apparatus 1300 for processing packets.
  • the apparatus 1300 may be the border device MC1 in the embodiment shown in FIG. 1-4 , the border device MC1 or MC2 in the embodiment shown in FIG. 5-8 , or the first step in the method 900 shown in FIG. 9 .
  • a device The apparatus 1300 includes at least one processor 1301, internal connections 1302, memory 1303 and at least one transceiver 1304.
  • the apparatus 1300 is an apparatus with a hardware structure, and can be used to implement the functional modules in the apparatus 1100 described in FIG. 11 .
  • the processing unit 1101 in the apparatus 1100 shown in FIG. 11 can be implemented by calling the code in the memory 1303 by the at least one processor 1301, and the sending unit 1102 and the sending unit 1102 in the apparatus 1100 shown in FIG.
  • the receiving unit 1103 may be implemented by the at least one transceiver 1304 .
  • the apparatus 1300 may also be used to implement the function of the first device in any of the foregoing embodiments.
  • the processor 1301 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or A plurality of integrated circuits used to control the execution of the programs of the present application.
  • CPU general-purpose central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connections 1302 described above may include a path to transfer information between the aforementioned components.
  • the internal connection 1302 may be a single board or a bus or the like.
  • the above-mentioned at least one transceiver 1304 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 1303 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Types of dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 1303 is used for storing the application code for executing the solution of the present application, and the execution is controlled by the processor 1301 .
  • the processor 1301 is configured to execute the application program code stored in the memory 1303, and cooperate with at least one transceiver 1304, so that the apparatus 1300 realizes the functions in the method of the present patent.
  • the processor 1301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 13 .
  • the apparatus 1300 may include multiple processors, such as the processor 1301 and the processor 1307 in FIG. 13 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • an embodiment of the present application provides a schematic diagram of an apparatus 1400 for processing packets.
  • the apparatus 1400 may be the network device P3 or P5 in the embodiment shown in FIGS. 1-4 , the network device P3, P5, P7 or AGG1 in the embodiment shown in FIG. 5-8 , or, as shown in FIG. 10 .
  • the first device in the method 1000 is shown.
  • the apparatus 1400 includes at least one processor 1401 , internal connections 1402 , memory 1403 and at least one transceiver 1404 .
  • the apparatus 1400 is an apparatus with a hardware structure, and can be used to implement the functional modules in the apparatus 1200 described in FIG. 12 .
  • the processing unit 1202 in the apparatus 1200 shown in FIG. 12 can be implemented by calling the code in the memory 1403 by the at least one processor 1401, and the sending unit 1203 and the sending unit 1203 in the apparatus 1200 shown in FIG.
  • the receiving unit 1201 may be implemented by the at least one transceiver 1404 .
  • the apparatus 1400 may also be used to implement the function of the first device in any of the foregoing embodiments.
  • the above-mentioned processor 1401 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or A plurality of integrated circuits used to control the execution of the programs of the present application.
  • CPU central processing unit
  • NP network processor
  • ASIC application-specific integrated circuit
  • the internal connections 1402 described above may include a path to transfer information between the aforementioned components.
  • the internal connection 1402 can be a single board or a bus or the like.
  • the above-mentioned at least one transceiver 1404 is used to communicate with other devices or communication networks.
  • the above-mentioned memory 1403 can be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types of storage devices that can store information and instructions.
  • types of dynamic storage devices which can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), or other optical storage, CD-ROM storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory can exist independently and be connected to the processor through a bus.
  • the memory can also be integrated with the processor.
  • the memory 1403 is used for storing the application code for executing the solution of the present application, and the execution is controlled by the processor 1401 .
  • the processor 1401 is configured to execute the application program code stored in the memory 1403, and cooperate with at least one transceiver 1404, so that the apparatus 1400 realizes the functions in the method of the present patent.
  • the processor 1401 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 14 .
  • the apparatus 1400 may include multiple processors, such as the processor 1401 and the processor 1407 in FIG. 14 .
  • processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • FIG. 15 shows a schematic structural diagram of a device 1500 provided by an exemplary embodiment of the present application.
  • the device 1500 is configured as a border device MC1 in the embodiment shown in FIGS. 1-4, as shown in FIG.
  • the first device in the method 900 shown in FIG. 9 can be implemented by the device 1500 .
  • the device 1500 is, for example, a network device, for example, the device 1500 is a switch, a router, or the like. As shown in FIG. 15 , the device 1500 includes: a main control board 1501 and an interface board 1502 .
  • the main control board 1501 is also called the main processing unit (main processing unit, MPU) or the route processor card (route processor card). , Equipment maintenance, protocol processing functions.
  • the main control board 1501 includes: a central processing unit 15011 and a memory 15012 .
  • the interface board 1502 is also referred to as a line processing unit (LPU), a line card or a service board.
  • the interface board 1502 is used to provide various service interfaces and realize the forwarding of data packets.
  • the service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc.
  • the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients).
  • the interface board 1502 includes: a central processing unit 15021 , a network processor 15022 , a forwarding table entry memory 15023 and a physical interface card (phsical interface card, PIC) 15024 .
  • the central processing unit 15021 on the interface board 1502 is used to control and manage the interface board 1502 and communicate with the central processing unit 15011 on the main control board 1501 .
  • the network processor 15022 is used to implement packet forwarding processing.
  • the form of the network processor 15022 may be a forwarding chip.
  • the forwarding chip may be a network processor (NP).
  • the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • the network processor 15022 is used to forward the received message based on the forwarding table stored in the forwarding table entry memory 15023.
  • the message is sent to the CPU (eg The central processing unit 15021) processes; if the destination address of the message is not the address of the device 1500, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the destination The outbound interface corresponding to the address.
  • the processing of the uplink message may include: processing of the incoming interface of the message, and forwarding table lookup; the processing of the downlink message may include: forwarding table lookup, and so on.
  • the central processing unit can also perform the function of a forwarding chip, for example, software forwarding is implemented based on a general-purpose CPU, so that a forwarding chip is not required in the interface board.
  • the physical interface card 15023 is used to realize the interconnection function of the physical layer, the original traffic enters the interface board 1502 through this, and the processed packets are sent from the physical interface card 1502 .
  • the physical interface card 15023 is also called a daughter card, which can be installed on the interface board 1502, and is responsible for converting the photoelectric signal into a message, and after checking the validity of the message, it is forwarded to the network processor 15022 for processing.
  • the central processing unit can also perform the functions of the network processor 15022 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 15022 is not required in the physical interface card 15023 .
  • the device 1500 includes multiple interface boards, for example, the device 1500 further includes an interface board 1503 , and the interface board 1503 includes: a central processing unit 15031 , a network processor 15032 , a forwarding table entry storage 15033 and a physical interface card 15034 .
  • the functions and implementation manners of the components in the interface board 1503 are the same as or similar to those of the interface board 1502 , and will not be repeated here.
  • the device 1500 further includes a switch fabric board 1504 .
  • the switch fabric 1504 may also be referred to as a switch fabric unit (switch fabric unit, SFU).
  • SFU switch fabric unit
  • the switch fabric board 1504 is used to complete data exchange between the interface boards.
  • the interface board 1502 and the interface board 1503 can communicate through the switch fabric board 1504 .
  • the main control board 1501 and the interface board 1502 are coupled.
  • the main control board 1501 , the interface board 1502 , the interface board 1503 , and the switch fabric board 1504 are connected to the system backplane through a system bus to achieve intercommunication.
  • an inter-process communication (IPC) channel is established between the main control board 1501 and the interface board 1502, and the main control board 1501 and the interface board 1502 communicate through the IPC channel.
  • IPC inter-process communication
  • the device 1500 includes a control plane and a forwarding plane
  • the control plane includes the main control board 1501 and the central processing unit
  • the forwarding plane includes various components that perform forwarding, such as the forwarding entry memory 15023 , the physical interface card 15024 and the network processor 15022 .
  • the control plane performs functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining the status of devices.
  • the control plane delivers the generated forwarding tables to the forwarding plane.
  • the network processor 15022 based on the The delivered forwarding table is forwarded to the packet received by the physical interface card 15024 by looking up the table.
  • the forwarding table issued by the control plane may be stored in the forwarding table entry storage 15023 .
  • the control plane and forwarding plane may be completely separate and not on the same device.
  • main control boards 1501 there may be one or more main control boards 1501, and when there are multiple pieces, it may include an active main control board and a backup main control board.
  • the device 1500 may have at least one switch fabric board 1504, and the switch fabric board 1504 realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the device 1500 in the distributed architecture are greater than those in the centralized architecture.
  • the form of the device 1500 can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board. At this time, the central processing unit and main control board on the interface board.
  • the central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment).
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • FIG. 16 shows a schematic structural diagram of a device 1600 provided by an exemplary embodiment of the present application.
  • the device 1600 is configured as a network device P3 or P5 in the embodiment shown in FIGS. 1-4, The network device P3, P5, P7 or AGG1 in the embodiment shown in Figures 5-8, or the first device in the method 1000 shown in Figure 10.
  • the second device in the method 20 shown in FIG. 2 can be implemented by the device 1600 .
  • the device 1600 is, for example, a network device, for example, the device 1600 is a switch, a router, or the like. As shown in FIG. 16 , the device 1600 includes: a main control board 1601 and an interface board 1602 .
  • the main control board 1601 is also called the main processing unit (main processing unit, MPU) or the route processor card (route processor card). , Equipment maintenance, protocol processing functions.
  • the main control board 1601 includes: a central processing unit 16011 and a memory 16012 .
  • the interface board 1602 is also referred to as a line processing unit (LPU), a line card or a service board.
  • the interface board 1602 is used to provide various service interfaces and realize data packet forwarding.
  • the service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc.
  • the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients).
  • the interface board 1602 includes: a central processing unit 16021 , a network processor 16022 , a forwarding table entry memory 16023 and a physical interface card (PIC) 16024 .
  • PIC physical interface card
  • the central processing unit 16021 on the interface board 1602 is used to control and manage the interface board 1602 and communicate with the central processing unit 16011 on the main control board 1601 .
  • the network processor 16022 is used to implement packet forwarding processing.
  • the form of the network processor 16022 may be a forwarding chip.
  • the forwarding chip may be a network processor (NP).
  • the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • the network processor 16022 is configured to forward the received message based on the forwarding table stored in the forwarding table entry memory 16023.
  • the message is sent to the CPU (eg The central processing unit 16021) processes; if the destination address of the message is not the address of the device 1600, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the destination The outbound interface corresponding to the address.
  • the processing of the uplink message may include: processing of the incoming interface of the message, and forwarding table lookup; the processing of the downlink message may include: forwarding table lookup, and so on.
  • the central processing unit can also perform the function of a forwarding chip, for example, software forwarding is implemented based on a general-purpose CPU, so that a forwarding chip is not required in the interface board.
  • the physical interface card 16023 is used to realize the interconnection function of the physical layer, the original traffic enters the interface board 1602 through this, and the processed packets are sent out from the physical interface card 1602 .
  • the physical interface card 16023 is also called a daughter card, which can be installed on the interface board 1602, and is responsible for converting the photoelectric signal into a message, and after checking the validity of the message, it is forwarded to the network processor 16022 for processing.
  • the central processing unit may also perform the functions of the network processor 16022, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 16022 is not required in the physical interface card 16023.
  • the device 1600 includes a plurality of interface boards.
  • the device 1600 further includes an interface board 1603 .
  • the interface board 1603 includes a central processing unit 16031 , a network processor 16032 , a forwarding table entry storage 16033 and a physical interface card 16034 .
  • the functions and implementation manners of the components in the interface board 1603 are the same as or similar to those of the interface board 1602, and will not be repeated here.
  • the device 1600 further includes a switch fabric board 1604 .
  • the switch fabric unit 1604 may also be referred to as a switch fabric unit (switch fabric unit, SFU).
  • SFU switch fabric unit
  • the switch fabric board 1604 is used to complete data exchange between the interface boards.
  • the interface board 1602 and the interface board 1603 can communicate through the switch fabric board 1604 .
  • the main control board 1601 and the interface board 1602 are coupled.
  • the main control board 1601, the interface board 1602, the interface board 1603, and the switching network board 1604 are connected to the system backplane through a system bus to achieve intercommunication.
  • an inter-process communication (IPC) channel is established between the main control board 1601 and the interface board 1602, and the main control board 1601 and the interface board 1602 communicate through the IPC channel.
  • IPC inter-process communication
  • the device 1600 includes a control plane and a forwarding plane
  • the control plane includes the main control board 1601 and the central processing unit
  • the forwarding plane includes various components that perform forwarding, such as the forwarding entry storage 16023, the physical interface card 16024, and the network processor 16022 .
  • the control plane executes functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining device status.
  • the control plane delivers the generated forwarding tables to the forwarding plane.
  • the network processor 16022 based on the control plane
  • the delivered forwarding table is forwarded to the packet received by the physical interface card 16024 by looking up the table.
  • the forwarding table issued by the control plane can be stored in the forwarding table entry storage 16023 .
  • the control plane and forwarding plane may be completely separate and not on the same device.
  • main control boards 1601 there may be one or more main control boards 1601, and when there are multiple pieces, it may include an active main control board and a backup main control board.
  • the device 1600 may have at least one switch fabric board 1604, and the switch fabric board 1604 realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the device 1600 in the distributed architecture are greater than those in the centralized architecture.
  • the form of the device 1600 can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board.
  • the central processing unit on the board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers and other networks. equipment).
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • An embodiment of the present application provides a network system, where the network system includes the apparatus 1100 shown in FIG. 11 and the apparatus 1200 shown in FIG. 12 , or includes the apparatus 1300 shown in FIG. 13 and the apparatus 1300 shown in FIG. 14 .
  • first, second and other words are used to distinguish the same or similar items with basically the same function and function, and it should be understood that between “first”, “second” and “nth” There are no logical or timing dependencies, and no restrictions on the number and execution order. It will also be understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, a first image may be referred to as a second image, and, similarly, a second image may be referred to as a first image, without departing from the scope of various described examples. Both the first image and the second image may be images, and in some cases, may be separate and distinct images.
  • the size of the sequence number of each process does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not be used in the embodiment of the present application. Implementation constitutes any limitation.

Landscapes

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

Abstract

本申请公开了一种处理报文的方法、装置、系统及存储介质,属于通信领域。所述方法包括:第一设备获取第一报文,所述第一报文的报文头包括内层报文头和外层报文头,所述内层报文头位于所述第一报文的净荷和所述外层报文头之间,所述外层报文头包括第一标识和第一段列表,所述内层报文头包括第二段列表,所述第一段列表用于指示第一路径,所述第二段列表用于指示第二路径,所述第一路径和所述第二路径用于转发所述第一报文,所述第一标识用于标识所述外层报文头是否包括业务标识;所述第一设备发送所述第一报文,以使得基于所述第一标识处理所述第一报文。本申请能够指导设备处理第一报文,避免处理第一报文时产生错误。

Description

处理报文的方法、装置、系统及存储介质
本申请要求于2021年4月29日提交的申请号为202110474932.X、发明名称为“处理报文的方法、装置、系统及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,特别涉及一种处理报文的方法、装置、系统及存储介质。
背景技术
对于通信网络的边界设备,边界设备在接收到用户的业务报文时,可以将业务报文作为净荷,在该净荷的基础上添加分段路由头(segment routing header,SRH)和网际互联网协议(internet protocol,IP)头得到分段路由互联网协议第6版(segment routing internet protocol version 6,SRv6)报文。其中SRH包括段列表,段列表指示能够到达业务报文的目的地址的转发路径。边界设备通过转发路径发送SRv6报文。
在某些情况下,转发路径上的网络设备可能需要识别内层业务报文的数据。例如,在一些场景下转发路径上的网络设备可能需要读取内层业务报文的数据,以采集用户的五元组信息。此时,转发路径上的网络设备默认SRH内层即为业务报文,进而执行读取操作。
然而,在某些场景下,转发路径上的网络设备在接收到SRv6报文后,还可能在该SRv6报文的基础上继续添加第二层SRH头和第二层IP头,即最终获得的报文可能包括多层SRH头和IP头。
此时,如果网络设备在接收到该报文时仍然认为最外层SRH头和IP头内即为业务报文,进而对该报文执行指定的处理操作,可能会出错。例如,仍以读取业务信息的操作为例,假设网络设备接收的报文包括两层SRH头和两层IP头,网络设备跳过最外一层SRH头和IP头,从内层报文头中读取业务信息,读取的业务信息并不是业务报文中的业务信息,而是内层SRH头和IP头中的网络信息,导致读取错误发生。
发明内容
本申请提供了一种处理报文的方法、装置、系统及存储介质,以指导设备处理第一报文,避免处理第一报文时产生错误。所述技术方案如下:
第一方面,本申请提供了一种处理报文的方法,在所述方法中,第一设备获取第一报文,第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,外层报文头包括第一标识和第一段列表,内层报文头包括第二段列表,第一段列表用于指示第一路径,第二段列表用于指示第二路径,第一路径和第二路径用于转发第一报文,第一标识用于标识外层报文头是否包括业务标识。第一设备发送第一报文,以使得基于第一标识处理第一报文。
由于第一设备获取的第一报文的外层报文头包括第一标识,第一标识用于标识外层报文头是否包括业务标识,这样对于接收第一报文的设备,该设备可以基于第一标识确定第一报 文的外层报文头是否包括业务标识,基于确定的结果采取相应处理方式处理第一报文。所以第一标识可用于指导该设备处理第一报文的方式,从而避免了该设备处理该报文时发生错误。
在一种可能的实现方式中,外层报文头包括第一分段路由SRH,第一SRH包括第一标识和第一段列表。在第一SRH容易找到目标字段来携带第一标识,从而简化方案的实现难度。
在另一种可能的实现方式中,外层报文头还包括第一网际互连协议IP头,第一IP头包括第一目的地址,第一段列表包括第一目的地址。
在另一种可能的实现方式中,内层报文头包括第二SRH和第二IP头,第二SRH包括第二段列表,第二IP头包括第二目的地址,第二段列表包括第二目的地址,第一路径能够到达第二目的地址。
在另一种可能的实现方式中,第二目的地址是第二段列表包括的第二设备的段标识SID,第一路径是到达第二设备的路径。
在另一种可能的实现方式中,业务标识包括业务段标识,第一标识用于标识第一段列表是否包括业务段标识。
在另一种可能的实现方式中,业务标识包括网络分片的标识。
在另一种可能的实现方式中,在第一标识的取值为第一取值时,第一标识用于标识外层报文头包括业务标识;在第一标识的取值为第二取值时,第一标识用于标识外层报文头不包括业务标识。这样简化外层报文头携带第一标识的难度。
在另一种可能的实现方式中,外层报文头的目标字段包括第一标识,目标字段包括外层报文头的类型长度值TLV、标示Flags或标签Tag。由于目标字段包括TLV、Flags或Tag,这样在第一SRH容易找到目标字段来携带第一标识,从而简化方案的实现难度。
在另一种可能的实现方式中,第一设备接收第二报文,第二报文的报文头包括内层报文头。第一设备在第二报文上添加包括第一标识的外层报文头,得到第一报文。
在另一种可能的实现方式中,内层报文头包括第二段列表,第二段列表包括第一设备对应的段标识,第一设备对应的段标识包括绑定到具有封装的SRv6策略的终节点End.B6.Encaps标识。第一设备根据End.B6.Encaps标识的指示,在第二报文上添加包括第一标识的外层报文头。这样通过End.B6.Encaps标识,可以发送第一报文的一段路径连接起来,以保证能够成功传输第一报文。
在另一种可能的实现方式中,内层报文头包括第二标识,第二标识用于标识内层报文头包括的业务信息类型。这样在读取用户信息时,基于第二标识可以跳过内层报文头,从第一报文的净荷中读取用户信息,以避免读取错误。
在另一种可能的实现方式中,内层报文头与第一报文的净荷之间还包括至少一个其他报文头。
第二方面,本申请提供了一种处理报文的方法,在所述方法中,第一设备接收第一报文,第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,外层报文头包括第一标识和第一段列表,内层报文头包括第二段列表,第一段列表用于指示第一路径,第二段列表用于指示第二路径,第一路径和第二路径用于转发第一报文,第一标识用于标识外层报文头是否包括业务标识。第一设备基于第一标识处理第一报文。
由于第一设备接收的第一报文的外层报文头包括第一标识,第一标识用于标识外层报文头是否包括业务标识,这样第一设备可以基于第一标识确定第一报文的外层报文头是否包括 业务标识,基于确定的结果采取相应处理方式处理第一报文。所以第一标识可用于指导第一设备处理第一报文的方式,从而避免了第一设备处理第一报文时发生错误。
在一种可能的实现方式中,在第一路径故障时,第一设备确定第一标识用于标识外层报文头是否包括业务标识。第一设备在确定不包括所述业务标识时,基于内层报文头发送第一报文。在第一路径故障时,通过第一标识指导第一设备基于内层报文头发送报文,保证第一报文能够成功传输。
在另一种可能的实现方式中,业务标识包括业务段标识和网络分片的标识中的一个或多个。
在另一种可能的实现方式中,第一设备从第二段列表中读取第一段标识;第一设备基于第一段标识发送第一报文。这样在第一路径故障时,第一设备从第二段列表中的第一段标识继续发送第一报文,提高报文发送成功率。
在另一种可能的实现方式中,当第一设备基于所述第一标识确定外层报文头不包括业务标识时,第一设备从第一报文的净荷获取第一报文对应的用户信息。这样通过第一标识指导第一设备获取用户信息的位置,避免第一设备获取用户信息出现错误。
在另一种可能的实现方式中,业务标识包括虚拟专用网段标识VPN SID,用户信息包括第一报文的五元组信息。
在另一种可能的实现方式中,在第一路径故障时,第一设备确定第一标识用于标识外层报文头是否包括所述业务标识;第一设备在确定包括业务标识时,丢弃第一报文。
在另一种可能的实现方式中,外层报文头包括第一分段路由SRH,第一SRH包括第一标识和第一段列表。
在另一种可能的实现方式中,外层报文头还包括第一网际互连协议IP头,第一IP头包括第一目的地址,第一段列表包括所述第一目的地址。
在另一种可能的实现方式中,内层报文头包括第二SRH和第二IP头,第二SRH包括第二段列表,第二IP头包括第二目的地址,第二段列表包括第二目的地址,第一路径能够到达第二目的地址。
在另一种可能的实现方式中,外层报文头的目标字段包括第一标识,目标字段包括外层报文头的类型长度值TLV、标示Flags或标签Tag。由于目标字段包括TLV、Flags或Tag,这样在第一SRH容易找到目标字段来携带第一标识,从而简化方案的实现难度。
第三方面,本申请提供了一种处理报文的装置,用于执行第一方面或第一方面的任意一种可能的实现方式中的方法。具体地,所述装置包括用于执行第一方面或第一方面的任意一种可能的实现方式中的方法的单元。
第四方面,本申请提供了一种处理报文的装置,用于执行第二方面或第二方面的任意一种可能的实现方式中的方法。具体地,所述装置包括用于执行第二方面或第二方面的任意一种可能的实现方式中的方法的单元。
第五方面,本申请提供了一种处理报文的装置,所述装置包括处理器和存储器。其中,所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序,使得所述装置完成第一方面或第一方面的任意可能的实现方式中的方法。
第六方面,本申请提供了一种处理报文的装置,所述装置包括处理器和存储器。其中, 所述处理器以及所述存储器之间可以通过内部连接相连。所述存储器用于存储程序,所述处理器用于执行所述存储器中的程序,使得所述装置完成第二方面或第二方面的任意可能的实现方式中的方法。
第七方面,本申请提供了一种网络设备,该网络设备包括:主控板和接口板。主控板包括:第一处理器和第一存储器。接口板包括:第二处理器、第二存储器和接口卡。主控板和接口板耦合。
第一存储器可以用于存储程序代码,第一处理器用于调用第一存储器中的程序代码执行如下操作:获取第一报文,第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,外层报文头包括第一标识和第一段列表,内层报文头包括第二段列表,第一段列表用于指示第一路径,第二段列表用于指示第二路径,第一路径和第二路径用于转发第一报文,第一标识用于标识外层报文头是否包括业务标识。
第二存储器可以用于存储程序代码,第二处理器用于调用第二存储器中的程序代码,触发接口卡执行如下操作:发送第一报文,以使接收第一报文的设备基于第一标识处理第一报文。
第八方面,本申请提供了一种网络设备,该网络设备包括:主控板和接口板。主控板包括:第一处理器和第一存储器。接口板包括:第二处理器、第二存储器和接口卡。主控板和接口板耦合。
第二存储器可以用于存储程序代码,第二处理器用于调用第二存储器中的程序代码,触发接口卡执行如下操作:接收第一报文,第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,外层报文头包括第一标识和第一段列表,内层报文头包括第二段列表,第一段列表用于指示第一路径,第二段列表用于指示第二路径,第一路径和第二路径用于转发第一报文,第一标识用于标识外层报文头是否包括业务标识。
第一存储器可以用于存储程序代码,第一处理器用于调用第一存储器中的程序代码执行如下操作:基于第一标识处理第一报文。
在一种可能的实现方式中,主控板和接口板之间建立进程间通信协议(inter-process communication,IPC)通道,主控板和接口板之间通过IPC通道进行通信。
第九方面,本申请提供了一种网络系统,该网络系统包括前述第三方面提供的装置或第四方面提供的装置,或者该网络系统包括前述第五方面提供的装置或第六方面提供的装置,或者该网络系统包括前述第七方面提供的网络设备或第八方面提供的网络设备。
第十方面,本申请提供了一种计算机程序产品,所述计算机程序产品包括在计算机可读存储介质中存储的计算机程序,并且所述计算程序通过处理器进行加载来实现上述第一方面、第二方面、第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。
第十一方面,本申请提供了一种计算机可读存储介质,用于存储计算机程序,所述计算机程序通过处理器进行加载来执行上述第一方面、第二方面、第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。
第十二方面,本申请提供了一种芯片,包括存储器和处理器,存储器用于存储计算机指令,处理器用于从存储器中调用并运行该计算机指令,以执行上述第一方面、第二方面、第一方面任意可能的实现方式或第二方面任意可能的实现方式的方法。
附图说明
图1是本申请实施例提供的一种网络架构的示意图;
图2是本申请实施例提供的一种发送报文流程图;
图3是本申请实施例提供的一种第一报文和第二报文的示意图;
图4是本申请实施例提供的另一种第一报文和第二报文的示意图;
图5是本申请实施例提供的另一种网络架构的示意图;
图6是本申请实施例提供的另一种发送报文流程图;
图7是本申请实施例提供的另一种第一报文和第二报文的示意图;
图8是本申请实施例提供的另一种第一报文和第二报文的示意图;
图9是本申请实施例提供的一种处理报文的方法流程图;
图10是本申请实施例提供的另一种处理报文的方法流程图;
图11是本申请实施例提供的一种处理报文的装置结构示意图;
图12是本申请实施例提供的另一种处理报文的装置结构示意图;
图13是本申请实施例提供的另一种处理报文的装置结构示意图;
图14是本申请实施例提供的另一种处理报文的装置结构示意图;
图15是本申请实施例提供的一种设备结构示意图;
图16是本申请实施例提供的另一种设备结构示意图。
具体实施方式
下面将结合附图对本申请实施方式作进一步地详细描述。
参见图1,本申请实施例提供了一种网络架构100,包括:
多个运营商网络,对于每个运营商网络,该运营商网络包括多个网络设备。任意两个客户终端设备(customer premises equipment,CPE)可以通过该多个运营商网络进行通信。对于任意相邻的两个运营商网络,其中一个运营商网络的边界设备与另一个运营商网络的边界设备通信。
例如,参见图1所示的网络架构100包括第一运营商网络和第二运营商网络,第一运营商网络和第二运营商网络属于不同的运营商。第一运营商网络包括网络设备ACC1、网络设备AGG1、网络设备P1、网络设备P7、网络设备AGG2和网络设备ACC2。第二运营商网络包括网络设备MC1、网络设备MC2,网络设备MC3、网络设备MC4、网络设备P3、网络设备P4,网络设备P5、网络设备P6。
第一运营商网络包括两部分,该两部分分别为第一运营商网络1和第一运营商网络2,第一运营商网络1和第一运营商网络2属于同一个运营商。第一运营商网络1包括网络设备ACC1、网络设备AGG1和网络设备P1,第一运营商网络2包括网络设备P7、网络设备AGG2和网络设备ACC2。
网络设备MC1、网络设备MC2、网络设备MC3和网络设备MC4是第二运营商网络的边界设备,网络设备P1和网络设备ACC1是第一运营商网络1的边界设备,网络设备P7和网络设备ACC2是第一运营商网络2的边界设备。第一运营商网络1的边界设备P1与第二运营商网络的边界设备MC1和边界设备MC2通信,第一运营商网络2的边界设备P7与第二运营商网络的边界设备MC3和边界设备MC4通信。
对于通过该多个运营商网络通信的两个CPE,该两个CPE之间用于传输报文的路径经过该多个运营商网络。
例如,参见图1所示的网络架构100,第一CPE与第一运营商网络1的边界设备ACC1通信,第二CPE与第一运营商网络2的边界设备ACC2通信。第一CPE与第二CPE之间用于传输报文的路径经过第一运营商网络1、第二运营商网络和第一运营商网络2。
第一CPE与第二CPE之间用于传输报文的路径是边界设备ACC1到边界设备ACC2的路径。该路径存在一部分位于第二运营商网络中。为了便于说明,将该路径位于第二运营商网络中的部分路径称为第一路径,将该路径称为第二路径。
在一些实施例中,该路径位于第二运营商网络中的第一路径包括至少一条,该至少一条第一路径相互备份。
为了能够将第一CPE发送的业务报文传输到第二CPE,网管设备在与第一CPE通信的边界设备ACC1上配置第二段列表,第二段列表用于指示第二路径。假设第二段列表包括网络设备AGG1的段标识“AGG1.END”、边界设备P1的段标识“P1.END”、边界设备P7的段标识“P7.END”、网络设备AGG2的段标识“AGG2.END”、边界设备ACC2的段标识“ACC2.END”和边界设备ACC2的业务标识“ACC2.VPN SID”。业务标识“ACC2.VPN SID”用于指示边界设备ACC2上的与第二CPE通信的出接口。
在一些实施例中,该业务标识包括边界设备ACC2的业务段标识,业务段标识为虚拟专用网段标识(virtual private network segment,VPN SID),即ACC2的业务段标识为“ACC2.VPN SID”等。其中,该VPN SID是边界设备ACC2的私有标识,只有边界设备ACC2能够解析该VPN SID,除边界设备ACC2之外的其他设备无法解析该VPN SID。
对于边界设备P1,边界设备P1的下一跳设备是第二运营商网络的边界设备,例如,假设是第二运营商网络的边界设备MC1,网管设备事先在边界设备P1上配置能够到达边界设备P7的路由信息,该路由信息包括边界设备P7的段标识“P7.END”和出接口的标识,该出接口与边界设备MC1通信。
对于边界设备MC1,网管设备在边界设备MC1上配置与边界设备P7的段标识“P7.END”相对应的第一段列表,第一段列表用于指示第一路径。边界设备P7的段标识包括绑定到具有封装的SRv6策略的终节点(endpoint bound to an SRv6 policy with encapsulation,End.B6.Encaps)标识,该End.B6.Encaps标识用于触发边界设备MC1使用第一段列表指示的第一路径向边界设备P7发送报文。其中关于该End.B6.Encaps标识的详细介绍,可以参见请求意见稿(Request for Comments,RFC)8986的技术标准,在此不再详细说明。
第一段列表包括M个段标识,M为大于1的整数,第一段列表包括的每个段标识对应的设备属于第二运营商网络。第一段列表中的第M-1个段标识是第二运营商网络的边界设备的段标识,该边界设备的下一跳设备为第一运营商网络2中的边界设备P7。第一段列表中的第M个段标识是该边界设备的业务标识,该业务标识用于指示该边界设备上的与第一运营商网络通信的出接口,从而使得该边界设备的下一跳设备为第一运营商网络2中的边界设备P7。
在一些实施例中,该业务标识包括该边界设备的业务段标识,例如包括该边界设备的VPN SID等。其中,VPN SID是该边界设备的私有标识,只有该边界设备能够解析该VPN SID,除该边界设备之外的其他设备无法解析该VPN SID。
例如假设与段标识“P7.END”相对应的第一段列表包括第一段列表1和第一段列表2。 第一段列表1包括网络设备P3的段标识“P3.EndX”、网络设备P5的段标识“P5.EndX”、边界设备MC3的段标识“MC3.End”和边界设备MC3的业务标识“MC3.VPN SID”。业务标识“MC3.VPN SID”用于指示边界设备MC3上的与边界设备P7通信的出接口,使得边界设备MC3的下一跳设备是第一运营商网络2的边界设备P7。
第一段列表2包括边界设备MC2的段标识“MC2.EndX”、网络设备P4的段标识“P4.EndX”、网络设备P6的段标识“P6.EndX”、边界设备MC4的段标识“MC4.End”和边界设备MC4的业务标识“MC4.VPN SID”。业务标识“MC4.VPN SID”用于指示边界设备MC4上的与边界设备P7通信的出接口,使得边界设备MC4的下一跳设备是第一运营商网络2的边界设备P7。
这样,参见图2,第一CPE向第二CPE发送业务报文的过程可以包括如下步骤201至208的操作,该步骤201至208的操作分别为:
步骤201:边界设备ACC1接收第一CPE发送的业务报文,在该业务报文上添加一层报文头得到第二报文,该一层报文头包括第二SRH,第二SRH包括第二段列表。
此时业务报文为第二报文的净荷,第二报文包括该一层报文头。该一层报文头还包括第二IP头,第二IP头包括第二段列表中的第一个段标识,即第二IP头包括网络设备AGG1的段标识“AGG1.END”。参见图3,第二IP头包括源地址(SA)字段和目的地址(DA)字段,源地址字段包括该边界设备ACC1的回环(loopback)地址“ACC1.Lo”,目的地址字段包括网络设备AGG1的段标识“AGG1.END”。
步骤202:边界设备ACC1基于该第二段列表发送的第二报文。
参见图3,边界设备ACC1基于第二IP头包括的段标识“AGG1.END”向网络设备AGG1发送第二报文。网络设备AGG1接收第二报文,从第二报文包括的第二段列表中读取位于段标识“AGG1.END”之后的下一个段标识“P1.END”,将第二IP头包括的段标识“AGG1.END”替换为读取的段标识“P1.END”,基于第二IP头包括的段标识“P1.END”向网络设备P1发送第二报文。
其中,网络设备P1是第一运营商网络的边界设备,且边界设备P1的下一跳设备位于第二运营商网络中,所以边界设备P1会执行如下步骤203的操作。
步骤203:边界设备P1接收第二报文,向第二运营商网络的边界设备MC1发送第二报文。
在步骤203中,边界设备P1接收第二报文,从第二报文包括的第二段列表中读取位于段标识“P1.END”之后的下一个段标识“P7.END”,将第二IP头包括的段标识“P1.END”替换为读取的段标识“P7.END”。以及,基于段标识“P7.END”,获取包括该段标识“P7.END”的路由信息,该路由信息还包括与边界设备MC1通信的出接口的标识。基于该出接口的标识向边界设备MC1发送第二报文。
步骤204:边界设备MC1接收第二报文,在第二报文上添加一层报文头得到第一报文,该一层报文头包括第一SRH,第一SRH包括第一段列表。
边界设备MC1接收第二报文,从第二报文的第二IP头中读取边界设备P7的段标识“P7.END”,基于段标识“P7.END”包括的End.B6.Encaps标识的指示,在第二报文上添加一层报文头。该一层报文头包括第一SRH,第一SRH包括第一段列表,第一SRH包括的第一段列表是与边界设备P7的段标识“P7.END”相对应的一个第一段列表。
该一层报文头还包括第一IP头,第一IP头包括源地址字段和目的地址字段,源地址字段包括边界设备MC1的回环地址“MC1.Lo”,目的地址字段包括该第一段列表中的第一个段标识。
其中,此时第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,内层报文头包括上述第二SRH和第二IP头,外层报文头包括上述第一SRH和第一IP头。
例如,参见图3,边界设备MC1添加外层报文头后得到的第一报文,第一报文的内层报文头中的第二IP头包括段标识“P7.END”。对于第一报文的外层报文头包括的第一SRH和第一IP头,第一SRH中的第一段列表为与边界设备P7的段标识“P7.END”相对应的一个第一段列表。假设该第一段列表为上述第一段列表1,即第一SRH中的第一段列表包括网络设备P3的段标识“P3.EndX”、网络设备P5的段标识“P5.EndX”、边界设备MC3的段标识“MC3.End”和业务标识“MC3.VPN SID”;第一IP头包括的第一段列表1中的第一个段标识“P3.EndX”。
在一些实施例中,参见图4,上述第一报文的外层报文还包括第一互联网协议第六版逐跳选项头(internet protocol version 6 hop by hop option header,HBH),第一HBH包括第一网络分片的标识,对于第一SRH包括的第一段列表,第一段列表指示的第一路径为第一网络分片中的路径。上述第一报文的内层报文头还包括第二HBH,第二HBH包括第二网络分片的标识,对于第二SRH包括的第二段列表,第二段列表指示的第二路径为第二网络分片中的路径。其中,第一网络分片的标识和第二网络分片的标识也是一种业务标识。
步骤205:边界设备MC1基于第一SRH中的第一段列表发送第一报文。
参见图3,在步骤205中,第一报文的第一IP头包括第一段列表中的第一个段标识“P3.EndX”,边界设备MC1基于段标识“P3.EndX”向网络设备P3发送第一报文。
网络设备P3接收第一报文,从第一报文包括的第一段列表中读取位于段标识“P3.EndX”之后的下一个段标识“P5.EndX”,将第一IP头包括的段标识“P3.EndX”替换为读取的段标识“P5.EndX”,基于第一IP头包括的段标识“P5.EndX”向网络设备P5发送第一报文。
网络设备P5接收第一报文,从第一报文包括的第一段列表中读取位于段标识“P5.EndX”之后的下一个段标识“MC3.End”,将第一IP头包括的段标识“P5.EndX”替换为读取的段标识“MC3.End”,基于第一IP头包括的段标识“MC3.End”向边界设备MC3发送第一报文。
步骤206:边界设备MC3接收第一报文,去除第一报文的外层报文头,得到第二报文,向第一运营商网络的边界设备发送第二报文。
参见图3,边界设备MC3接收第一报文,从第一报文包括的第一段列表中读取位于段标识“MC3.End”之后的下一个段标识“MC3.VPN SID”。其中,段标识“MC3.VPN SID”是边界设备MC3的业务标识,基于该业务标识“MC3.VPN SID”的指示,确定与第一运营商网络通信的出接口,该出接口与第一运营商网络的边界设备P7通信。以及,还基于该业务标识“MC3.VPN SID”从第一报文中去除外层报文头,得到第二报文,通过该出接口向边界设备P7发送第二报文。
步骤207:边界设备P7接收第二报文,基于第二报文中的第二段列表发送的第二报文。
参见图3,边界设备P7接收第二报文,从第二报文包括的第二段列表中读取位于段标识“P7.END”之后的下一个段标识“AGG2.END”,将第二报文中的第二IP头包括的段标识 “P7.END”替换为读取的段标识“AGG2.END”,基于第二IP头包括的段标识“AGG2.END”向网络设备AGG2发送第二报文。
网络设备AGG2接收第二报文,从第二报文包括的第二段列表中读取位于段标识“AGG2.END”之后的下一个段标识“ACC2.END”,将第二报文中的第二IP头包括的段标识“AGG2.END”替换为读取的段标识“ACC2.END”,基于第二IP头包括的段标识“ACC2.END”向网络设备ACC2发送第二报文。
步骤208:边界设备ACC2接收第二报文,去除第二报文中的内层报文得到业务报文,向第二CPE发送该业务报文。
边界设备ACC2接收第二报文,从第二报文包括的第二段列表中读取位于段标识“ACC2.END”之后的下一个段标识“ACC2.VPN SID”,“ACC2.VPN SID”用于指示边界设备ACC2上的与第二CPE通信的出接口。去除第二报文的报文头得到业务报文,基于“ACC2.VPN SID”指示的出接口,向第二CPE发送该业务报文。
其中,需要说明的是:对于第一路径上的网络设备,为了便于说明,将该网络设备称为第一设备,对于用于指示第一路径的第一段列表,第一段列表包括M个段标识。第一设备在接收到第一报文时,从第一报文包括的第一段列表中获取位于第一段标识之后的下一个段标识作为第二段标识,第一段标识为第一设备的段标识。第一设备在检测到第一设备与第二段标识对应的设备之间的路径故障时,采用指定节点拓扑无关的无环替换路径(midpoint topology independent-loop free alternate,midpoint TI-LFA)技术发送第一报文。
在一些实施例中,第一设备采用midpoint TI-LFA技术发送第一报文的过程为:第一设备从第一段列表中获取位于第二段标识之后的下一个段标识作为第三段标识,计算第一设备到第三段标识对应的设备之间的路径,通过计算的路径向第三段标识对应的设备发送第一报文。
例如,参见图3,假设第一设备为网络设备P3,网络设备P3接收第一报文,从第一报文包括的第一段列表中获取位于段标识“P3.EndX”之后的下一个段标识“P5.EndX”作为第二段标识。在网络设备P3与段标识“P5.EndX”对应的网络设备P5之间的路径故障时,网络设备P3从第一段列表中获取位于第二段标识“P5.EndX”之后的下一个段标识“MC3.End”作为第三段标识,计算网络设备P3到第三段标识“MC3.End”对应的网络设备MC3的路径,通过计算的路径向网络设备MC3发送第一报文。
其中,需要说明的是:第一报文的第一段列表包括的最后一个段标识为第二设备的VPN SID,第二设备是第一报文的第一段列表包括的第M-1个段标识对应的设备。如果第一设备从第一段列表中读取的第三段标识为第二设备的VPN SID,由于第二设备的VPN SID是第二设备的私有标识,第一设备无法解析该VPN SID的语义,导致第一设备无法计算第一设备到第三段标识对应的设备之间的路径。所以在读取的第三段标识为第二设备的VPN SID的情况,第一设备无法采用midpoint TI-LFA技术发送第一报文。
其中,第一路径还可能经过除第二运营商网络之外的其他运营商网络。当在第一路径上传输的第一报文被发送到该其他运营商网络时,该其他运营商网络的边界设备还可能在第一报文上添加一层报文头,使得添加后的第一报文包括一层外层报文头和多层内层报文头。该边界设备在第一报文上添加一层报文头的过程,可以参见边界设备MC1添加报文头的过程,在此不再详细说明。
参见图5,本申请实施例提供了一种网络架构500,包括:
多个路由区域,该多个路由区域位于同一个运营商网络中。对于每个路由区域,该路由区域包括多个网络设备。任意两个CPE可以通过该多个路由区域进行通信。对于任意相邻的两个路由区域,该两个路由区域包括的共同边界设备。
例如,参见图5所示的网络架构500包括第一路由区域、第二路由区域和第三路由区域。第一路由区域包括网络设备ACC1、网络设备AGG1和网络设备P1;第二路由区域包括网络设备MC1、网络设备MC2,网络设备MC3、网络设备MC4、网络设备P3、网络设备P4,网络设备P5、网络设备P6;第三路由区域包括网络设备P7、网络设备AGG2和网络设备ACC2。网络设备MC1和网络设备MC2是第一路由区域和第二路由区域包括的共同边界设备;网络设备MC3和网络设备MC4是第二路由区域和第三路由区域包括的共同边界设备。
对于通过该多个运营商网络通信的两个CPE,该两个CPE之间用于传输报文的路径经过该多个路由区域。例如,参见图5所示的网络架构500,第一CPE与第一路由区域的边界设备ACC1通信,第二CPE与第三路由区域的边界设备ACC2通信。第一CPE与第二CPE之间用于传输报文的路径经过第一路由区域、第二路由区域和第三路由区域。
第一CPE与第二CPE之间用于传输报文的路径是边界设备ACC1到边界设备ACC2的路径。为了便于说明,将该路径称为第二路径。第二路径可能较长,导致用于指示第二路径的第二段列表包括的段标识数目较多,从而导致第二段列表的长度较长。为了减小第二段列表的长度,将第二路径分成多段路径,从该多段路径中选择至少一个段路径,第二段列表包括选择的每段路径的起始节点的段标识。对于选择的每段路径,为了便于说明,将该段路径称为第一路径,第一路径的起始节点的段标识与第一段列表相对应,第一段列表用于指示第一路径。第一路径的起始节点的段标识包括End.B6.Encaps标识,该End.B6.Encaps标识用于指示第一路径的起始节点使用第一段列表发送报文。
在一些实施例中,第一路径的起始节点为路由区域的边界设备。第一路径的起始节点的段标识包括该起始节点的BSID等。
为了能够将第一CPE发送的业务报文传输到第二CPE,网管设备在与第一CPE通信的边界设备上配置第二段列表,第二段列表包括选择的每段路径的起始节点的BSID。以及,网管设备在选择的每段路径的起始节点上配置第一段列表。
例如,参见图5,在与第一CPE通信的边界设备ACC1上配置第二段列表,第二段列表用于指示第二路径。第二路径包括三段路径,分别为边界设备ACC1与边界设备MC1之间的路径,边界设备MC1与边界设备MC3之间的路径,边界设备MC3与边界设备ACC2之间的路径。假设网管设备选择边界设备MC1与边界设备MC3之间的路径作为第一路径1,选择边界设备MC3与边界设备ACC2之间的路径作为第一路径2。
第一路径1的起始节点为边界设备MC1,第一路径2的起始节点为边界设备MC3。网管设备在与第一CPE通信的边界设备ACC1上配置第二段列表,第二段列表包括网络设备AGG1的段标识“AGG1.END”,网络设备P1的段标识“P1.END”、边界设备MC1的段标识“MC1.BSID”、边界设备MC3的段标识“MC3.BSID”、边界设备ACC2的段标识“ACC2.End”业务标识“ACC2.VPN SID”。第二段列表用于指示边界设备ACC1与边界设备ACC2之间的第二路径,业务标识“ACC2.VPN SID”用于指示边界设备ACC2上的与第二CPE通信的出接口。
边界设备MC1的段标识“MC1.BSID”包括第一End.B6.Encaps标识,且边界设备MC1 包括与段标识“MC1.BSID”相对应的第一段列表1;第一段列表1包括网络设备P3的段标识“P3.EndX”、网络设备P5的段标识“P5.EndX”和边界设备MC3的段标识“MC3.End”;所以第一段列表1用于指示边界设备MC1与边界设备MC3之间的第一路径1。
边界设备MC3的段标识“MC3.BSID”包括第二End.B6.Encaps标识,且边界设备MC3包括与段标识“MC3.BSID”相对应的第一段列表2,第一段列表2包括网络设备AGG2的段标识“AGG2.END”和边界设备ACC2的段标识“ACC.END”,所以第二段列表2用于指示边界设备MC3与边界设备ACC2之间的第一路径2。
这样,参见图6,第一CPE向第二CPE发送业务报文的过程可以包括如下步骤601至607的操作,该步骤601至607的操作分别为:
步骤601:边界设备ACC1接收第一CPE发送的业务报文,在该业务报文上添加一层报文头得到第二报文,该一层报文头包括第二SRH,第二SRH包括第二段列表。
此时业务报文为第二报文的净荷,第二报文包括该一层报文头。该一层报文头还包括第二IP头,第二IP头包括第二段列表中的第一个段标识,即第二IP头包括网络设备AGG1的段标识“AGG1.END”。参见图7,第二IP头包括源地址(SA)字段和目的地址(DA)字段,源地址字段包括该边界设备ACC1的回环地址“ACC1.Lo”,目的地址字段包括网络设备AGG1的段标识“AGG1.END”。
步骤602:边界设备ACC1基于该第二段列表发送的第二报文。
参见图7,边界设备ACC1基于第二IP头包括的段标识“AGG1.END”向网络设备AGG1发送第二报文。网络设备AGG1接收第二报文,从第二报文包括的第二段列表中读取位于段标识“AGG1.END”之后的下一个段标识“P1.END”,将第二IP头包括的段标识“AGG1.END”替换为读取的段标识“P1.END”,基于第二IP头包括的段标识“P1.END”向网络设备P1发送第二报文。
网络设备P1接收第二报文,从第二报文包括的第二段列表中读取位于段标识“P1.END”之后的下一个段标识“MC1.BSID”,将第二IP头包括的段标识“P1.END”替换为读取的段标识“MC1.BSID”,基于第二IP头包括的段标识“MC1.BSID”向网络设备MC1发送第二报文。
其中,网络设备MC1是第一路径1的起始节点,所以边界设备MC1会执行如下步骤603的操作。
步骤603:边界设备MC1接收第二报文,在第二报文上添加一层报文头得到第一报文1,该一层报文头包括第一SRH,第一SRH包括第一段列表1。
在步骤603中,边界设备MC1接收第二报文,从第二报文包括的第二段列表中读取位于段标识“MC1.BSID”之后的下一个段标识“MC3.BSID”,将第二IP头包括的段标识“MC1.BSID”替换为读取的段标识“MC3.BSID”。以及,基于段标识“MC1.BSID”包括的第一End.B6.Encaps标识的指示,在第二报文上添加一层报文头,该一层报文头包括第一SRH,第一SRH包括第一段列表1,第一SRH包括的第一段列表1是与边界设备MC1的段标识“MC1.BSID”相对应的第一段列表。
该一层报文头还包括第一IP头,第一IP头包括源地址字段和目的地址字段,源地址字段包括边界设备MC1的回环地址“MC1.Lo”,目的地址字段包括该第一段列表1中的第一个 段标识“P3.EndX”。
其中,此时第一报文1的报文头包括内层报文头和外层报文头,内层报文头位于第一报文1的净荷和外层报文头之间,内层报文头包括上述第二SRH和第二IP头,外层报文头包括上述第一SRH和第一IP头。
参见图8,在一些实施例中,上述第一报文的外层报文还包括第一HBH,第一HBH包括第一网络分片的标识,对于第一SRH包括的第一段列表,第一段列表指示的第一路径为第一网络分片中的路径。上述第一报文的内层报文头还包括第二HBH,第二HBH包括第二网络分片的标识,对于第二SRH包括的第二段列表,第二段列表指示的第二路径为第二网络分片中的路径。其中,第一网络分片的标识和第二网络分片的标识也是一种业务标识。
步骤604:边界设备MC1基于第一SRH中的第一段列表1发送第一报文1。
参见图7,在步骤605中,第一报文1的第一IP头包括第一段列表中的第一个段标识“P3.EndX”,边界设备MC1基于段标识“P3.EndX”向网络设备P3发送第一报文。网络设备P3接收第一报文1,从第一报文1包括的第一段列表中读取位于段标识“P3.EndX”之后的下一个段标识“P5.EndX”,将第一IP头包括的段标识“P3.EndX”替换为读取的段标识“P5.EndX”,基于第一IP头包括的段标识“P5.EndX”向网络设备P5发送第一报文1。网络设备P5接收第一报文1,从第一报文1包括的第一段列表中读取位于段标识“P5.EndX”之后的下一个段标识“MC3.End”,将第一IP头包括的段标识“P5.EndX”替换为读取的段标识“MC3.End”,基于第一IP头包括的段标识“MC3.End”向边界设备MC3发送第一报文1。
步骤605:边界设备MC3接收第一报文1,替换第一报文1的外层报文头,得到第一报文2,第一报文2的外层报文头包括与边界设备MC3的段标识“MC3.BSID”相对应的第一段列表2。
参见图7,边界设备MC3接收第一报文1,由于第一IP头中的“MC3.End”是第一段列表2中的最后一个段标识,所以去除第一报文1的外层报文头,得到第二报文。从第二报文包括的第二段列表中读取位于段标识“MC3.BSID”之后的下一个段标识“ACC2.End”。将第二IP头包括的段标识“MC3.BSID”替换为读取的段标识“ACC2.End”。以及,基于段标识“MC3.BSID”包括的第二End.B6.Encaps标识的指示,在第二报文上添加一层报文头,该一层报文头包括第一SRH,第一SRH包括第一段列表2,第一SRH包括的第一段列表2是与边界设备MC3的段标识“MC3.BSID”相对应的第一段列表2。该一层报文头还包括第一IP头,第一IP头包括源地址字段和目的地址字段,源地址字段包括边界设备MC3的回环地址“MC3.Lo”,目的地址字段包括该第一段列表2中的第一个段标识“P7.END”。
步骤606:边界设备MC3基于第一SRH中的第一段列表2发送第一报文2。
参见图7,在步骤706中,第一报文2的第一IP头包括第一段列表中的第一个段标识“P7.END”,边界设备MC3基于段标识“P7.END”向网络设备P7发送第一报文2。网络设备P7接收第一报文2,从第一报文2包括的第一段列表2中读取位于段标识“P7.END”之后的下一个段标识“AGG2.END”,将第一IP头包括的段标识“P7.END”替换为读取的段标识“AGG2.END”,基于第一IP头包括的段标识“AGG2.END”向网络设备AGG2发送第一报文2。网络设备AGG2接收第一报文2,从第一报文2包括的第一段列表2中读取位于段标识“AGG2.END”之后的下一个段标识“ACC2.END”,将第一IP头包括的段标识“AGG2.END”替换为读取的段标识“ACC2.END”,基于第一IP头包括的段标识“ACC2.END” 向边界设备ACC2发送第一报文2。
步骤607:边界设备ACC2接收第一报文2,去除第一报文2中的外层报文得到第二报文,以及去除第二报文的内层报文头得到业务报文,向第二CPE发送该业务报文。
边界设备ACC2接收第一报文2,由于“ACC2.END”是第一段列表2中的最后一个段标识,所以去除第一报文2中的外层报文得到第二报文,第二报文的第二IP头包括段标识“ACC2.End”。从第二报文包括的第二段列表中读取位于段标识“ACC2.End”之后的下一个段标识“ACC2.VPN SID”,“ACC2.VPN SID”用于指示边界设备ACC2上的与第二CPE通信的出接口。去除第二报文的报文头得到业务报文,基于“ACC2.VPN SID”指示的出接口,向第二CPE发送该业务报文。
其中,需要说明的是:对于上述任一第一路径上的网络设备,为了便于说明,将该网络设备称为第一设备,对于用于指示第一路径的第一段列表,第一段列表包括M个段标识。第一设备在接收到第一报文时,从第一报文包括的第一段列表中获取位于第一段标识之后的下一个段标识作为第二段标识,第一段标识为第一设备的段标识。第一设备在检测到第一设备与第二段标识对应的设备之间的路径故障时,采用midpoint TI-LFA技术发送第一报文。
在一些实施例中,第一设备采用midpoint TI-LFA技术发送第一报文的过程为:
在第二段标识不是第一段列表中的最后一个段标识时,第一设备从第一段列表中获取位于第二段标识之后的下一个段标识作为第三段标识,计算第一设备到第三段标识对应的设备之间的路径,通过计算的路径向第三段标识对应的设备发送第一报文。
在第二段标识是第一段列表中的最后一个段标识时,第一设备去除第一报文的外层报文头,得到第二报文,第二报文的第二IP头包括第四段标识。从第二报文的第二段列表中读取位于第四段标识之后的下一个段标识作为第五段标识。计算第一设备到第五段标识对应的设备之间的路径,通过计算的路径向第五段标识对应的设备发送第二报文。
例如,参见图7,假设第一设备为网络设备P3,网络设备P3接收第一报文1,从第一报文1包括的第一段列表1中获取位于段标识“P3.EndX”之后的下一个段标识“P5.EndX”作为第二段标识。在网络设备P3与段标识“P5.EndX”对应的网络设备P5之间的路径故障时,网络设备P3从第一段列表1中获取位于第二段标识“P5.EndX”之后的下一个段标识“MC3.End”作为第三段标识,计算网络设备P3到第三段标识“MC3.End”对应的网络设备MC3的路径,通过计算的路径向网络设备MC3发送第一报文1。
再例如,假设在网络设备P3与段标识“MC3.End”对应的边界设备MC3之间的路径也故障时,网络设备P3去除第一报文1的外层报文头得到第二报文,第二报文的第二IP头包括第四段标识“MC3.BSID”。从第二报文的第二段列表中读取位于第四段标识“MC3.BSID”之后的下一个段标识作为第五段标识,第五段标识为“ACC2.END”。计算第一设备到第五段标识“ACC2.END”对应的边界设备ACC2之间的路径,通过计算的路径向边界设备ACC2发送第二报文。或者,
假设第一设备为网络设备P5,网络设备P5接收第一报文1,从第一报文1包括的第一段列表1中获取位于段标识“P5.EndX”之后的下一个段标识“MC3.End”作为第二段标识。在网络设备P5与段标识“MC3.End”对应的边界设备MC3之间的路径故障时,网络设备P5去除第一报文1的外层报文头得到第二报文,第二报文的第二IP头包括第四段标识“MC3.BSID”。从第二报文的第二段列表中读取位于第四段标识“MC3.BSID”之后的下一 个段标识作为第五段标识,第五段标识为“ACC2.END”。计算第一设备到第五段标识“ACC2.END”对应的边界设备ACC2之间的路径,通过计算的路径向边界设备ACC2发送第二报文。
其中,第一段列表中的某个段标识也可能是某个设备的BSID。当在第一路径上传输的第一报文被发送到该设备时,该设备还可能在第一报文上添加一层报文头,使得添加后的第一报文包括一层外层报文头和多层内层报文头。该设备在第一报文上添加一层报文头的过程,可以参见边界设备MC1或MC3添加报文头的过程,在此不再详细说明。
其中,需要说明的是:第一报文的外层报文头包括第一网络分片的标识,在第二段标识是第一段列表中的最后一个段标识时,第一设备不可以去除第一报文的外层报文头得到第二报文,以及不可以从第二报文的第二段列表中读取第五段标识。原因在于,第一设备计算的第一设备到第五段标识对应的设备之间的路径可能不在第一网络分片中,所以在第二段标识是第一段列表中的最后一个段标识时,不可以使用内层报文头来发送报文。
在上述图5所示的网络架构500中,对于接收到报文的设备,该设备还可能需要从报文中获取用户信息,该用户信息包括该报文的五元组信息。其中在该报文为上述第二报文时,该设备跳过第二报文的一层报文头,从第二报文的净荷中获取该用户信息。在该报文为上述第一报文时,该设备跳过第一报文的一层报文头,从第一报文的内层报文头中获取该用户信息,但是第一报文的内层报文头中只有网络信息,没有用户信息,从导致设备获取错误。
在上述图1所示的网络架构100,第一路径出现故障,导致第一路径上的设备无法向下游设备发送第一报文。其中此情况下,第一报文的第一段列表包括的最后一个段标识为VPN SID,设备可能无法采用midpoint TI-LFA技术发送第一报文。
在上述图5所示的网络架构500,第一路径出现故障,导致第一路径上的设备无法向下游设备发送第一报文。其中此情况下,第一报文的第一段列表包括的最后一个段标识为段标识,该设备能够采用midpoint TI-LFA技术发送第一报文。
综上所述,该设备所处于的网络情况较多,可能导致设备在接收到报文时不知该如何处理报文。例如,设备从报文中读取用户信息,可能读取错误,当第一路径故障时,设备可能能够采用midpoint TI-LFA技术发送第一报文,也可能不能能采用midpoint TI-LFA技术发送第一报文。为了解决该问题,可以采用如下任意实施例来解决。
参见图9,本申请实施例提供了一种处理报文的方法900,所述方法900可以应用于上述图1、图3或图4所示的网络架构100,或者,应用于上述图5、图7或图8所示的网络架构500,包括:
步骤901:第一设备获取第一报文,第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,外层报文头包括第一标识和第一段列表,内层报文头包括第二段列表,第一段列表用于指示第一路径,第二段列表用于指示第二路径,第一路径和第二路径用于转发第一报文,第一标识用于标识外层报文头是否包括业务标识。
第一报文的外层报文头包括第一SRH和第一IP头,第一SRH包括第一标识和第一段列表。第一IP头包括第一目的地址,第一段列表包括第一目的地址,即第一目的地址是第一段列表中的一个段标识。
第一报文的内层报文头包括第二SRH和第二IP头,第二SRH包括第二段列表,第二IP 头包括第二目的地址,第二段列表包括第二目的地址,即第二目的地址是第二段列表中的一个段标识,第一路径能够到达第二目的地址。
在一些实施例中,第一段列表包括业务标识,或者,第一段列表不包括业务标识。在此情况下,业务标识为业务段标识,第一标识用于标识第一段列表是否包括该业务段标识。该业务段标识包括VPN SID等。
在一些实施例中,外层报文头还包括第一网络分片的标识。外层报文头还包括第一HBH,第一HBH包括第一网络分片的标识。其中,第一网络分片的标识也是一种业务标识。
所以,外层报文头包括业务标识包括第一段列表中的业务段标识和/或第一HBH中的第一网络分片的标识,在此情况下第一标识用于标识外层报文头包括业务标识。在第一段列表不包括业务段标识以及外层报文头不包括第一HBH时,第一标识用于标识外层报文头不包括业务标识。
在步骤901中,第一设备可以通过如下两种方式获取第一报文,该两种方式分别为:
第一方式,第一设备接收第二报文,第二报文的报文头包括内层报文头;在第二报文上添加包括第一标识的外层报文头,得到第一报文。
在应用于上述图1、图3或图4所示的网络架构100,第一设备为第二运营商网络的边界设备,第二报文的第二IP头包括的第二目的地址为某个设备对应的段标识,该段标识是第二报文的第二段列表中的段标识,且该段标识包括End.B6.Encaps标识。第一设备上包括与该段标识相对应的至少一个第一段列表。
第一设备接收第二报文,从第二报文的第二IP头中获取段标识,基于该段标识中的End.B6.Encaps标识的指示,获取与该段标识相对应的至少一个第一段列表,选择一个第一段列表,选择的第一段列表中的最后一个段标识为业务段标识(VPN SID)。在第二报文上添加包括第一标识的外层报文头,该外层报文头的第一SRH包括选择的第一段列表和第一标识,第一标识用于标识该外层报文头包括业务标识。
例如,参见图1、图3或图4所示网络架构100,第一设备可以为该网络架构100中的边界设备MC1,第一设备MC1是第二运营商网络的边界设备。第一设备MC1接收第二报文,第二报文的内层报文头包括第二SRH和第二IP头,第二IP头中的第二目的地址为边界设备P7的段标识“P7.END”。
第一设备MC1基于段标识“P7.END”中的END.B6.Encaps标识的指示,从与段标识“P7.END”相对应的第一段列表1和第一段列表2中选择第一段列表1。在第二报文上添加外层报文头,外层报文头包括第一SRH和第一IP头,第一SRH包括第一段列表1和第一标识,第一段列表1包括网络设备P3的段标识“P3.EndX”、网络设备P5的段标识“P5.EndX”,边界设备的段标识“MC3.End”和业务段标识“MC3.VPN SID”。此时,外层报文头包括的第一标识用于标识外层报文头包括业务标识。
在应用于上述图5、图7或图8所示的网络架构500,第一设备是第一路径的起始节点,第二报文的第二IP头包括的第二目的地址为第一设备对应的段标识,第一设备对应的段标识是第二报文的第二段列表中的段标识,且第一设备对应的段标识包括End.B6.Encaps标识。
第一设备接收第二报文,从第二报文的第二段列表中读取位于第一设备对应的段标识之后的下一个段标识,将第二报文的第二IP头包括的第二目的地址替换为读取的段标识。第一设备包括与第一设备的段标识相对应的第一段列表,该第一段列表不包括业务标识,从第一 设备对应的段标识中读取End.B6.Encaps标识,基于该End.B6.Encaps标识的指示,在第二报文上添加包括第一标识的外层报文头。该外层报文头的第一SRH包括该第一段列表和第一标识,第一标识用于标识该外层报文头不包括业务标识。
例如,参见图5、图7或图8所示网络架构500,第一设备可以为第一路由区域和第二路由区域的边界设备MC1。第一设备MC1接收第二报文,第二报文的内层报文头包括第二SRH和第二IP头,第二IP头中的第二目的地址为第一设备MC1的段标识“MC1.BSID”。
第一设备MC1包括与段标识“MC1.BSID”是相对应的第一段列表1,第一段列表1包括网络设备P3的段标识“P3.EndX”、网络设备P5的段标识“P5.EndX”和边界设备的段标识“MC3.End”。基于段标识“MC1.BSID”中的第一END.B6.Encaps标识的指示,在第二报文上添加外层报文头,外层报文头包括第一SRH和第一IP头,第一SRH包括第一段列表1和第一标识。此时,外层报文头包括的第一标识用于标识外层报文头包括业务标识。
在此情况下,外层报文头还可能包括第一HBH,第一HBH包括第一网络分片的标识,此时外层报文头中的第一标识用于标识外层报文头包括业务标识。例如,参见图8,外层报文头还包括第一HBH,第一HBH包括第一网络分片的标识,此时外层报文头中的第一标识用于标识外层报文头包括业务标识。
在一些实施例中,在第一标识的取值为第一取值时,第一标识用于标识外层报文头包括业务标识;在第一标识的取值为第二取值时,第一标识用于标识外层报文头不包括业务标识。
在一些实施例中,外层报文头的目标字段包括第一标识,该目标字段包括外层报文头的类型长度值(type length value,TLV)、标示(Flags)或标签(Tag)。
在一些实施例中,目标字段为第一SRH中的字段。
在一些实施例中,目标字段包括Flags或TLV中的第一个和/或第二个比特等,第一个比特和/或第二个比特的取值为1,表示第一标识的取值为第一取值。第一个比特和/或第二个比特的取值为0,表示第一标识的取值为第二取值。或者,在目标字段为Tag,第一取值为数值1或2等,第二取值为0等。
目标字段的默认取值与第一取值不同,所以在目标字段中的第一标识的取值为第一取值,可以表示目标字段包括第一标识,且第一标识用于标识外层报文头不包括业务标识。
在一些实施例中,第一标识还用于标识内层报文头包括的业务信息类型。该内层报文头包括的业务信息类型可能是用户信息、内层网络路径和网络分片信息等中的一个或多个。
在一些实施例中,第一报文的内层报文头还包括第二标识,第二标识用于标识内层报文头的业务信息类型。通常该业务信息类型为网络信息。
第二方式,第一设备接收第一报文。
例如,参见图1、图3、图4、图5、图7或图8所示的网络架构,第一设备包括网络设备P3或网络设备P5等。假设第一设备为网络设备P5,第一设备P5接收网络设备P3发送的第一报文。
在一些实施例中,内层报文头与第一报文的净荷之间还包括至少一个其他报文头。
步骤902:第一设备发送第一报文,以使接收第一报文的设备基于第一标识处理第一报文。
在步骤902中,在第一设备通过上述第一方式得到第一报文的情况,第一设备基于第一段列表包括的第一个段标识发送第一报文。在第一设备通过上述第二方式得到第一报文的情 况,第一设备从第一段列表中读取位于第一设备的段标识之后的下一个段标识,基于读取的段标识发送第一报文。
在本申请实施例中,由于第一设备获取的第一报文的外层报文头包括第一标识,第一标识用于标识外层报文头是否包括业务标识,这样对于接收第一报文的设备,该设备可以基于第一标识确定第一报文的外层报文头是否包括业务标识,基于确定的结果采取相应处理方式处理第一报文。所以第一标识可用于指导该设备处理第一报文的方式,从而避免了该设备处理该报文时发生错误。
参见图10,本申请实施例提供了一种处理报文的方法1000,所述方法1000可以应用于上述图1、图3或图4所示的网络架构100,或者,应用于上述图5、图7或图8所示的网络架构500,包括:
步骤1001:第一设备接收第一报文,第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,外层报文头包括第一标识和第一段列表,内层报文头包括第二段列表,第一段列表用于指示第一路径,第二段列表用于指示第二路径,第一路径和第二路径用于转发第一报文,第一标识用于标识外层报文头是否包括业务标识。
第一报文的外层报文头包括第一SRH和第一IP头,第一SRH包括第一标识和第一段列表。第一IP头包括第一目的地址,第一段列表包括第一目的地址,即第一目的地址是第一段列表中的一个段标识。
第一报文的内层报文头包括第二SRH和第二IP头,第二SRH包括第二段列表,第二IP头包括第二目的地址,第二段列表包括第二目的地址,即第二目的地址是第二段列表中的一个段标识,第一路径能够到达第二目的地址。
在一些实施例中,第一段列表包括业务标识,或者,第一段列表不包括业务标识。在此情况下,业务标识为业务段标识,第一标识用于标识外层报文头是否包括业务标识。
在一些实施例中,外层报文头包括第一网络分片的标识,第一网络分片的标识也是一种业务标识。第一标识用于标识外层报文头包括业务标识。
步骤1002:第一设备基于第一标识处理第一报文。
在步骤1002中,第一设备处理第一报文的方式包括发送第一报文和/或从第一报文中读取用户信息等方式。接下来分别对该两种方式进行一一说明:
对于发送第一报文的方式,在第一路径故障时,第一设备确定第一标识用于标识该外层报文头是否包括业务标识;在确定不包括业务标识时,基于该内层报文头发送第一报文。
参见图5或图7所示的网络架构500,第一报文的外层报文头不包括业务标识,该外层报文头中的第一标识用于标识该外层报文头不包括业务报文。第一设备基于该内层报文头,并采用midpoint TI-LFA技术发送第一报文。
其中,发送第一报文的过程为:第一报文的第一IP头包括第一设备的段标识,第一设备接收第一报文后,从第一报文的第一段列表中读取位于该段标识之后的下一个段标识。在第一设备到读取的段标识对应的设备之间的路径故障(即第一路径故障)时,如果读取的段标识是第一段列表的最后一个段标识,则第一设备基于第一标识确定第一报文的外层报文头是否包括业务标识,在确定不包括业务标识时,基于该内层报文头发送第一报文。如果读取的段标识不是第一段列表的最后一个段标识,则第一设备继续从第一段列表中读取下一个段标识,计算第一设备到读取的段标识对应的设备之间的路径,基于计算的路径发送第一报文。 其中,如果计算的路径仍是故障的,则第一设备继续从第一段列表中读取下一个段标识,并计算第一设备到读取的段标识对应的设备的路径。
在一些实施例中,基于该内层报文头发送第一报文操作为:第一设备从第二段列表中读取第一段标识,在第二段列表中第一段标识位于在第二设备的段标识之后,第一路径能够到达第二设备;第一设备基于所述第一段标识发送第一报文。
在实现时:该内层报文头的第二IP头包括第二目的地址,第二目的地址是该内层报文头中的第二段列表中的段标识,为第一路径能够到达的第二设备的段标识。第一设备去除第一报文的外层报文头得到第二报文,从第二段列表中读取位于第二目的地址后的下一个段标识,读取的段标识即为第一段标识,基于读取的段标识发送第二报文。
例如,参见图5,假设第一设备为网络设备P5,第一设备P5接收第一报文,第一报文的第一IP头包括第一设备P5的段标识“P5.EndX”,从第一报文的第一段列表中读取段标识“P5.EndX”之后的下一个段标识“MC3.End”。如果第一设备P5到段标识“MC3.End”对应的设备MC3的路径故障,第一设备P5基于第一标识确定第一报文的外层报文头不包括业务标识,从第一报文去除外层报文头,得到第二报文。第二报文的内层报文头中的第二IP头包括段标识“MC3.BSID”,段标识“MC3.BSID”为第一路径能够到达的第二设备的段标识,即边界设备MC3为第二设备。从第二段列表中读取位于段标识“MC3.BSID”后的下一个段标识“ACC2.End”,即第一段标识为“ACC2.End”,基于读取的段标识“ACC2.End”向边界设备ACC2发送第二报文。
参见图1或图3所示的网络架构100,第一报文的第一段列表的最后一个段标识为业务段标识(VPN SID),该外层报文头中的第一标识用于标识该外层报文头包括业务报文。在第一路径故障时,如果第一段列表中未执行的段标识是该业务段标识(VPN SID),第一设备丢弃第一报文。其中,第一路径的起始节点采用虚拟专用网快速重路由(virtual private network fast re-route,VPN FRR)技术业发送报文,发送过程可以为:第一路径的起始节点会检测到第一路径故障,并重新在第二报文上添加外层报文头得到第三报文,该外层报文头包括其他的第一段列表,再基于该其他第一段列表发送第三报文。
例如,参见图1或图3,假设第一设备为网络设备P5,第一设备P5接收的第一报文包括第一段列表1,假设第一设备P5到段标识MC3.End”对应的设备MC3之间的路径故障(即第一路径故障)时,此时第一段列表1的最后一个段标识“MC3.VPN SID”未被执行,则第一设备P5丢弃第一报文。其中,第一路径的起始节点为边界设备MC1,边界设备MC1采用VPN FRR技术发送报文。也就是说:边界设备MC1会检测到第一路径故障,重新在第二报文上添加外层报文头得到第三报文,该外层报文头包括其他的第一段列表,即包括第一段列表2,再基于第一段列表2发送第三报文。
参见图4所示的网络架构100或图8所示的网络架构500,第一报文的外层报文头还可能包括第一HBH,第一HBH包括第一网络分片的标识,该外层报文头中的第一标识用于标识该外层报文头包括业务报文。在第一路径故障时,第一设备基于第一标识确定该外层报文头包括业务标识时,丢弃第一报文。
对于从第一报文中读取用户信息,当第一设备基于第一标识确定第一报文的外层报文头不包括业务标识时,第一设备从第一报文的净荷获取第一报文对应的用户信息。
该业务标识包括VPN SID,该用户信息包括第一报文的五元组信息。
第一报文是在第二报文添加包括第一标识的外层报文头得到的,所以第一设备在检测到外层报文头包括第一标识时,可以确定第一报文的报文头包括外层报文头和内层报文头,第一标识所在的报文头为外层报文头。这样在第一标识用于标识该外层报文头不包括业务标识,表示外层报文头不包括第一网络分片的标识或第一段列表的最后一个段标识不是业务段标识(VPN SID),从而第一设备可以跳过第一报文的外层报文头和内层报文头,从第一报文的净荷中获取用户信息。
在一些实施例中,第一标识的取值为第一取值,表示第一标识用于指示外层报文头不包括业务标识。外层报文头中的第一SRH包括目标字段,目标字段携带第一标识。而第一取值与目标字段的默认取值不同,所以在检测出目标字段的取值为第一标识时,第一设备确定目标字段包括第一标识,即检测到外层报文头包括第一标识。
在一些实施例中,第一报文的内层报文头还包括第二标识,第二标识用于指示内层报文头的业务信息类型,该业务信息类型为网络信息。所以,第一设备在跳过第一报文的外层报文头后,基于内层报文头中的第二标识,确定内层报文头中的业务信息类型为网络信息,并继续路过第一报文的内层报文头,从第一报文的净荷中获取用户信息。
在本申请实施例中,由于第一设备接收的第一报文的外层报文头包括第一标识,第一标识用于标识外层报文头是否包括业务标识,这样第一设备可以基于第一标识确定第一报文的外层报文头是否包括业务标识,基于确定的结果采取相应处理方式处理第一报文,例如,从第一报文的净荷中获取用户信息,或采用Midpont TI-FLA技术发送第一报文。所以第一标识可用于指导第一设备处理第一报文的方式,从而避免了第一设备处理第一报文时发生错误。
参见图11,本申请实施例提供了一种处理报文的装置1100,所述装置1100部署在如图1-4所示实施例中的边界设备MC1上,如图5-8所示实施例中的边界设备MC1或MC2上,或者,如图9所示方法900中的第一设备上,包括:
处理单元1101,用于获取第一报文,第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,外层报文头包括第一标识和第一段列表,内层报文头包括第二段列表,第一段列表用于指示第一路径,第二段列表用于指示第二路径,第一路径和第二路径用于转发第一报文,第一标识用于标识外层报文头是否包括业务标识;
发送单元1102,用于发送第一报文,以使得基于第一标识处理所述第一报文。
可选的,处理单元1101获取第一报文的详细实现,可以参见图9所示方法900的步骤901中的相关内容,在此不再详细说明。
可选的,发送单元1102发送第一报文的详细实现,可以参见图9所示方法900的步骤902中的相关内容,在此不再详细说明。
可选的,外层报文头包括第一分段路由SRH,第一SRH包括第一标识和第一段列表。
可选的,外层报文头还包括第一网际互连协议IP头,第一IP头包括第一目的地址,第一段列表包括第一目的地址。
可选的,内层报文头包括第二SRH和第二IP头,第二SRH包括第二段列表,第二IP头包括第二目的地址,第二段列表包括第二目的地址,第一路径能够到达第二目的地址。
可选的,第二目的地址是第二段列表包括的第二设备的段标识SID,第一路径是到达第二设备的路径。
可选的,业务标识包括业务段标识,所述第一标识用于标识第一段列表是否包括业务段 标识。
可选的,业务标识包括网络分片的标识。
可选的,在第一标识的取值为第一取值时,第一标识用于标识外层报文头包括业务标识;在第一标识的取值为第二取值时,第一标识用于标识外层报文头不包括业务标识。
可选的,外层报文头的目标字段包括第一标识,目标字段包括外层报文头的类型长度值TLV、标示Flags或标签Tag。
可选的,所述装置1100还包括:接收单元1103,
接收单元1103,用于接收第二报文,第二报文的报文头包括内层报文头;
处理单元1101,用于在第二报文上添加包括第一标识的外层报文头,得到第一报文。
可选的,接收单元1103接收第二报文的详细实现,可以参见图9所示方法900的步骤901中的相关内容,在此不再详细说明。
可选的,处理单元1101在第二报文上添加包括第一标识的外层报文头的详细实现,可以参见图9所示方法900的步骤901中的相关内容,在此不再详细说明。
可选的,内层报文头包括第二段列表,第二段列表包括所述装置1100对应的段标识,所述装置1100对应的段标识包括End.B6.Encaps标识;
处理单元1101,用于根据End.B6.Encaps标识的指示,在第二报文上添加包括第一标识的外层报文头。
可选的,处理单元1101在第二报文上添加包括第一标识的外层报文头的详细实现,可以参见图9所示方法900的步骤901中的相关内容,在此不再详细说明。
可选的,内层报文头包括第二标识,第二标识用于标识内层报文头包括的业务信息类型。
可选的,内层报文头与第一报文的净荷之间还包括至少一个其他报文头。
在本申请实施例中,由于处理单元获取的第一报文的外层报文头包括第一标识,第一标识用于标识外层报文头是否包括业务标识,这样发送单元发送第一报文后,对于接收第一报文的设备,该设备可以基于第一标识确定第一报文的外层报文头是否包括业务标识,基于确定的结果采取相应处理方式处理第一报文。所以第一标识可用于指导该设备处理第一报文的方式,从而避免了该设备处理该报文时发生错误。
参见图12,本申请实施例提供了一种处理报文的装置1200,所述装置1200部署在如图1-4所示实施例中的网络设备P3或P5等设备上,如图5-8所示实施例中的网络设备P3、P5、P7或AGG1等设备,或者,如图10所示方法1000中的第一设备上,包括:
接收单元1201,用于接收第一报文,第一报文的报文头包括内层报文头和外层报文头,内层报文头位于第一报文的净荷和外层报文头之间,外层报文头包括第一标识和第一段列表,内层报文头包括第二段列表,第一段列表用于指示第一路径,第二段列表用于指示第二路径,第一路径和第二路径用于转发第一报文,第一标识用于标识外层报文头是否包括业务标识;
处理单元1202,用于基于第一标识处理第一报文。
可选的,接收单元1201接收第一报文的详细实现,可以参见图10所示方法1000的步骤1001中的相关内容,在此不再详细说明。
可选的,处理单元1202处理第一报文的详细实现,可以参见图10所示方法1000的步骤1002中的相关内容,在此不再详细说明。
可选的,所述装置1200还包括发送单元1203,
处理单元1202,用于在第一路径故障时,确定第一标识用于标识外层报文头是否包括业务标识;
发送单元1202,用于在确定不包括业务标识时,基于内层报文头发送第一报文。
可选的,处理单元1202确定是否包括业务标识的详细实现,可以参见图10所示方法1000的步骤1002中的相关内容,在此不再详细说明。
可选的,发送单元1202发送第一报文的详细实现,可以参见图10所示方法1000的步骤1002中的相关内容,在此不再详细说明。
可选的,业务标识包括业务段标识和网络分片的标识中的一个或多个。
可选的,处理单元1202,用于从第二段列表中读取第一段标识,在第二段列表中第一段标识位于在第二设备的段标识之后,第一路径能够到达第二设备;
发送单元1203,用于基于第一段标识发送第一报文。
可选的,处理单元1202读取第一段标识的详细实现,可以参见图10所示方法1000的步骤1002中的相关内容,在此不再详细说明。
可选的,发送单元1203基于第一段标识发送第一报文的详细实现,可以参见图10所示方法1000的步骤1002中的相关内容,在此不再详细说明。
可选的,处理单元1202,用于当基于第一标识确定所述外层报文头不包括所述业务标识时,从第一报文的净荷获取第一报文对应的用户信息。
可选的,处理单元1202获取用户信息的详细实现,可以参见图10所示方法1000的步骤1002中的相关内容,在此不再详细说明。
可选的,业务标识包括VPN SID,用户信息包括第一报文的五元组信息。
可选的,处理单元1202,用于在第一路径故障时,确定第一标识用于标识外层报文头是否包括业务标识;在确定包括业务标识时,丢弃第一报文。
可选的,处理单元1202丢弃第一报文的详细实现,可以参见图10所示方法1000的步骤1002中的相关内容,在此不再详细说明。
可选的,外层报文头包括第一分段路由SRH,第一SRH包括第一标识和第一段列表。
可选的,外层报文头还包括第一网际互连协议IP头,第一IP头包括第一目的地址,第一段列表包括第一目的地址。
可选的,内层报文头包括第二SRH和第二IP头,第二SRH包括第二段列表,第二IP头包括第二目的地址,第二段列表包括第二目的地址,第一路径能够到达第二目的地址。
可选的,外层报文头的目标字段包括第一标识,目标字段包括外层报文头的类型长度值TLV、标示Flags或标签Tag。
在本申请实施例中,由于接收单元接收的第一报文的外层报文头包括第一标识,第一标识用于标识外层报文头是否包括业务标识,这样处理单元可以基于第一标识确定第一报文的外层报文头是否包括业务标识,基于确定的结果采取相应处理方式处理第一报文。所以第一标识可用于指导处理单元处理第一报文的方式,从而避免了处理单元处理第一报文时发生错误。
参见图13,本申请实施例提供了一种处理报文的装置1300示意图。所述装置1300可以是如图1-4所示实施例中的边界设备MC1,如图5-8所示实施例中的边界设备MC1或MC2,或者,如图9所示方法900中的第一设备。所述装置1300包括至少一个处理器1301,内部 连接1302,存储器1303以及至少一个收发器1304。
所述装置1300是一种硬件结构的装置,可以用于实现图11所述的装置1100中的功能模块。例如,本领域技术人员可以想到图11所示的装置1100中的处理单元1101可以通过该至少一个处理器1301调用存储器1303中的代码来实现,图11所示的装置1100中的发送单元1102和接收单元1103可以通过该至少一个收发器1304来实现。
所述装置1300还可以用于实现上述任一实施例中的第一设备的功能。
上述处理器1301可以是一个通用中央处理器(central processing unit,CPU),网络处理器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
上述内部连接1302可包括一通路,在上述组件之间传送信息。内部连接1302可以为单板或总线等。
上述至少一个收发器1304,用于与其他设备或通信网络通信。
上述存储器1303可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器1303用于存储执行本申请方案的应用程序代码,并由处理器1301来控制执行。处理器1301用于执行存储器1303中存储的应用程序代码,以及配合至少一个收发器1304,从而使得所述装置1300实现本专利方法中的功能。
在具体实现中,作为一种实施例,处理器1301可以包括一个或多个CPU,例如图13中的CPU0和CPU1。
在具体实现中,作为一种实施例,所述装置1300可以包括多个处理器,例如图13中的处理器1301和处理器1307。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
参见图14,本申请实施例提供了一种处理报文的装置1400示意图。所述装置1400可以是如图1-4所示实施例中的网络设备P3或P5,如图5-8所示实施例中的网络设备P3、P5、P7或AGG1,或者,如图10所示方法1000中的第一设备。所述装置1400包括至少一个处理器1401,内部连接1402,存储器1403以及至少一个收发器1404。
所述装置1400是一种硬件结构的装置,可以用于实现图12所述的装置1200中的功能模块。例如,本领域技术人员可以想到图12所示的装置1200中的处理单元1202可以通过该至少一个处理器1401调用存储器1403中的代码来实现,图12所示的装置1200中的发送单元1203和接收单元1201可以通过该至少一个收发器1404来实现。
所述装置1400还可以用于实现上述任一实施例中的第一设备的功能。
上述处理器1401可以是一个通用中央处理器(central processing unit,CPU),网络处理 器(network processor,NP),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
上述内部连接1402可包括一通路,在上述组件之间传送信息。内部连接1402可以为单板或总线等。
上述至少一个收发器1404,用于与其他设备或通信网络通信。
上述存储器1403可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器1403用于存储执行本申请方案的应用程序代码,并由处理器1401来控制执行。处理器1401用于执行存储器1403中存储的应用程序代码,以及配合至少一个收发器1404,从而使得所述装置1400实现本专利方法中的功能。
在具体实现中,作为一种实施例,处理器1401可以包括一个或多个CPU,例如图14中的CPU0和CPU1。
在具体实现中,作为一种实施例,所述装置1400可以包括多个处理器,例如图14中的处理器1401和处理器1407。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
参见图15,图15示出了本申请一个示例性实施例提供的设备1500的结构示意图,可选地,该设备1500配置为如图1-4所示实施例中的边界设备MC1,如图5-8所示实施例中的边界设备MC1或MC2,或者,如图9所示方法900中的第一设备。换句话说,上述图9所示方法900中的第一设备可以通过设备1500实现。
该设备1500例如是网络设备,比如说设备1500是交换机、路由器等。如图15所示,设备1500包括:主控板1501和接口板1502。
主控板1501也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板1501用于对设备1500中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1501包括:中央处理器15011和存储器15012。
接口板1502也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板1502用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板1502包括:中央处理器15021、网络处理器15022、转发表项存储器15023和物理接口卡(phsical interface card,PIC)15024。
接口板1502上的中央处理器15021用于对接口板1502进行控制管理并与主控板1501上的中央处理器15011进行通信。
网络处理器15022用于实现报文的转发处理。网络处理器15022的形态可以是转发芯片。 转发芯片可以是网络处理器(network processor,NP)。在一些实施例中,转发芯片可以通过专用集成电路(application-specific integrated circuit,ASIC)或现场可编程门阵列(field programmable gate array,FPGA)实现。具体而言,网络处理器15022用于基于转发表项存储器15023保存的转发表转发接收到的报文,如果报文的目的地址为设备1500的地址,则将该报文上送至CPU(如中央处理器15021)处理;如果报文的目的地址不是设备1500的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理可以包括:报文入接口的处理,转发表查找;下行报文的处理可以包括:转发表查找等等。在一些实施例中,中央处理器也可执行转发芯片的功能,比如基于通用CPU实现软件转发,从而接口板中不需要转发芯片。
物理接口卡15023用于实现物理层的对接功能,原始的流量由此进入接口板1502,以及处理后的报文从该物理接口卡1502发出。物理接口卡15023也称为子卡,可安装在接口板1502上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器15022处理。在一些实施例中,中央处理器也可执行网络处理器15022的功能,比如基于通用CPU实现软件转发,从而物理接口卡15023中不需要网络处理器15022。
可选地,设备1500包括多个接口板,例如设备1500还包括接口板1503,接口板1503包括:中央处理器15031、网络处理器15032、转发表项存储器15033和物理接口卡15034。接口板1503中各部件的功能和实现方式与接口板1502相同或相似,在此不再赘述。
可选地,设备1500还包括交换网板1504。交换网板1504也可以称为交换网板单元(switch fabric unit,SFU)。在设备1500有多个接口板的情况下,交换网板1504用于完成各接口板之间的数据交换。例如,接口板1502和接口板1503之间可以通过交换网板1504通信。
主控板1501和接口板1502耦合。例如。主控板1501、接口板1502和接口板1503,以及交换网板1504之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板1501和接口板1502之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1501和接口板1502之间通过IPC通道进行通信。
在逻辑上,设备1500包括控制面和转发面,控制面包括主控板1501和中央处理器,转发面包括执行转发的各个组件,比如转发表项存储器15023、物理接口卡15024和网络处理器15022。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器15022基于控制面下发的转发表对物理接口卡15024收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器15023中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。
值得说明的是,主控板1501可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,设备1500的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板1504可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,设备1500可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,设备1500可以有至少一块交换网板1504,通过交换网板1504实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的设备1500的数据接入和处理能力要大于集中式架构的设备。可选地,设备1500的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理 器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
参见图16,图16示出了本申请一个示例性实施例提供的设备1600的结构示意图,可选地,该设备1600配置为如图1-4所示实施例中的网络设备P3或P5,如图5-8所示实施例中的网络设备P3、P5、P7或AGG1,或者,如图10所示方法1000中的第一设备。换句话说,上述图2所示的方法20中的第二设备可以通过设备1600实现。
该设备1600例如是网络设备,比如说设备1600是交换机、路由器等。如图16所示,设备1600包括:主控板1601和接口板1602。
主控板1601也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板1601用于对设备1600中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1601包括:中央处理器16011和存储器16012。
接口板1602也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板1602用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板1602包括:中央处理器16021、网络处理器16022、转发表项存储器16023和物理接口卡(phsical interface card,PIC)16024。
接口板1602上的中央处理器16021用于对接口板1602进行控制管理并与主控板1601上的中央处理器16011进行通信。
网络处理器16022用于实现报文的转发处理。网络处理器16022的形态可以是转发芯片。转发芯片可以是网络处理器(network processor,NP)。在一些实施例中,转发芯片可以通过专用集成电路(application-specific integrated circuit,ASIC)或现场可编程门阵列(field programmable gate array,FPGA)实现。具体而言,网络处理器16022用于基于转发表项存储器16023保存的转发表转发接收到的报文,如果报文的目的地址为设备1600的地址,则将该报文上送至CPU(如中央处理器16021)处理;如果报文的目的地址不是设备1600的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理可以包括:报文入接口的处理,转发表查找;下行报文的处理可以包括:转发表查找等等。在一些实施例中,中央处理器也可执行转发芯片的功能,比如基于通用CPU实现软件转发,从而接口板中不需要转发芯片。
物理接口卡16023用于实现物理层的对接功能,原始的流量由此进入接口板1602,以及处理后的报文从该物理接口卡1602发出。物理接口卡16023也称为子卡,可安装在接口板1602上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器16022处理。在一些实施例中,中央处理器也可执行网络处理器16022的功能,比如基于通用CPU实现软件转发,从而物理接口卡16023中不需要网络处理器16022。
可选地,设备1600包括多个接口板,例如设备1600还包括接口板1603,接口板1603包括:中央处理器16031、网络处理器16032、转发表项存储器16033和物理接口卡16034。接口板1603中各部件的功能和实现方式与接口板1602相同或相似,在此不再赘述。
可选地,设备1600还包括交换网板1604。交换网板1604也可以称为交换网板单元(switch  fabric unit,SFU)。在设备1600有多个接口板的情况下,交换网板1604用于完成各接口板之间的数据交换。例如,接口板1602和接口板1603之间可以通过交换网板1604通信。
主控板1601和接口板1602耦合。例如。主控板1601、接口板1602和接口板1603,以及交换网板1604之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板1601和接口板1602之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1601和接口板1602之间通过IPC通道进行通信。
在逻辑上,设备1600包括控制面和转发面,控制面包括主控板1601和中央处理器,转发面包括执行转发的各个组件,比如转发表项存储器16023、物理接口卡16024和网络处理器16022。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器16022基于控制面下发的转发表对物理接口卡16024收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器16023中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。
值得说明的是,主控板1601可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,设备1600的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板1604可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,设备1600可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,设备1600可以有至少一块交换网板1604,通过交换网板1604实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的设备1600的数据接入和处理能力要大于集中式架构的设备。可选地,设备1600的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
本申请实施例提供了一种网络系统,所述网络系统包括如图11所示的装置1100和如图12所示的装置1200,或者,包括如图13所示的装置1300和如图14所示的装置1400,如图15所示的设备1500和如图16所示的设备1600。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”、“第n”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种所述示例的范围的情况下,第一图像可以被称为第二图像,并且类似地,第二图像可以被称为第一图像。第一图像和第二图像都可以是图像,并且在某些情况下,可以是单独且不同的图像。
还应理解,在本申请的各个实施例中,各个过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成 任何限定。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (28)

  1. 一种处理报文的方法,其特征在于,所述方法包括:
    第一设备获取第一报文,所述第一报文的报文头包括内层报文头和外层报文头,所述内层报文头位于所述第一报文的净荷和所述外层报文头之间,所述外层报文头包括第一标识和第一段列表,所述内层报文头包括第二段列表,所述第一段列表用于指示第一路径,所述第二段列表用于指示第二路径,所述第一路径和所述第二路径用于转发所述第一报文,所述第一标识用于标识所述外层报文头是否包括业务标识;
    所述第一设备发送所述第一报文,以使得基于所述第一标识处理所述第一报文。
  2. 如权利要求1所述的方法,其特征在于,所述外层报文头包括第一分段路由SRH,所述第一SRH包括第一标识和所述第一段列表。
  3. 如权利要求2所述的方法,其特征在于,所述外层报文头还包括第一网际互连协议IP头,所述第一IP头包括第一目的地址,所述第一段列表包括所述第一目的地址。
  4. 如权利要求1-3任一项所述的方法,其特征在于,所述内层报文头包括第二SRH和第二IP头,所述第二SRH包括所述第二段列表,所述第二IP头包括第二目的地址,所述第二段列表包括所述第二目的地址,所述第一路径能够到达所述第二目的地址。
  5. 如权利要求4所述的方法,其特征在于,所述第二目的地址是所述第二段列表包括的第二设备的段标识SID,所述第一路径是到达所述第二设备的路径。
  6. 如权利要求1-5任一项所述的方法,其特征在于,所述业务标识包括业务段标识,所述第一标识用于标识所述第一段列表是否包括所述业务段标识。
  7. 如权利要求1-5任一项所述的方法,其特征在于,所述业务标识包括网络分片的标识。
  8. 如权利要求1-7任一项所述的方法,其特征在于,在所述第一标识的取值为第一取值时,所述第一标识用于标识所述外层报文头包括所述业务标识;在所述第一标识的取值为第二取值时,所述第一标识用于标识所述外层报文头不包括所述业务标识。
  9. 如权利要求1-8任一项所述的方法,其特征在于,所述外层报文头的目标字段包括所述第一标识,所述目标字段包括所述外层报文头的类型长度值TLV、标示Flags或标签Tag。
  10. 如权利要求1-9任一项所述的方法,其特征在于,所述第一设备获取第一报文,包括:
    所述第一设备接收第二报文,所述第二报文的报文头包括所述内层报文头;
    所述第一设备在所述第二报文上添加包括所述第一标识的外层报文头,得到所述第一报文。
  11. 如权利要求10的方法,其特征在于,所述内层报文头包括第二段列表,所述第二段列表包括所述第一设备对应的段标识,所述第一设备对应的段标识包括绑定到具有封装的SRv6策略的终节点End.B6.Encaps标识;所述第一设备在所述第二报文上添加包括所述第一标识的外层报文头,包括:
    所述第一设备根据所述End.B6.Encaps标识的指示,在所述第二报文上添加包括所述第一标识的外层报文头。
  12. 如权利要求1-11任一项所述的方法,其特征在于,所述内层报文头包括第二标识,所述第二标识用于标识所述内层报文头包括的业务信息类型。
  13. 如权利要求1-12任一项所述的方法,其特征在于,所述内层报文头与所述第一报文的 净荷之间还包括至少一个其他报文头。
  14. 一种处理报文的方法,其特征在于,所述方法包括:
    第一设备接收第一报文,所述第一报文的报文头包括内层报文头和外层报文头,所述内层报文头位于所述第一报文的净荷和所述外层报文头之间,所述外层报文头包括第一标识和第一段列表,所述内层报文头包括第二段列表,所述第一段列表用于指示第一路径,所述第二段列表用于指示第二路径,所述第一路径和所述第二路径用于转发所述第一报文,所述第一标识用于标识所述外层报文头是否包括业务标识;
    所述第一设备基于所述第一标识处理所述第一报文。
  15. 如权利要求14所述的方法,其特征在于,所述第一设备基于所述第一标识处理所述第一报文,包括:
    在所述第一路径故障时,所述第一设备确定所述第一标识用于标识所述外层报文头是否包括所述业务标识;
    所述第一设备在确定不包括所述业务标识时,基于所述内层报文头发送所述第一报文。
  16. 如权利要求15所述的方法,其特征在于,所述业务标识包括业务段标识和网络分片的标识中的一个或多个。
  17. 如权利要求15或16所述的方法,其特征在于,所述基于所述内层报文头发送所述第一报文,包括:
    所述第一设备从所述第二段列表中读取第一段标识;
    所述第一设备基于所述第一段标识发送所述第一报文。
  18. 如权利要求14所述的方法,其特征在于,所述第一设备基于所述第一标识处理所述第一报文,包括:
    当所述第一设备基于所述第一标识确定所述外层报文头不包括所述业务标识时,所述第一设备从所述第一报文的净荷获取所述第一报文对应的用户信息。
  19. 如权利要求18所述的方法,其特征在于,所述业务标识包括虚拟专用网段标识VPN SID,所述用户信息包括所述第一报文的五元组信息。
  20. 如权利要求14所述的方法,其特征在于,所述第一设备基于所述第一标识处理所述第一报文,包括:
    在所述第一路径故障时,所述第一设备确定所述第一标识用于标识所述外层报文头是否包括所述业务标识;
    所述第一设备在确定包括所述业务标识时,丢弃所述第一报文。
  21. 如权利要求14-20任一项所述的方法,其特征在于,所述外层报文头包括第一分段路由SRH,所述第一SRH包括所述第一标识和所述第一段列表。
  22. 如权利要求21所述的方法,其特征在于,所述外层报文头还包括第一网际互连协议IP头,所述第一IP头包括第一目的地址,所述第一段列表包括所述第一目的地址。
  23. 如权利要求14-22任一项所述的方法,其特征在于,所述内层报文头包括第二SRH和第二IP头,所述第二SRH包括所述第二段列表,所述第二IP头包括第二目的地址,所述第二段列表包括所述第二目的地址,所述第一路径能够到达所述第二目的地址。
  24. 如权利要求14-23任一项所述的方法,其特征在于,所述外层报文头的目标字段包括所述第一标识,所述目标字段包括所述外层报文头的类型长度值TLV、标示Flags或标签Tag。
  25. 一种处理报文的装置,所述装置包括处理器和存储器,其特征在于,所述存储器用于存储程序,所述处理器用于调用所述存储器中的程序,以使得所述装置执行如权利要求1-24任一项所述的方法。
  26. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被计算机执行时,实现如权利要求1-24任一项所述的方法。
  27. 一种网络系统,其特征在于,所述系统包括第一设备和第二设备,所述第一设备用于执行如权利要求1-13任一项所述的方法,所述第二设备用于执行如权利要求14-24任一项所述的方法。
  28. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至24任一所述的方法。
PCT/CN2022/090012 2021-04-29 2022-04-28 处理报文的方法、装置、系统及存储介质 WO2022228533A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110474932.XA CN115277525A (zh) 2021-04-29 2021-04-29 处理报文的方法、装置、系统及存储介质
CN202110474932.X 2021-04-29

Publications (1)

Publication Number Publication Date
WO2022228533A1 true WO2022228533A1 (zh) 2022-11-03

Family

ID=83744892

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090012 WO2022228533A1 (zh) 2021-04-29 2022-04-28 处理报文的方法、装置、系统及存储介质

Country Status (2)

Country Link
CN (1) CN115277525A (zh)
WO (1) WO2022228533A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448888A (zh) * 2019-08-31 2021-03-05 华为技术有限公司 一种在sr网络中转发报文的方法、设备和系统
CN112511428A (zh) * 2020-03-10 2021-03-16 中兴通讯股份有限公司 报文封装方法、报文转发方法、通告方法、电子设备、和存储介质
US20210092043A1 (en) * 2019-09-23 2021-03-25 Cisco Technology, Inc. Multiple domain segment routing path computation
CN113162849A (zh) * 2020-01-22 2021-07-23 华为技术有限公司 一种报文处理方法、装置及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448888A (zh) * 2019-08-31 2021-03-05 华为技术有限公司 一种在sr网络中转发报文的方法、设备和系统
US20210092043A1 (en) * 2019-09-23 2021-03-25 Cisco Technology, Inc. Multiple domain segment routing path computation
CN113162849A (zh) * 2020-01-22 2021-07-23 华为技术有限公司 一种报文处理方法、装置及系统
CN112511428A (zh) * 2020-03-10 2021-03-16 中兴通讯股份有限公司 报文封装方法、报文转发方法、通告方法、电子设备、和存储介质

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"3rd Generation Partnership Project; Technical Specification Group Core Network and Terminals; Study on User Plane Protocol in 5GC. (Release 16)", 3GPP STANDARD; TECHNICAL REPORT; 3GPP TR 29.892, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. CT WG4, no. V2.0.0, 8 September 2019 (2019-09-08), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France , pages 1 - 51, XP051784487 *
HONGWEI SHI, HUANG FENGZHI: "Research on Network Slicing Technology Based on SRv6", ELECTRONIC TECHNOLOGY & SOFTWARE ENGINEERING, CHINA ELECTRONIC SOCIETY, CN, no. 16, 15 August 2020 (2020-08-15), CN , pages 21 - 24, XP055980769, ISSN: 2095-5650 *

Also Published As

Publication number Publication date
CN115277525A (zh) 2022-11-01

Similar Documents

Publication Publication Date Title
US20220407802A1 (en) Packet processing method and apparatus, network device, and storage medium
JP7443537B2 (ja) パケット処理方法、パケット処理装置、およびパケット処理システム
CN113411834B (zh) 报文处理方法、装置、设备及存储介质
US20210029026A1 (en) Using and processing per slice segment identifiers in a network employing segment routing
WO2021174985A1 (zh) 一种sr策略的发布、接收方法及装置
US20230095244A1 (en) Packet sending method, device, and system
WO2021000752A1 (zh) 一种在数据中心网络中转发报文的方法及相关装置
CN112202669A (zh) 使用分段路由的弹性多协议标签交换(mpls)环
WO2022105927A1 (zh) 一种通告网络设备处理能力的方法、设备和系统
WO2022127698A1 (zh) 拥塞控制方法及网络设备
WO2022194023A1 (zh) 报文处理的方法、网络设备及控制器
WO2022048418A1 (zh) 一种转发报文的方法、设备和系统
WO2022007702A1 (zh) 一种报文处理方法及网络设备
CN114257494A (zh) 一种实现业务路径检测的方法、设备和系统
WO2023116457A1 (zh) 报文处理方法及装置、通信系统
WO2022228533A1 (zh) 处理报文的方法、装置、系统及存储介质
WO2022166465A1 (zh) 一种报文处理方法及相关装置
CN114760244B (zh) 一种传输绑定段标识bsid的方法、装置和网络设备
CN115914087A (zh) 报文转发方法、装置、设备、系统及存储介质
CN115811499A (zh) 指定转发者df选举的方法及设备
CN115208829A (zh) 报文处理的方法及网络设备
WO2023040783A1 (zh) 获取能力、发送能力信息的方法、装置、系统及存储介质
WO2022143572A1 (zh) 一种报文处理方法及相关设备
WO2023213216A1 (zh) 一种报文处理的方法及相关设备
EP4277226A1 (en) Packet transmission method, transmission control method, apparatus, and system

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: 22795003

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22795003

Country of ref document: EP

Kind code of ref document: A1