CN114024922B - Mirror image port redundancy processing method and device for optical fiber switch - Google Patents

Mirror image port redundancy processing method and device for optical fiber switch Download PDF

Info

Publication number
CN114024922B
CN114024922B CN202210008292.8A CN202210008292A CN114024922B CN 114024922 B CN114024922 B CN 114024922B CN 202210008292 A CN202210008292 A CN 202210008292A CN 114024922 B CN114024922 B CN 114024922B
Authority
CN
China
Prior art keywords
mirror image
port
monitoring data
data frame
image port
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
CN202210008292.8A
Other languages
Chinese (zh)
Other versions
CN114024922A (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 Tasson Science and Technology Co Ltd
Original Assignee
Beijing Tasson Science and 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 Tasson Science and Technology Co Ltd filed Critical Beijing Tasson Science and Technology Co Ltd
Priority to CN202210008292.8A priority Critical patent/CN114024922B/en
Publication of CN114024922A publication Critical patent/CN114024922A/en
Application granted granted Critical
Publication of CN114024922B publication Critical patent/CN114024922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/356Switches specially adapted for specific applications for storage area networks
    • H04L49/357Fibre channel switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/557Error correction, e.g. fault recovery or fault tolerance

Landscapes

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

Abstract

The invention provides a method and a device for processing redundancy of a mirror image port of an optical fiber switch. The method comprises the following steps: determining a primary mirror image port and a standby mirror image port based on configuration data of a logic register; forwarding a monitoring data frame based on a primary mirroring port, synchronously caching the monitoring data frame forwarded by the primary mirroring port based on a frame backup module, monitoring the link state of the primary mirroring port, judging whether the primary mirroring port forwards the monitoring data frame or not when the link state is abnormal, if the primary mirroring port forwards the monitoring data frame and the monitoring data frame which is not forwarded is not completed, continuing caching the monitoring data frame which is not forwarded into the frame backup module, and enabling a retransmission request; and reading the monitoring data frame which is not forwarded by the main image port from the frame backup module by using the standby image port based on the retransmission request, and forwarding the monitoring data frame which is not forwarded by the main image port to the target port through the standby image port. The method provided by the invention improves the robustness and stability of the mirror image port of the optical fiber switch.

Description

Mirror image port redundancy processing method and device for optical fiber switch
Technical Field
The invention relates to the technical field of network communication, in particular to a method and a device for processing redundancy of a mirror image port of an optical fiber switch. In addition, an electronic device and a processor-readable storage medium are also related.
Background
FC (Fiber Channel) refers to a high-speed serial transmission bus, and has the advantages of a Channel and a network, high bandwidth, high reliability, electromagnetic interference resistance, and the like, and can provide a very stable and reliable optical Fiber connection, and easily construct a large-scale data transmission and communication network. The FC switch (fabric switch) as a core device in the FC network plays a decisive role in data exchange of the entire FC network, and therefore, it is important to monitor the exchange data of the FC switch and implement effective forwarding of the monitored data.
However, the current switched data monitoring mode is single, and when a mirror port link fails, the monitored data is easily lost, which results in poor stability. Therefore, how to implement efficient and stable forwarding of monitoring data for the mirror port redundancy processing process of the optical fiber switch becomes a problem to be solved urgently at present.
Disclosure of Invention
Therefore, the invention provides a method and a device for processing the redundancy of a mirror image port of an optical fiber switch, which aim to solve the problem that the forwarding data is easy to lose due to poor stability of monitoring data forwarding of a mirror image port redundancy processing scheme of the optical fiber switch in the prior art.
In a first aspect, the present invention provides a method for processing redundancy of a mirror port of a fabric switch, including: determining a corresponding primary mirror image port and a corresponding standby mirror image port based on configuration data of a corresponding logic register of the optical fiber switch; the use priority of the main image port is higher than that of the standby image port;
forwarding a monitoring data frame based on the main mirror image port, synchronously caching the monitoring data frame forwarded by the main mirror image port based on a preset frame backup module, monitoring the link state of the main mirror image port in real time, judging whether the main mirror image port forwards the monitoring data frame currently when the link state of the main mirror image port is monitored to be abnormal, if the main mirror image port forwards the monitoring data frame and the unrewarded monitoring data frame exists, continuously caching the monitoring data frame which is not forwarded by the main mirror image port into the frame backup module, and enabling a request to be retransmitted;
and judging whether the link state of the standby mirror image port is abnormal or not, if not, reading the monitoring data frame which is not forwarded and completed by the main mirror image port from the frame backup module based on the retransmission request, forwarding the monitoring data frame which is not forwarded and completed by the main mirror image port to a target port through the standby mirror image port, and forwarding a subsequent monitoring data frame based on the standby mirror image port.
Further, the method for processing redundancy of a mirror image port of a fabric switch further includes: after switching to forwarding a monitoring data frame based on the standby mirror image port, synchronously caching the monitoring data frame forwarded by the standby mirror image port based on the frame backup module, monitoring the link state of the standby mirror image port in real time, judging whether the standby mirror image port is forwarding the monitoring data frame currently when monitoring that the link state of the standby mirror image port is abnormal, if the standby mirror image port is forwarding the monitoring data frame and has the monitoring data frame which is not forwarded, continuing caching and backing up the monitoring data frame which is not forwarded by the standby mirror image port into the frame backup module, enabling a retransmission request, and retransmitting the monitoring data frame which is not forwarded by the standby mirror image port to a target port.
Further, the determining the corresponding primary mirror image port and the standby mirror image port based on the configuration data of the corresponding logical register of the optical fiber switch specifically includes:
when the configuration data of the logic register corresponding to the optical fiber switch is 0, determining that the working mode of the corresponding port is a primary mirroring port;
and when the configuration data of the logic register corresponding to the optical fiber switch is 1, determining that the working mode of the corresponding port is a standby mirror image port.
Further, the frame backup module is implemented based on a configuration of a block random access memory, and is configured to synchronously store, in real time, a monitoring data frame that is not forwarded when the main mirror port is abnormal and is sent by the main/standby switching logic module, or a monitoring data frame that is not forwarded when the standby mirror port is abnormal and is not forwarded.
Further, reading the monitoring data frame which is not forwarded and completed by the primary mirror port from the frame backup module based on the retransmission request specifically includes:
and judging whether the retransmission request exists or not, and if the retransmission request exists, reading the monitoring data frame which is not forwarded and completed by the primary mirror image port from the frame backup module.
In a second aspect, the present invention further provides a device for processing redundancy of mirror ports for a fabric switch, including:
the mirror image port determining unit is used for determining a corresponding primary mirror image port and a corresponding standby mirror image port based on the configuration data of the corresponding logic register of the optical fiber switch; the use priority of the main image port is higher than that of the standby image port;
a main mirror image port retransmission control unit, configured to forward a monitoring data frame based on the main mirror image port, synchronously cache the monitoring data frame forwarded by the main mirror image port based on a preset frame backup module, and monitor a link state of the main mirror image port in real time, when it is monitored that the link state of the main mirror image port is abnormal, determine whether the main mirror image port is currently forwarding the monitoring data frame, and if the main mirror image port is forwarding the monitoring data frame and there is a monitoring data frame that is not forwarded, continue to cache the monitoring data frame that is not forwarded by the main mirror image port in the frame backup module, and enable a retransmission request;
and the standby mirror image port forwarding control unit is used for judging whether the link state of the standby mirror image port is abnormal or not, if not, reading the monitoring data frame which is not completely forwarded by the main mirror image port from the frame backup module based on the retransmission request, forwarding the monitoring data frame which is not completely forwarded by the main mirror image port to a target port through the standby mirror image port, and forwarding a subsequent monitoring data frame based on the standby mirror image port.
Further, the mirror port redundancy processing apparatus for a fabric switch further includes: and the standby mirror image port retransmission control unit is used for synchronously caching the monitoring data frame forwarded by the standby mirror image port based on the frame backup module after switching to forwarding the monitoring data frame based on the standby mirror image port, monitoring the link state of the standby mirror image port in real time, judging whether the standby mirror image port is forwarding the monitoring data frame currently when monitoring that the link state of the standby mirror image port is abnormal, continuing caching and backing up the monitoring data frame which is not forwarded by the standby mirror image port into the frame backup module if the standby mirror image port is forwarding the monitoring data frame and the monitoring data frame which is not forwarded completely exists in the standby mirror image port, enabling a retransmission request, and retransmitting the monitoring data frame which is not forwarded completely by the standby mirror image port to a target port.
Further, the mirror port determining unit is specifically configured to:
when the configuration data of the logic register corresponding to the optical fiber switch is 0, determining that the working mode of the corresponding port is a primary mirroring port;
and when the configuration data of the logic register corresponding to the optical fiber switch is 1, determining that the working mode of the corresponding port is a standby mirror image port.
Further, the frame backup module is implemented based on a configuration of a block random access memory, and is configured to synchronously store, in real time, a monitoring data frame that is not forwarded when the main mirror port is abnormal and is sent by the main/standby switching logic module, or a monitoring data frame that is not forwarded when the standby mirror port is abnormal and is not forwarded.
Further, the standby mirror port forwarding control unit is specifically configured to:
and judging whether the retransmission request exists or not, and if the retransmission request exists, reading the monitoring data frame which is not forwarded and completed by the primary mirror image port from the frame backup module.
In a third aspect, the present invention also provides an electronic device, including: the present invention provides a method for processing mirror port redundancy for a fabric switch, comprising the steps of storing a program for implementing the mirror port redundancy processing method for a fabric switch, and a computer program stored in the memory and run on the processor.
In a fourth aspect, the present invention further provides a processor-readable storage medium, which stores thereon a computer program, which when executed by a processor, implements the steps of the mirror port redundancy handling method for a fabric switch according to any one of the above.
The mirror image port redundancy processing method for the optical fiber switch provided by the embodiment of the invention realizes real-time switching of the main mirror image port and the standby mirror image port by monitoring the link state of the ports, and ensures the forwarding integrity of the monitoring data frame based on the monitoring data frame retransmission mechanism after the ports are switched, thereby avoiding the condition that the monitoring data frame being forwarded is lost due to link failure when the monitoring data frame is being forwarded by the mirror image port, effectively improving the robustness and stability of the monitoring data frame forwarded by the mirror image port of the optical fiber switch, simultaneously improving the recording and analyzing capability of the port data of the optical fiber switch, and being beneficial to problem troubleshooting.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a mirror port redundancy processing method for a fabric switch according to an embodiment of the present invention;
fig. 2 is a schematic complete flowchart of a mirror port redundancy processing method for a fiber switch according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a frame backup module setup in a mirror port redundancy processing method for an optical fiber switch according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a mirror port redundancy processing apparatus for a fabric switch according to an embodiment of the present invention;
fig. 5 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following describes an embodiment of a method for processing redundancy of a mirror port of a fabric switch in detail based on the present invention. As shown in fig. 1, which is a schematic flowchart of a method for processing a mirror port redundancy of an optical fiber switch according to an embodiment of the present invention, a specific implementation process includes the following steps:
step 101: determining a corresponding primary mirror image port and a corresponding standby mirror image port based on configuration data of a corresponding logic register of the optical fiber switch; wherein the use priority of the primary image port is higher than that of the standby image port.
In the embodiment of the present invention, when the configuration data of the logical register corresponding to the Fiber Channel Switch (FC) is 0, it is determined that the working mode of the corresponding port is the primary mirroring port; and when the configuration data of the logic register corresponding to the optical fiber switch is 1, determining that the working mode of the corresponding port is a standby mirror image port. The optical fiber switch is high-speed network transmission relay equipment and adopts an optical fiber cable as a transmission medium. The backup of the data forwarded by the original mirror image port can be realized through the redundant processing of the mirror image port (port Mirroring, data exchange port), so as to achieve the purpose of enhancing the stability and the security of the monitoring data.
In the implementation process, monitoring data of one or more ports (VLANs) of the fabric switch are mirrored onto one or more preset mirror ports, which is called "port mirroring", and the corresponding ports are mirror ports. The image port may be a primary image port or a backup image port.
Step 102: forwarding a monitoring data frame based on the main mirror image port, synchronously caching the monitoring data frame forwarded by the main mirror image port based on a preset frame backup module, monitoring the link state of the main mirror image port in real time, judging whether the main mirror image port forwards the monitoring data frame currently when the link state of the main mirror image port is monitored to be abnormal, if the main mirror image port forwards the monitoring data frame and has the monitoring data frame which is not forwarded completely, continuing caching the monitoring data frame which is not forwarded completely by the main mirror image port into the frame backup module, and enabling the request to be retransmitted.
The frame backup module is implemented based on a Block random access memory (Block RAM) configuration, and is configured to synchronously store, in real time, a monitoring data frame that is sent by the active/standby switching logic module and is not forwarded when the main mirror port is abnormal or a monitoring data frame that is sent by the standby mirror port is abnormal. The specific implementation is shown in fig. 3.
Step 103: and judging whether the link state of the standby mirror image port is abnormal or not, if not, reading the monitoring data frame which is not forwarded and completed by the main mirror image port from the frame backup module based on the retransmission request, forwarding the monitoring data frame which is not forwarded and completed by the main mirror image port to a target port through the standby mirror image port, and forwarding a subsequent monitoring data frame based on the standby mirror image port.
In a specific implementation process, after step 102 is executed, it is first determined whether a link state of the standby mirror port is abnormal, if not, it is further determined whether the retransmission request exists, and if the retransmission request exists, the monitoring data frame that is not completely forwarded by the primary mirror port is read from the frame backup module, and the monitoring data frame that is not completely forwarded by the primary mirror port is forwarded to a target port through the standby mirror port, so that a subsequent monitoring data frame is forwarded based on the standby mirror port.
In addition, after the monitoring data frame is forwarded based on the standby mirror image port, the monitoring data frame forwarded by the standby mirror image port is synchronously cached based on the frame backup module, the link state of the standby mirror image port is monitored in real time, when the monitored link state of the standby mirror image port is abnormal, whether the monitoring data frame is forwarded by the standby mirror image port is judged, if the monitoring data frame is forwarded by the standby mirror image port and the monitoring data frame which is not forwarded is existed, the monitoring data frame which is not forwarded by the standby mirror image port is continuously cached and backed up to the frame backup module, a retransmission request is enabled, and the monitoring data frame which is not forwarded by the standby mirror image port is retransmitted to a target port.
It should be noted that, in the embodiment of the present invention, two optical fiber ports need to be configured as a primary mirror image port and a standby mirror image port in advance, and the primary mirror image port is preferentially used as a currently used mirror image port, and when a link failure occurs in the primary mirror image port and a link of the standby mirror image port is normal, the primary mirror image port may be switched to the standby port based on a preset primary/standby switching logic module to serve as the currently used mirror image port; if the standby mirror image port is switched to the standby mirror image port currently, when the standby mirror image port link fails and the main mirror image port link is normal, the standby mirror image port link can be switched to the main mirror image port based on a preset standby switching logic module to be the currently used mirror image port; in the process of switching the main mirror image port and the standby mirror image port, if the monitoring data frame is not forwarded completely before switching, the monitoring data frame can be retransmitted based on the monitoring data frame retransmission mechanism preset by the invention after switching, so that the forwarded data is ensured not to be lost.
The following provides a complete embodiment of a mirror port redundancy handling method for a fabric switch. In this embodiment, the mirror port redundancy mechanism flow for the fabric switch is described as follows: (a) initializing a port (namely, an FC port) of the optical fiber switch in advance, configuring a corresponding logic register according to the main mirror image port, determining a working mode of the optical fiber port, if the logic register is configured to be full F, determining to set the optical fiber switch port, and entering the step (b). And (d) if the logical register is configured to be 0, determining to be set as a primary mirror image port, if the logical register is configured to be 1, determining to be set as a standby mirror image port, and entering the step (d) after the setting as the primary mirror image port or the standby mirror image port is finished. (b) And (c) initializing the port of the optical fiber switch, including initializing a corresponding logic register of the optical fiber switch, configuring the port rate and the like, and entering the step (c) after the initialization is finished. (c) The method comprises the following steps of processing fiber data frames received and sent by a port of a fiber switch, and the main process is as follows: the port receives an upper MAC layer exchange data frame to perform cross-clock domain conversion and bottom link handshake, and sends the data frame to a Serdes module for transmission; and receiving the optical fiber switching data frame of the bottom layer Serdes module, and transmitting the optical fiber switching data frame to the upper layer MAC module through clock domain crossing conversion. (d) And (e) initializing the mirror image port so as to realize the initialization of the logic register, the rate configuration of the mirror image port and the like, and entering the step (e) after the initialization is finished. (e) And (4) judging the link state of the primary mirror image port by default, if the link state of the primary mirror image port is normal, entering the step (f), and if not, entering the step (g). (f) And forwarding the monitoring data frames from the main mirroring port, backing up the forwarded monitoring data frames through a preset frame backup module, and covering backup after each monitoring data frame is completely forwarded. And monitoring the link state of the primary mirror image port in real time, and if the link state of the primary mirror image port is abnormal, performing the step (g). (g) And (e) judging whether the monitoring data frame is forwarded normally when the link state of the primary mirror image port is abnormal, if the monitoring data frame is forwarded normally and not, entering the step (h), and if the link state of the primary mirror image port is abnormal and the monitoring data frame is not forwarded in an idle state, entering the step (i).
(h) And (e) after the monitoring frame which is not completely forwarded is cached, enabling the retransmission request, and entering the step (i). (i) Judging whether the link state of the standby mirror image port is normal or not, and if so, entering the step (j); otherwise, go to step (m). (j) Judging whether a retransmission request exists or not, and entering the step (k) if the retransmission request is enabled; if no request is retransmitted, step (l) is entered. (k) And (c) reading out the buffered monitoring data frame which is not forwarded completely from the frame backup module, retransmitting the monitoring data frame, and entering the step (l). (l) And (5) forwarding the monitoring data frame from the standby mirror image port until the link state of the standby mirror image port is abnormal, and entering the step (m). And (m) judging whether the monitoring data frame is forwarded or not when the standby mirror image port link fails, if so, entering the step (n), and if not, entering the step o. (n) continuously writing the monitoring data frame which is not completely forwarded into the frame backup module until the monitoring data frame is completely cached, and entering the step (o) after enabling a retransmission request. (o) judging whether the link state of the primary mirror port is normal, if so, entering the step (p), and if not, entering the step (g). (p) judging whether there is a retransmission request, if there is a retransmission request, proceeding to step (q), if not, proceeding to step (r). And (q) forwarding the monitoring data frame to be retransmitted in the frame backup module, and entering the step (r) after the monitoring data frame to be retransmitted is completed. (r) monitoring data frames to continue to forward data normally from the standby mirror port until the link state of the primary mirror port is abnormal, and entering the step (g); the specific process is shown in fig. 2.
The mirror image port redundancy processing method for the optical fiber switch provided by the embodiment of the invention realizes real-time switching of the main mirror image port and the standby mirror image port by monitoring the link state of the ports, and ensures the forwarding integrity of the monitoring data frame based on the monitoring data frame retransmission mechanism after the ports are switched, thereby avoiding the condition that the monitoring data frame being forwarded is lost due to link failure when the monitoring data frame is being forwarded by the mirror image port, effectively improving the robustness and stability of the monitoring data frame forwarded by the mirror image port of the optical fiber switch, simultaneously improving the recording and analyzing capability of the port data of the optical fiber switch, and being beneficial to problem troubleshooting.
Corresponding to the provided mirror image port redundancy processing method for the optical fiber switch, the invention also provides a mirror image port redundancy processing device for the optical fiber switch. Since the embodiment of the apparatus is similar to the above method embodiment, so that the description is relatively simple, and please refer to the description of the above method embodiment, the following description is only illustrative for the embodiment of the mirror port redundancy processing apparatus of the fabric switch.
Fig. 4 is a schematic structural diagram of a mirror port redundancy processing apparatus for a fabric switch according to an embodiment of the present invention.
The invention relates to a mirror image port redundancy processing device aiming at a fiber switch, which comprises the following parts:
a mirror port determining unit 401, configured to determine a corresponding primary mirror port and a standby mirror port based on configuration data of a logical register corresponding to the optical fiber switch; the use priority of the main image port is higher than that of the standby image port;
a primary mirror image port retransmission control unit 402, configured to forward a monitoring data frame based on the primary mirror image port, synchronously cache the monitoring data frame forwarded by the primary mirror image port based on a preset frame backup module, and monitor a link state of the primary mirror image port in real time, when it is monitored that the link state of the primary mirror image port is abnormal, determine whether the primary mirror image port is currently forwarding the monitoring data frame, and if the primary mirror image port is forwarding the monitoring data frame and there is a monitoring data frame that is not forwarded, continue caching the monitoring data frame that is not forwarded by the primary mirror image port in the frame backup module, and enable a retransmission request;
a standby mirror port forwarding control unit 403, configured to determine whether a link state of the standby mirror port is abnormal, if not, read a monitoring data frame that is not completely forwarded by the primary mirror port from the frame backup module based on the retransmission request, forward the monitoring data frame that is not completely forwarded by the primary mirror port to a target port through the standby mirror port, and forward a subsequent monitoring data frame based on the standby mirror port.
Further, the mirror port redundancy processing apparatus for a fabric switch further includes: and the standby mirror image port retransmission control unit is used for synchronously caching the monitoring data frame forwarded by the standby mirror image port based on the frame backup module after switching to forwarding the monitoring data frame based on the standby mirror image port, monitoring the link state of the standby mirror image port in real time, judging whether the standby mirror image port is forwarding the monitoring data frame currently when monitoring that the link state of the standby mirror image port is abnormal, continuing caching and backing up the monitoring data frame which is not forwarded by the standby mirror image port into the frame backup module if the standby mirror image port is forwarding the monitoring data frame and the monitoring data frame which is not forwarded completely exists in the standby mirror image port, enabling a retransmission request, and retransmitting the monitoring data frame which is not forwarded completely by the standby mirror image port to a target port.
Further, the mirror port determining unit is specifically configured to:
when the configuration data of the logic register corresponding to the optical fiber switch is 0, determining that the working mode of the corresponding port is a primary mirroring port;
and when the configuration data of the logic register corresponding to the optical fiber switch is 1, determining that the working mode of the corresponding port is a standby mirror image port.
Further, the frame backup module is implemented based on a configuration of a block random access memory, and is configured to synchronously store, in real time, a monitoring data frame that is not forwarded when the main mirror port is abnormal and is sent by the main/standby switching logic module, or a monitoring data frame that is not forwarded when the standby mirror port is abnormal and is not forwarded.
Further, the standby mirror port forwarding control unit is specifically configured to:
and judging whether the retransmission request exists or not, and if the retransmission request exists, reading the monitoring data frame which is not forwarded and completed by the primary mirror image port from the frame backup module.
The mirror image port redundancy processing device for the optical fiber switch provided by the embodiment of the invention realizes real-time switching of the main mirror image port and the standby mirror image port by monitoring the link state of the ports, and ensures the forwarding integrity of the monitoring data frame based on the monitoring data frame retransmission mechanism after the ports are switched, thereby avoiding the condition that the monitoring data frame being forwarded is lost due to link failure when the monitoring data frame is being forwarded by the mirror image port, effectively improving the robustness and stability of the monitoring data frame forwarded by the mirror image port of the optical fiber switch, simultaneously improving the recording and analyzing capability of the port data of the optical fiber switch, and being beneficial to problem troubleshooting.
Corresponding to the provided mirror image port redundancy processing method for the optical fiber switch, the invention also provides electronic equipment. Since the embodiment of the electronic device is similar to the above method embodiment, the description is simple, and please refer to the description of the above method embodiment, and the electronic device described below is only schematic. Fig. 5 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention. The electronic device may include: a processor (processor) 501, a memory (memory) 502 and a communication bus 503, wherein the processor 501 and the memory 502 communicate with each other through the communication bus 503 and communicate with the outside through a communication interface 504. Processor 501 may invoke logical instructions in memory 502 to perform a mirror port redundancy handling method for a fabric switch. The method comprises the following steps: determining a corresponding primary mirror image port and a corresponding standby mirror image port based on configuration data of a corresponding logic register of the optical fiber switch; the use priority of the main image port is higher than that of the standby image port; forwarding a monitoring data frame based on the main mirror image port, synchronously caching the monitoring data frame forwarded by the main mirror image port based on a preset frame backup module, monitoring the link state of the main mirror image port in real time, judging whether the main mirror image port forwards the monitoring data frame currently when the link state of the main mirror image port is monitored to be abnormal, if the main mirror image port forwards the monitoring data frame and the unrewarded monitoring data frame exists, continuously caching the monitoring data frame which is not forwarded by the main mirror image port into the frame backup module, and enabling a request to be retransmitted; and judging whether the link state of the standby mirror image port is abnormal or not, if not, reading the monitoring data frame which is not forwarded and completed by the main mirror image port from the frame backup module based on the retransmission request, forwarding the monitoring data frame which is not forwarded and completed by the main mirror image port to a target port through the standby mirror image port, and forwarding a subsequent monitoring data frame based on the standby mirror image port.
Furthermore, the logic instructions in the memory 502 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a Memory chip, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In another aspect, an embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program stored on a processor-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a computer, the computer is capable of executing the mirror port redundancy processing method for a fiber switch provided by the above-mentioned method embodiments. The method comprises the following steps: determining a corresponding primary mirror image port and a corresponding standby mirror image port based on configuration data of a corresponding logic register of the optical fiber switch; the use priority of the main image port is higher than that of the standby image port; forwarding a monitoring data frame based on the main mirror image port, synchronously caching the monitoring data frame forwarded by the main mirror image port based on a preset frame backup module, monitoring the link state of the main mirror image port in real time, judging whether the main mirror image port forwards the monitoring data frame currently when the link state of the main mirror image port is monitored to be abnormal, if the main mirror image port forwards the monitoring data frame and the unrewarded monitoring data frame exists, continuously caching the monitoring data frame which is not forwarded by the main mirror image port into the frame backup module, and enabling a request to be retransmitted; and judging whether the link state of the standby mirror image port is abnormal or not, if not, reading the monitoring data frame which is not forwarded and completed by the main mirror image port from the frame backup module based on the retransmission request, forwarding the monitoring data frame which is not forwarded and completed by the main mirror image port to a target port through the standby mirror image port, and forwarding a subsequent monitoring data frame based on the standby mirror image port.
In still another aspect, an embodiment of the present invention further provides a processor-readable storage medium, where a computer program is stored on the processor-readable storage medium, and when executed by a processor, the computer program is implemented to perform the mirror port redundancy processing method for a fabric switch provided in the foregoing embodiments. The method comprises the following steps: determining a corresponding primary mirror image port and a corresponding standby mirror image port based on configuration data of a corresponding logic register of the optical fiber switch; the use priority of the main image port is higher than that of the standby image port; forwarding a monitoring data frame based on the main mirror image port, synchronously caching the monitoring data frame forwarded by the main mirror image port based on a preset frame backup module, monitoring the link state of the main mirror image port in real time, judging whether the main mirror image port forwards the monitoring data frame currently when the link state of the main mirror image port is monitored to be abnormal, if the main mirror image port forwards the monitoring data frame and the unrewarded monitoring data frame exists, continuously caching the monitoring data frame which is not forwarded by the main mirror image port into the frame backup module, and enabling a request to be retransmitted; and judging whether the link state of the standby mirror image port is abnormal or not, if not, reading the monitoring data frame which is not forwarded and completed by the main mirror image port from the frame backup module based on the retransmission request, forwarding the monitoring data frame which is not forwarded and completed by the main mirror image port to a target port through the standby mirror image port, and forwarding a subsequent monitoring data frame based on the standby mirror image port.
The processor-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on the understanding, the above technical solutions substantially or otherwise contributing to the prior art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for processing the redundancy of a mirror image port of a fiber switch is characterized by comprising the following steps:
determining a corresponding primary mirror image port and a corresponding standby mirror image port based on configuration data of a corresponding logic register of the optical fiber switch; the use priority of the main image port is higher than that of the standby image port;
forwarding a monitoring data frame based on the main mirror image port, synchronously caching the monitoring data frame forwarded by the main mirror image port based on a preset frame backup module, monitoring the link state of the main mirror image port in real time, judging whether the main mirror image port forwards the monitoring data frame currently or not when monitoring that the link state of the main mirror image port is abnormal, if the main mirror image port forwards the monitoring data frame currently and an unrewarded monitoring data frame exists, continuing caching the monitoring data frame which is not forwarded by the main mirror image port into the frame backup module, and enabling a request to be retransmitted;
and judging whether the link state of the standby mirror image port is abnormal or not, if not, reading the monitoring data frame which is not forwarded and completed by the main mirror image port from the frame backup module based on the retransmission request, forwarding the monitoring data frame which is not forwarded and completed by the main mirror image port to a target port through the standby mirror image port, and forwarding a subsequent monitoring data frame based on the standby mirror image port.
2. The method for processing the redundancy of the mirror port of the optical fiber switch according to claim 1, further comprising: after switching to forwarding a monitoring data frame based on the standby mirror image port, synchronously caching the monitoring data frame forwarded by the standby mirror image port based on the frame backup module, monitoring the link state of the standby mirror image port in real time, judging whether the standby mirror image port is forwarding the monitoring data frame currently when monitoring that the link state of the standby mirror image port is abnormal, if the standby mirror image port is forwarding the monitoring data frame and has the monitoring data frame which is not forwarded, continuing caching and backing up the monitoring data frame which is not forwarded by the standby mirror image port into the frame backup module, enabling a retransmission request, and retransmitting the monitoring data frame which is not forwarded by the standby mirror image port to a target port.
3. The method for processing redundancy of mirror image ports of a fabric switch according to claim 1, wherein the determining of the corresponding primary mirror image port and backup mirror image port based on the configuration data of the corresponding logical register of the fabric switch specifically comprises:
when the configuration data of the logic register corresponding to the optical fiber switch is 0, determining that the working mode of the corresponding port is a primary mirroring port;
and when the configuration data of the logic register corresponding to the optical fiber switch is 1, determining that the working mode of the corresponding port is a standby mirror image port.
4. The method according to any one of claims 1 to 3, wherein the frame backup module is implemented based on a block random access memory configuration, and is configured to synchronously store, in real time, the monitoring data frame that is sent by the active/standby switching logic module and that is not forwarded when the primary mirror port is abnormal, or the monitoring data frame that is sent by the standby switching logic module and that is not forwarded when the standby mirror port is abnormal.
5. The method according to claim 1, wherein reading the monitoring data frame that is not completely forwarded by the primary mirror port from the frame backup module based on the retransmission request specifically includes:
and judging whether the retransmission request exists or not, and if the retransmission request exists, reading the monitoring data frame which is not forwarded and completed by the primary mirror image port from the frame backup module.
6. A mirror port redundancy handling apparatus for a fabric switch, comprising:
the mirror image port determining unit is used for determining a corresponding primary mirror image port and a corresponding standby mirror image port based on the configuration data of the corresponding logic register of the optical fiber switch; the use priority of the main image port is higher than that of the standby image port;
a main mirror image port retransmission control unit, configured to forward a monitoring data frame based on the main mirror image port, synchronously cache the monitoring data frame forwarded by the main mirror image port based on a preset frame backup module, and monitor a link state of the main mirror image port in real time, when it is monitored that the link state of the main mirror image port is abnormal, determine whether the main mirror image port is currently forwarding the monitoring data frame, and if the main mirror image port is forwarding the monitoring data frame and there is a monitoring data frame that is not forwarded, continue to cache the monitoring data frame that is not forwarded by the main mirror image port in the frame backup module, and enable a retransmission request;
and the standby mirror image port forwarding control unit is used for judging whether the link state of the standby mirror image port is abnormal or not, if not, reading the monitoring data frame which is not completely forwarded by the main mirror image port from the frame backup module based on the retransmission request, forwarding the monitoring data frame which is not completely forwarded by the main mirror image port to a target port through the standby mirror image port, and forwarding a subsequent monitoring data frame based on the standby mirror image port.
7. The mirror port redundancy handling apparatus for a fabric switch of claim 6, further comprising: and the standby mirror image port retransmission control unit is used for synchronously caching the monitoring data frame forwarded by the standby mirror image port based on the frame backup module after switching to forwarding the monitoring data frame based on the standby mirror image port, monitoring the link state of the standby mirror image port in real time, judging whether the standby mirror image port is forwarding the monitoring data frame currently when monitoring that the link state of the standby mirror image port is abnormal, continuing caching and backing up the monitoring data frame which is not forwarded by the standby mirror image port into the frame backup module if the standby mirror image port is forwarding the monitoring data frame and the monitoring data frame which is not forwarded completely exists in the standby mirror image port, enabling a retransmission request, and retransmitting the monitoring data frame which is not forwarded completely by the standby mirror image port to a target port.
8. The apparatus of claim 6, wherein the mirror port determining unit is specifically configured to:
when the configuration data of the logic register corresponding to the optical fiber switch is 0, determining that the working mode of the corresponding port is a primary mirroring port;
and when the configuration data of the logic register corresponding to the optical fiber switch is 1, determining that the working mode of the corresponding port is a standby mirror image port.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor when executing the computer program implements the steps of the mirror port redundancy handling method for a fabric switch of any of claims 1 to 5.
10. A processor readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the steps of the mirror port redundancy handling method for a fabric switch of any of claims 1 to 5.
CN202210008292.8A 2022-01-06 2022-01-06 Mirror image port redundancy processing method and device for optical fiber switch Active CN114024922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210008292.8A CN114024922B (en) 2022-01-06 2022-01-06 Mirror image port redundancy processing method and device for optical fiber switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210008292.8A CN114024922B (en) 2022-01-06 2022-01-06 Mirror image port redundancy processing method and device for optical fiber switch

Publications (2)

Publication Number Publication Date
CN114024922A CN114024922A (en) 2022-02-08
CN114024922B true CN114024922B (en) 2022-06-07

Family

ID=80069896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210008292.8A Active CN114024922B (en) 2022-01-06 2022-01-06 Mirror image port redundancy processing method and device for optical fiber switch

Country Status (1)

Country Link
CN (1) CN114024922B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116016130B (en) * 2022-12-08 2024-07-09 中国船舶集团有限公司第七一六研究所 Method for reducing frame loss during switching of marine dual-redundancy network based on delayed discarding
CN118101554B (en) * 2024-04-25 2024-08-06 中国第一汽车股份有限公司 Backup method and device for on-board dual-system communication link and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188531A (en) * 2007-12-27 2008-05-28 沈阳东软软件股份有限公司 A method and system for monitoring network traffic exception
CN103095540A (en) * 2013-01-18 2013-05-08 武汉迈威光电技术有限公司 Industrial Ethernet data distribution and link redundancy design

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100407646C (en) * 2005-03-28 2008-07-30 华为技术有限公司 Method for realizing data service backup
US20070101186A1 (en) * 2005-11-02 2007-05-03 Inventec Corporation Computer platform cache data remote backup processing method and system
US20140010096A1 (en) * 2012-07-09 2014-01-09 International Business Machines Corporation Port mirroring in distributed switching systems
EP3287906B1 (en) * 2013-10-23 2019-03-06 Huawei Technologies Co., Ltd. Method, system, and apparatus for cloud application redundancy
JP6740911B2 (en) * 2017-01-16 2020-08-19 富士通株式会社 Port switching program, port switching method, and information processing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188531A (en) * 2007-12-27 2008-05-28 沈阳东软软件股份有限公司 A method and system for monitoring network traffic exception
CN103095540A (en) * 2013-01-18 2013-05-08 武汉迈威光电技术有限公司 Industrial Ethernet data distribution and link redundancy design

Also Published As

Publication number Publication date
CN114024922A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN114024922B (en) Mirror image port redundancy processing method and device for optical fiber switch
US8255562B2 (en) Adaptive data throttling for storage controllers
US7444541B2 (en) Failover and failback of write cache data in dual active controllers
US7941693B2 (en) Disk array apparatus and method for controlling the same
US7133967B2 (en) Storage system, controller, control method and program product therefor
US7472241B2 (en) Storage system and backup method
US8443237B2 (en) Storage apparatus and method for controlling the same using loopback diagnosis to detect failure
US7370147B2 (en) Disk array device and control method therefor
CN101291347B (en) Network storage system
JPH0683717A (en) Large fault-resistant nonvolatile plural port memories
US8667337B2 (en) Storage apparatus and method of controlling the same
US8281071B1 (en) Systems and methods for managing cluster node connectivity information
CN103475695A (en) Interconnection method and device for storage system
US12050778B2 (en) Data restoration method and related device
CN109491609A (en) A kind of caching data processing method, device, equipment and readable storage medium storing program for executing
WO2021139571A1 (en) Data storage method, apparatus, and system and data reading method, apparatus, and system in storage system
WO2018157605A1 (en) Message transmission method and device in cluster file system
CN110618785A (en) Dual-control storage system
US20050050268A1 (en) Disk array control apparatus and control data transfer method using the same
WO2021012169A1 (en) Method of improving reliability of storage system, and related apparatus
US8918670B2 (en) Active link verification for failover operations in a storage network
WO2021238579A1 (en) Method for managing sata hard disk by means of storage system, and storage system
CN111817892B (en) Network management method, system, electronic equipment and storage medium
CN112104729A (en) Storage system and caching method thereof
JP2009245076A (en) Computer system

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
CP03 Change of name, title or address

Address after: 701, 7th Floor, Building 6, Courtyard 8, Kegu 1st Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing, 100176

Patentee after: Beijing Tasson Technology Ltd.

Address before: Room 701, 7 / F, building 6, courtyard 8, KEGU 1st Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing 100176

Patentee before: BEIJING TASSON TECHNOLOGY Ltd.

CP03 Change of name, title or address