CN109873776B - Multicast message load sharing balancing method and device - Google Patents

Multicast message load sharing balancing method and device Download PDF

Info

Publication number
CN109873776B
CN109873776B CN201910091602.5A CN201910091602A CN109873776B CN 109873776 B CN109873776 B CN 109873776B CN 201910091602 A CN201910091602 A CN 201910091602A CN 109873776 B CN109873776 B CN 109873776B
Authority
CN
China
Prior art keywords
port
lbn
multicast
ports
interface board
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
CN201910091602.5A
Other languages
Chinese (zh)
Other versions
CN109873776A (en
Inventor
项学锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201910091602.5A priority Critical patent/CN109873776B/en
Publication of CN109873776A publication Critical patent/CN109873776A/en
Application granted granted Critical
Publication of CN109873776B publication Critical patent/CN109873776B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a balancing method and a device for multicast message load sharing, so that when a switch receives a multicast message through a first port on a local access interface board, a specified LBN which is distributed for the first port is carried in the multicast message and is sent to a local output interface board; and receiving the multicast message through a second port on the local output interface board, determining a third port for forwarding the received multicast message according to the designated LBN carried by the received multicast message, and then deleting the designated LBN from the received multicast message and forwarding through the third port. Therefore, the invention can use LBN to replace the message characteristic of the multicast message for load sharing, thereby utilizing the outlet bandwidth on the outlet interface board with the maximum efficiency and ensuring the load sharing balance at the outlet.

Description

Multicast message load sharing balancing method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for balancing multicast packet load sharing.
Background
In the current distributed switch, the incoming interface board and the outgoing interface board are both composed of a plurality of line card boards, and after entering from the incoming interface board, the flow is forwarded to each outgoing line card board with the outgoing interface board through the inter-board channel of the switch board.
Aiming at the forwarding of multicast messages in a video monitoring scene, a multicast port group is usually set on an access interface board, so that a plurality of member ports of the multicast port group receive an upstream multicast message; the output interface board is usually provided with a aggregation port group, the multicast message is usually hash-calculated according to the traffic characteristics, and then an output port in the aggregation port group is selected to be forwarded according to the hash result.
However, in the method for hash load sharing by using traffic characteristics, for example, when hash calculation is performed according to characteristics such as an IP address of a multicast packet or quintuple information, a calculation result may seriously depend on a change condition of the multicast packet, and a balance degree of a load sharing result may not be controlled. The imbalance of the load can cause congestion and packet loss of a link, thereby affecting the user experience of the very important service of multicast video.
At present, some chip manufacturers provide technologies capable of realizing relative load balancing, such as DLB, DBM, and the like, but all are effective only for unicast messages, and for a multicast load sharing balancing method, no optimization scheme exists in the chip manufacturers at present.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for balancing multicast packet load sharing, so as to avoid the problem of unbalanced load sharing of multicast packets at an aggregation output port.
Specifically, the invention is realized by the following technical scheme:
the invention provides a balancing method for multicast message load sharing, which is applied to a switch and comprises the following steps:
receiving a multicast message through a first port on a local access interface board, carrying a specified LBN (local binary network) distributed for the first port in the multicast message and sending the multicast message to the local access interface board;
receiving a multicast message through a second port on a local output interface board, determining a third port for forwarding the received multicast message according to a designated LBN carried by the received multicast message, deleting the designated LBN from the received multicast message, and forwarding through the third port.
As an embodiment, the method further comprises:
pre-creating a multicast port group for receiving the multicast message, wherein member ports of the multicast port group comprise the first port;
distributing the designated LBN for the member ports of the multicast port group according to a first rule;
according to a second rule, distributing a designated LBN for a non-member port of the multicast port group on the incoming interface board;
so that different ports on the incoming interface board correspond to different specified LBNs.
As an embodiment, allocating the LBN to the member port of the multicast port group according to a first rule includes:
and acquiring default LBNs which have the same number as the member ports and are continuous in number from default LBNs corresponding to the ports on the access interface board to replace the original default LBNs of the member ports to serve as the designated LBNs of the member ports.
As an embodiment, allocating an LBN to a non-member port of the multicast port group on the ingress interface board according to a second rule includes:
if the default LBN corresponding to the non-member port is not occupied by the member port, taking the default LBN corresponding to the non-member port as the designated LBN of the non-member port;
and if the default LBN corresponding to the non-member port is occupied by the member port, taking the original default LBN of the released member port as the designated LBN of the non-member port.
As an embodiment, determining a third port for forwarding a received multicast packet according to a specified LBN carried by the received multicast packet includes:
according to a designated LBN carried by a received multicast message, acquiring an output port position which is identified by a bit and corresponds to the designated LBN from a broadcast mask table which is created on the output port plate in advance;
and determining a bit where a preset bit value is located from the output port position, and taking an output port corresponding to the bit as the third port.
Based on the same conception, the invention also provides a balancing device for multicast message load sharing, which is applied to the switch and comprises:
a receiving unit, configured to receive a multicast packet through a first port on a local ingress interface board, carry a specified LBN allocated to the first port in the multicast packet, and send the multicast packet to the local egress interface board;
and the forwarding unit is used for receiving the multicast message through a second port on the local outgoing interface board, determining a third port for forwarding the received multicast message according to the specified LBN carried by the received multicast message, deleting the specified LBN from the received multicast message and forwarding the multicast message through the third port.
As an embodiment, the apparatus further comprises:
a creating unit, configured to create a multicast port group for receiving the multicast packet in advance, where a member port of the multicast port group includes the first port;
a first allocating unit, configured to allocate the specified LBN to a member port of the multicast port group according to a first rule;
a second allocating unit, configured to allocate a designated LBN to a non-member port of the multicast port group on the ingress interface board according to a second rule; so that different ports on the incoming interface board correspond to different specified LBNs.
As an embodiment, the first allocating unit is specifically configured to obtain, from default LBNs corresponding to ports on the ingress interface board, default LBNs that are the same as the number of the member ports and have consecutive numbers, as specified LBNs of the member ports, instead of original default LBNs of the member ports.
As an embodiment, the second allocating unit is specifically configured to, if the default LBN corresponding to the non-member port is not occupied by the member port, take the default LBN corresponding to the non-member port as a specified LBN of the non-member port; and if the default LBN corresponding to the non-member port is occupied by the member port, taking the original default LBN of the released member port as the designated LBN of the non-member port.
As an embodiment, the forwarding unit is specifically configured to obtain, according to a specified LBN carried by a received multicast packet, an egress port position identified by a bit corresponding to the specified LBN from a broadcast mask table created in advance on the egress interface board; and determining a bit where a preset bit value is located from the output port position, and taking an output port corresponding to the bit as the third port.
Based on the same concept, the present disclosure further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any step of the balancing method for multicast packet load sharing.
Therefore, the invention can make the exchanger carry the appointed LBN distributed for the first port in the multicast message and send to the local outlet interface board when the exchanger receives the multicast message through the first port on the local inlet interface board; and receiving the multicast message through a second port on the local output interface board, determining a third port for forwarding the received multicast message according to the designated LBN carried by the received multicast message, and then deleting the designated LBN from the received multicast message and forwarding through the third port. Compared with the prior art, the invention can realize the load sharing on the outgoing interface board through the appointed LBN carried by the multicast message instead of the message characteristic by multiplexing the appointed LBN configured on the upper port of the incoming interface board, thereby avoiding the process of analyzing the message characteristic and shortening the forwarding time; meanwhile, the invention can also realize the purpose of uniform distribution of load sharing on the output ports by distributing the appointed output ports for the multicast message of the appointed LBN, thereby improving the utilization rate of the bandwidth resources of the output ports.
Drawings
Fig. 1 is a schematic diagram of a distributed switch in the prior art;
fig. 2 is a flowchart illustrating a method for balancing multicast message load sharing according to an exemplary embodiment of the present invention;
FIG. 3 is a schematic diagram of an application of a distributed switch in an exemplary embodiment of the invention;
FIG. 4 is a schematic illustration of a broadcast mask table in an exemplary embodiment of the invention;
fig. 5 is a logical structure diagram of a balancing apparatus for multicast packet load sharing in an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, a schematic structural diagram of a distributed switch is shown, in which the distributed switch 10 includes an ingress interface board 11, an egress interface board 12, and a switch board 13 for providing inter-board channels for the ingress and egress interface boards; the inlet interface board 11 and the outlet interface board 12 are distributed with a plurality of line card boards, and each line card board is provided with a plurality of ports for receiving and transmitting flow data. Usually, each port on the ingress interface board 11 is preconfigured with a default LBN (load balancing number) value, which is used to share the traffic of different ports to different inter-board channels for transmission. The specific allocation method can calculate the hash value of the default LBN through a hash algorithm, so that the corresponding transmission channel is determined according to the hash value. In the conventional switch, taking the diagram of fig. 1 as an example, assuming that an incoming interface board 11 has 4 line card boards, and 3 HG ports are provided from an exchange board 13 to each line card board, a total of 12 HG ports are provided from the exchange board 13 to the 4 line card boards of the incoming interface board 11, and 24 ports are provided from each line card board of the incoming interface board 11 as 6 ports. In an initial state, each port has a corresponding default LBN, for example, the default LBN of port 1 is 0, the default LBN of port 2 is 1, and so on, the default LBN of port 24 is 23, 24 ports share on 12 HG links through the default LBN, then every two ports correspond to one HG port, for example, port 1 and port 13 correspond to HG0 ports, port 2 and port 14 correspond to HG1 ports, and so on, port 13 and port 24 correspond to HG12 ports.
In an application scenario of video monitoring, generally, an access interface board 11 configures a corresponding access multicast port group (hereinafter referred to as a multicast port group) for receiving an uplink multicast packet in advance for a multicast service, where rates of member ports in the multicast port group are consistent, and the member ports may be distributed on a plurality of line card boards; the outgoing interface board 12 configures an uplink multicast aggregation port group (hereinafter referred to as an aggregation port group) in advance, where member ports in the aggregation port group may be distributed on different line card boards, and the rates of each member port are consistent, and because the current application environment is a video monitoring application, multicast packets received by member ports of different multicast port groups may be aggregated in the aggregation port group, which results in a large upstream traffic of the switch, and therefore the rates of the member ports of the aggregation port group generally need to be greater than or equal to the rates of the member ports in the multicast port group, for example, if the rates of the member ports in the multicast port group are 10G, the rates of the member ports in the aggregation port group may be 40G or 100G.
At present, for multicast message forwarding of video monitoring, hash calculation is usually performed according to multicast message characteristics, and then an output port in a aggregation port group is selected for forwarding according to a hash result, but a hash load sharing method is performed according to flow characteristics, a calculation result can seriously depend on the change condition of the multicast message, the balance degree of the load sharing result cannot be controlled, and particularly, under the condition that the multicast messages are few, the sharing result cannot be relatively balanced, so that congestion of some output ports is easily caused, and some output ports are relatively idle.
In order to solve the problems existing in the prior art, the invention provides a method and a device for balancing multicast message load sharing, which can enable a switch to carry a specified LBN allocated to a first port in a multicast message and send the LBN to a local outgoing interface board when the switch receives the multicast message through the first port on the local incoming interface board; and receiving the multicast message through a second port on the local output interface board, determining a third port for forwarding the received multicast message according to the designated LBN carried by the received multicast message, and then deleting the designated LBN from the received multicast message and forwarding through the third port. Compared with the prior art, the invention can realize the load sharing on the outgoing interface board through the appointed LBN carried by the multicast message instead of the message characteristic by multiplexing the appointed LBN configured on the upper port of the incoming interface board, thereby avoiding the process of analyzing the message characteristic and shortening the forwarding time; meanwhile, the invention can also realize the purpose of uniform distribution of load sharing on the output ports by distributing the appointed output ports for the multicast message of the appointed LBN, thereby improving the utilization rate of the bandwidth resources of the output ports.
Referring to fig. 2, a flowchart of a method for balancing multicast message load sharing according to an exemplary embodiment of the present invention is shown, where the method is applied to a switch, and the method includes:
step 201, receiving a multicast message through a first port on a local ingress interface board, carrying a specified LBN allocated to the first port in the multicast message, and sending the multicast message to the local egress interface board;
in this embodiment, in order to receive a multicast packet, a multicast port group for receiving the multicast packet may be created in advance in an initialization stage according to application scenario requirements, where member ports of the multicast port group include the first port; then distributing the designated LBN for the member ports of the multicast port group according to a first rule; according to a second rule, distributing a designated LBN for a non-member port of the multicast port group on the incoming interface board; different ports on the input interface board correspond to different specified LBNs, and because different specified LBNs correspond to different inter-board channels, multicast messages of different member ports can be ensured to be sent to the output interface board from different inter-board channels.
As an embodiment, the assigning the designated LBN to the member port of the multicast port group according to the first rule is specifically to obtain, from default LBNs corresponding to ports on the ingress interface board, default LBNs that are the same in number as the member ports and consecutive in number instead of the original default LBNs of the member ports, as the designated LBNs of the member ports.
For example, referring to fig. 3, assume that a multicast port group is configured on LC1, LC2, LC3, including ports 3,5,7 on LC 1; ports 1,2,9,13 on LC2 and ingress interfaces 6,8,12,17,21 on LC3, which are then member ports of the multicast port group; in the initial configuration stage, the LBN allocation setting may be performed again on the member ports of the multicast port group according to the order of the slot numbers from small to large, and global continuous LBN allocation is performed on the member ports, and because the total 12 member ports are obtained, the default LBN is 0 to 11, which is used as the designated LBN of the member port, specifically as follows:
LC1[3,5,7] - > specifies LBN [0,1,2 ];
LC2[1,2,9,13] - > specifies LBN [3,4,5,6 ];
LC3[6,8,12,17,21] - > specifies LBN [7,8,9,10,11 ];
because the slot positions of the member ports are not continuous, and the corresponding default LBNs are not continuous, the invention can ensure that a uniform hash result can be obtained as much as possible when the hash is carried out on the outgoing interface board according to the specified LBNs by setting continuous specified LBN values for the member ports.
Because the default LBNs are set before the member ports, now after the specified LBNs are set for the member ports, the present invention explains that the default LBNs of the non-member ports on the incoming interface board may be occupied by the member ports, so that the default LBNs corresponding to the non-member ports on the incoming interface board can be further adjusted according to the specified LBNs allocated for the member ports, so that each port corresponds to a different LBN.
As an embodiment, an LBN may be assigned to a non-member port of the multicast port group on the ingress interface board according to a second rule, specifically, if a default LBN corresponding to the non-member port is not occupied by the member port, the default LBN corresponding to the non-member port is used as a designated LBN of the non-member port; and if the default LBN corresponding to the non-member port is occupied by the member port, taking the original default LBN of the released member port as the designated LBN of the non-member port.
Taking the LC1 cable card board in fig. 3 as an example, assuming that the cable card board is a 12-port 10G port, the default LBN corresponding to each port is specifically:
LC1[1,2,3,4,5,6,7,8,9,10,11,12] - > Default LBN [0,1,2,3,4,5,6,7,8,9,10,11]
When the member port 3,5,7 is assigned the designated LBN0, 1,2, then the default LBN of the non-member port 1,2, 4,6, 8,9,10,11,12 corresponding to the designated LBN0, 1,2 is occupied, and then readjustment is needed; since LBN0, 1,2 has been assigned to multicast port group member port 3,5,7, while the default LBN of member port 3,5,7 is 2,4,6 is released, the released default LBN2, 4,6 can be assigned to this non-member port LC1[1,2,3] as the designated LBN, the result of the reassignment is as follows:
LC1[1,2,3] - > specifies LBN [2,4,6 ];
because the invention can only change the default LBN of the non-member port of the occupied LBN, the default LBNs of other non-member ports are kept unchanged, thereby ensuring that the default LBNs of the ports are changed as little as possible, setting all the LBNs of the board can be ensured, and the load balance of the exchange board can be ensured;
similarly, for LC2, the assignment is made as follows:
LC2[4,5,6,7] - > specifies LBN [0,1,8,12 ];
it should be noted that, if there is a designated LBN that is itself the default LBN of one of the member ports, taking LC3 as an example, when a member port of the board is assigned with the designated LBN, for example, port 8 in LC3 has its default LBN7, and its corresponding designated LBN is also 7, thus it is described that a port with default LBN of 7 is unoccupied, when a designated LBN is assigned to a non-member port, this port (port 8) needs to be removed, so for LC3, the following assignment is made:
LC3[9,10,11,12] - > specifies LBN [5,11,16,20 ];
according to the LBN setting and adjusting principle, it may occur on a certain line card board that the assigned LBN is greater than the number of ports of the board, for example, if there is another access line card board LC6 with a total of 6 ports, the default LBN corresponding to the ports 1 to 6 is 0 to 5, and the ports 5 and 6 are set as member ports, then the rule of assigning the assigned LBNs of the member ports is continued:
the new LC6[5,6] - > specifies LBN [12,13 ];
since 12 HG ports of the switch board are provided, and the LBNs assigned to the line card board LC6 are 12,13, respectively, and are greater than the number of allocated HG ports, a round-robin method may be adopted, such that the LBNs assigned to the line card board LC6 are 12,13 correspond to the HG ports 1 and 2, respectively, and thus, the member ports 5 and 6 on the LC6 occupy the resources of the default LBNs corresponding to the non-member ports 2 and 3 of the line card board LC6 and the HG ports, respectively, and the LBNs assigned to the non-member ports 2 and 3 may be configured as the default LBNs 4 and 5 released by the member ports 5 and 6, and the configuration result is:
LC6[2,3] - > specifies LBN [4,5 ].
When the configuration of the member port of the subsequent multicast port group is changed, the LBNs corresponding to the member port and the non-member port are correspondingly adjusted according to the above principle.
By this, the initialization setting process of the port is ended.
Therefore, when receiving a multicast packet through a first port on a local ingress interface board, a specified LBN allocated to the first port may be carried in the multicast packet, for example, the specified LBN may be added to a descriptor of a multicast packet encapsulation, and then the multicast packet is sent to an aggregation port group of the egress interface board through an inter-board channel corresponding to the specified LBN on a switch board.
Step 202, receiving a multicast packet through a second port on a local egress interface board, determining a third port for forwarding the received multicast packet according to a designated LBN carried by the received multicast packet, deleting the designated LBN from the received multicast packet, and forwarding the multicast packet through the third port.
In this embodiment, the switch may receive a multicast packet through a second port on a local egress interface board, and determine a third port for forwarding the received multicast packet according to a specified LBN carried by the received multicast packet, specifically, may obtain, according to the specified LBN carried by the received multicast packet, an egress port position identified by a bit corresponding to the specified LBN from a broadcast mask table created in advance on the egress interface board; and determining a bit position where a preset bit value is located from the output port position, taking the output port corresponding to the bit position as a third port for forwarding the multicast message, deleting the specified LBN from the received multicast message after determining the third port, and forwarding the multicast message through the third port.
For example, suppose that aggregation port groups for receiving the uplink multicast packets are configured on the line card LC4 and LC5, where the aggregation port groups include ports 2,4, 5, and 6 on LC 4; ports 7,8 on LC 5; fig. 4 shows the broadcast mask table set according to the aggregation port group, where the left side is a broadcast mask table corresponding to LC4, and the right side is a broadcast mask table corresponding to LC5, where the broadcast mask table is a global table and includes setting conditions of all ports in a line card board, the left side of the table is LBN, the right side is an egress port position, the egress port position includes all physical ports of the board, and if a bit of each physical port is set to 1, it indicates that egress from the port is not allowed; if set to 0, this indicates that egress from this port is allowed. Therefore, in the initialization stage, configuration is performed in the broadcast mask table of the egress interface board according to the number of member ports of the ingress interface board and the configuration condition of the corresponding designated LBN, so as to ensure that multicast messages of the member ports of the ingress interface board are forwarded by a designated unique egress port.
For example, referring to fig. 3 and 4, since there are 12 member ports in the multicast port group, the corresponding designated LBNs are 0 to 11, respectively, and the member ports in the aggregate port group including member ports 2,4, 5,6 on LC4 and member ports on LC5 include 7, 8; then the broadcast mask table is configured to include the specified LBNs and to assign different egress ports for different specified LBNs, each egress port has only a unique egress port location in the two broadcast mask tables of LC4 and LC 5. For example, a port whose designated LBN is 0 may be configured with a corresponding egress port as port 2 on LC4, and then the corresponding broadcast mask table is the broadcast mask table on LC4, where the bit of the egress port position corresponding to LBN of 0 is "111111111101", and since the bit of the 2 nd bit from last is set to 0, it indicates that port 2 of LC4 may be an egress port carrying a multicast packet whose designated LBN is 0; even if there is an egress port location with LBN of 0 in the broadcast mask table of LC5, in order to ensure the principle that only one egress port forwards globally, the egress port location of LC5 is "111111111111111", which indicates that there is no available egress port. If the designated LBN of the member port in the subsequent multicast port group changes or the member port of the aggregation port group changes, the broadcast mask table can be adaptively adjusted, so that the global uniqueness of the output port is ensured.
Compared with the prior art, the invention ensures that the multicast message entering the member port can be sent out from the only appointed output port of the aggregation port group through the reasonable planning and setting of the appointed LBN of the member port of the multicast end group, so the load sharing of the hash is carried out by replacing the LBN according to the message characteristics, the multicast message of the aggregation port group can be finally ensured to maximally utilize the uplink bandwidth, and the problem of unbalanced load sharing is avoided; and the characteristics of the incoming multicast message are not required to be relied on, so that the flow characteristics are not required to be analyzed, and the flow forwarding rate can be improved.
In order to make the objects, technical solutions and advantages of the present invention more clearly understood, the following takes the multicast packet load sharing method in the video monitoring application scenario as an example, and further details the solution of the present invention are described with reference to fig. 1, fig. 3 and fig. 4.
Referring to fig. 3, it is assumed that an access multicast port group is configured on LC1, LC2, and LC3, including ports 3,5, and 7 on LC 1; ports 1,2,9,13 on LC 2; ports 6,8,12,17,21 on LC 3; LC4 and LC5 are provided with a cascade aggregation port group which comprises ports 2,4, 5 and 6 on LC 4; ports 7,8 on LC 5.
In the initial configuration stage, for the multicast port group member ports, the LBN allocation setting can be performed again according to the order of the slot numbers from small to large, and the member ports are allocated with LBNs which are specified globally and continuously, wherein the LBNs are 0 to 11 if 12 ports are available in total; the method comprises the following specific steps:
LC1[3,5,7] - > specifies LBN [0,1,2]
LC2[1,2,9,13] - > specifies LBN [3,4,5,6]
LC3[6,8,12,17,21] - > specifies LBN [7,8,9,10,11]
For LC1, LC2, and the default LBN corresponding to the non-member port on LC3 also need to be adjusted accordingly, and the adjustment result is:
LC1[1,2,3] - > Default LBN changed to [2,4,6 ];
LC2[4,5,6,7] - > default LBN changed to [0,1,8,12 ];
LC3[9,10,11,12] - > Default LBN is changed to [5,11,16,20 ].
Assume that a group of aggregation ports is configured on line cards LC4 and LC5, including ports 2,4, 5,6 on LC 4; ports 7,8 on LC 5; as shown in fig. 4, the broadcast mask table set according to the aggregation port group includes a broadcast mask table corresponding to LC4 on the left, a broadcast mask table corresponding to LC5 on the right, and a total of 6 egress ports, where each two member ports correspond to one egress interface because the multicast port group includes 12 member ports, and are divided according to a specified LBN, and the result is:
LBNs 0 and 6 are designated to correspond to egress port 2 of LC 4;
LBNs 1 and 7 are designated to correspond to egress port 4 of LC 4;
LBNs 2 and 8 are designated to correspond to egress port 5 of LC 4;
LBNs 3 and 9 are designated to correspond to egress port 6 of LC 4;
LBNs 4 and 10 are designated to correspond to egress port 7 of LC 5;
LBNs 5 and 11 are designated to correspond to egress port 8 of LC 4;
a broadcast mask table is configured according to the above result, as shown in fig. 4, where each LBN uniquely corresponds to one available egress port.
When the member ports ( ports 3,5,7 in LC1 and port 9 in LC 2) on the ingress interface board receive the multicast packets with the same packet characteristics, the specified LBN configured for these ports at initialization time can be added to the descriptors of the multicast packets of the member ports. Wherein, the designated LBNs carried by the forwarded multicast messages of the ports 3,5,7 in the LC1 and the port 9 in the LC2 are 0,1,2, and 5, respectively.
The exchange board transmits the multicast messages from the incoming interface board to the outgoing interface board according to the inter-board channel corresponding to the specified LBN.
After receiving the multicast message, LC4 and LC5 on the outgoing interface board search the corresponding outgoing port position from the broadcast mask table according to the specified LBN in the descriptor carried by the multicast message, thereby determining the globally unique outgoing port corresponding to the multicast message for forwarding.
Wherein, the specified LBN is 0,1,2, 5, and the corresponding egress port positions in the broadcast mask table are respectively:
designating LBN0 to correspond to egress port 2 of LC 4;
designating LBN1 to correspond to egress port 4 of LC 4;
designating LBN2 to correspond to egress port 5 of LC 4;
designating LBN5 to correspond to egress port 8 of LC 4;
therefore, the multicast packet is finally forwarded through the egress ports 2,4, 5 of the LC4 and the egress port 8 of the LC5, respectively, and the forwarding process is shown by the curved arrow in fig. 3.
If the existing technology is adopted, hash is carried out according to the message characteristics of the multicast messages, and because the message characteristics of the multicast messages are the same, the result of hash carried out by the outgoing interface board is likely to be that the multicast messages are all distributed to the same outgoing port for forwarding, so that one outgoing port is congested, and other outgoing ports are idle; the output interface board of the invention does not calculate the hash value according to the message characteristics any more, but carries out the hash according to the appointed LBN in the descriptor carried by the multicast message, and the appointed LBNs of different multicast messages are different, so the corresponding output ports are also different, thereby ensuring that the load balance can be still realized under the condition of less multicast messages, avoiding the condition of aggregation port blockage or idleness, and improving the utilization rate of the ports.
Based on the same conception, the invention also provides a balancing device for multicast message load sharing, which can be realized by software, or by hardware or a combination of the software and the hardware. Taking software implementation as an example, the balancing device for multicast message load sharing of the present invention is a device in a logical sense, and is operated after a CPU of the device reads a corresponding computer program instruction in a memory.
Referring to fig. 5, a multicast message load sharing balancing apparatus 500 according to an exemplary embodiment of the present invention is applied to a switch, and the basic operating environment of the apparatus includes a CPU, a memory, and other hardware, and from a logical aspect, the logical structure of the apparatus 500 is as shown in fig. 5, where:
a receiving unit 501, configured to receive a multicast packet through a first port on a local ingress interface board, carry a specified LBN allocated to the first port in the multicast packet, and send the multicast packet to the local egress interface board;
a forwarding unit 502, configured to receive a multicast packet through a second port on a local egress interface board, determine a third port for forwarding the received multicast packet according to a specified LBN carried by the received multicast packet, delete the specified LBN from the received multicast packet, and forward the multicast packet through the third port.
As an embodiment, the apparatus further comprises:
a creating unit 503, configured to create a multicast port group for receiving the multicast packet in advance, where a member port of the multicast port group includes the first port;
a first allocating unit 504, configured to allocate the specified LBN to the member ports of the multicast port group according to a first rule;
a second allocating unit 505, configured to allocate a specified LBN to a non-member port of the multicast port group on the ingress interface board according to a second rule; so that different ports on the incoming interface board correspond to different specified LBNs.
As an embodiment, the first allocating unit 504 is specifically configured to obtain, from default LBNs corresponding to ports on the ingress interface board, default LBNs that are the same as the number of the member ports and have consecutive numbers, as specified LBNs of the member ports, instead of original default LBNs of the member ports.
As an embodiment, the second allocating unit 505 is specifically configured to, if the default LBN corresponding to the non-member port is not occupied by the member port, take the default LBN corresponding to the non-member port as the specified LBN of the non-member port; and if the default LBN corresponding to the non-member port is occupied by the member port, taking the original default LBN of the released member port as the designated LBN of the non-member port.
As an embodiment, the forwarding unit 502 is specifically configured to obtain, according to a specified LBN carried by a received multicast packet, an egress port position identified by a bit corresponding to the specified LBN from a broadcast mask table created in advance on the egress interface board; and determining a bit where a preset bit value is located from the output port position, and taking an output port corresponding to the bit as the third port.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
Based on the same concept, the present disclosure further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any step of the balancing method for multicast packet load sharing provided in the embodiment of the present disclosure.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments of the computer-readable storage medium, since it is substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
In summary, the present invention enables a switch to carry a specified LBN allocated to a first port in a multicast packet and send the LBN to a local egress interface board when the switch receives the multicast packet through the first port on the local ingress interface board; and receiving the multicast message through a second port on the local output interface board, determining a third port for forwarding the received multicast message according to the designated LBN carried by the received multicast message, and then deleting the designated LBN from the received multicast message and forwarding through the third port. Compared with the prior art, the invention can realize the load sharing on the outgoing interface board through the appointed LBN carried by the multicast message instead of the message characteristic by multiplexing the appointed LBN configured on the upper port of the incoming interface board, thereby avoiding the process of analyzing the message characteristic and shortening the forwarding time; meanwhile, the invention can also realize the purpose of uniform distribution of load sharing on the output ports by distributing the appointed output ports for the multicast message of the appointed LBN, thereby improving the utilization rate of the bandwidth resources of the output ports.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for balancing multicast message load sharing is applied to a switch, and the method comprises the following steps:
receiving a multicast message through a first port on a local access interface board, carrying a specified load balancing number LBN which is distributed for the first port in the multicast message and sending the multicast message to the local access interface board, wherein different ports on the access interface board correspond to different specified LBNs;
receiving a multicast message through a second port on a local output interface board, determining a third port for forwarding the received multicast message according to a designated LBN carried by the received multicast message, deleting the designated LBN from the received multicast message and forwarding through the third port, wherein different designated LBNs correspond to different third ports.
2. The method of claim 1, further comprising:
pre-creating a multicast port group for receiving the multicast message, wherein member ports of the multicast port group comprise the first port;
distributing the designated LBN for the member ports of the multicast port group according to a first rule;
according to a second rule, distributing a designated LBN for a non-member port of the multicast port group on the incoming interface board;
so that different ports on the incoming interface board correspond to different specified LBNs.
3. The method of claim 2, wherein assigning the LBN to the member port of the multicast port group according to a first rule comprises:
and acquiring default LBNs which have the same number as the member ports and are continuous in number from default LBNs corresponding to the ports on the access interface board to replace the original default LBNs of the member ports to serve as the designated LBNs of the member ports.
4. The method of claim 2, wherein assigning an LBN to a non-member port of the multicast port group on the ingress interface board according to a second rule comprises:
if the default LBN corresponding to the non-member port is not occupied by the member port, taking the default LBN corresponding to the non-member port as the designated LBN of the non-member port;
and if the default LBN corresponding to the non-member port is occupied by the member port, taking the original default LBN of the released member port as the designated LBN of the non-member port.
5. The method of claim 1, wherein determining a third port for forwarding the received multicast packet according to a specified LBN carried by the received multicast packet comprises:
according to a designated LBN carried by a received multicast message, acquiring an output port position which is identified by a bit and corresponds to the designated LBN from a broadcast mask table which is created on the output port plate in advance;
and determining a bit where a preset bit value is located from the output port position, and taking an output port corresponding to the bit as the third port.
6. An apparatus for balancing multicast message load sharing, the apparatus being applied to a switch, the apparatus comprising:
a receiving unit, configured to receive a multicast packet through a first port on a local ingress interface board, carry a specified load balancing number LBN allocated to the first port in the multicast packet, and send the multicast packet to the local egress interface board, where different ports on the ingress interface board correspond to different specified LBNs;
and the forwarding unit is used for receiving the multicast message through a second port on the local outgoing interface board, determining a third port for forwarding the received multicast message according to a designated LBN carried by the received multicast message, deleting the designated LBN from the received multicast message and forwarding the multicast message through the third port, wherein different designated LBNs correspond to different third ports.
7. The apparatus of claim 6, further comprising:
a creating unit, configured to create a multicast port group for receiving the multicast packet in advance, where a member port of the multicast port group includes the first port;
a first allocating unit, configured to allocate the specified LBN to a member port of the multicast port group according to a first rule;
a second allocating unit, configured to allocate a designated LBN to a non-member port of the multicast port group on the ingress interface board according to a second rule; so that different ports on the incoming interface board correspond to different specified LBNs.
8. The apparatus of claim 7,
the first allocation unit is specifically configured to obtain, from default LBNs corresponding to ports on the ingress interface board, default LBNs that are the same in number as the member ports and have consecutive numbers, as designated LBNs of the member ports, instead of original default LBNs of the member ports.
9. The apparatus of claim 7,
the second allocating unit is specifically configured to, if the default LBN corresponding to the non-member port is not occupied by the member port, take the default LBN corresponding to the non-member port as a specified LBN of the non-member port; and if the default LBN corresponding to the non-member port is occupied by the member port, taking the original default LBN of the released member port as the designated LBN of the non-member port.
10. The apparatus of claim 6,
the forwarding unit is specifically configured to obtain, according to a specified LBN carried by a received multicast packet, an egress port position identified by a bit corresponding to the specified LBN from a broadcast mask table created in advance on the egress interface board; and determining a bit where a preset bit value is located from the output port position, and taking an output port corresponding to the bit as the third port.
CN201910091602.5A 2019-01-30 2019-01-30 Multicast message load sharing balancing method and device Active CN109873776B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910091602.5A CN109873776B (en) 2019-01-30 2019-01-30 Multicast message load sharing balancing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910091602.5A CN109873776B (en) 2019-01-30 2019-01-30 Multicast message load sharing balancing method and device

Publications (2)

Publication Number Publication Date
CN109873776A CN109873776A (en) 2019-06-11
CN109873776B true CN109873776B (en) 2021-06-29

Family

ID=66918421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910091602.5A Active CN109873776B (en) 2019-01-30 2019-01-30 Multicast message load sharing balancing method and device

Country Status (1)

Country Link
CN (1) CN109873776B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111010343B (en) * 2019-12-18 2022-01-11 锐捷网络股份有限公司 Method, device, network equipment and storage medium for forwarding multicast message
CN111404829B (en) * 2020-04-17 2024-02-27 杭州迪普科技股份有限公司 Port aggregation method, device, equipment and storage medium
CN114430403B (en) * 2022-04-07 2022-06-17 湖南戎腾网络科技有限公司 Addressing method and device between board cards and computer equipment
CN115037565B (en) * 2022-06-02 2023-12-12 北京东土军悦科技有限公司 Multicast data forwarding method, device, network equipment, storage medium and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338152A (en) * 2013-05-24 2013-10-02 杭州华三通信技术有限公司 Multicast message forwarding method and main control board
CN105763472A (en) * 2014-12-18 2016-07-13 中兴通讯股份有限公司 Trans-board forwarding method and device
CN106603441A (en) * 2017-01-05 2017-04-26 盛科网络(苏州)有限公司 Multicast message processing method and switch chip in distributed link aggregation network
CN108259328A (en) * 2017-08-30 2018-07-06 新华三技术有限公司 Message forwarding method and device
CN109194585A (en) * 2018-10-26 2019-01-11 新华三技术有限公司合肥分公司 Message forwarding method and the network equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699789B (en) * 2009-09-25 2011-11-23 江苏华丽网络工程有限公司 Design method of Ethernet device stack system
CN103428101A (en) * 2013-08-01 2013-12-04 华为技术有限公司 Load sharing method and device
CN109104376B (en) * 2018-07-16 2022-04-08 新华三技术有限公司 Data forwarding method and device, stacking equipment and computer readable medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338152A (en) * 2013-05-24 2013-10-02 杭州华三通信技术有限公司 Multicast message forwarding method and main control board
CN105763472A (en) * 2014-12-18 2016-07-13 中兴通讯股份有限公司 Trans-board forwarding method and device
EP3236624A1 (en) * 2014-12-18 2017-10-25 ZTE Corporation Cross-board forwarding method and apparatus
CN106603441A (en) * 2017-01-05 2017-04-26 盛科网络(苏州)有限公司 Multicast message processing method and switch chip in distributed link aggregation network
CN108259328A (en) * 2017-08-30 2018-07-06 新华三技术有限公司 Message forwarding method and device
CN109194585A (en) * 2018-10-26 2019-01-11 新华三技术有限公司合肥分公司 Message forwarding method and the network equipment

Also Published As

Publication number Publication date
CN109873776A (en) 2019-06-11

Similar Documents

Publication Publication Date Title
CN109873776B (en) Multicast message load sharing balancing method and device
JP7417825B2 (en) slice-based routing
CN109787921B (en) CDN bandwidth scheduling method, acquisition and scheduling server and storage medium
US10938727B2 (en) Method and device for offloading processing of data flows
US20170048148A1 (en) Method, apparatus, and system for load balancing of service chain
CN109818881B (en) CDN bandwidth scheduling method, acquisition and scheduling server and storage medium
US9590898B2 (en) Method and system to optimize packet exchange between the control and data plane in a software defined network
US11736407B2 (en) Method and apparatus for load balancing and packet re-sequencing on network
US11595315B2 (en) Quality of service in virtual service networks
Wang et al. Implementation of multipath network virtualization with SDN and NFV
CN105122747A (en) Control device and control method in software defined network (sdn)
US10382344B2 (en) Generating and/or receiving at least one packet to facilitate, at least in part, network path establishment
Bruschi et al. Openvolcano: An open-source software platform for fog computing
CN111585896A (en) Data forwarding method and device and readable storage medium
US20170034739A1 (en) Method and device for processing to share network resources, and method, device and system for sharing network resources
SE519475C2 (en) Filtering of IP packets
CN112087382B (en) Service routing method and device
CN114900469B (en) Method, system, equipment and medium for controlling data flow of multi host network card
CN116582493A (en) Data center network link selection method and device and electronic equipment
KR20210016802A (en) Method for optimizing flow table for network service based on server-client in software defined networking environment and sdn switch thereofor
Nithin et al. Efficient load balancing for multicast traffic in data center networks using SDN
KR101541168B1 (en) Route control method for flow of controller in software defined network
CN107113244B (en) Data forwarding method, device and system
JP2019009630A (en) Network load distribution device and method
US9860791B1 (en) Long term evolution communication policies based on explicit congestion notification

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