Multicast message forwarding path learning method and system
By establishing a multicast subscription relationship table and a neighbor relationship table in a network switch, combined with the multicast routing protocol, the automatic learning of multicast forwarding paths is realized, and the configuration problem of multicast forwarding path management in intelligent substations is solved, and the operation and maintenance efficiency and project implementation efficiency are improved.
Patent Information
- Application Number
- CN202510400165.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-04
AI Technical Summary
The existing technology multicast forwarding path management method in intelligent substations has problems such as large configuration workload, prone to errors, long construction cycles, and insufficient flexibility, especially when accessing IED equipment and replacing ports.
By establishing a multicast subscription relationship table, a corresponding relationship table of ports and multicast addresses in a network switch, and a network switch neighbor relationship table, combined with the multicast routing protocol, the multicast forwarding path configuration is automatically completed.
The automatic configuration of multicast forwarding paths is realized, the operation and maintenance level is improved, the manual configuration workload is reduced, the project implementation efficiency is improved, and the compatibility is good with the existing technology.
Smart Images

Figure CN120263760A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system control, and relates to a method and system for learning multicast packet forwarding paths. Background Art
[0002] With the wide popularization and application of intelligent substations, currently, methods such as CSD, static multicast, and VLAN are mainly used to manage the GOOSE / SV forwarding paths, but there is still room for optimization in the management methods.
[0003] CSD management method: It is required that IED devices can only work properly when they are connected to the switches and ports specified in the CSD file. However, during the commissioning stage of the substation, the environment is poor, and situations such as plugging and unplugging network cables often occur. It is difficult to ensure that IED devices are connected to the specified ports; during the operation stage, in the case of a failure of the switch port in use, it is difficult to replace the standby port according to the normal process.
[0004] Static multicast management method: It is necessary to manually plan the static multicast configuration of each switch according to the network physical topology blueprint and the IED subscription relationship and configure it on each switch. This requires high professional knowledge of the operators, with a large configuration workload and being prone to errors and repetitions, resulting in a large amount of configuration verification work, which is not conducive to substation commissioning and affects the construction period.
[0005] VLAN multicast management method: It is necessary to manually plan the static multicast configuration of each switch according to the network physical topology blueprint and the IED subscription relationship and configure it on each switch. Although the configuration workload is smaller than that of the static multicast management method, there are still problems such as high requirements for the professional knowledge of operators, large configuration workload, and being prone to errors and repetitions. Moreover, this multicast management method cannot synchronously use functions such as multicast flow control and unknown multicast discarding, and the network reliability is not high.
[0006] Therefore, currently, the management methods such as CSD, static multicast, and VLAN multicast used in intelligent substations cannot fully meet the requirements of on-site commissioning, operation and maintenance, etc. Summary of the Invention
[0007] To solve the deficiencies in the prior art, the present invention provides a method and system for learning multicast packet forwarding paths, which can automatically complete the multicast forwarding path configuration without restricting the access ports of IED devices, and effectively improve the operation and maintenance level.
[0008] The present invention adopts the following technical solutions.
[0009] The first aspect of the present invention proposes a method for learning multicast packet forwarding paths, including:
[0010] Each network switch within the station obtains the multicast address subscription relationships of IED devices to form the same multicast subscription relationship table;
[0011] Each network switch respectively learns the multicast address and input port of the multicast packets sent by the IED device, and establishes a corresponding relationship table between the network switch port and the multicast address;
[0012] Each network switch learns the network switch connection relationships through the multicast routing protocol to establish the same network switch neighbor relationship table;
[0013] Combining the multicast subscription relationship table and the corresponding relationship table between the network switch port and the multicast address, the local part of the multicast forwarding table of the network switch is established;
[0014] The network switch publishes the multicast addresses learned locally through the multicast routing protocol packets. Combining the multicast subscription relationship table, the corresponding relationship table between the local port of the network switch and the multicast address, and the neighbor relationship table of the network switch, the cross-network-switch part of the multicast address forwarding table is established. Combining the local part of the information forms a complete multicast forwarding table, realizing the automatic learning of the multicast forwarding path of the network switch.
[0015] Preferably, each network switch within the station obtains the multicast address subscription relationships of IED devices to form the same multicast subscription relationship table, including:
[0016] Each network switch within the station respectively parses the multicast address subscription relationship file of the IED device to obtain the IEDname, multicast address, VLAN, and APPID of the IED device that publishes the multicast, and the IEDname of the IED device that subscribes to the multicast, constituting the multicast subscription relationship table;
[0017] Among them, the multicast address subscription relationship file of the IED device is obtained by extracting the publish / subscribe relationships of the GOOSE and SV control blocks in the entire station's SCD file.
[0018] Preferably, each network switch respectively learns the multicast address and input port of the multicast packets sent by the IED device, and establishes a corresponding relationship table between the network switch port and the multicast address, including:
[0019] The network switch port receives the GOOSE and SV multicast packets sent by the IED device, and learns the relationship between the multicast address and the input port through IPFIX or ACL, and establishes a corresponding relationship table between the network switch port and the multicast address, including the network switch port, the multicast address received by this port, and the IEDname of the IED device to which this multicast address belongs.
[0020] Preferably, for an IED device that does not send any multicast packets, configure the IED device to the access network switch port through manual configuration, add the manually configured IED device to the correspondence table of network switch ports and multicast addresses. The corresponding entry does not contain a multicast address, but only contains the port and the IEDname information of the IED.
[0021] Preferably, monitor the multicast packets accessed by the IPFIX monitoring network switch port and send the data stream information matching the multicast packets to the processor of the network switch, including the source MAC address, destination MAC address, VLAN ID, and input port.
[0022] The processor of the network switch learns the relationship between the multicast address and the input port based on the data stream information, and establishes a corresponding entry in the correspondence table of network switch ports and multicast addresses, including the network switch port, the multicast address received by this port, and the IEDname of the IED device to which this multicast address belongs. The network switch port in the entry is the input port in the data stream information, the multicast address received by this port is the destination MAC address in the data stream information, and the IEDname of the IED device to which this multicast address belongs is found by looking up the multicast subscription relationship table according to the VLAN ID in the data stream information.
[0023] The processor of the network switch monitors the status of each data stream information while establishing the entry in the correspondence table of network switch ports and multicast addresses.
[0024] Preferably, before the processor of the network switch establishes the entry in the correspondence table of network switch ports and multicast addresses, compare the destination MAC address with the multicast subscription relationship table first. If the destination MAC address is not in the multicast subscription relationship table, give an alarm and do not establish the corresponding entry in the correspondence table of network switch ports and multicast addresses.
[0025] Preferably, if there is a situation where the same multicast address is input simultaneously on multiple ports during the process of the processor of the network switch learning the relationship between the multicast address and the input port, give an alarm.
[0026] Preferably, redirect all input packets of the switch to the processor of the switch through the ACL. The processor parses the packets, extracts the correspondence between the input port and the multicast address, and simultaneously sets a new ACL entry based on the input port and the multicast address to form the correspondence table of network switch ports and multicast addresses. And this ACL entry takes precedence over the original ACL entry to execute, allowing the packets matching this ACL entry to enter the switch for forwarding without being sent to the switch processor, and at the same time monitoring the status of the data stream information of this ACL entry.
[0027] Preferably, each of the network switches learns the network switch connection relationship through the multicast routing protocol and establishes the same network switch neighbor relationship table, including:
[0028] The local network switch sends HELLO messages through the multicast routing protocol to interact with other network switches in the station, and discovers the directly connected neighbor information through the HELLO messages;
[0029] After the HELLO message interaction is completed, the local network switch sends the existing neighbor information of the local machine to the DRB network switch in the station through the LSP message. The DRB network switch will send a CSNP message to respond to the LSP message of the local network switch. The CSNP message contains the abbreviated information of the neighbor information, including all the network neighbors that the DRB network switch has learned currently;
[0030] After receiving the CSNP message, the local network switch compares it with the local neighbor relationship table, forms a new PSNP message with the missing part of the CSNP message content and sends it to the DRB network switch. The DRB network switch will reply with the complete LSP neighbor information to the local network switch according to the neighbor information contained in the PSNP message;
[0031] By continuously repeating the above process, each network switch obtains the same network switch neighbor relationship table, which includes the nickname and cascading port of the local network switch, and the nickname and cascading port of the neighbor network switch.
[0032] The second aspect of the present invention proposes a multicast message forwarding path learning system, including:
[0033] A multicast subscription relationship learning module, which is used for each network switch in the station to obtain the multicast address subscription relationship of the IED device and form the same multicast subscription relationship table;
[0034] A port and multicast address relationship learning module, which is used for each network switch to learn the multicast address and input port of the multicast message sent by the IED device respectively, and establish a corresponding relationship table between the network switch port and the multicast address;
[0035] A switch neighbor relationship learning module, which is used for each network switch to learn the network switch connection relationship through the multicast routing protocol and establish the same network switch neighbor relationship table;
[0036] The multicast forwarding table learning module is used to establish the local part information of the network switch multicast forwarding table in combination with the multicast subscription relationship table and the correspondence table between the network switch port and the multicast address; the network switch publishes the multicast address learned locally through the multicast routing protocol message, and establishes the cross-network switch part information of the multicast address forwarding table in combination with the multicast subscription relationship table, the correspondence table between the network switch local port and the multicast address, and the neighbor relationship table of the network switch, and forms a complete multicast forwarding table in combination with the local part information, and the network switch completes the automatic learning of the multicast forwarding path.
[0037] A third aspect of the present invention provides a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.
[0038] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method when executed by a processor.
[0039] Compared with the prior art, the beneficial effects of the present invention include at least:
[0040] The present invention proposes for the first time to extract and learn the multicast address input port from the normal business message input by the IED in combination with the multicast subscription relationship, and complete the automatic setting of the multicast forwarding path in combination with the routing protocol. The route creation can be completed without the participation of the access device, which effectively improves the operation and maintenance level.
[0041] The present invention realizes automatic multicast forwarding path learning by establishing a multicast subscription relationship table, a correspondence table between a network switch port and a multicast address, a network switch neighbor relationship table, and a multicast forwarding table. The learning result is the same as the CSD configuration and static multicast configuration result, and the existing multicast flow control technology can continue to be used. While solving the problems existing in the existing management method, it has good compatibility with the existing technology.
[0042] The present invention can effectively solve the problems of large manual configuration and verification workload, easy configuration errors and long construction period when the multicast forwarding path is managed by VLAN, static multicast and the like. It can also solve the problems of needing to plan the network physical topology in advance, insufficient flexibility and inability to flexibly replace ports when the multicast forwarding path is managed by CSD, thereby greatly improving the efficiency of project implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of the network topology connection relationship in the present invention. DETAILED DESCRIPTION
[0044] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the spirit of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present invention.
[0045] Embodiment 1 of the present invention proposes a method for learning the multicast packet forwarding path. This method is also applicable to the wireless network scenario and involves network switch devices and IED devices such as merging units, intelligent terminals, measurement and control devices, protection devices, intelligent oscillographs, and network analyzers accessing the network. The method includes:
[0046] Step 1, each network switch in the station obtains the multicast address subscription relationship of the IED device and forms the same multicast subscription relationship table;
[0047] Further preferably, the network switch obtains the multicast address subscription relationship of the IED device and forms a multicast address subscription relationship table. The multicast packet subscription relationship is derived from the SCD file of the entire station. The simplified subscription relationship file can be obtained by extracting the publish / subscribe relationship of the GOOSE and SV control blocks in the SCD file, reducing the requirements for the processing capacity of the switch. The multicast address subscription relationship table contains information such as the IEDname, multicast address, VLAN, and APPID of the IED device that publishes the multicast, and the IEDname of the IED device that subscribes to the multicast.
[0048] This embodiment takes Figure 1 the network topology as an example for illustration. The network consists of three network switches. SW1 is used as the central switch and accesses the bus protection and network analyzer; SW2 and SW3 are interval switches and access the merging unit, intelligent terminal, measurement and control device, and line protection respectively.
[0049] First, upload the subscription relationship file generated by extracting the SCD file to the three network switches. The three switches parse the subscription relationship file to obtain the same subscription relationship table, as shown in Table 1;
[0050] The subscription relationship table contains the IEDname of the IED device, the multicast address, APPID, and VLANID information of the GOOSE / SV control block that is published, and the IEDname information of the IED device that subscribes to the control block;
[0051] For IED devices that do not publish any control blocks, only the IEDname needs to be listed, or it can also not be listed in the subscription relationship table.
[0052] Table 1 Multicast Subscription Relationship Table
[0053]
[0054]
[0055] Step 2: Each network switch learns the multicast address and input port of the multicast packets sent by the IED device, and establishes a corresponding relationship table between the network switch ports and the multicast addresses.
[0056] Further preferably, the network device obtains the corresponding relationship table between the multicast address and the network device port by receiving the multicast packets sent by the access IED device through the port.
[0057] The network device synchronizes the corresponding relationship table between the multicast address and the network device port across the network, so that the network devices across the network can obtain the input relationship between each network device port and the multicast address.
[0058] The IED device sends GOOSE and SV multicast packets. The network device learns the multicast address and input port of the multicast packets and establishes a corresponding relationship table between the network device port and the multicast address, as follows:
[0059] After the GOOSE and SV multicast packets sent by the IED device enter the network device port, the network device sends the multicast address to the processor of the network device through methods such as IPFIX and ACL. The processor establishes a corresponding relationship table between the multicast address and the input port, forming a corresponding relationship table between the port and the multicast address. The corresponding relationship table contains information such as the network device port, the multicast address received by this port, and the IEDname of the IED to which this multicast address belongs. The subscription relationship table can be established separately for each network device and does not require network-wide synchronization.
[0060] For the IED device that does not send any multicast packets, configure this IED device to the access network device port through manual configuration. Add the manually configured IED device to the corresponding relationship table between the port and the multicast address. This entry does not contain the multicast address and only contains information about the port and the IEDname of this IED.
[0061] Use the IPFIX (IP Flow Information Export) function to enable the output of data flow information of the layer 2 packets, including source MAC address, destination MAC address, input port, statistical information, etc. While establishing the relationship table between the port and the multicast address, monitor the status of each data flow information.
[0062] Use the ACL (Access Control List) function to establish the correspondence between ports and multicast addresses. Enable the ACL function based on ports, redirect all incoming packets to the switch's processor. The processor parses the packets to extract the correspondence between ports and multicast addresses, and at the same time sets a new ACL (ACL1) entry based on ports and multicast addresses. This ACL (ACL1) takes precedence over the previous ACL (ACL0) entry and allows packets that match this ACL (ACL1) to enter the switch for forwarding without being sent to the switch processor. This ACL (ACL1) entry is bound with a counting and statistics function to monitor the status of this data stream information.
[0063] Before establishing the correspondence table between ports and multicast addresses, first compare the multicast address with the subscription relationship table. If the multicast address is not in the subscription relationship table, give an alarm and do not reflect it in the correspondence table.
[0064] When there is a situation where the same multicast address is input on multiple ports during the multicast address learning process, give an alarm.
[0065] In this embodiment, each network switch pre-enables the IPFIX function, configures IPFIX to monitor layer 2 packets, and configures the key information for monitoring layer 2 packets to include: source MAC address, destination MAC address, input port, VLAN ID, etc.
[0066] The network switch starts to receive multicast packets sent by the IED device, monitors the input packets of each IED device through IPFIX, and sends up the key information of the matching entries.
[0067] For example, the port P1 of SW1 is connected to the bus protection, and sends a packet with a source MAC address of 00-0C-CD-01-00-01, a destination MAC address of 01-0C-CD-01-00-01, and a VLAN ID of 0x0002;
[0068] Through the IPFIX function, a data stream with a source MAC address of 00-0C-CD-01-00-01, a destination MAC address of 01-0C-CD-01-00-01, a VLAN ID of 0x0002, and an input port of P1 is matched. The SW1 switch processor obtains this information and will establish a correspondence entry between the port and the multicast address. The key information of this entry includes: port P1, multicast address 01-0C-CD-01-00-01, and the IED name of this multicast address is BProt. The IED name information is obtained by looking up the subscription relationship table.
[0069] Assume that an IED device is connected to port P6 of SW1, and a packet with a source MAC address of 00-0C-CD-01-01-01, a destination MAC address of 01-0C-CD-01-01-01, and a VLAN ID of 0x0002 is sent. Through the IPFIX function, a data stream matching the source MAC address of 00-0C-CD-01-01-01, the destination MAC address of 01-0C-CD-01-01-01, the VLAN ID of 0x0002, and the input port of P6 is obtained. The SW1 switch processor acquires this information. By looking up the subscription relationship table, it is found that 01-0C-CD-01-01-01 is not in the subscription relationship table. It is determined that this multicast address is an illegal multicast address, and this piece of information will not be established in the port and multicast address relationship table. At the same time, SW1 gives an alarm and records an exception log.
[0070] SW2 and SW3 establish the port and multicast address correspondence table in the same way. The correspondence tables established by the three network switches are shown in Table 2. For the convenience of description, they are presented in the form of a large table.
[0071] Table 2 Network Switch Port Receiving Multicast Address Correspondence Table
[0072]
[0073] Step 3, each network switch learns the network switch connection relationship through the multicast routing protocol and establishes the same network switch neighbor relationship table;
[0074] Further preferably, the network devices establish the neighbor relationship table between network devices through the multicast routing protocol and synchronize the neighbor relationship throughout the network, and the neighbor relationship tables of each network device are finally exactly the same;
[0075] The TRILL protocol can be used for neighbor learning in the multicast routing protocol. The neighbor relationship table established by the TRILL protocol contains the nickname of the local network device, the cascaded port, and the nickname and cascaded port information of the neighbor network device.
[0076] In this embodiment, each network switch pre-enables the multicast routing protocol, and establishes the neighbor relationship table of the network switch through the routing protocol. Taking the TRILL multicast routing protocol as an example, the working state of each port of the network switch is set, the cascaded port is set as a Hybrid port, and other ports are set as Access ports.
[0077] Taking SW2 as an example, first, the TRILL protocol of SW2 sends HELLO packets to interact with SW1 and SW3, and discovers the directly connected neighbor information through the HELLO packets.
[0078] After completing the HELLO message interaction, SW2 sends the existing neighbor information of the local machine to the DRB network switch (assuming it is SW1) through LSP (Link State PDUs). DRB (Designed Routing Bridge) is selected by the TRILL protocol and is responsible for maintaining the neighbor relationship table. SW1 will send a CSNP (Complete Sequence Number PDUs) message to respond to SW2's LSP message. The CSNP message contains brief information about the neighbor information. The message contains all network neighbors that the DRB has currently learned.
[0079] After receiving CSNP, SW2 will compare it with its own neighbor relationship table, and form a new PSNP (Partial Sequence Number PDUs) message with the missing part of the CSNP message and send it to SW1. SW1 will reply the complete LSP neighbor information to SW2 according to the neighbor brief contained in PSNP. By repeating the above process, SW1-SW3 will eventually establish exactly the same neighbor relationship table, as shown in Table 3. Each network switch is represented by a unique Nickname. The neighbor relationship table contains the Nickname and port information of the network switch and the Nickname and port information of the neighboring network switch.
[0080] Table 3 Network switch neighbor relationship table
[0081]
[0082] Step 4, combining the multicast subscription relationship table in Table 1 and the corresponding relationship table between the network switch port and the multicast address in Table 2, to establish the local part of the network switch multicast forwarding table;
[0083] Step 5: The network switch publishes the multicast address learned by the local machine through the multicast routing protocol message, including the multicast address and the switch identifier, and all network switches synchronize the multicast address and switch access relationship in the whole network. Combined with the multicast subscription relationship table in Table 1, the corresponding relationship table between the local port and multicast address of the network switch in Table 2, and the neighbor relationship table of the network switch in Table 3, the cross-network switch part of the multicast address forwarding table is established, and combined with the local part to form a complete multicast forwarding table, the network switch completes the automatic learning of the multicast forwarding path.
[0084] Further preferably, the network device multicast forwarding table includes a multicast address and a forwarding port list, and other information such as APPID can be expanded as needed. The multicast forwarding table of each network device may only include partial information of the local device.
[0085] Combine the correspondence table between network device ports and multicast addresses and the multicast subscription relationship table to establish the local part of the multicast forwarding table of the network device; the network device publishes the multicast addresses published by the local machine through multicast routing protocol messages. The network device combines the network device neighbor relationship table, the multicast subscription relationship table, and the correspondence table between the local ports of the network device and multicast addresses to establish the cross-network device part of the multicast address forwarding table. A complete multicast forwarding table is formed.
[0086] According to the above steps, input the multicast addresses published and subscribed by the preset IED devices into the network device, and combine the published and subscribed multicast addresses of the IED devices and the correspondence table between the multicast addresses published by the IED devices and the network device ports to determine the multicast addresses that each network device port needs to subscribe to. Then, combine the network device neighbor relationship table to determine the forwarding path of the multicast address. Finally, the network device realizes automatic learning of the multicast forwarding path, and the multicast packets are forwarded according to the multicast forwarding table.
[0087] In this embodiment, specifically by extending the TRILL protocol, use LSP, CSNP, and PSNP protocol messages to synchronize the multicast addresses published by each network switch accessing the IED device to each network switch on the network. Finally, the input multicast address tables of each switch are exactly the same. The input multicast address table at least includes the name of the network switch that inputs the multicast address and the multicast address information. This goal can also be achieved by synchronizing the port and multicast address relationship table among network switches. That is, the switch receives the full-network synchronization of the IED input multicast address, and the synchronization information includes the multicast address, the input switch port, and the switch identifier and other information.
[0088] For example, SW1 has established the correspondence table between the network switch ports that receive multicast addresses, the network neighbor relationship table, and the multicast subscription relationship table of SW1 - SW3. SW1 can complete the planning of the forwarding path of the multicast packets for the local machine accessing the IED device and crossing the network switch. Finally, the multicast forwarding table of the local machine of SW1 is realized. Similarly, SW2 and SW3 will also realize the multicast forwarding table of the local machine. The aggregated multicast forwarding tables of SW1 to SW3 are shown in the multicast forwarding table of Table 4, where the network switch column distinguishes the multicast forwarding tables established by different switches.
[0089] Table 4 Multicast Forwarding Table
[0090]
[0091]
[0092] In the above manner, the automatic learning of the multicast forwarding path is achieved. The learning result is the same as that of the CSD configuration and the static multicast configuration. Existing multicast flow control technologies can continue to be used. While solving the problems existing in the existing CSD configuration, static multicast configuration, VLAN configuration, etc., it has good compatibility with the existing technologies.
[0093] Embodiment 2 of the present invention proposes a multicast packet forwarding path learning system, including:
[0094] A multicast subscription relationship learning module, configured to obtain the multicast address subscription relationships of IED devices by each network switch in the station, and form the same multicast subscription relationship table;
[0095] A port and multicast address relationship learning module, configured to respectively learn the multicast address and the input port of the multicast packets sent by the IED devices by each network switch, and establish a corresponding relationship table between the network switch ports and the multicast addresses;
[0096] A switch neighbor relationship learning module, configured to learn the network switch connection relationships by each network switch through the multicast routing protocol, and establish the same network switch neighbor relationship table;
[0097] A multicast forwarding table learning module, configured to combine the multicast subscription relationship table and the corresponding relationship table between the network switch ports and the multicast addresses to establish the local part information of the network switch multicast forwarding table; the network switch publishes the multicast addresses learned locally through the multicast routing protocol packets, and combines the multicast subscription relationship table, the corresponding relationship table between the network switch local ports and the multicast addresses, and the neighbor relationship table of the network switch to establish the cross-network switch part information of the multicast address forwarding table, and combines the local part information to form a complete multicast forwarding table, and the network switch completes the automatic learning of the multicast forwarding path.
[0098] Embodiment 3 of the present invention proposes a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.
[0099] Embodiment 4 of the present invention proposes a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method are implemented.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: the specific implementation manners of the present invention can still be modified or equivalently replaced, and any modification or equivalent replacement without departing from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.
Claims
1. A method for learning a multicast packet forwarding path, characterized in that, Including: Each network switch within the station obtains the multicast address subscription relationship of the IED device, and forms the same multicast subscription relationship table; Each network switch respectively learns the multicast address and input port of the multicast packet sent by the IED device, and establishes a corresponding relationship table between the network switch port and the multicast address; Each network switch learns the network switch connection relationship through the multicast routing protocol, and establishes the same network switch neighbor relationship table; Combining the multicast subscription relationship table and the corresponding relationship table between the network switch port and the multicast address, establish the local part information of the network switch multicast forwarding table; The network switch publishes the multicast address learned locally through the multicast routing protocol packet. Combining the multicast subscription relationship table, the corresponding relationship table between the network switch local port and the multicast address, and the neighbor relationship table of the network switch, establish the cross-network switch part information of the multicast address forwarding table, and combine the local part information to form a complete multicast forwarding table, realizing the automatic learning of the multicast forwarding path of the network switch.
2. A method for learning the multicast packet forwarding path according to claim 1, characterized in that: The process by which each network switch within the station obtains the multicast address subscription relationship of the IED device and forms the same multicast subscription relationship table includes: Each network switch within the station respectively parses the multicast address subscription relationship file of the IED device, and obtains the IEDname, multicast address, VLAN, and APPID of the IED device that publishes the multicast, and the IEDname of the IED device that subscribes to the multicast, constituting the multicast subscription relationship table; Among them, the multicast address subscription relationship file of the IED device is obtained by extracting the publish / subscribe relationship of the GOOSE and SV control blocks in the entire station SCD file.
3. A method for learning the multicast packet forwarding path according to claim 1, characterized in that: The process by which each network switch respectively learns the multicast address and input port of the multicast packet sent by the IED device and establishes a corresponding relationship table between the network switch port and the multicast address includes: The network switch port receives the GOOSE and SV multicast packets sent by the IED device, learns the relationship between the multicast address and the input port through IPFIX or ACL, and establishes a corresponding relationship table between the network switch port and the multicast address, including the network switch port, the multicast address received by this port, and the IEDname of the IED device to which this multicast address belongs.
4. A method for learning the multicast packet forwarding path according to claim 3, characterized in that: For an IED device that does not send any multicast packets, configure this IED device to the connected network switch port through manual configuration, and add the manually configured IED device to the corresponding relationship table between the network switch port and the multicast address. The corresponding entry does not include the multicast address, but only includes the port and the IEDname information of this IED.
5. A method for learning the multicast packet forwarding path according to claim 3, characterized in that: Monitor the multicast packets accessed through the IPFIX monitoring network switch port and send the data stream information matching the multicast packets to the processor of the network switch, including the source MAC address, destination MAC address, VLAN ID, and input port; Based on the data stream information, the processor of the network switch learns the relationship between the multicast address and the input port, and establishes the corresponding relationship table entry between the network switch port and the multicast address, including the network switch port, the multicast address received by this port, and the IED name of the IED device to which this multicast address belongs. In the entry, the network switch port is the input port in the data stream information, the multicast address received by this port is the destination MAC address in the data stream information, and the IED name of the IED device to which this multicast address belongs is found by looking up the multicast subscription relationship table according to the VLAN ID in the data stream information; While establishing the corresponding relationship table entry between the network switch port and the multicast address, the processor of the network switch monitors the status of each data stream information.
6. A method for learning the multicast packet forwarding path according to claim 5, characterized in that: Before establishing the corresponding relationship table entry between the network switch port and the multicast address, the processor of the network switch first compares the destination MAC address with the multicast subscription relationship table. If the destination MAC address is not in the multicast subscription relationship table, an alarm is generated and the corresponding relationship table entry between the network switch port and the multicast address will not be established.
7. A method for learning the multicast packet forwarding path according to claim 5, characterized in that: If there is a situation where the same multicast address is input simultaneously on multiple ports during the process of the processor of the network switch learning the relationship between the multicast address and the input port, an alarm is generated.
8. A method for learning the multicast packet forwarding path according to claim 3, characterized in that: Redirect all input packets of the switch to the processor of the switch through the ACL. The processor parses the packets, extracts the corresponding relationship between the input port and the multicast address, and at the same time sets a new ACL entry based on the input port and the multicast address to form the corresponding relationship table between the network switch port and the multicast address; and this ACL entry takes precedence over the original ACL entry and allows the packets matching this ACL entry to enter the switch for forwarding without being sent to the switch processor. At the same time, the status of the data stream information of this ACL entry is monitored.
9. A method for learning the multicast packet forwarding path according to claim 1, characterized in that: Each network switch learns the network switch connection relationship through the multicast routing protocol and establishes the same network switch neighbor relationship table, including: The local network switch sends HELLO packets through the multicast routing protocol to interact with other network switches in the station, and discovers the directly connected neighbor information through the HELLO packets; After the HELLO message interaction is completed, the local network switch sends the existing neighbor information of the local machine to the in-station DRB network switch through an LSP message. The DRB network switch will send a CSNP message to respond to the LSP message of the local network switch. The CSNP message contains the abbreviated information of the neighbor information, including all the network neighbors that the DRB network switch has learned currently. After receiving the CSNP message, the local network switch compares it with the local neighbor relationship table, forms a new PSNP message with the missing part of the CSNP message content, and sends it to the DRB network switch. The DRB network switch will reply with the complete LSP neighbor information to the local network switch according to the neighbor information contained in the PSNP message. By continuously repeating the above process, each network switch obtains the same network switch neighbor relationship table, which includes the nickname and cascade port of the local network switch, and the nickname and cascade port of the neighbor network switch.
10. A multicast packet forwarding path learning system for running the method according to any one of claims 1-9, characterized in that, The system includes: A multicast subscription relationship learning module, which is used for each network switch in the station to obtain the multicast address subscription relationship of the IED device and form the same multicast subscription relationship table. A port and multicast address relationship learning module, which is used for each network switch to learn the multicast address and input port of the multicast message sent by the IED device respectively, and establish the corresponding relationship table between the network switch port and the multicast address. A switch neighbor relationship learning module, which is used for each network switch to learn the network switch connection relationship through the multicast routing protocol and establish the same network switch neighbor relationship table. A multicast forwarding table learning module, which is used to establish the local part information of the network switch multicast forwarding table in combination with the multicast subscription relationship table and the corresponding relationship table between the network switch port and the multicast address. The network switch publishes the multicast address learned locally through the multicast routing protocol message, and combines the multicast subscription relationship table, the corresponding relationship table between the local port of the network switch and the multicast address, and the neighbor relationship table of the network switch to establish the cross-network switch part information of the multicast address forwarding table, and combines the local part information to form a complete multicast forwarding table, and the network switch completes the automatic learning of the multicast forwarding path.