Interface configuration method and apparatus

By automatically detecting and adjusting the chip operating mode of the communication device, the problem of the inability of the FlexE and Eth mode interfaces to communicate normally was solved, and efficient interface configuration was achieved.

CN114513406BActive Publication Date: 2026-04-24HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2020-10-26
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

When two physical interfaces that are neighbors are configured, one in FlexE mode and the other in Eth mode, they cannot communicate properly. Existing technologies require users to manually configure them to achieve communication, which is inefficient.

Method used

The first communication device automatically detects the chip operating mode of the second communication device and switches the chip operating mode of its own port according to the detection result, thereby automating the port configuration, including receiving instruction information and periodic detection to maintain mode consistency.

Benefits of technology

It improves the efficiency of physical interface configuration, automatically adjusting the port mode to achieve FlexE communication without requiring manual user intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114513406B_ABST
    Figure CN114513406B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an interface configuration method, which can be executed by a first communication device. The first communication device comprises a first port, which can be used to communicate with a second port of a second communication device. In one example, the first communication device can determine a chip working mode of the second port, and when it is determined that the chip working mode of the second port is an Eth mode, the first communication device can switch the chip working mode of the first port from a FlexE mode to the Eth mode. In this way, the chip working mode of the first port and the chip working mode of the second port are both the Eth mode, and therefore, the first port and the second port can normally communicate. As can be seen, by using the present solution, the user does not need to manually configure the chip working mode of the first port, and the first communication device can switch the chip working mode of the first port according to the chip working mode of the second port, thereby improving the efficiency of configuring the first port.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more particularly to an interface configuration method and apparatus. Background Technology

[0002] A communication device may include physical interfaces, which can be configured in either Ethernet (Eth) mode or Flexible Ethernet (FlexE) mode. When two neighboring physical interfaces communicate, both interfaces can be configured in either Eth or FlexE mode. However, if one physical interface is configured in FlexE mode and the other in Eth mode, the two interfaces will not be able to communicate properly.

[0003] Currently, when two physical interfaces that are neighbors are configured, one in FlexE mode and the other in Eth mode, users, such as operations and maintenance personnel, need to manually configure one of the physical interfaces so that the two physical interfaces can communicate normally. However, this method is relatively inefficient. Summary of the Invention

[0004] This application provides an interface configuration method that can improve the configuration efficiency of physical interfaces.

[0005] Firstly, embodiments of this application provide an interface configuration method, which can be executed by a first communication device. The first communication device includes a first port, which can be used to communicate with a second port of a second communication device. In one example, the first communication device can determine the chip operating mode of the second port. When the chip operating mode of the second port is determined to be Eth mode, the first communication device can switch the chip operating mode of the first port from FlexE mode to Eth mode. In this way, the chip operating modes of the first port and the second port are both Eth mode, and therefore, the first port and the second port can communicate normally. Thus, using this solution, there is no need for the user to manually configure the chip operating mode of the first port; the first communication device can switch the chip operating mode of the first port according to the chip operating mode of the second port, improving the efficiency of configuring the first port.

[0006] In one implementation, considering that if FlexE communication is established between the first communication device and the second communication device, the first communication device can receive the FlexE overhead frame from the second communication device. Therefore, in one implementation, if the first communication device does not receive the FlexE overhead frame sent by the second communication device within a preset time, it indicates that FlexE communication has not been established between the first communication device and the second communication device. In this case, the first communication device can determine that the chip operating mode of the second port is Eth mode.

[0007] In one implementation, after the first communication device configures the chip operating mode of the first port to Eth mode, the first communication device can also receive first indication information sent by the second communication device. This first indication information instructs the first communication device to configure the chip operating mode of the first port to FlexE mode. Thus, in one example, the first communication device can configure the chip operating mode of the first port to FlexE mode, causing the first port to operate in FlexE mode. If the second port also operates in FlexE mode, FlexE communication can be established between the first and second communication devices.

[0008] In one implementation, the first indication information is a remote fault RF indication information. In one example, when the first communication device receives RF indication information from the second communication device, the first communication device can configure the chip operating mode of the first port to FlexE mode.

[0009] In one implementation, the first indication information includes the 00 code block of the first Ethernet frame sent by the second communication device. In one example, when the first communication device receives the first Ethernet frame from the second communication device, it can extract the value of the 00 code block of the first Ethernet frame, and when the value of the 00 code block of the first Ethernet frame is a preset value, such as 0x05, configure the chip operating mode of the first port to FlexE mode.

[0010] In one implementation, the first indication information may be carried in the extended TLV field of the first Ethernet frame sent by the second communication device. In one example, when the first communication device receives the first Ethernet frame from the second communication device, it can configure the chip operating mode of the first port to FlexE mode according to the extended TLV field in the first Ethernet frame.

[0011] In one implementation, the first communication device may further instruct the second communication device to configure the chip operating mode of the second port to FlexE mode. For example, in one example, the first communication device may instruct the second communication device to configure the chip operating mode of the second port to FlexE mode before configuring the chip operating mode of the first port to FlexE mode. Then, the first communication device configures the chip operating mode of the first port to FlexE mode. The second communication device may also configure the chip operating mode of the second port to FlexE mode based on the instruction from the first communication device. In this way, FlexE communication can be established between the first port and the second port.

[0012] In one implementation, the first communication device can instruct the second communication device to configure the chip operating mode of the second port to FlexE mode by periodically sending a second indication message to the second communication device within a predetermined time period. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode. Periodically sending the second indication message to the second communication device within the predetermined time period ensures that the second communication device can receive the second indication message, thereby guaranteeing that the second communication device configures the chip operating mode of the second port to FlexE mode, and further enabling FlexE communication to be established between the first port and the second port.

[0013] In one implementation, the second indication information is a remote fault RF indication information. In one example, when the second communication device receives RF indication information from the first communication device, if the port configuration mode of the second port is FlexE mode and the chip operating mode of the second port is Eth mode, then the second communication device can configure the chip operating mode of the second port to FlexE mode.

[0014] In one implementation, the second indication information is the 00 code block of the fourth Ethernet frame sent by the first communication device. In one example, the value of the 00 code block of the fourth Ethernet frame sent by the first communication device to the second communication device can be 0x05.

[0015] In one implementation, the second indication information may be carried in the extended TLV field of the fourth Ethernet frame sent by the first communication device. In one example, when the second communication device receives the fourth Ethernet frame from the first communication device, it can configure the chip operating mode of the second port to FlexE mode according to the extended TLV field in the first Ethernet frame.

[0016] In one implementation, after the first communication device switches the chip operating mode of the first port from Eth mode to FlexE mode, it can also periodically detect the chip operating mode of the second port. If the chip operating mode of the second port differs from that of the first port, the chip operating mode of the first port is reconfigured to ensure consistency between the chip operating modes of the first and second ports. For example, in one instance, when the first communication device determines that the chip operating mode of the second port is Eth mode, it can switch the chip operating mode of the first port from FlexE mode to Eth mode.

[0017] In one implementation, after the first communication device switches the chip operating mode of the first port from FlexE mode to Eth mode, if the first communication device determines that the chip operating mode of the second port is FlexE mode, then the first communication device can switch the chip operating mode of the first port from Eth mode to FlexE mode.

[0018] In one implementation, when the chip operating mode of the first port is Eth mode, if the chip operating mode of the second port is also Eth mode, then the first port can receive a block lock signal from the second port. Therefore, if the first communication device does not receive a block lock signal sent by the second communication device within a preset time period, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0019] In one implementation, when the chip operating mode of the first port is Eth mode, if the chip operating mode of the second port is also Eth mode, then the first port can receive an alignment marker lock signal from the second port. Therefore, if the first communication device does not receive the alignment marker lock signal sent by the second communication device within a preset time period, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0020] In one implementation, the first communication device can determine the chip operating mode of the second port based on the value of the O0 code block sent by the second communication device. Specifically, when the value of the O0 code block sent by the second communication device is 0x05, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0021] In one implementation, when the chip operating mode of the first port is Eth mode, the first communication device can determine the chip operating mode of the second port by sending a second Ethernet frame to the second communication device, wherein the second Ethernet frame is used to determine the chip operating mode of the second port. If the first communication device does not receive a response from the second communication device for the second Ethernet frame, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0022] In one implementation, the second Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including third indication information used to determine the chip operating mode of the second port.

[0023] In one implementation, the first port is configured in FlexE mode. This is because when the first port is configured in FlexE mode, it means that the first port can function as either an Eth interface or a FlexE interface. In other words, the chip operating mode of the first port can be configured in either FlexE mode or Eth mode. If the first port is configured in Eth mode, it may only be able to function as an Eth interface; in this case, the chip operating mode of the first port cannot be configured in FlexE mode.

[0024] Secondly, embodiments of this application provide an interface configuration method, which can be executed by a first communication device. The first communication device includes a first port, which can be used to communicate with a second port of a second communication device. In one example, the first communication device can receive first indication information sent by the second communication device, the first indication information being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode. After receiving the first indication information, the first communication device can switch the chip operating mode of the first port from Eth mode to FlexE mode. Therefore, using this solution, there is no need for the user to manually configure the chip operating mode of the first port; the first communication device can configure the chip operating mode of the first port according to the first indication information sent by the second communication device, thus improving the efficiency of configuring the first port.

[0025] In one implementation, the first indication information is a remote fault RF indication information. In one example, when the first communication device receives RF indication information from the second communication device, the first communication device can configure the chip operating mode of the first port to FlexE mode.

[0026] In one implementation, the first indication information includes the 00 code block of the first Ethernet frame sent by the second communication device. In one example, when the first communication device receives the first Ethernet frame from the second communication device, it can extract the value of the 00 code block of the first Ethernet frame, and when the value of the 00 code block of the first Ethernet frame is a preset value, such as 0x05, configure the chip operating mode of the first port to FlexE mode.

[0027] In one implementation, the first indication information may be carried in the extended TLV field of the first Ethernet frame sent by the second communication device. In one example, when the first communication device receives the first Ethernet frame from the second communication device, it can configure the chip operating mode of the first port to FlexE mode according to the extended TLV field in the first Ethernet frame.

[0028] In one implementation, the first communication device may further instruct the second communication device to configure the chip operating mode of the second port to FlexE mode. For example, in one example, the first communication device may instruct the second communication device to configure the chip operating mode of the second port to FlexE mode before configuring the chip operating mode of the first port to FlexE mode. Then, the first communication device configures the chip operating mode of the first port to FlexE mode. The second communication device may also configure the chip operating mode of the second port to FlexE mode based on the instruction from the first communication device. In this way, FlexE communication can be established between the first port and the second port.

[0029] In one implementation, the first communication device can instruct the second communication device to configure the chip operating mode of the second port to FlexE mode by periodically sending a second indication message to the second communication device within a predetermined time period. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode. Periodically sending the second indication message to the second communication device within the predetermined time period ensures that the second communication device can receive the second indication message, thereby guaranteeing that the second communication device configures the chip operating mode of the second port to FlexE mode, and further enabling FlexE communication to be established between the first port and the second port.

[0030] In one implementation, when the chip operating mode of the first port is FlexE mode, the first communication device can determine the chip operating mode of the second port. When the chip operating mode of the second port is determined to be Eth mode, the first communication device can switch the chip operating mode of the first port from FlexE mode to Eth mode. In this way, both the chip operating modes of the first and second ports are Eth mode, thus allowing normal communication between the first and second ports. Therefore, using this solution, there is no need for the user to manually configure the chip operating mode of the first port; the first communication device can switch the chip operating mode of the first port based on the chip operating mode of the second port, improving the efficiency of configuring the first port.

[0031] In one implementation, considering that if FlexE communication is established between the first communication device and the second communication device, the first communication device can receive the FlexE overhead frame from the second communication device. Therefore, in one implementation, if the first communication device does not receive the FlexE overhead frame sent by the second communication device within a preset time, it indicates that FlexE communication has not been established between the first communication device and the second communication device. In this case, the first communication device can determine that the chip operating mode of the second port is Eth mode.

[0032] In one implementation, after the first communication device switches the chip operating mode of the first port from Eth mode to FlexE mode, it can also periodically detect the chip operating mode of the second port. If the chip operating mode of the second port differs from that of the first port, the chip operating mode of the first port is reconfigured to ensure consistency between the chip operating modes of the first and second ports. For example, in one instance, when the first communication device determines that the chip operating mode of the second port is Eth mode, it can switch the chip operating mode of the first port from FlexE mode to Eth mode.

[0033] In one implementation, after the first communication device switches the chip operating mode of the first port from FlexE mode to Eth mode, if the first communication device determines that the chip operating mode of the second port is FlexE mode, then the first communication device can switch the chip operating mode of the first port from Eth mode to FlexE mode.

[0034] In one implementation, when the chip operating mode of the first port is Eth mode, if the chip operating mode of the second port is also Eth mode, then the first port can receive a block lock signal from the second port. Therefore, if the first communication device does not receive a block lock signal sent by the second communication device within a preset time period, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0035] In one implementation, when the chip operating mode of the first port is Eth mode, if the chip operating mode of the second port is also Eth mode, then the first port can receive an alignment marker lock signal from the second port. Therefore, if the first communication device does not receive the alignment marker lock signal sent by the second communication device within a preset time period, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0036] In one implementation, the first communication device can determine the chip operating mode of the second port based on the value of the O0 code block sent by the second communication device. Specifically, when the value of the O0 code block sent by the second communication device is 0x05, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0037] In one implementation, when the chip operating mode of the first port is Eth mode, the first communication device can determine the chip operating mode of the second port by sending a second Ethernet frame to the second communication device, wherein the second Ethernet frame is used to determine the chip operating mode of the second port. If the first communication device does not receive a response from the second communication device for the second Ethernet frame, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0038] In one implementation, the second Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including third indication information used to determine the chip operating mode of the second port.

[0039] In one implementation, the first port is configured in FlexE mode. This is because when the first port is configured in FlexE mode, it means that the first port can function as either an Eth interface or a FlexE interface. In other words, the chip operating mode of the first port can be configured in either FlexE mode or Eth mode. If the first port is configured in Eth mode, it may only be able to function as an Eth interface; in this case, the chip operating mode of the first port cannot be configured in FlexE mode.

[0040] Thirdly, embodiments of this application provide an interface configuration method, which can be executed by a first communication device. The first communication device includes a first port, which can be used to communicate with a second port of a second communication device. In one example, the first communication device can determine the chip operating mode of the second port, and when the chip operating mode of the second port is different from the chip operating mode of the first port, adjust the chip operating mode of the first port to be the same as the chip operating mode of the second port. In other words, the first communication device can adjust the chip operating mode of the first port when the chip operating mode of the second port is different from the chip operating mode of the first port, so that the adjusted chip operating mode of the first port is the same as the chip operating mode of the second port, thereby enabling the first port and the second port to communicate normally. Therefore, using this solution, there is no need for the user to manually configure the chip operating mode of the first port; the first communication device can switch the chip operating mode of the first port according to the chip operating mode of the second port, improving the efficiency of configuring the first port.

[0041] In one implementation, when the chip operating mode of the first port is Eth mode and the chip operating mode of the second port is FlexE mode, the first communication device can adjust the chip operating mode of the first port from Eth mode to FlexE mode.

[0042] In one implementation, when the chip operating mode of the second port is Eth mode and the chip operating mode of the first port is FlexE mode, the first communication device can adjust the chip operating mode of the first port from FlexE mode to Eth mode.

[0043] In one implementation, considering that if FlexE communication is established between the first communication device and the second communication device, the first communication device can receive the FlexE overhead frame from the second communication device. Therefore, in one implementation, when the chip operating mode of the first port is FlexE mode, if the first communication device does not receive the FlexE overhead frame sent by the second communication device within a preset time, it indicates that FlexE communication has not been established between the first communication device and the second communication device. In this case, the first communication device can determine that the chip operating mode of the second port is Eth mode.

[0044] In one implementation, after the first communication device configures the chip operating mode of the first port to Eth mode, the first communication device can also receive first indication information sent by the second communication device. This first indication information instructs the first communication device to configure the chip operating mode of the first port to FlexE mode. Thus, in one example, the first communication device can configure the chip operating mode of the first port to FlexE mode according to the first indication information, thereby enabling the first port to operate in FlexE mode. If the second port also operates in FlexE mode, FlexE communication can be established between the first and second communication devices.

[0045] In one implementation, the first indication information is a remote fault (RF) indication information.

[0046] In one implementation, the first indication information includes an O0 code block in a first Ethernet frame sent by the second communication device.

[0047] In one implementation, receiving first indication information sent by the second communication device includes: receiving a first Ethernet frame sent by the second communication device, the first Ethernet frame including an Extended Type Length Value (TLV) field, the extended TLV field including the first indication information.

[0048] In one implementation, the first communication device may further instruct the second communication device to configure the chip operating mode of the second port to FlexE mode. For example, in one example, the first communication device may instruct the second communication device to configure the chip operating mode of the second port to FlexE mode before configuring the chip operating mode of the first port to FlexE mode. Then, the first communication device configures the chip operating mode of the first port to FlexE mode. The second communication device may also configure the chip operating mode of the second port to FlexE mode based on the instruction from the first communication device. In this way, FlexE communication can be established between the first port and the second port.

[0049] In one implementation, instructing the second communication device to configure the chip operating mode of the second port to FlexE mode includes: periodically sending a second indication message to the second communication device within a predetermined time period, the second indication message being used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

[0050] In one implementation, the first communication device can instruct the second communication device to configure the chip operating mode of the second port to FlexE mode by periodically sending a second indication message to the second communication device within a predetermined time period. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode. Periodically sending the second indication message to the second communication device within the predetermined time period ensures that the second communication device can receive the second indication message, thereby guaranteeing that the second communication device configures the chip operating mode of the second port to FlexE mode, and further enabling FlexE communication to be established between the first port and the second port.

[0051] In one implementation, the second indication information is a remote fault RF indication information. In one example, when the second communication device receives RF indication information from the first communication device, if the port configuration mode of the second port is FlexE mode and the chip operating mode of the second port is Eth mode, then the second communication device can configure the chip operating mode of the second port to FlexE mode.

[0052] In one implementation, the second indication information is the 00 code block of the fourth Ethernet frame sent by the first communication device. In one example, the value of the 00 code block of the fourth Ethernet frame sent by the first communication device to the second communication device can be 0x05.

[0053] In one implementation, the second indication information may be carried in the extended TLV field of the fourth Ethernet frame sent by the first communication device. In one example, when the second communication device receives the fourth Ethernet frame from the first communication device, it can configure the chip operating mode of the second port to FlexE mode according to the extended TLV field in the first Ethernet frame.

[0054] In one implementation, when the chip operating mode of the first port is Eth mode, the first communication device can determine that the chip operating mode of the second port is FlexE mode if it does not detect the alignment marker lock signal sent by the second communication device within a preset time.

[0055] In one implementation, when the chip operating mode of the first port is Eth mode, the first communication device can determine that the chip operating mode of the second port is FlexE mode based on the value of the O0 code block sent by the second communication device. For example, when the value of the O0 code block sent by the second communication device is 0x05, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0056] In one implementation, when the chip operating mode of the first port is Eth mode, the first communication device can determine the chip operating mode of the second port by sending a second Ethernet frame to the second communication device. The second Ethernet frame is used to determine the chip operating mode of the second port. In this case, if the first communication device does not receive a response from the second communication device for the second Ethernet frame, the first communication device can determine that the chip operating mode of the second port is FlexE mode.

[0057] In one implementation, the second Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including third indication information used to determine the chip operating mode of the second port.

[0058] In one implementation, the first port is configured in FlexE mode. This is because when the first port is configured in FlexE mode, it means that the first port can function as either an Eth interface or a FlexE interface. In other words, the chip operating mode of the first port can be configured in either FlexE mode or Eth mode. If the first port is configured in Eth mode, it may only be able to function as an Eth interface; in this case, the chip operating mode of the first port cannot be configured in FlexE mode.

[0059] Fourthly, embodiments of this application provide an interface configuration method, which can be executed by a second communication device. The second communication device includes a second port for communicating with a first port of a first communication device. In one example, the second communication device can obtain first indication information, which instructs the first communication device to configure the chip operating mode of the first port to FlexE mode. After obtaining the first indication information, the second communication device can send it to the first communication device. Therefore, using this solution, the user does not need to manually configure the chip operating mode of the first port; instead, the second communication device sends the first indication information, instructing the first communication device to configure the chip operating mode of the first port to FlexE mode, thereby instructing the first communication device to configure the chip operating mode of the first port, improving the efficiency of configuring the first port.

[0060] In one implementation, after receiving a configuration instruction from the control and management entity, the second communication device can obtain the first indication information, wherein the configuration instruction instructs the second communication device to configure the second port to FlexE mode. In one example, the second communication device can configure both the port configuration mode and the chip operating mode of the second port to FlexE mode based on the configuration instruction. The first communication device can then configure the chip operating mode of the first port to FlexE mode based on the first indication information. In this way, FlexE communication can be established between the first and second communication devices.

[0061] In one implementation, the first indication information is a remote fault (RF) indication information.

[0062] In one implementation, the first indication information is the O0 code block in the first Ethernet frame sent by the second communication device.

[0063] In one implementation, sending the first indication information to the first communication device includes: sending a first Ethernet frame to the first communication device, the first Ethernet frame including an Extended Type Length Value (TLV) field, the extended TLV field including the first indication information.

[0064] In one implementation, sending the first indication information to the first communication device includes: periodically sending the first indication information to the first communication device within a predetermined time period.

[0065] In one implementation, the method further includes: receiving second indication information sent by the first communication device, the second indication information being used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

[0066] In one implementation, the method further includes: receiving a second Ethernet frame sent by the first communication device, the second Ethernet frame being used to determine the chip operating mode of the second port.

[0067] In one implementation, the method further includes: when the chip operating mode of the second port is Eth mode, sending a response to the second Ethernet frame to the first communication device.

[0068] In one implementation, the second Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including third indication information used to determine the chip operating mode of the second port.

[0069] In one implementation, the second communication device sends a response to the second Ethernet frame to the first communication device, which may be a third Ethernet frame.

[0070] In one implementation, the third Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including fourth indication information for indicating the response.

[0071] Fifthly, embodiments of this application provide a first communication device, comprising: a transceiver unit and a processing unit. The transceiver unit is configured to perform transceiver operations performed by the first communication device according to the first aspect and any one of the first aspects described above, and the processing unit is configured to perform other operations performed by the first communication device according to the first aspect and any one of the first aspects besides the transceiver operations; or, the transceiver unit is configured to perform transceiver operations performed by the first communication device according to the second aspect and any one of the second aspects described above, and the processing unit is configured to perform other operations performed by the first communication device according to the second aspect and any one of the second aspects besides the transceiver operations; or, the transceiver unit is configured to perform transceiver operations performed by the first communication device according to the third aspect and any one of the third aspects described above, and the processing unit is configured to perform other operations performed by the first communication device according to the third aspect and any one of the third aspects besides the transceiver operations.

[0072] Sixthly, embodiments of this application provide a first communication device, the first communication device including a memory and a processor; the memory is used to store program code; the processor is used to execute instructions in the program code, causing the first communication device to perform the method described in the first aspect and any one of the first aspects above, or to perform the method described in the second aspect and any one of the second aspects above, or to perform the method described in the third aspect and any one of the third aspects above.

[0073] In a seventh aspect, embodiments of this application provide a first communication device, the first communication device including a communication interface and a processor, the processor being configured to execute the method described in the first aspect and any one of the first aspects above, or the processor being configured to execute the method described in the second aspect and any one of the second aspects above, or the processor being configured to execute the method described in the third aspect and any one of the third aspects above.

[0074] Eighthly, embodiments of this application provide a second communication device, including: a transceiver unit and a processing unit. The transceiver unit is used to perform transceiver operations performed by the second communication device described in the fourth aspect and any one of the fourth aspects above, and the processing unit is used to perform other operations performed by the second communication device described in the fourth aspect and any one of the fourth aspects above, besides the transceiver operations.

[0075] Ninthly, embodiments of this application provide a second communication device, the second communication device including a memory and a processor; the memory is used to store program code; the processor is used to execute instructions in the program code, causing the second communication device to perform the method described in the fourth aspect above and any one of the fourth aspects.

[0076] In a tenth aspect, embodiments of this application provide a second communication device, the second communication device including a communication interface and a processor, the processor being configured to execute the methods described in the fourth aspect and any one of the fourth aspects above.

[0077] Eleventhly, embodiments of this application provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect and any one of the first aspects above, or cause the computer to perform the methods described in the second aspect and any one of the second aspects above, or cause the computer to perform the methods described in the third aspect and any one of the third aspects above, or cause the computer to perform the methods described in the fourth aspect and any one of the fourth aspects above.

[0078] In a twelfth aspect, embodiments of this application provide a communication system, which includes a first communication device as described in the fifth, sixth, or seventh aspects above, and a second communication device as described in the eighth, ninth, or tenth aspects above. Attached Figure Description

[0079] To more clearly illustrate the technical solutions in the embodiments of this application 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 only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0080] Figure 1a This is a schematic diagram of the structure of an Eth interface provided in an embodiment of this application;

[0081] Figure 1bThis is a schematic diagram of the structure of a FlexE interface provided in an embodiment of this application;

[0082] Figure 2a A schematic diagram illustrating an exemplary application scenario provided in this application embodiment;

[0083] Figure 2b A schematic diagram illustrating an exemplary application scenario provided in this application embodiment;

[0084] Figure 2c A schematic diagram illustrating an exemplary application scenario provided in this application embodiment;

[0085] Figure 3 Signaling interaction diagram of the interface configuration method provided in the embodiments of this application;

[0086] Figure 4 This is a schematic diagram of the structure of an Ethernet frame 1 provided in an embodiment of this application;

[0087] Figure 5 A flowchart illustrating yet another interface configuration method provided in an embodiment of this application;

[0088] Figure 6 A flowchart illustrating yet another interface configuration method provided in an embodiment of this application;

[0089] Figure 7 A flowchart illustrating yet another interface configuration method provided in an embodiment of this application;

[0090] Figure 8 A flowchart illustrating yet another interface configuration method provided in an embodiment of this application;

[0091] Figure 9 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0092] Figure 10 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;

[0093] Figure 11 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application. Detailed Implementation

[0094] This application provides an interface configuration method to improve the configuration efficiency of physical interfaces.

[0095] To make it easier to understand, we will first introduce the relevant content of Eth and FlexE.

[0096] For a given physical interface, it can be configured in either Eth mode or FlexE mode. For ease of description, in the following description of this application, a physical interface operating in FlexE mode will be referred to as a "FlexE interface," and a physical interface operating in Eth mode will be referred to as an "Eth interface." See also Figure 1a and Figure 1b , Figure 1a This is a schematic diagram of the structure of an Eth interface provided in an embodiment of this application. Figure 1b This is a schematic diagram of the structure of a FlexE interface provided in an embodiment of this application.

[0097] like Figure 1a As shown, the Eth interface includes a Media Access Control (MAC) layer, a Reconciliation Sublayer (RS), a Physical Coding Sublayer (PCS), a Physical Medium Attachment (PMA) sublayer, and a Physical Medium Dependent (PMD) sublayer. Figure 1b As shown, in addition to the MAC layer, RS, PCS, PMA sublayer and PMD sublayer, the FlexE interface has an additional FlexE shim layer between the MAC layer and PCS.

[0098] It should be noted that, Figure 1a and Figure 1b The structural differences between the Eth interface and the FlexE interface are illustrated merely for ease of understanding and do not constitute a limitation on the embodiments of this application. In some embodiments, the structure of the Eth interface and the FlexE interface is not limited to... Figure 1a and Figure 1b As shown.

[0099] For example, the Eth interface processes messages as follows: the PCS receives data and directly transmits it to the MAC layer, which then assembles the data into an Eth message.

[0100] For example, the FlexE interface has two message processing methods. The first method is: the PCS receives data and passes it to the FlexE shim, which then passes it to the MAC, and the MAC assembles the data into an Eth message. The second method is: the PCS of FlexE interface 1 receives data and sends it to the FlexE shim of FlexE interface 1, which then sends the data to the FlexE shim of FlexE interface 2, and the FlexE shim of FlexE interface 2 sends the data from its PCS to the link. FlexE interface 1 and FlexE interface 2 are neighbors and can communicate with each other. The FlexE interface can determine which of the two methods to use for message processing based on its configuration.

[0101] When two neighboring physical interfaces communicate, if one physical interface is configured in FlexE mode and the other in Eth mode, they will be unable to communicate properly. This is because the Eth interface processes packets from other devices, such as user equipment, differently than the FlexE interface. In one example:

[0102] When sending messages, the Eth interface, for a message from a user equipment, segments the message into 64-bit data, adds a 2-bit synchronization header before the data, forming a 66-bit information block, and then sends these 66-bit blocks sequentially onto the link. For example, if the Eth interface obtains four blocks after processing the message, it first sends block 1 onto the link, then block 2, and then blocks 3 and 4 in sequence. In this case, the data sent onto the link by the Eth interface is: block1|block2|block3|block4. Here, "A|B" indicates that two bit streams A and B are concatenated sequentially.

[0103] When the FlexE interface sends a message, the FlexE shim of that interface segments the message into 64-bit data, adds a 2-bit synchronization header to the beginning of the data, forming 66-bit blocks, and inserts these blocks into specific slots. For example, if the FlexE interface has four time slots, where time slots 1 and 3 are used to forward messages from user equipment 1, and time slots 2 and 3 are not yet allocated, then after processing the message from user equipment 1, the FlexE interface obtains two blocks, block 5 and block 6. The FlexE interface schedules block 5 to be forwarded on time slot 1, an empty block to be forwarded on time slot 2, block 6 to be forwarded on time slot 3, and an empty block to be forwarded on time slot 4. An empty block is one where all 66 bits of data are 0. In this case, the data sent to the link by the FlexE interface is: block 5 | empty block | block 6 | empty block.

[0104] Therefore, if the Eth interface and the FlexE interface interact, and the Eth interface sends a message to the FlexE interface, the FlexEshim cannot parse the correct data because the Eth interface sends data bit by bit, while FlexE receives data in specific time slots (according to user configuration). Consequently, when the FlexE interface sends a message to the Eth interface, the Eth interface also cannot parse the correct data.

[0105] As mentioned above Figure 1a and Figure 1b As described, if a physical interface supports being configured in FlexE mode, it can be configured in either Eth or FlexE mode. When the physical interface is configured in Eth mode, its FlexE shim does not process data. Whether the FlexE shim processes data can be determined by the chip's operating mode. In one example, when the chip's operating mode is configured in Eth mode, the FlexE shim does not process data; in this case, the physical interface is an Eth interface. When the chip's operating mode is configured in FlexE mode, the FlexE shim processes data; in this case, the physical interface is actually operating in FlexE mode, i.e., it is a FlexE interface.

[0106] It should be noted that the "physical interface supports being configured in FlexE mode" mentioned earlier refers to the fact that the port configuration mode of the physical port can be configured to FlexE mode. In other words, when configuring a physical port, in addition to configuring the chip operating mode of the physical interface, it is also necessary to configure the port configuration mode of the physical interface. Generally, for a physical interface, its port configuration mode and chip operating mode are consistent. For example, if the port configuration mode is FlexE mode, then the chip operating mode is also FlexE mode; similarly, if the port configuration mode is Eth mode, then the chip operating mode is also Eth mode. In one example, if the control management entity issues configuration command 1 to the communication device, instructing the communication device to configure physical port 1 to FlexE mode, then the communication device can configure both the port configuration mode and the chip operating mode of physical port 1 to FlexE mode based on configuration command 1. In another example, if the control management entity issues configuration instruction 2 to the communication device, instructing the communication device to configure physical port 1 to Eth mode, then the communication device can configure both the port configuration mode and the chip operating mode of physical port 1 to Eth mode based on configuration instruction 2.

[0107] The control and management entity mentioned in the embodiments of this application can be, for example, a device running network management system (NMS), or a controller. The control and management entity can be a functional module that implements control and / or management functions, or a physical entity running relevant functional modules. Such a physical entity can be, for example, a server with relevant software installed, which is used to implement the functions of the control and management entity. The embodiments of this application do not impose specific limitations.

[0108] Unless otherwise specified, the port mentioned in the embodiments of this application refers to the physical port of the communication device.

[0109] Next, we will introduce the possible application scenarios of this application.

[0110] See Figure 2a This figure is a schematic diagram of an exemplary application scenario provided by an embodiment of this application.

[0111] like Figure 2aAs shown, the control and management entity is connected to communication device A, which in turn is connected to communication device B. Communication device A communicates via port a and port b of communication device B. Both ports a and b operate in Eth mode. That is, both the port configuration mode and chip operating mode of port a and port b are in Eth mode. In this configuration, the control and management entity can manage communication device A and, through communication device A, manage communication device B (instructions issued by the control and management entity to communication device B are forwarded by communication device A).

[0112] If both ports a and b need to be switched from Eth mode to FlexE mode, the switching times of ports a and b cannot be strictly synchronized, which may cause communication failures between communication device A and communication device B. In one example: if port a is switched to FlexE mode first, both the configuration mode and chip operating mode of port a change to FlexE mode. At this time, port b remains in Eth mode, therefore, communication device A and communication device B cannot communicate normally. Furthermore, the control management entity can no longer manage communication device B (referred to as communication device B being disconnected), because the instructions issued by the control management entity to communication device B cannot be forwarded to communication device B through communication device A.

[0113] See Figure 2b This figure is a schematic diagram of an exemplary application scenario provided by an embodiment of this application.

[0114] like Figure 2b As shown, the control and management entity is connected to communication device A, which in turn is connected to communication device B. Communication device A communicates via port a and port b of communication device B. Both ports a and b operate in Eth mode. That is, both the port configuration mode and chip operating mode of port a and port b are in Eth mode. In this configuration, the control and management entity can manage communication device A and, through communication device A, manage communication device B.

[0115] If a communication device C is inserted between communication device A and communication device B, where port c of communication device C is used to communicate with port a, and port d of communication device C is used to communicate with port b, and both ports c and d operate in FlexE mode (i.e., both port c's port configuration mode and chip operating mode are FlexE mode, and both port d's port configuration mode and chip operating mode are FlexE mode), then because port a operates in Eth mode while port c operates in FlexE mode, communication device A and communication device C cannot communicate normally, thus causing communication device C to become disconnected from communication device B. Furthermore, because port b operates in Eth mode while port d operates in FlexE mode, communication device B and communication device C also cannot communicate normally.

[0116] See Figure 2c This figure is a schematic diagram of an exemplary application scenario provided by an embodiment of this application.

[0117] like Figure 2c As shown, the control and management entity is connected to communication device A, and communication device A is connected to communication device B. Communication device A communicates using port a and port b of communication device B. Both ports a and b operate in FlexE mode. That is, both the port configuration mode and chip operating mode of port a are FlexE mode; both the port configuration mode and chip operating mode of port b are FlexE mode. In this state, the control and management entity can manage communication device A and, through communication device A, manage communication device B.

[0118] If a communication device C is inserted between communication device A and communication device B, where port c of communication device C is used to communicate with port a, and port d of communication device C is used to communicate with port b, and both ports c and d operate in Eth mode (i.e., both port c's port configuration mode and chip operating mode are Eth mode, and both port d's port configuration mode and chip operating mode are Eth mode), then because port a operates in FlexE mode while port c operates in Eth mode, communication device A and communication device C cannot communicate normally, thus causing communication device C to become disconnected from communication device B. Furthermore, because port d operates in Eth mode while port b operates in FlexE mode, communication device B and communication device C also cannot communicate normally.

[0119] Based on the above Figure 2a , Figure 2b as well as Figure 2c As can be seen from the description, in the above scenarios, there is a phenomenon where two communication devices cannot communicate normally, and further, it can lead to some communication devices becoming disconnected.

[0120] In view of this, embodiments of this application provide an interface configuration method that can efficiently configure ports, thereby enabling normal communication between communication devices.

[0121] Next, the interface configuration method provided in the embodiments of this application will be briefly introduced with reference to the accompanying drawings.

[0122] See Figure 3 This figure is a signaling interaction diagram of the interface configuration method provided in the embodiment of this application. Figure 3 The interface configuration method 100 shown includes a communication device 1 with port 1 and a communication device 2 with port 2, wherein port 1 is used to communicate with port 2. Method 100 may include, for example, the following steps S101-S106.

[0123] S101: Communication device 1 determines that the chip operating mode of port 2 is Eth mode.

[0124] In one example, before executing S101, both the port configuration mode and the chip operating mode of port 1 are FlexE mode.

[0125] In some embodiments, if FlexE communication is established between communication device 1 and communication device 2, communication device 1 can receive FlexE overhead frames from communication device 2. Therefore, in one implementation, if communication device 1 does not receive a FlexE overhead frame sent by communication device 2 within a preset time, communication device 1 can determine that the chip operating mode of port 2 is Eth mode. Regarding FlexE overhead frames, please refer to section 7.3.1 of the Optical Internetworking Forum (OIF) Flex Ethernet 2.0 standard; it will not be described in detail here.

[0126] S102: Communication device 1 switches the chip operating mode of port 1 to Eth mode.

[0127] Since the chip operating mode of port 1 is FlexE mode and the chip operating mode of port 2 is Eth mode, ports 1 and 2 cannot communicate normally, meaning communication device 1 and communication device 2 cannot communicate normally. To enable normal communication between communication device 1 and communication device 2, in this embodiment, communication device 1 can switch the chip operating mode of port 1 to Eth mode. In this way, both the chip operating modes of port 1 and port 2 are in Eth mode, thus allowing communication device 1 and communication device 2 to communicate normally.

[0128] S103: Communication device 2 receives configuration instruction 1 sent by the control and management entity. Configuration instruction 1 is used to instruct communication device 2 to configure port 2 in FlexE mode.

[0129] In one example, before executing S103, both the port configuration mode and chip configuration mode of port 2 are in Eth mode.

[0130] In this embodiment, if the communication device 2 is directly connected to the control management entity, the control management entity can directly send the configuration instruction 1 to the communication device 2. If the communication device 2 and the control management entity also include a communication device 1, then after executing S102, the communication device 1 and the communication device 2 can communicate. Therefore, the control management entity can send the configuration instruction 1 to the communication device 2 through the communication device 1.

[0131] S104: Instruction information 1 sent by communication device 2 to communication device 1, the instruction information 1 being used to instruct communication device 1 to configure the chip operating mode of port 1 to FlexE mode.

[0132] S105: Communication device 2 configures both port configuration mode and chip operating mode of port 2 to FlexE mode.

[0133] After receiving the configuration instruction 1, in order to ensure that communication device 1 and communication device 2 can still communicate normally after configuring port 2 based on the configuration instruction 1, communication device 2 can send instruction information 1 to communication device 1 before configuring port 2 based on the configuration instruction 1. Instruction information 1 is used to instruct communication device 1 to configure the chip working mode of port 1 to FlexE mode.

[0134] Regarding S105, it should be noted that in one implementation, after receiving configuration instruction 1, communication device 2 can immediately configure the port configuration mode of port 2 to FlexE mode, then send instruction information 1 to communication device 1, and after sending instruction information 1 to communication device 1, configure the chip operating mode of port 2 to FlexE mode. In another implementation, communication device 2 can, after sending instruction information 1 to communication device 1, configure both the port configuration mode and the chip operating mode of port 2 to FlexE mode.

[0135] This application does not specifically limit the indication information 1. In one example, the indication information 1 can be a remote fault (RF) indication. The RF indication is the PCS layer RF interrupt signal in the Institute of Electrical and Electronics Engineers (IEEE) 802.3Eth standard. For details on RF indication, please refer to the relevant descriptions in the IEEE 802.3Eth standard; they will not be elaborated upon here.

[0136] In another example, the indication information 1 can be a 00 code block in Ethernet frame 1. When the received 00 code block value is 0x00, it indicates that the chip operating mode of the transmitting port is Eth mode; when the received 00 code block value is 0x05, it indicates that the chip operating mode of the transmitting port is FlexE mode. For related explanations of the 00 code block, please refer to the relevant description in section 82.2.3.3 of IEEE 802.3-2015, which will not be detailed here. In this embodiment, if the indication information 1 is a 00 code block in Ethernet frame 1, then the value of the 00 code block can be 0x05.

[0137] In yet another example, the aforementioned indication information 1 can be carried in Ethernet frame 1 sent by communication device 2 to communication device 1. This Ethernet frame 1 may include an extended type length value (TLV) field used to carry the indication information 1. In one implementation, a new type of Ethernet frame can be defined to carry the indication information 1. See also... Figure 4 , Figure 4 This is a schematic diagram of the structure of an Ethernet frame 1 provided in an embodiment of this application.

[0138] like Figure 4 As shown, the Ethernet frame 1 includes a destination address field, a source address field, a type field, a chip operating mode switching notification field, and a frame check sequence (FCS) field. The definitions of the destination address field, source address field, and type field can be found in section 3.1.1 of IEEE 802.3-2015 for Eth frames, and will not be detailed here. In this embodiment, the chip operating mode switching notification field can be an extended TLV field, which carries the aforementioned indication information 1. In one example, as... Figure 4As shown, the chip operating mode switching notification field may include a message version field, a message type field, a message length field, and a message TLV field. The message TLV field may include a TLV type field, a TLV length field, and a TLV value field.

[0139] for Figure 4 In the Ethernet frame 1 shown, the indication information 1 can be carried by the message type field, or it can be carried by both the message type field and the message TLV field. This application embodiment does not make specific limitations.

[0140] Regarding Ethernet frame 1 shown in Figure 1, in one example, the value of the type field can be 0x9100, the value of the messagevesion field can be 0, the value of the message type can be 1, the value of the message length is the length of Ethernet frame 1, the value of the TLV type field can be 1, the content of the TLV length field is the string "HUAWEI ETH SWITCHFLEXE", and the value carried by the TLV value is the length of the string "HUAWEI ETH SWITCH FLEXE".

[0141] In one implementation of this application, to ensure that communication device 1 can receive the indication information 1, communication device 2 can periodically send the indication information 1 to communication device 1 within a predetermined time period. Taking the indication information 1 as an RF indication as an example, in this application embodiment, communication device 2 can periodically send the RF indication to communication device 1 within 20 milliseconds, for example. This application embodiment does not specifically limit the predetermined time period; the duration of the predetermined time period can be, for example, less than 1 second. The reason for this is that if communication device 1 receives the RF indication for more than 1 second, communication device 1 will trigger an alarm.

[0142] S106: Communication device 1 configures the chip operating mode of port 1 to FlexE mode according to instruction information 1.

[0143] In one example, after receiving instruction information 1, communication device 1 can configure the chip operating mode of port 1 to FlexE mode based on instruction information 1. In this way, both the port configuration mode and the chip operating mode of port 1 are FlexE mode, and both the port configuration mode and the chip operating mode of port 2 are FlexE mode. Therefore, FlexE communication can be performed normally between port 1 and port 2.

[0144] In one implementation of this application embodiment, after executing S106, the communication device 1 can periodically detect the chip operating mode of port 2, and when the chip operating mode of port 2 is different from the chip operating mode of port 1, configure the chip operating mode of port 1 so that the chip operating mode of port 1 is consistent with the chip operating mode of port 2.

[0145] As an example: After executing S106, the chip operating mode of port 1 is FlexE mode. If communication device 1 determines that the chip operating mode of port 2 is Eth mode, then communication device 1 can configure the chip operating mode of port 1 to Eth mode, thereby making the chip operating mode of port 1 the same as that of port 2, thus enabling communication between port 1 and port 2. The specific implementation of communication device 1 determining that the chip operating mode of port 2 is Eth mode can be found in the description of S101 above, and will not be detailed here.

[0146] As another example: After communication device 1 can configure the chip operating mode of port 1 to Eth mode, if communication device 1 determines that the chip operating mode of port 2 is FlexE mode, then communication device 1 can configure the chip operating mode of port 1 to FlexE mode, so that the chip operating mode of port 1 is the same as the chip operating mode of port 2, thereby enabling communication between port 1 and port 2.

[0147] In this embodiment of the application, the communication device 1 determines that the chip working mode of port 2 is FlexE mode. In specific implementation, there are multiple implementation methods. Several possible implementation methods are introduced below.

[0148] In one implementation: considering that if the chip operating mode of port 2 is Eth mode, then port 1 can receive a block lock signal from port 2. Therefore, if communication device 1 does not receive a block lock signal from communication device 2 within a preset time period, it can be determined that the chip operating mode of port 2 is FlexE mode. For details regarding the block lock signal, please refer to the relevant description in section 82.2.19.3 of IEEE 802.3-2015; it will not be elaborated upon here.

[0149] In one implementation: considering that if the chip operating mode of port 2 is Eth mode, then port 1 can receive the alignment marker lock signal from port 2. Therefore, if communication device 1 does not receive the alignment marker lock signal sent by communication device 2 within a preset time period, it can be determined that the chip operating mode of port 2 is FlexE mode. Regarding the alignment marker lock signal, please refer to the relevant description in section 82.2.19.3 of IEEE 802.3-2015; it will not be detailed here.

[0150] In one implementation: communication device 1 can determine the chip operating mode of port 2 based on the value of the O0 code block sent by communication device 2. Specifically: when the value of the O0 code block sent by communication device 2 is 0x05, communication device 1 can determine that the chip operating mode of port 2 is FlexE mode; when the value of the O0 code block sent by communication device 2 is 0x00, communication device 1 can determine that the chip operating mode of port 2 is Eth mode.

[0151] In one implementation: Communication device 1 can send an Ethernet frame 2 to communication device 2. The Ethernet frame 2 may include indication information 2, which is used to determine whether the chip operating mode of port 2 is Eth mode. If the chip operating mode of port 2 is Eth mode, then communication device 2 can send a response to the Ethernet frame 2 to communication device 1. If the chip operating mode of port 2 is FlexE mode, then communication device 2 cannot correctly parse the Ethernet frame 2, and therefore communication device 2 will not send a response to the Ethernet frame 2 to communication device 1. Therefore, in this case, if communication device 1 does not receive a response to the Ethernet frame 2 from communication device 2 after sending the Ethernet frame 2, then communication device 1 can determine that the chip operating mode of port 2 is Eth mode.

[0152] Regarding EtherFrame 2, it should be noted that the structure of EtherFrame 2 can be found in [reference needed]. Figure 4 In one example, the indication information 2 can be carried by the message type field of Ethernet frame 2, or it can be carried by both the message type field and the message TLV field of Ethernet frame 2. This application embodiment does not make specific limitations.

[0153] For example, indication information 2 can be carried by the message type field of Ethernet frame 2, and the value of the message type field of Ethernet frame 2 can be 2. Alternatively, indication information 2 can be carried by both the message type field and the message TLV field of Ethernet frame 2. In this case, the value of the message type field of Ethernet frame 2 can be 1, and the value of the TLV type field of Ethernet frame 2 can be 2. Furthermore, the TLV value field of Ethernet frame 2 can also be used, for example, to indicate that the chip operating mode of port 1 is Eth mode; this embodiment of the application does not impose specific limitations.

[0154] In this embodiment of the application, the response sent by the communication device 2 to the communication device 1 in response to the Ethernet frame 2 may be, for example, an Ethernet frame 3. The Ethernet frame 3 includes indication information 3, which is used to indicate the response.

[0155] Regarding EtherFrame 3, it should be noted that the structure of EtherFrame 3 can be found in [reference needed]. Figure 4 In one example, the indication information 3 can be carried by the message type field of Ethernet frame 3, or it can be carried by both the message type field and the message TLV field of Ethernet frame 3. This application embodiment does not make specific limitations.

[0156] For example, indication information 3 can be carried by the message type field of Ethernet frame 3, and the value of the message type field of Ethernet frame 3 can be 3. Alternatively, indication information 3 can be carried by both the message type field and the message TLV field of Ethernet frame 3. In this case, the value of the message type field of Ethernet frame 3 can be 1, and the value of the TLV type field of Ethernet frame 3 can be 3. Furthermore, the TLV value field of Ethernet frame 3 can also be used, for example, to indicate that the chip operating mode of port 2 is Eth mode; this embodiment of the application does not impose specific limitations.

[0157] In one implementation of this application, when the port configuration mode of port 1 is FlexE mode and the chip operating mode is Eth mode, communication device 1 can send indication information 4 to communication device 2. Indication information 4 instructs communication device 2 to configure the chip operating mode of port 2 to FlexE mode. After receiving indication information 4, if the chip operating mode of port 2 is FlexE mode, communication device 2 can ignore indication information 4. If the chip operating mode of port 2 is FlexE mode, communication device 2 can configure the chip operating mode of port 2 to FlexE mode based on indication information 4.

[0158] Correspondingly, if port 2's port configuration mode is FlexE mode and its chip operating mode is Eth mode, communication device 2 can also send instruction information 5 to communication device 1. Instruction information 5 instructs communication device 1 to configure port 1's chip operating mode to FlexE mode. In this case, after receiving instruction information 5, communication device 1 can configure port 1's chip operating mode to FlexE mode. And after receiving instruction information 4, communication device 2 can configure port 2's chip operating mode to FlexE mode. In this way, communication device 1 and communication device 2 can perform FlexE communication.

[0159] The above has introduced method 100. The following section describes how to apply some or all of the steps in method 100 to… Figure 2a , Figure 2b as well as Figure 2c The specific implementation method in the scenario shown.

[0160] for Figure 2a Application scenarios shown:

[0161] First, the control management entity sends configuration command a to communication device A, instructing communication device A to configure port a to FlexE mode. Based on configuration command a, communication device A configures both the port configuration mode and chip operating mode of port a to FlexE mode. Then, communication device A determines that the chip operating mode of port b is Eth mode, and therefore configures the chip operating mode of port a to Eth mode. The control management entity then sends configuration command b to communication device B through communication device A, instructing communication device B to configure port b to FlexE mode. Upon receiving configuration command b, communication device B sends instruction information 1 to communication device A, instructing communication device A to configure the chip operating mode of port a to FlexE mode. Upon receiving instruction information 1, communication device A switches the chip operating mode of port a to FlexE mode. After receiving configuration command b, communication device B configures the port configuration mode of port b to FlexE mode, and after sending instruction information 1 to communication device A, configures the chip operating mode of port b to FlexE mode. Thus, both port a and port b enable the switching from Eth mode to FlexE mode, allowing FlexE communication between communication device A and communication device B, and communication device B will not become unmanaged.

[0162] for Figure 2b Application scenarios shown:

[0163] First, communication device C determines that the chip operating mode of port a is Eth mode, therefore, communication device C configures the chip operating mode of port c to Eth mode. Communication device C determines that the chip operating mode of port b is Eth mode, therefore, communication device C configures the chip operating mode of port d to Eth mode. Then, the control management entity sends a configuration command c to communication device C through communication device A. Configuration command c instructs communication device C to configure ports c and d to Eth mode. After receiving configuration command c, communication device C configures the port configuration mode of both ports c and d to Eth mode. Thus, both ports c and d have achieved a switch from FlexE mode to Eth mode, enabling Eth communication between communication devices A and C, as well as between communication devices B and C, without disconnecting from communication device C.

[0164] for Figure 2c Application scenarios shown:

[0165] Communication device A determines that the chip operating mode of port c is Eth mode, therefore communication device A configures the chip operating mode of port a to Eth mode. The control management entity sends a configuration command d to communication device C through communication device A. Configuration command d instructs communication device C to configure both ports c and d to FlexE mode. After receiving configuration command d, communication device C sends instruction information 1 to communication device A, instructing communication device A to configure the chip operating mode of port a to FlexE mode. After receiving instruction information 1, communication device A switches the chip operating mode of port a to FlexE mode. After receiving configuration command d, communication device C configures the port configuration mode of port c to FlexE mode, and after sending instruction information 1 to communication device A, configures the chip operating mode of port c to FlexE mode. After receiving configuration command d, communication device C can also configure both the port configuration mode and chip operating mode of port d to FlexE mode. Therefore, both port c and port d enable the switching from Eth mode to FlexE mode. Communication devices A and C can communicate with each other via FlexE, as can communication devices B and C. Moreover, communication devices B and C will not become disconnected.

[0166] Figure 5 This is a flowchart illustrating another interface configuration method provided in an embodiment of this application. Figure 5The interface configuration method 200 shown can be executed by a first communication device, which includes a first port. The first communication device can establish a communication connection with a second port of a second communication device through the first port. The first communication device can be, for example, the communication device 1 mentioned in the above embodiments. Figure 5 The method 200 shown can be used to specifically implement the method 100 mentioned in the above embodiments, and is used to execute the steps performed by the communication device 1 in the above method 100. In method 200: the second communication device can correspond to the communication device 2 in method 100, the first port can correspond to port 1 in method 100, and the second port can correspond to port 2 in method 100.

[0167] The method 200 may include, for example, the following steps S201-S202.

[0168] S201: Determine that the chip operating mode of the second port of the second communication device is Eth mode.

[0169] S202: Switch the chip operating mode of the first port of the first communication device from FlexE mode to Eth mode, wherein the first communication device communicates with the second port of the second communication device through the first port.

[0170] In one implementation, determining that the chip operating mode of the second port of the second communication device is Ethernet mode includes:

[0171] If no FlexE overhead frame is received from the second communication device within a preset time, the chip operating mode of the second port is determined to be Eth mode.

[0172] In one implementation, the method further includes:

[0173] The device receives a first instruction message sent by the second communication device, the first instruction message being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode.

[0174] The first instruction information mentioned here can correspond to instruction information 1 in method 100.

[0175] In one implementation, the first indication information is a remote fault (RF) indication information.

[0176] In one implementation, the first indication information includes an O0 code block in a first Ethernet frame sent by the second communication device.

[0177] The first Ether frame mentioned here can correspond to Ether frame 1 in method 100.

[0178] In one implementation, receiving the first indication information sent by the second communication device includes:

[0179] The device receives a first Ethernet frame sent by the second communication device. The first Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes the first indication information.

[0180] The first Ether frame mentioned here can correspond to Ether frame 1 in method 100.

[0181] In one implementation, the method further includes:

[0182] Based on the first instruction information, the chip operating mode of the first port is switched from Eth mode to FlexE mode.

[0183] In one implementation, the method further includes:

[0184] The second communication device is instructed to configure the chip operating mode of the second port to FlexE mode.

[0185] In one implementation, instructing the second communication device to configure the chip operating mode of the second port to FlexE mode includes:

[0186] Within a predetermined time period, a second indication message is periodically sent to the second communication device. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

[0187] The second instruction mentioned here can correspond to instruction 4 in method 100.

[0188] In one implementation, after the first communication device switches the chip operating mode of the first port from Eth mode to FlexE mode, the method further includes:

[0189] The chip operating mode of the second port is determined to be Eth mode;

[0190] Switch the chip operating mode of the first port from FlexE mode to Eth mode.

[0191] In one implementation, after the first communication device switches the chip operating mode of the first port from FlexE mode to Eth mode, the method further includes:

[0192] The chip operating mode of the second port is determined to be FlexE mode;

[0193] Switch the chip operating mode of the first port from Eth mode to FlexE mode.

[0194] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0195] In response to the absence of a block lock signal from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

[0196] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0197] If no alignment mark lock signal is detected from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

[0198] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0199] Based on the value of the O0 code block sent by the second communication device, the chip operating mode of the second port is determined to be FlexE mode.

[0200] In one implementation,

[0201] The step of determining that the chip operating mode of the second port is FlexE mode includes:

[0202] Send a second Ethernet frame to the second communication device, the second Ethernet frame being used to determine the chip operating mode of the second port;

[0203] In response to the lack of a response from the second communication device for the second Ethernet frame, the chip operating mode of the second port is determined to be FlexE mode.

[0204] The second Ether frame mentioned here can correspond to Ether frame 2 in method 100.

[0205] In one implementation, the second Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including third indication information used to determine the chip operating mode of the second port.

[0206] The third instruction mentioned here can correspond to instruction 2 in method 100.

[0207] In one implementation, the port configuration mode of the first port is FlexE mode.

[0208] Figure 6This is a flowchart illustrating another interface configuration method provided in an embodiment of this application. Figure 6 The interface configuration method 300 shown can be executed by a first communication device, which includes a first port. The first communication device can establish a communication connection with a second port of a second communication device through the first port. The first communication device can be, for example, the communication device 1 mentioned in the above embodiments. Figure 6 The method 300 shown can be used to specifically implement the method 100 mentioned in the above embodiments, and is used to execute the steps performed by the communication device 1 in the above method 100. In method 300: the second communication device can correspond to the communication device 2 in method 100, the first port can correspond to port 1 in method 100, and the second port can correspond to port 2 in method 100.

[0209] The method 300 may include, for example, the following steps S301-S302.

[0210] S301: Receive first instruction information sent by the second communication device. The first instruction information is used to instruct the first communication device to configure the chip working mode of the first port to FlexE mode. The first communication device communicates with the second communication device through the first port.

[0211] S302: Switch the chip operating mode of the first port from Eth mode to FlexE mode.

[0212] The first instruction information mentioned here can correspond to instruction information 1 in method 100.

[0213] In one implementation, the first indication information is a remote fault (RF) indication information.

[0214] In one implementation, the first indication information includes an O0 code block in a first Ethernet frame sent by the second communication device.

[0215] The first Ether frame mentioned here can correspond to Ether frame 1 in method 100.

[0216] In one implementation, receiving the first indication information sent by the second communication device includes:

[0217] The device receives a first Ethernet frame sent by the second communication device. The first Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes the first indication information.

[0218] In one implementation, the method further includes:

[0219] The second communication device is instructed to configure the chip operating mode of the second port to FlexE mode, and the second communication device communicates with the first communication device through the second port.

[0220] In one implementation, instructing the second communication device to configure the chip operating mode of the second port to FlexE mode includes:

[0221] Within a predetermined time period, a second indication message is periodically sent to the second communication device. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

[0222] The second instruction mentioned here can correspond to instruction 4 in method 100.

[0223] In one implementation, the method further includes:

[0224] The chip operating mode of the second port is determined to be Eth mode;

[0225] Switch the chip operating mode of the first port from FlexE mode to Eth mode.

[0226] In one implementation, determining that the chip operating mode of the second port is Ethernet mode includes:

[0227] If no FlexE overhead frame is received from the second communication device within a preset time, the chip operating mode of the second port is determined to be Eth mode.

[0228] In one implementation, after switching the chip operating mode of the first port from Eth mode to FlexE mode, the method further includes:

[0229] The chip operating mode of the second port is determined to be Eth mode;

[0230] Switch the chip operating mode of the first port from FlexE mode to Eth mode.

[0231] In one implementation, after the first communication device switches the chip operating mode of the first port from FlexE mode to Eth mode, the method further includes:

[0232] The chip operating mode of the second port is determined to be FlexE mode;

[0233] Switch the chip operating mode of the first port from Eth mode to FlexE mode.

[0234] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0235] In response to the absence of a block lock signal from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

[0236] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0237] If no alignment mark lock signal is detected from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

[0238] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0239] Based on the value of the O0 code block sent by the second communication device, the chip operating mode of the second port is determined to be FlexE mode.

[0240] In one implementation, the method further includes:

[0241] Send a second Ethernet frame to the second communication device, the second Ethernet frame being used to determine the chip operating mode of the second port;

[0242] The step of determining that the chip operating mode of the second port is FlexE mode includes:

[0243] In response to the lack of a response from the second communication device for the second Ethernet frame, the chip operating mode of the second port is determined to be FlexE mode.

[0244] The second Ether frame mentioned here can correspond to Ether frame 2 in method 100.

[0245] In one implementation, the second Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including third indication information used to determine the chip operating mode of the second port.

[0246] The third instruction mentioned here can correspond to instruction 2 in method 100.

[0247] In one implementation, the port configuration mode of the first port is FlexE mode.

[0248] Figure 7This is a flowchart illustrating another interface configuration method provided in an embodiment of this application. Figure 7 The interface configuration method 400 shown can be executed by a first communication device, which includes a first port. The first communication device can establish a communication connection with a second port of a second communication device through the first port. The first communication device can be, for example, the communication device 1 mentioned in the above embodiments. Figure 7 The method 400 shown can be used to specifically implement the method 100 mentioned in the above embodiments, and to perform the steps executed by the communication device 1 in the above method 100. In method 400: the second communication device can correspond to the communication device 2 in method 100, the first port can correspond to port 1 in method 100, and the second port can correspond to port 2 in method 100.

[0249] The method 400 may include, for example, the following steps S401-S402.

[0250] S401: Determine the chip operating mode of the second port of the second communication device.

[0251] S402: When the chip operating mode of the second port is different from that of the first port, the chip operating mode of the first port is adjusted to be the same as that of the second port, wherein the first communication device communicates with the second port of the second communication device through the first port.

[0252] In one implementation, adjusting the chip operating mode of the first port to the same chip operating mode as the second port includes:

[0253] Change the chip operating mode of the first port from Eth mode to FlexE mode.

[0254] In one implementation, adjusting the chip operating mode of the first port to the same chip operating mode as the second port includes:

[0255] Change the chip operating mode of the first port from FlexE mode to Eth mode.

[0256] In one implementation, the chip operating mode of the first port is FlexE mode, and determining the chip operating mode of the second port includes:

[0257] If no FlexE overhead frame is received from the second communication device within a preset time, the chip operating mode of the second port is determined to be Eth mode.

[0258] In one implementation, the method further includes:

[0259] The device receives a first instruction message sent by the second communication device, the first instruction message being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode.

[0260] The first instruction information mentioned here can correspond to instruction information 1 in method 100.

[0261] In one implementation, the first indication information is a remote fault (RF) indication information.

[0262] In one implementation, the first indication information includes an O0 code block in a first Ethernet frame sent by the second communication device.

[0263] In one implementation, receiving the first indication information sent by the second communication device includes:

[0264] The device receives a first Ethernet frame sent by the second communication device. The first Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes the first indication information.

[0265] The first Ether frame mentioned here can correspond to Ether frame 1 in method 100.

[0266] In one implementation, the method further includes:

[0267] Based on the first instruction information, the chip operating mode of the first port is switched from Eth mode to FlexE mode.

[0268] In one implementation, the method further includes:

[0269] The second communication device is instructed to configure the chip operating mode of the second port to FlexE mode.

[0270] In one implementation, instructing the second communication device to configure the chip operating mode of the second port to FlexE mode includes:

[0271] Within a predetermined time period, a second indication message is periodically sent to the second communication device. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

[0272] The second instruction mentioned here can correspond to instruction 4 in method 100.

[0273] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0274] In response to the absence of a block lock signal from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

[0275] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0276] If no alignment mark lock signal is detected from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

[0277] In one implementation, determining that the chip operating mode of the second port is FlexE mode includes:

[0278] Based on the value of the O0 code block sent by the second communication device, the chip operating mode of the second port is determined to be FlexE mode.

[0279] In one implementation, the method further includes:

[0280] Send a second Ethernet frame to the second communication device, the second Ethernet frame being used to determine the chip operating mode of the second port;

[0281] The step of determining that the chip operating mode of the second port is FlexE mode includes:

[0282] In response to the lack of a response from the second communication device for the second Ethernet frame, the chip operating mode of the second port is determined to be FlexE mode.

[0283] The second Ether frame mentioned here can correspond to Ether frame 2 in method 100.

[0284] In one implementation, the second Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including third indication information used to determine the chip operating mode of the second port.

[0285] The third instruction mentioned here can correspond to instruction 2 in method 100.

[0286] In one implementation, the port configuration mode of the first port is FlexE mode.

[0287] Figure 8 This is a flowchart illustrating another interface configuration method provided in an embodiment of this application. Figure 8The interface configuration method 500 shown can be executed by a second communication device, which includes a second port. The second communication device can establish a communication connection with the first port of the first communication device through the second port. The second communication device can be, for example, the communication device 2 mentioned in the above embodiments. Figure 8 The method 500 shown can be used to specifically implement the method 100 mentioned in the above embodiments, and to perform the steps executed by the communication device 2 in the above method 100. In method 500: the first communication device can correspond to the communication device 1 in method 100, the first port can correspond to port 1 in method 100, and the second port can correspond to port 2 in method 100.

[0288] The method 500 may include, for example, the following steps S501-S502.

[0289] S501: Obtain first indication information, the first indication information being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode.

[0290] S502: Send the first instruction information to the first communication device.

[0291] The first instruction information mentioned here can correspond to instruction information 1 in method 100.

[0292] In one implementation, before obtaining the first indication information, the method further includes:

[0293] The second communication device receives a configuration instruction sent by a control management entity, the configuration instruction being used to instruct the second communication device to configure the second port in FlexE mode.

[0294] In one implementation, after receiving the configuration instruction sent by the control management entity, the method further includes:

[0295] Based on the configuration instructions, the port configuration mode of the second port is configured to FlexE mode.

[0296] In one implementation, the first indication information is a remote fault (RF) indication information.

[0297] In one implementation, the first indication information is the O0 code block in the first Ethernet frame sent by the second communication device.

[0298] The first Ether frame mentioned here can correspond to Ether frame 1 in method 100.

[0299] In one implementation, sending the first indication information to the first communication device includes:

[0300] The first Ethernet frame is sent to the first communication device. The first Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes the first indication information.

[0301] In one implementation, after sending the first indication information to the first communication device, the method further includes:

[0302] Configure the chip operating mode of the second port to FlexE mode.

[0303] In one implementation, sending the first indication information to the first communication device includes:

[0304] The first instruction information is periodically sent to the first communication device within a predetermined time period.

[0305] In one implementation, the method further includes:

[0306] The device receives a second instruction message sent by the first communication device, the second instruction message being used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

[0307] The second instruction mentioned here can correspond to instruction 4 in method 100.

[0308] In one implementation, the method further includes:

[0309] The device receives a second Ethernet frame sent by the first communication device, the second Ethernet frame being used to determine the chip operating mode of the second port.

[0310] The second Ether frame mentioned here can correspond to Ether frame 2 in method 100.

[0311] In one implementation, the method further includes:

[0312] The chip at the second port operates in Eth mode and sends a response to the second Ethernet frame to the first communication device.

[0313] In one implementation, the second Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including third indication information used to determine the chip operating mode of the second port.

[0314] The third instruction mentioned here can correspond to instruction 2 in method 100.

[0315] In one implementation, sending a response to the second Ethernet frame to the first communication device includes:

[0316] Send a third Ethernet frame to the first communication device.

[0317] The third Ether frame mentioned here can correspond to Ether frame 3 in method 100.

[0318] In one implementation, the third Ethernet frame includes an Extended Type Length Value (TLV) field, the extended TLV field including fourth indication information for indicating the response.

[0319] The fourth instruction here can correspond to instruction 3 in method 100.

[0320] For the specific implementation of methods 200, 300, 400 and 500 above, please refer to the description of method 100 above, which will not be repeated here.

[0321] In addition, this application also provides a communication device 900, see [link to relevant documentation]. Figure 9 As shown. Figure 9 This is a schematic diagram of a communication device provided in an embodiment of this application. The communication device 900 includes a transceiver unit 901 and a processing unit 902. The communication device 900 can be used to execute method 100, method 200, method 300, method 400, or method 500 in the above embodiments.

[0322] In one example, the communication device 900 can execute method 100 in the above embodiments. When the communication device 900 is used to execute method 100 in the above embodiments, the communication device 900 is equivalent to the communication device 1 in method 100. The transceiver unit 901 is used to execute the transmit / receive operation performed by the communication device 1 in method 100. The processing unit 902 is used to execute operations other than transmit / receive operations performed by the communication device 1 in method 100. For example, the processing unit 902 is used to determine that the chip operating mode of port 2 is Eth mode and switch the chip operating mode of port 1 to Eth mode. As another example, the transceiver unit 901 is used to receive the indication information 1 sent by the communication device 2, the indication information 1 is used to instruct the communication device 1 to configure the chip operating mode of port 1 to FlexE mode; the processing unit 902 is used to configure the chip operating mode of port 1 to FlexE mode.

[0323] In one example, the communication device 900 can execute method 100 in the above embodiments. When the communication device 900 is used to execute method 100 in the above embodiments, the communication device 900 is equivalent to the communication device 2 in method 100. The transceiver unit 901 is used to execute the transmit / receive operations performed by the communication device 2 in method 100. The processing unit 902 is used to execute operations other than transmit / receive operations performed by the communication device 2 in method 100. For example, the processing unit 902 is used to obtain indication information 1, which instructs the communication device 1 to configure the chip operating mode of port 1 to FlexE mode; the transceiver unit 901 is used to send the indication information 1 to the communication device 1.

[0324] In one example, the communication device 900 can execute method 200 in the above embodiments. When the communication device 900 is used to execute method 200 in the above embodiments, the communication device 900 is equivalent to the first communication device in method 200. The transceiver unit 901 is used to execute the transmit / receive operations performed by the first communication device in method 200. The processing unit 902 is used to execute operations other than transmit / receive operations performed by the first communication device in method 200. For example, the processing unit 902 is used to determine that the chip operating mode of the second port is Eth mode, and switch the chip operating mode of the first port to Eth mode.

[0325] In one example, the communication device 900 can execute method 300 in the above embodiments. When the communication device 900 is used to execute method 300 in the above embodiments, the communication device 900 is equivalent to the first communication device in method 300. The transceiver unit 901 is used to execute the transmit / receive operation performed by the first communication device in method 300. The processing unit 902 is used to execute operations other than the transmit / receive operation performed by the first communication device in method 300. For example, the transceiver unit 901 is used to receive first indication information sent by the second communication device, the first indication information being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode; the processing unit 902 is used to configure the chip operating mode of the first port to FlexE mode.

[0326] In one example, the communication device 900 can execute the method 400 in the above embodiments. When the communication device 900 is used to execute the method 400 in the above embodiments, the communication device 900 is equivalent to the first communication device in method 400. The transceiver unit 901 is used to execute the transmit / receive operation performed by the first communication device in method 400. The processing unit 902 is used to execute operations other than the transmit / receive operation performed by the first communication device in method 400. For example, the processing unit 902 is used to determine the chip operating mode of the second port of the second communication device, and when the chip operating mode of the second port is different from the chip operating mode of the first port, adjust the chip operating mode of the first port to be the same as the chip operating mode of the second port.

[0327] In one example, the communication device 900 can execute method 500 in the above embodiments. When the communication device 900 is used to execute method 500 in the above embodiments, the communication device 900 is equivalent to the second communication device in method 500. The transceiver unit 901 is used to execute the transmit / receive operations performed by the second communication device in method 500. The processing unit 902 is used to execute operations other than transmit / receive operations performed by the second communication device in method 500. For example, the processing unit 902 is used to obtain first indication information, which instructs the first communication device to configure the chip operating mode of the first port to FlexE mode; the transceiver unit 901 is used to send the first indication information to the first communication device.

[0328] In addition, this application also provides a communication device 1000, see [link to relevant documentation]. Figure 10 As shown, Figure 10 This is a schematic diagram of a communication device provided in an embodiment of this application. The communication device 1000 includes a communication interface 1001 and a processor 1002 connected to the communication interface 1001. The communication device 1000 can be used to execute method 100, method 200, method 300, method 400 or method 500 in the above embodiments.

[0329] In one example, the communication device 1000 can execute method 100 in the above embodiments. When the communication device 1000 is used to execute method 100 in the above embodiments, the communication device 1000 is equivalent to the communication device 1 in method 100. The communication interface 1001 is used to execute the transmit and receive operations performed by the communication device 1 in method 100. The processor 1002 is used to execute operations other than transmit and receive operations performed by the communication device 1 in method 100. For example, the processor 1002 is used to determine that the chip operating mode of port 2 is Eth mode and switch the chip operating mode of port 1 to Eth mode. Another example: the communication interface 1001 is used to receive instruction information 1 sent by the communication device 2, the instruction information 1 being used to instruct the communication device 1 to configure the chip operating mode of port 1 to FlexE mode; the processor 1002 is used to configure the chip operating mode of port 1 to FlexE mode.

[0330] In one example, the communication device 1000 can execute method 100 in the above embodiments. When the communication device 1000 is used to execute method 100 in the above embodiments, the communication device 1000 is equivalent to the communication device 2 in method 100. The communication interface 1001 is used to execute the transmit and receive operations performed by the communication device 2 in method 100. The processor 1002 is used to execute operations other than transmit and receive operations performed by the communication device 2 in method 100. For example, the processor 1002 is used to obtain indication information 1, which instructs the communication device 1 to configure the chip operating mode of port 1 to Flexible Ethernet (FlexE) mode; the communication interface 1001 is used to send the indication information 1 to the communication device 1.

[0331] In one example, the communication device 1000 can execute method 200 in the above embodiments. When the communication device 1000 is used to execute method 200 in the above embodiments, the communication device 1000 is equivalent to the first communication device in method 200. The communication interface 1001 is used to execute the transmit and receive operations performed by the first communication device in method 200. The processor 1002 is used to execute operations other than transmit and receive operations performed by the first communication device in method 200. For example, the processor 1002 is used to determine that the chip operating mode of the second port is Eth mode, and switch the chip operating mode of the first port to Eth mode.

[0332] In one example, the communication device 1000 can execute method 300 in the above embodiments. When the communication device 1000 is used to execute method 300 in the above embodiments, the communication device 1000 is equivalent to the first communication device in method 300. The communication interface 1001 is used to execute the transmit and receive operations performed by the first communication device in method 300. The processor 1002 is used to execute operations other than transmit and receive operations performed by the first communication device in method 300. For example, the communication interface 1001 is used to receive first indication information sent by the second communication device, the first indication information being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode; the processor 1002 is used to configure the chip operating mode of the first port to FlexE mode.

[0333] In one example, the communication device 1000 can execute the method 400 in the above embodiments. When the communication device 1000 is used to execute the method 400 in the above embodiments, the communication device 1000 is equivalent to the first communication device in method 400. The communication interface 1001 is used to execute the transmit and receive operations performed by the first communication device in method 400. The processor 1002 is used to execute operations other than transmit and receive operations performed by the first communication device in method 400. For example, the processor 1002 is used to determine the chip operating mode of the second port of the second communication device, and when the chip operating mode of the second port is different from the chip operating mode of the first port, adjusts the chip operating mode of the first port to be the same as the chip operating mode of the second port.

[0334] In one example, the communication device 1000 can execute method 500 in the above embodiments. When the communication device 1000 is used to execute method 500 in the above embodiments, the communication device 1000 is equivalent to the second communication device in method 500. The communication interface 1001 is used to execute the transmit and receive operations performed by the second communication device in method 500. The processor 1002 is used to execute operations other than transmit and receive operations performed by the second communication device in method 500. For example, the processor 1002 is used to obtain first indication information, which instructs the first communication device to configure the chip operating mode of the first port to FlexE mode; the communication interface 1001 is used to send the first indication information to the first communication device.

[0335] In addition, this application also provides a communication device 1100, see [link to relevant documentation]. Figure 11 As shown, Figure 11 This is a schematic diagram of the structure of a communication device provided in an embodiment of this application.

[0336] The communication device 1100 can be used to execute method 100, method 200, 300, method 400 or method 500 in the above embodiments.

[0337] like Figure 11 As shown, the communication device 1100 may include a processor 1110, a memory 1120 coupled to the processor 1110, and a transceiver 1130. The transceiver 1130 may be, for example, a communication interface, an optical module, etc. The processor 1110 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor may also be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 1110 may refer to a single processor or may include multiple processors. Memory 1120 may include volatile memory, such as random-access memory (RAM); memory may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 1120 may also include combinations of the above types of memory. Memory 1120 may refer to a single memory or may include multiple memories. In one embodiment, memory 1120 stores computer-readable instructions, which include multiple software modules, such as a sending module 1121, a processing module 1122, and a receiving module 1123. After the processor 1110 executes each software module, it can perform corresponding operations according to the instructions of each software module. In this embodiment, the operation performed by a software module actually refers to the operation performed by the processor 1110 according to the instructions of the software module.

[0338] In one example, the communication device 1100 can execute the method 100 in the above embodiments. When the communication device 1100 is used to execute the method 100 in the above embodiments, the communication device 1100 is equivalent to the communication device 1 in method 100. The transceiver 1130 is used to execute the transmit and receive operations performed by the communication device 1 in method 100. The processor 1110 is used to execute operations other than transmit and receive operations performed by the communication device 1 in method 100. For example, the processor 1110 is used to determine that the chip operating mode of port 2 is Eth mode and switch the chip operating mode of port 1 to Eth mode. As another example, the transceiver 1130 is used to receive the indication information 1 sent by the communication device 2, the indication information 1 is used to instruct the communication device 1 to configure the chip operating mode of port 1 to FlexE mode; the processor 1110 is used to configure the chip operating mode of port 1 to FlexE mode.

[0339] In one example, the communication device 1100 can execute method 100 in the above embodiments. When the communication device 1100 is used to execute method 100 in the above embodiments, the communication device 1100 is equivalent to the communication device 2 in method 100. The transceiver 1130 is used to execute the transmit / receive operations performed by the communication device 2 in method 100. The processor 1110 is used to execute operations other than transmit / receive operations performed by the communication device 2 in method 100. For example, the processor 1110 is used to obtain indication information 1, which instructs the communication device 1 to configure the chip operating mode of port 1 to FlexE mode; the transceiver 1130 is used to send the indication information 1 to the communication device 1.

[0340] In one example, the communication device 1100 can execute method 200 in the above embodiments. When the communication device 1100 is used to execute method 200 in the above embodiments, the communication device 1100 is equivalent to the first communication device in method 200. The transceiver 1130 is used to execute the transmit and receive operations performed by the first communication device in method 200. The processor 1110 is used to execute operations other than transmit and receive operations performed by the first communication device in method 200. For example, the processor 1110 is used to determine that the chip operating mode of the second port is Eth mode and switch the chip operating mode of the first port to Eth mode.

[0341] In one example, the communication device 1100 can execute method 300 in the above embodiments. When the communication device 1100 is used to execute method 300 in the above embodiments, the communication device 1100 is equivalent to the first communication device in method 300. The transceiver 1130 is used to execute the transmit and receive operations performed by the first communication device in method 300. The processor 1110 is used to execute operations other than transmit and receive operations performed by the first communication device in method 300. For example, the transceiver 1130 is used to receive first indication information sent by the second communication device, the first indication information being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode; the processor 1110 is used to configure the chip operating mode of the first port to FlexE mode.

[0342] In one example, the communication device 1100 can execute the method 400 in the above embodiments. When the communication device 1100 is used to execute the method 400 in the above embodiments, the communication device 1100 is equivalent to the first communication device in method 400. The transceiver 1130 is used to execute the transmit and receive operations performed by the first communication device in method 400. The processor 1110 is used to execute operations other than transmit and receive operations performed by the first communication device in method 400. For example, the processor 1110 is used to determine the chip operating mode of the second port of the second communication device, and when the chip operating mode of the second port is different from the chip operating mode of the first port, adjusts the chip operating mode of the first port to be the same as the chip operating mode of the second port.

[0343] In one example, the communication device 1100 can execute method 500 in the above embodiments. When the communication device 1100 is used to execute method 500 in the above embodiments, the communication device 1100 is equivalent to the second communication device in method 500. The transceiver 1130 is used to execute the transmit and receive operations performed by the second communication device in method 500. The processor 1110 is used to execute operations other than transmit and receive operations performed by the second communication device in method 500. For example, the processor 1110 is used to obtain first indication information, which instructs the first communication device to configure the chip operating mode of the first port to FlexE mode; the transceiver 1130 is used to send the first indication information to the first communication device.

[0344] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the steps performed by the first communication device in the above embodiments.

[0345] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the steps performed by the second communication device in the above embodiments.

[0346] This application also provides a communication system, including any of the first communication devices and any of the second communication devices mentioned in the above embodiments.

[0347] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0348] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0349] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical business division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0350] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0351] Furthermore, the various business units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software business unit.

[0352] If the integrated unit is implemented as a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0353] Those skilled in the art will recognize that, in one or more of the examples above, the services described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these services can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.

[0354] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention.

[0355] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application 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. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. An interface configuration method, characterized in that, The method includes: The chip operating mode of the second port of the second communication device is determined to be Eth mode; The chip operating mode of the first port of the first communication device is switched from Flexible Ethernet (FlexE) mode to Eth mode. The first communication device communicates with the second port of the second communication device through the first port. The port configuration mode of the first port is FlexE mode. When the port configuration mode of the first port is FlexE mode, it indicates that the chip operating mode of the first port supports being configured as either FlexE mode or Eth mode.

2. The method according to claim 1, characterized in that, The step of determining that the chip operating mode of the second port of the second communication device is Ethernet mode includes: If no FlexE overhead frame is received from the second communication device within a preset time, the chip operating mode of the second port is determined to be Eth mode.

3. The method according to claim 1 or 2, characterized in that, The method further includes: The device receives a first instruction message sent by the second communication device, the first instruction message being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode.

4. The method according to claim 3, characterized in that, The first indication information is a remote fault (RF) indication information.

5. The method according to claim 3, characterized in that, The first indication information includes the O0 code block in the first Ethernet frame sent by the second communication device.

6. The method according to claim 3, characterized in that, Receiving the first instruction information sent by the second communication device includes: The device receives a first Ethernet frame sent by the second communication device. The first Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes the first indication information.

7. The method according to any one of claims 3-6, characterized in that, The method further includes: Based on the first instruction information, the chip operating mode of the first port is switched from Eth mode to FlexE mode.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: The second communication device is instructed to configure the chip operating mode of the second port to FlexE mode.

9. The method according to claim 8, characterized in that, The instruction to the second communication device to configure the chip operating mode of the second port to FlexE mode includes: Within a predetermined time period, a second indication message is periodically sent to the second communication device. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

10. The method according to claim 7, characterized in that, After the first communication device switches the chip operating mode of the first port from Eth mode to FlexE mode, the method further includes: The chip operating mode of the second port is determined to be Eth mode; Switch the chip operating mode of the first port from FlexE mode to Eth mode.

11. The method according to claim 10, characterized in that, After the first communication device switches the chip operating mode of the first port from FlexE mode to Eth mode, the method further includes: The chip operating mode of the second port is determined to be FlexE mode; Switch the chip operating mode of the first port from Eth mode to FlexE mode.

12. The method according to claim 11, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: In response to the absence of a block lock signal from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

13. The method according to claim 11, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: If no alignment mark lock signal is detected from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

14. The method according to claim 11, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: Based on the value of the O0 code block sent by the second communication device, the chip operating mode of the second port is determined to be FlexE mode.

15. The method according to claim 11, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: Send a second Ethernet frame to the second communication device, the second Ethernet frame being used to determine the chip operating mode of the second port; In response to the lack of a response from the second communication device for the second Ethernet frame, the chip operating mode of the second port is determined to be FlexE mode.

16. The method according to claim 15, characterized in that, The second Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes third indication information used to determine the chip operating mode of the second port.

17. An interface configuration method, characterized in that, The method includes: The first communication device receives a first instruction message sent by a second communication device. The first instruction message is used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode. The first communication device communicates with the second communication device through the first port. The port configuration mode of the first port is FlexE mode. When the port configuration mode of the first port is FlexE mode, it indicates that the chip operating mode of the first port supports being configured as either FlexE mode or Eth mode. Switch the chip operating mode of the first port from Eth mode to FlexE mode.

18. The method according to claim 17, characterized in that, The first indication information is a remote fault (RF) indication information.

19. The method according to claim 17, characterized in that, The first indication information includes the O0 code block in the first Ethernet frame sent by the second communication device.

20. The method according to claim 17, characterized in that, The receipt of the first indication information sent by the second communication device includes: The device receives a first Ethernet frame sent by the second communication device. The first Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes the first indication information.

21. The method according to any one of claims 17-20, characterized in that, The method further includes: The second communication device is instructed to configure the chip operating mode of the second port to FlexE mode, and the second communication device communicates with the first communication device through the second port.

22. The method according to claim 21, characterized in that, The instruction to the second communication device to configure the chip operating mode of the second port to FlexE mode includes: Within a predetermined time period, a second indication message is periodically sent to the second communication device. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

23. The method according to any one of claims 21-22, characterized in that, The method further includes: The chip operating mode of the second port is determined to be Eth mode; Switch the chip operating mode of the first port from FlexE mode to Eth mode.

24. The method according to claim 23, characterized in that, Determining that the chip operating mode of the second port is Eth mode includes: If no FlexE overhead frame is received from the second communication device within a preset time, the chip operating mode of the second port is determined to be Eth mode.

25. The method according to any one of claims 21-24, characterized in that, After switching the chip operating mode of the first port from Eth mode to FlexE mode, the method further includes: The chip operating mode of the second port is determined to be Eth mode; Switch the chip operating mode of the first port from FlexE mode to Eth mode.

26. The method according to claim 25, characterized in that, After the first communication device switches the chip operating mode of the first port from FlexE mode to Eth mode, the method further includes: The chip operating mode of the second port is determined to be FlexE mode; Switch the chip operating mode of the first port from Eth mode to FlexE mode.

27. The method according to claim 26, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: In response to the absence of a block lock signal from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

28. The method according to claim 26, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: If no alignment mark lock signal is detected from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

29. The method according to claim 26, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: Based on the value of the O0 code block sent by the second communication device, the chip operating mode of the second port is determined to be FlexE mode.

30. The method according to claim 26, characterized in that, The method further includes: Send a second Ethernet frame to the second communication device, the second Ethernet frame being used to determine the chip operating mode of the second port; The step of determining that the chip operating mode of the second port is FlexE mode includes: In response to the lack of a response from the second communication device for the second Ethernet frame, the chip operating mode of the second port is determined to be FlexE mode.

31. The method according to claim 30, characterized in that, The second Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes third indication information used to determine the chip operating mode of the second port.

32. An interface configuration method, characterized in that, The method includes: Determine the chip operating mode of the second port of the second communication device; When the chip operating mode of the second port is different from that of the first port, the chip operating mode of the first port is adjusted to be the same as that of the second port. The first communication device communicates with the second port of the second communication device through the first port. The port configuration mode of the first port is FlexE mode. When the port configuration mode of the first port is FlexE mode, it indicates that the chip operating mode of the first port supports being configured as either FlexE mode or Eth mode.

33. The method according to claim 32, characterized in that, Adjusting the chip operating mode of the first port to the same chip operating mode as the second port includes: Change the chip operating mode of the first port from Eth mode to FlexE mode.

34. The method according to claim 32, characterized in that, Adjusting the chip operating mode of the first port to the same chip operating mode as the second port includes: Change the chip operating mode of the first port from FlexE mode to Eth mode.

35. The method according to claim 32 or 34, characterized in that, The chip operating mode of the first port is FlexE mode. Determining the chip operating mode of the second port includes: If no FlexE overhead frame is received from the second communication device within a preset time, the chip operating mode of the second port is determined to be Eth mode.

36. The method according to any one of claims 32-35, characterized in that, The method further includes: The device receives a first instruction message sent by the second communication device, the first instruction message being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode.

37. The method according to claim 36, characterized in that, The first indication information is a remote fault (RF) indication information.

38. The method according to claim 36, characterized in that, The first indication information includes the O0 code block in the first Ethernet frame sent by the second communication device.

39. The method according to claim 36, characterized in that, Receiving the first instruction information sent by the second communication device includes: The device receives a first Ethernet frame sent by the second communication device. The first Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes the first indication information.

40. The method according to any one of claims 36-39, characterized in that, The method further includes: Based on the first instruction information, the chip operating mode of the first port is switched from Eth mode to FlexE mode.

41. The method according to any one of claims 32-40, characterized in that, The method further includes: The second communication device is instructed to configure the chip operating mode of the second port to FlexE mode.

42. The method according to claim 41, characterized in that, The instruction to the second communication device to configure the chip operating mode of the second port to FlexE mode includes: Within a predetermined time period, a second indication message is periodically sent to the second communication device. The second indication message is used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

43. The method according to claim 33, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: In response to the absence of a block lock signal from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

44. The method according to claim 33, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: If no alignment mark lock signal is detected from the second communication device within a preset time, the chip operating mode of the second port is determined to be FlexE mode.

45. The method according to claim 33, characterized in that, The step of determining that the chip operating mode of the second port is FlexE mode includes: Based on the value of the O0 code block sent by the second communication device, the chip operating mode of the second port is determined to be FlexE mode.

46. ​​The method according to claim 33, characterized in that, The method further includes: Send a second Ethernet frame to the second communication device, the second Ethernet frame being used to determine the chip operating mode of the second port; The step of determining that the chip operating mode of the second port is FlexE mode includes: In response to the lack of a response from the second communication device for the second Ethernet frame, the chip operating mode of the second port is determined to be FlexE mode.

47. The method according to claim 46, characterized in that, The second Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes third indication information used to determine the chip operating mode of the second port.

48. An interface configuration method, characterized in that, Performed by a second communication device, the second communication device being communicatively connected to the first port of the first communication device via a second port, the method includes: Obtain first indication information, the first indication information being used to instruct the first communication device to configure the chip operating mode of the first port to FlexE mode, wherein: the port configuration mode of the first port is FlexE mode, and when the port configuration mode of the first port is FlexE mode, it indicates that the chip operating mode of the first port supports being configured to either FlexE mode or Eth mode. The first instruction information is sent to the first communication device.

49. The method according to claim 48, characterized in that, Before obtaining the first indication information, the method further includes: The second communication device receives a configuration instruction sent by a control management entity, the configuration instruction being used to instruct the second communication device to configure the second port in FlexE mode.

50. The method according to claim 49, characterized in that, After receiving the configuration instruction sent by the control management entity, the method further includes: Based on the configuration instructions, the port configuration mode of the second port is configured to FlexE mode.

51. The method according to any one of claims 48-50, characterized in that, The first indication information is a remote fault (RF) indication information.

52. The method according to any one of claims 48-50, characterized in that, The first indication information is the O0 code block in the first Ethernet frame sent by the second communication device.

53. The method according to any one of claims 48-50, characterized in that, Sending the first indication information to the first communication device includes: The first Ethernet frame is sent to the first communication device. The first Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes the first indication information.

54. The method according to any one of claims 48-53, characterized in that, After sending the first indication information to the first communication device, the method further includes: Configure the chip operating mode of the second port to FlexE mode.

55. The method according to any one of claims 48-54, characterized in that, Sending the first indication information to the first communication device includes: The first instruction information is periodically sent to the first communication device within a predetermined time period.

56. The method according to any one of claims 48-55, characterized in that, The method further includes: The device receives a second instruction message sent by the first communication device, the second instruction message being used to instruct the second communication device to configure the chip operating mode of the second port to FlexE mode.

57. The method according to any one of claims 48-56, characterized in that, The method further includes: The device receives a second Ethernet frame sent by the first communication device, the second Ethernet frame being used to determine the chip operating mode of the second port.

58. The method according to claim 57, characterized in that, The method further includes: When the chip operating mode of the second port is Eth mode, a response for the second Ethernet frame is sent to the first communication device.

59. The method according to claim 57 or 58, characterized in that, The second Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes third indication information used to determine the chip operating mode of the second port.

60. The method according to claim 58, characterized in that, Sending a response to the second Ethernet frame to the first communication device includes: Send a third Ethernet frame to the first communication device.

61. The method according to claim 60, characterized in that, The third Ethernet frame includes an Extended Type Length Value (TLV) field, and the extended TLV field includes fourth indication information used to indicate the response.

62. A first communication device, characterized in that, The first communication device includes a memory and a processor; The memory is used to store program code; The processor is configured to run instructions in the program code, causing the first communication device to perform the method described in any one of claims 1-47.

63. A first communication device, characterized in that, The first communication device includes a communication interface and a processor, the processor being used to execute the method described in any one of claims 1-47.

64. A second communication device, characterized in that, The second communication device includes a memory and a processor; The memory is used to store program code; The processor is configured to execute instructions in the program code, causing the second communication device to perform the method described in any one of claims 48-61.

65. A second communication device, characterized in that, The second communication device includes a communication interface and a processor, the processor being used to execute the method described in any one of claims 48-61.

66. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method described in any one of claims 1-47, or cause the computer to perform the method described in any one of claims 48-61.

67. A communication system, characterized in that, It includes the first communication device as described in claim 62 or 63 and the second communication device as described in claim 64 or 65.

Citation Information

Patent Citations

  • Method and device for transmitting / receiving network management information, transmitting apparatus and receiving apparatus

    CN108631873A