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

Multicast method, device, switch and storage medium Download PDF

Info

Publication number
CN114979037A
CN114979037A CN202210749307.6A CN202210749307A CN114979037A CN 114979037 A CN114979037 A CN 114979037A CN 202210749307 A CN202210749307 A CN 202210749307A CN 114979037 A CN114979037 A CN 114979037A
Authority
CN
China
Prior art keywords
multicast
pim
switch
table entry
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.)
Granted
Application number
CN202210749307.6A
Other languages
Chinese (zh)
Other versions
CN114979037B (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

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/201Multicast operation; Broadcast operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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. The method comprises the following steps: receiving a first intensive mode independent multicast protocol (PIM-DM) multicast software table item sent by a first switch; when the first switch is determined to have a fault, updating a first PIM-DM multicast software table entry to a second PIM-DM multicast software table entry of the first switch; 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 entry. By acquiring the first PIM-DM multicast software table entry of the first switch, when the first interactive machine fails and the second switch is upgraded to a new main switch, the second switch can update its second PIM-DM multicast software table entry according to the first PIM-DM multicast software table entry, so that the second switch can acquire the multicast path of the current multicast source and perform multicast according to the acquired multicast path, thereby ensuring that the designated receiving device can receive the multicast flow message 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, an apparatus, a switch, and a storage medium.
Background
Multicast is a data transmission mode between unicast and broadcast, i.e. the destination address of a data frame is a multicast address, and a sending end only transmits the data frame to a plurality of receiving ends belonging to a multicast group. When a multicast source device performs multicast of a message to a receiver device, it is usually necessary to perform multicast of the message by means of a switch, as shown in fig. 1, which is a schematic diagram of a redundant network for performing multicast in the prior art.
In the standalone state, the Device1 is the multicast source host, and the Device2 and the Device3 are the hosts receiving the multicast messages. However, when the master switch fails and the group is restarted suddenly, the Device2 and the Device3 cannot receive the multicast traffic message after the group is added.
Disclosure of Invention
The invention provides a multicast method, a multicast device, a switch and a storage medium, which can ensure that a standby switch can be adopted 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 intensive 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 comprises a multicast path of a current multicast source;
when the first switch is determined to have a fault, updating a second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry by the first PIM-DM multicast software table entry;
and receiving the flow sent by the current multicast source, and multicasting the flow to a specified receiving device according to the updated second PIM-DM multicast software table entry.
According to another aspect of the present invention, there is provided a multicast apparatus including:
a first PIM-DM multicast software table entry obtaining module, configured to receive a first intensive mode independent multicast protocol PIM-DM multicast software table entry sent by a first switch, where the first switch is a master switch, and the first PIM-DM multicast software table entry includes a multicast path of a current multicast source;
a historical PIM-DM multicast software table entry updating module, configured to update the historical PIM-DM multicast software table entry of the first PIM-DM multicast software table entry when it is determined that the first switch fails;
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 entry.
According to another aspect of the present invention, there is provided a switch, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method according to any of the embodiments of the invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium having stored thereon computer instructions for causing a processor to execute a method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, by acquiring the first PIM-DM multicast software table entry of the first switch, when the first interactive machine fails and the second switch is upgraded to a new main switch, the second PIM-DM multicast software table entry of the second switch can be updated according to the first PIM-DM multicast software table entry, so that the second switch can acquire the multicast path of the current multicast source and perform multicast according to the acquired multicast path, and the specified receiving equipment can also receive the multicast flow message even if the first switch fails.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a redundant network for multicast according to the prior art;
fig. 2 is a flowchart of a multicast method according to an 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 apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a switch implementing an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or 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 one
Fig. 2 is a flowchart providing a multicast method according to an embodiment of the present invention, where the embodiment is applicable to a case of multicasting traffic sent by a current multicast source, and the method may be executed by a multicast apparatus, where the multicast apparatus may be implemented in a form of hardware and/or software. As shown in fig. 1, the method includes:
step S101, receiving a first intensive mode independent multicast protocol PIM-DM multicast software table item sent by a first switch.
The first switch is a main switch, and a first Protocol Independent Multicast-default Mode (PIM-DM) Multicast software entry includes a Multicast path of a current Multicast source.
Specifically, the Device1 broadcasts a message to servers within communication range through a switch before multicasting, and the Device1 can support multiple group addresses, and each group address supported by the Device1, e.g., 225.1.1.1 and 225.2.1.3, is included in the broadcast message. When both the Device2 and the Device3 receive the broadcast message and want to join the group address 225.1.1.1 and receive the multicast message sent by the Device1, the Device1 can send a group adding request to the Device1 through the first switch, i.e., the master switch, and the Device1 adds the Device2 and the Device3 to the group address 225.1.1.1 according to the group adding request of the Device1 and the Device2 and multicasts the multicast message to the Device2 and the Device3 belonging to 225.1.1.1.
It should be noted that, after receiving the grouping request of Device2 and Device3, the switch creates a first PIM-DM multicast software entry according to the grouping request, where the first software entry includes a multicast path including a current multicast source, for example, a (192.168.100.100,225.1.1.1) matching relationship that records an IP address of Device2 and a Device1 group address, that is, Device2 is used as a receiving Device and added to a group address 225.1.1.1 of a multicast source Device 1; the paths Vlan100 and Vlan101 are described, that is, the receiving Device2 receives the message sent by the Device1 by using the multicast sources Vlan100 and Vlan 101. Similarly, it also records (192.168.102.100,225.1.1.1) matching relationship between IP address of Device3 and Device1 group address, i.e. Device3 is added to group address 225.1.1.1 of multicast source Device1 as receiving Device; the paths Vlan100 and Vlan101 are described, that is, the receiving Device3 receives the message sent by the Device1 by using the multicast sources Vlan100 and Vlan 101.
Optionally, receiving a first dense mode independent multicast protocol PIM-DM multicast software table entry sent by the first switch includes: sending a first heartbeat message to a first switch at regular time; and receiving a first PIM-DM multicast software table entry fed back by the first switch in response to the first heartbeat message.
Specifically, when Device1 broadcasts for the first time, the second switch, i.e. the standby switch, is not involved in creating the multicast software table entry. However, the first switch and the second interactive machine can mutually send heartbeat messages, and the working state of the opposite side can be timely obtained by receiving the heartbeat messages of the opposite side. Therefore, the second switch sends the first heartbeat message to the first switch at regular time, so that when the first switch determines that the second switch is in a normal working state according to the obtained first heartbeat message, the second switch receives a first PIM-DM multicast software table item created before and fed back by the first switch response and the first heartbeat message, and the second switch can know a specific multicast path of a multicast source in time.
And step S102, when the first switch is determined to have a fault, updating the first PIM-DM multicast software table entry to the second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry.
When the first switch works normally, the second switch only stores the first PIM-DM multicast software table entry, and also stores a second PIM-DM multicast software table entry used in the historical multicast, and the second PIM-DM multicast software table entry has no relation with the multicast of the current multicast source. When the first exchanger as the main exchanger works normally, the second exchanger as the standby exchanger does not need to participate in the multicast work, so the second exchanger does not need to update the second PIM-DM multicast software table entry of the second exchanger according to the first PIM-DM multicast software table entry.
Optionally, when it is determined that the first switch fails, updating the first PIM-DM multicast software table entry to the historical PIM-DM multicast software table entry of the first switch, 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; switching and upgrading the VRRP into a main switch through a virtual routing redundancy protocol; and calling a first PIM-DM multicast software table entry from the database, and replacing the first PIM-DM multicast software table entry with a second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry so as to update the second PIM-DM multicast software table entry.
Specifically, the second switch monitors the second heartbeat message sent by the first switch, and determines that the second heartbeat message is not received within a specified time range, which indicates that the network of the first switch is interrupted or the equipment of the first switch is abnormal, and at this time, it can be determined that the first switch fails. The sending frequency of the second heartbeat message and the sending frequency of the first heartbeat text may be different, and the specific sending frequency of the first heartbeat message and the second heartbeat message is not limited in this embodiment. When the second switch determines that the first switch is abnormal according to the heartbeat monitoring result, the second switch is upgraded to a new main switch through a Virtual Router Redundancy Protocol (VRRP), after upgrading to a new master switch, since the new master switch needs to take on the forwarding work of the multicast message, and when forwarding the multicast message, specifically referring to the second PIM-DM multicast software table entry of itself to determine the multicast path, because the list entry of the second PIM-DM multicast software at this time is also the historical multicast path, it is obviously not relevant to the multicast path of the current multicast source, in this case it is therefore necessary to retrieve the first PIM-DM multicast software table entry received when the first switch was normal, and updating the first PIM-DM multicast software table entry to the second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry.
Optionally, after the virtual router redundancy protocol VRRP is switched and upgraded to the main switch, the method further includes: and sending the VRR switching result to the current multicast source so that the current multicast source records and updates the identity of the main switch.
It should be noted that after the multicast switching is performed, the second switch that normally operates needs to send the multicast switching result to the current multicast source, i.e., Device1, so as to timely notify that the current multicast source second switch is a new master switch, thereby avoiding a situation that the Device1 performs multicast through the original master switch, i.e., the first switch, even if the master switch is not known to be replaced, resulting in a failure of multicast.
And 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 entry.
Optionally, receiving traffic sent by the current multicast source, and multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table entry, includes: receiving flow sent by a 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 entry.
Specifically, after the second switch is upgraded to the master switch, after 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 it is determined that the attribute information includes the multicast flag, it is determined that the traffic needs to be multicast, and at this time, the traffic is multicast to the specified receiving Device according to the updated second PIM-DM multicast software entry, for example, the updated second PIM-DM multicast software entry is: recording (192.168.100.100,225.1.1.1) matching relation between the IP address of the Device2 and the Device1 group address, namely that the Device2 is used as a receiving Device and added to the group address 225.1.1.1 of the multicast source Device 1; the paths Vlan100 and Vlan101 are described, that is, the receiving Device2 receives the message sent by the Device1 by using the multicast sources Vlan100 and Vlan 101. Similarly, it also records (192.168.102.100,225.1.1.1) matching relationship between IP address of Device3 and Device1 group address, i.e. Device3 is added to group address 225.1.1.1 of multicast source Device1 as receiving Device; the paths Vlan100 and Vlan101 are described, that is, the receiving Device2 receives the message sent by the Device1 by using the multicast sources Vlan100 and Vlan 101. Therefore, according to the second PIM-DM multicast software table entry, it can be known that the multicast objects, that is, the receiving devices are Device2 and Device3, and the paths taken by the receiving devices are Vlan100 and Vlan101, so that the traffic sent by the multicast source is multicast to the specified receiving devices.
Optionally, before multicasting the traffic to the specified receiving device according to the updated second PIM-DM multicast software table entry, the method further includes: inquiring global configuration information; and determining that the VRRP is configured by the self according to the global configuration information.
According to the embodiment of the application, by acquiring the first PIM-DM multicast software table entry of the first switch, when the first interactive machine fails and the second switch is upgraded to a new main switch, the second PIM-DM multicast software table entry of the second switch can be updated according to the first PIM-DM multicast software table entry, so that the second switch can acquire the multicast path of the current multicast source and perform multicast according to the acquired multicast path, and the specified 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 provided in the second embodiment of the present invention, where this embodiment is based on the foregoing embodiment, and after multicasting traffic to a specified receiving device according to an updated second PIM-DM multicast software table entry, the method further includes: and when the second heartbeat message sent by the first switch is determined to be received again, the second heartbeat message is switched through the VRRP and restored to the standby switch again. As shown in fig. 3, the method includes:
step S201, receiving a first dense mode independent multicast protocol PIM-DM multicast software table entry sent by the first switch.
The first switch is a main switch, and a first Dense Mode Independent Multicast Protocol (PIM-DM) Multicast software entry includes a Multicast path of a current Multicast source.
Optionally, receiving a first dense mode independent multicast protocol PIM-DM multicast software table entry sent by the first switch includes: sending a first heartbeat message to a first switch at regular time; and receiving a first PIM-DM multicast software table entry fed back by the first switch in response to the first heartbeat message.
Step S202, when the first exchanger is determined to be in fault, the first PIM-DM multicast software table entry is updated to the second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry.
Optionally, when it is determined that the first switch fails, updating the first PIM-DM multicast software table entry to the historical PIM-DM multicast software table entry of the first switch, 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; switching and upgrading the VRRP into a main switch through a virtual routing redundancy protocol; and calling a first PIM-DM multicast software table entry from the database, and replacing the first PIM-DM multicast software table entry with a second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry so as to update the second PIM-DM multicast software table entry.
Optionally, after the virtual router redundancy protocol VRRP is switched and upgraded to the main switch, the method further includes: and sending the VRR switching result to the current multicast source so that the current multicast source records and updates 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 device according to the updated second PIM-DM multicast software table entry.
Optionally, receiving traffic sent by the current multicast source, and multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table entry, includes: receiving flow sent by a 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 entry.
Optionally, before multicasting the traffic to the specified receiving device according to the updated second PIM-DM multicast software table entry, the method further includes: inquiring global configuration information; and determining that the VRRP is configured by the self according to the global configuration information.
Step S204, when the second heartbeat message sent by the first switch is determined to be received again, the second heartbeat message is switched through VRRP and restored to the standby switch again.
Specifically, when the second switch receives the second heartbeat message sent by the first switch again, it is determined that the first switch is recovered to be normal, at this time, the second switch will be recovered to be the standby switch again through VRRP switching, and at the same time, the first switch will be used as a new main switch to continue multicasting. And only one switch is ensured to carry out multicast at the same time through the active-standby switching, so that the consumption of hardware resources is saved.
According to the method and the device for multicast flow message sending, through obtaining the first PIM-DM multicast software table entry of the first switch, when the first interactive machine breaks down and the second switch is upgraded to a new main switch, the second PIM-DM multicast software table entry of the second switch can be updated according to the first PIM-DM multicast software table entry, so that the second switch can obtain the multicast path of the current multicast source and multicast according to the obtained multicast path, and it is guaranteed that the specified receiving device can receive the multicast flow message even if the first switch breaks down. And only one switch is ensured to carry out multicast at the same time through the active-standby switching, so that the consumption of hardware resources is saved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a multicast apparatus according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a first PIM-DM multicast software table entry obtaining module 310,
A first PIM-DM multicast software entry obtaining module 310, configured to receive a first dense mode independent multicast protocol PIM-DM multicast software entry sent by a first switch, where the first switch is a main switch, and the first PIM-DM multicast software entry includes a multicast path of a current multicast source;
a second PIM-DM multicast software table entry updating module 320, configured to update the first PIM-DM multicast software table entry to its own second PIM-DM multicast software table entry when it is determined that the first switch fails;
and the multicast module 330 is configured to receive traffic sent by the current multicast source, and multicast the traffic to the specified receiving device according to the updated second PIM-DM multicast software table entry.
Optionally, the first PIM-DM multicast software table entry obtaining module is configured to send a first heartbeat packet to the first switch at regular time;
and receiving a first PIM-DM multicast software table entry fed back by the first switch in response to the first heartbeat message.
Optionally, the second PIM-DM multicast software table entry updating module is configured to monitor a second heartbeat packet sent by the first switch, and determine that the first switch fails when the second heartbeat packet is not received within a preset time range;
switching and upgrading the VRRP into a main switch through a virtual routing redundancy protocol;
and calling a first PIM-DM multicast software table entry from the database, and replacing the first PIM-DM multicast software table entry with a second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry so as to update the second PIM-DM multicast software table entry.
Optionally, the apparatus 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 traffic sent by a current multicast source, where the traffic includes 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 entry.
Optionally, the apparatus further includes a global configuration information query module, configured to query global configuration information;
and determining that the VRRP is configured by the self according to the global configuration information.
Optionally, the apparatus further includes an identity recovery module, configured to switch to recover to the standby switch again through the VRRP when it is determined that the second heartbeat packet sent by the first switch is received again.
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 four
FIG. 5 illustrates a schematic diagram 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. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, 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 communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can 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.
A number of 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, or the like; 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, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. 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 in 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. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the multicast method described above may be performed. 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 circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a 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 that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the 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 performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a 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. A 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) by 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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. A client and server are generally 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 host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired result of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A multicast method, applied to a second switch, comprising:
receiving a first intensive 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 comprises a multicast path of a current multicast source;
when the first switch is determined to have a fault, updating a second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry by the first PIM-DM multicast software table entry;
and receiving the flow sent by the current multicast source, and multicasting the flow to a specified receiving device according to the updated second PIM-DM multicast software table entry.
2. The method of claim 1, wherein receiving the first dense mode independent multicast protocol, PIM-DM, multicast software table 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 entry fed back by the first switch in response to the first heartbeat message.
3. The method of claim 1, wherein updating the first PIM-DM multicast software table entry to its second PIM-DM multicast software table entry upon determining that the first switch has failed comprises:
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;
switching and upgrading the VRRP into a main switch through a virtual routing redundancy protocol;
and calling the first PIM-DM multicast software table entry from a database, and replacing the second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry with the second PIM-DM multicast software table entry so as to update the second PIM-DM multicast software table entry.
4. The method according to claim 3, wherein after the switching and upgrading to the master switch through the virtual routing redundancy protocol VRRP, the method further comprises:
and sending the VRR switching result to the current multicast source so as to record and update the identity of the main switch by the current multicast source.
5. The method of claim 1, wherein the receiving traffic sent by the current multicast source, and multicasting the traffic to a designated receiving device according to the updated second PIM-DM multicast software table 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 a specified receiving device according to the updated second PIM-DM multicast software table entry.
6. The method of claim 5, wherein before multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table entry, further comprising:
inquiring global configuration information;
and determining that the VRRP is configured according to the global configuration information.
7. The method of claim 3, wherein after multicasting the traffic to the designated receiving device according to the updated second PIM-DM multicast software table entry, further comprising:
and when the second heartbeat message sent by the first switch is determined to be received again, the second heartbeat message is switched through VRRP and restored to the standby switch again.
8. A multicast apparatus, the apparatus comprising:
a first PIM-DM multicast software table entry obtaining module, configured to receive a first intensive mode independent multicast protocol PIM-DM multicast software table entry sent by a first switch, where the first switch is a master switch, and the first PIM-DM multicast software table entry includes a multicast path of a current multicast source;
a second PIM-DM multicast software table entry updating module, configured to update the first PIM-DM multicast software table entry to a second PIM-DM multicast software table entry of the first PIM-DM multicast software table entry when it is determined that the first switch fails;
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 entry.
9. A switch, characterized in that the switch comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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-7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a processor, when executed, to implement 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 true CN114979037A (en) 2022-08-30
CN114979037B 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 (4)

* 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
CN107547367A (en) * 2017-06-28 2018-01-05 新华三技术有限公司 A kind of multicast switching method, device and machinable medium
US20200177438A1 (en) * 2018-11-29 2020-06-04 Hewlett Packard Enterprise Development Lp Protocol-independent multicast designated router (pim-dr) failover in a multi-chassis environment
CN111901133A (en) * 2020-08-07 2020-11-06 北京东土军悦科技有限公司 Multicast switching method, device, network equipment and storage medium

Patent Citations (4)

* 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
CN107547367A (en) * 2017-06-28 2018-01-05 新华三技术有限公司 A kind of multicast switching method, device and machinable medium
US20200177438A1 (en) * 2018-11-29 2020-06-04 Hewlett Packard Enterprise Development Lp Protocol-independent multicast designated router (pim-dr) failover in a multi-chassis environment
CN111901133A (en) * 2020-08-07 2020-11-06 北京东土军悦科技有限公司 Multicast switching method, device, network equipment and storage medium

Also Published As

Publication number Publication date
CN114979037B (en) 2024-03-26

Similar Documents

Publication Publication Date Title
JP6325001B2 (en) Method and system using recursive event listeners in nodes of hierarchical data structures
CN110795503A (en) Multi-cluster data synchronization method and related device of distributed storage system
US10198338B2 (en) System and method of generating data center alarms for missing events
CN110120961B (en) Distributed service cluster and route synchronization method thereof
CN104408071A (en) Distributive database high-availability method and system based on cluster manager
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN112202746B (en) RPC member information acquisition method, device, electronic equipment and storage medium
CN112583931A (en) Message processing method, message middleware, electronic device and storage medium
US20170244783A1 (en) Federating geographically distributed networks of message brokers into a scalable content delivery network
WO2018137520A1 (en) Service recovery method and apparatus
WO2016177231A1 (en) Dual-control-based active-backup switching method and device
CN112217847A (en) Micro service platform, implementation method thereof, electronic device and storage medium
CN111966651A (en) Data synchronization method and device, electronic equipment and storage medium
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
CN112231399A (en) Method and device applied to graph database
CN114979037A (en) Multicast method, device, switch and storage medium
CN107087021B (en) Master-slave server determination method and device
CN110912837B (en) VSM system-based main/standby switching method and device
CN112217718A (en) Service processing method, device, equipment and storage medium
CN112685486A (en) Data management method and device for database cluster, electronic equipment and storage medium
JPH07319836A (en) Fault monitoring system
CN108270598B (en) Distributed system disaster recovery method, device and system
CN115720234A (en) Method, device and equipment for realizing session maintenance based on server cluster

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