A device port configuration method, system, storage medium and electronic device
By adding an intermediate management module to SPN and IPRAN devices, the interoperability problem between devices is solved, and the operation and maintenance and configuration costs are reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
- Filing Date
- 2024-08-12
- Publication Date
- 2026-05-15
AI Technical Summary
During communication between SPN and IPRAN devices, they cannot communicate directly due to different port modes. Existing technologies require manual configuration and port mode switching, resulting in high operation and maintenance costs and high configuration complexity.
An intermediate management module is added between the control plane and the forwarding plane of the device to automatically switch the port working mode. The intermediate management module performs data format conversion and service configuration storage, thereby realizing adaptive switching of port mode.
It improves the convenience of equipment maintenance and configuration, and reduces operation and maintenance and configuration costs.
Smart Images

Figure CN119071146B_ABST
Abstract
Description
Technical Field
[0001] This disclosure belongs to the field of communication technology, and in particular relates to a device port configuration method, system, storage medium and electronic device. Background Technology
[0002] During communication between SPN (Slicing Packet Network) devices and IPRAN (Internet Protocol Radio Access Network) devices, SPN device ports default to FlexE (Flexible Ethernet) mode, while IPRAN device ports default to ETH (Ethernet) mode. When FlexE mode ports and ETH mode ports are connected, they cannot communicate with each other because FlexE mode requires the addition of a Shim layer at the Physical Coding Sublayer. Since FlexE mode uses different encoding formats than ETH mode, they are incompatible.
[0003] During the commissioning or expansion phase of a network project, achieving interoperability between devices typically requires manual configuration and port mode switching. Existing network devices usually have service configurations. If a newly added network device has a different port mode than the existing devices, the original device's service configuration must be manually deleted, the port mode switched to match the peer, and the service reconfigured after interoperability is established. This approach is inconvenient and incurs significant maintenance costs. Alternatively, both the control plane and forwarding plane can be updated, requiring the network device to store all service configurations for that port and restore the full configuration after interoperability. This approach is complex to implement in software, and configuration restoration is extremely time-consuming when dealing with high traffic volumes. Summary of the Invention
[0004] To address the aforementioned issues, this disclosure provides a device port configuration method and system, which involves adding an intermediate management module between the device's control plane and forwarding plane. Based on the port's operating status, the intermediate management module automatically switches the port's operating mode under its control.
[0005] This invention is achieved through the following technical solution:
[0006] In a first aspect, embodiments of this disclosure provide a port configuration method, the method comprising:
[0007] Determine whether there is an existing service configuration on the local device port, and store the service configuration of the local device port to the database based on the determination result;
[0008] Determine the working status of the local device port, and based on the working status of the local device port, determine whether to switch the port mode of the local device port from local port mode to peer port mode;
[0009] The system controls the local device port to establish a connection with the peer device port, feeds back the peer port mode of the local device port to the control plane, converts the data format of the received message into a data format readable by the control plane, and sends it to the control plane.
[0010] The working status of the local device port is detected. Based on the working status of the local device port, it is determined whether to restore the port mode of the local device port from the peer port mode to the local port mode, and restore the service configuration of the local device port.
[0011] Furthermore,
[0012] If the determination result indicates that the local device port has an existing service configuration, then this service configuration is stored in the database.
[0013] Furthermore,
[0014] Poll the physical layer and Shim layer of the local device port to determine the working status of the local device port;
[0015] When the working state of the local device port is abnormal, the port mode of the local device port is switched from the local port mode to the peer port mode.
[0016] Furthermore,
[0017] Select a client on the local device port to establish a connection with the peer device port;
[0018] The local device port's peer port mode is reported to the control plane;
[0019] The data format in the received message is converted into a data format readable by the control plane and then sent to the control plane.
[0020] Furthermore,
[0021] Select the client with the smallest client ID among the local device ports and establish a connection with the peer device port.
[0022] Furthermore,
[0023] The working status of the local device port is detected. When the detection result is that the working status is abnormal, the port mode of the local device port is restored from the peer port mode to the local port mode.
[0024] After the port mode of the local device port is restored to the local port mode, the service configuration of the local device port is restored.
[0025] Furthermore,
[0026] The system intercepts business information from the control plane and temporarily stores it in the database.
[0027] Secondly, this disclosure also provides a device port configuration system, the system including an intermediate management module, the intermediate management module including: a database, a transmission submodule and a state machine;
[0028] The database is used to store the service configuration and service information of the device ports;
[0029] The transmission submodule is used to convert the data format of the message and transmit the message between the control plane and the forwarding plane;
[0030] The state machine is used to switch the port mode of the device port.
[0031] Thirdly, embodiments of this disclosure also provide a computer-readable storage medium storing one or more programs, wherein...
[0032] When one or more programs are executed, the device port configuration method described above can be implemented.
[0033] Fourthly, embodiments of this disclosure also provide an electronic device, including a processor, a communication interface, the aforementioned computer-readable storage medium, and a communication bus; wherein the processor, the communication interface, and the computer-readable storage medium communicate with each other via the communication bus;
[0034] in,
[0035] The processor is used to execute programs stored in a computer-readable storage medium.
[0036] Compared with the prior art, this disclosure has the following advantages:
[0037] This feature enables the local device port to automatically switch port modes based on the port mode of the peer device port, improving the convenience of device maintenance and configuration, and reducing the cost of device operation and maintenance.
[0038] Other features and advantages of this disclosure will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of a conventional device structure provided in an embodiment of this disclosure;
[0041] Figure 2 A flowchart of a device port configuration method provided in this embodiment of the disclosure;
[0042] Figure 3 This is a schematic diagram illustrating the establishment of a device port connection according to an embodiment of the present disclosure;
[0043] Figure 4 This is a schematic diagram of a device port structure provided in an embodiment of the present disclosure;
[0044] Figure 5 This is a schematic diagram illustrating the establishment of a device connection according to an embodiment of the present disclosure;
[0045] Figure 6 This is a schematic diagram illustrating the establishment of a connection between devices according to an embodiment of the present disclosure;
[0046] Figure 7 This is another schematic diagram illustrating the establishment of a device port connection according to an embodiment of the present disclosure;
[0047] Figure 8 This is a schematic diagram of a state machine provided for an embodiment of the present disclosure. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0049] like Figure 1As shown, taking the local device as an SPN device and the remote device as an IPRAN device as an example, both the SPN and IPRAN devices include control planes and forwarding planes. The ports of the SPN and IPRAN devices are located in the forwarding plane. When the SPN and IPRAN devices communicate through ports, the port modes are different. The SPN device's port mode is FlexE mode, and correspondingly, the FlexE mode device port adds a Shim layer. The IPRAN device's port mode is ETH mode, so the SPN and IPRAN devices cannot communicate directly. To enable direct communication between the SPN and IPRAN devices, an intermediate management module is added between the control plane and the forwarding plane.
[0050] Firstly, embodiments of this disclosure provide a device port configuration method, such as... Figure 2 As shown, the device port configuration method of this disclosure includes:
[0051] S1: Determine whether there is an existing service configuration on the local device port, and store the service configuration of the local device port to the database based on the determination result.
[0052] Specifically, the intermediate management module determines whether the current device port has a service configuration that is currently in use or is an existing service. If there is an existing service configuration, the service configuration is stored in the database of the intermediate management module; if there is no existing service configuration, there is no need to store the configuration of the current device port in the database.
[0053] S2: Determine the working status of the local device port, and based on the working status of the local device port, determine whether to switch the port mode of the local device port from the local port mode to the peer port mode.
[0054] Specifically, when the intermediate management module of the local device determines that the working state of the local device port is abnormal—for example, if the local device port is in FlexE mode, and it determines that the physical layer of the local device port is working normally, but the Shim layer of the local device port is not working normally—then the working state of the local device port is abnormal. The module then switches the local device port's port mode from local port mode to peer port mode. After the port mode of the local device port is changed, the data format processed by the device's control plane remains unchanged; that is, the control plane processes the data received in local port mode.
[0055] S3: Controls the local device port to establish a connection with the peer device port, feeds back the peer port mode of the local device port to the control plane, converts the data format of the received message into a data format readable by the control plane, and sends it to the control plane.
[0056] Specifically, when the port mode of the local device changes, the transmission submodule of the intermediate management module reports the peer port mode of the local device to the control plane; if the local device port mode changes to the peer port mode, it reports the current peer port mode of the local device to the control plane. Because the port mode of the local device changes, the data format in the messages received by the local device also changes accordingly. Therefore, the transmission submodule of the intermediate management module converts the data format in the received messages into a data format readable by the control plane before sending the messages to the control plane.
[0057] S4: Detect the working status of the local device port, and based on the working status of the local device port, determine whether to restore the port mode of the local device port from the peer port mode to the local port mode, and restore the service configuration of the local device port.
[0058] Specifically, after a period of time, the intermediate management module checks the working status of the local device port. When the detection result indicates an abnormal working status, it restores the port mode of the local device port from the peer port mode back to the local port mode. After the local device port mode is restored to the local port mode, the intermediate management module retrieves the previously stored service configuration from the database and then restores the service configuration to the device port.
[0059] In some examples, it is determined whether an existing service configuration exists on the local device port, and based on the determination result, the service configuration of the local device port is stored in the database. Specifically, this includes:
[0060] S11: If the determination result is that there is an existing service configuration on the local device port, then store this service configuration in the database.
[0061] Specifically, the intermediate management module determines whether the current local device port has a service configuration that is in use or already exists. If an existing service configuration exists, it stores the configuration in the intermediate management module's database; otherwise, it does not need to store the current local device port's configuration in the database. The local device port can include multiple clients, and only the service configuration on one client can be stored. For example, the client with the smallest client ID can be selected, and if an existing service configuration exists, it is stored in the database.
[0062] In some examples, the operating status of the local device port is determined, and based on this status, it is determined whether to switch the port mode of the local device port from local port mode to peer port mode. Specifically, this includes:
[0063] S21: Poll the physical layer and Shim layer of the local device port to determine the working status of the local device port.
[0064] Specifically, the local device port operates in FlexE mode. The local device port includes a physical layer and a Shim layer. The intermediate management module polls the physical layer and Shim layer of the local device port, and determines the working status of the local device port based on the status of the physical layer and Shim layer. In addition to the physical layer and Shim layer, the device port may also include other structures, and the intermediate management module can poll according to the actual structure of the port.
[0065] S22: When the working status of the local device port is abnormal, switch the local device port mode from local port mode to peer port mode.
[0066] Specifically, the local device port is in FlexE mode. When the intermediate management module determines that the local device port is in an abnormal operating state—for example, when the physical layer of the local device port is working normally, but the SHIM layer of the device port is not working normally—the local device port is considered abnormal. The local device port mode is then switched to the peer port mode. After the local device port mode is changed, the data format processed by the device's control plane remains unchanged; that is, the control plane processes the data received in the local port mode. For example, if the local device port is an SPN device port in FlexE mode, and the peer device port is an IPRAN device port in ETH mode, when the SPN device port is in an abnormal operating state, the SPN device port mode is switched from FlexE mode to ETH mode.
[0067] In some examples, the control unit establishes a connection between the local device port and the peer device port, reports the peer port mode of the local device port to the control plane, converts the data format of received packets into a control plane-readable format, and sends it to the control plane. Specifically, this includes:
[0068] S31: Select a client on the local device port to establish a communication connection with the peer device port.
[0069] Specifically, the local device port can include multiple clients, with one client corresponding to one virtual client. These clients connect to the remote device port. The intermediate management module selects a client to connect to the remote device port. If the client has a service configuration, this configuration is saved to the database in step S1. The client uses a 66B bitstream. Understandably, the remote device port can also include multiple clients, each corresponding to one virtual client.
[0070] S32: Report the peer port mode of the local device port to the control plane.
[0071] Specifically, since the port mode of the local device port has changed, the intermediate management module reports the changed peer port mode to the control plane. Usually, after the port mode of the local device port changes from the local port mode to the peer port mode, the peer port mode of the local device port at this time is reported to the control plane.
[0072] S33: Convert the data format in the received message into a data format readable by the control plane and send it to the control plane.
[0073] Specifically, due to the change in port mode of the local device, the data format in the messages received by the local device also changes accordingly. Therefore, the transmission submodule of the intermediate management module converts the data format in the received messages into a data format readable by the control plane before sending it to the control plane. The messages can be DCN (Data Communication Network) messages.
[0074] In some examples, the working status of the local device port is detected, and based on the working status, it is determined whether to restore the port mode of the local device port from the peer port mode to the local port mode, and restore the service configuration of the local device port. Specifically, this includes:
[0075] S41: Detect the working status of the local device port. When the detection result is that the working status is abnormal, restore the port mode of the local device port from the peer port mode to the local port mode.
[0076] Specifically, after a period of time, the intermediate management module detects the working status of the local device port. When the detection result indicates an abnormal working status, for example, if the port mode of the peer device port changes, or if the peer device stops exchanging messages for a period of time, the local device port port mode is restored from the peer port mode to the local port mode.
[0077] S42: After the local device port is restored to the local port mode, the service configuration of the local device port is restored.
[0078] Specifically, after the local device port's port mode is restored to local port mode, the intermediate management module retrieves the previously stored service configuration from the database and then restores that service configuration to the local device port. Correspondingly, when the database saves the service configuration for a client on a local device port, it restores the corresponding client's service configuration.
[0079] In some examples, a client is selected from the local device port to establish a connection with the remote device port, specifically including:
[0080] S311: Select the client with the smallest client ID in the local device port and establish a communication connection with the peer device port.
[0081] Specifically, each client in the local device port corresponds to a client ID. When selecting a client to establish a connection with the peer device port, the client with the smallest client ID is selected.
[0082] In this embodiment, when the operating modes of the control plane and the local device port are inconsistent—for example, the control plane of the SPN device processes data in FlexE mode, while the SPN device port has switched to ETH mode—if the local device needs to process services in the data format corresponding to the control plane, for example, if the local device needs to send messages to other devices, the intermediate management module intercepts the service information and temporarily stores it in the database. When the device port's operating mode switches back to the local port mode, the module updates the local device port configuration from the database.
[0083] To more clearly illustrate a device port configuration method in this disclosure, a specific embodiment is provided below.
[0084] like Figure 3 , 4 As shown, taking the local device as an SPN device and the peer device as an IPRAN device as an example, the initial port state of the local device is FlexE mode; the port mode of the peer device is ETH mode. Since the port modes of the local and peer devices are inconsistent, they cannot directly establish communication. The local device port includes multiple FlexE clients, each corresponding to a virtual client. The virtual client is connected to the packet processing module, which processes and analyzes received packets. When the local device port switches port modes, the configuration of the virtual clients remains unchanged. This method prevents all services on that port from being refreshed in tandem due to changes in the port's operating mode.
[0085] like Figure 5 , 6As shown, the local device and the remote device have already established a connection via a FlexE mode device port. Now, a new device needs to be added between the local and remote devices. This new device's port mode is ETH mode. The local device then uses the method described above to automatically switch its port mode from FlexE to ETH mode, enabling automatic connection between the new device and the local device without manual configuration. After the local device and the new device establish a connection, the local device can configure the new device's port, changing the port mode of the port used for connection, specifically from ETH mode to FlexE mode, allowing the new device to directly connect to the remote device.
[0086] The intermediate management module of the local device determines whether there is an existing service configuration on the local device port. For example, it determines whether the client with the smallest client ID on the local device port has a service configuration. If the service configuration exists, it stores it in the database of the central management module.
[0087] The intermediate management module of the local device polls the physical layer and ShIM layer of the local device port. When the physical layer of the local device port is working normally, but the ShIM layer of the local device port is not working normally, the local device port cannot establish a communication connection with the peer device port. The intermediate management module of the local device needs to control the port mode of the local device port to switch from FlexE mode to the ETH mode of the peer device port.
[0088] After the local device's port mode changes to ETH mode, the intermediate management module reports this port mode to the control plane. The data in the packets received by the local device is in ETH mode, but the control plane cannot process ETH mode data. Therefore, the intermediate management module's transmission submodule converts the ETH mode data to FlexE mode before sending it to the control plane. Similarly, the control plane's response packets can have their data mode converted by the intermediate management module before being sent to other devices, thus enabling message communication; for example, DCN protocol message communication.
[0089] If the local device port does not send or receive messages for an extended period, or is unable to send or receive messages for a period of time, the port mode of the local device port will be changed from ETH mode back to FlexE mode. For example, if the local device port does not receive any messages from the peer device port for 20 minutes, the intermediate management module control port mode of the local device port will be changed from ETH mode back to FlexE mode.
[0090] like Figure 7As shown, the peer device can also add an intermediate management module between the control plane and the forwarding plane, and can also execute the above device port configuration method.
[0091] Secondly, based on the same inventive concept, this disclosure also provides a device port configuration system, which includes an intermediate management module: the intermediate management module includes a database, a transmission submodule, and a state machine. The database is used to store the service configuration and service information of the device port; the transmission submodule is used to convert the data format of the packets and transmit the packets between the control plane and the forwarding plane; the state machine is used to switch the port mode of the device port.
[0092] like Figure 8 As shown, the state machine is used to switch port modes according to instructions. The state machine is divided into the following states: ST_INIT, ST_FLEXE, ST_WAIT, ST_FLEXE_2_ETH, ST_ETH, and ST_PRE_2_ETH.
[0093] The ST_INIT state is the initialization state, and FlexE ports are added according to the FlexE PHY add instruction.
[0094] The ST_FLEXE state indicates FlexE mode. When the device port is in FlexE mode, it enters the ST_WAIT state according to the PCS_UP_SHIM_DOWN instruction. PCS_UP_SHIM_DOWN occurs when the physical layer (PCS) state of the device port is UP (normal state) and the Shim layer state is DOWN (abnormal state).
[0095] The ST_WAIT state is a negotiation wait state, typically waiting 10 seconds before executing the next instruction. After waiting 10 seconds without any other instructions, it enters the ST_PRE_2_ETH state. Based on the instruction ETH_PHY_CFG, it enters the ST_ETH state. Based on the instructions PCS_DOWN, PCS_UP_SHIM_UP, and DCN_OFF, it returns to the ST_FLEXE state. PCS_DOWN indicates that the physical layer (PCS) state of the device port is DOWN (an abnormal state); DCN OFF disables DCN communication, meaning that DCN message communication stops.
[0096] The ST_PRE_2_ETH state is the ETH mode pre-switch state, during which the service configuration of the device port is backed up to the database; according to the instruction ETH_PHY_CFG, it enters the ST_ETH state; according to the instructions PCS_DOWN, PCS_UP_SHIM_UP, DCN_OFF, it returns to the ST_FLEXE state; according to the instruction SWITCH_ETH, it enters the ST_FLEXE_2_ETH state.
[0097] The ST_FLEXE_2_ETH state is the state that switches from FLEXE mode to ETH mode. Based on the instruction ETH_PHY_CFG, it enters the ST_ETH state; based on the instructions PCS_DOWN / DCN_OFF / 20Min Timeout, it returns to the ST_FLEXE state. The 20MinTimeout means that if the state machine does not receive an instruction to switch port modes within 20 minutes, it is considered a timeout at the 20-minute mark. For example, if the local device port does not need to switch port modes within 20 minutes, and the state machine does not receive an instruction to switch port modes from FlexE mode to ETH mode, or vice versa, then at the 20-minute mark, the state machine returns from the ST_FLEXE_2_ETH state to the ST_FLEXE state, and the local device port's port mode will switch back from ETH mode to FlexE mode. At this time, the local device waits for the next DCN auto-negotiation and implements DCN message communication.
[0098] Thirdly, embodiments of this disclosure also provide a computer-readable storage medium storing one or more programs that, when executed, can implement the aforementioned device port configuration method.
[0099] Fourthly, based on the same inventive concept, embodiments of this disclosure also provide an electronic device, including a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The processor is used to execute a program stored in the aforementioned computer-readable storage medium.
[0100] It should be noted that the electrical connection between the above-mentioned units does not necessarily mean the connection between lines. The indirect connection method can be applied to the embodiments of this disclosure as long as it achieves the purpose of this disclosure.
[0101] Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A device port configuration method, characterized in that, The method, applied to an intermediate management module positioned between the control plane and the forwarding plane, includes: Determine whether there is an existing service configuration on the local device port, and store the service configuration of the local device port in the database according to the determination result, including: if the determination result is that there is an existing service configuration on the local device port, then store the service configuration in the database; Determine the working status of the local device port, and based on the working status of the local device port, determine whether to switch the port mode of the local device port from the local port mode to the peer port mode, including: polling the physical layer and Shim layer of the local device port to determine the working status of the local device port; when the working status of the local device port is abnormal, switch the port mode of the local device port from the local port mode to the peer port mode; The system controls the local device port to establish a connection with the peer device port, feeds back the peer port mode of the local device port to the control plane, converts the data format of the received message into a data format readable by the control plane, and sends it to the control plane. Detecting the working status of the local device port, and based on the working status of the local device port, determining whether to restore the port mode of the local device port from the peer port mode to the local port mode, and restoring the service configuration of the local device port, includes: detecting the working status of the local device port; when the detection result is an abnormal working status, restoring the port mode of the local device port from the peer port mode to the local port mode; after the port mode of the local device port is restored to the local port mode, restoring the service configuration of the local device port.
2. The method according to claim 1, characterized in that, The control unit establishes a connection between its local device port and the peer device port, feeds back the peer port mode of its local device port to the control plane, converts the data format of received messages into a data format readable by the control plane, and sends it to the control plane, including: Select a client on the local device port to establish a connection with the peer device port; The local device port's peer port mode is reported to the control plane; The data format in the received message is converted into a data format readable by the control plane and then sent to the control plane.
3. The method according to claim 2, characterized in that, The step of selecting a client on the local device port to establish a connection with the remote device port includes: Select the client with the smallest client ID among the local device ports and establish a connection with the peer device port.
4. The method according to claim 1, characterized in that, The step of detecting the working status of the local device port, determining whether to restore the port mode of the local device port from the peer port mode to the local port mode based on the working status of the local device port, and restoring the service configuration of the local device port, further includes: The system intercepts business information from the control plane and temporarily stores it in the database.
5. A device port configuration system, used to execute the device port configuration method as described in any one of claims 1-4, characterized in that, The system includes an intermediate management module, which comprises a database, a transmission submodule, and a state machine. The database is used to store the service configuration and service information of the device ports; The transmission submodule is used to convert the data format of the message and transmit the message between the control plane and the forwarding plane; The state machine is used to switch the port mode of the device port.
6. A computer-readable storage medium storing one or more programs, characterized in that, When one or more programs are executed, the device port configuration method according to any one of claims 1-4 is implemented.
7. An electronic device, comprising a processor, a communication interface, a computer-readable storage medium as described in claim 6, and a communication bus; wherein, The processor, communication interface, and computer-readable storage medium communicate with each other via a communication bus; characterized in that the processor is used to execute a program stored in the computer-readable storage medium.