CN116192761A - Message forwarding method, forwarding layer device, system, electronic device and storage medium - Google Patents
Message forwarding method, forwarding layer device, system, electronic device and storage medium Download PDFInfo
- Publication number
- CN116192761A CN116192761A CN202310194563.8A CN202310194563A CN116192761A CN 116192761 A CN116192761 A CN 116192761A CN 202310194563 A CN202310194563 A CN 202310194563A CN 116192761 A CN116192761 A CN 116192761A
- Authority
- CN
- China
- Prior art keywords
- message
- forwarded
- priority
- priority information
- information
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the application provides a message forwarding method, forwarding layer equipment, a system, electronic equipment and a storage medium, wherein the message forwarding method is applied to a forwarding layer of a network function virtualization forwarding system and comprises the following steps: receiving a message to be forwarded; analyzing header information encapsulated by a network virtualization protocol in the message to be forwarded, and identifying priority information included in the header information; and if the header information does not include the priority information, marking the priority information of the message to be forwarded based on the network virtualization protocol through a first message marker so as to forward the message to be forwarded according to the priority information.
Description
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a message forwarding method, forwarding layer equipment, electronic equipment and a computer storage medium.
Background
With the growing maturity of NFV (Network Functions Virtualization, network function virtualization), more and more products build network element products bearing different loads based on NFV platforms, so as to realize the characteristics of high availability, high performance, elastic expansion, fault isolation, self-healing and the like.
At present, NFV generally adopts a distributed fast and slow separation architecture, and network element products perform message flow between different devices based on the fast and slow separation architecture.
However, as the traffic scale of network element products increases rapidly, the complexity of forwarding messages between different devices increases, and the types of messages increase. Important data flows may be dropped when congestion occurs in the network between forwarding devices. And therefore significant message data is lost.
Disclosure of Invention
In view of the foregoing, an embodiment of the present application provides a method for forwarding a message, so as to at least partially solve the foregoing problems.
According to a first aspect of an embodiment of the present application, there is provided a method for forwarding a packet, where the method is applied to a forwarding layer of a network function virtualized forwarding system, the method includes: receiving a message to be forwarded; analyzing header information encapsulated by a network virtualization protocol in the message to be forwarded, and identifying priority information included in the header information; and if the header information does not include the priority information, marking the priority information of the message to be forwarded based on the network virtualization protocol through a first message marker so as to forward the message to be forwarded according to the priority information.
According to a second aspect of an embodiment of the present application, there is provided a forwarding layer device of a network function virtualization forwarding system, where the forwarding layer includes a packet identifier, a first packet marker, and a packet Wen Xiansu, where the packet identifier is configured to receive a packet to be forwarded, parse header information encapsulated by a network virtualization protocol in the packet to be forwarded, and identify priority information included in the header information; the first message marker is configured to mark priority information of the message to be forwarded based on the network virtualization protocol if the header information does not include the priority information; the message Wen Xiansu is configured to forward the message to be forwarded according to the priority information.
According to a third aspect of embodiments of the present application, there is provided a network function virtualization forwarding system, including a forwarding layer, where the forwarding layer is configured to receive a packet to be forwarded; analyzing header information encapsulated by a network virtualization protocol in the message to be forwarded, and identifying priority information included in the header information; and if the header information does not include the priority information, marking the priority information of the message to be forwarded based on the network virtualization protocol through a first message marker so as to forward the message to be forwarded according to the priority information.
According to a fourth aspect of embodiments of the present application, there is provided an electronic device, including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the method.
According to a fifth aspect of embodiments of the present application, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements a method as described above.
According to the message forwarding method provided by the embodiment of the application, the header information of the received message to be forwarded is analyzed to obtain the priority information carried in the header information packaged by the network virtualization protocol, so that the priority of the message to be forwarded can be obtained, important message data can be preferentially forwarded according to the priority of the message to be forwarded, the condition that important message data are abandoned when a network is blocked is avoided, the message to be forwarded which does not comprise the priority information is marked with the priority information, the message to be forwarded which does not comprise the priority information can be preferentially forwarded according to the marked priority information, and the important message data are avoided from being abandoned.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings may also be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a schematic diagram of an exemplary system to which the message forwarding method of the embodiments of the present application is applied;
fig. 2 is a flowchart illustrating steps of a method for forwarding a message according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a process of a message to be forwarded according to an embodiment of the present application;
fig. 4 is a schematic diagram of a message speed limiter according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a message manager according to an embodiment of the present application;
fig. 6 is a block diagram of a forwarding layer device of a network function virtualized forwarding system according to an embodiment of the present application;
fig. 7 is a schematic diagram of a usage scenario of a network function virtualized forwarding system according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions in the embodiments of the present application, the following descriptions will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the embodiments of the present application shall fall within the scope of protection of the embodiments of the present application.
Embodiments of the present application are further described below with reference to the accompanying drawings of embodiments of the present application.
Fig. 1 illustrates an exemplary system to which the message forwarding method according to the embodiments of the present application is applied. As shown in fig. 1, the system 100 adopts a three-layer architecture, namely a forwarding layer 101, a forwarding management layer 102 and a logic layer 103. The logic layer 103 is connected to at least one forwarding management layer 102, and the forwarding management layer 102 is connected to at least one forwarding layer 101.
Specifically, the distributed fast and slow separation architecture system for carrying network elements generally includes a three-layer architecture, where the first layer is a forwarding layer 101, also called PT (Packet Transformation, general packet forwarding) layer, responsible for high-level abstraction, and performing packet forwarding processing according to a key/match/action table. The second layer is a forwarding management layer 102, also called as FM (Fabric Master) layer, which is responsible for processing capabilities such as Fabric management, interface management, and Action processing. The third layer is a logic layer 103, also called SD (Service description) layer, which is responsible for generating network function logic of the match/action table, including first packet triggering or priority configuration, and from the perspective of speed separation, describing the use of a dual layer of speed forwarding, the PT/FM layer is collectively called a fast forwarding portion of the NFV system, and the SD layer is called a forwarding logic configuration portion of the NFV system.
In a network function virtualization forwarding system with fast and slow separation, in order to avoid the situation that when a network between forwarding devices is congested, data flows may be discarded to cause loss of important message data, priority identification needs to be performed on the messages, the messages with high priority are sent preferentially, and the probability that the messages with high priority are discarded is guaranteed to be low, so that the probability that important messages are lost when the network is congested can be guaranteed to be low, and the technology is called a quality of service (Quality of Service, qos) technology.
In the existing QoS technology of the conventional physical network, in order to implement timely and preferential transmission of important messages, the messages are generally marked and identified by the following two methods.
One is by 802.1p prioritization in the ethernet data frame VLAN header. The PRI field, i.e., 802.1p priority, or CoS (Class of Service) field, in the VLAN header identifies the quality of service requirements, i.e., the priority of the message, specifically according to the IEEE 802.1Q definition.
Another is to set and identify the priority of the message through DSCP (Differentiated Services Code Point) field, specifically RFC1349 redefines ToS (Type of Service) field in the IP message, adds C bits, which represents the transmission overhead (molnetary Cost), redefines bits 0-5 in the ToS field of the IPv4 header as DSCP, and renames the ToS field to DS (Differentiated Service) bytes, where the DSCP field is used to carry the priority of the message.
However, the following problems exist when the packet priority marking and identifying technology in the QoS technology of the conventional physical network is applied to the distributed fast and slow separation architecture:
1. when the VLAN frame header mode of the Ethernet data frame is adopted, because VLAN fields are mainly occupied by physical networks in the fast and slow separation architecture, VLAN fields included in a message are stripped when the message arrives at a PT layer, and therefore the message identification and marking cannot be realized by using the scheme in the fast and slow separation architecture.
2. When the DSCP field mode is adopted, because in the fast and slow separation architecture, the DSCP field belongs to the original message of the user, and the forwarding system requires transparent transmission of the message, the forwarding system cannot modify the content of the DSCP field, so that the DSCP field cannot be used to correspond to the self-defined priority, therefore, the field cannot be used in NFV, and the IP field of the outer layer message is generally used by the physical data center network, so that the scheme cannot be used in the fast and slow separation architecture to realize message identification and marking.
In view of this, the present application provides another scheme, writing priority information into header information encapsulated by a network virtualization protocol, analyzing header information of a received message to be forwarded to obtain priority information included in the header information, so as to obtain priority of the message to be forwarded, thereby preferentially forwarding an important message according to the priority of the message to be forwarded, avoiding discarding important message data when a network is blocked, and marking priority information of the message to be forwarded which does not include priority information, so that the message to be forwarded which does not include priority information can be forwarded preferentially according to the marked priority information, and avoiding discarding important message data, so that the message forwarding method provided by the present application can avoid losing important message data; further, for the message to be forwarded which does not include the priority information, the priority information corresponding to the message can be obtained and stored in the table entry, so that the priority information of the message to be forwarded is marked later according to the table entry.
Based on the above system 100, the embodiments of the present application provide a message forwarding method, which is described in the following by a plurality of embodiments.
Fig. 2 is a flowchart of steps of a message forwarding method according to an embodiment of the present application, and the flowchart shown in fig. 2 is mainly used for the forwarding layer 101 in the system. As shown in fig. 2, the message forwarding method includes the following steps S201 to S203.
Step S201, a message to be forwarded is received.
The message to be forwarded is received through the forwarding layer, the received message in the embodiment of the application is packaged with header information through the virtualization protocol, and under the architecture of fast-slow separation, devices in different layers interact through the header information packaged through the virtualization protocol.
Step S202, analyzing the header information encapsulated by the network virtualization protocol in the message to be forwarded, and identifying the priority information included in the header information.
The network virtualization protocol may specifically be a generic network virtualization encapsulation protocol (Generic Network Virtualization Encapsulation, GENEVE).
Analyzing the received message to be forwarded, wherein the analyzing process comprises stripping the outer layer, the stripped outer layer comprises VLAN frames and the like, after stripping the outer layer, analyzing the header information packaged in the message to be forwarded through a network virtualization protocol, and identifying the priority information contained in the header information.
And step 203, if the header information does not include priority information, marking the priority information of the message to be forwarded based on the network virtualization protocol by using the first message marker, so as to forward the message to be forwarded according to the priority information.
And identifying the analysis result of the header information, and if the header information does not comprise the priority information, marking the priority information of the message to be forwarded through a first message marker, so that the message with high priority can be sent preferentially according to the priority information, and specifically, adding the priority information into the header information through the first message marker based on a network virtualization protocol to mark the priority information of the message to be forwarded. The first packet marker may be set in the forwarding layer 101 of the system 100, i.e. the PT layer under the fast and slow separation architecture.
It should be noted that the priority may correspond to the importance and/or timeliness of the message to be forwarded, and the higher the importance and/or timeliness, the more important the data in the message to be forwarded is represented, and thus the higher the corresponding priority.
For example, an information type may be added to the header information of the message based on gene (Generic Network Virtualization Encapsulation, general network virtualization package), where the newly added information type is used to characterize priority information, for example: an Option type is newly added in the header information, the designation of 0x27 indicates that the content carried by the Option is priority information, the priority level is included in the newly added Option type, the priority level value range can be set to be 0-7, and the smaller the value, the higher the priority level.
In one possible implementation manner, when header information encapsulated by a network virtualization protocol in a message to be forwarded is analyzed and priority information included in the header information is identified, the header information can be analyzed to obtain option category identifiers of a plurality of options carried by the header information, the option category identifiers carried by the header information are matched with preset priority category identifiers, and fields used for carrying the priority information in the header information are determined according to a matching result so as to obtain the priority information.
Analyzing header information encapsulated by a network virtualization protocol in the message to be forwarded to obtain a plurality of option category identifiers included in the header information, wherein the option category identifiers can be data types corresponding to the message to be forwarded, function instructions corresponding to the message to be forwarded and the like.
And matching the option category identifiers of the analyzed options with preset priority category identifiers, identifying fields recorded with priority information in the analysis result, and determining the priority corresponding to the message to be forwarded according to the fields. For example: the priority class identifier is 0x27, and then 0x27 identifiers in the option class identifiers of the plurality of options are matched, so that the priority information is obtained.
In one possible implementation, the fields for carrying priority information include: a type field for carrying a priority class identification, a level field for carrying a priority level.
Illustratively, a 0x137 field may be identified, which is denoted as a control class message, and identifies a Type: the Option type, the identification of 0x27, represents that the Option carried content is priority information, and identifies priority: the priority level of the message ranges from 0 to 7, and the smaller the value, the higher the priority.
In the embodiment of the present application, the fields carrying the priority information include: the type field used for carrying the priority class identifier and the grade field used for carrying the priority grade can accurately identify the corresponding priority, so that the message with high priority can be forwarded preferentially, and the message with high priority can be prevented from being abandoned.
Alternatively, when the header information of the message to be forwarded does not include priority information, a preset default priority process may be used for the message to be forwarded, for example: the default priority may be preset as the priority, that is, after the message to be forwarded with the high priority is processed, the message to be forwarded with the priority is processed without the header information.
In the embodiment of the application, the header information of the received message to be forwarded is analyzed to obtain the priority information included in the header information, so that the priority of the message to be forwarded can be obtained, important message data can be prevented from being abandoned when the network is blocked according to the priority of the message to be forwarded, the message to be forwarded which does not include the priority information is marked with the priority information, and the message to be forwarded which does not include the priority information can be forwarded with priority according to the marked priority information, so that the message with high priority is prevented from being abandoned according to the marked priority information, and the important message data can be prevented from being lost by the message forwarding method provided by the application.
In one possible implementation manner, when the first message marker marks the priority of the message to be forwarded based on the network virtualization protocol, the message to be forwarded can be matched with the pre-stored priority information. If the priority information corresponding to the message to be forwarded is matched, the priority of the message to be forwarded is marked by the first message marker according to the matched priority information and based on the network virtualization protocol.
When the header information of the message to be forwarded does not include priority information, an index value (key value) can be calculated according to an access interface of the message to be forwarded, a message type of the message to be forwarded, a message content of the message to be forwarded and the like, and matching is performed in the pre-stored priority information according to the index value, so that the priority information corresponding to the message to be forwarded is determined.
When the priority information corresponding to the message to be forwarded is matched, the first message marker marks the priority of the message to be forwarded based on the identified priority information, for example, the marking method can be based on a network virtualization protocol, namely, gene adds a new Option type in the header information of the message and is used for representing the priority information, and adds a priority value in the Option according to the corresponding priority level, so that the message to be forwarded without the priority information is marked, and the data content in the message to be forwarded is not required to be changed.
In the embodiment of the application, the message to be forwarded is matched with the pre-stored priority information, if the corresponding priority information is matched, the message to be forwarded is marked with the priority according to the priority information, so that the message to be forwarded without the priority can be set, the matching is performed according to the pre-set priority information when the priority is set, the situation that the message to be forwarded is set with the wrong priority is avoided, and important message data without the priority can be prevented from being abandoned because the message to be forwarded with the high priority is forwarded with priority.
In one possible implementation manner, when the first message marker marks the priority of the message to be forwarded based on the network virtualization protocol, the message to be forwarded can be matched with the pre-stored priority information. If the priority information corresponding to the message to be forwarded is not matched, the message to be forwarded is reported to a logic layer, the message to be forwarded is marked with the priority through a second message marker in the logic layer according to preset forwarding logic and based on a network virtualization protocol, the message to be forwarded with the priority information in the header information is obtained, the message to be forwarded, which is issued by the logic layer, is received, and the steps of analyzing the header information packaged in the message to be forwarded through the network virtualization protocol and identifying the priority information included in the header information are continuously executed.
When the header information of the message to be forwarded does not include priority information, the message to be forwarded is matched with preset priority information, and when the priority information corresponding to the message to be forwarded is not matched, the message is sent to a forwarding management layer, namely an FM layer, and then sent to a logic layer, namely an SD layer through the FM layer. And after the SD layer receives the message to be forwarded, the priority of the message to be forwarded is marked through a second message marker included in the SD layer.
When the second message marker of the SD layer marks the priority of the message to be forwarded, the SD layer recognizes the header information of the received message to be forwarded, then generates corresponding priority information according to the header information and preset forwarding logic, specifically, the SD layer judges the type of the message to be forwarded according to the header information, judges the corresponding priority according to the preset forwarding logic, marks the priority information in the header information of the message to be forwarded, and obtains the message to be forwarded, wherein the header information comprises the priority information.
After the SD layer obtains the message to be forwarded comprising the priority information, the message to be forwarded is sent to the FM layer, the FM layer sends the message back to the PT layer after receiving the message, the PT layer analyzes the header information of the message to be forwarded after receiving the message to be forwarded, the corresponding priority information is obtained, and the follow-up steps are continuously executed.
Optionally, in other implementations of the present application, the FM layer may also be provided with a third packet marker, because one FM layer is connected to at least one PT layer, the third packet marker in the FM layer may store a rule for matching the first packet markers of all connected PT layers, when the PT layer does not match priority information corresponding to the packet to be forwarded, upload the packet to be forwarded to the FM layer, and the third packet marker in the FM layer identifies header information of the packet to be forwarded and matches the corresponding priority information according to the header information, if the header information can match the corresponding priority information, then the packet to be forwarded is sent back to the PT layer, and execute subsequent steps, if the header information does not match the corresponding priority information, then the packet to be forwarded is sent to the SD layer, and the SD layer marks the priority of the packet to be forwarded.
In the embodiment of the application, if the priority information corresponding to the message to be forwarded is not matched, the message to be forwarded is sent to the logic layer to generate the corresponding priority information of the message to be forwarded, so that the priority mark of the message to be forwarded can be realized, and the message is sent to the upper layer under the condition that the priority information is not matched, and the condition that important message data to be forwarded is abandoned due to the fact that the priority information is not matched is avoided, and therefore the fact that important message data which does not include the priority is abandoned can be avoided.
In one possible implementation manner, the forwarding layer may receive the message to be forwarded sent by the logic layer, and continuously perform the steps of analyzing header information encapsulated by the network virtualization protocol in the message to be forwarded, identifying priority information included in the header information, and if the header information includes the priority information, forwarding the message to be forwarded according to the priority information, and updating pre-stored priority information according to the priority information included in the header information.
After receiving the message to be forwarded comprising the priority information, the PT layer forwards the message to be forwarded according to the priority information of the message to be forwarded, and updates the matching relation between the priority information and the header information of the corresponding message to be forwarded to the pre-stored priority information, so that the message to be forwarded of the same type can be marked with priority according to the pre-stored priority information after being received next time, and the message to be forwarded does not need to be sent upwards.
In the embodiment of the application, after the PT layer receives the message to be forwarded, which is sent back by the SD layer and comprises the priority information, the message to be forwarded is forwarded according to the priority information, so that the message to be forwarded with high priority can be forwarded preferentially, the important message to be forwarded is ensured not to be abandoned, and the PT layer updates the stored priority information according to the corresponding relation between the message to be forwarded and the priority, so that the message to be forwarded can be marked with the priority after the similar message to be forwarded is received next time without uploading the message to be forwarded to the SD layer, and the efficiency of marking the message to be forwarded is improved.
Referring to fig. 3, a schematic flow diagram of a process of a forwarding layer receiving a message to be forwarded is schematically shown, and the flowchart may be executed by a subsequent message identifier.
Specifically, after receiving a message to be forwarded, the forwarding layer strips the outer layer L2/L3/L4/layer, and then analyzes the general header information therein to determine whether an option for carrying priority information exists therein, i.e. to determine whether an option of option_type+27 exists.
If the message exists, the message to be forwarded carries priority information, and the message to be forwarded may be the message to be forwarded which is re-issued to the forwarding layer after the priority information is added to the logic layer, the message priority information may be recorded, the subsequent priority forwarding processing may be performed according to the priority information, and the flow table used for storing the priority information may be updated by the message manager according to the priority information carried in the message to be forwarded. If the message does not exist, analyzing an inner layer original message of the message to be forwarded, calculating to generate an index value key of the message, and inquiring in a flow table for storing priority information according to the key value through a message manager.
If the priority information corresponding to the message to be forwarded is queried, namely, flow is queried, the message priority can be recorded, and the first message marker marks the priority information of the message to be forwarded, so that the subsequent priority forwarding processing can be performed according to the priority information.
If the priority information corresponding to the message to be forwarded is not queried, the message to be forwarded can be set as a default priority and reported to the logic layer, and the reporting process specifically corresponds to the mismatch logic in the graph, namely the logic cannot be matched.
In one possible implementation manner, when forwarding a message to be forwarded according to priority information, the message to be forwarded may be added to a corresponding message queue by a message manager according to the priority information, and then the message in the message queue is forwarded according to the priority corresponding to the message queue by a message Wen Xiansu device.
The message manager can divide different queues for messages to be forwarded with different priorities, the messages to be forwarded of all queues are arranged on the same continuous flow table, traffic is segmented, the priority levels of the messages are distinguished through the index area range of the flow table, the higher the priority level is, the smaller the index is, and the higher the priority is, the smaller the table entry capacity is.
Messages to be forwarded with different priorities can be divided into different queues through a flow table, for example: dividing the message to be forwarded with high priority into a queue, dividing the message to be forwarded in the priority into a queue, and the like, dividing the message to be forwarded into different queues according to the priority, sending the queues to a message speed limiter, and forwarding the message to be forwarded in the queue by a message Wen Xiansu device according to the priority corresponding to the queues.
The message speed limiter may include a token bucket, the message queues are ordered according to priority, the queues with high priority are used for putting the message to be forwarded into the token bucket, the token bucket judges whether the rate of the system is met after receiving the message to be forwarded, if so, the message to be forwarded is counted and forwarded, and if not, the message to be forwarded is counted and discarded. The specific working principle of the token bucket is not described in detail herein.
In the embodiment of the application, the messages to be forwarded are divided into the queues according to the priorities by the queue manager, so that the messages to be forwarded with the same priority level can be divided into the same queue, the messages to be forwarded corresponding to different priorities can be screened out, then the messages to be forwarded are forwarded according to the priorities of the message queues by the message Wen Xiansu device, and the messages to be forwarded in the queues with the high corresponding priorities can be forwarded preferentially, so that important messages to be forwarded are avoided from being abandoned when a network is blocked.
For example, referring to fig. 4, a schematic diagram of a message speed limiter is shown, where as shown in the drawing, the message Wen Xiansu device classifies a message according to priority information of the message to be forwarded, and places the message to be forwarded in a queue corresponding to the priority according to the classification result, for example, the priority is divided into 8 priorities of 0-7, and the 8 priorities respectively correspond to queues 1-8 in the drawing.
The message speed limiter can put tokens into the token bucket according to a preset speed, and send the message to be forwarded in the queues 1-8 through the put tokens.
After a token is distributed for the message to be forwarded, judging whether the speed limit rate is met according to the size and the like of the message, if the speed limit rate is not met, discarding the message to be forwarded, and updating the statistical result of the discarded message; if the speed limit rate is met, forwarding the message to be forwarded and updating the statistical result of the counted successfully-sent message.
In one possible implementation, if priority information is stored in advance, the message manager is further configured to update the flow table for storing the priority information.
When the SD layer returns the message to be forwarded, a new priority information list item is returned at the same time, wherein the new priority information list item comprises priority information corresponding to the message to be forwarded, and the message manager can be used for updating a flow list storing the priority information at the moment, namely adding a list item for recording the new priority information into the original flow list storing the priority information.
In the embodiment of the application, the message manager can also be used for updating the flow table storing the priority information, so that the message to be forwarded, which is input into the message manager, can be ensured to be correctly divided into queues, and the situation that the flow table storing the priority information cannot be divided because the flow table storing the priority information has no corresponding information is avoided. Therefore, the important message to be forwarded can be prevented from being abandoned.
For example, referring to fig. 5, a schematic diagram of a message manager is shown, where the message manager mainly updates stored priority information, and searches for whether there is priority information matching a message to be forwarded.
The process of updating the priority information specifically corresponds to the process of installing the flow table in the graph. Specifically, the flow table may be classified according to the priority, and the capacity for storing the priority information corresponding to different classifications may be reserved in the flow table flow, where the classifications may specifically include a high priority, a medium priority, and a low priority, and if 10 ten thousand entries may be stored in the flow table flow, for example, an entry with an index value of 1-1 ten thousand corresponds to the high priority, an entry with an index value of 1 ten thousand-2 ten thousand corresponds to the medium priority, and the remaining entries correspond to the low priority.
After the priority information of the message is obtained, according to the message classification category corresponding to the priority information, checking the flow capacity corresponding to different categories, thereby determining whether the flow capacity is sufficient, if so, calling an index tool ring to obtain an index value idx, writing the priority information into a table entry corresponding to the index value idx, and updating the priority information by installing a flow table.
When searching whether priority information matched with the message to be forwarded exists, inquiring can be carried out in a flow table according to the message to be forwarded, the priority class corresponding to the message is calculated according to the index value idx corresponding to the inquired priority information and the value idx, so that the priority information corresponding to the message is determined, for example, if the index value is between 1 ten thousand and 2 ten thousand, the priority is the middle.
Fig. 6 is a block diagram of a forwarding layer device of a network function virtualization forwarding system according to an embodiment of the present application, where, as shown in fig. 6, the forwarding layer includes a message identifier, a first message marker, and a message Wen Xiansu, where the message identifier is configured to receive a message to be forwarded, parse header information encapsulated by a network virtualization protocol in the message to be forwarded, and identify priority information included in the header information. And the first message marker is used for marking the priority information of the message to be forwarded based on the network virtualization protocol if the header information does not comprise the priority information. The message Wen Xiansu is used for forwarding the message to be forwarded according to the priority information.
In one possible implementation, the message identifier is further configured to match the message to be forwarded with pre-stored priority information; if the priority information corresponding to the message to be forwarded is matched, the priority of the message to be forwarded is marked by the first message marker according to the matched priority information and based on the network virtualization protocol.
In one possible implementation manner, the message identifier is further configured to report the message to be forwarded to the logic layer if the priority information corresponding to the message to be forwarded is not matched, so that the message to be forwarded, which carries the priority information in the header information, is marked with the priority according to the preset forwarding logic and based on the network virtualization protocol by using the second message marker in the logic layer; the message identifier is further configured to receive a message to be forwarded sent by the logic layer, and continuously perform the steps of analyzing header information encapsulated by the network virtualization protocol in the message to be forwarded, and identifying priority information included in the header information.
In a possible implementation manner, the message Wen Biaoji device is further configured to forward the message to be forwarded according to the priority information if the header information includes the priority information, and enable the message manager to update the pre-stored priority information according to the priority information included in the header information.
In one possible implementation manner, the message identifier is further configured to parse the header information to obtain option category identifiers of a plurality of options carried by the header information; and matching the option category identifier carried by the header information with a preset priority category identifier, and determining a field used for carrying the priority information in the header information according to a matching result to obtain the priority information.
In one possible implementation, the fields carrying priority information include: a type field for carrying a priority class identification, a level field for carrying a priority level.
Referring to fig. 7, a schematic diagram of a usage scenario of a network function virtualized forwarding system according to an embodiment of the present application is shown, where the usage scenario includes: a logic layer SD, a forwarding management layer FM, a forwarding layer PT,
the logic layer comprises a second message marker, a message identifier and a message Wen Xiansu device.
The forwarding management layer includes a message identifier and a message Wen Xiansu.
The forwarding layer includes a first message labeler, a message identifier, a message manager, a message Wen Xiansu.
It should be noted that, the specific implementation of the message identifiers, message managers, and message Wen Xiansu is referred to the above embodiments, and will not be described herein again.
In addition, the implementation principles of the first message marker and the second message marker are the same, and are used for marking priority information, and the specific marking method is referred to the above embodiment and will not be described herein.
In this embodiment, the message identifier of the forwarding layer PT is configured to receive a message to be forwarded, determine whether header information encapsulated by a network virtualization protocol in the message to be forwarded includes priority information, and invoke the message manager to determine whether the message to be forwarded corresponds to the priority information in the forwarding layer.
If the message to be forwarded does not include priority information, but there is corresponding priority information in the forwarding layer, the subsequent flow corresponds to the dashed line portion in fig. 7. Specifically, the first message marker may mark priority information of the message to be forwarded, and the message Wen Xiansu device performs forwarding processing according to the priority information.
If the message to be forwarded does not include priority information and the forwarding layer does not have corresponding priority information, processing is continued according to the solid line flow in fig. 7, and the message identifier may specifically call the message Wen Xiansu device to report the message to the FM layer, or report the message to be forwarded to the FM layer through other reporting paths.
The message identifier in the FM layer determines that the message to be forwarded does not include priority information and that the forwarding layer does not have corresponding priority information, and may continue to report to the SD layer.
After the message identifier of the SD layer determines that the message to be forwarded does not include priority information and the forwarding layer does not have corresponding priority information, the message to be forwarded can be marked with the priority information through the second message marker, and the message Wen Xiansu device in the message identifier of the SD layer transmits the data with the header information carrying the priority information to the FM layer.
At this time, the message identifier of the FM layer determines that the message to be forwarded carries priority information, and sends the message to be forwarded to the PT layer according to the priority information through the message Wen Xiansu device.
After the message identifier of the PT layer receives the message to be forwarded, the header information is determined to include the priority information, so that the message manager can update the stored priority information, and forwarding processing is performed on the message to be forwarded through the message Wen Xiansu device.
The system provided by the embodiment can ensure that the forwarding logic of the original distributed fast and slow separation architecture is not changed, so that the forwarding of the message according to different priorities can be realized, and the technical scheme can cover all forwarding models under the fast and slow separation architecture, thereby providing network element products, providing better network communication service capability, solving the problems of delay and blocking of message interaction among forwarding devices under the fast and slow separation architecture and ensuring stronger stability of the network element products.
Referring to fig. 8, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, and the specific embodiment of the present application is not limited to a specific implementation of the electronic device.
As shown in fig. 8, the electronic device may include: a processor 502, a communication interface (Communications Interface) 504, a memory 506, and a communication bus 508.
Wherein:
processor 502, communication interface 504, and memory 506 communicate with each other via communication bus 508.
A communication interface 504 for communicating with other electronic devices or servers.
The processor 502 is configured to execute the program 510, and may specifically perform relevant steps in the foregoing embodiment of the packet forwarding method.
In particular, program 510 may include program code including computer-operating instructions.
The processor 502 may be a CPU or a specific integrated circuit ASIC (Application Specific Integrated Circuit) or one or more integrated circuits configured to implement embodiments of the present application. The one or more processors comprised by the smart device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
A memory 506 for storing a program 510. Memory 506 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may include a plurality of computer instructions, and the program 510 may specifically enable the processor 502 to perform operations corresponding to the packet forwarding method described in any one of the foregoing method embodiments through the plurality of computer instructions.
The specific implementation of each step in the program 510 may refer to the corresponding steps and corresponding descriptions in the units in the above method embodiments, and have corresponding beneficial effects, which are not described herein. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and modules described above may refer to corresponding procedure descriptions in the foregoing method embodiments, which are not repeated herein.
The present application also provides a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the method described in any of the foregoing method embodiments. The computer storage media includes, but is not limited to: a compact disk read Only (Compact Disc Read-Only Memory, CD-ROM), random access Memory (Random Access Memory, RAM), floppy disk, hard disk, magneto-optical disk, or the like.
The embodiment of the application also provides a computer program product, which comprises computer instructions, wherein the computer instructions instruct a computing device to execute the operations corresponding to any one of the message forwarding methods in the method embodiments.
In addition, it should be noted that, the information related to the user (including, but not limited to, user equipment information, user personal information, etc.) and the data related to the embodiment of the present application (including, but not limited to, sample data for training the model, data for analyzing, stored data, presented data, etc.) are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and provide a corresponding operation entry for the user to select authorization or rejection.
It should be noted that, according to implementation requirements, each component/step described in the embodiments of the present application may be split into more components/steps, and two or more components/steps or part of operations of the components/steps may be combined into new components/steps, so as to achieve the purposes of the embodiments of the present application.
The above-described methods according to embodiments of the present application may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and to be stored in a local recording medium downloaded through a network, so that the methods described herein may be processed by such software on a recording medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware such as an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or field programmable or gate array (Field Programmable Gate Array, FPGA). It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a Memory component (e.g., random access Memory (Random Access Memory, RAM), read-Only Memory (ROM), flash Memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor, or hardware, performs the methods described herein. Furthermore, when a general purpose computer accesses code for implementing the methods illustrated herein, execution of the code converts the general purpose computer into a special purpose computer for performing the methods illustrated herein.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The above embodiments are only for illustrating the embodiments of the present application, but not for limiting the embodiments of the present application, and various changes and modifications can be made by one skilled in the relevant art without departing from the spirit and scope of the embodiments of the present application, so that all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of the embodiments of the present application should be defined by the claims.
Claims (14)
1. A message forwarding method applied to a forwarding layer of a network function virtualization forwarding system, the method comprising:
receiving a message to be forwarded;
analyzing header information encapsulated by a network virtualization protocol in the message to be forwarded, and identifying priority information included in the header information;
And if the header information does not include the priority information, marking the priority information of the message to be forwarded based on the network virtualization protocol through a first message marker so as to forward the message to be forwarded according to the priority information.
2. The method of claim 1, wherein the prioritizing the to-be-forwarded message based on the network virtualization protocol by a first message labeler comprises:
matching the message to be forwarded with the pre-stored priority information;
if the priority information corresponding to the message to be forwarded is matched, the first message marker marks the priority of the message to be forwarded based on the network virtualization protocol according to the matched priority information.
3. The method of claim 2, wherein the method further comprises:
if the priority information corresponding to the message to be forwarded is not matched, the message to be forwarded is reported to a logic layer, and the message to be forwarded, which carries the priority information in the header information, is obtained by marking the priority of the message to be forwarded according to preset forwarding logic and based on the network virtualization protocol through a second message marker in the logic layer;
And receiving the message to be forwarded issued by the logic layer, and continuously executing the steps of analyzing the header information encapsulated by the network virtualization protocol in the message to be forwarded, and identifying the priority information included in the header information.
4. A method according to claim 3, wherein the method further comprises:
and if the head information comprises the priority information, forwarding the message to be forwarded according to the priority information, and updating and pre-storing the priority information according to the priority information included in the head information.
5. The method according to claims 1-4, wherein forwarding the message to be forwarded according to the priority information includes:
adding the message to be forwarded to a corresponding message queue according to the priority information through a message manager;
and forwarding the message in the message queue according to the priority corresponding to the message queue through a message Wen Xiansu device.
6. The method of claim 5, wherein the message manager is further configured to update a flow table for storing the priority information if the priority information is stored in advance.
7. The method according to any one of claims 1-4, wherein the parsing header information encapsulated by a network virtualization protocol in the message to be forwarded and identifying priority information included in the header information includes:
analyzing the head information to obtain option category identifiers of a plurality of options carried by the head information;
and matching the option category identifier carried by the header information with a preset priority category identifier, and determining a field used for carrying the priority information in the header information according to a matching result to obtain the priority information.
8. The method of claim 7, wherein the field for carrying the priority information comprises: a type field for carrying a priority class identification, a level field for carrying a priority level.
9. A forwarding layer device of a network function virtualization forwarding system, the forwarding layer device comprising a message identifier, a first message marker, a message Wen Xiansu,
the message identifier is used for receiving a message to be forwarded, analyzing header information encapsulated by a network virtualization protocol in the message to be forwarded, and identifying priority information included in the header information;
The message Wen Biaoji unit is configured to mark priority information for the message to be forwarded based on the network virtualization protocol if the header information does not include the priority information;
the message Wen Xiansu is configured to forward the message to be forwarded according to the priority information.
10. The forwarding layer device of claim 9, wherein the forwarding layer device further comprises a message manager configured to add the message to be forwarded to a corresponding message queue according to the priority information; correspondingly, the message Wen Xiansu device is specifically configured to forward the message in the message queue according to the priority corresponding to the message queue.
11. The network function virtualization forwarding system comprises a forwarding layer, wherein the forwarding layer is used for receiving a message to be forwarded; analyzing header information encapsulated by a network virtualization protocol in the message to be forwarded, and identifying priority information included in the header information; and if the header information does not include the priority information, marking the priority information of the message to be forwarded based on the network virtualization protocol through a first message marker so as to forward the message to be forwarded according to the priority information.
12. The forwarding system of claim 11, wherein the forwarding system further comprises a logic layer, the logic layer being configured to report the message to be forwarded that does not match the priority information to the logic layer;
the second message marker in the logic layer is used for marking the priority of the message to be forwarded based on the network virtualization protocol according to preset forwarding logic to obtain the message to be forwarded, wherein the header information of the message is carried with the priority information;
the forwarding layer is further configured to receive the message to be forwarded sent by the logic layer, and continuously perform the steps of analyzing header information encapsulated by a network virtualization protocol in the message to be forwarded, and identifying priority information included in the header information.
13. An electronic device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to perform operations corresponding to the method of any one of claims 1-8.
14. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310194563.8A CN116192761A (en) | 2023-02-27 | 2023-02-27 | Message forwarding method, forwarding layer device, system, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310194563.8A CN116192761A (en) | 2023-02-27 | 2023-02-27 | Message forwarding method, forwarding layer device, system, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116192761A true CN116192761A (en) | 2023-05-30 |
Family
ID=86436371
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310194563.8A Pending CN116192761A (en) | 2023-02-27 | 2023-02-27 | Message forwarding method, forwarding layer device, system, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116192761A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117914973A (en) * | 2024-01-05 | 2024-04-19 | 凌锐蓝信科技(北京)有限公司 | Message forwarding method, device, network equipment and storage medium |
-
2023
- 2023-02-27 CN CN202310194563.8A patent/CN116192761A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117914973A (en) * | 2024-01-05 | 2024-04-19 | 凌锐蓝信科技(北京)有限公司 | Message forwarding method, device, network equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12107764B2 (en) | Packet processing method for implementing QoS guarantee, device, and system | |
CN103765839B (en) | Variable-based forwarding path construction for packet processing within a network device | |
US7042848B2 (en) | System and method for hierarchical policing of flows and subflows of a data stream | |
CN103582512B (en) | Feature extraction device and network flow identification method, device and system | |
US11165716B2 (en) | Data flow processing method and device | |
CN104956637A (en) | A method, device and system to prioritize encapsulating packets in a plurality of logical network connections | |
US10592316B2 (en) | Message processing method, apparatus, and system | |
CN106161275A (en) | Prediction for service quality exports packet classification | |
CN103329493B (en) | For the method and apparatus avoiding bandwidth of memory to utilize during packet transaction | |
US11558769B2 (en) | Estimating apparatus, system, method, and computer-readable medium, and learning apparatus, method, and computer-readable medium | |
CN108353022A (en) | A kind of processing method of data message, apparatus and system | |
CN100574312C (en) | Analyze the analyzer of packet | |
US8553539B2 (en) | Method and system for packet traffic congestion management | |
CN116192761A (en) | Message forwarding method, forwarding layer device, system, electronic device and storage medium | |
CN112769738B (en) | DetNet data packet processing method and device | |
WO2016150020A1 (en) | Scheduling flow identifier-based packet scheduling method and device | |
WO2024174447A1 (en) | Data processing method and apparatus, storage medium and electronic device | |
CN110099011A (en) | A kind of method and system of entity gateway accessing virtual home gateway | |
CN111740922A (en) | Data transmission method, device, electronic equipment and medium | |
CN115242892B (en) | Stream identifier acquisition method, device, equipment and medium | |
EP4181479A1 (en) | Method for identifying flow, and apparatus | |
CN114866488A (en) | Information flow identification method, network chip and network equipment | |
CN109905325A (en) | A kind of flow bootstrap technique and flow identify equipment | |
CN115134303B (en) | Service flow processing method and device, electronic equipment and storage medium | |
WO2023241037A1 (en) | Message encapsulation method and device, storage medium, and electronic device |
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 |