CN111131048A - Network traffic forwarding method and device, electronic equipment and machine-readable storage medium - Google Patents

Network traffic forwarding method and device, electronic equipment and machine-readable storage medium Download PDF

Info

Publication number
CN111131048A
CN111131048A CN201911410353.8A CN201911410353A CN111131048A CN 111131048 A CN111131048 A CN 111131048A CN 201911410353 A CN201911410353 A CN 201911410353A CN 111131048 A CN111131048 A CN 111131048A
Authority
CN
China
Prior art keywords
board
board card
forwarding table
forwarding
hardware 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.)
Pending
Application number
CN201911410353.8A
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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911410353.8A priority Critical patent/CN111131048A/en
Publication of CN111131048A publication Critical patent/CN111131048A/en
Pending legal-status Critical Current

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/54Organization of routing tables
    • 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/33Flow control; Congestion control using forward notification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/40Constructional details, e.g. power supply, mechanical construction or backplane

Landscapes

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

Abstract

The application provides a network traffic forwarding method and device, electronic equipment and a machine-readable storage medium. In the application, a main control board acquires forwarding performance parameters of a plurality of service board cards; selecting a service board card with the maximum capacity of a hardware forwarding table entry from the service board cards as a first board card; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card; the second board card receives the target flow and searches whether a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item; if the hardware forwarding table entry matched with the target flow exists in the local hardware forwarding table entry of the second board card, the target flow is directly forwarded from the second board card based on the matched hardware forwarding table entry, and the network flow forwarding efficiency is improved.

Description

Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a network traffic forwarding method and apparatus, an electronic device, and a machine-readable storage medium.
Background
With the development of information technology, the demands of enterprises on the performance and networking flexibility of network devices are increasing. In general, the network devices may include a box-type network device, a box-type network device; wherein, only one service mainboard for network flow processing is integrated in the box type network equipment. Besides the service main board, a plurality of service boards can be integrated into the frame-type network device, and the plurality of service boards can be inserted into the frame-type network device through the board slot connected to the back board of the frame-type network device and managed by the service main board.
Disclosure of Invention
The application provides a network flow forwarding method, which is applied to frame type network equipment; the frame type network equipment comprises a main control board and a plurality of service board cards managed by the main control board; the method comprises the following steps:
the main control board acquires forwarding performance parameters of a plurality of service board cards; the forwarding performance parameter at least includes a capacity of a hardware forwarding table entry used for network traffic forwarding and indicating the service board card;
selecting a service board card with the maximum capacity of a hardware forwarding table entry from the service board cards as a first board card; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card;
the second board card receives the target flow and searches whether a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item; and if a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item of the second board card, directly forwarding the target flow from the second board card based on the matched hardware forwarding table item.
Optionally, the second board card is preset with a cross-board forwarding route issued by the main control board and indicating to forward the target traffic from the second board card to the first board card;
if the hardware forwarding table entry matched with the target flow does not exist in the local hardware forwarding table entry of the first board card, the method further includes:
based on the cross-board forwarding route, the second board card forwards the target traffic to the first board card, so that the first board card searches whether a hardware forwarding table item matched with the target traffic exists in a local hardware forwarding table item based on the local hardware forwarding table item, and forwards the target traffic continuously.
Optionally, if there is no hardware forwarding entry matching the target traffic in the local hardware forwarding entry of the first board, the method further includes:
the first board card forwards the target traffic to the main control board, so that the main control board forwards the target traffic based on the software forwarding table corresponding to the target traffic learned by the main control board and based on the software forwarding table.
Optionally, the method further includes:
in response to a board card pulling-out event or a board card inserting event of the service board cards, the main control board reselects the first board card and the second board card from the plurality of service board cards; and issuing an instruction to forward the target traffic from the second board card to a cross-board forwarding route of the first board card for the re-determined second board card.
The application also provides a network flow forwarding device, which is applied to the frame type network equipment; the frame type network equipment comprises a main control board and a plurality of service board cards managed by the main control board; the device comprises:
the main control board acquires the forwarding performance parameters of the service board cards; the forwarding performance parameter at least includes a capacity of a hardware forwarding table entry used for network traffic forwarding and indicating the service board card;
the selecting module selects a service board card with the maximum capacity of a hardware forwarding table entry from the plurality of service board cards as a first board card; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card;
the forwarding module is used for receiving the target flow by the second board card and searching whether a hardware forwarding table item matched with the target flow exists or not based on a local hardware forwarding table item; and if a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item of the second board card, directly forwarding the target flow from the second board card based on the matched hardware forwarding table item.
Optionally, the second board card is preset with a cross-board forwarding route issued by the main control board and indicating to forward the target traffic from the second board card to the first board card;
if the hardware forwarding table entry matched with the target traffic does not exist in the local hardware forwarding table entry of the first board card, the forwarding module further:
based on the cross-board forwarding route, the second board card forwards the target traffic to the first board card, so that the first board card searches whether a hardware forwarding table item matched with the target traffic exists in a local hardware forwarding table item based on the local hardware forwarding table item, and forwards the target traffic continuously.
Optionally, if there is no hardware forwarding entry matching the target traffic in the local hardware forwarding entry of the first board, the forwarding module further:
the first board card forwards the target traffic to the main control board, so that the main control board forwards the target traffic based on the software forwarding table corresponding to the target traffic learned by the main control board and based on the software forwarding table.
Optionally, the selecting module further:
in response to a board card pulling-out event or a board card inserting event of the service board cards, the main control board reselects the first board card and the second board card from the plurality of service board cards; and issuing an instruction to forward the target traffic from the second board card to a cross-board forwarding route of the first board card for the re-determined second board card.
The application also provides an electronic device, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are mutually connected through the bus;
the memory stores machine-readable instructions, and the processor executes the method by calling the machine-readable instructions.
The present application also provides a machine-readable storage medium having stored thereon machine-readable instructions which, when invoked and executed by a processor, implement the above-described method.
According to the embodiment, the service board card with the maximum capacity of the hardware forwarding table entry is selected as the first board card from the plurality of service board cards managed on the basis of the main control board; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as the second board card, so that when the resource of the hardware forwarding table entry of the second board card is insufficient, the first board card is used as the proxy board card of the second board card to realize the forwarding processing of the target flow received by the second board card, the performance consumption of the main control board caused by the fact that the original second board card sends the target flow to the main control board for forwarding processing is reduced, and the network flow forwarding efficiency is improved.
Drawings
Fig. 1 is a system architecture diagram of a block network provided by an exemplary embodiment;
fig. 2 is a flow chart of a method for forwarding network traffic according to an example embodiment;
fig. 3 is a block diagram of a network traffic forwarding device provided by an example embodiment;
fig. 4 is a hardware block diagram of an electronic device according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to enable those skilled in the art to better understand the technical solution in the embodiment of the present application, a brief description will be given below to the related technology of network traffic forwarding related to the embodiment of the present application.
Referring to fig. 1, fig. 1 is a system architecture diagram of a frame network device according to an embodiment of the present disclosure.
The frame network device shown in fig. 1 includes a main control board, a plurality of service boards (S1, S2.., SN, where N is a natural number greater than 3), a switching backplane, and ports (PortA, PortB); the frame type network equipment can perform communication interaction and network traffic processing and forwarding with the service board cards based on the switching backplane; the master control board may manage the plurality of service boards.
As shown in fig. 1, network traffic enters from a port PortA, and is forwarded out of the frame network device through the port PortB after performing service processing on a corresponding service type by a main control board or a plurality of service boards.
On the basis of the networking architecture, the method aims to provide a method for selecting a first board card and a second board card with different hardware table item capacities from a plurality of service board cards integrated by a frame type network device; and the first board card executes forwarding processing aiming at the network traffic which cannot be processed by the second board card due to insufficient hardware table item resources.
When the method is realized, the frame type network equipment comprises a main control board and a plurality of service board cards managed by the main control board; the main control board acquires forwarding performance parameters of a plurality of service board cards; the forwarding performance parameter at least includes a capacity of a hardware forwarding table entry used for network traffic forwarding and indicating the service board card; selecting a service board card with the maximum capacity of a hardware forwarding table entry from the service board cards as a first board card; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card.
Further, the second board card receives the target flow and searches whether a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item; and if a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item of the second board card, directly forwarding the target flow from the second board card based on the matched hardware forwarding table item.
In the above scheme, a service board card with the largest capacity of a hardware forwarding table entry is selected as a first board card from a plurality of service board cards managed on the basis of a main control board; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as the second board card, so that when the resource of the hardware forwarding table entry of the second board card is insufficient, the first board card is used as the proxy board card of the second board card to realize the forwarding processing of the target flow received by the second board card, the performance consumption of the main control board caused by the fact that the original second board card sends the target flow to the main control board for forwarding processing is reduced, and the network flow forwarding efficiency is improved.
The present application is described below with reference to specific embodiments and specific application scenarios.
Referring to fig. 2, fig. 2 is a flowchart of a network traffic forwarding method according to an embodiment of the present application, where the method is applied to a frame network device; the frame type network equipment comprises a main control board and a plurality of service board cards managed by the main control board, and the method comprises the following steps:
step 202, the main control board obtains forwarding performance parameters of a plurality of service board cards; wherein the forwarding performance parameter at least includes a capacity of a hardware forwarding table entry for network traffic forwarding, which indicates the service board card.
Step 204, selecting a service board card with the maximum capacity of a hardware forwarding table entry from the service board cards as a first board card; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card.
Step 206, the second board receives the target traffic, and searches whether a hardware forwarding table item matched with the target traffic exists in a local hardware forwarding table item; and if a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item of the second board card, directly forwarding the target flow from the second board card based on the matched hardware forwarding table item.
In this specification, the above-mentioned frame network device refers to any form of network device in a frame structure.
For example, in practical applications, the above-mentioned frame-type network device may be a switch, a router, a firewall, etc. in a frame-type structure.
In this specification, the frame network device is integrated with a main control board and a plurality of service boards managed by the main control board;
the plurality of service boards may include a plurality of service boards supporting processing of network traffic of the same service type.
For example, in practical applications, the service boards may include service boards supporting MPLS (Multi-Protocol Label Switching) type network traffic.
Of course, in practical application, the service type of the service board may also be other service types, and is not specifically limited in this specification.
In this specification, the forwarding performance parameter at least includes a capacity of a hardware forwarding table entry used by the service board for forwarding network traffic.
For example, in practical applications, the forwarding performance parameter may include a capacity of an ARP hardware forwarding entry used by the service board for network traffic layer two forwarding, such as: the number of ARP hardware forwarding entries of one service board of the network device is 1000, and the number of ARP hardware forwarding entries of another service board of the network device is 100.
Certainly, in practical applications, the forwarding performance parameter may include, in addition to the ARP hardware forwarding entry, other hardware forwarding entries for two-layer forwarding and three-layer forwarding of an OSI (Open System Interconnection) model; alternatively, the hardware table entry is split based on the ARP hardware forwarding table entry, such as: the ARP hardware forwarding table entry can also be divided into HOST hardware table entry and NEXTHOP hardware table entry storage; the HOST hardware entry may include an IP address of the interface of the network frame device and an IP address of a device in network communication with the network frame device, and the NEXTHOP hardware entry mainly includes a MAC address of the device and an outgoing interface corresponding to the network frame device.
In this specification, the main control board obtains forwarding performance parameters of a plurality of the service boards;
for example, referring to fig. 1, a main control board of the frame network device obtains forwarding performance parameters of the service boards S1, S2. The forwarding performance parameters of S1 include that the number of ARP hardware forwarding entries is 1000, the forwarding performance parameters of S2 include that the number of ARP hardware forwarding entries is 100, and the forwarding performance parameters of SN include that the number of ARP hardware forwarding entries is 500.
In this specification, further, the main control board selects a service board card with the largest hardware forwarding table entry capacity from the plurality of service board cards as a first board card; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card.
Continuing the example from the above example, the main control board selects the service board S1 with the largest capacity of the hardware forwarding entry as the first board from the service boards S1, S2,. SN; and the service board S2 with the capacity of the hardware forwarding table entry smaller than the preset threshold (for example, the preset threshold is 300 ARP hardware forwarding table entries) is used as the second board.
In this specification, further, the second board receives a target traffic and searches whether a hardware forwarding table entry matching the target traffic exists based on a local hardware forwarding table entry; and if a hardware forwarding table item matched with the target flow exists in the local hardware forwarding table item of the second board card, directly forwarding the target flow from the second board card based on the matched hardware forwarding table item.
Continuing the example from the above example, further, the S2 board (second board) receives the target traffic and searches whether there is a hardware forwarding table matching the target traffic based on the local 100 hardware forwarding tables, and if there is a hardware forwarding table matching the target traffic in the local 100 hardware forwarding tables of the S2 board, the target traffic is directly forwarded from the S2 board based on the matching hardware forwarding table.
In an embodiment shown in the present disclosure, the second board card presets a cross-board forwarding route, which is issued by the main control board and indicates to forward the target traffic from the second board card to the first board card.
Continuing the example following the above example, the S2 board (the second board) presets a cross-board forwarding route which is issued by the main control board and indicates to forward the target traffic from the S2 board to the S1 board (the first board); the cross-board forwarding route may be a direct route.
In this specification, further, if there is no hardware forwarding entry matching the target traffic in the local hardware forwarding entries of the first board, based on the cross-board forwarding route, the second board forwards the target traffic to the first board, so that the first board searches whether there is a hardware forwarding entry matching the target traffic based on the local hardware forwarding entry, and continues forwarding the target traffic.
Continuing to illustrate the example above, further, if there is no hardware forwarding entry matching the target traffic in the local 100 hardware forwarding entries of the S2 board (second board), the S2 board forwards the target traffic to the S1 board based on the cross-board forwarding route, so that the first board searches whether there is a hardware forwarding entry matching the target traffic based on the local hardware forwarding entries, and continues forwarding the target traffic.
It should be noted that, by searching whether a hardware forwarding table item matching the target traffic of the second board exists in the local hardware forwarding table item of the first board, when the resource of the hardware forwarding table item of the second board is insufficient, the first board is used as a proxy board of the second board to implement forwarding processing of the target traffic received by the second board, which reduces performance consumption of the main control board caused by the original second board sending the target traffic to the main control board for forwarding processing, and improves network traffic forwarding efficiency.
In an embodiment shown in the present invention, further, if there is no hardware forwarding entry matching the target traffic in the local hardware forwarding entries of the first board, the first board forwards the target traffic to the main control board, so that the main control board forwards the target traffic based on a software forwarding entry corresponding to the target traffic learned by the main control board and based on the software forwarding entry.
Continuing the example from the above example, further, if there is no hardware forwarding entry matching the target traffic in the local 1000 hardware forwarding entries of the S1 board, the S1 board forwards the target traffic to the main control board, so that the main control board forwards the target traffic based on the learned software forwarding entry corresponding to the target traffic and forwards the target traffic based on the software forwarding entry.
It should be noted that, the software forwarding table entry may generally include an MAC table entry corresponding to the target traffic, which is learned based on the MAC by the main control board based on a CPU mounted on the main control board. For the specific learning process and MAC entries, please refer to the MAC learning technique description, which is not repeated herein.
In practical applications, the software forwarding table entry may further include an ARP table entry corresponding to the target traffic, which is obtained by the main control board based on the CPU carried by the main control board and based on an ARP protocol, and a specific ARP protocol interaction process and ARP table entry, please refer to the ARP technical description, which is not described herein again.
In an embodiment shown in the present disclosure, in response to a board pulling-out event or a board insertion event of the service boards, the main control board reselects the first board and the second board from among the plurality of service boards; and issuing an instruction to forward the target traffic from the second board card to a cross-board forwarding route of the first board card for the second board card determined again.
Continuing the example from the above, in response to a card pulling-out or card inserting event of a service card (e.g., any one or a combination of S1 card and S2 card), the main control board reselects the first card (e.g., S3) and the second card (e.g., S4) from a plurality of service cards (S3,. gtoreq., SN); and issuing a cross-board forwarding route indicating that the target traffic is forwarded from the S4 board to the S3 board for the re-determined S4 board, so that when resources of a hardware forwarding entry of the S4 board are insufficient, the S4 board forwards the target traffic to the S3 board, and the S3 board is used as a proxy board of the S4 board to further forward the target traffic received by the S4 board, which is similar to the above-described processes of the S1 board and the S2 board, and is not described herein again.
In the above technical solution, a service board card with the largest capacity of a hardware forwarding entry is selected as a first board card from a plurality of service board cards managed based on a main control board; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as the second board card, so that when the resource of the hardware forwarding table entry of the second board card is insufficient, the first board card is used as the proxy board card of the second board card to realize the forwarding processing of the target flow received by the second board card, the performance consumption of the main control board caused by the fact that the original second board card sends the target flow to the main control board for forwarding processing is reduced, and the network flow forwarding efficiency is improved.
Fig. 3 is a block diagram of a network traffic forwarding device according to an exemplary embodiment of the present application. Corresponding to the above method embodiment, the present application further provides an embodiment of a network traffic forwarding device, where the device is applied to a frame network device; please refer to fig. 3, where the frame network device includes a main control board and a plurality of service boards managed by the main control board, and the apparatus includes:
an obtaining module 301, where the main control board obtains forwarding performance parameters of the service board cards; the forwarding performance parameter at least includes a capacity of a hardware forwarding table entry used for network traffic forwarding and indicating the service board card;
a selecting module 302, configured to select, from the service boards, a service board with a largest hardware forwarding entry capacity as a first board; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card;
the forwarding module 303, configured to receive the target traffic by the second board card, and search whether a hardware forwarding table entry matching the target traffic exists based on a local hardware forwarding table entry; and if a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item of the second board card, directly forwarding the target flow from the second board card based on the matched hardware forwarding table item.
In this embodiment, the second board card is preset with a cross-board forwarding route issued by the main control board and indicating to forward the target traffic from the second board card to the first board card;
if there is no hardware forwarding entry matching the target traffic in the local hardware forwarding entry of the first board, the forwarding module 303 further:
based on the cross-board forwarding route, the second board card forwards the target traffic to the first board card, so that the first board card searches whether a hardware forwarding table item matched with the target traffic exists in a local hardware forwarding table item based on the local hardware forwarding table item, and forwards the target traffic continuously.
In this embodiment, if there is no hardware forwarding entry matching the target traffic in the local hardware forwarding entry of the first board, the forwarding module 303 further:
the first board card forwards the target traffic to the main control board, so that the main control board forwards the target traffic based on the software forwarding table corresponding to the target traffic learned by the main control board and based on the software forwarding table.
In this embodiment, the selecting module 302 further:
in response to a board card pulling-out event or a board card inserting event of the service board cards, the main control board reselects the first board card and the second board card from the plurality of service board cards; and issuing an instruction to forward the target traffic from the second board card to a cross-board forwarding route of the first board card for the re-determined second board card.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or modules illustrated in the above embodiments may be implemented by a computer chip or an entity, or by an article of manufacture with certain functionality. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiment of the network traffic forwarding apparatus of the present application can be applied to the electronic device shown in fig. 4. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is a machine executable instruction formed by reading a corresponding computer program instruction in a machine readable storage medium through a processor of the electronic device where the device is located and then running the computer program instruction. In terms of hardware, as shown in fig. 4, the electronic device in which the network traffic forwarding apparatus is located according to the present application is a hardware structure diagram, except for the processor, the communication interface, the bus, and the machine-readable storage medium shown in fig. 4, the electronic device in which the apparatus is located in the embodiment may also include other hardware according to an actual function of the electronic device, which is not described again.
Correspondingly, an embodiment of the present application further provides a hardware structure of an electronic device of the apparatus shown in fig. 3, please refer to fig. 4, and fig. 4 is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. The apparatus comprises: a communication interface 401, a processor 402, a machine-readable storage medium 403, and a bus 404; the communication interface 401, the processor 402 and the machine-readable storage medium 403 are configured to communicate with each other via a bus 404. The communication interface 401 is used for performing network communication. The processor 402 may be a Central Processing Unit (CPU), and the processor 402 may execute machine-readable instructions stored in a machine-readable storage medium 403 to implement the methods described above.
The machine-readable storage medium 403 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 403 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), a solid state disk, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
Up to this point, the description of the hardware configuration shown in fig. 4 is completed.
Further, the present application provides a machine-readable storage medium, such as machine-readable storage medium 403 in fig. 4, including machine-executable instructions, which can be executed by processor 402 in the data processing apparatus to implement the data processing method described above.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A network flow forwarding method is characterized in that the method is applied to frame type network equipment; the frame type network equipment comprises a main control board and a plurality of service board cards managed by the main control board; the method comprises the following steps:
the main control board acquires forwarding performance parameters of a plurality of service board cards; the forwarding performance parameter at least includes a capacity of a hardware forwarding table entry used for network traffic forwarding and indicating the service board card;
selecting a service board card with the maximum capacity of a hardware forwarding table entry from the service board cards as a first board card; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card;
the second board card receives the target flow and searches whether a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item; and if a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item of the second board card, directly forwarding the target flow from the second board card based on the matched hardware forwarding table item.
2. The method according to claim 1, wherein the second board card presets a cross-board forwarding route issued by the main control board and indicating to forward the target traffic from the second board card to the first board card;
if the hardware forwarding table entry matched with the target flow does not exist in the local hardware forwarding table entry of the first board card, the method further includes:
based on the cross-board forwarding route, the second board card forwards the target traffic to the first board card, so that the first board card searches whether a hardware forwarding table item matched with the target traffic exists in a local hardware forwarding table item based on the local hardware forwarding table item, and forwards the target traffic continuously.
3. The method of claim 2, wherein if there is no hardware forwarding entry matching the target traffic in the local hardware forwarding entries of the first board, further comprising:
the first board card forwards the target traffic to the main control board, so that the main control board forwards the target traffic based on the software forwarding table corresponding to the target traffic learned by the main control board and based on the software forwarding table.
4. The method of claim 1, further comprising:
in response to a board card pulling-out event or a board card inserting event of the service board cards, the main control board reselects the first board card and the second board card from the plurality of service board cards; and issuing an instruction to forward the target traffic from the second board card to a cross-board forwarding route of the first board card for the re-determined second board card.
5. A network traffic forwarding apparatus, wherein the apparatus is applied to a frame type network device; the frame type network equipment comprises a main control board and a plurality of service board cards managed by the main control board; the device comprises:
the main control board acquires the forwarding performance parameters of the service board cards; the forwarding performance parameter at least includes a capacity of a hardware forwarding table entry used for network traffic forwarding and indicating the service board card;
the selecting module selects a service board card with the maximum capacity of a hardware forwarding table entry from the plurality of service board cards as a first board card; and the service board card with the capacity of the hardware forwarding table entry smaller than the preset threshold value is used as a second board card;
the forwarding module is used for receiving the target flow by the second board card and searching whether a hardware forwarding table item matched with the target flow exists or not based on a local hardware forwarding table item; and if a hardware forwarding table item matched with the target flow exists in a local hardware forwarding table item of the second board card, directly forwarding the target flow from the second board card based on the matched hardware forwarding table item.
6. The apparatus according to claim 5, wherein the second board card presets a board crossing forwarding route issued by the main control board and indicating to forward the target traffic from the second board card to the first board card;
if the hardware forwarding table entry matched with the target traffic does not exist in the local hardware forwarding table entry of the first board card, the forwarding module further:
based on the cross-board forwarding route, the second board card forwards the target traffic to the first board card, so that the first board card searches whether a hardware forwarding table item matched with the target traffic exists in a local hardware forwarding table item based on the local hardware forwarding table item, and forwards the target traffic continuously.
7. The apparatus of claim 6, wherein if there is no hardware forwarding entry matching the target traffic in the local hardware forwarding entries of the first board, the forwarding module further:
the first board card forwards the target traffic to the main control board, so that the main control board forwards the target traffic based on the software forwarding table corresponding to the target traffic learned by the main control board and based on the software forwarding table.
8. The apparatus of claim 5, wherein the selection module is further to:
in response to a board card pulling-out event or a board card inserting event of the service board cards, the main control board reselects the first board card and the second board card from the plurality of service board cards; and issuing an instruction to forward the target traffic from the second board card to a cross-board forwarding route of the first board card for the re-determined second board card.
9. An electronic device is characterized by comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory has stored therein machine-readable instructions, the processor executing the method of any of claims 1 to 4 by calling the machine-readable instructions.
10. A machine-readable storage medium having stored thereon machine-readable instructions which, when invoked and executed by a processor, carry out the method of any of claims 1 to 4.
CN201911410353.8A 2019-12-31 2019-12-31 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium Pending CN111131048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911410353.8A CN111131048A (en) 2019-12-31 2019-12-31 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911410353.8A CN111131048A (en) 2019-12-31 2019-12-31 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium

Publications (1)

Publication Number Publication Date
CN111131048A true CN111131048A (en) 2020-05-08

Family

ID=70506277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911410353.8A Pending CN111131048A (en) 2019-12-31 2019-12-31 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium

Country Status (1)

Country Link
CN (1) CN111131048A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021098602A1 (en) * 2019-11-19 2021-05-27 中兴通讯股份有限公司 Message forwarding method and apparatus, and distributed device
CN114697387A (en) * 2020-12-11 2022-07-01 中国联合网络通信集团有限公司 Data packet transmission method, device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252521A (en) * 2008-03-19 2008-08-27 中兴通讯股份有限公司 Method for forwarding message and distributed three layer network eqiupment
CN101534253A (en) * 2009-04-09 2009-09-16 中兴通讯股份有限公司 Message forwarding method and device
WO2015066840A1 (en) * 2013-11-05 2015-05-14 华为技术有限公司 Device and method for network address conversion
CN105763437A (en) * 2014-12-17 2016-07-13 中兴通讯股份有限公司 Message forwarding method and network equipment
CN105847185A (en) * 2015-01-16 2016-08-10 杭州迪普科技有限公司 Message processing method and apparatus for distributed device and distributed device
CN106506352A (en) * 2016-10-12 2017-03-15 杭州迪普科技股份有限公司 A kind of method and device for E-Packeting
CN106911597A (en) * 2017-02-14 2017-06-30 新华三技术有限公司 A kind of board-spanning forwarding method and apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252521A (en) * 2008-03-19 2008-08-27 中兴通讯股份有限公司 Method for forwarding message and distributed three layer network eqiupment
CN101534253A (en) * 2009-04-09 2009-09-16 中兴通讯股份有限公司 Message forwarding method and device
WO2015066840A1 (en) * 2013-11-05 2015-05-14 华为技术有限公司 Device and method for network address conversion
CN105763437A (en) * 2014-12-17 2016-07-13 中兴通讯股份有限公司 Message forwarding method and network equipment
CN105847185A (en) * 2015-01-16 2016-08-10 杭州迪普科技有限公司 Message processing method and apparatus for distributed device and distributed device
CN106506352A (en) * 2016-10-12 2017-03-15 杭州迪普科技股份有限公司 A kind of method and device for E-Packeting
CN106911597A (en) * 2017-02-14 2017-06-30 新华三技术有限公司 A kind of board-spanning forwarding method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021098602A1 (en) * 2019-11-19 2021-05-27 中兴通讯股份有限公司 Message forwarding method and apparatus, and distributed device
CN114697387A (en) * 2020-12-11 2022-07-01 中国联合网络通信集团有限公司 Data packet transmission method, device and storage medium
CN114697387B (en) * 2020-12-11 2023-08-11 中国联合网络通信集团有限公司 Data packet transmission method, device and storage medium

Similar Documents

Publication Publication Date Title
CN110784345B (en) Network traffic processing method and device, electronic equipment and machine-readable storage medium
CN110635987B (en) Message transmission method, device, equipment and machine readable storage medium
CN102549988B (en) Router and the method performed by router
CN106878194B (en) Message processing method and device
CN107547391B (en) Message transmission method and device
CN108600099B (en) Message forwarding method and device and leaf equipment
JP2012161044A (en) Communication processing device, address learning program, and address learning method
CN112333099B (en) Routing method, device and storage medium of local multipath message
CN108234422B (en) Resource scheduling method and device
US20140286339A1 (en) Hardware Acceleration for Routing Programs
CN111131048A (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN110391919B (en) Multicast traffic forwarding method and device, and electronic device
CN107659516B (en) Function control method and device for broadband remote access server BRAS
CN110912777A (en) Flow tracking method and device, electronic equipment and machine-readable storage medium
CN111600833B (en) Network operating system and message forwarding method
CN115712545B (en) Method, device, equipment and medium for realizing service topology awareness of cluster
CN110896378B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN110401594B (en) Message forwarding method and device, electronic equipment and machine-readable storage medium
CN110300068B (en) ARP resource management method and device and electronic equipment
CN108206782B (en) Message forwarding method, device, chip and server
CN110740198B (en) Neighbor table item management method and device, electronic equipment and machine-readable storage medium
CN114979028A (en) Data packet processing method and device and storage medium
CN112769693B (en) Method and device for maintaining multicast group
CN113794640B (en) Message processing method, device, equipment and machine readable storage medium
CN111698141A (en) Message forwarding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication