WO2018036254A1 - Packet forwarding method and device - Google Patents

Packet forwarding method and device Download PDF

Info

Publication number
WO2018036254A1
WO2018036254A1 PCT/CN2017/089465 CN2017089465W WO2018036254A1 WO 2018036254 A1 WO2018036254 A1 WO 2018036254A1 CN 2017089465 W CN2017089465 W CN 2017089465W WO 2018036254 A1 WO2018036254 A1 WO 2018036254A1
Authority
WO
WIPO (PCT)
Prior art keywords
forwarding
parameter
packet
preset
classifier
Prior art date
Application number
PCT/CN2017/089465
Other languages
French (fr)
Chinese (zh)
Inventor
徐晓旸
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018036254A1 publication Critical patent/WO2018036254A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS

Definitions

  • the present disclosure relates to the field of communications technologies, and in particular, to a packet forwarding method and apparatus.
  • the service function chain (English: service function chain, SFC for short) defines and instantiates a set of ordered business functions for service flow (English: service function, SF for short), and the business function chain is also referred to as the service chain. (English: service chain), its purpose is to provide users with an end-to-end business path.
  • SF can refer to firewall (English: firewalls), network address translator (English: Network Address Translators, referred to as: NATs) or other specific applications (English: application-specific) functions, for example, load balancer (English: load Balancer) and so on.
  • the network device forwards the Internet Protocol (English: Internet Protocol, IP for short) message, if the network
  • the network device extracts the quintuple from the IP packet (source IP address, The destination IP address, the source port, the destination port, and the protocol number are calculated, and a hash value is calculated according to the quintuple, and then a path is selected from the multiple forwarding paths according to the hash value.
  • the quintuple of the return service flow is to exchange the source IP address and the destination IP address in the quintuple of the forward service flow, and the source port and the destination port are exchanged, and the SFF receives the return service flow.
  • the return service flow cannot be directed to the SF of the forward traffic flow in the SFG, and the round-trip path consistency requirement cannot be met.
  • a packet forwarding method and apparatus are provided to solve the problem that the SFF cannot lead the forward service flow and the return service flow to the same SF in the SFG according to the hash algorithm in the prior art, and cannot meet the round-trip path.
  • an embodiment of the present invention provides a packet forwarding method, including:
  • the classifier receives the service packet and determines the preset packet feature of the service packet
  • the classifier obtains a forwarding parameter corresponding to the preset message feature
  • the classifier encapsulates the service packet into a service chain packet, where the service chain packet carries the forwarding parameter
  • the classifier sends the service chain message to a service function forwarder corresponding to the device identifier.
  • the classifier obtains a forwarding parameter corresponding to the preset packet feature, including:
  • the classifier generates a parameter query request message, where the parameter query request message carries the preset message feature
  • the classifier sends the parameter query request message to a parameter manager
  • the classifier receives the forwarding parameter returned by the parameter manager according to the parameter query request.
  • the generating, by the classifier, the parameter query request message includes:
  • the classifier searches, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
  • the classifier When the forwarding parameter corresponding to the preset message feature does not exist in the classifier mapping table, the classifier generates the parameter query request message;
  • the method further includes:
  • the classifier When the classifier receives the forwarding parameter returned by the parameter manager, the corresponding relationship between the forwarding parameter and the preset message feature is added to the classifier mapping table.
  • the classifier obtains a forwarding parameter corresponding to the preset packet feature, including:
  • the classifier searches, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
  • the classifier acquires the corresponding to the preset message feature from the classifier mapping table. Forward parameters.
  • the forwarding path includes at least one service function group, and each of the service function groups is connected to at least two service function forwardings arranged in a preset order.
  • the classifier determines, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path, including:
  • the classifier performs modulo calculation on the forwarding parameter to obtain an operation result
  • the classifier determines a target quantity value interval in which the operation result is located
  • the classifier determines, according to the correspondence between the preset quantity value interval and the device identifier, the device identifier corresponding to the target quantity value interval as the device identifier of the service function forwarder of the next hop in the forwarding path.
  • an embodiment of the present invention provides a packet forwarding method, where the method includes:
  • the service function forwarder receives the service chain packet forwarded by the last hop device in the forwarding path, where the service chain packet carries the forwarding parameter;
  • the service function forwarder obtains a forwarding parameter in the service chain packet
  • the service function forwarder sends the service chain message to the next hop device corresponding to the device identifier.
  • the service function forwarder determines, according to the forwarding parameter, a next hop device identifier in the forwarding path, including:
  • the service function forwarder determines, according to the preset forwarding table, that the device type of the next hop device in the forwarding path is a service function forwarder, the service function forwarder determines a next hop according to the forwarding parameter. Device ID of the service function forwarder corresponding to the device.
  • the service function forwarder is associated with multiple service function entities
  • the service function forwarder determines the next hop device identifier in the forwarding path according to the forwarding parameter, and further includes:
  • the service function forwarder determines, according to the preset forwarding table, that the device type of the next hop device in the forwarding path is a service function entity, the service function forwarder determines the next hop device according to the forwarding parameter.
  • the method further includes:
  • the service function forwarder determines the preset packet feature in the service chain packet.
  • the service function forwarder decapsulates the service chain packet to obtain a service packet
  • the service function forwarder sends the service packet to the receiving end of the forwarding path.
  • an embodiment of the present invention provides a forwarding parameter management method, including:
  • the parameter manager receives a query request message sent by the classifier, where the query request message carries a preset message feature;
  • the parameter manager obtains a preset message feature in the query request message
  • the parameter manager obtains a forwarding parameter that has a mapping relationship with the preset packet feature
  • the parameter manager sends the forwarding parameter to the classifier.
  • the preset message feature includes a first path identifier of a forwarding path and at least one pair of elements of the same category, where the parameter manager obtains
  • the forwarding parameter of the preset packet feature has a mapping relationship, including:
  • the parameter manager searches, in the manager mapping table, a forwarding parameter that has a mapping relationship with the preset packet feature
  • the parameter manager When the forwarding parameter is found in the manager mapping table, the parameter manager sends the forwarding parameter to the classifier;
  • the parameter manager searches the path identifier mapping table for the second path identifier corresponding to the first path identifier, and replaces the first path identifier. Identifying the second path, and swapping the elements of the same category to obtain the updated message feature, and searching, in the manager mapping table, the forwarding parameter that has a mapping relationship with the updated message feature;
  • the parameter manager calculates a forwarding parameter according to the preset message feature, and sends the forwarding parameter to the classifier.
  • the calculated forwarding parameters are the forwarding parameters that has a mapping relationship with the update message feature.
  • the method further includes:
  • the parameter manager determines whether the received mapping relationship exists in the manager mapping table
  • the parameter manager adds the received mapping relationship to the manager mapping table.
  • a fourth aspect of the present invention provides a packet forwarding apparatus, including:
  • a receiving module configured to receive a service packet, and determine a preset packet feature of the service packet
  • An obtaining module configured to acquire a forwarding parameter corresponding to the preset message feature
  • the encapsulating module is configured to encapsulate the service packet into a service chain packet, where the service chain packet carries the forwarding parameter;
  • a determining module configured to determine, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path;
  • the sending module is configured to send the service chain packet to the corresponding service function forwarder of the device identifier.
  • the apparatus of the above fourth aspect may further include other functional modules for implementing the methods in the foregoing first aspect and various implementations of the first aspect.
  • an embodiment of the present invention provides a packet forwarding device, where the device includes:
  • a receiving module configured to receive a service chain packet forwarded by a device in a forwarding path, where the service chain packet carries the forwarding parameter
  • An obtaining module configured to obtain a forwarding parameter in the service chain packet
  • a determining module configured to determine, according to the forwarding parameter, a next hop device identifier in the forwarding path
  • the sending module is configured to send the service chain packet to the next hop device corresponding to the device identifier.
  • the apparatus of the above fifth aspect may further include other functional modules for implementing the methods in the various implementation manners of the second aspect and the second aspect.
  • an embodiment of the present invention provides a forwarding parameter management apparatus, including:
  • a receiving module configured to receive a query request message sent by the classifier, where the query request message carries a preset message feature
  • An acquiring module configured to acquire a preset packet feature in the query request message, and obtain a forwarding parameter that has a mapping relationship with the preset packet feature
  • a sending module configured to send the forwarding parameter to the classifier.
  • the apparatus of the above sixth aspect may further include other functional modules for implementing the methods in the various implementation manners of the third aspect and the third aspect.
  • a seventh aspect of the present invention provides a message forwarding device, the message forwarding device comprising: a memory and a processor, wherein the memory is configured to store a set of codes, and the processor is configured to execute the set of codes to implement the first aspect, the first The method of the second aspect or the third aspect.
  • the classifier of the present invention determines the preset packet feature after receiving the service packet, and obtains the forwarding parameter corresponding to the preset packet feature, and encapsulates the service packet into a service chain packet carrying the forwarding parameter, so that the classifier encapsulates the service packet
  • the service function forwarder of the next hop can continue to transmit the service chain packet according to the forwarding parameter, and the forwarding parameter is encapsulated in the service chain packet. Even if there is a device that modifies the packet in the forwarding path, the forwarding parameter does not occur.
  • the SFF in the service forwarding path determines the device identifier of the SF and the SFF of the next hop according to the forwarding parameter in the service chain packet, and sends the service chain packet to the service function forwarder corresponding to the device identifier.
  • the entire transmission process of the service chain packet in the forwarding path is determined by each hop device.
  • the forwarding parameter selects the next hop device to ensure that the forward path and the return path are consistent when the service chain is transmitted.
  • the last hop service function forwarder determines the preset message feature in the service chain message; and sends the message to the parameter manager.
  • the mapping relationship between the preset packet feature and the forwarding parameter so that the device that modifies the packet feature in the forwarding path (such as NAT) modifies the preset packet feature, and then modifies the modified preset packet feature.
  • the corresponding relationship between the forwarding parameters and the forwarding parameters is uploaded to the parameter manager for use in forwarding the service packets next time.
  • the parameter manager After receiving the query request, the parameter manager obtains the preset message feature in the query request message and searches for a forwarding parameter in the manager mapping table that has a mapping relationship with the preset message feature. When the forwarding parameter is not found in the device mapping table, the parameter manager replaces or shifts the preset message feature to obtain the updated message feature, and each element in the updated message feature is a symmetric path of the current forwarding path. The preset message characteristics are then queried according to the updated message characteristics, so that the parameter manager can ensure that the forwarding parameters of the forward path and the return path are consistent.
  • FIG. 1 is a schematic structural diagram of a forward path and a return path according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a packet forwarding method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a service chain architecture according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an internal structure of any SFG in FIG. 3 and a plurality of SFFSs corresponding to the SFG;
  • FIG. 5 is a schematic flow chart of step S102 in FIG. 2;
  • FIG. 6 is a schematic flowchart of step S205
  • FIG. 7 is another schematic flowchart of step S102 in FIG. 2;
  • FIG. 8 is a schematic structural diagram of a packet forwarding apparatus according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of another packet forwarding apparatus according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of another packet forwarding apparatus according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of still another packet forwarding apparatus according to an embodiment of the present invention.
  • the business chain architecture in a broad sense includes the following parts: control plane (English: control plane), SF, SFF, and classifier.
  • the control plane is mainly responsible for lifecycle management of the business chain, constructing a service function path (English: service function path, SFP for short), and distributing path information to nodes in the service chain, usually by a controller;
  • the SF is responsible for the implementation of the specific service policy, and is mainly provided by the service provider.
  • the SFF is responsible for forwarding the service packet to the local SF and the next hop SFF according to the service chain rule, which is mainly provided by the network operator; the classifier is based on the service packet.
  • the information such as the quintuple forwards the service chain packet obtained by the encapsulated service packet to the first hop SFF of the corresponding service chain, and the classifier can be independently set or integrated into the network device.
  • FIG. 1 is a schematic structural diagram of a forward path and a return path according to an embodiment of the present invention.
  • the SPI of the forward path is 10
  • the SPI of the return path is 11
  • the SPI values of the forward path and the return path are different.
  • SFG1 includes three SFs, namely: SF1, SF2 and SF3, wherein SF1 and SF2 are connected to SFF1, SF3 is connected to SFF2, and SFG2 includes two SFs, namely: SF4 and SF5, and SF4 and SF5 are both connected to SFF3.
  • the solid line in Figure 1 indicates the forward path through which the forward traffic from the sender src to the receiver dst passes.
  • the classifier 1 encapsulates the service packet and forwards the encapsulated service chain packet to the packet.
  • SF1 in SFG1 and SF4 in SFG2 the dotted line in Fig.
  • classifier 1 indicates the return path through which the return traffic from the receiving end dst to the transmitting end src passes.
  • the classifier 2 encapsulates the service packet, it will be encapsulated.
  • the service chain message is forwarded to SF4 in SFG2 and SF1 in SFG1.
  • two classifiers are shown for ease of understanding. In practical applications, classifier 1 and classifier 2 may also refer to the same classifier.
  • an embodiment of the present invention provides a packet forwarding method, including the following steps.
  • step S101 the classifier receives the service message and determines the preset message feature of the service message.
  • the preset packet feature may be ⁇ SPI, srcIP, dstIP ⁇ , where SPI is the path identifier of the forwarding path, srcIP is the IP address of the sending end, dstIP is the IP address of the receiving end, and preset packet characteristics It can also be ⁇ SPI, srcIP, dstIP, srcPort, dstPort, proto ⁇ , where srcPort is the port number of the sender, dstPort is the port number of the receiver, and proto is the protocol number.
  • the classifier receives the service packet sent by the sender, obtains srcIP and dstIP in the received service packet, and obtains srcPort, dstPort, and proto based on the srcIP and dstIP, and according to the preset.
  • the message characteristics match the preset service chain rules to get the SPI.
  • the service chain rule includes a matching action table, and the matching action table includes a correspondence between the binary group ⁇ srcIP, dstIP ⁇ and the SPI, or a correspondence between the quintuple ⁇ srcIP, dstIP, srcPort, dstPort, proto ⁇ and the SPI, and the matching
  • the service chain rule one or more of ⁇ srcIP, dstIP ⁇ in the preset message feature, or one or more of ⁇ srcIP, dstIP, srcPort, dstPort, proto ⁇ may be used to find a matching action table.
  • the SPI matching the binary group or the quintuple is obtained.
  • step S102 the classifier acquires a forwarding parameter corresponding to the preset message feature.
  • the forwarding parameter is an integer, which is used to provide a path selection basis for the classifier and the SFF when selecting the next hop, and the correspondence between the forwarding parameter and the packet feature is managed by the parameter manager, and the parameter manager Can be set independently or integrated as a function module inside the controller; when the sender of the forward path and the sender of the return path share the same classifier, the parameter manager can also be integrated inside the classifier; when the parameter manager When it is not integrated in the classifier, after the classifier obtains the correspondence between the forwarding parameter and the message feature from the parameter manager, the correspondence between the forwarding parameter and the message feature may also be stored in the classifier. in.
  • FIG. 3 is a schematic diagram of a service chain architecture according to an embodiment of the present invention.
  • the classifier may obtain a forwarding parameter corresponding to a preset message feature from a parameter manager by sending a query request, as shown in FIG.
  • the internal buffer area of the device obtains a forwarding parameter corresponding to the preset message feature.
  • the step S102 may include the following steps.
  • step S201 the classifier generates a parameter query request message.
  • the parameter query request message carries the preset message feature.
  • the step S201 includes: the classifier may search, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists; when the classifier mapping table does not exist and the preset The classifier generates the parameter query request message when the forwarding parameter corresponding to the message feature.
  • the step S201 further includes: when the classifier receives the forwarding parameter returned by the parameter manager, adding a correspondence between the forwarding parameter and the preset message feature to the classifier mapping table.
  • the classifier can only obtain and query the report by sending a query request to the parameter manager. If the classifier obtains the forwarding parameter from the parameter manager, the classifier can forward the preset packet feature and the return packet in order to facilitate the next forwarding of the service packet containing the preset packet feature.
  • the mapping relationship between the parameters is stored in the classifier mapping table.
  • step S202 the classifier sends the parameter query request message to the parameter manager.
  • the processor in the classifier can directly send the query request message to the parameter manager, and when the parameter manager is located outside the classifier, the processor in the classifier can First obtain the address of the parameter manager, and then send a query request message according to the address of the parameter manager.
  • step S203 the parameter manager receives the query request message sent by the classifier.
  • the query request message in order to enable the parameter manager to determine the forwarding parameter according to the preset message feature, the query request message needs to carry the preset message feature.
  • step S204 the parameter manager acquires a preset message feature in the query request message.
  • step S205 the parameter manager obtains a forwarding parameter that has a mapping relationship with the preset message feature.
  • the parameter manager can search for a forwarding parameter that is in a mapping relationship with the preset packet feature in the parameter manager according to the preset packet feature.
  • the forwarding parameter that has a mapping relationship with the preset packet feature can be calculated according to the preset packet feature.
  • the preset message feature includes a first path identifier of the forwarding path and at least one pair of elements of the same category.
  • the category may refer to an IP address category or a port category, etc., for example, srcIP and dstIP may be used. It is determined that it is an element belonging to the same IP address category, and srcPort and dstPort may be determined to be elements belonging to the same port category, etc.
  • the step S205 includes the following steps.
  • step S2051 the parameter manager searches the manager mapping table for a forwarding parameter that has a mapping relationship with the preset message feature.
  • a second mapping relationship table for storing message features and forwarding parameters may be set in the parameter manager.
  • the parameter manager can compare the packet features in the second mapping relationship table with the preset packet features one by one. When there is a packet feature with the same preset packet characteristics, the manager mapping can be determined. The forwarding parameter that has a mapping relationship with the preset packet feature can be found in the table, and the forwarding parameter that has a mapping relationship with the preset packet feature is the forwarding parameter to be searched.
  • step S2052 when the forwarding parameter is found in the manager mapping table, the parameter manager sends the forwarding parameter to the classifier.
  • step S2053 when the forwarding parameter is not found in the manager mapping table, the parameter manager searches the path identifier mapping table for the second path identifier corresponding to the first path identifier, and the first Replace path identifier with second path Identifying, and exchanging the elements of the same category to obtain an updated message feature, and searching, in the manager mapping table, a forwarding parameter that has a mapping relationship with the updated message feature.
  • the path identifier mapping table stores the correspondence between the first path identifier and the second path identifier
  • the second path identifier refers to the path identifier of the symmetric path of the forwarding path, for example, when the forwarding path
  • the symmetric path of the forwarding path is the return path
  • the second path is identified as the path identifier of the return path.
  • the forwarding path is the return path
  • the symmetric path of the forwarding path is the forward path
  • the second path identifier The path identifier for the forward path.
  • the parameter manager may search for the second path identifier corresponding to the first path identifier in the path identifier mapping table, and then the first path The identifier is replaced with the second path identifier, and the elements belonging to the same category in the preset message feature are interchanged. For example, if the preset message feature is ⁇ first SPI, srcIP, dstIP ⁇ , the message feature may be updated.
  • the update message characteristics can be ⁇ second SPI, dstIP, srcIP, dstPort, srcPort, proto ⁇ , and then in the second mapping relationship table to find the same message characteristics as the update message feature, if the same message feature as the update message feature is found, the manager mapping table can be determined.
  • the forwarding parameter that has a mapping relationship with the update packet feature can be found, and the forwarding parameter that has a mapping relationship with the update packet feature is the forwarding parameter to be searched.
  • the returning service packet sent by the receiving end to the transmitting end needs to be on the return path symmetric with the forward path.
  • the classifier determines the preset message feature according to the return service message, and then sends the determined preset message feature to the parameter manager through the query request message.
  • the parameter manager processes the elements in the preset packet features in the return service packet.
  • the preset message feature is converted into the update message feature, and the update message feature here is the preset message feature in the forward service message. In this way, the parameter manager can ensure that the forward traffic packets are forwarded on the forward path and the return traffic packets are forwarded on the return path.
  • step S2054 when the forwarding parameter that has a mapping relationship with the update message feature is not found in the manager mapping table, the parameter manager calculates a forwarding parameter according to the preset message feature, and the classification parameter is Transmitting the calculated forwarding parameters.
  • the calculation method of the forwarding parameter is determined by the rules of the parameter manager, including but not limited to the following three types: a hash algorithm, an accumulated global variable, or a randomly generated manner.
  • step S206 the parameter manager sends the forwarding parameter to the classifier.
  • the step S102 further includes the following steps.
  • step S301 the classifier searches in the classifier mapping table whether there is a forwarding parameter corresponding to the preset message feature.
  • a correspondence between the packet feature and the forwarding parameter may be set inside the classifier.
  • the classifier can compare the packet features in the first mapping relationship table with the preset packet features one by one. When there is a packet feature with the same preset message characteristics, the classifier mapping table can be determined. The forwarding parameter that has a mapping relationship with the preset packet feature can be found, and the forwarding parameter that has a mapping relationship with the preset packet feature is the forwarding parameter to be searched.
  • step S302 when the forwarding parameter corresponding to the preset message feature exists in the classifier mapping table, the classifier obtains the forwarding corresponding to the preset message feature from the classifier mapping table. parameter.
  • the classifier encapsulates the service packet into a service chain packet, where the service chain packet carries the forwarding parameter.
  • the classifier encapsulates the service packet.
  • the forwarding parameter may be encapsulated in the service chain header or encapsulated in other locations of the service chain packet.
  • step S104 the classifier determines, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path.
  • the classifier may select a device identifier of the SFF in an SFF corresponding to the SFG1 according to the forwarding parameter and the preset routing method, as the service function repeater of the next hop of the classifier.
  • the device identification, the preset routing method can refer to the modulo method, and the like.
  • the device identifier of the service function forwarder for example, SFF1, SFF2, 221, and 222, and the like.
  • the forwarding path is RSP, and the next hop refers to the SFF in the forwarding path that is connected to the output of the classifier, such as SFF1 in FIG.
  • the forwarding path includes at least one service function group SFG.
  • the step S104 includes the following steps.
  • the classifier performs modulo calculation on the forwarding parameter to obtain an operation result.
  • s selector%n, where n is the number of SFs in the SFG, and the selector is a forwarding parameter.
  • the classifier determines a target quantity value interval in which the operation result is located.
  • the classifier can compare the operation result s with two end points of each quantity value interval, and when the operation result s is located in any one of the quantity value intervals, the quantity value interval can be determined as the target quantity value interval.
  • the classifier determines, according to the correspondence between the preset quantity value interval and the device identifier, the device identifier corresponding to the target quantity value interval as the device identifier of the service function forwarder of the next hop in the forwarding path.
  • the classifier may pre-set a correspondence between multiple sets of quantity value intervals and device identifiers, and the method for determining each group of correspondences is to determine a quantity value interval for the device identifier of each service function forwarder.
  • the number of SFs corresponding to each device identifier may be first determined, where the correspondence refers to each device identifying its own connected SF, and before the device identifier in the forwarding path. All devices identify the connected SF, accumulate the number of all SFs corresponding to the device identifier, and obtain the cumulative quantity value, so that each device identifier can obtain a cumulative quantity value; then, it can determine the corresponding two device identifiers in the forwarding path.
  • the cumulative quantity value is the value of both ends of the quantity value interval.
  • the service function repeaters can be considered to be arranged in a preset order, for example, the service that the solid line or the broken line in FIG. 1 passes when transmitting the service message.
  • the order of the function repeaters, etc. therefore, the device identifiers corresponding to the forwarders of each service function can also be considered to be arranged in a preset order. Therefore, when determining the quantity value interval, the device of each service function forwarder can be calculated first. A sum of the number of corresponding service function entities identifying themselves and at least 0 device identifiers thereof, for example, as shown in FIG.
  • the device identifier corresponding to the target quantity value interval may be determined, thereby determining that the device identifier is determined as the forwarding path.
  • the device identifier of the next-hop service function forwarder that is, the classifier determines, in the SFG corresponding to the next hop, the service function forwarder corresponding to the device identifier as the next-hop service function forwarder in the forwarding path.
  • step S105 the classifier sends the service chain message to the service function forwarder corresponding to the device identifier.
  • the classifier determines the address of the service function forwarder according to the device identifier, and sends the service chain message to the service function forwarder corresponding to the address.
  • step S106 the service function forwarder receives the service chain message forwarded by the last hop device in the forwarding path.
  • the service chain packet carries the forwarding parameter
  • the previous hop device in the forwarding path of the service function forwarder may refer to a classifier, and may also be a service function forwarder.
  • step S107 the service function forwarder obtains the forwarding parameter in the service chain message.
  • step S108 the service function forwarder determines the next hop device identifier in the forwarding path according to the forwarding parameter.
  • the current service function forwarder when the current service function forwarder is one of multiple service function forwarders corresponding to SFG1, the current service function forwarder can be based on forwarding parameters and presets.
  • the routing method determines the device identifier corresponding to the next hop device, where the next hop device may refer to one of the plurality of SFs included in the SFG1, the plurality of SFFs corresponding to the SFG1, or the plurality of SFFs corresponding to the SFG2.
  • the preset routing method can refer to the modulo method and the like.
  • the step S108 includes the following steps.
  • the service function forwarder determines the device type of the next hop device in the forwarding path according to the preset forwarding table.
  • the service function forwarder may be configured with a device identifier and a device type preset forwarding table for storing each hop device in the forwarding path, because the service function forwarder is used to receive the received service chain report.
  • the file is forwarded to any corresponding SF or SFF of the next hop, so the device type may refer to a service function entity type or a service function forwarder type.
  • the service function forwarder can obtain the device type of the next hop device from the preset forwarding table.
  • the service function forwarder determines, according to the forwarding parameter, a service function forwarder corresponding to the next hop device.
  • Equipment Identity the device type of the next hop device in the forwarding path determined by the preset forwarding table.
  • the service function forwarder can determine the device identifier of the service function forwarder corresponding to the next hop device according to the forwarding parameter and the preset routing method. For the determination method, refer to the process of step S1041 to step S1044, the only difference is that The process is performed by the business function forwarder.
  • the service function forwarder is associated with multiple SFs; the step S108 It also includes the following steps.
  • the service function forwarder determines, according to the forwarding parameter, a device identifier of the service function entity corresponding to the next hop device. .
  • the service function forwarder can obtain the device type of the next hop device from the preset forwarding table.
  • the service function forwarder according to the forwarding parameter
  • the preset routing method determines the device identifier of the service function entity corresponding to the next hop device.
  • the preset routing method here takes the modulo method as an example. The modulo method is as follows, assuming that the SFF number is h:
  • num_i is the accumulated value of num_0 to num_h-1.
  • h takes different values, multiple quantity value intervals can be determined.
  • the cumulative value of num_i is 3,..., so that when s is located at [ 0, 2), it is determined that the next hop is SF_0, and when s is located at [2, 3), it is determined that the next hop is SF_1, ....
  • step S109 the service function forwarder sends the service chain message to the next hop device corresponding to the device identifier.
  • step S110 when the device identifier of the next hop device of the service chain packet is the same as the preset device identifier, the service function forwarder determines the preset packet feature in the service chain packet.
  • the preset device identifier may be the device identifier of the receiving device, and the device identifier of the next hop device is the same as the device identifier of the receiving device, that is, the current service function forwarder is the last one in the forwarding path. Jump service function forwarder.
  • the preset packet feature in the service chain packet received by the last hop service function forwarder may have been modified.
  • the preset packet characteristics in the service chain message are determined.
  • step S111 the service function forwarder sends a mapping relationship between the preset message feature and the forwarding parameter to the parameter manager.
  • the service function forwarder sends a mapping relationship between the determined preset message feature and the forwarding parameter in the service chain message to the parameter manager.
  • step S112 when the parameter manager receives the mapping relationship sent by the service function forwarder, the parameter manager determines whether the received mapping relationship exists in the manager mapping table.
  • the parameter manager when the parameter manager receives the mapping relationship sent by the service function forwarder, compares the received mapping relationship with each mapping relationship in the second mapping relationship table, and determines whether the received mapping relationship is related to the second mapping relationship.
  • the mapping relationship in the mapping relationship table is different.
  • step S113 when the received mapping relationship does not exist in the manager mapping table, the parameter manager adds the received mapping relationship to the manager mapping table.
  • step S114 the service function forwarder decapsulates the service chain packet to obtain a service packet.
  • the service function forwarder decapsulates the service chain packet by using the reverse process of encapsulating the service packet, and Get a business message.
  • step S115 the service function forwarder sends the service packet to the receiving end of the forwarding path.
  • the service function forwarder sends the decapsulated service packet to the receiving end of the forwarding path.
  • a message forwarding apparatus including: a receiving module 11, an obtaining module 12, a packaging module 13, a determining module 14, and a sending module 15.
  • the receiving module 11 is configured to receive a service packet, and determine a preset packet feature of the service packet.
  • the obtaining module 12 is configured to obtain a forwarding parameter corresponding to the preset message feature.
  • the encapsulating module 13 is configured to encapsulate the service packet into a service chain packet, where the service chain packet carries the forwarding parameter.
  • the determining module 14 is configured to determine, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path.
  • the sending module 15 is configured to send the service chain message to the corresponding service function forwarder of the device identifier.
  • the acquiring module is configured to:
  • the acquiring module is further configured to:
  • the correspondence between the forwarding parameter and the preset message feature is added to the classifier mapping table.
  • the acquiring module is configured to:
  • the forwarding parameter corresponding to the preset message feature exists in the classifier mapping table
  • the forwarding parameter corresponding to the preset message feature is obtained from the classifier mapping table.
  • the forwarding path includes at least one service function group, and each of the service function groups is connected to at least two service function forwarders arranged in a preset order;
  • the determining module is configured to:
  • the device identifier corresponding to the target quantity value interval is determined as the device identifier of the next function service forwarder in the forwarding path according to the correspondence between the preset quantity value interval and the device identifier.
  • the device includes a receiving module 21, an obtaining module 22, a determining module 23, and a sending module 24.
  • the receiving module 21 is configured to receive a service chain packet forwarded by the last hop device in the forwarding path, where the service chain packet carries the forwarding parameter.
  • the obtaining module 22 is configured to obtain forwarding parameters in the service chain packet.
  • the determining module 23 is configured to determine, according to the forwarding parameter, a next hop device identifier in the forwarding path.
  • the sending module 24 is configured to send the service chain message to the next hop device corresponding to the device identifier.
  • the determining module 23 is configured to:
  • the device identifier of the service function forwarder corresponding to the next hop device is determined according to the forwarding parameter.
  • the service function forwarder is associated with a plurality of service function entities.
  • the determining module 23 is further configured to:
  • the device identifier of the service function entity corresponding to the next hop device is determined according to the forwarding parameter.
  • the apparatus further includes: releasing the package module.
  • the determining module 23 is further configured to determine a preset packet feature in the service chain packet when the device identifier of the next hop device of the service chain packet is the same as the preset device identifier.
  • the sending module is further configured to send, to the parameter manager, a mapping relationship between the preset message feature and the forwarding parameter;
  • the decapsulation module is configured to decapsulate the service chain packet to obtain a service packet.
  • the sending module is further configured to send the service packet to the receiving end of the forwarding path.
  • a forwarding parameter management apparatus includes: a receiving module 31, an obtaining module 32, and a sending module 33.
  • the receiving module 31 is configured to receive a query request message sent by the classifier, where the query request message carries a preset message feature.
  • the obtaining module 32 is configured to acquire a preset message feature in the query request message, and obtain a forwarding parameter that has a mapping relationship with the preset message feature.
  • the sending module 33 is configured to send the forwarding parameter to the classifier.
  • the preset message feature includes a first path identifier of the forwarding path and at least one pair of elements of the same category, and the acquiring module is configured to:
  • the second path identifier corresponding to the first path identifier is searched in the path identifier mapping table, and the first path identifier is replaced with the second path identifier. And exchanging the elements of the same category to obtain an update message feature, and searching, in the manager mapping table, a forwarding parameter that has a mapping relationship with the update message feature;
  • the forwarding parameter When the forwarding parameter that has a mapping relationship with the update packet feature is not found in the manager mapping table, the forwarding parameter is calculated according to the preset packet feature, and the calculated forwarding is sent to the classifier. parameter.
  • the apparatus further includes: a determining module and a joining module.
  • the determining module is configured to determine, when the mapping relationship sent by the service function forwarder is received, whether the received mapping relationship exists in the manager mapping table.
  • the embodiment of the present invention further provides a message forwarding device 110.
  • the device includes: a memory 1101, a processor 1102, and a transceiver 1103.
  • the memory 1101 is configured to store a set of codes
  • the processor 1102 is configured to The set of codes performs any of the methods shown in Figures 2 and 5-7, and the transceiver 1103 is used to communicate with other devices.
  • the memory 1101, the processor 1102 and the transceiver 1103 are coupled together by a bus system 1104.
  • the memory 1101 may include a random access memory, and may also include a non-volatile memory, such as at least one disk storage.
  • the bus system 1104 can be an industry standard architecture (English: Industry Standard Architecture, ISA for short) bus, an external device interconnection (English: Peripheral Component, PCI) bus or an extended industry standard architecture (English: Extended Industry Standard Architecture, short for EISA) bus and so on.
  • the bus system 1104 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 11, but it does not mean that there is only one bus or one type of bus.
  • the receiving module and the sending module in FIG. 8 to FIG. 10 may be integrated into the transceiver 1103, and the remaining modules may be integrated into the processor 1102.
  • the remaining modules may be embedded in the hardware or in a processor independent of the network device. , can also be stored in the memory of the network device in the form of software, so that the processor can call the corresponding operations of the above modules, the processor can be a central processing unit (English: Central Processing Unit, CPU for short), a specific integrated circuit ( English: Application Specific Integrated Circuit (ASIC) or one or more integrated circuits configured to implement embodiments of the present invention.
  • CPU Central Processing Unit
  • ASIC Application Specific Integrated Circuit
  • Each device in the network device 110 provided by the embodiment of the present invention is used to perform the foregoing method. Therefore, the beneficial effects of the network device 110 can be referred to the beneficial effects described in the foregoing method, and details are not described herein again.
  • the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the message forwarding method provided by the present invention.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (English: read-only memory, abbreviated as: ROM) or a random access memory (English: random access memory, abbreviation: RAM).
  • the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM. , a disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
  • a computer device which may be a personal computer, server, or network device, etc.

Landscapes

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

Abstract

The disclosure relates to a packet forwarding method and device. The method comprises: receiving a service packet, and determining a predetermined packet characteristic of the service packet; acquiring a forwarding parameter corresponding to the predetermined packet characteristic; encapsulating the service packet in a service link packet carrying the forwarding parameter; determining, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in a forwarding path; and sending the service link packet to the service function forwarder corresponding to the device identifier. The present invention encapsulates a service packet in a service link packet carrying a forwarding parameter, so as to enable a service function forwarder of a next hop to continue transmitting the service link packet according to the forwarding parameter. Further, the forwarding parameter is encapsulated in the service link packet such that the forwarding parameter is not changed due to the presence of a device that modifies packets in a forwarding path, ensuring the consistency of a forward path and a backward path for transmitting the service link packet, as well as the consistency of the forwarding parameter in the forward path and the backward path.

Description

报文转发方法及装置Message forwarding method and device
本申请要求于2016年8月24日提交中国专利局、申请号为201610716222.2、发明名称为“报文转发方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application, filed on Aug. 24, 2016, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本公开涉及通信技术领域,尤其涉及一种报文转发方法及装置。The present disclosure relates to the field of communications technologies, and in particular, to a packet forwarding method and apparatus.
背景技术Background technique
业务功能链(英文:service function chain,简称:SFC)定义并实例化一组有序的供业务流通过的业务功能(英文:service function,简称:SF),业务功能链也被简称为业务链(英文:service chain),其目的是为用户提供端到端的业务路径。其中,SF可以指防火墙(英文:firewalls)、网络地址转换器(英文:Network Address Translators,简称:NATs)或者其他特定应用(英文:application-specific)的功能,例如,负载均衡器(英文:load balancer)等。当报文从业务链的一端被转发到另一端时,需要经过一条由多个SFs以及它们连结的业务功能转发器(英文:Service Function Forwarder,简称:SFFs)构成的具体业务路径(英文:Rendered Service Path,简称:RSP)。The service function chain (English: service function chain, SFC for short) defines and instantiates a set of ordered business functions for service flow (English: service function, SF for short), and the business function chain is also referred to as the service chain. (English: service chain), its purpose is to provide users with an end-to-end business path. Among them, SF can refer to firewall (English: firewalls), network address translator (English: Network Address Translators, referred to as: NATs) or other specific applications (English: application-specific) functions, for example, load balancer (English: load Balancer) and so on. When a packet is forwarded from one end of the service chain to the other end, it needs to go through a specific service path consisting of multiple SFs and service function forwarders (English: Service Function Forwarder, SFFs) (English: Rendered) Service Path, referred to as: RSP).
通常端到端的业务流使用正向路径和返程路径传输,由于单个SF设备的性能有限,当业务路径上传输的流量过大时,SF容易成为性能瓶颈。所以需要具体业务路径的每一跳可以被设置为由多个相同类型的SFs构成的业务功能组(英文:service function group,简称:SFG),并且使用SFF的本地策略决定业务流在传输时需要经过SFG内的哪个SF。Usually end-to-end traffic flows are transmitted using forward and return paths. Due to the limited performance of a single SF device, SF is likely to become a performance bottleneck when the traffic transmitted on the service path is too large. Therefore, each hop that needs a specific service path can be set as a service function group (English: service function group, hereinafter referred to as SFG) composed of multiple SFs of the same type, and the local policy of the SFF is used to determine that the service flow needs to be transmitted. Which SF is in the SFG.
当业务链中存在需要维持业务流的状态的SF(例如状态防火墙)时,需要保证正向业务流与返程业务流的来去路径一致。在现有的网络等价多路径(英文:equal-cost multi-path,简称:ECMP)路由技术中,当网络设备转发因特网协议(英文:Internet Protocol,简称:IP)报文时,如果该网络设备的转发表中该IP报文的目的地址对应的转发路径有多条且它们的开销(英文:cost)相同时,网络设备会从该IP报文中抽取出五元组(源IP地址、目的IP地址、源端口、目的端口及协议号),并根据该五元组计算出一个哈希(英文:hash)值,然后根据该hash值从该多条转发路径中选择一条路径。When there is an SF (such as a stateful firewall) in the service chain that needs to maintain the state of the service flow, it is necessary to ensure that the forward traffic flow is consistent with the outgoing path of the return traffic flow. In the existing network-equivalent multi-path (English: equal-cost multi-path, ECMP) routing technology, when the network device forwards the Internet Protocol (English: Internet Protocol, IP for short) message, if the network When there are multiple forwarding paths corresponding to the destination address of the IP packet in the forwarding table of the device and their cost (English: cost) is the same, the network device extracts the quintuple from the IP packet (source IP address, The destination IP address, the source port, the destination port, and the protocol number are calculated, and a hash value is calculated according to the quintuple, and then a path is selected from the multiple forwarding paths according to the hash value.
但是,返程业务流的五元组是将正向业务流的五元组中的源IP地址和目的IP地址互换,将源端口和目的端口互换得到的,SFF在收到返程业务流时,无法根据hash算法将返程业务流引向SFG中处理正向业务流的SF,进而无法满足往返路径的一致性要求。However, the quintuple of the return service flow is to exchange the source IP address and the destination IP address in the quintuple of the forward service flow, and the source port and the destination port are exchanged, and the SFF receives the return service flow. According to the hash algorithm, the return service flow cannot be directed to the SF of the forward traffic flow in the SFG, and the round-trip path consistency requirement cannot be met.
发明内容Summary of the invention
本发明实施例中提供了一种报文转发方法及装置,以解决现有技术中SFF无法根据hash算法将正向业务流和返程业务流引向SFG中的同一个SF,无法满足往返路径的一致性要求的问题。In the embodiment of the present invention, a packet forwarding method and apparatus are provided to solve the problem that the SFF cannot lead the forward service flow and the return service flow to the same SF in the SFG according to the hash algorithm in the prior art, and cannot meet the round-trip path. The issue of consistency requirements.
为了解决上述技术问题,本发明实施例公开了如下技术方案:In order to solve the above technical problem, the embodiment of the present invention discloses the following technical solutions:
第一方面,本发明实施例提供一种报文转发方法,包括:In a first aspect, an embodiment of the present invention provides a packet forwarding method, including:
分类器接收业务报文,并确定所述业务报文的预设报文特征; The classifier receives the service packet and determines the preset packet feature of the service packet;
所述分类器获取与所述预设报文特征对应的转发参数;The classifier obtains a forwarding parameter corresponding to the preset message feature;
所述分类器将所述业务报文封装为业务链报文,所述业务链报文中携带有所述转发参数;The classifier encapsulates the service packet into a service chain packet, where the service chain packet carries the forwarding parameter;
所述分类器根据所述转发参数确定转发路径中的下一跳的业务功能转发器的设备标识;Determining, by the classifier, a device identifier of a service function forwarder of a next hop in the forwarding path according to the forwarding parameter;
所述分类器向所述设备标识对应的业务功能转发器发送所述业务链报文。The classifier sends the service chain message to a service function forwarder corresponding to the device identifier.
结合第一方面,在第一方面第一种可能的实现方式中,所述分类器获取与所述预设报文特征对应的转发参数,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the classifier obtains a forwarding parameter corresponding to the preset packet feature, including:
所述分类器生成参数查询请求消息,所述参数查询请求消息中携带有所述预设报文特征;The classifier generates a parameter query request message, where the parameter query request message carries the preset message feature;
所述分类器向参数管理器发送所述参数查询请求消息;The classifier sends the parameter query request message to a parameter manager;
所述分类器接收所述参数管理器根据所述参数查询请求返回的所述转发参数。The classifier receives the forwarding parameter returned by the parameter manager according to the parameter query request.
结合第一方面,在第一方面第二种可能的实现方式中,所述分类器生成所述参数查询请求消息包括:With reference to the first aspect, in a second possible implementation manner of the first aspect, the generating, by the classifier, the parameter query request message includes:
所述分类器在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;The classifier searches, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
当所述分类器映射表中不存在与所述预设报文特征对应的所述转发参数时,所述分类器生成所述参数查询请求消息;When the forwarding parameter corresponding to the preset message feature does not exist in the classifier mapping table, the classifier generates the parameter query request message;
所述方法还包括:The method further includes:
当所述分类器接收到所述参数管理器返回的所述转发参数时,将所述转发参数以及所述预设报文特征的对应关系加入所述分类器映射表。When the classifier receives the forwarding parameter returned by the parameter manager, the corresponding relationship between the forwarding parameter and the preset message feature is added to the classifier mapping table.
结合第一方面,在第一方面第三种可能的实现方式中,所述分类器获取与所述预设报文特征对应的转发参数,包括:With reference to the first aspect, in a third possible implementation manner of the first aspect, the classifier obtains a forwarding parameter corresponding to the preset packet feature, including:
所述分类器在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;The classifier searches, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
当所述分类器映射表中存在与所述预设报文特征对应的所述转发参数时,所述分类器从所述分类器映射表中获取与所述预设报文特征对应的所述转发参数。When the forwarding parameter corresponding to the preset message feature exists in the classifier mapping table, the classifier acquires the corresponding to the preset message feature from the classifier mapping table. Forward parameters.
结合第一方面,在第一方面第四种可能的实现方式中,所述转发路径中包含至少一个业务功能组,每个所述业务功能组连接至少两个按照预设顺序排列的业务功能转发器;With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the forwarding path includes at least one service function group, and each of the service function groups is connected to at least two service function forwardings arranged in a preset order. Device
所述分类器根据所述转发参数确定转发路径中的下一跳的业务功能转发器的设备标识,包括:The classifier determines, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path, including:
所述分类器对所述转发参数进行取模计算,得到运算结果;The classifier performs modulo calculation on the forwarding parameter to obtain an operation result;
所述分类器确定所述运算结果所在的目标数量值区间;The classifier determines a target quantity value interval in which the operation result is located;
所述分类器根据预设的数量值区间与设备标识的对应关系将所述目标数量值区间对应的设备标识确定为转发路径中的下一跳的业务功能转发器的设备标识。The classifier determines, according to the correspondence between the preset quantity value interval and the device identifier, the device identifier corresponding to the target quantity value interval as the device identifier of the service function forwarder of the next hop in the forwarding path.
第二方面,本发明实施例提供一种报文转发方法,所述方法包括:In a second aspect, an embodiment of the present invention provides a packet forwarding method, where the method includes:
业务功能转发器接收转发路径中上一跳设备转发的业务链报文,所述业务链报文中携带有所述转发参数;The service function forwarder receives the service chain packet forwarded by the last hop device in the forwarding path, where the service chain packet carries the forwarding parameter;
所述业务功能转发器获取所述业务链报文中的转发参数;The service function forwarder obtains a forwarding parameter in the service chain packet;
所述业务功能转发器根据所述转发参数确定所述转发路径中下一跳设备标识;Determining, by the service function forwarder, a next hop device identifier in the forwarding path according to the forwarding parameter;
所述业务功能转发器向所述设备标识对应的下一跳设备发送所述业务链报文。The service function forwarder sends the service chain message to the next hop device corresponding to the device identifier.
结合第二方面,在第二方面第一种可能的实现方式中,所述业务功能转发器根据所述转发参数确定所述转发路径中下一跳设备标识,包括: With reference to the second aspect, in a first possible implementation manner of the second aspect, the service function forwarder determines, according to the forwarding parameter, a next hop device identifier in the forwarding path, including:
所述业务功能转发器根据预设转发表确定所述转发路径中下一跳设备的设备类型;Determining, by the service function forwarder, a device type of a next hop device in the forwarding path according to a preset forwarding table;
当所述业务功能转发器根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能转发器时,所述业务功能转发器根据所述转发参数确定下一跳设备对应的业务功能转发器的设备标识。When the service function forwarder determines, according to the preset forwarding table, that the device type of the next hop device in the forwarding path is a service function forwarder, the service function forwarder determines a next hop according to the forwarding parameter. Device ID of the service function forwarder corresponding to the device.
结合第二方面,在第二方面第二种可能的实现方式中,所述业务功能转发器关联有多个业务功能实体;With reference to the second aspect, in a second possible implementation manner of the second aspect, the service function forwarder is associated with multiple service function entities;
所述业务功能转发器根据所述转发参数确定所述转发路径中下一跳设备标识,还包括:The service function forwarder determines the next hop device identifier in the forwarding path according to the forwarding parameter, and further includes:
当所述业务功能转发器根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能实体时,所述业务功能转发器根据所述转发参数确定下一跳设备对应的业务功能实体的设备标识。When the service function forwarder determines, according to the preset forwarding table, that the device type of the next hop device in the forwarding path is a service function entity, the service function forwarder determines the next hop device according to the forwarding parameter. The device ID of the corresponding business function entity.
结合第二方面,在第二方面第三种可能的实现方式中,所述方法还包括:With reference to the second aspect, in a third possible implementation manner of the second aspect, the method further includes:
当所述业务链报文的下一跳设备的设备标识与预设设备标识相同时,业务功能转发器确定所述业务链报文中的预设报文特征;When the device identifier of the next hop device of the service chain packet is the same as the preset device identifier, the service function forwarder determines the preset packet feature in the service chain packet.
所述业务功能转发器向参数管理器发送所述预设报文特征与所述转发参数之间的映射关系;Transmitting, by the service function forwarder, a mapping relationship between the preset message feature and the forwarding parameter to a parameter manager;
所述业务功能转发器将所述业务链报文解除封装,得到业务报文;The service function forwarder decapsulates the service chain packet to obtain a service packet;
所述业务功能转发器向所述转发路径的接收端发送所述业务报文。The service function forwarder sends the service packet to the receiving end of the forwarding path.
第三方面,本发明实施例提供一种转发参数管理方法,包括:In a third aspect, an embodiment of the present invention provides a forwarding parameter management method, including:
参数管理器接收分类器发送的查询请求消息,所述查询请求消息携带有预设报文特征;The parameter manager receives a query request message sent by the classifier, where the query request message carries a preset message feature;
所述参数管理器获取所述查询请求消息中的预设报文特征;The parameter manager obtains a preset message feature in the query request message;
所述参数管理器获取与所述预设报文特征存在映射关系的转发参数;The parameter manager obtains a forwarding parameter that has a mapping relationship with the preset packet feature;
所述参数管理器向所述分类器发送所述转发参数。The parameter manager sends the forwarding parameter to the classifier.
结合第三方面,在第三方面第一种可能的实现方式中,所述预设报文特征中包含转发路径的第一路径标识和至少一对相同类别的元素,所述参数管理器获取与所述预设报文特征存在映射关系的转发参数,包括:With reference to the third aspect, in a first possible implementation manner of the third aspect, the preset message feature includes a first path identifier of a forwarding path and at least one pair of elements of the same category, where the parameter manager obtains The forwarding parameter of the preset packet feature has a mapping relationship, including:
所述参数管理器在管理器映射表中查找与所述预设报文特征存在映射关系的转发参数;The parameter manager searches, in the manager mapping table, a forwarding parameter that has a mapping relationship with the preset packet feature;
当在管理器映射表中查找到所述转发参数时,所述参数管理器向所述分类器发送所述转发参数;When the forwarding parameter is found in the manager mapping table, the parameter manager sends the forwarding parameter to the classifier;
当在管理器映射表中未查找到所述转发参数时,所述参数管理器在路径标识映射表中查找与所述第一路径标识对应的第二路径标识,将所述第一路径标识替换为第二路径标识,并且将相同类别的元素互换位置,得到更新报文特征,在管理器映射表中查找与所述更新报文特征存在映射关系的转发参数;When the forwarding parameter is not found in the manager mapping table, the parameter manager searches the path identifier mapping table for the second path identifier corresponding to the first path identifier, and replaces the first path identifier. Identifying the second path, and swapping the elements of the same category to obtain the updated message feature, and searching, in the manager mapping table, the forwarding parameter that has a mapping relationship with the updated message feature;
当在管理器映射表中未查找到与所述更新报文特征存在映射关系的转发参数时,所述参数管理器根据所述预设报文特征计算转发参数,并且向所述分类器发送所述计算得到的转发参数。When the forwarding parameter that has a mapping relationship with the update message feature is not found in the manager mapping table, the parameter manager calculates a forwarding parameter according to the preset message feature, and sends the forwarding parameter to the classifier. The calculated forwarding parameters.
结合第三方面,在第三方面第二种可能的实现方式中,所述方法还包括:With reference to the third aspect, in a second possible implementation manner of the third aspect, the method further includes:
当接收到业务功能转发器发送的映射关系时,所述参数管理器判断所述管理器映射表中是否存在接收的所述映射关系; When the mapping relationship sent by the service function forwarder is received, the parameter manager determines whether the received mapping relationship exists in the manager mapping table;
当所述管理器映射表中不存在接收的所述映射关系时,所述参数管理器将接收的所述映射关系加入所述管理器映射表中。When the received mapping relationship does not exist in the manager mapping table, the parameter manager adds the received mapping relationship to the manager mapping table.
第四方面,本发明实施例提供一种报文转发装置,包括:A fourth aspect of the present invention provides a packet forwarding apparatus, including:
接收模块,用于接收业务报文,并确定所述业务报文的预设报文特征;a receiving module, configured to receive a service packet, and determine a preset packet feature of the service packet;
获取模块,用于获取与所述预设报文特征对应的转发参数;An obtaining module, configured to acquire a forwarding parameter corresponding to the preset message feature;
封装模块,用于将所述业务报文封装为业务链报文,所述业务链报文中携带有所述转发参数;The encapsulating module is configured to encapsulate the service packet into a service chain packet, where the service chain packet carries the forwarding parameter;
确定模块,用于根据所述转发参数确定转发路径中的下一跳的业务功能转发器的设备标识;a determining module, configured to determine, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path;
发送模块,用于向所述设备标识对应的业务功能转发器发送所述业务链报文。The sending module is configured to send the service chain packet to the corresponding service function forwarder of the device identifier.
上述第四方面的装置还可以包括其他的功能模块,用于实现上述第一方面及第一方面的各种实现方式中的方法。The apparatus of the above fourth aspect may further include other functional modules for implementing the methods in the foregoing first aspect and various implementations of the first aspect.
第五方面,本发明实施例提供一种报文转发装置,所述装置包括:In a fifth aspect, an embodiment of the present invention provides a packet forwarding device, where the device includes:
接收模块,用于接收转发路径中上一跳设备转发的业务链报文,所述业务链报文中携带有所述转发参数;a receiving module, configured to receive a service chain packet forwarded by a device in a forwarding path, where the service chain packet carries the forwarding parameter;
获取模块,用于获取所述业务链报文中的转发参数;An obtaining module, configured to obtain a forwarding parameter in the service chain packet;
确定模块,用于根据所述转发参数确定所述转发路径中下一跳设备标识;a determining module, configured to determine, according to the forwarding parameter, a next hop device identifier in the forwarding path;
发送模块,用于向所述设备标识对应的下一跳设备发送所述业务链报文。The sending module is configured to send the service chain packet to the next hop device corresponding to the device identifier.
上述第五方面的装置还可以包括其他的功能模块,用于实现上述第二方面及第二方面的各种实现方式中的方法。The apparatus of the above fifth aspect may further include other functional modules for implementing the methods in the various implementation manners of the second aspect and the second aspect.
第六方面,本发明实施例提供一种转发参数管理装置,包括:In a sixth aspect, an embodiment of the present invention provides a forwarding parameter management apparatus, including:
接收模块,用于接收分类器发送的查询请求消息,所述查询请求消息携带有预设报文特征;a receiving module, configured to receive a query request message sent by the classifier, where the query request message carries a preset message feature;
获取模块,用于获取所述查询请求消息中的预设报文特征;以及获取与所述预设报文特征存在映射关系的转发参数;An acquiring module, configured to acquire a preset packet feature in the query request message, and obtain a forwarding parameter that has a mapping relationship with the preset packet feature;
发送模块,用于向所述分类器发送所述转发参数。And a sending module, configured to send the forwarding parameter to the classifier.
上述第六方面的装置还可以包括其他的功能模块,用于实现上述第三方面及第三方面的各种实现方式中的方法。The apparatus of the above sixth aspect may further include other functional modules for implementing the methods in the various implementation manners of the third aspect and the third aspect.
本发明第七方面提供了一种报文转发装置,所述报文转发装置包括:存储器和处理器,存储器用于存储一组代码,处理器用于执行该组代码以实现上述第一方面、第二方面或第三方面所述的方法。A seventh aspect of the present invention provides a message forwarding device, the message forwarding device comprising: a memory and a processor, wherein the memory is configured to store a set of codes, and the processor is configured to execute the set of codes to implement the first aspect, the first The method of the second aspect or the third aspect.
本发明中的分类器在接收的业务报文后确定预设报文特征,并获取与预设报文特征对应的转发参数,将业务报文封装为携带有转发参数的业务链报文,这样可以便于下一跳的业务功能转发器继续根据转发参数传输业务链报文,且转发参数被封装在业务链报文中,即使转发路径中存在修改报文的设备时,转发参数也不会发生改变,业务转发路径中的各个SFF根据业务链报文中的转发参数确定下一跳的SF及SFF的设备标识,并向所述设备标识对应的业务功能转发器发送所述业务链报文,业务链报文在转发路径中的整个传输过程,均是由每一跳设备根据 转发参数选择下一跳设备,可以保证业务链报文传输时的正向路径和返程路径一致。The classifier of the present invention determines the preset packet feature after receiving the service packet, and obtains the forwarding parameter corresponding to the preset packet feature, and encapsulates the service packet into a service chain packet carrying the forwarding parameter, so that the classifier encapsulates the service packet The service function forwarder of the next hop can continue to transmit the service chain packet according to the forwarding parameter, and the forwarding parameter is encapsulated in the service chain packet. Even if there is a device that modifies the packet in the forwarding path, the forwarding parameter does not occur. And changing, the SFF in the service forwarding path determines the device identifier of the SF and the SFF of the next hop according to the forwarding parameter in the service chain packet, and sends the service chain packet to the service function forwarder corresponding to the device identifier. The entire transmission process of the service chain packet in the forwarding path is determined by each hop device. The forwarding parameter selects the next hop device to ensure that the forward path and the return path are consistent when the service chain is transmitted.
当将业务链报文发送至转发路径中的最后一跳业务功能转发器时,最后一跳业务功能转发器确定所述业务链报文中的预设报文特征;并向参数管理器发送所述预设报文特征与所述转发参数之间的映射关系,这样可以在转发路径中修改报文特征的设备(如NAT)修改预设报文特征后,将修改后的预设报文特征及转发参数的对应关系上传至参数管理器,以便于下次转发业务报文时使用。When the service chain message is sent to the last hop service function forwarder in the forwarding path, the last hop service function forwarder determines the preset message feature in the service chain message; and sends the message to the parameter manager. The mapping relationship between the preset packet feature and the forwarding parameter, so that the device that modifies the packet feature in the forwarding path (such as NAT) modifies the preset packet feature, and then modifies the modified preset packet feature. The corresponding relationship between the forwarding parameters and the forwarding parameters is uploaded to the parameter manager for use in forwarding the service packets next time.
参数管理器在接收到查询请求后,会获取所述查询请求消息中的预设报文特征并在管理器映射表中查找与所述预设报文特征存在映射关系的转发参数,当在管理器映射表中未查找到所述转发参数时,参数管理器将预设报文特征进行替换或者移位,得到更新报文特征,更新报文特征中的各个元素即为当前转发路径的对称路径的预设报文特征,然后再根据更新报文特征查询转发参数,这样,参数管理器即可以实现保证正向路径及返程路径的转发参数一致。After receiving the query request, the parameter manager obtains the preset message feature in the query request message and searches for a forwarding parameter in the manager mapping table that has a mapping relationship with the preset message feature. When the forwarding parameter is not found in the device mapping table, the parameter manager replaces or shifts the preset message feature to obtain the updated message feature, and each element in the updated message feature is a symmetric path of the current forwarding path. The preset message characteristics are then queried according to the updated message characteristics, so that the parameter manager can ensure that the forwarding parameters of the forward path and the return path are consistent.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。The above general description and the following detailed description are intended to be illustrative and not restrictive.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art description will be briefly described below.
图1为本发明实施例提供的正向路径和返程路径的结构示意图;FIG. 1 is a schematic structural diagram of a forward path and a return path according to an embodiment of the present invention;
图2为本发明实施例提供的一种报文转发方法的流程示意图;2 is a schematic flowchart of a packet forwarding method according to an embodiment of the present invention;
图3为本发明实施例提供的一种业务链架构示意图;FIG. 3 is a schematic diagram of a service chain architecture according to an embodiment of the present disclosure;
图4为图3中任一SFG的内部结构及与该SFG对应的多个SFFS的架构示意图;4 is a schematic structural diagram of an internal structure of any SFG in FIG. 3 and a plurality of SFFSs corresponding to the SFG;
图5为图2中步骤S102的一种流程示意图;FIG. 5 is a schematic flow chart of step S102 in FIG. 2;
图6为步骤S205的一种流程示意图;FIG. 6 is a schematic flowchart of step S205;
图7为图2中步骤S102的另一种流程示意图;FIG. 7 is another schematic flowchart of step S102 in FIG. 2;
图8为本发明实施例提供的一种报文转发装置的结构示意图;FIG. 8 is a schematic structural diagram of a packet forwarding apparatus according to an embodiment of the present disclosure;
图9为本发明实施例提供的另一种报文转发装置的结构示意图;FIG. 9 is a schematic structural diagram of another packet forwarding apparatus according to an embodiment of the present disclosure;
图10为本发明实施例提供的另一种报文转发装置的结构示意图;FIG. 10 is a schematic structural diagram of another packet forwarding apparatus according to an embodiment of the present disclosure;
图11为本发明实施例提供的再一种报文转发装置的结构示意图。FIG. 11 is a schematic structural diagram of still another packet forwarding apparatus according to an embodiment of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。In order to make those skilled in the art better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be described below in conjunction with the drawings in the embodiments of the present invention.
广义上的业务链架构包括以下几个部分:控制面(英文:control plane)、SF、SFF及分类器(classifier)。控制面主要负责业务链的生命周期管理、构建(construct)业务功能路径(英文:service function path,简称:SFP)、向业务链中的节点分发(propagate)路径信息等,通常由控制器实现;SF负责具体的业务策略执行,主要由业务提供商提供;SFF负责将业务报文根据业务链规则转发给本地SF和下一跳SFF,主要由网络运营商提供;分类器根据业务报文中的五元组等信息,将封装业务报文得到的业务链报文转发给对应业务链的第一跳SFF,分类器可以独立设置,也可以集成到网络设备中。 The business chain architecture in a broad sense includes the following parts: control plane (English: control plane), SF, SFF, and classifier. The control plane is mainly responsible for lifecycle management of the business chain, constructing a service function path (English: service function path, SFP for short), and distributing path information to nodes in the service chain, usually by a controller; The SF is responsible for the implementation of the specific service policy, and is mainly provided by the service provider. The SFF is responsible for forwarding the service packet to the local SF and the next hop SFF according to the service chain rule, which is mainly provided by the network operator; the classifier is based on the service packet. The information such as the quintuple forwards the service chain packet obtained by the encapsulated service packet to the first hop SFF of the corresponding service chain, and the classifier can be independently set or integrated into the network device.
一条RSP中包含多个SFs以及它们连结的SFFs,每条RSP有一个唯一的业务路径标识(英文:service path identifier,简称:SPI)。图1为本发明实施例提供的正向路径和返程路径的结构示意图,其中,正向路径的SPI为10,返程路径的SPI为11,正向路径与返程路径的SPI值不同。An RSP contains multiple SFs and their linked SFFs. Each RSP has a unique service path identifier (English: service path identifier, SPI for short). FIG. 1 is a schematic structural diagram of a forward path and a return path according to an embodiment of the present invention. The SPI of the forward path is 10, the SPI of the return path is 11, and the SPI values of the forward path and the return path are different.
如图1所示,正向路径与返程路径均经过两个SFG。SFG1包含三个SFs,即:SF1、SF2与SF3,其中,SF1与SF2连接SFF1,SF3连接SFF2,SFG2包含两个SFs,即:SF4与SF5,SF4与SF5均连接到SFF3。图1中的实线表示从发送端src到接收端dst的正向流量经过的正向路径,在正向路径中,分类器1封装业务报文后,将封装后的业务链报文转发给SFG1中的SF1与SFG2中的SF4;图1中的虚线表示从接收端dst到发送端src的返程流量经过的返程路径,在返程路径中,分类器2封装业务报文后,将封装后的业务链报文转发给SFG2中的SF4与SFG1中的SF1,图1中为了便于理解示出两个分类器,在实际应用中,分类器1和分类器2也可以指同一个分类器。As shown in Figure 1, both the forward path and the return path pass through two SFGs. SFG1 includes three SFs, namely: SF1, SF2 and SF3, wherein SF1 and SF2 are connected to SFF1, SF3 is connected to SFF2, and SFG2 includes two SFs, namely: SF4 and SF5, and SF4 and SF5 are both connected to SFF3. The solid line in Figure 1 indicates the forward path through which the forward traffic from the sender src to the receiver dst passes. In the forward path, the classifier 1 encapsulates the service packet and forwards the encapsulated service chain packet to the packet. SF1 in SFG1 and SF4 in SFG2; the dotted line in Fig. 1 indicates the return path through which the return traffic from the receiving end dst to the transmitting end src passes. In the return path, after the classifier 2 encapsulates the service packet, it will be encapsulated. The service chain message is forwarded to SF4 in SFG2 and SF1 in SFG1. In FIG. 1, two classifiers are shown for ease of understanding. In practical applications, classifier 1 and classifier 2 may also refer to the same classifier.
为了实现图1中的正向路径和返程路径的一致性,如图2所示,本发明的一个实施例提供一种报文转发方法,包括以下步骤。In order to achieve the consistency of the forward path and the return path in FIG. 1, as shown in FIG. 2, an embodiment of the present invention provides a packet forwarding method, including the following steps.
在步骤S101中,分类器接收业务报文,并确定所述业务报文的预设报文特征。In step S101, the classifier receives the service message and determines the preset message feature of the service message.
在本发明实施例中,预设报文特征可以为{SPI,srcIP,dstIP},其中SPI为转发路径的路径标识,srcIP为发送端的IP地址,dstIP为接收端的IP地址;预设报文特征也可以为{SPI,srcIP,dstIP,srcPort,dstPort,proto},其中,srcPort为发送端的端口号,dstPort为接收端的端口号,proto为协议号。In the embodiment of the present invention, the preset packet feature may be {SPI, srcIP, dstIP}, where SPI is the path identifier of the forwarding path, srcIP is the IP address of the sending end, dstIP is the IP address of the receiving end, and preset packet characteristics It can also be {SPI, srcIP, dstIP, srcPort, dstPort, proto}, where srcPort is the port number of the sender, dstPort is the port number of the receiver, and proto is the protocol number.
在该步骤中,分类器接收发送端发送的业务报文,在接收到的业务报文中获取srcIP和dstIP,在获取srcIP和dstIP基础上,还可以获取srcPort、dstPort和proto,并根据预设报文特征匹配预设的业务链规则,以得到SPI。In this step, the classifier receives the service packet sent by the sender, obtains srcIP and dstIP in the received service packet, and obtains srcPort, dstPort, and proto based on the srcIP and dstIP, and according to the preset. The message characteristics match the preset service chain rules to get the SPI.
业务链规则中包括匹配动作表,匹配动作表中包含二元组{srcIP,dstIP}与SPI的对应关系,或者五元组{srcIP,dstIP,srcPort,dstPort,proto}与SPI的对应关系,匹配业务链规则时,可以根据预设报文特征中的{srcIP,dstIP}中的一项或多项,或者{srcIP,dstIP,srcPort,dstPort,proto}中的一项或多项查找匹配动作表,当匹配动作表中存在匹配的二元组或者五元组,获取与该二元组或者五元组匹配的SPI。The service chain rule includes a matching action table, and the matching action table includes a correspondence between the binary group {srcIP, dstIP} and the SPI, or a correspondence between the quintuple {srcIP, dstIP, srcPort, dstPort, proto} and the SPI, and the matching When the service chain rule is used, one or more of {srcIP, dstIP} in the preset message feature, or one or more of {srcIP, dstIP, srcPort, dstPort, proto} may be used to find a matching action table. When there is a matching binary group or quintuple in the matching action table, the SPI matching the binary group or the quintuple is obtained.
在步骤S102中,所述分类器获取与所述预设报文特征对应的转发参数。In step S102, the classifier acquires a forwarding parameter corresponding to the preset message feature.
在本发明实施例中,转发参数为整数,用于给分类器和SFF在选择下一跳时提供选路依据,转发参数与报文特征之间的对应关系由参数管理器管理,参数管理器可以独立设置,也可以作为一个功能模块集成在控制器内部;当正向路径的发送方与返程路径的发送方共用同一分类器时,参数管理器也可以集成在分类器内部;当参数管理器没有集成在分类器中时,在分类器每次从参数管理器获取到转发参数与报文特征之间的对应关系后,也可以将转发参数与报文特征之间的对应关系存储在分类器中。In the embodiment of the present invention, the forwarding parameter is an integer, which is used to provide a path selection basis for the classifier and the SFF when selecting the next hop, and the correspondence between the forwarding parameter and the packet feature is managed by the parameter manager, and the parameter manager Can be set independently or integrated as a function module inside the controller; when the sender of the forward path and the sender of the return path share the same classifier, the parameter manager can also be integrated inside the classifier; when the parameter manager When it is not integrated in the classifier, after the classifier obtains the correspondence between the forwarding parameter and the message feature from the parameter manager, the correspondence between the forwarding parameter and the message feature may also be stored in the classifier. in.
图3是本发明实施例提供的一种业务链架构示意图,分类器可以如图3所示通过发送查询请求的方式从参数管理器获取与预设报文特征对应的转发参数,也可以在分类器内部缓存区域获取与预设报文特征对应的转发参数。FIG. 3 is a schematic diagram of a service chain architecture according to an embodiment of the present invention. The classifier may obtain a forwarding parameter corresponding to a preset message feature from a parameter manager by sending a query request, as shown in FIG. The internal buffer area of the device obtains a forwarding parameter corresponding to the preset message feature.
当分类器中无法缓存转发参数与报文特征之间对应关系、或者分类器中没有缓存预设报文特征对应的转发参数时,如图5所示,所述步骤S102可以包括以下步骤。 When the corresponding parameter between the forwarding parameter and the packet feature is not cached in the classifier, or the forwarding parameter corresponding to the preset packet feature is not cached in the classifier, as shown in FIG. 5, the step S102 may include the following steps.
在步骤S201中,分类器生成参数查询请求消息。In step S201, the classifier generates a parameter query request message.
在本发明实施例中,所述参数查询请求消息中携带有所述预设报文特征。In the embodiment of the present invention, the parameter query request message carries the preset message feature.
所述步骤S201包括:所述分类器可以在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;当所述分类器映射表中不存在与所述预设报文特征对应的所述转发参数时,所述分类器生成所述参数查询请求消息。The step S201 includes: the classifier may search, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists; when the classifier mapping table does not exist and the preset The classifier generates the parameter query request message when the forwarding parameter corresponding to the message feature.
步骤S201还包括:当所述分类器接收到所述参数管理器返回的所述转发参数时,将所述转发参数以及所述预设报文特征的对应关系加入所述分类器映射表。The step S201 further includes: when the classifier receives the forwarding parameter returned by the parameter manager, adding a correspondence between the forwarding parameter and the preset message feature to the classifier mapping table.
在本发明实施例中,由于分类器内部的第一映射关系表中不存在与预设报文特征对应的转发参数,分类器只能通过向参数管理器发送查询请求的方式获取与预设报文特征存在映射关系的转发参数,当分类器从参数管理器获取到转发参数后,为了方便下一次转发包含该预设报文特征的业务报文,可以将预设报文特征与返回的转发参数之间的映射关系存入分类器映射表。In the embodiment of the present invention, since the forwarding parameter corresponding to the preset message feature does not exist in the first mapping relationship table in the classifier, the classifier can only obtain and query the report by sending a query request to the parameter manager. If the classifier obtains the forwarding parameter from the parameter manager, the classifier can forward the preset packet feature and the return packet in order to facilitate the next forwarding of the service packet containing the preset packet feature. The mapping relationship between the parameters is stored in the classifier mapping table.
在步骤S202中,分类器向参数管理器发送所述参数查询请求消息。In step S202, the classifier sends the parameter query request message to the parameter manager.
在该步骤中,在参数管理器位于分类器内部时,分类器中的处理器可以直接将查询请求消息发送给参数管理器,在参数管理器位于分类器外部时,分类器中的处理器可以首先获取参数管理器的地址,然后根据参数管理器的地址发送查询请求消息。In this step, when the parameter manager is located inside the classifier, the processor in the classifier can directly send the query request message to the parameter manager, and when the parameter manager is located outside the classifier, the processor in the classifier can First obtain the address of the parameter manager, and then send a query request message according to the address of the parameter manager.
在步骤S203中,参数管理器接收分类器发送的查询请求消息。In step S203, the parameter manager receives the query request message sent by the classifier.
在本发明实施例中,为了使参数管理器能够根据预设报文特征确定转发参数,所以所述查询请求消息中需要携带有预设报文特征。In the embodiment of the present invention, in order to enable the parameter manager to determine the forwarding parameter according to the preset message feature, the query request message needs to carry the preset message feature.
在步骤S204中,参数管理器获取所述查询请求消息中的预设报文特征。In step S204, the parameter manager acquires a preset message feature in the query request message.
在步骤S205中,参数管理器获取与所述预设报文特征存在映射关系的转发参数。In step S205, the parameter manager obtains a forwarding parameter that has a mapping relationship with the preset message feature.
在该步骤中,参数管理器可以根据预设报文特征在参数管理器内部查找与预设报文特征存在映射关系的转发参数,当在本地无法查找到与预设报文特征存在映射关系的转发参数时,可以根据预设报文特征计算与预设报文特征存在映射关系的转发参数。In this step, the parameter manager can search for a forwarding parameter that is in a mapping relationship with the preset packet feature in the parameter manager according to the preset packet feature. When forwarding a parameter, the forwarding parameter that has a mapping relationship with the preset packet feature can be calculated according to the preset packet feature.
所述预设报文特征中包含转发路径的第一路径标识和至少一对相同类别的元素,在本发明实施例中,类别可以指IP地址类别或者端口类别等等,例如,srcIP和dstIP可以被确定为是同属于IP地址类别的元素,srcPort和dstPort可以被确定为是同属于端口类别的元素等,如图6所示,所述步骤S205包括以下步骤。The preset message feature includes a first path identifier of the forwarding path and at least one pair of elements of the same category. In the embodiment of the present invention, the category may refer to an IP address category or a port category, etc., for example, srcIP and dstIP may be used. It is determined that it is an element belonging to the same IP address category, and srcPort and dstPort may be determined to be elements belonging to the same port category, etc. As shown in FIG. 6, the step S205 includes the following steps.
在步骤S2051中,参数管理器在管理器映射表中查找与所述预设报文特征存在映射关系的转发参数。In step S2051, the parameter manager searches the manager mapping table for a forwarding parameter that has a mapping relationship with the preset message feature.
在本发明实施例中,可以在参数管理器中设置用于存储报文特征与转发参数的第二映射关系表。In the embodiment of the present invention, a second mapping relationship table for storing message features and forwarding parameters may be set in the parameter manager.
在该步骤中,参数管理器可以逐一将第二映射关系表中的报文特征与预设报文特征比较,当存在与预设报文特征相同的报文特征时,可以确定在管理器映射表中可以查找到与预设报文特征存在映射关系的转发参数,并且与该预设报文特征存在映射关系的转发参数为待查找的转发参数。In this step, the parameter manager can compare the packet features in the second mapping relationship table with the preset packet features one by one. When there is a packet feature with the same preset packet characteristics, the manager mapping can be determined. The forwarding parameter that has a mapping relationship with the preset packet feature can be found in the table, and the forwarding parameter that has a mapping relationship with the preset packet feature is the forwarding parameter to be searched.
在步骤S2052中,当在管理器映射表中查找到所述转发参数时,所述参数管理器向所述分类器发送所述转发参数。In step S2052, when the forwarding parameter is found in the manager mapping table, the parameter manager sends the forwarding parameter to the classifier.
在步骤S2053中,当在管理器映射表中未查找到所述转发参数时,参数管理器在路径标识映射表中查找与所述第一路径标识对应的第二路径标识,将所述第一路径标识替换为第二路径 标识,并且将相同类别的元素互换位置,得到更新报文特征,在管理器映射表中查找与所述更新报文特征存在映射关系的转发参数。In step S2053, when the forwarding parameter is not found in the manager mapping table, the parameter manager searches the path identifier mapping table for the second path identifier corresponding to the first path identifier, and the first Replace path identifier with second path Identifying, and exchanging the elements of the same category to obtain an updated message feature, and searching, in the manager mapping table, a forwarding parameter that has a mapping relationship with the updated message feature.
在本发明实施例中,路径标识映射表中存储有第一路径标识与第二路径标识之间的对应关系,第二路径标识指所述转发路径的对称路径的路径标识,例如,当转发路径为正向路径时,转发路径的对称路径为返程路径,则第二路径标识为返程路径的路径标识;当转发路径为返程路径时,转发路径的对称路径为正向路径,则第二路径标识为正向路径的路径标识。In the embodiment of the present invention, the path identifier mapping table stores the correspondence between the first path identifier and the second path identifier, and the second path identifier refers to the path identifier of the symmetric path of the forwarding path, for example, when the forwarding path When the forward path is the forward path, the symmetric path of the forwarding path is the return path, and the second path is identified as the path identifier of the return path. When the forwarding path is the return path, the symmetric path of the forwarding path is the forward path, and the second path identifier The path identifier for the forward path.
在该步骤中,当在第二映射关系表中未查找到转发参数时,参数管理器可以在路径标识映射表中查找与所述第一路径标识对应的第二路径标识,然后将第一路径标识替换为第二路径标识,并且将预设报文特征中属于相同类别的元素互换位置,例如,假设预设报文特征为{第一SPI,srcIP,dstIP},则更新报文特征可以为{第二SPI,dstIP,srcIP};假设预设报文特征为{第一SPI,srcIP,dstIP,srcPort,dstPort,proto},则更新报文特征可以为{第二SPI,dstIP,srcIP,dstPort,srcPort,proto},然后再在第二映射关系表中查找与更新报文特征相同的报文特征,若查找到与更新报文特征相同的报文特征,则可以确定在管理器映射表中可以查找到与更新报文特征存在映射关系的转发参数,并且与该更新报文特征存在映射关系的转发参数为待查找的转发参数。In this step, when the forwarding parameter is not found in the second mapping relationship table, the parameter manager may search for the second path identifier corresponding to the first path identifier in the path identifier mapping table, and then the first path The identifier is replaced with the second path identifier, and the elements belonging to the same category in the preset message feature are interchanged. For example, if the preset message feature is {first SPI, srcIP, dstIP}, the message feature may be updated. For {second SPI, dstIP, srcIP}; assuming the default message characteristics are {first SPI, srcIP, dstIP, srcPort, dstPort, proto}, the update message characteristics can be {second SPI, dstIP, srcIP, dstPort, srcPort, proto}, and then in the second mapping relationship table to find the same message characteristics as the update message feature, if the same message feature as the update message feature is found, the manager mapping table can be determined. The forwarding parameter that has a mapping relationship with the update packet feature can be found, and the forwarding parameter that has a mapping relationship with the update packet feature is the forwarding parameter to be searched.
在本发明实施例中,由于正向的业务报文在通过正向路径被转发到接收端后,接收端向发送端发送的返程的业务报文需要在与正向路径对称的返程路径上被转发,这时,分类器会根据返程的业务报文确定预设报文特征,然后将该确定的预设报文特征通过查询请求消息发送给参数管理器。参数管理器为了获取到与正向的业务报文在正向路径被转发时使用的转发参数,会将返程的业务报文中的预设报文特征中的元素进行处理,处理的方式就是将预设报文特征转化为更新报文特征,这里的更新报文特征即为正向的业务报文中的预设报文特征。通过这种方式,参数管理器可以保证正向的业务报文在正向路径上被转发时和返程的业务报文在返程路径上被转发时使用相同的转发参数。In the embodiment of the present invention, after the forward service packet is forwarded to the receiving end through the forward path, the returning service packet sent by the receiving end to the transmitting end needs to be on the return path symmetric with the forward path. Forwarding, at this time, the classifier determines the preset message feature according to the return service message, and then sends the determined preset message feature to the parameter manager through the query request message. In order to obtain the forwarding parameters used by the parameter manager to forward the forwarded service packets in the forward path, the parameter manager processes the elements in the preset packet features in the return service packet. The preset message feature is converted into the update message feature, and the update message feature here is the preset message feature in the forward service message. In this way, the parameter manager can ensure that the forward traffic packets are forwarded on the forward path and the return traffic packets are forwarded on the return path.
在步骤S2054中,当在管理器映射表中未查找到与所述更新报文特征存在映射关系的转发参数时,参数管理器根据所述预设报文特征计算转发参数,并且向所述分类器发送所述计算得到的转发参数。In step S2054, when the forwarding parameter that has a mapping relationship with the update message feature is not found in the manager mapping table, the parameter manager calculates a forwarding parameter according to the preset message feature, and the classification parameter is Transmitting the calculated forwarding parameters.
在本发明实施例中,转发参数的计算方法由参数管理器的规则决定,包括但不限于以下三种:hash算法、累加全局变量或者随机生成的方式。In the embodiment of the present invention, the calculation method of the forwarding parameter is determined by the rules of the parameter manager, including but not limited to the following three types: a hash algorithm, an accumulated global variable, or a randomly generated manner.
在步骤S206中,参数管理器向所述分类器发送所述转发参数。In step S206, the parameter manager sends the forwarding parameter to the classifier.
当分类器中缓存转发参数与报文特征之间对应关系时,如图7所示,所述步骤S102还包括以下步骤。When the correspondence between the cache forwarding parameter and the packet feature is in the classifier, as shown in FIG. 7, the step S102 further includes the following steps.
在步骤S301中,分类器在分类器映射表中查找是否存在与所述预设报文特征对应的转发参数。In step S301, the classifier searches in the classifier mapping table whether there is a forwarding parameter corresponding to the preset message feature.
在本发明实施例中,可以在分类器内部设置用于存储报文特征与转发参数之间的对应关系。In the embodiment of the present invention, a correspondence between the packet feature and the forwarding parameter may be set inside the classifier.
在该步骤中,分类器可以逐一将第一映射关系表中的报文特征与预设报文特征比较,当存在与预设报文特征相同的报文特征时,可以确定在分类器映射表中可以查找到与预设报文特征存在映射关系的转发参数,并且与该预设报文特征存在映射关系的转发参数为待查找的转发参数。 In this step, the classifier can compare the packet features in the first mapping relationship table with the preset packet features one by one. When there is a packet feature with the same preset message characteristics, the classifier mapping table can be determined. The forwarding parameter that has a mapping relationship with the preset packet feature can be found, and the forwarding parameter that has a mapping relationship with the preset packet feature is the forwarding parameter to be searched.
在步骤S302中,当所述分类器映射表中存在与所述预设报文特征对应的转发参数时,分类器从所述分类器映射表中获取与所述预设报文特征对应的转发参数。In step S302, when the forwarding parameter corresponding to the preset message feature exists in the classifier mapping table, the classifier obtains the forwarding corresponding to the preset message feature from the classifier mapping table. parameter.
在步骤S103中,所述分类器将所述业务报文封装为业务链报文,所述业务链报文中携带有所述转发参数。In the step S103, the classifier encapsulates the service packet into a service chain packet, where the service chain packet carries the forwarding parameter.
在该步骤中,分类器将业务报文进行封装,封装时,可以将转发参数封装在业务链报文头中,也可以封装在业务链报文的其他位置。In this step, the classifier encapsulates the service packet. When encapsulating, the forwarding parameter may be encapsulated in the service chain header or encapsulated in other locations of the service chain packet.
在步骤S104中,所述分类器根据所述转发参数确定转发路径中的下一跳的业务功能转发器的设备标识。In step S104, the classifier determines, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path.
在该步骤中,如图3所示,分类器可以根据转发参数和预设的选路方法在SFG1对应的一个SFF中选择一个SFF的设备标识,作为分类器的下一跳的业务功能转发器的设备标识,预设的选路方法可以指取模方法等。In this step, as shown in FIG. 3, the classifier may select a device identifier of the SFF in an SFF corresponding to the SFG1 according to the forwarding parameter and the preset routing method, as the service function repeater of the next hop of the classifier. The device identification, the preset routing method can refer to the modulo method, and the like.
在本发明实施例中,业务功能转发器的设备标识,例如SFF1、SFF2、221和222等。转发路径即为RSP,下一跳指转发路径中与分类器的输出端连接的SFF,如图1中的SFF1。In the embodiment of the present invention, the device identifier of the service function forwarder, for example, SFF1, SFF2, 221, and 222, and the like. The forwarding path is RSP, and the next hop refers to the SFF in the forwarding path that is connected to the output of the classifier, such as SFF1 in FIG.
所述转发路径中包含至少一个业务功能组SFG,图3中任一SFG的内部结构及与该SFG连接的多个SFFS的架构示意图如图4所示,每个所述业务功能组SFG中包括多个SF,每个SF均连接一个SFF,每个SFF连接至少一个SF,至少两个SFF按照预设顺序排列;假定SFG包含n个SFs,记为SF 0,…,SF n-1;n个SFs共连接k个SFFs,分别记为SFF_0,…,SFF_k-1;其中,SFF_i连接的本地SF(隶属该SFG,下同)的数量记为num_i,显然有n=∑(i=0,...,k-1)num_i。The forwarding path includes at least one service function group SFG. The internal structure of any SFG in FIG. 3 and the architecture of multiple SFFSs connected to the SFG are as shown in FIG. 4, and each of the service function groups SFG includes a plurality of SFs, each SF is connected to one SFF, each SFF is connected to at least one SF, and at least two SFFs are arranged in a preset order; assuming that the SFG includes n SFs, denoted as SF 0, ..., SF n-1; The SFs are connected to k SFFs, which are respectively recorded as SFF_0,..., SFF_k-1; wherein the number of local SFs (subject to the SFG, the same below) connected by SFF_i is recorded as num_i, and obviously n=∑ (i=0, ...,k-1) num_i.
所述步骤S104包括以下步骤。The step S104 includes the following steps.
分类器对所述转发参数进行取模计算,得到运算结果。The classifier performs modulo calculation on the forwarding parameter to obtain an operation result.
在本发明实施例中,假设运算结果为s,则s=selector%n,其中,n为SFG内SFs的数量,selector为转发参数。In the embodiment of the present invention, if the operation result is s, then s=selector%n, where n is the number of SFs in the SFG, and the selector is a forwarding parameter.
分类器确定所述运算结果所在的目标数量值区间。The classifier determines a target quantity value interval in which the operation result is located.
在该步骤中,分类器可以将运算结果s与每个数量值区间的两个端点对比,当运算结果s位于任意一个数量值区间中时,可以将该数量值区间确定为目标数量值区间。In this step, the classifier can compare the operation result s with two end points of each quantity value interval, and when the operation result s is located in any one of the quantity value intervals, the quantity value interval can be determined as the target quantity value interval.
分类器根据预设的数量值区间与设备标识的对应关系将所述目标数量值区间对应的设备标识确定为转发路径中的下一跳的业务功能转发器的设备标识。The classifier determines, according to the correspondence between the preset quantity value interval and the device identifier, the device identifier corresponding to the target quantity value interval as the device identifier of the service function forwarder of the next hop in the forwarding path.
在本发明实施例中,分类器可以预先设置多组数量值区间与设备标识的对应关系,每组对应关系的确定方法为针对每个业务功能转发器的设备标识,确定一个数量值区间。In the embodiment of the present invention, the classifier may pre-set a correspondence between multiple sets of quantity value intervals and device identifiers, and the method for determining each group of correspondences is to determine a quantity value interval for the device identifier of each service function forwarder.
在确定每个设备标识对应的数量值区间时,可以首先确定每个设备标识对应的SF的数量,这里的对应指每个设备标识其自身连接的SF,以及,在转发路径中该设备标识之前的所有设备标识连接的SF,累加设备标识对应的所有SF的数量,得到累计数量值,这样,每个设备标识可以得到一个累计数量值;然后可以确定转发路径中相邻两个设备标识对应的累计数量值为所述数量值区间的两端值。When determining the quantity value interval corresponding to each device identifier, the number of SFs corresponding to each device identifier may be first determined, where the correspondence refers to each device identifying its own connected SF, and before the device identifier in the forwarding path. All devices identify the connected SF, accumulate the number of all SFs corresponding to the device identifier, and obtain the cumulative quantity value, so that each device identifier can obtain a cumulative quantity value; then, it can determine the corresponding two device identifiers in the forwarding path. The cumulative quantity value is the value of both ends of the quantity value interval.
以上确定每个设备标识对应的数量值区间的过程可以利用程序语言表达:The above process of determining the quantity value interval corresponding to each device identifier can be expressed in a programming language:
if s∈[∑(i=0,...,m-1)num_i,∑(i=0,...,m)num_i):goto SFF_m,其中,m取值0至k-1。If s∈[∑ (i=0,...,m-1) num_i,∑ (i=0,...,m) num_i):goto SFF_m, where m takes the value 0 to k-1.
上式中的n、num、SFF均代表下一跳SFG内的元素值,%为取模符号,∑(i=0,...,m-1)num_i为num_0到num_m-1的累加值,当m=0时,累加值为0。The n, num, and SFF in the above equation all represent the element values in the next hop SFG, % is the modulo symbol, ∑ (i=0,...,m-1) num_i is the accumulated value of num_0 to num_m-1 When m=0, the accumulated value is 0.
也就是说,在该步骤中,由于在每个SFG中,业务功能转发器均可以被认为是按照预设顺 序排列的,例如,图1中实线或者虚线在传递业务报文时经过的业务功能转发器的顺序等,所以,每个业务功能转发器对应的设备标识也可以认为是按照预设顺序排列的,因此,在确定数量值区间时,可以首先计算每个业务功能转发器的设备标识其自身及其之前的至少0个设备标识的对应的业务功能实体的数量总和,例如,如图4所示,当m取不同值时,可以确定多个数量值区间,当m=0时,∑(i=0,...,m-1)num_i的累加值为0,∑(i=0,...,m)num_i的累加值为2(此处是由于累加计算时计算SFF_0对应的业务功能实体的数量,共2个:SF_0和SF_1),当m=1时,∑(i=0,...,h-1)num_i的累加值为2,∑(i=0,...,h)num_i的累加值为3(此处是由于累加计算时计算SFF_0对应的业务功能实体SF_0和SF_1,和,SFF_1对应的业务功能实体SF_2的数量,共3个),……直至m取完k-1的值,可以确定多个数量值区间,这样,当s位于[0,2),则确定下一跳为SFF_0,当s位于[2,3),则确定下一跳为SFF_1,……。在该步骤中,由于每个设备标识均对应一个数量值区间,所以在确定目标数量值区间后可以确定与该目标数量值区间对应的设备标识,进而确定将该设备标识确定为转发路径中的下一跳的业务功能转发器的设备标识,也就是说,分类器在与其下一跳对应的SFG中确定与该设备标识对应的业务功能转发器为转发路径中下一跳的业务功能转发器。That is to say, in this step, since in each SFG, the service function repeaters can be considered to be arranged in a preset order, for example, the service that the solid line or the broken line in FIG. 1 passes when transmitting the service message. The order of the function repeaters, etc., therefore, the device identifiers corresponding to the forwarders of each service function can also be considered to be arranged in a preset order. Therefore, when determining the quantity value interval, the device of each service function forwarder can be calculated first. A sum of the number of corresponding service function entities identifying themselves and at least 0 device identifiers thereof, for example, as shown in FIG. 4, when m takes different values, multiple quantity value intervals may be determined, when m=0 , ∑ (i=0,...,m-1) The cumulative value of num_i is 0, ∑ (i=0,...,m) The accumulated value of num_i is 2 (here, SFF_0 is calculated due to the accumulated calculation) The number of corresponding business function entities is two: SF_0 and SF_1). When m=1, ∑ (i=0,...,h-1) The cumulative value of num_i is 2, ∑ (i=0, ...,h) The accumulated value of num_i is 3 (here, the business function entities SF_0 and SF_1 corresponding to SFF_0 are calculated due to the cumulative calculation, and , the number of business function entities SF_2 corresponding to SFF_1, a total of three, ... until m takes the value of k-1, can determine a plurality of value range, so that when s is located at [0, 2), then the next One hop is SFF_0, and when s is at [2, 3), it is determined that the next hop is SFF_1, .... In this step, since each device identifier corresponds to a quantity value interval, after determining the target quantity value interval, the device identifier corresponding to the target quantity value interval may be determined, thereby determining that the device identifier is determined as the forwarding path. The device identifier of the next-hop service function forwarder, that is, the classifier determines, in the SFG corresponding to the next hop, the service function forwarder corresponding to the device identifier as the next-hop service function forwarder in the forwarding path. .
在步骤S105中,所述分类器向所述设备标识对应的业务功能转发器发送所述业务链报文。In step S105, the classifier sends the service chain message to the service function forwarder corresponding to the device identifier.
在该步骤中,分类器根据设备标识确定业务功能转发器的地址,并将业务链报文向与所述地址对应的业务功能转发器发送。In this step, the classifier determines the address of the service function forwarder according to the device identifier, and sends the service chain message to the service function forwarder corresponding to the address.
在步骤S106中,业务功能转发器接收转发路径中上一跳设备转发的业务链报文。In step S106, the service function forwarder receives the service chain message forwarded by the last hop device in the forwarding path.
在本发明实施例中,所述业务链报文中携带有所述转发参数,业务功能转发器在转发路径中的上一跳设备可以指分类器,也可以指业务功能转发器等。In the embodiment of the present invention, the service chain packet carries the forwarding parameter, and the previous hop device in the forwarding path of the service function forwarder may refer to a classifier, and may also be a service function forwarder.
在步骤S107中,业务功能转发器获取所述业务链报文中的转发参数。In step S107, the service function forwarder obtains the forwarding parameter in the service chain message.
在步骤S108中,业务功能转发器根据所述转发参数确定所述转发路径中下一跳设备标识。In step S108, the service function forwarder determines the next hop device identifier in the forwarding path according to the forwarding parameter.
在该步骤中,如图3所示,例如,当当前的业务功能转发器为与SFG1对应的多个业务功能转发器中的一个时,该当前的业务功能转发器可以根据转发参数和预设的选路方法确定下一跳设备对应的设备标识,这里的下一跳设备可以指在SFG1包括的多个SF、与SFG1对应的多个SFF或者SFG2对应的多个SFF中的一个设备。预设的选路方法可以指取模方法等。In this step, as shown in FIG. 3, for example, when the current service function forwarder is one of multiple service function forwarders corresponding to SFG1, the current service function forwarder can be based on forwarding parameters and presets. The routing method determines the device identifier corresponding to the next hop device, where the next hop device may refer to one of the plurality of SFs included in the SFG1, the plurality of SFFs corresponding to the SFG1, or the plurality of SFFs corresponding to the SFG2. The preset routing method can refer to the modulo method and the like.
在本发明实施例中,所述步骤S108包括以下步骤。In the embodiment of the present invention, the step S108 includes the following steps.
业务功能转发器根据预设转发表确定所述转发路径中下一跳设备的设备类型。The service function forwarder determines the device type of the next hop device in the forwarding path according to the preset forwarding table.
在本发明实施例中,业务功能转发器中可以设置有用于存储转发路径中每一跳设备的设备标识及设备类型预设转发表,由于业务功能转发器是用于将接收到的业务链报文转发给其对应的任意一个SF或者下一跳的SFF,所以设备类型可以指业务功能实体类型或者业务功能转发器类型等。In the embodiment of the present invention, the service function forwarder may be configured with a device identifier and a device type preset forwarding table for storing each hop device in the forwarding path, because the service function forwarder is used to receive the received service chain report. The file is forwarded to any corresponding SF or SFF of the next hop, so the device type may refer to a service function entity type or a service function forwarder type.
在该步骤中,业务功能转发器可以从预设转发表中获取下一跳设备的设备类型。In this step, the service function forwarder can obtain the device type of the next hop device from the preset forwarding table.
当根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能转发器时,业务功能转发器根据所述转发参数确定下一跳设备对应的业务功能转发器的设备标识。When the device type of the next hop device in the forwarding path determined by the preset forwarding table is a service function forwarder, the service function forwarder determines, according to the forwarding parameter, a service function forwarder corresponding to the next hop device. Equipment Identity.
在该步骤中,业务功能转发器可以根据转发参数及预设的选路方法确定下一跳设备对应的业务功能转发器的设备标识,确定方法可以参见步骤S1041至步骤S1044的过程,区别仅在于,该过程由业务功能转发器执行。In this step, the service function forwarder can determine the device identifier of the service function forwarder corresponding to the next hop device according to the forwarding parameter and the preset routing method. For the determination method, refer to the process of step S1041 to step S1044, the only difference is that The process is performed by the business function forwarder.
在本发明实施例中,如图4所示,所述业务功能转发器会关联有多个SFs;所述步骤S108 还包括以下步骤。In the embodiment of the present invention, as shown in FIG. 4, the service function forwarder is associated with multiple SFs; the step S108 It also includes the following steps.
当根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能实体时,业务功能转发器根据所述转发参数确定下一跳设备对应的业务功能实体的设备标识。When the device type of the next hop device in the forwarding path determined by the preset forwarding table is a service function entity, the service function forwarder determines, according to the forwarding parameter, a device identifier of the service function entity corresponding to the next hop device. .
在该步骤中,业务功能转发器可以从预设转发表中获取下一跳设备的设备类型,当获取的下一跳设备的设备类型为业务功能实体时,业务功能转发器根据所述转发参数及预设的选路方法,确定下一跳设备对应的业务功能实体的设备标识,在确定下一跳设备对应的业务功能实体的设备标识时,如图4所示,假定SFF_i对应n个SFs,记为SF 0,…,SF n-1,其中,连接的本地SF(隶属该SFG,下同)数量记为num_i,显然有n=∑(i=0,...,h-1)num_i。这里预设的选路方法以取模方法为例,取模方法如下,假定该SFF的编号为h:In this step, the service function forwarder can obtain the device type of the next hop device from the preset forwarding table. When the device type of the obtained next hop device is the service function entity, the service function forwarder according to the forwarding parameter And the preset routing method determines the device identifier of the service function entity corresponding to the next hop device. When determining the device identifier of the service function entity corresponding to the next hop device, as shown in FIG. 4, it is assumed that SFF_i corresponds to n SFs. , denoted as SF 0,...,SF n-1, where the number of connected local SFs (subject to the SFG, the same below) is recorded as num_i, obviously n=∑ (i=0,...,h-1) Num_i. The preset routing method here takes the modulo method as an example. The modulo method is as follows, assuming that the SFF number is h:
记s=selector%n,Remember s=selector%n,
if s∈[∑(i=0,...,h-1)num_i,∑(i=0,...,h)num_i):goto SF_s;If s∈[∑ (i=0,...,h-1) num_i,∑ (i=0,...,h) num_i):goto SF_s;
else drop packet。Else drop packet.
其中,%为取模符号,∑(i=0,...,h-1)num_i为num_0到num_h-1的累加值,当h取不同的值时,可以确定多个数量值区间,当h=0时,∑(i=0,...,h-1)num_i的累加值为0,∑(i=0,...,h)num_i的累加值为2,当h=1时,∑(i=0,...,h-1)num_i的累加值为2,∑(i=0,...,h)num_i的累加值为3,……,这样,当s位于[0,2),则确定下一跳为SF_0,当s位于[2,3),则确定下一跳为SF_1,……。Where % is the modulo symbol, ∑ (i=0,...,h-1) num_i is the accumulated value of num_0 to num_h-1. When h takes different values, multiple quantity value intervals can be determined. When h=0, ∑ (i=0,...,h-1) The accumulated value of num_i is 0, ∑ (i=0,...,h) The accumulated value of num_i is 2, when h=1 , ∑ (i=0,...,h-1) The cumulative value of num_i is 2, ∑ (i=0,...,h) The cumulative value of num_i is 3,..., so that when s is located at [ 0, 2), it is determined that the next hop is SF_0, and when s is located at [2, 3), it is determined that the next hop is SF_1, ....
在步骤S109中,业务功能转发器向所述设备标识对应的下一跳设备发送所述业务链报文。In step S109, the service function forwarder sends the service chain message to the next hop device corresponding to the device identifier.
在步骤S110中,当所述业务链报文的下一跳设备的设备标识与预设设备标识相同时,业务功能转发器确定所述业务链报文中的预设报文特征。In step S110, when the device identifier of the next hop device of the service chain packet is the same as the preset device identifier, the service function forwarder determines the preset packet feature in the service chain packet.
在本发明实施例中,预设设备标识可以指接收端设备的设备标识,下一跳设备的设备标识与接收端设备的设备标识相同,即当前的业务功能转发器为转发路径中的最后一跳业务功能转发器。In the embodiment of the present invention, the preset device identifier may be the device identifier of the receiving device, and the device identifier of the next hop device is the same as the device identifier of the receiving device, that is, the current service function forwarder is the last one in the forwarding path. Jump service function forwarder.
在该步骤中,由于转发路径中会存在修改报文特征的设备(如NAT),所以最后一跳业务功能转发器接收到的业务链报文中的预设报文特征可能已经被修改,所以此处再次确定业务链报文中的预设报文特征。In this step, because the device that modifies the packet feature (such as NAT) exists in the forwarding path, the preset packet feature in the service chain packet received by the last hop service function forwarder may have been modified. Here again, the preset packet characteristics in the service chain message are determined.
在步骤S111中,业务功能转发器向参数管理器发送所述预设报文特征与所述转发参数之间的映射关系。In step S111, the service function forwarder sends a mapping relationship between the preset message feature and the forwarding parameter to the parameter manager.
在该步骤中,业务功能转发器向参数管理器发送确定的预设报文特征与业务链报文中的转发参数之间的映射关系。In this step, the service function forwarder sends a mapping relationship between the determined preset message feature and the forwarding parameter in the service chain message to the parameter manager.
在步骤S112中,当参数管理器接收到业务功能转发器发送的映射关系时,参数管理器判断所述管理器映射表中是否存在接收的所述映射关系。In step S112, when the parameter manager receives the mapping relationship sent by the service function forwarder, the parameter manager determines whether the received mapping relationship exists in the manager mapping table.
在该步骤中,参数管理器在接收到业务功能转发器发送的映射关系时,将接收到的映射关系与第二映射关系表中的各个映射关系进行对比,判断接收的映射关系是否与第二映射关系表中的各个映射关系均不相同,当接收的映射关系与第二映射关系表中的各个映射关系均不相同时,可以确定所述管理器映射表中不存在接收的所述映射关系。In this step, when the parameter manager receives the mapping relationship sent by the service function forwarder, compares the received mapping relationship with each mapping relationship in the second mapping relationship table, and determines whether the received mapping relationship is related to the second mapping relationship. The mapping relationship in the mapping relationship table is different. When the mapping relationship between the received mapping relationship and the second mapping relationship table is different, it may be determined that the mapping relationship is not received in the manager mapping table. .
在步骤S113中,当所述管理器映射表中不存在接收的所述映射关系时,参数管理器将接收的所述映射关系加入所述管理器映射表中。In step S113, when the received mapping relationship does not exist in the manager mapping table, the parameter manager adds the received mapping relationship to the manager mapping table.
在步骤S114中,业务功能转发器将所述业务链报文解除封装,得到业务报文。In step S114, the service function forwarder decapsulates the service chain packet to obtain a service packet.
在该步骤中,业务功能转发器利用封装业务报文时的逆过程对业务链报文进行解封装,并 得到业务报文。In this step, the service function forwarder decapsulates the service chain packet by using the reverse process of encapsulating the service packet, and Get a business message.
在步骤S115中,业务功能转发器向所述转发路径的接收端发送所述业务报文。In step S115, the service function forwarder sends the service packet to the receiving end of the forwarding path.
在该步骤中,业务功能转发器向转发路径的接收端发送解除封装后的业务报文。In this step, the service function forwarder sends the decapsulated service packet to the receiving end of the forwarding path.
如图8所示,在本发明的又一实施例中,提供一种报文转发装置,包括:接收模块11、获取模块12、封装模块13、确定模块14和发送模块15。As shown in FIG. 8, in another embodiment of the present invention, a message forwarding apparatus is provided, including: a receiving module 11, an obtaining module 12, a packaging module 13, a determining module 14, and a sending module 15.
接收模块11,用于接收业务报文,并确定所述业务报文的预设报文特征。The receiving module 11 is configured to receive a service packet, and determine a preset packet feature of the service packet.
获取模块12,用于获取与所述预设报文特征对应的转发参数。The obtaining module 12 is configured to obtain a forwarding parameter corresponding to the preset message feature.
封装模块13,用于将所述业务报文封装为业务链报文,所述业务链报文中携带有所述转发参数。The encapsulating module 13 is configured to encapsulate the service packet into a service chain packet, where the service chain packet carries the forwarding parameter.
确定模块14,用于根据所述转发参数确定转发路径中的下一跳的业务功能转发器的设备标识。The determining module 14 is configured to determine, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path.
发送模块15,用于向所述设备标识对应的业务功能转发器发送所述业务链报文。The sending module 15 is configured to send the service chain message to the corresponding service function forwarder of the device identifier.
在本发明的又一实施例中,所述获取模块,用于:In still another embodiment of the present invention, the acquiring module is configured to:
生成参数查询请求消息,所述参数查询请求消息中携带有所述预设报文特征;Generating a parameter query request message, where the parameter query request message carries the preset message feature;
向参数管理器发送所述参数查询请求消息;Sending the parameter query request message to the parameter manager;
接收所述参数管理器根据所述参数查询请求返回的所述转发参数。Receiving, by the parameter manager, the forwarding parameter returned according to the parameter query request.
在本发明的又一实施例中,所述获取模块,还用于:In still another embodiment of the present invention, the acquiring module is further configured to:
在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;Locating, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
当所述分类器映射表中不存在与所述预设报文特征对应的所述转发参数时,生成所述参数查询请求消息;Generating the parameter query request message when the forwarding parameter corresponding to the preset message feature does not exist in the classifier mapping table;
当接收到所述参数管理器返回的所述转发参数时,将所述转发参数以及所述预设报文特征的对应关系加入所述分类器映射表。When the forwarding parameter returned by the parameter manager is received, the correspondence between the forwarding parameter and the preset message feature is added to the classifier mapping table.
在本发明的又一实施例中,所述获取模块,用于:In still another embodiment of the present invention, the acquiring module is configured to:
在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;Locating, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
当所述分类器映射表中存在与所述预设报文特征对应的所述转发参数时,从所述分类器映射表中获取与所述预设报文特征对应的所述转发参数。When the forwarding parameter corresponding to the preset message feature exists in the classifier mapping table, the forwarding parameter corresponding to the preset message feature is obtained from the classifier mapping table.
在本发明的又一实施例中,所述转发路径中包含至少一个业务功能组,每个所述业务功能组连接至少两个按照预设顺序排列的业务功能转发器;In a further embodiment of the present invention, the forwarding path includes at least one service function group, and each of the service function groups is connected to at least two service function forwarders arranged in a preset order;
所述确定模块,用于:The determining module is configured to:
对所述转发参数进行取模计算,得到运算结果;Performing modulo calculation on the forwarding parameter to obtain an operation result;
确定所述运算结果所在的目标数量值区间;Determining a target quantity value interval in which the operation result is located;
根据预设的数量值区间与设备标识的对应关系将所述目标数量值区间对应的设备标识确定为转发路径中的下一跳的业务功能转发器的设备标识。The device identifier corresponding to the target quantity value interval is determined as the device identifier of the next function service forwarder in the forwarding path according to the correspondence between the preset quantity value interval and the device identifier.
如图9所本发明的又一实施例提供另一种报文转发装置,所述装置包括:接收模块21、获取模块22、确定模块23和发送模块24。Another embodiment of the present invention provides another message forwarding device. The device includes a receiving module 21, an obtaining module 22, a determining module 23, and a sending module 24.
接收模块21,用于接收转发路径中上一跳设备转发的业务链报文,所述业务链报文中携带有所述转发参数。 The receiving module 21 is configured to receive a service chain packet forwarded by the last hop device in the forwarding path, where the service chain packet carries the forwarding parameter.
获取模块22,用于获取所述业务链报文中的转发参数。The obtaining module 22 is configured to obtain forwarding parameters in the service chain packet.
确定模块23,用于根据所述转发参数确定所述转发路径中下一跳设备标识。The determining module 23 is configured to determine, according to the forwarding parameter, a next hop device identifier in the forwarding path.
发送模块24,用于向所述设备标识对应的下一跳设备发送所述业务链报文。The sending module 24 is configured to send the service chain message to the next hop device corresponding to the device identifier.
在本发明的又一实施例中,所述确定模块23,用于:In a further embodiment of the invention, the determining module 23 is configured to:
根据预设转发表确定所述转发路径中下一跳设备的设备类型;Determining, according to a preset forwarding table, a device type of a next hop device in the forwarding path;
当根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能转发器时,根据所述转发参数确定下一跳设备对应的业务功能转发器的设备标识。When the device type of the next hop device in the forwarding path determined by the preset forwarding table is a service function forwarder, the device identifier of the service function forwarder corresponding to the next hop device is determined according to the forwarding parameter.
在本发明的又一实施例中,所述业务功能转发器关联有多个业务功能实体。In still another embodiment of the present invention, the service function forwarder is associated with a plurality of service function entities.
所述确定模块23,还用于:The determining module 23 is further configured to:
当根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能实体时,根据所述转发参数确定下一跳设备对应的业务功能实体的设备标识。When the device type of the next hop device in the forwarding path determined by the preset forwarding table is a service function entity, the device identifier of the service function entity corresponding to the next hop device is determined according to the forwarding parameter.
在本发明的又一实施例中,所述装置还包括:解除封装模块。In still another embodiment of the present invention, the apparatus further includes: releasing the package module.
所述确定模块23还用于当所述业务链报文的下一跳设备的设备标识与预设设备标识相同时,确定所述业务链报文中的预设报文特征。The determining module 23 is further configured to determine a preset packet feature in the service chain packet when the device identifier of the next hop device of the service chain packet is the same as the preset device identifier.
所述发送模块还用于向参数管理器发送所述预设报文特征与所述转发参数之间的映射关系;The sending module is further configured to send, to the parameter manager, a mapping relationship between the preset message feature and the forwarding parameter;
所述解除封装模块,用于将所述业务链报文解除封装,得到业务报文。The decapsulation module is configured to decapsulate the service chain packet to obtain a service packet.
所述发送模块还用于向所述转发路径的接收端发送所述业务报文。The sending module is further configured to send the service packet to the receiving end of the forwarding path.
如图10所示,在本发明的又一实施例中,一种转发参数管理装置,包括:接收模块31、获取模块32和发送模块33。As shown in FIG. 10, in another embodiment of the present invention, a forwarding parameter management apparatus includes: a receiving module 31, an obtaining module 32, and a sending module 33.
接收模块31,用于接收分类器发送的查询请求消息,所述查询请求消息携带有预设报文特征。The receiving module 31 is configured to receive a query request message sent by the classifier, where the query request message carries a preset message feature.
获取模块32,用于获取所述查询请求消息中的预设报文特征,以及获取与所述预设报文特征存在映射关系的转发参数。The obtaining module 32 is configured to acquire a preset message feature in the query request message, and obtain a forwarding parameter that has a mapping relationship with the preset message feature.
发送模块33,用于向所述分类器发送所述转发参数。The sending module 33 is configured to send the forwarding parameter to the classifier.
在本发明的又一实施例中,所述预设报文特征中包含转发路径的第一路径标识和至少一对相同类别的元素,所述获取模块用于:In a further embodiment of the present invention, the preset message feature includes a first path identifier of the forwarding path and at least one pair of elements of the same category, and the acquiring module is configured to:
在管理器映射表中查找与所述预设报文特征存在映射关系的转发参数;And searching, in the manager mapping table, a forwarding parameter that has a mapping relationship with the preset packet feature;
当在管理器映射表中查找到所述转发参数时,向所述分类器发送所述转发参数;Sending the forwarding parameter to the classifier when the forwarding parameter is found in a manager mapping table;
当在管理器映射表中未查找到所述转发参数时,在路径标识映射表中查找与所述第一路径标识对应的第二路径标识,将所述第一路径标识替换为第二路径标识,并且将相同类别的元素互换位置,得到更新报文特征,在管理器映射表中查找与所述更新报文特征存在映射关系的转发参数;When the forwarding parameter is not found in the manager mapping table, the second path identifier corresponding to the first path identifier is searched in the path identifier mapping table, and the first path identifier is replaced with the second path identifier. And exchanging the elements of the same category to obtain an update message feature, and searching, in the manager mapping table, a forwarding parameter that has a mapping relationship with the update message feature;
当在管理器映射表中未查找到与所述更新报文特征存在映射关系的转发参数时,根据所述预设报文特征计算转发参数,并且向所述分类器发送所述计算得到的转发参数。When the forwarding parameter that has a mapping relationship with the update packet feature is not found in the manager mapping table, the forwarding parameter is calculated according to the preset packet feature, and the calculated forwarding is sent to the classifier. parameter.
在本发明的又一实施例中,所述装置还包括:判断模块和加入模块。In still another embodiment of the present invention, the apparatus further includes: a determining module and a joining module.
判断模块,用于当接收到业务功能转发器发送的映射关系时,判断所述管理器映射表中是否存在接收的所述映射关系。 The determining module is configured to determine, when the mapping relationship sent by the service function forwarder is received, whether the received mapping relationship exists in the manager mapping table.
加入模块,用于当所述管理器映射表中不存在接收的所述映射关系时,将接收的所述映射关系加入所述管理器映射表中。And adding a module, when the received mapping relationship does not exist in the manager mapping table, adding the received mapping relationship to the manager mapping table.
本发明实施例还提供了一种报文转发的装置110,如图11所示,包括:存储器1101、处理器1102和收发器1103,存储器1101用于存储一组代码,处理器1102用于根据该组代码执行如图2和图5-图7中所示的任意一种方法,收发器1103用于和其他设备通信。The embodiment of the present invention further provides a message forwarding device 110. As shown in FIG. 11, the device includes: a memory 1101, a processor 1102, and a transceiver 1103. The memory 1101 is configured to store a set of codes, and the processor 1102 is configured to The set of codes performs any of the methods shown in Figures 2 and 5-7, and the transceiver 1103 is used to communicate with other devices.
其中,存储器1101、处理器1102和收发器1103之间是通过总线系统1104耦合在一起的,其中存储器1101可能包含随机存取存储器,也可能还包括非易失性存储器,例如至少一个磁盘存储器。总线系统1104可以是工业标准体系结构(英文:Industry Standard Architecture,简称ISA)总线、外部设备互连(英文:Peripheral Component,简称PCI)总线或扩展工业标准体系结构(英文:Extended Industry Standard Architecture,简称EISA)总线等。该总线系统1104可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The memory 1101, the processor 1102 and the transceiver 1103 are coupled together by a bus system 1104. The memory 1101 may include a random access memory, and may also include a non-volatile memory, such as at least one disk storage. The bus system 1104 can be an industry standard architecture (English: Industry Standard Architecture, ISA for short) bus, an external device interconnection (English: Peripheral Component, PCI) bus or an extended industry standard architecture (English: Extended Industry Standard Architecture, short for EISA) bus and so on. The bus system 1104 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 11, but it does not mean that there is only one bus or one type of bus.
其中,图8-图10中的接收模块和发送模块可以集成到收发器1103中,其余模块可以集成到处理器1102中,其余模块可以以硬件形式内嵌于或独立于网络设备的处理器中,也可以以软件形式存储于网络设备的存储器中,以便于处理器调用执行以上各个模块对应的操作,该处理器可以为中央处理器(英文:Central Processing Unit,简称CPU)、特定集成电路(英文:Application Specific Integrated Circuit,简称ASIC)或者是被配置成实施本发明实施例的一个或多个集成电路。The receiving module and the sending module in FIG. 8 to FIG. 10 may be integrated into the transceiver 1103, and the remaining modules may be integrated into the processor 1102. The remaining modules may be embedded in the hardware or in a processor independent of the network device. , can also be stored in the memory of the network device in the form of software, so that the processor can call the corresponding operations of the above modules, the processor can be a central processing unit (English: Central Processing Unit, CPU for short), a specific integrated circuit ( English: Application Specific Integrated Circuit (ASIC) or one or more integrated circuits configured to implement embodiments of the present invention.
本发明实施例提供的网络设备110中的各个器件用于执行上述方法,因此,网络设备110的有益效果可以参见上述方法部分所述的有益效果,在此不再赘述。Each device in the network device 110 provided by the embodiment of the present invention is used to perform the foregoing method. Therefore, the beneficial effects of the network device 110 can be referred to the beneficial effects described in the foregoing method, and details are not described herein again.
具体实现中,本发明还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可包括本发明提供的报文转发方法的各实施例中的部分或全部步骤。所述的存储介质可为磁碟、光盘、只读存储记忆体(英文:read-only memory,简称:ROM)或随机存储记忆体(英文:random access memory,简称:RAM)等。In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the message forwarding method provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (English: read-only memory, abbreviated as: ROM) or a random access memory (English: random access memory, abbreviation: RAM).
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。It will be apparent to those skilled in the art that the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM. , a disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于无线通信设备实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。The same and similar parts between the various embodiments in this specification can be referred to each other. In particular, for the wireless communication device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant places can be referred to the description in the method embodiment.
以上所述的本发明实施方式并不构成对本发明保护范围的限定。 The embodiments of the invention described above are not intended to limit the scope of the invention.

Claims (24)

  1. 一种报文转发方法,其特征在于,包括:A packet forwarding method, comprising:
    分类器接收业务报文,并确定所述业务报文的预设报文特征;The classifier receives the service packet and determines the preset packet feature of the service packet;
    所述分类器获取与所述预设报文特征对应的转发参数;The classifier obtains a forwarding parameter corresponding to the preset message feature;
    所述分类器将所述业务报文封装为业务链报文,所述业务链报文中携带有所述转发参数;The classifier encapsulates the service packet into a service chain packet, where the service chain packet carries the forwarding parameter;
    所述分类器根据所述转发参数确定转发路径中的下一跳的业务功能转发器的设备标识;Determining, by the classifier, a device identifier of a service function forwarder of a next hop in the forwarding path according to the forwarding parameter;
    所述分类器向所述设备标识对应的业务功能转发器发送所述业务链报文。The classifier sends the service chain message to a service function forwarder corresponding to the device identifier.
  2. 根据权利要求1所述的报文转发方法,其特征在于,所述分类器获取与所述预设报文特征对应的转发参数,包括:The packet forwarding method according to claim 1, wherein the classifier obtains forwarding parameters corresponding to the preset message features, including:
    所述分类器生成参数查询请求消息,所述参数查询请求消息中携带有所述预设报文特征;The classifier generates a parameter query request message, where the parameter query request message carries the preset message feature;
    所述分类器向参数管理器发送所述参数查询请求消息;The classifier sends the parameter query request message to a parameter manager;
    所述分类器接收所述参数管理器根据所述参数查询请求返回的所述转发参数。The classifier receives the forwarding parameter returned by the parameter manager according to the parameter query request.
  3. 根据权利要求2所述的报文转发方法,其特征在于,所述分类器生成所述参数查询请求消息包括:The packet forwarding method according to claim 2, wherein the generating, by the classifier, the parameter query request message comprises:
    所述分类器在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;The classifier searches, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
    当所述分类器映射表中不存在与所述预设报文特征对应的所述转发参数时,所述分类器生成所述参数查询请求消息;When the forwarding parameter corresponding to the preset message feature does not exist in the classifier mapping table, the classifier generates the parameter query request message;
    所述方法还包括:The method further includes:
    当所述分类器接收到所述参数管理器返回的所述转发参数时,将所述转发参数以及所述预设报文特征的对应关系加入所述分类器映射表。When the classifier receives the forwarding parameter returned by the parameter manager, the corresponding relationship between the forwarding parameter and the preset message feature is added to the classifier mapping table.
  4. 根据权利要求1所述的报文转发方法,其特征在于,所述分类器获取与所述预设报文特征对应的转发参数,包括:The packet forwarding method according to claim 1, wherein the classifier obtains forwarding parameters corresponding to the preset message features, including:
    所述分类器在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;The classifier searches, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
    当所述分类器映射表中存在与所述预设报文特征对应的所述转发参数时,所述分类器从所述分类器映射表中获取与所述预设报文特征对应的所述转发参数。When the forwarding parameter corresponding to the preset message feature exists in the classifier mapping table, the classifier acquires the corresponding to the preset message feature from the classifier mapping table. Forward parameters.
  5. 根据权利要求1-4中任意一项所述的报文转发方法,其特征在于,所述转发路径中包含至少一个业务功能组,每个所述业务功能组连接至少两个按照预设顺序排列的业务功能转发器;The packet forwarding method according to any one of claims 1 to 4, wherein the forwarding path includes at least one service function group, and each of the service function groups is connected by at least two in a preset order. Business function forwarder;
    所述分类器根据所述转发参数确定转发路径中的下一跳的业务功能转发器的设备标识,包括:The classifier determines, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path, including:
    所述分类器对所述转发参数进行取模计算,得到运算结果;The classifier performs modulo calculation on the forwarding parameter to obtain an operation result;
    所述分类器确定所述运算结果所在的目标数量值区间;The classifier determines a target quantity value interval in which the operation result is located;
    所述分类器根据预设的数量值区间与设备标识的对应关系将所述目标数量值区间对应的设备标识确定为转发路径中的下一跳的业务功能转发器的设备标识。The classifier determines, according to the correspondence between the preset quantity value interval and the device identifier, the device identifier corresponding to the target quantity value interval as the device identifier of the service function forwarder of the next hop in the forwarding path.
  6. 一种报文转发方法,其特征在于,所述方法包括:A packet forwarding method, the method comprising:
    业务功能转发器接收转发路径中上一跳设备转发的业务链报文,所述业务链报文中携带有所述转发参数; The service function forwarder receives the service chain packet forwarded by the last hop device in the forwarding path, where the service chain packet carries the forwarding parameter;
    所述业务功能转发器获取所述业务链报文中的转发参数;The service function forwarder obtains a forwarding parameter in the service chain packet;
    所述业务功能转发器根据所述转发参数确定所述转发路径中下一跳设备标识;Determining, by the service function forwarder, a next hop device identifier in the forwarding path according to the forwarding parameter;
    所述业务功能转发器向所述设备标识对应的下一跳设备发送所述业务链报文。The service function forwarder sends the service chain message to the next hop device corresponding to the device identifier.
  7. 根据权利要求6所述的方法,其特征在于,所述业务功能转发器根据所述转发参数确定所述转发路径中下一跳设备标识,包括:The method according to claim 6, wherein the service function forwarder determines the next hop device identifier in the forwarding path according to the forwarding parameter, including:
    所述业务功能转发器根据预设转发表确定所述转发路径中下一跳设备的设备类型;Determining, by the service function forwarder, a device type of a next hop device in the forwarding path according to a preset forwarding table;
    当所述业务功能转发器根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能转发器时,所述业务功能转发器根据所述转发参数确定下一跳设备对应的业务功能转发器的设备标识。When the service function forwarder determines, according to the preset forwarding table, that the device type of the next hop device in the forwarding path is a service function forwarder, the service function forwarder determines a next hop according to the forwarding parameter. Device ID of the service function forwarder corresponding to the device.
  8. 根据权利要求7所述的方法,其特征在于,所述业务功能转发器关联有多个业务功能实体;The method according to claim 7, wherein the service function forwarder is associated with a plurality of service function entities;
    所述业务功能转发器根据所述转发参数确定所述转发路径中下一跳设备标识,还包括:The service function forwarder determines the next hop device identifier in the forwarding path according to the forwarding parameter, and further includes:
    当所述业务功能转发器根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能实体时,所述业务功能转发器根据所述转发参数确定下一跳设备对应的业务功能实体的设备标识。When the service function forwarder determines, according to the preset forwarding table, that the device type of the next hop device in the forwarding path is a service function entity, the service function forwarder determines the next hop device according to the forwarding parameter. The device ID of the corresponding business function entity.
  9. 根据权利要求6至8任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 6 to 8, wherein the method further comprises:
    当所述业务链报文的下一跳设备的设备标识与预设设备标识相同时,业务功能转发器确定所述业务链报文中的预设报文特征;When the device identifier of the next hop device of the service chain packet is the same as the preset device identifier, the service function forwarder determines the preset packet feature in the service chain packet.
    所述业务功能转发器向参数管理器发送所述预设报文特征与所述转发参数之间的映射关系;Transmitting, by the service function forwarder, a mapping relationship between the preset message feature and the forwarding parameter to a parameter manager;
    所述业务功能转发器将所述业务链报文解除封装,得到业务报文;The service function forwarder decapsulates the service chain packet to obtain a service packet;
    所述业务功能转发器向所述转发路径的接收端发送所述业务报文。The service function forwarder sends the service packet to the receiving end of the forwarding path.
  10. 一种转发参数管理方法,其特征在于,包括:A forwarding parameter management method, comprising:
    参数管理器接收分类器发送的查询请求消息,所述查询请求消息携带有预设报文特征;The parameter manager receives a query request message sent by the classifier, where the query request message carries a preset message feature;
    所述参数管理器获取所述查询请求消息中的预设报文特征;The parameter manager obtains a preset message feature in the query request message;
    所述参数管理器获取与所述预设报文特征存在映射关系的转发参数;The parameter manager obtains a forwarding parameter that has a mapping relationship with the preset packet feature;
    所述参数管理器向所述分类器发送所述转发参数。The parameter manager sends the forwarding parameter to the classifier.
  11. 根据权利要求10所述的方法,其特征在于,所述预设报文特征中包含转发路径的第一路径标识和至少一对相同类别的元素,所述参数管理器获取与所述预设报文特征存在映射关系的转发参数,包括:The method according to claim 10, wherein the preset message feature includes a first path identifier of a forwarding path and at least one pair of elements of the same category, and the parameter manager obtains the preset report The forwarding parameters of the mapping relationship exist, including:
    所述参数管理器在管理器映射表中查找与所述预设报文特征存在映射关系的转发参数;The parameter manager searches, in the manager mapping table, a forwarding parameter that has a mapping relationship with the preset packet feature;
    当在管理器映射表中查找到所述转发参数时,所述参数管理器向所述分类器发送所述转发参数;When the forwarding parameter is found in the manager mapping table, the parameter manager sends the forwarding parameter to the classifier;
    当在管理器映射表中未查找到所述转发参数时,所述参数管理器在路径标识映射表中查找与所述第一路径标识对应的第二路径标识,将所述第一路径标识替换为第二路径标识,并且将相同类别的元素互换位置,得到更新报文特征,在管理器映射表中查找与所述更新报文特征存在映射关系的转发参数;When the forwarding parameter is not found in the manager mapping table, the parameter manager searches the path identifier mapping table for the second path identifier corresponding to the first path identifier, and replaces the first path identifier. Identifying the second path, and swapping the elements of the same category to obtain the updated message feature, and searching, in the manager mapping table, the forwarding parameter that has a mapping relationship with the updated message feature;
    当在管理器映射表中未查找到与所述更新报文特征存在映射关系的转发参数时,所述参数 管理器根据所述预设报文特征计算转发参数,并且向所述分类器发送所述计算得到的转发参数。When the forwarding parameter that has a mapping relationship with the update message feature is not found in the manager mapping table, the parameter The manager calculates a forwarding parameter according to the preset message feature, and sends the calculated forwarding parameter to the classifier.
  12. 根据权利要求10至11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 10 to 11, wherein the method further comprises:
    当接收到业务功能转发器发送的映射关系时,所述参数管理器判断所述管理器映射表中是否存在接收的所述映射关系;When the mapping relationship sent by the service function forwarder is received, the parameter manager determines whether the received mapping relationship exists in the manager mapping table;
    当所述管理器映射表中不存在接收的所述映射关系时,所述参数管理器将接收的所述映射关系加入所述管理器映射表中。When the received mapping relationship does not exist in the manager mapping table, the parameter manager adds the received mapping relationship to the manager mapping table.
  13. 一种报文转发装置,其特征在于,包括:A message forwarding device, comprising:
    接收模块,用于接收业务报文,并确定所述业务报文的预设报文特征;a receiving module, configured to receive a service packet, and determine a preset packet feature of the service packet;
    获取模块,用于获取与所述预设报文特征对应的转发参数;An obtaining module, configured to acquire a forwarding parameter corresponding to the preset message feature;
    封装模块,用于将所述业务报文封装为业务链报文,所述业务链报文中携带有所述转发参数;The encapsulating module is configured to encapsulate the service packet into a service chain packet, where the service chain packet carries the forwarding parameter;
    确定模块,用于根据所述转发参数确定转发路径中的下一跳的业务功能转发器的设备标识;a determining module, configured to determine, according to the forwarding parameter, a device identifier of a service function forwarder of a next hop in the forwarding path;
    发送模块,用于向所述设备标识对应的业务功能转发器发送所述业务链报文。The sending module is configured to send the service chain packet to the corresponding service function forwarder of the device identifier.
  14. 根据权利要求13所述的报文转发装置,其特征在于,所述获取模块,用于:The packet forwarding device according to claim 13, wherein the obtaining module is configured to:
    生成参数查询请求消息,所述参数查询请求消息中携带有所述预设报文特征;Generating a parameter query request message, where the parameter query request message carries the preset message feature;
    向参数管理器发送所述参数查询请求消息;Sending the parameter query request message to the parameter manager;
    接收所述参数管理器根据所述参数查询请求返回的所述转发参数。Receiving, by the parameter manager, the forwarding parameter returned according to the parameter query request.
  15. 根据权利要求14所述的报文转发装置,其特征在于,所述获取模块,还用于:The packet forwarding device according to claim 14, wherein the obtaining module is further configured to:
    在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;Locating, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
    当所述分类器映射表中不存在与所述预设报文特征对应的所述转发参数时,生成所述参数查询请求消息;Generating the parameter query request message when the forwarding parameter corresponding to the preset message feature does not exist in the classifier mapping table;
    当接收到所述参数管理器返回的所述转发参数时,将所述转发参数以及所述预设报文特征的对应关系加入所述分类器映射表。When the forwarding parameter returned by the parameter manager is received, the correspondence between the forwarding parameter and the preset message feature is added to the classifier mapping table.
  16. 根据权利要求13所述的报文转发装置,其特征在于,所述获取模块,用于:The packet forwarding device according to claim 13, wherein the obtaining module is configured to:
    在分类器映射表中查找是否存在与所述预设报文特征对应的所述转发参数;Locating, in the classifier mapping table, whether the forwarding parameter corresponding to the preset message feature exists;
    当所述分类器映射表中存在与所述预设报文特征对应的所述转发参数时,从所述分类器映射表中获取与所述预设报文特征对应的所述转发参数。When the forwarding parameter corresponding to the preset message feature exists in the classifier mapping table, the forwarding parameter corresponding to the preset message feature is obtained from the classifier mapping table.
  17. 根据权利要求13-16中任意一项所述的报文转发装置,其特征在于,所述转发路径中包含至少一个业务功能组,每个所述业务功能组连接至少两个按照预设顺序排列的业务功能转发器;The packet forwarding device according to any one of claims 13 to 16, wherein the forwarding path includes at least one service function group, and each of the service function groups is connected by at least two in a preset order. Business function forwarder;
    所述确定模块,用于:The determining module is configured to:
    对所述转发参数进行取模计算,得到运算结果;Performing modulo calculation on the forwarding parameter to obtain an operation result;
    确定所述运算结果所在的目标数量值区间;Determining a target quantity value interval in which the operation result is located;
    根据预设的数量值区间与设备标识的对应关系将所述目标数量值区间对应的设备标识确定为转发路径中的下一跳的业务功能转发器的设备标识。 The device identifier corresponding to the target quantity value interval is determined as the device identifier of the next function service forwarder in the forwarding path according to the correspondence between the preset quantity value interval and the device identifier.
  18. 一种报文转发装置,其特征在于,所述装置包括:A message forwarding device, characterized in that the device comprises:
    接收模块,用于接收转发路径中上一跳设备转发的业务链报文,所述业务链报文中携带有所述转发参数;a receiving module, configured to receive a service chain packet forwarded by a device in a forwarding path, where the service chain packet carries the forwarding parameter;
    获取模块,用于获取所述业务链报文中的转发参数;An obtaining module, configured to obtain a forwarding parameter in the service chain packet;
    确定模块,用于根据所述转发参数确定所述转发路径中下一跳设备标识;a determining module, configured to determine, according to the forwarding parameter, a next hop device identifier in the forwarding path;
    发送模块,用于向所述设备标识对应的下一跳设备发送所述业务链报文。The sending module is configured to send the service chain packet to the next hop device corresponding to the device identifier.
  19. 根据权利要求18所述的装置,其特征在于,所述确定模块,用于:The device according to claim 18, wherein the determining module is configured to:
    根据预设转发表确定所述转发路径中下一跳设备的设备类型;Determining, according to a preset forwarding table, a device type of a next hop device in the forwarding path;
    当根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能转发器时,根据所述转发参数确定下一跳设备对应的业务功能转发器的设备标识。When the device type of the next hop device in the forwarding path determined by the preset forwarding table is a service function forwarder, the device identifier of the service function forwarder corresponding to the next hop device is determined according to the forwarding parameter.
  20. 根据权利要求19所述的装置,其特征在于,所述业务功能转发器关联有多个业务功能实体;The apparatus according to claim 19, wherein said service function forwarder is associated with a plurality of service function entities;
    所述确定模块,还用于:The determining module is further configured to:
    当根据所述预设转发表确定的所述转发路径中下一跳设备的设备类型为业务功能实体时,根据所述转发参数确定下一跳设备对应的业务功能实体的设备标识。When the device type of the next hop device in the forwarding path determined by the preset forwarding table is a service function entity, the device identifier of the service function entity corresponding to the next hop device is determined according to the forwarding parameter.
  21. 根据权利要求18至20任一项所述的装置,其特征在于,Apparatus according to any one of claims 18 to 20, wherein
    所述确定模块还用于:当所述业务链报文的下一跳设备的设备标识与预设设备标识相同时,确定所述业务链报文中的预设报文特征;The determining module is further configured to: when the device identifier of the next hop device of the service chain packet is the same as the preset device identifier, determine a preset packet feature in the service chain packet;
    所述发送模块还用于向参数管理器发送所述预设报文特征与所述转发参数之间的映射关系;The sending module is further configured to send, to the parameter manager, a mapping relationship between the preset message feature and the forwarding parameter;
    所述装置还包括解除封装模块,用于将所述业务链报文解除封装,得到业务报文;The device further includes a decapsulation module, configured to decapsulate the service chain packet to obtain a service packet;
    所述发送模块还用于向所述转发路径的接收端发送所述业务报文。The sending module is further configured to send the service packet to the receiving end of the forwarding path.
  22. 一种转发参数管理装置,其特征在于,包括:A forwarding parameter management device, comprising:
    接收模块,用于接收分类器发送的查询请求消息,所述查询请求消息携带有预设报文特征;a receiving module, configured to receive a query request message sent by the classifier, where the query request message carries a preset message feature;
    获取模块,用于获取所述查询请求消息中的预设报文特征,以及获取与所述预设报文特征存在映射关系的转发参数;An acquiring module, configured to acquire a preset packet feature in the query request message, and obtain a forwarding parameter that has a mapping relationship with the preset packet feature;
    发送模块,用于向所述分类器发送所述转发参数。And a sending module, configured to send the forwarding parameter to the classifier.
  23. 根据权利要求22所述的装置,其特征在于,所述预设报文特征中包含转发路径的第一路径标识和至少一对相同类别的元素,所述获取模块用于:The device according to claim 22, wherein the preset message feature includes a first path identifier of a forwarding path and at least one pair of elements of the same category, and the acquiring module is configured to:
    在管理器映射表中查找与所述预设报文特征存在映射关系的转发参数;And searching, in the manager mapping table, a forwarding parameter that has a mapping relationship with the preset packet feature;
    当在管理器映射表中查找到所述转发参数时,向所述分类器发送所述转发参数;Sending the forwarding parameter to the classifier when the forwarding parameter is found in a manager mapping table;
    当在管理器映射表中未查找到所述转发参数时,在路径标识映射表中查找与所述第一路径标识对应的第二路径标识,将所述第一路径标识替换为第二路径标识,并且将相同类别的元素互换位置,得到更新报文特征,在管理器映射表中查找与所述更新报文特征存在映射关系的转发参数;When the forwarding parameter is not found in the manager mapping table, the second path identifier corresponding to the first path identifier is searched in the path identifier mapping table, and the first path identifier is replaced with the second path identifier. And exchanging the elements of the same category to obtain an update message feature, and searching, in the manager mapping table, a forwarding parameter that has a mapping relationship with the update message feature;
    当在管理器映射表中未查找到与所述更新报文特征存在映射关系的转发参数时,根据所述预设报文特征计算转发参数,并且向所述分类器发送所述计算得到的转发参数。When the forwarding parameter that has a mapping relationship with the update packet feature is not found in the manager mapping table, the forwarding parameter is calculated according to the preset packet feature, and the calculated forwarding is sent to the classifier. parameter.
  24. 根据权利要求22至23任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 22 to 23, wherein the device further comprises:
    判断模块,用于当接收到业务功能转发器发送的映射关系时,判断所述管理器映射表中是否存在接收的所述映射关系;a determining module, configured to determine whether the received mapping relationship exists in the manager mapping table when receiving the mapping relationship sent by the service function forwarder;
    加入模块,用于当所述管理器映射表中不存在接收的所述映射关系时,将接收的所述映射关系加入所述管理器映射表中。 And adding a module, when the received mapping relationship does not exist in the manager mapping table, adding the received mapping relationship to the manager mapping table.
PCT/CN2017/089465 2016-08-24 2017-06-22 Packet forwarding method and device WO2018036254A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610716222.2 2016-08-24
CN201610716222.2A CN107786437B (en) 2016-08-24 2016-08-24 Message forwarding method and device

Publications (1)

Publication Number Publication Date
WO2018036254A1 true WO2018036254A1 (en) 2018-03-01

Family

ID=61246334

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/089465 WO2018036254A1 (en) 2016-08-24 2017-06-22 Packet forwarding method and device

Country Status (2)

Country Link
CN (2) CN112671641B (en)
WO (1) WO2018036254A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125080A (en) * 2021-09-29 2022-03-01 北京信息科技大学 Message link terminal protocol stack construction method and analysis method, device and terminal
CN114448892A (en) * 2022-02-10 2022-05-06 珠海星云智联科技有限公司 Software and hardware routing method and device

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636003A (en) * 2018-06-21 2019-12-31 中国电信股份有限公司 Message forwarding method, device, system and computer readable storage medium
CN111200559B (en) * 2018-11-19 2022-05-10 中国电信股份有限公司 Routing method and routing device
CN111628921B (en) * 2019-02-27 2021-07-20 华为技术有限公司 Message processing method, message forwarding device and message processing device
CN111726293B (en) 2019-03-18 2021-11-30 华为技术有限公司 Message transmission method and device
CN111147598B (en) * 2019-12-30 2023-04-25 杭州迪普科技股份有限公司 HTTP message processing method and device
CN113746749A (en) * 2020-05-29 2021-12-03 阿里巴巴集团控股有限公司 Network connection device
CN117527693A (en) * 2022-08-03 2024-02-06 华为技术有限公司 Message forwarding method, device, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014176740A1 (en) * 2013-04-28 2014-11-06 华为技术有限公司 Stream classifier, service routing trigger, and message processing method and system
WO2016011616A1 (en) * 2014-07-23 2016-01-28 华为技术有限公司 Service message forwarding method and apparatus
CN105681198A (en) * 2014-11-21 2016-06-15 华为技术有限公司 Business chain processing method, device and system
CN105743822A (en) * 2014-12-11 2016-07-06 华为技术有限公司 Method and apparatus for processing message

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1302645C (en) * 2003-05-26 2007-02-28 华为技术有限公司 Method for realizing average flow bearing by bound ports of network processor system
CN101286936B (en) * 2008-05-16 2010-10-27 成都市华为赛门铁克科技有限公司 Method and apparatus for data message processing
CN102368736B (en) * 2011-11-10 2014-12-10 华为技术有限公司 Message sending method and equipment
CN102710507B (en) * 2012-05-17 2015-05-13 杭州华三通信技术有限公司 Method and network equipment for achieving consistency of message forwarding paths
CN103534991B (en) * 2013-07-23 2018-10-09 华为技术有限公司 A kind of message forwarding method and equipment
CN103581018B (en) * 2013-07-26 2017-08-11 北京华为数字技术有限公司 File transmitting method, router and operation exchange device
CN103391219A (en) * 2013-08-09 2013-11-13 盛科网络(苏州)有限公司 Message analysis method and device based on conversation
US20150124622A1 (en) * 2013-11-01 2015-05-07 Movik Networks, Inc. Multi-Interface, Multi-Layer State-full Load Balancer For RAN-Analytics Deployments In Multi-Chassis, Cloud And Virtual Server Environments
CN103607357A (en) * 2013-11-19 2014-02-26 曙光信息产业(北京)有限公司 Message distribution method and message distribution device in system
CN105099919B (en) * 2014-05-15 2018-07-31 华为技术有限公司 Message processing method and device
EP3148149A4 (en) * 2014-06-17 2017-05-03 Huawei Technologies Co., Ltd. Service flow processing method, apparatus and device
US10003530B2 (en) * 2014-07-22 2018-06-19 Futurewei Technologies, Inc. Service chain header and metadata transport
CN104168201B (en) * 2014-08-06 2017-11-24 福建星网锐捷网络有限公司 A kind of method and device of multipath forwarding
CN104283806B (en) * 2014-10-31 2018-01-12 新华三技术有限公司 Business chain processing method and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014176740A1 (en) * 2013-04-28 2014-11-06 华为技术有限公司 Stream classifier, service routing trigger, and message processing method and system
WO2016011616A1 (en) * 2014-07-23 2016-01-28 华为技术有限公司 Service message forwarding method and apparatus
CN105681198A (en) * 2014-11-21 2016-06-15 华为技术有限公司 Business chain processing method, device and system
CN105743822A (en) * 2014-12-11 2016-07-06 华为技术有限公司 Method and apparatus for processing message

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125080A (en) * 2021-09-29 2022-03-01 北京信息科技大学 Message link terminal protocol stack construction method and analysis method, device and terminal
CN114448892A (en) * 2022-02-10 2022-05-06 珠海星云智联科技有限公司 Software and hardware routing method and device

Also Published As

Publication number Publication date
CN107786437B (en) 2020-12-15
CN107786437A (en) 2018-03-09
CN112671641A (en) 2021-04-16
CN112671641B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
WO2018036254A1 (en) Packet forwarding method and device
JP7520170B2 (en) Packet processing method and apparatus, device and system
US10148573B2 (en) Packet processing method, node, and system
WO2017137004A1 (en) Method and apparatus for service function forwarding in a service domain
US20160080253A1 (en) Service routing system, device, and method
CN107078963B (en) Route tracing in virtual extensible local area networks
US10461958B2 (en) Packet transmission method and apparatus
CN107046506B (en) Message processing method, flow classifier and service function example
CN110535768B (en) Multicast data transmission method and related equipment
CN104660508A (en) Message forwarding method and device
CN112491701B (en) Message forwarding method and device
US11632322B2 (en) Preferred path route graphs in a network
CN109714274B (en) Method for acquiring corresponding relation and routing equipment
WO2017198131A1 (en) Method and system for redirecting data stream, and network device and control device
US9455903B2 (en) Recording packet routes using bloom filters
WO2016197689A1 (en) Method, apparatus and system for processing packet
WO2015151184A1 (en) Communication system, communication method, relay device, and communication program
WO2016029345A1 (en) Network flow information statistics method and apparatus
CN113923161A (en) Message forwarding method and device
JP5725236B2 (en) Communication system, node, packet transfer method and program
KR102455886B1 (en) Service Feature Chaining Congestion Feedback
JP2016508682A (en) Method and arrangement for differentiating VPN traffic across domains by QOS
CN105812257A (en) Business chain router management system and use method thereof
CN110022263B (en) Data transmission method and related device
WO2015039616A1 (en) Method and device for packet processing

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

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

Country of ref document: EP

Kind code of ref document: A1