[go: up one dir, main page]

WO2018166325A1 - Method and device for forwarding data packet - Google Patents

Method and device for forwarding data packet Download PDF

Info

Publication number
WO2018166325A1
WO2018166325A1 PCT/CN2018/076746 CN2018076746W WO2018166325A1 WO 2018166325 A1 WO2018166325 A1 WO 2018166325A1 CN 2018076746 W CN2018076746 W CN 2018076746W WO 2018166325 A1 WO2018166325 A1 WO 2018166325A1
Authority
WO
WIPO (PCT)
Prior art keywords
spi
data packet
nsh
service chain
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/076746
Other languages
French (fr)
Chinese (zh)
Inventor
陈国忠
李华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2018166325A1 publication Critical patent/WO2018166325A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the embodiments of the present invention relate to the field of communications, and in particular, to a data packet forwarding method and device.
  • SFC Service Function Chaining
  • the Network Service Header is an extended message header format designed specifically for the service chain by the Internet Engineering Task Force (IETF) SFC Working Group.
  • the data packet transmitted on the service chain is encapsulated with an NSH.
  • the NSH includes a Service Path ID (SPI) and a Service Index (SI) of the data packet.
  • SPI Service Path ID
  • SI Service Index
  • a forwarding table is stored in the SFF, and the forwarding table indicates the next hop device corresponding to the SPI and the SI in the data packet.
  • the SFF may determine, according to the SPI and the SI in the data packet, the next hop device corresponding to the data packet from the forwarding table, and after the SI in the data packet is decremented by one, the data packet is sent to the next.
  • One hop device may be determined, according to the SPI and the SI in the data packet, the next hop device corresponding to the data packet from the forwarding table, and after the SI in the data packet is decremented by one, the data packet is sent to the next. One
  • the SPI flow table corresponding to the path of each service chain in the prior art needs to be stored in all SFFs corresponding to the path.
  • the embodiment of the present invention provides a data packet forwarding method and device, which are used to reduce the forwarding table entries on the SFF and improve the forwarding efficiency of the SFF.
  • the embodiment of the present application provides a data packet forwarding method, where the method includes: receiving a data packet of a service chain, where the network service header NSH of the data packet includes a first service chain path identifier SPI and a a service index SI; the data message further includes a second SPI; the first SPI is used to indicate the first service chain path, and the second SPI is used to indicate the second service chain path, the first service chain path and the second service chain path are at least Partially coincident.
  • the first SPI is the SPI of the service chain path in which the data packet is currently located
  • the second SPI is the SPI of the service chain corresponding to the service flow to which the data packet added by the SC is the data packet.
  • the NSH encapsulation information includes a jump information and a type tag; and the type flag indicates when the packet is forwarded according to the forwarding entry Type of operation.
  • the next hop address may be an address of the SF, the SFF, or the PS.
  • the forwarding table is calculated by the service chain controller according to the deployment of the service chain and sent to each forwarding device.
  • the NSH is re-encapsulated according to the NSH encapsulation information, and the data packet re-packaged by the NSH is sent to the next hop address.
  • the SI in the data packet is decremented by one.
  • receiving the data packet sent by the service function SF decrementing the first SI in the data packet by one.
  • the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control.
  • the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.
  • the type tag in the embodiment of the present application may include the indicated operation type as a merged type tag and the indicated operation type as a separate type tag. If the operation type indicated by the type tag is merged, and the jump information includes the target SPI and the target SI, re-encapsulating the NSH according to the NSH encapsulation information, including: updating the first SPI in the NSH by using the target SPI; updating by using the target SI The first SI in the NSH; wherein the combined operation type is further used to indicate that the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path. In this manner, when the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path, the second service chain path can reuse the first service chain in the forwarding table. The entry of the path.
  • the NSH is re-packaged according to the NSH encapsulation information, including: obtaining the NSH encapsulation information.
  • the target SPI and the target SI when the target SPI and the second SPI are the same, use the target SPI to update the first SPI in the NSH; use the target SI to update the first SI in the NSH; wherein the separated operation type is also used to indicate
  • the next hop address of the data packet on the second service chain path is different from the next hop address of the data packet on the first service chain. In this manner, when the next hop address of the data packet on the second service chain path and the next hop address on the first service chain path are not available, the second service chain path and the first service chain path may be respectively used in the forwarding table. Their respective entries.
  • the first SPI is located in the SPI field of the NSH of the data packet, where the first SI is located in the SI field of the NSH of the data packet, and the second SPI is located in the context header of the NSH of the data packet. Since forwarding is performed according to the first SPI and the first SI, it is often necessary to access the first SPI and the first SI, and placing the first SPI and the first SI into the header may reduce the access delay.
  • the embodiment of the present application provides a data packet forwarding device, where the data packet forwarding device includes a memory, a communication interface, and a processor, where: the memory is used to store an instruction; the processor is configured to execute the memory storage instruction, and control
  • the communication interface receives or transmits a data message, and when the processor executes the instruction stored in the memory, the data message forwarding device is configured to perform the method of any of the first aspect or the first aspect.
  • the embodiment of the present application provides a data packet forwarding device, which is used to implement the method in any of the foregoing first aspect or the first aspect, where the data forwarding device includes a corresponding function module, which is used to implement The steps in the above method.
  • an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores instructions that, when run on a computer, cause the computer to perform any of the first aspect or the first aspect. The method in the implementation.
  • an embodiment of the present application provides a computer program product comprising instructions, when executed on a computer, causing the computer to perform the method in the first aspect or any possible implementation manner of the first aspect.
  • the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control.
  • the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.
  • FIG. 1 is a schematic diagram of a service chain system architecture applicable to an embodiment of the present application
  • FIG. 1 is a schematic flowchart of a method for processing a data packet by an NSH Proxy according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a data packet forwarding method according to an embodiment of the present disclosure
  • FIG. 2a is a schematic structural diagram of an NSH according to an embodiment of the present application.
  • FIG. 2b is a schematic structural diagram of another NSH according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of a forwarding table on an SFF according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a service chain according to an embodiment of the present application.
  • Figure 5 is a two-tailed business chain path provided based on the structure shown in Figure 4;
  • 5a-5c are schematic structural diagrams of a forwarding table stored on the SFF 212, the SFF 213, and the SFF 214, respectively, based on the service chain path shown in FIG. 5 in the prior art;
  • FIG. 5 is a schematic structural diagram of a forwarding table stored on the SFF 212, the SFF 213, and the SFF 214 according to the service chain shown in FIG. 5 according to the embodiment of the present application;
  • FIG. 6 is a service chain path in which two headers and a tail are coincident based on the structure shown in FIG. 4;
  • FIG. 6 is a schematic structural diagram of a forwarding table stored on the SFF 212, the SFF 213, and the SFF 214 according to the service chain path shown in FIG. 6 according to the embodiment of the present application;
  • Figure 7 is a two-headed business chain path provided based on the structure shown in Figure 4;
  • FIG. 7 is a schematic structural diagram of a forwarding table stored on the SFF 212, the SFF 213, and the SFF 214 according to the service chain path shown in FIG. 7 according to the embodiment of the present application;
  • FIG. 8 is a schematic structural diagram of a data packet forwarding device
  • FIG. 9 is a schematic structural diagram of another forwarding device for data packets.
  • FIG. 1 is a schematic diagram showing a service chain system architecture applicable to an embodiment of the present application. As shown in FIG. 1, the service chain architecture in the embodiment of the present application is mainly composed of the following key components.
  • Service Chain Collaboration Layer (SFC Orchestrator) 101 Mainly complete the basic resource configuration required to provide service chain services, including SC, SFF, and Service Node (SN) configuration, SF and SFF network connection coordination, and SF service. Functions such as policy configuration are a unified entry for the characteristics of the service chain.
  • SC Service Chain Collaboration Layer
  • SN Service Node
  • Functions such as policy configuration are a unified entry for the characteristics of the service chain.
  • Service Chain Controller (SFC Controller) 102 A network control function that implements the characteristics of the service chain, including functions such as overlay network management and service chain path calculation and forwarding table delivery required by the service chain, and provides interfaces and clouds in the north.
  • the management platform or the service chain collaboration layer 101 is docked, and the south interface can be connected to the SC, the SFF, and the PS through an open source streaming (Openflow) or network configuration (Netconf) interface.
  • Openflow Openflow
  • NetworkConconf network configuration
  • SC103 Receives a data packet from a non-SFC network and classifies the packet, matches the corresponding service chain, encapsulates the data packet, and forwards the encapsulated data packet to the service chain.
  • the SC can be divided into two (outbound) and inbound (inbound) SCs.
  • the SCs in both directions can be the same device.
  • the SC and SFF can be deployed on the same device.
  • the SFF 104 and the SFF 105 are responsible for forwarding the data packets introduced by the SC into the service chain along a predefined service chain path, and the SFF 105 forwards the message to the PS at the end of the service chain; and integrates the network service host proxy function. That is, the NSH-unaware type SF proxy performs NSH decapsulation and encapsulation on the packet and updates the information in the NSH.
  • Service Function (SF) instances SF107, SF108, SF109, and SF110 are exclusive to the tenant, that is, different tenants do not use the same SF instance.
  • the SF instance is usually a virtual resource, such as a vsys instance.
  • the data message is received from the SFF and the received data message is processed by applying the service policy, and the processed data message is returned to the SFF.
  • SN111 and SN112 SF containers, which may be network service devices supporting physical network function (PNF) or virtual network function (VNF).
  • PNF physical network function
  • VNF virtual network function
  • the SN can support single SF instance or multiple SF instance mode work.
  • VLAN virtual local area network
  • VXLAN virtual extensible local area network
  • PS106 Post Service: The tail server of the service chain, that is, the destination device that the data packet needs to reach after passing through the service chain.
  • the PS and SFF can be deployed on the same device.
  • the SC 103 receives the data packet from the non-SFC network, and the data packet may be a VXLAN packet, a Generic Routing Encapsulation (GRE) packet, or an Ethernet Ethernet Port (ETH) packet.
  • the data packet is a VXLAN packet.
  • the SC After receiving the data packet encapsulated by the VXLAN, the SC decapsulates the VXLAN, determines the traffic classifier corresponding to the data packet, determines the service chain matching the traffic classifier, and then performs the network service header for the data packet encapsulated by the VXLAN ( English: network service header (NSH) encapsulation, that is, encapsulating NSH for the data packet encapsulated by VXLAN, and then performing VXLAN encapsulation on the data packet encapsulating the NSH (that is, adding a VXLAN packet header), and then according to the forwarding table,
  • NSH network service header
  • the SFF 104 de-packs the VXLAN, decapsulates the NSH, and finds the SPI and the SI according to the SPI and SI lookup forwarding tables in the NSH.
  • the next hop address the data packet is re-encapsulated in the NSH and VXLAN, and then the data packet encapsulated in the NSH and VXLAN is forwarded to the next hop address; the next hop address is the address of the SF107.
  • the SFF 104 forwards the data packet of the NSH and the VXLAN to the SF107.
  • the SF107 decapsulates the VXLAN, decapsulates the NSH, processes the data packet, and re-processes the processed data packet.
  • the NSH encapsulation and VXLAN encapsulation data packets are returned to the SFF 104.
  • the SFF 104 receives the re-performed NSH encapsulation and VXLAN encapsulation data message returned by the SF 107, de-packs the VXLAN, de-packets the NSH, and decrements the SI, and determines the next table according to the SPI and the reduced SI lookup table.
  • the hop address which is the address of the SF108.
  • the data message is forwarded to the PS.
  • the SFF 105 may determine that the next hop needs to jump to the PS according to the content in the forwarding table, and the SFF 105 may search the routing table according to the destination IP address in the original data packet and forward the packet to the PS.
  • the SF 107 is an SF supporting the NSH encapsulation. If the SF 107 is an SF that does not support the NSH encapsulation, an NSH proxy needs to be added between the SFF 104 and the SF 107. character of.
  • Figure 1a is a schematic diagram showing the flow of processing data packets by the NSH proxy 1205 in the embodiment of the present application.
  • the SF1203 output of the NSH is not supported for data packets sent from the SF 1203 that does not support the NSH to the SFF 1207.
  • the data packet is a data packet that is not encapsulated in the NSH package 1204, and is then encapsulated in the NSH by the NSH proxy 1205.
  • the data packet transmitted by the NSH proxy 1205 to the SFF 1207 is a data packet for the NSH package 1206, and then transmitted to the network by the SFF 1207. 1208.
  • the SFF 1207 For the data packet sent from the SFF 1207 to the SF 1203 that does not support the NSH, the SFF 1207 transmits the data packet of the NSH package 1206 to the NSH proxy 1205, and the NSH proxy 1205 removes the NSH encapsulation of the data packet, and the obtained NSF package is obtained.
  • the data packet of the NSH package 1204 is sent to the SF 1203 that does not support the NSH.
  • the SF 1201 supporting the NSH performs NSH encapsulation 1202 on the data message, and then directly transmits it to the SFF 1207, and transmits it to the network 1208 by the SFF 1207;
  • the SFF 1207 directly transmits the data packet of the NSH package 1202 to the SF 1201 supporting the NSH.
  • the NSH proxy 1205 in the service chain network is a logical role and can be concurrently served by SFF.
  • SFF the table items required for SFF to restore NSH encapsulation as the SFC mapping table.
  • the SFC Controller sends an NSH flow table (including a forwarding table and a mapping table) to the SFF and the SC, so that the SFF and the SC forward the data packet of the service chain according to the NSH flow table to complete the processing of the service chain.
  • FIG. 2 is a schematic flowchart showing a data packet forwarding method according to an embodiment of the present disclosure. As shown in FIG. 2, the method is performed by a forwarding device, and the forwarding device may be the SFF in FIG. 1. The method includes :
  • Step 201 The forwarding device receives the data packet, where the network service header NSH of the data packet includes a first SPI, a first SI, and a second SPI, where the first SPI is used to indicate the first service chain. a path, where the second SPI is used to indicate a second service chain path, where the first service chain path and the second service chain path at least partially overlap.
  • the forwarding device may receive the data packet from the service classifier SC, or may receive the data packet from another forwarding device.
  • the first SPI is the SPI of the service chain path in which the data packet is currently located
  • the second SPI is the service flow to which the data packet to which the service classifier SC adds the data packet belongs.
  • SPI of the business chain That is, when the SC receives the data packet, the service chain corresponding to the data packet is determined, the SPI corresponding to the service chain is obtained, and then the SPI and the initial SI (for example, 255) are added to the data.
  • the message is encapsulated in the NSH.
  • the service chain corresponding to the data packet is determined, and the identifier of the service flow to which the data packet belongs is obtained according to the preset flow rule, and the flow mapping on the SC is searched according to the identifier of the obtained service flow.
  • the table obtains the identifier of the service chain path corresponding to the identifier of the service flow.
  • Each entry of the flow mapping table includes an identifier of the service flow and an identifier of the service chain path.
  • the SI in the data packet is decremented by one.
  • Step 202 The forwarding device determines, according to the forwarding table, a next hop address and an NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI; the NSH encapsulation information includes a jump information and a type tag; and the type tag indicates the forwarding entry according to the forwarding entry. The type of operation when forwarding a message.
  • the next hop address may be an address of the SF, the SFF, or the PS.
  • the forwarding table is calculated by the service chain controller according to the deployment situation of the service chain and sent to each forwarding device.
  • Step 203 The forwarding device re-encapsulates the NSH as a data packet according to the NSH encapsulation information.
  • Step 204 The forwarding device sends the data packet re-packaging the NSH to the next hop address.
  • the forwarding device sends the data packet of the re-encapsulated NSH to the next hop address.
  • the forwarding device includes the NSH.
  • the function of the proxy the forwarding device will re-encapsulate the NSH in the data packet of the NSH, and then send the data packet to the next hop address.
  • the forwarding device directly sends the data packet encapsulating the NSH to the next hop address.
  • the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control.
  • the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.
  • the data packet after the NSH encapsulation provided by the embodiment of the present application can be carried in multiple types of packets.
  • the NSH is carried in various overlay packages such as VXLAN, GRE, and ETH.
  • NSH currently has two package formats.
  • 2a and 2b are schematic diagrams showing the structure of two NSHs provided by the embodiments of the present application.
  • the NSH includes protocol version information and length information 2100, and a format indication bit 2101.
  • the format indication bit 2101 of the NSH in FIG. 2a is 0x1
  • the NSH in FIG. 2a includes the next protocol 2102.
  • the field, along with the SPI2103 field and the service index SI2104 field, also includes a plurality of fixed length context headers, and context header-2108 is shown in Figure 2a.
  • the first SPI and the first SI can be placed in SPI2103 and SI2104 in Figure 2a, while the second SPI can be placed in a fixed length context header.
  • the NSR has the next protocol 2102 field, which is used to carry the data packet protocol, and the NSH can carry the Layer 2 user packet and the Layer 3 user packet through the next protocol (next protocol) field. .
  • the NSH in another encapsulation format of the NSH, includes protocol version information and length information 2200, and a format indication bit 2201.
  • the format indication bit 2201 of the NSH in FIG. 2b is 0x2, in FIG. 2a.
  • the NSH includes a variable length context header 2205 in addition to the next protocol 2202 field, and the SPI2203 field and the service index SI2204 field.
  • the first SPI and the first SI can be placed in SPI 2203 and SI 2204 in Figure 2b, while the second SPI can be placed in a variable length context header 2205.
  • the service flow corresponding to the data packet is determined according to the traffic classification rule on the SC, and the service chain corresponding to the service flow is determined, and the data packet is NSH encapsulated according to the service chain corresponding to the service flow.
  • the SFF receives the forwarding table sent by the SFC, and forwards the received data packet according to the forwarding table. Specifically, the SFF identifies the first SPI and the first SI in the NSH header in the data packet when receiving the data packet, and searches the forwarding table according to the first SPI and the first SI, and forwards the data packet encapsulated by the NSH to the data packet.
  • the next hop (SF or SFF) specified in the forwarding table exemplarily shows a forwarding table on an SFF.
  • each entry of the forwarding table includes SPI, SI, next hop address, transport protocol, and type flag.
  • the transport protocol points to the next hop device to send a data packet
  • the packet should be encapsulated in the encapsulation format corresponding to the transport protocol.
  • the use of the transport protocol in the forwarding table in this application is the same as in the prior art. Therefore, in the following description, the forwarding protocol related content does not appear in the forwarding table of the present application.
  • Flag is used to define the type of next hop.
  • the type of the next hop indicated by the flag may include two types: null information (NA) and normal route forwarding (GoTo).
  • NA null information
  • GoTo normal route forwarding
  • the flag in the solution provided by the embodiment of the present application may also indicate two other types, namely, combining (combination) and separating (English: separate).
  • the operation type indicated by the type tag is merge, and the jump information includes the target SPI and the target SI, and the NSH is re-encapsulated for the data message according to the NSH encapsulation information, including: updating the first SPI in the NSH using the target SPI; and updating the NSH using the target SI The first SI; wherein the merged operation type is further used to indicate that the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path.
  • the operation type indicated by the type tag is separated, and the jump information includes the target SPI and the target SI, and the first SPI and the second SPI are different, and the NSH is re-packaged according to the NSH encapsulation information, including: obtaining the NSH encapsulation information.
  • the target SPI and the target SI when the target SPI and the second SPI are the same, use the target SPI to update the first SPI in the NSH; use the target SI to update the first SI in the NSH; wherein the separated operation type is also used to indicate:
  • the next hop address of the data packet on the second service link path is different from the next hop address of the data packet on the first service chain.
  • the data packet is directly forwarded to the next hop address.
  • FIG. 4 exemplarily shows a schematic diagram of a service chain provided by an embodiment of the present application.
  • the service function classifier SC211, the service function forwarder SFF212, the SFF213, the SFF214, and the service chain tail server PS215 may form a plurality of service chains.
  • the service function SF216 connected to the SFF 212, the service connected to the SFF 213, and the SF 220 and the SF 221 connected to the SFF 214 and the SF 221 support the NSH encapsulation.
  • FIG. 5 based on the service chain shown in FIG. 4, it is assumed that there are two service chain paths whose tails coincide.
  • FIG. 5a, FIG. 5b, and FIG. 5c respectively exemplarily show that when there are two service chain paths of SPI0 and SPI1, the prior art SFF212, SFF213, and SFF214 Schematic diagram of the stored forwarding table.
  • the NSH package information includes the type flag flag shown in FIG.
  • the NSH encapsulation information in the prior art includes a flag.
  • a Context is added to the NSH encapsulation information, and a Context is used to store the jump information. For storage type tags.
  • the forwarding table generated by using the solution provided by the embodiment of the present application is as shown in FIG. 5d, FIG. 5e and FIG. 5f.
  • a second SI may also be set, and the second SI is also placed in the context header.
  • the example in which the second SI is included in FIGS. 5d to 5f in the following example is exemplified.
  • the forwarding table calculated by SFC for SFF212 includes both the forwarding entry corresponding to SPI0 and the forwarding entry corresponding to SPI1.
  • the first SPI is 0, and the next hop corresponding to the data packet with the first SI being 255 is the IP address ⁇ 1.1.1.1 ⁇ of the SF216, the first SPI is 0, and the first SI is 254.
  • the next hop corresponding to the data packet is the IP address of SFF213 ⁇ 10.1.2.1 ⁇ ; the first SPI is 1, and the next hop corresponding to the data packet with the first SI being 255 is the IP address of SF2173 ⁇ 1.1.2.1 ⁇ ; Since the two paths in FIG.
  • the first SPI is 1, and the data packet with the first SI of 254 can be forwarded along the path of SPI0 after reaching the SFF 213, and its corresponding transfer
  • the type tag of the published item indicates that the subsequent operation type is merge, and the jump information is ⁇ target SPI: 0, target SI: 254 ⁇ .
  • the forwarding entry corresponding to SPI0 is included in the forwarding table of the SFF 213 of the SPI1.
  • the first SPI is 0, and the next hop corresponding to the data packet of the first SI is 254 is the IP address ⁇ 1.1.3.1 ⁇ of the SF218.
  • the first SI is decremented by one and the second SI is decremented by one.
  • the information in the data message is updated as follows: the first SPI is 0, the first SI is 253, the second SPI is 0, and the second SI is 253.
  • the first SPI is 0, and the next hop corresponding to the data packet of the first SI is 253 is the IP address ⁇ 1.1.4.1 ⁇ of the SF219.
  • the first SI is used.
  • Subtract one the second SI is reduced by one.
  • the information in the data message is updated as follows: the first SPI is 0, the first SI is 252, the second SPI is 0, and the second SI is 252.
  • the first SPI is 0, and the next hop corresponding to the data packet with the first SI being 252 is the IP address ⁇ 10.1.3.1 ⁇ of the SFF214.
  • the forwarding table of SFF214 of Figure 5f Since SPI0 and SPI1 are still merged on SFF214, in the forwarding table of SFF214 of Figure 5f, only the forwarding entry corresponding to SPI0 is available.
  • the first SPI is 0, and the next hop corresponding to the data packet with the first SI being 252 is the IP address ⁇ 1.1.5.1 ⁇ of the SF220.
  • the first SI is decremented by one, and the second SI is decremented by one.
  • the information in the data packet is updated as follows: the first SPI is 0, the first SI is 251, the second SPI is 0, and the second SI is 251.
  • the first SPI is 0, and the next hop corresponding to the data packet of the first SI is 251 is VRFn (SFC), and the data packet is directly sent to the PS that sends the data packet to the SPI0.
  • VRFn SFC
  • FIGs 5 to 7 represents the last hop.
  • the first SPI and the first SI are updated to SPI:0, SI:254 in the NSH encapsulation information of the SPI1 in the SFF 212, subsequent need in FIG. 5e and FIG. 5f
  • the path of the SPI1 is separately stored, and the data packet of the SPI1 is directly taken to the path of the SPI0. It can be seen that, by using the solution provided by the embodiment of the present application, the coincidence path is indicated by the first SPI, and the path information in the forwarding table can be reused. Therefore, the number of entries in the forwarding table is reduced, thereby reducing the memory usage of the forwarding table.
  • the SF nodes support the NSH encapsulation. As shown in FIG. 6, there are two service chain paths in which the header and the tail overlap, but the middle portions do not coincide.
  • each forwarding path is stored in the forwarding table stored in the SFF. As shown in FIG. 5a-5c, the forwarding table entries are more.
  • FIGS. 6a, 6b, and 6c Based on the service chain path shown in FIG. 6, the forwarding tables generated by the SFC for the SFF 212, SFF 213, and SFF 214 are shown in FIGS. 6a, 6b, and 6c, respectively.
  • SPI2 The path of SPI2 is completely described in FIG. 6a to FIG. 6c, and details are not described herein again.
  • SPI3 will be described in detail below with reference to FIG. 6a to FIG. 6c:
  • the SFF 212 finds that the operation type indicated by the type tag in the corresponding forwarding table is separated, and the jump information is If it is not empty, it is determined that the data packet needs to be forwarded to another service chain path, and then the first SPI in the data packet is modified according to the jump information ⁇ target SPI:3, target SI: 254 ⁇ , and the modification is performed.
  • the first SI in the data packet is 254, and the modified data packet is forwarded according to the modified first SPI and the first SI.
  • the first SPI in the data packet of the SPI3 is 3, and the next hop corresponding to the first SI is 254 is the IP address ⁇ 1.1.4.1 ⁇ of the SF219, and the data packet is in the data packet.
  • the first SI is decremented by one.
  • the information in the data packet is updated as follows: the first SPI is 3, the first SI is 253, and the second SPI is 3.
  • the first SPI is 3, the first SI is 253, and the next hop corresponding to the second SPI is 3 is the IP address ⁇ 10.1.3.1 ⁇ of the SFF214.
  • the operation type indicated by the type tag in the corresponding NSH package information is merge, and the target SPI information is SPI2, and the target SI information is SI253.
  • the first SPI in the NSH is updated using the target SPI information; the first SI in the NSH is updated using the target SI information.
  • the updated SPI3 data message the first SPI is 2, the first SI is 253, and the second SPI is 3.
  • the first SPI in the data packet of the SPI3 is 2, and the next hop corresponding to the first SI is 253 is the IP address ⁇ 1.1.5.1 ⁇ of the SF220, and the data packet is in the data packet.
  • the first SI is decremented by one.
  • the information in the data message of SPI3 is updated as follows: the first SPI is 2, the first SI is 252, and the second SPI is 3. Since the first SPI is 2, and the next hop corresponding to the data message of the first SI is 252 is VRFn (SFC), the data message is directly sent to the PS of SPI3.
  • the SPI3 need not be stored in the forwarding table of FIG. 6a.
  • the SI is 255, the corresponding forwarding entry is used.
  • the SPI2 forwarding entry can be multiplexed.
  • the operation type is a separate type flag in FIG. 6a, the SPI3 is used.
  • the first SI in the data packet NSH of SI254 is restored to SPI3, and the SI is modified to SI254.
  • the data packets of SPI2 and SPI3 can go their respective paths, further, due to FIG. 6b.
  • the first SPI is modified to SPI2
  • the first SI is modified to SI253. Therefore, in FIG. 6c, it is not necessary to store the path information of SPI3, and only the path information of SPI2 can be multiplexed.
  • Forward SPI3 data packets It can be seen that the coincidence path is indicated by the first SPI, which can implement multiplexing of path information in the forwarding table, thereby reducing the number of entries in the forwarding table, thereby reducing the memory usage of the forwarding table.
  • each forwarding path is stored in the forwarding table stored in the SFF. As shown in the example, the forwarding table entries are more.
  • FIGS. 7a, 7b, and 7c the forwarding tables generated by the SFC for the SFF 212, SFF 213, and SFF 214 are shown in FIGS. 7a, 7b, and 7c, respectively.
  • SPI4 The path of SPI4 is completely described in FIG. 7a to FIG. 7c, and details are not described herein again.
  • SPI5 will be described in detail below with reference to FIG. 7a to FIG. 7c:
  • the first SPI in the data packet of SPI5 is 4, and the first SI is 255.
  • the second SPI is 5.
  • the next hop corresponding to the data packet is the IP address ⁇ 1.1.1.1 ⁇ of the SF216.
  • the first SI is decremented by one.
  • the information of the data packet is updated as follows: the first SPI is 4, the first SI is 254, and the second SPI is 5.
  • the first SPI is 4, and the next hop corresponding to the data packet of the first SI is 254 is the IP address ⁇ 10.1.2.1 ⁇ of the SFF213.
  • the first SPI in the data packet of the SPI5 is 4, and the next hop corresponding to the first SI is 254 is the IP address ⁇ 1.1.3.1 ⁇ of the SF218, and the data packet is in the data packet.
  • the first SI is decremented by one.
  • the information in the data packet is updated as follows: the first SPI is 4, the first SI is 253, and the second SPI is 5.
  • the first SPI is 4, and the next hop corresponding to the data packet whose first SI is 253 is the IP address ⁇ 1.1.4.1 ⁇ of the SF219.
  • the first SI is decremented by one.
  • the information in the data message is updated as follows: the first SPI is 4, the first SI is 252, and the second SPI is 5.
  • the first SPI is 4, and the next hop corresponding to the data packet with the first SI of 252 is the IP address ⁇ 10.1.3.1 ⁇ of the SFF214.
  • the operation type indicated by the type tag in the corresponding NSH package information is separated. Since the first SPI and the second SPI of the data message are different, and the second SPI is the same as the target SPI, the target SPI is used to update the first in the NSH.
  • the SPI updates the first SI in the NSH using the target SI. In the updated data message of SPI5, the first SPI is 5, the first SI is 252, the second SPI is 5, and the first SI is 252.
  • the first SPI is 5, and the next hop corresponding to the data packet with the first SI being 252 is the IP address ⁇ 1.1.5.1 ⁇ of the SF220.
  • the first SI is used. minus one.
  • the information in the data packet is updated as follows: the first SPI is 5, the first SI is 251, and the second SPI is 5. Since the first SPI in the data packet of SPI5 is 5, and the next hop corresponding to the first SI is 251 is VRFn (SFC), the data packet is directly sent to the PS of SPI5.
  • the SC when the SC performs NSH encapsulation on the data packet of the SPI5, the first SPI is encapsulated into SPI4, and the first SI is encapsulated as SI255. Therefore, in the forwarding table of FIG. 7a and FIG. 7b. It is not necessary to store the information of SI255 to SI253 of SPI5, and the information of SPI4 can be multiplexed. Further, since the type of operation indicated in FIG. 7b is a separate type flag, the first SI outside the data message of SI252 of SPI5 is used. Restore to SPI5 and restore SI to SI252, so SPI4 and SPI5 can follow their respective paths in the forwarding table of SFF214 in Figure 7c.
  • the coincidence path is indicated by the first SPI, and the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, thereby reducing the memory usage of the forwarding table.
  • the RSP path may be generated by the SFC controller according to a service function path (SFP) of the client.
  • SFP service function path
  • the at least two RSPs with the longest coincidence path are queried from the existing multiple RSP paths, and the forwarding flow table is delivered to the corresponding SFF according to the at least two RSPs. Specifically, it is divided into the following cases:
  • At least two service chain paths coincident with the tail in the forwarding flow table on the previous SFF of the coincidence path: each of the at least two service chain paths that overlap in the tail except the target service link
  • the operation type indicated by the type flag in the NSH encapsulation information corresponding to the SPI and SI of the link is set to merge, and the target SPI and the target SI are added; the target SPI and the target SI are the SPI and SI of the service link to be switched to.
  • the forwarding flow table on the last SFF of the head end coincidence path the target service chain in at least two service chain paths where the head end and the tail overlap
  • the NSH encapsulation information corresponding to the SPI and SI of each service link except the target service link in the at least two service chain paths where the head end and the tail overlap The type of operation indicated by the medium type flag is set to merge and the target SPI and target SI are added; the target SPI and the target SI are the SPI and SI of the service link to be switched to.
  • the operation type indicated by the type flag in the NSH package information corresponding to the SPI and the SI is set to be separated.
  • the existing service chain forwarding table is reused in a scenario where a large number of service chain paths are overlapped, and the number of forwarding entries of all SFF nodes in the service chain path is reduced, and the SFF can be quickly matched. Publish and forward, improve the forwarding performance of service chain equipment, and reduce equipment costs.
  • the extended NSH can also carry other service information therein, and all the SFF nodes can share the information carrying the service to expand the service.
  • FIG. 8 is a schematic structural diagram of a data packet forwarding device provided by the present application.
  • the forwarding device 800 includes a receiving unit 801, a processing unit 802, and a transmitting unit 803.
  • the receiving unit 801 in the embodiment of the present application is configured to receive a data packet of a service chain.
  • the NSR of the data packet includes a first SPI and a first SI
  • the data packet further includes a second SPI.
  • the first SPI is used to indicate a first service chain path
  • the second SPI is used to indicate a second service chain path.
  • the first service chain path and the second service chain path at least partially coincide.
  • the first SPI is the SPI of the service chain path in which the data packet is currently located
  • the second SPI is the SPI of the service chain corresponding to the service flow to which the data packet added by the SC is the data packet.
  • the processing unit 802 is configured to determine, according to the forwarding table, a next hop address and an NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI, and re-encapsulate the NSH according to the NSH encapsulation information; the NSH encapsulation information includes the hopping The information and type tag; the type tag indicates the type of operation when forwarding the message according to the forwarding entry.
  • the next hop address may be an address of the SF, the SFF, or the PS.
  • the forwarding table is calculated by the service chain controller according to the deployment of the service chain and sent to each forwarding device.
  • the sending unit 803 is configured to send the data packet of the re-packaged NSH to the next hop address.
  • the SI in the data packet is decremented by one.
  • the receiving unit 801 is specifically configured to: receive the data packet sent by the service function SF
  • the processing unit 802 is further configured to: if the data packet sent by the service function SF is received by the receiving unit 801, the data packet is sent The first SI in the first one is reduced by one.
  • the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control.
  • the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.
  • the type tag in the embodiment of the present application may include the indicated operation type as a merged type tag and the indicated operation type as a separate type tag. If the operation type indicated by the type tag is merge, and the jump information includes the target SPI and the target SI, the processing unit 802 is configured to: update the first SPI in the NSH using the target SPI; and update the first SI in the NSH using the target SI; The merged operation type is further used to indicate that the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path.
  • the processing unit 802 is configured to: acquire the target SPI and the target SI in the NSH package information. Updating the first SPI in the NSH using the target SPI when the target SPI and the second SPI are the same; updating the first SI in the NSH using the target SI; wherein the separated operation type is further used to indicate that the data message is in the second The next hop address on the service chain path is different from the next hop address of the data packet on the first service chain.
  • the first SPI is located in the SPI field of the NSH of the data packet, where the first SI is located in the SI field of the NSH of the data packet, and the second SPI is located in the context header of the NSH of the data packet. Since forwarding is performed according to the first SPI and the first SI, it is often necessary to access the first SPI and the first SI, and placing the first SPI and the first SI into the header may reduce the access delay.
  • each unit above is only a division of a logical function, and the actual implementation may be integrated into one physical entity in whole or in part, or may be physically separated.
  • the receiving unit 801 and the sending unit 803 may be implemented by a communication interface, and the processing unit 802 may be implemented by a processor.
  • FIG. 9 is a schematic structural diagram of a data packet forwarding device provided by the present application.
  • the forwarding device 900 includes a processor 901, a memory 903, and a communication interface 902; wherein the processor 901, the memory 903, and the communication interface 902 are connected to each other through a bus 904.
  • the bus 904 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 9, but it does not mean that there is only one bus or one type of bus.
  • the memory 903 may include a volatile memory such as a random-access memory (RAM); the memory may also include a non-volatile memory such as a flash memory (flash) Memory), hard disk drive (HDD) or solid-state drive (SSD); the memory 410 may also include a combination of the above types of memory.
  • RAM random-access memory
  • non-volatile memory such as a flash memory (flash) Memory), hard disk drive (HDD) or solid-state drive (SSD)
  • the memory 410 may also include a combination of the above types of memory.
  • the communication interface 902 can be a wired communication access port, a wireless communication interface, or a combination thereof, wherein the wired communication interface can be, for example, an Ethernet interface.
  • the Ethernet interface can be an optical interface, an electrical interface, or a combination thereof.
  • the wireless communication interface can be a WLAN interface.
  • the processor 901 can be a central processing unit (CPU), a network processor (NP) or a combination of a CPU and an NP.
  • CPU central processing unit
  • NP network processor
  • the processor 901 may further include a hardware chip.
  • the hardware chip may be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL) or any combination.
  • the memory 903 can also be used to store program instructions, and the processor 901 calls the program instructions stored in the memory 903, and can perform one or more steps in the embodiment shown in FIG. 2, or an optional implementation thereof.
  • the forwarding device 900 is implemented to implement the functions of the forwarding device in the above method.
  • the processor 901 is configured to determine, according to the forwarding table, the next hop address and the NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI, and re-encapsulate the NSH according to the NSH encapsulation information.
  • the NSH encapsulation information includes a jump information and a type tag; the type flag indicates an operation type when the packet is forwarded according to the forwarding entry.
  • the next hop address may be an address of the SF, the SFF, or the PS.
  • the forwarding table is calculated by the service chain controller according to the deployment of the service chain and sent to each forwarding device.
  • the communication interface 902 is configured to send the data packet of the re-packaged NSH to the next hop address.
  • the processor 901 is further configured to: if the data message sent by the service function SF is received through the communication interface 902, the first SI in the data packet is decremented by one.
  • the communication interface 902 is configured to receive a data packet of the service chain.
  • the NSH of the data packet includes a first SPI and a first SI, and the data packet further includes a second SPI.
  • the first service chain path is indicated, and the second SPI is used to indicate the second service chain path, where the first service chain path and the second service chain path at least partially overlap.
  • the first SPI is the SPI of the service chain path in which the data packet is currently located
  • the second SPI is the SPI of the service chain corresponding to the service flow to which the data packet added by the SC is the data packet.
  • the communication interface 902 is configured to: receive a data packet sent by the service function SF.
  • the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control.
  • the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.
  • the type tag in the embodiment of the present application may include the indicated operation type as a merged type tag and the indicated operation type as a separate type tag. If the operation type indicated by the type tag is merged, and the jump information includes the target SPI and the target SI, the processor 901 is configured to: update the first SPI in the NSH by using the target SPI; and update the first SI in the NSH by using the target SI; The merged operation type is further used to indicate that the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path.
  • the processor 901 is configured to: acquire the target SPI and the target SI in the NSH package information. Updating the first SPI in the NSH using the target SPI when the target SPI and the second SPI are the same; updating the first SI in the NSH using the target SI; wherein the separated operation type is further used to indicate that the data message is in the second The next hop address on the service chain path is different from the next hop address of the data packet on the first service chain.
  • the first SPI is located in the SPI field of the NSH of the data packet, where the first SI is located in the SI field of the NSH of the data packet, and the second SPI is located in the context header of the NSH of the data packet. Since forwarding is performed according to the first SPI and the first SI, it is often necessary to access the first SPI and the first SI, and placing the first SPI and the first SI into the header may reduce the access delay.
  • embodiments of the invention may be provided as a method, system, or computer program product.
  • embodiments of the invention may be in the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • embodiments of the invention may take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

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

Abstract

The embodiments of the present application relate to the technical field of communications, especially to a method and device for forwarding a data packet, for reducing entries in a forwarding table on an SFF, thereby improving the forwarding efficiency of the SFF. In the embodiments of the present application, a first SPI, an SI and a second SPI are encapsulated in an NSH of a data packet, wherein the first SPI indicates a first service link path currently forwarding the data packet, the second SPI indicates a second service link path specified by a service link controller for a service link where the data packet is located, and the first service path is partially overlapped with the second service path. In the embodiments of the present invention, by means of indicating an overlapped part of a first service link path and a second service link path with a first SPI, path information in a forwarding table can be multiplexed, thus reducing the number of entries in a forwarding table, and thereby reducing the amount of memory occupied by the forwarding table.

Description

一种数据报文的转发方法和设备Data packet forwarding method and device

本申请要求于2017年3月14日提交中国专利局、申请号为201710150395.7、发明名称为“一种数据报文的转发方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on March 14, 2017, the Chinese Patent Office, Application No. 201710150395.7, entitled "A Data Packet Forwarding Method and Apparatus", the entire contents of which are incorporated by reference. In this application.

技术领域Technical field

本申请实施例涉及通信领域,尤其涉及一种数据报文的转发方法和设备。The embodiments of the present invention relate to the field of communications, and in particular, to a data packet forwarding method and device.

背景技术Background technique

随着运营商业务种类的增加,为支持更好的业务体验,需要在网络中部署业务路由网络,并提出了一种业务链(Service Function Chaining,SFC)技术。这种技术通过将多个业务功能链接起来,为灵活的业务处理提供了基础。SFC技术通过业务分类器(Service Classifier,SC)对业务流进行分类,然后通过业务功能转发器(Service Function Forwarder,SFF)将业务链的数据报文沿预先定义的业务链路径进行转发,并在业务链尾端将报文转发给业务链尾服务器(Post Service,PS)。As the types of services of carriers increase, in order to support a better service experience, a service routing network needs to be deployed in the network, and a Service Function Chaining (SFC) technology is proposed. This technology provides the foundation for flexible business processing by linking multiple business functions. The service classifier (SC) classifies the service flow by the service classifier (SC), and then forwards the data packet of the service chain along the predefined service chain path through the service function forwarder (SFF). The end of the service chain forwards the packet to the service chain server (Post Service, PS).

网络业务头(Network Service Header,NSH)是国际互联网工程任务组(The Internet Engineering Task Force,IETF)SFC工作组专门为业务链设计的一种扩展报文头格式。业务链上传输的数据报文封装有NSH,NSH中包括该数据报文的服务路径标识(Service Path ID,SPI)和业务索引(Service Index,SI)。SFF中存储有转发表,转发表指示数据报文中的SPI和SI对应的下一跳设备。SFF可以根据该数据报文中的SPI和SI从转发表中确定该数据报文对应的下一跳设备,并在将该数据报文中的SI减一后,将该数据报文发送到下一跳设备。The Network Service Header (NSH) is an extended message header format designed specifically for the service chain by the Internet Engineering Task Force (IETF) SFC Working Group. The data packet transmitted on the service chain is encapsulated with an NSH. The NSH includes a Service Path ID (SPI) and a Service Index (SI) of the data packet. A forwarding table is stored in the SFF, and the forwarding table indicates the next hop device corresponding to the SPI and the SI in the data packet. The SFF may determine, according to the SPI and the SI in the data packet, the next hop device corresponding to the data packet from the forwarding table, and after the SI in the data packet is decremented by one, the data packet is sent to the next. One hop device.

为了实现数据报文在业务链中的转发,现有技术中每条业务链的路径对应的SPI流表需要存储在该路径对应的所有SFF上,当网络中存在大量的业务链时,会导致SFF上的转发表的表项较多,查找大量表项会降低SFF的转发效率。In order to implement the forwarding of data packets in the service chain, the SPI flow table corresponding to the path of each service chain in the prior art needs to be stored in all SFFs corresponding to the path. When a large number of service chains exist in the network, There are many entries in the forwarding table on the SFF. Searching for a large number of entries reduces the forwarding efficiency of the SFF.

发明内容Summary of the invention

本申请实施例提供一种数据报文的转发方法和设备,用以减少SFF上的转发表的表项,提高SFF的转发效率。The embodiment of the present invention provides a data packet forwarding method and device, which are used to reduce the forwarding table entries on the SFF and improve the forwarding efficiency of the SFF.

第一方面,本申请实施例提供一种数据报文转发方法,该方法包括:接收业务链的数据报文;其中,数据报文的网络业务头NSH中包括第一业务链路径标识SPI以及第一业务索引SI;数据报文还包括第二SPI;第一SPI用于指示第一业务链路径,第二SPI用于指示第二业务链路径,第一业务链路径和第二业务链路径至少部分重合。本申请中,第一SPI为数据报文当前所在业务链路径的SPI,第二SPI为SC为数据报文添加的数据报文所属的业务流对应的业务链的SPI。根据转发表确定第一SPI和第一SI对应的转发表项中的下一跳地址以及NSH封装信息;NSH封装信息包括跳转信息和类型标记;类型标记指示根据转发表项转发报文时的操作类型。其中,下一跳地址可以为SF、SFF 或PS的地址,转发表是业务链控制器根据业务链的部署情况计算并发送给每个转发设备的。根据NSH封装信息为数据报文重新封装NSH;将重新封装NSH的数据报文发送至下一跳地址。本申请实施例中,转发设备每转发一次数据报文,会将该数据报文中的SI减1。可选地,接收业务功能SF发送的数据报文;将数据报文中的第一SI减一。In a first aspect, the embodiment of the present application provides a data packet forwarding method, where the method includes: receiving a data packet of a service chain, where the network service header NSH of the data packet includes a first service chain path identifier SPI and a a service index SI; the data message further includes a second SPI; the first SPI is used to indicate the first service chain path, and the second SPI is used to indicate the second service chain path, the first service chain path and the second service chain path are at least Partially coincident. In this application, the first SPI is the SPI of the service chain path in which the data packet is currently located, and the second SPI is the SPI of the service chain corresponding to the service flow to which the data packet added by the SC is the data packet. Determining a next hop address and an NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI according to the forwarding table; the NSH encapsulation information includes a jump information and a type tag; and the type flag indicates when the packet is forwarded according to the forwarding entry Type of operation. The next hop address may be an address of the SF, the SFF, or the PS. The forwarding table is calculated by the service chain controller according to the deployment of the service chain and sent to each forwarding device. The NSH is re-encapsulated according to the NSH encapsulation information, and the data packet re-packaged by the NSH is sent to the next hop address. In the embodiment of the present application, each time the forwarding device forwards the data packet, the SI in the data packet is decremented by one. Optionally, receiving the data packet sent by the service function SF; decrementing the first SI in the data packet by one.

本申请实施例中,数据报文的NSH中封装了第一SPI、SI以及第二SPI,其中,第一SPI指示当前转发该数据报文的第一业务链路径;第二SPI指示业务链控制器为该数据报文所在的业务链指定的第二业务链路径,第一业务路径与第二业务路径部分重合。本发明实施例通过将第一业务链路径与第二业务链路径重合的部分由第一SPI指示,能够实现转发表中路径信息的复用,从而减少转发表的表项数,进而降低转发表的内存占用量。In the embodiment of the present application, the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control. The second service chain path specified by the service chain in which the data packet is located, where the first service path and the second service path partially overlap. In the embodiment of the present invention, the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.

本申请实施例中类型标记可包括指示的操作类型为合并的类型标记和指示的操作类型为分离的类型标记。若类型标记指示的操作类型为合并,且跳转信息包括目标SPI和目标SI,根据NSH封装信息为数据报文重新封装NSH,包括:使用目标SPI更新NSH中的第一SPI;使用目标SI更新NSH中的第一SI;其中,合并的操作类型还用于指示:数据报文在第二业务链路径上的下一跳地址和在第一业务链路径上的下一跳地址相同。如此,在数据报文在第二业务链路径上的下一跳地址和在第一业务链路径上的下一跳地址相同时,第二业务链路径可复用转发表中的第一业务链路径的表项。The type tag in the embodiment of the present application may include the indicated operation type as a merged type tag and the indicated operation type as a separate type tag. If the operation type indicated by the type tag is merged, and the jump information includes the target SPI and the target SI, re-encapsulating the NSH according to the NSH encapsulation information, including: updating the first SPI in the NSH by using the target SPI; updating by using the target SI The first SI in the NSH; wherein the combined operation type is further used to indicate that the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path. In this manner, when the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path, the second service chain path can reuse the first service chain in the forwarding table. The entry of the path.

若类型标记指示的操作类型为分离,且跳转信息包括目标SPI和目标SI,且第一SPI和第二SPI不同,则根据NSH封装信息为数据报文重新封装NSH,包括:获取NSH封装信息中的目标SPI和目标SI,当目标SPI和第二SPI相同时,使用目标SPI更新NSH中的第一SPI;使用目标SI更新NSH中的第一SI;其中,分离的操作类型还用于指示:数据报文在第二业务链路径上的下一跳地址与数据报文在第一业务链上的下一跳地址不同。如此,在数据报文在第二业务链路径上的下一跳地址和在第一业务链路径上的下一跳地址不时,第二业务链路径和第一业务链路径可分别使用转发表中各自的表项。If the operation type indicated by the type tag is separated, and the jump information includes the target SPI and the target SI, and the first SPI and the second SPI are different, the NSH is re-packaged according to the NSH encapsulation information, including: obtaining the NSH encapsulation information. The target SPI and the target SI, when the target SPI and the second SPI are the same, use the target SPI to update the first SPI in the NSH; use the target SI to update the first SI in the NSH; wherein the separated operation type is also used to indicate The next hop address of the data packet on the second service chain path is different from the next hop address of the data packet on the first service chain. In this manner, when the next hop address of the data packet on the second service chain path and the next hop address on the first service chain path are not available, the second service chain path and the first service chain path may be respectively used in the forwarding table. Their respective entries.

可选地,第一SPI位于数据报文的NSH的SPI字段中,第一SI位于数据报文的NSH的SI字段中,第二SPI位于数据报文的NSH的context header中。由于要根据第一SPI和第一SI进行转发,因此经常需访问第一SPI和第一SI,将第一SPI和第一SI放入头部可减少访问时延。Optionally, the first SPI is located in the SPI field of the NSH of the data packet, where the first SI is located in the SI field of the NSH of the data packet, and the second SPI is located in the context header of the NSH of the data packet. Since forwarding is performed according to the first SPI and the first SI, it is often necessary to access the first SPI and the first SI, and placing the first SPI and the first SI into the header may reduce the access delay.

第二方面,本申请实施例提供一种数据报文转发装置,数据报文转发装置包括存储器、通信接口和处理器,其中:存储器用于存储指令;处理器用于执行存储器存储的指令,并控制通信接口接收或发送数据报文,当处理器执行存储器存储的指令时,数据报文转发装置用于执行上述第一方面或第一方面中任一种方法。In a second aspect, the embodiment of the present application provides a data packet forwarding device, where the data packet forwarding device includes a memory, a communication interface, and a processor, where: the memory is used to store an instruction; the processor is configured to execute the memory storage instruction, and control The communication interface receives or transmits a data message, and when the processor executes the instruction stored in the memory, the data message forwarding device is configured to perform the method of any of the first aspect or the first aspect.

第三方面,本申请实施例提供一种数据报文转发装置,用于实现上述第一方面或第一方面的任意实现方式中的方法,该数据转发装置包括相应的功能模块,分别用于实现以上方法中的步骤。In a third aspect, the embodiment of the present application provides a data packet forwarding device, which is used to implement the method in any of the foregoing first aspect or the first aspect, where the data forwarding device includes a corresponding function module, which is used to implement The steps in the above method.

第四方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得该计算机执行第一方面或第一方面的任意可能的实现方式中的方法。In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores instructions that, when run on a computer, cause the computer to perform any of the first aspect or the first aspect. The method in the implementation.

第五方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得该计算机执行第一方面或第一方面的任意可能的实现方式中的方法。In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, when executed on a computer, causing the computer to perform the method in the first aspect or any possible implementation manner of the first aspect.

本申请实施例中,数据报文的NSH中封装了第一SPI、SI以及第二SPI,其中,第一SPI指示当前转发该数据报文的第一业务链路径;第二SPI指示业务链控制器为该数据报文所在的业务链指定的第二业务链路径,第一业务路径与第二业务路径部分重合。本发明实施例通过将第一业务链路径与第二业务链路径重合的部分由第一SPI指示,能够实现转发表中路径信息的复用,从而减少转发表的表项数,进而降低转发表的内存占用量。In the embodiment of the present application, the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control. The second service chain path specified by the service chain in which the data packet is located, where the first service path and the second service path partially overlap. In the embodiment of the present invention, the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.

附图说明DRAWINGS

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below.

图1为本申请实施例适用的一种业务链系统架构示意图;1 is a schematic diagram of a service chain system architecture applicable to an embodiment of the present application;

图1a为本申请实施例中NSH Proxy处理数据报文的方法流程示意图;FIG. 1 is a schematic flowchart of a method for processing a data packet by an NSH Proxy according to an embodiment of the present disclosure;

图2为本申请实施例提供的一种数据报文转发方法的流程示意图;FIG. 2 is a schematic flowchart of a data packet forwarding method according to an embodiment of the present disclosure;

图2a为本申请实施例提供的一种NSH的结构示意图;2a is a schematic structural diagram of an NSH according to an embodiment of the present application;

图2b为本申请实施例提供的另一种NSH的结构示意图;FIG. 2b is a schematic structural diagram of another NSH according to an embodiment of the present disclosure;

图3本申请实施例提供的一种SFF上的转发表示意图;FIG. 3 is a schematic diagram of a forwarding table on an SFF according to an embodiment of the present application;

图4为本申请实施例提供的一种业务链结构示意图;FIG. 4 is a schematic structural diagram of a service chain according to an embodiment of the present application;

图5为基于图4所示的结构提供的两条尾部重合的业务链路径;Figure 5 is a two-tailed business chain path provided based on the structure shown in Figure 4;

图5a-图5c为现有技术中基于图5所示的业务链路径,SFF212、SFF213和SFF214上分别存储的转发表的结构示意图;5a-5c are schematic structural diagrams of a forwarding table stored on the SFF 212, the SFF 213, and the SFF 214, respectively, based on the service chain path shown in FIG. 5 in the prior art;

图5d-图5f为本申请实施例中基于图5所示的业务链,SFF212、SFF213和SFF214上分别存储的转发表的结构示意图;FIG. 5 is a schematic structural diagram of a forwarding table stored on the SFF 212, the SFF 213, and the SFF 214 according to the service chain shown in FIG. 5 according to the embodiment of the present application;

图6为基于图4所示的结构提供的两条首部和尾部均重合的业务链路径;6 is a service chain path in which two headers and a tail are coincident based on the structure shown in FIG. 4;

图6a-图6c为本申请实施例中基于图6所示的业务链路径,SFF212、SFF213和SFF214上分别存储的转发表的结构示意图;FIG. 6 is a schematic structural diagram of a forwarding table stored on the SFF 212, the SFF 213, and the SFF 214 according to the service chain path shown in FIG. 6 according to the embodiment of the present application;

图7为基于图4所示的结构提供的两条首部重合的业务链路径;Figure 7 is a two-headed business chain path provided based on the structure shown in Figure 4;

图7a-图7c为本申请实施例中基于图7所示的业务链路径,SFF212、SFF213和SFF214上分别存储的转发表的结构示意图;FIG. 7 is a schematic structural diagram of a forwarding table stored on the SFF 212, the SFF 213, and the SFF 214 according to the service chain path shown in FIG. 7 according to the embodiment of the present application;

图8为一种数据报文的转发设备的结构示意图;8 is a schematic structural diagram of a data packet forwarding device;

图9为另一种数据报文的转发设备的结构示意图。FIG. 9 is a schematic structural diagram of another forwarding device for data packets.

具体实施例Specific embodiment

为了使本发明的目的、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

具体实施中,实现端到端业务需要各种业务功能,比如防火墙、网络地址转换服务(NATs)和其他特定应用的功能。业务链即实现业务功能(Service Function,SF)的有 序集合以及业务流量的编排技术。图1中示例性示出了本申请实施例适用的一种业务链系统架构示意图。如图1所示,本申请实施例中的业务链架构主要由以下几个关键部件构成。In a specific implementation, implementing end-to-end services requires various service functions, such as firewalls, network address translation services (NATs), and other specific application functions. The service chain is an ordered collection of service functions (SF) and a service flow scheduling technique. FIG. 1 is a schematic diagram showing a service chain system architecture applicable to an embodiment of the present application. As shown in FIG. 1, the service chain architecture in the embodiment of the present application is mainly composed of the following key components.

业务链协同层(SFC Orchestrator)101:主要完成提供业务链服务所需的基础资源配置,包括SC、SFF和服务节点(Service Node,SN)的配置,SF与SFF的网络连接协同以及SF的业务策略配置等功能,为业务链特性的统一入口。Service Chain Collaboration Layer (SFC Orchestrator) 101: Mainly complete the basic resource configuration required to provide service chain services, including SC, SFF, and Service Node (SN) configuration, SF and SFF network connection coordination, and SF service. Functions such as policy configuration are a unified entry for the characteristics of the service chain.

业务链控制器(SFC Controller)102:实现业务链特性的网络控制功能,包括业务链所需要的叠加网(Overlay)网络管理及业务链路径计算和转发表下发等功能,北向提供接口与云管理平台或业务链协同层101对接,南向可通过开源流技术(Openflow)或网络配置(Netconf)接口与SC、SFF和PS对接。Service Chain Controller (SFC Controller) 102: A network control function that implements the characteristics of the service chain, including functions such as overlay network management and service chain path calculation and forwarding table delivery required by the service chain, and provides interfaces and clouds in the north. The management platform or the service chain collaboration layer 101 is docked, and the south interface can be connected to the SC, the SFF, and the PS through an open source streaming (Openflow) or network configuration (Netconf) interface.

SC103:从非SFC网络(non-SFC Network)接收数据报文并对报文进行流分类,匹配到对应的业务链后,对数据报文进行封装,将封装后的数据报文转发给业务链的首跳SFF104。SC可分外部(outbound)和内部(inbound)两个方向的SC,两个方向的SC可以为同一设备,SC与SFF可以部署在同一个设备上。SC103: Receives a data packet from a non-SFC network and classifies the packet, matches the corresponding service chain, encapsulates the data packet, and forwards the encapsulated data packet to the service chain. The first jump SFF104. The SC can be divided into two (outbound) and inbound (inbound) SCs. The SCs in both directions can be the same device. The SC and SFF can be deployed on the same device.

SFF104和SFF105:负责将由SC引入业务链的数据报文沿预先定义的业务链路径转发,并由SFF105在业务链尾端将报文转发给PS;集成网络服务主机(network service host)代理功能,即作为NSH-unaware类型SF的代理对报文进行NSH解封装和封装并更新NSH中的信息。The SFF 104 and the SFF 105 are responsible for forwarding the data packets introduced by the SC into the service chain along a predefined service chain path, and the SFF 105 forwards the message to the PS at the end of the service chain; and integrates the network service host proxy function. That is, the NSH-unaware type SF proxy performs NSH decapsulation and encapsulation on the packet and updates the information in the NSH.

业务功能(Service Function,SF)实例SF107、SF108、SF109和SF110:为租户所专有,即不同租户不会使用相同的SF实例,SF实例通常为虚拟资源,比如一个vsys实例。从SFF接收数据报文并应用业务策略处理接收的数据报文,再将处理后的数据报文返回到SFF。Service Function (SF) instances SF107, SF108, SF109, and SF110: are exclusive to the tenant, that is, different tenants do not use the same SF instance. The SF instance is usually a virtual resource, such as a vsys instance. The data message is received from the SFF and the received data message is processed by applying the service policy, and the processed data message is returned to the SFF.

SN111和SN112:SF容器,可以是支持物理网络功能(physical network function,PNF)或虚拟网络功能(virtual network function,VNF)的网络业务设备,SN可以支持单SF实例或多SF实例模式工作,可以支持虚拟局域网(virtual local area network,VLAN)或虚拟可扩展局域网(virtual extensible local area network,VXLAN)方式接入SFF。SN111 and SN112: SF containers, which may be network service devices supporting physical network function (PNF) or virtual network function (VNF). The SN can support single SF instance or multiple SF instance mode work. Supports virtual local area network (VLAN) or virtual extensible local area network (VXLAN) access to SFF.

PS106(Post Service):业务链的尾端服务器,即数据报文经过业务链之后要到达的目的设备,PS与SFF可以部署在同一个设备上。PS106 (Post Service): The tail server of the service chain, that is, the destination device that the data packet needs to reach after passing through the service chain. The PS and SFF can be deployed on the same device.

基于图1所示的业务链架构,对业务链上的数据报文的转发流程进行介绍:Based on the service chain architecture shown in Figure 1, the forwarding process of data packets on the service chain is introduced:

第一,SC103从非SFC网络接收数据报文,该数据报文可为VXLAN报文、通用路由封装(Generic Routing Encapsulation,GRE)报文或以太网EthernetPort,ETH)报文,本申请实施例中以该数据报文为VXLAN报文举例来说。SC接收到经过VXLAN封装的数据报文后,解VXLAN封装,并确定数据报文对应的流分类,确定流分类匹配的业务链,然后,对解VXLAN封装后的数据报文进行网络业务头(英文:network service header,NSH)封装,即对解VXLAN封装后的数据报文封装NSH,之后对封装NSH的数据报文再次进行VXLAN封装(即添加VXLAN报文头),之后根据转发表,将进行VXLAN封装和NSH封装后的数据报文转发至业务链的首跳SFF,即SFF104。First, the SC 103 receives the data packet from the non-SFC network, and the data packet may be a VXLAN packet, a Generic Routing Encapsulation (GRE) packet, or an Ethernet Ethernet Port (ETH) packet. For example, the data packet is a VXLAN packet. After receiving the data packet encapsulated by the VXLAN, the SC decapsulates the VXLAN, determines the traffic classifier corresponding to the data packet, determines the service chain matching the traffic classifier, and then performs the network service header for the data packet encapsulated by the VXLAN ( English: network service header (NSH) encapsulation, that is, encapsulating NSH for the data packet encapsulated by VXLAN, and then performing VXLAN encapsulation on the data packet encapsulating the NSH (that is, adding a VXLAN packet header), and then according to the forwarding table, The data packet after the VXLAN encapsulation and the NSH encapsulation is forwarded to the first hop SFF of the service chain, that is, the SFF 104.

第二,SFF104接收到该进行VXLAN封装和NSH封装后的数据报文后,解VXLAN封装,解NSH封装,并根据解析得到的NSH中的SPI和SI查找转发表,确定出SPI 和SI对应的下一跳地址,将数据报文重新进行NSH封装和VXLAN封装,之后将进行NSH封装和VXLAN封装的数据报文转发至下一跳地址;下一跳地址为SF107的地址。Second, after receiving the data packet after the VXLAN encapsulation and the NSH encapsulation, the SFF 104 de-packs the VXLAN, decapsulates the NSH, and finds the SPI and the SI according to the SPI and SI lookup forwarding tables in the NSH. The next hop address, the data packet is re-encapsulated in the NSH and VXLAN, and then the data packet encapsulated in the NSH and VXLAN is forwarded to the next hop address; the next hop address is the address of the SF107.

第三,SFF104将进行NSH封装和VXLAN封装的数据报文转发至SF107;SF107解VXLAN封装,解NSH封装,并对得到的数据报文进行处理,将处理后的数据报文再次重新进行NSH封装和VXLAN封装,将重新进行NSH封装和VXLAN封装数据报文返回至SFF104。The SFF 104 forwards the data packet of the NSH and the VXLAN to the SF107. The SF107 decapsulates the VXLAN, decapsulates the NSH, processes the data packet, and re-processes the processed data packet. In the VXLAN package, the NSH encapsulation and VXLAN encapsulation data packets are returned to the SFF 104.

第四,SFF104接收到SF107返回的重新进行NSH封装和VXLAN封装数据报文,解VXLAN封装,解NSH封装,并对SI减一,根据SPI和减一后的SI查找转发表,确定出下一跳地址,即SF108的地址。Fourth, the SFF 104 receives the re-performed NSH encapsulation and VXLAN encapsulation data message returned by the SF 107, de-packs the VXLAN, de-packets the NSH, and decrements the SI, and determines the next table according to the SPI and the reduced SI lookup table. The hop address, which is the address of the SF108.

经过如上所示的业务链转发流程,该数据报文被转发至PS。具体来说,SFF105可根据转发表中的内容,确定出下一跳需要跳至PS,则SFF105可以根据原始的数据报文中的目的IP地址查找路由表并将报文转发至PS。After the service chain forwarding process as shown above, the data message is forwarded to the PS. Specifically, the SFF 105 may determine that the next hop needs to jump to the PS according to the content in the forwarding table, and the SFF 105 may search the routing table according to the destination IP address in the original data packet and forward the packet to the PS.

具体来说,根据SF对NSH封装的支持情况,我们将不同SF分别称之为支持NSH封装的SF(NSH-aware SF)和不支持NSH封装的SF(NSH-unaware SF)。上述第二和第三个步骤中,是以SF107是支持NSH封装的SF为例进行介绍的,如果SF107为不支持NSH封装的SF时,则SFF104与SF107之间需要增加一个NSH代理(proxy)的角色。Specifically, according to the support of the SF for the NSH encapsulation, we refer to different SFs as SF (NSH-aware SF) supporting NSH encapsulation and SF (NSH-unaware SF) not supporting NSH encapsulation. In the foregoing second and third steps, the SF 107 is an SF supporting the NSH encapsulation. If the SF 107 is an SF that does not support the NSH encapsulation, an NSH proxy needs to be added between the SFF 104 and the SF 107. character of.

图1a示例性示出了本申请实施例中NSH代理1205处理数据报文的流程示意图,如图1a所示,对于从不支持NSH的SF1203发往SFF1207的数据报文,不支持NSH的SF1203输出的数据报文为未进行NSH封装1204的数据报文,之后经过NSH代理1205进行NSH封装,NSH代理1205传输给SFF1207的数据报文为进行NSH封装1206的数据报文,之后由SFF1207传输至网络1208;对于从SFF1207发往不支持NSH的SF1203的数据报文,SFF1207将进行NSH封装1206的数据报文传输给NSH代理1205,NSH代理1205将数据报文的NSH封装移除,将得到的未进行NSH封装1204的数据报文发给不支持NSH的SF1203。Figure 1a is a schematic diagram showing the flow of processing data packets by the NSH proxy 1205 in the embodiment of the present application. As shown in Figure 1a, the SF1203 output of the NSH is not supported for data packets sent from the SF 1203 that does not support the NSH to the SFF 1207. The data packet is a data packet that is not encapsulated in the NSH package 1204, and is then encapsulated in the NSH by the NSH proxy 1205. The data packet transmitted by the NSH proxy 1205 to the SFF 1207 is a data packet for the NSH package 1206, and then transmitted to the network by the SFF 1207. 1208. For the data packet sent from the SFF 1207 to the SF 1203 that does not support the NSH, the SFF 1207 transmits the data packet of the NSH package 1206 to the NSH proxy 1205, and the NSH proxy 1205 removes the NSH encapsulation of the data packet, and the obtained NSF package is obtained. The data packet of the NSH package 1204 is sent to the SF 1203 that does not support the NSH.

如图1a所示,对于从支持NSH的SF1201传输至SFF1207的数据报文,支持NSH的SF1201对数据报文进行进行NSH封装1202,之后直接传输给SFF1207,由SFF1207传输至网络1208;对于从SFF1207发往支持NSH的SF1201的数据报文,SFF1207直接将进行NSH封装1202的数据报文传输给支持NSH的SF1201。As shown in FIG. 1a, for data packets transmitted from the SF 1201 supporting the NSH to the SFF 1207, the SF 1201 supporting the NSH performs NSH encapsulation 1202 on the data message, and then directly transmits it to the SFF 1207, and transmits it to the network 1208 by the SFF 1207; The SFF 1207 directly transmits the data packet of the NSH package 1202 to the SF 1201 supporting the NSH.

业务链网络中的NSH代理1205是一个逻辑角色,可由SFF兼任。我们将SFF恢复NSH封装需要的表项称为业务链映射表(SFC mapping table)。对于NSH-Based业务链,SFC Controller向SFF和SC下发NSH流表(包括转发表和映射表),以使SFF和SC根据NSH流表转发业务链的数据报文,完成业务链的处理。The NSH proxy 1205 in the service chain network is a logical role and can be concurrently served by SFF. We refer to the table items required for SFF to restore NSH encapsulation as the SFC mapping table. For the NSH-Based service chain, the SFC Controller sends an NSH flow table (including a forwarding table and a mapping table) to the SFF and the SC, so that the SFF and the SC forward the data packet of the service chain according to the NSH flow table to complete the processing of the service chain.

图2示例性示出了本申请实施例提供的一种数据报文转发方法的流程示意图,如图2所示,该方法由转发设备执行,转发设备可为图1中的SFF,该方法包括:FIG. 2 is a schematic flowchart showing a data packet forwarding method according to an embodiment of the present disclosure. As shown in FIG. 2, the method is performed by a forwarding device, and the forwarding device may be the SFF in FIG. 1. The method includes :

步骤201,转发设备接收数据报文;其中,所述数据报文的网络业务头NSH中包括第一SPI、第一SI、以及第二SPI;其中所述第一SPI用于指示第一业务链路径,所述第二SPI用于指示第二业务链路径,所述第一业务链路径和第二业务链路径至少部分重合。Step 201: The forwarding device receives the data packet, where the network service header NSH of the data packet includes a first SPI, a first SI, and a second SPI, where the first SPI is used to indicate the first service chain. a path, where the second SPI is used to indicate a second service chain path, where the first service chain path and the second service chain path at least partially overlap.

其中,所述转发设备可以是从业务分类器SC接收所述数据报文,也可以是从其他转发设备接收所述数据报文。The forwarding device may receive the data packet from the service classifier SC, or may receive the data packet from another forwarding device.

本申请中,第一SPI为所述数据报文当前所在业务链路径的SPI,所述第二SPI为业务分类器SC为所述数据报文添加的所述数据报文所属的业务流对应的业务链的SPI。即,当SC收到所述数据报文时,确定所述数据报文对应的业务链,获取该业务链对应的SPI,然后将该SPI和初始SI(例如,255)添加到为所述数据报文封装的NSH中。其中,确定所述数据报文对应的业务链,具体可以是,根据预设的流规则,获取所述数据报文所属的业务流的标识,根据获取的业务流的标识查找SC上的流映射表,得到该业务流的标识对应的业务链路径的标识。该流映射表的每个表项包括业务流的标识与业务链路径的标识对应关系。In the present application, the first SPI is the SPI of the service chain path in which the data packet is currently located, and the second SPI is the service flow to which the data packet to which the service classifier SC adds the data packet belongs. SPI of the business chain. That is, when the SC receives the data packet, the service chain corresponding to the data packet is determined, the SPI corresponding to the service chain is obtained, and then the SPI and the initial SI (for example, 255) are added to the data. The message is encapsulated in the NSH. The service chain corresponding to the data packet is determined, and the identifier of the service flow to which the data packet belongs is obtained according to the preset flow rule, and the flow mapping on the SC is searched according to the identifier of the obtained service flow. The table obtains the identifier of the service chain path corresponding to the identifier of the service flow. Each entry of the flow mapping table includes an identifier of the service flow and an identifier of the service chain path.

本申请实施例中,转发设备每转发一次数据报文,会将该数据报文中的SI减1。In the embodiment of the present application, each time the forwarding device forwards the data packet, the SI in the data packet is decremented by one.

步骤202,转发设备根据转发表确定第一SPI和第一SI对应的转发表项中的下一跳地址以及NSH封装信息;NSH封装信息包括跳转信息和类型标记;类型标记指示根据转发表项转发报文时的操作类型。Step 202: The forwarding device determines, according to the forwarding table, a next hop address and an NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI; the NSH encapsulation information includes a jump information and a type tag; and the type tag indicates the forwarding entry according to the forwarding entry. The type of operation when forwarding a message.

其中,所述下一跳地址可以为SF、SFF或PS的地址,所述转发表是业务链控制器根据业务链的部署情况计算并发送给每个转发设备的。The next hop address may be an address of the SF, the SFF, or the PS. The forwarding table is calculated by the service chain controller according to the deployment situation of the service chain and sent to each forwarding device.

步骤203,转发设备根据NSH封装信息为数据报文重新封装NSH。Step 203: The forwarding device re-encapsulates the NSH as a data packet according to the NSH encapsulation information.

步骤204,转发设备将重新封装NSH的数据报文发送至下一跳地址。Step 204: The forwarding device sends the data packet re-packaging the NSH to the next hop address.

在步骤204中,在该方案中,如果下一跳地址为不支持NSH封装的SF,则转发设备将重新封装NSH的数据报文发送至下一跳地址,具体来说,转发设备中包括NSH代理的功能,转发设备将重新封装NSH的数据报文中的NSH删除,之后将数据报文发送至下一跳地址。如果下一跳地址为支持NSH封装的SF,则转发设备将封装NSH的数据报文直接发送至下一跳地址。In the solution, in the solution, if the next hop address is an SF that does not support the NSH encapsulation, the forwarding device sends the data packet of the re-encapsulated NSH to the next hop address. Specifically, the forwarding device includes the NSH. The function of the proxy, the forwarding device will re-encapsulate the NSH in the data packet of the NSH, and then send the data packet to the next hop address. If the next hop address is an SF that supports NSH encapsulation, the forwarding device directly sends the data packet encapsulating the NSH to the next hop address.

本申请实施例中,数据报文的NSH中封装了第一SPI、SI以及第二SPI,其中,第一SPI指示当前转发该数据报文的第一业务链路径;第二SPI指示业务链控制器为该数据报文所在的业务链指定的第二业务链路径,第一业务路径与第二业务路径部分重合。本发明实施例通过将第一业务链路径与第二业务链路径重合的部分由第一SPI指示,能够实现转发表中路径信息的复用,从而减少转发表的表项数,进而降低转发表的内存占用量。In the embodiment of the present application, the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control. The second service chain path specified by the service chain in which the data packet is located, where the first service path and the second service path partially overlap. In the embodiment of the present invention, the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.

本申请实施例提供的进行NSH封装后的数据报文可承载于多种报文中。比如将NSH承载于VXLAN、GRE和ETH等多种叠加(overlay)封装中。The data packet after the NSH encapsulation provided by the embodiment of the present application can be carried in multiple types of packets. For example, the NSH is carried in various overlay packages such as VXLAN, GRE, and ETH.

NSH目前有两种封装格式。图2a和图2b分别示出了本申请实施例提供的两种NSH的结构示意图。如图2a所示,NSH中包括协议版本信息和长度信息2100,以及格式指示位2101,比如图2a中该NSH的格式指示位2101为0x1,则图2a中的NSH中除了包括下一个协议2102字段,以及SPI2103字段和业务索引SI2104字段之后,还包括多个固定长度的上下文头,图2a中示出了上下文头-2108。在NSH中,第一SPI和第一SI可放置于图2a中的SPI2103和SI2104中,而第二SPI可放置于一个固定长度的上下文头中。由于NSH中有下一个协议(next protocol)2102字段,用于承载数据报文的协议,且NSH可以通过下一个协议(next protocol)字段承载二层用户报文、三层用户报 文,较为灵活。NSH currently has two package formats. 2a and 2b are schematic diagrams showing the structure of two NSHs provided by the embodiments of the present application. As shown in FIG. 2a, the NSH includes protocol version information and length information 2100, and a format indication bit 2101. For example, the format indication bit 2101 of the NSH in FIG. 2a is 0x1, and the NSH in FIG. 2a includes the next protocol 2102. The field, along with the SPI2103 field and the service index SI2104 field, also includes a plurality of fixed length context headers, and context header-2108 is shown in Figure 2a. In NSH, the first SPI and the first SI can be placed in SPI2103 and SI2104 in Figure 2a, while the second SPI can be placed in a fixed length context header. The NSR has the next protocol 2102 field, which is used to carry the data packet protocol, and the NSH can carry the Layer 2 user packet and the Layer 3 user packet through the next protocol (next protocol) field. .

如图2b所示,在NSH的另一种封装格式中,NSH中包括协议版本信息和长度信息2200,以及格式指示位2201,比如图2b中该NSH的格式指示位2201为0x2,图2a中的NSH中除了包括下一个协议2202字段,以及SPI2203字段和业务索引SI2204字段之后,还包括可变长度的上下文头2205。在NSH中,第一SPI和第一SI可放置于图2b中的SPI2203和SI2204中,而第二SPI可放置于可变长度的上下文头2205中。As shown in FIG. 2b, in another encapsulation format of the NSH, the NSH includes protocol version information and length information 2200, and a format indication bit 2201. For example, the format indication bit 2201 of the NSH in FIG. 2b is 0x2, in FIG. 2a. The NSH includes a variable length context header 2205 in addition to the next protocol 2202 field, and the SPI2203 field and the service index SI2204 field. In NSH, the first SPI and the first SI can be placed in SPI 2203 and SI 2204 in Figure 2b, while the second SPI can be placed in a variable length context header 2205.

在SC上根据流分类规则确定数据报文对应的业务流,并确定该业务流对应的业务链,根据该业务流对应的业务链对数据报文进行NSH封装。SFF接收SFC发送的转发表,并根据该转发表转发接收的数据报文。具体地,SFF收到数据报文时识别数据报文中NSH头中的第一SPI和第一SI,根据该第一SPI和第一SI查找转发表并将该NSH封装的数据报文转发到该转发表中指定的下一跳(SF或SFF)。图3示例性示出了一种SFF上的转发表。The service flow corresponding to the data packet is determined according to the traffic classification rule on the SC, and the service chain corresponding to the service flow is determined, and the data packet is NSH encapsulated according to the service chain corresponding to the service flow. The SFF receives the forwarding table sent by the SFC, and forwards the received data packet according to the forwarding table. Specifically, the SFF identifies the first SPI and the first SI in the NSH header in the data packet when receiving the data packet, and searches the forwarding table according to the first SPI and the first SI, and forwards the data packet encapsulated by the NSH to the data packet. The next hop (SF or SFF) specified in the forwarding table. Figure 3 exemplarily shows a forwarding table on an SFF.

如图3所示,转发表的每个表项包括SPI,SI,下一跳地址、传输协议和类型标记(flag)。传输协议指向下一跳设备发送数据报文时,该报文应该采用该传输协议对应的封装格式进行封装。转发表中的传输协议在本申请中的用途与现有技术相同。故在后续的描述中,本申请的转发表中不再出现转发协议相关的内容。flag用于定义下一跳的类型。其中,flag指示的下一跳的类型可包括空信息(NA)和普通路由转发(GoTo)两种类型。flag指示的类型为NA时,表示数据报文沿着业务链路径正常转发,flag指示的类型为GoTo时,表示该SFF为业务链的最后一跳,下一跳直接跳转到PS。As shown in FIG. 3, each entry of the forwarding table includes SPI, SI, next hop address, transport protocol, and type flag. When the transport protocol points to the next hop device to send a data packet, the packet should be encapsulated in the encapsulation format corresponding to the transport protocol. The use of the transport protocol in the forwarding table in this application is the same as in the prior art. Therefore, in the following description, the forwarding protocol related content does not appear in the forwarding table of the present application. Flag is used to define the type of next hop. The type of the next hop indicated by the flag may include two types: null information (NA) and normal route forwarding (GoTo). When the type indicated by the flag is NA, it indicates that the data packet is forwarded normally along the service link. When the type indicated by the flag is GoTo, the SFF is the last hop of the service chain, and the next hop is directly redirected to the PS.

基于图3所示的转发表,本申请实施例所提供的方案中flag还可以指示另外两种类型,分别为合并(英文:combine)和分离(英文:separate)。Based on the forwarding table shown in FIG. 3, the flag in the solution provided by the embodiment of the present application may also indicate two other types, namely, combining (combination) and separating (English: separate).

类型标记指示的操作类型为合并,且跳转信息包括目标SPI和目标SI,根据NSH封装信息为数据报文重新封装NSH,包括:使用目标SPI更新NSH中的第一SPI;使用目标SI更新NSH中的第一SI;其中,合并的操作类型还用于指示:数据报文在第二业务链路径上的下一跳地址和在第一业务链路径上的下一跳地址相同。The operation type indicated by the type tag is merge, and the jump information includes the target SPI and the target SI, and the NSH is re-encapsulated for the data message according to the NSH encapsulation information, including: updating the first SPI in the NSH using the target SPI; and updating the NSH using the target SI The first SI; wherein the merged operation type is further used to indicate that the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path.

类型标记指示的操作类型为分离,且跳转信息包括目标SPI和目标SI,且第一SPI和第二SPI不同,则根据NSH封装信息为数据报文重新封装NSH,包括:获取NSH封装信息中的目标SPI和目标SI,当目标SPI和第二SPI相同时,使用目标SPI更新NSH中的第一SPI;使用目标SI更新NSH中的第一SI;其中,分离的操作类型还用于指示:数据报文在第二业务链路径上的下一跳地址与数据报文在第一业务链上的下一跳地址不同。The operation type indicated by the type tag is separated, and the jump information includes the target SPI and the target SI, and the first SPI and the second SPI are different, and the NSH is re-packaged according to the NSH encapsulation information, including: obtaining the NSH encapsulation information. The target SPI and the target SI, when the target SPI and the second SPI are the same, use the target SPI to update the first SPI in the NSH; use the target SI to update the first SI in the NSH; wherein the separated operation type is also used to indicate: The next hop address of the data packet on the second service link path is different from the next hop address of the data packet on the first service chain.

可选地,若NSH封装信息包括空信息或普通路由转发信息,则直接将数据报文转发至下一跳地址。Optionally, if the NSH encapsulation information includes null information or common route forwarding information, the data packet is directly forwarded to the next hop address.

下面列举几个具体示例,用于详细说明本申请实施例所提供的技术方案。The following is a few specific examples for illustrating the technical solutions provided by the embodiments of the present application.

基于上述内容,图4示例性示出了本申请实施例提供的一种业务链示意图。图4中,业务功能分类器SC211,业务功能转发器SFF212,SFF213,SFF214和业务链尾服务器PS215可以组成多条业务链。假设SFF212连接的业务功能SF216,SFF213连接的业务能够SF218和SF219以及SFF214连接的SF220和SF221均支持NSH封装。如图5所示,基于图4所示的业务链,假设存在两条尾部重合的业务链路径。Based on the above, FIG. 4 exemplarily shows a schematic diagram of a service chain provided by an embodiment of the present application. In FIG. 4, the service function classifier SC211, the service function forwarder SFF212, the SFF213, the SFF214, and the service chain tail server PS215 may form a plurality of service chains. Assume that the service function SF216 connected to the SFF 212, the service connected to the SFF 213, and the SF 220 and the SF 221 connected to the SFF 214 and the SF 221 support the NSH encapsulation. As shown in FIG. 5, based on the service chain shown in FIG. 4, it is assumed that there are two service chain paths whose tails coincide.

从图5可以看出,SPI0和SPI1这两条业务链路径只有起始路径部分不同,从SFF213直到结束两条路径均相同(相同的部分以粗体显示)。As can be seen from Figure 5, the two service chain paths of SPI0 and SPI1 differ only in the starting path part, and the two paths are the same from SFF213 to the end (the same part is shown in bold).

为了体现本申请实施例的有益效果,本申请实施例中通过图5a,图5b和图5c分别示例性示出当存在SPI0和SPI1两条业务链路径时,现有技术中SFF212、SFF213和SFF214所存储的转发表的结构示意图。为了兼容现有技术,NSH封装信息包括图3所示的类型标记flag。In order to embody the beneficial effects of the embodiments of the present application, in the embodiment of the present application, FIG. 5a, FIG. 5b, and FIG. 5c respectively exemplarily show that when there are two service chain paths of SPI0 and SPI1, the prior art SFF212, SFF213, and SFF214 Schematic diagram of the stored forwarding table. In order to be compatible with the prior art, the NSH package information includes the type flag flag shown in FIG.

通过图5a至图5c可以看出,虽然SPI0和SPI1的两条业务链路径只有起始路径部分不同,但从SFF213直到结束两条路径均相同,即图5b和图5c中SPI0和SPI1的路径均相同,但是图5b和图5c中仍然分别存储了SPI0和SPI1的路径,造成转发表表项较多的问题。It can be seen from Fig. 5a to Fig. 5c that although the two service chain paths of SPI0 and SPI1 are only different in the starting path part, the paths from SFF213 to the end are the same, that is, the paths of SPI0 and SPI1 in Fig. 5b and Fig. 5c. The same is true, but the paths of SPI0 and SPI1 are still stored in FIG. 5b and FIG. 5c, respectively, causing more problems in forwarding table entries.

应用本申请所提供的方案,为了兼容现有技术的方案,现有技术中NSH封装信息包括flag,本申请实施例中在NSH封装信息中增加Context,Context用于存储跳转信息,flag中用于存储类型标记。应用本申请实施例提供的方案生成的转发表如图5d、图5e和图5f所示。可选地,还可设置第二SI,第二SI也放置于上下文头context header中。下述示例中图5d至图5f中以包括第二SI为例进行示例。Applying the solution provided by the present application, in order to be compatible with the prior art solution, the NSH encapsulation information in the prior art includes a flag. In the embodiment of the present application, a Context is added to the NSH encapsulation information, and a Context is used to store the jump information. For storage type tags. The forwarding table generated by using the solution provided by the embodiment of the present application is as shown in FIG. 5d, FIG. 5e and FIG. 5f. Optionally, a second SI may also be set, and the second SI is also placed in the context header. The example in which the second SI is included in FIGS. 5d to 5f in the following example is exemplified.

由于SFF212既是SPI0的第一个SFF,也是SPI1的第一个SFF,因此,SFC为SFF212计算的转发表既包括SPI0对应的转发表项,也包括SPI1对应的转发表项。如图5d所示,第一SPI为0,第一SI为255的数据报文所对应的下一跳为SF216的IP地址{1.1.1.1},第一SPI为0,第一SI为254的数据报文所对应的下一跳为SFF213的IP地址{10.1.2.1};第一SPI为1,第一SI为255的数据报文所对应的下一跳为SF2173的IP地址{1.1.2.1};由于图5中的两条路径在SFF213处开始重合,因此,第一SPI为1,第一SI为254的数据报文在到达SFF213后,可以沿着SPI0的路径转发,其对应的转发表项的类型标记指示后续的操作类型为合并,跳转信息为{目标SPI:0,目标SI:254}。Since SFF212 is both the first SFF of SPI0 and the first SFF of SPI1, the forwarding table calculated by SFC for SFF212 includes both the forwarding entry corresponding to SPI0 and the forwarding entry corresponding to SPI1. As shown in FIG. 5d, the first SPI is 0, and the next hop corresponding to the data packet with the first SI being 255 is the IP address {1.1.1.1} of the SF216, the first SPI is 0, and the first SI is 254. The next hop corresponding to the data packet is the IP address of SFF213 {10.1.2.1}; the first SPI is 1, and the next hop corresponding to the data packet with the first SI being 255 is the IP address of SF2173 {1.1.2.1 }; Since the two paths in FIG. 5 start to coincide at SFF 213, the first SPI is 1, and the data packet with the first SI of 254 can be forwarded along the path of SPI0 after reaching the SFF 213, and its corresponding transfer The type tag of the published item indicates that the subsequent operation type is merge, and the jump information is {target SPI: 0, target SI: 254}.

在由于SPI1的路径在SFF213上已经合并,则图5e的SFF213的转发表中,只有SPI0对应的转发表项。具体来说:第一SPI为0,第一SI为254的数据报文所对应的下一跳为SF218的IP地址{1.1.3.1},在将该数据报文转发给下一跳时,将该第一SI减一,第二SI减一。该数据报文中信息更新为:第一SPI为0,第一SI为253;第二SPI为0,第二SI为253。第一SPI为0,第一SI为253的数据报文所对应的下一跳为SF219的IP地址{1.1.4.1},在将该数据报文转发给下一跳时,将该第一SI减一,第二SI减一。该数据报文中信息更新为:第一SPI为0,第一SI为252;第二SPI为0,第二SI为252。第一SPI为0,第一SI为252的数据报文所对应的下一跳为SFF214的IP地址{10.1.3.1}。In the forwarding table of the SFF 213 of FIG. 5e, only the forwarding entry corresponding to SPI0 is included in the forwarding table of the SFF 213 of the SPI1. Specifically, the first SPI is 0, and the next hop corresponding to the data packet of the first SI is 254 is the IP address {1.1.3.1} of the SF218. When the data packet is forwarded to the next hop, The first SI is decremented by one and the second SI is decremented by one. The information in the data message is updated as follows: the first SPI is 0, the first SI is 253, the second SPI is 0, and the second SI is 253. The first SPI is 0, and the next hop corresponding to the data packet of the first SI is 253 is the IP address {1.1.4.1} of the SF219. When the data packet is forwarded to the next hop, the first SI is used. Subtract one, the second SI is reduced by one. The information in the data message is updated as follows: the first SPI is 0, the first SI is 252, the second SPI is 0, and the second SI is 252. The first SPI is 0, and the next hop corresponding to the data packet with the first SI being 252 is the IP address {10.1.3.1} of the SFF214.

由于SPI0和SPI1在SFF214上仍然是合并的,则图5f的SFF214的转发表中,只有SPI0对应的转发表项。在图5f中,第一SPI为0,第一SI为252的数据报文所对应的下一跳为SF220的IP地址{1.1.5.1},在将该数据报文转发给下一跳时,将该第一SI减一,第二SI减一。该数据报文中信息更新为:第一SPI为0,第一SI为251;第二SPI为0,第二SI为251。第一SPI为0,第一SI为251的数据报文所对应的下一跳为VRFn(SFC),则该数据报文被直接发送给将该数据报文发送给SPI0的PS,本申请实施例中,图5至图7中VRFn(SFC)表示最后一跳。Since SPI0 and SPI1 are still merged on SFF214, in the forwarding table of SFF214 of Figure 5f, only the forwarding entry corresponding to SPI0 is available. In FIG. 5f, the first SPI is 0, and the next hop corresponding to the data packet with the first SI being 252 is the IP address {1.1.5.1} of the SF220. When the data packet is forwarded to the next hop, The first SI is decremented by one, and the second SI is decremented by one. The information in the data packet is updated as follows: the first SPI is 0, the first SI is 251, the second SPI is 0, and the second SI is 251. The first SPI is 0, and the next hop corresponding to the data packet of the first SI is 251 is VRFn (SFC), and the data packet is directly sent to the PS that sends the data packet to the SPI0. In the example, VRFn (SFC) in Figures 5 to 7 represents the last hop.

也就是说,本申请实施例中,由于在SFF212中,将SPI1的NSH封装信息中将第 一SPI和第一SI更新为SPI:0,SI:254,因此后续在图5e和图5f中无需单独存储SPI1的路径,SPI1的数据报文直接走SPI0的路径即可,可见,应用本申请实施例所提供的方案,重合路径由第一SPI指示,能够实现转发表中路径信息的复用,从而减少转发表的表项数,进而降低转发表的内存占用量。That is, in the embodiment of the present application, since the first SPI and the first SI are updated to SPI:0, SI:254 in the NSH encapsulation information of the SPI1 in the SFF 212, subsequent need in FIG. 5e and FIG. 5f The path of the SPI1 is separately stored, and the data packet of the SPI1 is directly taken to the path of the SPI0. It can be seen that, by using the solution provided by the embodiment of the present application, the coincidence path is indicated by the first SPI, and the path information in the forwarding table can be reused. Therefore, the number of entries in the forwarding table is reduced, thereby reducing the memory usage of the forwarding table.

示例二Example two

假设SF节点均支持NSH封装,如图6所示,存在两条头部和尾部重合,但中间部分不重合的业务链路径。It is assumed that the SF nodes support the NSH encapsulation. As shown in FIG. 6, there are two service chain paths in which the header and the tail overlap, but the middle portions do not coincide.

从图6中的RSP可以看出,SPI2和SPI3的两条业务链路径只有中间路径部分不同(相同的部分以粗体显示)。现有技术中,即使两条路径由重合,SFF中存储的转发表中也会对应存储每条路径,如图5a-5c所示会造成转发表表项较多的问题。As can be seen from the RSP in Figure 6, the two service chain paths of SPI2 and SPI3 differ only in the middle path part (the same part is shown in bold). In the prior art, even if the two paths are overlapped, each forwarding path is stored in the forwarding table stored in the SFF. As shown in FIG. 5a-5c, the forwarding table entries are more.

基于图6所示的业务链路径,SFC为SFF212,SFF213和SFF214生成的转发表分别如图6a、图6b和图6c所示。Based on the service chain path shown in FIG. 6, the forwarding tables generated by the SFC for the SFF 212, SFF 213, and SFF 214 are shown in FIGS. 6a, 6b, and 6c, respectively.

图6a至图6c中完整记载了SPI2的路径,在此不再赘述,下面结合图6a至图6c对SPI3进行详细说明:The path of SPI2 is completely described in FIG. 6a to FIG. 6c, and details are not described herein again. The SPI3 will be described in detail below with reference to FIG. 6a to FIG. 6c:

在图6所示的业务路径下,SFF212收到第一SPI为2,第一SPI为254的数据报文后,查找到对应的转发表中的类型标记指示的操作类型为分离,跳转信息不为空,确定该数据报文需要转发到另一业务链路径上,则根据跳转信息{目标SPI:3,目标SI:254}修改该数据报文中的第一SPI为3,修改该数据报文中的第一SI为254,并根据修改后的第一SPI和第一SI转发该修改后的数据报文。In the service path shown in FIG. 6, after receiving the data packet whose first SPI is 2 and the first SPI is 254, the SFF 212 finds that the operation type indicated by the type tag in the corresponding forwarding table is separated, and the jump information is If it is not empty, it is determined that the data packet needs to be forwarded to another service chain path, and then the first SPI in the data packet is modified according to the jump information {target SPI:3, target SI: 254}, and the modification is performed. The first SI in the data packet is 254, and the modified data packet is forwarded according to the modified first SPI and the first SI.

根据图6b的SFF213的转发表,SPI3的数据报文中第一SPI为3,第一SI为254时所对应的下一跳为SF219的IP地址{1.1.4.1},在将该数据报文转发给下一跳时,将该第一SI减一。该数据报文中的信息更新为:第一SPI为3,第一SI为253;第二SPI为3。并且,该第一SPI为3,第一SI为253,第二SPI为3的数据报文所对应的下一跳为SFF214的IP地址{10.1.3.1}。对应的NSH封装信息中类型标记指示的操作类型为合并,,且目标SPI信息为SPI2,目标SI信息为SI253。使用目标SPI信息更新NSH中的第一SPI;使用目标SI信息更新NSH中的第一SI。更新后SPI3的数据报文中:第一SPI为2,第一SI为253,第二SPI为3。According to the forwarding table of the SFF 213 of FIG. 6b, the first SPI in the data packet of the SPI3 is 3, and the next hop corresponding to the first SI is 254 is the IP address {1.1.4.1} of the SF219, and the data packet is in the data packet. When forwarding to the next hop, the first SI is decremented by one. The information in the data packet is updated as follows: the first SPI is 3, the first SI is 253, and the second SPI is 3. Moreover, the first SPI is 3, the first SI is 253, and the next hop corresponding to the second SPI is 3 is the IP address {10.1.3.1} of the SFF214. The operation type indicated by the type tag in the corresponding NSH package information is merge, and the target SPI information is SPI2, and the target SI information is SI253. The first SPI in the NSH is updated using the target SPI information; the first SI in the NSH is updated using the target SI information. In the updated SPI3 data message: the first SPI is 2, the first SI is 253, and the second SPI is 3.

根据图6c的SFF214的转发表,SPI3的数据报文中第一SPI为2,第一SI为253时所对应的下一跳为SF220的IP地址{1.1.5.1},在将该数据报文转发给下一跳时,将该第一SI减一。SPI3的数据报文中信息更新为:第一SPI为2,第一SI为252;第二SPI为3。由于第一SPI为2,第一SI为252的数据报文所对应的下一跳为VRFn(SFC),则该数据报文被直接发送给SPI3的PS。According to the forwarding table of the SFF 214 of FIG. 6c, the first SPI in the data packet of the SPI3 is 2, and the next hop corresponding to the first SI is 253 is the IP address {1.1.5.1} of the SF220, and the data packet is in the data packet. When forwarding to the next hop, the first SI is decremented by one. The information in the data message of SPI3 is updated as follows: the first SPI is 2, the first SI is 252, and the second SPI is 3. Since the first SPI is 2, and the next hop corresponding to the data message of the first SI is 252 is VRFn (SFC), the data message is directly sent to the PS of SPI3.

也就是说,本申请实施例中,SC对SPI3的数据报文进行NSH封装时,将第一SPI封装为SPI2,将第一SI封装为SI255,因此,在图6a的转发表中无需存储SPI3的SI为255时对应的转发表项,SFF212在转发SPI3的数据报文时,复用SPI2的转发表项即可,进一步,由于在图6a中根据操作类型为分离的类型标记,将SPI3的SI254的数据报文NSH中的第一SI还原为SPI3,将SI修改为SI254,因此根据图6b中SFF213的转发表,SPI2和SPI3的数据报文可以走各自的路径,进一步,由于在图6b中,根据 操作类型为合并的类型标记,将第一SPI修改为SPI2,将第一SI修改为SI253,因此,在图6c中,无需存储SPI3的路径信息,仅仅复用SPI2的路径信息即可转发SPI3的数据报文。可见,重合路径由第一SPI指示,能够实现转发表中路径信息的复用,从而减少转发表的表项数,进而降低转发表的内存占用量。That is, in the embodiment of the present application, when the SC performs the NSH encapsulation on the data packet of the SPI3, the first SPI is encapsulated as SPI2, and the first SI is encapsulated as SI255. Therefore, the SPI3 need not be stored in the forwarding table of FIG. 6a. When the SI is 255, the corresponding forwarding entry is used. When the SFF 212 forwards the SPI3 data packet, the SPI2 forwarding entry can be multiplexed. Further, since the operation type is a separate type flag in FIG. 6a, the SPI3 is used. The first SI in the data packet NSH of SI254 is restored to SPI3, and the SI is modified to SI254. Therefore, according to the forwarding table of SFF213 in FIG. 6b, the data packets of SPI2 and SPI3 can go their respective paths, further, due to FIG. 6b. According to the type of the operation, the first SPI is modified to SPI2, and the first SI is modified to SI253. Therefore, in FIG. 6c, it is not necessary to store the path information of SPI3, and only the path information of SPI2 can be multiplexed. Forward SPI3 data packets. It can be seen that the coincidence path is indicated by the first SPI, which can implement multiplexing of path information in the forwarding table, thereby reducing the number of entries in the forwarding table, thereby reducing the memory usage of the forwarding table.

示例三Example three

假设SF节点均支持NSH封装,如图7所示,在图4所示的结构中可能存在两条首部重合的业务链路径。Assuming that the SF nodes support NSH encapsulation, as shown in FIG. 7, there may be two header-coherent service chain paths in the structure shown in FIG.

从图7中的RSP可以看出,SPI4和SPI5的两条业务链路径只有尾部路径部分不同(相同的部分以粗体显示)。现有技术中,即使两条路径由重合,SFF中存储的转发表中也会对应存储每条路径,如示例一种所示会造成转发表表项较多的问题。As can be seen from the RSP in Figure 7, the two service chain paths of SPI4 and SPI5 differ only in the tail path portion (the same part is shown in bold). In the prior art, even if the two paths are overlapped, each forwarding path is stored in the forwarding table stored in the SFF. As shown in the example, the forwarding table entries are more.

基于图7所示的业务链路径,SFC为SFF212,SFF213和SFF214生成的转发表分别如图7a、图7b和图7c所示。Based on the service chain path shown in FIG. 7, the forwarding tables generated by the SFC for the SFF 212, SFF 213, and SFF 214 are shown in FIGS. 7a, 7b, and 7c, respectively.

图7a至图7c中完整记载了SPI4的路径,在此不再赘述,下面结合图7a至图7c对SPI5进行详细说明:The path of SPI4 is completely described in FIG. 7a to FIG. 7c, and details are not described herein again. SPI5 will be described in detail below with reference to FIG. 7a to FIG. 7c:

根据图7a的SFF212的转发表,由于SPI5和SPI4的前半部分相同,因此SC对SPI5的数据报文进行NSH封装后,SPI5的数据报文中第一SPI为4,第一SI为255,第二SPI为5。并且,该数据报文对应的下一跳为SF216的IP地址{1.1.1.1},在将该数据报文转发给下一跳时,将该第一SI减一。该数据报文的信息更新为:第一SPI为4,第一SI为254;第二SPI为5。并且,第一SPI为4,第一SI为254的该数据报文所对应的下一跳为SFF213的IP地址{10.1.2.1}。According to the forwarding table of SFF212 in FIG. 7a, since the first half of SPI5 and SPI4 are the same, after the SC performs NSH encapsulation on the data packet of SPI5, the first SPI in the data packet of SPI5 is 4, and the first SI is 255. The second SPI is 5. The next hop corresponding to the data packet is the IP address {1.1.1.1} of the SF216. When the data packet is forwarded to the next hop, the first SI is decremented by one. The information of the data packet is updated as follows: the first SPI is 4, the first SI is 254, and the second SPI is 5. Moreover, the first SPI is 4, and the next hop corresponding to the data packet of the first SI is 254 is the IP address {10.1.2.1} of the SFF213.

根据图7b的SFF213的转发表,SPI5的数据报文中第一SPI为4,第一SI为254时所对应的下一跳为SF218的IP地址{1.1.3.1},在将该数据报文转发给下一跳时,将该第一SI减一。该数据报文中的信息更新为:第一SPI为4,第一SI为253;第二SPI为5。该第一SPI为4,第一SI为253的数据报文所对应的下一跳为SF219的IP地址{1.1.4.1}。在将该数据报文转发给下一跳时,将该第一SI减一。该数据报文中信息更新为:第一SPI为4,第一SI为252;第二SPI为5。该第一SPI为4,第一SI为252的数据报文所对应的下一跳为SFF214的IP地址{10.1.3.1}。对应的NSH封装信息中类型标记指示的操作类型为分离,由于该数据报文的第一SPI和第二SPI不同,且第二SPI与目标SPI相同,则:使用目标SPI更新NSH中的第一SPI,使用目标SI更新NSH中的第一SI。更新后SPI5的数据报文中:第一SPI为5,第一SI为252,第二SPI为5,第一SI为252。该第一SPI为5,第一SI为252的数据报文对应的下一跳为SF220的IP地址{1.1.5.1},在将该数据报文转发给下一跳时,将该第一SI减一。该数据报文中的信息更新为:第一SPI为5,第一SI为251;第二SPI为5。由于SPI5的数据报文中第一SPI为5,第一SI为251时所对应的下一跳为VRFn(SFC),则该数据报文被直接发送给SPI5的PS。According to the forwarding table of the SFF 213 of FIG. 7b, the first SPI in the data packet of the SPI5 is 4, and the next hop corresponding to the first SI is 254 is the IP address {1.1.3.1} of the SF218, and the data packet is in the data packet. When forwarding to the next hop, the first SI is decremented by one. The information in the data packet is updated as follows: the first SPI is 4, the first SI is 253, and the second SPI is 5. The first SPI is 4, and the next hop corresponding to the data packet whose first SI is 253 is the IP address {1.1.4.1} of the SF219. When the data packet is forwarded to the next hop, the first SI is decremented by one. The information in the data message is updated as follows: the first SPI is 4, the first SI is 252, and the second SPI is 5. The first SPI is 4, and the next hop corresponding to the data packet with the first SI of 252 is the IP address {10.1.3.1} of the SFF214. The operation type indicated by the type tag in the corresponding NSH package information is separated. Since the first SPI and the second SPI of the data message are different, and the second SPI is the same as the target SPI, the target SPI is used to update the first in the NSH. The SPI updates the first SI in the NSH using the target SI. In the updated data message of SPI5, the first SPI is 5, the first SI is 252, the second SPI is 5, and the first SI is 252. The first SPI is 5, and the next hop corresponding to the data packet with the first SI being 252 is the IP address {1.1.5.1} of the SF220. When the data packet is forwarded to the next hop, the first SI is used. minus one. The information in the data packet is updated as follows: the first SPI is 5, the first SI is 251, and the second SPI is 5. Since the first SPI in the data packet of SPI5 is 5, and the next hop corresponding to the first SI is 251 is VRFn (SFC), the data packet is directly sent to the PS of SPI5.

也就是说,本申请实施例中,SC对SPI5的数据报文进行NSH封装时,将第一SPI封装为SPI4,将第一SI封装为SI255,因此,在图7a和图7b的转发表中无需存储SPI5的SI255至SI253的信息,复用SPI4的信息即可,进一步,由于在图7b中根据所指示的操作类型为分离的类型标记,将SPI5的SI252的数据报文外部的第一SI还原为SPI5, 将SI还原为SI252,因此在图7c中SFF214的转发表中SPI4和SPI5可以走各自的路径。可见,应用本申请实施例所提供的方案,重合路径由第一SPI指示,能够实现转发表中路径信息的复用,从而减少转发表的表项数,进而降低转发表的内存占用量。That is, in the embodiment of the present application, when the SC performs NSH encapsulation on the data packet of the SPI5, the first SPI is encapsulated into SPI4, and the first SI is encapsulated as SI255. Therefore, in the forwarding table of FIG. 7a and FIG. 7b. It is not necessary to store the information of SI255 to SI253 of SPI5, and the information of SPI4 can be multiplexed. Further, since the type of operation indicated in FIG. 7b is a separate type flag, the first SI outside the data message of SI252 of SPI5 is used. Restore to SPI5 and restore SI to SI252, so SPI4 and SPI5 can follow their respective paths in the forwarding table of SFF214 in Figure 7c. It can be seen that, by using the solution provided by the embodiment of the present application, the coincidence path is indicated by the first SPI, and the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, thereby reducing the memory usage of the forwarding table.

可选地,本申请实施例中可通过SFC控制器的根据客户的业务功能路径(Service Function Path,SFP)生成RSP路径。从已存在的多条RSP路径中查询出重合路径最长的至少两条RSP,根据至少两条RSP向对应的SFF下发转发流表。具体来说分为以下几种情况:Optionally, in the embodiment of the present application, the RSP path may be generated by the SFC controller according to a service function path (SFP) of the client. The at least two RSPs with the longest coincidence path are queried from the existing multiple RSP paths, and the forwarding flow table is delivered to the corresponding SFF according to the at least two RSPs. Specifically, it is divided into the following cases:

第一种情况,尾部重合的至少两条业务链路径:重合路径的前一个SFF上的转发流表中:尾部重合的至少两条业务链路径中的除了目标业务链路之外的每条业务链路的SPI和SI对应的NSH封装信息中类型标记指示的操作类型设置为合并,并增加目标SPI和目标SI;目标SPI和目标SI即为需要切换到的业务链路的SPI和SI。In the first case, at least two service chain paths coincident with the tail: in the forwarding flow table on the previous SFF of the coincidence path: each of the at least two service chain paths that overlap in the tail except the target service link The operation type indicated by the type flag in the NSH encapsulation information corresponding to the SPI and SI of the link is set to merge, and the target SPI and the target SI are added; the target SPI and the target SI are the SPI and SI of the service link to be switched to.

第二种情况,首端和尾部重合的至少两条业务链路径:首端重合路径的最后一个SFF上的转发流表中:首端和尾部重合的至少两条业务链路径中的目标业务链路的SPI和SI对应的NSH封装信息中类型标记指示的操作类型设置为分离;In the second case, at least two service chain paths in which the head end and the tail overlap: the forwarding flow table on the last SFF of the head end coincidence path: the target service chain in at least two service chain paths where the head end and the tail overlap The operation type indicated by the type flag in the NSH package information corresponding to the SPI and SI of the path is set to be separated;

尾部重合路径的前一个SFF上的转发流表中:首端和尾部重合的至少两条业务链路径中的除了目标业务链路之外的每条业务链路的SPI和SI对应的NSH封装信息中类型标记指示的操作类型设置为合并,并增加目标SPI和目标SI;目标SPI和目标SI即为需要切换到的业务链路的SPI和SI。In the forwarding flow table on the previous SFF of the trailing coincidence path: the NSH encapsulation information corresponding to the SPI and SI of each service link except the target service link in the at least two service chain paths where the head end and the tail overlap The type of operation indicated by the medium type flag is set to merge and the target SPI and target SI are added; the target SPI and the target SI are the SPI and SI of the service link to be switched to.

第三种情况,首端重合的至少两条业务链路径,首端重合路径的最后一个SFF上的转发流表中:首端和尾部重合的至少两条业务链路径中的目标业务链路的SPI和SI对应的NSH封装信息中类型标记指示的操作类型设置为分离。In the third case, at least two service chain paths coincident at the head end, and a forwarding flow table on the last SFF of the head end coincidence path: at least two service chain paths in the at least two service chain paths where the head end and the tail end coincide The operation type indicated by the type flag in the NSH package information corresponding to the SPI and the SI is set to be separated.

本申请实施例中,在存在大量重合业务链路径的场景下,复用现有业务链转发表(forwarding table),减少业务链路径的所有SFF节点的转发表项的数量,SFF可以快速匹配转发表转发,提升了业务链设备的转发性能,降低了设备成本。另外,本申请实施例中通过扩展NSH还可以在里面携带其他业务信息,所有SFF节点可以共享携带业务的信息去扩展业务。In the embodiment of the present application, the existing service chain forwarding table is reused in a scenario where a large number of service chain paths are overlapped, and the number of forwarding entries of all SFF nodes in the service chain path is reduced, and the SFF can be quickly matched. Publish and forward, improve the forwarding performance of service chain equipment, and reduce equipment costs. In addition, in the embodiment of the present application, the extended NSH can also carry other service information therein, and all the SFF nodes can share the information carrying the service to expand the service.

基于相同构思,本申请提供一种数据报文的转发设备800,用于执行上述方法流程。图8为本申请提供的一种数据报文的转发设备的结构示意图。该转发设备800包括接收单元801、处理单元802和发送单元803。Based on the same concept, the present application provides a data message forwarding device 800 for performing the above method flow. FIG. 8 is a schematic structural diagram of a data packet forwarding device provided by the present application. The forwarding device 800 includes a receiving unit 801, a processing unit 802, and a transmitting unit 803.

本申请实施例中的接收单元801,用于接收业务链的数据报文。其中,数据报文的NSH中包括第一SPI以及第一SI;数据报文还包括第二SPI;第一SPI用于指示第一业务链路径,第二SPI用于指示第二业务链路径,第一业务链路径和第二业务链路径至少部分重合。本申请中,第一SPI为数据报文当前所在业务链路径的SPI,第二SPI为SC为数据报文添加的数据报文所属的业务流对应的业务链的SPI。The receiving unit 801 in the embodiment of the present application is configured to receive a data packet of a service chain. The NSR of the data packet includes a first SPI and a first SI, and the data packet further includes a second SPI. The first SPI is used to indicate a first service chain path, and the second SPI is used to indicate a second service chain path. The first service chain path and the second service chain path at least partially coincide. In this application, the first SPI is the SPI of the service chain path in which the data packet is currently located, and the second SPI is the SPI of the service chain corresponding to the service flow to which the data packet added by the SC is the data packet.

处理单元802,用于根据转发表确定第一SPI和第一SI对应的转发表项中的下一跳地址以及NSH封装信息;根据NSH封装信息为数据报文重新封装NSH;NSH封装信息包括跳转信息和类型标记;类型标记指示根据转发表项转发报文时的操作类型。其中,下一跳地址可以为SF、SFF或PS的地址,转发表是业务链控制器根据业务链的部署情况计算并发送给每个转发设备的。The processing unit 802 is configured to determine, according to the forwarding table, a next hop address and an NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI, and re-encapsulate the NSH according to the NSH encapsulation information; the NSH encapsulation information includes the hopping The information and type tag; the type tag indicates the type of operation when forwarding the message according to the forwarding entry. The next hop address may be an address of the SF, the SFF, or the PS. The forwarding table is calculated by the service chain controller according to the deployment of the service chain and sent to each forwarding device.

发送单元803,用于将重新封装NSH的数据报文发送至下一跳地址。本申请实施例中,转发设备每转发一次数据报文,会将该数据报文中的SI减1。可选地,接收单元801,具体用于:接收业务功能SF发送的数据报文;处理单元802,还用于:若通过接收单元801接收业务功能SF发送的数据报文,则将数据报文中的第一SI减一。The sending unit 803 is configured to send the data packet of the re-packaged NSH to the next hop address. In the embodiment of the present application, each time the forwarding device forwards the data packet, the SI in the data packet is decremented by one. Optionally, the receiving unit 801 is specifically configured to: receive the data packet sent by the service function SF, and the processing unit 802 is further configured to: if the data packet sent by the service function SF is received by the receiving unit 801, the data packet is sent The first SI in the first one is reduced by one.

本申请实施例中,数据报文的NSH中封装了第一SPI、SI以及第二SPI,其中,第一SPI指示当前转发该数据报文的第一业务链路径;第二SPI指示业务链控制器为该数据报文所在的业务链指定的第二业务链路径,第一业务路径与第二业务路径部分重合。本发明实施例通过将第一业务链路径与第二业务链路径重合的部分由第一SPI指示,能够实现转发表中路径信息的复用,从而减少转发表的表项数,进而降低转发表的内存占用量。In the embodiment of the present application, the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control. The second service chain path specified by the service chain in which the data packet is located, where the first service path and the second service path partially overlap. In the embodiment of the present invention, the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.

本申请实施例中类型标记可包括指示的操作类型为合并的类型标记和指示的操作类型为分离的类型标记。若类型标记指示的操作类型为合并,且跳转信息包括目标SPI和目标SI,处理单元802,用于:使用目标SPI更新NSH中的第一SPI;使用目标SI更新NSH中的第一SI;其中,合并的操作类型还用于指示:数据报文在第二业务链路径上的下一跳地址和在第一业务链路径上的下一跳地址相同。The type tag in the embodiment of the present application may include the indicated operation type as a merged type tag and the indicated operation type as a separate type tag. If the operation type indicated by the type tag is merge, and the jump information includes the target SPI and the target SI, the processing unit 802 is configured to: update the first SPI in the NSH using the target SPI; and update the first SI in the NSH using the target SI; The merged operation type is further used to indicate that the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path.

若类型标记指示的操作类型为分离,且跳转信息包括目标SPI和目标SI,且第一SPI和第二SPI不同,则处理单元802,用于:获取NSH封装信息中的目标SPI和目标SI,当目标SPI和第二SPI相同时,使用目标SPI更新NSH中的第一SPI;使用目标SI更新NSH中的第一SI;其中,分离的操作类型还用于指示:数据报文在第二业务链路径上的下一跳地址与数据报文在第一业务链上的下一跳地址不同。If the operation type indicated by the type tag is detached, and the jump information includes the target SPI and the target SI, and the first SPI and the second SPI are different, the processing unit 802 is configured to: acquire the target SPI and the target SI in the NSH package information. Updating the first SPI in the NSH using the target SPI when the target SPI and the second SPI are the same; updating the first SI in the NSH using the target SI; wherein the separated operation type is further used to indicate that the data message is in the second The next hop address on the service chain path is different from the next hop address of the data packet on the first service chain.

上述两种类型标记的具体示例参见上述实施例的描述,在此不再赘述。For specific examples of the above two types of labels, refer to the description of the above embodiments, and details are not described herein again.

可选地,第一SPI位于数据报文的NSH的SPI字段中,第一SI位于数据报文的NSH的SI字段中,第二SPI位于数据报文的NSH的context header中。由于要根据第一SPI和第一SI进行转发,因此经常需访问第一SPI和第一SI,将第一SPI和第一SI放入头部可减少访问时延。Optionally, the first SPI is located in the SPI field of the NSH of the data packet, where the first SI is located in the SI field of the NSH of the data packet, and the second SPI is located in the context header of the NSH of the data packet. Since forwarding is performed according to the first SPI and the first SI, it is often necessary to access the first SPI and the first SI, and placing the first SPI and the first SI into the header may reduce the access delay.

应理解,以上各个单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。本申请实施例中,接收单元801和发送单元803可以由通信接口实现,处理单元802可以由处理器实现。It should be understood that the division of each unit above is only a division of a logical function, and the actual implementation may be integrated into one physical entity in whole or in part, or may be physically separated. In the embodiment of the present application, the receiving unit 801 and the sending unit 803 may be implemented by a communication interface, and the processing unit 802 may be implemented by a processor.

基于相同构思,本申请提供一种数据报文的转发设备900,用于执行上述方法流程。图9为本申请提供的一种数据报文的转发设备的结构示意图。该转发设备900包括处理器901、存储器903、通信接口902;其中,处理器901、存储器903和通信接口902通过总线904相互连接。Based on the same concept, the present application provides a data message forwarding device 900 for performing the above method flow. FIG. 9 is a schematic structural diagram of a data packet forwarding device provided by the present application. The forwarding device 900 includes a processor 901, a memory 903, and a communication interface 902; wherein the processor 901, the memory 903, and the communication interface 902 are connected to each other through a bus 904.

总线904可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 904 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 9, but it does not mean that there is only one bus or one type of bus.

存储器903可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,简称RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,简称HDD)或固态 硬盘(solid-state drive,简称SSD);存储器410还可以包括上述种类的存储器的组合。The memory 903 may include a volatile memory such as a random-access memory (RAM); the memory may also include a non-volatile memory such as a flash memory (flash) Memory), hard disk drive (HDD) or solid-state drive (SSD); the memory 410 may also include a combination of the above types of memory.

通信接口902可以为有线通信接入口,无线通信接口或其组合,其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线通信接口可以为WLAN接口。The communication interface 902 can be a wired communication access port, a wireless communication interface, or a combination thereof, wherein the wired communication interface can be, for example, an Ethernet interface. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface can be a WLAN interface.

处理器901可以是中央处理器(central processing unit,简称CPU),网络处理器(network processor,简称NP)或者CPU和NP的组合。The processor 901 can be a central processing unit (CPU), a network processor (NP) or a combination of a CPU and an NP.

处理器901还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(转发设备plication-specific integrated circuit,简称ASIC),可编程逻辑器件(programmable logic device,简称PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,简称CPLD),现场可编程逻辑门阵列(field-programmable gate array,简称FPGA),通用阵列逻辑(generic array logic,简称GAL)或其任意组合。The processor 901 may further include a hardware chip. The hardware chip may be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL) or any combination.

可选地,存储器903还可以用于存储程序指令,处理器901调用该存储器903中存储的程序指令,可以执行图2所示实施例中的一个或多个步骤,或其中可选的实施方式,使得转发设备900实现上述方法中转发设备的功能。Optionally, the memory 903 can also be used to store program instructions, and the processor 901 calls the program instructions stored in the memory 903, and can perform one or more steps in the embodiment shown in FIG. 2, or an optional implementation thereof. The forwarding device 900 is implemented to implement the functions of the forwarding device in the above method.

本申请实施例中处理器901,用于根据转发表确定第一SPI和第一SI对应的转发表项中的下一跳地址以及NSH封装信息;根据NSH封装信息为数据报文重新封装NSH;NSH封装信息包括跳转信息和类型标记;类型标记指示根据转发表项转发报文时的操作类型。其中,下一跳地址可以为SF、SFF或PS的地址,转发表是业务链控制器根据业务链的部署情况计算并发送给每个转发设备的。通信接口902,用于将重新封装NSH的数据报文发送至下一跳地址。本申请实施例中,转发设备每转发一次数据报文,会将该数据报文中的SI减1。可选地,处理器901,还用于:若通过通信接口902接收业务功能SF发送的数据报文,则将数据报文中的第一SI减一The processor 901 is configured to determine, according to the forwarding table, the next hop address and the NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI, and re-encapsulate the NSH according to the NSH encapsulation information. The NSH encapsulation information includes a jump information and a type tag; the type flag indicates an operation type when the packet is forwarded according to the forwarding entry. The next hop address may be an address of the SF, the SFF, or the PS. The forwarding table is calculated by the service chain controller according to the deployment of the service chain and sent to each forwarding device. The communication interface 902 is configured to send the data packet of the re-packaged NSH to the next hop address. In the embodiment of the present application, each time the forwarding device forwards the data packet, the SI in the data packet is decremented by one. Optionally, the processor 901 is further configured to: if the data message sent by the service function SF is received through the communication interface 902, the first SI in the data packet is decremented by one.

本申请实施例中通信接口902,用于接收业务链的数据报文.其中,数据报文的NSH中包括第一SPI以及第一SI;数据报文还包括第二SPI;第一SPI用于指示第一业务链路径,第二SPI用于指示第二业务链路径,第一业务链路径和第二业务链路径至少部分重合。本申请中,第一SPI为数据报文当前所在业务链路径的SPI,第二SPI为SC为数据报文添加的数据报文所属的业务流对应的业务链的SPI。可选地,通信接口902,用于:接收业务功能SF发送的数据报文。In the embodiment of the present application, the communication interface 902 is configured to receive a data packet of the service chain. The NSH of the data packet includes a first SPI and a first SI, and the data packet further includes a second SPI. The first service chain path is indicated, and the second SPI is used to indicate the second service chain path, where the first service chain path and the second service chain path at least partially overlap. In this application, the first SPI is the SPI of the service chain path in which the data packet is currently located, and the second SPI is the SPI of the service chain corresponding to the service flow to which the data packet added by the SC is the data packet. Optionally, the communication interface 902 is configured to: receive a data packet sent by the service function SF.

本申请实施例中,数据报文的NSH中封装了第一SPI、SI以及第二SPI,其中,第一SPI指示当前转发该数据报文的第一业务链路径;第二SPI指示业务链控制器为该数据报文所在的业务链指定的第二业务链路径,第一业务路径与第二业务路径部分重合。本发明实施例通过将第一业务链路径与第二业务链路径重合的部分由第一SPI指示,能够实现转发表中路径信息的复用,从而减少转发表的表项数,进而降低转发表的内存占用量。In the embodiment of the present application, the first SPI, the SI, and the second SPI are encapsulated in the NSH of the data packet, where the first SPI indicates the first service chain path for forwarding the data packet, and the second SPI indicates the service chain control. The second service chain path specified by the service chain in which the data packet is located, where the first service path and the second service path partially overlap. In the embodiment of the present invention, the part of the first service chain path and the second service chain path are instructed by the first SPI, so that the path information in the forwarding table can be reused, thereby reducing the number of entries in the forwarding table, and further reducing the forwarding table. Memory usage.

本申请实施例中类型标记可包括指示的操作类型为合并的类型标记和指示的操作类型为分离的类型标记。若类型标记指示的操作类型为合并,且跳转信息包括目标SPI和目标SI,处理器901,用于:使用目标SPI更新NSH中的第一SPI;使用目标SI更新NSH中的第一SI;其中,合并的操作类型还用于指示:数据报文在第二业务链路径上的下一跳地址和在第一业务链路径上的下一跳地址相同。The type tag in the embodiment of the present application may include the indicated operation type as a merged type tag and the indicated operation type as a separate type tag. If the operation type indicated by the type tag is merged, and the jump information includes the target SPI and the target SI, the processor 901 is configured to: update the first SPI in the NSH by using the target SPI; and update the first SI in the NSH by using the target SI; The merged operation type is further used to indicate that the next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path.

若类型标记指示的操作类型为分离,且跳转信息包括目标SPI和目标SI,且第一SPI和第二SPI不同,则处理器901,用于:获取NSH封装信息中的目标SPI和目标SI,当目标SPI和第二SPI相同时,使用目标SPI更新NSH中的第一SPI;使用目标SI更新NSH中的第一SI;其中,分离的操作类型还用于指示:数据报文在第二业务链路径上的下一跳地址与数据报文在第一业务链上的下一跳地址不同。If the operation type indicated by the type tag is detached, and the jump information includes the target SPI and the target SI, and the first SPI and the second SPI are different, the processor 901 is configured to: acquire the target SPI and the target SI in the NSH package information. Updating the first SPI in the NSH using the target SPI when the target SPI and the second SPI are the same; updating the first SI in the NSH using the target SI; wherein the separated operation type is further used to indicate that the data message is in the second The next hop address on the service chain path is different from the next hop address of the data packet on the first service chain.

上述两种类型标记的具体示例参见上述实施例的描述,在此不再赘述。For specific examples of the above two types of labels, refer to the description of the above embodiments, and details are not described herein again.

可选地,第一SPI位于数据报文的NSH的SPI字段中,第一SI位于数据报文的NSH的SI字段中,第二SPI位于数据报文的NSH的context header中。由于要根据第一SPI和第一SI进行转发,因此经常需访问第一SPI和第一SI,将第一SPI和第一SI放入头部可减少访问时延。Optionally, the first SPI is located in the SPI field of the NSH of the data packet, where the first SI is located in the SI field of the NSH of the data packet, and the second SPI is located in the context header of the NSH of the data packet. Since forwarding is performed according to the first SPI and the first SI, it is often necessary to access the first SPI and the first SI, and placing the first SPI and the first SI into the header may reduce the access delay.

本领域内的技术人员应明白,本发明实施例可提供为方法、系统、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the invention may be provided as a method, system, or computer program product. Thus, embodiments of the invention may be in the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, embodiments of the invention may take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。It is apparent that those skilled in the art can make various modifications and variations to the embodiments of the present invention without departing from the spirit and scope of the application. Thus, it is intended that the present invention cover the modifications and variations of the embodiments of the invention.

Claims (11)

一种数据报文转发方法,其特征在于,包括:A data packet forwarding method, comprising: 接收业务链的数据报文;其中,所述数据报文的网络业务头NSH中包括第一业务链路径标识SPI以及第一业务索引SI;所述数据报文还包括第二SPI;所述第一SPI用于指示第一业务链路径,所述第二SPI用于指示第二业务链路径,所述第一业务链路径和第二业务链路径至少部分重合;Receiving a data packet of the service chain, where the network service header NSH of the data packet includes a first service chain path identifier SPI and a first service index SI; the data packet further includes a second SPI; An SPI is used to indicate a first service chain path, and the second SPI is used to indicate a second service chain path, where the first service chain path and the second service chain path at least partially overlap; 根据转发表确定所述第一SPI和第一SI对应的转发表项中的下一跳地址以及NSH封装信息;所述NSH封装信息包括跳转信息和类型标记;所述类型标记指示根据所述转发表项转发报文时的操作类型;Determining, according to the forwarding table, a next hop address and an NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI; the NSH encapsulation information includes a jump information and a type tag; The type of operation when the forwarding entry forwards the packet. 根据所述NSH封装信息为所述数据报文重新封装NSH;Re-packaging the NSH for the data packet according to the NSH encapsulation information; 将重新封装NSH的所述数据报文发送至所述下一跳地址。Transmitting the data packet of the re-encapsulated NSH to the next hop address. 如权利要求1所述的方法,其特征在于,所述类型标记指示的操作类型为合并,且所述跳转信息包括目标SPI和目标SI,所述根据所述NSH封装信息为所述数据报文重新封装NSH,包括:The method of claim 1, wherein the operation type indicated by the type tag is a merge, and the jump information includes a target SPI and a target SI, and the data packet is the data packet according to the NSH package information. Repackage NSH, including: 使用所述目标SPI更新所述NSH中的第一SPI;Updating the first SPI in the NSH by using the target SPI; 使用所述目标SI更新所述NSH中的第一SI;Updating the first SI in the NSH by using the target SI; 其中,所述合并的操作类型还用于指示:The merged operation type is also used to indicate: 所述数据报文在所述第二业务链路径上的下一跳地址和在所述第一业务链路径上的下一跳地址相同。The next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path. 如权利要求1所述的方法,其特征在于,所述类型标记指示的操作类型为分离,且所述跳转信息包括目标SPI和目标SI,且所述第一SPI和所述第二SPI不同,则所述根据所述NSH封装信息为所述数据报文重新封装NSH,包括:The method of claim 1, wherein the type of operation indicated by the type tag is separate, and the jump information comprises a target SPI and a target SI, and the first SPI and the second SPI are different The re-packaging the NSH for the data packet according to the NSH encapsulation information includes: 获取所述NSH封装信息中的目标SPI和目标SI,当所述目标SPI和所述第二SPI相同时,使用所述目标SPI更新所述NSH中的第一SPI;Obtaining the target SPI and the target SI in the NSH package information, when the target SPI and the second SPI are the same, using the target SPI to update the first SPI in the NSH; 使用所述目标SI更新所述NSH中的第一SI;其中,所述分离的操作类型还用于指示:Updating the first SI in the NSH by using the target SI; wherein the separated operation type is further used to indicate: 所述数据报文在所述第二业务链路径上的下一跳地址与所述数据报文在所述第一业务链上的下一跳地址不同。The next hop address of the data packet on the second service chain path is different from the next hop address of the data packet on the first service chain. 如权利要求1至3任一权利要求所述的方法,其特征在于,所述接收业务链的数据报文,包括:The method according to any one of claims 1 to 3, wherein the receiving the data packet of the service chain comprises: 接收业务功能SF发送的所述数据报文,将所述数据报文中的第一SI减一。And receiving the data packet sent by the service function SF, and decrementing the first SI in the data packet by one. 如权利要求1至4任一权利要求所述的方法,其特征在于,所述第一SPI位于所述数据报文的NSH的SPI字段中,所述第一SI位于所述数据报文的NSH的SI字段中,所述第二SPI位于所述数据报文的NSH的上下文头context header中。The method according to any one of claims 1 to 4, wherein the first SPI is located in an SPI field of an NSH of the data packet, and the first SI is located in an NSH of the data packet. In the SI field, the second SPI is located in a context header of the NSH of the data packet. 一种数据报文的转发设备,其特征在于,包括:A data packet forwarding device, comprising: 接收单元,用于接收业务链的数据报文;其中,所述数据报文的网络业务头NSH中包括第一业务链路径标识SPI以及第一业务索引SI;所述数据报文还包括第二SPI;所述第一SPI用于指示第一业务链路径,所述第二SPI用于指示第二业务链路径,所述 第一业务链路径和第二业务链路径至少部分重合;a receiving unit, configured to receive a data packet of the service chain, where the network service header NSH of the data packet includes a first service chain path identifier SPI and a first service index SI, and the data packet further includes a second SPI; the first SPI is used to indicate a first service chain path, and the second SPI is used to indicate a second service chain path, where the first service chain path and the second service chain path at least partially overlap; 处理单元,用于根据转发表确定所述第一SPI和第一SI对应的转发表项中的下一跳地址以及NSH封装信息;根据所述NSH封装信息为所述数据报文重新封装NSH;所述NSH封装信息包括跳转信息和类型标记;所述类型标记指示根据所述转发表项转发报文时的操作类型;a processing unit, configured to determine, according to the forwarding table, a next hop address and an NSH encapsulation information in the forwarding entry corresponding to the first SPI and the first SI; and re-encapsulating the NSH according to the NSH encapsulation information; The NSH encapsulation information includes a jump information and a type tag; the type tag indicates an operation type when the packet is forwarded according to the forwarding entry; 发送单元,用于将重新封装NSH的所述数据报文发送至所述下一跳地址。And a sending unit, configured to send the data packet of the re-encapsulated NSH to the next hop address. 如权利要求6所述的转发设备,其特征在于,所述类型标记指示的操作类型为合并,且所述跳转信息包括目标SPI和目标SI,所述处理单元,用于:The forwarding device according to claim 6, wherein the operation type indicated by the type tag is a merge, and the jump information includes a target SPI and a target SI, and the processing unit is configured to: 使用所述目标SPI更新所述NSH中的第一SPI;Updating the first SPI in the NSH by using the target SPI; 使用所述目标SI更新所述NSH中的第一SI;Updating the first SI in the NSH by using the target SI; 其中,所述合并的操作类型还用于指示:The merged operation type is also used to indicate: 所述数据报文在所述第二业务链路径上的下一跳地址和在所述第一业务链路径上的下一跳地址相同。The next hop address of the data packet on the second service chain path is the same as the next hop address on the first service chain path. 如权利要求6所述的转发设备,其特征在于,所述类型标记指示的操作类型为分离,且所述跳转信息包括目标SPI和目标SI,且所述第一SPI和所述第二SPI不同,则所述处理单元,用于:The forwarding device according to claim 6, wherein the type of operation indicated by the type flag is separate, and the jump information includes a target SPI and a target SI, and the first SPI and the second SPI Different, the processing unit is used to: 获取所述NSH封装信息中的目标SPI和目标SI,当所述目标SPI和所述第二SPI相同时,使用所述目标SPI更新所述NSH中的第一SPI;Obtaining the target SPI and the target SI in the NSH package information, when the target SPI and the second SPI are the same, using the target SPI to update the first SPI in the NSH; 使用所述目标SI更新所述NSH中的第一SI;其中,所述分离的操作类型还用于指示:Updating the first SI in the NSH by using the target SI; wherein the separated operation type is further used to indicate: 所述数据报文在所述第二业务链路径上的下一跳地址与所述数据报文在所述第一业务链上的下一跳地址不同。The next hop address of the data packet on the second service chain path is different from the next hop address of the data packet on the first service chain. 如权利要求6至8任一权利要求所述的转发设备,其特征在于,所述接收单元,用于:The forwarding device according to any one of claims 6 to 8, wherein the receiving unit is configured to: 接收业务功能SF发送的所述数据报文;Receiving the data packet sent by the service function SF; 所述处理单元,还用于:The processing unit is further configured to: 若通过所述接收单元接收业务功能SF发送的所述数据报文,则将所述数据报文中的第一SI减一。And receiving, by the receiving unit, the data packet sent by the service function SF, and decrementing the first SI in the data packet by one. 如权利要求6至9任一权利要求所述的转发设备,其特征在于,所述第一SPI位于所述数据报文的NSH的SPI字段中,所述第一SI位于所述数据报文的NSH的SI字段中,所述第二SPI位于所述数据报文的NSH的上下文头context header中。The forwarding device according to any one of claims 6 to 9, wherein the first SPI is located in an SPI field of an NSH of the data packet, and the first SI is located in the data packet. In the SI field of the NSH, the second SPI is located in a context header of the NSH of the data packet. 一种数据报文的转发设备,其特征在于,所述转发设备包括处理器、通信接口和存储器;A forwarding device for data packets, characterized in that the forwarding device comprises a processor, a communication interface and a memory; 所述存储器用于存储指令,所述处理器用于执行所述存储器存储的指令,并控制所述通信接口接收或发送数据报文,当所述处理器执行所述存储器存储的指令时,所述转发设备用于执行如权利要求1-5任一所述的方法。The memory is configured to store an instruction, the processor is configured to execute the memory stored instruction, and control the communication interface to receive or transmit a data message, when the processor executes the memory stored instruction, A forwarding device is operative to perform the method of any of claims 1-5.
PCT/CN2018/076746 2017-03-14 2018-02-13 Method and device for forwarding data packet Ceased WO2018166325A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710150395.7 2017-03-14
CN201710150395.7A CN108574638B (en) 2017-03-14 2017-03-14 Method and equipment for forwarding data message

Publications (1)

Publication Number Publication Date
WO2018166325A1 true WO2018166325A1 (en) 2018-09-20

Family

ID=63521836

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076746 Ceased WO2018166325A1 (en) 2017-03-14 2018-02-13 Method and device for forwarding data packet

Country Status (2)

Country Link
CN (1) CN108574638B (en)
WO (1) WO2018166325A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565044A (en) * 2019-09-10 2021-03-26 华为技术有限公司 Message processing method and device
CN113691448A (en) * 2020-05-18 2021-11-23 华为技术有限公司 Method, SFF and SF device for forwarding packets in SRv6 service chain
CN114268668A (en) * 2021-12-20 2022-04-01 中国电信股份有限公司 Data processing method, system, device, electronic equipment and storage medium
CN114826998A (en) * 2021-01-29 2022-07-29 中国电信股份有限公司 Message forwarding method based on service function chain, controller and storage medium
CN115714823A (en) * 2021-08-19 2023-02-24 苏州盛科通信股份有限公司 Message processing method and device, electronic equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109756521B (en) * 2019-03-21 2021-07-13 浪潮云信息技术股份公司 NSH message processing method, device and system
CN114697253A (en) * 2020-12-28 2022-07-01 华为技术有限公司 Method for determining forwarding path of service chain and communication device
CN114244765B (en) * 2021-12-20 2023-09-29 中国电信股份有限公司 Storage method and device for service chain, electronic equipment and storage medium
CN114978909B (en) * 2022-05-23 2024-05-14 中国电信股份有限公司 Message processing method, device and system, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150195197A1 (en) * 2014-01-06 2015-07-09 Futurewei Technologies, Inc. Service Function Chaining in a Packet Network
CN105099919A (en) * 2014-05-15 2015-11-25 华为技术有限公司 Message processing method and apparatus
US20170005920A1 (en) * 2015-07-01 2017-01-05 Cisco Technology, Inc. Forwarding packets with encapsulated service chain headers
CN106453204A (en) * 2015-08-07 2017-02-22 中兴通讯股份有限公司 Data message processing method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9407540B2 (en) * 2013-09-06 2016-08-02 Cisco Technology, Inc. Distributed service chaining in a network environment
US9930008B2 (en) * 2014-03-25 2018-03-27 Cisco Technology, Inc. Dynamic service chain with network address translation detection
US20160099853A1 (en) * 2014-10-01 2016-04-07 Cisco Technology, Inc. Active and passive dataplane performance monitoring of service function chaining
US9531850B2 (en) * 2014-12-04 2016-12-27 Cisco Technology, Inc. Inter-domain service function chaining
US10122622B2 (en) * 2015-05-29 2018-11-06 Futurewei Technologies, Inc. Exchanging application metadata for application context aware service insertion in service function chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150195197A1 (en) * 2014-01-06 2015-07-09 Futurewei Technologies, Inc. Service Function Chaining in a Packet Network
CN105099919A (en) * 2014-05-15 2015-11-25 华为技术有限公司 Message processing method and apparatus
US20170005920A1 (en) * 2015-07-01 2017-01-05 Cisco Technology, Inc. Forwarding packets with encapsulated service chain headers
CN106453204A (en) * 2015-08-07 2017-02-22 中兴通讯股份有限公司 Data message processing method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565044A (en) * 2019-09-10 2021-03-26 华为技术有限公司 Message processing method and device
CN112565044B (en) * 2019-09-10 2023-08-25 华为技术有限公司 Message processing method and device
US11811654B2 (en) 2019-09-10 2023-11-07 Huawei Technologies Co., Ltd. Packet processing method and apparatus
CN113691448A (en) * 2020-05-18 2021-11-23 华为技术有限公司 Method, SFF and SF device for forwarding packets in SRv6 service chain
CN113691448B (en) * 2020-05-18 2022-09-23 华为技术有限公司 SRv6 method for forwarding message in service chain, SFF and SF device
US12309064B2 (en) 2020-05-18 2025-05-20 Huawei Technologies Co., Ltd. Method for forwarding packet in SRv6 service function chain, SFF, and SF device
CN114826998A (en) * 2021-01-29 2022-07-29 中国电信股份有限公司 Message forwarding method based on service function chain, controller and storage medium
CN114826998B (en) * 2021-01-29 2023-05-16 中国电信股份有限公司 Message forwarding method based on service function chain, controller and storage medium
CN115714823A (en) * 2021-08-19 2023-02-24 苏州盛科通信股份有限公司 Message processing method and device, electronic equipment and storage medium
CN114268668A (en) * 2021-12-20 2022-04-01 中国电信股份有限公司 Data processing method, system, device, electronic equipment and storage medium
CN114268668B (en) * 2021-12-20 2024-12-27 中国电信股份有限公司 Data processing method, system, device, electronic device and storage medium

Also Published As

Publication number Publication date
CN108574638B (en) 2020-10-16
CN108574638A (en) 2018-09-25

Similar Documents

Publication Publication Date Title
WO2018166325A1 (en) Method and device for forwarding data packet
US11411770B2 (en) Virtual port channel bounce in overlay network
US10320664B2 (en) Cloud overlay for operations administration and management
US9590902B2 (en) Signaling aliasing capability in data centers
US9674088B1 (en) Receive packet steering for virtual networks
CN113411243B (en) Data transmission method and device
US10237177B2 (en) Transfer device and transfer system
CN110999265B (en) Manage network connectivity between cloud computing service endpoints and virtual machines
US20170331741A1 (en) Mac chaining load balancer
US20130058345A1 (en) Apparatus and Method for Establishing Tunnels Between Nodes in a Communication Network
JP6426879B2 (en) Data packet transfer
EP4160950B1 (en) Method and apparatus for sending a message, and network device, system and storage medium
WO2016173271A1 (en) Message processing method, device and system
US9363158B2 (en) Reduce size of IPV6 routing tables by using a bypass tunnel
JP2018518925A (en) Packet forwarding
CN105634942A (en) Method and switch for forwarding message
JP2023551262A (en) Route advertisement method, device, and system
EP3018866A1 (en) Signaling aliasing capability in data centers
EP4020903B1 (en) Method and apparatus for preventing traffic bypassing
CN111010344B (en) Message forwarding method and device, electronic equipment and machine-readable storage medium
CN110505138A (en) Message forwarding method, device, electronic equipment and machine readable storage medium
WO2023185502A1 (en) Traffic reinjection method and protection system
CN112671646B (en) Information processing method, device and equipment and computer readable storage medium
US10742570B1 (en) Utilizing virtual routing and forwarding (VRF) interfaces to manage packet transmission through an internal interface
US20240244002A1 (en) Route advertisement method, packet forwarding method, device, 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: 18766826

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

Country of ref document: EP

Kind code of ref document: A1