Method, device, electronic device and storage medium for achieving same-source and same-destination in selected group
Obtain the IP address of non-standard packets through the UDF module, match the system control list and use XOR operation to calculate the hash value, which solves the problem that OpenFlow switch cannot achieve the same origin and same sink for non-standard packets, and realizes stable and controllable traffic and Effective utilization of bandwidth.
Patent Information
- Application Number
- CN202211230308.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-08
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-10-08
AI Technical Summary
OpenFlow switches cannot realize the same origin and homosink of non-standard packets in the selected group, resulting in the inability to select the outgoing port based on the hash value, and the stable controllable traffic and effective bandwidth utilization cannot be achieved.
The UDF module obtains the source IP address and destination IP address in the inner layer packet of non-standard packets, matches the system control list to obtain hash calculation method, uses XOR operation to calculate hash value, and uses extended OpenFlow protocol to select the flow table The appropriate hash value allows you to select the outgoing port forwarding message in the selected group.
It realizes the same origin and homosink of non-standard packets, ensures the stability and controllability of traffic, and facilitates the planning and effective utilization of network bandwidth.
Smart Images

Figure CN115914423B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network communication, and in particular to a method for realizing same-source and same-destination in a selected group of an OpenFlow system, and a device, an electronic device and a storage medium for realizing the method. Background Art
[0002] An OpenFlow switch is a network communication device that can transform the packet forwarding process originally completely controlled by a switch / router into a process jointly completed by an OpenFlow switch (OpenFlow Switch) and a control server (Controller), thereby realizing the separation of data forwarding and routing control. The controller can control the flow table in the OpenFlow switch through pre-defined interface operations to achieve the purpose of controlling data forwarding. The OpenFlow switch is the core component of the entire OpenFlow network, mainly managing the forwarding of the data layer. It has a flow table (FlowTable), which only forwards according to the flow table. The generation, maintenance and distribution of the flow table are realized by the controller.
[0003] In OpenFlow, when the Select group is supported, the hash value can be calculated based on the corresponding fields in the second, third or fourth layers, and the output port can be selected based on the hash value to achieve the same source and the same destination. For standard messages, such as VxLAN messages, after stripping the corresponding header, the hash value can be calculated based on the corresponding fields in the second, third or fourth layers of the inner message, and the output port can be selected based on the hash value to achieve the same source and the same destination. However, for non-standard messages, such as VxLAN messages with UDP port numbers other than 4789, the OpenFlow switch cannot skip the header according to the relevant protocol to obtain the corresponding fields in the inner message to calculate the hash value, and determine the corresponding output port based on the hash value, so the same source and the same destination cannot be achieved.
[0004] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0005] The object of the present invention is to provide a method for implementing the same source and same destination in a selected group of OpenFlow, which can implement the same source and same destination of non-standard messages in a selected group (Select Group) of the OpenFlow system. Another object of the present invention is to provide an apparatus, an electronic device and a storage medium for implementing the same source and same destination in a selected group of OpenFlow, which can implement the above-mentioned method.
[0006] To achieve the above object, an embodiment of the present invention provides a method for implementing the same source and same destination in a selected group of an OpenFlow system, the method comprising:
[0007] Obtain the source IP address and destination IP address in the inner message of the non-standard message;
[0008] Match the system control list to obtain the hash calculation method corresponding to the non-standard message;
[0009] Calculating the hash values corresponding to the source IP address and the destination IP address in the inner message of the non-standard message by the hash calculation method, wherein the hash calculation method includes an exclusive OR operation;
[0010] Selecting a hash value corresponding to the non-standard message from a plurality of hash values through the flow table, and using the hash value as the hash value for selecting an egress port from the selected group;
[0011] The corresponding outbound port is selected from the selected group according to the selected hash value to forward the message.
[0012] In one or more embodiments of the present invention, obtaining the source IP address and the destination IP address in the inner message of the non-standard message includes:
[0013] The source IP address and the destination IP address in the inner layer message of the non-standard message are obtained through the UDF matching module, wherein the UDF matching module includes:
[0014] UDF header field, used to identify the initial position of the message offset;
[0015] Type matching field, used to determine the message type that needs to be matched;
[0016] The offset field is used to determine the starting position of the selected field.
[0017] In one or more embodiments of the present invention, the matching system control list to obtain a hash calculation method corresponding to the non-standard message includes:
[0018] The system control list is searched through the information carried by the non-standard message to obtain the corresponding hash calculation method, wherein the system control list is configured with a mapping relationship between the information carried by the message and the hash calculation method.
[0019] In one or more embodiments of the present invention, the calculating of the hash values corresponding to the source IP address and the destination IP address in the inner message of the non-standard message includes:
[0020] Perform XOR operation on the source IP address and the destination IP address byte by byte to obtain the corresponding hash value.
[0021] In one or more embodiments of the present invention, the flow table is obtained by the following steps:
[0022] The OpenFlow protocol is extended so that the controller can issue a flow table for selecting a hash value corresponding to a non-standard message.
[0023] In one or more embodiments of the present invention, the extended OpenFlow protocol carries information of a hash calculation module to be selected, and the flow table selects a hash value calculated by the hash calculation module according to the information of the hash calculation module.
[0024] In one or more embodiments of the present invention, selecting a corresponding outbound port from a selected group to forward the message according to the selected hash value includes:
[0025] Take the remainder of the hash value and the number of outbound ports in the selected group, and the remainder is p;
[0026] Select the p+1th outbound port to forward the message, where p is an integer greater than or equal to 0.
[0027] The present invention also discloses a device for implementing the same source and same destination in a selected group of an OpenFlow system, the device comprising:
[0028] UDF module, used to obtain the source IP address and destination IP address in the inner message of the non-standard message;
[0029] The SCL module is used to match the system control list and obtain the hash calculation method corresponding to the non-standard message;
[0030] A hash module, used to calculate the hash value corresponding to the source IP address and the destination IP address in the inner message of the non-standard message by the hash calculation method, wherein the hash calculation method includes an exclusive OR operation;
[0031] A flow table module, used for selecting a hash value corresponding to a non-standard message from a plurality of hash values through a flow table, and using the hash value as a hash value for selecting an output port from a selected group;
[0032] The selected group module is used to select a corresponding outbound port from the selected group to forward the message according to the selected hash value. The present invention also discloses an electronic device, the electronic device comprising:
[0033] at least one processor;
[0034] At least one memory is coupled to the at least one processor and stores a computer program for execution by the at least one processor, and when the computer program is executed by the at least one processor, the electronic device executes the method described above.
[0035] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a machine, the method described above is implemented.
[0036] Compared with the prior art, the present invention can realize the same source and destination of non-standard messages (such as non-standard VxLAN messages, etc.) in the selected group (Select Group) of the OpenFlow system, achieve consistency in the round-trip traffic, ensure the stability and controllability of the traffic, and facilitate the planning of network bandwidth and the full and effective use of bandwidth. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flow chart of a method for achieving homologous source and homologous destination according to an embodiment of the present invention;
[0038] Figure 2 is a schematic diagram of UDF module offset according to an embodiment of the present invention;
[0039] Figure 3 is a schematic diagram of hash processing according to an embodiment of the present invention;
[0040] Figure 4 It is a structural block diagram of a device for realizing the same source and same destination according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.
[0042] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.
[0043] like Figure 1 As shown, according to a preferred embodiment of the present invention, a method for implementing the same source and same destination in a selected group of an OpenFlow system can support the same source and same destination for non-standard messages (such as non-standard VxLAN messages, etc.) in a selected group (Select Group) of the OpenFlow system, achieve the consistency of traffic round-trip, ensure the stability and controllability of traffic, and facilitate the planning of network bandwidth and the full and effective use of bandwidth. Specifically, the method for implementing the same source and same destination in a selected group of an OpenFlow system includes the following steps:
[0044] S1, obtain the source IP address and destination IP address in the inner message of the non-standard message;
[0045] Specifically, in the OpenFlow system, when the selected group is supported, the hash value (Hash) can be calculated according to the corresponding fields of the second layer, third layer or fourth layer of the inner layer message to select the output port in the selected group to achieve the same source and the same destination. For standard messages, such as standard VxLAN messages (i.e., messages with a UDP port number of 4789), the hash value can be calculated directly according to the corresponding fields of the second layer, third layer or fourth layer of the inner layer message after removing the VxLAN header, so as to select the output port in the selected group to achieve the same source and the same destination. However, for non-standard messages, such as non-standard VxLAN messages (i.e., messages with a UDP port number other than 4789), it is impossible to skip the VxLAN header according to the relevant protocol to obtain the corresponding fields of the second layer, third layer or fourth layer of the inner layer message to calculate the hash value, and it is also impossible to select the output port in the selected group to achieve the same source and the same destination. The same source and same destination here means that for messages with opposite source IP addresses and destination IP addresses, the same output port in the selected group is selected according to the hash value to ensure that the round-trip messages are transmitted through the same path. For example, message 1 is a non-standard VxLAN message with a layer 4 UDP port of X (X is not 4789), and the source IP address of its inner message is ABCD, and the destination IP address is ABCE. When the message enters from port Eth-0-1, the source IP address and destination IP address of the inner message are needed to calculate the hash value; message 2 is a non-standard VxLAN message with a layer 4 UDP port of X (X is not 4789), and the source IP address of its inner message is ABCE, and the destination IP address is ABCD. When the message enters from port Eth-0-1, the source IP address and destination IP address of the inner message are needed to calculate the hash value.
[0046] In order to realize the same source and destination of non-standard messages in the selected group of the OpenFlow system, the fields used to calculate the hash value in the non-standard message are first obtained, that is, the source IP address and the destination IP address in the inner message of the non-standard message are obtained. As can be seen from the above, for non-standard messages, it is impossible to directly obtain the corresponding fields in the inner message. Therefore, for non-standard messages, it is necessary to solve the problem of how to obtain the corresponding fields in the non-standard message. The present invention obtains the corresponding fields in the inner message of the non-standard message through the UDF (User Defined Format, user defined format) module, that is, the source IP address and the destination IP address in the inner message of the non-standard message are obtained through the UDF module. The UDF module here is configured with a UDF header field (UDF Header), a type match field (Match Field), an offset field (Offset), and an offset unit field (OffsetUnit). The UDF header field is used to identify the starting position of the message offset; the type match field is used to determine the message type that needs to be matched. For example, for non-standard VxLAN messages, when the UDF module matches the message, the type match field is IP-Protocol is UDP, and the destination port of UDP is X; the offset field is used to determine the starting position of the selected field. For example, if it supports configuring 4-segment Offset, such as a layer 3 header Offset0 configured with an offset of 40 bytes, it indicates that the match starts from the 40th byte after the end of the Ethernet type (Ether_Type); the offset unit field is used to determine the length of the selected field, that is, starting from the starting position of the selected field, a field of a certain length is selected. Combined with Figure 2 As shown, for the above-mentioned non-standard VxLAN message, the configuration is performed by configuring the entry in the UDF module, which includes the fields described above, so that the UDF module takes the field starting from Layer 4, and specifies the offset of n bytes and n+4 bytes starting from Layer 4, so as to obtain the source IP address and destination IP address of the inner message. At the same time, the UDF module is specified to match only UDP messages, and the UDP destination port is X.
[0047] S2, matching the system control list to obtain the hash calculation method corresponding to the non-standard message;
[0048] Specifically, after the source IP address and the destination IP address in the inner message of the non-standard message are obtained through the UDF module, the system control list is further matched to obtain the hash calculation method corresponding to the non-standard message. That is, after the source IP address and the destination IP address in the inner message of the non-standard message are obtained, it is necessary to determine which hash calculation method to use to calculate the hash value for the source IP address and the destination IP address, so as to achieve the same source and destination of the non-standard message in the selected group.
[0049] Furthermore, combined with Figure 3 As shown, in the OpenFlow switch, there are multiple hash calculation modules, such as hash calculation modules a to d, and each hash calculation module corresponds to a hash calculation method. For example, the hash calculation module corresponds to the XOR operation method. In order to achieve the same source and same destination of non-standard messages, a hash calculation module needs to be specified for the non-standard messages, and the hash calculation method used by the hash calculation module can achieve the same source and same destination.
[0050] During implementation, the corresponding hash calculation method is specified for non-standard messages through the system control list. When specified, the system control list is matched through the information carried by the message to obtain the hash calculation method corresponding to the non-standard message, such as matching the system control list through the IP address information carried by the message, and the matching result is to specify the hash calculation module a to calculate the hash value. The system control list here consists of a group (GRO UP) and an entry (ENTRY). A GROUP can include multiple ENTRYs, and each ENTRY is divided into a matching item and a behavior item. Different hash calculation modules can be specified for different messages. During configuration, create an SCL group (SCL group); create an SCL entry (SCL entry); configure the entry (entry) to act only on IP messages; configure the entry to act only on UDP messages; configure the entry to act only on messages with UDP port X; configure the entry to specify that the message uses hash calculation module a (selector a) to calculate the hash value.
[0051] S3, calculating the hash value corresponding to the source IP address and the destination IP address in the inner message of the non-standard message by the hash calculation method, wherein the hash calculation method includes an exclusive OR operation;
[0052] Specifically, after the hash calculation method corresponding to the non-standard message is obtained through the system control list, the hash calculation method is further used to calculate the hash value corresponding to the source IP address and the destination IP address. The hash calculation method here includes an exclusive OR operation (XOR). When the hash value is calculated using the exclusive OR operation method, for the two opposite fields ABCD, ABCE and the two fields ABCE, ABCD of the source IP address, the byte-by-byte exclusive OR method is used, and the calculated hash values are the same, thereby ensuring that the forward and reverse messages follow the same path.
[0053] S4, selecting a hash value corresponding to the non-standard message from a plurality of hash values through the flow table, and using the hash value as the hash value for selecting an outbound port from the selected group;
[0054] Specifically, there are multiple hash calculation modules in the OpenFlow switch, and the hash values calculated by these hash calculation modules need to be spliced to facilitate some subsequent operations. Of course, in other embodiments, splicing can be directly transmitted backwards to facilitate some subsequent operations. Since multiple hash values are included, it is necessary to select the hash value corresponding to the non-standard message in order to select the port in the selected group.
[0055] In the present invention, a hash value corresponding to a non-standard message is selected from a plurality of hash values through a flow table, wherein the flow table is obtained by an OpenFlow switch from a controller based on an extended OpenFlow protocol, and the flow table is used to select a hash value corresponding to a non-standard message from a plurality of hash values. That is, the present invention extends the OpenFlow protocol so that the OpenFlow switch can select a hash value corresponding to a non-standard message from a plurality of hash values through a flow table.
[0056] In this embodiment, the OpenFlow protocol may be extended in the following manner, so that the extended OpenFlow protocol carries information of a hash calculation module to be selected, and the flow table selects a hash value calculated by the hash calculation module according to the information of the hash calculation module, wherein the extended OpenFlow protocol includes:
[0057] Expand ofp_action_type and define of_action_hash_value, where:
[0058] When extending ofp_action_type, add a type:
[0059] OFPAT_HASH_VALUE = m;
[0060] Define of_action_hash_value as:
[0061]
[0062] The hash calculation module information corresponding to the above hash_value.
[0063] By extending the OpenFlow protocol in the above manner, the OpenFlow switch can select a hash value corresponding to a non-standard message from a plurality of hash values through a flow table.
[0064] S5, selecting a corresponding outbound port from the selected group according to the selected hash value to forward the message.
[0065] Specifically, after the OpenFlow switch selects the hash value corresponding to the non-standard message from a number of hash values, it performs a modulo process on the number of outbound ports in the selected group using the hash value to select the corresponding outbound port. When the remainder is 0, the first outbound port is selected; when the remainder is 1, the second outbound port is selected; and so on, when the remainder is p, the p+1th outbound port is selected. Here, p is an integer greater than or equal to 0.
[0066] Since the hash values calculated in step S3 are the same, the same egress port is selected in the selected group to forward the message, thereby achieving same-source and same-destination processing of non-standard messages.
[0067] like Figure 4 As shown, the present invention also discloses a device for realizing the same source and the same destination in a selected group of an OpenFlow system. The device can realize the method for realizing the same source and the same destination in a selected group of an OpenFlow system as described above, so that the same source and the same destination are supported for non-standard messages (such as non-standard VxLAN messages, etc.) in the selected group (Select Group) of the OpenFlow system, and the consistency of the round-trip traffic is realized, thereby ensuring the stability and controllability of the traffic, facilitating the planning of the network bandwidth and fully and effectively utilizing the bandwidth.
[0068] Specifically, the device for implementing the same source and same destination in the selected group of the OpenFlow system includes:
[0069] UDF module, used to obtain the source IP address and destination IP address in the inner message of the non-standard message;
[0070] The SCL module is used to match the system control list and obtain the hash calculation method corresponding to the non-standard message;
[0071] A hash module, used to calculate the hash value corresponding to the source IP address and the destination IP address in the inner message of the non-standard message by the hash calculation method, wherein the hash calculation method includes an exclusive OR operation;
[0072] A flow table module, used for selecting a hash value corresponding to a non-standard message from a plurality of hash values through a flow table, and using the hash value as a hash value for selecting an output port from a selected group;
[0073] The selected group module is used to select a corresponding outbound port from the selected group to forward the message according to the selected hash value.
[0074] During implementation, the UDF module is used to obtain the source IP address and destination IP address in the inner message of the non-standard message. The UDF module is configured with a UDF header field (UDF Header), a type match field (Match Field), an offset field (Offset) and an offset unit field (Offset Unit), wherein the UDF header field is used to identify the starting position of the message offset; the type match field is used to determine the message type to be matched; the offset field is used to determine the starting position of the selected field; the offset unit field is used to determine the length of the selected field, that is, starting from the starting position of the selected field, a field of a certain length is selected. SCL specifies the corresponding hash calculation method for non-standard messages through the system control list. When specified, the system control list is matched through the information carried by the message to obtain the hash calculation method corresponding to the non-standard message, such as matching the system control list through the IP address information carried by the message, and the matching result is to specify the hash calculation module a to calculate the hash value. The hash module calculates the hash value corresponding to the non-standard through an exclusive OR operation (XOR). When the XOR operation is used to calculate the hash value, for the two fields ABCD, ABCE and the two fields ABCE, ABCD with opposite source IP addresses, the XOR operation is performed byte by byte, and the calculated hash values are the same, thereby ensuring that the forward and reverse messages follow the same path. The flow table module selects the hash value corresponding to the non-standard message from a number of hash values through the flow table and transmits it to the selected group module. The flow table here is obtained by the OpenFlow switch from the controller (Controller) based on the extended OpenFlow protocol. See above for details, which will not be repeated here. The selected group module modulo the hash value with the number of outbound ports in the selected group to select the corresponding outbound port. See above for details, which will not be repeated here.
[0075] The electronic device disclosed in one embodiment of the present invention may include, but is not limited to: a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile electronic device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a message sending and receiving device, a wearable electronic device, a consumer electronic device, etc. The electronic device can implement the above-mentioned method of realizing the same source and same destination in the selected group, and can support the same source and same destination for non-standard messages (such as non-standard VxLAN messages, etc.) in the selected group (Select Group) of the OpenFlow system, so as to achieve the consistency of the flow round-trip, ensure the stability and controllability of the flow, and facilitate the planning of the network bandwidth and the full and effective use of the bandwidth. Specifically, the electronic device includes at least one memory, at least one processor and a computer program, at least one memory is coupled to the at least one processor, wherein the computer program is stored in the memory and can be run in the processor, such as the computer program is a program for realizing the same source and same destination in the selected group, etc. During implementation, when the processor executes the computer program, each step in the above method can be implemented, such as obtaining the source IP address and destination IP address of the non-standard message, etc.
[0076] The computer program here can be divided into one or more units, and the one or more units are stored in the memory and executed by the memory to complete the present invention. Among them, one or more units can be a series of computer program instruction segments that can complete specific functions, and the computer program instruction segments are used to describe the execution process of the computer program in the electronic device.
[0077] It should be noted that the electronic equipment here includes but is not limited to the memory, processor and computer program mentioned above, and may also include others, such as input devices for inputting prediction information (such as keyboards, etc.), communication interfaces, etc. These components communicate with each other through a bus.
[0078] The present invention also discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned method of realizing the same source and same destination in a selected group can be implemented. The computer program includes a computer program code, which can be in the form of source code, an executable file or some intermediate form, etc. The computer-readable medium can include any entity or device, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), etc. that can carry the computer program code.
[0079] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0080] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0081] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0083] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.
Claims
1. A method for achieving the same source and same destination in a selected group of an OpenFlow system, It is characterized in that The method comprises: Obtaining a source IP address and a destination IP address in an inner layer message of a non-standard message, wherein obtaining the source IP address and the destination IP address in the inner layer message of the non-standard message comprises: obtaining the source IP address and the destination IP address in the inner layer message of the non-standard message through a user-defined format UDF module, wherein the user-defined format UDF module comprises a UDF header field for identifying an initial position of a message offset, a type matching field for determining a message type to be matched, an offset field for determining a starting position of a selected field, and an offset unit field for determining a length of the selected field; Matching the system control list to obtain a hash calculation method corresponding to the non-standard message, wherein the hash calculation method includes an exclusive OR operation; Calculate the hash value corresponding to the source IP address and the destination IP address in the inner message of the non-standard message by the hash calculation method; Selecting a hash value corresponding to the non-standard message from a plurality of hash values through the flow table, and using the hash value as the hash value for selecting an egress port from the selected group; The corresponding outbound port is selected from the selected group according to the selected hash value to forward the message.
2. The method according to claim 1, It is characterized in that The matching system control list to obtain the hash calculation method corresponding to the non-standard message includes: The system control list is searched through the information carried by the non-standard message to obtain the corresponding hash calculation method, wherein the system control list is configured with a mapping relationship between the information carried by the message and the hash calculation method.
3. The method according to claim 1, It is characterized in that The step of calculating the hash values corresponding to the source IP address and the destination IP address in the inner layer message of the non-standard message includes: Perform XOR operation on the source IP address and the destination IP address byte by byte to obtain the corresponding hash value.
4. The method according to claim 1, It is characterized in that The flow table is obtained by the following steps: The OpenFlow protocol is extended so that the controller can issue a flow table for selecting a hash value corresponding to a non-standard message.
5. The method according to claim 4, It is characterized in that The extended OpenFlow protocol carries information of a hash calculation module to be selected, and the flow table selects a hash value calculated by the hash calculation module according to the information of the hash calculation module.
6. The method according to claim 1, It is characterized in that The step of selecting a corresponding outbound port from a selected group according to the selected hash value to forward the message comprises: Take the remainder of the hash value and the number of outbound ports in the selected group, and the remainder is p; Select the p+1th outbound port to forward the message, where p is an integer greater than or equal to 0.
7. A device for achieving same-source same-destination in a selected group of an OpenFlow system, It is characterized in that The device comprises: A user-defined format UDF module, used to obtain a source IP address and a destination IP address in an inner layer message of a non-standard message, wherein the user-defined format UDF module is configured with a UDF header field for identifying an initial position of a message offset, a type matching field for determining a message type to be matched, an offset field for determining a starting position of a selected field, and an offset unit field for determining a length of the selected field; The SCL module is used to match the system control list and obtain the hash calculation method corresponding to the non-standard message, wherein the hash calculation method includes an exclusive OR operation; A hash module, used to calculate the hash value corresponding to the source IP address and the destination IP address in the inner message of the non-standard message by the hash calculation method; A flow table module, used for selecting a hash value corresponding to a non-standard message from a plurality of hash values through a flow table, and using the hash value as a hash value for selecting an output port from a selected group; The selected group module is used to select a corresponding outbound port from the selected group to forward the message according to the selected hash value.
8. An electronic device, It is characterized in that The electronic device comprises: at least one processor; At least one memory, the at least one memory is coupled to the at least one processor and stores a computer program for execution by the at least one processor, when the computer program is executed by the at least one processor, the electronic device performs the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the computer program is executed by a machine, the method according to any one of claims 1 to 6 is implemented.
