A method and system for realizing transparent mode access of industrial control firewall to dual-machine hot standby
By adding the uplink and downlink interfaces of the active and standby firewalls to the same VLAN in the industrial control firewall, and using heartbeat messages to switch roles, the problem that the existing technology cannot handle faults other than interface down faults is solved, and traffic of all faults is realized. Guidance improves network reliability.
Patent Information
- Application Number
- CN202211620944.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-12-16
AI Technical Summary
Existing industrial control firewalls cannot effectively handle other faults except interface down faults during dual-machine hot standby switching. As a result, traffic cannot be directed to the standby device, posing the risk of a single point of failure.
By adding the upstream and downstream interfaces of the active and standby firewalls to the same VLAN, the active firewall actively learns and synchronizes the MAC table to the standby firewall in real time, and regularly sends heartbeat messages to declare the active state. After the standby firewall detects the heartbeat timeout, it updates the MAC table and switches roles. Realize automatic guidance of traffic.
The traffic diversion method during active/standby switchover has been optimized. Regardless of whether the fault type of the main device is an interface down type, traffic can be directed to the standby device, improving the reliability and availability of the network.
Smart Images

Figure CN115987761B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial control security technology, and in particular to a method and system for realizing transparent mode access of an industrial control firewall to dual-machine hot standby. Background Art
[0002] Industrial control firewalls are deployed at key locations in industrial environments, and industrial control traffic will be forwarded through firewalls. If the firewall fails, all services between the internal and external networks will be interrupted. It can be seen that if only one device is used at such a key location of the network, no matter how high its reliability is, we must bear the risk of network interruption due to single-point failure of the device. Therefore, when designing the network architecture, we usually deploy two (dual machines) or more devices at key locations of the network to improve the reliability of the network and meet the requirements of the enhanced level of the national standard. Dual-machine hot standby has multiple networking modes such as transparent access and routing access. The common transparent mode dual-machine hot standby master-slave switching diversion method is "the interface in the VLAN of the main device will be down and then up once, triggering the upstream and downstream layer 2 devices to update the MAC forwarding table", but this implementation method is defective. It hopes to achieve diversion when the main device interface is down, and it is impossible to achieve traffic diversion to the standby device for other failures of the host. Therefore, the present invention proposes a dual-machine hot standby implementation method for transparent mode access and upstream and downstream connection layer 2 devices. Summary of the invention
[0003] The present invention provides a method for implementing the transparent mode access of an industrial control firewall to dual-machine hot standby, comprising:
[0004] The upstream and downstream interfaces of the active and standby firewalls are added to the same VLAN;
[0005] The main firewall actively learns the MAC table of the upstream and downstream interfaces, and synchronizes and backs up the table to the backup firewall in real time;
[0006] The active firewall periodically sends heartbeat messages to the standby firewall, declaring itself as the active firewall and requesting the standby firewall to prohibit VLAN forwarding.
[0007] When the standby firewall receives the heartbeat message, it actively disables its own VLAN, stops forwarding traffic, and remains in the standby state;
[0008] If the standby firewall times out when receiving the heartbeat message, it is considered that the main firewall has failed. The standby firewall traverses the MAC table of the backup upstream and downstream interfaces, and sends a Layer 2 broadcast message with the MAC address as the source MAC to refresh the MAC table of the upstream and downstream switches, update the current state to the main state, and the standby firewall becomes the new main firewall, and the original main firewall becomes the new standby firewall.
[0009] As described above, in the implementation method of transparent mode access of an industrial control firewall to dual-machine hot standby, the source MAC of the heartbeat message is filled with the MAC address of the optical fiber Ethernet interface card of the main firewall, and the destination address is filled with the address of the optical fiber Ethernet interface card of the standby firewall.
[0010] In the above-mentioned method for realizing transparent access of an industrial control firewall to dual-machine hot standby, the heartbeat message adopts a layer 2 message, specifically a layer 2 unicast heartbeat message.
[0011] As described above, in the implementation method of transparent mode access of an industrial control firewall to dual-machine hot standby, after receiving a heartbeat message, the standby firewall detects whether its firewall status is a standby status, and if not, sets the status of the firewall device to a standby status.
[0012] As described above, a method for implementing transparent mode access of an industrial control firewall to dual-machine hot standby, wherein the mac tables of the upstream and downstream switches are refreshed, specifically updating the mac table outgoing interface to the outgoing interface on the standby link.
[0013] The present invention also provides a system for realizing the transparent mode access of an industrial control firewall to dual-machine hot standby, comprising: two firewalls, the two firewalls are mutually active and standby firewalls, and the uplink and downlink interfaces of the active and standby firewalls are added to the same VLAN;
[0014] The main firewall actively learns the MAC table of the upstream and downstream interfaces, and synchronizes and backs up the table to the standby firewall in real time; the main firewall sends heartbeat messages to the standby firewall regularly, declaring that it is currently in the main state and requiring the standby firewall to prohibit VLAN forwarding;
[0015] The standby firewall receives the heartbeat message from the main firewall, actively disables its own VLAN, does not forward traffic, and maintains the standby state; if the standby firewall times out when receiving the heartbeat message, it is considered that the main firewall has failed, and the standby firewall traverses the MAC table of the backup upstream and downstream interfaces, and sends a Layer 2 broadcast message with the MAC address as the source MAC to refresh the MAC table of the upstream and downstream switches, update the current state to the main state, and the standby firewall becomes the new main firewall, and the original main firewall becomes the new standby firewall.
[0016] The present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium contains one or more program instructions, and the one or more program instructions are used by a processor to execute any of the above-mentioned methods for implementing the transparent mode access of an industrial control firewall to dual-machine hot standby.
[0017] The beneficial effects achieved by the present invention are as follows: the present invention optimizes the traffic diversion method during master-slave switching, and can guide traffic to the backup device regardless of whether the failure type of the master device is an interface down type. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0019] Figure 1 This is a flow chart of a method for implementing a transparent mode access of an industrial control firewall to dual-machine hot standby provided by an embodiment of the present invention;
[0020] Figure 2 This is a simplified diagram of a transparent mode dual-machine hot standby network. DETAILED DESCRIPTION
[0021] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0022] Embodiment 1
[0023] See also Figure 1 Embodiment 1 of the present invention provides a method for implementing a transparent mode access of an industrial control firewall to dual-machine hot standby, including:
[0024] Step 110: Add the upstream and downstream interfaces of the active and standby firewalls to the same VLAN;
[0025] Figure 2 This is an example diagram of a transparent dual-machine network. In the figure, firewall FW1 is the main firewall, and firewall FW2 is the backup firewall. Firewall FW1 includes GE1 / 0 / 1 port, GE1 / 0 / 2 port, and GE1 / 0 / 3 port, and firewall FW2 includes GE1 / 0 / 1 port, GE1 / 0 / 2 port, and GE1 / 0 / 3 port. GE1 / 0 / 1 of FW1 and GE1 / 0 / 1 of FW2 are both connected to switch SW2 and connected to PC1. The MAC address of PC1 is 00-11-22-33-44-55; GE1 / 0 / 2 of FW1 is connected to GE1 / 0 / 2 of FW2; GE1 / 0 / 3 of FW1 and GE1 / 0 / 3 of FW2 are both connected to switch SW1 and connected to PC2. The MAC address of PC2 is 00-11-22-33-44-66. Add GE1 / 0 / 3, GE1 / 0 / 1 of FW1 and GE1 / 0 / 3, GE1 / 0 / 1 of FW2 to the same VLAN (vlan1).
[0026] Step 120, the main firewall actively learns the MAC table of the upstream and downstream interfaces, and synchronizes and backs up the table to the standby firewall in real time;
[0027] For example, Figure 2 The main firewall FW1 actively learns the MAC addresses of the upstream and downstream devices, and synchronizes and backs them up to FW2 in real time. Taking the uplink as an example, the source MAC address of the heartbeat message is filled with the MAC address of FW1-GE1 / 0 / 3, and the destination address is filled with the address of FW2-GE1 / 0 / 3. At this time, the MAC addresses learned by the main firewall FW1 are (00-11-22-33-44-55, GE1 / 0 / 1) and (00-11-22-33-44-66, GE1 / 0 / 3), and the learned MAC addresses are backed up to the standby firewall.
[0028] Step 130: The primary firewall periodically sends a heartbeat message to the backup firewall, declaring that it is currently in the primary state and requiring the backup firewall to prohibit VLAN forwarding;
[0029] For example, Figure 2 The main firewall FW1 sends heartbeat messages to the standby firewall FW2 regularly. Because of the transparent access of Layer 2, the heartbeat messages use Layer 2 messages, specifically Layer 2 unicast heartbeat messages. The main firewall FW1 sends heartbeat messages to the standby FW2 regularly to declare that it is currently in the main state and request the standby firewall FW2 to prohibit VLAN forwarding.
[0030] Step 140: After receiving the heartbeat message, the standby firewall actively disables its own VLAN, stops forwarding traffic, and remains in the standby state;
[0031] For example Figure 2 In the example, when the standby firewall FW2 receives the declaration from the main firewall FW1, it actively disables its own VLAN and does not forward traffic; and the standby firewall FW2 detects whether its firewall status is the standby status. If not, it sets the status of the firewall device to the standby status, thereby keeping FW2 in the standby status in the current situation.
[0032] Step 150: If the standby firewall times out when receiving the heartbeat message, the main firewall is considered to be faulty. The standby firewall traverses the MAC tables of the backup upstream and downstream interfaces, and sends a layer 2 broadcast message with each MAC as the source MAC to refresh the MAC tables of the upstream and downstream switches, and updates the current state to the main state. The standby firewall becomes the new main firewall, and the original main firewall becomes the new standby firewall.
[0033] Specifically, for example Figure 2In the example, when the standby firewall FW2 detects the heartbeat timeout, it determines that the main firewall FW1 has failed. The standby firewall FW2 traverses the mac table of the upstream and downstream interfaces that was previously backed up by the main firewall FW1, and sends a Layer 2 broadcast message with each mac as smac. That is, FW2 sends PC2's mac 00-11-22-33-44-66 from the GE1 / 0 / 3 port and PC1's mac 00-11-22-33-44-55 from the GE1 / 0 / 1 port to refresh the mac table of the upstream and downstream switches, and update the mac table outbound interface to the outbound interface on the standby link, so as to divert traffic to the standby firewall FW2.
[0034] Then, the standby firewall FW2 updates its current state to the master state and automatically becomes the master firewall. At this point, the roles of the master and standby firewalls are switched, and the new master and standby firewalls still operate in the above manner, that is, the new master firewall is FW2 and the new standby firewall is FW1.
[0035] Corresponding to the above embodiment, an embodiment of the present invention provides a system for implementing transparent mode access of an industrial control firewall to dual-machine hot standby, comprising: at least one memory and at least one processor;
[0036] The memory is used to store one or more program instructions;
[0037] The processor is used to run one or more program instructions to execute a method for implementing a transparent mode access of an industrial control firewall to dual-machine hot standby.
[0038] Corresponding to the above embodiment, an embodiment of the present invention provides a computer-readable storage medium, which contains one or more program instructions, and the one or more program instructions are used by a processor to execute a method for implementing a transparent mode access of an industrial control firewall to dual-machine hot standby.
[0039] The embodiment disclosed in the present invention provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are executed on a computer, the computer executes the above-mentioned method for implementing transparent mode access of an industrial control firewall to dual-machine hot standby.
[0040] In the embodiment of the present invention, the processor may be an integrated circuit chip having the ability to process signals. The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0041] The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The processor reads the information in the storage medium and completes the steps of the above method in combination with its hardware.
[0042] The storage medium may be a memory, which may be, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory.
[0043] Among them, the non-volatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
[0044] The volatile memory may be a random access memory (RAM) which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus DRAM (DRRAM).
[0045] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0046] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention can be implemented using a combination of hardware and software. When software is used, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that can be accessed by general or special-purpose computers.
[0047] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for implementing the transparent mode access of an industrial control firewall to dual-machine hot standby, characterized in that: include: The upstream and downstream interfaces of the active and standby firewalls are added to the same VLAN; The main firewall actively learns the MAC table of the upstream and downstream interfaces, and synchronizes and backs up the table to the backup firewall in real time; The active firewall periodically sends heartbeat messages to the standby firewall, declaring itself as the active firewall and requesting the standby firewall to prohibit VLAN forwarding. When the standby firewall receives the heartbeat message, it actively disables its own VLAN, stops forwarding traffic, and remains in the standby state; If the standby firewall times out when receiving the heartbeat message, it is considered that the main firewall has failed. The standby firewall traverses the MAC table of the backup upstream and downstream interfaces, and sends a Layer 2 broadcast message with each MAC in the MAC table as the source MAC to refresh the MAC table of the upstream and downstream switches, update the current state to the main state, and the standby firewall becomes the new main firewall, and the original main firewall becomes the new standby firewall.
2. A method for implementing the transparent mode access of an industrial control firewall to dual-machine hot standby as claimed in claim 1, characterized in that: The source MAC of the heartbeat message is filled with the MAC address of the fiber-optic Ethernet interface card of the main firewall, and the destination address is filled with the address of the fiber-optic Ethernet interface card of the standby firewall.
3. The method for implementing the transparent mode access of an industrial control firewall to dual-machine hot standby according to claim 1, characterized in that: The heartbeat message adopts a layer 2 message, specifically a layer 2 unicast heartbeat message.
4. The method for implementing the transparent mode access of an industrial control firewall to dual-machine hot standby according to claim 1, characterized in that: After receiving the heartbeat message, the standby firewall detects whether the firewall status is the standby status. If not, the device status of the firewall is set to the standby status.
5. The method for implementing the transparent mode access of an industrial control firewall to dual-machine hot standby according to claim 1, characterized in that: Refresh the mac tables of the upstream and downstream switches, specifically update the mac table outbound interface to the outbound interface on the standby link.
6. A system for implementing industrial control firewall transparent mode access to dual-machine hot standby, characterized in that: include: Two firewalls, the two firewalls are each other's active and standby firewalls, and the upstream and downstream interfaces of the active and standby firewalls are added to the same VLAN; The main firewall actively learns the MAC table of the upstream and downstream interfaces, and synchronizes and backs up the table to the standby firewall in real time; the main firewall sends heartbeat messages to the standby firewall regularly, declaring that it is currently in the main state and requiring the standby firewall to prohibit VLAN forwarding; The standby firewall receives the heartbeat message from the main firewall, actively disables its own VLAN, does not forward traffic, and maintains the standby state; if the standby firewall times out when receiving the heartbeat message, it is considered that the main firewall has failed, and the standby firewall traverses the mac table of the backup upstream and downstream interfaces, and sends a layer 2 broadcast message with each mac in the mac table as the source mac to refresh the mac table of the upstream and downstream switches, update the current state to the main state, and the standby firewall becomes the new main firewall, and the original main firewall becomes the new standby firewall.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium contains one or more program instructions, and the one or more program instructions are used by the processor to execute the method for implementing the transparent mode access of an industrial control firewall to dual-machine hot standby as described in any one of claims 1-5.
