Switch port adaptation method, system, device and readable storage medium

By automatically detecting the information of optical modules and counterpart devices, and configuring appropriate data transmission protocols and FEC mode, the problem of manual configuration of traditional switch ports is solved, and automatic UP of switch ports is realized, saving time and reducing labor costs.

CN115604374BActive Publication Date: 2025-08-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211190533.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2025-08-08
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

Traditional switch ports need to manually configure FEC mode after connecting to optical modules, resulting in poor user experience and a lot of human resources.

Method used

By obtaining information from the optical module and the counterpart device, the appropriate data transmission protocol and FEC mode are automatically determined and configured to realize automatic UP of the switch port.

Benefits of technology

Save time and reduce labor costs, improving the automatic configuration efficiency of switch ports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115604374B_ABST
    Figure CN115604374B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of computers, and specifically relates to a switch port adaptation method, system, device, and readable storage medium. The method includes: obtaining information about an optical module connected to a switch, and confirming the data transmission protocol supported by the optical module based on the optical module information; obtaining information about a peer device through the optical module and confirming the data transmission protocol supported by the peer device; determining the data transmission protocol of the switch port to which the optical module is connected based on the data transmission protocols supported by the optical module and the peer device, and applying the determined data transmission protocol to the port to which the optical module is connected. The switch port adaptation method proposed by the present invention enables automatic UP of the switch port after the corresponding switch port is connected to the optical module, selects the appropriate FEC state for data transmission, and saves time and reduces labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computers, and in particular relates to a switch port adaptation method, system, device and readable storage medium. Background Art

[0002] FEC (Forward Error Correction) is a forward error correction technology suitable for high-speed communications (25G, 40G, and 100G, particularly 40G and 100G). Optical signals can degrade during transmission due to other factors, leading to misinterpretation at the receiving end, potentially misinterpreting a "1" signal as a "0" or vice versa. FEC works by converting information codes into codes with a certain degree of error correction capability at the transmitting end's channel encoder. The receiving end's channel decoder decodes the received code. If the number of errors generated during transmission falls within the error correction capability (non-continuous errors), the decoder locates and corrects the errors, improving signal quality. FEC can be enabled or disabled. For example, the Inspur NOS has two modes: RS and FC. In practice, different optical module types and rates generally require different FEC modes.

[0003] At present, switches often provide the function of turning FEC on or off on ports. When FEC is turned on, different modes can be selected. At the same time, both ends of the interface need to be configured with the same FEC mode for the port to be UP. In actual use, different FEC modes may need to be manually configured for different types of interface optical modes with different speeds to make the port UP. For many ports, staff need to manually configure them according to the type of optical module connected to the port and the supported FEC transmission mode. The complicated port setting work leads to a poor user experience of the switch. In addition, due to problems with the optical module model and port problems, Summary of the Invention

[0004] To solve the above problems, the present invention proposes a switch port adaptation method, comprising:

[0005] Obtain information about an optical module connected to the switch, and confirm a data transmission protocol supported by the optical module based on the information about the optical module;

[0006] Obtaining information about the peer device through the optical module and confirming the data transmission protocol supported by the peer device;

[0007] The data transmission protocol of the switch port to which the optical module is connected is determined according to the data transmission protocols supported by the optical module and the opposite-end device, and the determined data transmission protocol is applied to the port to which the optical module is connected.

[0008] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module includes:

[0009] An optical module device information table is created, and device information of known optical modules and supported data transmission protocols are saved in the optical module device information table.

[0010] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module further comprises:

[0011] The device information of the optical module stored in the EEPROM of the optical module is read through the corresponding access port, and the data transmission protocol corresponding to the device information is queried in the optical module device information table based on the device information.

[0012] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module further comprises:

[0013] In response to the inability to identify the optical module, the port to which the optical module is connected is controlled to perform transmission protocol adaptation with the optical module using a different data transmission protocol, and the successfully adapted data transmission protocol and the device information of the optical module are saved in a corresponding optical module device information table.

[0014] In some embodiments of the present invention, obtaining information about the peer device through the optical module and confirming the data transmission protocol supported by the peer device includes:

[0015] Create a peer device information table and save the device information and supported data transmission protocols of the known peer devices to the peer device information table.

[0016] In some embodiments of the present invention, obtaining the peer device information through the optical module and confirming the data transmission protocol supported by the peer device further includes:

[0017] Communicate with the opposite device through the optical module to obtain device information of the opposite device, and query the data transmission protocol supported by the opposite device in the opposite device information table based on the device information.

[0018] In response to the opposite device not existing in the opposite device information table, the optical module is controlled to adapt to the port corresponding to the opposite device in different data transmission modes according to the data transmission protocol supported by the optical module, and the successfully adapted data transmission protocol is updated to the opposite device information table.

[0019] In some embodiments of the present invention, the method further comprises:

[0020] In response to the optical module being connected to the switch and the opposite device, according to the optical module device information table and the opposite device information table, the data transmission protocol that satisfies the communication between the switch, the optical module and the opposite device is automatically adapted according to a predetermined strategy, and the data transmission protocol is applied to the switch port to which the optical module is connected.

[0021] Another aspect of the present invention further provides a switch port adaptation system, comprising:

[0022] an optical module management module configured to obtain information about an optical module connected to the switch and to determine a data transmission protocol supported by the optical module based on the information about the optical module;

[0023] A peer device management module configured to obtain peer device information through the optical module and confirm the data transmission protocol supported by the peer device;

[0024] A port connection management module is configured to determine the data transmission protocol of the switch port to which the optical module is connected based on the data transmission protocols supported by the optical module and the opposite device, and apply the determined data transmission protocol to the port to which the optical module is connected.

[0025] Yet another aspect of the present invention provides a computer device, comprising:

[0026] at least one processor; and

[0027] A memory storing computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of any one of the methods described in the above embodiments.

[0028] Another aspect of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in the above embodiments are implemented.

[0029] The switch port adaptation method proposed in this invention obtains optical module information after the corresponding switch port is connected to the optical module. Based on this information, the method determines the transmission protocol supported by the optical module. The method then sets a suitable transmission protocol for the optical module and establishes a data connection between the optical module, the peer device, and the switch based on the determined transmission protocol. This method enables the switch port to automatically go up and select the appropriate FEC state for data transmission, saving time and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 A flow chart of a switch port adaptation method provided by an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of the structure of a switch port adaptation system provided by an embodiment of the present invention;

[0033] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention;

[0034] Figure 4 A schematic structural diagram of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0036] The present invention aims to address the problem of traditional switch ports not supporting the data transmission protocol or FEC mode supported by an optical module when the FEC function is enabled for the optical module. Switches are widely used in data centers as data bridges connecting various computing or storage nodes. They generally utilize optical fiber to connect various devices, enabling high-speed interconnection between them. To ensure data stability during high-speed data transmission, FEC technology is typically used to transmit data on the optical fiber. However, FEC has multiple modes (from a practical application perspective, this refers to switching between different modes; from a data transmission perspective, this refers to transmitting data using different transmission protocols). Switches and optical modules support different FEC modes. Therefore, in practical applications, personnel often need to adjust the FEC mode of the switch port based on the FEC mode supported by the different optical modules, switches, and even the peer devices. This means that after an optical module is connected to a switch, it cannot generally be used directly like a traditional network cable connector. Instead, it requires the switch, the optical module, and even the peer devices to establish a unified FEC mode before it can be used. Traditional switches require manual configuration, which is time-consuming and labor-intensive. It requires a clear understanding of the FEC modes supported by the optical modules, switches, and peer devices. Furthermore, the FEC mode must be set separately on both the switch and the peer device. This consumes significant human resources and is inefficient.

[0037] like Figure 1 As shown, in order to solve the above problems, the present invention proposes a switch port adaptation method, comprising:

[0038] Step S1: Obtain information of an optical module connected to a switch, and confirm a data transmission protocol supported by the optical module according to the optical module information;

[0039] Step S2: obtaining information of the peer device through the optical module and confirming the data transmission protocol supported by the peer device;

[0040] Step S3: determining the data transmission protocol of the switch port to which the optical module is connected according to the data transmission protocols supported by the optical module and the opposite device, and applying the determined data transmission protocol to the port to which the optical module is connected.

[0041] In the embodiments of the present invention, an optical module refers to an optoelectronic communication module connected to a switch port. The optical module is the endpoint of an optical fiber cable, and realizes the conversion between optical signals and electrical signals, that is, converting telecommunications into optical signals for transmission in the optical fiber cable, and converting the optical signals in the optical fiber cable into corresponding electrical signals and sending them to the connected switch port or certain network card device ports. The peer device refers to the network card of an electronic device located at the other end of the optical fiber cable opposite to the switch. The peer device is connected to the switch through an optical fiber cable (with two optical modules) and is connected to the network provided by the switch. The data transmission protocol refers to the FEC mode supported in the transmission link formed by the switch, the optical module, and the peer device, including: RS and FC.

[0042] Furthermore, in step S1, when the optical module is connected to the switch and powered on, the switch obtains the device information of the optical module, identifies the connected optical module based on the device information of the optical module, and confirms which FEC transmission modes the optical module supports. Specifically, the device model of the optical module, the type of the optical module, such as SR (short reach, approximately 300m), LR (long reach, approximately 10km), the transmission rate of the optical module, and the port form of the optical module, such as SFP, QSFP, QSFP-DD, DSFP, etc. are obtained. The device model of the optical module is used to query whether the optical module supports the FEC function and further confirm which FEC transmission protocol the optical module supports.

[0043] In step S2, after confirming the data transmission protocols supported by the optical module, the optical module is used to obtain information about the peer device at the other end of the optical fiber cable. Based on this information, the peer device is confirmed to support which data transmission protocols. Specifically, the optical modules at both ends of the optical fiber cable (one end connected to a port on the switch, the other end connected to a port on the peer device) transmit corresponding query information to obtain the peer device model, and then query the FEC transmission modes supported by that device model.

[0044] In step S3, the FEC transmission mode that the corresponding port on the switch should use after the optical module is connected to the switch is determined based on the common transmission protocol among the data transmission protocols supported by the switch, the data transmission protocols supported by the optical module, and the data transmission protocols supported by the opposite device.

[0045] Furthermore, after determining the corresponding FEC transmission mode, the switch first initiates FEC transmission mode adaptation information to the connected optical module, so that the FEC transmission mode of the optical module connected to the switch port is matched. Then, the optical module connected to the switch port sends the adaptation information to the optical module at the other end of the optical fiber cable through the optical fiber cable, so that the FEC transmission mode of the optical module is switched to the same transmission mode as the optical module at the other end, and the adaptation information is sent through the optical module to negotiate that the optical module interface of the opposite device switches to the same transmission mode. There are three types of adaptation information, one of which is to turn off the FEC function, one is the RS mode, and the other is the FC mode. If the data transmission protocols of the FEC function supported by the switch, the optical module, and the opposite device do not match, the adaptation information is turned off. If the three have at least one data transmission protocol that is the same, the same data transmission protocol is used as the transmission mode corresponding to the FEC function.

[0046] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module includes:

[0047] An optical module device information table is created, and device information of known optical modules and supported data transmission protocols are saved in the optical module device information table.

[0048] In this embodiment, an information table for storing optical module device information is created on the switch, and known optical module models and corresponding FEC modes supported by the optical modules are stored in the optical module device information table according to the device models.

[0049] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module further comprises:

[0050] The device information of the optical module stored in the EEPROM of the optical module is read through the corresponding access port, and the data transmission protocol corresponding to the device information is queried in the optical module device information table based on the device information.

[0051] In this embodiment, when an optical module is connected to the corresponding port on the switch, the switch obtains the device model of the optical module stored in the optical module's EEPROM. The switch then queries the optical module device information table based on the device model. If the optical module is included in the optical module device information table, the switch obtains the data transmission protocol supported by the optical module and uses that protocol as the corresponding pending FEC transmission mode. After confirming the data transmission protocols supported by the peer device and the switch, the switch determines the transmission mode corresponding to the transmission protocol used in the optical channel established between the optical module, the switch, and the peer device.

[0052] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module further comprises:

[0053] In response to the inability to identify the optical module, the port to which the optical module is connected is controlled to perform transmission protocol adaptation with the optical module using a different data transmission protocol, and the successfully adapted data transmission protocol and the device information of the optical module are saved in a corresponding optical module device information table.

[0054] In this embodiment, if the optical module information model obtained does not exist in the optical module device information table, it is impossible to know which data transmission protocols the optical module supports, and it is even more impossible to confirm which FEC transmission mode should be established with the optical module. The switch then attempts to adapt the optical module interface with the adaptation information of different data transmission protocols through the corresponding interface to which the optical module is connected, and then determines the data transmission protocol supported by the optical module, and further saves the optical module device information and the corresponding supported data transmission protocol into the optical module device information table.

[0055] In some embodiments of the present invention, obtaining information about the peer device through the optical module and confirming the data transmission protocol supported by the peer device includes:

[0056] Create a peer device information table and save the device information and supported data transmission protocols of the known peer devices to the peer device information table.

[0057] In this embodiment, a peer device information table is created in the switch. The peer device information table is used to store the model of the peer device and the data transmission protocols supported by the peer device. Furthermore, the device model and the data transmission protocols supported by the peer device connected to the switch are stored in the peer device information table.

[0058] In some embodiments of the present invention, obtaining the peer device information through the optical module and confirming the data transmission protocol supported by the peer device further includes:

[0059] Communicate with the opposite device through the optical module to obtain device information of the opposite device, and query the data transmission protocol supported by the opposite device in the opposite device information table based on the device information.

[0060] In response to the opposite device not existing in the opposite device information table, the optical module is controlled to adapt to the port corresponding to the opposite device in different data transmission modes according to the data transmission protocol supported by the optical module, and the successfully adapted data transmission protocol is updated to the opposite device information table.

[0061] In this embodiment, for a peer device that establishes a connection with the switch via an optical fiber cable, the switch obtains the device model information of the peer device through an optical module, and then queries the peer device information table based on the device model information. If the device information of the peer device exists in the peer device information table, the FEC transmission mode that can be used to set the optical channel established between the peer device and the switch is determined based on the data transmission protocol supported by the corresponding peer device in the peer device information table.

[0062] In this embodiment, when the switch determines that the peer device has established a connection with the switch through the two optical modules at both ends of the optical fiber cable, if the peer device does not exist in the peer device information table, the optical module connected to its own port sends adaptation information to the optical module at the other end of the optical fiber cable. The optical module at the other end sends the adaptation information to the interface of the peer device and receives a response to the adaptation information. If the peer device supports the corresponding adaptation information, the corresponding data transmission protocol and the device model of the peer device are saved in the peer device information table.

[0063] In some embodiments of the present invention, the method further comprises:

[0064] In response to the optical module being connected to the switch and the opposite device, according to the optical module device information table and the opposite device information table, the data transmission protocol that satisfies the communication between the switch, the optical module and the opposite device is automatically adapted according to a predetermined strategy, and the data transmission protocol is applied to the switch port to which the optical module is connected.

[0065] In this embodiment, when determining the FEC transmission mode for an optical module connected to a switch and a peer device connected to the switch through the optical module, the first step is to determine whether the three devices support a common data transmission protocol. If so, the FEC transmission mode corresponding to the supported data transmission protocol is preferentially used as the FEC transmission mode for port adaptation. If no common data transmission protocol is supported, the FEC transmission function is disabled.

[0066] For the two data transmission protocols of the three average values rs and fc, in the FEC mode of the switch-optical module-opposite device, the FEC transmission mode corresponding to the pre-examined default priority data transmission protocol is followed.

[0067] Example:

[0068] First, an automatic matching mode must be established to automatically detect the rate and type of the optical module inserted into the port and match the corresponding FEC status and mode. Automatic matching mode: When an optical module is inserted into the switch port, the switch will read the EEPROM information of the inserted optical module, which contains the rate and type of the optical module (a function that the switch system has already implemented). Based on the obtained optical module rate and type information, the known matching list is read. If the corresponding FEC mode has been matched, the FEC mode is selected first; if there is no matching record for the optical module rate and type in the matching list, different FEC modes (off, rs, fc) are tried. After the selection is completed, the FEC mode supported by the opposite interface is queried through the physical link connection communication and negotiated to modify it (a message querying the support of the FEC mode and a message modifying the FEC mode are sent to the opposite end). After both ends are modified to the mode suitable for the inserted optical module, the ports on both ends can be successfully UP. Successful negotiation means that automatic matching of the FEC mode of the switch interface is achieved.

[0069] Automatically detect the optical module type and rate, match the appropriate FEC state and mode, and negotiate with the peer interface (the switch or network card interface connected to the interface) to achieve the same FEC state and mode.

[0070] For example, when the port detects that the inserted optical module is a 25G SFP28 SR optical module, it queries the known matching list and finds that this type of optical module is suitable for turning on FEC and selecting FC mode. It then changes the port FEC status to FC mode. At the same time, it queries through physical link connection communication that the remote port supports FC mode and coordinates the remote interface to change to FC mode. When the port detects that the inserted optical module is a 100G QSFP28LR4 optical module, it queries the matching list and finds that there is no record of this type. It then tries different FEC modes. When the FEC mode is turned off, it queries through physical link connection communication that the remote port supports turning off FEC and coordinates the remote interface to turn off FEC mode. At this time, the port is up, which means that the automatic matching is successful.

[0071] The switch port adaptation method proposed in this invention obtains optical module information after the corresponding switch port is connected to the optical module. Based on this information, the method determines the transmission protocol supported by the optical module. The method then sets a suitable transmission protocol for the optical module and establishes a data connection between the optical module, the peer device, and the switch based on the determined transmission protocol. This method enables the switch port to automatically go up and select the appropriate FEC state for data transmission, saving time and reducing labor costs.

[0072] like Figure 2 As shown, another aspect of the present invention further provides a switch port adaptation system, comprising:

[0073] an optical module management module 1 configured to obtain information about an optical module connected to the switch and to determine a data transmission protocol supported by the optical module based on the information about the optical module;

[0074] A peer device management module 2 configured to obtain peer device information through the optical module and confirm the data transmission protocol supported by the peer device;

[0075] The port connection management module 3 is configured to determine the data transmission protocol of the switch port to which the optical module is connected according to the data transmission protocols supported by the optical module and the opposite device, and apply the determined data transmission protocol to the port to which the optical module is connected.

[0076] In some embodiments of the present invention, the optical module management module is further configured to:

[0077] An optical module device information table is created, and device information of known optical modules and supported data transmission protocols are saved in the optical module device information table.

[0078] In some embodiments of the present invention, the optical module management module is further configured to:

[0079] The device information of the optical module stored in the EEPROM of the optical module is read through the corresponding access port, and the data transmission protocol corresponding to the device information is queried in the optical module device information table based on the device information.

[0080] In some embodiments of the present invention, the optical module management module is further configured to:

[0081] In response to the inability to identify the optical module, the port to which the optical module is connected is controlled to perform transmission protocol adaptation with the optical module using a different data transmission protocol, and the successfully adapted data transmission protocol and the device information of the optical module are saved in a corresponding optical module device information table.

[0082] In some embodiments of the present invention, the peer device management module is further configured to:

[0083] Create a peer device information table and save the device information and supported data transmission protocols of the known peer devices to the peer device information table.

[0084] In some embodiments of the present invention, the peer device management module is further configured to:

[0085] Communicate with the opposite device through the optical module to obtain device information of the opposite device, and query the data transmission protocol supported by the opposite device in the opposite device information table based on the device information.

[0086] In response to the opposite device not existing in the opposite device information table, the optical module is controlled to adapt to the port corresponding to the opposite device in different data transmission modes according to the data transmission protocol supported by the optical module, and the successfully adapted data transmission protocol is updated to the opposite device information table.

[0087] In some embodiments of the present invention, the port connection management module is further configured to:

[0088] In response to the optical module being connected to the switch and the opposite device, according to the optical module device information table and the opposite device information table, the data transmission protocol that satisfies the communication between the switch, the optical module and the opposite device is automatically adapted according to a predetermined strategy, and the data transmission protocol is applied to the switch port to which the optical module is connected.

[0089] like Figure 3 As shown, another aspect of the present invention further provides a computer device, comprising:

[0090] at least one processor 21; and

[0091] A memory 22, wherein the memory 22 stores computer instructions 23 that can be run on the processor 21, and when the instructions 23 are executed by the processor 21, a switch port adaptation method is implemented, including:

[0092] Obtain information about an optical module connected to the switch, and confirm a data transmission protocol supported by the optical module based on the information about the optical module;

[0093] Obtaining information about the peer device through the optical module and confirming the data transmission protocol supported by the peer device;

[0094] The data transmission protocol of the switch port to which the optical module is connected is determined according to the data transmission protocols supported by the optical module and the opposite-end device, and the determined data transmission protocol is applied to the port to which the optical module is connected.

[0095] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module includes:

[0096] An optical module device information table is created, and device information of known optical modules and supported data transmission protocols are saved in the optical module device information table.

[0097] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module further comprises:

[0098] The device information of the optical module stored in the EEPROM of the optical module is read through the corresponding access port, and the data transmission protocol corresponding to the device information is queried in the optical module device information table based on the device information.

[0099] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module further comprises:

[0100] In response to the inability to identify the optical module, the port to which the optical module is connected is controlled to perform transmission protocol adaptation with the optical module using a different data transmission protocol, and the successfully adapted data transmission protocol and the device information of the optical module are saved in a corresponding optical module device information table.

[0101] In some embodiments of the present invention, obtaining information about the peer device through the optical module and confirming the data transmission protocol supported by the peer device includes:

[0102] Create a peer device information table and save the device information and supported data transmission protocols of the known peer devices to the peer device information table.

[0103] In some embodiments of the present invention, obtaining the peer device information through the optical module and confirming the data transmission protocol supported by the peer device further includes:

[0104] Communicate with the opposite device through the optical module to obtain device information of the opposite device, and query the data transmission protocol supported by the opposite device in the opposite device information table based on the device information.

[0105] In response to the opposite device not existing in the opposite device information table, the optical module is controlled to adapt to the port corresponding to the opposite device in different data transmission modes according to the data transmission protocol supported by the optical module, and the successfully adapted data transmission protocol is updated to the opposite device information table.

[0106] In some embodiments of the present invention, the method further comprises:

[0107] In response to the optical module being connected to the switch and the opposite device, according to the optical module device information table and the opposite device information table, the data transmission protocol that satisfies the communication between the switch, the optical module and the opposite device is automatically adapted according to a predetermined strategy, and the data transmission protocol is applied to the switch port to which the optical module is connected.

[0108] like Figure 4As shown, another aspect of the present invention further provides a computer-readable storage medium 401, wherein the computer-readable storage medium 401 stores a computer program 402. When the computer program 402 is executed by a processor, a switch port adaptation method is implemented, including:

[0109] Obtain information about an optical module connected to the switch, and confirm a data transmission protocol supported by the optical module based on the information about the optical module;

[0110] Obtaining information about the peer device through the optical module and confirming the data transmission protocol supported by the peer device;

[0111] The data transmission protocol of the switch port to which the optical module is connected is determined according to the data transmission protocols supported by the optical module and the opposite-end device, and the determined data transmission protocol is applied to the port to which the optical module is connected.

[0112] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module includes:

[0113] An optical module device information table is created, and device information of known optical modules and supported data transmission protocols are saved in the optical module device information table.

[0114] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module further comprises:

[0115] The device information of the optical module stored in the EEPROM of the optical module is read through the corresponding access port, and the data transmission protocol corresponding to the device information is queried in the optical module device information table based on the device information.

[0116] In some embodiments of the present invention, obtaining information about an optical module connected to a switch, and confirming, based on the optical module information, a data transmission protocol supported by the optical module further comprises:

[0117] In response to the inability to identify the optical module, the port to which the optical module is connected is controlled to perform transmission protocol adaptation with the optical module using a different data transmission protocol, and the successfully adapted data transmission protocol and the device information of the optical module are saved in a corresponding optical module device information table.

[0118] In some embodiments of the present invention, obtaining information about the peer device through the optical module and confirming the data transmission protocol supported by the peer device includes:

[0119] Create a peer device information table and save the device information and supported data transmission protocols of the known peer devices to the peer device information table.

[0120] In some embodiments of the present invention, obtaining the peer device information through the optical module and confirming the data transmission protocol supported by the peer device further includes:

[0121] Communicate with the opposite device through the optical module to obtain device information of the opposite device, and query the data transmission protocol supported by the opposite device in the opposite device information table based on the device information.

[0122] In response to the opposite device not existing in the opposite device information table, the optical module is controlled to adapt to the port corresponding to the opposite device in different data transmission modes according to the data transmission protocol supported by the optical module, and the successfully adapted data transmission protocol is updated to the opposite device information table.

[0123] In some embodiments of the present invention, the method further comprises:

[0124] In response to the optical module being connected to the switch and the opposite device, according to the optical module device information table and the opposite device information table, the data transmission protocol that satisfies the communication between the switch, the optical module and the opposite device is automatically adapted according to a predetermined strategy, and the data transmission protocol is applied to the switch port to which the optical module is connected.

[0125] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope of the embodiments disclosed in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless expressly limited to the singular.

[0126] It should be understood that, as used herein, the singular forms "a" and "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" is intended to include any and all possible combinations of one or more of the associated listed items.

[0127] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0128] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0129] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples. Within the spirit of the embodiments of the present invention, the technical features of the above embodiments or different embodiments may be combined, and there are many other variations of the different aspects of the embodiments of the present invention described above, which are not provided in detail for the sake of clarity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included within the scope of protection of the embodiments of the present invention.

Claims

1. A switch port adaptation method, characterized in that: include: Obtain information about an optical module connected to the switch, and confirm a data transmission protocol supported by the optical module based on the information about the optical module; Obtaining information about the peer device through the optical module and confirming the data transmission protocol supported by the peer device; Determining a data transmission protocol of a switch port to which the optical module is connected according to data transmission protocols supported by the optical module and the peer device, and applying the determined data transmission protocol to the port to which the optical module is connected; The data transmission protocol refers to the FEC mode supported by the transmission link formed by the switch, optical module, and peer device.

2. The method according to claim 1, characterized in that The acquiring of information about an optical module connected to the switch and determining, based on the information about the optical module, a data transmission protocol supported by the optical module includes: An optical module device information table is created, and device information of known optical modules and supported data transmission protocols are saved in the optical module device information table.

3. The method according to claim 2, characterized in that The step of obtaining information about an optical module connected to the switch and confirming, based on the information about the optical module, a data transmission protocol supported by the optical module further includes: The device information of the optical module stored in the EEPROM of the optical module is read through the corresponding access port, and the data transmission protocol corresponding to the device information is queried in the optical module device information table based on the device information.

4. The method according to claim 1, wherein The step of obtaining information about an optical module connected to the switch and confirming, based on the information about the optical module, a data transmission protocol supported by the optical module further includes: In response to the inability to identify the optical module, the port to which the optical module is connected is controlled to perform transmission protocol adaptation with the optical module using a different data transmission protocol, and the successfully adapted data transmission protocol and the device information of the optical module are saved in a corresponding optical module device information table.

5. The method according to claim 1, wherein The step of obtaining information of the opposite device through the optical module and confirming the data transmission protocol supported by the opposite device includes: Create a peer device information table and save the device information and supported data transmission protocols of the known peer devices to the peer device information table.

6. The method according to claim 5, characterized in that The step of obtaining information of the opposite device through the optical module and confirming the data transmission protocol supported by the opposite device further includes: Communicate with the peer device through the optical module to obtain device information of the peer device, and query the data transmission protocol supported by the peer device in the peer device information table based on the device information; In response to the opposite device not existing in the opposite device information table, the optical module is controlled to adapt to the port corresponding to the opposite device in different data transmission modes according to the data transmission protocol supported by the optical module, and the successfully adapted data transmission protocol is updated to the opposite device information table.

7. The method according to claim 2 or 5, characterized in that Also includes: In response to the optical module being connected to the switch and the opposite device, according to the optical module device information table and the opposite device information table, the data transmission protocol that satisfies the communication between the switch, the optical module and the opposite device is automatically adapted according to a predetermined strategy, and the data transmission protocol is applied to the switch port to which the optical module is connected.

8. A switch port adaptation system, characterized in that: include: an optical module management module configured to obtain information about an optical module connected to the switch and to determine a data transmission protocol supported by the optical module based on the information about the optical module; A peer device management module configured to obtain peer device information through the optical module and confirm the data transmission protocol supported by the peer device; a port connection management module configured to determine a data transmission protocol of a switch port to which the optical module is connected based on the data transmission protocols supported by the optical module and the peer device, and apply the determined data transmission protocol to the port to which the optical module is connected; The data transmission protocol refers to the FEC mode supported by the transmission link formed by the switch, optical module, and peer device.

9. A computer device, characterized in that: include: at least one processor; as well as A memory storing computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Forward error correction switching method and device and computer storage medium

    CN110620634A

  • Ethernet interface forward error correction mode automatic selection method, chip and device

    CN112511271A