CN115225708A - Message forwarding method, computer equipment and storage medium - Google Patents

Message forwarding method, computer equipment and storage medium Download PDF

Info

Publication number
CN115225708A
CN115225708A CN202210900751.3A CN202210900751A CN115225708A CN 115225708 A CN115225708 A CN 115225708A CN 202210900751 A CN202210900751 A CN 202210900751A CN 115225708 A CN115225708 A CN 115225708A
Authority
CN
China
Prior art keywords
message
virtual router
flow table
node
forwarding
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.)
Granted
Application number
CN202210900751.3A
Other languages
Chinese (zh)
Other versions
CN115225708B (en
Inventor
黄永远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud 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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202210900751.3A priority Critical patent/CN115225708B/en
Publication of CN115225708A publication Critical patent/CN115225708A/en
Application granted granted Critical
Publication of CN115225708B publication Critical patent/CN115225708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

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

Abstract

The embodiment of the application provides a message forwarding method, computer equipment and a storage medium, which relate to the technical field of cloud computing, wherein the method comprises the steps of determining a virtual router for transmitting a message aiming at the message sent by any instance by a node with an elastic IP address instance in a cloud platform; any virtual router is arranged in a transit server connected with a core switch; and sending the message to the virtual router according to a first flow table in the node, and forwarding the message through the virtual router based on a second flow table in the virtual router. By the message forwarding mode, the message forwarding speed is improved, the capacity of the core switch is released, and the resources of the core switch are effectively utilized.

Description

Message forwarding method, computer equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of cloud computing, in particular to a message forwarding method, computer equipment and a storage medium.
Background
The cloud platform has a plurality of nodes, and the message is a data block sent by the nodes in the cloud platform. The message contains complete data information to be sent, and the length is not limited and can be changed. The principle is that when a node wants to send a message, it attaches a destination address to the message, and the node sends the message to the next node according to the destination address information on the message, and forwards the message to the destination node one by one. After each node receives the whole message and checks it, it temporarily stores the message, then uses the route information to find out the address of the next node, and then transmits the whole message to the next node.
Currently, in the field of cloud computing, when each node in a cloud platform performs packet transmission, the node is implemented by a core switch. Referring to fig. 1, any node in the cloud platform 103 sends a packet to the core switch 101, and the core switch 101 transmits the packet through the network. Because the number of nodes in the cloud platform is large, and each node includes a plurality of instances (each instance has an independent flexible IP and can independently receive and transmit a message), the core switch needs to store ARP (Address Resolution Protocol) information of each instance in order to implement a message forwarding function. In the face of a large amount of ARP information to be processed, a core switch with relatively high performance is required. However, the core switch cannot handle a large number of instances due to the limitation of hardware configuration.
In summary, in order to solve the problem of low hardware configuration of the core switch, a method suitable for large-scale example packet forwarding is needed.
Disclosure of Invention
The embodiment of the application provides a message forwarding method, computer equipment and a storage medium, and solves the problem that the requirement on hardware configuration is high in the process of forwarding messages of large-scale examples.
In a first aspect, an embodiment of the present application provides a message forwarding method, which is applicable to a node having an elastic IP address instance in a cloud platform; the method comprises the following steps:
aiming at a message sent by any example, determining a virtual router for transmitting the message; any virtual router is arranged in a transit server connected with a core switch;
and sending the message to the virtual router according to a first flow table in the node, and forwarding the message through the virtual router based on a second flow table in the virtual router.
By arranging the transit server between the core switch and the cloud platform, any node in the cloud platform is not directly transmitted to the core switch when transmitting the message, but is forwarded through the virtual router in the transit server. In the process, the core switch only needs to learn the ARP information of the virtual router, so that the workload of learning the ARP information by the core switch is reduced, and the requirement on the storage capacity of the core switch can be met. Meanwhile, for the virtual router, as the virtual router is generated on the transit server in a software mode, the learned ARP information of each instance does not need to consider the limitation of hardware capacity, and the horizontal capacity expansion of the cloud platform can be met. Finally, the flexibility of node and virtual router configuration is realized by forwarding the message in a flow table mode, so that the message forwarding becomes a production line, and the speed is also improved.
In one possible design, determining a virtual router that transmits the packet includes: determining a transit service cluster corresponding to the subnet according to the corresponding relation between the subnet and the transit service cluster based on the subnet to which the node belongs; any transit service cluster comprises a plurality of transit servers.
And determining the virtual router for transmitting the message based on the load condition of each virtual router in the transit service cluster.
Through the mode, the plurality of transit servers are divided into different clusters, and on the other hand, the corresponding relation is established between the sub-network to which each node in the cloud platform belongs and the transit service cluster, so that the flow fragmentation of the cloud platform is realized. Meanwhile, the nodes can acquire the load conditions of the virtual routers in the corresponding transit service cluster, so that flow load balance can be realized when the virtual routers required for transmitting the messages are determined.
In one possible design, the correspondence between the sub-network and the transit service cluster is configured into the node by a control node.
The nodes in the cloud platform include a control node, various computing nodes and a network node. The control node is used for establishing a subnet as a gateway of the virtual network, and the control node searches for a corresponding node in the transmission process of the control data; the computing node is used for establishing a corresponding control node network bridge to realize external access. In the above manner, the corresponding relationship between the subnet and the transit service cluster is maintained in the control node, and the control node notifies each computing node. The control nodes are maintained in a unified mode, the calculation nodes are more targeted in the transmission process, the target nodes can be accurately sent, and the condition that a transmission path is disordered is avoided.
In one possible design, a first flow table in the node sends the packet to the virtual router, including:
determining a first transmission path of the message through a first flow table in the node according to the source IP address of the message; the first transmission path comprises three-layer forwarding through the core switch or two-layer forwarding or three-layer forwarding through a virtual router;
establishing an extensible virtual local area network VXLAN tunnel with the virtual router;
and sending the message to the virtual router through the VXLAN tunnel according to the first transmission path.
By the method, when the flow table in the node forwards the message, the elastic IP can search for matching at one level in the flow table, and the corresponding source IP address is found to form a path.
In the process of forwarding the message of the network, the two-layer forwarding and the three-layer forwarding are divided. The two-layer forwarding means that the two-layer forwarding is in the same network segment with the target IP and the source IP; three-layer forwarding means that the IP and the source IP are not in the same network segment. In the above manner, the virtual router is a two-layer device and a three-layer device, the core switch is a three-layer device, and all the devices forward the message through the flow table, and the message is sent through the virtual router configured in the extensible virtual local area network VXLAN tunnel, and the forwarding manner can be accurately sent to the target node, so that broadcast flooding is avoided.
In a second aspect, an embodiment of the present application provides a packet forwarding method, including:
the transfer server is suitable for forwarding messages for the cloud platform and is connected with the core switch; the method comprises the following steps:
aiming at any virtual router arranged in the transit server, receiving a message sent by any instance of any node in the cloud platform; the instance has a resilient IP address; the message is sent to the virtual router by the node according to the first flow table;
and forwarding the message through the virtual router based on a second flow table in the virtual router.
In the above manner, the virtual router in the transit server and the message nodes on the cloud platform are matched according to the internal flow tables thereof, and based on the matching and processing of the multi-stage flow tables, the space of the flow tables and the logicality of data processing are saved, and the message forwarding rate is improved.
In one possible design, the virtual router uses the DPDK (data plane discovery Kit) framework for forwarding.
The DPDK is a software library used for accelerating packet data processing, so that the framework can be adopted to improve the network forwarding rate and accelerate the data forwarding function.
In one possible design, a distributed controller is disposed in the virtual router;
sending an ARP request to the core switch through the distributed controller;
and obtaining the MAC address of the core switch based on the ARP response fed back by the core switch, and updating the second flow table.
The distributed controller is a relatively perfect control and management system in the production process. In the above mode, the virtual router provided with the distributed controller sends the request to know the destination address, so that the corresponding destination address can be known before forwarding, therefore, when the destination address of the core switch is changed, the core switch can be switched at any time, and the application design has certain reliability and flexibility.
In one possible design, forwarding, by the virtual router, the packet based on a second flow table in the virtual router includes:
determining a second transmission path of the message through a second flow table in the virtual router according to the destination address of the message;
and forwarding the message through the second transmission path.
Therefore, after the flow table in the virtual router determines the destination address of the message, the corresponding transmission path can be acquired through the flow table inside the virtual router, and the high-performance forwarding capability can be provided.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; the memory is used for storing program instructions; the processor is configured to invoke the program instructions in the memory to cause the electronic device to execute the message forwarding method in any one of the possible designs of the first aspect and the second aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program executable by a computing device, and when the program runs on the computing device, the computer program causes the computing device to perform the message forwarding method according to any of the first and second aspects.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram of a prior art system architecture;
FIG. 2 is a system architecture diagram according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for forwarding a packet according to an embodiment of the present application;
FIG. 4 provides another system architecture diagram for an embodiment of the present application;
FIG. 5 is a schematic diagram of a flow table provided in an embodiment of the present application;
FIG. 6 is another flow table schematic provided by an embodiment of the present application;
FIG. 7 is a diagram of a DPDK framework according to an embodiment of the present application;
fig. 8 is a schematic diagram of a message forwarding apparatus according to an embodiment of the present application;
fig. 9 is a schematic diagram of another message forwarding apparatus according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a computing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 2, the system architecture diagram provided in the embodiment of the present application includes at least a core switch 101, a transit server 102, and a cloud platform 103.
The core switch 101 is used to implement a network management function, that is, complete the forwarding of data during data transmission.
The transit server 102 is configured with a virtual router, and is mainly used for learning an instance of each node of the cloud platform 103, thereby completing forwarding of data of the embodiment.
The cloud platform 103 refers to a platform that provides computing, networking, and storage capabilities based on services of hardware resources and software resources. The cloud platform has a large number of nodes with a large number of instances thereon with their corresponding resilient IPs.
The cloud platform 103 and the transit server 102, and the transit server 102 and the core switch 101 and the virtual router may be connected through a wired network or a wireless network, which is not limited herein.
In the prior art, when message forwarding is implemented, the core switch 101 needs to perform ARP learning on an instance in each node on a cloud platform, but the capacity of the core switch 101 is limited, so that the resource of the core switch is unavailable. The embodiment of the application provides a message forwarding method, which is applied to the field of cloud computing and can release the pressure of a core switch by effectively utilizing the resources of a virtual router.
In the embodiment of the present application, the virtual router configured in the transit server 102 replaces the core switch 101 to learn the ARP information of each node instance of the cloud platform 103, and the core switch 101 only needs to learn the ARP information on the virtual router.
For example, in the prior art, when a packet is forwarded, there are 300 nodes on a cloud platform, there are 100 instances with elastic IPs corresponding to each node, and at this time, the core switch learns more than 300 instances but 30000 instances with elastic IPs, and the capacity of the core switch can only serve 20000 instances with elastic IPs.
In the application, the cloud platform has 300 nodes, and there are 100 instances with elastic IP corresponding to each node, and in the process of forwarding the message, the virtual switch learns the 30000 instances, and assuming that there are 200 instances in the virtual router 202, the core switch 101 only needs to learn the ARP information of 200 virtual routers on the virtual router.
Referring to fig. 3, fig. 3 is a schematic flow chart of a method for forwarding a packet according to an embodiment of the present application, including:
s301, determining a virtual router for transmitting a message by a node with an elastic IP address example in a cloud platform aiming at the message sent by any example; any virtual router is arranged in a transit server connected with the core switch;
a transit server with the function of playing a virtual router is arranged between a cloud platform and a core switch. Any node on the cloud platform sends a message, and the message passes through the virtual router and then the core switch. The virtual router is used for realizing the function simulation of a physical router on a software layer and a hardware layer, belongs to a logic device and mainly improves the elasticity and the flexibility of a network.
S302, the message is sent to the virtual router according to a first flow table in the node, and the message is forwarded through the virtual router based on a second flow table in the virtual router.
Data with certain common characteristics or attributes passing through the same network at the same time are abstracted into a flow, the flow is generally defined by a network administrator, and different strategies can be executed according to different flows, so that the flow table is a set of strategy table entries aiming at a specific flow and is responsible for searching and forwarding data packets. In the embodiment of the application, when a message is forwarded, a corresponding virtual router is determined first, and then the forwarding of the message is completed through cooperation of a first flow table set in a node on a cloud platform and a second flow table set inside the virtual router. Firstly, the message is sent out to the virtual router through the first flow table, and the virtual router forwards the message through the second flow table.
By arranging the transit server between the core switch and the cloud platform, any node in the cloud platform is not directly transmitted to the core switch when transmitting the message, but is forwarded through the virtual router in the transit server. In the process, the core switch only needs to learn the ARP information of the virtual router, so that the workload of learning the ARP information by the core switch is reduced, and the requirement on the storage capacity of the core switch can be met. Meanwhile, for the virtual router, as the virtual router is generated on the transit server in a software mode, the learned ARP information of each instance does not need to consider the limitation of hardware capacity, and the horizontal capacity expansion of the cloud platform can be met. Finally, the flexibility of node and virtual router configuration is realized by forwarding the message in a flow table mode, so that the message forwarding becomes a production line, and the speed is also improved.
Based on the step S301, determining a virtual router includes:
s401, aiming at any virtual router arranged in the transit server, receiving a message sent by any instance of any node in the cloud platform; the instance has a resilient IP address; the message is sent to the virtual router by the node according to the first flow table;
the transit server has a plurality of virtual routers, and can receive any one instance in the cloud platform. And the message is transmitted to the virtual router after being searched by the first flow table.
For example, two instances on the cloud platform node need to be forwarded, and as long as the two instances have the addresses of the elastic IP, all the virtual routers can receive the message, so that the message is forwarded.
S402, forwarding the message through the virtual router based on a second flow table in the virtual router.
It should be noted that, when the second flow table forwards the packet, matching is performed from high to low based on the priority. And searching in a first-level flow table, and sending the flow table to a corresponding interface for transmission.
Based on the fact that the number of nodes in the cloud platform is large and the cloud platform has a characteristic requirement of easy capacity expansion, in order to provide efficient message forwarding service for the cloud platform, the embodiment of the application further converts the transit server into a transit service cluster on the basis of the system architecture shown in fig. 2.
As shown in fig. 4, fig. 4 provides another system architecture diagram for the embodiment of the present application, where the system architecture diagram includes a transit service cluster and each node subnet under a cloud platform.
The transit service cluster 401 is a set including all transit servers, and in the transit service cluster 401, there are many small clusters, such as the small cluster 4011, the small cluster 4012, and the small cluster 4013, which are used when there are many instances facing a cloud platform, the transit servers can also be continuously increased to accommodate the message forwarding requirements of a large number of instances.
Each node subnet on the cloud platform 103 is obtained by dividing each node according to the subnet net segments, such as node subnet 402, node subnet 403 and node subnet 404, that is, the nodes belonging to the same subnet net segment are divided into the same node subnet, such as node 4021, node 4022 and node 4023, which are divided into the same node subnet 402a.
Specifically, a plurality of node subnets appear on the cloud platform, each node subnet includes a plurality of nodes, and the forwarding of the packet is implemented by a corresponding small cluster in the transit service cluster. If each node in the node subnet 402 realizes message forwarding through the small cluster 4011, each node in the node subnet 403 realizes message forwarding through the small cluster 4012, and each node in the node subnet 504 realizes message forwarding through the small cluster 4013.
For another example, there are 300 nodes in the node subnet 402, there are 300 instances with elastic IP corresponding to each node, in the process of forwarding the packet, the virtual switch in the small cluster 4011 learns these 90000 instances, if the small cluster 4011 cannot meet the requirement, one small cluster 4012 may be added to learn, and a small cluster may be expanded.
As described above, the small cluster 4012 corresponds to the node subnet 402 and the node subnet 403 at the same time, in other words, the correspondence between the node subnets and the small cluster may be many-to-one, one-to-many, or one-to-one. In addition, the corresponding relationship may also be switched, for example, when the small cluster 4013 fails, the node subnet 404 may be switched from the small cluster 4013 to the small cluster 4012, and the specific principle of switching may be based on load balancing.
Based on the system architecture shown in fig. 4, in the step S301, the node determines a virtual router for packet transmission, which specifically includes the following steps:
s501, determining a transfer service cluster corresponding to the subnet according to the corresponding relation between the subnet and the transfer service cluster based on the subnet to which the node belongs; any transit service cluster comprises a plurality of transit servers.
For the correspondence relationship between the sub-network and the transit service cluster, the correspondence relationship may be configured to the node through a control node.
Specifically, in the process of forwarding the packet, how to determine the corresponding path for the flexible IP of the corresponding node is controlled by the control node. In each node in the cloud platform, a control node, various computing nodes and a network node are included. The control node is used for establishing a subnet, associating the subnet with the virtual router and informing other computing nodes and network nodes of the associated information; the computing node mainly bears a virtual machine instance, and the virtual machine instance can be bound with an elastic IP; network nodes mainly carry Network Address protocol (NAT) gateway instances (typically hundreds), and each NAT gateway instance egress has one or more resilient IPs. The NAT gateway is mainly used for solving the problem of insufficient IP and protecting computers in the network. The above-mentioned mode realizes that information is related to other computing nodes and network nodes through the control node.
S502, determining the virtual router for transmitting the message based on the load condition of each virtual router in the transit service cluster.
Specifically, the above manner is to configure a virtual router capable of realizing load balancing. When data is transmitted, because the virtual router capable of realizing load balancing configuration is adopted, several paths can be taken by the data during transmission, and an uncongested path is selected for transmission. For example, data 1 is transmitted from point a to point B, three routes can be selected to lead to point B based on the configured virtual router, and when data 1 is actually transmitted, the second route is changed to transmit when the first route finds that there is more data.
The following will be detailed for the node sending the packet to the virtual router through the first flow table, and specifically includes the following steps:
s601, determining a first transmission path of the message through a first flow table in the node according to the source IP address of the message; the first transmission path includes three-layer forwarding via the core switch or two-layer forwarding or three-layer forwarding via a virtual router.
Referring to fig. 5, fig. 5 is a flow chart diagram according to an embodiment of the present application.
The message forwarding is searched through a first flow table built in the node, and a corresponding target path is found for transmission; when searching, searching is performed according to the priority of the flow table from high to low. The first flow table may be set in each node by the control node.
During the transmission process of the first path, two paths may appear, and it is determined whether to perform two-layer forwarding or three-layer forwarding according to the corresponding situation. The difference between layer two forwarding and layer three forwarding is: whether the destination address and the source address are both in a local area network.
As shown in fig. 5, when the first path is determined through the first flow table, taking one packet forwarding as an example: when the message is determined to be a sending message sent by a slave node, the sending message enters a first flow table, the flow table rules are sequentially matched according to the priority from high to low, the matching is firstly carried out with the flow table rule with the priority =20, and when the message is determined to be an ARP request message which accords with the priority, ARP response is carried out; if the flow table rule with the priority =20 is not met, performing the flow table rule with the priority =10, and performing ARP (address resolution protocol) answering, wherein the flow table rule with the priority =10 means that the local processing cannot be performed; the flow table rule with the priority =5 means three-layer forwarding, so that the judgment is carried out according to the destination address of the sent message, and if the destination address of the sent message is not met, the flow table rule with the priority =4 is entered; and if so, transmitting the route to the corresponding virtual router according to the group flow table rule. The load status of each virtual router is recorded in the group × flow table rule. After entering the flow table rule with priority =4, the path still needs to be transmitted to the corresponding virtual router through the group flow table rule.
The following will be detailed about the step of forwarding the packet by the virtual router through the second flow table, which specifically includes:
s601, determining a second transmission path of the message through a second flow table in the virtual router according to the destination address of the message;
the virtual route is matched with the second flow table aiming at the message needing to be transmitted, and a corresponding second path is searched for transmission.
S602, forwarding the message through the second transmission path.
As shown in fig. 6, taking one packet forwarding as an example: and when determining that the message enters from the virtual router, entering into a second flow table0, sequentially matching each flow table rule according to the priority from high to low, switching to a sub-table 1, firstly matching with the flow table rule with the priority of 01 =10, and when determining that the message is an ARP request message according with the priority, performing ARP response.
If the flow table is not in accordance with the flow table rule with the priority of 01 =10, matching the flow table rule with the priority of 2 =10, requesting an ARP message, switching to a table1 flow table, matching the flow table rules from high to low in sequence according to the priority, and matching the flow table rule with the priority of 10 =10 first, wherein the flow table with the priority of 10 =10 means that a destination address source address comes from the same node, and cannot be judged and lost; matching with the flow table rule with the flow table11 priority =5, transmitting a destination address through a vxlan port, and executing ARP response by the node instance; if the address does not match the flow table 12 priority =5, the flow table 12 priority =5 means that the address itself performs ARP proxy.
If the matching with the flow table rule of the priority =10 of the flow table 02 is unsuccessful, the flow table rule of the priority =5 of the flow table 03 is matched, the sub-table 2 is switched to, the flow table rules are sequentially matched according to the priority from high to low, the flow table rule of the priority =5 of the flow table 21 is firstly matched, the flow table rule of the priority =5 of the flow table 21 means two-layer forwarding, and therefore, the judgment is carried out according to the destination address of the transmitted message, and the conditions that the packet is switched to the sub-table 5, flows into the flow table 51 with the priority =5, and is transmitted through the vxlan port are met. If the flow table rule of priority =10 is not satisfied, that is, the flow table rule of priority =10 is entered, the flow table4 is switched to the sub table, and the flow table rule of priority =5 of flow table 41 is first matched, and the flow table of priority =5 of flow table 41 means that the destination address and the source address are from different subnets, and if the flow table rule of priority =3 of flow table 42 is not matched, the flow table is switched to the sub table 10, and the flow table of priority =5 of the flow table with 101 is entered, and the flow table with priority =5 of the flow table11 is sent through the physical port.
If the matching with the flow table rule of priority =5 of the flow table 03 is unsuccessful, the flow table is switched to the sub-table 4, the flow table rule of priority =5 of the flow table 41 is first matched, the flow table of priority =5 of the flow table 41 means that the destination address and the source address are from different subnets, and if the flow table is not matched, the flow table is switched to the sub-table 10, and the flow table with 101 priority =5 is switched to the flow table with 11 priority =5 of the flow table, and is sent out through the physical port.
Optionally, the virtual router uses a Data Plane Development Kit (DPDK) for forwarding.
As shown in fig. 7, fig. 7 is a schematic diagram of a DPDK frame according to an embodiment of the present application.
As shown in the figure, the DPDK frame is a software library for accelerating packet data processing, and the DPDK frame is located on a bridge of a virtual router, so that when a packet is forwarded, the application of the DPDK can accelerate the packet forwarding speed to a certain extent.
For example, when 1000 messages are to be forwarded, the virtual router using the DPDK frame can implement 1000 message forwarding only in one minute; and the message without the DPDK frame needs three minutes to realize the message forwarding of the DPDK.
The virtual router adopts dpdk to forward the message, and the protocol stack can not automatically initiate the ARP request to learn the destination address of the switch like a kernel protocol stack. It is therefore necessary to provide a distributed controller in the virtual router.
Specifically, sending an ARP request to the core switch through the distributed controller; and obtaining the destination address of the core switch based on the ARP response fed back by the core switch, and updating the second flow table.
For example, when a message is forwarded, the virtual router with the distributed controller requests ARP information, acquires corresponding ARP information, and implements message forwarding through flow table matching; if the ARP information is requested on the virtual router without the distributed controller, the corresponding ARP information cannot be acquired.
In this case, the core switch destination address can be efficiently learned for the first time, and when the core switch destination address is changed, the core switch destination address is updated to the changed destination address.
For example, as shown in fig. 8, an embodiment of the present application further provides a device for forwarding a packet.
A determining unit 801, configured to determine, for a packet sent by any instance, a virtual router that transmits the packet; any virtual router is arranged in a transit server connected with a core switch;
a sending unit 802, configured to send the packet to the virtual router according to a first flow table in the node, and forward the packet through the virtual router based on a second flow table in the virtual router.
Based on the same technical concept, fig. 9 exemplarily shows that the embodiment of the present application further provides another apparatus for forwarding a packet, where the apparatus includes:
a receiving unit 901, configured to receive, for any virtual router set in the transit server, a packet sent by any instance of any node in the cloud platform; the instance has a resilient IP address; the message is sent to the virtual router by the node according to the first flow table;
a forwarding unit 902, configured to forward, based on a second flow table in the virtual router, the packet through the virtual router.
Based on the same technical concept, an embodiment of the present invention further provides a computing device, as shown in fig. 10, including at least one processor 1001 and a memory 1002 connected to the at least one processor, where a specific connection medium between the processor 1001 and the memory 1002 is not limited in the embodiment of the present invention, and the processor 1001 and the memory 1002 in fig. 10 are connected through a bus as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the embodiment of the present invention, the memory 1002 stores instructions executable by the at least one processor 1001, and the at least one processor 1001 may execute the steps included in the modeling method based on browser transmission by executing the instructions stored in the memory 1002.
The processor 1001 is a control center of the computing device, and may connect various parts of the computing device by using various interfaces and lines, and implement data processing by executing or executing instructions stored in the memory 1002 and calling data stored in the memory 1002. Optionally, the processor 1001 may include one or more processing units, and the processor 1001 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes an issued instruction. It will be appreciated that the modem processor described above may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 1001 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, and may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the disclosed method in connection with the browser-transport-based modeling embodiment may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules within a processor.
The memory 1002, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1002 may include at least one type of storage medium, which may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charged Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and the like. The memory 1002 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1002 of embodiments of the present invention may also be circuitry or any other device capable of performing a storage function to store program instructions and/or data.
Based on the same technical concept, embodiments of the present invention further provide a computer-readable storage medium, which stores a computer program executable by a computing device, and when the program runs on the computing device, the computing device is enabled to execute the steps of the message-based forwarding method.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A message forwarding method is characterized in that the method is suitable for nodes with elastic IP address examples in a cloud platform; the method comprises the following steps:
aiming at a message sent by any example, determining a virtual router for transmitting the message; any virtual router is arranged in a transit server connected with a core switch;
and sending the message to the virtual router according to a first flow table in the node, and forwarding the message through the virtual router based on a second flow table in the virtual router.
2. The method of claim 1, wherein determining a virtual router that transmits the packet comprises:
determining a transit service cluster corresponding to the subnet according to the corresponding relation between the subnet and the transit service cluster based on the subnet to which the node belongs; any one transit service cluster comprises a plurality of transit servers;
and determining the virtual router for transmitting the message based on the load condition of each virtual router in the transit service cluster.
3. The method of claim 2, wherein the correspondence of the subnet to transit service cluster is configured into the node by a control node.
4. The method of claim 1, wherein sending the packet to the virtual router according to a first flow table in the node comprises:
determining a first transmission path of the message through a first flow table in the node according to the source IP address of the message; the first transmission path comprises three-layer forwarding through the core switch or two-layer forwarding or three-layer forwarding through a virtual router;
establishing an extensible virtual local area network VXLAN tunnel with the virtual router;
and sending the message to the virtual router through the VXLAN tunnel according to the first transmission path.
5. A message forwarding method is characterized by being suitable for a transit server which forwards messages for a cloud platform and is connected with a core switch; the method comprises the following steps:
receiving a message sent by any node instance in the cloud platform aiming at any virtual router arranged in the transit server; the instance has a resilient IP address; the message is sent to the virtual router by the node according to the first flow table;
and forwarding the message through the virtual router based on a second flow table in the virtual router.
6. The method of claim 5, wherein the virtual router forwards using a Data Plane Development Kit (DPDK) framework.
7. The method of claim 6, further comprising:
a distributed controller is arranged in the virtual router;
sending an ARP request to the core switch through the distributed controller;
and obtaining the MAC address of the core switch based on the ARP response fed back by the core switch, and updating the second flow table.
8. The method of claim 5, wherein forwarding the packet through the virtual router based on a second flow table in the virtual router comprises:
determining a second transmission path of the message through a second flow table in the virtual router according to the destination address of the message;
and forwarding the message through the second transmission path.
9. A computing device comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform any of the methods of 1 to 8.
10. A computer-readable storage medium, having stored thereon a computer program executable by a computing device, the program, when run on the computing device, causing the computing device to perform the steps of any of the methods of 1 to 8.
CN202210900751.3A 2022-07-28 2022-07-28 Message forwarding method computer equipment and storage medium Active CN115225708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210900751.3A CN115225708B (en) 2022-07-28 2022-07-28 Message forwarding method computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210900751.3A CN115225708B (en) 2022-07-28 2022-07-28 Message forwarding method computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115225708A true CN115225708A (en) 2022-10-21
CN115225708B CN115225708B (en) 2023-08-08

Family

ID=83613142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210900751.3A Active CN115225708B (en) 2022-07-28 2022-07-28 Message forwarding method computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115225708B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932249A (en) * 2012-10-10 2013-02-13 杭州华三通信技术有限公司 Method and device for transmitting virtual router redundancy protocol (VRRP) message
CN104869058A (en) * 2015-06-04 2015-08-26 北京京东尚科信息技术有限公司 Method and device for transmitting data message
CN105391771A (en) * 2015-10-16 2016-03-09 张陵 Multi-tenant-oriented cloud network architecture
CN105591955A (en) * 2015-10-30 2016-05-18 杭州华三通信技术有限公司 Message transmission method and device
CN108696434A (en) * 2017-04-11 2018-10-23 华为技术有限公司 A kind of method, apparatus and system of forwarding data packets
CN109617816A (en) * 2015-09-17 2019-04-12 杭州数梦工场科技有限公司 A kind of transmission method and device of data message
CN110430114A (en) * 2019-07-24 2019-11-08 中国电子科技集团公司第七研究所 A kind of virtual router and the method for realizing SDN network and traditional IP interconnection
CN112929264A (en) * 2019-12-06 2021-06-08 厦门网宿有限公司 Service flow transmission method, system and network equipment
CN113872868A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Notification message transmission method, device and system and storage medium
CN114172853A (en) * 2021-12-01 2022-03-11 阿里巴巴(中国)有限公司 Flow forwarding and bare computer server configuration method and device
CN114760254A (en) * 2022-04-15 2022-07-15 北京志凌海纳科技有限公司 Virtual network architecture and method for realizing data packet forwarding processing by virtual network architecture

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932249A (en) * 2012-10-10 2013-02-13 杭州华三通信技术有限公司 Method and device for transmitting virtual router redundancy protocol (VRRP) message
CN104869058A (en) * 2015-06-04 2015-08-26 北京京东尚科信息技术有限公司 Method and device for transmitting data message
CN109617816A (en) * 2015-09-17 2019-04-12 杭州数梦工场科技有限公司 A kind of transmission method and device of data message
CN105391771A (en) * 2015-10-16 2016-03-09 张陵 Multi-tenant-oriented cloud network architecture
CN105591955A (en) * 2015-10-30 2016-05-18 杭州华三通信技术有限公司 Message transmission method and device
CN108696434A (en) * 2017-04-11 2018-10-23 华为技术有限公司 A kind of method, apparatus and system of forwarding data packets
CN110430114A (en) * 2019-07-24 2019-11-08 中国电子科技集团公司第七研究所 A kind of virtual router and the method for realizing SDN network and traditional IP interconnection
CN112929264A (en) * 2019-12-06 2021-06-08 厦门网宿有限公司 Service flow transmission method, system and network equipment
CN113872868A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Notification message transmission method, device and system and storage medium
CN114172853A (en) * 2021-12-01 2022-03-11 阿里巴巴(中国)有限公司 Flow forwarding and bare computer server configuration method and device
CN114760254A (en) * 2022-04-15 2022-07-15 北京志凌海纳科技有限公司 Virtual network architecture and method for realizing data packet forwarding processing by virtual network architecture

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CISCO SYSTEMS, INC: "Virtual Route Forwarding Design Guide for VRF-Aware Cisco Unified Communications Manager Express", 《VIRTUAL ROUTE FORWARDING DESIGN GUIDE》 *
葛钰: "面向云服务的web服务器负载均衡设计与实现", 《中国优秀硕士学位论文全文数据库(电子期刊)》, no. 03 *

Also Published As

Publication number Publication date
CN115225708B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN107819663B (en) Method and device for realizing virtual network function service chain
JP5594552B2 (en) Network system and route control method
CN108270676B (en) Network data processing method and device based on Intel DPDK
US7996569B2 (en) Method and system for zero copy in a virtualized network environment
US9602428B2 (en) Method and apparatus for locality sensitive hash-based load balancing
CN111092801B (en) Data transmission method and device
CN107113241B (en) Route determining method, network configuration method and related device
US9960998B2 (en) Forwarding packet in stacking system
KR20160099473A (en) Technologies for modular forwarding table scalability
TW201640866A (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
CN115426312B (en) Method and device for managing, optimizing and forwarding identifiers in large-scale multi-modal network
CN104717081A (en) Gateway function realization method and device
CN104468401A (en) Message processing method and device
US9954775B2 (en) Software-defined network (SDN) system using host abstraction, and method for implementing the same
CN110830574B (en) Method for realizing intranet load balance based on docker container
US20160380887A1 (en) Source imposition of network routes in computing networks
CN115102896B (en) Data broadcasting method, broadcasting accelerator, NOC, SOC and electronic equipment
CN114679349B (en) Data communication method and device
US6631421B1 (en) Recursive partitioning of networks
CN117063454A (en) Network card management system, message processing method and device
US20230269164A1 (en) Method and apparatus for sending route calculation information, device, and storage medium
CN112583655A (en) Data transmission method and device, electronic equipment and readable storage medium
WO2016173196A1 (en) Method and apparatus for learning address mapping relationship
CN115225708B (en) Message forwarding method computer equipment and storage medium
KR101984846B1 (en) Communication method and apparatus providing mobility of objects

Legal Events

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