CN109194585B - Message forwarding method and network equipment - Google Patents

Message forwarding method and network equipment Download PDF

Info

Publication number
CN109194585B
CN109194585B CN201811260316.9A CN201811260316A CN109194585B CN 109194585 B CN109194585 B CN 109194585B CN 201811260316 A CN201811260316 A CN 201811260316A CN 109194585 B CN109194585 B CN 109194585B
Authority
CN
China
Prior art keywords
port
interconnection
ports
service
target
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.)
Active
Application number
CN201811260316.9A
Other languages
Chinese (zh)
Other versions
CN109194585A (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.)
New H3C Technologies Co Ltd Hefei Branch
Original Assignee
New H3C Technologies Co Ltd Hefei Branch
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 New H3C Technologies Co Ltd Hefei Branch filed Critical New H3C Technologies Co Ltd Hefei Branch
Priority to CN201811260316.9A priority Critical patent/CN109194585B/en
Publication of CN109194585A publication Critical patent/CN109194585A/en
Application granted granted Critical
Publication of CN109194585B publication Critical patent/CN109194585B/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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details

Abstract

The invention provides a message forwarding method and network equipment, wherein the network equipment comprises an interface board and more than one network board, the interface board comprises an exchange chip, the exchange chip comprises a plurality of service ports, a plurality of interconnection ports for connecting with the network board and a target aggregation group comprising a preset number of interconnection ports. The interface board determines a target interconnection port which is currently connected with the network board from the interconnection ports with the preset number, and selects more than one port index from the port indexes of the determined target interconnection ports as load balance values of a plurality of service ports of the exchange chip respectively; when the exchange chip receives a message through any service port, the exchange chip selects an interconnection port with the index same as the load balance value of the service port from the interconnection ports with the preset number, and sends the received message through the selected interconnection port. Therefore, the problem of packet loss or multiple packets when the network board is plugged, pulled or restarted can be avoided.

Description

Message forwarding method and network equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a packet forwarding method and a network device.
Background
In the network equipment, the exchange chip of the interface board is connected with the network board through the interconnection port, and when the output interface of the message entering the exchange chip of the interface board is not on the board, the message can be forwarded across boards through the network board.
In the related art, in order to increase the bandwidth and improve the reliability between links, an interconnection port, to which a network board is currently connected, on an exchange chip of an interface board is usually added into a aggregation group, when the exchange chip receives a message to be forwarded across boards, a port index of the message at an input port of the exchange chip is used to take a surplus for the number of members in the aggregation group, and then an interconnection port with the port index being the same as the obtained surplus is selected from the aggregation group to send the message.
However, when the network board is plugged in, unplugged or restarted, the interconnection port of the network board currently connected to the switch chip may also be changed, so that the member port of the aggregation group on the switch chip is changed, and at this time, a plurality of hardware entries related to the aggregation group, for example, the member number, the member list, the aggregation bitmap, and the like of the aggregation group, need to be reset on the switch chip. Setting the hardware entries consumes a certain time, and if the traffic needing to be forwarded across boards reaches the switch chip within the time, the problem of packet loss or multiple packets will occur.
Disclosure of Invention
In view of the above, an object of the present disclosure is to provide a message forwarding method and a network device, so as to at least partially improve the above problem.
In order to achieve the purpose, the following technical scheme is adopted in the disclosure:
in a first aspect, the present disclosure provides a packet forwarding method, which is applied to an interface board of a network device, where the network device further includes more than one network board, the interface board includes a switch chip, and the switch chip includes multiple service ports, multiple interconnection ports for connecting to the network board, and a target aggregation group including a preset number of interconnection ports; the method comprises the following steps:
determining a target interconnection port which is currently connected with the screen plate from the interconnection ports with the preset number;
selecting more than one port index from the determined port indexes of the target interconnection port, and respectively using the port indexes as load balancing values of a plurality of service ports of the exchange chip;
when the exchange chip receives a message through any service port, an interconnection port with a port index same as the load balance value of the service port is selected from the interconnection ports with the preset number, and the message is sent through the selected interconnection port.
In a second aspect, the present disclosure further provides a network device, including an interface board and more than one network board, where the interface board includes an exchange chip, and the exchange chip includes a plurality of service ports, a plurality of interconnection ports for connecting to the network board, and a target aggregation group including a preset number of interconnection ports;
the interface board determines a target interconnection port which is currently connected with the screen plate from the interconnection ports with the preset number; selecting more than one port index from the determined port indexes of the target interconnection port, and respectively using the port indexes as load balancing values of a plurality of service ports of the exchange chip;
when the exchange chip receives a message through any service port, an interconnection port with a port index same as the load balance value of the service port is selected from the interconnection ports with the preset number, and the message is sent through the selected interconnection port.
Compared with the prior art, the method has the following beneficial effects:
the message forwarding method and the network device provided by the present disclosure include that the network device includes an interface board and more than one network board, the interface board includes a switch chip, the switch chip includes a plurality of service ports, a plurality of interconnection ports for connecting with the network board, and a target aggregation group including a preset number of interconnection ports. The interface board determines a target interconnection port which is currently connected with the network board from the interconnection ports with the preset number, and selects more than one port index from the port indexes of the determined target interconnection ports as load balance values of a plurality of service ports of the exchange chip respectively; when the exchange chip receives a message through any service port, the exchange chip selects an interconnection port with the index same as the load balance value of the service port from the interconnection ports with the preset number, and sends the received message through the selected interconnection port. Therefore, the problem of packet loss or multiple packets when the network board is plugged, pulled or restarted can be avoided.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present disclosure and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a block schematic diagram of a network device provided by the present disclosure;
fig. 2 is a schematic flowchart of a message forwarding method according to the present disclosure;
FIG. 3 is a schematic diagram illustrating the sub-steps of step S22 shown in FIG. 2;
fig. 4 is a schematic structural diagram of a switch chip provided in the present disclosure;
FIG. 5 is a diagram illustrating load balancing values of traffic ports of a switch chip according to an example;
FIG. 6 is a diagram illustrating load balancing values of traffic ports of a switch chip according to yet another example;
FIG. 7 is a diagram illustrating load balancing values of traffic ports of a switch chip according to yet another example;
fig. 8 is a diagram illustrating load balancing values of traffic ports of a switch chip in yet another example.
An icon: 10-a network device; 100. 200-an interface board; 300-mesh plate; 110. 120, 130, 140, 210, 220, 230, 240, 310, 320-switch chip.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the present disclosure, and it is apparent that the described embodiments are some, but not all embodiments of the present disclosure. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present disclosure, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings or orientations or positional relationships that the present invention products are conventionally placed in use, and are only for convenience of describing and simplifying the present disclosure, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present disclosure. Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 is a block schematic diagram of a network device 10 provided in the present disclosure, where the network device 10 may be a switch, a router, or the like, for example, a frame switch. The network device 10 includes more than one interface board and more than one network board, where the more than one interface board may be, for example, the interface board 100 and the interface board 200 shown in fig. 1, and the more than one network board may be, for example, the network board 300 shown in fig. 1, it should be understood that fig. 1 illustrates a case of including only one network board, in other examples, the network device 10 may further include two or more network boards, and this embodiment is not limited thereto.
In the present disclosure, each interface board includes one, two, or more switch chips, for example, as shown in fig. 1, the interface board 100 includes a switch chip 110, a switch chip 120, a switch chip 130, and a switch chip 140, and the interface board 200 includes a switch chip 210, a switch chip 220, a switch chip 230, and a switch chip 240. Correspondingly, each well board includes one, two or more switch chips, for example, as shown in fig. 1, well board 300 includes switch chip 310 and switch chip 320.
In this disclosure, a switch chip in an interface board includes a plurality of service ports and a plurality of interconnect ports for connecting to a network board, where the interconnect ports generally refer to internal interconnect ports of the switch chip. Alternatively, in some specific examples, the interconnect ports for connecting to the mesh boards are typically HiGig mode ports (also known as "HG ports").
In practice, the interconnection ports currently connected to the same switch chip are usually added to a single aggregation group. It should be noted that if the interconnection port is a HiGig port, the aggregation group with the HiGig port as the member port may be generally referred to as a HiGig aggregation. For example, as shown in fig. 1, the interconnection ports of the switch chip 110 currently connected with the network board are added into the same aggregation group, the interconnection ports of the switch chip 120 currently connected with the network board are added into the same aggregation group, the interconnection ports of the switch chip 130 currently connected with the network board are added into the same aggregation group, and the interconnection ports of the switch chip 140 currently connected with the network board are added into the same aggregation group.
In the related art, the switch chip typically selects an interface from the aggregation group by: still taking the switch chip 110 as an example, when the switch chip 110 receives a packet through any service port, and determines that an output interface of the packet is not on the interface board 100 through table lookup, the switch chip 110 uses the port index of the service port (i.e., the packet is at the input port of the switch chip 110) to take the remainder of the Number of member ports of the aggregation group on the switch chip 110, and uses the obtained remainder as a Load Balance Number (LBN) of the service port. The calculated load balancing value is stored in a corresponding hardware register, so that the switch chip 110 selects an interconnection port with a port index identical to the load balancing value in the hardware register from the interconnection ports of the aggregation group of the chip, and sends the message from the selected interconnection port. Therefore, the message can be sent to the corresponding network board, and then the network board sends the message to the interface board where the output interface of the message is located.
If the above manner is adopted, the member port of the aggregation group of the switch chip changes along with the plugging, unplugging and restarting operations of the network board, when the member port of the aggregation group of the switch chip changes, the hardware table entry related to the aggregation group needs to be updated on the switch chip, otherwise, on one hand, a message may be sent to an interconnection port which is not connected with the network board currently, so that packet loss is caused; on the other hand, when the switch chip calculates the load balancing value of the ingress port of the packet in the manner described above, there may be a case that there is no interconnection port with a port index that is the same as the load balancing value in the aggregation group, and at this time, a management mechanism inside the switch chip is triggered, so that multiple copies of the packet are mistakenly copied and forwarded, that is, a multi-packet problem occurs.
In order to solve the above problem, the present disclosure creates a target aggregation group on a switch chip of an interface board, and adds a preset number of interconnection ports on the switch chip for connecting with a network board to the target aggregation group.
In the present disclosure, each interface board includes a processor (CPU) and a switch chip, and the CPU can configure each switch chip. In implementation, when detecting that the board is started, the CPU of the interface board may create a target aggregation group on each switch chip of the board, and add a preset number of interconnection ports on the switch chip to the target aggregation group of the switch chip. The interconnection ports of the preset number may be all interconnection ports on the switch chip for connecting with the network board, or may be a part of interconnection ports selected from all interconnection ports on the switch chip for connecting with the network board, which is not limited in this disclosure.
Because the preset number of interconnected ports is predetermined, the member port of the target aggregation group of the switching chip does not change along with the plugging, unplugging or restarting operation of the network board, and the hardware table entry related to the target aggregation group on the switching chip does not need to be updated when the network board is plugged, unplugged or restarted, so that the problem of packet loss or multiple packets can be avoided.
However, in the above design, there may be an interconnect port that is not currently connected to the network board in the target aggregation group of the switch chip, and if the above-described manner in the related art is still used to select an interface from the target aggregation group, a packet may be sent through the interconnect port that is not connected to the network board, thereby causing packet loss.
Based on the research on the above defects, the present disclosure provides a packet forwarding method, which can be applied to interface boards of network devices 10, such as the interface board 100 and the interface board 200 shown in fig. 1. In detail, the method may be executed by a CPU of the interface board. The method will be described below by taking the interface board 100 as an example.
Fig. 2 is a schematic flowchart of a packet forwarding method applied to the interface board 100 shown in fig. 1 according to the present disclosure, where the method may include the steps shown in fig. 2.
And step S21, determining the target interconnection port which is currently connected with the screen plate from the interconnection ports with the preset number.
The target interconnection port refers to an interconnection port which is currently connected with a network board in the preset number of interconnection ports included in the target aggregation group of the switch chip.
Step S22, selecting more than one port index from the determined port indexes of the target interconnect port, and using the port indexes as the load balancing values of the plurality of service ports of the switch chip, respectively.
Step S23, when the switch chip receives a packet through any of the service ports, select an interconnection port with a port index that is the same as the load balancing value of the service port from the preset number of interconnection ports, and send the packet through the selected interconnection port.
In view of that, when selecting an egress interface of a packet from an aggregation group, a switch chip generally selects a member port (i.e., an interconnect port) having a port index that is the same as a load balancing value of an ingress interface of the packet from the aggregation group as the egress interface of the packet, and therefore, in the present disclosure, after a target aggregation group is created on the switch chip and a preset number of interconnect ports on the switch chip are added to the target aggregation group, a corresponding port index may be selected from port indexes of interconnect ports to which a network board is currently connected in the target aggregation group as a load balancing value of a plurality of service ports of the switch chip.
Through the design, no matter which service port the switch chip receives the message from, since the load balance value of the service port is the same as the port index of the interconnection port (i.e., the target interconnection port) currently connected with the network board in the target aggregation group, when the message needs to be forwarded across boards, the switch chip sends the message from the target interconnection port in the target aggregation group of the switch chip. Therefore, the problem of packet loss caused by sending the message to the interconnection port which is not connected with the network board at present can be avoided.
Alternatively, in the present disclosure, there may be a plurality of ways to set the load balancing values of the plurality of traffic ports of the switch chip. As shown in fig. 3, step S22 may include the following sub-steps.
Step S31, determining whether the number of the determined target interconnect ports is smaller than the number of the service ports of the switch chip. If not, go to step S32; if yes, go to step S33.
Step S32, selecting a plurality of port indexes corresponding to the plurality of service ports of the switch chip from the determined port indexes of the target interconnect port, and taking the plurality of port indexes as load balancing values of the plurality of service ports, respectively.
Taking the switch chip 110 as an example, in implementation, if the number of the target interconnect ports determined in the target aggregation group of the switch chip 110 is not less than (i.e., greater than or equal to) the number of the service ports of the switch chip 110, the target interconnect ports with the same number as the number of the service ports of the switch chip 110 may be determined from the target aggregation group of the switch chip 110, for example, when the switch chip 110 has x service ports, x interconnect ports (i.e., target interconnect ports) to which a network board is currently connected are determined from the target aggregation group of the switch chip 110, and port indexes of the determined target interconnect ports are respectively used as load balancing values of the x service ports. Therefore, the load balance values of a plurality of service ports of the switching chip can be set to different values, so that messages entering through different service ports can be sent to the network board from different target interconnection ports, and the load balance among the target interconnection ports can be realized.
Alternatively, in the present disclosure, after determining the load balancing value of a traffic port, the load balancing value may be set into a hardware register for storing the load balancing value of the traffic port.
Step S33, using the determined port index of the target interconnect port as the load balancing value of the plurality of service ports of the switch chip, wherein the load balancing values of at least two service ports are the same.
Still taking the switch chip 110 as an example, in implementation, if the number of the target interconnect ports determined in the target aggregation group of the switch chip 110 is less than the number of the service ports of the switch chip 110, the load balancing value of each service port of the switch chip 110 may be set by:
in one embodiment, the determined port index of the target interconnect port may be randomly used as a load balancing value for each traffic port. For example, assuming that the switch chip 110 includes a service port a, a service port B, a service port C, and a service port D, and the interconnection ports currently connected with the network board in the target aggregation group of the switch chip 110 only include interconnection port a and interconnection port B, the number of the determined target interconnection ports at this time is 2, which is smaller than the number of the service ports 4.
The port indices of interconnect port a and interconnect port b can be used randomly as the load balancing values for traffic ports a-D. For example, the load balancing values of traffic ports a-D may each be a port index of interconnect port a (or interconnect port b); for another example, the load balancing values of any two of the service ports a to D may be port indexes of the interconnection port a, and the load balancing values of the other two service ports may be port indexes of the interconnection port b; for another example, the load balancing values of any three of the traffic ports a-D may be the port index of the interconnect port a, and the load balancing value of another traffic port may be the port index of the interconnect port b.
In yet another embodiment, the determined port index of the target interconnect port may be cyclically assigned to the traffic ports of the switch chip in order. Still by taking the switch chip 110 in the above embodiment as an example, the port index of the interconnect port a may be used as the load balancing value of the service port a, the port index of the interconnect port B may be used as the load balancing value of the service port B, the port index of the interconnect port a may be used as the load balancing value of the service port C, the port index of the interconnect port B may be used as the load balancing value of the service port D, and so on.
Optionally, in practical applications, when an operation of plugging, unplugging, or restarting the network board occurs, the target interconnection port in the target aggregation group of the switch chip may change, and at this time, the load balancing value of the service port may be updated correspondingly. Based on this, the message forwarding method provided by the present disclosure may further include the following steps:
firstly, when any target interconnection port in the target aggregation group is disconnected with a network board, at least one service port with a load balance value identical to the port index of the target interconnection port is determined on the switching chip, and at least one port index is selected from the port indexes of the remaining target interconnection ports in the target aggregation group to serve as the load balance value of the determined at least one service port.
When the operation of pulling out the network board or restarting the network board usually occurs, the target interconnection port of the exchange chip may be disconnected from the network board in the target aggregation group. At this time, the target interconnection port disconnected from the network board cannot be used for forwarding the message, and therefore, the load balancing value of the service port having the same load balancing value as the disconnected target interconnection port can be set as the port index of the target interconnection port to which the network board is still connected.
Secondly, when any interconnection port in the target aggregation group is connected with the network board to form a new target interconnection port, different service ports with the same load balancing value are determined on the switching chip, and at least one port index is selected from the port indexes of the new target interconnection port to serve as the load balancing value of at least one service port in the determined different service ports.
In general, when an operation of inserting a gateway or a successful restart of the gateway occurs, a situation that an interconnect port establishes a connection with the gateway to become a new target interconnect port may occur in a target aggregation group of a switch chip. At this time, the new target interconnect port may be used to forward the packet. In order to make the traffic forwarded by each target interconnection port more balanced, the port index of the new target interconnection port may be used as a load balancing value of a part of the different service ports having the same load balancing value on the switch chip. This is because, when a packet entering from a different service port is transmitted through the same target interconnect port, if the traffic entering from the different service port is too large, the same target interconnect port will be blocked. Through the design, the messages entering from different service ports are not sent to the network board through the same target interconnection port any more, but are sent to the network board through at least two target interconnection ports, so that the problem of blockage can be relieved.
Through the design, when the target interconnection port connected with the network board on the switching chip is changed due to the operation of plugging, unplugging or restarting the network board, all hardware table entries related to the target aggregation group on the switching chip do not need to be modified, and only the hardware register used for storing the load balance value of the service port on the switching chip needs to be updated.
Specific examples will be given below to further illustrate the packet forwarding method provided by the present disclosure.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a switch chip 110 provided in the present disclosure, where the switch chip 110 includes 6 service ports and 6 interconnection ports for connecting to a network board. The 6 service ports are respectively a service port a, a service port B, a service port C, a service port D, a service port E and a service port F, the 6 interconnection ports are respectively an interconnection port a, an interconnection port B, an interconnection port C, an interconnection port D, an interconnection port E and an interconnection port F, and port indexes of the interconnection ports a to F are respectively 0 to 5.
It is assumed that a target aggregation group a is created on the switch chip 110, and the target aggregation group a includes all interconnect ports, i.e., the interconnect ports a-f, on the switch chip 110 for connecting to the network board.
Suppose that the currently connected interconnection ports of the mesh plate in the target interconnection aggregation group a have: the interconnection port a, the interconnection port b, the interconnection port c, and the interconnection port d, in this case, the message forwarding method provided by the present disclosure may be implemented through the following processes:
the interface board 100 where the first switching chip 110 is located determines, from the interconnection ports of the target aggregation group a, that the target interconnection port currently connected with the network board has 4 ports, namely an interconnection port a, an interconnection port b, an interconnection port c, and an interconnection port d.
Second, the number of the target interconnection ports determined by the interface board 100 is 4, which is smaller than the number of the service ports 6 of the switch chip 110, so the port indexes of the determined interconnection port a, interconnection port b, interconnection port c, and interconnection port d can be respectively used as the load balancing values of the service ports a-F, where the load balancing values of some service ports in the service ports a-F are the same.
Alternatively, port indexes (i.e., 0-3) of the interconnect port a, the interconnect port b, the interconnect port c, and the interconnect port d may be sequentially and circularly allocated to the traffic ports a-F as load balancing values. Specifically, as shown in fig. 5, the load balance value of the traffic port a may be set to 0, the load balance value of the traffic port B may be set to 1, the load balance value of the traffic port C may be set to 2, the load balance value of the traffic port D may be set to 3, the load balance value of the traffic port E may be set to 0, and the load balance value of the traffic port F may be set to 1.
Therefore, a message entering from the service port A and needing to be forwarded across the board is sent to the corresponding network board from the interconnection port a, a message entering from the service port B and needing to be forwarded across the board is sent to the corresponding network board from the interconnection port B, a message entering from the service port C and needing to be forwarded across the board is sent to the corresponding network board from the interconnection port C, a message entering from the service port D and needing to be forwarded across the board is sent to the corresponding network board from the interconnection port D, a message entering from the service port E and needing to be forwarded across the board is sent to the corresponding network board from the interconnection port a, and a message entering from the service port F and needing to be forwarded across the board is sent to the corresponding network board from the interconnection port B.
It should be understood that in other examples, the port indexes of the interconnect port a, the interconnect port b, the interconnect port c, and the interconnect port d may be randomly used as the load balancing values of the traffic ports a-F, or the index of a part of the interconnect ports a, the interconnect port b, the interconnect port c, and the interconnect port d may be randomly used as the load balancing value of the traffic ports a-F.
Thirdly, when the switch chip 110 receives a message through any service port, an interconnection port with a port index identical to the load balancing value of the service port is selected from the target aggregation group a to send the message.
In the scenario shown in fig. 5, if an operation of inserting a network board occurs, so that the interconnection ports e and f establish connection with the network board to become new target interconnection ports, the message forwarding method provided by the present disclosure may further include the following steps:
fourthly, the interface board 100 detects that the interconnection ports E and F of the switch chip 110 are connected with the network board to become new target interconnection ports, so that it is determined that the service port a and the service port E on the switch chip 110 have the same load balancing value, and the service port B and the service port F have the same load balancing value. Then, one of the port indexes of the new target interconnect port (interconnect port E and interconnect port F) may be selected as the load balancing value of service port a or service port E, and one of the port indexes of interconnect port E and interconnect port F may be selected as the load balancing value of service port B or service port F.
For example, as shown in fig. 6, a port index 4 of an interconnect port E may be used as a load balancing value of a traffic port E, and a port index 5 of an interconnect port F may be used as a load balancing value of a traffic port F. As another example, the port index 4 of the interconnection port E can be used as the load balancing value of the service port E and the service port F. As another example, the port index 5 of the interconnect port F can be used as the load balancing value of the traffic port E and the traffic port F.
In the scenario shown in fig. 5, if an operation of pulling out the network board occurs, the network board is just connected to the interconnection port c and the interconnection port d, and after the network board is pulled out, the interconnection port c and the interconnection port d, which are originally connected with the network board, are disconnected from the network board. In this case, the packet forwarding method provided by the present disclosure may further include the following steps:
fifth, the interface board 100 detects that the target interconnection port C and the target interconnection port D of the switch chip 110 are disconnected from the network board, so that it is determined that the load balancing value of the service port C on the switch chip 110 is the same as the port index of the target interconnection port C, and it is determined that the load balancing value of the service port D on the switch chip 110 is the same as the port index of the target interconnection port D. Then, a port index is selected from the remaining target interconnect ports a and b of the target aggregation group a as the load balancing value for traffic port C and traffic port D.
For example, as shown in fig. 7, the port index 0 of the target interconnect port a may be selected as the load balancing value of the traffic port C, and the port index 1 of the target interconnect port b may be selected as the load balancing value of the traffic port D.
For another example, port index 0 of the target interconnect port a may be selected as the load balancing value for traffic port C and traffic port D. In another example, port index 1 of the target interconnect port b may be selected as the load balancing value for traffic port C and traffic port D.
In the scenario shown in fig. 5, if an operation of pulling out the network board occurs, the network board is just connected to the interconnection port a and the interconnection port b, and after the network board is pulled out, the interconnection port a and the interconnection port b, which are originally connected with the network board, will be disconnected from the network board. In this case, the packet forwarding method provided by the present disclosure may further include the following steps:
sixthly, the interface board 100 detects that the target interconnection port a and the target interconnection port B of the switch chip 110 are disconnected from the network board, so that it is determined that the load balance values of the service port a and the service port E on the switch chip 110 are the same as the port index of the target interconnection port a, and it is determined that the load balance values of the service port B and the service port F on the switch chip 110 are the same as the port index of the target interconnection port B. Then, a port index is selected from the remaining target interconnection ports c and d of the target aggregation group a as the load balancing values of the service port a, the service port B, the service port E, and the service port F.
For example, as shown in fig. 8, port index 2 of the target interconnect port c may be selected as the load balancing values of the service port a and the service port E, and port index 3 of the target interconnect port d may be selected as the load balancing values of the service port B and the service port F.
For another example, the port index 2 of the target interconnect port c may be used as the load balancing value of the service port a, the service port E, and the service port B, and the port index 3 of the target interconnect port d may be used as the load balancing value of the service port F. For another example, port index 2 of the target interconnect port c (or port index 3 of the target interconnect port d) may be used as the load balancing value of the service port a, the service port B, the service port E, and the service port F.
In summary, the present disclosure provides a message forwarding method and a network device, where the network device includes an interface board and more than one network board, the interface board includes a switch chip, and the switch chip includes a plurality of service ports, a plurality of interconnection ports for connecting to the network board, and a target aggregation group including a preset number of interconnection ports. The interface board determines a target interconnection port which is currently connected with the network board from the interconnection ports with the preset number, and selects more than one port index from the port indexes of the determined target interconnection ports as load balance values of a plurality of service ports of the exchange chip respectively; when the exchange chip receives a message through any service port, the exchange chip selects an interconnection port with the index same as the load balance value of the service port from the interconnection ports with the preset number, and sends the received message through the selected interconnection port. Therefore, the problem of packet loss or multiple packets when the screen board is plugged, pulled or restarted can be avoided.
In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and the flowcharts and block diagrams in the figures, for example, illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present disclosure may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules 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 disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A message forwarding method is applied to an interface board of a network device, the network device also comprises more than one network board, and the message forwarding method is characterized in that the interface board comprises a switching chip, the switching chip comprises a plurality of service ports, a plurality of interconnection ports for connecting with the network board and a target aggregation group comprising a preset number of interconnection ports; the method comprises the following steps:
determining a target interconnection port which is currently connected with the screen plate from the interconnection ports with the preset number;
selecting more than one port index from the determined port indexes of the target interconnection port, and respectively using the port indexes as load balancing values of the plurality of service ports of the switching chip;
when the exchange chip receives a message through any service port, an interconnection port with a port index same as the load balance value of the service port is selected from the interconnection ports with the preset number, and the message is sent through the selected interconnection port.
2. The method of claim 1, wherein selecting one or more port indexes from the determined port indexes of the target interconnect port as load balancing values of the plurality of traffic ports of the switch chip respectively comprises:
if the number of the determined target interconnection ports is not less than the number of the service ports of the switching chip, selecting a plurality of port indexes respectively corresponding to the plurality of service ports of the switching chip from the port indexes of the determined target interconnection ports, and respectively taking the plurality of port indexes as load balancing values of the plurality of service ports.
3. The method of claim 2, wherein selecting more than one port index from the determined port indexes of the target interconnect port as load balancing values of the plurality of service ports of the switch chip respectively, further comprises:
and if the determined number of the target interconnection ports is smaller than the number of the service ports of the switching chip, taking the port index of the determined target interconnection port as a load balancing value of the plurality of service ports of the switching chip, wherein the load balancing values of at least two service ports are the same.
4. The method according to any one of claims 1-3, further comprising:
when any target interconnection port in the target aggregation group is disconnected with the network board, at least one service port with the same load balance value as the port index of the target interconnection port is determined on the switching chip, and at least one port index is selected from the port indexes of the remaining target interconnection ports in the target aggregation group to serve as the load balance value of the determined at least one service port.
5. The method according to any one of claims 1-3, further comprising:
when any interconnection port in the target aggregation group is connected with the network board to form a new target interconnection port, different service ports with the same load balancing value are determined on the switching chip, and at least one port index is selected from the port indexes of the new target interconnection port to serve as the load balancing value of at least one service port in the different determined service ports.
6. A network device is characterized by comprising an interface board and more than one network board, wherein the interface board comprises an exchange chip, the exchange chip comprises a plurality of service ports, a plurality of interconnection ports for connecting with the network board and a target aggregation group comprising a preset number of interconnection ports;
the interface board determines a target interconnection port which is currently connected with the screen plate from the interconnection ports with the preset number; selecting more than one port index from the determined port indexes of the target interconnection port, and respectively using the port indexes as load balancing values of the plurality of service ports of the switching chip;
when the exchange chip receives a message through any service port, an interconnection port with a port index same as the load balance value of the service port is selected from the interconnection ports with the preset number, and the message is sent through the selected interconnection port.
7. The network device according to claim 6, wherein the interface board selects more than one port index from the determined port indexes of the target interconnection port, and a specific manner of using the port indexes as the load balancing values of the plurality of service ports of the switch chip respectively comprises:
if the number of the determined target interconnection ports is not less than the number of the service ports of the switching chip, selecting a plurality of port indexes respectively corresponding to the plurality of service ports of the switching chip from the port indexes of the determined target interconnection ports, and respectively taking the plurality of port indexes as load balancing values of the plurality of service ports.
8. The network device according to claim 7, wherein the interface board selects more than one port index from the determined port indexes of the target interconnection port, and the port indexes are respectively used as specific ways of load balancing values of the plurality of service ports of the switch chip, further comprising:
and if the determined number of the target interconnection ports is smaller than the number of the service ports of the switching chip, taking the port index of the determined target interconnection port as a load balancing value of the plurality of service ports of the switching chip, wherein the load balancing values of at least two service ports are the same.
9. The network device of any one of claims 6-8,
when any target interconnection port in the target aggregation group is disconnected with the screen plate, the interface plate determines at least one service port with a load balance value identical to the port index of the target interconnection port on the switching chip, and selects at least one port index from the port indexes of the remaining target interconnection ports in the target aggregation group as the load balance value of the determined at least one service port.
10. The network device of any one of claims 6-8,
when any interconnection port in the target aggregation group is connected with the network board to form a new target interconnection port, the interface board determines different service ports with the same load balancing value on the switching chip, and selects at least one port index from the port indexes of the new target interconnection port as the load balancing value of at least one service port in the determined different service ports.
CN201811260316.9A 2018-10-26 2018-10-26 Message forwarding method and network equipment Active CN109194585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811260316.9A CN109194585B (en) 2018-10-26 2018-10-26 Message forwarding method and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811260316.9A CN109194585B (en) 2018-10-26 2018-10-26 Message forwarding method and network equipment

Publications (2)

Publication Number Publication Date
CN109194585A CN109194585A (en) 2019-01-11
CN109194585B true CN109194585B (en) 2022-05-10

Family

ID=64943941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811260316.9A Active CN109194585B (en) 2018-10-26 2018-10-26 Message forwarding method and network equipment

Country Status (1)

Country Link
CN (1) CN109194585B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109873776B (en) * 2019-01-30 2021-06-29 新华三技术有限公司 Multicast message load sharing balancing method and device
CN113472701B (en) * 2020-03-31 2023-10-10 深圳市中兴微电子技术有限公司 Processing method, device, equipment and storage medium of route information
CN111404829B (en) * 2020-04-17 2024-02-27 杭州迪普科技股份有限公司 Port aggregation method, device, equipment and storage medium
CN112751791B (en) * 2020-12-30 2022-05-17 迈普通信技术股份有限公司 Message forwarding and information processing method and device, electronic equipment and storage medium
CN113612590B (en) * 2021-08-20 2023-10-24 锐捷网络股份有限公司 Self-adaptive adjustment method and device based on change of exchange board card

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7274694B1 (en) * 2003-01-09 2007-09-25 Cisco Technology, Inc. Defining link aggregation across a stack
CN102137025A (en) * 2011-04-20 2011-07-27 福建星网锐捷网络有限公司 Method and device for forwarding messages and switch chip
CN105577562A (en) * 2014-10-17 2016-05-11 中兴通讯股份有限公司 Service data flow sending and forwarding methods and service data flow sending and forwarding devices
CN105827495A (en) * 2016-01-05 2016-08-03 杭州华三通信技术有限公司 Message forwarding method and device for VXLAN gateway
CN107465632A (en) * 2017-08-07 2017-12-12 杭州迪普科技股份有限公司 A kind of method and device for the flow for switching polymerization member port
CN107733695A (en) * 2017-09-25 2018-02-23 新华三技术有限公司 A kind of VXLAN tunnels optimization method and device during ISSU
CN108092922A (en) * 2017-12-19 2018-05-29 杭州迪普科技股份有限公司 A kind of method and apparatus of interface board transmitting message
CN108173753A (en) * 2017-12-28 2018-06-15 迈普通信技术股份有限公司 Message forwarding method, switching card, service card and distribution switch
CN108683615A (en) * 2018-04-28 2018-10-19 新华三技术有限公司 Message diversion method, device and shunting interchanger

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7274694B1 (en) * 2003-01-09 2007-09-25 Cisco Technology, Inc. Defining link aggregation across a stack
CN102137025A (en) * 2011-04-20 2011-07-27 福建星网锐捷网络有限公司 Method and device for forwarding messages and switch chip
CN105577562A (en) * 2014-10-17 2016-05-11 中兴通讯股份有限公司 Service data flow sending and forwarding methods and service data flow sending and forwarding devices
CN105827495A (en) * 2016-01-05 2016-08-03 杭州华三通信技术有限公司 Message forwarding method and device for VXLAN gateway
CN107465632A (en) * 2017-08-07 2017-12-12 杭州迪普科技股份有限公司 A kind of method and device for the flow for switching polymerization member port
CN107733695A (en) * 2017-09-25 2018-02-23 新华三技术有限公司 A kind of VXLAN tunnels optimization method and device during ISSU
CN108092922A (en) * 2017-12-19 2018-05-29 杭州迪普科技股份有限公司 A kind of method and apparatus of interface board transmitting message
CN108173753A (en) * 2017-12-28 2018-06-15 迈普通信技术股份有限公司 Message forwarding method, switching card, service card and distribution switch
CN108683615A (en) * 2018-04-28 2018-10-19 新华三技术有限公司 Message diversion method, device and shunting interchanger

Also Published As

Publication number Publication date
CN109194585A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN109194585B (en) Message forwarding method and network equipment
US9742667B2 (en) Packet processing method, device and system
US9455916B2 (en) Method and system for changing path and controller thereof
CN108632099B (en) Fault detection method and device for link aggregation
CN103152210B (en) Repair method and the stack equipment of Spanning-Tree Protocol forwarding state exception
CN108306824B (en) Message sending method and device
US10803004B2 (en) Modular UPS system and data transmission method for power device
CN110912815B (en) Network element ring formation preventing method, device, equipment and readable storage medium
CN112491700A (en) Network path adjusting method, system, device, electronic equipment and storage medium
US11374851B2 (en) Methods and apparatus for controlling and making link bundle advertisements to support routing decisions
CN112311674B (en) Message sending method, device and storage medium
US8886913B2 (en) Apparatus and method for identifier management
CN106170955A (en) A kind of flow control methods and system
CN107534575A (en) Monitoring method, supervising device and network node under a kind of network virtualization environment
US8724518B2 (en) Communication system, node, terminal, program and communication method
CN109104319B (en) Data storage device and method
EP3258654B1 (en) Method and system for reducing pim protocol dr change
EP2953299A1 (en) Protection switching method, system and node
CN112311671B (en) Method, apparatus, medium and device for issuing aggregated link configuration to switch chip
CN112367261B (en) Message forwarding method and device and distributed equipment
CN109462639B (en) Port expansion equipment management method and device
CN116132299A (en) Processing method and device
CN107113244B (en) Data forwarding method, device and system
CN114615213B (en) Method and system for implementing multi-network link interface based on message queue
CN116319624B (en) Message processing method, device, equipment and storage medium

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