CN115987912A - Message forwarding control method, device, equipment and storage medium - Google Patents

Message forwarding control method, device, equipment and storage medium Download PDF

Info

Publication number
CN115987912A
CN115987912A CN202211651277.1A CN202211651277A CN115987912A CN 115987912 A CN115987912 A CN 115987912A CN 202211651277 A CN202211651277 A CN 202211651277A CN 115987912 A CN115987912 A CN 115987912A
Authority
CN
China
Prior art keywords
message
original
packet
queue
vxlan
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
Application number
CN202211651277.1A
Other languages
Chinese (zh)
Inventor
何桂林
朱烈伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202211651277.1A priority Critical patent/CN115987912A/en
Publication of CN115987912A publication Critical patent/CN115987912A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a message forwarding control method, a device, equipment and a storage medium, wherein the method comprises the following steps: and adding the received original message into a corresponding message queue according to the message type, encapsulating the original message, adding a corresponding priority identifier to obtain an encapsulated VXLAN message, and forwarding the VXLAN message according to a preset scheduling strategy. By setting different priorities for different types of messages, known unicast messages with higher priorities can be scheduled and forwarded preferentially when network resources are limited, so that the effective use efficiency of the network resources is improved, and particularly, the stability and the real-time performance of data operation are greatly improved for the application scene of a data center with low time delay and high bandwidth.

Description

Message forwarding control method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer network communication technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling packet forwarding.
Background
The VXLAN (virtual extensible Local Area Network) technology is a technology for constructing a virtualized two-layer Network on a three-layer Network, and can realize data migration of virtual machines across devices, across partitions and across data centers. With the increasing of data center networks, the number of virtual machines is also increased, so that a large number of BUM (broadcast unicast multicast) messages in the VXLAN are also increased, and a large number of BUM messages occupy limited network resources, which undoubtedly seriously affects the real-time performance and stability of data center services.
The solution proposed at present is to inhibit the BUM message from entering the VXLAN tunnel, as shown in fig. 1, the VTEP1 and the VTEP2 synchronize ARP (Address resolution Protocol) messages with each other, and then the VM1 host can obtain the ARP of the VM3 and the VM4 host by using an ARP reply method. If both VM3 and VM4 are inactive, VTEP2 will not be able to synchronize the ARP of VM3 and VM4 to VTEP1, and VM1 will not be able to request the ARP of the VM3 and VM4 hosts.
It can be seen that completely blocking the transmission of the BUM messages in the network may affect the normal communication of the virtual machines in the network, but if these BUM messages are left to fill in the VXLAN network, the limited network resources are occupied, and the effective utilization rate of the network resources is greatly reduced. Therefore, how to reasonably realize the control forwarding of the BUM message in the VXLAN network becomes a problem to be solved urgently.
Disclosure of Invention
An object of the present application is to provide a method, an apparatus, a device, and a storage medium for controlling forwarding of a message, so as to reasonably implement controlling forwarding of a BUM message in a VXLAN network.
In order to achieve the purpose, the technical scheme adopted by the application is as follows:
in a first aspect, the present application provides a message forwarding control method, which is applied to a tunnel endpoint in a virtual extensible local area network VXLAN, and includes:
receiving an original message sent by a source host;
determining the message type of the original message, and adding the original message into a message queue corresponding to the message type according to the message type, wherein the message type comprises: a known unicast message and a known BUM message;
performing VXLAN tunnel encapsulation on the original message to obtain an encapsulated VXLAN message, wherein a header field of the encapsulated VXLAN message comprises: the priority identification of the VXLAN message;
and scheduling and forwarding the encapsulated VXLAN message according to a preset scheduling strategy.
Optionally, the BUM packet includes: broadcast messages, unknown unicast messages and multicast messages;
the determining the message type of the original message and adding the original message to a message queue corresponding to the message type according to the message type includes:
determining whether the original message is a known unicast message according to a forwarding table of a local record, and if so, adding the original message to a known unicast message queue;
if not, analyzing the protocol type of the original message, if the protocol type of the original message indicates that the original message is a broadcast message, adding the original message into a broadcast message queue, and if the protocol type of the original message is a multicast message, adding the original message into a multicast message queue;
and if the original message is not a known unicast message and the protocol type of the original message is not analyzed, adding the original message into an unknown unicast message queue.
Optionally, the performing VXLAN tunnel encapsulation on the original message to obtain an encapsulated VXLAN message includes:
and adding a VXLAN message header to the original message, and adding a priority identifier of the original message in the VXLAN message header to obtain the VXLAN message.
Optionally, the adding the original packet to the packet queue corresponding to the packet type according to the packet type includes:
determining a message queue corresponding to the original message according to the mapping relation between the message type and the message queue;
and determining whether the number of the messages in the message queue exceeds a preset threshold value, and if not, adding the original message into the message queue.
Optionally, the scheduling and forwarding the encapsulated VXLAN packet according to a preset scheduling policy includes:
and scheduling and forwarding the encapsulated VXLAN message according to a queue priority scheduling strategy.
Optionally, the queue priority scheduling policy includes: the priority of the message queue corresponding to the known unicast message is higher than that of the message queue corresponding to the unknown unicast message, and the priority of the message queue corresponding to the unknown unicast message is higher than that of the message queues corresponding to the broadcast message and the multicast message.
Optionally, the queue priority scheduling policy includes: the priority of the message queue is determined according to the initial priority and the current weight of the message queue, and the current weight of the message queue is determined according to the dequeued message quantity of the message queue.
In a second aspect, the present application provides a packet forwarding control apparatus, where the apparatus includes:
the receiving module is used for receiving an original message sent by a source host;
a determining module, configured to determine a packet type of the original packet, and add the original packet to a packet queue corresponding to the packet type according to the packet type, where the packet type includes: a known unicast message and a known BUM message;
an encapsulation module, configured to perform VXLAN tunnel encapsulation on the original packet to obtain an encapsulated VXLAN packet, where a header field of the encapsulated VXLAN packet includes: the priority mark of the VXLAN message;
and the scheduling module is used for scheduling and forwarding the encapsulated VXLAN message according to a preset scheduling strategy.
Optionally, the BUM packet includes: a broadcast message, an unknown unicast message and a multicast message;
the determination module is further to:
determining whether the original message is a known unicast message according to a forwarding table of a local record, and if so, adding the original message to a known unicast message queue;
if not, analyzing the protocol type of the original message, if the protocol type of the original message indicates that the original message is a broadcast message, adding the original message into a broadcast message queue, and if the protocol type of the original message is a multicast message, adding the original message into a multicast message queue;
and if the original message is not a known unicast message and the protocol type of the original message is not analyzed, adding the original message into an unknown unicast message queue.
Optionally, the encapsulation module is further configured to:
and adding a VXLAN message header to the original message, and adding a priority identifier of the original message in the VXLAN message header to obtain the VXLAN message.
Optionally, the determining module is further configured to:
determining a message queue corresponding to the original message according to the mapping relation between the message type and the message queue;
and determining whether the number of the messages in the message queue exceeds a preset threshold value, and if not, adding the original message into the message queue.
Optionally, the scheduling module is further configured to:
and scheduling and forwarding the encapsulated VXLAN message according to a queue priority scheduling strategy.
Optionally, the queue priority scheduling policy includes: the priority of the message queue corresponding to the known unicast message is higher than that of the message queue corresponding to the unknown unicast message, and the priority of the message queue corresponding to the unknown unicast message is higher than that of the message queues corresponding to the broadcast message and the multicast message.
Optionally, the queue priority scheduling policy includes: the priority of the message queue is determined according to the initial priority and the current weight of the message queue, and the current weight of the message queue is determined according to the dequeued message quantity of the message queue.
In a third aspect, the present application provides an electronic device, comprising: the message forwarding control method comprises a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the message forwarding control method.
In a fourth aspect, the present application provides a computer-readable storage medium, having a computer program stored thereon, where the computer program is executed by a processor to perform the steps of the message forwarding control method.
The beneficial effect of this application is: adding the received original message into a corresponding message queue according to the message type of the original message, carrying out VXLAN tunnel encapsulation on the original message to obtain an encapsulated VXLAN message, and carrying out scheduling forwarding on the VXLAN message according to a preset scheduling strategy and a priority identifier in the encapsulated VXLAN message. By setting different priorities for different types of messages, messages with higher priorities can be scheduled and forwarded preferentially when network resources are limited, so that the effective use efficiency of the network resources is improved, and particularly, the stability and the real-time performance of data operation are greatly improved for the application scenes of low time delay and high bandwidth, such as a data center.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 shows a schematic diagram of forwarding a BUM packet by a two-layer network according to an embodiment of the present application;
fig. 2 shows a flowchart of a message forwarding control method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a further message forwarding control method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a process of determining a message queue according to an embodiment of the present application;
fig. 5 shows a format diagram of a VXLAN header provided in an embodiment of the present application;
fig. 6 shows a flowchart of adding a message to a message queue according to an embodiment of the present application;
fig. 7 is a schematic structural diagram illustrating a message forwarding control apparatus according to an embodiment of the present application;
fig. 8 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are only for illustration and description purposes and are not used to limit the protection scope of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. In addition, one skilled in the art, under the guidance of the present disclosure, may add one or more other operations to the flowchart, or may remove one or more operations from the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
The VXLAN constructs a large two-layer network, the two-layer network needs to forward a BUM message, fig. 1 shows a process of forwarding the BUM message by the two-layer network, where VM denotes a virtual machine, VTEP denotes a VTEP (VXLAN tunnel endpoint), which is a start point and an end point of a VXLAN tunnel, and VXLAN encapsulates and decapsulates user original data frames on the VTEP.
As shown in fig. 1, if the VM1 host communicates with the VM3 host or the VM4 host for the first time, it needs to send an ARP broadcast message, perform VXLAN tunnel encapsulation on the ARP message on the VTEP1 device, transmit the ARP message to the VTEP2 through the VXLAN tunnel, and decapsulate the ARP message on the VTEP2 and then reach the VM3 host or the VM4 host.
With the continuous expansion of a data center network, the number of virtual machines is relatively greatly increased, BUM messages in the VXLAN network are also greatly increased, a large number of BUM messages occupy limited network resources, and the real-time performance and the stability of data center services are possibly seriously affected.
However, completely suppressing the transmission of BUM messages in the network may affect the normal communication of virtual machines in the network. However, the BUM messages are left to fill in the VXLAN network, and occupy limited network resources, so that the effective utilization rate of the network resources is greatly reduced.
Therefore, how to reasonably realize the control forwarding of the BUM message in the VXLAN network becomes a problem to be solved urgently.
Based on the foregoing problem, the present application provides a message forwarding control method, where an execution subject of the method may be the VTEP device, as shown in fig. 2, the method includes:
s201: and receiving an original message sent by a source host.
Optionally, the VTEP apparatus may be connected to multiple hosts, and may receive the original packet sent by the source host through the access port.
For example, referring to fig. 1, VTEP1 in fig. 1 may receive BUM messages sent by VM1 and VM2, and at this time, VM1 and VM2 may be regarded as source hosts of VTEP 1.
Optionally, the original packet may be a known unicast packet, a broadcast packet, an unknown unicast packet, or a multicast packet.
S202: determining the message type of an original message, and adding the original message into a message queue corresponding to the message type according to the message type, wherein the message type comprises: unicast messages and BUM messages are known.
Optionally, the message type of the original message may be a known unicast message or a BUM message.
The known unicast message is a message having an entry in an address table in a one-to-one communication mode, and a common known unicast scenario, for example, a host a performs p i ng operation on a host B.
Optionally, the BUM packet, that is, the broadcast unicast multicast packet, includes a broadcast packet, a multicast packet, and an unknown unicast packet, where:
the unknown unicast message is a message without an entry in an address table in a one-to-one communication mode, and a common unknown unicast scene, for example, a host a performs a packet capturing operation on a host B, and the unknown unicast message is a message when the host a captures the packet and sees the host B.
The broadcast message is a message sent by the host a to all other hosts in the network in all communication modes, for example, an ARP request message.
The multicast packet refers to a packet sent by the host a to another host in the same group as the host a in the network in a one-to-one communication mode, for example, a PI (protocol independent multicast) packet.
Optionally, a packet queue corresponding to each packet type of the original packet may be preconfigured in the VTEP device, and the packet queue may include: known unicast message queues, unknown unicast message queues, broadcast message queues, and multicast message queues.
S203: carrying out VXLAN tunnel encapsulation on the original message to obtain an encapsulated VXLAN message, wherein the head field of the encapsulated VXLAN message comprises: and identifying the priority of the VXLAN message.
Optionally, the VTEP device may identify a message type of an original message sent by the source host, and add a priority identifier to the original message according to the message type when the original message is encapsulated, where the priority identifier is used to indicate a priority when the BUM message is forwarded outward.
For example, after receiving a known unicast message, the VTEP device may add the known unicast message into a known unicast message queue, and add a priority identifier of the known unicast message when encapsulating the known unicast message.
It should be noted that, after receiving the original message, the VTEP device re-encapsulates the original message, adds the message header of the VXLAN protocol, and then forwards the message. The priority identifier can be written into the reserved field of the VXLAN protocol message header in the encapsulation stage, wherein different message types can adopt different numbers as the priority identifier.
It should be noted that the step of adding the original packet to the corresponding packet queue according to the packet type and encapsulating the original packet may be implemented by a tunnel encapsulation end of the VTEP device.
S204: and scheduling and forwarding the encapsulated VXLAN message according to a preset scheduling strategy.
Optionally, the scheduling policy may be a policy of dequeuing the original packet in the packet queue, encapsulating the dequeued original packet to obtain an encapsulated VXLAN packet, and forwarding the VXLAN packet.
Optionally, a scheduling policy may be preconfigured in the tunnel encapsulation end of the VTEP device, and the tunnel encapsulation end of the VTEP device may dequeue the VXLAN packet from high to low in priority to the transmission queue of the physical network port according to the scheduling policy.
Optionally, after the tunnel encapsulation end completes encapsulation of the original message to obtain the VXLAN message and dequeues the VXLAN message to the transmission queue of the physical network port, the tunnel terminating end of the VTEP device may schedule and forward the VXLAN message according to the priority identifier in the header field after decapsulating the VXLAN message according to the priority field in the message after receiving the VXLAN message.
In the embodiment of the application, the received original message is added into the corresponding message queue according to the message type, the original message is subjected to tunnel encapsulation to obtain the VXLAN message with the priority identifier, and then the VXLAN message is scheduled and forwarded according to the preset scheduling strategy. By setting different priorities for different types of messages, messages with higher priorities can be dispatched and forwarded preferentially when network resources are limited, so that the effective utilization efficiency of the network resources is improved, and particularly, the stability and the real-time performance of data operation are greatly improved for the application scene of low time delay and high bandwidth, such as a data center.
Fig. 3 is a flowchart of original message forwarding scheduling provided in the present application, as shown in fig. 3, after receiving an original message, an access port of a VTEP device may first determine a message type of the original message, and add the original message to a corresponding message queue, a tunnel encapsulation end of the VTEP device may encapsulate the original message, and add a priority identifier in an encapsulation stage to obtain an encapsulated VXLAN message, and then the VTEP device may schedule the VXLAN message according to a preset scheduling policy and forward the VXLAN message to a network interface, and after sending the VXLAN message to a tunnel termination end of the VTEP device through the network interface, the tunnel termination end of the VTEP device may decapsulate the VXLAN message, and then perform scheduling forwarding again according to the priority identifier in a header field.
Next, a description is given of the step of determining the packet type of the original packet and adding the original packet to the corresponding packet queue according to the packet type of the original packet, where the BUM packet includes: as shown in fig. 4, the step S202 includes:
s401: and determining whether the original message is a known unicast message according to a forwarding table of the local record, and if so, adding the original message to a known unicast message queue.
Optionally, the locally recorded forwarding table may be a head end copy list for manually or automatically establishing a communication relationship between the local VTEP device and the peer VTEP device, and records a correspondence between the MAC address of the current VTEP device and the MAC addresses of other VTEP devices.
It should be noted that the head end copy list only includes the MAC address of the VTEP device that has established the VXLAN tunnel with the current VTEP device, so that the MAC address included in the original message can be identified and searched in the forwarding table according to the MAC address, and as long as the MAC address included in the message exists in the forwarding table, it can be said that the VXLAN tunnel exists between the current VTEP device and the VTEP device where the destination end of the original message is located, and the original message is a known unicast message.
Optionally, after determining that the packet type of the original packet is a known unicast packet, the VTEP device may add the packet to a packet queue of the known unicast packet.
S402: if not, analyzing the protocol type of the original message, if the protocol type of the original message indicates that the original message is a broadcast message, adding the original message into a broadcast message queue, and if the protocol type of the original message is a multicast message, adding the original message into a multicast message queue.
If the forwarding table does not have the MAC address contained in the current original packet, the current VTEP device may analyze the protocol type of the original packet to determine the packet type thereof.
As a possible implementation manner, the VTEP device may analyze a protocol type of the original packet, and if the protocol type of the original packet is a protocol type of the broadcast packet, for example, a common ARP (Address resolution protocol), the VTEP device may add the original packet to a packet queue of the broadcast packet.
As another possible implementation, if the protocol type obtained by the VTEP device through analysis is the protocol type of the multicast packet, for example, the unrelated multicast protocol, at this time, the VTEP device may add the original packet to the packet queue of the multicast packet.
It should be noted that, the present application only gives two common protocol types of broadcast messages and multicast messages as examples, and it should be understood that the VTEP device may also identify other broadcast or multicast protocol types and add the original message to the corresponding message queue.
S403: and if the original message is not the known unicast message and the protocol type of the original message is not analyzed, adding the original message into an unknown unicast message queue.
If the destination MAC address of the original packet is not found in the head end copy list of the VTEP device, and the protocol type of the original packet is analyzed to be not a broadcast or multicast protocol type, which indicates that the original packet is neither a known unicast packet nor a broadcast packet or a multicast packet, the VTEP device may determine that the original packet is an unknown unicast packet, and add the original packet to an unknown unicast packet queue.
In the embodiment of the application, the message type of the original message is determined and added to the corresponding message queue, so that when the VTEP device schedules and forwards the message, the message with higher priority can be preferentially forwarded, and the effective utilization rate of network resources is improved.
When the VTEP equipment schedules and forwards the received original message, the VXLAN tunnel encapsulation is firstly carried out on the original message, then the VXLAN message obtained after encapsulation is transmitted to other VTEP equipment through the VXLAN tunnel, the VXLAN message is decapsulated by other VTEP equipment, and then the decapsulated VXLAN message is sent to the corresponding virtual machine. VXLAN tunneling is performed on the original message according to VXLAN protocol, as shown in fig. 5, which is an improved format of VXLAN message header given in this application.
Referring to fig. 5, the VXLAN header of the present application includes a VXLAN identification field, a reserved field, a user identification field, and a priority identification field. The VXLAN identification field is used for indicating that the message is a message needing to enter a VXLAN tunnel; the user identification field is used for identifying which VXLAN tunnel the message belongs to; the priority identification field can store the priority identification of the message.
It is worth mentioning that the standard VXLAN protocol header includes VXLAN identification field, reserved field, and user identification field. Some reserved fields in the header of the standard VXLAN protocol may be used as the priority identification field for the present application.
The following is a description of the step of encapsulating the original message by the VXLAN tunnel to obtain an encapsulated VXLAN message, where the step S203 includes:
and adding a VXLAN message header to the original message, and adding the priority identifier of the original message in the VXLAN message header to obtain the VXLAN message.
Optionally, the format of the VXLAN packet header may refer to fig. 5, and VXLAN tunnel encapsulation may be performed on the original packet by a tunnel encapsulation end of the VTEP device, and a priority identifier corresponding to the original packet is added to a priority field of the VXLAN packet header, so as to obtain the VXLAN packet after the original packet is encapsulated.
It should be noted that the priority identifier of the original packet may be the same as the queue identifier of the packet queue, for example, the priority identifier of the known unicast packet is 1111, and the queue identifier of the corresponding known unicast packet queue may also be 1111. For example, if the packet type of the original packet is a known unicast packet, after the packet type is added to a packet queue of the known unicast packet, when a tunnel encapsulation end of the VTEP device encapsulates the original packet, the priority identifier of the known unicast packet queue may be used as the priority identifier of the packet, and is added to the priority identifier field of the VXLAN packet header shown in fig. 5.
As another possible implementation, the VTEP device may pre-establish a mapping relationship between the priority identifier of the original packet and the queue identifier of the packet queue, search the mapping relationship according to the priority identifier of the original packet, and determine the packet queue to which the packet belongs.
Optionally, the priority identifier may indicate the priority of the original packet, and the higher the priority is, it may be indicated that the original packet is scheduled to be forwarded preferentially.
For example, assuming that the priority identification field has 4 bits, the 4 th bit of the priority identification field may be used to identify whether the priority is set, and setting the 4 th bit to 1 may indicate that the priority is set. If bit 4 of the priority identification field is 0, it may indicate that no message priority is set. The first 3 bits of the priority identification field may be used to indicate the level of priority, with 8 levels from 000-111 (i.e., 0-7 in decimal), with higher numbers being more priority.
For example, if the original packet is a known unicast packet and the priority of the known unicast packet is 7, the priority identifier field may be set to 1111, the 4 th bit indicates that the packet is set with the priority identifier, and the first 3 bits may identify that the priority of the packet is 7.
It should be noted that, the above only describes how to add the priority identifier by taking the known unicast packet as an example, after determining that the packet types of the original packet are unknown unicast packet, broadcast packet, and multicast packet, and adding the packet types to the corresponding packet queues, the same method may also be used to add the corresponding priority identifier in the priority identifier field, for example:
when the message queue of the original message is an unknown unicast message queue, a priority identifier corresponding to the unknown unicast message queue may be added to the priority identifier field of the VXLAN message header.
When the message queue of the original message is a broadcast message queue, a priority identifier corresponding to the broadcast message queue can be added to the priority identifier field of the VXLAN message header.
When the message queue of the original message is the multicast message queue, the priority identifier corresponding to the multicast message queue can be added to the priority identifier field of the VXLAN message header.
The step of adding the priority identifier to the priority identifier field may be the same as the step of adding the priority identifier to the known unicast packet, and is not described herein again.
Before adding the priority identifier, the present application may add the original packet into the corresponding packet queue according to the packet type of the original packet, as shown in fig. 6, where the step S202 includes:
s601: and determining a message queue corresponding to the original message according to the mapping relation between the message type and the message queue.
Optionally, the VTEP device may pre-store a mapping relationship between the packet type and the packet queue, and after determining the packet type of the original packet, may determine the corresponding packet queue according to the packet type.
S602: and determining whether the number of the messages in the message queue exceeds a preset threshold value, and if not, adding the original message into the message queue.
Optionally, before adding the original message into the corresponding message queue, the number of existing messages in the current message queue may be determined, and if the number of messages in the current queue does not exceed the preset threshold, that is, the current queue is not full, the original message may be added into the current message queue.
It should be noted that, if the number of the packets in the current queue exceeds the preset threshold, which indicates that the current packet queue is full, the original packets may be discarded at this time, so as to reduce the occupancy rate of the network resources.
After the original message is added to the corresponding message queue, the VTEP device in the present application may schedule and forward the encapsulated VXLAN message according to a preset scheduling policy, where the step S204 includes:
and scheduling and forwarding the encapsulated VXLAN message according to the queue priority scheduling strategy.
Optionally, the queue priority scheduling policy may include: the priority of the message queue corresponding to the known unicast message is higher than that of the message queue corresponding to the unknown unicast message, and the priority of the message queue corresponding to the unknown unicast message is higher than that of the message queues corresponding to the broadcast message and the multicast message.
As a possible implementation, the known unicast message queue may be set to a high priority, the unknown unicast message queue may be set to a medium priority, and the broadcast and multicast message queues may be set to a low priority.
For example, when scheduling and forwarding the VXLAN packet, the VXLAN packet belonging to the known unicast packet queue with high priority may be forwarded first, and after the packet in the high priority queue is forwarded, the VXLAN packet belonging to the medium priority queue is forwarded, and after the packet in the medium priority queue is forwarded, the VXLAN packet in the low priority queue is forwarded.
It should be noted that, by setting the messages in the known unicast message queue to have a high priority, it can be ensured that the known unicast messages are forwarded more, thereby saving resources in the network to the maximum extent.
Optionally, the queue priority scheduling policy may further include: the priority of the message queue is determined according to the initial priority and the current weight of the message queue, and the current weight of the message queue is determined according to the number of dequeued messages of the message queue.
Optionally, the initial priority of the packet queue may be the priority of the packet queue.
As a possible implementation manner, the initial weight of the message queue may be determined according to the initial priority of the message queue and the number of messages in the message queue, and the weight of the current message queue is subtracted by 1 to obtain the current weight of the queue every time a message is forwarded from the message queue.
For example, assuming that the numbers of the messages in the known unicast message queue, the unknown unicast message queue, and the broadcast and multicast message queue are respectively 10, 5, and 11, the initial weights of the known unicast message queue, the unknown unicast message queue, and the broadcast and multicast message queue are respectively 5, 3, and 1 according to the priority of the messages in the message queue and the number of the messages in each message queue, the VTEP device may schedule and forward the messages in the known unicast message queue according to the initial weight, and subtract 1 from the weight every time a message is forwarded, and when the current weight of the message queue is 0, may forward the message in the unknown unicast message queue with the highest weight.
It should be noted that, each time a packet is forwarded, the weight is reduced by 1, and when the number of packets in the packet queue is 0, the packet in the unknown unicast packet queue with the highest weight can also be forwarded.
Optionally, the VTEP device may schedule and forward the packets in the packet queue according to the priority of the packet queue, and forward the packets to other VTEP devices through the network interface or forward the packets to the destination host through the network interface.
In the embodiment of the application, the message in the message queue is scheduled and forwarded by adopting the queue priority scheduling strategy, so that the known unicast message with higher priority can be guaranteed to be preferentially forwarded more, and the effective utilization rate of network resources is effectively improved.
Based on the same inventive concept, the embodiment of the present application further provides a message forwarding control device corresponding to the message forwarding control method, and as the principle of solving the problem of the device in the embodiment of the present application is similar to that of the message forwarding control method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 7, a schematic diagram of a packet forwarding control apparatus provided in an embodiment of the present application is shown, where the apparatus includes: a receiving module 701, a determining module 702, an encapsulating module 703 and a scheduling module 704, wherein:
a receiving module 701, configured to receive an original packet sent by a source host;
a determining module 702, configured to determine a packet type of an original packet, and add the original packet to a packet queue corresponding to the packet type according to the packet type, where the packet type includes: a known unicast message and a known BUM message;
an encapsulating module 703, configured to perform VXLAN tunnel encapsulation on the original message to obtain an encapsulated VXLAN message, where a header field of the encapsulated VXLAN message includes: identifying the priority of the VXLAN message;
and the scheduling module 704 is configured to schedule and forward the encapsulated VXLAN message according to a preset scheduling policy.
Optionally, the determining module 702 is specifically configured to:
determining whether the original message is a known unicast message according to a forwarding table of a local record, and if so, adding the original message to a known unicast message queue;
if not, analyzing the protocol type of the original message, if the protocol type of the original message indicates that the original message is a broadcast message, adding the original message into a broadcast message queue, and if the protocol type of the original message is a multicast message, adding the original message into a multicast message queue;
and if the original message is not the known unicast message and the protocol type of the original message is not analyzed, adding the original message into an unknown unicast message queue.
Optionally, the encapsulation module 703 is further specifically configured to:
and adding a VXLAN message header to the original message, and adding the priority identifier of the original message in the VXLAN message header to obtain the VXLAN message.
Optionally, the determining module 702 is specifically configured to:
determining a message queue corresponding to the original message according to the mapping relation between the message type and the message queue;
and determining whether the number of the messages in the message queue exceeds a preset threshold value, and if not, adding the original messages into the message queue.
Optionally, the scheduling module 704 is specifically configured to:
and scheduling and forwarding the encapsulated VXLAN message according to the queue priority scheduling strategy.
Optionally, the queue priority scheduling policy includes: the priority of the message queue corresponding to the known unicast message is higher than that of the message queue corresponding to the unknown unicast message, and the priority of the message queue corresponding to the unknown unicast message is higher than that of the message queues corresponding to the broadcast message and the multicast message.
Optionally, the queue priority scheduling policy includes: the priority of the message queue is determined according to the initial priority and the current weight of the message queue, and the current weight of the message queue is determined according to the number of dequeued messages of the message queue.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
According to the method and the device, the received original message is added into the corresponding message queue according to the message type, VXLAN tunnel encapsulation is carried out on the original message to obtain the encapsulated VXLAN message, and the VXLAN message is scheduled and forwarded according to a preset scheduling strategy and the priority identification in the encapsulated VXLAN message. By setting different priorities for different types of messages, the messages with higher priorities can be dispatched and forwarded preferentially when network resources are limited, so that the effective use efficiency of the network resources is improved, and particularly, the stability and the real-time performance of data operation are greatly improved for the application scene of a data center, namely, low time delay and high bandwidth.
An embodiment of the present application further provides an electronic device, as shown in fig. 8, which is a schematic structural diagram of the electronic device provided in the embodiment of the present application, and the electronic device includes: a processor 81, a memory 82 and a bus. The memory 82 stores machine-readable instructions (such as execution instructions corresponding to the receiving module 701, the determining module 702, the encapsulating module 703 and the scheduling module 704 in the apparatus in fig. 7) executable by the processor 81, when the computer device runs, the processor 81 communicates with the memory 82 through a bus, and the machine-readable instructions are executed by the processor 81 to perform the processing of the message forwarding control method.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program executes the steps of the message forwarding control method.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall cover the scope of the present application.

Claims (10)

1. A message forwarding control method is applied to a tunnel endpoint in a virtual extensible local area network (VXLAN), and comprises the following steps:
receiving an original message sent by a source host;
determining the message type of the original message, and adding the original message into a message queue corresponding to the message type according to the message type, wherein the message type comprises: a known unicast message and a known BUM message;
performing VXLAN tunnel encapsulation on the original message to obtain an encapsulated VXLAN message, wherein a header field of the encapsulated VXLAN message comprises: the priority identification of the VXLAN message;
and scheduling and forwarding the encapsulated VXLAN message according to a preset scheduling strategy.
2. The method of claim 1, wherein the BUM message comprises: broadcast messages, unknown unicast messages and multicast messages;
the determining the message type of the original message and adding the original message to a message queue corresponding to the message type according to the message type includes:
determining whether the original message is a known unicast message according to a forwarding table of a local record, and if so, adding the original message to a known unicast message queue;
if not, analyzing the protocol type of the original message, if the protocol type of the original message indicates that the original message is a broadcast message, adding the original message into a broadcast message queue, and if the protocol type of the original message is a multicast message, adding the original message into a multicast message queue;
and if the original message is not a known unicast message and the protocol type of the original message is not analyzed, adding the original message into an unknown unicast message queue.
3. The method according to claim 1, wherein the encapsulating the original message with a VXLAN tunnel to obtain an encapsulated VXLAN message comprises:
and adding a VXLAN message header to the original message, and adding a priority identifier of the original message in the VXLAN message header to obtain the VXLAN message.
4. The method according to claim 1, wherein the adding the original packet to the packet queue corresponding to the packet type according to the packet type comprises:
determining a message queue corresponding to the original message according to the mapping relation between the message type and the message queue;
and determining whether the number of the messages in the message queue exceeds a preset threshold value, and if not, adding the original message into the message queue.
5. The method according to any one of claims 1-4, wherein the scheduling forwarding the encapsulated VXLAN packet according to a preset scheduling policy comprises:
and scheduling and forwarding the encapsulated VXLAN message according to a queue priority scheduling strategy.
6. The method of claim 5, wherein the queue priority scheduling policy comprises: the priority of the message queue corresponding to the known unicast message is higher than that of the message queue corresponding to the unknown unicast message, and the priority of the message queue corresponding to the unknown unicast message is higher than that of the message queues corresponding to the broadcast message and the multicast message.
7. The method of claim 5, wherein the queue priority scheduling policy comprises: the priority of the message queue is determined according to the initial priority and the current weight of the message queue, and the current weight of the message queue is determined according to the dequeued message quantity of the message queue.
8. A message forwarding control apparatus, comprising:
the receiving module is used for receiving an original message sent by a source host;
a determining module, configured to determine a packet type of the original packet, and add the original packet to a packet queue corresponding to the packet type according to the packet type, where the packet type includes: a known unicast message and a known BUM message;
an encapsulation module, configured to perform VXLAN tunnel encapsulation on the original packet to obtain an encapsulated VXLAN packet, where a header field of the encapsulated VXLAN packet includes: the priority mark of the VXLAN message;
and the scheduling module is used for scheduling and forwarding the encapsulated VXLAN message according to a preset scheduling strategy.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is running, the processor executing the program instructions to perform the steps of the message forwarding control method according to any one of claims 1 to 7 when executed.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the message forwarding control method according to any one of claims 1 to 7.
CN202211651277.1A 2022-12-21 2022-12-21 Message forwarding control method, device, equipment and storage medium Pending CN115987912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211651277.1A CN115987912A (en) 2022-12-21 2022-12-21 Message forwarding control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211651277.1A CN115987912A (en) 2022-12-21 2022-12-21 Message forwarding control method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115987912A true CN115987912A (en) 2023-04-18

Family

ID=85967500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211651277.1A Pending CN115987912A (en) 2022-12-21 2022-12-21 Message forwarding control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115987912A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577417A (en) * 2014-11-06 2016-05-11 杭州华三通信技术有限公司 VXLAN (virtual extensible local area network)-based massage forwarding method and device
CN105591971A (en) * 2015-10-28 2016-05-18 杭州华三通信技术有限公司 QoS implementation method and device
JP2017034431A (en) * 2015-07-31 2017-02-09 日本電信電話株式会社 Communication system and communication method
CN106453144A (en) * 2015-08-10 2017-02-22 华为技术有限公司 Message processing method and device in software-defined network
US20170141963A1 (en) * 2015-11-18 2017-05-18 Telefonaktiebolaget L M Ericsson (Publ) Designated forwarder (df) election and re-election on provider edge (pe) failure in all-active redundancy topology
CN109194560A (en) * 2018-08-29 2019-01-11 迈普通信技术股份有限公司 Method of multicasting and VTEP
CN110868357A (en) * 2018-08-27 2020-03-06 中兴通讯股份有限公司 Network flow control method, VTEP device and storage medium
CN111064659A (en) * 2018-10-17 2020-04-24 丛林网络公司 Node protection of BUM traffic for multi-homed node failures
CN111917664A (en) * 2020-06-30 2020-11-10 北京瀚诺半导体科技有限公司 Queue management method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577417A (en) * 2014-11-06 2016-05-11 杭州华三通信技术有限公司 VXLAN (virtual extensible local area network)-based massage forwarding method and device
JP2017034431A (en) * 2015-07-31 2017-02-09 日本電信電話株式会社 Communication system and communication method
CN106453144A (en) * 2015-08-10 2017-02-22 华为技术有限公司 Message processing method and device in software-defined network
CN105591971A (en) * 2015-10-28 2016-05-18 杭州华三通信技术有限公司 QoS implementation method and device
US20170141963A1 (en) * 2015-11-18 2017-05-18 Telefonaktiebolaget L M Ericsson (Publ) Designated forwarder (df) election and re-election on provider edge (pe) failure in all-active redundancy topology
CN110868357A (en) * 2018-08-27 2020-03-06 中兴通讯股份有限公司 Network flow control method, VTEP device and storage medium
CN109194560A (en) * 2018-08-29 2019-01-11 迈普通信技术股份有限公司 Method of multicasting and VTEP
CN111064659A (en) * 2018-10-17 2020-04-24 丛林网络公司 Node protection of BUM traffic for multi-homed node failures
CN111917664A (en) * 2020-06-30 2020-11-10 北京瀚诺半导体科技有限公司 Queue management method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KEISUKE MATSUO: "TE-Cast:Supporting General Broadcast/Multicast Communicaitons in Virtual Networks", 《2015 IEEE/ACM 8TH INTERNATIONAL CONFERNECE ON UTILITY AND CLOUD COMPUTING》, 14 March 2016 (2016-03-14) *
魏雪梅: "基于VXLAN的跨数据中心虚拟机动态迁移组网设计实现", 《中国优秀硕士学位论文全文数据库》, 15 January 2021 (2021-01-15) *

Similar Documents

Publication Publication Date Title
CN113326228B (en) Message forwarding method, device and equipment based on remote direct data storage
CN112422393B (en) Method for transmitting message of extensible virtual local area network, computer equipment and readable medium
EP3404878B1 (en) Virtual network apparatus, and related method
US9141420B2 (en) Overload control in a cloud computing environment
EP2905930B1 (en) Processing method, apparatus and system for multicast
US9774532B2 (en) Information processing system, information processing apparatus and control method of information processing system
WO2020083016A1 (en) Data transmission method and device
CN110048963B (en) Message transmission method, medium, device and computing equipment in virtual network
CN110311860B (en) Multilink load balancing method and device under VXLAN
EP2890064B1 (en) Packet forwarding method and system
CN113132202B (en) Message transmission method and related equipment
US20190220296A1 (en) Method and apparatus for transmitting data packet based on virtual machine
CN114095460B (en) Message broadcasting method and device
CN113726636B (en) Data forwarding method and system of software forwarding device and electronic device
CN110391961B (en) Tunnel binding method, device and system
EP3503484A1 (en) Message transmission method, device and network system
CN111294316B (en) Network isolation method and device based on user mode protocol stack virtual router
WO2018057165A1 (en) Technologies for dynamically transitioning network traffic host buffer queues
WO2020108292A1 (en) Virtual private cloud communication system, system configuration method and controller
KR101996337B1 (en) Switch processing method, controller, switch, and switch processing system
CN115987912A (en) Message forwarding control method, device, equipment and storage medium
CN113596038B (en) Data packet parsing method and server
EP3731497A1 (en) Service processing method and network device
EP3913865B1 (en) Message decapsulation method and device, message encapsulation method and device, electronic device, and storage medium
CN113630341A (en) Data information processing method and server

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