[go: up one dir, main page]

CN109450819B - Method and system for forwarding broadcast message - Google Patents

Method and system for forwarding broadcast message Download PDF

Info

Publication number
CN109450819B
CN109450819B CN201811246571.8A CN201811246571A CN109450819B CN 109450819 B CN109450819 B CN 109450819B CN 201811246571 A CN201811246571 A CN 201811246571A CN 109450819 B CN109450819 B CN 109450819B
Authority
CN
China
Prior art keywords
vsl
hash value
broadcast
virtual switching
forwarding
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
CN201811246571.8A
Other languages
Chinese (zh)
Other versions
CN109450819A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201811246571.8A priority Critical patent/CN109450819B/en
Publication of CN109450819A publication Critical patent/CN109450819A/en
Application granted granted Critical
Publication of CN109450819B publication Critical patent/CN109450819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/201Multicast operation; Broadcast operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例提供一种广播报文的转发方法及系统。所述方法包括:接收广播报文,计算所述广播报文的哈希值;根据哈希值与虚拟交换链路VSL的映射关系,确定所述广播报文对应的n条虚拟交换链路VSL;根据所述n条虚拟交换链路VSL各自对应的芯片配置的所述哈希值对应的广播过滤表项的转发行为,转发所述广播报文。本发明实施例提供的广播报文的转发方法,通过广播报文的哈希值,利用芯片的广播过滤表项,将广播报文按照哈希值分配到不同的虚拟交换链路中,避开了跨芯片VSL口不能组成物理TRUNK的限制,实现了跨设备广播流按照哈希值进行均衡的目的,减少了虚拟交换链路因广播流量过大导致的丢包,保证了跨设备系统的稳定运行。

Figure 201811246571

Embodiments of the present invention provide a method and system for forwarding broadcast messages. The method includes: receiving a broadcast message, calculating a hash value of the broadcast message; and determining n virtual switching link VSLs corresponding to the broadcast message according to the mapping relationship between the hash value and the virtual switching link VSL ; Forward the broadcast message according to the forwarding behavior of the broadcast filtering table entry corresponding to the hash value configured by the chips corresponding to the n virtual switching link VSLs. The broadcast packet forwarding method provided by the embodiment of the present invention uses the hash value of the broadcast packet and the broadcast filter table entry of the chip to distribute the broadcast packet to different virtual switching links according to the hash value, avoiding the need for It eliminates the limitation that cross-chip VSL ports cannot form physical trunks, realizes the purpose of balancing cross-device broadcast flows according to hash values, reduces the packet loss caused by excessive broadcast traffic on virtual switching links, and ensures the stability of cross-device systems. run.

Figure 201811246571

Description

Method and system for forwarding broadcast message
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a method and a system for forwarding a broadcast message.
Background
A stacking system, i.e. a Virtual Switch Unit (VSU), combines multiple physical Switch devices into one Virtual Switch device through a virtualization technology, and can simplify the configuration complexity of network devices and provide a network with high reliability and high redundancy. The stack port, or HG port, is a type of port used for interconnection between chips. A stack Link, i.e. a Virtual Switch Link (VSL), refers to a Link in a VSU that connects two adjacent physical Switch devices. The ports at both ends of the VSL link are called VSL ports, and the port type is HG port. In a chassis-type VSU, VSL links are often deployed on different boards in order to ensure higher reliability. Fig. 1 is a schematic diagram of VSL links of a stacking system, and as shown in fig. 1, the stacking system includes a switch 1 and a switch 2, 6 card slots of the switch 1 are respectively 1, 2, 3, 4, 5, and 6, 6 card slots of the switch 2 are respectively 10, 11, 12, 13, 14, and 15, and three VSL links are provided between the switch 1 and the switch 2: VSL1, corresponding VSL ports 2 and 11; the VSL ports corresponding to VSL2 are 4 and 13; VSL3, corresponding to VSL ports 6 and 15.
The physical TRUNK refers to a link aggregation port formed by combining a plurality of HG ports in hardware. The physical TRUNK can effectively improve the effective bandwidth among hardware chips and achieve the purpose of high reliability of mutual backup. Because the existing box type switch does not support the VSL ports on different chips to form the physical TRUNK, only simple source and destination information based on messages can be processed, the flow of the cross-chassis cannot be well balanced to a plurality of VSL links, and the problem of insufficient bandwidth of partial VSL links can occur in a large-flow scene. In particular, for broadcast messages, the equalization effect is worse because the message outlet is not unique. In the face of increasing traffic of current network devices, the problem of cross-device broadcast traffic balance of a stacking system is urgently needed to be solved.
Since the forwarding behavior of broadcast traffic is flooding within the corresponding Virtual Local Area Network (VLAN), the effective VLAN range is 1-4094. Therefore, in the existing broadcast traffic balancing method, these VLANs are uniformly distributed on the VSL links, and as shown in fig. 1, VLAN1-VLAN4094 is uniformly distributed on VSL links VSL1, VSL2 and VSL3, so that broadcast traffic can be simply balanced.
However, the existing scheme only balances the broadcast messages based on the VLAN, that is, the broadcast messages of a certain fixed VLAN are only forwarded through 1 fixed VSL link. When there are many broadcast messages in a certain VLAN, the problem that the bandwidth of the corresponding VSL link is insufficient, and the bandwidths of other VSL links are idle, affects normal forwarding of the messages.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiment of the invention provides a method and a system for forwarding a broadcast message.
In a first aspect, an embodiment of the present invention provides a method for forwarding a broadcast packet, where the method includes:
receiving a broadcast message, and calculating a hash value of the broadcast message;
determining n virtual switch links VSLs corresponding to the broadcast message according to the mapping relation between the hash value and the VSLs, wherein n is greater than or equal to 1;
and forwarding the broadcast message according to the forwarding behavior in the broadcast filtering table entry corresponding to the hash value and configured by the chip corresponding to each of the n virtual switch links VSL.
As above method, optionally, after determining n virtual switch links VSL corresponding to the broadcast packet, the method further includes:
when n is larger than or equal to 2, determining a first virtual switching link VSL in the n virtual switching links VSL according to the mapping relation between the hash value and the virtual switching link VSL;
configuring the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the first virtual switch link VSL is located as allowing forwarding;
configuring the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the other virtual switching links VSL except the first virtual switching link VSL in the n virtual switching links VSL are located to forbid forwarding.
As above method, optionally, the determining a first virtual switching link VSL in the n virtual switching links VSL according to the mapping relationship between the hash value and the virtual switching link VSL includes:
if N is presentHAnd if the number of the links is more than or equal to N, determining a first virtual switch link VSL in the N virtual switch links VSLs according to all hash values of the total number of the links, wherein N is the total number of the links, and N is the total number of the linksHIs the hash value total.
As in the above method, optionally, the determining a first virtual switch link VSL in the n virtual switch links VSLs by equally dividing all hash values according to the total number of links includes:
determining at least one hash value forwarded by each virtual switch link VSL configuration according to the following formula:
Yi=(i-1)+NV*j
wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 0, i and j are integers, and Yi≤NH,YiA hash value configured for the ith virtual switch link VSL;
and configuring the virtual switching link VSL for forwarding the hash value as a first virtual switching link VSL in the n virtual switching links VSL. .
The method optionally further comprises:
if the total number n of the links of the VSL is judged to be changed, updating the total number of the links of the VSL;
updating the mapping relation between the hash value and the virtual switch link VSL according to the updated total number of the links;
determining a pre-update forwarding behavior in a broadcast filtering table entry corresponding to each hash value in a chip where each virtual switch link VSL is located according to the updated mapping relation, and marking a configuration result as unprocessed;
traversing all unprocessed broadcast filtering table entries in the changed virtual switching link VSL, if the forwarding behavior in a second broadcast filtering table entry corresponding to the hash value in a chip where a second virtual switching link VSL in the changed virtual switching link VSL is located is pre-updated from allowing forwarding to forbidding forwarding, updating the forwarding row in the second broadcast filtering table entry corresponding to the hash value in the second virtual switching link VSL to forbidding forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filtering table entry to be processed;
if the forwarding behavior in the second broadcast filtering table entry corresponding to the hash value in the chip where the second virtual switching link VSL in the virtual switching links VSL is located is from forbidding forwarding and pre-updating to allowing forwarding, traversing all processed broadcast filter table entries corresponding to the hash value in the chip where the other virtual switch links VSL except the second virtual switch link VSL are located in the changed virtual switch link VSL, if all forwarding behaviors in the processed broadcast filter table entries corresponding to the hash value in the chip where the other virtual switch links VSL are located are prohibited from forwarding, updating the forwarding behavior in the second broadcast filter table entry corresponding to the hash value in the chip where the second virtual switch link VSL is located to allow forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filter table entry to be processed.
The method optionally further comprises:
if the configuration result corresponding to the hash value in the second broadcast filter table entry is processed, notifying the configuration result corresponding to the hash value to other virtual switch links VSL.
In a second aspect, an embodiment of the present invention provides a system for forwarding a broadcast packet, including:
the receiving module is used for receiving a broadcast message and calculating the hash value of the broadcast message;
the mapping module is used for determining n virtual switch links VSLs corresponding to the broadcast message according to the mapping relation between the hash value and the VSLs, wherein n is greater than or equal to 1;
and the forwarding module is used for forwarding the broadcast message according to a forwarding behavior in a broadcast filtering table entry corresponding to the hash value and configured by a chip corresponding to each of the n virtual switch links VSL.
The system as described above, optionally, further comprising:
a selecting module, configured to determine, when n is greater than or equal to 2, a first virtual switch link VSL in the n virtual switch links VSL according to a mapping relationship between the hash value and the virtual switch link VSL;
a first configuration module, configured to configure a forwarding behavior in a broadcast filtering table entry corresponding to the hash value in a chip where the first virtual switch link VSL is located as allowing forwarding;
a second configuration module, configured to configure, as a prohibition of forwarding, a forwarding behavior in a broadcast filtering table entry corresponding to the hash value in a chip where other virtual switching links VSLs, except for the first virtual switching link VSL, of the n virtual switching links VSL are located.
As with the system above, optionally, the selection module is specifically configured to:
if N is presentHAnd if the number of the links is more than or equal to N, determining a first virtual switch link VSL in the N virtual switch links VSLs according to all hash values of the total number of the links, wherein N is the total number of the links, and N is the total number of the linksHIs the hash value total.
As with the system above, optionally, the selection module is specifically configured to:
determining at least one hash value forwarded by each virtual switch link VSL configuration according to the following formula:
Yi=(i-1)+NV*j
wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 0, i,j is an integer, and Yi≤NH,YiA hash value configured for the ith virtual switch link VSL;
and configuring the virtual switching link VSL for forwarding the hash value as a first virtual switching link VSL in the n virtual switching links VSL.
The system as described above, optionally, further comprising:
the link total number updating module is used for updating the link total number of the virtual switching link VSL if the fact that the link total number n of the virtual switching link VSL changes is judged and known;
the mapping relation updating module is used for updating the mapping relation between the hash value and the virtual switch link VSL according to the updated total number of the links;
the pre-configuration module is used for determining pre-update forwarding behaviors in the broadcast filtering table entry corresponding to each hash value in the chip where each virtual switch link VSL is located according to the updated mapping relation, and marking a configuration result as unprocessed;
a first forwarding updating module, configured to traverse all unprocessed broadcast filtering table entries in a changed virtual switch link VSL, if a forwarding behavior in a second broadcast filtering table entry corresponding to the hash value in a chip in which a second virtual switch link VSL in the virtual switch link VSL is located is pre-updated from allowing forwarding to prohibiting forwarding, update a forwarding behavior in the second broadcast filtering table entry corresponding to the hash value to prohibiting forwarding, and update a configuration result corresponding to the hash value in the second broadcast filtering table entry to processed;
a second forwarding behavior updating module, configured to, if the forwarding behavior in the second broadcast filtering table entry corresponding to the hash value in the chip where the second virtual switching link VSL in the virtual switching links VSL is located is from forbidding forwarding and pre-updating to allowing forwarding, traversing all processed broadcast filter table entries corresponding to the hash value in the chip where the other virtual switch links VSL except the second virtual switch link VSL are located in the changed virtual switch link VSL, if all forwarding behaviors in the processed broadcast filter table entries corresponding to the hash value in the chip where the other virtual switch links VSL are located are prohibited from forwarding, updating the forwarding behavior in the second broadcast filter table entry corresponding to the hash value in the chip where the second virtual switch link VSL is located to allow forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filter table entry to be processed.
The system as described above, optionally, further comprising:
and the notification module is used for notifying the configuration result corresponding to the hash value to other virtual switch links VSLs if the configuration result corresponding to the hash value in the second broadcast filter table entry is processed.
According to the broadcast message forwarding method provided by the embodiment of the invention, the broadcast message is distributed to different virtual exchange links according to the hash value by using the broadcast filtering table entry of the chip through the hash value of the broadcast message, so that the limitation that a cross-chip VSL port cannot form a physical TRUNK is avoided, the purpose of balancing cross-equipment broadcast flow according to the hash value is realized, the packet loss of the virtual exchange link caused by overlarge broadcast flow is reduced, and the stable operation of a cross-equipment system is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a stacked system VSL link;
fig. 2 is a schematic flow chart of a method for forwarding a broadcast packet according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a configuration process of a broadcast filter table entry according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a broadcast packet forwarding system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 2 is a schematic flow chart of a forwarding method of a broadcast packet according to an embodiment of the present invention, and as shown in fig. 2, the forwarding method includes:
step S21, receiving a broadcast message, and calculating the hash value of the broadcast message;
specifically, in a chassis type stack system (VSU), after a panel port of one of the switching devices receives a packet, if the packet is determined to be a broadcast packet, the broadcast packet is forwarded to the other switching devices through VSL links between the switching device and the other switching devices, for example, as shown in fig. 1, after the panel port of the switch 1 receives the broadcast packet, the broadcast packet is forwarded to three VSL ports of the switch 1: 2. 4, 6, the three VSL ports forward the broadcast packet to the switch 2 through the corresponding links VSL1, VSL2, and VSL, and in order to solve the problem of broadcast traffic balance among different switching devices, the present invention is different from directly forwarding the broadcast packet to the VSL ports.
Step S22, determining n virtual switch links VSL corresponding to the broadcast message according to the mapping relation between the hash value and the VSL, wherein n is greater than or equal to 1;
specifically, a mapping relationship between a hash value and a virtual switch link VSL is set according to the number of VSL links used for balancing and the hash value range of a broadcast packet, for example, m1 VSL links exist in a virtual switch unit VSU, where m2 VSL links are used for balanced forwarding of the broadcast packet (m2 < m1), and the hash value range of the broadcast packet is 0-1023, then the 1024 hash values are distributed to m2 VSL links to form a mapping relationship between the hash value and the VSL of the virtual switch link, that is, each hash value corresponds to m2 VSL links, and according to the mapping relationship, n virtual links VSL corresponding to each broadcast packet are determined to represent n VSL links that may forward the broadcast packet, where n is greater than or equal to 1. For example, the virtual switch link VSL corresponding to the broadcast packet with hash value 1 is VSL 1. The broadcast message is uniformly forwarded through the Hash value, cross-equipment broadcast flow in the VSU can be more randomly balanced to different VSL links, and broadcast forwarding with the maximum bandwidth in the VSU is realized.
Step S23, forwarding the broadcast packet according to the forwarding behavior in the broadcast filtering table entry corresponding to the hash value and configured by the chip corresponding to each of the n virtual switch links VSL.
Specifically, a broadcast filtering table entry exists on a hardware chip inside the switch device, and the function of the broadcast filtering table entry is to implement selective forwarding of broadcast messages among multiple HG member ports in the physical TRUNK by configuring the table entry, that is, 1 specific broadcast message can only be forwarded from part of the HG member ports of the physical TRUNK. The index of the table entry is the HASH value of the message, and the indexed content is a port bitmap which identifies all HG ports to which the message is prohibited from being forwarded. On the chip, the HASH value is calculated by the chip, the value range of the value is 0-1023, namely 1024 entries exist in the broadcast filtering entries. In the current switching equipment, the table entry is used for realizing the broadcast filtering function in the same chip, so that the HG broadcast balance of cross-chips can be realized through the unified distribution management of the broadcast filtering table entries on different chips, and further, the broadcast balance of VSL ports can be realized. Specifically, a forwarding behavior in a broadcast filtering table entry corresponding to the HASH value corresponding to the VSL in the mapping relationship is configured in advance in a chip where the virtual switch link VSL is located (i.e., a chip of a VSL port corresponding to the link), where the forwarding behavior includes allowing forwarding and prohibiting forwarding, so that broadcast messages corresponding to the HASH value can only be forwarded from one or more corresponding VSL links, thereby implementing balanced forwarding of the broadcast messages.
Therefore, after the hash value of the broadcast message is obtained through calculation, the broadcast message can be forwarded in a balanced manner according to the hash value and the forwarding behavior in the broadcast filtering table entry corresponding to the hash value and configured by the chip corresponding to each of the n corresponding VSL links.
According to the broadcast message forwarding method provided by the embodiment of the invention, the broadcast message is distributed to different virtual exchange links according to the hash value by using the broadcast filtering table entry of the chip through the hash value of the broadcast message, so that the limitation that a cross-chip VSL port cannot form a physical TRUNK is avoided, the purpose of balancing cross-equipment broadcast flow according to the hash value is realized, the packet loss of the virtual exchange link caused by overlarge broadcast flow is reduced, and the stable operation of a cross-equipment system is ensured.
On the basis of the foregoing embodiment, further, after determining the n virtual switch links VSL corresponding to the broadcast packet, the method further includes:
when n is larger than or equal to 2, determining a first virtual switching link VSL in the n virtual switching links VSL according to the mapping relation between the hash value and the virtual switching link VSL;
configuring the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the first virtual switch link VSL is located as allowing forwarding;
configuring the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the other virtual switching links VSL except the first virtual switching link VSL in the n virtual switching links VSL are located to forbid forwarding.
Specifically, in order to obtain a better balancing effect, when the number n of VSL links corresponding to a certain hash value in the mapping relationship is greater than or equal to 2, one of the n VSL links may be selected to forward the broadcast packet corresponding to the hash value, and the link is marked as the first virtual switch link VSL. Specifically, one of the virtual switch links may be randomly selected as the first virtual switch link VSL, or one of the virtual switch links may be selected as the first virtual switch link VSL according to other rules.
And then configuring the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the first virtual switch link VSL is located as allowing forwarding, and configuring the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the other n-1 VSL links except the first virtual switch link VSL are located in the n VSL links as forbidding forwarding.
After the hash value of the broadcast message is obtained through calculation, the broadcast message is only forwarded from the VSL, so that the broadcast message corresponding to one hash value is only forwarded from one VSL, the broadcast message is distributed to different virtual switching links according to the hash value in a balanced manner, the purpose of balancing cross-device broadcast flow according to the hash value is achieved, packet loss of the virtual switching links due to overlarge broadcast flow is reduced, and stable operation of a cross-device system is guaranteed.
For example, as shown in fig. 1, there are three VSL links deployed in 2 slots, 4 slots, and 6 slots of switch 1 and 11 slots, 13 slots, and 15 slots of switch 2. When a VSL port is created, it will be added to all VLANs. Thus, broadcast messages received from switch 1 panel port are forwarded to three VSL ports of switch 1. Assuming that the HASH value of the broadcast packet is 100, on the switch 1, the bit corresponding to the VSL port in the port bitmap of the 100 th entry in the broadcast filter entry configured with 2 slots is 0, which indicates that forwarding from the VSL port is allowed, and the bit corresponding to the VSL port in the port bitmap of the 100 th entry in the broadcast filter entries configured with 4 slots and 6 slots is 1, which indicates that forwarding from the VSL ports of 4 slots and 6 slots is prohibited. So that the message is forwarded only from the VSL1 link to switch 2. Similarly, for different broadcast messages, 1024 HASH values are uniformly distributed on the three VSL links, and each HASH result is guaranteed to be only allowed to be forwarded by one VSL port, so that the broadcast messages can be guaranteed to be uniformly distributed on the three VSL links. The broadcast filter table entry configuration for three slots 2, 4, and 6 of switch 1 is shown in table 1:
table 1 VSL slot broadcast filter table entry configuration table for switch 1
Figure BDA0001840659370000091
Figure BDA0001840659370000101
Through the table 1, the HASH values can be distributed in a balanced manner, so that the broadcast traffic balance among the devices is realized.
According to the broadcast message forwarding method provided by the embodiment of the invention, the cross-device broadcast message is balanced to all virtual switching links according to the hash value of the broadcast message and the broadcast filtering table entry in the hardware chip, so that the possibility of cross-device forwarding packet loss caused by poor broadcast flow balancing effect is reduced, and the stable operation of a cross-device system is ensured.
On the basis of the foregoing embodiments, further, the determining a first virtual switching link VSL in the n virtual switching links VSL according to the mapping relationship between the hash value and the virtual switching link VSL includes:
if N is presentHAnd if the number of the links is more than or equal to N, determining a first virtual switch link VSL in the N virtual switch links VSLs according to all hash values of the total number of the links, wherein N is the total number of the links, and N is the total number of the linksHIs the hash value total.
Specifically, since the total number of hash values of the broadcast packet is fixed, when the total number of hash values N is fixedHWhen the number of hash values is greater than or equal to n, for example, the total number of hash values is 1024, and the total number n of virtual links is 4, at this time, one VSL virtual link may need to forward broadcast messages corresponding to multiple hash values, in order to ensure balanced forwarding effect, the hash values may be uniformly divided into hash value groups of the total number of links, and each hash value group is allocated to one VSL link, so that the broadcast message corresponding to one or more hash values allowed to be forwarded by each VSL link may be determined. For example, if the total number of hash values is 1024 and the total number of links n is 4, the hash values can be divided into 4 equal parts, for example, the division is 0-255, 256-511, 512-767, 768-1023, and each group of hash values is allocated to one VSL link, that is, each group of hash values is allocated to one VSL linkAnd the first virtual switching link VSL corresponding to the group of hash values. For example, the first virtual switch link corresponding to the hash values 0-255 is VSL1, the first virtual switch link corresponding to the hash values 256-511 is VSL2, the first virtual switch link corresponding to the hash values 512-767 is VSL3, and the first virtual switch link corresponding to the hash values 768-1023 is VSL 4. After the first virtual switching link VSL corresponding to each hash value is determined, the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the first virtual switching link VSL is located is configured to be allowed to forward, and the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the n-1 VSL links except the first virtual switching link VSL are located is configured to be forbidden to forward. The hash values are distributed to different VSL links in a balanced mode, so that a better balanced effect of cross-chip forwarding of the broadcast messages is achieved.
According to the broadcast message forwarding method provided by the embodiment of the invention, the broadcast message is distributed to different virtual switching links according to the hash value in a balanced manner by using the broadcast filtering table entry of the chip through the hash value of the broadcast message, so that the purpose of balancing cross-device broadcast flow according to the hash value is realized, the packet loss of the virtual switching links caused by overlarge broadcast flow is reduced, and the stable operation of a cross-device system is ensured.
On the basis of the foregoing embodiments, further, the determining a first virtual switch link VSL in the n virtual switch links VSL according to all hash values of the total number of links includes:
determining at least one hash value forwarded by each virtual switch link VSL configuration according to the following formula:
Yi=(i-1)+NV*j
wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 0, i and j are integers, and Yi≤NH,YiA hash value configured for the ith virtual switch link VSL;
and configuring the virtual switching link VSL for forwarding the hash value as a first virtual switching link VSL in the n virtual switching links VSL.
Specifically, for a VSU environment with n VSLs, the hash value forwarded by the ith (i is greater than or equal to 1 and less than or equal to n, i is an integer) VSL link configuration is:
Yi=(i-1)+NV*j
wherein j is 0,1, …, and (i-1) + NV*j≤NHAnd then, the VSL link configured to forward the HASH value is used as a first virtual switching link VSL corresponding to the HASH value, and after the forwarding behaviors of the n VSL links are configured according to the algorithm, the broadcast message can be automatically balanced to the n VSL links according to the HASH result, so that the maximum utilization of the bandwidth is realized. In practical application, the message which is received by the VSL port and is not in the local case is not forwarded from the VSL port, so that a loop is prevented.
For example, if the total number of hash values is 1024 and the total number of links is 3, the VSL1 configures the forwarded hash values to be 0,3,6,9, …,1023, the VSL2 configures the forwarded hash values to be 1,4,7,10, …,1021, and the VSL3 configures the forwarded hash values to be 2,5,8,11, …, 1022.
According to the broadcast message forwarding method provided by the embodiment of the invention, the cross-equipment broadcast message is balanced to all virtual switching links according to the hash value of the broadcast message, so that the possibility of packet loss caused by cross-equipment forwarding due to poor broadcast flow balancing effect is reduced, and the stable operation of a cross-equipment system is ensured.
On the basis of the above embodiments, further, the method further includes:
if the total number n of the links of the VSL is judged to be changed, updating the total number of the links of the VSL;
updating the mapping relation between the hash value and the virtual switch link VSL according to the updated total number of the links;
determining a pre-update forwarding behavior in a broadcast filtering table entry corresponding to each hash value in a chip where each virtual switch link VSL is located according to the updated mapping relation, and marking a configuration result as unprocessed;
traversing all unprocessed broadcast filtering table entries in the changed virtual switching link VSL, if the forwarding behavior in a second broadcast filtering table entry corresponding to the hash value in a chip where a second virtual switching link VSL in the changed virtual switching link VSL is located is pre-updated from allowing forwarding to forbidding forwarding, updating the forwarding behavior in the second broadcast filtering table entry corresponding to the hash value in the second broadcast filtering table entry to forbidding forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filtering table entry to be processed;
if the forwarding behavior in the second broadcast filtering table entry corresponding to the hash value in the chip where the second virtual switching link VSL in the virtual switching links VSL is located is from forbidding forwarding and pre-updating to allowing forwarding, traversing all processed broadcast filter table entries corresponding to the hash value in the chip where the other virtual switch links VSL except the second virtual switch link VSL are located in the changed virtual switch link VSL, if all forwarding behaviors in the processed broadcast filter table entries corresponding to the hash value in the chip where the other virtual switch links VSL are located are prohibited from forwarding, updating the forwarding behavior in the second broadcast filter table entry corresponding to the hash value in the chip where the second virtual switch link VSL is located to allow forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filter table entry to be processed.
Specifically, in the actual application process, since the VSL links are established at different times, the configuration process when the VSL links are changed needs to be considered. When the VSL link changes, if VLAN is used for broadcast equalization, time consumption is large for VLAN member change configuration, and packet loss occurs for a long time. In order to reduce the time consumption of configuration and avoid long-time packet loss, in the embodiment of the present invention, the VSL link change is divided into VSL joining and VSL exiting, and the processing logics of the two events are the same:
when the total number n of the virtual switch link VSL corresponding to the hash value in the mapping relationship changes, the total number of the VSL link is updated, the updated total number of the link is recorded as n1, the mapping relationship between the hash value and the virtual switch link VSL is reconfigured according to the updated total number n1, and the pre-update forwarding behavior in the broadcast filter table entry corresponding to each hash value in the chip where each virtual switch link VSL is located is determined according to the updated mapping relationship. In order to avoid multiple copies of the same message, it is necessary to always keep that 1 HASH value can only be forwarded from 1 VSL link, and when the pre-update forwarding behavior in the broadcast filtering table entry of one VSL link is determined, it cannot be guaranteed that multiple copies of forwarding do not occur after the configuration result is configured to hardware. Therefore, a certain algorithm is required to control the timing.
Specifically, after determining a pre-update forwarding behavior in a broadcast filtering table entry corresponding to each hash value in a chip where each virtual switch link VSL is located according to an updated mapping relationship, firstly marking a configuration result as unprocessed, traversing all unprocessed broadcast filtering table entries in the virtual switch link VSL, if a certain virtual switch link in the virtual switch link VSL after change is marked as a second virtual switch link VSL, and a forwarding behavior in a second broadcast filtering table entry corresponding to a certain hash value in the chip is pre-updated from allowed forwarding to prohibited forwarding, updating a forwarding row in the second broadcast filtering table entry corresponding to the hash value in the second broadcast filtering table entry to prohibited forwarding, and updating a configuration result corresponding to the hash value in the second broadcast filtering table entry to processed; if the forwarding behavior in the second broadcast filtering table entry corresponding to a certain hash value in the chip where the second virtual switching link VSL in the virtual switching link VSL is located is pre-updated from forwarding prohibition to forwarding permission, traversing all processed broadcast filtering table entries corresponding to the hash value in the chip where the other virtual switching links VSLs except the second virtual switching link VSL in the changed virtual switching link VSL are located, if all the forwarding behaviors in the processed broadcast filtering table entries corresponding to the hash value in the chip where the other virtual switching links VSLs are located are forwarding prohibition, updating the forwarding behavior in the second broadcast filtering table entry corresponding to the hash value in the chip where the second virtual switching link VSL is located to forwarding permission, and updating the configuration result corresponding to the hash value in the second broadcast filtering table entry to processed. Otherwise, skipping the broadcast filtering table entry, and continuing to process the next unprocessed table entry, so that only when the configuration result corresponding to a certain hash value in the broadcast filtering table entry corresponding to each VSL link in n1 VSL links is prohibited from being forwarded, the configuration result corresponding to the hash value in the broadcast filtering table entry in the certain VSL link is allowed to be updated to be allowed to be forwarded, it is ensured that a broadcast message corresponding to a hash value can still be forwarded from only one VSL when the VSL link is changed, and broadcast packet loss caused by VSL link change is reduced.
According to the broadcast message forwarding method provided by the embodiment of the invention, the cross-device broadcast message is balanced to all virtual switch links according to the hash value of the broadcast message and the broadcast filtering table entry in the hardware chip, and when the VSL link changes, the VLAN member change of the VSL port is cancelled, so that the configuration time is shortened, the broadcast packet loss caused by the VSL link change is reduced, and the stable operation of a cross-device system is ensured.
On the basis of the above embodiments, further, the method further includes:
if the configuration result corresponding to the hash value in the second broadcast filter table entry is processed, notifying the configuration result corresponding to the hash value to other virtual switch links VSL.
Specifically, when the configuration result corresponding to the hash value in the second broadcast filter table entry is processed, the broadcast filter table entry is already configured in hardware, and at this time, the configuration result corresponding to the hash value is notified to other virtual switch links VSL, so that each processed broadcast filter table entry can be known by other VSL links.
Fig. 3 is a schematic diagram of a configuration process of a broadcast filter table entry according to an embodiment of the present invention, as shown in fig. 3, the configuration process includes:
and step S31, judging whether the number of VSL links in the n VSL links corresponding to the hash value changes, if so, executing step S32, otherwise, not processing. When the VSL is established, the VSL link is determined to be added according to the establishment notice, and when the VSL link exits, the VSL link is determined to be deleted according to the exit notice;
step S32, determining the configuration information in the broadcast filter table item corresponding to each hash value in the chip where each VSL link is located based on the VSL link number n1 again, namely, pre-updating and issuing the configuration information, and marking the configuration result as unprocessed;
step S33, traversing all unprocessed broadcast filter table entries, and judging that the pre-update behavior of the broadcast filter table entry corresponding to a certain hash value in the unprocessed broadcast filter table entries is allowed to be forwarded, if so, executing step S34, otherwise, executing step S35;
step S34, determining whether the pre-update issuance of other broadcast filter table entries corresponding to the HASH value in the processed broadcast filter table entries is prohibited from forwarding, that is, for a HASH value, whether the pre-update forwarding behaviors of other broadcast filter table entries corresponding to the HASH value are prohibited from forwarding, if yes, executing step S36, otherwise, skipping the table entry, executing step S37, where the VSL link is obtained by receiving other VSL link announcements;
step S35, judging whether the pre-update forwarding behavior of the table entry is changed from allowable forwarding to forbidden forwarding, if yes, executing step S36;
step S36, configuring the pre-changed broadcast filtering table item, notifying the configured result to other VSL links, and marking the table item as processed;
step S37, determine whether all broadcast filter entries are configured completely, that is, whether there are any unprocessed entries, if yes, continue to execute step S33.
After each traversal, the next traversal can be performed after waiting for 10ms, so as to prevent the CPU from occupying too high. Through the process, cross-device broadcast streams in the VSU system are balanced on all VSL links according to the HASH values, and the balancing effect can be controlled by adjusting the HASH algorithm. Except for the VSU system, other scenes related to cross-chip broadcast balance among HG ports can utilize the broadcast balance forwarding method provided by the embodiment of the invention to realize the balance of broadcast flow.
According to the broadcast message forwarding method provided by the embodiment of the invention, the cross-device broadcast message is balanced to all virtual switch links according to the hash value of the broadcast message and the broadcast filtering table entry in the hardware chip, the cross-device broadcast flow is balanced, the packet loss of a VSL link caused by overlarge broadcast flow is reduced, and the more stable operation of a system is ensured. Meanwhile, the configuration time when the VSL link changes is reduced, and the number of lost packets is reduced.
Fig. 4 is a schematic structural diagram of a forwarding system of a broadcast packet according to an embodiment of the present invention, and as shown in fig. 4, the forwarding system includes: a receiving module 41, a mapping module 42 and a forwarding module 43, wherein:
the receiving module 41 is configured to receive a broadcast packet and calculate a hash value of the broadcast packet; the mapping module 42 is configured to determine n virtual switch links VSL corresponding to the broadcast packet according to a mapping relationship between the hash value and the virtual switch link VSL, where n is greater than or equal to 1; the forwarding module 43 is configured to forward the broadcast packet according to a forwarding behavior in the broadcast filtering table entry corresponding to the hash value and configured by the chip corresponding to each of the n virtual switch links VSL.
Specifically, the receiving module 41 receives a broadcast packet, calculates a hash value of the broadcast packet, the mapping module 42 presets a mapping relationship between the hash value and the virtual switch link VSL, determines n virtual switch links VSL corresponding to the broadcast packet according to the calculated hash value and the mapping relationship, and the forwarding module 43 presets forwarding behaviors in broadcast filter table entries corresponding to the hash value on respective chips corresponding to the n virtual switch links VSL, including allowing forwarding and prohibiting forwarding. And forwarding the broadcast message according to forwarding behaviors in the broadcast filtering table entry corresponding to the hash value configured by the chip corresponding to each of the n virtual switch links VSL. The system provided in the embodiment of the present invention is configured to implement the method, and the functions of the system specifically refer to the method embodiment, which is not described herein again.
According to the broadcast message forwarding system provided by the embodiment of the invention, the broadcast messages are distributed to different virtual exchange links in a balanced manner according to the hash values by using the broadcast filtering table items of the chip through the hash values of the broadcast messages, so that the limitation that cross-chip VSL ports cannot form physical TRUNK is avoided, the purpose of balancing cross-equipment broadcast flow according to the hash values is realized, the packet loss of the virtual exchange links caused by overlarge broadcast flow is reduced, and the stable operation of a cross-equipment system is ensured.
On the basis of the above embodiment, further, the method further includes:
a selecting module, configured to determine, when n is greater than or equal to 2, a first virtual switch link VSL in the n virtual switch links VSL according to a mapping relationship between the hash value and the virtual switch link VSL;
a first configuration module, configured to configure a forwarding behavior in a broadcast filtering table entry corresponding to the hash value in a chip where the first virtual switch link VSL is located as allowing forwarding;
a second configuration module, configured to configure, as a prohibition of forwarding, a forwarding behavior in a broadcast filtering table entry corresponding to the hash value in a chip where other virtual switching links VSLs, except for the first virtual switching link VSL, of the n virtual switching links VSL are located.
Specifically, when the number n of VSL links corresponding to a hash value in the mapping relationship is greater than or equal to 2, the selection module may select one of the n VSL links to forward the broadcast packet corresponding to the hash value, where the link is marked as the first virtual switch link VSL. Specifically, the selection module may randomly select one of the virtual switch links as the first virtual switch link VSL, or select one of the virtual switch links as the first virtual switch link VSL according to other rules. And then the first configuration module configures the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the first virtual switch link VSL is located as allowed forwarding, and the second configuration module configures the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the other n-1 VSL links except the first virtual switch link VSL are located in the n VSL links as forbidden forwarding.
After the hash value of the broadcast message is obtained through calculation, the broadcast message is only forwarded from the VSL, so that the broadcast message corresponding to one hash value is only forwarded from one VSL, the broadcast message is distributed to different virtual switching links according to the hash value in a balanced manner, the purpose of balancing cross-device broadcast flow according to the hash value is achieved, packet loss of the virtual switching links due to overlarge broadcast flow is reduced, and stable operation of a cross-device system is guaranteed.
On the basis of the foregoing embodiments, further, the selecting module is specifically configured to:
if N is presentHAnd if the number of the links is more than or equal to N, determining a first virtual switch link VSL in the N virtual switch links VSLs according to all hash values of the total number of the links, wherein N is the total number of the links, and N is the total number of the linksHIs the hash value total.
Specifically, since the total number of hash values of the broadcast packet is fixed, when the total number of hash values N is fixedHWhen the number of hash values is greater than or equal to n, for example, the total number of hash values is 1024, and the total number n of virtual links is 4, at this time, one VSL virtual link may need to forward broadcast messages corresponding to multiple hash values, in order to ensure balanced forwarding effect, the hash values may be uniformly divided into hash value groups of the total number of links, and each hash value group is allocated to one VSL link, so that the broadcast message corresponding to one or more hash values allowed to be forwarded by each VSL link may be determined. After the first virtual switching link VSL corresponding to each hash value is determined, the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the first virtual switching link VSL is located is configured to be allowed to forward, and the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the n-1 VSL links except the first virtual switching link VSL are located is configured to be forbidden to forward. The hash values are distributed to different VSL links in a balanced mode, so that a better balanced effect of cross-chip forwarding of the broadcast messages is achieved.
On the basis of the above-mentioned embodiments, further,
the selection module is specifically configured to:
determining at least one hash value forwarded by each virtual switch link VSL configuration according to the following formula:
Yi=(i-1)+NV*j
wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 0, i and j are integers, and Yi≤NH,YiA hash value configured for the ith virtual switch link VSL;
and configuring the virtual switching link VSL for forwarding the hash value as a first virtual switching link VSL in the n virtual switching links VSL.
Specifically, for a VSU environment with n VSLs, the hash value forwarded by the ith (i is greater than or equal to 1 and less than or equal to n, i is an integer) VSL link configuration is:
Yi=(i-1)+NV*j
wherein j is 0,1, …, and (i-1) + NV*j≤NHAnd then, the VSL link configured to forward the HASH value is used as a first virtual switching link VSL corresponding to the HASH value, and after the forwarding behaviors of the n VSL links are configured according to the algorithm, the broadcast message can be automatically balanced to the n VSL links according to the HASH result, so that the maximum utilization of the bandwidth is realized. In practical application, the message which is received by the VSL port and is not in the local case is not forwarded from the VSL port, so that a loop is prevented. The system provided in the embodiment of the present invention is configured to implement the method, and the functions of the system specifically refer to the method embodiment, which is not described herein again.
According to the broadcast message forwarding system provided by the embodiment of the invention, the cross-equipment broadcast message is balanced to all virtual switching links according to the hash value of the broadcast message, so that the possibility of packet loss caused by cross-equipment forwarding due to poor broadcast flow balancing effect is reduced, and the stable operation of a cross-equipment system is ensured.
On the basis of the above embodiments, further, the system further includes:
the link total number updating module is used for updating the link total number of the virtual switching link VSL if the fact that the link total number n of the virtual switching link VSL changes is judged and known;
the mapping relation updating module is used for updating the mapping relation between the hash value and the virtual switch link VSL according to the updated total number of the links;
the pre-configuration module is used for determining pre-update forwarding behaviors in the broadcast filtering table entry corresponding to each hash value in the chip where each virtual switch link VSL is located according to the updated mapping relation, and marking a configuration result as unprocessed;
a first forwarding updating module, configured to traverse all unprocessed broadcast filtering table entries in a changed virtual switch link VSL, if a forwarding behavior in a second broadcast filtering table entry corresponding to the hash value in a chip in which a second virtual switch link VSL in the virtual switch link VSL is located is pre-updated from allowing forwarding to prohibiting forwarding, update a forwarding behavior in the second broadcast filtering table entry corresponding to the hash value to prohibiting forwarding, and update a configuration result corresponding to the hash value in the second broadcast filtering table entry to processed;
a second forwarding behavior updating module, configured to, if the forwarding behavior in the second broadcast filtering table entry corresponding to the hash value in the chip where the second virtual switching link VSL in the virtual switching links VSL is located is from forbidding forwarding and pre-updating to allowing forwarding, traversing all processed broadcast filter table entries corresponding to the hash value in the chip where the other virtual switch links VSL except the second virtual switch link VSL are located in the changed virtual switch link VSL, if all forwarding behaviors in the processed broadcast filter table entries corresponding to the hash value in the chip where the other virtual switch links VSL are located are prohibited from forwarding, updating the forwarding behavior in the second broadcast filter table entry corresponding to the hash value in the chip where the second virtual switch link VSL is located to allow forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filter table entry to be processed.
Specifically, when the total number n of links of the virtual switch link VSL changes, the total number update module updates the total number of links of the VSL link, and records the updated total number of links as n1, the mapping relationship update module reconfigures the mapping relationship between the hash value and the virtual switch link VSL according to the updated total number n1, the pre-configuration module determines the pre-updated forwarding behavior in the broadcast filter table entry corresponding to each hash value in the chip where each virtual switch link VSL is located according to the updated mapping relationship, and marks the configuration result as unprocessed, and then the first forwarding module traverses all the unprocessed broadcast filter table entries in the virtual switch link VSL, if a certain virtual switch link in the changed virtual switch link VSL is recorded as a second virtual switch link VSL, the forwarding behavior in the second broadcast filter table entry corresponding to the certain hash value in the chip is pre-updated from forwarding allowed to forwarding prohibited, updating the forwarding row in the second broadcast filter table entry corresponding to the hash value in the second broadcast filter table entry to be prohibited from forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filter table entry to be processed; if the forwarding behavior in the second broadcast filter table entry corresponding to a certain hash value in the chip where the second virtual switch link VSL in the virtual switch links VSL is located is pre-updated from forbidding forwarding to allowing forwarding, the second forwarding behavior updating module traverses all the processed broadcast filtering table entries corresponding to the hash value in the chip where the other virtual switching links VSL except the second virtual switching link VSL are located in the changed virtual switching links VSL, if all the forwarding behaviors in the processed broadcast filtering table entries corresponding to the hash value in the chip where the other virtual switching links VSL are located are prohibited from forwarding, updating the forwarding behavior in the second broadcast filter table entry corresponding to the hash value in the chip where the second virtual switch link VSL is located to allow forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filter table entry to be processed. Otherwise, the broadcast filtering table entry is skipped over, and the next unprocessed table entry is processed continuously.
According to the broadcast message forwarding system provided by the embodiment of the invention, the cross-device broadcast message is balanced to all virtual switch links according to the hash value of the broadcast message and the broadcast filtering table entry in the hardware chip, and when the VSL link changes, the VLAN member change of the VSL port is cancelled, so that the configuration time is shortened, the broadcast packet loss caused by the VSL link change is reduced, and the stable operation of the cross-device system is ensured.
On the basis of the above embodiments, further, the system further includes:
and the notification module is used for notifying the configuration result corresponding to the hash value to other virtual switch links VSLs if the configuration result corresponding to the hash value in the second broadcast filter table entry is processed.
Specifically, after the broadcast filtering table entry corresponding to the hash value is configured in hardware, the corresponding configuration result is marked as processed, the notification module notifies the configuration result corresponding to the hash value to other virtual switch links VSL, and each processed broadcast filtering table entry can be known by other VSL links. The system provided in the embodiment of the present invention is configured to implement the method, and the functions of the system specifically refer to the method embodiment, which is not described herein again.
According to the broadcast message forwarding system provided by the embodiment of the invention, the cross-device broadcast message is balanced to all virtual switching links according to the hash value of the broadcast message and the broadcast filtering table entry in the hardware chip, the cross-device broadcast flow is balanced, the packet loss of a VSL link caused by overlarge broadcast flow is reduced, and the more stable operation of the system is ensured. Meanwhile, the configuration time when the VSL link changes is reduced, and the number of lost packets is reduced.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the system and the like 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 may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1.一种广播报文的转发方法,其特征在于,包括:1. a kind of forwarding method of broadcast message, is characterized in that, comprises: 接收广播报文,计算所述广播报文的哈希值;Receive a broadcast message, and calculate the hash value of the broadcast message; 根据哈希值与虚拟交换链路VSL的映射关系,确定所述广播报文对应的n条虚拟交换链路VSL,其中n大于等于1;According to the mapping relationship between the hash value and the virtual switching link VSL, determine n virtual switching link VSLs corresponding to the broadcast message, where n is greater than or equal to 1; 根据所述n条虚拟交换链路VSL各自对应的芯片配置的与所述哈希值对应的广播过滤表项中的转发行为,转发所述广播报文。The broadcast packet is forwarded according to the forwarding behavior in the broadcast filtering table entry corresponding to the hash value configured by the chips corresponding to the n virtual switching link VSLs. 2.根据权利要求1所述的方法,其特征在于,所述确定所述广播报文对应的n条虚拟交换链路VSL之后,还包括:2. The method according to claim 1, wherein after determining the n virtual switching links VSLs corresponding to the broadcast message, the method further comprises: 当n大于等于2时,根据所述哈希值与虚拟交换链路VSL的映射关系,确定所述n条虚拟交换链路VSL中的第一虚拟交换链路VSL;When n is greater than or equal to 2, determine the first virtual switching link VSL in the n virtual switching links VSL according to the mapping relationship between the hash value and the virtual switching link VSL; 将所述第一虚拟交换链路VSL所在芯片中的与所述哈希值对应的广播过滤表项中的转发行为配置为允许转发;configuring the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the first virtual switching link VSL is located to allow forwarding; 将所述n条虚拟交换链路VSL中的除了所述第一虚拟交换链路VSL的其他虚拟交换链路VSL所在芯片中的与所述哈希值对应的广播过滤表项中的转发行为配置为禁止转发。Configure the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where other virtual switching link VSLs except the first virtual switching link VSL are located in the n virtual switching link VSLs To prohibit forwarding. 3.根据权利要求2所述的方法,其特征在于,所述根据所述哈希值与虚拟交换链路VSL的映射关系,确定所述n条虚拟交换链路VSL中的第一虚拟交换链路VSL,包括:3. The method according to claim 2, wherein the first virtual switch chain in the n virtual switch links VSL is determined according to the mapping relationship between the hash value and the virtual switch link VSL Road VSL, including: 若NH≥n,则根据链路总数均分所有哈希值,确定所述n条虚拟交换链路VSL中第一虚拟交换链路VSL,其中,n为链路总数,NH为哈希值总数。If NH ≥ n, all hash values are equally divided according to the total number of links, and the first virtual switching link VSL among the n virtual switching links VSL is determined, where n is the total number of links, and NH is the hash value The total number of values. 4.根据权利要求3所述的方法,其特征在于,所述根据链路总数均分所有哈希值,确定所述n条虚拟交换链路VSL中第一虚拟交换链路VSL,包括:4. The method according to claim 3, wherein, according to the total number of links, all hash values are equally divided to determine the first virtual switching link VSL in the n virtual switching links VSL, comprising: 根据下述公式确定每条虚拟交换链路VSL配置转发的至少一个哈希值:Determine at least one hash value forwarded by the VSL configuration of each virtual switch link according to the following formula: Yi=(i-1)+NV*jY i =(i-1)+N V *j 其中,1≤i≤n,j≥0,i,j为整数,且Yi≤NH,Yi为第i条虚拟交换链路VSL配置的哈希值;Wherein, 1≤i≤n, j≥0, i, j are integers, and Y i ≤ N H , Y i is the hash value of the ith virtual switching link VSL configuration; 将配置转发所述哈希值的虚拟交换链路VSL,作为所述n条虚拟交换链路VSL中第一虚拟交换链路VSL;configuring the virtual switching link VSL for forwarding the hash value as the first virtual switching link VSL in the n virtual switching link VSLs; 其中,NV为链路总数。where NV is the total number of links. 5.根据权利要求2-4任一所述的方法,其特征在于,还包括:5. The method according to any one of claims 2-4, characterized in that, further comprising: 若判断获知虚拟交换链路VSL的链路总数n发生变化,则更新所述虚拟交换链路VSL的链路总数;If it is determined that the total number of links n of the virtual switching link VSL has changed, the total number of links of the virtual switching link VSL is updated; 根据更新后的链路总数,更新所述哈希值与虚拟交换链路VSL的映射关系;According to the updated total number of links, update the mapping relationship between the hash value and the virtual switching link VSL; 根据更新后的映射关系确定每条虚拟交换链路VSL所在芯片中每个哈希值对应的广播过滤表项中的预更新转发行为,将配置结果标记为未处理;Determine the pre-update forwarding behavior in the broadcast filtering table entry corresponding to each hash value in the chip where the VSL of each virtual switching link is located according to the updated mapping relationship, and mark the configuration result as unprocessed; 遍历变化后的虚拟交换链路VSL中所有未处理的广播过滤表项,若变化后的虚拟交换链路VSL中的第二虚拟交换链路VSL所在芯片中的与所述哈希值对应的第二广播过滤表项中的转发行为由允许转发预更新为禁止转发,则将所述第二虚拟交换链路VSL中所述哈希值对应的第二广播过滤表项中的转发行更新为禁止转发,并将所述第二广播过滤表项中所述哈希值对应的配置结果更新为已处理;Traverse all the unprocessed broadcast filtering entries in the changed virtual switching link VSL, if the second virtual switching link VSL in the changed virtual switching link VSL is located in the chip corresponding to the hash value, The forwarding behavior in the second broadcast filtering entry is pre-updated from allowing forwarding to prohibiting forwarding, and then updating the forwarding issue in the second broadcast filtering entry corresponding to the hash value in the second virtual switching link VSL to prohibiting forwarding, and updating the configuration result corresponding to the hash value in the second broadcast filtering entry to processed; 若虚拟交换链路VSL中的第二虚拟交换链路VSL所在芯片中的与所述哈希值对应的第二广播过滤表项中的转发行为由禁止转发预更新为允许转发,则遍历变化后的虚拟交换链路VSL中的除所述第二虚拟交换链路VSL以外的其他虚拟交换链路VSL所在芯片中的与所述哈希值对应的已处理的所有广播过滤表项,若其他虚拟交换链路VSL所在芯片中的与所述哈希值对应的已处理的广播过滤表项中的转发行为全部为禁止转发,则将所述第二虚拟交换链路VSL所在芯片中的与所述哈希值对应的第二广播过滤表项中的转发行为更新为允许转发,并将所述第二广播过滤表项中所述哈希值对应的配置结果更新为已处理。If the forwarding behavior in the second broadcast filtering entry corresponding to the hash value in the chip where the second virtual switching link VSL in the virtual switching link VSL is located is pre-updated from prohibiting forwarding to allowing forwarding, after the traversal changes In the virtual switching link VSL of the virtual switching link VSL except the second virtual switching link VSL, all processed broadcast filtering table entries corresponding to the hash value in the chip where the other virtual switching link VSLs are located, if other virtual switching link VSLs are processed. The forwarding behaviors in the processed broadcast filtering table entries corresponding to the hash value in the chip where the switching link VSL is located are all prohibiting forwarding, then the chip where the second virtual switching link VSL is located is combined with the said hash value. The forwarding behavior in the second broadcast filter entry corresponding to the hash value is updated to allow forwarding, and the configuration result corresponding to the hash value in the second broadcast filter entry is updated to processed. 6.根据权利要求5所述的方法,其特征在于,还包括:6. The method of claim 5, further comprising: 若第二广播过滤表项中所述哈希值对应的配置结果为已处理,则将所述哈希值对应的配置结果通告至其他虚拟交换链路VSL。If the configuration result corresponding to the hash value in the second broadcast filtering table entry is processed, the configuration result corresponding to the hash value is advertised to other virtual switching link VSLs. 7.一种广播报文的转发系统,其特征在于,包括:7. A forwarding system for broadcast messages, comprising: 接收模块,用于接收广播报文,计算所述广播报文的哈希值;a receiving module, configured to receive a broadcast message, and calculate a hash value of the broadcast message; 映射模块,用于根据哈希值与虚拟交换链路VSL的映射关系,确定所述广播报文对应的n条虚拟交换链路VSL,其中n大于等于1;a mapping module, configured to determine n virtual switching link VSLs corresponding to the broadcast message according to the mapping relationship between the hash value and the virtual switching link VSL, where n is greater than or equal to 1; 转发模块,用于根据所述n条虚拟交换链路VSL各自对应的芯片配置的与所述哈希值对应的广播过滤表项中的转发行为,转发所述广播报文。A forwarding module, configured to forward the broadcast message according to the forwarding behavior in the broadcast filtering table entry corresponding to the hash value configured by the chips corresponding to the n virtual switching links VSLs. 8.根据权利要求7所述的系统,其特征在于,还包括:8. The system of claim 7, further comprising: 选择模块,用于当n大于等于2时,根据所述哈希值与虚拟交换链路VSL的映射关系,确定所述n条虚拟交换链路VSL中的第一虚拟交换链路VSL;a selection module, configured to determine the first virtual switching link VSL in the n virtual switching links VSL according to the mapping relationship between the hash value and the virtual switching link VSL when n is greater than or equal to 2; 第一配置模块,用于将所述第一虚拟交换链路VSL所在芯片中的与所述哈希值对应的广播过滤表项中的转发行为配置为允许转发;a first configuration module, configured to configure the forwarding behavior in the broadcast filtering table entry corresponding to the hash value in the chip where the first virtual switching link VSL is located to allow forwarding; 第二配置模块,用于将所述n条虚拟交换链路VSL中的除了所述第一虚拟交换链路VSL的其他虚拟交换链路VSL所在芯片中的与所述哈希值对应的广播过滤表项中的转发行为配置为禁止转发。The second configuration module is configured to filter the broadcast corresponding to the hash value in the chip where other virtual switching link VSLs except the first virtual switching link VSL are located in the n virtual switching link VSLs The forwarding behavior in the entry is configured to prohibit forwarding. 9.根据权利要求8所述的系统,其特征在于,所述选择模块具体用于:9. The system according to claim 8, wherein the selection module is specifically used for: 若NH≥n,则根据链路总数均分所有哈希值,确定所述n条虚拟交换链路VSL中第一虚拟交换链路VSL,其中,n为链路总数,NH为哈希值总数。If NH ≥ n, all hash values are equally divided according to the total number of links, and the first virtual switching link VSL among the n virtual switching links VSL is determined, where n is the total number of links, and NH is the hash value The total number of values. 10.根据权利要求9所述的系统,其特征在于,所述选择模块具体用于:10. The system according to claim 9, wherein the selection module is specifically used for: 根据下述公式确定每条虚拟交换链路VSL配置转发的至少一个哈希值:Determine at least one hash value forwarded by the VSL configuration of each virtual switch link according to the following formula: Yi=(i-1)+NV*jY i =(i-1)+N V *j 其中,1≤i≤n,j≥0,i,j为整数,且Yi≤NH,Yi为第i条虚拟交换链路VSL配置的哈希值;Wherein, 1≤i≤n, j≥0, i, j are integers, and Y i ≤ N H , Y i is the hash value of the ith virtual switching link VSL configuration; 将配置转发所述哈希值的虚拟交换链路VSL,作为所述n条虚拟交换链路VSL中第一虚拟交换链路VSL;configuring the virtual switching link VSL for forwarding the hash value as the first virtual switching link VSL in the n virtual switching link VSLs; 其中,NV为链路总数。where NV is the total number of links. 11.根据权利要求10所述的系统,其特征在于,还包括:11. The system of claim 10, further comprising: 链路总数更新模块,用于若判断获知虚拟交换链路VSL的链路总数n发生变化,则更新所述虚拟交换链路VSL的链路总数;A link total number update module, configured to update the total number of links of the virtual switching link VSL if it is judged that the total number of links n of the virtual switching link VSL changes; 映射关系更新模块,用于根据更新后的链路总数,更新所述哈希值与虚拟交换链路VSL的映射关系;a mapping relationship update module, for updating the mapping relationship between the hash value and the virtual switching link VSL according to the updated total number of links; 预配置模块,用于根据更新后的映射关系确定每条虚拟交换链路VSL所在芯片中每个哈希值对应的广播过滤表项中的预更新转发行为,将配置结果标记为未处理;The pre-configuration module is used to determine the pre-update forwarding behavior in the broadcast filtering table entry corresponding to each hash value in the chip where each virtual switching link VSL is located according to the updated mapping relationship, and mark the configuration result as unprocessed; 第一转发行为更新模块,用于遍历变化后的虚拟交换链路VSL中所有未处理的广播过滤表项,若虚拟交换链路VSL中的第二虚拟交换链路VSL所在芯片中的与所述哈希值对应的第二广播过滤表项中的转发行为由允许转发预更新为禁止转发,则将所述哈希值对应的第二广播过滤表项中的转发行更新为禁止转发,并将所述第二广播过滤表项中所述哈希值对应的配置结果更新为已处理;The first forwarding behavior update module is used to traverse all unprocessed broadcast filtering entries in the changed virtual switching link VSL. The forwarding behavior in the second broadcast filtering entry corresponding to the hash value is pre-updated from allowing forwarding to prohibiting forwarding, then the forwarding issue in the second broadcast filtering entry corresponding to the hash value is updated to prohibit forwarding, and The configuration result corresponding to the hash value in the second broadcast filter entry is updated to be processed; 第二转发行为更新模块,用于若虚拟交换链路VSL中的第二虚拟交换链路VSL所在芯片中的与所述哈希值对应的第二广播过滤表项中的转发行为由禁止转发预更新为允许转发,则遍历变化后的虚拟交换链路VSL中的除所述第二虚拟交换链路VSL以外的其他虚拟交换链路VSL所在芯片中的与所述哈希值对应的已处理的所有广播过滤表项,若其他虚拟交换链路VSL所在芯片中的与所述哈希值对应的已处理的广播过滤表项中的转发行为全部为禁止转发,则将所述第二虚拟交换链路VSL所在芯片中的与所述哈希值对应的第二广播过滤表项中的转发行为更新为允许转发,并将所述第二广播过滤表项中所述哈希值对应的配置结果更新为已处理。The second forwarding behavior updating module is configured to, if the forwarding behavior in the second broadcast filtering table entry corresponding to the hash value in the chip where the second virtual switching link VSL in the virtual switching link VSL is located is prohibited from forwarding Update to allow forwarding, then traverse the processed virtual switching link VSLs in the chip where other virtual switching link VSLs except the second virtual switching link VSL are located and corresponding to the hash value in the changed virtual switching link VSL. All broadcast filtering entries, if all the forwarding behaviors in the processed broadcast filtering entries corresponding to the hash value in the chip where the other virtual switching link VSL is located are all prohibit forwarding, the second virtual switching link The forwarding behavior in the second broadcast filter entry corresponding to the hash value in the chip where the VSL is located is updated to allow forwarding, and the configuration result corresponding to the hash value in the second broadcast filter entry is updated is processed. 12.根据权利要求11所述的系统,其特征在于,还包括:12. The system of claim 11, further comprising: 通告模块,用于若第二广播过滤表项中所述哈希值对应的配置结果为已处理,则将所述哈希值对应的配置结果通告至其他虚拟交换链路VSL。an announcement module, configured to announce the configuration result corresponding to the hash value to other virtual switching link VSLs if the configuration result corresponding to the hash value in the second broadcast filtering table entry is processed.
CN201811246571.8A 2018-10-25 2018-10-25 Method and system for forwarding broadcast message Active CN109450819B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811246571.8A CN109450819B (en) 2018-10-25 2018-10-25 Method and system for forwarding broadcast message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811246571.8A CN109450819B (en) 2018-10-25 2018-10-25 Method and system for forwarding broadcast message

Publications (2)

Publication Number Publication Date
CN109450819A CN109450819A (en) 2019-03-08
CN109450819B true CN109450819B (en) 2021-08-17

Family

ID=65547860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811246571.8A Active CN109450819B (en) 2018-10-25 2018-10-25 Method and system for forwarding broadcast message

Country Status (1)

Country Link
CN (1) CN109450819B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112039703B (en) * 2020-08-28 2022-04-22 迈普通信技术股份有限公司 Path determining method, device, equipment and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725761A (en) * 2005-06-10 2006-01-25 杭州华为三康技术有限公司 Method of implementing link aggregation of network equipment
CN104426771A (en) * 2013-09-09 2015-03-18 华为技术有限公司 Message forwarding method and message forwarding device
US9049137B1 (en) * 2012-08-06 2015-06-02 Google Inc. Hash based ECMP load balancing with non-power-of-2 port group sizes
CN104683255A (en) * 2013-11-29 2015-06-03 华为技术有限公司 Load sharing balance method and device for physical ports, and link aggregation system
CN104954249A (en) * 2014-03-27 2015-09-30 华为技术有限公司 Packet forwarding method, system and device
CN105791145A (en) * 2014-12-18 2016-07-20 中兴通讯股份有限公司 Message transmission method and device based on equivalent multipath ECMP
CN106341336A (en) * 2016-08-29 2017-01-18 锐捷网络股份有限公司 Method and device for forwarding message via aggregate port (AP)
CN107566267A (en) * 2016-06-30 2018-01-09 中兴通讯股份有限公司 A kind of message forwarding method and device based on aggregated links

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2497234B1 (en) * 2009-11-02 2018-09-19 Marvell World Trade Ltd. Network device and method based on virtual interfaces
US8660005B2 (en) * 2010-11-30 2014-02-25 Marvell Israel (M.I.S.L) Ltd. Load balancing hash computation for network switches
US8644156B2 (en) * 2011-01-28 2014-02-04 Cisco Technology, Inc. Load-balancing traffic with virtual port channels
CN103338161B (en) * 2013-07-10 2016-06-15 杭州华三通信技术有限公司 A kind of method and apparatus realizing cross-equipment aggregation
CN104022952B (en) * 2014-06-03 2017-12-08 新华三技术有限公司 A kind of message forwarding method and device
CN105939279B (en) * 2015-08-19 2019-02-19 杭州迪普科技股份有限公司 Flow processing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725761A (en) * 2005-06-10 2006-01-25 杭州华为三康技术有限公司 Method of implementing link aggregation of network equipment
US9049137B1 (en) * 2012-08-06 2015-06-02 Google Inc. Hash based ECMP load balancing with non-power-of-2 port group sizes
CN104426771A (en) * 2013-09-09 2015-03-18 华为技术有限公司 Message forwarding method and message forwarding device
CN104683255A (en) * 2013-11-29 2015-06-03 华为技术有限公司 Load sharing balance method and device for physical ports, and link aggregation system
CN104954249A (en) * 2014-03-27 2015-09-30 华为技术有限公司 Packet forwarding method, system and device
CN105791145A (en) * 2014-12-18 2016-07-20 中兴通讯股份有限公司 Message transmission method and device based on equivalent multipath ECMP
CN107566267A (en) * 2016-06-30 2018-01-09 中兴通讯股份有限公司 A kind of message forwarding method and device based on aggregated links
CN106341336A (en) * 2016-08-29 2017-01-18 锐捷网络股份有限公司 Method and device for forwarding message via aggregate port (AP)

Also Published As

Publication number Publication date
CN109450819A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN1947390B (en) Virtual network device cluster
US7710957B2 (en) System and method for implementing multiple spanning trees per network
US8811398B2 (en) Method for routing data packets using VLANs
US7200117B2 (en) Method of optimizing network capacity and fault tolerance in deadlock-free routing
CN102859949B (en) For the method in fat tree network routing data grouping
CN1914867B (en) Interface bundles in virtual network devices
US8605628B2 (en) Utilizing betweenness to determine forwarding state in a routed network
US8477769B2 (en) Flexible shared mesh protection services for intelligent TDM-based optical transport networks
CN111092813B (en) Equivalent multipath ECMP switching method, network equipment and system
Borokhovich et al. How (not) to shoot in your foot with sdn local fast failover: A load-connectivity tradeoff
US20150124612A1 (en) Multi-tenant network provisioning
US10158500B2 (en) G.8032 prioritized ring switching systems and methods
US11102106B2 (en) Dynamic flooding for link state protocols
EP3767880B1 (en) Optimizing information related to a route and/or a next hop for multicast traffic
CN107735989B (en) Method and system for site interconnection on a transport network
US10171358B2 (en) Port congestion resiliency in a multi-card and multi-switch link aggregation group
US20160134543A1 (en) Method and associated network device for managing network traffic
CN104301226A (en) A designated routing bridge election method, device and system
WO2020244439A1 (en) Method and apparatus for realizing message mirroring, and storage medium
CN109450819B (en) Method and system for forwarding broadcast message
Manel et al. An efficient MPLS-based source routing scheme in software-defined wide area networks (SD-WAN)
US11271868B2 (en) Programmatically configured switches and distributed buffering across fabric interconnect
US10284457B2 (en) System and method for virtual link trunking
US9674094B1 (en) Method and apparatus for controlling transmission of packets over a link aggregation group
CN113890855A (en) Message forwarding method, system, equipment and 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