Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that "/" in this context means "or", for example, A/B may mean A or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. "plurality" means two or more than two.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first service unit and the second service unit, etc. are used to distinguish different service units, rather than to describe a particular order of service units.
The message forwarding method provided by the embodiment of the invention can be applied to the interaction between the message forwarding equipment (auxiliary detection equipment of the LACP MAD) and the stacking system so as to carry out MAD detection on the stacking system in real time. Specifically, in the case of a failure of the stack system, such as a double activity occurring in the stack system, one of the double activities may be turned off by the LACP MAD method, so that the network where the stack system is located operates normally. Wherein, double activity in the stacking system (i.e. one of multiple activities in the stacking system) means that two stacking master devices are present in the stacking system. Specifically, the stacking system may be composed of a plurality of stacking members, and one stacking master device may be one stacking member in the stacking system.
It can be understood that the message forwarding method provided in the embodiment of the present invention can be applied to a scenario in which a message forwarding device copies one message into a plurality of messages, and forwards the plurality of messages to a device connected to the message forwarding device through a member port of an aggregation group. For example, the message forwarding device is a device connected through a member port of the aggregation group, and is a stacking member in a stacking system connected to the message forwarding device.
Specifically, the message forwarding method provided in the embodiment of the present invention may be applied to a process in which a message forwarding device sends an LACP message (denoted as an LACP message) carrying an MAD TLV to a stack member in a stack system. The stacking master control device in the stacking system may report the LACP message to the message forwarding device. After the message forwarding device receives the LACP message, the LACP message is usually copied into a plurality of LACP messages according to the number of connected stack members, and the copied LACP message is sent through a plurality of ports, correspondingly connected to each stack member, in the message forwarding device.
Fig. 1 is an exemplary diagram of a network architecture to which the packet forwarding method provided in the embodiment of the present invention is applied. Fig. 1 shows a network architecture 10 including a message forwarding device 11, and a stacking system 12 interacting with the message forwarding device 11, where the stacking system 12 includes a member device 121 and a member device 122.
Wherein, the stacking system 12 may report the LACP message generated in real time to the message forwarding device 11; after the message forwarding device 11 receives the LACP message, the LACP message may be copied into multiple LACP messages, and the copied LACP messages are sent to multiple stack members in the stack system 12 through multiple ports in the message forwarding device.
It is to be understood that the connection between the devices shown in fig. 1 may be a wired connection or a wireless connection, and this is not particularly limited in the embodiment of the present invention. For example, the message forwarding device 11 and the member device 12 may be connected wirelessly or by wire.
Specifically, the message forwarding method provided in the embodiment of the present invention is applied to a message forwarding device, where the message forwarding device includes M service units and a switching unit, and M is a positive integer greater than 1. Exemplarily, as shown in fig. 2, a schematic structural diagram of a message forwarding device provided in an embodiment of the present invention is shown. The message forwarding device 11 shown in fig. 2 comprises service unit 1, service unit 2, service unit 3 …, service unit M-1 and service unit M, and switching unit 111. In addition, the message forwarding device 11 may further include a main control unit 112.
In the embodiment of the present invention, each service unit (e.g., service unit 1) in a message forwarding device (e.g., message forwarding device 11) may be a service board card (or called service line card), one switching unit may be implemented by a switching chip or a switching matrix board card having a broadcast function, and a main control unit (e.g., main control unit 112) may be a main control board card in the message forwarding device 11.
Specifically, the main control unit 112 in the message forwarding device 11 may interact with each service unit (for example, a service unit in M service units) and the switching unit 111 respectively. For example, the main control unit 112 may configure an aggregation group (denoted as LACP aggregation group) corresponding to a stacking system for the message forwarding device 11. For example, the main control unit 112 may issue a message to a service unit including a member port in an aggregation group in the message forwarding device, where the message may include information of the aggregation group in the message forwarding device, such as an identifier of the aggregation group and a port identifier of a member port in the service unit in the aggregation group; of course, the message may also include information of the stacking system associated with the aggregation group, for example, information of an opposite end corresponding to a port of an LACP member (e.g., a port of an MAD stacking member in the stacking system that reports LACP messages). In addition, when a service unit in the message forwarding device 11 receives a message (e.g., an LACP message reported by a stacking system), the service unit may report a message for indicating that the message is received to the main control unit 112, and determine an identifier of an aggregation group (e.g., an identifier of the aggregation group obtained from the main control unit 112), such as an identifier of an LACP aggregation group corresponding to the stacking system that sends the LACP message in the message forwarding device. The member devices in the stacking system may also be referred to as stacking members, among others.
It should be noted that the message forwarding device provided in the embodiment of the present invention may be a device for forwarding a message, such as an exchange.
It should be noted that the message forwarding method provided in the embodiment of the present invention is applied to a message forwarding device, where the message forwarding device includes a plurality of service units and a switching unit. Specifically, after receiving a message, a service unit in the message forwarding device may broadcast the message to service units other than the service unit in the message forwarding device through the switching unit. In addition, each of the other service units may copy the received packet to obtain multiple packets that the service unit needs to forward to the connected device. In the process of copying the message by the service unit, the copying times are less and the speed is higher, and the message forwarding equipment does not need to consume a large amount of resources to copy the message by a software copying mode through a CPU of the main control unit, so that the CPU resource consumption in the message forwarding equipment can be reduced, and the message copying efficiency of the message forwarding equipment can be improved.
Specifically, the message forwarding method provided in the embodiment of the present invention may be applied to a message forwarding device connected to each stacked member through an aggregation group, where a port of each stacked member connected to the message forwarding device is a member port of the aggregation group, the member port of the aggregation group is located in at least two service units of the message forwarding device, and the message forwarding device further includes a switching unit.
The following describes the message forwarding method provided in the embodiment of the present invention in detail with reference to the flowchart of the message forwarding method shown in fig. 3. Although the logical sequence of the packet forwarding method provided in the embodiment of the present invention is shown in the method flowchart, in some cases, the steps shown or described may be performed in a different order from that here. For example, the packet forwarding method shown in fig. 3 may include S301 and S302:
s301, the message forwarding device receives an LACP message sent by a stacking member through a member port which belongs to the aggregation group locally by adopting the first service unit, adds an identifier of the aggregation group to the LACP message, and broadcasts the LACP message through the switching unit.
Optionally, the first service unit may be a source end board card (or called a source end board card) in the packet forwarding device.
Specifically, in the process that the first service unit receives an LACP message sent by a stack member through a member port that locally belongs to the aggregation group, the first service unit may receive the LACP message through a member port in the aggregation group connected to the stack member of the stack system in the first service unit of the message forwarding device according to a target address in the LACP message; and determining which stacking member in the stacking system the LACP message is sent from according to the source address in the LACP message.
It can be understood that, in the embodiment of the present invention, an LACP message (denoted as message 1) received by a first service unit in a message forwarding device may include related information of a stacking system in which a stacking member is located (for example, an MAD TLV is carried in the LACP message). Subsequently, the first service unit may determine an identifier of an aggregation group (i.e., an LACP aggregation group) corresponding to the stacking system in the message forwarding device. Thus, the first service unit may encapsulate the identifier of the aggregation group into the LACP message, for example, encapsulate the identifier into the LACP message with an internal header, so as to obtain an LACP message (denoted as message 2) carrying the identifier of the aggregation group.
In addition, in the embodiment of the present invention, when the first service unit encapsulates an internal header for the received LACP packet, a broadcast address may be further encapsulated in a field before a field where the identifier of the aggregation group encapsulated in the internal header is located, where the broadcast address is used to indicate a service board card in the packet forwarding device (i.e., a service unit, such as the second service unit, in the packet forwarding device except for the first service unit). Namely, the second-level forwarding of the LACP message in the message forwarding equipment can be realized.
Optionally, the destination address of the message 2 may include the destination address of the switching unit, so that the message 2 sent by the first service unit may reach the switching unit. In addition, the destination address of the message 2 may also include a broadcast address, so that, after receiving the message 2 sent by the first service unit, the switching unit may broadcast the message 2, that is, send the message 2 in a broadcast form.
It is understood that, after receiving the message 2, the switching unit may replace the destination address in the message 2 with the broadcast address from the address of the switching unit, so as to broadcast and transmit the message 2.
For example, the identifier of the aggregation group (denoted as aggregation group 1) associated with each member of the stack in the message forwarding device may be denoted as aggregation identifier 1.
Optionally, in the embodiment of the present invention, a logical port set (denoted as port set 1) may be formed by member ports in an aggregation group in the message forwarding device. For example, in an embodiment of the present invention, one logical port set may be a logical port in a Virtual Local Area Network (VLAN), and the logical port in the VLAN may be identified by a VLAN identification number (Identity).
S302, the message forwarding device receives the LACP message from the switching unit by adopting the second service unit, searches the member port which locally belongs to the aggregation group according to the identification of the aggregation group in the LACP message, and sends the LACP message out through the member port which locally belongs to the aggregation group.
Exemplarily, in conjunction with fig. 2, in the embodiment of the present invention, the first service unit may be the service unit 1 shown in fig. 2, the second service unit may be the service unit 2 shown in fig. 2, and the switching unit may be the switching unit 111 shown in fig. 2.
It is to be understood that the second service unit looking up the member port locally belonging to the aggregation group means that the second service unit looks up the member port belonging to the aggregation group in the second service unit.
The second service unit may be located in the broadcast range of the switching unit, that is, the address of the second service unit is located in the broadcast address of the switching unit during broadcasting. Thus, the second service unit can receive the LACP message sent by the switching unit.
Specifically, the second service unit in the message forwarding device may determine whether a port therein is a member port of the aggregation group in the LACP message, for example, whether the port is a member port in the aggregation group 1.
It can be understood that the ports in the second service unit in the message forwarding device may be used to form a plurality of aggregation groups, that is, the second service unit may include identifiers of the plurality of aggregation groups, and each identifier of an aggregation group is used to indicate one aggregation group in the message forwarding device.
If the second service unit includes an identifier of the aggregation group to be searched (e.g., the aggregation identifier 1 of the aggregation group 1), it indicates that the port in the second service unit is a member port of the aggregation group. Specifically, if the second service unit includes one or more port identifiers associated with the identifier of the aggregation group, it indicates that the aggregation group includes one or more ports in the second service unit indicated by the one or more port identifiers.
Specifically, a port id is used to indicate a port (or a logical port), and the port id may be denoted as "X/Y/Z". Wherein, X is an identifier of an aggregation group where the port is located, Y is a number of a service unit where the port is located, and Z is a number of the port, and the port identifier is associated with the identifier of the aggregation group. For example, one port identifier (denoted as port identifier 1) of the N port identifiers may be composed of a first identifier (such as aggregation identifier 1), a number of a first service unit (denoted as unit number 1), and a number of the port (denoted as port number 1), that is, the port identifier 1 is "aggregation identifier 1/unit number 1/port number 1".
Subsequently, when a member port of the aggregation group in the LACP message exists in a second service unit in the message forwarding device, the second service unit may copy one LACP message and send the LACP message to a member port in the aggregation group in the second service unit, respectively.
It can be understood that, the message forwarding device sends the LACP message out through the member port that belongs to the aggregation group locally by using the second service unit, which means that the second service unit sends the LACP message to a stacking member of the stacking system from the member port.
Illustratively, the message forwarding device specifically executes the message forwarding method in the embodiment of the present invention through each unit, such as the first service unit, the second service unit, and the switching unit. Fig. 4 is a schematic flow chart of another message forwarding device according to an embodiment of the present invention. The message forwarding method shown in fig. 4 includes S401 to S408:
s401, the first service unit receives an LACP message sent by a stacking member through a member port which belongs to the aggregation group locally.
S402, the first service unit adds the identifier of the aggregation group to the LACP message to obtain the LACP message including the identifier of the aggregation group.
S403, the first service unit sends an LACP packet including the identifier of the aggregation group to the switching unit.
S404, the switching unit receives the LACP message which is sent by the first service unit and comprises the identification of the aggregation group.
S405, the switching unit broadcasts an LACP message including the identification of the aggregation group.
It is understood that the descriptions of S401 to S405 above may refer to the description of S301 in the above embodiment, and are not repeated herein.
S406, the second service unit receives an LACP message broadcast by the switching unit and including the identifier of the aggregation group.
S407, the second service unit searches the member port which locally belongs to the aggregation group.
S408, the second service unit sends the LACP message out through the member port which belongs to the aggregation group locally.
After the second service unit successfully finds the member port locally belonging to the aggregation group, the second service unit in the message forwarding device may execute S408; after the member port that belongs to the aggregation group locally is not found successfully, the second service unit in the message forwarding device does not execute S408.
It is understood that the descriptions of S401 to S405 above may refer to the description of S301 in the above embodiment, and are not repeated herein.
It should be noted that the message forwarding method provided in the embodiment of the present invention is applied to a message forwarding device connected to each stacked member through an aggregation group, where a port of each stacked member connected to the message forwarding device is a member port of the aggregation group, the member port of the aggregation group is located in at least two service units of the message forwarding device, and the message forwarding device further includes a switching unit; the message forwarding method comprises the following steps: the first service unit receives an LACP message sent by a stacking member through a member port which locally belongs to the aggregation group, adds an identifier of the aggregation group to the LACP message and broadcasts the LACP message through the switching unit; the second service unit receives the LACP message from the exchange unit, searches the member port which locally belongs to the aggregation group according to the identification of the aggregation group in the LACP message, and sends the LACP message out through the member port which locally belongs to the aggregation group. Based on the scheme, because the first service unit forwards the LACP message added with the identifier of the aggregation group to the second service unit through the switching unit instead of directly sending the received LACP message to the main control unit in the message forwarding device, the message forwarding device copies the LACP message through the second service unit less times and faster, and the message forwarding device does not need to consume a large amount of resources to copy the LACP message through the CPU of the main control unit in a software copying manner. Therefore, CPU consumption in the message forwarding equipment can be reduced, and the message copying efficiency of the message forwarding equipment is improved.
In addition, because the message forwarding equipment improves the copying efficiency of the LACP messages, the problem that the stacking system cannot timely perform multi-activation detection due to the low copying efficiency of the LACP messages and further cannot timely solve the fault of the stacking system can be avoided. Therefore, the stacking system can detect and solve the faults of the stacking system in time.
Optionally, the identifier of the aggregation group provided in the embodiment of the present invention may be an aggregation group ID of the aggregation group. Specifically, S302 in the above embodiment may be implemented by S302 a:
s302a, the first service unit receives an LACP packet sent by a stack member through a member port that belongs to the aggregation group locally, adds the aggregation group ID of the aggregation group to the load of the LACP packet, and broadcasts the LACP packet carrying the aggregation group ID of the aggregation group through the switching unit.
Optionally, adding the aggregation group ID of the aggregation group to the load of the LACP packet may be to encapsulate a packet header (e.g., an internal packet header) including the aggregation group ID into the LACP packet.
Because the load of the LACP packet sent by the first service unit to the switching unit includes the aggregation group ID of the aggregation group, and the aggregation group ID may identify the aggregation group, for example, a member port in the aggregation group may be indicated, it may be implemented that after the switching unit sends the LACP packet to the second service unit, the second service unit searches for a member port locally belonging to the aggregation group through the aggregation group ID of the aggregation group included in the LACP packet.
In a possible implementation manner, the first service unit is a certain service unit of at least two service units; the second service unit is any service unit of the message forwarding equipment.
Specifically, a port of a first service unit in the message forwarding device, which receives an LACP message sent by each member of the stack, is a member port in an aggregation group connected to each member of the stack in the message forwarding device, that is, a port of the first service unit, which receives the LACP message, is a member port in the aggregation group. And the second service unit does not necessarily include a member port of the aggregation group, i.e. the port in the second service unit is not necessarily a member port in the aggregation group. Thus, the second service unit does not necessarily forward the LACP message after receiving the LACP message.
It can be understood that, in the embodiment of the present invention, for other service units (including an identifier of an aggregation group, such as aggregation identifier 1) in the message forwarding device except for the second service unit and the first service unit, steps similar to those performed by the second service unit in the embodiment of the present invention may be performed, and details of the embodiment of the present invention are not repeated.
It should be noted that, in the embodiment of the present invention, ports connected to each stacked member in the message forwarding device, that is, member ports in the aggregation group, are located in different service units in the message forwarding device, for example, in the first service unit and the second service unit, and the first service unit and the second service unit may include more than one member port in the aggregation group. At this time, the message forwarding device can implement forwarding (i.e. secondary forwarding) of the LACP message between different service units in the message forwarding device through the switching unit. Therefore, unnecessary consumption of CPU resources in the process of forwarding the message by the message forwarding equipment can be avoided.
In a possible implementation manner, as shown in fig. 5, a schematic flow chart of another packet forwarding method provided in the embodiment of the present invention is shown. In the packet forwarding method shown in fig. 5, after S301, the method may further include S303:
and S303, the message forwarding equipment receives the LACP message from the switching unit by adopting the second service unit, and when the second service unit does not find a member port belonging to the aggregation group locally according to the identification of the aggregation group in the LACP message, the LACP message is discarded by adopting the second service unit.
Accordingly, in the method shown in fig. 5, S302 described above may be replaced with S302 b:
s302b, the message forwarding device receives the LACP message from the switching unit by using the second service unit, successfully finds the member port belonging to the aggregation group locally according to the identifier of the aggregation group in the LACP message, and sends the LACP message through the member port belonging to the aggregation group locally.
It can be understood that, if the second service unit does not include the identifier of the aggregation group in the LACP message, it indicates that the port in the second service unit does not include the member port in the aggregation group, that is, the LACP message does not need to be copied in the second service unit. In this way, the second service unit may discard the received LACP message.
It should be noted that, in the message forwarding method provided in the embodiment of the present invention, when the second service unit in the message forwarding device does not include the identifier of the aggregation group in the LACP message, the received LACP message may be discarded. Therefore, the occupation of the storage resource of the second service unit in the message forwarding equipment can be reduced.
Exemplarily, as shown in fig. 6, a schematic flow chart of another packet forwarding method provided in the embodiment of the present invention is shown. Fig. 6 shows a step of interactively implementing packet replication between a source end board card, a switch matrix board card and another service board card (denoted as a service board card 1) in the packet forwarding device. Specifically, in combination with the method flowchart of fig. 4, the message forwarding method shown in fig. 6 may include the following steps:
s1: and the source end board card receives the LACP message sent by the stacking member through the member port which locally belongs to the aggregation group.
S2: and the source end board adds the identification of the aggregation group to the LACP message.
S3: and the source end board card forwards the LACP message added with the identification of the aggregation group to the switching matrix board card.
S4: and the switching matrix board card receives the LACP message which is forwarded by the source end board card and added with the identification of the aggregation group.
S5: and the switching matrix board sends the LACP message added with the identification of the aggregation group in a broadcasting mode.
S6: the service board 1 receives the LACP message which is sent by the switching matrix board and added with the identifier of the aggregation group.
S7: the service board 1 parses the LACP message to which the identifier of the aggregation group is added, and obtains the identifier of the aggregation group.
S8: the service board 1 determines whether the service board 1 includes the identifier of the aggregation group.
S9: if the service board 1 includes the identifier of the aggregation group and N port identifiers associated with the identifier of the aggregation group, the service board 1 copies the LACP message to obtain N copied LACP messages.
Wherein N is an integer greater than or equal to 1, and certainly the number of N is less than or equal to the number of at least two service units in the message forwarding device.
S10: the service board 1 sends a copied LACP message through each of the N ports indicated by the N port identifiers, so as to send N copied LACP messages.
S11: if the service board 1 does not include the identifier of the aggregation group, the service board 1 discards the LACP message to which the identifier of the aggregation group is added.
In the embodiment of the present invention, S11 and S9-S10 are parallel steps, i.e., S11 and S9-S10 are in an or relationship.
It should be noted that, in the embodiment of the present invention, the specific description of S1-S8 may refer to the related description of S401-S407 in the above embodiment, and the specific description of S9, S10, and S11 may refer to the related description of S408 in the above embodiment, which is not repeated herein.
The above description mainly introduces the scheme provided by the embodiment of the present invention from the perspective of interaction between the modules. It is understood that, in order to implement the above functions, each module, for example, each unit in the message forwarding device, such as the first service unit, the second service unit, the switching unit, and the like, includes a hardware structure and/or a software module corresponding to the execution of each function. Those of skill in the art will readily appreciate that the present invention can be implemented in hardware or a combination of hardware and computer software, with the exemplary elements and algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The embodiment of the present invention may perform module division on the packet forwarding device according to the above method example, for example, each module may be divided corresponding to each function, or two or more functions may be integrated in one processing module. The integrated module can be realized in a form of hardware or a form of software module. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 7 shows a schematic diagram of a possible composition of the packet forwarding device provided in the above embodiment, in a case where each functional module is divided according to each function. The message forwarding device 70 is connected to each stacked member through an aggregation group, the port of the message forwarding device 70, which connects each stacked member, is a member port of the aggregation group, the member port of the aggregation group is located in at least two service units of the message forwarding device 70, and the message forwarding device 70 further includes a switching unit 701, a first service unit 702, and a second service unit 703; a first service unit 702, configured to receive, through a member port that locally belongs to an aggregation group, an LACP message sent by a stack member, add an identifier of the aggregation group to the LACP message, and then broadcast the LACP message through the switching unit 701; the second service unit 703 is configured to receive the LACP packet from the switching unit 701, search a member port that locally belongs to the aggregation group according to the identifier of the aggregation group in the LACP packet, and send the LACP packet through the member port that locally belongs to the aggregation group.
Optionally, the first service unit 702 is a certain service unit of at least two service units; the second service unit 703 is any service unit of the message forwarding device 70.
Optionally, the first service unit 702 is specifically configured to add the aggregation group ID of the aggregation group to the load of the LACP packet, and broadcast the LACP packet carrying the aggregation group ID of the aggregation group through the switching unit 701.
Optionally, the second service unit 703 is further configured to discard the LACP message when the second service unit 703 does not find a local member port belonging to the aggregation group according to the identifier of the aggregation group in the LACP message.
It can be understood that, with reference to the message forwarding device 11 shown in fig. 2, the first service unit 702 provided in the embodiment of the present invention may be a service unit 1 in M service units included in the message forwarding device 11, the second service unit 703 may be a service unit 2 in M service units included in the message forwarding device 11, and the switching unit interacting with the first service unit 702 may be the switching unit 111 shown in fig. 2.
It should be noted that, in the message forwarding device provided in the embodiment of the present invention, the message forwarding device is connected to each stacked member through the aggregation group, a port of the message forwarding device, which is connected to each stacked member, is a member port of the aggregation group, a member port of the aggregation group is located in at least two service units of the message forwarding device, and the message forwarding device further includes a switching unit; the message forwarding method comprises the following steps: the first service unit receives an LACP message sent by a stacking member through a member port which locally belongs to the aggregation group, adds an identifier of the aggregation group to the LACP message and broadcasts the LACP message through the switching unit; the second service unit receives the LACP message from the exchange unit, searches the member port which locally belongs to the aggregation group according to the identification of the aggregation group in the LACP message, and sends the LACP message out through the member port which locally belongs to the aggregation group. Based on the scheme, because the first service unit forwards the LACP message added with the identifier of the aggregation group to the second service unit through the switching unit instead of directly sending the received LACP message to the main control unit in the message forwarding device, the message forwarding device copies the LACP message through the second service unit less times and faster, and the message forwarding device does not need to consume a large amount of resources to copy the LACP message through the CPU of the main control unit in a software copying manner. Therefore, CPU consumption in the message forwarding equipment can be reduced, and the message copying efficiency of the message forwarding equipment is improved.
In addition, because the message forwarding equipment improves the copying efficiency of the LACP messages, the problem that the stacking system cannot timely perform multi-activation detection due to the low copying efficiency of the LACP messages and further cannot timely solve the fault of the stacking system can be avoided. Therefore, the stacking system can detect and solve the faults of the stacking system in time.
In the case of using integrated units, the processing unit in the switching unit 601, the processing unit in the first service unit 602, and the processing unit in the second service unit 603 in the message forwarding device 70 may be implemented by one processing module. The processing module may be a Processor or a controller, such as a CPU, a general purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processing units described above may also be combinations that perform computing functions, e.g., including one or more microprocessor combinations, DSPs and microprocessors, and the like.
It should be noted that the service unit provided in the embodiment of the present invention may further include other integrated units. For example, the receiving module and the sending module in any one of the switching unit 701, the first service unit 702, and the second service unit 703 in the message forwarding device 70 may be integrated into one communication interface.
Exemplarily, as shown in fig. 8, a schematic diagram of another structure for forwarding a packet according to an embodiment of the present invention is provided. Specifically, the message forwarding device shown in fig. 8 includes a processor 801, a memory 802, a communication interface 803, a communication bus 804, and a processor 805.
Specifically, the processing module may be one or more processors such as the processor 801 and the processor 805 shown in fig. 8. The memory module may be the memory 802 shown in fig. 8. The forwarding module 403 may be implemented by a communication interface 803.
The processor 801 is a control center of the message forwarding apparatus 80, and may be a processor or a collective term for multiple processing elements. For example, the processor 801 may be a CPU, may be an ASIC, or may be one or more integrated circuits configured to implement embodiments of the present invention, such as: one or more DSPs, or one or more FPGAs.
The processor 801 may perform various functions of the device by running or executing software programs stored in the memory 802, and invoking data stored in the memory 802, among other things.
In particular implementations, processor 801 may include one or more CPUs such as CPU0 and CPU1 shown in fig. 8 as one example.
In a particular implementation, the message forwarding device may include multiple processors, such as the processor 801 and the processor 805 shown in fig. 8, for example. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions). Illustratively, the processor 801 is a processor of a first service unit in the message forwarding device 80, and the processor 805 is a processor of a second service unit in the message forwarding device 80.
The Memory 802 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory 802, which may be separate, is coupled to the processor 801 via a communication bus 804. The memory 802 may also be integrated with the processor 801. The memory 802 is used for storing software programs for executing the schemes provided by the embodiments of the present invention, and is controlled by the processor 801 to execute the software programs.
The communication interface 803 may include two communication interfaces, a sending interface for sending data to an external device and a receiving interface for receiving data from the external device, that is, the message forwarding device may respectively implement data receiving and data sending through two different communication interfaces. Of course, the communication interface 803 may integrate a data receiving function and a data transmitting function into one communication interface, which has a data receiving function and a data transmitting function.
The communication bus 804 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 804 may be divided into an address bus, a data bus, a control bus, and the like, which is not limited in the embodiment of the present invention.
The architecture of the message forwarding device 80 shown in fig. 8 does not constitute a limitation of the message forwarding device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The detailed description of each module in the message forwarding device 80 and the technical effects brought by each module after executing the related method steps in the foregoing embodiments of the present invention may refer to the related description in the method embodiments of the present invention, and are not described herein again.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.