Port mode switching method and device, electronic equipment and storage medium
By implementing the port mode switching method in Ethernet network devices, the network complexity and maintenance difficulty caused by port mode fixation in PON and Ethernet network converged deployment are solved, and flexible network requirements are achieved.
Patent Information
- Application Number
- CN202311665913.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2025-06-06
AI Technical Summary
In the PON and Ethernet network converged deployment, due to the fixed port mode, network complexity and maintenance difficulty are high, and it is impossible to flexibly meet the different network needs of users.
By implementing the port mode switching method in an Ethernet network device, in response to the optical module insertion operation, obtain optical module information, determine the module type, and perform port mode switching according to the difference between the target port mode and the current port mode, thereby supporting various network requirements of PON and Ethernet networks.
It realizes flexible switching of Ethernet network device port mode, reduces the complexity and maintenance difficulty of the converged network, and can meet users' various network needs for PON and Ethernet networks.
Smart Images

Figure CN120111007A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a port mode switching method, device, electronic device and storage medium. Background Art
[0002] Passive Optical Network (PON) supports point-to-multipoint connection. Compared with the point-to-point connection of Ethernet, it saves port resources and optical module resources, simplifies the network architecture, and replaces active aggregation devices with passive splitters, reducing maintenance costs and power consumption.
[0003] However, the uplink of PON is time-division multiplexing shared bandwidth among multiple access nodes. Therefore, compared with the point-to-point Ethernet network, it has higher latency and smaller uplink bandwidth.
[0004] Based on the above advantages and disadvantages of PON and Ethernet, in order to meet the network needs of different users under the same network, PON and Ethernet need to be integrated.
[0005] In related technologies, PON and Ethernet network convergence deployment is generally divided into two types:
[0006] 1. Deploy PON as the backbone network, install optical line terminal (OLT) equipment at the central office or data center, and transmit signals to user terminals through optical fibers. Deploy Ethernet networks at user terminals to provide LAN connections and internal communications.
[0007] 2. Deploy Ethernet network as the backbone network, Ethernet switches and network equipment are deployed in the central office or data center, and then the OLT equipment is connected to the backbone network, so that the OLT equipment is connected to the multi-point optical network unit (English: Optical Network Unit, abbreviated: ONU) equipment through the optical distribution network (English: Optical Distribution Network, abbreviated: ODN).
[0008] However, when adopting the above-mentioned network fusion method, since there are two networking devices in the same network and the port mode of each networking device is fixed (that is, the port mode of the PON device is the PON mode, and the port mode of the Ethernet device is the Ethernet mode), it will not only increase the network complexity of the fusion network, but also make the maintenance and management of the fusion network more difficult.
[0009] For example, if network requirements change, for example, users' requirements for upstream bandwidth increase or network latency become higher, the shared upstream method provided by PON will no longer be applicable, which will result in the deployed PON equipment being replaced only by Ethernet network equipment. Summary of the invention
[0010] The embodiments of the present application provide a port mode switching method, device, electronic device and storage medium, which are used in a fusion network of PON and Ethernet network, using only one network device port, so as to meet the user's network requirements for PON and Ethernet network through networking equipment, thereby reducing the network complexity of the fusion network and the difficulty of maintenance and management of the fusion network.
[0011] In a first aspect, an embodiment of the present application provides a port mode switching method, which is applied to any Ethernet network device in an Ethernet network, and the method includes:
[0012] In response to the operation of inserting the optical module into the port, acquiring optical module information of the optical module;
[0013] Determine the module type of the optical module based on the multiple optical module features included in the optical module information and the feature intervals to which the features belong;
[0014] When it is determined that the target port mode corresponding to the module type is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type.
[0015] In an optional embodiment, if the following conditions are met, it is determined that the target port mode corresponding to the module type is different from the current port mode:
[0016] The target port mode is passive optical network (PON) mode, and the current port mode is Ethernet mode; or,
[0017] The target port mode is Ethernet mode, and the current port mode is PON mode.
[0018] Through the above embodiments, when the Ethernet network device determines that the target port mode corresponding to the module type is different from the current port mode, it can trigger the port mode switching operation, that is, switch the port from the current port mode to the target port mode, thereby providing the network service capability corresponding to the target port mode.
[0019] In an optional embodiment, switching the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type includes:
[0020] If the module type is PON type, the port is switched from Ethernet mode to PON mode according to the port switching mode set for the corresponding PON type;
[0021] If the module type is Ethernet type, the port is switched from PON mode to Ethernet mode according to the port switching mode set for the corresponding Ethernet type.
[0022] Through the above embodiments, according to the port switching modes set for the corresponding PON optical module and Ethernet optical module, it is ensured that when the optical module is inserted and the target port mode is different from the current port mode, the port mode of the Ethernet device can be flexibly switched.
[0023] In an optional embodiment, according to the port switching mode set corresponding to the PON type, switching the port from the Ethernet mode to the PON mode includes:
[0024] Disable the auto-negotiation capability of the port and switch the communication state of the port to the forced connection state. The forced connection state indicates that the port has the ability to actively send messages.
[0025] Enable the port to send Multipoint Control Protocol (MPCP) messages to the central processing unit (CPU).
[0026] Through the above embodiment, once the Ethernet device detects that the inserted optical module is a PON type optical module and the current port mode of the Ethernet device is the Ethernet mode, the port mode of the port can be quickly switched from the Ethernet mode to the PON mode.
[0027] In an optional embodiment, after enabling the port to send the multi-point control protocol MPCP message to the central processing unit CPU, the method further includes:
[0028] Enable the MPCP message sending capability of the port and send access detection requests to the converged network; the converged network has PON service capabilities and Ethernet network service capabilities;
[0029] Receiving access registration responses returned by multiple network devices to be accessed based on access detection requests respectively;
[0030] If, among the multiple access registration responses, there is an access registration response indicating that access to the converged network is required, access registration of the converged network is performed for the network device to be accessed corresponding to the access registration response.
[0031] Through the above embodiment, after the MPCP message sending capability of the port is enabled, by actively sending access detection requests of the converged network to multiple network devices to be accessed, the access registration efficiency of the network devices to be accessed that need to access the converged network can be greatly improved.
[0032] In an optional embodiment, according to the port switching mode set corresponding to the Ethernet network type, switching the port from the PON mode to the Ethernet network mode includes:
[0033] Disable the MPCP message receiving capability of the port;
[0034] Disable the MPCP message sending capability of the port;
[0035] Switch the communication state of the port from the forced connection state to the disconnected state.
[0036] Through the above embodiment, once the Ethernet device detects that the inserted optical module is an Ethernet type optical module and the current port mode of the Ethernet device is PON mode, the port mode of the port can be quickly switched from PON mode to Ethernet mode.
[0037] In an optional embodiment, when the MPCP message receiving capability of the port is disabled, the method further includes:
[0038] Disable the port's ability to upload MPCP packets to the CPU.
[0039] Through the above embodiment, while closing the MPCP message receiving capability of the port, the port's ability to upload MPCP messages to the CPU is also closed. This saves energy consumption caused by keeping the port's ability to upload MPCP messages to the CPU open to a certain extent.
[0040] In an optional embodiment, after the communication state of the port is switched from the forced connection state to the disconnected state, the method further includes:
[0041] The auto-negotiation capability of the port is enabled, and when it is determined that the port receives an auto-negotiation signal, the communication state of the port is switched from a disconnected state to a connected state; wherein the connected state indicates that the port has a message response capability but does not have an ability to actively send messages.
[0042] Through the above embodiment, by enabling the auto-negotiation capability of the port and switching the communication state of the port to the connection state, it can be ensured that the Ethernet network device and its port are in the Ethernet network working mode.
[0043] In a second aspect, the present application further provides a port mode switching device, which is applied to any Ethernet network device in an Ethernet network, and the device includes:
[0044] An information acquisition module, used for acquiring optical module information of the optical module in response to the operation of inserting the optical module into the port;
[0045] A type determination module, used for determining a module type of the optical module based on a plurality of optical module features included in the optical module information and the feature intervals to which the features belong;
[0046] The mode switching module is used to switch the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type when it is determined that the target port mode corresponding to the module type is different from the current port mode.
[0047] In an optional embodiment, if the following conditions are met, it is determined that the target port mode corresponding to the module type is different from the current port mode:
[0048] The target port mode is passive optical network (PON) mode, and the current port mode is Ethernet mode; or,
[0049] The target port mode is Ethernet mode, and the current port mode is PON mode.
[0050] In an optional embodiment, when the port is switched from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type, the mode switching module is specifically used to:
[0051] If the module type is PON type, the port is switched from Ethernet mode to PON mode according to the port switching mode set for the corresponding PON type;
[0052] If the module type is Ethernet type, the port is switched from PON mode to Ethernet mode according to the port switching mode set for the corresponding Ethernet type.
[0053] In an optional embodiment, when the port is switched from the Ethernet mode to the PON mode according to the port switching mode set for the corresponding PON type, the mode switching module is specifically used to:
[0054] Disable the auto-negotiation capability of the port and switch the communication state of the port to the forced connection state. The forced connection state indicates that the port has the ability to actively send messages.
[0055] Enable the port to send Multipoint Control Protocol (MPCP) messages to the central processing unit (CPU).
[0056] In an optional embodiment, after enabling the port to send the multi-point control protocol MPCP message to the central processing unit CPU, the mode switching module is further used to:
[0057] Enable the MPCP message sending capability of the port and send access detection requests to the converged network; the converged network has PON service capabilities and Ethernet network service capabilities;
[0058] Receiving access registration responses returned by multiple network devices to be accessed based on access detection requests respectively;
[0059] If, among the multiple access registration responses, there is an access registration response indicating that access to the converged network is required, access registration of the converged network is performed for the network device to be accessed corresponding to the access registration response.
[0060] In an optional embodiment, when the port is switched from the PON mode to the Ethernet mode according to the port switching mode set for the corresponding Ethernet type, the mode switching module is specifically used to:
[0061] Disable the MPCP message receiving capability of the port;
[0062] Disable the MPCP message sending capability of the port;
[0063] Switch the communication state of the port from the forced connection state to the disconnected state.
[0064] In an optional embodiment, when the MPCP message receiving capability of the port is disabled, the mode switching module is further used to:
[0065] Disable the port's ability to upload MPCP packets to the CPU.
[0066] In an optional embodiment, after the communication state of the port is switched from the forced connection state to the disconnection state, the mode switching module is further used to:
[0067] The auto-negotiation capability of the port is enabled, and when it is determined that the port receives an auto-negotiation signal, the communication state of the port is switched from a disconnected state to a connected state; wherein the connected state indicates that the port has a message response capability but does not have an ability to actively send messages.
[0068] In a third aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the port mode switching method described in the first aspect above.
[0069] In a fourth aspect, the present application provides a computer-readable storage medium, which includes a program code. When the program code is executed on an electronic device, the program code is used to enable the electronic device to execute the steps of the port mode switching method described in the first aspect above.
[0070] In a fifth aspect, the present application provides a computer program product, which, when called by a computer, enables the computer to execute the steps of the port mode switching method as described in the first aspect.
[0071] In a sixth aspect, the present application provides a communication system, including: an Ethernet network device and a first network device to be accessed;
[0072] An Ethernet network device, configured to obtain the optical module information of the optical module in response to the operation of inserting the optical module into the port, and determine the module type of the optical module based on the characteristic intervals to which the plurality of optical module characteristics contained in the optical module information belong respectively, and when it is determined that the target port mode corresponding to the module type is different from the current port mode, switch the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type, and send an access detection request of the converged network to the first network device to be accessed; wherein the converged network has PON service capability and Ethernet network service capability;
[0073] The first network device to be accessed is used to receive an access detection request and, when determining that the target port mode is a PON mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the first network device to be accessed needs to access a converged network.
[0074] In a seventh aspect, the present application provides a communication system, including: an Ethernet network device and a second network device to be accessed;
[0075] An Ethernet network device, configured to obtain the optical module information of the optical module in response to the operation of inserting the optical module into the port, and determine the module type of the optical module based on the characteristic intervals to which the plurality of optical module characteristics contained in the optical module information belong respectively, and when it is determined that the target port mode corresponding to the module type is different from the current port mode, switch the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type, and send an access detection request of the converged network to the second network device to be accessed; wherein the converged network has PON service capability and Ethernet network service capability;
[0076] The second network device to be accessed is used to receive the access detection request and, when determining that the target port mode is the Ethernet network mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the second network device to be accessed needs to access the converged network.
[0077] In an eighth aspect, the present application provides a communication system, including: an Ethernet network device and a third network device to be accessed;
[0078] An Ethernet network device, configured to obtain the optical module information of the optical module in response to the operation of inserting the optical module into the port, and determine the module type of the optical module based on the characteristic intervals to which the plurality of optical module characteristics contained in the optical module information belong respectively, and when it is determined that the target port mode corresponding to the module type is different from the current port mode, switch the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type, and send an access detection request of the converged network to the third network device to be accessed; wherein the converged network has PON service capability and Ethernet network service capability;
[0079] The third network device to be accessed is used to receive an access detection request, and when it is determined that the target port mode is the Ethernet network mode or the PON mode, and the target port mode is the same as the device port mode of the third network device to be accessed, return an access registration response to the Ethernet network device based on the access detection request; or, when it is determined that the target port mode is the Ethernet network mode or the PON mode, and the target port mode is different from the device port mode of the third network device to be accessed, switch the device port mode to the target port mode, and after switching the device port mode to the target port mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the third network device to be accessed needs to access the converged network.
[0080] The beneficial effects of this application are as follows:
[0081] In the port mode switching method provided in the present application, when it is determined that the target port mode corresponding to the module type of the inserted optical module is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type; in this way, the port mode of the Ethernet device can be flexibly and automatically switched among multiple port modes (such as PON mode and Ethernet mode), which solves the problem of needing to manage two different networking devices in the PON and Ethernet fusion solution, making the fusion network easier to maintain; and, due to the free switching of multiple port modes, in the fusion network of PON and Ethernet, only one network device port is used to meet the user's network needs for PON and Ethernet through the networking device, which further reduces the network complexity of the fusion network and the difficulty of maintenance and management of the fusion network.
[0082] In addition, other features and advantages of the present application will be described in the subsequent description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. 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 creative labor. In the drawings:
[0084] Figure 1 A schematic diagram of an optional system architecture applicable to the embodiments of the present application;
[0085] Figure 2 A schematic diagram of the structure of an Ethernet network provided in an embodiment of the present application;
[0086] Figure 3 A schematic diagram of the composition structure of a network device cluster to be connected provided in an embodiment of the present application;
[0087] Figure 4 A schematic diagram of an implementation flow of a port mode switching method provided in an embodiment of the present application;
[0088] Figure 5 A logical schematic diagram of a switching port mode provided in an embodiment of the present application;
[0089] Figure 6 A logical schematic diagram of access registration of a network device to be accessed provided in an embodiment of the present application;
[0090] Figure 7 A method based on the embodiment of the present application is provided Figure 4 Schematic diagram of the specific implementation process;
[0091] Figure 8 A schematic diagram of the structure of a port mode switching device provided in an embodiment of the present application;
[0092] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0093] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.
[0094] It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. A and B are connected, which can represent two situations: A and B are directly connected and A and B are connected through C. In addition, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0095] In addition, the collection, dissemination, and use of data in the technical solution of this application comply with the requirements of relevant national laws and regulations.
[0096] Some technical terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0097] (1) Multi-Point Control Protocol (MPCP): It is the protocol of the Media Access Control (MAC) sublayer in the Ethernet Passive Optical Network (EPON).
[0098] It should be noted that MPCP also defines a control mechanism between OLT and ONU to coordinate the effective sending and receiving of data / messages.
[0099] (2) EPON: It is a PON technology based on Ethernet. It adopts a point-to-multipoint structure and passive optical fiber transmission and can provide a variety of services on the Ethernet network.
[0100] Furthermore, based on the above-mentioned nouns and related terminology explanations, the design concept of the embodiments of the present application is briefly introduced below:
[0101] At present, PON is suitable for large-scale data transmission and multimedia applications because of its high-speed and high-bandwidth transmission capabilities and the ability to provide users with stable and reliable network connections. For example, PON has been widely used in many fields such as broadband access, campus networks, and urban broadband coverage.
[0102] Ethernet is widely used in daily life, especially in LAN (Local Area Network) environments, because it has mature standards and device ecosystems and is easy to deploy and maintain. For example, Ethernet is suitable for office networks, home networks, data centers, and many other scenarios.
[0103] Although PON technology supports point-to-multipoint connection, it saves port resources and optical module resources compared to Ethernet's point-to-point connection, simplifies the network architecture, and can replace active aggregation devices with passive splitters, reducing maintenance costs and power consumption.
[0104] However, the uplink of PON is time-division multiplexing shared bandwidth among multiple access nodes. Therefore, compared with the point-to-point Ethernet network, it has higher latency and smaller uplink bandwidth. It can be seen that PON and Ethernet have their own advantages and disadvantages in different usage scenarios.
[0105] Furthermore, based on the above advantages and disadvantages of PON and Ethernet, in order to meet the network requirements of different users under the same network, PON and Ethernet need to be integrated.
[0106] It should be noted that since PON and Ethernet are based on different network message encapsulation, when integrating these two networks, knowledge of both PON and Ethernet is required, which makes the deployment of such integrated network require additional learning costs.
[0107] In related technologies, PON and Ethernet network convergence deployment is generally divided into two types:
[0108] 1. Deploy PON as the backbone network, install OLT equipment in the central office or data center, and transmit signals to user terminals through optical fibers. Deploy Ethernet networks at user terminals to provide LAN connections and internal communications.
[0109] 2. Deploy Ethernet network as the backbone network. Ethernet switches and network equipment are deployed in the central office or data center. Then the OLT equipment is connected to the backbone network, so that the OLT equipment is connected to the ONU equipment at multiple points through the ODN.
[0110] However, no matter which of the above two deployment methods is used, there is a disadvantage that two different networking devices are required in the same network, which not only increases the complexity of the network, but also increases the difficulty of network maintenance and management. At the same time, if the network demand changes, such as the user's requirement for upstream bandwidth becomes larger or the requirement for network delay becomes higher, the shared upstream implementation method of PON is no longer applicable, which will result in the deployed PON equipment being replaced by Ethernet network equipment, becoming an invalid investment.
[0111] Moreover, the current port switching solutions of PON devices are all focused on switching between different PON interfaces. The port switching of Ethernet devices also only has the switching between different rate capabilities of ports such as 1G / 10G. However, there is no solution that can realize switching between different types of network device ports (Ethernet device ports and PON device ports) under the same network device port (e.g., Ethernet device port).
[0112] In view of this, if there is a networking device port that can work in both Ethernet mode and PON mode, and can automatically switch between these two port (working) modes, this will not only solve the problem of needing to manage two different networking devices in the PON and Ethernet network fusion solution, making the network easier to maintain; it will also make network deployment more flexible due to the free switching between the two modes, and the investment in networking equipment more scalable and flexible, that is, more effectively protecting the investment in networking equipment.
[0113] Therefore, in an embodiment of the present application, a port mode switching method is proposed, which is applied to any Ethernet network device in Ethernet networking, and specifically includes: in response to the operation of inserting an optical module into a port, obtaining optical module information of the optical module; then, based on the characteristic intervals to which the multiple optical module features contained in the optical module information belong, determining the module type of the optical module; finally, when it is determined that the target port mode corresponding to the module type is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type, so that in a fusion network of PON and Ethernet, only one network device port is used to meet the user's network needs for PON and Ethernet through the networking device.
[0114] It should be noted that, in the embodiment of the present application, the target port mode is characterized by the PON mode: the operating state of the port of the Ethernet device in the PON mode; similarly, the target port mode is characterized by the Ethernet mode: the operating state of the port of the Ethernet device in the Ethernet mode.
[0115] Exemplarily, the operating states of the ports of an Ethernet network device in PON mode include but are not limited to: the port does not have the ability to self-negotiate, the communication state of the port is a forced connection state, the port has the ability to receive and send MPCP messages to the central processing unit (CPU), and the port has the ability to send MPCP messages; the operating states of the ports of an Ethernet network device in Ethernet mode include but are not limited to: the port has the ability to self-negotiate, the communication state of the port is a disconnected state or a connected state, the port does not have the ability to receive and send MPCP messages to the CPU, and the port does not have the ability to send MPCP messages; among them, the forced connection state indicates that the port has the ability to respond to messages and has the ability to actively send messages, and the connection state indicates that the port has the ability to respond to messages and does not have the ability to actively send messages.
[0116] In particular, the preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application, and the embodiments of the present application and the features in the embodiments may be combined with each other if there is no conflict.
[0117] See also Figure 1 As shown, it is a schematic diagram of an optional system architecture applicable to the embodiment of the present application, and the system includes: an Ethernet network device group 101 and a network device cluster to be connected 102. The Ethernet network group 101 and the network device cluster to be connected 102 can exchange information through a communication network, wherein the communication mode adopted by the communication network may include: a wireless communication mode and a wired communication mode.
[0118] Exemplarily, the Ethernet network 101 can access the network through cellular mobile communication technology and communicate with the network device cluster 102 to be accessed, wherein the cellular mobile communication technology, for example, includes the fifth generation mobile communication (English: 5th Generation Mobile Networks, abbreviated: 5G) technology.
[0119] Optionally, the Ethernet network 101 can access the network through short-range wireless communication to communicate with the network device cluster 102 to be accessed, wherein the short-range wireless communication method, for example, includes Wireless Fidelity (English: Wireless Fidelity, abbreviated: Wi-Fi) technology.
[0120] The embodiment of the present application does not impose any restriction on the number of communication devices involved in the above system architecture. For example, there may be more network device clusters 102 to be connected, or there may be no network device clusters 102 to be connected, or other network devices may be included, such as Figure 1As shown, only the Ethernet network 101 and the to-be-accessed network device cluster 102 are taken as examples for description, and the above-mentioned various devices and their respective functions are briefly introduced below.
[0121] In the Ethernet network 101, each Ethernet network device can provide users with network service capabilities corresponding to the converged network; in particular, in the embodiment of the present application, the converged network is obtained by merging PON and Ethernet, so the converged network has PON service capabilities and Ethernet service capabilities.
[0122] Among them, PON is a communication network architecture that uses optical fiber transmission technology. It uses optical fiber as a transmission medium to transmit optical signals to users, which can achieve high-speed data transmission and broadband access. It is mainly composed of three parts: OLT, ODN and ONU. The functions are as follows:
[0123] OLT is the core device of PON, which is used for sending and receiving optical signals, converting data into optical signals and transmitting them to the user end through optical fiber; ODN is used to transmit optical signals from OLT to the user end, usually adopting a tree or star topology, and transmitting signals to different user ends through optical fiber branches; ONU is the device at the user end, which is used to receive optical signals and convert them into electrical signals, and provide network connection to user devices such as computers, phones, routers, etc.
[0124] In addition, the characteristics and working principles of PON are as follows: 1. Fiber sharing: multiple users can transmit through the same optical fiber, that is, point-to-multipoint transmission technology, and the downlink data is physically split in the passive optical splitter and transmitted to the access terminal at the same time. The uplink data uses time division multiplexing technology to separate the signals of different users in a time-slicing manner and share the uplink link bandwidth; 2. Passive fiber distribution: The fiber distribution in PON is passive, a purely physical splitting technology that does not require additional power or signal processing equipment. This allows the network at the aggregation layer to be replaced by a passive optical splitter, reducing the power consumption and maintenance cost of the intermediate link transmission; 3. Long-distance transmission: PON uses optical fiber as the transmission medium, which can achieve long-distance transmission, generally covering a range of tens of kilometers.
[0125] Ethernet is a common communication protocol and packet-switching-based network technology, which is widely used in LANs to achieve transmission / interaction of related data.
[0126] In addition, the characteristics and working principles of Ethernet are as follows: 1. Physical medium: Ethernet can use different physical media for data transmission, including but not limited to: copper cables (such as twisted pair) and optical fibers. In particular, the transmission rates of common Ethernet networks include: 10Mbps, 100Mbps, 1Gbps and 10Gbps, etc.; 2. Carrier Sense Multiple Access with Collision Detection (English: Carrier Sense Multiple Access with Collision Detection) Detection, abbreviation: CSMA / CD) protocol: Ethernet uses CSMA / CD protocol to control data transmission, allowing multiple devices to share the same physical medium and detect whether the channel is idle before sending data to avoid conflicts; 3. Frame structure: Ethernet uses Ethernet frame (English: EthernetFrame) as the basic unit of data transmission, where the Ethernet frame includes: target MAC address, source MAC address, data part and checksum and other fields, which are used to identify and transmit data in the network; 4. MAC address: Each device connected to the Ethernet network has a unique MAC address, which is used to identify the device in the network; 5. Network topology: Ethernet supports multiple topologies, including but not limited to: bus, star, ring, and for example, Ethernet switches are widely used to build LANs with star topology.
[0127] In addition, see Figure 2 As shown, each Ethernet network device (101a, 101b, ..., 101n) in the Ethernet network 101 can be used to respond to the operation of inserting an optical module into the port, obtain the optical module information of the optical module, and then determine the module type of the optical module based on the multiple optical module features contained in the optical module information and the feature intervals to which they belong. When it is determined that the target port mode corresponding to the module type is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type, thereby providing a network service capability (PON service capability or Ethernet network service capability) that matches the module type of its optical module.
[0128] It should be noted that if Figure 2 As shown, the optical module is one of the core accessories of network communication and can be inserted into any Ethernet device of the Ethernet network 101. Its main function is the photoelectric conversion of signals, that is, the sending end converts the electrical signal into an optical signal, and after transmitting through the optical fiber, the receiving end converts the optical signal into an electrical signal; therefore, to put it simply, an optical module will be used wherever an optical fiber is used; in addition, in the embodiment of the present application, the optical module can be a PON optical module or an Ethernet optical module.
[0129] The network device cluster 102 to be connected includes: a plurality of network devices to be connected (102a, 102b, ..., 102m), see Figure 3 As shown, in an embodiment of the present application, each network device to be accessed can be used to receive an access detection request for the converged network sent by the corresponding Ethernet network device, and return an access registration response based on the access detection request, wherein the access registration response indicates whether the corresponding network device to be accessed needs to access the converged network, that is, whether it is necessary to perform access registration for the converged network for the corresponding network device to be accessed.
[0130] Exemplarily, the above-mentioned network device to be accessed may specifically be: a user terminal device of a single network mode (such as a PON mode or an Ethernet mode), or a user terminal device of a dual mode (such as a PON mode and an Ethernet mode), and of course, a user terminal device of more modes; therefore, the user terminal device of the above-mentioned single network mode may be: an ONU device in a PON mode; wherein, since PON includes an ONU, the ONU device may also be referred to as a PON device.
[0131] Among them, when the network device to be accessed determines that the target port mode is the same as its own device port mode, there is no need to switch the port mode of its own port, that is, it only needs to maintain its own device port mode; on the contrary, when it is determined that the target port mode is different from its own device port mode, it is necessary to switch its own port mode to the target port mode, that is, switch the device port mode to the target port mode.
[0132] The following describes the port mode switching method provided by the exemplary embodiment of the present application in combination with the above-mentioned system architecture and with reference to the accompanying drawings. It should be noted that the above-mentioned system architecture is only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this regard.
[0133] See also Figure 4 As shown, it is a schematic diagram of an implementation process of a port mode switching method provided in an embodiment of the present application. The execution subject takes any Ethernet network device on the central end side in the Ethernet network as an example, for example, the first Ethernet network device is used as the execution subject. The specific implementation process of the method is as follows:
[0134] S401: In response to the operation of inserting an optical module into a port, obtaining optical module information of the optical module.
[0135] Exemplarily, when executing step S401, the first Ethernet network device detects the optical module insertion event according to the set optical module insertion detection period (e.g., 2 seconds / time). When it is detected that an optical module is inserted into the (network) port of the first Ethernet network device, it triggers the acquisition of the optical module information of the optical module, that is, in response to the optical module insertion port operation, the optical module information is acquired.
[0136] It should be noted that the first Ethernet network device can obtain the optical module information by using data acquisition devices such as sensors that are respectively set according to the multiple optical module characteristics included in the corresponding optical module information.
[0137] S402: Determine the module type of the optical module based on the multiple optical module features included in the optical module information and the feature intervals to which the features belong.
[0138] The above-mentioned multiple optical module characteristics include but are not limited to: wavelength characteristics and / or interface characteristics.
[0139] Exemplarily, when executing step S402, assuming that the optical module characteristics contained in the optical module information are wavelength characteristics and interface characteristics, the first Ethernet network device can determine the wavelength characteristic interval to which the wavelength characteristic belongs, and the interface characteristic interval to which the interface characteristic belongs, thereby determining the wavelength type and interface type corresponding to the optical module based on the obtained wavelength characteristic interval and interface characteristic interval, and then determining the module type of the optical module.
[0140] Further, the first Ethernet network device may determine the wavelength type and interface type corresponding to the optical module according to the wavelength characteristic interval to which the wavelength characteristic belongs and the interface characteristic interval to which the interface characteristic belongs, thereby determining that the module type of the optical module is a PON type or an Ethernet network type. For example, the correspondence between the wavelength characteristic interval and the interface characteristic interval and the PON type and the Ethernet network type is shown in Table 1:
[0141] Table 1
[0142] Wavelength characteristic range Interface feature range Optical module type Wave.Cha.Int.1 In.Cha.Int.1 PON Type Wave.Cha.Int.2 In.Cha.Int.2 Ethernet network type
[0143] Optionally, the first Ethernet network device may directly determine the wavelength type corresponding to the optical module according to the obtained wavelength characteristics, and determine the interface type corresponding to the optical module according to the obtained interface characteristics, thereby determining the module type of the optical module according to the wavelength type and interface type corresponding to the optical module. For example, the correspondence between the wavelength type and the interface type and the PON type and the Ethernet type is shown in Table 2:
[0144] Table 2
[0145] Wavelength Type Interface Type Optical module type Wave.Type.1 In.Type.1 PON Type Wave.Type.2 In.Type.2 Ethernet network type
[0146] In this way, the first Ethernet network identification reads the optical module information to identify the wavelength type and interface type corresponding to the optical module, and can distinguish whether the optical module is a PON optical module or an Ethernet optical module, so as to subsequently switch the (network) port working mode according to the module type of the optical module.
[0147] S403: When it is determined that the target port mode corresponding to the module type is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type.
[0148] Specifically, when executing step S403, after determining the module type of the optical module, the first Ethernet network device can determine whether the target port mode corresponding to the module type is consistent with the current port mode of the first Ethernet network device / port.
[0149] In an optional implementation, if the following conditions are met, it can be determined that the target port mode corresponding to the module type is different from the current port mode: the target port mode is the PON mode, and the current port mode is the Ethernet mode; or, the target port mode is the Ethernet mode, and the current port mode is the PON mode; in this way, when the first Ethernet network device determines that the target port mode corresponding to the module type is different from the current port mode, it can trigger the port mode switching operation of the port, that is, switch the port from the current port mode to the target port mode, thereby providing network service capabilities corresponding to the target port mode.
[0150] It should be noted that, since the execution subject is the first Ethernet network device, the current port mode is usually the Ethernet network mode, that is, the port of the first Ethernet network device defaults to the Ethernet network mode.
[0151] Furthermore, when the first Ethernet network device determines that the target port mode corresponding to the module type is different from the current port mode, it can switch the port from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type.
[0152] For example, assuming that the module type of the optical module is a PON type or an Ethernet type, refer to Figure 5 As shown, if the module type is a PON type, the port is switched from the Ethernet mode to the PON mode according to the port switching mode set for the corresponding PON type; if the module type is an Ethernet type, the port is switched from the PON mode to the Ethernet mode according to the port switching mode set for the corresponding Ethernet type; in this way, according to the port switching modes set for the corresponding PON optical module and the Ethernet optical module, respectively, it is ensured that when the optical module is inserted and the target port mode is different from the current port mode, the port mode of the first Ethernet device can be flexibly switched.
[0153] In an optional implementation, the first Ethernet device switches the port mode of the port from the Ethernet mode to the PON mode according to the port switching mode set for the corresponding PON type, and needs to perform the following operations:
[0154] 1. Disable the auto-negotiation capability of the port and switch the communication state of the port to the forced connection state, that is, the Forcelink up state.
[0155] Among them, the mandatory connection state indicates that the port has the ability to respond to messages and has the ability to actively send messages.
[0156] Exemplarily, the content of the automatic negotiation mainly includes: (half) duplex mode, operating rate, flow control, and once the automatic negotiation is passed, the devices at both ends of the link will be locked in this operating mode.
[0157] 2. Enable the port to send MPCP packets to the CPU.
[0158] It should be noted that since the converged network is a network with PON service capabilities and Ethernet service capabilities, MPCP must be used when the port is switched from Ethernet mode to PON mode; and since the switching of the port mode belongs to the data processing of the control plane, the MPCP message related to the port mode switching needs to be set to be sent to the CPU.
[0159] Exemplarily, the first Ethernet network device may receive message information sent by other Ethernet network devices in the Ethernet network using MPCP, and send the received message information to the CPU of the first Ethernet network device itself to achieve interaction between MPCP messages.
[0160] 3. Enable the MPCP message sending capability of the port and refer to Figure 6 As shown, an access detection request for the converged network can also be sent, thereby receiving access registration responses returned by multiple network devices to be accessed based on the access detection request. If, among the multiple access registration responses, there is an access registration response that indicates the need to access the converged network, access registration of the converged network is performed for the network device to be accessed corresponding to the access registration response. It should be noted that the access registration response may be a need for access registration of the corresponding network device to be accessed to the converged network, or it may be a need not for access registration of the corresponding network device to be accessed to the converged network.
[0161] Obviously, based on the above method, once the first Ethernet network device detects that the inserted optical module is a PON type optical module and the current port mode of the first Ethernet network device is Ethernet mode, the port mode of the port can be quickly switched from Ethernet mode to PON mode.
[0162] In an optional implementation, the first Ethernet network device switches the port mode of the port from the PON mode to the Ethernet mode according to the port switching mode set for the corresponding Ethernet network type, and needs to perform the following operations:
[0163] 1. Disable the MPCP message receiving capability of the port.
[0164] Specifically, after the port mode of the port is switched from the PON mode to the Ethernet mode, the first Ethernet device no longer has the ability to receive the MPCP message.
[0165] In an optional implementation, when the first Ethernet network device turns off the MPCP message receiving capability of the port, it also turns off the port's ability to upload MPCP messages to the CPU; in this way, the energy consumption caused by keeping the port's ability to upload MPCP messages to the CPU open is saved to a certain extent.
[0166] It should be noted that the first Ethernet network device can close the port's ability to upload MPCP messages to the CPU after uploading all the unuploaded MPCP messages, or it can directly close the port's ability to upload MPCP messages to the CPU, that is, it will not upload the unuploaded MPCP messages.
[0167] 2. Disable the MPCP message sending capability of the port.
[0168] Disabling the MPCP message sending capability of a port means disabling MPCP, that is, not supporting MPCP.
[0169] 3. Switch the communication status of the port from the forced connection state to the disconnected state, that is, the Link down state.
[0170] 4. Enable the auto-negotiation capability of the port, and when it is determined that the port receives the auto-negotiation signal, switch the communication state of the port from the disconnected state to the connected state, that is, the Link up state.
[0171] The connection status indicates that the port has the ability to respond to messages but does not have the ability to actively send messages, that is, it needs to receive a signal before it can send a message / signal.
[0172] It should be noted that the port receiving the auto-negotiation signal indicates that the port is in a normal auto-negotiation state.
[0173] Similarly, based on the above method, once the first Ethernet device detects that the inserted optical module is an Ethernet type optical module and the current port mode of the first Ethernet device is PON mode, it can quickly switch the port mode of the port from PON mode to Ethernet mode.
[0174] Based on the port mode switching method described in the above steps S401 to S103, assuming that the network device to be connected is an ONU device, refer to Figure 7 As shown, the first Ethernet network device can execute the following specific method flow:
[0175] S701: Detect an optical module insertion event.
[0176] Specifically, when executing step S701, the first Ethernet network device triggers the acquisition of the optical module information when detecting that an optical module is inserted into the port.
[0177] S702: Read optical module information.
[0178] Specifically, when executing step S702, the first Ethernet network device distinguishes whether the optical module is a PON module or an Ethernet optical module by identifying the wavelength type and the interface type of the optical module.
[0179] Furthermore, if it is determined that the optical module is a PON optical module, the process proceeds to step S703a, and the method flow of switching the port corresponding to steps S704a to S707a from the Ethernet mode to the PON mode is executed.
[0180] If it is determined that the optical module is a PON optical module, the process proceeds to step S703b, and executes the method flow of switching the port corresponding to steps S704b to S707b from the PON mode to the Ethernet mode.
[0181] It should be noted that the port mode of the first Ethernet network device is the Ethernet mode by default.
[0182] S703a: Determine that the optical module is a PON optical module.
[0183] Therefore, assuming that the current port mode is the default mode, that is, the Ethernet mode, when the port is switched from the Ethernet mode to the PON mode, the steps S704a to S707a to be performed are as follows:
[0184] S704a: Disable the auto-negotiation capability of the port.
[0185] S705a: Change the port to Force link up state.
[0186] It should be noted that after the port communication state of the first Ethernet network device is converted to the Force link up state, the first Ethernet network device can actively send packets, that is, it has the ability to actively send messages / signals.
[0187] S706a: Set the received MPCP message to be sent to the CPU for processing.
[0188] In this way, the interaction between MPCP messages related to the switching of the port mode can be achieved.
[0189] S707a: Start the MPCP message to implement the access registration of the ONU device.
[0190] S703b: Determine that the optical module is an Ethernet optical module.
[0191] Furthermore, assuming that the current port mode is the PON mode, when the port is switched from the PON mode to the Ethernet mode, steps S704b to S707b to be performed are specifically as follows:
[0192] S704b: Disable the ability to receive MPCP messages and send them to the CPU.
[0193] In this way, the port's ability to send received MPCP messages to the CPU for processing is disabled, and MPCP messages are no longer received.
[0194] S705b: Disable the ability to send MPCP messages.
[0195] It should be noted that, by executing step S705b, the first Ethernet network device no longer actively sends MPCP messages to perform access registration detection of the ONU device.
[0196] S706b: Disable the Force link up state of the port.
[0197] At this time, the port is in Link down state and cannot actively send messages.
[0198] S707b: Enable the auto-negotiation capability.
[0199] It should be noted that, by executing step S706b, the port can enter the signal detection state, and only after receiving a normal auto-negotiation signal can the communication state of the port be switched to the Link up state and messages can be sent and received.
[0200] Based on the above method steps, the ports of all Ethernet network devices in the Ethernet network can be flexibly switched between PON mode and Ethernet network mode based on the inserted optical module, thereby realizing the integration of PON network and Ethernet network on the same device, reducing the difficulty and workload of management and maintenance, improving the flexibility of equipment use, and protecting the investment in networking equipment.
[0201] In summary, in the port mode switching method provided in the present application, when it is determined that the target port mode corresponding to the module type of the inserted optical module is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching method set for the corresponding module type; in this way, the port mode of the Ethernet network device can be flexibly and automatically switched among multiple port modes (such as PON mode and Ethernet network mode), which solves the problem of needing to manage two different networking devices in the PON and Ethernet network fusion solution, making the fused network easier to maintain; and, due to the free switching of multiple port modes, in the fused network of PON and Ethernet, only one network device port is used to meet the user's network needs for PON and Ethernet through the networking device, which further reduces the network complexity of the fused network and the difficulty of maintenance and management of the fused network.
[0202] In addition, this approach also allows the port of a networking device to switch freely / automatically between the two port modes, providing a simpler and easier-to-use networking method for the integration of PON and Ethernet networks, making network deployment more flexible and the investment in networking equipment more scalable and flexible, which more effectively protects the investment in networking equipment.
[0203] Further, based on the same technical concept, the embodiment of the present application provides a port mode switching device, which is applied to any Ethernet network device in an Ethernet network. The port mode switching device is used to implement the above method flow of the embodiment of the present application. Figure 8 As shown, the port mode switching device includes: an information acquisition module 801, a type determination module 802 and a mode switching module 803, wherein:
[0204] The information acquisition module 801 is used to acquire the optical module information of the optical module in response to the operation of inserting the optical module into the port;
[0205] A type determination module 802, configured to determine a module type of the optical module based on a plurality of optical module features included in the optical module information and the feature intervals to which the features belong;
[0206] The mode switching module 803 is used to switch the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type when it is determined that the target port mode corresponding to the module type is different from the current port mode.
[0207] In an optional embodiment, if the following conditions are met, it is determined that the target port mode corresponding to the module type is different from the current port mode:
[0208] The target port mode is passive optical network (PON) mode, and the current port mode is Ethernet mode; or,
[0209] The target port mode is Ethernet mode, and the current port mode is PON mode.
[0210] In an optional embodiment, when the port is switched from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type, the mode switching module 803 is specifically used to:
[0211] If the module type is PON type, the port is switched from Ethernet mode to PON mode according to the port switching mode set for the corresponding PON type;
[0212] If the module type is Ethernet type, the port is switched from PON mode to Ethernet mode according to the port switching mode set for the corresponding Ethernet type.
[0213] In an optional embodiment, when the port is switched from the Ethernet mode to the PON mode according to the port switching mode set for the corresponding PON type, the mode switching module 803 is specifically used to:
[0214] Disable the auto-negotiation capability of the port and switch the communication state of the port to the forced connection state. The forced connection state indicates that the port has the ability to actively send messages.
[0215] Enable the port to send Multipoint Control Protocol (MPCP) messages to the central processing unit (CPU).
[0216] In an optional embodiment, after enabling the port to send the multi-point control protocol MPCP message to the central processing unit CPU, the mode switching module 803 is further used to:
[0217] Enable the MPCP message sending capability of the port and send access detection requests to the converged network; the converged network has PON service capabilities and Ethernet network service capabilities;
[0218] Receiving access registration responses returned by multiple network devices to be accessed based on access detection requests respectively;
[0219] If, among the multiple access registration responses, there is an access registration response indicating that access to the converged network is required, access registration of the converged network is performed for the network device to be accessed corresponding to the access registration response.
[0220] In an optional embodiment, when the port is switched from the PON mode to the Ethernet mode according to the port switching mode set for the corresponding Ethernet type, the mode switching module 803 is specifically used to:
[0221] Disable the MPCP message receiving capability of the port;
[0222] Disable the MPCP message sending capability of the port;
[0223] Switch the communication state of the port from the forced connection state to the disconnected state.
[0224] In an optional embodiment, when the MPCP message receiving capability of the port is disabled, the mode switching module 803 is further configured to:
[0225] Disable the port's ability to upload MPCP packets to the CPU.
[0226] In an optional embodiment, after the communication state of the port is switched from the forced connection state to the disconnection state, the mode switching module 803 is further used to:
[0227] The auto-negotiation capability of the port is enabled, and when it is determined that the port receives an auto-negotiation signal, the communication state of the port is switched from a disconnected state to a connected state; wherein the connected state indicates that the port has a message response capability but does not have an ability to actively send messages.
[0228] Based on the same technical concept, the embodiment of the present application also provides an electronic device, which can implement the port mode switching method provided in the above embodiment of the present application. In one embodiment, the electronic device can be a server, or a terminal device or other electronic device. Fig. 9 As shown, the electronic device may include:
[0229] At least one processor 901, and a memory 902 connected to the at least one processor 901. The specific connection medium between the processor 901 and the memory 902 is not limited in the embodiment of the present application. Fig. 9 In the example, the processor 901 and the memory 902 are connected via a bus 900. Fig. 9 The bus 900 is represented by a bold line, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 900 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 901 can also be called a controller, and there is no limitation on the name.
[0230] In the embodiment of the present application, the memory 902 stores instructions that can be executed by at least one processor 901. The at least one processor 901 can execute a port mode switching method discussed above by executing the instructions stored in the memory 902. The processor 901 can implement Figure 8The functions of each module in the device shown.
[0231] Among them, processor 901 is the control center of the device, and can use various interfaces and lines to connect various parts of the entire control device. By running or executing instructions stored in memory 902 and calling data stored in memory 902, various functions of the device and processing data, the device can be monitored as a whole.
[0232] In one possible design, the processor 901 may include one or more processing units, and the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 901. In some embodiments, the processor 901 and the memory 902 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0233] The processor 901 may be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of a port mode switching method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0234] The memory 902 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 902 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, abbreviated: RAM), a static random access memory (English: Static Random Access Memory, abbreviated: SRAM), a programmable read-only memory (English: Programmable Read Only Memory, abbreviated: PROM), a read-only memory (English: Read Only Memory, abbreviated: ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, abbreviated: EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 902 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 902 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0235] By programming the processor 901, the code corresponding to the port mode switching method described in the above embodiment can be fixed into the chip, so that the chip can execute the switching method when running. Figure 4 The steps of a port mode switching method of the embodiment shown are as follows: How to design and program the processor 901 is a technology well known to those skilled in the art and will not be described in detail here.
[0236] Based on the same inventive concept, an embodiment of the present application further provides a communication system, including: an Ethernet network device and a first network device to be accessed;
[0237] An Ethernet network device, configured to obtain the optical module information of the optical module in response to the operation of inserting the optical module into the port, and determine the module type of the optical module based on the characteristic intervals to which the plurality of optical module characteristics contained in the optical module information belong respectively, and when it is determined that the target port mode corresponding to the module type is different from the current port mode, switch the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type, and send an access detection request of the converged network to the first network device to be accessed; wherein the converged network has PON service capability and Ethernet network service capability;
[0238] The first network device to be accessed is used to receive an access detection request and, when determining that the target port mode is a PON mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the first network device to be accessed needs to access a converged network.
[0239] Based on the same inventive concept, an embodiment of the present application further provides a communication system, including: an Ethernet network device and a second network device to be accessed;
[0240] An Ethernet network device, configured to obtain the optical module information of the optical module in response to the operation of inserting the optical module into the port, and determine the module type of the optical module based on the characteristic intervals to which the plurality of optical module characteristics contained in the optical module information belong respectively, and when it is determined that the target port mode corresponding to the module type is different from the current port mode, switch the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type, and send an access detection request of the converged network to the second network device to be accessed; wherein the converged network has PON service capability and Ethernet network service capability;
[0241] The second network device to be accessed is used to receive the access detection request and, when determining that the target port mode is the Ethernet network mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the second network device to be accessed needs to access the converged network.
[0242] Based on the same inventive concept, an embodiment of the present application further provides a communication system, including: an Ethernet network device and a third network device to be accessed;
[0243] An Ethernet network device, configured to obtain the optical module information of the optical module in response to the operation of inserting the optical module into the port, and determine the module type of the optical module based on the characteristic intervals to which the plurality of optical module characteristics contained in the optical module information belong respectively, and when it is determined that the target port mode corresponding to the module type is different from the current port mode, switch the port from the current port mode to the target port mode according to the port mode switching mode set for the corresponding module type, and send an access detection request of the converged network to the third network device to be accessed; wherein the converged network has PON service capability and Ethernet network service capability;
[0244] The third network device to be accessed is used to receive an access detection request, and when it is determined that the target port mode is the Ethernet network mode or the PON mode, and the target port mode is the same as the device port mode of the third network device to be accessed, return an access registration response to the Ethernet network device based on the access detection request; or, when it is determined that the target port mode is the Ethernet network mode or the PON mode, and the target port mode is different from the device port mode of the third network device to be accessed, switch the device port mode to the target port mode, and after switching the device port mode to the target port mode, return an access registration response to the Ethernet network device based on the access detection request; wherein the access registration response indicates whether the third network device to be accessed needs to access the converged network.
[0245] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes a port mode switching method discussed above.
[0246] In some possible implementations, the present application also provides various aspects of a port mode switching method, which can also be implemented in the form of a program product, which includes a program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of a port mode switching method according to various exemplary implementations of the present application described above in this specification.
[0247] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0248] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0249] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0250] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a server, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0251] Program code for performing the operations of the present application may be written using any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0252] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0253] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for switching a port mode, It is characterized in that Any Ethernet device used in Ethernet networking, including: In response to the operation of inserting the optical module into the port, acquiring optical module information of the optical module; Determine the module type of the optical module based on the multiple optical module features included in the optical module information and the feature intervals to which the features belong respectively; When it is determined that the target port mode corresponding to the module type is different from the current port mode, the port is switched from the current port mode to the target port mode according to the port mode switching mode set corresponding to the module type.
2. The method according to claim 1, It is characterized in that If the following conditions are met, it is determined that the target port mode corresponding to the module type is different from the current port mode: The target port mode is a passive optical network (PON) mode, and the current port mode is an Ethernet mode; or, The target port mode is the Ethernet mode, and the current port mode is the PON mode.
3. The method according to claim 1, It is characterized in that The step of switching the port from the current port mode to the target port mode according to the port mode switching mode set corresponding to the module type includes: If the module type is a PON type, switching the port from an Ethernet mode to a PON mode according to a port switching mode set corresponding to the PON type; If the module type is an Ethernet type, the port is switched from a PON mode to an Ethernet mode according to a port switching mode set corresponding to the Ethernet type.
4. The method according to claim 3, It is characterized in that The step of switching the port from the Ethernet mode to the PON mode according to the port switching mode set corresponding to the PON type includes: Disable the auto-negotiation capability of the port, and switch the communication state of the port to a forced connection state; wherein the forced connection state indicates that the port has the ability to actively send messages; Enable the port to send multi-point control protocol MPCP messages to the central processing unit CPU.
5. The method according to claim 4, It is characterized in that After enabling the capability of the port to send the multi-point control protocol MPCP message to the central processing unit CPU, the method further includes: Enabling the MPCP message sending capability of the port and sending an access detection request of the converged network; wherein the converged network has PON service capability and Ethernet network service capability; Receiving access registration responses returned by multiple network devices to be accessed based on the access detection requests respectively; If, among the multiple access registration responses, there is an access registration response indicating a need to access the converged network, access registration of the converged network is performed on the network device to be accessed corresponding to the access registration response.
6. The method according to claim 3, It is characterized in that The step of switching the port from the PON mode to the Ethernet mode according to the port switching mode set corresponding to the Ethernet type includes: Disable the MPCP message receiving capability of the port; Disable the MPCP message sending capability of the port; The communication state of the port is switched from a forced connection state to a disconnected state.
7. The method according to claim 6, It is characterized in that The shutting down of the MPCP message receiving capability of the port further includes: Disable the port's ability to upload MPCP messages to the CPU.
8. The method according to claim 6, It is characterized in that After the communication state of the port is switched from the forced connection state to the disconnected state, the method further includes: The auto-negotiation capability of the port is enabled, and when it is determined that the port receives an auto-negotiation signal, the communication state of the port is switched from a disconnected state to a connected state; wherein the connected state indicates that the port has a message response capability but does not have an ability to actively send messages.
9. A port mode switching device, It is characterized in that Any Ethernet device used in Ethernet networking, including: An information acquisition module, used for acquiring optical module information of the optical module in response to an operation of inserting the optical module into the port; A type determination module, used to determine the module type of the optical module based on the characteristic intervals to which the plurality of optical module characteristics included in the optical module information belong; The mode switching module is used to switch the port from the current port mode to the target port mode according to the port mode switching mode set corresponding to the module type when it is determined that the target port mode corresponding to the module type is different from the current port mode.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.