CN108282406B - Data transmission method, stacking equipment and stacking system - Google Patents

Data transmission method, stacking equipment and stacking system Download PDF

Info

Publication number
CN108282406B
CN108282406B CN201711351207.3A CN201711351207A CN108282406B CN 108282406 B CN108282406 B CN 108282406B CN 201711351207 A CN201711351207 A CN 201711351207A CN 108282406 B CN108282406 B CN 108282406B
Authority
CN
China
Prior art keywords
link
stacking
forwarding
data
multicast service
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
CN201711351207.3A
Other languages
Chinese (zh)
Other versions
CN108282406A (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.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom Technology 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 Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN201711351207.3A priority Critical patent/CN108282406B/en
Publication of CN108282406A publication Critical patent/CN108282406A/en
Application granted granted Critical
Publication of CN108282406B publication Critical patent/CN108282406B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/122Shortest path evaluation by minimising distances, e.g. by selecting a route with minimum of number of hops
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/125Shortest path evaluation based on throughput or bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/583Stackable routers

Landscapes

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

Abstract

The application discloses a data transmission method, stacking equipment and a stacking system, wherein when the stacking equipment receives multicast service message data, the stacking equipment determines an optimal link for forwarding according to the destination receiving equipment of the multicast service message data, and if the current residual bandwidth of the optimal link is sufficient, the stacking equipment forwards the multicast service message data to other stacking equipment by using the optimal link; and if the current residual bandwidth of the optimal link is insufficient, activating the non-optimal link to forward the multicast service message data to other stacking equipment. According to the method and the device, the multicast service message data are forwarded to other stacking devices by activating the non-optimal link, the technical problems that when the devices at two ends of the non-optimal stacking link need to communicate, the number of the stacking devices through which the data need to pass is too large, the bandwidth is wasted, and the forwarding delay is not facilitated are solved, and the bandwidth utilization rate of the stacking system is improved.

Description

Data transmission method, stacking equipment and stacking system
Technical Field
The present invention relates to, but not limited to, data communication network technologies, and in particular, to a data transmission method, a stacking apparatus, and a stacking system.
Background
With the rapid development of information technology, the network scale is rapidly enlarged, it is often difficult to accurately predict the future network scale in the current network planning, when the number of ports of a planned switch is not enough to meet the network application requirement, it is better to increase the number of ports of the switch without changing the original network planning topology, and at the same time, the burden of the network manager is not increased.
Stacking technology differs from simple cascading of switches in that the devices that are cascaded are logically independent of each other, while multiple switches are stacked, logically equivalent to the same device. Therefore, the stacking technology can increase the port density of the switches, and only one management inlet is needed for one stacking system, after the ports are increased through stacking, the original network topology structure and configuration do not need to be changed, and then the efficient interconnection and unified management among the switches can be realized, and the stacking system has great significance for actual network maintenance and management.
The stacking system is composed of a plurality of stacking switches (stacking members) with independent functions, one switch is required to serve as a controller and a manager in the stacking system and is called as a master device, meanwhile, in order to guarantee the stability of the stacking system and avoid the influence of the fault of the master device on the whole stacking system to the maximum extent, a standby device is required to backup the operation data and the configuration data of the stacking system in real time, the master device is automatically switched into the standby device when the master device fails or is lacked, the rest devices are slave devices and are connected through stacking links, and the topology of the stacking system can be a chain stacking topology or an annular stacking topology. The ring stack topology can solve the problem of data communication failure caused by failure of a certain stack link in the chain stack topology, and can provide effective data stream backup and the like.
As shown in fig. 1, 5 devices A, B, C, D, E form a ring stacking system, where a is a master device, B is a slave device, and each device is connected to each other device through 2 stacking links, for example, between a and D, through a stacking link of a-B-C-D and a stacking link of a-E-D. In the prior art, a ring stacking topology generally employs an inactive stacking link to prevent data from looping, and generally, one stacking link between an inactive master device and an inactive slave device, that is, a stacking link between a and E, is in an inactive state, and data forwarding is not allowed. In this case, if the devices at the two ends of the inactive stacking link need to communicate (for example, the ingress port of the packet is on the device a and the egress port is on the device E), the data needs to be forwarded from one end to the other end of the entire stacking system (a-B-C-D-E), and the number of the passing stacking devices is too large, which wastes the bandwidth of the stacking link and is not beneficial to the forwarding delay.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides a data transmission method, a stacking apparatus, and a stacking system, which can improve the bandwidth utilization of a stacking link.
In order to achieve the purpose of the invention, the technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a data transmission method, which is applied to an annular stacking system comprising a plurality of stacking devices, and comprises the following steps:
when receiving multicast service message data, a stacking device determines an optimal link for forwarding according to a target receiving device of the multicast service message data, and if the current residual bandwidth of the optimal link is sufficient, the stacking device forwards the multicast service message data to other stacking devices by using the optimal link; and if the current residual bandwidth of the optimal link is insufficient, activating the non-optimal link to forward the multicast service message data to other stacking equipment.
Further, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have different numbers of excellent links, the stacking link in the stacking link port direction with the higher number of excellent links is determined as the optimal link.
Further, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have equal number of excellent links, the stacking link in the port direction of the stacking link with less hop count is determined as the optimal link.
Further, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the same number of excellent links exist on two stacked paths in two directions and the hop count is the same, determining that the stacked link in the port direction of the stacked link with the large stacked link bandwidth is the optimal link.
Further, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have equal number of excellent links, the passing hop count is the same, and the stacking link bandwidths in the port directions of the two stacking links are also equal, determining that the stacking link in the port direction of the stacking link with the small next hop equipment number is the optimal link.
Further, determining the optimal link for forwarding the multicast service packet to the destination receiving device includes:
determining that a link which passes through the direction with the minimum hop count and is transmitted to the target receiving equipment by the multicast service message is a preferred link;
when the hop counts of the links in two directions for forwarding the multicast message to the target receiving equipment are equal, setting the link in the direction with large link bandwidth stacked by the equipment as a preferred link; or
When the hop counts of the links in the two directions, which are forwarded to the destination receiving device by the multicast packet, are equal and the bandwidths of the stacked links in the two directions are equal, the link in the direction with the smaller device number of the next-hop device of the device is set as the preferred link.
Furthermore, the forwarding priority of the received multicast service message data is lower than the forwarding priority of the data transmitted in the optimal link at present;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: forwarding the received multicast service message data by a non-optimal link;
at this time, the method further includes: the data currently transmitted on the optimal link continues to be forwarded on the optimal link.
Further, the forwarding priority of the received multicast message is the same as the forwarding priority of the data transmitted in the optimal link at present;
the method further comprises the following steps: forwarding data with an early Media Access Control (MAC) address learning in the device to other stacked devices by using the optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and forwarding the data with the later MAC address learning at the device to other stacking devices by using the non-optimal link.
Furthermore, the forwarding priority of the received multicast message data is the same as the forwarding priority of the data transmitted in the optimal link at present and the time for the equipment to learn the MAC address is the same,
the method further comprises the following steps: forwarding data with more output ports to other stacking equipment by using the optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and forwarding the port-less data to other stacking devices by using the non-optimal link.
Furthermore, the forwarding priority of the received multicast message data is higher than the data forwarding priority transmitted in the optimal link at present;
the method further comprises the following steps: forwarding the multicast service message data on the current optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and switching the data currently forwarded on the optimal link to the non-optimal link for forwarding.
Further, the activating the non-optimal link to forward the multicast service packet data to other stacking devices includes:
and when the bandwidth of the activated non-optimal link is insufficient and the forwarding priority of forwarding data on the non-optimal link is lower than the forwarding priority of forwarding data on the non-optimal link needing to be activated, forwarding the data needing to be forwarded by the non-optimal link with the non-optimal link, and discarding the data forwarded on the non-optimal link currently.
Further, when the bandwidth of the activated non-optimal link is insufficient, and the forwarding priority of the forwarding data on the non-optimal link is the same as the forwarding priority of the forwarding data on the non-optimal link, discarding the data which needs to be forwarded by the non-optimal link.
The embodiment of the invention also provides a stacking device, which comprises a determining module and a forwarding module, wherein:
the determining module is used for determining an optimal link for forwarding according to the destination receiving equipment of the multicast service message data and informing the forwarding module when the multicast service message data is received;
a forwarding module, configured to receive the notification from the determining module, detect whether the current remaining bandwidth of the optimal link is sufficient, and forward multicast service packet data to other stacking devices by using the optimal link if the current remaining bandwidth of the optimal link is sufficient; and if the current residual bandwidth of the optimal link is insufficient, activating the non-optimal link to forward the multicast service message data to other stacking equipment.
The embodiment of the invention also provides a stacking system, which comprises a plurality of stacking devices as described above, wherein the stacking devices in the stacking system are connected through the stacking link ports, one stacking device is selected as a main device according to a preset election rule, one stacking device is selected as a standby device, and the stacking devices except the main device and the standby device are all slave devices.
The technical scheme of the invention has the following beneficial effects:
according to the data transmission method, the stacking equipment and the stacking system, the multicast service message data are forwarded to other stacking equipment by activating the non-optimal link, the technical problems that when the equipment at two ends of the non-optimal stacking link needs to communicate, the number of the stacking equipment through which the data need to pass is too large, the bandwidth is wasted, and the forwarding delay is not facilitated are solved, and the bandwidth utilization rate of the stacking system is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic structural diagram of a ring stacking system in the related art;
fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a stacking apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an annular stacking system in a preferred embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
As shown in fig. 2, a data transmission method according to the present invention is applied to a ring stacking system including a plurality of stacking apparatuses, and includes the steps of:
step 201: when the stacking equipment receives multicast service message data, determining an optimal link for forwarding according to the destination receiving equipment of the multicast service message data;
it should be noted that the optimal link in the present invention refers to a selected one of two or more stacking links from the stacking device itself to other stacking devices for forwarding data from the stacking device itself to other stacking devices, and when the optimal link fails or the remaining bandwidth of the optimal link does not satisfy data forwarding, the non-optimal link is used for forwarding data from the stacking device itself to other stacking devices.
Further, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have different numbers of excellent links, the stacking link in the stacking link port direction with the higher number of excellent links is determined as the optimal link.
Further, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have equal number of excellent links, the stacking link in the port direction of the stacking link with less hop count is determined as the optimal link.
Further, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the same number of excellent links exist on two stacked paths in two directions and the hop count is the same, determining that the stacked link in the port direction of the stacked link with the large stacked link bandwidth is the optimal link.
Further, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have equal number of excellent links, the passing hop count is the same, and the stacking link bandwidths in the port directions of the two stacking links are also equal, determining that the stacking link in the port direction of the stacking link with the small next hop equipment number is the optimal link.
Further, determining a preferred link for forwarding the multicast service packet to the destination receiving device includes:
determining that a link which passes through the direction with the minimum hop count and is transmitted to the target receiving equipment by the multicast service message is a preferred link;
when the hop counts of the links in two directions for forwarding the multicast message to the target receiving equipment are equal, setting the link in the direction with large link bandwidth stacked by the equipment as a preferred link; or
When the hop counts of the links in the two directions, which are forwarded to the destination receiving device by the multicast packet, are equal and the bandwidths of the stacked links in the two directions are equal, the link in the direction with the smaller device number of the next-hop device of the device is set as the preferred link.
Step 202: detecting whether the current residual bandwidth of the optimal link is sufficient, if so, the stacking equipment forwards multicast service message data to other stacking equipment by using the optimal link; and if the current residual bandwidth of the optimal link is insufficient, activating the non-optimal link to forward the multicast service message data to other stacking equipment.
Furthermore, the forwarding priority of the received multicast service message data is lower than the forwarding priority of the data transmitted in the optimal link at present;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: forwarding the received multicast service message data by a non-optimal link;
at this time, the method further includes: the data currently transmitted on the optimal link continues to be forwarded on the optimal link.
Further, the forwarding priority of the received multicast message is the same as the forwarding priority of the data transmitted in the optimal link at present;
the method further comprises the following steps: forwarding data with an early MAC address learning at the equipment to other stacking equipment by using the optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and forwarding the data with the later MAC address learning at the device to other stacking devices by using the non-optimal link.
Furthermore, the forwarding priority of the received multicast message data is the same as the forwarding priority of the data transmitted in the optimal link at present and the time for the equipment to learn the MAC address is the same,
the method further comprises the following steps: forwarding data with more output ports to other stacking equipment by using the optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and forwarding the port-less data to other stacking devices by using the non-optimal link.
Furthermore, the forwarding priority of the received multicast message data is higher than the data forwarding priority transmitted in the optimal link at present;
the method further comprises the following steps: forwarding the multicast service message data on the current optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and switching the data currently forwarded on the optimal link to the non-optimal link for forwarding.
Further, the activating the non-optimal link to forward the multicast service packet data to other stacking devices includes:
and when the bandwidth of the activated non-optimal link is insufficient and the forwarding priority of forwarding data on the non-optimal link is lower than the forwarding priority of forwarding data on the non-optimal link needing to be activated, forwarding the data needing to be forwarded by the non-optimal link with the non-optimal link, and discarding the data forwarded on the non-optimal link currently.
Further, when the bandwidth of the activated non-optimal link is insufficient, and the forwarding priority of the forwarding data on the non-optimal link is the same as the forwarding priority of the forwarding data on the non-optimal link, discarding the data which needs to be forwarded by the non-optimal link.
Further, the stacking system where the stacking device is located detects whether each stacking link in the stacking system has a fault according to a preset strategy, if no fault exists, the optimal link maintained before is continuously used for forwarding data, and if a fault occurs, a non-optimal link to be selected is started for forwarding data.
In an embodiment of the present invention, the preset policy may be an aperiodic detection or a periodic detection, where the aperiodic detection may be a detection performed by randomly selecting a time interval of each time from a plurality of setting values, or a detection performed by randomly selecting a random value as a time interval of each time within a time range; the regular detection is performed by setting a fixed detection period.
Further, when a certain device or a certain stacking link in the stacking system fails, timely notification is given, so that the device forwards data by using an alternative non-optimal link; and when the number of the stacking ports in the stacking link changes, a topology detection message is sent out in time to update the message of the stacking system.
Further, when two or more groups of data with different data forwarding priorities need to be forwarded in the selected stacking link port direction and the bandwidth of the selected stacking link port direction does not satisfy the two or more groups of data, the data with high data forwarding priority is forwarded in the selected stacking link port direction, and the data with low data forwarding priority exceeding the bandwidth of the selected stacking link port direction is forwarded in another stacking link port direction.
It should be noted that the forwarding priority of the protocol management packet is usually greater than the forwarding priority of the normal service packet, and the application preferentially ensures the forwarding of the packet with high priority, and the priority between the protocol management packets and the priority between the normal service packets are determined by each device chip.
It should be noted that, after the data forwarding on the optimal link is completed, the data forwarded by using the non-optimal link still uses the previously activated non-optimal link, and the switching is not performed, so as to avoid repeatedly switching the optimal link.
Further, when the selected stacking link port direction needs to forward two or more groups of data with the same data forwarding priority and the bandwidth of the selected stacking link port direction does not satisfy the two or more groups of data, comparing the sequence of the time when the stacking device learns the destination MAC address carried in the two or more groups of data, forwarding the data which learns the destination MAC address through the selected stacking link port direction first, and forwarding the data which learns the destination MAC address through the other stacking link port direction.
Further, when another stack link port direction needs to forward two or more sets of data with different forwarding priorities and the bandwidth of another stack link port direction does not satisfy the two or more sets of data, the method further comprises:
the data with lower priority is discarded.
Further, when another stack link port direction needs to forward two or more sets of data with the same forwarding priority and the bandwidth of another stack link port direction does not satisfy the two or more sets of data, the method further comprises:
one or more sets of data requested to be forwarded after discarding.
Further, the method further comprises:
the stacking device receives the topology detection message from a stacking link port on one side of the stacking device, detects whether the received topology detection message contains the device connection information of the stacking device, and records the stacking link from the stacking device to other stacking devices in the stacking system if the topology detection message contains the device connection information of the stacking device; and if not, filling the self equipment connection information into the topology detection message, and forwarding the topology detection message from the stacking link port on the other side of the self.
Further, the method further comprises:
after the stacking device is started, topology detection messages containing device connection information of the stacking device are respectively sent to stacking link ports on two sides of the stacking device, wherein the device connection information comprises device information of the stacking device and stacking link information.
Further, the device information includes a device number (UID) and a device MAC address; the stack link information includes a stack link port number, a number of stack physical ports in a stack link.
Optionally, the method further comprises:
each stacking device stores a data forwarding table;
according to a preset synchronization strategy, the stacking equipment encapsulates a locally recorded data forwarding table into a unicast management protocol message, and forwards the unicast management protocol message as new data to other stacking equipment in the stacking system according to an optimal link;
and the destination stacking equipment updates the table entry of the local data forwarding table by using the received data forwarding table in the unicast protocol message.
It should be noted that after receiving the message, each of the other stacking devices determines whether the destination MAC is its own MAC address, and if so, updates its own local data forwarding table entry according to the local data forwarding table entry carried in the message and does not forward the local data forwarding table entry; if not, the message is continuously forwarded to the final device to be synchronized according to the recorded optimal link.
Further, the method further comprises:
each stacking device stores a data forwarding table;
according to a preset synchronization strategy, the stacking equipment encapsulates a locally recorded data forwarding table into a unicast management protocol message, and forwards the unicast management protocol message as new data to main equipment in the stacking system in an optimal link;
after receiving the unicast management protocol message, the main device updates a local data forwarding table, packages the data forwarding table into a unicast management protocol message, and forwards the unicast management protocol message as new data to other stacking devices in the stacking system according to an optimal link;
and the destination stacking equipment updates the table entry of the local data forwarding table by using the received data forwarding table in the unicast protocol message.
It should be noted that after receiving the packet, each of the other devices continues to forward the packet to the host device according to the own recorded optimal link, after receiving the unicast management protocol packet, the host device updates the local data forwarding table, and then sends the updated local data forwarding table to each device according to the recorded unicast management protocol packet in which the optimal link takes the source MAC as its MAC and the destination MAC as its MAC, and after receiving the unicast management protocol packet, each device determines whether the destination MAC is its MAC, if so, updates the local data forwarding table, and does not forward the packet, and if not, continues to forward the packet to the destination device according to the own recorded optimal link.
Further, in order to avoid an excessive number of messages of the local data forwarding entries synchronized with each other between the devices in the stacking system, the local data forwarding entries maintained by the device may be synchronized to other devices according to a preset trigger condition. The preset triggering condition includes that the number of the newly updated local data forwarding table entries reaches a preset number, or the preset synchronization time is reached, and the local data forwarding table entries can be synchronized to other devices.
Optionally, a preset number may be preset (which may be determined according to device data or a device operating environment in an actual scene of the stacking system, or may be determined according to other factors in a specific scene), and when the updated local data forwarding entries of other devices that are not synchronized reach the preset number, each device in the stacking system synchronizes the local data forwarding entries to other devices.
Optionally, considering that each device needs to synchronize the local data forwarding entries each time when the number of the maintained local data forwarding entries reaches the preset number, a situation that the local data forwarding entries may not be synchronized in time may occur, a preset synchronization time (which may be set according to an actual scene of the stacking system) may also be set, and when each device determines that the preset synchronization time is reached, the local data forwarding entries are synchronized to other devices no matter whether the local data forwarding entries updated in the currently maintained local data forwarding entries and not synchronized with other devices reach the preset number or not.
Optionally, when an updated data forwarding entry exists in the maintained local data forwarding entries, the local data forwarding entries are immediately synchronized with other devices, and when no updated data forwarding entry exists, synchronization of the data forwarding entry is not allowed.
As shown in fig. 3, an embodiment of the present invention further provides a stacking apparatus, which includes a determining module 301 and a forwarding module 302, where:
a determining module 301, configured to determine, when receiving multicast service packet data, an optimal link for forwarding according to a destination receiving device of the multicast service packet data, and notify a forwarding module 302;
a forwarding module 302, configured to receive the notification from the determining module 301, detect whether the current remaining bandwidth of the optimal link is sufficient, and forward multicast service packet data to other stacking devices by using the optimal link if the current remaining bandwidth of the optimal link is sufficient; and if the current residual bandwidth of the optimal link is insufficient, activating the non-optimal link to forward the multicast service message data to other stacking equipment.
Further, the determining module 301, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data, includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have different numbers of excellent links, the stacking link in the stacking link port direction with the higher number of excellent links is determined as the optimal link.
Further, the determining module 301, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data, includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have equal number of excellent links, the stacking link in the port direction of the stacking link with less hop count is determined as the optimal link.
Further, the determining module 301, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data, includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the same number of excellent links exist on two stacked paths in two directions and the hop count is the same, determining that the stacked link in the port direction of the stacked link with the large stacked link bandwidth is the optimal link.
Further, the determining module 301, determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data, includes:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have equal number of excellent links, the passing hop count is the same, and the stacking link bandwidths in the port directions of the two stacking links are also equal, determining that the stacking link in the port direction of the stacking link with the small next hop equipment number is the optimal link.
Further, the determining module 301 determines a preferred link for forwarding the multicast service packet to the destination receiving device, including:
determining that a link which passes through the direction with the minimum hop count and is transmitted to the target receiving equipment by the multicast service message is a preferred link;
when the hop counts of the links in two directions for forwarding the multicast message to the target receiving equipment are equal, setting the link in the direction with large link bandwidth stacked by the equipment as a preferred link; or
When the hop counts of the links in the two directions, which are forwarded to the destination receiving device by the multicast packet, are equal and the bandwidths of the stacked links in the two directions are equal, the link in the direction with the smaller device number of the next-hop device of the device is set as the preferred link.
Furthermore, the forwarding priority of the received multicast service message data is lower than the forwarding priority of the data transmitted in the optimal link at present;
the step of the forwarding module 302 activating the non-optimal link to forward the multicast service packet data to other stacking devices is: and forwarding the received multicast service message data by using a non-optimal link.
At this time, the data currently transmitted on the optimal link continues to be forwarded on the optimal link.
Further, the forwarding priority of the received multicast message is the same as the forwarding priority of the data transmitted in the optimal link at present;
the forwarding module 302 is further configured to: forwarding data with an early MAC address learning at the equipment to other stacking equipment by using the optimal link;
the step of the forwarding module 302 activating the non-optimal link to forward the multicast service packet data to other stacking devices is: and forwarding the data with the later MAC address learning at the device to other stacking devices by using the non-optimal link.
Furthermore, the forwarding priority of the received multicast message data is the same as the forwarding priority of the data transmitted in the optimal link at present and the time for the equipment to learn the MAC address is the same,
the forwarding module 302 is further configured to: forwarding data with more output ports to other stacking equipment by using the optimal link;
the step of the forwarding module 302 activating the non-optimal link to forward the multicast service packet data to other stacking devices is: and forwarding the port-less data to other stacking devices by using the non-optimal link.
Furthermore, the forwarding priority of the received multicast message data is higher than the data forwarding priority transmitted in the optimal link at present;
the forwarding module 302 is further configured to: forwarding the multicast service message data on the current optimal link;
the step of the forwarding module 302 activating the non-optimal link to forward the multicast service packet data to other stacking devices is: and switching the data currently forwarded on the optimal link to the non-optimal link for forwarding.
Further, the activating the non-optimal link of the forwarding module 302 to forward the multicast service packet data to other stacked devices includes:
and when the bandwidth of the activated non-optimal link is insufficient and the forwarding priority of forwarding data on the non-optimal link is lower than the forwarding priority of forwarding data on the non-optimal link needing to be activated, forwarding the data needing to be forwarded by the non-optimal link with the non-optimal link, and discarding the data forwarded on the non-optimal link currently.
Further, when the bandwidth of the activated non-optimal link is insufficient, and the forwarding priority of the forwarding data on the non-optimal link is the same as the forwarding priority of the data that needs to be forwarded by the activated non-optimal link, the forwarding module 302 discards the data that needs to be forwarded by the activated non-optimal link.
The embodiment of the invention also provides a stacking system, which comprises a plurality of stacking devices as described in any one of the above, wherein each stacking device in the stacking system is connected through a stacking link port, and a stacking device is selected as a main device and a stacking device is selected as a standby device according to a preset selection rule, and the stacking devices except the main device and the standby device are all slave devices.
Further, the preset election rule comprises:
firstly, detecting whether the current main equipment exists in the stacking system and whether the current main equipment can be reached, and if the current main equipment exists and can be reached, setting the current main equipment as the main equipment of the stacking system;
if the current master equipment does not exist or the current master equipment is not reachable, detecting whether the stacking system has current standby equipment or not and whether the current standby equipment is reachable, and if the current standby equipment exists and the current standby equipment is reachable, setting the current standby equipment as the master equipment of the stacking system;
if no current standby equipment exists or the current standby equipment is not reachable, the equipment priorities of the stacking equipment are compared, the stacking equipment with the highest equipment priority is set as the main equipment of the stacking system, and the stacking equipment with the second highest equipment priority is set as the standby equipment of the stacking system.
Further, the preset election rule further includes:
if the stacking device containing the highest device priority comprises two or more than two stacking devices, comparing the system running time of the stacking device containing the highest device priority, setting the stacking device with longer system running time and containing the highest device priority as the main device of the stacking system, and setting the stacking device with shorter system running time and containing the highest device priority as the standby device of the stacking system.
Further, the preset election rule further includes:
if the system running time of two or more than two stacking devices containing the highest device priority is the same, comparing the MAC addresses of the stacking devices containing the highest device priority, setting the stacking device containing the highest device priority and smaller MAC address as the main device of the stacking system, and setting the stacking device containing the highest device priority and larger MAC address as the standby device of the stacking system.
It should be noted that if the stack device including the second highest device priority includes two or more stack devices, the standby devices of the stack system may be elected by an election method similar to the above-described method (i.e., comparing the system operating time or MAC address).
Further, the preset election rule further includes:
when the stacking system has a current main device and a current standby device, and the current main device and the current standby device are both accessible, setting the current main device as the main device of the stacking system, and setting the current standby device as the standby device of the stacking system;
when the stacking system has no current main equipment or the current main equipment is unreachable, and has current standby equipment and the current standby equipment is reachable, the current standby equipment is set as the main equipment of the stacking system, and the stacking equipment with the highest equipment priority except the main equipment is set as the standby equipment of the stacking system.
Further, the preset election rule further includes:
if the stacking device with the highest device priority except the main device comprises two or more than two stacking devices, comparing the system running time of the stacking device with the highest device priority except the main device, and setting the stacking device with longer system running time and the highest device priority except the main device as the standby device of the stacking system.
Further, the preset election rule further includes:
and if the system running times of two or more stacking devices with the highest device priority except the main device are the same, comparing the MAC addresses of the stacking devices with the highest device priority except the main device, and setting the stacking device with the highest device priority except the main device and smaller MAC address except the main device as the standby device of the stacking system.
The present invention is further explained by providing several preferred embodiments, but it should be noted that the preferred embodiments are only for better describing the present invention and should not be construed as unduly limiting the present invention. The following embodiments may exist independently, and technical features in different embodiments may be combined and used in one embodiment.
A ring stack system (containing more than or equal to 3 devices), each device in the ring stack system has a unique device number UID, a device MAC, and two stack link ports LID (LID-1 and LID-2) (each stack link port can have one or more stack physical ports), and stack role election is performed according to stack configuration information (such as device role state, device priority, system operation time, device MAC), in a stack system formed by a plurality of devices, only one master device, one standby device, the rest devices are slave devices, the master device is responsible for managing the whole stack system, the standby device operates as a backup device of the master device, when the master device fails, the standby device becomes a new master device to take over the work of the original master device to manage the whole stack system, and the plurality of slave devices reselect a new standby device, the other devices are slave devices, and when a slave device serving as a new master device fails, a new slave device selected from the plurality of slave devices is selected as a new master device, and a new slave device is selected from the remaining slave devices.
After each device in the stacking system is started, firstly, the topology of the whole stacking system is collected through interacting a topology detection message, wherein the topology detection message carries connection information of each device in the stacking system, and specifically comprises the connection information of a stacking link (including stacking link ports LID-1 or LID-2, the number of stacking physical ports in the stacking link, device numbers UID of each device and device MAC), after receiving the topology detection message, a neighbor device fills the connection information of the neighbor device into the topology detection message, then forwards the connection information containing the device and the connection information containing the neighbor device, and so on, when any device receives the topology detection message, firstly, whether the connection information of all devices contained in the topology detection message contains the device connection information of the device is judged, if not, filling own device connection information into the topology detection message, then forwarding, if the topology detection message contains own device connection information, terminating the topology detection message, and simultaneously acquiring connection information from the own device to other devices from the topology detection message, namely recording stacking links, two stacking link ports LID-1 or LID-2 from each device to other devices, the number of stacking physical ports in the stacking links, and the number of hops from each device to other devices.
After each device completes the topology collection of the stacked link, the role election stage is entered, and the role election rule is as follows:
(1) the current main equipment has priority (under the condition that no main equipment exists, the standby equipment has priority), and the stacking system cannot reselect the main equipment because new member equipment joins; when the stacking system is formed, all the added devices consider to be the master devices because no master device exists, and then the comparison of the next rule is continued;
(2) the priority of the equipment is high, if the priority is the same, the comparison of the next rule is continued;
(3) the priority of long system running time is that in the stacking system, the accuracy of the starting time interval of the member device depends on the device (for example, the device started within 1 minute is considered to be started at the same time), and then the comparison of the next rule is continued;
(4) the device MAC is small priority.
The optimal member equipment selected by the rules is the main equipment, the equipment directly connected with the main equipment is selected as the standby equipment according to the (2), (3) and (4) in the election rules, and other member equipment is the slave equipment.
After the main equipment, the standby equipment and the slave equipment are elected, each equipment elects one of the stacking links from the recorded 2 stacking links from the equipment to other equipment as an optimal link according to a set optimal link election principle of the multicast service message, and activates the optimal link for forwarding data from the equipment to each equipment; when one of the stacked links is activated as an optimal link for forwarding data, another link which is not optimal is temporarily not used for forwarding the data as an alternative link, and when the optimal link fails or the residual bandwidth does not meet the data forwarding requirement, the link which is not optimal is activated for forwarding the data.
And the annular stacking system detects whether each stacking link in the annular stacking system has a fault in an irregular way, if the stacking link in the annular stacking system has no fault, the optimal link maintained before is continuously used for forwarding data, and if the stacking link in the annular stacking system has a fault, the alternative non-optimal link is started for forwarding data. The irregular detection may be performed at the same time interval or at random time intervals; when a certain device or a certain stacking link in the annular stacking system fails, timely notification is given to enable the device or the stacking link to forward data by using the alternative non-optimal link; and when the number of the stacking ports in the stacking link changes, a topology detection message is sent out in time to update the connection information of the stacking link of the stacking system.
Because the multicast service message data to be forwarded has an output port not in the device (if the output port of the multicast service message is only the device, the forwarding is not needed), based on the service message data to be forwarded, the optimal link election process of the multicast service message data is performed by adopting the following steps, thereby determining the optimal link for forwarding:
step 1: finding out the position of an output port, wherein the output port may be on other devices (not limited to one device) in the stacking system due to being multicast service message data, setting a stacking link in the stacking link port direction needing to forward the multicast service message to the target receiving device and having the least hop count passing through other devices as a preferred link and a stacking link in the other stacking link port direction as a suboptimal link for each target receiving device, and executing step 4; when the stacked links with the same hop count appear, executing the next step 2;
in this step, the number of optimal links is actually determined for each destination receiving device; the destination receiving device can be determined according to the destination address carried in the multicast service message data;
step 2: setting a stacking link in a stacking link port direction with large stacking link bandwidth (namely, the stacking physical ports are large) of the equipment as a preferred link, and setting a stacking link in another stacking link port direction as a suboptimal link, and executing a step 4; when the stacked links with the same number of passed hops appear and the bandwidths of the stacked links in two directions are the same, executing the next step 3;
and step 3: setting a stacking link in the stacking link port direction with a small device number UID of the next hop device of the device as a preferred link, setting a stacking link in the stacking link port direction of the other stacking link as a suboptimal link, and executing the step 4;
and 4, step 4: judging the number of excellent links in the port direction of the two stacking links, and determining the stacking link in the port direction of the stacking link with more excellent links as an optimal link; if the number of the excellent links in the port direction of the two stacking links is equal, determining that the stacking link passing through the port direction of the stacking link with less hops to the farthest destination device is the optimal link; and if the number of the passed hops is the same, determining that the stacked link in the stacked link direction with the large stacked link bandwidth is the optimal link, and if the stacked link with the same number of the passed hops appears and the bandwidths of the stacked links in the two directions are the same, determining that the stacked link in the stacked link port direction with the small next hop equipment number UID is the optimal link.
After the optimal link is elected, when forwarding is carried out according to the multicast service message data forwarding method, the following steps are executed:
step 1: when no data is forwarded in the stacking link direction selected as the optimal link, activating the optimal link for forwarding the multicast service message data; otherwise, executing step 2;
step 2: when the stacking link selected as the optimal link is being used by data forwarding, and at the moment, new multicast service message data also needs to be forwarded by using the optimal link in the direction, firstly, the forwarding priority of the new multicast service message data and the forwarding priority of the data forwarded in the direction of the optimal link are judged, and if the forwarding priority of the data being forwarded is higher than the forwarding priority of the new multicast service message data, the step 3 is executed; if the forwarding priority of the data being forwarded is lower than the forwarding priority of the new multicast service message data, executing the step 4; if the forwarding priority of the data being forwarded is the same as the forwarding priority of the new multicast service message data, executing step 5;
in this step, generally, the forwarding priority of the protocol management packet is greater than the forwarding priority of the normal service packet, and the forwarding priority between the protocol management packets and the forwarding priority between the normal service packets are predetermined during system design and can be known by the device chip, and how to identify the protocol management packet and the normal service packet can be implemented by any manner known to those skilled in the art, which is not limited herein.
And step 3: if the forwarding priority of the data being forwarded is higher than that of the new multicast service message data, judging whether the stacking link port in the direction has residual bandwidth, and if the stacking link port in the direction has residual bandwidth and meets the bandwidth required by the new multicast service message data forwarding, continuously using the optimal link in the direction; if the bandwidth is used up or the remaining bandwidth does not meet the bandwidth required by forwarding the new multicast service message data, the new multicast service message data activates another stacked link (i.e. a non-optimal link) of the new multicast service message data as a link for forwarding data, and step 6 is executed; optionally, in order to avoid switching the optimal link repeatedly, after the forwarding of the data being forwarded is completed, that is, after the optimal link in the direction is released, the non-optimal link activated before is still used to forward the new multicast service packet data, and no switching is performed;
and 4, step 4: if the forwarding priority of the data being forwarded is lower than that of the new multicast service message data, the new multicast service message data uses the optimal link for data forwarding, and the data being forwarded needs to judge whether the stack link port in the direction has residual bandwidth or not, if so, the optimal link in the direction can be continuously used; if the bandwidth is exhausted or the remaining bandwidth does not meet the bandwidth required by the forwarding of the data being forwarded, the data being forwarded activates another stacked link (i.e. a non-optimal link) as a link for data forwarding, and step 6 is executed;
and 5: if the forwarding priority of the data being forwarded is the same as the forwarding priority of the new multicast service message data, judging whether the stacking link port in the direction has residual bandwidth, and if the stacking link port in the direction has residual bandwidth and meets the bandwidth required by the new multicast service message data forwarding, continuously using the optimal link in the direction; if the bandwidth is used up or the remaining bandwidth does not meet the bandwidth required by the data forwarding of the new multicast service message, according to the sequence of the learning time of the MAC address, firstly learning the data of the MAC address to continue the data forwarding from the optimal link, then learning the data forwarding of the MAC address to activate another stacked link (namely, a non-optimal link) as a forwarding link to perform the data forwarding, and executing the step 6; if the MAC addresses are learned simultaneously, comparing the number of output ports of the optimal link used by the data being forwarded with the number of output ports of the optimal link for forwarding the new multicast service message data, if the party with more output ports forwards the data according to the optimal link, and the party with less output ports can only activate another stacked link as a forwarding link, executing step 6;
step 6: when the non-optimal link needs to be activated as a forwarding link, judging whether data is forwarded in the direction of the non-optimal link, if no data is forwarded, directly activating the non-optimal link as the forwarding link to forward the data; if the data is forwarded, continuously judging the priority of data forwarding, if the forwarding priority of the data needing to activate the non-optimal link as a forwarding link is higher than the forwarding priority of the data being forwarded on the link, judging the residual bandwidth, and if the residual bandwidth meets the requirement that the data needing to activate the non-optimal link as the forwarding link is used for forwarding, activating the non-optimal link as the forwarding link for data forwarding; if the residual bandwidth does not meet the requirement of activating the non-optimal link as the data of the forwarding link for forwarding, discarding the data being forwarded on the non-optimal link, and activating the non-optimal link for forwarding the data of the link needing to be activated as the forwarding link; if the forwarding priority of the data needing to activate the non-optimal link as the forwarding link is lower than the forwarding priority of the data being forwarded in the stacking link direction, judging the residual bandwidth, and if the residual bandwidth meets the requirement that the data needing to activate the non-optimal link as the forwarding link is used for forwarding, activating the non-optimal link as the forwarding link for data forwarding; if the residual bandwidth does not meet the requirement that the non-optimal link needing to be activated is used as the data of the optimal link for forwarding, discarding the data of the non-optimal link needing to be activated as the forwarding link; if the forwarding priority of the data needing to activate the non-optimal link as the forwarding link is the same as the forwarding priority of the data being forwarded on the stacking link, judging the residual bandwidth, and if the residual bandwidth meets the requirement that the data needing to activate the non-optimal link as the forwarding link is used for forwarding, activating the non-optimal link as the forwarding link for data forwarding; and if the residual bandwidth does not meet the requirement that the non-optimal link is required to be activated as the data of the forwarding link for forwarding, discarding the data of the non-optimal link which is required to be activated as the optimal link. And in order to avoid switching the optimal link repeatedly, when the optimal link in the direction is released, the other stacking link activated before is still used as the optimal link, and the switching is not carried out.
Therefore, after receiving the multicast service message, searching a local data forwarding table entry, finding that the table entry exists, activating an optimal link according to the optimal link election principle of the known multicast service message by the equipment to forward the known multicast service message, and simultaneously recording message sending information (recording a source MAC of the multicast service message and an optimal link port number LID1 or LID 2); when the device receives the multicast message from the stacking link again, the recorded message sending information and the received message information need to be compared, the judgment is carried out by comparing the source MAC of the known multicast service message recorded by the device with the optimal link port number, and if the message is judged to be forwarded from the stacking link and received from the other stacking link, the message is directly discarded; if the message is judged not to be over-forwarded, the message is directly forwarded.
As shown in fig. 4, after the devices UID1, UID2, UID3, UID4, UID5, UID6, UID7, UID8, UID9, and UID10 are started (assuming that the bandwidths on each stacking link are the same), the topology of the whole stacking system is collected by interacting topology detection messages, and each device records 2 stacking links of each device; then, role election is carried out, the final election result UID1 is a main device, UID2 is a standby device, and other devices are slave devices;
then, after the UID receives the multicast service message A, searching a local data forwarding table entry corresponding to the multicast service message A, finding that a local data forwarding table entry corresponding to the multicast service message A exists, wherein the exit ports are respectively arranged on the UID, the UID and the UID, the optimal links recorded by the UID in the stacking link port direction LID are respectively UID-UID, UID-UID-UID-UID, the number 3 of the optimal links in the stacking link port direction LID is greater than the number 2 of the optimal links in the stacking link port direction LID, selecting the optimal links in the stacking link port direction LID as optimal links for data forwarding, meanwhile, message sending information is recorded (the source MAC and the optimal link port number LID1 of the multicast service message A are recorded); then judging whether data is being forwarded or not in the direction, if no data is being forwarded, using the optimal link in the direction to forward the data, sending the multicast service message A out through a stack link port direction LID1 of UID3 and through an UID3-UID4 optimal link to UID4, then forwarding the multicast service message A out from an output port on UID4, sending the multicast service message A out through a stack link port direction LID1 of UID4 and through an UID4-UID5 optimal link to UID 53, sending out through a stack link port direction LID1 of UID5 and through an UID5-UID6 optimal link to UID6, then forwarding the multicast service message A out from an output port on UID6, sending the multicast service message A out through a stack link port direction LID 6 of UID6 and through an UID6-UID 6 optimal link to UID6, then forwarding the multicast service message A from the output port on UID6, and simultaneously sending the multicast service message A out through the stack link direction LID 6 and through the UID6 and through the UI, forwarding the multicast service message A from an output port on the UID8, sending the multicast service message A out through a stacked link port direction LID1 of the UID8 to reach the UID9 through an optimal link of UID8-UID9, forwarding the multicast service message A out from an output port on the UID9, then after the multicast service message A reaches the UID3 through UID9-UID10-UID1-UID2-UID3 (because the message sending information is recorded by the equipment), when the message is received again from the other stacked link port direction LID2, whether the message sending information recorded by the equipment is consistent with the currently received message needs to be checked, and the message is directly discarded after the message is judged to have been forwarded from the stacked link port direction LID 1;
at this time, if a multicast service packet B is received from the UID3, a local data forwarding entry corresponding to the multicast service packet B is searched, it is found that there is a local data forwarding entry corresponding to the multicast service packet B, the output ports are respectively at UID5, UID10, the optimal links recorded by UID3 are respectively UID3-UID4-UID5 for the optimal link in the stacking link port direction LID1, the optimal links in the stacking link port direction LID2 are UID3-UID2-UID1-UID10, the number 1 of the optimal links in the stacking link port direction LID1 is equal to the number 1 of the optimal links in the stacking link port direction LID2, the optimal links in the stacking link port direction LID1 pass through 1, the optimal links in the stacking link port direction LID2 pass through 2 hops, the optimal links in the stacking link port direction LID1 with a small number of hops are activated as the optimal links for data forwarding, and then it is determined whether there is data forwarding in the optimal link direction, because there is a multicast service packet a being forwarded, the forwarding priority of data forwarding is determined, for example, as if the multicast service packet is a multicast service packet and the priority is the same, the remaining bandwidth in the direction LID1 of the port of the stacking link is determined, and if the remaining bandwidth is present and the bandwidth required for forwarding the multicast service packet B is satisfied, the optimal link in the direction can be continuously used; simultaneously recording a source MAC and an optimal link port number LID1 which send the multicast service message B; the multicast service message B is sent out through a stacked link port direction LID1 of UID3, reaches the UID4 through an optimal link of UID3-UID4-UID5, and then is forwarded out from an output port on UID5, meanwhile, the multicast service message B reaches the UID10 through UID5-UID6-UID7-UID8-UID9-UID10, then is forwarded out from the output port on UID10, and then reaches the UID3 through UID10-UID1-UID2-UID3, and then the message is judged to be forwarded, and then is directly discarded; if the bandwidth is used up or the remaining bandwidth does not satisfy the bandwidth required for forwarding the multicast service message B, the MAC learning time of the multicast service message a and the MAC learning time of the multicast service message B need to be compared, and since the MAC learning time of the multicast service message a is earlier than the MAC learning time of the multicast service message B, the multicast service message B needs to deactivate another stacking link port direction LID2 to forward data, that is, the optimal link UID3-UID2-UID1-UID10-UID9-UID8-UID7-UID6-UID5, and simultaneously record the source MAC sending the multicast service message B and the optimal link port number LID 1;
at this time, the multicast service message C is received from the UID6 (assuming that the multicast service message a performs data forwarding by using the stacked link LID1 of the UID3, the multicast service B performs data forwarding by using the stacked link LID2 of the UID3, and the remaining bandwidths in the stacked link directions of the LID1 and the LID2 of the UID3 do not satisfy the data forwarding of the multicast service message C), a local data forwarding entry corresponding to the multicast service message C is searched, a local data forwarding entry corresponding to the multicast service message C exists, exit ports respectively exist in the UID7, the UID8, and the UID6, the preferred links recorded in the stack link port direction LID1 are respectively UID 6-7, UID6-UID7-UID8, the stack link port direction LID2 has no preferred link, the preferred link in the stack link port direction LID1 of the UID6 is activated as an optimal link for data forwarding, and the forwarding priority of the data forwarding is determined, and the forwarding priority is the same, judging the residual bandwidth of the stacked link port direction LID1, finding that the residual bandwidth does not satisfy the forwarding of the multicast service message C, deactivating another stacked link port direction LID2 by the multicast service message C according to the MAC address learning front and back principle, finding that data is being forwarded in the other stacked link port direction LID2, judging the forwarding priority of the data forwarding, finding that the forwarding priorities are the same, judging the residual bandwidth of the stacked link port direction LID2, finding that the residual bandwidth does not satisfy the forwarding of the multicast service message C, and directly discarding C.
The invention solves the problem of multicast service data forwarding link selection in the annular stacking system, wherein bandwidth utilization rate in the annular stacking system is improved and traffic congestion in the stacking system is relieved simultaneously by the known multicast service message optimal link election principle and forwarding method.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits, and accordingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A data transmission method applied to an annular stacking system including a plurality of stacking apparatuses, the method comprising:
each stacking device locally stores link information from the device to other devices in the annular stacking system, when receiving multicast service message data, the stacking device determines an optimal link for forwarding according to a target receiving device of the multicast service message data, and if the current residual bandwidth of the optimal link meets the requirement of forwarding the multicast service message data, the stacking device forwards the multicast service message data to other stacking devices by using the optimal link; and if the current residual bandwidth of the optimal link does not meet the requirement of forwarding the multicast service message data, activating the non-optimal link to forward the multicast service message data to other stacking equipment.
2. The data transmission method according to claim 1, wherein determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data comprises:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have different numbers of excellent links, the stacking link in the stacking link port direction with the higher number of excellent links is determined as the optimal link.
3. The data transmission method according to claim 1, wherein determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data comprises:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have equal number of excellent links, the stacking link in the port direction of the stacking link with less hop count is determined as the optimal link.
4. The data transmission method according to claim 1, wherein determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data comprises:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the same number of excellent links exist on two stacked paths in two directions and the hop count is the same, determining that the stacked link in the port direction of the stacked link with the large stacked link bandwidth is the optimal link.
5. The data transmission method according to claim 1, wherein determining an optimal link for forwarding according to the destination receiving device of the multicast service packet data comprises:
determining a preferred link for forwarding the multicast service message data to each destination receiving device;
when the stacking links in the two directions have equal number of excellent links, the passing hop count is the same, and the stacking link bandwidths in the port directions of the two stacking links are also equal, determining that the stacking link in the port direction of the stacking link with the small next hop equipment number is the optimal link.
6. The data transmission method according to any one of claims 2 to 5, wherein determining the optimal link for forwarding the multicast service packet to the destination receiving device comprises:
determining that a link which passes through the direction with the minimum hop count and is transmitted to the target receiving equipment by the multicast service message is a preferred link;
when the hop counts of the links in two directions for forwarding the multicast message to the target receiving equipment are equal, setting the link in the direction with large link bandwidth stacked by the equipment as a preferred link; or
When the hop counts of the links in the two directions, which are forwarded to the destination receiving device by the multicast packet, are equal and the bandwidths of the stacked links in the two directions are equal, the link in the direction with the smaller device number of the next-hop device of the device is set as the preferred link.
7. The data transmission method according to claim 1, wherein the forwarding priority of the received multicast service packet data is lower than the forwarding priority of the data currently transmitted on the optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: forwarding the received multicast service message data by a non-optimal link;
at this time, the method further includes: the data currently transmitted on the optimal link continues to be forwarded on the optimal link.
8. The data transmission method according to claim 1, wherein the forwarding priority of the received multicast packet is the same as the forwarding priority of the data currently transmitted on the optimal link;
the method further comprises the following steps: forwarding data with an early MAC address learning at the equipment to other stacking equipment by using the optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and forwarding the data with the later MAC address learning at the device to other stacking devices by using the non-optimal link.
9. The data transmission method according to claim 1, wherein the forwarding priority of the received multicast message data is the same as the forwarding priority of the data currently transmitted on the optimal link and the same MAC address learning time is performed at the present device,
the method further comprises the following steps: forwarding data with more output ports to other stacking equipment by using the optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and forwarding the port-less data to other stacking devices by using the non-optimal link.
10. The data transmission method according to claim 1, wherein the forwarding priority of the received multicast packet data is higher than the forwarding priority of the data currently transmitted in the optimal link;
the method further comprises the following steps: forwarding the multicast service message data on the current optimal link;
the step of activating the non-optimal link to forward the multicast service message data to other stacking equipment is as follows: and switching the data currently forwarded on the optimal link to the non-optimal link for forwarding.
11. The data transmission method according to claim 1, wherein the activating the non-optimal link to forward the multicast service packet data to other stacking devices comprises:
and when the bandwidth of the activated non-optimal link is insufficient and the forwarding priority of forwarding data on the non-optimal link is lower than the forwarding priority of forwarding data on the non-optimal link needing to be activated, forwarding the data needing to be forwarded by the non-optimal link with the non-optimal link, and discarding the data forwarded on the non-optimal link currently.
12. The data transmission method according to claim 11, wherein when the bandwidth of the activated non-optimal link is insufficient and the forwarding priority of the forwarding data on the non-optimal link is the same as the forwarding priority of the forwarding data on the non-optimal link, the data to be forwarded by the non-optimal link is discarded.
13. A stacking device, comprising a determining module and a forwarding module, the stacking device locally storing link information of the device to other devices in a ring stacking system, wherein:
the determining module is used for determining an optimal link for forwarding according to the destination receiving equipment of the multicast service message data and informing the forwarding module when the multicast service message data is received;
a forwarding module, configured to receive the notification from the determining module, detect whether the current remaining bandwidth of the optimal link is sufficient, and forward multicast service packet data to other stacking devices by using the optimal link if the current remaining bandwidth of the optimal link satisfies the forwarding of multicast service packet data; and if the current residual bandwidth of the optimal link does not meet the requirement of forwarding the multicast service message data, activating the non-optimal link to forward the multicast service message data to other stacking equipment.
14. A stacking system comprising a plurality of stacking apparatuses as claimed in claim 13, wherein the stacking apparatuses in the stacking system are connected via stacking link ports, and a stacking apparatus is selected as a master apparatus and a stacking apparatus is selected as a slave apparatus according to a preset election rule, and the stacking apparatuses other than the master apparatus and the slave apparatus are all slave apparatuses.
CN201711351207.3A 2017-12-15 2017-12-15 Data transmission method, stacking equipment and stacking system Active CN108282406B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711351207.3A CN108282406B (en) 2017-12-15 2017-12-15 Data transmission method, stacking equipment and stacking system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711351207.3A CN108282406B (en) 2017-12-15 2017-12-15 Data transmission method, stacking equipment and stacking system

Publications (2)

Publication Number Publication Date
CN108282406A CN108282406A (en) 2018-07-13
CN108282406B true CN108282406B (en) 2021-03-23

Family

ID=62801745

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711351207.3A Active CN108282406B (en) 2017-12-15 2017-12-15 Data transmission method, stacking equipment and stacking system

Country Status (1)

Country Link
CN (1) CN108282406B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109302488B (en) * 2018-10-31 2022-02-11 新华三信息技术有限公司 Equipment cascading method, device and host
CN114070803A (en) * 2021-12-28 2022-02-18 苏州盛科通信股份有限公司 Data stream transmission method and device, storage medium and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534231A (en) * 2009-04-17 2009-09-16 杭州华三通信技术有限公司 Method, system and equipment for transmitting data in elastic grouping ring
CN101605102A (en) * 2009-07-16 2009-12-16 杭州华三通信技术有限公司 Load sharing method during a kind of IRF piles up and device
CN102195883A (en) * 2011-05-23 2011-09-21 北京星网锐捷网络技术有限公司 Method for determining multicast routing and method and device for forwarding multicast message
CN102857436A (en) * 2012-09-10 2013-01-02 杭州华三通信技术有限公司 Flow transmission method and flow transmission equipment based on IRF (intelligent resilient framework) network
US8477638B2 (en) * 2008-12-02 2013-07-02 Cisco Technology, Inc. Latency enhancements for multicast traffic over spatial reuse protocol (SRP)
US8570857B2 (en) * 2006-04-07 2013-10-29 At&T Intellectual Property I, Lp Resilient IP ring protocol and architecture
CN104579982A (en) * 2015-01-06 2015-04-29 杭州华三通信技术有限公司 Second-layer multicast data message forwarding method and device
CN105323170A (en) * 2014-06-24 2016-02-10 中兴通讯股份有限公司 Path selecting method and apparatus of ring topology stacking system, and master apparatus of ring topology stacking system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8570857B2 (en) * 2006-04-07 2013-10-29 At&T Intellectual Property I, Lp Resilient IP ring protocol and architecture
US8477638B2 (en) * 2008-12-02 2013-07-02 Cisco Technology, Inc. Latency enhancements for multicast traffic over spatial reuse protocol (SRP)
CN101534231A (en) * 2009-04-17 2009-09-16 杭州华三通信技术有限公司 Method, system and equipment for transmitting data in elastic grouping ring
CN101605102A (en) * 2009-07-16 2009-12-16 杭州华三通信技术有限公司 Load sharing method during a kind of IRF piles up and device
CN102195883A (en) * 2011-05-23 2011-09-21 北京星网锐捷网络技术有限公司 Method for determining multicast routing and method and device for forwarding multicast message
CN102857436A (en) * 2012-09-10 2013-01-02 杭州华三通信技术有限公司 Flow transmission method and flow transmission equipment based on IRF (intelligent resilient framework) network
CN105323170A (en) * 2014-06-24 2016-02-10 中兴通讯股份有限公司 Path selecting method and apparatus of ring topology stacking system, and master apparatus of ring topology stacking system
CN104579982A (en) * 2015-01-06 2015-04-29 杭州华三通信技术有限公司 Second-layer multicast data message forwarding method and device

Also Published As

Publication number Publication date
CN108282406A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
US8619546B2 (en) Method and apparatus for coping with link failures in central control plane architectures
US7675869B1 (en) Apparatus and method for master election and topology discovery in an Ethernet network
EP2045965B1 (en) Resource state monitoring method, device and communication network
US7869439B1 (en) Varying packet switch behavior based on a quantity of virtual interfaces associated with a virtual switch
US20060092856A1 (en) Node device
JP2006229967A (en) High-speed multicast path switching
CN104980372A (en) Relay System And Switching Device
US20150365320A1 (en) Method and device for dynamically switching gateway of distributed resilient network interconnect
CN101854283B (en) Communication method and equipment of RPR (Resilient Packet Ring) looped network
CN104980349A (en) Relay System and Switching Device
US9800521B2 (en) Network switching systems and methods
CN103607293B (en) A kind of flow rate protecting method and equipment
CN100518142C (en) Method for preventing network interruption caused by address aging and time inconformity
EP2599270B1 (en) A network device and method of routing traffic
CN113328916B (en) BFD detection mode switching method, device and equipment
JP2021526331A (en) Network topology generation method and equipment
US8797847B2 (en) Network relay device and control method thereof
CN101909006B (en) BFD (Bidirectional Forwarding Detection) message sending and receiving methods as well as device and communication system thereof
CN108282406B (en) Data transmission method, stacking equipment and stacking system
CN106789521A (en) A kind of ring network fault reverse method and link point
CN108199986B (en) Data transmission method, stacking equipment and stacking system
CN101340377B (en) Method, apparatus and system for data transmission in double layer network
CN112995002B (en) Switch ring network design method, switch and storage medium
CN114244736A (en) Multi-master detection method, equipment and medium based on stacking environment
US20230164080A1 (en) Load balancing method, apparatus, and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant