CN111131095A - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN111131095A
CN111131095A CN201911345451.8A CN201911345451A CN111131095A CN 111131095 A CN111131095 A CN 111131095A CN 201911345451 A CN201911345451 A CN 201911345451A CN 111131095 A CN111131095 A CN 111131095A
Authority
CN
China
Prior art keywords
interface
board
forwarding
frame
cross
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
CN201911345451.8A
Other languages
Chinese (zh)
Other versions
CN111131095B (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 Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911345451.8A priority Critical patent/CN111131095B/en
Publication of CN111131095A publication Critical patent/CN111131095A/en
Application granted granted Critical
Publication of CN111131095B publication Critical patent/CN111131095B/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
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/33Flow control; Congestion control using forward notification

Abstract

The application provides a message forwarding method and a device, the method is applied to a frame forwarding device with a plurality of machine frames, and the method can include: under the condition that any input interface on any interface board receives a message, determining a candidate output interface which can be used for forwarding the message; under the condition that the local board outgoing interface does not exist and the candidate outgoing interface comprises a cross board outgoing interface and a cross frame outgoing interface, if the occupancy rate of the cross board channel of any interface board is greater than a preset first occupancy rate and the occupancy rate of the cross frame channel of the subrack of any interface board is less than a preset second occupancy rate, forwarding the message through the cross frame outgoing interface; otherwise, the message is forwarded through the cross-board outgoing interface. According to the technical scheme, the message can be forwarded in a preferable cross-board forwarding or cross-frame forwarding mode even if the network flow is large under the condition that the board forwarding cannot be carried out, and the reliability of the frame type forwarding equipment is improved to a certain extent.

Description

Message forwarding method and device
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
When a frame forwarding device such as a frame switch forwards a packet, because each interface is usually connected to a different network device, the packet is often forwarded across boards or across frames.
In the related art, the frame-first forwarding mechanism is usually adopted to reduce cross-frame forwarding, and the bandwidth occupancy rate of the cross-board channel is reduced by improving the bandwidth of the cross-board channel or upgrading the hardware performance. However, under the condition that the network traffic to be forwarded is large, the above scheme still has difficulty in avoiding the problem of high bandwidth occupation of the board crossing channel or the frame crossing channel, and even when the network traffic is large, bandwidth occupation may be caused to be full and forwarding errors may be caused, so that the reliability of the frame forwarding device is low.
Disclosure of Invention
In view of this, the present application provides a message forwarding method and device to solve the problems in the related art.
In order to achieve the above purpose, the present application provides the following technical solutions:
according to a first aspect of the present application, a packet forwarding method is provided, which is applied to a frame forwarding device having multiple machine frames, where the machine frames are connected through a cross-frame channel, any one of the machine frames of the frame forwarding device includes multiple interface boards, the interface boards in the same machine frame are connected through a cross-board channel, and each interface board has multiple interfaces, where the method includes:
under the condition that any input interface on any interface board receives a message, determining a candidate output interface which can be used for forwarding the message;
under the condition that a local board outgoing interface does not exist and the candidate outgoing interface comprises a cross board outgoing interface and a cross frame outgoing interface, if the occupancy rate of a cross board channel of any interface board is greater than a preset first occupancy rate and the occupancy rate of a cross frame channel of a machine frame to which any interface board belongs is less than a preset second occupancy rate, forwarding the message through the cross frame outgoing interface; otherwise, forwarding the message through the cross-board outgoing interface;
the main board output interface is located on any interface board, the cross board output interface is located on other interface boards in the machine frame to which any interface board belongs, and the cross frame output interface is located on interface boards in other machine frames outside the machine frame to which any interface board belongs.
According to the second aspect of the present application, a packet forwarding device is provided, which is applied to a frame forwarding device having multiple frames, where the frames are connected through a cross-frame channel, any one of the frames of the frame forwarding device includes multiple interface boards, and the interface boards in the same frame are connected through a cross-frame channel, and each interface board has multiple interfaces, where the device includes:
a candidate output interface determining unit, configured to determine a candidate output interface that can be used for forwarding a packet when any input interface on any interface board receives the packet;
a non-local board forwarding unit, configured to forward the packet through the cross-frame outgoing interface when a local board outgoing interface does not exist, the candidate interface includes a cross-board outgoing interface and a cross-frame outgoing interface, a cross-board channel occupancy rate of any interface board is greater than a preset first occupancy rate, and a cross-frame channel occupancy rate of a subrack of any interface board is less than a preset second occupancy rate; otherwise, forwarding the message through the cross-board outgoing interface;
the main board output interface is located on any interface board, the cross board output interface is located on other interface boards in the machine frame to which any interface board belongs, and the cross frame output interface is located on interface boards in other machine frames outside the machine frame to which any interface board belongs.
According to a third aspect of the present application, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the steps of the method according to any one of the aspects of the first aspect.
According to a fourth aspect of the present application, a computer-readable storage medium is proposed, on which computer instructions are stored, which instructions, when executed by a processor, carry out the steps of the method according to any one of the above-mentioned aspects of the first aspect.
According to the technical scheme, under the condition that the board does not have an interface, the optimal forwarding mode is selected through the preset occupancy rate threshold values of the board-crossing interface and the frame-crossing interface, sequential optimization of the board-crossing mode and the frame-crossing mode is achieved, normal forwarding of the message can be guaranteed even when network flow is large, and reliability of the frame type forwarding equipment is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or related technologies of the present application, the drawings needed to be used in the description of the embodiments or related technologies will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without any creative effort.
Fig. 1 is a schematic diagram of an exemplary architecture of a block forwarding device;
fig. 2 is a flowchart illustrating a message forwarding method according to an exemplary embodiment of the present application;
fig. 3 is a flowchart illustrating another message forwarding method according to an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of an electronic device according to an exemplary embodiment of the present application;
fig. 5 is a block diagram of a message forwarding apparatus according to an exemplary 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. 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", "the" 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, the first occupancy may also be referred to as the second occupancy, and similarly, the second occupancy may also be referred to as the first occupancy, 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.
Fig. 1 is a schematic diagram of a typical mechanism of a block forwarding device. As shown in fig. 1, a typical frame forwarding device generally has a plurality of machine frames, each machine frame is provided with a plurality of slots into which an interface board can be inserted, each interface board has a plurality of network interfaces, and each network interface is connected to other network devices through a plugged network cable, and generally can be used as a bidirectional interface for data input and output. First, it should be noted that: for any interface I1 on any interface board B1 in any subrack K1, other interfaces on B1 except I1 and interface I1 are on the same interface board and marked as local board interfaces; interfaces on other interface boards except B1 in K1 and interface I1 are located on different interface boards in the same subrack and are marked as cross-board interfaces; the interface on any interface board in other subrack than K1 is denoted as cross-frame interface.
In order to save the bandwidth of the cross-frame channel, the frame forwarding device usually has a frame-first forwarding mechanism, and after receiving a message, any interface preferentially performs frame forwarding or cross-board forwarding within the frame range; in addition, the bandwidth occupancy rate of the cross-board channel is reduced by improving the bandwidth of the cross-board channel or upgrading the performance of hardware. However, under the condition that the network traffic to be forwarded is large, the above scheme still has difficulty in avoiding the problem of high bandwidth occupation of the board crossing channel or the frame crossing channel, and even when the network traffic is large, bandwidth occupation may be caused to be full and forwarding errors may be caused, so that the reliability of the frame forwarding device is low.
Therefore, the present application provides a message forwarding method and apparatus, which are used to select a message output interface after any interface of a frame forwarding device receives a message, so as to solve the above-mentioned deficiencies in the related art. The following examples are provided to further illustrate the present application and it should be understood that the examples described are only a portion of the present application and are not intended to be exhaustive. All other embodiments that can be derived from the embodiments given herein by a person of ordinary skill in the art are intended to be within the scope of the present disclosure.
Fig. 2 is a flowchart illustrating a message forwarding method according to an exemplary embodiment of the present application. The method is applied to a frame forwarding device with multiple machine frames, where the machine frames are connected through a cross-frame channel, where any one of the machine frames of the frame forwarding device includes multiple interface boards, and the interface boards in the same machine frame are connected through cross-board channels, and each interface board has multiple interfaces, as shown in fig. 2, the method may include the following steps:
step 201, when any ingress interface located on any interface board receives a packet, determining a candidate egress interface capable of being used for forwarding the packet.
Step 202, in the case that there is no local board outgoing interface and the candidate interfaces include a cross board outgoing interface and a cross frame outgoing interface, if the cross board channel occupancy rate of any interface board is greater than a preset first occupancy rate and the cross frame channel occupancy rate of the subrack of any interface board is less than a preset second occupancy rate, forwarding the message through the cross frame outgoing interface; otherwise, forwarding the message through the cross-board outgoing interface;
the main board output interface is located on any one of the interface boards, the cross board output interface is located on other interface boards in the machine frame to which any one of the interface boards belongs, and the cross frame output interface is located on interface boards in other machine frames outside the machine frame to which any one of the interface boards belongs. It can be understood that the board egress interface, the cross-board egress interface, and the cross-frame egress interface are three possible forms of the candidate egress interface of the packet.
The multiple interfaces on the same interface board of the frame forwarding device, the multiple interfaces on different interface boards in the same machine frame, and the multiple interfaces on different interface boards in different machine frames can form a aggregation port. Interface I in aggregated stateiAfter receiving any message, the outgoing interface of the message can be connected with IiSelecting among a plurality of interfaces in an aggregated state. In the above-mentioned step 201,when the aggregation states of the interfaces of the frame forwarding device are different, the method for determining the candidate outgoing interfaces of the packet is also different:
in an embodiment, a plurality of interfaces in an aggregation state exist in the above-mentioned frame forwarding device, and at this time, a specific manner of determining a candidate outgoing interface that can be used for forwarding the packet is as follows: calculating all outgoing direction aggregation member ports corresponding to the messages; and determining the exit direction aggregation member port in a non-fault state as a candidate exit interface of the message. The exit direction aggregation member port is an interface in an aggregation state that can theoretically forward the packet, for example, an exit direction aggregation member port calculated according to an algorithm corresponding to the aggregation state, or an exit direction aggregation member port queried according to a routing table, and the like. Actually, some of the outbound direction aggregation member ports may be in a failure state, such as a link is damaged or an interface is occupied, and at this time, the outbound direction aggregation member ports cannot actually complete the forwarding work of the message, so that the failure interfaces need to be removed, and the remaining outbound direction aggregation member ports without failures are used as candidate outbound interfaces of the message.
In another embodiment, there is no interface in the aggregation state in the above-mentioned frame forwarding device, at this time, a specific manner of determining the candidate outgoing interface that can be used for forwarding the packet is as follows: determining all forwarding interfaces corresponding to the message by inquiring a routing table; and determining the forwarding outlet interface in the non-fault state as a candidate outlet interface of the message. When all interfaces of the frame forwarding device are independent interfaces (aggregation interfaces do not exist), forwarding interfaces obtained by querying the routing table may be theoretically used for forwarding the packet, but actually some forwarding interfaces may be in a failure state, such as a link is damaged or an interface is occupied, and at this time, the forwarding interfaces may not actually complete the forwarding of the packet, so that the failed interfaces need to be removed, and the remaining forwarding interfaces without failure serve as candidate egress interfaces of the packet.
In an embodiment, the method may further include: and forwarding the message through the board output interface under the condition that the board output interface exists. In fact, when the candidate egress interface determined for the packet has the board egress interface, the packet may be forwarded by preferentially using the board egress interface, so as to reduce the occupancy rates of the board crossing channel and the frame crossing channel as much as possible.
In the embodiments, no matter which kind of the outgoing interface of the board outgoing interface, the cross board outgoing interface, or the cross frame outgoing interface is finally used for forwarding the message, the number of the outgoing interfaces may be one or more. In an embodiment, when it is determined that the message is sent by using the candidate outbound interface of any one of the categories and the number of the candidate outbound interfaces of any one of the categories is one, the candidate outbound interface is directly used as a target outbound interface of the message, and then the message is forwarded through the target outbound interface.
In another embodiment, when it is determined that the message is sent by using any one category of candidate outbound interfaces and the number of the any one category of candidate outbound interfaces is multiple, determining an outbound interface with the shortest data path between any one category of candidate outbound interfaces and any one inbound interface as a target outbound interface; or determining any one of the candidate output interfaces of any category as a target output interface, and then forwarding the message through the target output interface.
In an embodiment, the method may further include: and generating a prompt log carrying prompt information under the condition that the board crossing channel occupancy rate of any interface board is greater than the first occupancy rate or the frame crossing channel occupancy rate of a machine frame to which any interface board belongs is greater than the second occupancy rate. The prompt message may be a preset field, for example: when the board crossing channel occupancy of any interface board B1 is greater than the first occupancy, the prompt message may be "the board crossing channel occupancy of interface board B1 is greater than the first occupancy"; when the cross-frame channel occupancy of subrack K1 to which any interface board B1 belongs is greater than the second occupancy, the prompt message may be "the cross-frame channel occupancy of subrack K1 is greater than the second occupancy". Specifically, the first occupancy rate and the second occupancy rate may be the same value, such as both 80%, or may be different values, such as the first occupancy rate is 90%, the second occupancy rate is 70%, and so on, which is not described again. The prompt log carrying the prompt information can be stored in a local storage device of the frame forwarding device so as to trace back the state of the device; the information can also be sent to preset objects such as a monitoring center, management equipment and the like, so that management personnel can know the working state of the frame forwarding equipment in time; of course, the alarm information carrying the prompt information may also be generated, and the alarm information is sent to a preset object such as a state monitoring device, a monitoring center, or a portable electronic device of a manager, so that the manager can perform processing in time.
According to the technical scheme, after any interface on a certain interface board receives a message, the message is preferentially forwarded by using the board output interface under the condition that the interface board has a candidate output interface; and under the condition that the interface board does not have a candidate output interface, the optimized cross-board output interface or cross-frame output interface forwarding message is determined according to the occupancy rates of the cross-board channel and the cross-frame channel, so that the optimization of the message forwarding mode is realized, the message can be normally forwarded even if the network flow is large, and the working reliability of the frame type forwarding equipment is improved to a certain extent.
Fig. 3 is a flowchart illustrating another packet forwarding method according to an exemplary embodiment of the present application. As shown in fig. 3, the following steps may be included:
step 301: any of the input interfaces receives the message.
Any message sent by other equipment enters the equipment through any interface of the frame type forwarding equipment, wherein any interface is the incoming interface of the message, and other interfaces of the frame type forwarding equipment are all possible to be used as outgoing interfaces of the message and used for forwarding the message. The specific manner in which any ingress interface receives any message is not limited in this application, and details thereof are disclosed in the related art.
Step 302: and determining a candidate outgoing interface corresponding to the message.
And determining candidate outgoing interfaces of any message in all interfaces except any one of the incoming interfaces of the frame forwarding equipment, wherein the candidate outgoing interfaces are interfaces capable of actually forwarding the message, and a target outgoing interface for actually forwarding the message needs to be selected from the candidate outgoing interfaces. Due to the difference of the interface aggregation states in the frame forwarding device, the candidate outgoing interfaces corresponding to the message are determined in different ways:
in an embodiment, a plurality of interfaces in an aggregation state exist in the above-mentioned frame forwarding device, and at this time, the specific manner of determining the candidate outgoing interface is: calculating all outgoing direction aggregation member ports corresponding to the messages; and determining the exit direction aggregation member port in a non-fault state as a candidate exit interface of the message. The exit direction aggregation member port is an interface in an aggregation state that can theoretically forward the packet, for example, an exit direction aggregation member port calculated according to an algorithm corresponding to the aggregation state, or an exit direction aggregation member port queried according to a routing table, and the like. However, in practical situations, some of the outbound direction aggregation member ports may be in a failure state such as a damaged link or an occupied interface, and at this time, the outbound direction aggregation member ports cannot actually complete the forwarding of the message, so that the failure interfaces need to be removed, and the remaining non-failure outbound direction aggregation member ports are used as candidate outbound interfaces of the message.
In another embodiment, all the interfaces of the above-mentioned frame forwarding device are not in an aggregation state (all are independent interfaces), and at this time, the specific manner of determining the candidate outgoing interface is as follows: determining all forwarding interfaces corresponding to the message by inquiring a routing table; and determining the forwarding outlet interface in the non-fault state as a candidate outlet interface of the message. The forwarding output interfaces obtained by querying the routing table may be theoretically used for forwarding the packet, but actually some forwarding output interfaces may be in a fault state such as a damaged link or an occupied interface, and at this time, the forwarding output interfaces may not actually complete the forwarding operation of the packet, so that the faulty interfaces need to be removed, and the remaining fault-free forwarding output interfaces serve as candidate output interfaces of the packet.
The candidate outgoing interfaces determined by the above process, which may be used for forwarding the packet, may include one or more types of local outgoing interfaces, cross-board outgoing interfaces, and cross-frame outgoing interfaces. It should be noted that, the present application is based on the premise that there is a candidate outgoing interface, and therefore, in this step, the case that the candidate outgoing interface is not determined is not considered, but in the case that the candidate outgoing interface is not determined in this step, warning information may be sent to a preset object, which is not described in detail herein.
Step 303: and judging whether the candidate output interface exists in the frame.
Whether the candidate interface exists in the frame is determined, that is, whether the candidate output interface determined in the step 302 includes the board output interface or the cross-board output interface is determined. If there is a candidate interface in the frame, go to step 304; otherwise, the frame-crossing forwarding is performed under the condition that the candidate interface does not exist in the frame, namely, only the frame-crossing outgoing interface exists. It should be noted that the board forwarding, the cross board forwarding, and the cross frame forwarding in fig. 3 respectively refer to forwarding the message through the board outgoing interface, the cross board outgoing interface, and the cross frame outgoing interface. The process of this step is the processing process of the frame priority forwarding mechanism in the related art.
Step 304: and judging whether the candidate output interface exists on the board.
It is determined whether there is a candidate interface on the board, that is, whether the candidate interface determined in step 302 includes the board output interface is determined. Under the condition that the determined candidate output interface comprises the output interface of the board, the board is forwarded; otherwise, in the case that the determined candidate output interface does not include the local board output interface, step 305 is performed.
In this embodiment, only the step 304 is performed first and then the step 304 is performed as an example for explanation; as another exemplary embodiment, step 304 may be performed first, followed by step 303. In other words, the "judging whether the frame has the candidate output interface" and the "judging whether the board has the candidate output interface" do not have a necessary sequence, and can be adjusted according to the actual situation. In this embodiment, it is an improvement made on the basis of a priority forwarding mechanism of the frame in the related art to determine whether the frame has a candidate outgoing interface first and then determine whether the board has a candidate outgoing interface; in another embodiment, whether the candidate interface exists on the board is judged first, and then whether the candidate interface exists on the frame is judged, so that the message can be forwarded by the board output interface preferentially under the condition that the board output interface exists, occupation of a board-crossing channel and a frame-crossing channel is reduced as much as possible, and message forwarding efficiency is improved.
Step 305: and judging whether the board crossing channel occupancy rate is greater than a first occupancy rate.
At this time, it can be determined that: and determining whether to use cross-board forwarding or cross-frame forwarding according to the occupancy rates of the cross-board channel and the cross-frame channel under the condition that the candidate outbound interface determined by the message does not have the local outbound interface. When the occupancy rate of the board crossing channel is greater than the preset first occupancy rate, the step 306 is executed; otherwise, carrying out cross-board forwarding under the condition that the occupancy rate of the cross-board channel is not greater than the preset first occupancy rate. The first occupancy rate may be determined according to specific situations such as the number of devices connected to the interface board, the number of currently processed packets, and the like, and may be, for example, 70%, 80%, 90%, and the like, which is not limited in this application.
Step 306: and judging whether the occupancy rate of the cross-frame channel is greater than a second occupancy rate.
Carrying out cross-board forwarding under the condition that the occupancy rate of the cross-frame channel is greater than a preset second occupancy rate; otherwise, performing frame-crossing forwarding under the condition that the board-crossing channel occupancy rate is not greater than the preset second occupancy rate. In this embodiment, only the step 305 is executed first and then the step 306 is executed as an example for explanation; as another exemplary embodiment, step 306 may be performed first and then step 305 may be performed. In other words, the determination of whether the occupancy rate of the channel of the local board is greater than the first occupancy rate and the determination of whether the occupancy rate of the channel of the local frame is greater than the second occupancy rate do not have necessary sequence, and can be adjusted according to actual conditions. In this embodiment, whether the occupancy rate of the local board channel is greater than the first occupancy rate is determined first, and then whether the occupancy rate of the local frame channel is greater than the second occupancy rate is determined.
The second occupancy rate may be determined according to specific conditions, such as the number of interface connection devices in the machine frame, the number of messages currently processed by the machine frame, and the number of expected messages in a preset time period determined according to a historical data record of messages processed by the machine frame, and may be 70%, 85%, 90%, and the like, which is not limited in the present application. In an embodiment, the second occupancy may be preset to be slightly smaller than the first occupancy, so as to avoid forwarding across frames as much as possible.
In an embodiment, in the case that the occupancy rate of the cross-lane in step 305 is greater than the preset first occupancy rate, or in the case that the occupancy rate of the cross-lane in step 306 is greater than the preset second occupancy rate, a prompt log carrying prompt information is generated. The prompt log can be stored in the local storage device of the frame forwarding device so as to trace back the device state; and the information can also be sent to preset objects such as a monitoring center, management equipment and the like, so that management personnel can know the working state of the frame forwarding equipment in time. In another embodiment, the alarm information carrying the prompt information is generated and sent to a preset object such as a state monitoring device, a monitoring center or a portable electronic device of a manager, so that the manager can timely perform corresponding processing such as adjusting a network structure or upgrading the device.
Step 307: and determining a target output interface in the candidate output interfaces.
For the three forwarding manners, such as local board forwarding, cross frame forwarding and the like, determined in the above step 303 and 306, there may be one or more candidate interfaces of different categories respectively corresponding to the three forwarding manners.
In an embodiment, when it is determined that the message is sent by using the candidate outbound interface of any one of the categories and the number of the candidate outbound interfaces of any one of the categories is one, the candidate outbound interface is directly used as a target outbound interface of the message, and then the message is forwarded through the target outbound interface.
In another embodiment, when it is determined that the message is sent by using any one of the candidate egress interfaces, and the number of the candidate egress interfaces in any one of the categories is multiple, as an exemplary embodiment, an egress interface with the shortest data path between any one of the candidate egress interfaces in any one of the categories and any one of the ingress interfaces is selected as a target egress interface, so as to shorten the transmission time of the message data, thereby speeding up the forwarding; or any one of the candidate output interfaces in any category is selected as a target output interface so as to shorten the selection time of the target output interface.
Step 308: and forwarding the message by using the target outgoing interface.
And the target output interface is the actual forwarding interface of the message, and the message is forwarded by using the target output interface after the target output interface is selected. The specific forwarding mode of the packet is not limited in the present application, and details thereof are disclosed in the related art.
Fig. 4 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. Referring to fig. 4, at the hardware level, the electronic device includes a processor 401, an internal bus 402, a network interface 403, a memory 404, and a non-volatile memory 405, but may also include hardware required for other services. The processor 401 reads a corresponding computer program from the nonvolatile memory 405 to the memory 404 and runs the computer program, and forms a message forwarding apparatus on a logical level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Fig. 5 is a block diagram of a message forwarding apparatus according to an exemplary embodiment of the present application. Referring to fig. 5, in a software embodiment, the packet forwarding apparatus is applied to a frame forwarding device having multiple subracks, where the subracks are connected through a cross-frame channel, any subrack of the frame forwarding device includes multiple interface boards, and the interface boards in the same subrack are connected through a cross-board channel, and each interface board has multiple interfaces, and may include a candidate output interface determining unit 501 and a non-local forwarding unit 502. Wherein:
a candidate outgoing interface determining unit 501, configured to determine, when any incoming interface on any interface board receives a packet, a candidate outgoing interface that can be used for forwarding the packet;
a non-local board forwarding unit 502, configured to forward the packet through the cross-frame outgoing interface when a local board outgoing interface does not exist, the candidate interface includes a cross-board outgoing interface and a cross-frame outgoing interface, a cross-board channel occupancy rate of any interface board is greater than a preset first occupancy rate, and a cross-frame channel occupancy rate of a subrack of any interface board is less than a preset second occupancy rate; otherwise, forwarding the message through the cross-board outgoing interface;
the main board output interface is located on any interface board, the cross board output interface is located on other interface boards in the machine frame to which any interface board belongs, and the cross frame output interface is located on interface boards in other machine frames outside the machine frame to which any interface board belongs.
Optionally, the apparatus further includes a board forwarding unit 503, specifically configured to: and forwarding the message through the board output interface under the condition that the board output interface exists.
Optionally, multiple interfaces in an aggregation state exist in the frame forwarding device, and the candidate interface determining unit 501 is specifically configured to:
calculating all outgoing direction aggregation member ports corresponding to the messages;
and determining the exit direction aggregation member port in the non-fault state as a candidate exit interface of the message.
Optionally, no interface in the aggregation state exists in the frame forwarding device, and the candidate outgoing interface determining unit 501 is specifically configured to:
determining all forwarding interfaces corresponding to the message by inquiring a routing table;
and determining the forwarding outlet interface in the non-fault state as a candidate outlet interface of the message.
Optionally, the apparatus further includes a target output interface selecting unit 504, specifically configured to: under the condition that the message is determined to be sent by adopting the candidate outgoing interfaces of any category and the number of the candidate outgoing interfaces of any category is multiple, selecting a target outgoing interface from the candidate outgoing interfaces of any category;
optionally, the target outgoing interface selecting unit 504 is specifically configured to: determining any one of the candidate outbound interfaces of any category as a target outbound interface; alternatively, the first and second electrodes may be,
and determining the output interface with the shortest data path between the candidate output interfaces of any category and any input interface as a target output interface.
Optionally, the apparatus further includes a prompt log generating unit 505, specifically configured to: and generating a prompt log carrying prompt information under the condition that the board crossing channel occupancy rate of any interface board is greater than the first occupancy rate or the frame crossing channel occupancy rate of a machine frame to which any interface board belongs is greater than the second occupancy rate.
The implementation process of the functions and actions of each unit in the device is detailed in the implementation process of the corresponding step in the method, and is not described herein again.
In a typical configuration, an electronic device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For the above-mentioned apparatus embodiments, since they basically 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.
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 message forwarding method is characterized in that the method is applied to frame forwarding equipment with a plurality of machine frames, all the machine frames are connected through a frame-crossing channel, any machine frame of the frame forwarding equipment comprises a plurality of interface boards, all the interface boards in the same machine frame are connected through a frame-crossing channel, and each interface board is provided with a plurality of interfaces, and the method comprises the following steps:
under the condition that any input interface on any interface board receives a message, determining a candidate output interface which can be used for forwarding the message;
under the condition that a local board outgoing interface does not exist and the candidate outgoing interface comprises a cross board outgoing interface and a cross frame outgoing interface, if the occupancy rate of a cross board channel of any interface board is greater than a preset first occupancy rate and the occupancy rate of a cross frame channel of a machine frame to which any interface board belongs is less than a preset second occupancy rate, forwarding the message through the cross frame outgoing interface; otherwise, forwarding the message through the cross-board outgoing interface;
the main board output interface is located on any interface board, the cross board output interface is located on other interface boards in the machine frame to which any interface board belongs, and the cross frame output interface is located on interface boards in other machine frames outside the machine frame to which any interface board belongs.
2. The method of claim 1, further comprising:
and forwarding the message through the board output interface under the condition that the board output interface exists.
3. The method according to claim 1, wherein multiple interfaces in an aggregation state exist in the forwarding block device, and the determining a candidate outgoing interface that can be used for forwarding the packet includes:
calculating all outgoing direction aggregation member ports corresponding to the messages;
and determining the exit direction aggregation member port in the non-fault state as a candidate exit interface of the message.
4. The method according to claim 1, wherein no interface in the aggregation state exists in the forwarding block device, and the determining candidate outgoing interfaces that can be used for forwarding the packet comprises:
determining all forwarding interfaces corresponding to the message by inquiring a routing table;
and determining the forwarding outlet interface in the non-fault state as a candidate outlet interface of the message.
5. The method of claim 1, further comprising:
under the condition that the message is determined to be sent by adopting the candidate outgoing interfaces of any category and the number of the candidate outgoing interfaces of any category is multiple, selecting a target outgoing interface from the candidate outgoing interfaces of any category;
and forwarding the message through the target output interface.
6. The method of claim 5, wherein the selecting a target outbound interface from the candidate outbound interfaces of any category comprises:
determining any one of the candidate outbound interfaces of any category as a target outbound interface; alternatively, the first and second electrodes may be,
and determining the output interface with the shortest data path between the candidate output interfaces of any category and any input interface as a target output interface.
7. The method of claim 1, further comprising:
and generating a prompt log carrying prompt information under the condition that the board crossing channel occupancy rate of any interface board is greater than the first occupancy rate or the frame crossing channel occupancy rate of a machine frame to which any interface board belongs is greater than the second occupancy rate.
8. The utility model provides a message forwarding device, its characterized in that is applied to frame forwarding equipment who has a plurality of frames, links to each other through striding the frame passageway between each frame, including a plurality of interface boards in any frame of frame forwarding equipment, link to each other through striding the board passageway between each interface board in same frame, have a plurality of interfaces on every interface board, the device includes:
a candidate output interface determining unit, configured to determine a candidate output interface that can be used for forwarding a packet when any input interface on any interface board receives the packet;
a non-local board forwarding unit, configured to forward the packet through the cross-frame outgoing interface when a local board outgoing interface does not exist, the candidate interface includes a cross-board outgoing interface and a cross-frame outgoing interface, a cross-board channel occupancy rate of any interface board is greater than a preset first occupancy rate, and a cross-frame channel occupancy rate of a subrack of any interface board is less than a preset second occupancy rate; otherwise, forwarding the message through the cross-board outgoing interface;
the main board output interface is located on any interface board, the cross board output interface is located on other interface boards in the machine frame to which any interface board belongs, and the cross frame output interface is located on interface boards in other machine frames outside the machine frame to which any interface board belongs.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, perform the steps of the method according to any one of claims 1-7.
CN201911345451.8A 2019-12-24 2019-12-24 Message forwarding method and device Active CN111131095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911345451.8A CN111131095B (en) 2019-12-24 2019-12-24 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911345451.8A CN111131095B (en) 2019-12-24 2019-12-24 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN111131095A true CN111131095A (en) 2020-05-08
CN111131095B CN111131095B (en) 2021-08-24

Family

ID=70501810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911345451.8A Active CN111131095B (en) 2019-12-24 2019-12-24 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN111131095B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021253997A1 (en) * 2020-06-16 2021-12-23 中兴通讯股份有限公司 Path determination method, apparatus and device, and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1202503A2 (en) * 2000-10-31 2002-05-02 Chiaro Networks Ltd. Router network protection using mulitple facility interfaces
CN1856122A (en) * 2005-04-21 2006-11-01 华为技术有限公司 System for interconnection between frames in communication system and its business transmission
CN1878067A (en) * 2006-01-06 2006-12-13 华为技术有限公司 Concatenation system
CN1937782A (en) * 2006-08-04 2007-03-28 华为数字技术有限公司 Frame device and its message transmitting method
CN101094238A (en) * 2007-07-20 2007-12-26 华为技术有限公司 Cluster system with multiple machine frames, and machine frame
CN101340393A (en) * 2008-08-14 2009-01-07 杭州华三通信技术有限公司 Multicast stream control method, system and field programmable gate array
CN101360043A (en) * 2005-12-06 2009-02-04 华为技术有限公司 Communication apparatus reliably connected inside
CN101459501A (en) * 2008-12-31 2009-06-17 中兴通讯股份有限公司 Multi-frame interconnecting system and inter-frame data transmission method
CN102158399A (en) * 2011-02-26 2011-08-17 华为数字技术有限公司 Method and system for realizing cross-board binding
CN105337864A (en) * 2014-07-22 2016-02-17 杭州华三通信技术有限公司 Message forwarding method and apparatus
CN106502841A (en) * 2016-10-27 2017-03-15 杭州迪普科技股份有限公司 Data back up method and device
CN106911597A (en) * 2017-02-14 2017-06-30 新华三技术有限公司 A kind of board-spanning forwarding method and apparatus
CN107332943A (en) * 2017-06-27 2017-11-07 杭州迪普科技股份有限公司 A kind of message forwarding method and device
CN108304341A (en) * 2018-03-13 2018-07-20 算丰科技(北京)有限公司 AI chip high speeds transmission architecture, AI operations board and server

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1202503A2 (en) * 2000-10-31 2002-05-02 Chiaro Networks Ltd. Router network protection using mulitple facility interfaces
CN1856122A (en) * 2005-04-21 2006-11-01 华为技术有限公司 System for interconnection between frames in communication system and its business transmission
CN101360043A (en) * 2005-12-06 2009-02-04 华为技术有限公司 Communication apparatus reliably connected inside
CN1878067A (en) * 2006-01-06 2006-12-13 华为技术有限公司 Concatenation system
CN1937782A (en) * 2006-08-04 2007-03-28 华为数字技术有限公司 Frame device and its message transmitting method
CN101094238A (en) * 2007-07-20 2007-12-26 华为技术有限公司 Cluster system with multiple machine frames, and machine frame
CN101340393A (en) * 2008-08-14 2009-01-07 杭州华三通信技术有限公司 Multicast stream control method, system and field programmable gate array
CN101459501A (en) * 2008-12-31 2009-06-17 中兴通讯股份有限公司 Multi-frame interconnecting system and inter-frame data transmission method
CN102158399A (en) * 2011-02-26 2011-08-17 华为数字技术有限公司 Method and system for realizing cross-board binding
CN105337864A (en) * 2014-07-22 2016-02-17 杭州华三通信技术有限公司 Message forwarding method and apparatus
CN106502841A (en) * 2016-10-27 2017-03-15 杭州迪普科技股份有限公司 Data back up method and device
CN106911597A (en) * 2017-02-14 2017-06-30 新华三技术有限公司 A kind of board-spanning forwarding method and apparatus
CN107332943A (en) * 2017-06-27 2017-11-07 杭州迪普科技股份有限公司 A kind of message forwarding method and device
CN108304341A (en) * 2018-03-13 2018-07-20 算丰科技(北京)有限公司 AI chip high speeds transmission architecture, AI operations board and server

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
SEAN ROCKE; ALEXANDER M. WYGLINSKI: "《Re-thinking compliance enforcement: Investigating random spectrum sampling techniques for temporal occupancy characterization》", 《2015 IEEE 16TH INTERNATIONAL SYMPOSIUM ON A WORLD OF WIRELESS, MOBILE AND MULTIMEDIA NETWORKS (WOWMOM)》 *
左文杰: "《基于高端路由器IRF堆叠系统的设计与实现》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
张楠等: "互联网出口架构优化研究与实现", 《信息与电脑(理论版)》 *
彭莎: "《路由器多框集群中IP转发测试技术的研究与实现》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
朱奇: "《基于分布式交换机IRF堆叠的板间通信研究与实现》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021253997A1 (en) * 2020-06-16 2021-12-23 中兴通讯股份有限公司 Path determination method, apparatus and device, and storage medium

Also Published As

Publication number Publication date
CN111131095B (en) 2021-08-24

Similar Documents

Publication Publication Date Title
US10601643B2 (en) Troubleshooting method and apparatus using key performance indicator information
CN104219107B (en) A kind of detection method of communication failure, apparatus and system
US8559322B2 (en) Link state detection method and system
CN102594596B (en) Method and device for recognizing available partitions, and clustering network system
CN101707537A (en) Positioning method of failed link and alarm root cause analyzing method, equipment and system
US10044770B2 (en) Method and apparatus for managing a plurality of sessions in a multi-path routing based network
CN112291160B (en) BUM message suppression method, device and medium
CN107864094A (en) A kind of traffic routing method, device and machinable medium
US20210111978A1 (en) Fault detection for lacp packet timeout
CN111131095B (en) Message forwarding method and device
CN110071843B (en) Fault positioning method and device based on flow path analysis
CN102334315B (en) Port blocking-up method and route equipement
CN107734404B (en) FPGA-based wave division equipment electrical layer protection implementation system and method
US11171810B1 (en) Misconfigured uplink identification
CN107332793A (en) A kind of message forwarding method, relevant device and system
CN109964450A (en) A kind of method and device of determining sharing memory
CN112332956B (en) Information sharing method and device in redundant network and computer storage medium
US8595571B2 (en) Error detection device, communication error detection system, communication error detection method
CN112383471A (en) Method, device and equipment for managing knife box link and machine readable storage medium
US9900207B2 (en) Network control protocol
CN106612240B (en) A kind of storage high-efficiency network connection system and method
US10708348B2 (en) High availability in packet processing for high-speed networks
EP3499801A1 (en) Prevention of fault processing delay
CN104052665A (en) Method and equipment for determining flow forwarding path
CN109039822A (en) A kind of BFD protocol massages filter method and system

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