CN114531375A - Message forwarding method and device and computer readable storage medium - Google Patents

Message forwarding method and device and computer readable storage medium Download PDF

Info

Publication number
CN114531375A
CN114531375A CN202011208331.6A CN202011208331A CN114531375A CN 114531375 A CN114531375 A CN 114531375A CN 202011208331 A CN202011208331 A CN 202011208331A CN 114531375 A CN114531375 A CN 114531375A
Authority
CN
China
Prior art keywords
interface board
board
main
forwarding
control board
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
CN202011208331.6A
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN202011208331.6A priority Critical patent/CN114531375A/en
Priority to PCT/CN2021/115392 priority patent/WO2022095571A1/en
Publication of CN114531375A publication Critical patent/CN114531375A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • 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/70Routing based on monitoring results

Landscapes

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

Abstract

The invention discloses a message forwarding method, a message forwarding device and a computer readable storage medium, wherein the message forwarding method is applied to a virtual forwarding router, the virtual forwarding router comprises a main control board, a main interface board and a standby interface board, the main control board, the main interface board and the standby interface board are provided with forwarding surface processes, the main control board transmits detection messages with the main interface board and the standby interface board through an internal media surface network respectively, and the detection messages are processed by the forwarding surface processes. The main control board receives the detection messages of the main interface board and the standby interface board through the internal media surface network; the main control board determines the on-site state of the main interface board and the standby interface board according to the detection message; when the main control board confirms that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward the service message. The invention can detect the on-line state of the single board quickly and shorten the sensing time by adding the internal media surface network in the virtual forwarding router and directly detecting the off-line of the single board in the forwarding surface, thereby meeting the requirement of quickly switching the service flow.

Description

Message forwarding method and device and computer readable storage medium
Technical Field
The present invention relates to, but not limited to, the field of network communication technologies, and in particular, to a method and an apparatus for forwarding a packet, and a computer-readable storage medium.
Background
In network function virtualization deployment, a virtual forwarding router specially responsible for virtualizing a network Processing function generally deploys a distributed environment, and in order that even if a single network element fails, the service forwarding Processing function is not affected, a virtual router deploys a main interface board (Data Processing Unit, DP) for backup, interfaces of the main interface board and the standby interface board are aggregated and bound, when the main interface board is offline, the main interface board can be switched to the interface of the standby interface board for continuous Processing of receiving and sending packets, and the service forwarding Processing function is not affected.
In the related art, the standby interface board needs to sense that the Main interface board is offline, a Control plane of a Main Control board (MP) of a router needs to send keep-alive messages to each other through a TIPC (Transparent Inter-process Communication) network where a LINUX protocol stack network card is located, a detection period is lengthened for the safety of the whole device by the Control plane, and after sensing that the Main interface board is offline, the Control plane of the standby interface board needs to be notified through the TIPC network, and then the Control plane of the standby interface board issues a notification forwarding plane, so that the forwarding plane can perform service switching, the time is long, and the service forwarding packet loss time is long.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
Embodiments of the present invention provide a message forwarding method, a message forwarding apparatus, and a computer-readable storage medium, which can quickly detect an in-place state of a board in a virtual forwarding router, and shorten a sensing time to meet a requirement for quickly switching service traffic.
In a first aspect, an embodiment of the present invention provides a packet forwarding method applied to a virtual forwarding router, where the virtual forwarding router includes a main control board, a main interface board, and a standby interface board, where the main control board, the main interface board, and the standby interface board are deployed with forwarding plane processes, and the main control board transmits a detection packet with the main interface board and the standby interface board through an internal media plane network, where the detection packet is processed by the forwarding plane processes, and the method includes:
the main control board receives the detection messages of the main interface board and the standby interface board through the internal media surface network;
the main control board determines the in-place state of the main interface board and the standby interface board according to the detection message, wherein the in-place state comprises any one of online and offline;
when the main control board confirms that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward the service message.
In a second aspect, an embodiment of the present invention provides a packet forwarding apparatus, including a main control board, a main interface board, and a standby interface board, where the main control board, the main interface board, and the standby interface board are respectively deployed in different servers, and the main control board, the main interface board, and the standby interface board are deployed with forwarding plane processes, where the main control board transmits detection packets with the main interface board and the standby interface board through an internal media plane network, and physical network cards corresponding to the main control board, the main interface board, and the standby interface board adopt data plane development kits DPDK to take over, and the detection packets are processed by the forwarding plane processes.
In a third aspect, an embodiment of the present invention provides a packet forwarding apparatus, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the message forwarding method according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer-executable program is stored, where the computer-executable program is configured to enable a computer to execute the packet forwarding method according to the first aspect.
The embodiment of the invention comprises the following steps: the message forwarding method is applied to a virtual forwarding router, the virtual forwarding router comprises a main control board, a main interface board and a standby interface board, forwarding surface processes are deployed on the main control board, the main interface board and the standby interface board, the main control board and the main interface board and the standby interface board transmit detection messages through an internal media surface network respectively, and the detection messages are processed by the forwarding surface processes. Specifically, the main control board receives detection messages of a main interface board and a standby interface board through an internal media surface network; the main control board determines the on-site state of the main interface board and the standby interface board according to the detection message, wherein the on-site state comprises any one of on-line state and off-line state; when the main control board confirms that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward the service message, so that the on-site state of a single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, and the requirement of quickly switching the service flow is met. Compared with the existing message forwarding method, the method does not adopt the sensing single board off-line of the control surface management process to inform the flow switching, directly performs single board on-site detection on the forwarding surface to perform the main/standby switching of the service flow, and directly detects the single board off-line on the forwarding surface by adding an internal media surface network in the virtual forwarding router, so that the on-site state of the single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, the requirement of the quick switching of the service flow is met, the quick switching of the main/standby member ports of the aggregated service interface is realized, and the purpose of shortening the time of forwarding and packet loss is achieved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a flowchart of a message forwarding method according to an embodiment of the present invention;
fig. 2 is a diagram illustrating a networking deployment of a virtual forwarding router according to an embodiment of the present invention;
fig. 3 is a diagram of a detection packet structure according to an embodiment of the present invention;
fig. 4 is a diagram illustrating an interaction process of detecting a packet according to an embodiment of the present invention;
fig. 5 is a flowchart for determining the in-place states of a main interface board and a standby interface board in a message forwarding method according to an embodiment of the present invention;
fig. 6 is a networking level diagram of a virtual forwarding router provided by one embodiment of the invention;
FIG. 7 is a flow diagram of kernel-based packet reception according to an embodiment of the present invention;
fig. 8 is a flow chart of DPDK-based packet reception according to an embodiment of the present invention;
fig. 9 is a diagram illustrating a relationship between a DPDK takeover and a component call of a bottom-layer network card according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a packet forwarding apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be understood that in the description of the embodiments of the present invention, a plurality (or a plurality) means two or more, more than, less than, more than, etc. are understood as excluding the number, and more than, less than, etc. are understood as including the number. If the description of "first", "second", etc. is used for the purpose of distinguishing technical features, it is not intended to indicate or imply relative importance or to implicitly indicate the number of indicated technical features or to implicitly indicate the precedence of the indicated technical features.
In network function virtualization deployment, a virtual forwarding router which is specially responsible for a virtualization network processing function generally deploys a distributed environment, and in order that even if a single network element fails, the service forwarding processing function is not affected, a virtual router deploys a main interface board (DP) and a standby interface board (DP) for backup, interfaces of the main interface board and the standby interface board are aggregated and bound, when the main interface board is offline, the main interface board can be switched to the interface of the standby interface board for continuous processing of a receiving and sending packet, and the service forwarding processing function is not affected.
In the related technology, a forwarding plane of a standby DP needs to sense that a main DP is offline, a control plane management process of a main control panel MP and a DP of a router needs to send keep-alive messages through a TIPC network based on an LINUX protocol stack network card, the control plane needs to ensure the safety of the whole device and does not mistakenly sense that a single panel is powered off, the offline cycle time is prolonged, the MP defaults for 3 minutes and does not receive a keep-alive packet of the standby DP, the MP is considered to be an ionized line under the standby DP, the control plane management process of the MP informs the control plane management process of the standby DP through the TIPC network, and the control plane management process of the standby DP sends a notice to the forwarding plane process to perform service flow switching of a main interface and a standby interface, the process time is long and at least exceeds 3 minutes, the service forwarding packet loss time is long, and the requirement for quick switching of the traffic of the forwarding plane cannot be met.
Aiming at that a forwarding plane needs to sense DP offline, needs to sense single-board offline through an MP control plane through a TIPC network and informs other DP control planes, and other DP control planes inform the forwarding plane again, the sensing process is long. Specifically, the main control board receives detection messages of a main interface board and a standby interface board through an internal media surface network; the main control board determines the on-site state of the main interface board and the standby interface board according to the detection message, wherein the on-site state comprises any one of on-line state and off-line state; when the main control board confirms that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward the service message, so that the on-site state of a single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, and the requirement of quickly switching the service flow is met. Compared with the existing message forwarding method, the method does not adopt the sensing single board off-line of the control surface management process to inform the flow switching, directly performs single board on-site detection on the forwarding surface to perform the main/standby switching of the service flow, and directly detects the single board off-line on the forwarding surface by adding an internal media surface network in the virtual forwarding router, so that the on-site state of the single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, the requirement of the quick switching of the service flow is met, the quick switching of the main/standby member ports of the aggregated service interface is realized, and the purpose of shortening the time of forwarding and packet loss is achieved.
As shown in fig. 1, fig. 1 is a flowchart of a message forwarding method according to an embodiment of the present invention. The message forwarding method can be applied to a virtual forwarding router, the virtual forwarding router comprises a main control board, a main interface board and a standby interface board, the main control board, the main interface board and the standby interface board are provided with forwarding surface processes, the main control board transmits detection messages with the main interface board and the standby interface board through an internal media surface network respectively, and the detection messages are processed by the forwarding surface processes, and the message forwarding method comprises the following steps:
step 101, a main control board receives detection messages of a main interface board and a standby interface board through an internal media surface network;
102, the main control board determines the in-place state of a main interface board and a standby interface board according to the detection message, wherein the in-place state comprises any one of online and offline;
step 103, when the main control board confirms that the main interface board is offline, the main control board switches from the main interface board to the standby interface board to forward the service message.
In the virtual forwarding router, the main control board MP and the interface board DP are deployed in different KVM virtual machines, and these virtual machines may be deployed on one host machine, or may be deployed on different host machines, and together form a distributed router device. As shown in fig. 2, a main master control board MP-M is deployed in the KVM virtual machine located at the server computing node1, a standby master control board MP-S is deployed in the KVM virtual machine located at the server computing node2, and both the MP-M and the MP-S deploy forwarding plane processes. Main interface boards DP1-M and DP2-M are respectively deployed in the two KVM virtual machines located in the server computing node3, standby interface boards DP1-S and DP2-S are respectively deployed in the two KVM virtual machines located in the server computing node4, and forwarding surface processes are deployed in the DP1-M, DP2-M, DP1-S and the DP 2-S. It should be noted that the internal communication network interfaces of the main and standby DPs may be physical network cards or LINUX virtual network cards, the network elements are interconnected through a switch, and are isolated from other networks through a VLAN domain to form a two-layer internal media plane network, and the internal media plane network is used for forwarding messages across internal boards. The virtual machines and the host machines can be connected in a direct connection mode, an SR-IOV (Single Root I/O Virtualization) mode or a network bridge mode and the like; the network where ens0 is located in fig. 2 is a physical network for detecting messages inside the device, and the whole intra-domain network is a two-layer full connection; two ports ens1 of DP2-M and DP2-S are used as the main and standby member ports of the aggregation service interface.
It should be noted that, in the virtual forwarding router, the main control board MP and the interface board DP both belong to a virtual processing unit, and the standby main control board MP-S is only illustrated as one of the embodiments, and does not necessarily exist in the virtual forwarding router.
In an embodiment, a main control board receives detection messages of a main interface board and a standby interface board through an internal media plane network, the main control board determines the on-line state of the main interface board and the standby interface board according to the detection messages, wherein the on-line state includes any one of on-line state and off-line state, and when the main control board determines that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward a service message. Compared with the existing message forwarding method, the method does not adopt the sensing single board off-line of the control surface management process to inform the flow switching, directly performs single board on-site detection on the forwarding surface to perform the main/standby switching of the service flow, and directly detects the single board off-line on the forwarding surface by adding an internal media surface network in the virtual forwarding router, so that the on-site state of the single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, the requirement of the quick switching of the service flow is met, the quick switching of the main/standby member ports of the aggregated service interface is realized, and the purpose of shortening the time of forwarding and packet loss is achieved.
In one embodiment, the detection message includes destination MAC, source MAC, protocol type, and payload information. The detection message is packaged by two layers, the structure of the detection message is shown in fig. 3, and the target MAC and the source MAC are the physical network cards MAC of the internal media surfaces of the target board and the source board respectively; the protocol type belongs to a two-layer protocol type, and the two-layer protocol type is a self-defined type; the protocol type is followed by a media surface head which comprises information such as check information, a slot number, a media surface type and the like; load information is arranged behind the media surface head and comprises types and slot bit values of detected hello messages (namely keep-alive messages) and report messages (namely notification messages); the hello message is used for the DP to send the slot bit value of the board to the MP at regular time according to the configured packet sending period, the report message is used for the MP to inform the current collected slot bit value to other boards when the DP detects that the off-line exists, and the detection message processing is completed in the forwarding plane detection thread.
In an embodiment, step 101 may include, but is not limited to, the following sub-steps:
the main control board receives the keep-alive messages sent by the main interface board and the standby interface board at regular time according to the preset packet sending period through the internal media surface network, so that the main interface board and the standby interface board send the slot bit value to the main control board.
As shown in fig. 4, when both the master control board MP-M and the standby master control board MP-S have a virtual forwarding router, the master interface boards DP1-M and DP2-M, and the standby interface boards DP1-S and DP2-S periodically send hello messages to MP-M and MP-S, respectively, so that the master interface boards DP1-M and DP2-M, and the standby interface boards DP1-S and DP2-S send slot bit values to the master control board MP-M and the standby master control board MP-S, where the slot bit value is used to represent the in-place states of the DP1-M, DP2-M, DP1-S and DP2-S, for example, if the off-line bit value is 0, the DP is represented, and if the slot bit value is 1, the DP is represented to be on-line. In this embodiment, MP-M and MP-S will send hello messages at regular time. And the MP-M and the MP-S receive hello messages, calculate the online information of each DP, locally inform the online of the DP, and send report messages to all DPs and inform the online information of each DP. MP-M and MP-S age DP information (3 times hello period duration) regularly, calculate DP offline information, locally notify DP offline, MP-M sends report message to all DPs, notify update DP on-site information. And each DP receives the report message, calculates the on/off line information of the DP, locally informs the on/off line of the DP, and switches the master member port and the slave member port of the aggregation port.
In one embodiment, as shown in FIG. 5, step 102 may include, but is not limited to, the following sub-steps:
step 1021, the main control board marks the corresponding slot bit value according to the condition of receiving the keep-alive message in the preset packet sending period;
step 1022, the main control board sends the slot position on-site bit to the main interface board and the standby interface board through the announcement message;
and 1023, the main interface board and the standby interface board update the corresponding slot bit value according to the notification message.
In this embodiment, the main control board marks the corresponding slot bit value according to the condition that the keep-alive message is received in a preset packet sending period, and then sends the slot bit value to the main interface board and the standby interface board through the notification message, and the main interface board and the standby interface board update the corresponding slot bit value according to the notification message. Specifically, when the main control board does not receive the keep-alive message in three packet sending periods, the corresponding slot bit value is set to a state value representing that the in-place state is an offline state, for example, the corresponding slot bit value is set to 0; when the main control board receives the keep-alive messages in the three packet sending periods, the corresponding slot bit value is set to be a state value representing that the in-place state is on-line, for example, the corresponding slot bit value is set to be 1. And the main control board informs other single boards of the slot position bit value through an informing message, the other single boards update the local slot position bit value after receiving the informing message, and if a main interface board is off-line, the main interface board informs that the forwarding flow is quickly switched to a standby interface board. It should be noted that the off-line detection period is configurable, and is 1 second by default, and the packet transmission period is about 333ms by default.
In an embodiment, the physical network cards corresponding to the main control board, the main interface board, and the standby interface board adopt a DPDK (Data Plane Development Kit) to take over, and the forwarding Plane process includes a main jobthread, a detection thread, a forwarding thread, and a polling distribution thread. The main jobthread is used for initializing a physical network card and unbinding the physical network card from Linux drive to a UIO drive mode so that the DPDK takes over the physical network card; the detection thread is used for analyzing and processing the detection message; the forwarding thread is used for routing forwarding of the service message; and the polling distribution thread is used for polling the physical network card queue and forwarding the detection message processed by the detection thread and the service message processed by the forwarding thread to the physical network card queue.
In this embodiment, as shown in fig. 6, a node1, a node3, and a node4 are server computing nodes, which are respectively deployed with KVM virtual machines vm1, vm3, and vm4, a main control board MP-M is deployed in the virtual machine vm1, a main interface board DP-M is deployed in the virtual machine vm3, a standby interface board DP-S is deployed in the virtual machine vm4, TIPC network communications among the main control board MP-M, the main interface board DP-M, and the standby interface board DP-S via OVS and LINUX virtual network card eth0 constitute a virtual machine forwarding router device, on the basis of which a two-layer internal media network is further deployed among the main control board MP-M, the main interface board DP-M, and the standby interface board DP-S, and a corresponding physical network card ens0 takes over using DPDK. The main interface board DP-M and the standby interface board DP-S also deploy external service networks communicating with the outside. It should be noted that a control plane process and a forwarding plane process are deployed inside the main control board MP-M, the main interface board DP-M, and the standby interface board DP-S, where the forwarding plane process includes a main jobthread, a detection thread, a forwarding thread, and a polling distribution thread. Specifically, the main jobthread is responsible for initializing the physical network card, and unbinding the physical network card from linux drive to UIO, so that the DPDK takes over the physical network card; the detection thread mainly receives and transmits a detection packet for analysis processing, and detects whether the single board is in place; the forwarding thread is mainly responsible for routing forwarding of the service message; the polling distribution thread is mainly used for polling a physical network card queue to receive a packet, distributing a message to a forwarding thread and a detection thread, and forwarding the message processed by the forwarding thread and the detection thread to the physical network card queue.
In one embodiment, the main jobthread unbinds the physical network card from the Linux drive to the UIO drive mode, maps the physical network card register to the user state, so that the physical network card drive operates in the user state, the polling distribution thread calls the DPDK user state to read and write the service message in an active polling mode, the polling distribution thread distributes the detection message to the detection thread for processing, and the polling distribution thread distributes the service message to the forwarding thread for processing.
In the related technology, the mode of processing the data packet at the bottom layer is a CPU interrupt mode, that is, the physical network card notifies the kernel protocol stack to process the data packet in the interrupt mode, the kernel protocol stack performs legal verification on the data packet, and then judges whether the target of the data packet is the socket of the local computer, if the target meets the condition, the data packet is copied and is delivered to the user mode socket for processing. The processing path is long, a process of copying from the kernel to the application layer is also performed, the data forwarding flow of the kernel protocol stack is shown in fig. 7, and the situations of interrupt processing, memory copying, context switching, processing across multiple cpu cores and the like exist.
In this embodiment, after using UIO (User Space I/O) and DPDK, bypassing the processing of kernel protocol stack, UIO maps the network card hardware register to the User mode and shields the interrupt signal sent by the network card, so that the network card driver can operate in the User mode; the DPDK reads and writes a packet in a user Mode by adopting a PMD (poll Mode drivers) active polling Mode, after receiving the data packet, the network card can directly transmit the data packet to a pre-allocated Memory in a DMA (direct Memory access) Mode, meanwhile, a data packet pointer in an unlocked circular queue is updated, a thread which is continuously polled can quickly sense the received data packet, and the data packet is directly processed on a pre-allocated Memory address; the memory exchange between the kernel mode and the user mode is not copied, only the control right transfer is performed, the process is simple, and the processing flow of the DPDK data packet is shown in FIG. 8.
As shown in fig. 9, the bottom layer transceiving process of this embodiment is as follows: firstly, a PCI or MAC corresponding to a physical network card is bound through a configuration command interface, the PCI or MAC is issued to a control plane management module and then issued to a forwarding plane process, a main jobthread of the forwarding plane can unbind the physical network card from LINUX drive, the PCI or MAC is bound to an UIO drive mode, a network card register is mapped to a user state, a DPDK interface is called to initialize and distribute an interface index, a corresponding drive polling PMD program is appointed, a polling distribution thread calls a DPDK PMD to actively poll a physical network card queue to read and write service messages, then, the polling distribution thread distributes detection messages to a detection thread to process, and the polling distribution thread distributes service messages to the forwarding thread to process. In addition, both polling distribution threads and detection threads can be bound, and cross-CPU core processing is avoided.
Through the improved processing, the sensing single board offline time can reach a level below a second level, compared with the method that TIPC detection is used for judging whether the single board is offline and then informing the forwarding plane, the speed is high, the sensing flow is short, and whether the virtual distributed router single board is in place can be quickly detected.
In summary, in the embodiments of the present invention, the traffic switching is notified without using the sensing board of the control plane management process to go offline, and the board in-place detection is directly performed on the forwarding plane to perform the active/standby switching of the service traffic; the detection message is encapsulated by a second layer, and three-layer decapsulation and routing forwarding are not involved; the detection message does not travel through a TIPC network, travels through a two-layer internal media surface network, and is transmitted and received by DPDK at the bottom layer, and a UIO mechanism is adopted to bypass LINUX kernel processing, so that frequent system calling is avoided, and the detection message is received from a network card by zero copy; the thread for processing the detection packet sets the CPU affinity, so that the performance of processing the detection message is improved; the detection period is configurable, when the DP is offline, the forwarding plane can quickly sense the off-line of the DP, and the time for switching the main interface and the standby interface is shortened.
The embodiment of the invention also provides a message forwarding device.
Specifically, the message forwarding device comprises a main control board, a main interface board and a standby interface board, wherein the main control board, the main interface board and the standby interface board are respectively deployed on different servers, forwarding surface processes are deployed on the main control board, the main interface board and the standby interface board, the main control board and the main interface board and the standby interface board respectively transmit detection messages through an internal media surface network, physical network cards corresponding to the main control board, the main interface board and the standby interface board adopt DPDK (digital pre-distortion keying) connection, and the detection messages are processed by the forwarding surface processes.
In this embodiment, the message forwarding apparatus includes a main control board, a main interface board and a standby interface board, the main control board, the main interface board and the standby interface board are deployed with a forwarding plane process, the main control board transmits a detection message with the main interface board and the standby interface board through an internal media plane network, and the detection message is processed by the forwarding plane process. Specifically, the main control board receives detection messages of a main interface board and a standby interface board through an internal media surface network; the main control board determines the on-site state of the main interface board and the standby interface board according to the detection message, wherein the on-site state comprises any one of on-line state and off-line state; when the main control board confirms that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward the service message, so that the on-site state of a single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, and the requirement of quickly switching the service flow is met. Compared with the existing message forwarding method, the method does not adopt the sensing single board off-line of the control surface management process to inform the flow switching, directly performs single board on-site detection on the forwarding surface to perform the main/standby switching of the service flow, and directly detects the single board off-line on the forwarding surface by adding an internal media surface network in the virtual forwarding router, so that the on-site state of the single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, the requirement of the quick switching of the service flow is met, the quick switching of the main/standby member ports of the aggregated service interface is realized, and the purpose of shortening the time of forwarding and packet loss is achieved.
As shown in fig. 10, an embodiment of the present invention further provides a message forwarding apparatus.
Specifically, the packet forwarding apparatus includes: one or more processors and memories, one processor and memory being exemplified in fig. 10. The processor and memory may be connected by a bus or other means, such as by a bus in FIG. 10.
The memory, which is a non-transitory computer readable storage medium, may be used to store a non-transitory software program and a non-transitory computer executable program, such as the message forwarding method in the embodiment of the present invention described above. The processor implements the message forwarding method in the above embodiment of the present invention by running the non-transitory software program and the program stored in the memory.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the data storage area may store data and the like required for executing the packet forwarding method in the embodiment of the present invention. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software program and the program required for implementing the message forwarding method in the embodiment of the present invention are stored in the memory, and when being executed by one or more processors, the message forwarding method in the embodiment of the present invention is executed, for example, the method steps 101 to 103 in fig. 1 and the method steps 1021 to 1023 in fig. 5 described above are executed, and the main control board receives the detection messages of the main interface board and the standby interface board through the internal media interface network; the main control board determines the on-site state of the main interface board and the standby interface board according to the detection message, wherein the on-site state comprises any one of on-line state and off-line state; when the main control board confirms that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward the service message, so that the on-site state of a single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, and the requirement of quickly switching the service flow is met. Compared with the existing message forwarding method, the method does not adopt the sensing single board off-line of the control surface management process to inform the flow switching, directly performs single board on-site detection on the forwarding surface to perform the main/standby switching of the service flow, and directly detects the single board off-line on the forwarding surface by adding an internal media surface network in the virtual forwarding router, so that the on-site state of the single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, the requirement of the quick switching of the service flow is met, the quick switching of the main/standby member ports of the aggregated service interface is realized, and the purpose of shortening the time of forwarding and packet loss is achieved.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer-executable program, where the computer-executable program is executed by one or more control processors, for example, by one of the processors in fig. 10, and can cause the one or more processors to execute the message forwarding method in the foregoing embodiment of the present invention, for example, to execute the method steps 101 to 103 in fig. 1, and the method steps 1021 to 1023 in fig. 5 described above, where the main control board receives the detection messages of the main interface board and the standby interface board through the internal media plane network; the main control board determines the on-site state of the main interface board and the standby interface board according to the detection message, wherein the on-site state comprises any one of on-line state and off-line state; when the main control board confirms that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward the service message, so that the on-site state of a single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, and the requirement of quickly switching the service flow is met. Compared with the existing message forwarding method, the method does not adopt the sensing single board off-line of the control surface management process to inform the flow switching, directly performs single board on-site detection on the forwarding surface to perform the main/standby switching of the service flow, and directly detects the single board off-line on the forwarding surface by adding an internal media surface network in the virtual forwarding router, so that the on-site state of the single board in the virtual forwarding router can be quickly detected, the sensing time length is shortened, the requirement of the quick switching of the service flow is met, the quick switching of the main/standby member ports of the aggregated service interface is realized, and the purpose of shortening the time of forwarding and packet loss is achieved.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable programs, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable programs, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
While the preferred embodiments of the present invention have been described in detail, it will be understood by those skilled in the art that the foregoing and various other changes, omissions and deviations in the form and detail thereof may be made without departing from the scope of this invention.

Claims (12)

1. A message forwarding method is applied to a virtual forwarding router, the virtual forwarding router comprises a main control board, a main interface board and a standby interface board, the main control board, the main interface board and the standby interface board are deployed with forwarding surface processes, the main control board transmits detection messages with the main interface board and the standby interface board through an internal media surface network respectively, and the detection messages are processed by the forwarding surface processes, the method comprises the following steps:
the main control board receives the detection messages of the main interface board and the standby interface board through the internal media surface network;
the main control board determines the in-place state of the main interface board and the standby interface board according to the detection message, wherein the in-place state comprises any one of online and offline;
and when the main control board confirms that the main interface board is off-line, the main control board switches from the main interface board to the standby interface board to forward the service message.
2. The method of claim 1, wherein the detecting the message comprises:
the target MAC is used for representing the physical network card MAC of the target single board;
the source MAC is used for representing the physical network card MAC of the source single board;
a protocol type belonging to a two-layer protocol type;
the media surface head comprises verification information, a slot number and a media surface type;
and the load information comprises a keep-alive message, an announcement message and a slot position bit value.
3. The method according to claim 2, wherein the receiving, by the master control board, the detection packets of the master interface board and the slave interface board through the internal media plane network includes:
the main control board receives the keep-alive messages sent by the main interface board and the standby interface board regularly according to a preset packet sending period through the internal media surface network, so that the main interface board and the standby interface board send the slot bit values to the main control board.
4. The method according to claim 3, wherein the determining, by the master control board, the in-place states of the master interface board and the slave interface board according to the detection packet includes:
the main control board marks the corresponding slot position bit value according to the condition that the keep-alive message is received in the preset packet sending period;
the master control board sends the slot position on-site bit to the main interface board and the standby interface board through the notification message;
and the main interface board and the standby interface board update the corresponding slot bit values according to the notification message.
5. The method of claim 4, wherein the marking, by the master control board, the corresponding slot bit value according to the condition that the keep-alive message is received in the preset packet sending period comprises:
and when the main control board does not receive the keep-alive messages in the three packet sending periods, setting the corresponding slot bit value as a state value representing that the in-place state is offline.
6. The method of claim 4, wherein the marking, by the master control board, the corresponding slot bit value according to the condition that the keep-alive message is received in the preset packet sending period comprises:
and when the main control board receives the keep-alive messages in the three packet sending periods, setting the corresponding slot bit value as a state value representing that the in-place state is on-line.
7. The method according to claim 1, wherein the physical network cards corresponding to the main control board, the main interface board and the standby interface board adopt a data plane development kit DPDK for taking over, and the forwarding plane process comprises:
the main jobthread is used for initializing a physical network card and unbinding the physical network card from a Linux drive mode to a UIO drive mode so that the DPDK takes over the physical network card;
the detection thread is used for analyzing and processing the detection message;
a forwarding thread, configured to forward the service packet by a route;
and the polling distribution thread is used for polling a physical network card queue, and forwards the detection message processed by the detection thread and the service message processed by the forwarding thread to the physical network card queue.
8. The method according to claim 7, wherein the main jobthread unbinds the physical network card from Linux drive to UIO drive mode, maps a physical network card register to a user state, so that the physical network card drive operates in the user state, the polling distribution thread calls DPDK to read and write the service packet in an active polling manner in the user state, the polling distribution thread distributes the detection packet to the detection thread for processing, and the polling distribution thread distributes the service packet to the forwarding thread for processing.
9. The method of claim 8, wherein the poll distribution thread and the detection thread are both bound to a processor core for processing.
10. A message forwarding device comprises a main control board, a main interface board and a standby interface board, wherein the main control board, the main interface board and the standby interface board are respectively deployed on different servers, forwarding surface processes are deployed on the main control board, the main interface board and the standby interface board, detection messages are respectively transmitted between the main control board and the main interface board and between the main interface board and the standby interface board through an internal media surface network, physical network cards corresponding to the main control board, the main interface board and the standby interface board adopt DPDK (digital development kit) connection pipes, and the detection messages are processed by the forwarding surface processes.
11. A message forwarding apparatus, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the message forwarding method according to any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium storing a computer-executable program for causing a computer to execute the message forwarding method according to any one of claims 1 to 9.
CN202011208331.6A 2020-11-03 2020-11-03 Message forwarding method and device and computer readable storage medium Pending CN114531375A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011208331.6A CN114531375A (en) 2020-11-03 2020-11-03 Message forwarding method and device and computer readable storage medium
PCT/CN2021/115392 WO2022095571A1 (en) 2020-11-03 2021-08-30 Message forwarding method and device, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011208331.6A CN114531375A (en) 2020-11-03 2020-11-03 Message forwarding method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114531375A true CN114531375A (en) 2022-05-24

Family

ID=81457514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011208331.6A Pending CN114531375A (en) 2020-11-03 2020-11-03 Message forwarding method and device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN114531375A (en)
WO (1) WO2022095571A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473811A (en) * 2022-09-21 2022-12-13 西安超越申泰信息科技有限公司 Network performance optimization method, device, equipment and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460470B (en) * 2022-08-19 2024-03-26 烽火通信科技股份有限公司 Multicast data forwarding method, device, equipment and readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008119221A1 (en) * 2007-03-30 2008-10-09 Hangzhou H3C Technologies Co., Ltd. A data packet exchange method, device and circuit board
CN105743711B (en) * 2016-04-13 2019-10-18 华为技术有限公司 A kind of fault detection method of network path, device and the network equipment
US10680944B2 (en) * 2018-01-19 2020-06-09 Juniper Networks, Inc. Arbitrating mastership between redundant control planes of a virtual node
CN108768737B (en) * 2018-06-06 2019-09-06 新华三技术有限公司 A kind of data switching method and apparatus
CN109889411B (en) * 2019-03-22 2020-09-11 新华三技术有限公司 Data transmission method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473811A (en) * 2022-09-21 2022-12-13 西安超越申泰信息科技有限公司 Network performance optimization method, device, equipment and medium

Also Published As

Publication number Publication date
WO2022095571A1 (en) 2022-05-12

Similar Documents

Publication Publication Date Title
US10263832B1 (en) Physical interface to virtual interface fault propagation
US10986171B2 (en) Method for unified communication of server, baseboard management controller, and server
CN100456694C (en) Method and apparatus for providing network connector
US8644139B2 (en) Priority based flow control within a virtual distributed bridge environment
US11729098B2 (en) Methods and apparatus to manage a physical network to reduce network dependencies in a multi-fabric virtual network
US9397851B2 (en) Directed route load/store packets for distributed switch initialization
US20190327108A1 (en) Priority tagging based solutions in fc sans independent of target priority tagging capability
US9282034B2 (en) Directed route load/store packets for distributed switch initialization
CN110061912B (en) Arbitrating mastership between redundant control planes of virtual nodes
US10708198B1 (en) Methods and apparatus to reduce packet flooding and duplicate packets in a multi-fabric virtual network
WO2022095571A1 (en) Message forwarding method and device, and computer readable storage medium
US20160205033A1 (en) Pool element status information synchronization method, pool register, and pool element
CN103546556B (en) One kind online moving method of virtual machine in future network XIA
JP2020511873A (en) MAC address synchronization
CN104144130A (en) Virtual machine system interconnection method and system and access switch
CN109150724B (en) Communication method and network card
US10581749B2 (en) Automatic discovery of maximum transmission unit size for a software defined network
KR101499668B1 (en) Device and method for fowarding network frame in virtual execution environment
EP3179678B1 (en) Rscn notification method, related device and computer storage medium
CN118158075A (en) Method and device for generating double-active frame top type switch framework
CN116260743A (en) Link detection method and device, intelligent network card and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20220524