Message speed limiting method and device

文档序号:1956701 发布日期:2021-12-10 浏览:15次 中文

阅读说明:本技术 一种报文限速方法及装置 (Message speed limiting method and device ) 是由 马申骁 孙磊 于 2021-09-29 设计创作,主要内容包括:本申请提供一种报文限速方法及装置,该方法应用于网络设备中的主用主控板,且包括:获取目标SRv6隧道的出接口所在转发芯片的限速索引和限速值;将其下发给网络设备中所有的线卡板,以使任一线卡板在接收到需要使用目标SRv6隧道转发的第一数据报文时,将限速索引添加到第一数据报文中,得到第二数据报文,确定第二数据报文的出接口,在该出接口在该线卡板上时,根据相应转发芯片的限速值,对基于第一数据报文封装的SRv6报文进行限速处理后转发;在该出接口不在该线卡板上时,将第二数据报文发送给相应的线卡板,以由相应的线卡板根据相关限速值,对基于第一数据报文封装的SRv6报文进行限速处理后转发。本申请可提高网络体验。(The application provides a message speed limiting method and a device, the method is applied to a main control board in network equipment and comprises the following steps: acquiring a speed limit index and a speed limit value of a forwarding chip where an output interface of a target SRv6 tunnel is located; sending the data message to all line card boards in the network equipment, so that when any line card board receives a first data message which needs to be forwarded by using a target SRv6 tunnel, a speed limit index is added to the first data message to obtain a second data message, an output interface of the second data message is determined, and when the output interface is on the line card board, the SRv6 message packaged based on the first data message is subjected to speed limit processing and forwarded according to the speed limit value of a corresponding forwarding chip; and when the output interface is not on the line card board, sending the second data message to the corresponding line card board, so that the corresponding line card board performs speed limit processing on the SRv6 message packaged based on the first data message according to the relevant speed limit value and forwards the processed message. The application can improve network experience.)

1. A message speed limiting method is characterized in that the method is applied to an active main control board in network equipment, and the method comprises the following steps:

acquiring a speed limit index and a speed limit value of a forwarding chip where an output interface of a target segment route and an internet protocol sixth version SRv6 tunnel is located;

the obtained speed limit index and the speed limit value are sent to all line card boards in the network equipment, so that when any line card board in the network equipment receives a first data message which needs to be forwarded by using the target SRv6 tunnel, the speed limit index is added to the first data message to obtain a second data message, an output interface of the second data message is determined, and when the determined output interface is on the line card board, the SRv6 message packaged based on the first data message obtained after the speed limit index in the second data message is deleted is subjected to speed limit processing and then forwarded according to the speed limit value corresponding to a forwarding chip where the determined output interface corresponding to the speed limit index is located; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

2. The method of claim 1, wherein obtaining the speed limit index and the speed limit value of a forwarding chip where an egress interface corresponding to the target SRv6 tunnel is located specifically comprises:

when an output interface of the target SRv6 tunnel is a physical port, acquiring a speed limit value corresponding to the physical port, determining the acquired speed limit value as the speed limit value of a forwarding chip where the physical port is located, and applying for a unique speed limit index for the forwarding chip where the physical port is located from a preset speed limit index pool;

when the exit interface of the target SRv6 tunnel is an aggregation port, acquiring the speed limit value corresponding to the aggregation port, calculating the speed limit values of forwarding chips of all member ports according to the bandwidth of the member ports belonging to the aggregation port on the forwarding chip of all the member ports in the aggregation port, and applying for a unique speed limit index for the forwarding chips of all the member ports from the preset speed limit index pool.

3. The method of claim 2, wherein the speed limit values of the forwarding chips with all the member ports are calculated by:

for each forwarding chip in the forwarding chips where all the member ports are located, performing product operation on the sum of the bandwidths of the member ports belonging to the aggregation port on the forwarding chip and the speed limit value corresponding to the aggregation port to obtain a first operation result;

summing the bandwidths of the member ports belonging to the aggregation port on the forwarding chip where all the member ports are located to obtain a second operation result;

and carrying out quotient calculation on the first calculation result and the second calculation result to obtain the speed limit value of the forwarding chip.

4. The method of claim 1, further comprising:

and synchronizing the acquired speed limit index and the acquired speed limit value to a standby main control board in the network equipment.

5. A message speed limiting method is characterized in that the method is applied to any line card board in network equipment, and the method comprises the following steps:

receiving a speed limit index and a speed limit value of a forwarding chip where a target segment route acquired by a main control board and an output interface of an SRv6 sixth version of internet protocol tunnel are located, wherein the target segment route is sent by the main control board in the network equipment;

when a first data message is received and the target SRv6 tunnel needs to be used for forwarding the first data message, adding the speed limit index into the first data message to obtain a second data message, and determining an output interface of the second data message;

judging whether the determined outlet interface is on the cable clamping board or not;

when the judgment result is yes, according to the speed limit value corresponding to the forwarding chip where the determined outlet interface corresponding to the speed limit index is located, performing speed limit processing on SRv6 messages packaged based on the first data message obtained after deleting the speed limit index in the second data message, and then forwarding the messages;

and if not, sending the second data message to the line card board where the determined outlet interface is located, so that the corresponding line card board performs speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined outlet interface is located and corresponding to the speed limit index, and then forwards the SRv6 message.

6. A message speed limiting device is characterized in that the device is applied to an active main control board in network equipment, and the device comprises:

the acquisition module is used for acquiring a speed limit index and a speed limit value of a forwarding chip where an output interface of a target segment route and an internet protocol sixth version SRv6 tunnel is located;

the issuing module is used for issuing the acquired speed limit index and the acquired speed limit value to all line card boards in the network equipment, so that when any line card board in the network equipment receives a first data message which needs to be forwarded by using the target SRv6 tunnel, the speed limit index is added into the first data message to obtain a second data message, an output interface of the second data message is determined, and when the determined output interface is on the line card board, the SRv6 message which is packaged based on the first data message obtained after the speed limit index in the second data message is deleted is subjected to speed limit processing and then forwarded according to the speed limit value corresponding to the forwarding chip of the determined output interface corresponding to the speed limit index; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

7. The apparatus according to claim 6, wherein the obtaining module is specifically configured to obtain the speed limit index and the speed limit value of the forwarding chip on which the egress interface corresponding to the target SRv6 tunnel is located, through the following manners:

when an output interface of the target SRv6 tunnel is a physical port, acquiring a speed limit value corresponding to the physical port, determining the acquired speed limit value as the speed limit value of a forwarding chip where the physical port is located, and applying for a unique speed limit index for the forwarding chip where the physical port is located from a preset speed limit index pool;

when the exit interface of the target SRv6 tunnel is an aggregation port, acquiring the speed limit value corresponding to the aggregation port, calculating the speed limit values of forwarding chips of all member ports according to the bandwidth of the member ports belonging to the aggregation port on the forwarding chip of all the member ports in the aggregation port, and applying for a unique speed limit index for the forwarding chips of all the member ports from the preset speed limit index pool.

8. The apparatus according to claim 7, wherein the obtaining module is specifically configured to calculate the speed limit values of the forwarding chips where all the member ports are located by:

for each forwarding chip in the forwarding chips where all the member ports are located, performing product operation on the sum of the bandwidths of the member ports belonging to the aggregation port on the forwarding chip and the speed limit value corresponding to the aggregation port to obtain a first operation result;

summing the bandwidths of the member ports belonging to the aggregation port on the forwarding chip where all the member ports are located to obtain a second operation result;

and carrying out quotient calculation on the first calculation result and the second calculation result to obtain the speed limit value of the forwarding chip.

9. The apparatus of claim 6, further comprising:

and the synchronization module is used for synchronizing the acquired speed limit index and the acquired speed limit value to a standby main control board in the network equipment.

10. A message speed limiting device is characterized in that the device is applied to any line card board in network equipment, and the device comprises:

a receiving module, configured to receive a speed limit index and a speed limit value of a forwarding chip where a target segment route acquired by a main control board in the network device and an egress interface of an SRv6 tunnel of a sixth version of an internet protocol are located, where the target segment route is sent by the main control board;

the adding determination module is used for adding the speed limit index into the first data message to obtain a second data message and determining an output interface of the second data message when the first data message is received and the target SRv6 tunnel is needed to be used for forwarding the first data message;

the judging module is used for judging whether the determined outlet interface is on the cable clamping board or not;

the first speed limit module is used for carrying out speed limit processing on SRv6 messages packaged by first data messages obtained by deleting the speed limit index in the second data messages according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located when the judgment result of the judgment module is yes, and then forwarding the messages;

and the second speed limit module is used for sending the second data message to the line card board where the determined output interface is located when the judgment result of the judgment module is negative, so that the corresponding line card board carries out speed limit processing on SRv6 messages packaged based on the first data message obtained after the speed limit index in the second data message is deleted according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located and forwards the SRv6 messages.

Technical Field

The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for limiting a message speed.

Background

At present, when a network device forwards a data packet using a Segment Routing and Internet Protocol version six (SRv 6) tunnel, a relevant speed limit processing is not usually performed, which easily causes a network congestion problem and results in poor network experience.

Disclosure of Invention

In order to overcome the problems in the related art, the application provides a message speed limiting method and device.

According to a first aspect of an embodiment of the present application, a method for limiting a packet speed is provided, where the method is applied to an active main control board in a network device, and the method includes:

acquiring a speed limit index and a speed limit value of a forwarding chip where an output interface of a target SRv6 tunnel is located;

the obtained speed limit index and the speed limit value are sent to all line card boards in the network equipment, so that when any line card board in the network equipment receives a first data message which needs to be forwarded by using the target SRv6 tunnel, the speed limit index is added to the first data message to obtain a second data message, an output interface of the second data message is determined, and when the determined output interface is on the line card board, the SRv6 message packaged based on the first data message obtained after the speed limit index in the second data message is deleted is subjected to speed limit processing and then forwarded according to the speed limit value corresponding to a forwarding chip where the determined output interface corresponding to the speed limit index is located; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

According to a second aspect of the embodiments of the present application, a method for limiting a message speed is provided, where the method is applied to any line card board in a network device, and the method includes:

receiving a speed limit index and a speed limit value of a forwarding chip where an output interface of a target SRv6 tunnel is located, which are obtained by a main control board in the network device and sent by the main control board;

when a first data message is received and the target SRv6 tunnel needs to be used for forwarding the first data message, adding the speed limit index into the first data message to obtain a second data message, and determining an output interface of the second data message;

judging whether the determined outlet interface is on the cable clamping board or not;

when the judgment result is yes, according to the speed limit value corresponding to the forwarding chip where the determined outlet interface corresponding to the speed limit index is located, performing speed limit processing on SRv6 messages packaged based on the first data message obtained after deleting the speed limit index in the second data message, and then forwarding the messages;

and if not, sending the second data message to the line card board where the determined outlet interface is located, so that the corresponding line card board performs speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined outlet interface is located and corresponding to the speed limit index, and then forwards the SRv6 message.

According to a third aspect of the embodiments of the present application, there is provided a packet speed limiting device, where the device is applied to an active main control board in a network device, and the device includes:

the acquisition module is used for acquiring the speed limit index and the speed limit value of a forwarding chip where an output interface of the target SRv6 tunnel is located;

the issuing module is used for issuing the acquired speed limit index and the acquired speed limit value to all line card boards in the network equipment, so that when any line card board in the network equipment receives a first data message which needs to be forwarded by using the target SRv6 tunnel, the speed limit index is added into the first data message to obtain a second data message, an output interface of the second data message is determined, and when the determined output interface is on the line card board, the SRv6 message which is packaged based on the first data message obtained after the speed limit index in the second data message is deleted is subjected to speed limit processing and then forwarded according to the speed limit value corresponding to the forwarding chip of the determined output interface corresponding to the speed limit index; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

According to a fourth aspect of the embodiments of the present application, there is provided a packet speed limiting device, where the device is applied to any line card board in a network device, and the device includes:

a receiving module, configured to receive a speed limit index and a speed limit value of a forwarding chip where a target segment route acquired by a main control board in the network device and an egress interface of an SRv6 tunnel of a sixth version of an internet protocol are located, where the target segment route is sent by the main control board;

the adding determination module is used for adding the speed limit index into the first data message to obtain a second data message and determining an output interface of the second data message when the first data message is received and the target SRv6 tunnel is needed to be used for forwarding the first data message;

the judging module is used for judging whether the determined outlet interface is on the cable clamping board or not;

the first speed limit module is used for carrying out speed limit processing on SRv6 messages packaged by first data messages obtained by deleting the speed limit index in the second data messages according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located when the judgment result of the judgment module is yes, and then forwarding the messages;

and the second speed limit module is used for sending the second data message to the line card board where the determined output interface is located when the judgment result of the judgment module is negative, so that the corresponding line card board carries out speed limit processing on SRv6 messages packaged based on the first data message obtained after the speed limit index in the second data message is deleted according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located and forwards the SRv6 messages.

The technical scheme provided by the embodiment of the application can have the following beneficial effects:

in the embodiment of the present application, a message speed limit flow is added in the process of forwarding a data message by using an SRv6 tunnel, and the specific flow is as follows:

firstly, a main control board in the network equipment acquires a speed limit index and a speed limit value of a forwarding chip where an output interface of a target SRv6 tunnel is located, and transmits the acquired speed limit index and speed limit value to all line card boards in the network equipment; then, when any line card board in the network equipment receives a first data message which needs to be forwarded by using a target SRv6 tunnel, adding a speed limit index into the first data message to obtain a second data message, determining an output interface of the second data message, and when the determined output interface is on the line card board, carrying out speed limit processing on a SRv6 message encapsulated on the basis of the first data message obtained by deleting the speed limit index in the second data message according to a speed limit value corresponding to a forwarding chip where the determined output interface is located and corresponding to the speed limit index, and then forwarding the SRv6 message; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

Therefore, the problem of network congestion can be avoided to a certain extent through the message speed-limiting flow, and network experience is improved.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.

Fig. 1 is a schematic flow chart of a message speed limiting method according to an embodiment of the present application;

fig. 2 is a second schematic flowchart of a message speed limiting method according to an embodiment of the present application;

fig. 3 is a schematic structural diagram of a message speed limiting device according to an embodiment of the present application;

fig. 4 is a second schematic structural diagram of a message speed limiting device according to an embodiment of the present application;

fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of 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.

Next, examples of the present application will be described in detail.

An embodiment of the present application provides a message speed limiting method, which is applied to an active main control board in a network device, and as shown in fig. 1, the method may include the following steps:

s11, acquiring the speed limit index and the speed limit value of the forwarding chip where the output interface of the target SRv6 tunnel is located.

S12, issuing the obtained speed limit index and the obtained speed limit value to all line card boards in the network equipment, so that when any line card board in the network equipment receives a first data message which needs to be forwarded by using a target SRv6 tunnel, the speed limit index is added into the first data message to obtain a second data message, an output interface of the second data message is determined, and when the determined output interface is on the line card board, according to the speed limit value corresponding to a forwarding chip where the determined output interface corresponding to the speed limit index is located, SRv6 message packaged based on the first data message obtained after deleting the speed limit index in the second data message is forwarded after speed limit processing; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

It should be noted that, for the line card board, when determining the outgoing interface of the second data message, if the outgoing interface of the target SRv6 tunnel is a physical port, it may be directly determined that the physical port is the outgoing interface of the second data message; if the egress interface of the target SRv6 tunnel is an aggregation port, it may be determined by a hashing algorithm which member port of the aggregation port the egress interface of the second data packet is.

In addition, the specific encapsulation process of the cable card board encapsulating the first data message obtained after deleting the speed limit index in the second data message into SRv6 message is the prior art, and details are not described herein.

Specifically, in step S11, the master board may obtain the speed limit index and the speed limit value of the forwarding chip on which the egress interface corresponding to the target SRv6 tunnel is located in the following manner:

when an output interface of a target SRv6 tunnel is a physical port, acquiring a speed limit value corresponding to the physical port, determining the acquired speed limit value as the speed limit value of a forwarding chip where the physical port is located, and applying for a unique speed limit index for the forwarding chip where the physical port is located from a preset speed limit index pool;

when the exit interface of the target SRv6 tunnel is an aggregation port, acquiring a speed limit value corresponding to the aggregation port, calculating the speed limit values of forwarding chips in which all member ports are located according to the bandwidth of the member ports belonging to the aggregation port on the forwarding chip in which all the member ports are located in the aggregation port, and applying for a unique speed limit index for the forwarding chips in which all the member ports are located in a preset speed limit index pool.

It should be noted that, in an example, the speed limit value of the forwarding chip where the output interface corresponding to the target SRv6 tunnel is located, which is acquired by the main control board, may be presented on a speed limit template, where different speed limit values are recorded on different speed limit templates, and the template IDs of the different speed limit templates are different. In this case, the speed limit value of the forwarding chip on which the output interface corresponding to the target SRv6 tunnel is located, which is acquired by the main control board, may be represented by a template Identifier (ID) of the speed limit template.

In addition, in the above acquisition process, the main control board may specifically calculate the speed limit values of the forwarding chips where all the member ports are located in the following manner:

aiming at each forwarding chip in the forwarding chips where all the member ports are located, performing product operation on the sum of the bandwidths of the member ports belonging to the aggregation port on the forwarding chip and the speed limit value corresponding to the aggregation port to obtain a first operation result;

summing the bandwidths of the member ports belonging to the aggregation port on the forwarding chip where all the member ports are located to obtain a second operation result;

and carrying out quotient calculation on the first calculation result and the second calculation result to obtain the speed limit value of the forwarding chip.

For example, it is assumed that the network device includes a main master control board 11, a line card board 1, a line card board 2, and a line card board 3. An outlet interface of a certain SRv6 tunnel on the network equipment is assumed to be an aggregation port 4, and a corresponding speed limit value is A; the aggregation port 4 has 4 member ports, namely a member port 41, a member port 42, a member port 43 and a member port 44; assuming that the member port 41 and the member port 42 are both on the forwarding chip 21 on the cable card board 2 in the network device, the bandwidth of the member port 41 is B, and the bandwidth of the member port 42 is C; assuming that the member port 43 is on the forwarding chip 22 on the cable card board 2 in the network device, the bandwidth of the member port 43 is D; assume that the member port 44 is on the forwarding chip 31 of the cable card board 3 in the network device, and the bandwidth of the member port 44 is E.

Then, the forwarding chips where the egress interfaces of the SRv6 tunnel are located are the forwarding chip 21, the forwarding chip 22, and the forwarding chip 31. The main control board 11 can calculate the speed limit value of the forwarding chip 21 as

The main control board 11 can calculate the speed limit value of the forwarding chip 22 as

The main control board 11 can calculate the speed limit value of the forwarding chip 31 as

It should be further noted that, in order to ensure that the network device can normally operate when the main control board fails, after the main control board obtains the speed limit index and the speed limit value of the forwarding chip where the output interface of the target SRv6 tunnel is located, the main control board may also synchronize the obtained speed limit index and the obtained speed limit value of the forwarding chip where the output interface of the target SRv6 tunnel is located with the standby main control board in the network device, so as to be conveniently used when the main control board fails.

The embodiment of the application provides a message speed limiting method, which is applied to any line card board in network equipment, and as shown in fig. 2, the method can include the following steps:

and S21, receiving a speed limit index and a speed limit value of a forwarding chip where an output interface of the target SRv6 tunnel is located, which are obtained by the master control board sent by the master control board in the network device.

S22, when the first data message is received and the target SRv6 tunnel is needed to be used for forwarding the first data message, adding the speed limit index into the first data message to obtain a second data message, and determining an output interface of the second data message;

s23, judging whether the determined outlet interface is on the cable clamping board; if the determination result is yes, step S24 is executed, and if the determination result is no, step S25 is executed.

And S24, according to the speed limit value corresponding to the determined forwarding chip where the output interface is located and corresponding to the speed limit index, performing speed limit processing on the SRv6 message packaged based on the first data message obtained after deleting the speed limit index in the second data message, and then forwarding the message.

And S25, sending the second data message to the line card board where the determined outlet interface is located, so that the corresponding line card board performs speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined outlet interface is located and corresponding to the speed limit index, and then forwards the message.

It should be noted that, for the line card board, how to determine the outgoing interface of the second data message and how to encapsulate the first data message obtained after deleting the speed limit index in the second data message into SRv6 messages is described when the master board side describes the message speed limit method, and details are not described here.

In addition, for the main master control board, how to obtain the speed limit index and the speed limit value of the forwarding chip where the egress interface of the target SRv6 tunnel is located has also been described when the message speed limit method is described on the main master control board side, and details are not described here.

It can be seen from the above technical solutions that, in the embodiment of the present application, a message speed limit flow is added in the process of forwarding a data message using an SRv6 tunnel, and the specific flow is as follows:

firstly, a main control board in the network equipment acquires a speed limit index and a speed limit value of a forwarding chip where an output interface of a target SRv6 tunnel is located, and transmits the acquired speed limit index and speed limit value to all line card boards in the network equipment; then, when any line card board in the network equipment receives a first data message which needs to be forwarded by using a target SRv6 tunnel, adding a speed limit index into the first data message to obtain a second data message, determining an output interface of the second data message, and when the determined output interface is on the line card board, carrying out speed limit processing on a SRv6 message encapsulated on the basis of the first data message obtained by deleting the speed limit index in the second data message according to a speed limit value corresponding to a forwarding chip where the determined output interface is located and corresponding to the speed limit index, and then forwarding the SRv6 message; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

Therefore, the problem of network congestion can be avoided to a certain extent through the message speed-limiting flow, and network experience is improved.

Based on the same inventive concept, the present application further provides a message speed limiting device, where the device is applied to an active main control board in a network device, and a schematic structural diagram of the device is shown in fig. 3, and the device specifically includes:

the acquiring module 31 is configured to acquire a speed limit index and a speed limit value of a forwarding chip where an egress interface of a destination segment router and an internet protocol sixth version SRv6 tunnel is located;

the issuing module 32 is configured to issue the acquired speed limit index and the acquired speed limit value to all line card boards in the network device, so that when any line card board in the network device receives a first data message that needs to be forwarded by using the target SRv6 tunnel, the speed limit index is added to the first data message to obtain a second data message, an output interface of the second data message is determined, and when the determined output interface is on the line card, according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located, a SRv6 message encapsulated based on the first data message obtained after the speed limit index in the second data message is deleted is subjected to speed limit processing and forwarded; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

Preferably, the obtaining module 31 is specifically configured to obtain the speed limit index and the speed limit value of the forwarding chip on which the egress interface corresponding to the target SRv6 tunnel is located, through the following manners:

when an output interface of the target SRv6 tunnel is a physical port, acquiring a speed limit value corresponding to the physical port, determining the acquired speed limit value as the speed limit value of a forwarding chip where the physical port is located, and applying for a unique speed limit index for the forwarding chip where the physical port is located from a preset speed limit index pool;

when the exit interface of the target SRv6 tunnel is an aggregation port, acquiring the speed limit value corresponding to the aggregation port, calculating the speed limit values of forwarding chips of all member ports according to the bandwidth of the member ports belonging to the aggregation port on the forwarding chip of all the member ports in the aggregation port, and applying for a unique speed limit index for the forwarding chips of all the member ports from the preset speed limit index pool.

Preferably, the obtaining module 31 is specifically configured to calculate the speed limit values of the forwarding chips where all the member ports are located in the following manner:

for each forwarding chip in the forwarding chips where all the member ports are located, performing product operation on the sum of the bandwidths of the member ports belonging to the aggregation port on the forwarding chip and the speed limit value corresponding to the aggregation port to obtain a first operation result;

summing the bandwidths of the member ports belonging to the aggregation port on the forwarding chip where all the member ports are located to obtain a second operation result;

and carrying out quotient calculation on the first calculation result and the second calculation result to obtain the speed limit value of the forwarding chip.

Preferably, the apparatus further comprises:

and a synchronization module (not shown in fig. 3) configured to synchronize the acquired speed limit index and the acquired speed limit value to a standby main control board in the network device.

The present application further provides a message speed limiting device, where the device is applied to any line card board in a network device, and a schematic structural diagram of the device is shown in fig. 4, and specifically includes:

a receiving module 41, configured to receive a speed limit index and a speed limit value of a forwarding chip where an output interface of a tunnel of a sixth version SRv6 of an internet protocol and a target segment route acquired by a main control board in the network device, where the forwarding chip is located, where the target segment route and the output interface are sent by the main control board;

an adding determining module 42, configured to add the speed limit index to the first data packet to obtain a second data packet and determine an outgoing interface of the second data packet when the first data packet is received and the target SRv6 tunnel needs to be used to forward the first data packet;

a judging module 43, configured to judge whether the determined output interface is on the cable card board;

a first speed limit module 44, configured to, when the determination result of the determining module 43 is yes, perform speed limit processing on an SRv6 packet encapsulated based on a first data packet obtained after deleting a speed limit index in a second data packet according to a speed limit value corresponding to a forwarding chip on which a determined output interface corresponding to the speed limit index is located, and forward the SRv6 packet;

and a second speed limit module 45, configured to, if the determination result of the determining module 43 is negative, send the second data message to the line card board where the determined output interface is located, so that the corresponding line card board performs speed limit processing on the SRv6 message encapsulated based on the first data message obtained after the speed limit index in the second data message is deleted according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located, and forwards the SRv6 message.

It can be seen from the above technical solutions that, in the embodiment of the present application, a message speed limit flow is added in the process of forwarding a data message using an SRv6 tunnel, and the specific flow is as follows:

firstly, a main control board in the network equipment acquires a speed limit index and a speed limit value of a forwarding chip where an output interface of a target SRv6 tunnel is located, and transmits the acquired speed limit index and speed limit value to all line card boards in the network equipment; then, when any line card board in the network equipment receives a first data message which needs to be forwarded by using the target SRv6 tunnel, adding a speed limit index into the first data message to obtain a second data message, determining an output interface of the second data message, and when the determined output interface is on the line card board, performing speed limit processing on a SRv6 message encapsulated on the basis of the first data message obtained after deleting the speed limit index in the second data message according to a speed limit value corresponding to a forwarding chip on which the determined output interface is located and corresponding to the speed limit index, and then forwarding the SRv6 message; and when the determined output interface is not on the line card board, sending the second data message to the line card board where the determined output interface is located, and carrying out speed limit processing on the SRv6 message packaged by the first data message obtained by deleting the speed limit index in the second data message according to the speed limit value corresponding to the forwarding chip where the determined output interface corresponding to the speed limit index is located by the corresponding line card board and then forwarding the SRv6 message.

Therefore, the problem of network congestion can be avoided to a certain extent through the message speed-limiting flow, and network experience is improved.

An electronic device is further provided in the embodiments of the present application, as shown in fig. 5, including a processor 51 and a machine-readable storage medium 52, where the machine-readable storage medium 52 stores machine-executable instructions that can be executed by the processor 51, and the processor 51 is caused by the machine-executable instructions to: and the step of realizing any message speed limit method.

The machine-readable storage medium may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the machine-readable storage medium may be at least one memory device located remotely from the processor.

The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.

In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the message speed limiting methods described above.

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.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:报文传输方法、系统、服务器及存储介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!