Link Dual-End Mode Determination Method, Apparatus, Device, and Medium
By using the target protocol notification message in the communication device for self-negotiation, the problems of unsuccessful negotiation or the results in the fixed rules of the self-negotiation method in the prior art are solved, and flexible and automatic working mode negotiation is achieved and configuration and switching requirements are reduced.
Patent Information
- Application Number
- CN202010364460.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-30
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2040-04-30
AI Technical Summary
The existing self-negotiation methods have fixed rules when determining the operating mode of the device interface, which may result in unsuccessful negotiations or the results that are not in line with expectations.
By introducing a target protocol notification message into the communication device, the devices are allowed to self-negotiate the working mode. The specific steps include receiving forced working mode configuration information, sending a target protocol notification message, and determining the negotiation result based on the received feedback.
It realizes automatic determination of interface working mode according to network planning, ensures successful negotiation and the results are in line with expectations, reduces the need to configure new equipment on site, and reduces the occurrence of unnecessary mode switching.
Smart Images

Figure CN113595752B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a method, apparatus, device, and medium for determining the dual-end mode of a link. Background Art
[0002] In the OIF (Optical Internetworking Forum)-FLEXE-ND-01.0 standard, the working modes of device interfaces are divided into two types: FlexE (Flex Ethernet) mode and StdE (Standard Ethernet) mode. Among them, FlexE is the main technology for 5G bearer devices.
[0003] According to the support capabilities for different modes, interfaces can be divided into three categories: one is an interface that only supports the FlexE mode, one is an interface that only supports the StdE mode, and one is an interface that supports both the FlexE mode and the StdE mode (also known as an interface with dual-mode capabilities). The OIF-FLEXE-ND-01.0 standard can adaptively negotiate the working mode of the docking interface through the auto-negotiation method, as Figure 1 shown, reducing the manual configuration process. However, the rules of the above auto-negotiation method are fixed, which may lead to unsuccessful auto-negotiation or the auto-negotiation result not being the expected value. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for determining the dual-end mode of a link to optimize the existing auto-negotiation method, overcome the above-mentioned defects of the existing auto-negotiation method, and achieve the auto-negotiation of the working mode between interfaces with different mode support capabilities according to network planning.
[0005] In a first aspect, an embodiment of this application provides a method for determining the dual-end mode of a link, which is applied to a first communication device and includes:
[0006] Receiving the forced working mode configuration information for a first interface of the first communication device, and then configuring the current working mode of the first interface as a target working mode that matches the forced working mode configuration information;
[0007] Sending a first advertisement message of a target protocol to a second interface of a second communication device, where the first advertisement message of the target protocol includes the target working mode of the first interface, and is used to instruct the second communication device to configure the current working mode of the second interface as the target working mode; wherein, the first interface and the second interface establish a communication connection;
[0008] When the second announcement message of the target protocol sent by the second interface is monitored, the current working mode of the second interface is included in the second announcement message of the target protocol. If it is determined according to the second announcement message of the target protocol that the current working mode of the second interface is the target working mode, it is determined that the working mode negotiation between the first interface and the second interface is successful.
[0009] In a second aspect, an embodiment of the present application provides a method for determining a link dual-end mode, which is applied to a second communication device and includes:
[0010] When the first announcement message of the target protocol sent by the first interface of the first communication device is monitored, if the target working mode of the first interface is parsed according to the first announcement message of the target protocol, the current working mode of the second interface of the second communication device is configured as the target working mode;
[0011] Wherein, the first interface and the second interface establish a communication connection; the target working mode matches the forced working mode configuration information for the first interface and is configured as the current working mode of the first interface;
[0012] Send a second announcement message of the target protocol to the first interface, and the current working mode of the second interface is included in the second announcement message of the target protocol.
[0013] In a third aspect, an embodiment of the present application provides a device for determining a link dual-end mode, which is applied to a first communication device and includes:
[0014] A target working mode configuration module, configured to receive the forced working mode configuration information for the first interface of the first communication device, and then configure the current working mode of the first interface as the target working mode that matches the forced working mode configuration information;
[0015] A target working mode announcement module, configured to send a first announcement message of the target protocol to the second interface of the second communication device, and the target working mode of the first interface is included in the first announcement message of the target protocol, for instructing the second communication device to configure the current working mode of the second interface as the target working mode; wherein, the first interface and the second interface establish a communication connection;
[0016] A negotiation result determination module, configured to when the second announcement message of the target protocol sent by the second interface is monitored, the current working mode of the second interface is included in the second announcement message of the target protocol. If it is determined according to the second announcement message of the target protocol that the current working mode of the second interface is the target working mode, it is determined that the working mode negotiation between the first interface and the second interface is successful.
[0017] Fourthly, an embodiment of the present application provides a link dual - end mode determination device, which is applied to a second communication device and includes:
[0018] A current working mode configuration module, configured to, when detecting a first announcement message of a target protocol sent by a first interface of a first communication device, if the target working mode of the first interface is parsed according to the first announcement message of the target protocol, configure the current working mode of a second interface of the second communication device as the target working mode;
[0019] Wherein, the first interface and the second interface establish a communication connection; the target working mode matches the forced working mode configuration information for the first interface and is configured as the current working mode of the first interface;
[0020] A current working mode announcement module, configured to send a second announcement message of a target protocol to the first interface, where the second announcement message of the target protocol includes the current working mode of the second interface.
[0021] Fifthly, an embodiment of the present application provides a communication device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the link dual - end mode determination method applied to the first communication device as described in any embodiment of the present application.
[0022] Sixthly, an embodiment of the present application provides a communication device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the link dual - end mode determination method applied to the second communication device as described in any embodiment of the present application.
[0023] Seventhly, an embodiment of the present application provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the link dual - end mode determination method as described in any embodiment of the present application.
[0024] Compared with the existing auto-negotiation method, the technical solution provided in this embodiment has an artificial intervention in the protocol mode, and the final working mode is controlled by forced configuration. As long as both negotiation parties support mode designation, the negotiation will surely succeed, and the negotiation result is also the expected configured mode. In addition, configuration only needs to be performed on one device. Therefore, when a new device accesses the network, only the gateway needs to issue configurations to the existing network devices, reducing the process of on-site configuration of newly accessed devices. At the same time, according to the standard, after successful adaptive negotiation between the dual-mode interface and the peer, a FlexE group (FlexEGroup) should be configured on both interfaces as needed. If the FlexE Group is not configured on the interface due to certain management decisions, the interface supporting the dual mode will be switched to the Std mode. The technical solution provided in this embodiment can also reduce unnecessary mode switching caused by other factors such as the non-configuration of the FlexE Group.
[0025] More descriptions about the above embodiments and other aspects of this application and their implementation manners are provided in the accompanying drawings, the specific implementation manners, and the claims. Brief Description of the Drawings
[0026] Figure 1 Schematic diagram of the negotiation mode of the physical ports supporting FlexE, StdE, and dual mode in the OIF standard;
[0027] Figure 2 Schematic flowchart of a method for determining the dual-end mode of a link provided by this application;
[0028] Figure 3 Schematic diagram of the link layer discovery protocol LLDP message format specified by the IEEE 802.1AB protocol provided by this application;
[0029] Figure 4 Schematic diagram of the type length value TLV format for identifying the working mode support capabilities of an interface provided by this application;
[0030] Figure 5 Schematic diagram of the TLV format for identifying the current working mode of an interface provided by this application;
[0031] Figure 6 Schematic diagram of the TLV format for identifying the target working mode of an interface provided by this application;
[0032] Figure 7 Schematic flowchart of a method for determining the dual-end mode of a link provided by this application;
[0033] Figure 8 Schematic flowchart of a method for determining the dual-end mode of a link provided by this application;
[0034] Figure 9Flow schematic diagram of a method for determining the dual - end mode of a link provided by this application;
[0035] Figure 10 Flow schematic diagram of a method for determining the dual - end mode of a link provided by this application;
[0036] Figure 11 Module structure schematic diagram of a device for determining the dual - end mode of a link provided by this application;
[0037] Figure 12 Module structure schematic diagram of a device for determining the dual - end mode of a link provided by this application;
[0038] Figure 13 Structure schematic diagram of a communication device provided by this application;
[0039] Figure 14 Structure schematic diagram of a communication device provided by this application. Detailed implementation manners
[0040] To make the objectives, technical solutions, and advantages of this application clearer and more understandable, the embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined arbitrarily with each other.
[0041] The terms "first" and "second" in this application are used to distinguish different objects, rather than to describe a specific order.
[0042] For ease of understanding, the main inventive concept of the embodiments of this application will be briefly described.
[0043] In this application, one of the two devices in negotiation is defined as the control device, and the other is defined as the controlled device. Among them, the party that specifies the working mode according to the network plan is called the control device. The premise for implementing the method for determining the dual - end mode of the link provided by this application is that the two negotiation ends mutually announce their interface management information through the target protocol. The control device interface announces its specified working mode to the controlled device interface, so that the controlled device interface sets its current working mode to the specified working mode. Then, the current working modes of the control device interface and the controlled device interface are the same, both being the specified working mode. Thus, the negotiation of the working modes of the two device interfaces is successful.
[0044] It should be noted that when the docking interface is in different working modes, due to the failure of the traditional ETH protocol to establish a link, the interface cannot be connected (up), and the advertisement messages based on the target protocol cannot be interoperable. In the present application, both devices (chips) can extract the target protocol advertisement messages from the two working modes simultaneously, and the specific implementation method will be described in detail in the following explanations. Among them, the target protocol can be a third-party protocol different from the auto-negotiation related protocols, specifically, it can be a data link layer protocol, such as LLDP (Link Layer Discovery Protocol).
[0045] In an exemplary embodiment, Figure 2 is a schematic flowchart of a method for determining a link dual-end mode provided by the present application. This method is applicable to the situation where the working mode auto-negotiation is performed after the docking between interfaces with different mode support capabilities (at least supporting two working modes). This method can be executed by a link dual-end mode determination device applied to the first communication device, and the link dual-end mode determination device can be implemented by software and / or hardware and integrated in the communication device.
[0046] As Figure 2 shown, the method for determining a link dual-end mode applied to the first communication device provided by the present application includes:
[0047] S110. Receive the forced working mode configuration information for the first interface of the first communication device, and then configure the current working mode of the first interface to the target working mode that matches the forced working mode configuration information.
[0048] In an example, the first interface of the first communication device establishes a communication connection with the second interface of the second communication device, and the first interface and the second interface perform auto-negotiation of the working mode.
[0049] The forced working mode configuration information refers to the information for forcibly configuring the specified working mode for the set interface according to the network plan, which is used to force the set interface to work in the specified working mode. The target working mode that matches the forced working mode configuration information is the specified working mode for the set interface according to the grid plan, and this target working mode is also the desired working mode for both ends to negotiate and use.
[0050] In this example, the first communication device can receive forced operating mode configuration information, that is, the forced configuration of the specified operating mode for the first interface. From this, it can be concluded that the first communication device is the control device, the first interface is the control device interface, the second communication device is the controlled device, and the second interface is the controlled device interface. Of course, the second communication device can also receive forced operating mode configuration information. In this case, the second communication device is the control device, the second interface is the control device interface, the first communication device is the controlled device, and the first interface is the controlled device interface.
[0051] Specifically, the first interface is a dual-mode interface, supporting both the FlexE operating mode and the StdE operating mode. Furthermore, the forced operating mode configuration information can be to indicate that the operating mode of the first interface is configured as the FlexE operating mode or the StdE operating mode, that is, the target operating mode can be the FlexE operating mode or the StdE operating mode.
[0052] For example, if the forced operating mode configuration information indicates that the operating mode of the first interface is configured as the FlexE operating mode, then the current operating mode of the first interface is switched to the FlexE operating mode. If the current operating mode of the first interface is already the FlexE operating mode, then there is no need to switch.
[0053] S120. Send a first advertisement message of the target protocol to the second interface of the second communication device. The first advertisement message of the target protocol includes the target operating mode of the first interface, and is used to instruct the second communication device to configure the current operating mode of the second interface as the target operating mode; wherein, the first interface and the second interface establish a communication connection.
[0054] The first advertisement message of the target protocol refers to the advertisement message sent by the first communication device to the second interface of the second device based on the target protocol. Among them, the target protocol can be a data link layer protocol, such as LLDP. This embodiment does not make specific limitations on this.
[0055] In an example, the operating mode of the first interface is the operating mode specified according to the network plan. Then, the target operating mode of the first interface is carried in the first advertisement message of the target protocol to indicate that the target operating mode is the operating mode corresponding to the auto-negotiation result, and to instruct the second communication device to configure the current operating mode of the second interface as the target operating mode.
[0056] If the operating mode of the first interface is not the operating mode specified according to the network plan, then the target operating mode of the first interface is not carried in the first advertisement message of the target protocol, or the target operating mode of the first interface carried in the first advertisement message is a null value or a non-true value. This embodiment does not make specific limitations on this.
[0057] When the second communication device monitors the first announcement message of the target protocol sent by the first interface of the first communication device, it parses the first announcement message of the target protocol. If the target working mode of the first interface is parsed according to the first announcement message of the target protocol, the current working mode of the second interface is switched to the target working mode, and then, a second announcement message of the target protocol is sent to the first interface.
[0058] Among them, the second announcement message of the target protocol refers to the announcement message sent by the second communication device to the first interface of the first device based on the target protocol.
[0059] In an example, the current working mode of the second interface is carried in the second announcement message of the target protocol to announce the current working mode of the second interface to the first interface.
[0060] Suppose the second interface does not support the target working mode, then its current working mode cannot be switched to the target working mode. At this time, in an example, the second interface can still announce its current working mode (at this time, the current working mode is not the target working mode) to the first interface through the second announcement message of the target protocol; in another example, the second interface can also not send the second announcement message of the target protocol to the first interface and does not announce its current working mode to the first interface.
[0061] S130. When the second announcement message of the target protocol sent by the second interface is monitored, the current working mode of the second interface is included in the second announcement message of the target protocol. If it is determined that the current working mode of the second interface is the target working mode according to the second announcement message of the target protocol, it is determined that the working mode negotiation between the first interface and the second interface is successful.
[0062] If the second announcement message of the target protocol sent by the second interface cannot be monitored, or the second announcement message of the target protocol sent by the second interface cannot be monitored within the set time period, it is determined that the working mode negotiation between the first interface and the second interface fails, and a failure notice of working mode negotiation is sent to the gateway.
[0063] When the second announcement message of the target protocol sent by the second interface is monitored, the second announcement message of the target protocol is parsed. If it is determined that the current working mode of the second interface is the target working mode according to the second announcement message of the target protocol, it is determined that the working mode negotiation between the first interface and the second interface is successful, and a success notice of working mode negotiation is sent to the gateway; if it is determined that the current working mode of the second interface is not the target working mode according to the second announcement message of the target protocol, it is determined that the working mode negotiation between the first interface and the second interface fails, and a failure notice of working mode negotiation is sent to the gateway.
[0064] The technical solution provided by this embodiment, compared with the existing auto-negotiation method, has a negotiable mode that can be manually intervened, and the final working mode is controlled by forced configuration. As long as both negotiation parties support mode designation, the negotiation will surely succeed, and the negotiation result is also the expected configured mode. In addition, it only needs to be configured on one device. Therefore, when a new device accesses the network, only the existing network devices need to be configured by the gateway, reducing the process of on-site configuration of newly accessed devices. Meanwhile, the technical solution provided by this embodiment can also reduce unnecessary mode switching caused by other factors. For example, it can be unnecessary mode switching caused by the non-configuration of FlexEGroup. After successful auto-negotiation, even an interface without FlexE Group configured will not be switched to the StdE working mode.
[0065] In one example, before receiving the forced working mode configuration information for the first interface of the first communication device, it further includes:
[0066] Sending the first advertisement message of the target protocol to the second interface, and the first advertisement message of the target protocol further includes the working mode support capability and the current working mode of the first interface;
[0067] Listening for the second advertisement message of the target protocol sent by the second interface, and the second advertisement message of the target protocol further includes the working mode support capability of the second interface.
[0068] The first interface of the first communication device sends the first advertisement message of the target protocol to the second interface to announce its working mode support capability and the current working mode to the second interface. Meanwhile, it also listens for the second advertisement message of the target protocol from the second interface to obtain the working mode support capability and the current working mode announced by the second interface.
[0069] That is to say, both sides of the negotiation can periodically announce the interface management information and working status of their own device interfaces to each other through the advertisement message of the target protocol, and keep sending it continuously when the interface is in the up state.
[0070] In one example, the advertisement message of the target protocol can include the working mode support capability of the interface, can include the current working mode of the interface, and can also include the target working mode of the interface, etc.
[0071] It is worth pointing out that both the first advertisement message of the target protocol and the second advertisement message of the target protocol refer to the advertisement message of the target protocol. Naming them as the first advertisement message of the target protocol and the second advertisement message of the target protocol is only to distinguish the advertisement messages of the target protocol sent by the first interface and the second interface.
[0072] In one example, the target protocol advertisement message sent by the controlled device interface (specifically the second interface in this embodiment) may only include the working mode support capability of the interface and the current working mode of the interface. The target protocol advertisement message sent by the controlled device may also include the working mode support capability of the interface, the current working mode of the interface, and the target working mode of the interface. At this time, the value of the target working mode of the interface may be a null value or a non-true value (no specific limitation is made on this).
[0073] In one example, the target protocol advertisement message sent by the control device interface (specifically the first interface in this embodiment) includes the working mode support capability of the interface, the current working mode of the interface, and the target working mode of the interface. At this time, the value of the target working mode of the interface may identify the working mode specified according to the network plan.
[0074] Specifically, if the first interface determines that the second interface does not support the target working mode based on the working mode support capability of the second interface in the target protocol second advertisement message monitored, it may not send the target protocol first advertisement message including the target working mode to the second interface. At this time, it can directly determine that the working mode negotiation between the first interface and the second interface fails and send a working mode negotiation failure notice to the gateway.
[0075] In one example, when the target working mode includes the FlexE (Flexible Ethernet) working mode and the StdE (Standard Ethernet) working mode, monitoring the target protocol second advertisement message sent by the second interface may specifically be:
[0076] Monitoring the target protocol second advertisement message sent by the second interface based on the current management channel of the first interface, where the current management channel automatically switches between the FlexE overhead management channel and the Ethernet MAC (Media Access Control) management channel.
[0077] The current management channel of the first interface of the first communication device automatically switches between the FlexE overhead management channel and the Ethernet MAC management channel. If the current management channel is the FlexE overhead management channel, monitor the target protocol second advertisement message sent by the second interface through the FlexE overhead management channel. If the current management channel is the Ethernet MAC management channel, monitor the target protocol second advertisement message sent by the second interface through the Ethernet MAC management channel.
[0078] In one example, the current management channel of the first interface automatically switching between the FlexE overhead management channel and the Ethernet MAC management channel may specifically be:
[0079] When the current management channel is the FlexE overhead management channel, if the FlexE valid overhead signal sent by the second interface cannot be received through the first interface, the current management channel is switched from the FlexE overhead management channel to the Ethernet MAC management channel;
[0080] When the current management channel is the Ethernet MAC management channel, if the standard Ethernet valid overhead signal sent by the second interface cannot be received through the first interface, the current management channel is switched back from the Ethernet MAC management channel to the FlexE overhead management channel.
[0081] In this example, the FlexE overhead management channel can be enabled first, and the target protocol second advertisement message sent by the second interface is monitored through the FlexE overhead management channel. At the same time, it is judged whether the FlexE valid overhead signal sent by the second interface can be received through the first interface. For example, it can be determined whether it can be received within a set time period. If so, there is no need to switch the current management channel. If not, the Ethernet MAC management channel is enabled, and the current management channel is switched from the FlexE overhead management channel to the Ethernet MAC management channel, and then the target protocol second advertisement message sent by the second interface is monitored through the Ethernet MAC management channel.
[0082] After the current management channel is switched to the Ethernet MAC management channel, it is judged whether the standard Ethernet valid overhead signal sent by the second interface can be received through the first interface. For example, it can be determined whether it can be received within a set time period. If so, there is no need to switch the current management channel. If not, the FlexE overhead management channel is enabled, and the current management channel is switched from the Ethernet MAC management channel to the FlexE overhead management channel, and then. The target protocol second advertisement message sent by the second interface is monitored through the FlexE overhead management channel.
[0083] By automatically switching the current management channel, support for automatically extracting the target protocol advertisement message sent by the interface of the other communication device is realized to obtain the management information of the other interface. Furthermore, the interfaces in different working modes can complete information interaction and advertisement through the target protocol, and on this basis, complete the working mode negotiation process.
[0084] At the same time, the initial FlexE interface (the physical port that has not been added to any FlexE Group) also sends specified overhead information so that the current management channel of the peer interface can receive the overhead signal.
[0085] Correspondingly, in one example, the second interface monitoring the target protocol first advertisement message sent by the first interface can also be specifically:
[0086] The current management channel based on the second interface listens for the first advertisement message of the target protocol sent by the first interface, where the current management channel automatically switches between the FlexE overhead management channel and the Ethernet MAC management channel.
[0087] In one example, the target protocol is a data link layer protocol, such as LLDP. LLDP is a protocol that enables devices in a network to discover each other, announce their status, and exchange information.
[0088] Correspondingly, the newly added TLV (Type Length Value) in the LLDP advertisement message can be used to identify at least one of the following: the working mode support capability of the interface, the current working mode of the interface, and the target working mode of the interface.
[0089] The LLDP message is a layer 2 network message composed of mandatory TLVs and optional TLVs. For its message format, please refer to Figure 3 .
[0090] Among them, the working mode support capability of the interface can be identified by a newly added TLV, which is used to announce to the peer interface the working modes that this interface can support. For the TLV format, please refer to Figure 4 as shown, Figure 4 For the description of the capability field in it, please refer to Table 1.
[0091] Table 1 Description of the capability field
[0092]
[0093] The current working mode of the interface can also be identified by a newly added TLV, which is used to announce to the peer interface the current working mode of this interface. For the TLV format, please refer to Figure 5 as shown, Figure 5 For the description of the current working mode field in it, please refer to Table 2.
[0094] Table 2 Description of the current working mode field
[0095] Value Current working mode 0 StdE working mode 1 FlexE working mode 2-255 ---
[0096] The target working mode of the interface can also be identified by a newly added TLV, which is used to announce to the peer interface the target working mode of this interface, indicating that this interface has been forcibly configured with a specified working mode, and the specified working mode is the target working mode. For the TLV format, please refer to Figure 6 as shown, Figure 6 For the description of the target working mode field in it, please refer to Table 3.
[0097] Table 3 Description of the target working mode field
[0098]
[0099]
[0100] Optionally, the TLV used to identify the target operating mode may only appear in the LLDP advertisement message sent by the control device interface. The presence of this TLV indicates that the device is forcibly configured with the specified operating mode, and the mode information of the specified operating mode is reflected in the value of the TLV.
[0101] In a specific example, the network management sends the forced operating mode configuration information to the first interface of the first communication device according to the network plan, aiming to configure the first interface to the target operating mode matching the forced operating mode configuration information. At this time, the first communication device is the control device, and the first interface is the control device interface.
[0102] If the first interface does not support the target operating mode, or it is determined according to the LLDP second advertisement message sent by the controlled device interface (i.e., the second interface of the second communication device) that the second interface cannot support the target operating mode, a negotiation failure notice is directly reported to the network management, and the negotiation process ends.
[0103] If the first interface supports the target operating mode, its current operating mode is switched to the target operating mode, and an LLDP first advertisement message is immediately sent to the second interface. A new TLV used to indicate that this interface is forcibly configured with the specified operating mode is added to the LLDP first advertisement message. The value of this TLV identifies the target operating mode. This LLDP first advertisement message can also be understood as a request message for the second interface to switch the operating mode. To prevent message loss, the first interface can send at least one identical LLDP first advertisement message. For example, three identical LLDP first advertisement messages can be sent. At the same time, a timer is started to wait for the operating mode information returned by the second interface through the LLDP second advertisement message. Among them, the timer can be set with a timing duration of 3 seconds, for example.
[0104] After the second interface receives the first LLDP advertisement message sent by the first interface, if it finds that its current working mode is different from the target working mode carried in the first LLDP advertisement message and it supports the target working mode, it will switch the current working mode to the target working mode, update its working mode information, and send it to the first interface through the second LLDP advertisement message. The current working mode in this second LLDP advertisement message is the switched current working mode. This second LLDP advertisement message can also be understood as a response message to the working mode switching request. If the second interface finds that its current working mode is the same as the target working mode carried in the first LLDP advertisement message, there is no need to switch, and it can directly return the second LLDP advertisement message to the first interface. If the second interface finds that it does not support the target working mode carried in the first LLDP advertisement message, no other operation is required, and it can still normally return the second LLDP advertisement message according to the current working mode.
[0105] When the timer of the first communication device reaches the timing duration, if the current working mode carried in the last second LLDP advertisement message sent by the second interface received is the same as the target working mode, it is determined that the negotiation is successful; otherwise, it is determined that the negotiation fails.
[0106] In this process, whether the negotiation is successful or failed, the negotiation result needs to be sent to the network management. After the negotiation is completed, the modes of both parties will no longer be switched, unless the forced mode configuration information of the control device interface changes or is deleted. Thus, it also solves the problem in the prior art that the working mode cannot be switched again before the link down event occurs after the negotiation is successful, and reduces the uncontrollability of the working mode negotiation interface.
[0107] In an exemplary embodiment, Figure 7 It is a schematic flowchart of a method for determining the link dual - end mode provided by this application. This method is applicable to the situation where the working mode is self - negotiated after the docking between interfaces with different mode support capabilities (at least supporting two working modes). This method can be executed by the link dual - end mode determination device applied to the second communication device. The link dual - end mode determination device can be implemented by software and / or hardware and integrated in the communication device.
[0108] As Figure 7 shown, the method for determining the link dual - end mode applied to the second communication device provided by this application includes:
[0109] S210. When the first advertisement message of the target protocol sent by the first interface of the first communication device is monitored, if the target working mode of the first interface is parsed according to the first advertisement message of the target protocol, the current working mode of the second interface of the second communication device is configured as the target working mode.
[0110] Among them, the first interface establishes a communication connection with the second interface, and the first interface and the second interface perform self-negotiation of the working mode; the target working mode matches the forced working mode configuration information for the first interface and is configured as the current working mode of the first interface.
[0111] The forced working mode configuration information refers to the information for forcibly configuring the specified working mode for the set interface according to the network plan. The target working mode that matches the forced working mode configuration information is the specified working mode for the set interface according to the network plan.
[0112] In this example, the specified working mode is forcibly configured for the first interface. From this, it can be concluded that the first communication device is the control device, the first interface is the control device interface, the second communication device is the controlled device, and the second interface is the controlled device interface.
[0113] Specifically, the first interface is a dual-mode interface, which supports both the FlexE working mode and the StdE working mode. Furthermore, the forced working mode configuration information can be to indicate that the working mode of the first interface is configured as the FlexE working mode or the StdE working mode, that is, the target working mode can be the FlexE working mode or the StdE working mode.
[0114] The target protocol first advertisement message refers to the advertisement message sent by the first communication device to the second interface of the second device based on the target protocol. Among them, the target protocol can be a data link layer protocol.
[0115] In an example, if the working mode of the first interface is the working mode specified according to the network plan, the target working mode of the first interface is carried in the target protocol first advertisement message to indicate that the target working mode is the working mode corresponding to the self-negotiation result.
[0116] The second interface receives the target protocol first advertisement message sent by the first interface, parses the target protocol first advertisement message, and may parse the target working mode from the target protocol first advertisement message, or may not parse the working mode. If the target working mode of the first interface cannot be parsed from the target protocol first advertisement message, no other operations are required; if the target working mode of the first interface is parsed from the target protocol first advertisement message, the current working mode of the second interface is switched to the target working mode.
[0117] In the case where the second interface does not support the target working mode, its current working mode cannot be switched to the target working mode, and no other operations are required.
[0118] S220. Send a second advertisement message of the target protocol to the first interface, where the second advertisement message of the target protocol includes the current working mode of the second interface.
[0119] The second advertisement message of the target protocol refers to the advertisement message sent by the second communication device to the first interface of the first device based on the target protocol.
[0120] In one example, the current working mode of the second interface is carried in the second advertisement message of the target protocol to advertise the current working mode of the second interface to the first interface.
[0121] In one example, if the second interface does not support the target working mode, the second interface can still advertise its current working mode (at this time, the current working mode is not the target working mode) to the first interface through the second advertisement message of the target protocol; in another example, the second interface can also not send the second advertisement message of the target protocol to the first interface and does not advertise its current working mode to the first interface.
[0122] If the first interface fails to receive the second advertisement message of the target protocol sent by the second interface, or fails to receive the second advertisement message of the target protocol sent by the second interface within a set time period, it is determined that the working mode negotiation between the first interface and the second interface fails, and an advertisement of the failed working mode negotiation is sent to the gateway.
[0123] If the first interface receives the second advertisement message of the target protocol sent by the second interface, the second advertisement message of the target protocol is parsed. If it is determined according to the second advertisement message of the target protocol that the current working mode of the second interface is the target working mode, it is determined that the working mode negotiation between the first interface and the second interface is successful, and an advertisement of the successful working mode negotiation is sent to the gateway; if it is determined according to the second advertisement message of the target protocol that the current working mode of the second interface is not the target working mode, it is determined that the working mode negotiation between the first interface and the second interface fails, and an advertisement of the failed working mode negotiation is sent to the gateway.
[0124] Compared with the existing auto-negotiation method, the protocol mode of the technical solution provided in this embodiment can be manually intervened, and the final working mode is controlled by forced configuration. As long as both negotiation parties support mode designation, the negotiation will surely succeed, and the negotiation result is also the expected configured mode. In addition, only configuration on one device is required. Therefore, when a new device accesses the network, only the gateway needs to issue configurations to the existing network devices, reducing the process of on-site configuration of newly accessed devices. At the same time, the technical solution provided in this embodiment can also reduce unnecessary mode switching caused by other factors. For example, it can be the unnecessary mode switching caused by the lack of configuration of FlexEGroup. After successful auto-negotiation, even an interface without FlexE Group configured will not be switched to the StdE working mode.
[0125] In one example, before the first communication device's first interface sends the first advertisement message of the target protocol, it further includes:
[0126] Sending the second advertisement message of the target protocol to the first interface, and the second advertisement message of the target protocol further includes the working mode support capability of the second interface;
[0127] Listening for the first advertisement message of the target protocol sent by the first interface, and the first advertisement message of the target protocol further includes the working mode support capability and the current working mode of the first interface.
[0128] The second interface of the second communication device notifies the first interface of its working mode support capability and current working mode by sending the second advertisement message of the target protocol to the first interface. At the same time, it also listens for the first advertisement message of the target protocol from the first interface to obtain the working mode support capability and current working mode notified by the first interface.
[0129] That is, the two parties in the negotiation can periodically notify each other of the interface management information and working status of their own device interfaces through the target protocol advertisement message, and keep sending continuously when the interface is in the up state.
[0130] In one example, the target protocol advertisement message can include the working mode support capability of the interface, can include the current working mode of the interface, and can also include the target working mode of the interface, etc.
[0131] In one example, the target protocol advertisement message sent by the controlled device interface (specifically the second interface in this embodiment) can only include the working mode support capability and the current working mode of the interface. The target protocol advertisement message sent by the controlled device can also include the working mode support capability, the current working mode of the interface, and the target working mode of the interface at the same time. At this time, the value of the target working mode of the interface can be a null value or a non-true value (not specifically limited in this regard).
[0132] In one example, the target protocol advertisement message sent by the control device interface (specifically the first interface in this embodiment) includes the working mode support capability, the current working mode of the interface, and the target working mode of the interface at the same time. At this time, the value of the target working mode of the interface can identify the working mode specified according to the network plan.
[0133] In one example, when the target working mode includes the Flexible Ethernet (FlexE) working mode and the Standard Ethernet (StdE) working mode, listening for the first advertisement message of the target protocol sent by the first interface can be specifically:
[0134] The current management channel based on the second interface listens for the first advertisement message of the target protocol sent by the first interface, where the current management channel automatically switches between the FlexE overhead management channel and the Ethernet MAC management channel.
[0135] The current management channel of the second interface of the second communication device automatically switches between the FlexE overhead management channel and the Ethernet MAC management channel. If the current management channel is the FlexE overhead management channel, it listens for the first advertisement message of the target protocol sent by the first interface through the FlexE overhead management channel. If the current management channel is the Ethernet MAC management channel, it listens for the first advertisement message of the target protocol sent by the first interface through the Ethernet MAC management channel.
[0136] In an example, the current management channel of the first interface automatically switching between the FlexE overhead management channel and the Ethernet MAC management channel can be specifically:
[0137] When the current management channel is the FlexE overhead management channel, if the FlexE valid overhead signal sent by the first interface cannot be received through the second interface, the current management channel is switched from the FlexE overhead management channel to the Ethernet MAC management channel;
[0138] When the current management channel is the Ethernet MAC management channel, if the standard Ethernet valid overhead signal sent by the first interface cannot be received through the second interface, the current management channel is switched back from the Ethernet MAC management channel to the FlexE overhead management channel.
[0139] In this example, the FlexE overhead management channel can be enabled first, and the first advertisement message of the target protocol sent by the first interface is listened for through the FlexE overhead management channel. At the same time, it is judged whether the FlexE valid overhead signal sent by the first interface can be received through the second interface. For example, it can be judged whether it can be received within a set time period. If so, there is no need to switch the current management channel. If not, the Ethernet MAC management channel is enabled, and the current management channel is switched from the FlexE overhead management channel to the Ethernet MAC management channel, and then the first advertisement message of the target protocol sent by the first interface is listened for through the Ethernet MAC management channel.
[0140] After the current management channel is switched to the Ethernet MAC management channel, it is determined whether a standard Ethernet valid overhead signal sent by the first interface can be received through the second interface. For example, it can be determined whether it can be received within a set time period. If so, there is no need to switch the current management channel. If not, the FlexE overhead management channel is enabled, and the current management channel is switched from the Ethernet MAC management channel to the FlexE overhead management channel. Furthermore, the target protocol first advertisement message sent by the first interface is monitored through the FlexE overhead management channel.
[0141] By automatically switching the current management channel, it is possible to support automatically extracting the target protocol advertisement message sent by the interface of the other communication device to obtain the management information of the other interface. Furthermore, the interfaces currently in different working modes can complete information interaction and advertisement through the target protocol, and on this basis, complete the working mode negotiation process.
[0142] At the same time, the initial FlexE interface (the physical port that has not been added to any FlexE Group) will also send specified overhead information so that the current management channel of the peer interface can receive the overhead signal.
[0143] In one example, the target protocol can be a data link layer protocol, such as LLDP. Correspondingly, the newly added TLV in the LLDP advertisement message can be used to identify at least one of the following: the working mode support ability of the interface, the current working mode of the interface, and the target working mode of the interface.
[0144] For the parts not explained in detail in this embodiment, please refer to the foregoing embodiment and will not be elaborated here.
[0145] In a specific embodiment, Figure 8 is a schematic flowchart of a method for determining the link dual-end mode provided by this application.
[0146] Assume that the two devices for negotiation are DUT (Device Under Test) 1 and DUT2 respectively, and the interfaces for negotiation are interface 1 of DUT1 and interface 2 of DUT2. As Figure 8 shown, a method for determining the link dual-end mode provided by this application specifically includes:
[0147] S310. DUT1 configures to specify the target working mode of interface 1 as A.
[0148] Where A is any one of FlexE and StdE.
[0149] S320. DUT1 determines whether interface 1 supports working mode A. If so, execute S330. If not, execute S340.
[0150] S330. DUT1 switches the current working mode of Interface 1 to A, sends an LLDP advertisement message, adds a target working mode TLV to the LLDP advertisement message, the target working mode is A, the current working mode in the LLDP advertisement message is A, and then continue to execute S350.
[0151] Among them, if Interface 1 has already been working in mode A, there is no need to switch.
[0152] To prevent the loss of advertisement messages, DUT1 can send multiple LLDP advertisement messages continuously.
[0153] S340. DUT1 sends an LLDP advertisement message, adds a target working mode TLV to the LLDP advertisement message, the target working mode is A, the current working mode in the LLDP advertisement message is the original mode, and then continue to execute S3100.
[0154] S350. DUT1 determines whether Interface 2 of DUT2 supports working mode A through the LLDP advertisement message of DUT2. Otherwise, continue to execute S3100. If so, execute S360.
[0155] S360. DUT1 starts a timer.
[0156] S370. After DUT2 receives the target working mode TLV in the LLDP advertisement message, if Interface 2 supports working mode A, it switches the current working mode of Interface 2 to A, updates the current working mode in the LLDP advertisement message, and immediately sends a new LLDP advertisement message. If Interface 2 does not support working mode A, no operation is required.
[0157] Among them, if Interface 2 has already been working in mode A, there is no need to switch.
[0158] To prevent the loss of advertisement messages, DUT2 can send multiple new LLDP advertisement messages continuously.
[0159] After switching the current working mode of Interface 2 to A, Interface 2 will not perform working mode switching until the interface is disconnected before receiving changes in advertisement information.
[0160] S380. When the timer of DUT1 expires, it determines whether the working mode in the last LLDP advertisement message received from DUT2 during the timer startup period is A. If so, continue to execute S390. Otherwise, execute S3100.
[0161] S390. DUT1 sends a mode negotiation success notice to the network management. The notice information includes the negotiated interface, working mode information, and the negotiation process ends.
[0162] S3100. The DUT1 sends a mode negotiation failure notice to the network management. The notice information includes but is not limited to the current working mode of interface 1 of this device, the current working mode of downstream device interface 2, and the working modes supported by downstream device interface 2.
[0163] In a specific embodiment, Figure 9 is a schematic flowchart of a method for determining the dual - end mode of a link provided by this application. In this embodiment, the two devices for negotiation are named DUT1 and DUT2 respectively, the negotiation interfaces are all dual - mode interfaces (supporting FlexE and StdE), and there are no negotiation - related configurations at the beginning of the negotiation. As Figure 9 shown, a method for determining the dual - end mode of a link provided by this application specifically includes:
[0164] S410. The working mode negotiated by DUT1 and DUT2 using the method described in OIF - FLEXE - ND - 01.0 is the FlexE mode.
[0165] S420. The negotiation interfaces of DUT1 and DUT2 respectively notify the peer that the interface working mode capabilities are to support FlexE and StdE, and the current mode is the FlexE mode.
[0166] S430. The target working mode in the forced working mode configuration information received by the DUT1 interface is StdE.
[0167] S440. The DUT1 interface switches its current working mode to the StdE mode.
[0168] S450. The DUT1 interface notifies the peer that the interface working mode capabilities are to support FlexE and StdE, the current working mode is the StdE mode, and the target working mode is the StdE mode.
[0169] To prevent the loss of notification messages, in this embodiment, DUT1 can send 3 consecutive notification messages.
[0170] S460. DUT1 starts the auto - negotiation timer.
[0171] S470. The DUT2 interface receives the notification message sent by DUT1 and switches its current working mode to StdE.
[0172] S480. The DUT2 interface notifies DUT1 that the interface working mode capabilities are to support FlexE and StdE, and the current working mode is the StdE mode.
[0173] To prevent the loss of notification messages, in this embodiment, DUT2 can send 3 consecutive notification messages.
[0174] S490. When DUT1 receives that the current working mode notified by DUT2 is StdE and determines that the mode negotiation is successful, it reports a successful negotiation message to the network management.
[0175] In a specific embodiment, Figure 10 It is a schematic flow diagram of a method for determining the dual - end mode of a link provided by this application. In this embodiment, the two negotiating devices are respectively named DUT1 and DUT2, and the negotiation interfaces are both dual - mode interfaces (supporting FlexE and StdE). At the beginning of the negotiation, the working mode of the negotiation interface of DUT1 is configured as FlexE, and the working mode of DUT2 is configured as StdE.
[0176] S510. The working modes negotiated by DUT1 and DUT2 using the method described in OIF - FLEXE - ND - 01.0 are FlexE mode and StdE mode respectively.
[0177] S520. The negotiation interfaces of DUT1 and DUT2 respectively notify the peer of the interface working mode capabilities as supporting FlexE and StdE, and the current modes are FlexE mode and StdE mode respectively.
[0178] S530. The target working mode in the forced working mode configuration information received by the DUT1 interface is FlexE.
[0179] S540. The DUT1 interface notifies the peer of the interface working mode capabilities as supporting FlexE and StdE, the current working mode is FlexE mode, and the target working mode is FlexE mode.
[0180] To prevent the loss of notification messages, in this embodiment, DUT1 can continuously send 3 notification messages.
[0181] S550. DUT1 starts the auto - negotiation timer.
[0182] S560. The DUT2 interface receives the notification message sent by DUT1 and switches its working mode to FlexE.
[0183] S570. The DUT2 interface notifies DUT1 of the interface working mode capabilities as supporting FlexE and StdE, and the current mode is FlexE mode.
[0184] To prevent the loss of notification messages, in this embodiment, DUT2 can continuously send 3 notification messages.
[0185] S580. When DUT1 receives that the current working mode notified by DUT2 is FlexE and determines that the mode negotiation is successful, it reports a successful negotiation message to the network management.
[0186] This embodiment also provides a device for determining the dual - end mode of a link. Figure 11 It is a schematic structural diagram of a device for determining the dual - end mode of a link provided by this application. As Figure 11 shown, a device for determining the dual - end mode of a link applied to a first communication device provided by an embodiment of this application can be implemented by software and / or hardware and integrated in the communication device. The device includes: a target working mode configuration module 610, a target working mode notification module 620, and a negotiation result determination module 630. Among them,
[0187] The target working mode configuration module 610 is configured to receive the forced working mode configuration information for the first interface of the first communication device, and then configure the current working mode of the first interface as the target working mode that matches the forced working mode configuration information;
[0188] The target working mode notification module 620 is configured to send a first target protocol notification message to the second interface of the second communication device. The first target protocol notification message includes the target working mode of the first interface, and is used to instruct the second communication device to configure the current working mode of the second interface as the target working mode; among them, the first interface and the second interface establish a communication connection;
[0189] The negotiation result determination module 630 is configured to, when it monitors the second target protocol notification message sent by the second interface, and the second target protocol notification message includes the current working mode of the second interface, if it is determined according to the second target protocol notification message that the current working mode of the second interface is the target working mode, then determine that the working mode negotiation between the first interface and the second interface is successful.
[0190] The technical solution provided by this embodiment, compared with the existing auto - negotiation method, the protocol mode can be manually intervened, and the final working mode is controlled by forced configuration. As long as both negotiation parties support mode designation, the negotiation will surely succeed, and the negotiation result is also the expected configured mode. In addition, only configuration on one device is required. Thus, when a new device accesses the network, only the gateway needs to send configurations to the existing network devices, reducing the process of on - site configuration of newly - accessed devices. At the same time, the technical solution provided by this embodiment can also reduce the unnecessary mode switching caused by other factors (for example, it can be that FlexE Group is not configured).
[0191] Further, the above device further includes: an interface status advertisement module, configured to send a first advertisement message of the target protocol to the second interface before receiving the forced working mode configuration information for the first interface of the first communication device, where the first advertisement message of the target protocol further includes the working mode support capability and the current working mode of the first interface; and monitor the second advertisement message of the target protocol sent by the second interface, where the second advertisement message of the target protocol further includes the working mode support capability of the second interface.
[0192] Further, the target working mode includes a Flexible Ethernet (FlexE) working mode and a Standard Ethernet (StdE) working mode; correspondingly, the negotiation result determination module 630 or the interface status advertisement module is specifically configured to monitor the second advertisement message of the target protocol sent by the second interface based on the current management channel of the first interface, where the current management channel automatically switches between the FlexE overhead management channel and the Ethernet Media Access Control (MAC) management channel; or monitor the second advertisement message of the target protocol sent by the second interface through both the FlexE overhead management channel and the Ethernet MAC management channel.
[0193] Further, the negotiation result determination module 630 or the interface status advertisement module is specifically configured to determine whether a valid FlexE overhead signal sent by the second interface can be received through the first interface. If so, the FlexE overhead management channel is enabled as the current management channel; otherwise, the Ethernet MAC management channel is enabled as the current management channel.
[0194] Optionally, the target protocol includes the Link Layer Discovery Protocol (LLDP);
[0195] The newly added Type-Length-Value (TLV) in the LLDP advertisement message is used to identify at least one of the following:
[0196] The working mode support capability of the interface, the current working mode of the interface, and the target working mode of the interface.
[0197] The link duplex mode determination device applied to the first communication device provided in this embodiment is used to implement the link duplex mode determination method applied to the first communication device as described in the embodiments of the present application. The implementation principle and technical effects of the link duplex mode determination device applied to the first communication device provided in this embodiment are similar to those of the link duplex mode determination method applied to the first communication device as described in the embodiments of the present application, and will not be elaborated here.
[0198] This embodiment also provides a link duplex mode determination device, Figure 12 which is a schematic structural diagram of a link duplex mode determination device provided by the present application. As Figure 12As shown in the figure, the link dual - end mode determination device provided in the embodiment of the present application and applied to the second communication device can be implemented by software and / or hardware and integrated in the communication device. The device includes: a current working mode configuration module 710 and a current working mode notification module 720, where,
[0199] The current working mode configuration module 710 is configured to, when a first notification message of a target protocol sent by a first interface of a first communication device is monitored, if the target working mode of the first interface is parsed according to the first notification message of the target protocol, configure the current working mode of a second interface of the second communication device as the target working mode;
[0200] wherein, the first interface and the second interface establish a communication connection; the target working mode matches the forced working mode configuration information for the first interface and is configured as the current working mode of the first interface;
[0201] The current working mode notification module 720 is configured to send a second notification message of the target protocol to the first interface, and the second notification message of the target protocol includes the current working mode of the second interface.
[0202] Compared with the existing auto - negotiation method, for the technical solution provided in this embodiment, the protocol mode can be manually intervened, and the final working mode is controlled by forced configuration. As long as both negotiation parties support mode designation, the negotiation will surely succeed, and the negotiation result is also the expected configured mode. In addition, only one - side device needs to be configured. Thus, when a new device accesses the network, only the gateway needs to send a configuration to the existing network devices, reducing the process of on - site configuration of newly - accessed devices. At the same time, the technical solution provided in this embodiment can also reduce unnecessary mode switching caused by other factors (such as not configuring FlexE Group).
[0203] Further, the above - mentioned device further includes: an interface status notification module, configured to send the second notification message of the target protocol to the first interface before monitoring the first notification message of the target protocol sent by the first interface of the first communication device, and the second notification message of the target protocol further includes the working mode support capability of the second interface; monitor the first notification message of the target protocol sent by the first interface, and the first notification message of the target protocol further includes the working mode support capability and the current working mode of the first interface.
[0204] Further, the target working mode includes the Flexible Ethernet (FlexE) working mode and the Standard Ethernet (StdE) working mode; correspondingly, the current working mode configuration module 710 or the interface status notification module is specifically configured to listen for the first advertisement message of the target protocol sent by the first interface based on the current management channel of the second interface, where the current management channel automatically switches between the FlexE overhead management channel and the Ethernet MAC management channel; or, listen for the first advertisement message of the target protocol sent by the first interface through both the FlexE overhead management channel and the Ethernet MAC management channel.
[0205] Further, the current working mode configuration module 710 or the interface status notification module is specifically configured to determine whether the FlexE valid overhead signal sent by the first interface can be received through the second interface. If so, the FlexE overhead management channel is enabled as the current management channel; otherwise, the Ethernet MAC management channel is enabled as the current management channel.
[0206] Optionally, the target protocol includes the Link Layer Discovery Protocol (LLDP);
[0207] The type length value (TLV) newly added in the LLDP advertisement message is used to identify at least one of the following:
[0208] The working mode support capability of the interface, the current working mode of the interface, and the target working mode of the interface.
[0209] The link duplex mode determination device applied to the second communication device provided in this embodiment is used to implement the link duplex mode determination method applied to the second communication device as described in the embodiments of the present application. The implementation principle and technical effects of the link duplex mode determination device applied to the second communication device provided in this embodiment are similar to those of the link duplex mode determination method applied to the second communication device as described in the embodiments of the present application, and will not be elaborated here.
[0210] The embodiments of the present application also provide a link duplex mode determination system. The link duplex mode determination system provided in the embodiments of the present application includes: a first communication device and a second communication device, where the first communication device and the second communication device establish a communication connection, for example, through multiple optical fibers for direct port connection;
[0211] The first communication device executes the link duplex mode determination method applied to the first communication device as described in any embodiment of the present application;
[0212] The second communication device executes the link duplex mode determination method applied to the second communication device as described in any embodiment of the present application.
[0213] For details not elaborated in this embodiment, please refer to the foregoing embodiments and will not be repeated here.
[0214] An embodiment of the present application provides a communication device. Figure 13 It is a schematic structural diagram of a communication device provided by the present application. As Figure 13 shown, the communication device provided by the present application includes one or more processors 810 and a memory 820. The processor 810 of the communication device can be one or more. Figure 13 Taking one processor 810 as an example; the memory 820 is used to store one or more programs. The one or more programs are executed by the one or more processors 810, so that the one or more processors 810 implement the link dual-end mode determination method applied to the first communication device as described in the embodiments of the present invention.
[0215] The processor 810 and the memory 820 in the communication device can be connected by a bus or other means. Figure 13 Taking the connection by bus as an example.
[0216] The memory 820, as a computer-readable storage medium, can be set to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the link dual-end mode determination method applied to the first communication device in the embodiments of the present application (for example, the target working mode configuration module 610, the target working mode notification module 620, and the negotiation result determination module 630 in the link dual-end mode determination device applied to the first communication device). The memory 820 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the device, etc. In addition, the memory 820 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 820 can further include a memory remotely set relative to the processor 810, and these remote memories can be connected to the communication node through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0217] An embodiment of the present application provides a communication device. Figure 14 It is a schematic structural diagram of a communication device provided by the present application. As Figure 14 shown, the communication device provided by the present application includes one or more processors 910 and a memory 920. The processor 910 of the communication device can be one or more. Figure 14Take a processor 910 as an example; a memory 920 is used to store one or more programs; the one or more programs are executed by the one or more processors 910, so that the one or more processors 910 implement the link dual-end mode determination method applied to the second communication device as described in the embodiments of the present invention.
[0218] The processor 910 and the memory 920 in the communication device may be connected through a bus or other means. Figure 14 Take the connection through the bus as an example.
[0219] The memory 920, as a computer-readable storage medium, can be set to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the link dual-end mode determination method applied to the second communication device in the embodiments of the present application (for example, the current working mode configuration module 710 and the current working mode notification module 720 in the link dual-end mode determination device applied to the second communication device). The memory 920 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 920 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 920 may further include a memory remotely set relative to the processor 910, and these remote memories may be connected to the communication node through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0220] The embodiments of the present application further provide a storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the link dual-end mode determination method applied to the first communication device in the embodiments of the present application, or implements the link dual-end mode determination method applied to the second communication device in the embodiments of the present application.
[0221] Among them, the link dual-end mode determination method applied to the first communication device includes:
[0222] Receiving the forced working mode configuration information for the first interface of the first communication device, and then configuring the current working mode of the first interface to the target working mode that matches the forced working mode configuration information;
[0223] Send a first advertisement message of the target protocol to the second interface of the second communication device. The first advertisement message of the target protocol includes the target working mode of the first interface, which is used to instruct the second communication device to configure the current working mode of the second interface as the target working mode; wherein, a communication connection is established between the first interface and the second interface.
[0224] When a second advertisement message of the target protocol sent by the second interface is monitored, the second advertisement message of the target protocol includes the current working mode of the second interface. If it is determined according to the second advertisement message of the target protocol that the current working mode of the second interface is the target working mode, it is determined that the working mode negotiation between the first interface and the second interface is successful.
[0225] A method for determining the link duplex mode in a second communication device includes:
[0226] When a first advertisement message of the target protocol sent by the first interface of the first communication device is monitored, if the target working mode of the first interface is parsed according to the first advertisement message of the target protocol, the current working mode of the second interface of the second communication device is configured as the target working mode.
[0227] Wherein, a communication connection is established between the first interface and the second interface; the target working mode matches the forced working mode configuration information for the first interface and is configured as the current working mode of the first interface.
[0228] Send a second advertisement message of the target protocol to the first interface. The second advertisement message of the target protocol includes the current working mode of the second interface.
[0229] Optionally, when executed by a computer processor, the computer-executable instructions can also be used to implement any one of the methods for determining the link duplex mode in the first communication device in the embodiments of the present application, or implement any one of the methods for determining the link duplex mode in the second communication device in the embodiments of the present application.
[0230] From the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software and necessary general-purpose hardware. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk, or optical disc of a computer, etc., and includes several instructions to enable a communication device (which can be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
[0231] It should be noted that in the embodiments of the link double-end mode determination device applied to the first communication device or the link double-end mode determination device applied to the second communication device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.
[0232] As described above, the above are only exemplary embodiments of this application and are not used to limit the protection scope of this application.
[0233] Generally speaking, various embodiments of this application can be implemented in hardware or special-purpose circuits, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although this application is not limited thereto.
[0234] Embodiments of this application can be implemented by a data processor of a mobile device executing computer program instructions, such as in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.
[0235] Any block diagram of a logical process in the accompanying drawings of this application may represent program steps, or may represent interconnected logical circuits, modules, and functions, or may represent a combination of program steps and logical circuits, modules, and functions. A computer program may be stored in a memory. The memory may be of any type suitable for the local technical environment and may be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical memory devices and systems (Digital Versatile Disc DVD or CD-ROM), etc. A computer-readable medium may include a non-transitory storage medium. A data processor may be of any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), and a processor based on a multi-core processor architecture.
[0236] By way of illustrative and non-limiting examples, a detailed description of exemplary embodiments of this application has been provided above. However, various modifications and adaptations of the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and the claims, without departing from the scope of the invention. Therefore, the proper scope of the invention will be determined in accordance with the claims.
Claims
1. A method for determining the dual - end mode of a link, characterized in that, applied to a first communication device, it includes: Receiving the forced working mode configuration information for the first interface of the first communication device, and then configuring the current working mode of the first interface as the target working mode that matches the forced working mode configuration information; the target working mode includes the FlexE working mode or the StdE working mode; Sending a first advertisement message of the target protocol to the second interface of the second communication device, where the first advertisement message of the target protocol includes the target working mode of the first interface, and is used to instruct the second communication device to configure the current working mode of the second interface as the target working mode; wherein, the first interface and the second interface establish a communication connection; When monitoring the second advertisement message of the target protocol sent by the second interface, the second advertisement message of the target protocol includes the current working mode of the second interface. If it is determined that the current working mode of the second interface is the target working mode according to the second advertisement message of the target protocol, it is determined that the working mode negotiation between the first interface and the second interface is successful.
2. The method according to claim 1, characterized in that, Before receiving the forced working mode configuration information for the first interface of the first communication device, it further includes: Sending the first advertisement message of the target protocol to the second interface, and the first advertisement message of the target protocol further includes the working mode support capability and the current working mode of the first interface; Monitoring the second advertisement message of the target protocol sent by the second interface, and the second advertisement message of the target protocol further includes the working mode support capability of the second interface.
3. The method according to claim 1 or 2, characterized in that, The target working mode includes the flexible Ethernet FlexE working mode and the standard Ethernet StdE working mode; Monitoring the second advertisement message of the target protocol sent by the second interface includes: Monitoring the second advertisement message of the target protocol sent by the second interface based on the current management channel of the first interface, where the current management channel automatically switches between the FlexE overhead management channel and the Ethernet media access control MAC management channel.
4. The method according to claim 3, characterized in that, The automatic switching of the current management channel between the FlexE overhead management channel and the Ethernet MAC management channel includes: When the current management channel is the FlexE overhead management channel, if the FlexE valid overhead signal sent by the second interface cannot be received through the first interface, then switch the current management channel from the FlexE overhead management channel to the Ethernet MAC management channel; When the current management channel is the Ethernet MAC management channel, if the standard Ethernet valid overhead signal sent by the second interface cannot be received through the first interface, then switch the current management channel from the Ethernet MAC management channel back to the FlexE overhead management channel.
5. The method according to claim 1, characterized in that, The target protocol includes the Link Layer Discovery Protocol (LLDP); The newly added type-length-value (TLV) in the LLDP advertisement message is used to identify at least one of the following: The working mode support capability of the interface, the current working mode of the interface, and the target working mode of the interface.
6. A method for determining the link dual-end mode, Characterized in that, Applied to a second communication device, it includes: When the first advertisement message of the target protocol sent by the first interface of the first communication device is monitored, if the target working mode of the first interface is parsed according to the first advertisement message of the target protocol, the current working mode of the second interface of the second communication device is configured as the target working mode; the target working mode includes the FlexE working mode or the StdE working mode; Wherein, the first interface and the second interface establish a communication connection; the target working mode matches the forced working mode configuration information for the first interface and is configured as the current working mode of the first interface; Send a second advertisement message of the target protocol to the first interface, and the second advertisement message of the target protocol includes the current working mode of the second interface.
7. The method according to claim 6, Characterized in that, Before monitoring the first advertisement message of the target protocol sent by the first interface of the first communication device, it further includes: Send the second advertisement message of the target protocol to the first interface, and the second advertisement message of the target protocol further includes the working mode support capability of the second interface; Monitor the first advertisement message of the target protocol sent by the first interface, and the first advertisement message of the target protocol further includes the working mode support capability and the current working mode of the first interface.
8. The method according to claim 6 or 7, Characterized in that, The target working mode includes the Flexible Ethernet (FlexE) working mode and the Standard Ethernet (StdE) working mode; Monitoring the first advertisement message of the target protocol sent by the first interface includes: Based on the current management channel of the second interface, monitor the first advertisement message of the target protocol sent by the first interface, wherein the current management channel automatically switches between the FlexE overhead management channel and the Ethernet MAC management channel.
9. The method according to claim 8, Characterized in that, The automatic switching of the current management channel between the FlexE overhead management channel and the Ethernet MAC management channel includes: When the current management channel is the FlexE overhead management channel, if the FlexE valid overhead signal sent by the first interface cannot be received through the second interface, switch the current management channel from the FlexE overhead management channel to the Ethernet MAC management channel; When the current management channel is the Ethernet MAC management channel, if the standard Ethernet valid overhead signal sent by the first interface cannot be received through the second interface, switch the current management channel back from the Ethernet MAC management channel to the FlexE overhead management channel.
10. The method according to claim 6, Characterized in that, The target protocol includes the Link Layer Discovery Protocol (LLDP); The newly added type length value (TLV) in the LLDP advertisement message is used to identify at least one of the following: The working mode support capability of the interface, the current working mode of the interface, and the target working mode of the interface.
11. A link dual - end mode determination device, Characterized in that, Applied to a first communication device, it includes: A target working mode configuration module, configured to receive the forced working mode configuration information for the first interface of the first communication device, and then configure the current working mode of the first interface as the target working mode that matches the forced working mode configuration information; the target working mode includes the FlexE working mode or the StdE working mode; A target working mode advertisement module, configured to send a first target protocol advertisement message to the second interface of a second communication device, where the first target protocol advertisement message includes the target working mode of the first interface, and is used to instruct the second communication device to configure the current working mode of the second interface as the target working mode; wherein, the first interface and the second interface establish a communication connection; A negotiation result determination module, configured to when it monitors the second target protocol advertisement message sent by the second interface, and the second target protocol advertisement message includes the current working mode of the second interface, if it is determined according to the second target protocol advertisement message that the current working mode of the second interface is the target working mode, then determine that the working mode negotiation between the first interface and the second interface is successful.
12. A link dual - end mode determination device, Characterized in that, Applied to a second communication device, it includes: A current working mode configuration module, configured to when it monitors the first target protocol advertisement message sent by the first interface of a first communication device, if it parses the target working mode of the first interface according to the first target protocol advertisement message, then configure the current working mode of the second interface of the second communication device as the target working mode; the target working mode includes the FlexE working mode or the StdE working mode; Wherein, the first interface and the second interface establish a communication connection; the target working mode matches the forced working mode configuration information for the first interface and is configured as the current working mode of the first interface; A current working mode advertisement module, configured to send a second target protocol advertisement message to the first interface, and the second target protocol advertisement message includes the current working mode of the second interface.
13. A communication device, Characterized in that, It includes: One or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the link dual - end mode determination method according to any one of claims 1 - 5, or implement the link dual - end mode determination method according to any one of claims 6 - 10.
14. A storage medium, Characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the link dual-end mode determination method according to any one of claims 1-5, or implements the link dual-end mode determination method according to any one of claims 6-10.
Citation Information
Patent Citations
Communication method and equipment as well as storage medium
CN109302372A
Port mode switching method and related equipment thereof
CN110289978A