CN112751756A - Data forwarding method, device, equipment and computer readable storage medium - Google Patents

Data forwarding method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112751756A
CN112751756A CN202011563899.XA CN202011563899A CN112751756A CN 112751756 A CN112751756 A CN 112751756A CN 202011563899 A CN202011563899 A CN 202011563899A CN 112751756 A CN112751756 A CN 112751756A
Authority
CN
China
Prior art keywords
line card
forwarding
line
data forwarding
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.)
Granted
Application number
CN202011563899.XA
Other languages
Chinese (zh)
Other versions
CN112751756B (en
Inventor
朱晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
Hangzhou DPtech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPtech Information Technology Co Ltd filed Critical Hangzhou DPtech Information Technology Co Ltd
Priority to CN202011563899.XA priority Critical patent/CN112751756B/en
Publication of CN112751756A publication Critical patent/CN112751756A/en
Application granted granted Critical
Publication of CN112751756B publication Critical patent/CN112751756B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • 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/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Landscapes

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

Abstract

When at least two specifications of line cards exist on target equipment, a first number of cross board ports in each line card are aggregated into a first logic port, and other cross board ports in each line card are aggregated into a second logic port, wherein the first number is the number of network boards supported by the first line card, the first line card is the line card supporting the least number of network boards on the target equipment, and the second line card is the line card supporting the most number of network boards on the target equipment; when data forwarding is required to be performed between two line cards which do not comprise the first line card and/or the second line card, the data forwarding is performed through the first logic interface and the second logic interface. The method and the device avoid the problem of packet loss caused by different bandwidths of the line cards with different specifications, increase the utilization rate of the link bandwidth and reduce resource waste.

Description

Data forwarding method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data forwarding method, apparatus, device, and computer readable storage medium.
Background
In order to meet different requirements of customers, service board cards (line cards for short) with different specifications and different bandwidths are often required to be mixed and inserted into the same frame-type device, the number of cross-board forwarding ports and the bandwidth of the different line cards are different due to the limitation of the specifications of internal chips of the different line cards, and in order to meet the requirement of a high-performance line card, the high-bandwidth cross-board forwarding (cross-board for short) is often realized by using a mode of orthogonal combination of a plurality of data forwarding switching network boards (screen boards for short), so that the number of the screen boards connected by the line cards with different specifications is different.
The existing scheme adopts the principle of minimum compatibility and uses the line card with the minimum bandwidth in the frame type equipment as the reference to carry out data forwarding, but the bandwidth loss of the line card with high specification can be caused, and the high performance requirement of the frame type equipment can not be realized. Moreover, while the performance of the frame type equipment is improved, the use cost is also an important index, and data forwarding is carried out by taking the line card with the minimum bandwidth in the frame type equipment as a reference, so that more hardware equipment is required for supporting when the line cards with multiple specifications are mixed and inserted, and the operation and maintenance cost of a network system is increased; however, if the requirement of the line card is adapted by frequently replacing the frame device, the comprehensive bearing capacity of the network cannot be embodied, the flexibility and the practicability are lacked, and the waste of bandwidth and hardware resources is easily caused when the data service is increased.
Disclosure of Invention
In view of this, the present application provides a data forwarding method, apparatus, device and computer readable storage medium, which can increase the link bandwidth utilization rate and reduce resource waste when data is forwarded between multiple specification line cards.
Specifically, the method is realized through the following technical scheme:
a data forwarding method is applied to a target device, when line cards with at least two specifications exist on the target device, a first number of cross-board ports in each line card are aggregated into a first logic port, and other cross-board ports in each line card are aggregated into a second logic port, the first number is the number of network boards supported by a first line card, and the first line card is the line card supporting the minimum number of network boards on the target device, and the method comprises the following steps:
when data forwarding is required to be performed between first line card combinations, performing data forwarding through the first logic port, where the first line card combinations include the first line card and a second line card, and the second line card is a line card supporting the maximum number of network boards on the target device;
and when data forwarding is required to be performed between second line card combinations, performing data forwarding through the first logic port and the second logic port, wherein two line cards in the second line card combinations do not include the first line card and/or the second line card.
A data forwarding apparatus, which is applied to a target device, and when there are line cards of at least two specifications on the target device, aggregates a first number of board crossing ports in each line card into a first logical port, and aggregates other board crossing ports in each line card into a second logical port, where the first number is the number of boards supported by a first line card, and the first line card is a line card supporting the minimum number of boards on the target device, the apparatus comprising:
the first forwarding unit is configured to forward data through the first logic port when data forwarding needs to be performed between a first line card combination, where the first line card combination includes the first line card and a second line card, and the second line card is a line card supporting the maximum number of network boards on the target device;
and a second forwarding unit, configured to forward data through the first logic port and the second logic port when data forwarding needs to be performed between second line card combinations, where two line cards in the second line card combinations do not include the first line card and/or the second line card.
An electronic device, comprising: a processor, a memory;
the memory for storing a computer program;
the processor is used for executing the data forwarding method by calling the computer program.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements the above-described data forwarding method.
In the above technical solution provided by the present application, when there are line cards with at least two specifications on a target device, a first number of cross board ports in each line card are aggregated into a first logic port, and other cross board ports in each line card are aggregated into a second logic port, where the first number is the number of network boards supported by the first line card, the first line card is a line card supporting the minimum number of network boards on the target device, and the second line card is a line card supporting the maximum number of network boards on the target device, based on this, when data forwarding needs to be performed between the first line card and the second line card, data forwarding is performed through the first logic port; when data forwarding is required to be performed between two line cards which do not comprise the first line card and/or the second line card, the data forwarding is performed through the first logic interface and the second logic interface. Therefore, when the line cards with various specifications are mixed and inserted on the target equipment, the cross-board port flow is reasonably distributed to the corresponding logic ports under the condition of ensuring that the bandwidth of the link is not changed, and the problem of packet loss caused by different bandwidths of the line cards with different specifications is solved, so that the utilization rate of the bandwidth of the link is increased, and the resource waste is reduced.
Drawings
Fig. 1 is one of cross-board forwarding diagrams shown in the present application;
fig. 2 is a second cross-board forwarding diagram according to the present application;
fig. 3 is a schematic flow chart of a data forwarding method according to the present application;
fig. 4 is a schematic diagram illustrating a data forwarding apparatus according to the present application;
fig. 5 is a schematic structural diagram of an electronic device shown in the present application.
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.
First, the following technical terms related to the present application will be described:
link Aggregation technology (Link Aggregation): the method is characterized in that a plurality of physical ports are gathered together to form a logic port so as to realize load sharing of the throughput of the outgoing and incoming flow on each member port.
Spanning the plate opening: refers to a port in a line card that can perform cross-board communication.
At present, a Central Processing Unit (CPU) and a switching chip are installed in a line card, the combination of the CPU and the switching chip is an infrastructure of a current network security facility, and data is transmitted between the CPU and the switching chip or between two switching chips through a plurality of internal channels.
In practical applications, multiple line cards may be mixed and inserted into the same frame device, and the line cards may have the same specification or different specifications, and if cross-board (i.e., cross-line card) communication is to be performed on the same frame device, participation of an internal cascade interface is required. In order to fully utilize the bandwidth of the internal channel, there is a scheme that a corresponding rule is configured through a link aggregation algorithm, and an internal cascade interface connected to other line cards or switching chips on the same switching chip is virtualized into a logic interface, which may be called hg _ trunk, where each hg _ trunk supports multiple message distribution algorithms, so that messages sent from where they are received can be distributed to different logic interfaces according to the algorithms and sent out, and thus, load sharing can be achieved by performing data transmission between line cards.
However, when the cross-board communication is performed between two line cards supporting different numbers of network boards, if the high-specification line card forwards data to the low-specification line card, packet loss may occur due to insufficient bandwidth of the low-specification line card.
For example, as shown in the cross-board forwarding diagram of fig. 1, in fig. 1, it is assumed that switch0 is a switch chip of line card 0, switch1 is a switch chip of line card 1, and switch2 is a switch chip of line card 2, where switch0 receives traffic of 4 net boards at most at the same time, switch1 receives traffic of 3 net boards at most at the same time, and switch2 receives traffic of two net boards at most at the same time. When all the cross-board ports of the switch0 are aggregated into one virtual port hg _ trunk0 by the link aggregation control protocol, all the traffic of the switch0 is sent from the virtual port hg _ trunk 0.
When the switch0 allocates a part of traffic to the cross board ports connected to the net board 3 according to the algorithm of hg _ trunk, the traffic from the net board 3 is lost because the switch1 can only receive the traffic of 3 net boards at most and there is no cross board port corresponding to the net board 3 to receive the traffic; similarly, the traffic sent by the switch1 to the switch2 also has the same problem that, when the switch1 distributes a part of the traffic to the board spanning ports connected to the network board 2 according to the algorithm of hg _ trunk, the traffic from the network board 2 is lost because the switch2 can only receive the traffic of two network boards at most and there is no board spanning port corresponding to the network board 2 to receive the traffic.
In order to solve the above packet loss problem, an embodiment of the present application provides a data forwarding method, where when line cards of different specifications are mixed and inserted into a target device, the method configures aggregation rules, improves data forwarding bandwidths between the line cards, achieves the effects of optimizing a network structure and improving system core processing service capability, increases flexibility of a network link, reduces use cost, more fully and reasonably utilizes link resources, and avoids resource waste.
The following describes a data forwarding method provided in the embodiment of the present application in detail.
The data forwarding method provided by the embodiment of the present application is applied to a target device, and the target device may be the above-mentioned frame device, or may be other devices that need to be plugged with a cable card. When the target equipment has line cards with at least two specifications, a first number of board crossing ports in each line card are aggregated into a first logic port, and other board crossing ports in each line card are aggregated into a second logic port, wherein the first number is the number of network boards supported by the first line card, and the first line card is the line card supporting the minimum number of network boards on the target equipment.
Specifically, in order to complete stable data transmission between line cards of different specifications, the aggregation mode of the above scheme needs to be adjusted, that is, the splitting aggregation can be performed on the basis of the aggregation mode. That is, for each line card with different specifications mixedly inserted on the target device, a line card supporting the smallest number of network boards is found out, where the line card is defined as a first line card, and the smallest number of network boards supported by the first line card is defined as a first number; then, for each line card except the first line card on the target device, determining all board crossing ports capable of communicating with the first line card in the line card, and aggregating all the board crossing ports together through a link aggregation technology to form a logical port, where the logical port is defined as a first logical port, and aggregating other board crossing ports on the line card together through a link aggregation technology to form another logical port, where the logical port is defined as a second logical port.
For example, as shown in the cross-board forwarding diagram of fig. 2, in fig. 2, switch0 is a switch chip of line card 0, switch1 is a switch chip of line card 1, and switch2 is a switch chip of line card 2, where switch0 receives traffic of 4 net boards at most at the same time, switch1 receives traffic of 3 net boards at most at the same time, and switch2 receives traffic of two net boards at most at the same time. Among the 3 line cards, the line card supporting the smallest number of net boards is line card 2(switch2), and the number of net boards supported by line card 2 is 2, so that the line card 2 is the first line card, and the number of net boards supported by line card 2 is the first number. Based on this, two of the cross-board ports on switch0 are aggregated into one logic port hg _ trunk0 (i.e., the first logic port), and the other two cross-board ports on switch0 are aggregated into another logic port hg _ trunk1 (i.e., the second logic port); similarly, two of the cross-board ports of the switch1 are aggregated into the first logical port hg _ trunk0, and the other cross-board port of the switch1 is aggregated into the second logical port hg _ trunk 1.
In an implementation manner of the embodiment of the present application, the specification type of the line card on the target device is determined by comparing the specifications of each line card on the target device by using a line card inspection thread.
In this implementation manner, in order to determine whether a line card with at least two specifications is inserted in a mixed manner on a target device, a flag divmode for recording an aggregation mode may be preset, after a line card to be started checks a thread, the thread is used to continuously poll and compare the line card specifications of all slots of the target device, and when the thread finds that a mixed insertion of line cards with different specifications exists, the divmode is set, for example, when the mixed insertion exists, the divmode is 1, and when the mixed insertion does not exist, the divmode is 0. Therefore, when it is detected that divmode is 1, the splitting and aggregating operations of the first logic port and the second logic port may be performed.
It should be noted that when it is detected that divmode is 0, all board-crossing ports of each line card may be divided into the same logic port hg _ trunk0, and when it is detected that divmode is 1, one hg _ trunk0 initialized by default needs to be deleted, and the first logic port hg _ trunk0 and the second logic port hg _ trunk1 are obtained by splitting and aggregating.
Based on the above splitting and aggregating results, data forwarding between the line cards can be performed in the following manner.
Referring to fig. 3, a schematic flow chart of a data forwarding method provided in an embodiment of the present application is shown, where the method includes the following steps S301 to S302:
s301: when data forwarding is required to be performed between first line card combinations, the data forwarding is performed through a first logic port, wherein the first line card combinations include a first line card and a second line card, the first line card is a line card supporting the minimum number of network boards on the target device, and the second line card is a line card supporting the maximum number of network boards on the target device.
In the embodiment of the present application, for each line card with different specifications mixedly inserted in the target device, not only the line card with the minimum number of supported network boards, that is, the first line card, needs to be found out, but also the line card with the maximum number of supported network boards needs to be found out, where this line card is defined as the second line card. For convenience of description, a combination of the first line card and the second line card is defined as a first line card combination.
When data forwarding is required to be performed between the first line card combination, the data forwarding can be performed through the first logic interface. For example, in the 3 line cards shown in fig. 2, the line card supporting the smallest number of network boards is line card 2(switch2), the line card supporting the largest number of network boards is line card 0(switch0), that is, the first line card is line card 2(switch2), the second line card is line card 0(switch0), and hg _ trunk0 is the first logical port and hg _ trunk1 is the second logical port. Based on this, when data forwarding is performed between the line card 0(switch0) and the line card 2(switch2), forwarding can be performed through the hg _ trunk0, so that a packet loss phenomenon caused by bandwidth mismatching when data transmission is performed between different line cards is avoided.
In an implementation manner of the embodiment of the present application, the "forwarding data through the first logic port" in S301 may specifically include: determining a first cross-board forwarding path between the first line card combination by inquiring a pre-established data forwarding table; and carrying out data forwarding through the first logic port according to the first cross-board forwarding path.
In this implementation, after determining which line cards and the number of network boards supported by the line cards are mixedly inserted on the target device, and aggregating logical ports for the cross-board ports of the line cards, on this basis, a data forwarding table may be created in advance, where the data forwarding table may include one or more sub-tables, and by querying the data forwarding table, a data transmission path between a first line card and a second line card may be determined, that is, it is determined which other line cards (path line cards) the two line cards need to go through, and which logical ports of the two line cards are used and passed through, so as to form a first cross-board forwarding path, and the first cross-board forwarding path is used to indicate which passed-through line cards (or no path line cards) between the two line cards, and to perform data transmission through the first logical ports of the line cards.
S302: and when data forwarding is required to be performed between the second line card combination, performing data forwarding through the first logic port and the second logic port, wherein two line cards in the second line card combination do not comprise the first line card and/or the second line card.
In the embodiment of the present application, for convenience of description, each line card on the target device except for the first line card and the second line card is defined as a third line card, and then, the first line card and the third line card may be defined as a combination of the second line card, the second line card and the third line card may also be defined as a combination of the second line card, and two third line cards may also be defined as a combination of the second line card.
When data forwarding is required to be performed between the second line card combination, the data forwarding can be performed through the first logic interface and the second logic interface. For example, in 3 line cards shown in fig. 2, when data forwarding is performed between line card 0(switch0) and line card 1(switch1), forwarding may be performed through hg _ trunk0 and hg _ trunk1, and specifically, traffic may be evenly distributed to hg _ trunk0 and hg _ trunk1 according to different ports for forwarding; similarly, when data forwarding is performed between the line card 1(switch1) and the line card 2(switch2), forwarding may be performed through hg _ trunk0 and hg _ trunk1, and specifically, traffic may be equally distributed to hg _ trunk0 and hg _ trunk1 according to different ports for forwarding. Therefore, the phenomenon of packet loss caused by bandwidth mismatching when data transmission is carried out between different line cards is avoided.
In an implementation manner of the embodiment of the present application, the "performing data forwarding through the first logic port and the second logic port" in S302 may specifically include: determining a second cross-board forwarding path between the second line card combination by inquiring a pre-established data forwarding table; and according to the second cross-board forwarding path, data forwarding is carried out through the first logic port and the second logic port.
In this implementation, similar to the specific implementation of S301, a data forwarding table is created in advance, and a data transmission path between the second line card combination can be determined by querying the data forwarding table, that is, it is determined which other line cards (path line cards for short) the two line cards need to go through, and which logical ports of the two line cards and the path line card are used, so as to form a second cross-board forwarding path, where the second cross-board forwarding path is used to indicate which path line cards (or no path line cards) between the two line cards pass through, and data transmission is performed through the first logical ports and the second logical ports of the line cards.
In the specific implementation manner of S301 and S302, the data forwarding table may include a first data structure table corresponding to each cross board port in each line card, where the first data structure table is used to record a path that needs to be passed through to reach each destination line card through the corresponding cross board port.
Specifically, first, module _ id is a unique identifier of the switch chip, and is usually used to identify different line cards; secondly, in order to record a forwarding path that the cross-board port traffic should take, that is, which line cards the cross-board port traffic should pass through and which logic ports between the line cards to perform data forwarding, two data structures modport _ map _ sw and modport _ map _ sel are required. In this embodiment of the application, for each board crossing port on each line card, the board crossing port may uniquely correspond to one mode _ map _ sw table, where the mode _ map _ sw table is a first data structure table, and the mode _ map _ sw table is used to record a forwarding path that the corresponding board crossing port needs to pass through to reach each destination module _ id; or, the board crossing port may correspond to a plurality of different mode _ map _ sw tables, where the different mode _ map _ sw tables are respectively used to record forwarding paths that need to be passed by the corresponding board crossing port to reach different destination module _ ids. The modport _ map _ sw tables are collectively the first data structure table.
Since there may be multiple options for different board-crossing ports to reach the same destination module _ id, the data forwarding table may include a model _ map _ sw table corresponding to each board-crossing port on each line card, and a first board-crossing forwarding path between first line card combinations or a second board-crossing forwarding path between second line card combinations may be determined by querying the model _ map _ sw tables in the data forwarding table. In addition, modport _ map _ sel can be used to record which port _ map _ sw table corresponding to which board crossing port on which line card is selected, so that the selected modport _ map _ sw tables can be used to generate the first board crossing forwarding path or the second board crossing forwarding path.
Further, when only a line card of one specification is on the target device, all cross-board ports in each line card are aggregated into a first logical port, and on this basis, the data forwarding method provided in the embodiment of the present application further includes: when data forwarding is required to be performed between any two line cards, the data forwarding is performed through the first logic interface.
Specifically, when the line cards on the target device are the same in size, that is, the number of network boards supported by each line card is the same, all the board crossing ports of each line card may be classified into the same logic port hg _ trunk0, that is, the first logic port. Thus, when data forwarding is required to be performed between any two line cards, the two line cards can perform data forwarding through the first logic interface.
In the data forwarding method provided by the embodiment of the application, aggregation is further split and aggregated on the basis of the original aggregation through modifying the aggregation rule, so that cross-board traffic forwarding is not limited to line cards of the same specification or bandwidth loss, and the flexibility of equipment use is improved. When the line cards with various specifications are mixed and inserted on the target equipment, under the condition of ensuring that the bandwidth of the link is not changed, the port flow is reasonably distributed to the corresponding logic ports, the problem of packet loss caused by different bandwidths of the line cards with different specifications is avoided, the utilization rate of the bandwidth of the link is improved, the effect of load sharing is achieved, the link resources can be more fully utilized, the use cost of the equipment is reduced, and the resource waste is avoided.
Referring to fig. 4, a schematic composition diagram of a data forwarding apparatus provided in this embodiment of the present application is a configuration diagram, where the apparatus is applied to a target device, and when there are line cards of at least two specifications on the target device, a first number of cross board ports in each line card is aggregated into a first logical port, and other cross board ports in each line card are aggregated into a second logical port, where the first number is a number of network boards supported by a first line card, and the first line card is a line card supporting a minimum number of network boards on the target device, where the apparatus includes:
a first forwarding unit 410, configured to forward data through the first logic port when data forwarding needs to be performed between a first line card combination, where the first line card combination includes the first line card and a second line card, and the second line card is a line card supporting the maximum number of network boards on the target device;
a second forwarding unit 420, configured to forward data through the first logical port and the second logical port when data forwarding is required to be performed between a second line card combination, where two line cards in the second line card combination do not include the first line card and/or the second line card.
In an implementation manner of the embodiment of the present application, when there is only a line card of one specification on the target device, all cross-board ports in each line card are aggregated into a first logical port, and the apparatus further includes:
and the third forwarding unit is used for forwarding data through the first logic port when data forwarding needs to be performed between any two line cards.
In an implementation manner of the embodiment of the present application, the first forwarding unit 410 is specifically configured to:
determining a first cross-board forwarding path between the first line card combination by inquiring a pre-established data forwarding table;
and carrying out data forwarding through the first logic port according to the first cross-board forwarding path.
In an implementation manner of the embodiment of the present application, the second forwarding unit 420 is specifically configured to:
determining a second cross-board forwarding path between the second line card combination by inquiring a pre-established data forwarding table;
and according to the second cross-board forwarding path, performing data forwarding through the first logic port and the second logic port.
In an implementation manner of the embodiment of the present application, the data forwarding table includes a first data structure table corresponding to each cross-board port in each line card, where the first data structure table is used to record a path that needs to be passed through to reach each destination line card by the corresponding cross-board port.
In an implementation manner of the embodiment of the present application, the specification type of the line card on the target device is determined by comparing the specifications of each line card on the target device by using a line card inspection thread.
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.
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, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. 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.
An embodiment of the present application further provides an electronic device, a schematic structural diagram of the electronic device is shown in fig. 5, where the electronic device 5000 includes at least one processor 5001, a memory 5002, and a bus 5003, and the at least one processor 5001 is electrically connected to the memory 5002; the memory 5002 is configured to store at least one computer-executable instruction, and the processor 5001 is configured to execute the at least one computer-executable instruction so as to perform the steps of any one of the data forwarding methods provided by any one of the embodiments or any one of the alternative embodiments of the present application.
Further, the processor 5001 may be an FPGA (Field-Programmable Gate Array) or other devices with logic processing capability, such as an MCU (micro controller Unit) and a CPU (Central processing Unit).
By applying the embodiment of the application, aggregation is further split and aggregated on the basis of the original aggregation through modifying the aggregation rule, so that cross-board flow forwarding is not limited to line cards of the same specification or bandwidth loss any more, and the flexibility of equipment use is improved. When the line cards with various specifications are mixed and inserted on the target equipment, under the condition of ensuring that the bandwidth of the link is not changed, the port flow is reasonably distributed to the corresponding logic ports, the problem of packet loss caused by different bandwidths of the line cards with different specifications is avoided, the utilization rate of the bandwidth of the link is improved, the effect of load sharing is achieved, the link resources can be more fully utilized, the use cost of the equipment is reduced, and the resource waste is avoided.
The embodiments of the present application further provide another computer-readable storage medium, which stores a computer program, where the computer program is used for implementing, when executed by a processor, the steps of any one of the data forwarding methods provided in any one of the embodiments or any one of the alternative embodiments of the present application.
The computer-readable storage medium provided by the embodiments of the present application includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random Access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Erasable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a readable storage medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer).
By applying the embodiment of the application, aggregation is further split and aggregated on the basis of the original aggregation through modifying the aggregation rule, so that cross-board flow forwarding is not limited to line cards of the same specification or bandwidth loss any more, and the flexibility of equipment use is improved. When the line cards with various specifications are mixed and inserted on the target equipment, under the condition of ensuring that the bandwidth of the link is not changed, the port flow is reasonably distributed to the corresponding logic ports, the problem of packet loss caused by different bandwidths of the line cards with different specifications is avoided, the utilization rate of the bandwidth of the link is improved, the effect of load sharing is achieved, the link resources can be more fully utilized, the use cost of the equipment is reduced, and the resource waste is avoided.
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 data forwarding method applied to a target device, wherein when there are line cards of at least two specifications on the target device, a first number of cross board ports in each line card are aggregated into a first logical port, and other cross board ports in each line card are aggregated into a second logical port, the first number being the number of boards supported by a first line card, and the first line card being a line card supporting the minimum number of boards on the target device, the method comprising:
when data forwarding is required to be performed between first line card combinations, performing data forwarding through the first logic port, where the first line card combinations include the first line card and a second line card, and the second line card is a line card supporting the maximum number of network boards on the target device;
and when data forwarding is required to be performed between second line card combinations, performing data forwarding through the first logic port and the second logic port, wherein two line cards in the second line card combinations do not include the first line card and/or the second line card.
2. The method of claim 1, wherein when there is only one size line card on the target device, aggregating all cross-board ports in each line card into a first logical port, the method further comprising:
and when data forwarding is required to be performed between any two line cards, performing data forwarding through the first logic port.
3. The method of claim 1, wherein the forwarding data through the first logical port comprises:
determining a first cross-board forwarding path between the first line card combination by inquiring a pre-established data forwarding table;
and carrying out data forwarding through the first logic port according to the first cross-board forwarding path.
4. The method of claim 1, wherein the forwarding data through the first logical port and the second logical port comprises:
determining a second cross-board forwarding path between the second line card combination by inquiring a pre-established data forwarding table;
and according to the second cross-board forwarding path, performing data forwarding through the first logic port and the second logic port.
5. The method of claim 3 or 4, wherein the data forwarding table comprises a first data structure table corresponding to each cross-board port in each line card, and the first data structure table is used for recording a path that needs to be traversed by the corresponding cross-board port to reach each destination line card.
6. The method according to any one of claims 1 to 4, wherein the specification class of the line card on the target device is determined by comparing the specifications of the respective line cards on the target device using a line card inspection thread.
7. A data forwarding apparatus, which is applied to a target device, and when there are line cards of at least two specifications on the target device, aggregates a first number of cross board ports in each line card into a first logical port, and aggregates other cross board ports in each line card into a second logical port, where the first number is the number of boards supported by a first line card, and the first line card is a line card supporting the minimum number of boards on the target device, the apparatus comprising:
the first forwarding unit is configured to forward data through the first logic port when data forwarding needs to be performed between a first line card combination, where the first line card combination includes the first line card and a second line card, and the second line card is a line card supporting the maximum number of network boards on the target device;
and a second forwarding unit, configured to forward data through the first logic port and the second logic port when data forwarding needs to be performed between second line card combinations, where two line cards in the second line card combinations do not include the first line card and/or the second line card.
8. The apparatus of claim 7, wherein when there is only one size line card on the target device, all cross-board ports in each line card are aggregated into a first logical port, the apparatus further comprising:
and the third forwarding unit is used for forwarding data through the first logic port when data forwarding needs to be performed between any two line cards.
9. An electronic device, comprising: a processor, a memory;
the memory for storing a computer program;
the processor configured to execute the data forwarding method according to any one of claims 1 to 6 by calling the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the data forwarding method of any one of claims 1 to 6.
CN202011563899.XA 2020-12-25 2020-12-25 Data forwarding method, device, equipment and computer readable storage medium Active CN112751756B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011563899.XA CN112751756B (en) 2020-12-25 2020-12-25 Data forwarding method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011563899.XA CN112751756B (en) 2020-12-25 2020-12-25 Data forwarding method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112751756A true CN112751756A (en) 2021-05-04
CN112751756B CN112751756B (en) 2023-02-28

Family

ID=75645986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011563899.XA Active CN112751756B (en) 2020-12-25 2020-12-25 Data forwarding method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112751756B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060460A (en) * 2006-06-09 2007-10-24 华为技术有限公司 A method and communication equipment for protecting the Ethernet link collective logic port message against loss
CN103095568A (en) * 2013-01-30 2013-05-08 迈普通信技术股份有限公司 System and method for achieving stacking of rack type switching devices
CN105763472A (en) * 2014-12-18 2016-07-13 中兴通讯股份有限公司 Trans-board forwarding method and device
CN108933744A (en) * 2018-06-26 2018-12-04 新华三技术有限公司 A kind of message forwarding method and device
US20190229938A1 (en) * 2014-10-03 2019-07-25 Cisco Technology, Inc. Multicast routing
CN110138667A (en) * 2019-05-31 2019-08-16 新华三技术有限公司 A kind of generation method of forwarding-table item, device, cable card board and web plate
US20200037055A1 (en) * 2017-03-23 2020-01-30 Rockley Photonics Limited Leaf switch module and optoelectronic switch
CN111614555A (en) * 2020-04-20 2020-09-01 北京百卓网络技术有限公司 Method, device and equipment for establishing service channel
CN111817958A (en) * 2020-06-10 2020-10-23 新华三信息安全技术有限公司 Message forwarding method and network equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060460A (en) * 2006-06-09 2007-10-24 华为技术有限公司 A method and communication equipment for protecting the Ethernet link collective logic port message against loss
CN103095568A (en) * 2013-01-30 2013-05-08 迈普通信技术股份有限公司 System and method for achieving stacking of rack type switching devices
US20190229938A1 (en) * 2014-10-03 2019-07-25 Cisco Technology, Inc. Multicast routing
CN105763472A (en) * 2014-12-18 2016-07-13 中兴通讯股份有限公司 Trans-board forwarding method and device
US20200037055A1 (en) * 2017-03-23 2020-01-30 Rockley Photonics Limited Leaf switch module and optoelectronic switch
CN108933744A (en) * 2018-06-26 2018-12-04 新华三技术有限公司 A kind of message forwarding method and device
CN110138667A (en) * 2019-05-31 2019-08-16 新华三技术有限公司 A kind of generation method of forwarding-table item, device, cable card board and web plate
CN111614555A (en) * 2020-04-20 2020-09-01 北京百卓网络技术有限公司 Method, device and equipment for establishing service channel
CN111817958A (en) * 2020-06-10 2020-10-23 新华三信息安全技术有限公司 Message forwarding method and network equipment

Also Published As

Publication number Publication date
CN112751756B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
US12015563B2 (en) Management of resource affinities in computing systems having multiple cores
EP3238392B1 (en) Technologies for medium grained adaptive routing in high-performance network fabrics
US20200127922A1 (en) Hybrid network processing load distribution in computing systems
US20140056152A1 (en) Port mirroring in distributed switching systems
CN102845035A (en) Method of identifying destination in virtual environment
US9479459B2 (en) Method for controlling large distributed fabric-based switch using virtual switches and virtual controllers
CN112965824A (en) Message forwarding method and device, storage medium and electronic equipment
CN109873776B (en) Multicast message load sharing balancing method and device
CN103634228A (en) Network message transmission method and equipment
CN105763472A (en) Trans-board forwarding method and device
CN112000435A (en) Multi-activity load balancing method and system based on Openstack
CN109151620B (en) Aggregation group port switching method and device and Optical Line Terminal (OLT) equipment
CN112751756B (en) Data forwarding method, device, equipment and computer readable storage medium
US20130170340A1 (en) Dynamically Adjusting Active Members in Multichassis Link Bundle
CN112583736A (en) Signaling message distribution method, device, equipment and medium
CN109889421B (en) Router management method, device, terminal, system and storage medium
CN111464443A (en) Message forwarding method, device, equipment and storage medium based on service function chain
CN113395183B (en) Virtual node scheduling method and system for network simulation platform VLAN interconnection
CN111327543A (en) Message forwarding method and device, storage medium and electronic device
US11394663B1 (en) Selective packet processing including a run-to-completion packet processing data plane
CN105939242B (en) Realize the method and device of virtual system
CN107113244B (en) Data forwarding method, device and system
CN103379031A (en) Equipment connection method, system and apparatus
US8880759B2 (en) Apparatus and method for fragmenting transmission data
CN112653626A (en) High-delay link determining method, route publishing 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
GR01 Patent grant
GR01 Patent grant