CN108574647B - Switch and classifier and related methods - Google Patents

Switch and classifier and related methods Download PDF

Info

Publication number
CN108574647B
CN108574647B CN201710146685.4A CN201710146685A CN108574647B CN 108574647 B CN108574647 B CN 108574647B CN 201710146685 A CN201710146685 A CN 201710146685A CN 108574647 B CN108574647 B CN 108574647B
Authority
CN
China
Prior art keywords
integer
integers
packet
ordered
switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710146685.4A
Other languages
Chinese (zh)
Other versions
CN108574647A (en
Inventor
赵明宇
胡志远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nokia Shanghai Bell Co Ltd
Original Assignee
Nokia Shanghai Bell Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nokia Shanghai Bell Co Ltd filed Critical Nokia Shanghai Bell Co Ltd
Priority to CN201710146685.4A priority Critical patent/CN108574647B/en
Publication of CN108574647A publication Critical patent/CN108574647A/en
Application granted granted Critical
Publication of CN108574647B publication Critical patent/CN108574647B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules
    • H04L49/1507Distribute and route fabrics, e.g. sorting-routing or Batcher-Banyan
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3072Packet splitting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Landscapes

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

Abstract

The present disclosure presents a switch and classifier and related methods. The following method may be performed at a switch. In response to receiving the packet, the switch determines a first integer and a second integer indicated in the packet, where the first integer corresponds to a number of ports through which the packet will pass. In response to the first integer being greater than the predetermined value, the switch selects a third integer from the predetermined ordered set of integers based on the first integer. The switch selects a port number from a predetermined ordered set of port numbers based on a remainder of the division of the second integer by the third integer. After decrementing the first integer, the switch sends a packet to the port corresponding to the selected port number, the packet indicating the decremented first and second integers.

Description

Switch and classifier and related methods
Technical Field
The present disclosure relates generally to the field of communications and computers, and more particularly, to a switch, a classifier, and related methods.
Background
Internet Engineering Task Force (IETF) RFC 7665 defines a Service Function Chain (SFC) as an ordered set of abstract service functions and orders constraints to be applied to packets, frames, flows, selected as a result of classification. In future network architectures based on Network Function Virtualization (NFV) and Software Defined Networking (SDN), SFCs need to be implemented dynamically and feasibly in order to meet service diversity requirements. The switches should invoke these functions as needed and the traffic should have different forwarding paths according to the corresponding network service policies.
In a typical SDN architecture, OpenFlow is a key enabler and the most popular southbound interface protocol to date. The OpenFlow protocol typically uses a single or multiple flow tables and actions associated with each flow entry to tell the switch how to handle the flow. However, implementing SFC using OpenFlow is inefficient. Because a single flow table is used, the integer number of flow entries in the flow table will increase significantly as the traffic chain increases. This will cause the switch to look up a larger flow table to process incoming packets and also make it more difficult to update the forwarding path of the traffic chain.
The achievable performance of looking up a single flow table in a switch may in many cases be insufficient, especially for virtualized switches. As the traffic chain increases, it will cause delays for look-up and matching of flow tables in the switch to dense flow tables. In other conventional schemes, multiple flow tables are used to improve the efficiency of the SFC. However, this approach increases algorithm complexity.
Disclosure of Invention
Embodiments of the present disclosure provide a switch, a classifier, and related methods.
According to a first aspect of the disclosure, a method performed at a switch is provided. The method comprises the following steps: in response to receiving a packet, determining a first integer and a second integer indicated in the packet, wherein the first integer corresponds to a number of ports through which the packet will pass; in response to the first integer being greater than the predetermined value, selecting a third integer from the predetermined ordered set of integers based on the first integer; selecting a port number from a predetermined ordered set of port numbers based on a remainder of the division of the second integer by the third integer; decrementing the first integer; and transmitting a packet to a port corresponding to the selected port number, the packet indicating the decremented first integer and second integer.
In some embodiments, the size of the ordered set of integers may be the same as the size of the ordered set of port numbers, the integers in the ordered set of integers may be relatively prime integers, and the smallest integer in the ordered set of integers may be greater than the largest port number in the ordered set of port numbers.
In some embodiments, the second integer may be determined based on the first integer, the ordered set of integers, and the ordered set of port numbers.
In some embodiments, determining the first and second integers indicated in the packet may include: the first integer and the second integer are determined in a header of the packet.
In some embodiments, selecting the third integer from the predetermined ordered set of integers based on the first integer may include: determining ordered integer subsets of the ordered set of integers such that the ordered integer subsets are a first integer in size; and selecting an integer having a rank corresponding to the first integer as the third integer in the ordered subset of integers.
In some embodiments, selecting a port number from the predetermined ordered set of port numbers may comprise: determining an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is a first integer; and selecting a port number in the ordered subset of port numbers whose sequence number corresponds to the remainder.
In some embodiments, the method may further comprise: in response to the first integer being equal to the predetermined value, the packet is transmitted to a predetermined port coupled to the classifier.
According to a second aspect of the present disclosure, a method performed at a classifier is provided. The method comprises the following steps: in response to receiving the packet, determining routing information for the packet, the routing information indicating one or more ports of the switch through which the packet will pass in sequence; determining a first integer and a second integer based on the routing information, a predetermined ordered set of integers, and a predetermined ordered set of port numbers, wherein the first integer corresponds to a number of ports through which the packet will pass; indicating the first integer and the second integer in the packet; and sending the packet to the switch.
In some embodiments, the size of the ordered set of integers may be the same as the size of the ordered set of port numbers, the integers in the ordered set of integers may be relatively prime integers, and the smallest integer in the ordered set of integers may be greater than the largest port number in the ordered set of port numbers.
In some embodiments, determining the second integer may include: determining an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is a first integer; determining ordered integer subsets of the ordered set of integers such that the ordered integer subsets are a first integer in size; determining a first intermediate set of ordered integers, each element of which is a quotient of the product of all elements of the ordered subset of integers divided by the corresponding element of the ordered subset of integers; determining a second intermediate ordered integer set, each element of which is a multiplicative inverse of a corresponding element of the first intermediate ordered integer set modulo a corresponding element of the ordered integer subset; determining a sum of products of all corresponding elements of the ordered subset of port numbers, the first intermediate ordered set of integers, and the second intermediate ordered set of integers; and determining a remainder of the sum divided by a product of all elements of the ordered subset of integers as a second integer.
In some embodiments, indicating the first integer and the second integer in the packet may include: the first integer and the second integer are indicated in a header of the packet.
In some embodiments, the method may further comprise: a packet is received from the switch that has passed through one or more ports.
In some embodiments, the method may further comprise: in response to receiving a packet from the switch that has passed through one or more ports, the header of the packet is removed and the packet is sent to the internet.
According to a third aspect of the present disclosure, a switch is provided. The switch includes at least one processor, and at least one memory including computer-readable instructions. The at least one memory and the computer readable instructions are configured to, with the processor, cause the switch to: in response to receiving a packet, determining a first integer and a second integer indicated in the packet, wherein the first integer corresponds to a number of ports through which the packet will pass; in response to the first integer being greater than the predetermined value, selecting a third integer from the predetermined ordered set of integers based on the first integer; selecting a port number from a predetermined ordered set of port numbers based on a remainder of the division of the second integer by the third integer; decrementing the first integer; and transmitting a packet to a port corresponding to the selected port number, the packet indicating the decremented first integer and second integer.
According to a fourth aspect of the present disclosure, a classifier is provided. The classifier includes at least one processor, and at least one memory including computer-readable instructions. The at least one memory and the computer readable instructions are configured to, with the processor, cause the classifier to: in response to receiving the packet, determining routing information for the packet, the routing information indicating one or more ports of the switch through which the packet will pass in sequence; determining a first integer and a second integer based on the routing information, a predetermined ordered set of integers, and a predetermined ordered set of port numbers, wherein the first integer corresponds to a number of ports through which the packet will pass; indicating the first integer and the second integer in the packet; and sending the packet to the switch.
Drawings
The above and other objects, features and advantages of the embodiments of the present disclosure will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
fig. 1 schematically illustrates an exemplary scenario in which embodiments of the present disclosure may be implemented.
Fig. 2 schematically shows a flow diagram of a method performed at a switch according to an embodiment of the present disclosure.
Fig. 3 schematically shows a diagram of a packet header including a first integer and a second integer, according to an embodiment of the present disclosure.
Fig. 4 schematically shows a flow diagram of a method performed at a classifier according to an embodiment of the present disclosure.
Fig. 5 schematically shows a flow diagram of a packet process according to an embodiment of the present disclosure.
Fig. 6 schematically shows a block diagram of an apparatus according to an embodiment of the present disclosure.
Fig. 7 schematically shows a block diagram of an apparatus according to an embodiment of the present disclosure.
Fig. 8 schematically illustrates a block diagram of a device suitable for implementing embodiments of the present disclosure.
Throughout the drawings, the same or similar reference numbers are used to refer to the same or similar elements.
Detailed Description
The principles and spirit of the present disclosure will be described with reference to a number of exemplary embodiments shown in the drawings. It is understood that these specific embodiments are described merely to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way.
In describing embodiments of the present disclosure, the terms "include" and its derivatives should be interpreted as being inclusive, i.e., "including but not limited to. The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first," "second," and the like may refer to different or the same object. Other explicit and implicit definitions are also possible below.
The term "terminal equipment" or "user equipment" (UE) as used herein refers to any terminal equipment capable of wireless communication with a base station or with each other. As an example, the terminal device may include a Mobile Terminal (MT), a Subscriber Station (SS), a Portable Subscriber Station (PSS), a Mobile Station (MS), or an Access Terminal (AT), and the above-described devices in a vehicle. The terminal device may be any type of mobile terminal, fixed terminal, or portable terminal including a mobile handset, station, unit, device, multimedia computer, multimedia tablet, internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, Personal Communication System (PCS) device, personal navigation device, Personal Digital Assistant (PDA), audio/video player, digital camera/camcorder, positioning device, television receiver, radio broadcast receiver, electronic book device, game device, smart meter, or other smart appliance that may be used for MTC communication, or any combination of the above. In the context of the present disclosure, the terms "terminal device" and "user equipment" may be used interchangeably for purposes of discussion convenience.
The term "network device" as used herein refers to a base station or other entity or node having a particular function in a communication network. A "base station" (BS) may represent a node B (NodeB or NB), an evolved node B (eNodeB or eNB), a Remote Radio Unit (RRU), a Radio Head (RH), a Remote Radio Head (RRH), a relay, or a low power node such as a pico base station, a femto base station, or the like. The coverage area of a base station, i.e. the geographical area where it is able to provide service, is called a cell. In the context of the present disclosure, the terms "network device" and "base station" may be used interchangeably for purposes of discussion convenience, and may primarily be referred to as an eNB as an example of a network device.
Fig. 1 schematically illustrates an exemplary scenario 100 in which embodiments of the present disclosure may be implemented. As shown in fig. 1, a typical scenario 100 (e.g., service function chain SFC based on network function virtualization, NFV, and software defined networking, SDN) may include a classifier 110, a switch 120, and a plurality of different service function units 130 and 132.
In general, classifier 110 may receive and enforce routing rules and/or predefined service policies with respect to incoming packets from a control plane (not shown). Note that although packets are used as an example of data handled by a switch in the present disclosure, embodiments of the present disclosure are not limited thereto, but may be equally applicable to other forms of data, such as frames, datagrams, messages, packets, traffic flows, and the like.
When a packet enters the classifier 110 from the subscriber network 105, the classifier 110 may classify the packet according to routing rules and/or predefined service policies and perform the necessary processing on the packet, such as assigning an identifier to the packet, etc.
Classifier 110 may send the processed packet to switch 120 through port 0 of switch 120. As shown, in addition to port 0, the switch 120 may be connected to a plurality of different service functions 130 and 132, respectively, through a plurality of ports 1-3. Although three different service functions 130 and 132 are shown by way of example in fig. 1, it will be understood by those skilled in the art that the switch 120 may be connected to more or fewer service functions or other functions, which may be connected to the switch 120 through respective ports.
Switch 120 may route the packets in sequence through respective ones of ports 1-3 to one or more of traffic functions 130 and 132 based on the classification and/or processing of the packets by classifier 110. For example, classifier 110 may indicate to switch 120 that the packet needs to be processed through traffic functions 130, 131, and 132 in sequence through the processing of the packet.
In this case, the switch 120 may first send the packet to the service function 130 through port 1, which may send the processed packet back to the switch 120 after it completes processing the packet. The switch 120 may continue to send packets to the service function 131 through port 2, which completes processing of the packet and also sends the packet back to the switch 120. In addition, switch 120 sends the packet to service function 132 through port 3 for corresponding processing, and then sends the packet back to switch 120.
Because the switch 120 can now determine that the packet has completed all of the traffic function processing 130 and 132 that it needs to do, the switch 120 can send the packet back to the classifier 110. In addition, the classifier 110 may transmit the packet to the internet 115 after completing necessary processing of the packet.
As can be seen from the above description, the classifier 110 needs to somehow enable the switch 120 to determine that a packet needs to pass through one or more of its ports (e.g., ports 1-3) in turn. In conventional approaches, switch 120 typically queries a single flow table based on the information classifier 110 adds in the packet to determine to which ports the packet needs to be sent. However, as discussed before, in a technical scenario such as service function chain SFC, the integer number of flow entries in a single flow table will increase significantly with increasing service chain. This would require the switch 120 to look up a larger flow table to process incoming packets and also make the forwarding path of the traffic chain difficult to update.
In another conventional scheme, a scheme of modifying the flow table construction is proposed for implementing a service function chain SFC having a plurality of flow tables. In this scheme, a flow entry is inserted into a corresponding flow table, and the flow table is classified by an input port of the switch 120. In addition, the packets of the respective traffic flows may be classified and managed by a plurality of flow tables. By doing so, the switch 120 looks up the corresponding flow table to process the packet or update the path of the traffic chain.
In this conventional scheme, when a packet enters the classifier 110, the packet is classified and assigned a unique virtual local area network identification (vlan id) according to a predefined service policy. Thereafter, in response to a packet entering the switch 120, the switch 120 first classifies the packet in a first-level table according to its input port. In addition, the switch 120 forwards the packet to one of the output ports 1-3 connected to the traffic function 130 and 132 by looking up the VLAN ID of the packet in a plurality of second level tables.
It follows that this conventional scheme introduces input ports and VLAN ID tags to address the inefficiency of SFC implementation with multiple flow tables. However, it involves algorithmic complexity to map and maintain multiple flow tables, VLAN IDs, and port numbers. Also, the multiple flow tables in this solution add flow table matching latency for the switch, especially for networks with dense flow tables as traffic chains increase.
In view of this, the embodiments of the present disclosure propose a forwarding method based on a Remainder Number System (RNS) to improve the implementation of the service function chain SFC, wherein the remainder Number System is a theorem for creating labels based on two arrays. The solution of the embodiments of the present disclosure is simple, low-latency and efficient.
Specifically, the classifier 110 and the switch 120 may know a predetermined ordered set (or array) of integers and a predetermined ordered set of port numbers together in advance. The ordered integer sets may include identifications respectively corresponding to all the service functional units, where the identification sets may be dynamically assignable ordered integer sets. The ordered set of port numbers may include the port numbers of the expected output ports of switch 120 for the traffic functional units connected by a given routing path.
In response to receiving an incoming packet, the classifier 110 may determine which port or ports of the switch 120 the packet needs to pass through in order. Based on this information, in conjunction with the predetermined ordered set of integers and the predetermined ordered set of port numbers, classifier 110 may determine two integers, a first integer and a second integer, for the packet using a correlation algorithm of the "remainder system". They are interchangeably referred to herein as "traffic index" and "RNS path id (rid)", respectively. After determining the first integer and the second integer, the classifier 110 indicates the first integer and the second integer in the packet and transmits the packet to the switch 120.
The switch 120 may learn the first integer and the second integer from the packet after receiving the packet. Since the first integer and the second integer are determined according to the "remainder system" algorithm based on the port number information, the predetermined ordered set of integers, and the predetermined ordered set of port numbers that the packet needs to pass through the switch 120 in order, the switch 120 can restore the port number information that the packet needs to pass through the switch 120 in order according to a specific algorithm, particularly a remainder algorithm, using the first integer and the second integer, and the predetermined ordered set of integers and the predetermined ordered set of port numbers.
In order to make improvements on the conventional scheme to implement the solution of the present disclosure, various units or components in the conventional scheme may be modified as follows. First, the service function chain SFC control plane may be run as an application of a software defined networking SDN controller for managing the service function chain SFC and the operational remainder system. Furthermore, the OpenFlow protocol, the classifier 110 and the switch 120 may be modified to meet the requirements of the solution of the present disclosure. In particular, the OpenFlow protocol may enable the classifier 110 to add and remove the first integer SI and the second integer RID to the packet. Additionally, the switch 120 may be modified such that a predetermined ordered set of integers may be utilized to determine the output port number.
In contrast to conventional solutions, the solution of embodiments of the present disclosure requires only one of the output port numbers 1-3 to be defined in the switch 120 for each traffic function 130-132 to be connected. For each packet, the switch 120 obtains one of the output port numbers 1-3 by a remainder algorithm, which requires only a simple remainder operation using the integer in the incoming packet calculated according to the predetermined algorithm rule and the corresponding integer in the ordered set of integers.
The solution of embodiments of the present disclosure is simple and efficient, there is no large flow table that needs to be looked up or maintained, and VLAN ID mapping is not required at a time. Therefore, the flow table matching delay of the switch 120 can be reduced. One or more embodiments of the present disclosure are described in detail below in conjunction with fig. 2-5.
Fig. 2 schematically shows a flow diagram of a method 200 performed at a switch according to an embodiment of the present disclosure. In some embodiments, the method 200 may be performed by the switch 120 itself depicted in fig. 1. By way of example, the method 200 will be explained below, still with reference to the scenario depicted in fig. 1. However, those skilled in the art will appreciate that the method 200 may be applied to a variety of other similar application scenarios.
As shown in fig. 2, at block 205, the switch 120, in response to receiving the packet, determines a first integer and a second integer indicated in the packet, where the first integer corresponds to a number of ports through which the packet will pass. As described above, the first and second integers are indicated in the packet by a component preceding the switch 120 (e.g., the classifier 110) with the purpose that the switch 120 can use the first and second integers in combination with the predetermined ordered set of integers and the predetermined ordered set of port numbers according to a particular algorithm to determine which port or ports of the switch 120 the packet needs to pass through in turn.
The first integer may correspond to the number of ports through which the packet will pass. For example, if the switch 120 determines that the first integer indicated in the packet is 3, the switch 120 may determine that the packet is going to pass through a total of three ports, such as in the particular scenario shown in fig. 1, processing through all three service function units 130 and 132 is required. If the switch 120 determines that the first integer indicated in the packet is 2, the switch 120 may determine that the packet is going to pass through a total of two ports, and so on. In other embodiments, the first integer may also be a value having a corresponding relationship with the number of ports to be passed through, such as an integer multiple, and so on. In general, the first integer allows the switch 120 to determine the number of ports through which the packet will pass.
In some embodiments, switch 120 may determine the first integer and the second integer in a header of the packet. In these embodiments, the previous component of switch 120 (e.g., classifier 110) adds the first integer and the second integer to the packet as packet headers. Fig. 3 schematically shows a diagram of a packet header 300 including a first integer 310 and a second integer 320, according to an embodiment of the disclosure. In some embodiments, the remainder system RNS packet header structure of embodiments of the present disclosure may be the same as the network traffic header (NSH) in the legacy protocol, so the network traffic header (NSH) in the legacy protocol may be used for the remainder system RNS packet header of embodiments of the present disclosure.
Furthermore, the OpenFlow protocol may be modified to support the remainder system RNS packet header structure of embodiments of the present disclosure. The "modify-field" action in OpenFlow version 1.0 (which is renamed to "set-field" after version 1.0 of the OpenFlow protocol) may be used to add and remove the first integer SI and the second integer RID to the packet in the classifier 110. In some embodiments, as a proof of concept, a VLAN tag supported by the OpenFlow protocol may be used to implement this function.
As shown in fig. 3, a header 300 of a packet according to an embodiment of the present disclosure may include two portions 310 and 320. In some embodiments, bits in portion 310 are used to indicate a first integer and bits in portion 320 are used to indicate a second integer. For example, packet header 300 may include 32 bits numbered 0-31, where portion 320 may include 24 bits numbered 0-23, and portion 310 may include 8 bits numbered 23-31. In such an embodiment, a greater number of bits is used to indicate the second integer. This is because in the usual case, the value of the second integer is greater than the value of the first integer.
Further, it should be understood that the first and second integers may also be indicated in other portions of the packet, such as in the trailer of the packet or other fields of the packet. Embodiments of the present disclosure are not limited in this respect.
In some embodiments, the second integer indicated in the packet may be determined based on the first integer, the predetermined ordered set of integers, and the predetermined ordered set of port numbers. As mentioned above, the predetermined ordered set of integers and the predetermined ordered set of port numbers are known in advance in common to the classifier 110 and the switch 120. Since the first and second integers have been determined in advance and are directly available from the packet during execution of the method 200, how the second integer is determined will not be described in detail herein. The determination method of the second integer will be described in detail later with reference to fig. 4.
Further, in some embodiments, the size of the predetermined ordered set of integers may be the same as the size of the predetermined ordered set of port numbers, the integers in the predetermined ordered set of integers may be relatively prime integers, and the smallest integer in the predetermined ordered set of integers may be greater than the largest port number in the predetermined ordered set of port numbers. The predetermined ordered set of integers, the predetermined ordered set of port numbers, the first integer and the second integer are described below by way of a specific example.
For example, in the particular scenario depicted in FIG. 1, there is one classifier 110, three business function units 130 and 132 connected to one switch 120. In this example, switch 120 has four output ports, so it can be assumed that the predetermined ordered set of port numbers is (0, 1, 2, 3) and the predetermined ordered set of integers can be (5, 4, 7, 9).
It will be noted that the size of the predetermined ordered set of integers (5, 4, 7, 9) is the same as the size of the predetermined ordered set of port numbers (0, 1, 2, 3), both being 4. The integers of (5, 4, 7, 9) in the predetermined ordered set of integers are relatively prime integers. Further, a smallest integer (e.g., 4) in the predetermined ordered set of integers is greater than a largest port number (e.g., 3) in the predetermined ordered set of port numbers. However, if all ports 0-3 in switch 120 are arbitrarily usable and the predetermined ordered set of integers is constant for all traffic function requirements in switch 120, the rule should extend that all integers in the predetermined ordered set of integers are greater than the maximum port number of switch 120.
In this particular example, the first integer may be 3 and the second integer may be 66 for a packet that will pass through ports 1-3 of switch 120 in order. As mentioned hereinbefore, since the first integer 3 and the second integer 66 have been determined in advance and are directly available from the packet for the switch 120, how the second integer is determined will not be described in detail here. The detailed calculation method for the second integer will be described in detail later with reference to fig. 4.
Referring back to fig. 2, it should be noted that at block 205, the switch 120 may receive a packet from the classifier 110, as well as from one of the traffic functions 130 and 132. The switch 120 may process packets received from both in the same manner. In other embodiments, switch 120 may also receive packets from other units or components not shown in fig. 1. Embodiments of the present disclosure are not limited in this respect.
At block 210, in response to the first integer being greater than the predetermined value, the switch 120 selects a third integer from the predetermined ordered set of integers based on the first integer. For example, in some embodiments, the switch 120 may determine an ordered subset of the ordered set of integers such that the size of the ordered subset of integers is a first integer, and select an integer having a sequence number corresponding to the first integer in the ordered subset of integers as the third integer.
At this block 210, since the first integer corresponds to the number of ports through which the packet will pass, a first integer greater than a predetermined value (e.g., zero) may indicate that the packet has not passed through all of the ports that need to be passed through. Thus, the switch 120 may continue to follow the operations of method 200 to determine to which port the packet needs to be sent at that time. Conversely, in response to the first integer being equal to a predetermined value (e.g., zero), the switch 120 can determine that the packet has passed through all ports it needs to pass through at this time. Accordingly, the switch 120 may not perform the subsequent operations in the method 200, but directly transmit the packet to the predetermined port 0 coupled to the classifier 110, and then the classifier 110 transmits the packet to the internet 115.
With regard to the specific process of selecting the third integer from the predetermined ordered set of integers based on the first integer, the above specific example is still used for illustration. Since the switch 120 knows from the packet that the first integer is 3, the switch 120 also knows in advance that the predetermined ordered set of integers is (5, 4, 7, 9). Thus, the switch 120 may determine the ordered subset of integers (5, 4, 7) of the ordered set of integers (5, 4, 7, 9) based on the first integer 3 such that the size of the ordered subset of integers (5, 4, 7) is the first integer 3. Further, the switch 120 selects, as the third integer, an integer (i.e., 5) having a sequence number corresponding to the first integer 3 from the ordered subset of integers (5, 4, 7). It should be understood that the manner in which the third integer is determined is merely an example, and in other embodiments, the third integer may be derived in a variety of different manners.
At block 215, the switch 120 selects a port number from the predetermined ordered set of port numbers based on the remainder of the division of the second integer by the third integer. For example, the switch 120 may determine an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is a first integer, and select a port number in the ordered subset of port numbers that the sequence number corresponds to the remainder.
As an embodiment, the switch 120 may implement this function as an Open Virtual Switch (OVS). The open virtual switch may be developed such that the output port number is determined using the second integer RID in combination with the predetermined ordered set of integers. In such an embodiment, a function called the OFPAT _ RID _ Action may be created in the switch 120 to perform this determination. Accordingly, in the traffic function chain SFC control plane, an OpenFlow control message OFPT _ RID _ MOD may be created and used to instruct this function.
As an example of the operation of block 215, the above specific example is still used for illustration. Since the switch 120 knows from the packet that the first integer is 3, the switch 120 also knows in advance the predetermined ordered set of port numbers (0, 1, 2, 3). Thus, the switch 120 may determine the ordered subset of port numbers (1, 2, 3) of the ordered set of port numbers (0, 1, 2, 3) based on the first integer 3 such that the size of the ordered subset of port numbers (1, 2, 3) is the first integer 3.
Since switch 120 determines the second integer from the packet to be 66 and selects integer 5 as the third integer at block 210, switch 120 may determine that the remainder of 66 divided by 5 is 1. In this case, the switch 120 may select port number 1, whose sequence number corresponds to the remainder 1, from the ordered subset of port numbers (1, 2, 3).
At block 220, the switch 120 decrements the first integer. For example, after determining that port number is 1, switch 120 will send the packet to port 1, and after traffic function 130 coupled to port 1 processes the packet, traffic function 130 will send the packet back to switch 120.
Thus, before sending the packet to port 1, the switch 120 decrements the first integer so that when the packet is processed by the service function unit 130 and returned to the switch, the first integer is no longer the previous value of 3, but the decremented value is 2. Otherwise, the switch 120 will still derive the need to send the packet to port 1, rather than the next port to which it needs to be sent. The switch 120 may be caused to sequentially transmit packets to a predetermined plurality of ports by decrementing the first integer each time a packet is transmitted to a port until the first integer is decremented to a predetermined value, such as to zero.
It will be appreciated by those skilled in the art that decrementing the second integer by 1 at a time is merely an example. In other embodiments, the second integer may also be decremented by other predefined values other than 1 at a time, and embodiments of the present disclosure are not limited in this respect.
At block 225, the switch 120 sends a packet to the port corresponding to the selected port number, the packet indicating the decremented first integer and second integer. For example, in the case of the above specific example, the switch 120 sends a packet with the decremented first integer 2 and second integer 66 to the port corresponding to port number 1 selected at block 215. Thus, the switch 120 can iteratively determine, for a packet, the port to which the packet next needs to be sent until the second integer is decremented to a predetermined value (e.g., zero).
Fig. 4 schematically illustrates a flow diagram of a method 400 performed at the classifier 110 according to an embodiment of the present disclosure. In some embodiments, the method 400 may be performed by the classifier 110 itself depicted in fig. 1. By way of example, the method 400 will be explained below, still with reference to the scenario depicted in fig. 1. However, those skilled in the art will appreciate that the method 400 may also be applied to a variety of other similar application scenarios.
As shown in fig. 4, classifier 110 determines routing information for the packet in response to receiving the packet at block 405. Here, the routing information indicates at least one or more ports of the switch 120 through which the packet will pass in sequence. For example, in the particular scenario depicted in fig. 1, classifier 110 may determine which port or ports 1-3 of switch 120 the packet needs to pass through in order. It should be understood that various other forms of routing information are possible, as long as the information can determine the port through which a packet needs to pass, and embodiments of the present disclosure are not limited to the specific examples listed.
With respect to receiving a packet, classifier 110 may receive routing information for the packet from other components (e.g., the control plane). In such an embodiment, the classifier 110 may receive and implement routing rules from the service function chain SFC control plane, which is also the basic function of the classifier 11 defined in the conventional protocol. For example, the service function chain SFC control plane may indicate to the classifier 110 the initial value of the first integer SI and a predetermined ordered set of integers to be provided in the context of a given service function chain. After completing the service function chain SFC, the classifier 110 may remove the first integer SI and the second integer RID from the packet before forwarding the packet to the internet 115.
Accordingly, the service function chain SFC control plane serves as an application (app) of the software defined networking SDN controller, which may have the following two main functions. First, the control plane may manage and control the traffic function SFC, e.g., define routing paths for the traffic function SFC, insert traffic function SFC policies into the classifier 110 and/or the switch 120, etc. Second, the control plane may also operate the remainder system RNS to determine the second integer RID. Alternatively or additionally, in other embodiments, these operations of the control plane may also be performed by the classifier 110 itself, e.g., to determine routing information for the packet.
At block 410, the classifier 110 determines a first integer and a second integer based on the routing information, the predetermined ordered set of integers, and the predetermined ordered set of port numbers, where the first integer corresponds to the number of ports through which the packet will pass. As discussed above, the first and second integers are indicated in the packet by, for example, classifier 110, with the purpose that switch 120 can use the first and second integers in conjunction with a predetermined ordered set of integers and an ordered set of port numbers in accordance with a particular algorithm to determine which ports of switch 120 the packet needs to pass through in turn.
The first integer may correspond to the number of ports through which the packet will pass. For example, if the classifier 110 determines through the routing information that the packet is to be transmitted to three ports, the classifier 110 may determine that the first integer is 3. If classifier 110 determines through the routing information that the packet is to be sent to both ports, classifier 110 may determine that the first integer is 2, and so on.
Further, as mentioned above, in some embodiments, the size of the predetermined ordered set of integers may be the same as the size of the predetermined ordered set of port numbers, the integers in the predetermined ordered set of integers may be relatively prime integers, and the smallest integer in the predetermined ordered set of integers may be greater than the largest port number in the predetermined ordered set of port numbers. The predetermined ordered set of integers, the predetermined ordered set of port numbers, the first integer and the second integer are described below by way of a specific example.
For example, in the particular scenario depicted in fig. 1, the predetermined ordered set of port numbers may be (0, 1, 2, 3) and the predetermined ordered set of integers may be (5, 4, 7, 9). Further, in the case where a packet needs to pass through three ports, it can be assumed that the first integer is 3. How the second integer is determined is explained below with reference to a specific example.
In some embodiments, in determining the second integer. The classifier 110 may first determine an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is a first integer.
For example, in the specific example above, the predetermined ordered set of integers is (m)1,m2,m3,m4) (5, 4, 7, 9) and the ordered set of predetermined port numbers is (x)0,x1,x2,x3) (0, 1, 2, 3). Further, referring to fig. 1, it is assumed that there are three different packets, each having different routing information. The routing information of the first packet is that it should be forwarded through all three service functional units 130 and 132 according to the policy, so the first integer of the first packet may be determined to be 3. The routing information of the second packet is that it should be forwarded through the two service function units 130 and 131 according to the policy, so the first integer of the second packet can be determined to be 2. The routing information of the third packet is that it should be forwarded through only one service functional unit 130 according to the policy, so the first integer of the third packet may be determined to be 1.
Thus, classifier 110 may determine that, for the first packet, there may be (x) in the ordered subset of port numbers1,x2,x3) (1, 2, 3), which is the first integer 3 of the first packet. For the second packet, the ordered subset of port numbers may be (x)1,x2) Which is (1, 2) the first integer 2 of the second packet. For the third packet, the ordered subset of port numbers may be (x)1) The size of (1) is the first integer 1 of the third packet.
In addition, the sorter 110 may determine the ordered subset of integers of the ordered set of integers such that the ordered integers areThe size of the subset is a first integer. Thus, the classifier 110 may determine that, for the first grouping, the ordered subset of integers may be (m)1,m2,m3) (5, 4, 7), which is the first integer 3 of the first packet. For the second grouping, the ordered subset of integers may be (m)1,m2) (5, 4) which is the first integer 2 of the second packet. For the third grouping, the ordered subset of integers may be (m)1) And (5), the size of which is the first integer 1 of the third packet.
In addition, the classifier 110 may determine a first intermediate set of ordered integers, each element of which is a quotient of a product of all elements of the ordered subset of integers divided by a corresponding element of the ordered subset of integers. For example, the first intermediate ordered set of integers may be labeled as MiWherein M isi=M/miAnd M is the product of the numbers in the ordered subset of integers. Here, M is 5, 4, 7 is 140.
So, for the first grouping, the first intermediate ordered set of integers (M)1,M2,M3) (28, 35, 20). Similarly, the first intermediate ordered set of integers may be (M) for the second and third packets, respectively1,M2) (4, 5) and M1=1。
Further, the classifier 110 may determine a second intermediate ordered integer set, each element of which is a multiplicative inverse of when a corresponding element of the first intermediate ordered integer set is modulo a corresponding element of the ordered integer subset. For example, the second intermediate ordered set of integers may be labeled LiWherein L isi=<Mi -1>miI.e. represent MiAbout the mode miIs the inverse of the multiplication of (c). In other words, MiAnd miIs relatively prime, and LiIs to satisfy the formula<Li*Mi>miA suitable integer of 1.
For example, for the first packet, L1=<M1 -1>m1=<28-1>5=2、L2=<35-1>4=3、L3=<20-1>76. Similarly, for the second packet, L1=<M1 -1>m1=<4-1>5=4、L2=<5-1>41. For the third packet, L1=<M1 -1>m1=<1-1>5=1。
Further, the classifier 110 may determine a sum of products of all corresponding elements of the ordered subset of port numbers, the first intermediate ordered set of integers, and the second intermediate ordered set of integers. Finally, the classifier 110 may determine the remainder of the sum divided by the product of all elements of the ordered subset of integers as the second integer. In other words, the classifier 110 may pass<Li*Mi*mi>MTo calculate a second integer.
For example, for the first packet, the second integer X1=<L1*M1*x1+L2*M2*x2+L3*M3*x3>M=<56+210+360>14066. Similarly, X may be calculated for the second and third packets, respectively2=<L1*M1*x1+L2*M2*x2>M=<16+10>206, and X3=<L1*M1*x1>M=<2>5=2。
At block 415, the classifier 110 indicates the first integer and the second integer in the packet. In some embodiments, the classifier 110 may indicate the first and second integers in a header of the packet, such as the embodiment depicted above with reference to fig. 3. Further, it should be understood that the classifier 110 may also indicate the first integer and the second integer in other portions of the packet, such as in the tail of the packet or other fields of the packet. Embodiments of the present disclosure are not limited in this respect.
At block 420, the classifier 110 sends the packet to the switch 120. The switch 120, upon receiving the packet, may derive the first integer and the second integer therefrom, thereby deriving, further according to a particular algorithm, the respective ports to which the packet needs to be sent in turn, in combination with the predetermined ordered set of integers and the predetermined ordered set of port numbers.
In some embodiments, classifier 110 may receive packets from switch 120 that have passed through one or more ports. For example, the first integer in the packet at this point may be a predetermined value (e.g., zero), indicating that the packet has passed through all ports it needs to pass through and completed all traffic function processing it needs to perform. Accordingly, the packet may be sent back to the classifier 110 for further forwarding. In these embodiments, the classifier 110 may also remove the header of the packet and send the packet to the internet 115 in response to receiving the packet from the switch 120 that has passed through one or more ports.
Fig. 5 schematically shows a flow diagram of a packet process 500 according to an embodiment of the present disclosure. In fig. 5, operations that may be performed in the switch 120 are represented using dashed boxes. By way of example, the method 500 will be explained below, still with reference to the scenario depicted in fig. 1. However, those skilled in the art will appreciate that the method 500 may also be applied to a variety of other similar application scenarios.
As shown in fig. 5, at block 505, the packet is passed into classifier 110. In particular, in response to a packet entering the subscriber network 105, the control plane (not shown) may choose a routing path for the packet and determine the first and second integers therefor based thereon based on a predetermined ordered set of integers and a predetermined set of port numbers. In addition, the control plane may inform the classifier 110 of the first integer and the second integer.
After the packet passes into classifier 110, classifier 110 may add the first integer 3 and the second integer 66 to the packet as a header of the packet. In addition, the classifier 110 may transmit the new packet thus generated to the switch 120.
As shown, the switch 120 may obtain the first integer and the second integer by parsing a header of the packet at block 510. Additionally, at block 515, the switch 120 determines whether the first integer is greater than a predetermined value (e.g., zero).
If the switch 120 determines at block 515 that the first integer is greater than a predetermined value (e.g., zero), the switch may proceed to block 520. At block 520, the switch 120 calculates a port number by the first integer, the second integer, and a predetermined ordered set of integers. For the first packet in the particular embodiment described above, switch 120 may calculate that <66>5 ═ 1, so switch 120 outputs the packet to traffic function 130 through port 1. In addition, the switch 120 may decrement the first integer 3 by one, i.e., the decremented first integer 2.
At block 530, the corresponding service function processes the packet. For example, in the particular embodiment described above, the traffic function 130 corresponding to port 1 receives and processes the packet. Thereafter, the packet is sent back to the switch 120. Accordingly, the switch 120 will again proceed to block 510.
Again, at block 510, the switch 120 parses the packet header. In the subsequent blocks 515, 525, in the case of the specific embodiment described above, the switch 120 passes through since the first integer is 2 at this time<66>m2To find an output port, i.e.<66>42. In addition, the switch 120 sends the packet to the corresponding service function 131 through port 2 and decrements the first integer to 1.
In response to the packet being sent back to the switch 120 again, the switch 120 again performs block 510 and 530 and forwards the packet to the service function 132 corresponding to port 3. After traffic function unit 132 completes processing the packet, in the event that switch 120 receives the packet from traffic function unit 132, switch 120 determines that the first integer is a predetermined value (e.g., zero) at block 515, so switch 120 may stop the looping process and send the packet to classifier 110 at block 535.
In response, the classifier 110, upon receiving the packet, may remove the packet header indicating the first integer and the second integer and route the packet to the internet 115. The packet process 500 may end. Other packets having other values of the first and second integers may be processed similar to the above process, and different packets may be processed in parallel.
Fig. 6 schematically shows a block diagram of an apparatus 600 according to an embodiment of the present disclosure. The apparatus 600 may be implemented at the switch 120 or as the switch 120 itself. It should be understood that only the units or components of the apparatus 600 that are closely related to the embodiments of the present disclosure are shown in fig. 6. In particular embodiments, apparatus 600 may include other functional units or components that enable it to operate normally. Furthermore, necessary connections between various units or components in the apparatus 600 may exist, but these connections are not depicted in fig. 6 for simplicity.
As shown in fig. 6, the apparatus 600 includes a determining unit 610, a selecting unit 620, a decrementing unit 630, and a transmitting unit 640. The determining unit 610 is configured to determine, in response to receiving a packet, a first integer and a second integer indicated in the packet, wherein the first integer corresponds to a number of ports through which the packet will pass. The selection unit 620 is configured to select a third integer from the predetermined ordered set of integers based on the first integer in response to the first integer being greater than the predetermined value. The selecting unit 620 is further configured to select one port number from the predetermined ordered set of port numbers based on a remainder of the division of the second integer by the third integer. The decrement unit 630 is configured to decrement the first integer. The transmitting unit 640 is configured to transmit a packet to a port corresponding to the selected port number, the packet indicating the decremented first integer and second integer.
In some embodiments, the size of the ordered set of integers may be the same as the size of the ordered set of port numbers, the integers in the ordered set of integers may be relatively prime integers, and the smallest integer in the ordered set of integers may be greater than the largest port number in the ordered set of port numbers. In some embodiments, the second integer may be determined based on the first integer, the ordered set of integers, and the ordered set of port numbers.
In some embodiments, the determining unit 610 may be further configured to determine the first integer and the second integer in a header of the packet. In some embodiments, the selection unit 620 may be further configured to determine an ordered subset of integers of the ordered set of integers such that the size of the ordered subset of integers is a first integer; and selecting an integer having a rank corresponding to the first integer as the third integer in the ordered subset of integers. In some embodiments, the selecting unit 620 may be further configured to determine an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is a first integer; and selecting a port number in the ordered subset of port numbers whose sequence number corresponds to the remainder. In some embodiments, the transmitting unit 640 may be further configured to transmit the packet to a predetermined port coupled with the classifier 110 in response to the first integer being equal to the predetermined value.
Fig. 7 schematically shows a block diagram of an apparatus 700 according to an embodiment of the present disclosure. The apparatus 700 may be implemented at the classifier 110 or as the classifier 110 itself. It should be understood that only the units or components of the apparatus 700 that are closely related to the embodiments of the present disclosure are shown in fig. 7. In particular embodiments, apparatus 700 may include other functional units or components that enable it to operate normally. Furthermore, necessary connections between various units or components in the apparatus 700 may exist, but these connections are not depicted in fig. 7 for simplicity. In addition, optional units or components are indicated in fig. 7 using dashed boxes.
As shown in fig. 7, the apparatus 700 includes a determining unit 710, an indicating unit 720, and a transmitting unit 730. The determining unit 710 is configured to determine, in response to receiving the packet, routing information for the packet, the routing information indicating one or more ports of the switch through which the packet is to sequentially pass. The determining unit 710 is further configured to determine a first integer and a second integer based on the routing information, the predetermined ordered set of integers and the predetermined ordered set of port numbers, wherein the first integer corresponds to the number of ports through which the packet will pass. The indicating unit 720 is configured to indicate the first integer and the second integer in the packet. The transmitting unit 730 is configured to transmit the packet to the switch 120.
In some embodiments, the size of the ordered set of integers may be the same as the size of the ordered set of port numbers, the integers in the ordered set of integers may be relatively prime integers, and the smallest integer in the ordered set of integers may be greater than the largest port number in the ordered set of port numbers.
In some embodiments, the determining unit 710 is further configured to determine the ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is a first integer; determining ordered integer subsets of the ordered set of integers such that the ordered integer subsets are a first integer in size; determining a first intermediate set of ordered integers, each element of which is a quotient of the product of all elements of the ordered subset of integers divided by the corresponding element of the ordered subset of integers; determining a second intermediate ordered integer set, each element of which is a multiplicative inverse of a corresponding element of the first intermediate ordered integer set modulo a corresponding element of the ordered integer subset; determining a sum of products of all corresponding elements of the ordered subset of port numbers, the first intermediate ordered set of integers, and the second intermediate ordered set of integers; and determining a remainder of the sum divided by a product of all elements of the ordered subset of integers as a second integer
In some embodiments, the indicating unit 720 is further configured to indicate the first integer and the second integer in a header of the packet. In some embodiments, the apparatus 700 may further include a receiving unit 740. The receiving unit 740 is configured to receive packets from the switch 120 that have passed through one or more ports. In some embodiments, in response to the receiving unit 740 receiving a packet from the switch 120 that has passed through one or more ports, the sending unit 730 removes the header of the packet and sends the packet to the internet 115.
Fig. 8 schematically illustrates a block diagram of a device 800 that may be used to implement embodiments of the present disclosure. In some implementations, the device 800 can be used to implement the classifier 110 according to embodiments of the present disclosure. At this point, device 800 may implement method 400 according to embodiments of the present disclosure. Additionally, the device 800 may also be used to implement a switch 120 according to embodiments of the present disclosure. At this point, the device 800 may implement the method 200 according to embodiments of the present disclosure. Of course, the method 200 or the method 400 need not necessarily be performed by the device 800. At least some of the operations of method 200 or method 400 may be performed by one or more other entities.
The device 800 comprises at least one processor 801, such as a Data Processor (DP), and at least one memory 802 coupled to the processor 801. Memory 802 may be a non-transitory machine-readable storage medium and it may store program 803. The program 803 may include instructions that, when executed on the associated processor 801, cause the device 800 to operate in accordance with embodiments of the present disclosure, such as to perform the method 200 and the method 400.
The embodiments herein may be implemented by computer software executable by the processor 801 of the device 800, or by hardware, or by a combination of software and hardware. The combination of the at least one processor 801 and the at least one memory 802 may form a processing component 810, the processing component 810 being adapted to implement various embodiments of the present disclosure, such as the method 200 or the method 400.
The processor 801 may be of any type suitable to the local technical environment, and may include one or more of the following, as non-limiting examples: general purpose computers, special purpose computers, microprocessors, Digital Signal Processors (DSPs) and processors based on a multi-core processor architecture. Device 800 may have multiple processors, such as an application specific integrated circuit chip that is slaved in time with a clock synchronized to the main processor.
The memory 802 may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as semiconductor-based memory devices, magnetic memory devices and systems, optical memory devices and systems, fixed memory and removable memory, as non-limiting examples. Although only one memory 802 is shown in device 800, there may be several physically separate memory modules in device 800.
As used herein, the term "determining" encompasses a wide variety of actions. For example, "determining" can include calculating, computing, processing, deriving, investigating, looking up (e.g., looking up in a table, a database or another data structure), ascertaining and the like. Further, "determining" can include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory), and the like. Further, "determining" may include resolving, selecting, choosing, establishing, and the like.
It should be noted that the embodiments of the present disclosure can be realized by hardware, software, or a combination of software and hardware. The hardware portion may be implemented using dedicated logic; the software portions may be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or specially designed hardware. Those skilled in the art will appreciate that the apparatus and methods described above may be implemented using computer executable instructions and/or embodied in processor control code, such code being provided, for example, in programmable memory or on a data carrier such as an optical or electronic signal carrier.
Further, while the operations of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions. It should also be noted that the features and functions of two or more devices according to the present disclosure may be embodied in one device. Conversely, the features and functions of one apparatus described above may be further divided into embodiments by a plurality of apparatuses.
While the present disclosure has been described with reference to several particular embodiments, it is to be understood that the disclosure is not limited to the particular embodiments disclosed. The disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (26)

1. A method performed at a switch, comprising:
in response to receiving a packet, determining a first integer and a second integer indicated in the packet, wherein the first integer corresponds to a number of ports through which the packet will pass;
in response to the first integer being greater than a predetermined value, selecting a third integer from a predetermined ordered set of integers based on the first integer;
selecting a port number from a predetermined ordered set of port numbers based on a remainder of dividing the second integer by the third integer;
decrementing the first integer; and
transmitting the packet to a port corresponding to the selected port number, the packet indicating the decremented first and second integers.
2. The method of claim 1, wherein
The size of the ordered set of integers is the same as the size of the ordered set of port numbers,
the integers in the ordered set of integers are relatively prime integers, an
The smallest integer in the ordered set of integers is greater than the largest port number in the ordered set of port numbers.
3. The method of claim 1, wherein the second integer is determined based on the first integer, the ordered set of integers, and the ordered set of port numbers.
4. The method of claim 1, wherein determining the first and second integers indicated in the packet comprises:
determining the first integer and the second integer in a header of the packet.
5. The method of claim 1, wherein selecting a third integer from a predetermined ordered set of integers based on the first integer comprises:
determining an ordered subset of integers of the ordered set of integers such that the ordered subset of integers is of the first integer size; and
selecting an integer having a rank corresponding to the first integer in the ordered subset of integers as the third integer.
6. The method of claim 1, wherein selecting one port number from a predetermined ordered set of port numbers comprises:
determining an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is the first integer; and
selecting a port number in the ordered subset of port numbers whose sequence number corresponds to the remainder.
7. The method of claim 1, further comprising:
in response to the first integer being equal to a predetermined value, the packet is sent to a predetermined port coupled to a classifier.
8. A method performed at a classifier, comprising:
in response to receiving a packet, determining routing information for the packet, the routing information indicating one or more ports of a switch through which the packet will pass in sequence;
determining a first integer and a second integer based on the routing information, a predetermined ordered set of integers, and a predetermined ordered set of port numbers, wherein the first integer corresponds to a number of ports through which the packet will pass;
indicating the first integer and the second integer in the packet; and
and sending the packet to the switch, so that the switch uses the first integer, the second integer, the predetermined ordered integer set and the predetermined ordered port number set to restore the port number information of the packet which needs to pass through the switch in sequence according to a remainder algorithm.
9. The method of claim 8, wherein
The size of the ordered set of integers is the same as the size of the ordered set of port numbers,
the integers in the ordered set of integers are relatively prime integers, an
The smallest integer in the ordered set of integers is greater than the largest port number in the ordered set of port numbers.
10. The method of claim 8, wherein determining the second integer comprises:
determining an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is the first integer;
determining an ordered subset of integers of the ordered set of integers such that the ordered subset of integers is of the first integer size;
determining a first intermediate set of ordered integers, each element of which is a quotient of a product of all elements of the ordered subset of integers divided by a corresponding element of the ordered subset of integers;
determining a second intermediate ordered integer set, each element of which is a multiplicative inverse of a corresponding element of the first intermediate ordered integer set modulo a corresponding element of the ordered integer subset;
determining a sum of products of all corresponding elements of the ordered subset of port numbers, the first intermediate ordered set of integers, and the second intermediate ordered set of integers; and
determining a remainder of the sum divided by a product of all elements of the ordered subset of integers as the second integer.
11. The method of claim 8, wherein indicating the first integer and the second integer in the packet comprises:
indicating the first integer and the second integer in a header of the packet.
12. The method of claim 11, further comprising:
receiving the packet from the switch that has passed through the one or more ports.
13. The method of claim 12, further comprising, in response to receiving the packet from the switch that has passed through the one or more ports:
removing the header of the packet; and
the packet is sent to the internet.
14. A switch, comprising:
at least one processor; and
at least one memory including computer readable instructions, the at least one memory and the computer readable instructions configured to, with the processor, cause the switch to:
in response to receiving a packet, determining a first integer and a second integer indicated in the packet, wherein the first integer corresponds to a number of ports through which the packet will pass;
in response to the first integer being greater than a predetermined value, selecting a third integer from a predetermined ordered set of integers based on the first integer;
selecting a port number from a predetermined ordered set of port numbers based on a remainder of dividing the second integer by the third integer;
decrementing the first integer; and
transmitting the packet to a port corresponding to the selected port number, the packet indicating the decremented first and second integers.
15. The switch of claim 14, wherein
The size of the ordered set of integers is the same as the size of the ordered set of port numbers,
the integers in the ordered set of integers are relatively prime integers, an
The smallest integer in the ordered set of integers is greater than the largest port number in the ordered set of port numbers.
16. The switch of claim 14, wherein the second integer is determined based on the first integer, the ordered set of integers, and the ordered set of port numbers.
17. The switch of claim 14, wherein the at least one memory and the computer readable instructions are configured to, with the processor, cause the switch to:
determining the first integer and the second integer in a header of the packet.
18. The switch of claim 14, wherein the at least one memory and the computer readable instructions are configured to, with the processor, cause the switch to:
determining an ordered subset of integers of the ordered set of integers such that the ordered subset of integers is of the first integer size; and
selecting an integer having a rank corresponding to the first integer in the ordered subset of integers as the third integer.
19. The switch of claim 14, wherein the at least one memory and the computer readable instructions are configured to, with the processor, cause the switch to:
determining an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is the first integer; and
selecting a port number in the ordered subset of port numbers whose sequence number corresponds to the remainder.
20. The switch of claim 14, wherein the at least one memory and the computer readable instructions are configured to, with the processor, cause the switch to:
in response to the first integer being equal to a predetermined value, the packet is sent to a predetermined port coupled to a classifier.
21. A classifier, comprising:
at least one processor; and
at least one memory including computer-readable instructions, the at least one memory and the computer-readable instructions configured to, with the processor, cause the classifier to:
in response to receiving a packet, determining routing information for the packet, the routing information indicating one or more ports of a switch through which the packet will pass in sequence;
determining a first integer and a second integer based on the routing information, a predetermined ordered set of integers, and a predetermined ordered set of port numbers, wherein the first integer corresponds to a number of ports through which the packet will pass;
indicating the first integer and the second integer in the packet; and
and sending the packet to the switch, so that the switch uses the first integer, the second integer, the predetermined ordered integer set and the predetermined ordered port number set to restore the port number information of the packet which needs to pass through the switch in sequence according to a remainder algorithm.
22. The classifier of claim 21, wherein
The size of the ordered set of integers is the same as the size of the ordered set of port numbers,
the integers in the ordered set of integers are relatively prime integers, an
The smallest integer in the ordered set of integers is greater than the largest port number in the ordered set of port numbers.
23. The classifier of claim 21, wherein the at least one memory and the computer-readable instructions are configured to, with the processor, cause the classifier to:
determining an ordered subset of port numbers of the ordered set of port numbers such that the size of the ordered subset of port numbers is the first integer;
determining an ordered subset of integers of the ordered set of integers such that the ordered subset of integers is of the first integer size;
determining a first intermediate set of ordered integers, each element of which is a quotient of a product of all elements of the ordered subset of integers divided by a corresponding element of the ordered subset of integers;
determining a second intermediate ordered integer set, each element of which is a multiplicative inverse of a corresponding element of the first intermediate ordered integer set modulo a corresponding element of the ordered integer subset;
determining a sum of products of all corresponding elements of the ordered subset of port numbers, the first intermediate ordered set of integers, and the second intermediate ordered set of integers; and
determining a remainder of the sum divided by a product of all elements of the ordered subset of integers as the second integer.
24. The classifier of claim 21, wherein the at least one memory and the computer-readable instructions are configured to, with the processor, cause the classifier to:
indicating the first integer and the second integer in a header of the packet.
25. The classifier of claim 24, wherein the at least one memory and the computer-readable instructions are configured to, with the processor, cause the classifier to:
receiving the packet from the switch that has passed through the one or more ports.
26. The classifier of claim 25, wherein the at least one memory and the computer-readable instructions are configured to, with the processor, cause the classifier, in response to receiving the packet from the switch that has passed through the plurality of ports:
removing the header of the packet; and
the packet is sent to the internet.
CN201710146685.4A 2017-03-13 2017-03-13 Switch and classifier and related methods Active CN108574647B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710146685.4A CN108574647B (en) 2017-03-13 2017-03-13 Switch and classifier and related methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710146685.4A CN108574647B (en) 2017-03-13 2017-03-13 Switch and classifier and related methods

Publications (2)

Publication Number Publication Date
CN108574647A CN108574647A (en) 2018-09-25
CN108574647B true CN108574647B (en) 2021-05-18

Family

ID=63578456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710146685.4A Active CN108574647B (en) 2017-03-13 2017-03-13 Switch and classifier and related methods

Country Status (1)

Country Link
CN (1) CN108574647B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1414182A1 (en) * 2002-09-20 2004-04-28 St Microelectronics S.A. Hiding of data decomposed in a residue system
WO2014186963A1 (en) * 2013-05-23 2014-11-27 华为技术有限公司 Service routing system, device and method
CN105704167A (en) * 2014-11-24 2016-06-22 华为技术有限公司 Service chain processing method, device and system
KR20170001655A (en) * 2015-06-26 2017-01-04 주식회사 케이티 Method for user authentication, and method for controlling service function chain by using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1414182A1 (en) * 2002-09-20 2004-04-28 St Microelectronics S.A. Hiding of data decomposed in a residue system
WO2014186963A1 (en) * 2013-05-23 2014-11-27 华为技术有限公司 Service routing system, device and method
CN104322019A (en) * 2013-05-23 2015-01-28 华为技术有限公司 Service routing system, device and method
CN105704167A (en) * 2014-11-24 2016-06-22 华为技术有限公司 Service chain processing method, device and system
KR20170001655A (en) * 2015-06-26 2017-01-04 주식회사 케이티 Method for user authentication, and method for controlling service function chain by using the same

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A multiple flow tables construction scheme for service function chaining in NFV;Eun-Do Kim.etc;《IEEE》;20151217;全文 *
Network Service Header,draft-quinn-sfc-nsh-07.txt;P. Quinn.etc;《IETF》;20150224;全文 *
Residue Number Systems;无;《百度文库》;20131116;全文 *
Service Function Chaining (SFC) Architecture;J. Halpern, Ed.;《IETF》;20151031;全文 *

Also Published As

Publication number Publication date
CN108574647A (en) 2018-09-25

Similar Documents

Publication Publication Date Title
US9602428B2 (en) Method and apparatus for locality sensitive hash-based load balancing
CN107819663B (en) Method and device for realizing virtual network function service chain
CN102104541B (en) Header processing engine
CN107547391B (en) Message transmission method and device
JP6989621B2 (en) Packet transmission methods, edge devices and machine-readable storage media
US20130346585A1 (en) Network system, and policy route setting method
US20150200843A1 (en) Packet Labels For Identifying Synchronization Groups of Packets
CN113824638A (en) Method, equipment and system for forwarding message
CN111600797B (en) Data transmission method, node and system
US8903972B2 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
EP2880550B1 (en) Connection mesh in mirroring asymmetric clustered multiprocessor systems
CN104079486A (en) Gateway and method of transmitting data through gateway
US10652145B2 (en) Managing data frames in switched networks
CN110430135B (en) Message processing method and device
EP3767886A1 (en) Cluster oriented dynamic routing
CN111193668A (en) Flow distribution method and device, computer equipment and storage medium
CN114640557A (en) Gateway and cloud network system
EP3253030B1 (en) Method and device for reporting openflow switch capability
CN108092896B (en) Stacking system and aggregation group creation apparatus
US10025752B2 (en) Data processing method, processor, and data processing device
KR20210158807A (en) Routing information sending method, packet sending method, and related apparatus
CN114679418A (en) Data transmission method, electronic device, and storage medium
CN108574647B (en) Switch and classifier and related methods
US11411862B2 (en) Method, electronic device and computer-readable medium for processing data generated by service
US20170005912A1 (en) Method, apparatus and system for transmitting information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant