CN111541960A - Switch configuration method, device, equipment and computer readable storage medium - Google Patents

Switch configuration method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111541960A
CN111541960A CN202010319593.3A CN202010319593A CN111541960A CN 111541960 A CN111541960 A CN 111541960A CN 202010319593 A CN202010319593 A CN 202010319593A CN 111541960 A CN111541960 A CN 111541960A
Authority
CN
China
Prior art keywords
switch
optical module
port
circuit
gigabit
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.)
Granted
Application number
CN202010319593.3A
Other languages
Chinese (zh)
Other versions
CN111541960B (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.)
3onedata Co ltd
Original Assignee
3onedata 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 3onedata Co ltd filed Critical 3onedata Co ltd
Priority to CN202010319593.3A priority Critical patent/CN111541960B/en
Publication of CN111541960A publication Critical patent/CN111541960A/en
Application granted granted Critical
Publication of CN111541960B publication Critical patent/CN111541960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • H04Q2011/0037Operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • H04Q2011/0037Operation
    • H04Q2011/0039Electrical control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • H04Q2011/0037Operation
    • H04Q2011/0041Optical control

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a switch configuration method, a device, equipment and a computer readable storage medium, wherein the switch configuration method is applied to an Ethernet switch, the Ethernet switch comprises a switch port and a resistance-capacitance network circuit, the switch port is electrically connected with the resistance-capacitance network circuit, and the switch configuration method comprises the following steps: when the Ethernet switch is connected with an optical module, determining the model of the optical module; when the model of the optical module is a gigabit optical module, configuring the switch port into a gigabit port based on the RC network circuit; and when the model of the optical module is a hundred-megabyte optical module, configuring the switch port into a hundred-megabyte port based on the resistance-capacitance network circuit. The invention integrates the ports with different rates of the Ethernet switch into one switch port, and when the Ethernet switch is connected with optical modules with different models, the optical modules can be automatically adapted.

Description

Switch configuration method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for configuring a switch.
Background
With the continuous development of network communication technology, optical fiber communication is the main wired communication mode due to the advantages of good confidentiality and large transmission capacity. The optical module completes photoelectric conversion work in optical fiber communication, and is an important device in the optical fiber communication. The most widely used are optical transceiver modules, and the common types are SFP, SFF, SFP +, GBIC, and XFP, wherein gigabit optical modules are mostly SFP optical modules, and gigabit optical modules are mostly SFP + optical modules.
In the prior art, because the configuration of the ethernet switch is set by a manufacturer before leaving a factory and cannot be changed, the ethernet switch can only be used in cooperation with one type of optical module. This results in a situation where the ethernet switch cannot adapt to the optical module in practical use due to the use of different types of optical modules and the mismatch of the switch ports of the ethernet switch. Or because the resources of the switching chip of the Ethernet switch are not enough, the gigabit compatibility of hundreds of megabytes cannot be realized. Such as gigabit servers ports, are normally not configurable to hundreds of megabits of rate for matching hundreds of megabits of optical module communications.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a switch configuration method, a switch configuration device, switch configuration equipment and a computer readable storage medium, and aims to solve the technical problem that an Ethernet switch cannot be used with different optical modules in a matched manner.
In order to achieve the above object, the present invention provides a switch configuration method, which is applied to an ethernet switch, where the ethernet switch includes a switch port and a rc network circuit, and the switch port is electrically connected to the rc network circuit, and the switch configuration method includes the following steps:
when the Ethernet switch is connected with an optical module, determining the model of the optical module;
when the model of the optical module is a gigabit optical module, configuring the switch port into a gigabit port based on the RC network circuit;
and when the model of the optical module is a hundred-megabyte optical module, configuring the switch port into a hundred-megabyte port based on the resistance-capacitance network circuit.
Optionally, the ethernet switch further includes a switch circuit, the switch port is electrically connected to the switch circuit through the rc network circuit, and the step of configuring the switch port into a gigabit port based on the rc network circuit includes:
closing a hundred megaoptical ports of the switching circuit, and opening a gigabit optical port of the switching circuit to configure the switching circuit into a gigabit channel;
configuring the resistive-capacitive network circuit as a gigabit network circuit to configure the switch port as a gigabit port based on the gigabit channel.
Optionally, the ethernet switch further includes a switch circuit, the switch port is electrically connected to the switch circuit through the rc network circuit, and the step of configuring the switch port as a hundred mega port based on the rc network circuit includes:
closing a gigabit optical port of the switching circuit, and opening a hundred-megabyte optical port of the switching circuit to configure the switching circuit into a hundred-megabyte channel;
configuring the resistance-capacitance network circuit as a hundred mega network circuit based on the hundred mega channels to configure the switch ports as hundred mega ports.
Optionally, after the step of configuring the switch port as a gigabit port based on the rc network circuit when the model of the optical module is a gigabit optical module or the step of configuring the switch port as a hundred mega port based on the rc network circuit when the model of the optical module is a hundred mega optical module, the method further includes:
and when receiving the communication data transmitted by the optical module, forwarding the communication data.
Optionally, the step of determining the model number of the light module includes:
acquiring hardware information built in the optical module;
and determining the model of the optical module based on the hardware information.
Optionally, before the step of determining the model of the optical module when the ethernet switch is connected to the optical module, the method further includes:
and when the Ethernet switch is started, detecting whether an interface of the Ethernet switch is connected with the optical module.
Optionally, before the step of determining the model of the optical module when the ethernet switch is connected to the optical module, the method further includes:
and detecting whether the optical module is connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
In addition, to achieve the above object, the present invention further provides a switch configuration apparatus, including:
the detection module is used for determining the model of the optical module when the Ethernet switch is connected with the optical module;
a first configuration module, configured to configure the switch port as a gigabit port based on the rc network circuit when the optical module is a gigabit optical module;
and the second configuration module is used for configuring the switch port into a hundred mega port based on the resistance-capacitance network circuit when the model of the optical module is a hundred mega optical module.
In addition, to achieve the above object, the present invention further provides a switch configuration device, including: the system comprises a memory, a processor and a switch configuration program stored on the memory and capable of running on the processor, wherein the switch configuration program realizes the steps of the switch configuration method when being executed by the processor.
Furthermore, to achieve the above object, the present invention also provides a computer readable storage medium, on which a switch configuration program is stored, the switch configuration program, when executed by a processor, implementing the steps of the switch configuration method as described above.
The invention determines the model of the optical module when the Ethernet switch is connected with the optical module; when the model of the optical module is a gigabit optical module, configuring the switch port into a gigabit port based on the RC network circuit; and when the model of the optical module is a hundred-megabyte optical module, configuring the switch port into a hundred-megabyte port based on the resistance-capacitance network circuit. In this embodiment, different speed ports of the ethernet switch are integrated into one switch port through the rc network circuit, and when the ethernet switch is connected to optical modules of different models, the ethernet switch can automatically adapt to the optical modules, so that the ethernet switch can be connected to the optical modules of different models without performing corresponding configuration on a switch chip register of the ethernet switch, i.e., without rewriting a switch chip in the ethernet switch, and the matching communication between the optical modules and the switch port can be simply and conveniently completed; the optical module self-adapting circuit and the software algorithm are simplified to the greatest extent through a simple design circuit, the universality and the expandability are extremely high, and the design cost of an expansion chip is saved.
Drawings
Fig. 1 is a schematic diagram of a switch configuration device of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of a switch configuration method according to the present invention;
fig. 3 is a schematic diagram of a switch configuration circuit corresponding to the switch configuration method of the present invention;
fig. 4 is a schematic diagram of a rc network circuit in the switch configuration method of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic diagram of a switch configuration device of a hardware operating environment according to an embodiment of the present invention.
The switch configuration device of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, a portable computer and the like.
As shown in fig. 1, the switch configuration device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the switch configuration device may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like.
Those skilled in the art will appreciate that the switch configuration device architecture shown in fig. 1 does not constitute a limitation of the switch configuration device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a switch configuration program.
In the switch configuration device shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and processor 1001 may be used to invoke a switch configuration program stored in memory 1005.
In this embodiment, the switch configuration device includes: a memory 1005, a processor 1001, and a switch configuration program stored in the memory 1005 and operable on the processor 1001, wherein when the processor 1001 calls the switch configuration program stored in the memory 1005, the following operations are performed:
when the Ethernet switch is connected with an optical module, determining the model of the optical module;
when the model of the optical module is a gigabit optical module, configuring the switch port into a gigabit port based on the RC network circuit;
and when the model of the optical module is a hundred-megabyte optical module, configuring the switch port into a hundred-megabyte port based on the resistance-capacitance network circuit.
Further, the processor 1001 may call a switch configuration program stored in the memory 1005, and further perform the following operations:
closing a hundred megaoptical ports of the switching circuit, and opening a gigabit optical port of the switching circuit to configure the switching circuit into a gigabit channel;
configuring the resistive-capacitive network circuit as a gigabit network circuit to configure the switch port as a gigabit port based on the gigabit channel.
Further, the processor 1001 may call a switch configuration program stored in the memory 1005, and further perform the following operations:
closing a gigabit optical port of the switching circuit, and opening a hundred-megabyte optical port of the switching circuit to configure the switching circuit into a hundred-megabyte channel;
configuring the resistance-capacitance network circuit as a hundred mega network circuit based on the hundred mega channels to configure the switch ports as hundred mega ports.
Further, the processor 1001 may call a switch configuration program stored in the memory 1005, and further perform the following operations:
and when receiving the communication data transmitted by the optical module, forwarding the communication data.
Further, the processor 1001 may call a switch configuration program stored in the memory 1005, and further perform the following operations:
acquiring hardware information built in the optical module;
and determining the model of the optical module based on the hardware information.
Further, the processor 1001 may call a switch configuration program stored in the memory 1005, and further perform the following operations:
and when the Ethernet switch is started, detecting whether an interface of the Ethernet switch is connected with the optical module.
Further, the processor 1001 may call a switch configuration program stored in the memory 1005, and further perform the following operations:
and detecting whether the optical module is connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of the switch configuration method according to the present invention.
The switch configuration method provided by the invention is applied to a switch configuration circuit, as shown in fig. 3, the switch configuration circuit comprises a central control circuit, a switching circuit, a resistance-capacitance network circuit and a switch port, wherein the resistance-capacitance network circuit is connected with the switching circuit, and the central control circuit is communicated with the switching circuit by establishing electric connection with the switching circuit so as to control the switching circuit; the central control circuit communicates with the switch ports by establishing electrical connections with the switch ports of the ethernet switch, thereby controlling the switch ports.
Further, the switch circuit is configured to configure the switch circuit based on the first control signal sent by the central control circuit. Specifically, the first control signal includes a gigabit configuration signal and a hundred-megabyte configuration signal, and when the switching circuit receives the gigabit configuration signal sent by the central control circuit, the switching circuit is configured into a gigabit channel; when the switching circuit receives a hundred million configuration signal sent by the central control circuit, the switching circuit is configured into a hundred million channel.
The resistance-capacitance network circuit is used for configuring the resistance-capacitance network circuit based on the second control signal sent by the exchange circuit. Specifically, the second control signal includes a gigabit configuration signal and a hundred-megabyte configuration signal, and when the rc network circuit receives the gigabit configuration signal sent by the switch circuit, the rc network circuit is configured as a gigabit network circuit; when the resistance-capacitance network circuit receives a hundred-million configuration signal sent by the exchange circuit, the resistance-capacitance network circuit is configured into a hundred-million network circuit.
The switch port is used for providing an interface for connecting with the optical module.
The central control circuit is used for respectively controlling the switching circuit and the switch port.
In this embodiment, the switch configuration method includes the following steps:
step S10, when the Ethernet switch is connected with an optical module, determining the model of the optical module;
in an embodiment, after the ethernet switch is powered on, the monitoring circuit detects whether the optical module is connected to the switch port of the ethernet switch in real time, and detects whether the optical module is successfully connected to the ethernet switch, so as to detect whether the optical module is inserted into an interface corresponding to the switch port of the ethernet switch. When the optical module is successfully connected with the Ethernet switch, the fact that the optical module is inserted into an interface corresponding to a port of the switch at the moment is indicated, the optical module is successfully connected with the port of the switch, and then the model of the optical module is detected to obtain performance parameters of the optical module, wherein the model of the optical module can be the type, the working mode and the like of the optical module. Whether the optical module is connected with the Ethernet switch or not can be judged by detecting the working state of the optical module, and when the working state of the optical module is online, the optical module is successfully connected with the Ethernet switch currently; and when the working state of the optical module is off-line, the current connection between the optical module and the Ethernet switch fails.
Step S20, when the model of the optical module is a gigabit optical module, configuring the switch port to a gigabit port based on the RC network circuit;
in an embodiment, if it is detected that the ethernet switch is connected to the optical module, the model of the optical module is read, and the rc network circuit is configured according to the model of the optical module, so that the rc network is configured as a gigabit network circuit. And when the type of the optical module is read to be a gigabit optical module, configuring a gigabit port of a switch connected with the optical module by a gigabit network circuit. Specifically, when the optical module is connected with the ethernet switch, hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the switching circuit according to the hardware information of the optical module, and the switching circuit configures the switching circuit when receiving the control signal sent by the central control circuit; based on the configured exchange circuit, carrying out corresponding configuration on the resistance-capacitance network circuit; and after the configuration of the switching circuit and the resistance-capacitance network circuit is completed, the configured kilomega port is obtained.
Step S30, when the model of the optical module is a hundred mega optical module, configuring the switch port as a hundred mega port based on the rc network circuit.
In one embodiment, when it is detected that the ethernet switch is connected to the optical module, the model of the optical module is read, and the rc network circuit is configured according to the model of the optical module, so that the rc network is configured into a hundred mega network circuit. When the model of the optical module is read to be a hundred-million optical module, a hundred-million port is configured by a hundred-million network circuit as a switch port connected with the optical module. Specifically, when the optical module is connected with the ethernet switch, hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the switching circuit according to the hardware information of the optical module, and the switching circuit configures the switching circuit when receiving the control signal sent by the central control circuit; based on the configured exchange circuit, carrying out corresponding configuration on the resistance-capacitance network circuit; and after the configuration of the switching circuit and the resistance-capacitance network circuit is completed, a configured hundred-million port is obtained. Therefore, when the model of the optical module is a hundred mega optical module, the switch circuit is configured correspondingly according to the hardware information of the hundred mega optical module, and the rc network circuit is configured correspondingly, so as to configure the switch port into a hundred mega port.
In the switch configuration method provided in this embodiment, when the ethernet switch is connected to an optical module, the model of the optical module is determined; when the model of the optical module is a gigabit optical module, configuring the switch port into a gigabit port based on the RC network circuit; and when the model of the optical module is a hundred-megabyte optical module, configuring the switch port into a hundred-megabyte port based on the resistance-capacitance network circuit. In this embodiment, different speed ports of the ethernet switch are integrated into one switch port through the rc network circuit, and when the ethernet switch is connected to optical modules of different models, the ethernet switch can automatically adapt to the optical modules, so that the ethernet switch can be connected to the optical modules of different models without performing corresponding configuration on a switch chip register of the ethernet switch, i.e., without rewriting a switch chip in the ethernet switch, and the matching communication between the optical modules and the switch port can be simply and conveniently completed; the optical module self-adapting circuit and the software algorithm are simplified to the greatest extent through a simple design circuit, the universality and the expandability are extremely high, and the design cost of an expansion chip is saved.
Based on the first embodiment, a second embodiment of the switch configuration method of the present invention is proposed, in this embodiment, step S20 includes:
step a, closing a hundred-megabyte optical port of the switching circuit, and opening a gigabit optical port of the switching circuit to configure the switching circuit into a gigabit channel;
step b, based on the gigabit channel, configuring the resistance-capacitance network circuit into a gigabit network circuit so as to configure the switch port into a gigabit port.
In an embodiment, when it is detected that the optical module is connected to the switch, the model of the optical module is read, and the switch circuit and the rc network circuit are configured according to the model of the optical module. When the type of the optical module is read to be a kilomega optical module, closing a hundred-mega optical port of the exchange circuit, and opening the kilomega optical port of the exchange circuit to configure the exchange circuit into a kilomega channel; when the switch circuit is configured as a gigabit channel, the switch circuit transmits a first logic level to the RC network circuit based on the gigabit channel; the resistance-capacitance network circuit receives a first logic level sent by the switching circuit, configures the resistance-capacitance network circuit based on the first logic level, configures the resistance-capacitance network circuit into a gigabit network circuit, and outputs a matching signal to the switch port by the gigabit network circuit, so that the switch port can be matched with the gigabit optical module.
Specifically, with reference to fig. 3 and 4, when the optical module is connected to the ethernet switch, the hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the switch circuit according to the hardware information of the optical module, and the switch circuit receives the control signal sent by the central control circuit, closes the hundreds of megabytes of optical ports of the switch circuit, and opens the gigabytes of optical ports of the switch circuit, so that the switch circuit outputs the control signal to the rc network circuit; the resistance-capacitance network circuit receives the control signal sent by the switching circuit, and the first sub-network circuit in the resistance-capacitance network circuit is pulled up to a positive level based on the control signal output by the switching circuit, so that the resistance-capacitance network circuit outputs a corresponding matching signal, a port of the switch can be matched with the gigabit optical module, and the Ethernet switch is adaptive to the gigabit optical module.
Further, in an embodiment, the ethernet switch further includes a switch circuit, the switch port is electrically connected to the switch circuit through the rc network circuit, and the step of configuring the switch port as a hundred mega port based on the rc network circuit includes:
step c, closing the gigabit optical port of the exchange circuit, and opening the hundred-megabyte optical port of the exchange circuit to configure the exchange circuit into a hundred-megabyte channel;
and d, configuring the resistance-capacitance network circuit into a hundred-million network circuit based on the hundred-million channel so as to configure the switch port into a hundred-million port.
In an embodiment, when it is detected that the optical module is connected to the switch, the model of the optical module is read, and the switch circuit and the rc network circuit are configured according to the model of the optical module. When the type of the optical module is read to be a hundred-million optical module, closing a kilomega optical port of the exchange circuit, and opening the hundred-million optical port of the exchange circuit to configure the exchange circuit into a hundred-million channel; when the switching circuit is configured to be a hundred mega channel, the switching circuit sends a second logic level to the resistance-capacitance network circuit based on the hundred mega channel; the resistance-capacitance network circuit receives a second logic level sent by the switching circuit, configures the resistance-capacitance network circuit based on the second logic level, configures the resistance-capacitance network circuit into a hundred-megabyte network circuit, and outputs a matching signal to the port of the switch, so that the port of the switch can be matched with a hundred-megabyte optical module.
Specifically, with reference to fig. 3 and 4, when the optical module is connected to the ethernet switch, the hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the switch circuit according to the hardware information of the optical module, the switch circuit receives the control signal sent by the central control circuit, closes the gigabit optical port of the switch circuit, and opens the gigabit optical port of the switch circuit, so that the switch circuit outputs the control signal to the rc network circuit; the resistance-capacitance network circuit receives a control signal sent by the switching circuit, and the second sub-network circuit in the resistance-capacitance network circuit is pulled up to a positive level based on the control signal output by the switching circuit, so that the resistance-capacitance network circuit outputs a corresponding matching signal, a port of the switch can be matched with the hundred-megabyte optical module, and the Ethernet switch is adaptive to the hundred-megabyte optical module.
Further, in an embodiment, after the step of configuring the switch port as a gigabit port based on the rc network circuit when the model of the optical module is a gigabit optical module or the step of configuring the switch port as a hundred mega port based on the rc network circuit when the model of the optical module is a hundred mega optical module, the method further includes:
and e, when receiving the communication data transmitted by the optical module, forwarding the communication data.
In an embodiment, after the switch port is configured to the interface configuration corresponding to the optical module, when the optical module receives the communication data, the ethernet switch may smoothly receive the communication data transmitted by the optical module, and forward the communication data to the network device or other switch devices.
Further, in an embodiment, the step of determining the model of the light module includes:
step f, acquiring hardware information built in the optical module;
and g, determining the model of the optical module based on the hardware information.
In an embodiment, after the ethernet switch is powered on, the monitoring circuit detects whether the optical module is connected to the switch port of the ethernet switch in real time, so as to detect whether the optical module is inserted into an interface corresponding to the switch port of the ethernet switch. When the optical module is detected to be connected with the switch port of the Ethernet switch, which indicates that the optical module is inserted into the interface corresponding to the switch port at the moment, the optical module is successfully connected with the switch port, and then the internal hardware of the optical module is detected to obtain the hardware information of the optical module. And determining the model of the optical module based on the detected hardware information of the optical module. The type of the optical module may be a type, a parameter, or a working mode of the optical module, and the hardware information may be EEPROM information built in the optical module.
Further, in an embodiment, before the step of determining the model of the optical module when the ethernet switch is connected to the optical module, the method further includes:
and h, when the Ethernet switch is started, detecting whether an interface of the Ethernet switch is connected with the optical module.
In an embodiment, when the ethernet switch is powered on and started, the monitoring circuit detects whether the interface of the ethernet switch is connected with the optical module in real time, so as to detect whether the optical module is inserted into the interface corresponding to the switch port of the ethernet switch. When the optical module is detected to be connected with the switch port of the Ethernet switch, which indicates that the optical module is inserted into the interface corresponding to the switch port at the moment, the optical module is successfully connected with the switch port, and then the internal hardware of the optical module is detected to obtain the hardware information of the optical module. And determining the model of the optical module based on the detected hardware information of the optical module.
Further, in an embodiment, before the step of determining the model of the optical module when the ethernet switch is connected to the optical module, the method further includes:
and i, detecting whether the optical module is connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
In one embodiment, the working state of the optical module is detected based on a monitoring circuit connected with a switch port to judge whether the optical module is connected with the switch port of the Ethernet switch, and when the working state of the optical module is online, the current connection between the optical module and the switch port is successful; and when the working state of the optical module is off-line, the current connection between the optical module and the port of the switch fails.
In the switch configuration method provided in this embodiment, a gigabit optical port of a switch circuit is opened by closing the hundreds of megabits of optical ports of the switch circuit, so as to configure the switch circuit into a gigabit channel; and when the optical module connected with the Ethernet switch is the gigabit optical module, the switch port can be matched with the gigabit optical module by simply configuring the switch circuit and the RC network circuit, so that the Ethernet switch can adaptively configure the gigabit optical module.
In addition, an embodiment of the present invention further provides an apparatus for configuring an exchange, where the apparatus for configuring an exchange includes:
the detection module is used for determining the model of the optical module when the Ethernet switch is connected with the optical module;
a first configuration module, configured to configure the switch port as a gigabit port based on the rc network circuit when the optical module is a gigabit optical module;
and the second configuration module is used for configuring the switch port into a hundred mega port based on the resistance-capacitance network circuit when the model of the optical module is a hundred mega optical module.
Optionally, the first configuration module is further configured to:
closing a hundred megaoptical ports of the switching circuit, and opening a gigabit optical port of the switching circuit to configure the switching circuit into a gigabit channel;
configuring the resistive-capacitive network circuit as a gigabit network circuit to configure the switch port as a gigabit port based on the gigabit channel.
Optionally, the second configuration module is further configured to:
closing a gigabit optical port of the switching circuit, and opening a hundred-megabyte optical port of the switching circuit to configure the switching circuit into a hundred-megabyte channel;
configuring the resistance-capacitance network circuit as a hundred mega network circuit based on the hundred mega channels to configure the switch ports as hundred mega ports.
Optionally, the first configuration module is further configured to:
and when receiving the communication data transmitted by the optical module, storing the communication data.
Optionally, the second configuration module is further configured to:
and when receiving the communication data transmitted by the optical module, storing the communication data.
Optionally, the detection module is further configured to:
acquiring hardware information built in the optical module;
and determining the model of the optical module based on the hardware information.
Optionally, the detection module is further configured to:
and when the Ethernet switch is started, detecting whether an interface of the Ethernet switch is connected with the optical module.
Optionally, the detection module is further configured to:
and detecting whether the optical module is connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a switch configuration program is stored on the computer-readable storage medium, and when being executed by a processor, the switch configuration program implements the steps of the switch configuration method according to any one of the above descriptions.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the switch configuration method described above, and will not be described in detail herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. 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 (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A switch configuration method, wherein the switch configuration method is applied to an ethernet switch, the ethernet switch includes a switch port and a rc network circuit, the switch port is electrically connected to the rc network circuit, and the switch configuration method includes the following steps:
when the Ethernet switch is connected with an optical module, determining the model of the optical module;
when the model of the optical module is a gigabit optical module, configuring the switch port into a gigabit port based on the RC network circuit;
and when the model of the optical module is a hundred-megabyte optical module, configuring the switch port into a hundred-megabyte port based on the resistance-capacitance network circuit.
2. The switch configuration method of claim 1, wherein the ethernet switch further comprises a switch circuit, the switch port is electrically connected to the switch circuit through the rc network circuit, and the step of configuring the switch port into a gigabit port based on the rc network circuit comprises:
closing a hundred megaoptical ports of the switching circuit, and opening a gigabit optical port of the switching circuit to configure the switching circuit into a gigabit channel;
configuring the resistive-capacitive network circuit as a gigabit network circuit to configure the switch port as a gigabit port based on the gigabit channel.
3. The switch configuration method of claim 1, wherein the ethernet switch further comprises a switch circuit, the switch port is electrically connected to the switch circuit through the rc network circuit, and the step of configuring the switch port as a hundreds of megabits of ports based on the rc network circuit comprises:
closing a gigabit optical port of the switching circuit, and opening a hundred-megabyte optical port of the switching circuit to configure the switching circuit into a hundred-megabyte channel;
configuring the resistance-capacitance network circuit as a hundred mega network circuit based on the hundred mega channels to configure the switch ports as hundred mega ports.
4. The switch configuration method according to claim 1, wherein after the step of configuring the switch port as a gigabit port based on the rc network circuit when the optical module has a gigabit optical module type or the step of configuring the switch port as a hundred mega port based on the rc network circuit when the optical module has a hundred mega optical module type, the method further comprises:
and when receiving the communication data transmitted by the optical module, forwarding the communication data.
5. The switch configuration method of claim 1, wherein the step of determining the model number of the optical module comprises:
acquiring hardware information built in the optical module;
and determining the model of the optical module based on the hardware information.
6. The switch configuration method of claim 1, wherein the step of determining the model number of the optical module when the ethernet switch is connected to the optical module is preceded by the step of:
and when the Ethernet switch is started, detecting whether an interface of the Ethernet switch is connected with the optical module.
7. The switch configuration method according to any one of claims 1 to 6, wherein the step of determining the model number of the optical module when the Ethernet switch is connected to the optical module is preceded by:
and detecting whether the optical module is connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
8. A switch configuration apparatus, the switch configuration apparatus comprising:
the detection module is used for determining the model of the optical module when the Ethernet switch is connected with the optical module;
a first configuration module, configured to configure the switch port as a gigabit port based on the rc network circuit when the optical module is a gigabit optical module;
and the second configuration module is used for configuring the switch port into a hundred mega port based on the resistance-capacitance network circuit when the model of the optical module is a hundred mega optical module.
9. A switch configuration device, the switch configuration device comprising: memory, a processor and a switch configuration program stored on the memory and executable on the processor, the switch configuration program when executed by the processor implementing the steps of the switch configuration method according to any of claims 1 to 7.
10. A computer-readable storage medium, having a switch configuration program stored thereon, which when executed by a processor implements the steps of the switch configuration method of any of claims 1 to 7.
CN202010319593.3A 2020-04-21 2020-04-21 Switch configuration method, device, equipment and computer readable storage medium Active CN111541960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010319593.3A CN111541960B (en) 2020-04-21 2020-04-21 Switch configuration method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010319593.3A CN111541960B (en) 2020-04-21 2020-04-21 Switch configuration method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111541960A true CN111541960A (en) 2020-08-14
CN111541960B CN111541960B (en) 2022-03-25

Family

ID=71977004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010319593.3A Active CN111541960B (en) 2020-04-21 2020-04-21 Switch configuration method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111541960B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115714941A (en) * 2023-01-05 2023-02-24 北京工蜂电子技术有限公司 Optical interface rate self-adaption method, device, medium and equipment of network communication equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090060531A1 (en) * 2007-08-30 2009-03-05 Calix, Inc. Optical network interface devices and methods
CN101505436A (en) * 2008-02-05 2009-08-12 华为技术有限公司 Method and equipment for multiple interface optical module adaptation
CN101583054A (en) * 2009-06-12 2009-11-18 中兴通讯股份有限公司 Method for realizing that optical interface supports multiple rate patterns by adopting optical module and device
CN102694603A (en) * 2012-05-14 2012-09-26 中兴通讯股份有限公司 Method and device for integrating interfaces of optical modules with different speed rates
CN203445883U (en) * 2013-09-17 2014-02-19 讯达康通讯设备(惠州)有限公司 Optical network unit (ONU) terminal apparatus of Ethernet passive optical network (EPON) system
CN104639468A (en) * 2015-01-07 2015-05-20 武汉微创光电股份有限公司 Optical port adaptive Ethernet switch and adaptive method thereof
CN105610741A (en) * 2016-03-03 2016-05-25 山东超越数控电子有限公司 Optical module based optical port rate adaptation method
CN110602003A (en) * 2019-09-17 2019-12-20 深圳市三旺通信股份有限公司 Mine intrinsic safety type ten-gigabit three-layer switch with flexibly configurable optical ports
CN110677292A (en) * 2019-09-27 2020-01-10 杭州迪普科技股份有限公司 Optical interface rate configuration method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090060531A1 (en) * 2007-08-30 2009-03-05 Calix, Inc. Optical network interface devices and methods
CN101505436A (en) * 2008-02-05 2009-08-12 华为技术有限公司 Method and equipment for multiple interface optical module adaptation
CN101583054A (en) * 2009-06-12 2009-11-18 中兴通讯股份有限公司 Method for realizing that optical interface supports multiple rate patterns by adopting optical module and device
CN102694603A (en) * 2012-05-14 2012-09-26 中兴通讯股份有限公司 Method and device for integrating interfaces of optical modules with different speed rates
CN203445883U (en) * 2013-09-17 2014-02-19 讯达康通讯设备(惠州)有限公司 Optical network unit (ONU) terminal apparatus of Ethernet passive optical network (EPON) system
CN104639468A (en) * 2015-01-07 2015-05-20 武汉微创光电股份有限公司 Optical port adaptive Ethernet switch and adaptive method thereof
CN105610741A (en) * 2016-03-03 2016-05-25 山东超越数控电子有限公司 Optical module based optical port rate adaptation method
CN110602003A (en) * 2019-09-17 2019-12-20 深圳市三旺通信股份有限公司 Mine intrinsic safety type ten-gigabit three-layer switch with flexibly configurable optical ports
CN110677292A (en) * 2019-09-27 2020-01-10 杭州迪普科技股份有限公司 Optical interface rate configuration method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115714941A (en) * 2023-01-05 2023-02-24 北京工蜂电子技术有限公司 Optical interface rate self-adaption method, device, medium and equipment of network communication equipment

Also Published As

Publication number Publication date
CN111541960B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN111541956B (en) Optical port self-adaption method, device, switch and computer readable storage medium
US20190274050A1 (en) Auto-provisioning device
CN107147503B (en) Powered device and POE system
CN107147419A (en) Reduce method, storage medium and the terminal of signal interference
CN108923935B (en) Narrowband Internet of things data analysis management control system, method and application
CN112328318B (en) Method, device and storage medium for automatic planning of proprietary cloud platform
CN104270204A (en) Testing method and testing equipment for wireless communication module
CN103313430A (en) WiFi (wireless fidelity) connecting method using mobile terminal to configure network access equipment through WiFi and related equipment
CN106101989A (en) A kind of method selecting safe unit and mobile terminal
CN111541629A (en) Mode self-adaption method, device, equipment and computer readable storage medium
CN111541960B (en) Switch configuration method, device, equipment and computer readable storage medium
CN105188023A (en) Bluetooth communication method and communication device
CN104519482A (en) Equipment parameter configuration method and device
CN105511275A (en) Method and device for controlling intelligent electric appliance
CN111541958A (en) Optical interface rate self-adaption method, equipment, device and readable storage medium
CN111541568B (en) Switch configuration method, device, equipment and computer readable storage medium
CN107317828A (en) Document down loading method and device
CN113824612B (en) Network equipment compatibility testing method, terminal equipment and storage medium
CN111510894B (en) NFC and UWB communications
CN111132097B (en) Wireless module driving method and device, wireless module, terminal and storage medium
CN110784240B (en) Wireless data communication module and method
CN112437453A (en) Network configuration method and device of router, storage medium and electronic device
CN106921995A (en) Motor condition control method, storage medium and terminal
CN109246674B (en) Application switching method, device and system
CN109495119A (en) A kind of RF switch control method, device, mobile terminal and storage medium

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