CN108011828B - Multicast switching method, device, core layer switch and storage medium - Google Patents

Multicast switching method, device, core layer switch and storage medium Download PDF

Info

Publication number
CN108011828B
CN108011828B CN201711282821.9A CN201711282821A CN108011828B CN 108011828 B CN108011828 B CN 108011828B CN 201711282821 A CN201711282821 A CN 201711282821A CN 108011828 B CN108011828 B CN 108011828B
Authority
CN
China
Prior art keywords
layer switch
core layer
current multicast
role
switch
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
CN201711282821.9A
Other languages
Chinese (zh)
Other versions
CN108011828A (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 CN201711282821.9A priority Critical patent/CN108011828B/en
Publication of CN108011828A publication Critical patent/CN108011828A/en
Application granted granted Critical
Publication of CN108011828B publication Critical patent/CN108011828B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Landscapes

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

Abstract

The invention discloses a multicast switching method, a device, a core layer switch and a storage medium, wherein the method comprises the following steps: when a first core layer switch in a standby role receives a current multicast message sent by a source access layer switch, updating a pre-stored software table according to the current multicast message; wherein, the exit VLAN of each software table entry in the software table is not empty; when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the main role, configuring a hardware table according to the software table; and when the first core layer switch finds the hardware table entry corresponding to the current multicast message in the hardware table, forwarding the current multicast message to a target access layer switch according to the hardware table entry corresponding to the current multicast message. The multicast switching time is short, and the multicast switching speed is high.

Description

Multicast switching method, device, core layer switch and storage medium
Technical Field
The embodiment of the invention relates to the technical field of network communication, in particular to a multicast switching method, a multicast switching device, a core layer switch and a storage medium.
Background
Multicast is widely applied in IP (internet protocol) networks, is mainly used in point-to-multipoint communication modes, and has obvious advantages in bandwidth occupation, server load and network load compared with broadcast. The multicast routing protocol is a routing control protocol for realizing multicast message forwarding on the third layer of the IP network. The function of the multicast routing protocol is to provide routing information for forwarding multicast packets, i.e. to indicate to the forwarding engine which directions the received multicast packets should be forwarded to. Currently, there are three types of commonly used IP multicast routing protocols: DVMRP (Distance Vector Multicast Routing Protocol), PIM-SM (Protocol Independent Multicast-Sparse Mode of Protocol Independent Multicast Routing Protocol), and PIM-DM (Protocol Independent Multicast-dense Mode of Protocol Independent Multicast Routing Protocol).
The PIM-DM is a multicast routing protocol independent of a unicast routing protocol, does not depend on a specific unicast routing protocol, is a dense mode multicast routing protocol and is relatively suitable for a network with densely distributed receiving stations. PIM-DM is generally used for a situation table where there are a large number of receivers in a certain multicast group, and these receivers are relatively densely distributed and have a relatively large multicast traffic. PIM-DM adopts Push mode, multicast message is sent by multicast source, and through network device connected with multicast source, multicast message is sent to all interfaces configured with PIM-DM, then through checking whether there is receiver at network end, pruning message is sent to upstream network device, so as to stop transmitting subsequent multicast message to the network device. Specifically, the network device calculates an outgoing interface according to the (S, G) pair of the multicast packet, that is, the source IP address and the destination IP address of the multicast packet; if the calculated outgoing interface is not empty, establishing an outgoing interface table entry for the (S, G) pair, and forwarding the multicast message by the outgoing interface; if the calculated outgoing interface is empty, a pruning message is sent to the upstream neighbor, the upstream neighbor is informed not to forward the multicast message from (S, G) to the interface, after receiving the pruning message, the upstream interface marks the interface sending the pruning message as a pruning state, and the process is called flooding-pruning.
Fig. 1 is a schematic diagram of a flow of implementing a multicast handover method in the prior art. As shown in fig. 1, J05 is a source access layer switch, and J06 is a target access layer switch; h01 is a first core layer switch, H02 is a second core layer switch; the switch role of the first core layer switch H01 is a master role; the switch role of the second core layer switch H02 is the standby role. When the first core layer switch H01 is powered on, the flow trace of the current multicast packet is: j05- > H01- > J06; when the first core layer switch H01 is powered off, the flow trace of the current multicast message is: j05- > H02- > J06. Specifically, when the second core layer switch H02 determines that its own corresponding switch role is switched from the standby role to the active role, the second core layer switch H02 needs to create a new software entry corresponding to the current multicast packet, then the second core layer switch H02 determines a hardware entry corresponding to the current multicast packet according to the software entry corresponding to the current multicast packet, and finally the second core layer switch H02 forwards the current multicast packet to the target access layer switch J06 according to the hardware entry corresponding to the current multicast packet.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in the existing multicast switching method, when a first core layer switch determines that its own corresponding switch role is switched from a standby role to a main role, the first core layer switch needs to newly establish a software table entry corresponding to a current multicast message in a locally stored software table, and the first core layer switch establishes the software table entry corresponding to the current multicast message in the locally stored software table and needs to go through a process of "flooding-pruning", so that the multicast switching time is long, and the multicast switching speed is slow.
Disclosure of Invention
The invention provides a multicast switching method and device based on a PIM-DM protocol, a core layer switch and a storage medium, which have the advantages of short multicast switching time and high multicast switching speed.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a multicast switching method, where the method includes:
when a first core layer switch in a standby role receives a current multicast message sent by a source access layer switch, updating a pre-stored software table according to the current multicast message; wherein, the exit VLAN of each software table entry in the software table is not empty;
when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the main role, configuring a hardware table according to the software table;
and when the first core layer switch finds the hardware table entry corresponding to the current multicast message in the hardware table, forwarding the current multicast message to a target access layer switch according to the hardware table entry corresponding to the current multicast message.
In the above embodiment, the updating, by the first core layer switch, a pre-stored software table according to the current multicast packet includes:
the first core layer switch searches a software table item corresponding to the current multicast message in the software table;
when the first core layer switch finds the software table entry corresponding to the current multicast message in the software table entry, the first core layer switch discards the current multicast message;
when the first core layer switch does not find the software table entry corresponding to the current multicast message in the software table entries, the first core layer switch discards the current multicast message after a new software table entry corresponding to the current multicast message is established in the software table entries.
In the above embodiment, after the updating the pre-stored software table according to the current multicast packet, the method further includes:
the first core switch adds the source IP address, the destination IP address and the entrance VLAN of each software table entry in the software table to the source IP address, the destination IP address and the entrance VLAN of each hardware table entry in the hardware table; wherein, the exit VLAN of each hardware table entry is empty.
In the above embodiment, the determining, by the first core layer switch, that the switch role corresponding to the first core layer switch is switched from the standby role to the active role includes:
the first core layer switch acquires a first priority of the first core layer switch and a second priority of the second core layer switch according to a preset period;
when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role.
In the above embodiment, the method further comprises:
when the second core layer switch in the main role is powered off due to a fault and then powered on again, acquiring a first priority of the first core layer switch and a second priority of the second core layer switch according to a preset period;
when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, the second core layer switch determines that the switch role corresponding to the second core layer switch is the standby role.
In a second aspect, an embodiment of the present invention further provides a multicast switching apparatus, where the apparatus includes: the system comprises an updating unit, a configuration unit and a forwarding unit; wherein the content of the first and second substances,
the updating unit is used for receiving the current multicast message sent by the source access layer switch in the standby role; updating a pre-stored software table according to the current multicast message; wherein, the exit VLAN of each software table entry in the software table is not empty;
the configuration unit is configured to configure a hardware table according to the software table when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role;
the forwarding unit is configured to forward the current multicast packet to a target access layer switch according to the hardware entry corresponding to the current multicast packet when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table.
In the foregoing embodiment, the updating unit is specifically configured to search the software table entry corresponding to the current multicast packet in the software table; when the software table entry corresponding to the current multicast message is found in the software table entry, discarding the current multicast message; and when the software table entry corresponding to the current multicast message is not found in the software table entry, discarding the current multicast message after a new software table entry corresponding to the current multicast message is established in the software table entry.
In the above embodiment, the configuration unit is further configured to add the source IP address, the destination IP address, and the entry VLAN of each software table entry in the software table to the source IP address, the destination IP address, and the entry VLAN of each hardware table entry in the hardware table; wherein, the exit VLAN of each hardware table entry is empty.
In the above embodiment, the configuration unit is further configured to obtain a first priority of the first core-layer switch and a second priority of the second core-layer switch according to a preset period; and when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, determining that the switch role corresponding to the first core layer switch is switched from the standby role to the active role.
In a third aspect, an embodiment of the present invention further provides a core layer switch, where the core layer switch includes:
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 instructions executable by the at least one processor to enable the at least one processor to perform the method of any of the embodiments described above.
In a fourth aspect, the present invention further provides a storage medium storing computer-executable instructions for performing the method according to any one of the above embodiments.
The embodiment of the invention provides a multicast switching method, a multicast switching device, a core layer switch and a storage medium. When a first core layer switch in a standby role receives a current multicast message sent by a source access layer switch, updating a pre-stored software table according to the current multicast message; then, when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the main role, a hardware table can be configured according to the software table; when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table, the current multicast packet may be forwarded to the target access layer switch according to the hardware entry corresponding to the current multicast packet. That is to say, in the technical solution provided in the embodiment of the present invention, the first core layer switch may configure the hardware table with forwarding capability according to the pre-stored software table to independently calculate the software table with the egress VLAN and the pruning VLAN; when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role, the first core layer switch can synchronously configure a hardware table with forwarding capability according to a locally stored software table, and the first core layer switch does not need to newly establish a software table entry corresponding to the current multicast message in the locally stored software table. Therefore, the first core layer switch can be switched from the standby role to the active role more quickly. In the existing multicast switching method, when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role, the first core layer switch needs to newly establish a software table entry corresponding to the current multicast message in a locally stored software table, and the first core layer switch establishes the software table entry corresponding to the current multicast message in the locally stored software table and needs to go through a process of "flooding-pruning". Therefore, compared with the prior art, the multicast switching method, the device, the core layer switch and the storage medium provided by the embodiment of the invention have the advantages that the multicast switching time is shorter, and the multicast switching speed is higher; moreover, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Drawings
Fig. 1 is a schematic diagram illustrating an implementation flow of a multicast switching method in the prior art;
fig. 2 is a schematic diagram of an implementation flow of a multicast switching method in the embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a structure of a hardware table entry according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a structure of a software table entry according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a multicast switching apparatus according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. For example, "first" and "second" in a first core layer switch and a second core layer switch are used to distinguish two different core layer switches.
The technical scheme provided by the embodiment of the invention is not only suitable for the scene shown in fig. 1, but also suitable for the scene needing main/standby switching: in fig. 1, the core layer devices and the access layer devices are all connected by trunk ports. The user equipment is connected to an access layer device having layer two forwarding capability. The two core layer devices in the active/standby mode start a PIM-DM protocol, a VRRP (Virtual Router redundancy protocol) protocol, and an MSTP protocol, and have three-layer forwarding capability. In fig. 1, the two core layer devices are in a master/standby mode, that is, only one device of the two core layer devices forwards the core layer device, and the other core layer device plays a role of redundancy backup.
Fig. 2 is a schematic diagram of an implementation flow of a multicast switching method in the embodiment of the present invention. As shown in fig. 2, the multicast handover method may include the following steps:
step 201, when the first core layer switch in the standby role receives the current multicast message sent by the source access layer switch, updating a pre-stored software table according to the current multicast message.
In a specific embodiment of the present invention, the switch role of the first core layer switch may be a master role; the switch role of the first core layer switch may also be a standby role. Further, the switch role of the second core layer switch may be a master role; the switch role of the second core layer switch may also be a standby role. When the switch role of the first core layer switch is the master role, the first core layer switch can receive a current multicast message sent by the source access layer switch; when the switch role of the first core layer switch is the standby role, the first core layer switch may also receive the current multicast packet sent by the source access layer switch. Similarly, when the switch role of the second core layer switch is the active role, the second core layer switch may receive the current multicast packet sent by the source access layer switch; when the switch role of the second core layer switch is the standby role, the second core layer switch may also receive the current multicast packet sent by the source access layer switch.
Specifically, in the specific embodiment of the present invention, when the first core layer switch in the standby role receives the current multicast packet sent by the source access layer switch, the first core layer switch may update the pre-stored software table according to the current multicast packet. Specifically, the first core layer switch may search a software table entry corresponding to the current multicast packet in a software table; when the first core layer switch finds the software table entry corresponding to the current multicast message in the software table entries, the first core layer switch may discard the current multicast message; when the first core layer switch does not find the software entry corresponding to the current multicast message in the software entries, the first core layer switch may discard the current multicast message after a new software entry corresponding to the current multicast message is created in the software entries. That is to say, before the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the main role, each exit VLAN in the hardware table is empty, so that the first core layer switch can directly discard the current multicast message when finding the software table entry corresponding to the current multicast message in the software table entry; or, when the first core layer switch does not find the software entry corresponding to the current multicast message in the software entries, the first core layer switch may discard the current multicast message after a new software entry corresponding to the current multicast message is created in the software entries.
Preferably, in the embodiment of the present invention, after the first core layer switch updates the pre-stored software table according to the current multicast packet, the first core layer switch may add the source IP address, the destination IP address, and the entry VLAN of each software table entry in the software table to the source IP address, the destination IP address, and the entry VLAN of each hardware table entry in the hardware table; wherein, the exit VLAN of each hardware table entry is empty. Or, the first core layer switch may also configure the source IP address, the destination IP address, the ingress VLAN, and the egress VLAN of each hardware entry in the hardware table to be null.
Preferably, in the embodiment of the present invention, the HELLO message and the ASSERT message are not sent between the first core layer switch and the second core layer switch any more, which can ensure that the first core layer switch and the second core layer switch independently calculate their own software tables, and the software table calculated by the first core layer switch is the same as the software table calculated by the second core layer switch. In this way, when the first core layer switch and the second core layer switch both operate stably, and when the first switch determines that its own switch role is switched from the standby role to the active role, the first core layer switch may configure the hardware table according to the software table. Specifically, if the source IP address, the destination IP address, the ingress VLAN, and the egress VLAN of each hardware entry in the hardware table are all empty at this time, the first core layer switch may add the source IP address, the destination IP address, the ingress VLAN, and the egress VLAN of each software entry in the software table to the source IP address, the destination IP address, the ingress VLAN, and the egress VLAN of each hardware entry in the hardware table. If the source IP address, the destination IP address, and the entry VLAN of each hardware entry in the hardware table are not empty at this time, but only the exit VLAN of each hardware entry is empty, the first core layer switch only needs to add the exit VLAN of each software entry in the software table to the exit VLAN of each hardware entry in the hardware table. Then, when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table, the first core layer switch may forward the current multicast packet to the target access layer switch according to the hardware entry corresponding to the current multicast packet, so that the multicast switching time may be shortened, and the multicast switching speed may be increased.
Step 202, when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role, configuring a hardware table according to the software table.
In the specific embodiment of the present invention, after the first core layer switch receives the current multicast packet sent by the source access layer switch, the first core layer switch may perform different processing on the current multicast packet according to its own corresponding switch role. Specifically, when the switch role of the first core layer switch is the active role, the first core layer switch may forward the current multicast packet according to the hardware entry corresponding to the current multicast packet; when the switch role of the first core layer switch is the standby role, the first core layer switch may discard the current multicast packet according to the hardware entry corresponding to the current multicast packet. Similarly, after the second core layer switch receives the current multicast packet sent by the source access layer switch, the second core layer switch may also perform different processing on the current multicast packet according to its own corresponding switch role. Specifically, when the switch role of the second core layer switch is the active role, the second core layer switch may forward the current multicast packet according to the hardware entry corresponding to the current multicast packet; when the switch role of the second core layer switch is the standby role, the second core layer switch may discard the current multicast packet according to the hardware entry corresponding to the current multicast packet.
Specifically, in the specific embodiment of the present invention, when the switch role of the first core layer switch is the active role, after the first core layer switch receives the current multicast packet sent by the source access layer switch, the first core layer switch may first search a hardware table entry corresponding to the current multicast packet in a hardware table; when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table, the first core layer switch may forward the current multicast packet to the target access layer switch according to the found hardware entry corresponding to the current multicast packet. When the first core layer switch does not find the hardware table entry corresponding to the current multicast message in the hardware table, the first core layer switch may find the software table entry corresponding to the current multicast message in the software table; when the first core layer switch finds the software entry corresponding to the current multicast packet in the software table, the first core layer switch may generate a hardware entry corresponding to the current multicast packet according to the found software entry corresponding to the current multicast packet, and then the first core layer switch may forward the current multicast packet to the target access layer switch according to the hardware entry corresponding to the current multicast packet. When the first core layer switch does not find the software table entry corresponding to the current multicast packet in the software table, the first core layer switch may newly build a software table entry corresponding to the current multicast packet in the software table, at this time, the first core layer switch may generate a hardware table entry corresponding to the current multicast packet according to the newly built software table entry corresponding to the current multicast packet, and then the first core layer switch may forward the current multicast packet to the target access layer switch according to the hardware table entry corresponding to the current multicast packet.
Specifically, in a specific embodiment of the present invention, the storage structure of the hardware table may be as shown in the following table 1:
hardware table entry 1 Source IP address 1 Destination IP Address 1 Ingress VLAN1 Egress VLAN1
Hardware table entry 2 Source IP address 2 Destination IP Address 2 Ingress VLAN2 Egress VLAN2
Hardware table item M Source IP address M Destination IP address M Ingress VLAN M Egress VLAN M
TABLE 1
In table 1, the hardware table may include M hardware table entries, which are: hardware table entry 1, hardware table entries 2, … and hardware table entry M; wherein M is a natural number of 1 or more. Hardware table entry 1 may include: source IP address 1, destination IP address 1, ingress VLAN1, and egress VLAN 1; hardware table entry 2 may include: source IP address 2, destination IP address 2, ingress VLAN2, and egress VLAN 2; …, respectively; the hardware table entry M may include: a source IP address M, a destination IP address M, an ingress VLAN M and an egress VLAN M. It should be noted that there may be one or more egress VLANs in each hardware entry. For example, in hardware table entry 1, there may be one or more egress VLANs 1.
Fig. 3 is a schematic diagram of a composition structure of a hardware table entry in the embodiment of the present invention. As shown in fig. 3, the hardware table entry may include: a source IP address, a destination IP address, an ingress VLAN, and an egress VLAN. In a specific embodiment of the present invention, when the first core layer switch searches for a hardware entry corresponding to the current multicast packet in the hardware table, the first core layer switch may search for the hardware entry corresponding to the current multicast packet in the hardware entry 1, the hardware entry 2, …, and the hardware entry M according to the source IP address, the destination IP address, and the entry VLAN of the current multicast packet. If the source IP address, the destination IP address, and the entry VLAN of the current multicast packet are the same as the source IP address, the destination IP address, and the entry VLAN of any one of the hardware table entries 1, the hardware table entries 2, …, and the hardware table entry M, the first core layer switch determines the hardware table entry as the hardware table entry corresponding to the current multicast packet.
Specifically, in a specific embodiment of the present invention, the storage structure of the software table may be as shown in the following table 2:
software table item 1 Source IP address 1 Destination IP Address 1 Ingress VLAN1 Egress VLAN1 Pruning VLAN1
Software table entry 2 Source IP address 2 Destination IP Address 2 Ingress VLAN2 Egress VLAN2 Pruning VLAN2
Software table item N Source IP address N Destination IP address N Ingress VLAN N Egress VLAN N Pruning of VLAN N
TABLE 2
In table 2, the software table may include N software table entries, which are: software table entry 1, software table entry 2, … and software table entry N; wherein N is a natural number greater than or equal to M. Software table entry 1 may include: source IP address 1, destination IP address 1, ingress VLAN1, egress VLAN1, and pruning VLAN 1; software table entry 2 may include: source IP address 2, destination IP address 2, ingress VLAN2, egress VLAN2, and pruning VLAN 2; …, respectively; the software table entry N may include: a source IP address N, a destination IP address N, an ingress VLAN N, an egress VLAN N, and a pruning VLAN N. It should be noted that, in each software table entry, there may be one or more egress VLANs; in addition, there may be one or more pruning VLANs. For example, in software table entry 1, there may be one or more egress VLANs 1; there may be one or more pruning VLANs 1.
Fig. 4 is a schematic diagram of a composition structure of a software table entry in the embodiment of the present invention. As shown in fig. 4, the software table entry may include: a source IP address, a destination IP address, an ingress VLAN, an egress VLAN, and a pruning VLAN. In a specific embodiment of the present invention, when the first core layer switch searches for the software table entry corresponding to the current multicast packet in the software table, the first core layer switch may search for the software table entry corresponding to the current multicast packet in the software table entry 1, the software table entries 2, …, and the software table entry N according to the source IP address, the destination IP address, and the entry VLAN of the current multicast packet. If the source IP address, the destination IP address and the entrance VLAN of the current multicast message are the same as the source IP address, the destination IP address and the entrance VLAN of any one of the software table entries 1, the software table entries 2, … and the software table entry N, the first core layer switch determines the software table entry as the software table entry corresponding to the current multicast message.
Specifically, in the specific embodiment of the present invention, when the switch role of the first core layer switch is a standby role, after the first core layer switch receives the current multicast packet sent by the source access layer switch, the first core layer switch searches for a software table entry corresponding to the current multicast packet in a software table; when the first core layer switch finds the software table entry corresponding to the current multicast message in the software table entries, the first core layer switch can directly discard the current multicast message; when the first core layer switch does not find the software entry corresponding to the current multicast message in the software entries, the first core layer switch may discard the current multicast message after a new software entry corresponding to the current multicast message is created in the software entries. That is to say, when the first core layer switch in the standby role receives the current multicast packet sent by the source access layer switch, because the exit VLANs of the hardware table entries in the hardware table are all empty, the first core layer switch can only discard the current multicast packet after receiving the current multicast packet sent by the source access layer switch.
Specifically, when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role, the first core layer switch may configure the hardware table according to the software table. Specifically, if the source IP address, the destination IP address, the ingress VLAN, and the egress VLAN of each hardware entry in the hardware table are all empty at this time, the first core layer switch may add the source IP address, the destination IP address, the ingress VLAN, and the egress VLAN of each software entry in the software table to the source IP address, the destination IP address, the ingress VLAN, and the egress VLAN of each hardware entry in the hardware table. If the source IP address, the destination IP address, and the entry VLAN of each hardware entry in the hardware table are not empty at this time, but only the exit VLAN of each hardware entry is empty, the first core layer switch only needs to add the exit VLAN of each software entry in the software table to the exit VLAN of each hardware entry in the hardware table. Then, when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table, the first core layer switch may forward the current multicast packet to the target access layer switch according to the hardware entry corresponding to the current multicast packet, so that the multicast switching time may be shortened, and the multicast switching speed may be increased.
Step 203, when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table, forwarding the current multicast packet to the target access layer switch according to the hardware entry corresponding to the current multicast packet.
In a specific embodiment of the present invention, when the first core layer switch finds a hardware entry corresponding to the current multicast packet in the hardware table, the first core layer switch may forward the current multicast packet to the target access layer switch according to the hardware entry corresponding to the current multicast packet; when the first core layer switch does not find the hardware entry corresponding to the current multicast message in the hardware table, the first core layer switch may find the software entry corresponding to the current multicast message in the software table, and when the first core layer switch finds the software entry corresponding to the current multicast message in the software table, the first core layer switch may generate the hardware entry corresponding to the current multicast message according to the software entry corresponding to the current multicast message, and then forward the current multicast message to the target access layer switch according to the hardware entry corresponding to the current multicast message; when the first core layer switch does not find the software table entry corresponding to the current multicast packet in the software table, the first core layer switch may generate a hardware table entry corresponding to the current multicast packet according to the software table entry corresponding to the current multicast packet after newly establishing a software table entry corresponding to the current multicast packet in the software table, and then forward the current multicast packet to the target access layer switch according to the hardware table entry corresponding to the current multicast packet.
Preferably, in an embodiment of the present invention, the first core layer switch may obtain a first priority of the first core layer switch and a second priority of the second core layer switch according to a preset period; when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, the first core layer switch may determine that its own corresponding switch role is switched from the standby role to the active role. Specifically, when the second core-layer switch in the active role is powered off due to a fault and then powered on again, the second core-layer switch may also obtain a first priority of the first core-layer switch and a second priority of the second core-layer switch according to a preset period; when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, the second core layer switch determines that the switch role corresponding to the second core layer switch is the standby role. For example, when the switch role of the first core layer switch is the standby role, the first priority of the first core layer switch may be configured to be 90; when the switch role of the second core layer switch is the active role, the second priority of the second core layer switch may be configured to be 100. The second priority of the first core layer switch may be configured to 254 if the first core layer switch determines that its own switch role is switched from the standby role to the active role. After that, when the second core layer switch is powered on again, the second core layer may obtain the first priority of the first core layer switch and the second priority of the second core layer switch according to a preset period, and when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, the second core layer switch does not switch back the switch role corresponding to the second core layer switch from the standby role to the active role. That is to say, when the second core layer switch is powered on again, because the second priority 100 of the second core layer switch is smaller than the first priority 254 of the first core layer switch, the second core layer switch determines that the switch role corresponding to the second core layer switch is the standby role, so that the protocol packet for role switchback can no longer be forwarded between the first switch and the second switch, which not only saves traffic, but also prevents the data packet from being lost when the second core layer switch is switched back from the standby role to the active role, thereby ensuring that the first core layer switch in the active role is more stable.
According to the multicast switching method provided by the embodiment of the invention, when a first core layer switch in a standby role receives a current multicast message sent by a source access layer switch, a pre-stored software table is updated according to the current multicast message; then, when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the main role, a hardware table can be configured according to the software table; when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table, the current multicast packet may be forwarded to the target access layer switch according to the hardware entry corresponding to the current multicast packet. That is to say, in the technical solution provided in the embodiment of the present invention, the first core layer switch may configure the hardware table with forwarding capability according to the pre-stored software table to independently calculate the software table with the egress VLAN and the pruning VLAN; when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role, the first core layer switch can synchronously configure a hardware table with forwarding capability according to a locally stored software table, and the first core layer switch does not need to newly establish a software table entry corresponding to the current multicast message in the locally stored software table. Therefore, the first core layer switch can be switched from the standby role to the active role more quickly. In the existing multicast switching method, when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role, the first core layer switch needs to newly establish a software table entry corresponding to the current multicast message in a locally stored software table, and the first core layer switch establishes the software table entry corresponding to the current multicast message in the locally stored software table and needs to go through a process of "flooding-pruning". Therefore, compared with the prior art, the multicast switching method provided by the embodiment of the invention has the advantages of shorter multicast switching time and higher multicast switching speed; moreover, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Fig. 5 is a schematic structural diagram of a multicast switching apparatus according to an embodiment of the present invention. As shown in fig. 5, the apparatus includes: an updating unit 501, a configuration unit 502 and a forwarding unit 503; wherein the content of the first and second substances,
the updating unit 501 is configured to receive a current multicast packet sent by a source access layer switch in a standby role; updating a pre-stored software table according to the current multicast message; wherein, the exit VLAN of each software table entry in the software table is not empty;
the configuration unit 502 is configured to configure a hardware table according to the software table when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role;
the forwarding unit 503 is configured to forward the current multicast packet to a target access layer switch according to the hardware entry corresponding to the current multicast packet when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table.
Further, the updating unit 501 is specifically configured to search the software table entry corresponding to the current multicast packet in the software table; when the software table entry corresponding to the current multicast message is found in the software table entry, discarding the current multicast message; and when the software table entry corresponding to the current multicast message is not found in the software table entry, discarding the current multicast message after a new software table entry corresponding to the current multicast message is established in the software table entry.
Further, the configuration unit 502 is further configured to add the source IP address, the destination IP address, and the entry VLAN of each software table entry in the software table to the source IP address, the destination IP address, and the entry VLAN of each hardware table entry in the hardware table; wherein, the exit VLAN of each hardware table entry is empty.
Further, the configuration unit 502 is further configured to obtain a first priority of the first core-layer switch and a second priority of the second core-layer switch according to a preset period; and when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, determining that the switch role corresponding to the first core layer switch is switched from the standby role to the active role.
According to the multicast switching device provided by the embodiment of the invention, when a first core layer switch in a standby role receives a current multicast message sent by a source access layer switch, a pre-stored software table is updated according to the current multicast message; then, when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the main role, a hardware table can be configured according to the software table; when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table, the current multicast packet may be forwarded to the target access layer switch according to the hardware entry corresponding to the current multicast packet. That is to say, in the technical solution provided in the embodiment of the present invention, the first core layer switch may configure the hardware table with forwarding capability according to the pre-stored software table to independently calculate the software table with the egress VLAN and the pruning VLAN; when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role, the first core layer switch can synchronously configure a hardware table with forwarding capability according to a locally stored software table, and the first core layer switch does not need to newly establish a software table entry corresponding to the current multicast message in the locally stored software table. Therefore, the first core layer switch can be switched from the standby role to the active role more quickly. In the existing multicast switching method, when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role, the first core layer switch needs to newly establish a software table entry corresponding to the current multicast message in a locally stored software table, and the first core layer switch establishes the software table entry corresponding to the current multicast message in the locally stored software table and needs to go through a process of "flooding-pruning". Therefore, compared with the prior art, the multicast switching device provided by the embodiment of the invention has the advantages of shorter multicast switching time and higher multicast switching speed; moreover, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
The embodiment of the present invention further provides a storage medium, which stores computer-executable instructions, where the computer-executable instructions are used to execute the method described in any one of the above embodiments.
An embodiment of the present invention further provides a core layer switch, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method according to any one of the embodiments described above.
Of course, the storage medium provided by the embodiment of the present invention and containing the computer-executable instructions is not limited to the method operations described above, and may also perform related operations in the authentication method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method for multicast switching, the method comprising:
when a first core layer switch in a standby role receives a current multicast message sent by a source access layer switch, updating a pre-stored software table according to the current multicast message; wherein, the updating the pre-stored software table according to the current multicast message comprises: the first core layer switch searches a software table item corresponding to the current multicast message in the software table; when the first core layer switch finds the software table entry corresponding to the current multicast message in the software table entry, the first core layer switch discards the current multicast message; when the first core layer switch does not find the software table entry corresponding to the current multicast message in the software table entries, the first core layer switch discards the current multicast message after newly establishing a software table entry corresponding to the current multicast message in the software table entries; wherein, the exit VLAN of each software table entry in the software table is not empty;
when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the main role, configuring a hardware table according to the software table;
and when the first core layer switch finds the hardware table entry corresponding to the current multicast message in the hardware table, forwarding the current multicast message to a target access layer switch according to the hardware table entry corresponding to the current multicast message.
2. The method of claim 1, wherein after the updating of the pre-stored software table according to the current multicast packet, the method further comprises:
the first core switch adds the source IP address, the destination IP address and the entrance VLAN of each software table entry in the software table to the source IP address, the destination IP address and the entrance VLAN of each hardware table entry in the hardware table; wherein, the exit VLAN of each hardware table entry is empty.
3. The method of claim 1, wherein the first core layer switch determining that its corresponding switch role is switched from a standby role to an active role comprises:
the first core layer switch acquires a first priority of the first core layer switch and a second priority of the second core layer switch according to a preset period;
when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the active role.
4. The method of claim 1, further comprising:
when the second core layer switch in the main role is powered off due to a fault and then powered on again, acquiring a first priority of the first core layer switch and a second priority of the second core layer switch according to a preset period;
when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, the second core layer switch determines that the switch role corresponding to the second core layer switch is the standby role.
5. A multicast switching apparatus, the apparatus comprising: the system comprises an updating unit, a configuration unit and a forwarding unit; wherein the content of the first and second substances,
the updating unit is used for updating a pre-stored software table according to the current multicast message when the standby role receives the current multicast message sent by the source access layer switch; wherein, the updating the pre-stored software table according to the current multicast message comprises: searching a software table item corresponding to the current multicast message in the software table; when the software table entry corresponding to the current multicast message is found in the software table entry, discarding the current multicast message; when the software table entry corresponding to the current multicast message is not found in the software table entry, discarding the current multicast message after a software table entry corresponding to the current multicast message is newly established in the software table entry; wherein, the exit VLAN of each software table entry in the software table is not empty;
the configuration unit is used for configuring a hardware table according to the software table when the first core layer switch determines that the switch role corresponding to the first core layer switch is switched from the standby role to the main role;
the forwarding unit is configured to forward the current multicast packet to a target access layer switch according to the hardware entry corresponding to the current multicast packet when the first core layer switch finds the hardware entry corresponding to the current multicast packet in the hardware table.
6. The apparatus according to claim 5, wherein the configuration unit is further configured to add the source IP address, the destination IP address, and the ingress VLAN of each software table entry in the software table to the source IP address, the destination IP address, and the ingress VLAN of each hardware table entry in the hardware table; wherein, the exit VLAN of each hardware table entry is empty.
7. The apparatus of claim 5, wherein the configuration unit is further configured to obtain a first priority of the first core-layer switch and a second priority of a second core-layer switch according to a preset period; and when the first priority of the first core layer switch is greater than the second priority of the second core layer switch, determining that the switch role corresponding to the first core layer switch is switched from the standby role to the active role.
8. A core layer 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 instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 4.
9. A storage medium storing computer-executable instructions for performing the method of any one of claims 1 to 4.
CN201711282821.9A 2017-12-07 2017-12-07 Multicast switching method, device, core layer switch and storage medium Active CN108011828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711282821.9A CN108011828B (en) 2017-12-07 2017-12-07 Multicast switching method, device, core layer switch and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711282821.9A CN108011828B (en) 2017-12-07 2017-12-07 Multicast switching method, device, core layer switch and storage medium

Publications (2)

Publication Number Publication Date
CN108011828A CN108011828A (en) 2018-05-08
CN108011828B true CN108011828B (en) 2020-09-11

Family

ID=62057344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711282821.9A Active CN108011828B (en) 2017-12-07 2017-12-07 Multicast switching method, device, core layer switch and storage medium

Country Status (1)

Country Link
CN (1) CN108011828B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901133B (en) * 2020-08-07 2023-07-11 北京东土军悦科技有限公司 Multicast switching method, device, network equipment and storage medium
CN112187578B (en) * 2020-09-28 2022-11-25 新华三信息安全技术有限公司 Table entry generation method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557342A (en) * 2009-05-18 2009-10-14 杭州华三通信技术有限公司 Forwarding method of multicast messages and router
CN104065494A (en) * 2014-07-03 2014-09-24 上海斐讯数据通信技术有限公司 Rack-type OLT equipment and method for achieving multicast VLAN therefor
CN105306356A (en) * 2014-07-30 2016-02-03 上海博达数据通信有限公司 Method for realizing master-slave switching of multicast routing on distributed system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015119227A (en) * 2013-12-16 2015-06-25 富士通株式会社 Communication system, communication device, and path switching method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557342A (en) * 2009-05-18 2009-10-14 杭州华三通信技术有限公司 Forwarding method of multicast messages and router
CN104065494A (en) * 2014-07-03 2014-09-24 上海斐讯数据通信技术有限公司 Rack-type OLT equipment and method for achieving multicast VLAN therefor
CN105306356A (en) * 2014-07-30 2016-02-03 上海博达数据通信有限公司 Method for realizing master-slave switching of multicast routing on distributed system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《虚拟化条件下按需组播技术的探究与实现》;祝晓龙;《中国优秀硕士学位论文全文数据库信息科技辑》;20170331;全文 *

Also Published As

Publication number Publication date
CN108011828A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
US9077551B2 (en) Selection of multicast router interfaces in an L2 switch connecting end hosts and routers, which is running IGMP and PIM snooping
US9100203B2 (en) IP multicast over multi-chassis trunk
EP3070877A1 (en) Evpn inter-subnet multicast forwarding
US10855579B2 (en) Optimizing IP multicast delivery with use of local source nodes and the propagation of advertisements therefor
US20170093689A1 (en) Protocol independent multicast register optimization
EP2989755B1 (en) Efficient multicast delivery to dually connected (vpc) hosts in overlay networks
EP3465982B1 (en) Bidirectional multicasting over virtual port channel
WO2020176782A1 (en) Redundant multicast trees without duplication and with fast recovery
US20160043878A1 (en) Multicast communications method and aggregation switch
CN108011828B (en) Multicast switching method, device, core layer switch and storage medium
CN109257190B (en) Multicast processing method, controller, switch and system based on SDN
US10742431B2 (en) Centralized database based multicast converging
EP4300914A1 (en) Bierv6 message processing method, and device and system
US11909546B2 (en) Method and network node for sending and obtaining assert packet
CN102843303B (en) Multicast message processing method in PIM and device
EP4057578A1 (en) Internet group management protocol host mobility in ethernet virtual private network multicast networks
CN110868307A (en) Message processing method and device
Cisco Configuring IP Multicast Layer 3 Switching
CN114465942A (en) Forwarding method and system for simultaneously supporting two-layer multicast traffic and three-layer multicast traffic
CN113014495B (en) Source initiative community for improved multicasting
CN113810285B (en) Method and apparatus for multicast source discovery protocol MSDP loop avoidance
US11811509B2 (en) Upstream multicast hop (UMH) extensions for anycast deployments
CN116455807A (en) Multicast traffic forwarding method, multicast system, routing device and storage medium
CN101815038B (en) Multicast router identifying method and system of access network

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