Method for forwarding message and CLOS (clock-line-operating System) framework switch

文档序号:687761 发布日期:2021-04-30 浏览:18次 中文

阅读说明:本技术 一种转发报文的方法和clos架构交换机 (Method for forwarding message and CLOS (clock-line-operating System) framework switch ) 是由 温才元 于 2020-12-23 设计创作,主要内容包括:本发明提供一种转发报文的方法和CLOS架构交换机,方法包括:根据预设的报文流复制规则为报文流设置报文流复制组标识,报文流复制规则至少包括需要复制的报文流对应的入端口号以及报文流标识;在第一输入端口接收第一报文流;根据所述第一报文流的标识以及第一入端口的端口号给第一报文流设置第一报文流复制组标识;将携带第一报文流复制组标识的第一报文流发送给交换卡,以便于所述交换卡根据所述第一报文流复制组标识查找预设的报文转发位图,将第一报文流从查找到的芯片上的出端口转发出去,所述报文转发位图包含报文流入端口号、报文流复制组标识以及报文流出端口号所在芯片的标识之间的匹配关系。提升整机的吞吐量和转发带宽。(The invention provides a method for forwarding a message and a CLOS framework switch, wherein the method comprises the following steps: setting a message flow copying group identifier for a message flow according to a preset message flow copying rule, wherein the message flow copying rule at least comprises an ingress port number corresponding to the message flow to be copied and a message flow identifier; receiving a first packet stream at a first input port; setting a first message flow copying group identifier for the first message flow according to the identifier of the first message flow and the port number of the first input port; sending a first message stream carrying a first message stream duplication group identifier to a switch card, so that the switch card searches a preset message forwarding bitmap according to the first message stream duplication group identifier, and forwards the first message stream from a found output port on a chip, wherein the message forwarding bitmap comprises a matching relation among a message inflow port number, a message stream duplication group identifier and an identifier of the chip where the message outflow port number is located. And the throughput and the forwarding bandwidth of the whole machine are improved.)

1. A method for forwarding a message is applied to a CLOS architecture switch, and comprises the following steps:

setting a message flow copying group identifier for a message flow according to a preset message flow copying rule, wherein the message flow copying rule at least comprises an ingress port number corresponding to the message flow to be copied and a message flow identifier;

receiving a first packet stream at a first input port;

setting a first message flow replication group identifier for the first message flow according to the identifier of the first message flow and the port number of the first input port;

and sending the first message stream carrying the first message stream replication group identifier to a switch card, so that the switch card searches a preset message forwarding bitmap according to the first message stream replication group identifier, and forwards the first message stream from a found output port on a chip, wherein the message forwarding bitmap comprises a matching relation among a message inflow port number, a message stream replication group identifier and an identifier of the chip where the message outflow port number is located.

2. The method of claim 1, further comprising:

respectively setting a line card identifier for each line card in the switch;

respectively setting chip identification for each chip in each line card;

establishing a one-to-one correspondence between each line card and each chip in each line card according to the line card identification and the chip identification;

the message forwarding bitmap comprises a matching relation among message inflow port numbers, message flow copying group identifications, line card identifications and identifications of chips in line cards where the message outflow port numbers are located;

the step of forwarding the first packet flow from the found output port on the chip specifically includes:

and forwarding the first message stream from the found line card and an output port on a chip in the found line card.

3. The method of claim 1,

the line card identification is unique in the switch;

the chip identification is unique in the switch.

4. The method of claim 1,

the message flow identifier is any combination of tuples in the message flow quintuple.

5. The method of claim 1,

the output port is a port connected with a device which needs to acquire the message flow.

6. A CLOS fabric switch for forwarding messages, comprising:

the message flow copying module is used for setting a message flow copying group identifier for a message flow according to a preset message flow copying rule, wherein the message flow copying rule at least comprises an ingress port number corresponding to the message flow to be copied and a message flow identifier;

a receiving module, configured to receive a first packet stream at a first input port;

an adding module, configured to set a first packet stream duplication group identifier for the first packet stream according to the identifier of the first packet stream and the port number of the first ingress port;

a sending module, configured to send the first packet flow carrying the first packet flow duplication group identifier to a switch card,

the switch card is configured to search a preset message forwarding bitmap according to the first message flow duplication group identifier, and forward the first message flow from a found output port on the chip, where the message forwarding bitmap includes a matching relationship between a message inflow port number, a message flow duplication group identifier, and an identifier of the chip where the message outflow port number is located.

7. The switch of claim 6, wherein the setup module is further to:

respectively setting a line card identifier for each line card in the switch;

respectively setting chip identification for each chip in each line card;

establishing a one-to-one correspondence between each line card and each chip in each line card according to the line card identification and the chip identification;

the message forwarding bitmap comprises a matching relation among message inflow port numbers, message flow copying group identifications, line card identifications and identifications of chips in line cards where the message outflow port numbers are located;

the switch card is specifically configured to:

and searching a preset message forwarding bitmap according to the first message stream copying group identifier, and forwarding the first message stream from the searched line card and an output port on a chip in the searched line card.

8. The switch of claim 6,

the line card identification is unique in the switch;

the chip identification is unique in the switch.

9. The switch of claim 6,

the message flow identifier is any combination of tuples in the message flow quintuple.

10. The switch of claim 6,

the output port is a port connected with a device which needs to acquire the message flow.

Technical Field

The present invention relates to the field of data communication, and in particular, to a method for forwarding a packet and a CLOS-architecture switch.

Background

On a switch of a CLOS architecture, the data packet forwarding process is roughly as follows: the flow received by the input port is submitted to a chip where the input port is located, the chip of the input port is submitted to an FE card (switch card), and the FE card (switch card) forwards the flow to the chip where the output port is located and finally reaches the output port; the general flow is shown in fig. 1, and it is often necessary to completely duplicate a single input flow into multiple outputs in a network for providing to different servers for data analysis or other purposes. This traffic replication is typically implemented on the switch using broadcast or multicast functionality. However, there is a limitation in broadcasting or multicasting, and no matter whether the egress chip needs the traffic, the FE card will flood the traffic and filter the traffic by the egress chip, which causes a waste of two-layer forwarding resources, as shown in fig. 2, a line card chip 1 and a line card chip 3 make traffic 1 at full line speed. All other line card chips receive the flooding traffic. The flooding traffic will fill up all the bandwidth connected to the FE card and the chip. When there is a duplicate traffic or other traffic input (whether unicast or multicast) at a port on another chip (e.g., chip 2 in fig. 2), packet loss occurs in the channel between the FE card and the line card chip because the bandwidth of all the line card chips and the FE card (switch card) is already occupied by the line speed traffic 1. According to the above description, it can be seen that the maximum copy bandwidth of the whole device in this scheme is equivalent to the connection path bandwidth of a single line card chip and an FE card. And the connection bandwidth of other line card chips and the FE card is wasted.

The conventional method generally increases the bandwidth of an FE (switch board) to improve the overall throughput, but cannot solve the problem of bandwidth waste during traffic flooding.

Disclosure of Invention

In order to solve the technical problem, the embodiment of the invention adopts the following technical scheme:

a method for forwarding a message is applied to a CLOS framework switch, and comprises the following steps:

setting a message flow copying group identifier for a message flow according to a preset message flow copying rule, wherein the message flow copying rule at least comprises an ingress port number corresponding to the message flow to be copied and a message flow identifier;

receiving a first packet stream at a first input port;

setting a first message flow replication group identifier for the first message flow according to the identifier of the first message flow and the port number of the first input port;

and sending the first message stream carrying the first message stream replication group identifier to a switch card, so that the switch card searches a preset message forwarding bitmap according to the first message stream replication group identifier, and forwards the first message stream from a found output port on a chip, wherein the message forwarding bitmap comprises a matching relation among a message inflow port number, a message stream replication group identifier and an identifier of the chip where the message outflow port number is located.

Optionally, the method further comprises:

respectively setting a line card identifier for each line card in the switch;

respectively setting chip identification for each chip in each line card;

establishing a one-to-one correspondence between each line card and each chip in each line card according to the line card identification and the chip identification;

the message forwarding bitmap comprises a matching relation among message inflow port numbers, message flow copying group identifications, line card identifications and identifications of chips in line cards where the message outflow port numbers are located;

the step of forwarding the first packet flow from the found output port on the chip specifically includes:

and forwarding the first message stream from the found line card and an output port on a chip in the found line card.

Alternatively to this, the first and second parts may,

the line card identification is unique in the switch;

the chip identification is unique in the switch.

Alternatively to this, the first and second parts may,

the message flow identifier is any combination of tuples in the message flow quintuple.

Alternatively to this, the first and second parts may,

the output port is a port connected with a device which needs to acquire the message flow.

Another aspect of the embodiments of the present invention is to provide a CLOS fabric switch for forwarding a packet, including:

the message flow copying module is used for setting a message flow copying group identifier for a message flow according to a preset message flow copying rule, wherein the message flow copying rule at least comprises an ingress port number corresponding to the message flow to be copied and a message flow identifier;

a receiving module, configured to receive a first packet stream at a first input port;

an adding module, configured to set a first packet stream duplication group identifier for the first packet stream according to the identifier of the first packet stream and the port number of the first ingress port;

a sending module, configured to send the first packet flow carrying the first packet flow duplication group identifier to a switch card,

the switch card is configured to search a preset message forwarding bitmap according to the first message flow duplication group identifier, and forward the first message flow from a found output port on the chip, where the message forwarding bitmap includes a matching relationship between a message inflow port number, a message flow duplication group identifier, and an identifier of the chip where the message outflow port number is located.

Optionally, the setting module is further configured to:

respectively setting a line card identifier for each line card in the switch;

respectively setting chip identification for each chip in each line card;

establishing a one-to-one correspondence between each line card and each chip in each line card according to the line card identification and the chip identification;

the message forwarding bitmap comprises a matching relation among message inflow port numbers, message flow copying group identifications, line card identifications and identifications of chips in line cards where the message outflow port numbers are located;

the switch card is specifically configured to:

and searching a preset message forwarding bitmap according to the first message stream copying group identifier, and forwarding the first message stream from the searched line card and an output port on a chip in the searched line card.

Optionally, the line card identifier is unique in the switch;

the chip identification is unique in the switch.

Optionally, the packet flow identifier is an arbitrary combination of tuples in the packet flow quintuple.

Alternatively to this, the first and second parts may,

the output port is a port connected with a device which needs to acquire the message flow.

The embodiment of the invention has the advantages that the bandwidth utilization rate of the FE card (switching matrix) of the CLOS switch in the flow replication scene can be reduced, thereby improving the throughput and the forwarding bandwidth of the whole machine.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.

FIG. 1 is a flow chart of a prior art method;

FIG. 2 is a schematic diagram of a prior art system architecture;

FIG. 3 is a flow chart of a method provided by an embodiment of the present invention;

FIG. 4 is a block diagram of an apparatus according to an embodiment of the present invention;

fig. 5 is a schematic structural diagram of a system according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

An embodiment of the present invention provides a method for forwarding a packet, which is applied to a CLOS-architecture switch, and as shown in fig. 3, the method includes the following steps:

s101, setting a message flow copying group identifier for a message flow according to a preset message flow copying rule, wherein the message flow copying rule at least comprises an ingress port number corresponding to the message flow to be copied and a message flow identifier;

s103, receiving a first message flow at a first input port;

s105, setting a first message flow copying group identifier for the first message flow according to the identifier of the first message flow and the port number of the first input port;

s107, sending the first message stream carrying the first message stream duplication group identifier to a switch card, so that the switch card searches a preset message forwarding bitmap according to the first message stream duplication group identifier, and forwards the first message stream from a found output port on a chip, wherein the message forwarding bitmap comprises a message inflow port number, a message stream duplication group identifier and a matching relation between identifiers of chips where the message outflow port numbers are located.

Optionally, the method further includes:

respectively setting a line card identifier for each line card in the switch;

respectively setting chip identification for each chip in each line card;

establishing a one-to-one correspondence between each line card and each chip in each line card according to the line card identification and the chip identification;

the message forwarding bitmap comprises a matching relation among message inflow port numbers, message flow copying group identifications, line card identifications and identifications of chips in line cards where the message outflow port numbers are located;

the step of forwarding the first packet flow from the found output port on the chip specifically includes:

and forwarding the first message stream from the found line card and an output port on a chip in the found line card.

Alternatively to this, the first and second parts may,

the line card identification is unique in the switch;

the chip identification is unique in the switch.

Alternatively to this, the first and second parts may,

the message flow identifier is any combination of tuples in the message flow quintuple.

Alternatively to this, the first and second parts may,

the output port is a port connected with a device which needs to acquire the message flow.

The embodiment of the invention has the advantages that the bandwidth utilization rate of the FE card (switching matrix) of the CLOS switch in the flow replication scene can be reduced, thereby improving the throughput and the forwarding bandwidth of the whole machine.

Another aspect of the embodiments of the present invention is to provide a CLOS fabric switch for forwarding a packet, as shown in fig. 4, including:

a setting module 201, configured to set a message flow replication group identifier for a message flow according to a preset message flow replication rule, where the message flow replication rule at least includes an ingress port number and a message flow identifier corresponding to a message flow to be replicated;

a receiving module 203, configured to receive a first packet stream at a first input port;

an adding module 205, configured to set a first packet flow duplication group identifier for the first packet flow according to the identifier of the first packet flow and the port number of the first ingress port;

a sending module 207, configured to send the first packet flow carrying the first packet flow duplication group identifier to the switch card 209,

the switch card 209 is configured to search a preset packet forwarding bitmap according to the first packet stream duplication group identifier, and forward the first packet stream from the found output port on the chip, where the packet forwarding bitmap includes a matching relationship between a packet ingress port number, a packet stream duplication group identifier, and an identifier of the chip where the packet egress port number is located.

Optionally, the setting module 201 is further configured to:

respectively setting a line card identifier for each line card in the switch;

respectively setting chip identification for each chip in each line card;

establishing a one-to-one correspondence between each line card and each chip in each line card according to the line card identification and the chip identification;

the message forwarding bitmap comprises a matching relation among message inflow port numbers, message flow copying group identifications, line card identifications and identifications of chips in line cards where the message outflow port numbers are located;

the switch card 209 is specifically configured to:

and searching a preset message forwarding bitmap according to the first message stream copying group identifier, and forwarding the first message stream from the searched line card and an output port on a chip in the searched line card.

Alternatively to this, the first and second parts may,

the line card identification is unique in the switch;

the chip identification is unique in the switch.

Alternatively to this, the first and second parts may,

the message flow identifier is any combination of tuples in the message flow quintuple.

Alternatively to this, the first and second parts may,

the output port is a port connected with a device which needs to acquire the message flow.

The embodiment of the invention has the advantages that the bandwidth utilization rate of the FE card (switching matrix) of the CLOS switch in the flow replication scene can be reduced, thereby improving the throughput and the forwarding bandwidth of the whole machine.

The following further explains the embodiment of the present invention with reference to specific application scenarios:

step one, the switch equipment needs to identify all chips on all line cards and generate a Modid (line card chip global identification) information table. The Modid is unique in the whole equipment and has a one-to-one correspondence relationship with chips of the line card.

And step two, the user configures the switch and configures the flow replication rule to form a flow replication group. The traffic replication group defines the content of traffic that needs to be replicated and which ports need to output the set of replicated traffic. Where the traffic replication rules differ depending on the configuration of the user and the capabilities of the switch. For example, the traffic of port 1 incoming traffic whose source IP is a specific IP may be marked as replication group 1.

And step three, the flow of the input port reaches the line card chip where the input port is located, and the input line card chip marks the flow (which can be all the flow or part of the flow of the input port) to be copied by a copy group according to the flow copy rule.

And step four, the marked flow is sent to the FE card (switch card) by the input chip, meanwhile, the system well calculates and records the input port and the output port needing the flow according to the forwarding rule configured by the user, and a forwarding bitmap of the FE card is formed according to the chip Modid where the output port is located. The forwarding bitmap is shown in table 1:

TABLE 1

Wherein the Modid: xx in xxyy represents a line card number, and yy represents a chip identifier on the line card.

And step five, after the flow is copied to an FE card (switch card), the flow is flooded to a chip with an output port according to the output port chip information in the forwarding bitmap. And the chip without the output port does not carry out flooding output. Therefore, the chip without the flow copying output port can be used for other flow forwarding, and the bandwidth utilization efficiency of the FE card (switch card) is greatly improved. Fig. 5 shows a schematic diagram of a forwarding process, where output ports of the replica group 1 are distributed on the chip 3 and the chip 4, and then the output chip corresponding to the replica group 1 in a forwarding bitmap of the FE card (switch card) includes the chip 3 and the chip 4. After reaching the FE card, the traffic will not flood over all the line card chips, but only over chip 3 and chip 4. Therefore, the path bandwidths of other line card chips and the FE card are still in an available state; if chip 2 has other replication group traffic or normal traffic input at this time, the traffic can still be forwarded to other chips normally.

The embodiment of the invention has the advantages that the bandwidth utilization rate of the FE card (switching matrix) of the CLOS switch in the flow replication scene can be reduced, thereby improving the throughput and the forwarding bandwidth of the whole machine.

Those of ordinary skill in the art will understand that: the figures are merely schematic representations of one embodiment, and the blocks or flow diagrams in the figures are not necessarily required to practice the present invention.

From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.

The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the 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 may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 201, 202, 203, etc., are merely used for distinguishing different operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.

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 may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

While alternative embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the invention.

It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于最大差分谱的快速突发信号检测方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!