CN114979037B - Multicast method, device, switch and storage medium - Google Patents

Multicast method, device, switch and storage medium Download PDF

Info

Publication number
CN114979037B
CN114979037B CN202210749307.6A CN202210749307A CN114979037B CN 114979037 B CN114979037 B CN 114979037B CN 202210749307 A CN202210749307 A CN 202210749307A CN 114979037 B CN114979037 B CN 114979037B
Authority
CN
China
Prior art keywords
multicast
switch
pim
table item
software table
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
CN202210749307.6A
Other languages
Chinese (zh)
Other versions
CN114979037A (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.)
Beijing Armyfly Technology Co Ltd
Original Assignee
Beijing Armyfly 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 Beijing Armyfly Technology Co Ltd filed Critical Beijing Armyfly Technology Co Ltd
Priority to CN202210749307.6A priority Critical patent/CN114979037B/en
Publication of CN114979037A publication Critical patent/CN114979037A/en
Application granted granted Critical
Publication of CN114979037B publication Critical patent/CN114979037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/552Prevention, detection or correction of errors by ensuring the integrity of packets received through redundant connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/557Error correction, e.g. fault recovery or fault tolerance

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a multicast method, a multicast device, a switch and a storage medium. Comprising the following steps: receiving a PIM-DM multicast software table item of a first dense mode independent multicast protocol sent by a first switch; when the first switch is determined to be faulty, updating a second PIM-DM multicast software table item of the first PIM-DM multicast software table item; and receiving the flow sent by the current multicast source, and multicasting the flow to the appointed receiving equipment according to the updated second PIM-DM multicast software table item. By acquiring the first PIM-DM multicast software item of the first switch, when the first interaction machine fails and the second switch is updated to a new main switch, the second PIM-DM multicast software item of the second switch can be updated according to the first PIM-DM multicast software item, so that the second switch can acquire the multicast path of the current multicast source and multicast according to the acquired multicast path, and the appointed receiving equipment can receive multicast traffic information even if the first switch fails.

Description

Multicast method, device, switch and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a multicast method, a device, a switch, and a storage medium.
Background
Multicast is a data transmission mode between unicast and broadcast, that is, the destination address of a data frame is a multicast address, and a transmitting end only transmits the data frame to a plurality of receiving ends belonging to a multicast group. When a multicast source device multicasts a message to a receiver device, it is generally necessary to multicast the message by means of a switch, as shown in fig. 1, which is a schematic diagram of a redundant network for multicasting in the prior art.
In the stand-alone state, device1 is the multicast source host, and Device2 and Device3 are hosts for receiving multicast messages. However, on the premise that the grouping has been successful, when the master switch fails, after the master switch is restarted in a burst, the multicast traffic message cannot be received after the Device2 and the Device3 are grouped.
Disclosure of Invention
The invention provides a multicast method, a device, a switch and a storage medium, which can ensure that a standby switch can be used for multicast under the condition that an original main switch fails.
According to an aspect of the present invention, there is provided a multicast method, including: receiving a first dense mode independent multicast protocol PIM-DM multicast software table item sent by a first switch, wherein the first switch is a main switch, and the first PIM-DM multicast software table item contains a multicast path of a current multicast source;
when the first switch is determined to be faulty, updating a second PIM-DM multicast software table item of the first PIM-DM multicast software table item by the first PIM-DM multicast software table item;
and receiving the flow sent by the current multicast source, and multicasting the flow to the appointed receiving equipment according to the updated second PIM-DM multicast software table item.
According to another aspect of the present invention, there is provided a multicast apparatus including:
the PIM-DM multicast software table item acquisition module is used for receiving a PIM-DM multicast software table item of a first intensive mode independent multicast protocol sent by a first switch, wherein the first switch is a main switch, and the first PIM-DM multicast software table item comprises a multicast path of a current multicast source;
the historical PIM-DM multicast software table item updating module is used for updating the historical PIM-DM multicast software table item of the first PIM-DM multicast software table item when the first switch is determined to be faulty;
and the multicast module is used for receiving the flow sent by the current multicast source and multicasting the flow to the appointed receiving equipment according to the updated second PIM-DM multicast software table item.
According to another aspect of the present invention, there is provided a switch including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of any one of the embodiments of the present invention.
According to another aspect of the invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to perform the method according to any of the embodiments of the invention.
According to the technical scheme of the embodiment of the invention, through acquiring the first PIM-DM multicast software table of the first switch, when the first interaction machine fails, and the second switch is updated to a new main switch, the second PIM-DM multicast software table of the second switch can be updated according to the first PIM-DM multicast software table, so that the second switch can acquire the multicast path of the current multicast source and multicast according to the acquired multicast path, and the specified receiving equipment can receive multicast flow information even if the first switch fails.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a redundant network for multicasting according to the prior art of the present invention;
fig. 2 is a flowchart of a multicast method according to a first embodiment of the present invention;
fig. 3 is a flowchart of a multicast method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a multicast device according to a third embodiment of the present invention;
fig. 5 is a schematic diagram of a switch implementing an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 2 is a flowchart of a multicast method according to an embodiment of the present invention, where the method may be performed by a multicast device, and the multicast device may be implemented in hardware and/or software. As shown in fig. 1, the method includes:
step S101, a first dense mode independent multicast protocol PIM-DM multicast software table item sent by a first switch is received.
The first switch is a master switch, and a multicast path of a current multicast source is included in a multicast software table of a first Dense Mode independent multicast protocol (Protocol Independent Multicast-Dense Mode, PIM-DM).
Specifically, before multicasting, device1 broadcasts a message to servers in a communication range through a switch, and Device1 may support a plurality of group addresses, and each group address supported by Device1, for example 225.1.1.1 and 225.2.1.3, is included in the broadcast message. When Device2 and Device3 receive the broadcast message, if they want to join in the group address 225.1.1.1 and receive the multicast message sent by Device1, a group addition request may be sent to Device1 by the first switch, that is, the master switch, and Device1 joins Device2 and Device3 under the group address 225.1.1.1 according to the group addition request of Device1 and Device2 and multicasts to devices 2 and 3 belonging to 225.1.1.1.
It should be noted that, after receiving the group adding request of Device2 and Device3, the switch creates a first PIM-DM multicast software table according to the group adding request, where the first software table includes a multicast path including the current multicast source, for example, records (192.168.100.100,225.1.1.1) a matching relationship between the IP address of Device2 and the group address of Device1, that is, the Device2 is used as a receiving Device, and adds to the multicast source Device1 under the group address 225.1.1.1; the reception Device2 uses the multicast source Vlan100 and Vlan101 to receive the message transmitted by Device1, which describes the paths Vlan100 and Vlan 101. Similarly, a matching relationship between the IP address of Device3 and the group address of Device1 (192.168.102.100,225.1.1.1) is also described, that is, device3 is used as a receiving Device and added to the multicast source Device1 at the group address 225.1.1.1; the reception Device3 uses the multicast source Vlan100 and Vlan101 to receive the message transmitted by Device1, which describes the paths Vlan100 and Vlan 101.
Optionally, receiving a first dense mode independent multicast protocol PIM-DM multicast software table item sent by the first switch, including: sending a first heartbeat message to a first switch at regular time; and receiving a first PIM-DM multicast software table item fed back by the first switch in response to the first heartbeat message.
Specifically, the Device1 does not participate in the creation of the multicast software table when it broadcasts for the first time. However, the first exchanger and the second interaction machine can mutually send heartbeat messages, and the working state of the opposite party can be timely obtained by receiving the heartbeat messages of the opposite party. And the second switch sends the first heartbeat message to the first switch at fixed time, so that when the first switch determines that the second switch is in a normal working state according to the acquired first heartbeat message, the second switch receives the first PIM-DM multicast software table item which is created before the first switch responds to the feedback of the first heartbeat message, and the second switch can conveniently and timely solve the specific multicast path of the multicast source.
Step S102, when the first switch is determined to be faulty, the first PIM-DM multicast software table item is updated to the second PIM-DM multicast software table item.
When the first switch works normally, the second switch only stores the first PIM-DM multicast software list item, the second switch also stores the second PIM-DM multicast software list item adopted when the history is multicast, and the second PIM-DM multicast software list item is irrelevant to the multicast of the multicast source. Since the second switch as the standby switch does not need to participate in the multicast operation when the first switch as the main switch is operating normally, the second switch does not need to update its own second PIM-DM multicast software entry according to the first PIM-DM multicast software entry.
Optionally, when determining that the first switch fails, updating the historical PIM-DM multicast software table item of the first PIM-DM multicast software table item includes: monitoring a second heartbeat message sent by the first switch, and determining that the first switch fails when the second heartbeat message is not received within a preset time range; the virtual router redundancy protocol VRRP is switched and upgraded into a main switch; and retrieving the first PIM-DM multicast software table item from the database, and replacing the second PIM-DM multicast software table item of the first PIM-DM multicast software table item by the first PIM-DM multicast software table item so as to update the second PIM-DM multicast software table item.
Specifically, the second switch monitors the second heartbeat packet sent by the first switch, and if it is determined that the second heartbeat packet is not received within the specified time range, it indicates that the network of the first switch is interrupted or the first switch device is abnormal, and at this time, it can be determined that the first switch has a fault. The sending frequencies of the second heartbeat message and the first heartbeat text may be different, and in this embodiment, specific sending frequencies of the first heartbeat message and the second heartbeat message are not limited. When the second switch determines that the first switch is abnormal according to the heartbeat monitoring result, the second switch can be updated to a new master switch through a virtual routing redundancy protocol (Virtual Router Redundancy Protocol, VRRP), after the new master switch is updated, the new master switch needs to carry forward work of multicast messages, and when forwarding the multicast messages, the multicast path is determined by referring to a second PIM-DM multicast software table item of the second switch, and the multicast path recorded by the second PIM-DM multicast software table item at the moment or a history multicast path is obviously irrelevant to the multicast path of the current multicast source, so that the first PIM-DM multicast software table item received by the first switch during normal conditions needs to be called out, and the first PIM-DM multicast software table item is updated to the second PIM-DM multicast software table item of the second switch.
Optionally, after the virtual router redundancy protocol VRRP is switched and upgraded to the master switch, the method further includes: and sending the VRR switching result to the current multicast source so that the current multicast source can record and update the identity of the main switch.
It should be noted that, after the multicast switching is performed, the second switch that normally works also needs to send the multicast switching result to the current multicast source, i.e. Device1, so as to timely inform the current multicast source that the second switch is a new master switch, so as to avoid the situation that the Device1 still performs multicast through the original master switch, i.e. the first switch, under the condition that the master switch is not known to be replaced, and the multicast fails.
Step S103, receiving the flow sent by the current multicast source, and multicasting the flow to the appointed receiving equipment according to the updated second PIM-DM multicast software table item.
Optionally, receiving the traffic sent by the current multicast source, multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table item, including: receiving traffic sent by a current multicast source, wherein the traffic contains attribute information; and when the traffic is determined to be multicast traffic according to the attribute information, multicasting the traffic to the appointed receiving equipment according to the updated second PIM-DM multicast software table item.
Specifically, after the second switch is upgraded to the main switch, when the second switch receives the traffic sent by the current multicast source Device1, because the attribute information of the traffic includes a multicast flag or a broadcast flag, when the attribute information is determined to include the multicast flag, it is determined that the traffic needs to be multicast, and at this time, the traffic is multicast to the designated receiving Device according to the updated second PIM-DM multicast software table, for example, the updated second PIM-DM multicast software table is: recording the (192.168.100.100,225.1.1.1) matching relationship between the IP address of the Device2 and the group address of the Device1, namely, adding the Device2 as a receiving Device to the group address 225.1.1.1 of the multicast source Device 1; the reception Device2 uses the multicast source Vlan100 and Vlan101 to receive the message transmitted by Device1, which describes the paths Vlan100 and Vlan 101. Similarly, a matching relationship between the IP address of Device3 and the group address of Device1 (192.168.102.100,225.1.1.1) is also described, that is, device3 is used as a receiving Device and added to the multicast source Device1 at the group address 225.1.1.1; the reception Device2 uses the multicast source Vlan100 and Vlan101 to receive the message transmitted by Device1, which describes the paths Vlan100 and Vlan 101. Therefore, according to the second PIM-DM multicast software table item, it can be known that the multicast objects, that is, the receiving devices are Device2 and Device3, and the paths adopted by the receiving devices are Vlan100 and Vlan101, so as to implement multicast of the traffic sent by the multicast source to the designated receiving Device.
Optionally, before multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table item, the method further includes: inquiring global configuration information; and determining that the VRRP is configured according to the global configuration information.
According to the embodiment of the application, by acquiring the first PIM-DM multicast software item of the first switch, when the first interaction machine fails and the second switch is updated to a new main switch, the second PIM-DM multicast software item of the second switch can be updated according to the first PIM-DM multicast software item, so that the second switch can acquire the multicast path of the current multicast source and multicast according to the acquired multicast path, and the appointed receiving equipment can receive the multicast flow message even if the first switch fails.
Example two
Fig. 3 is a flowchart of a multicast method according to a second embodiment of the present invention, where the multicast method further includes, based on the foregoing embodiment, after multicasting traffic to a designated receiving device according to an updated second PIM-DM multicast software table item: and when the second heartbeat message sent by the first switch is received again, the second heartbeat message is restored to the standby switch through VRRP switching. As shown in fig. 3, the method includes:
step S201, a first dense mode independent multicast protocol PIM-DM multicast software table item sent by a first switch is received.
The first switch is a master switch, and a multicast path of a current multicast source is included in a multicast software table of a first Dense Mode independent multicast protocol (Protocol Independent Multicast-Dense Mode, PIM-DM).
Optionally, receiving a first dense mode independent multicast protocol PIM-DM multicast software table item sent by the first switch, including: sending a first heartbeat message to a first switch at regular time; and receiving a first PIM-DM multicast software table item fed back by the first switch in response to the first heartbeat message.
Step S202, when the first switch is determined to be faulty, updating the second PIM-DM multicast software table item of the first PIM-DM multicast software table item.
Optionally, when determining that the first switch fails, updating the historical PIM-DM multicast software table item of the first PIM-DM multicast software table item includes: monitoring a second heartbeat message sent by the first switch, and determining that the first switch fails when the second heartbeat message is not received within a preset time range; the virtual router redundancy protocol VRRP is switched and upgraded into a main switch; and retrieving the first PIM-DM multicast software table item from the database, and replacing the second PIM-DM multicast software table item of the first PIM-DM multicast software table item by the first PIM-DM multicast software table item so as to update the second PIM-DM multicast software table item.
Optionally, after the virtual router redundancy protocol VRRP is switched and upgraded to the master switch, the method further includes: and sending the VRR switching result to the current multicast source so that the current multicast source can record and update the identity of the main switch.
Step S203, receiving the flow sent by the current multicast source, and multicasting the flow to the appointed receiving equipment according to the updated second PIM-DM multicast software table item.
Optionally, receiving the traffic sent by the current multicast source, multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table item, including: receiving traffic sent by a current multicast source, wherein the traffic contains attribute information; and when the traffic is determined to be multicast traffic according to the attribute information, multicasting the traffic to the appointed receiving equipment according to the updated second PIM-DM multicast software table item.
Optionally, before multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table item, the method further includes: inquiring global configuration information; and determining that the VRRP is configured according to the global configuration information.
Step S204, when it is determined that the second heartbeat message sent by the first switch is received again, the second heartbeat message is restored to the standby switch through VRRP switching.
Specifically, when the second switch receives the second heartbeat message sent by the first switch again, it is determined that the first switch has recovered to be normal, at this time, the second switch is recovered to be a standby switch through VRRP switching, and at the same time, the first switch continues to multicast as a new master switch. Through the primary-standby switching, only one switch is ensured to multicast at the same time, thereby saving the consumption of hardware resources.
According to the embodiment of the application, by acquiring the first PIM-DM multicast software item of the first switch, when the first interaction machine fails and the second switch is updated to a new main switch, the second PIM-DM multicast software item of the second switch can be updated according to the first PIM-DM multicast software item, so that the second switch can acquire the multicast path of the current multicast source and multicast according to the acquired multicast path, and the appointed receiving equipment can receive the multicast flow message even if the first switch fails. Through the primary-standby switching, only one switch is ensured to multicast at the same time, thereby saving the consumption of hardware resources.
Example III
Fig. 4 is a schematic structural diagram of a multicast device according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a first PIM-DM multicast software entry acquisition module 310,
A first PIM-DM multicast software table item obtaining module 310, configured to receive a first dense mode independent multicast protocol PIM-DM multicast software table item sent by a first switch, where the first switch is a master switch, and the first PIM-DM multicast software table item includes a multicast path of a current multicast source;
a second PIM-DM multicast software table item updating module 320 configured to update the first PIM-DM multicast software table item with its own second PIM-DM multicast software table item when determining that the first switch fails;
and the multicast module 330 is configured to receive the traffic sent by the current multicast source, and multicast the traffic to the designated receiving device according to the updated second PIM-DM multicast software table item.
Optionally, the first PIM-DM multicast software table entry obtaining module is configured to send a first heartbeat message to the first switch at a timing;
and receiving a first PIM-DM multicast software table item fed back by the first switch in response to the first heartbeat message.
Optionally, the second PIM-DM multicast software table item updating module is configured to monitor a second heartbeat message sent by the first switch, and determine that the first switch fails when the second heartbeat message is not received within a preset time range;
the virtual router redundancy protocol VRRP is switched and upgraded into a main switch;
and retrieving the first PIM-DM multicast software table item from the database, and replacing the second PIM-DM multicast software table item of the first PIM-DM multicast software table item by the first PIM-DM multicast software table item so as to update the second PIM-DM multicast software table item.
Optionally, the device further includes a switching result sending module, configured to send the VRR switching result to the current multicast source, so that the current multicast source performs record update on the identity of the master switch.
Optionally, the multicast module is configured to receive a flow sent by a current multicast source, where the flow includes attribute information;
and when the traffic is determined to be multicast traffic according to the attribute information, multicasting the traffic to the appointed receiving equipment according to the updated second PIM-DM multicast software table item.
Optionally, the device further comprises a global configuration information query module, configured to query global configuration information;
and determining that the VRRP is configured according to the global configuration information.
Optionally, the apparatus further includes an identity recovery module, configured to, when determining that the second heartbeat packet sent by the first switch is received again, recover to the standby switch through VRRP switching.
The multicast device provided by the embodiment of the invention can execute the multicast method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a multicast method.
In some embodiments, the multicast method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. One or more of the steps of the multicast method described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, the processor 11 may be configured to perform the multicast method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (7)

1. A method of multicasting applied to a second switch, comprising:
receiving a first dense mode independent multicast protocol PIM-DM multicast software table item sent by a first switch, wherein the first switch is a main switch, and the first PIM-DM multicast software table item contains a multicast path of a current multicast source;
when the first switch is determined to be faulty, updating a second PIM-DM multicast software table item according to the first PIM-DM multicast software table item;
receiving the flow sent by the current multicast source, and multicasting the flow to appointed receiving equipment according to the updated second PIM-DM multicast software table item;
when the first switch is determined to be faulty, updating a second PIM-DM multicast software table item according to the first PIM-DM multicast software table item, including:
monitoring a second heartbeat message sent by the first switch, and determining that the first switch fails when the second heartbeat message is not received within a preset time range;
the virtual router redundancy protocol VRRP is switched and upgraded into a main switch;
the first PIM-DM multicast software list item sent by the first switch is called from a database, and the second PIM-DM multicast software list item is replaced according to the first PIM-DM multicast software list item so as to update the second PIM-DM multicast software list item;
after the virtual router redundancy protocol VRRP is switched and upgraded to the main switch, the method further comprises the following steps:
the VRR switching result is sent to the current multicast source, so that the current multicast source records and updates the identity of the main switch;
after multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table item, the method further includes:
and when the second heartbeat message sent by the first switch is received again, recovering the second heartbeat message to be a standby switch through VRRP switching.
2. The method of claim 1, wherein receiving the first dense mode independent multicast protocol PIM-DM multicast software entry sent by the first switch comprises:
sending a first heartbeat message to the first switch at regular time;
and receiving the first PIM-DM multicast software table item fed back by the first switch in response to the first heartbeat message.
3. The method of claim 1, wherein receiving traffic sent by the current multicast source and multicasting the traffic to a designated receiving device according to an updated second PIM-DM multicast software entry comprises:
receiving the flow sent by the current multicast source, wherein the flow contains attribute information;
and when the flow is determined to be multicast flow according to the attribute information, multicasting the flow to the appointed receiving equipment according to the updated second PIM-DM multicast software table item.
4. The method of claim 3, wherein prior to the upgrading to the master switch via virtual router redundancy protocol VRRP switching, further comprising:
inquiring global configuration information;
and determining that VRRP is configured according to the global configuration information.
5. A multicast apparatus, the apparatus comprising:
the PIM-DM multicast software table item acquisition module is used for receiving a PIM-DM multicast software table item of a first intensive mode independent multicast protocol sent by a first switch, wherein the first switch is a main switch, and the first PIM-DM multicast software table item comprises a multicast path of a current multicast source;
the second PIM-DM multicast software table item updating module is used for updating the second PIM-DM multicast software table item according to the first PIM-DM multicast software table item when the first switch is determined to be in fault;
the multicast module is used for receiving the flow sent by the current multicast source and multicasting the flow to the appointed receiving equipment according to the updated second PIM-DM multicast software table item;
the second PIM-DM multicast software table updating module is used for monitoring a second heartbeat message sent by the first switch, and determining that the first switch fails when the second heartbeat message is not received within a preset time range;
the virtual router redundancy protocol VRRP is switched and upgraded into a main switch;
the first PIM-DM multicast software list item sent by the first switch is called from the database, and the second PIM-DM multicast software list item of the user is replaced according to the first PIM-DM multicast software list item so as to update the second PIM-DM multicast software list item;
the device also comprises a switching result sending module, which is used for sending the VRR switching result to the current multicast source so that the current multicast source can record and update the identity of the main switch;
the device also comprises an identity recovery module, which is used for recovering to the standby switch through VRRP switching when the second heartbeat message sent by the first switch is received again.
6. A switch, the switch comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
7. A computer readable storage medium storing computer instructions for causing a processor to perform the method of any one of claims 1-4.
CN202210749307.6A 2022-06-28 2022-06-28 Multicast method, device, switch and storage medium Active CN114979037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210749307.6A CN114979037B (en) 2022-06-28 2022-06-28 Multicast method, device, switch and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210749307.6A CN114979037B (en) 2022-06-28 2022-06-28 Multicast method, device, switch and storage medium

Publications (2)

Publication Number Publication Date
CN114979037A CN114979037A (en) 2022-08-30
CN114979037B true CN114979037B (en) 2024-03-26

Family

ID=82967328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210749307.6A Active CN114979037B (en) 2022-06-28 2022-06-28 Multicast method, device, switch and storage medium

Country Status (1)

Country Link
CN (1) CN114979037B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547367A (en) * 2017-06-28 2018-01-05 新华三技术有限公司 A kind of multicast switching method, device and machinable medium
CN111901133A (en) * 2020-08-07 2020-11-06 北京东土军悦科技有限公司 Multicast switching method, device, network equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160094443A1 (en) * 2014-09-26 2016-03-31 Lenovo Enterprise Solutions (Singapore) Pte, Ltd. Protocol independent multicast (pim) multicast route entry synchronization
US11108622B2 (en) * 2018-11-29 2021-08-31 Hewlett Packard Enterprise Development Lp Protocol-independent multicast designated router (PIM-DR) failover in a multi-chassis environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547367A (en) * 2017-06-28 2018-01-05 新华三技术有限公司 A kind of multicast switching method, device and machinable medium
CN111901133A (en) * 2020-08-07 2020-11-06 北京东土军悦科技有限公司 Multicast switching method, device, network equipment and storage medium

Also Published As

Publication number Publication date
CN114979037A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
CN107465767B (en) Data synchronization method and system
CN106330475B (en) Method and device for managing main and standby nodes in communication system and high-availability cluster
CN112202746B (en) RPC member information acquisition method, device, electronic equipment and storage medium
WO2017215441A1 (en) Self-recovery method and apparatus for board configuration in distributed system
CN113315665B (en) Message sending method, device, equipment and medium of dual-network-card terminal equipment
US20200389863A1 (en) Method and system for processing node registration notification
WO2020057445A1 (en) Communication system, method, and device
CN108390919B (en) Message synchronization system and method for high-reliability dual-computer hot standby
CN111181765A (en) Task processing method and device
CN111049690B (en) Equipment fault monitoring processing method, device, equipment and storage medium
CN113839862A (en) Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors
JPH09259096A (en) System for enhancing reliability of network
CN114244768A (en) Forwarding method, device, equipment and storage medium for two-layer unknown multicast
CN114979037B (en) Multicast method, device, switch and storage medium
CN109428814B (en) Multicast traffic transmission method, related equipment and computer readable storage medium
CN109361781B (en) Message forwarding method, device, server, system and storage medium
CN112217718A (en) Service processing method, device, equipment and storage medium
JP2003186722A (en) Database server failover method in cluster system
CN110716827A (en) Hot backup method suitable for distributed system and distributed system
CN112532524B (en) Message processing method and device
CN114567536B (en) Abnormal data processing method, device, electronic equipment and storage medium
CN110324155B (en) Multicast updating method, device and communication equipment
CN114567540B (en) Master-slave node switching method, device, equipment, medium and program product
CN115623253B (en) Scene-aware video stream management method, system, device, and medium
CN111107006B (en) Routing management method and device

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