CN110289978B - Port mode switching method and related equipment thereof - Google Patents

Port mode switching method and related equipment thereof Download PDF

Info

Publication number
CN110289978B
CN110289978B CN201810228514.0A CN201810228514A CN110289978B CN 110289978 B CN110289978 B CN 110289978B CN 201810228514 A CN201810228514 A CN 201810228514A CN 110289978 B CN110289978 B CN 110289978B
Authority
CN
China
Prior art keywords
mode
configuration parameters
port
equipment
configuration parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810228514.0A
Other languages
Chinese (zh)
Other versions
CN110289978A (en
Inventor
付嘉
高川
魏家道
陈志国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201810228514.0A priority Critical patent/CN110289978B/en
Priority to PCT/CN2019/078393 priority patent/WO2019179376A1/en
Publication of CN110289978A publication Critical patent/CN110289978A/en
Application granted granted Critical
Publication of CN110289978B publication Critical patent/CN110289978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/437Ring fault isolation or reconfiguration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/0836Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the application discloses a port mode switching method and related equipment thereof, which are used for switching the port modes of equipment at two ends of a link when the equipment at two ends are both ready to switch the port modes, so that the time of link failure caused by different port modes at two ends of the link during switching is avoided in the switching process. The method in the embodiment of the application comprises the following steps: the method comprises the steps that first equipment marks the state of a port of the first equipment as a first port state, and the first port state is a state of a first mode to be switched into a second mode; the method comprises the steps that a first device sends a negotiation request message to a second device, wherein the negotiation request message comprises first state information, and the first state information indicates that the state of a port of the first device is a first port state; the first equipment receives a negotiation response message sent by the second equipment, and the negotiation response message indicates that the state of a port of the second equipment is a first port state; and the first equipment switches the mode of the port into the second mode according to the negotiation response message.

Description

Port mode switching method and related equipment thereof
Technical Field
The present application relates to the field of communications, and in particular, to a method for switching a port mode and a related device.
Background
The introduction of the concept of flexible ethernet (FlexE) provides a feasible evolution direction for the virtualization of ethernet physical connections.
The device a and the device B perform data transmission, where the device a and the device B may be Packet Transport Network (PTN) devices, Access Transport Network (ATN) devices, routers, and other network transmission devices supporting Ethernet (ETH) and FlexE. The ETH port of the network transmission equipment supports two communication modes, the default is an ETH mode, the ETH port can support and be adjusted to a Flexe mode, and the ETH port can also be adjusted to the ETH mode from the Flexe mode. The ETH mode communicates by transceiving 802.3 standard ETH frames, and the FlexE mode communicates by standard FlexE frames.
At present, when a user switches a port mode of a device at one end from an ETH mode to a FlexE mode, or switches from the FlexE mode to the ETH mode, the switching at the two ends of a link generally has a sequence, which is difficult to ensure the synchronization of the switching.
Disclosure of Invention
The embodiment of the application provides a port mode switching method and related equipment thereof, which are used for switching the port modes of equipment at two ends of a link when the equipment at two ends is ready to switch the port modes, so that the time of link failure caused by different port modes at two ends of the link during switching is reduced in the switching process.
A first aspect of an embodiment of the present application provides a method for switching a port mode, including: the method comprises the steps that first equipment marks the state of a port of the first equipment as a first port state, wherein the first port state is a state in which a first mode is to be switched to a second mode; then, the first device sends a negotiation request message to the second device, where the negotiation request message includes first state information, and the first state information indicates that the state of the port of the first device is the first port state; the first device receives a negotiation response message sent by the second device, wherein the negotiation response message indicates that the state of the port of the second device is the first port state; and finally, the first equipment switches the mode of the port into a second mode according to the negotiation response message. The method and the device for switching the ports of the equipment at the two ends of the link have the advantages that the states to be switched are set, and the ports of the equipment at the two ends of the link can be switched when the equipment at the two ends are ready to switch the port modes, so that the time for avoiding link faults caused by different port modes at the two ends of the link during switching is reduced in the switching process.
In a possible design, in a first implementation manner of the first aspect of the embodiment of the present application, before the first device switches the mode of the port to the second mode according to the negotiation response message, the method further includes: the first device negotiates configuration parameters for the second mode with the second device. In the implementation mode, the two devices can negotiate the configuration parameters before switching, so that the problem that the configuration parameters of the devices at two ends need to be manually set when the port mode from the ETH mode to the Flexe mode is switched is solved, the deployment process is simplified, the processing efficiency is improved, and the link fault caused by manual configuration omission or manual configuration inconsistency is avoided.
In a possible design, in a second implementation manner of the first aspect of the embodiment of the present application, the negotiating, by the first device and the second device, the configuration parameters for the second mode includes: the first equipment sends a first configuration parameter to the second equipment, wherein the first configuration parameter is an unused configuration parameter in the first equipment; the first device receives a first negotiation result sent by the second device, wherein the first negotiation result indicates whether the second device has configuration parameters which are consistent with the first configuration parameters and are not used; when there is a configuration parameter that is consistent with the first configuration parameter and is not used, the first device sets the first configuration parameter as the configuration parameter for the second mode. In this implementation manner, a specific manner of negotiating configuration parameters between two devices is introduced, where a sender of the configuration parameters is a first device, and automation of a negotiation process is implemented, so that the embodiment of the present application has higher operability.
In one possible design, in a third implementation manner of the first aspect of the embodiment of the present application, the method further includes: when the configuration parameters which are consistent with the first configuration parameters and are not used do not exist, the first device sends second configuration parameters to the second device, wherein the second configuration parameters are the unused configuration parameters except the first configuration parameters in the first device. In this implementation manner, when the second device does not have the configuration parameter that is consistent with the first configuration parameter and is not used, the first device sends another unused configuration parameter to the second device, so that automation of the negotiation process is implemented, and implementation means of the embodiment are enriched.
In a possible design, in a fourth implementation manner of the first aspect of the embodiment of the present application, the negotiating, by the first device and the second device, the configuration parameters for the second mode includes: the first device receives a third configuration parameter sent by the second device, wherein the third configuration parameter is an unused configuration parameter in the second device; the first equipment judges whether the first equipment has configuration parameters which are consistent with the third configuration parameters and are not used; when the configuration parameters which are consistent with the third configuration parameters and are not used exist, the first device sets the third configuration parameters as the configuration parameters for the second mode, and sends a second negotiation result to the second device, wherein the second negotiation result indicates that the first device has the configuration parameters which are consistent with the third configuration parameters and are not used. In the implementation mode, another specific mode of negotiating the configuration parameters between the two devices is introduced, the sender of the configuration parameters is the second device, the automation of the negotiation process is realized, and specific implementation means are enriched.
In one possible design, in a fifth implementation manner of the first aspect of the embodiment of the present application, the method further includes: when the configuration parameters which are consistent with the third configuration parameters and are not used do not exist, the first device sends a third negotiation result to the second device, and the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first device. In this implementation manner, when the first device does not have the configuration parameter that is consistent with the third configuration parameter and is not used, the first device sends the negotiation result used for representing the above-mentioned condition to the second device, and the second device performs corresponding adjustment according to the negotiation result, so as to implement automation of the negotiation process, and make the scheme more implementable.
In a possible design, in a sixth implementation manner of the first aspect of the embodiment of the present application, before the first device and the second device negotiate configuration parameters for the second mode, the method further includes: the first device sends a first device priority to the second device; the first equipment receives a second equipment priority sent by the second equipment; and the first equipment judges that the priority of the first equipment is higher than that of the second equipment. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In one possible design, in a seventh implementation manner of the first aspect of the embodiment of the present application, before the first device and the second device negotiate configuration parameters for the second mode, the method further includes: the first device sends a first device priority to the second device; the first equipment receives a second equipment priority sent by the second equipment; and the first equipment judges that the priority of the first equipment is not higher than the priority of the second equipment. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in an eighth implementation manner of the first aspect of the embodiment of the present application, the configuration parameter includes: FlexE Group Number and FlexE physical connection Number PHY Number. In the implementation manner, the specific type of the configuration parameter is specifically introduced, so that the scheme is more operable.
A second aspect of the embodiments of the present application provides a method for switching a port mode, including: the method comprises the steps that a second device receives a negotiation request message sent by a first device, wherein the negotiation request message contains first state information, the first state information indicates that the state of a port of the first device is a first port state, and the first port state is a state of a first mode to be switched into a second mode; the second device judges whether the first port state is consistent with a second port state, wherein the second port state is the state of the port of the second device marked by the second device; when the first port state is consistent with the second port state, the second device sends a negotiation response message to the first device, the second device switches the mode of the port of the second device to a second mode, and the negotiation response message indicates that the state of the port of the second device is the first port state. The method and the device for switching the ports of the equipment at the two ends of the link have the advantages that the states to be switched are set, and the ports of the equipment at the two ends of the link can be switched when the equipment at the two ends are ready to switch the port modes, so that the time for avoiding link faults caused by different port modes at the two ends of the link during switching is reduced in the switching process.
In a possible design, in a first implementation manner of the second aspect of the embodiment of the present application, before the second device switches the mode of the port of the second device to the second mode, the method further includes: the second device negotiates configuration parameters for the second mode with the first device. In the implementation mode, the two devices can negotiate the configuration parameters before switching, so that the problem that the configuration parameters of the devices at two ends need to be manually set when the port mode from the ETH mode to the Flexe mode is switched is solved, the deployment process is simplified, the processing efficiency is improved, and the link fault caused by manual configuration omission or manual configuration inconsistency is avoided.
In a possible design, in a second implementation manner of the second aspect of the embodiment of the present application, the negotiating, by the second device and the first device, the configuration parameters for the second mode includes: the second equipment receives a first configuration parameter sent by the first equipment, wherein the first configuration parameter is an unused configuration parameter in the first equipment; the second equipment judges whether the second equipment has configuration parameters which are consistent with the first configuration parameters and are not used; the second equipment sends a first negotiation result to the first equipment, wherein the first negotiation result indicates whether the second equipment has configuration parameters which are consistent with the first configuration parameters and are not used; when there is a configuration parameter that is consistent with the first configuration parameter and is not used, then the second device sets the first configuration parameter as the configuration parameter for the second mode. In this implementation manner, a specific manner of negotiating configuration parameters between two devices is introduced, where a sender of the configuration parameters is a first device, and automation of a negotiation process is implemented, so that the embodiment of the present application has higher operability.
In a possible design, in a third implementation manner of the second aspect of the embodiment of the present application, the negotiating, by the second device and the first device, the configuration parameters for the second mode includes: the second device sends a second configuration parameter to the first device, wherein the second configuration parameter is a configuration parameter which is not used in the second device; the second device receives a second negotiation result sent by the first device, wherein the second negotiation result indicates that the configuration parameters which are consistent with the second configuration parameters and are not used exist in the first device; the second device sets the second configuration parameter to the configuration parameter for the second mode. In the implementation mode, another specific mode of negotiating the configuration parameters between the two devices is introduced, the sender of the configuration parameters is the second device, the automation of the negotiation process is realized, and specific implementation means are enriched.
In a possible design, in a fourth implementation manner of the second aspect of the embodiment of the present application, the negotiating, by the second device and the first device, the configuration parameters for the second mode includes: the second device sends a third configuration parameter to the first device, wherein the third configuration parameter is a configuration parameter which is not used in the second device; the second device receives a third negotiation result sent by the first device, wherein the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first device; the second device sends a fourth configuration parameter to the first device, where the fourth configuration parameter is an unused configuration parameter in the second device except for the third configuration parameter. In this implementation manner, when the first device does not have the configuration parameter that is consistent with the third configuration parameter and is not used, the first device sends the negotiation result used for representing the above-mentioned condition to the second device, and the second device performs corresponding adjustment according to the negotiation result, so as to implement automation of the negotiation process, and make the scheme more implementable.
In a possible design, in a fifth implementation manner of the second aspect of the embodiment of the present application, before the second device negotiates configuration parameters for the second mode with the first device, the method further includes: the second device sending a second device priority to the first device; the second equipment receives the first equipment priority sent by the first equipment; and the second equipment judges that the priority of the first equipment is higher than that of the second equipment. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in a sixth implementation manner of the second aspect of the embodiment of the present application, before the second device negotiates configuration parameters for the second mode with the first device, the method further includes: the second device sending a second device priority to the first device; the second equipment receives the first equipment priority sent by the first equipment; and the second equipment judges that the priority of the first equipment is not higher than the priority of the second equipment. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in a seventh implementation manner of the second aspect of the embodiment of the present application, the configuration parameters include: FlexE Group Number and FlexE physical connection Number PHY Number. In the implementation manner, the specific type of the configuration parameter is specifically introduced, so that the scheme is more operable.
A third aspect of an embodiment of the present application provides an apparatus, where the apparatus is a first apparatus, and the first apparatus includes: a marking unit, configured to mark a state of a port of the first device as a first port state, where the first port state is a state in which a first mode is to be switched to a second mode; a sending unit, configured to send a negotiation request message to a second device, where the negotiation request message includes first state information, and the first state information indicates that a state of a port of the first device is a first port state; a receiving unit, configured to receive a negotiation response message sent by the second device, where the negotiation response message indicates that a port state of the second device is the first port state; and the switching unit is used for switching the mode of the port to a second mode according to the negotiation response message. The method and the device for switching the ports of the link have the advantages that the states to be switched are set, the port modes of the devices at the two ends of the link can be switched simultaneously when the devices at the two ends are ready to switch the port modes, and therefore the time for avoiding link faults caused by different port modes at the two ends of the link during switching is shortened.
In one possible design, in a first implementation manner of the third aspect of the embodiment of the present application, the first device further includes: a negotiation unit, configured to negotiate configuration parameters for the second mode with the second device. In the implementation mode, the two devices can negotiate the configuration parameters before switching, so that the problem that the configuration parameters of the devices at two ends need to be manually set when the port mode from the ETH mode to the Flexe mode is switched is solved, the deployment process is simplified, the processing efficiency is improved, and the link fault caused by manual configuration omission or manual configuration inconsistency is avoided.
In a possible design, in a second implementation manner of the third aspect of the embodiment of the present application, the negotiation unit is specifically configured to: sending a first configuration parameter to the second device, wherein the first configuration parameter is an unused configuration parameter in the first device; receiving a first negotiation result sent by the second device, wherein the first negotiation result indicates whether the second device has configuration parameters which are consistent with the first configuration parameters and are not used; when there is a configuration parameter that is consistent with the first configuration parameter and is not used, setting the first configuration parameter as the configuration parameter for the second mode. In this implementation manner, a specific manner of negotiating configuration parameters between two devices is introduced, where a sender of the configuration parameters is a first device, and automation of a negotiation process is implemented, so that the embodiment of the present application has higher operability.
In a possible design, in a third implementation manner of the third aspect of the embodiment of the present application, the first device further includes: a sending unit, configured to send a second configuration parameter to the second device when there is no configuration parameter that is consistent with the first configuration parameter and is not used, where the second configuration parameter is an unused configuration parameter in the first device except for the first configuration parameter. In this implementation manner, when the second device does not have the configuration parameter that is consistent with the first configuration parameter and is not used, the first device sends another unused configuration parameter to the second device, so that automation of the negotiation process is implemented, and implementation means of the embodiment are enriched.
In a possible design, in a fourth implementation manner of the third aspect of the embodiment of the present application, the negotiation unit is further specifically configured to: receiving a third configuration parameter sent by the second device, where the third configuration parameter is an unused configuration parameter in the second device; judging whether the first equipment has configuration parameters which are consistent with the third configuration parameters and are not used; when the configuration parameters which are consistent with the third configuration parameters and are not used exist, setting the third configuration parameters as the configuration parameters for the second mode, and sending a second negotiation result to the second equipment, wherein the second negotiation result indicates that the first equipment has the configuration parameters which are consistent with the third configuration parameters and are not used. In the implementation mode, another specific mode of negotiating the configuration parameters between the two devices is introduced, the sender of the configuration parameters is the second device, the automation of the negotiation process is realized, and specific implementation means are enriched.
In a possible design, in a fifth implementation manner of the third aspect of the embodiment of the present application, the first device further includes: a sending unit, configured to send a third negotiation result to the second device when there is no configuration parameter that is consistent with the third configuration parameter and is not used, where the third negotiation result indicates that there is no configuration parameter that is consistent with the third configuration parameter and is not used by the first device. In this implementation manner, when the first device does not have the configuration parameter that is consistent with the third configuration parameter and is not used, the first device sends the negotiation result used for representing the above-mentioned condition to the second device, and the second device performs corresponding adjustment according to the negotiation result, so as to implement automation of the negotiation process, and make the scheme more implementable.
In a possible design, in a sixth implementation manner of the third aspect of the embodiment of the present application, the first device further includes: a sending unit, configured to send a first device priority to the second device; a receiving unit, configured to receive a second device priority sent by the second device; and the judging unit is used for judging that the priority of the first equipment is higher than that of the second equipment. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in a seventh implementation manner of the third aspect of the embodiment of the present application, the first device further includes: a sending unit, configured to send a first device priority to the second device; a receiving unit, configured to receive a second device priority sent by the second device; and the judging unit is used for judging that the priority of the first equipment is not higher than the priority of the second equipment. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in an eighth implementation manner of the third aspect of the embodiment of the present application, the configuration parameter includes: FlexE Group Number and FlexE physical connection Number PHY Number. In the implementation manner, the specific type of the configuration parameter is specifically introduced, so that the scheme is more operable.
A fourth aspect of an embodiment of the present application provides an apparatus, where the apparatus is a second apparatus, and the second apparatus includes: a receiving unit, configured to receive a negotiation request message sent by a first device, where the negotiation request message includes first state information, and the first state information indicates that a port state of the first device is a first port state, where the first port state is a state in which a first mode is to be switched to a second mode; a determining unit, configured to determine whether the first port state is consistent with a second port state, where the second port state is a state of a port of the second device marked by the second device; a processing unit, configured to send a negotiation response message to the first device when the first port state is consistent with the second port state, and switch the mode of the port of the second device to the second mode, where the negotiation response message indicates that the state of the port of the second device is the first port state. The method and the device for switching the ports of the link have the advantages that the states to be switched are set, the port modes of the devices at the two ends of the link can be switched simultaneously when the devices at the two ends are ready to switch the port modes, and therefore the time for avoiding link faults caused by different port modes at the two ends of the link during switching is shortened.
In one possible design, in a first implementation manner of the fourth aspect of the embodiment of the present application, the second device further includes: a negotiation unit, configured to negotiate configuration parameters for the second mode with the first device. In the implementation mode, the two devices can negotiate the configuration parameters before switching, so that the problem that the configuration parameters of the devices at two ends need to be manually set when the port mode from the ETH mode to the Flexe mode is switched is solved, the deployment process is simplified, the processing efficiency is improved, and the link fault caused by manual configuration omission or manual configuration inconsistency is avoided.
In a possible design, in a second implementation manner of the fourth aspect of the embodiment of the present application, the negotiation unit is specifically configured to: receiving a first configuration parameter sent by the first device, wherein the first configuration parameter is an unused configuration parameter in the first device; judging whether the second equipment has configuration parameters which are consistent with the first configuration parameters and are not used; sending a first negotiation result to the first device, wherein the first negotiation result indicates whether the second device has the configuration parameters which are consistent with the first configuration parameters and are not used; when there is a configuration parameter that is consistent with the first configuration parameter and is not used, then the second device sets the first configuration parameter as the configuration parameter for the second mode. In this implementation manner, a specific manner of negotiating configuration parameters between two devices is introduced, where a sender of the configuration parameters is a first device, and automation of a negotiation process is implemented, so that the embodiment of the present application has higher operability.
In a possible design, in a third implementation manner of the fourth aspect of the embodiment of the present application, the negotiation unit is further specifically configured to: sending a second configuration parameter to the first device, wherein the second configuration parameter is an unused configuration parameter in the second device; receiving a second negotiation result sent by the first device, wherein the second negotiation result indicates that the configuration parameters which are consistent with the second configuration parameters and are not used exist in the first device; setting the second configuration parameter to the configuration parameter for the second mode. In the implementation mode, another specific mode of negotiating the configuration parameters between the two devices is introduced, the sender of the configuration parameters is the second device, the automation of the negotiation process is realized, and specific implementation means are enriched.
In a possible design, in a fourth implementation manner of the fourth aspect of the embodiment of the present application, the negotiation unit is further specifically configured to: sending a third configuration parameter to the first device, wherein the third configuration parameter is an unused configuration parameter in the second device; receiving a third negotiation result sent by the first device, wherein the third negotiation result indicates that the configuration parameter which is consistent with the third configuration parameter and is not used does not exist in the first device; sending a fourth configuration parameter to the first device, where the fourth configuration parameter is an unused configuration parameter in the second device except for the third configuration parameter. In this implementation manner, when the first device does not have the configuration parameter that is consistent with the third configuration parameter and is not used, the first device sends the negotiation result used for representing the above-mentioned situation to the second device, so as to implement automation of the negotiation process, and the second device makes corresponding adjustment according to the negotiation result, so that the scheme has higher realizability.
In a possible design, in a fifth implementation manner of the fourth aspect of the embodiment of the present application, the second device further includes: a sending unit, configured to send a second device priority to the first device; a receiving unit, configured to receive a first device priority sent by the first device; and the judging unit is used for judging that the priority of the first equipment is higher than that of the second equipment. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in a sixth implementation manner of the fourth aspect of the embodiment of the present application, the second device further includes: a sending unit, configured to send a second device priority to the first device; a receiving unit, configured to receive a first device priority sent by the first device; and the judging unit is used for judging that the priority of the first equipment is not higher than the priority of the second equipment. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in a seventh implementation manner of the fourth aspect of the embodiment of the present application, the configuration parameters include: FlexE Group Number and FlexE physical connection Number PHY Number. In the implementation manner, the specific type of the configuration parameter is specifically introduced, so that the scheme is more operable.
Yet another aspect of the present application provides a computer-readable storage medium having stored therein instructions, which when executed on a computer, cause the computer to perform the method of the above-described aspects.
Yet another aspect of the present application provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of the above-described aspects.
A fifth aspect of an embodiment of the present application provides an apparatus, which is a first apparatus, and which includes a logic processor, a receiver, and a transmitter: the logic processor is configured to mark a state of a port of the first device as a first port state, where the first port state is a state in which a first mode is to be switched to a second mode; the transmitter is configured to send a negotiation request message to a second device, where the negotiation request message includes first state information, and the first state information indicates that a state of a port of the first device is the first port state; the receiver is configured to receive a negotiation response message sent by the second device, where the negotiation response message indicates that a port state of the second device is the first port state; the logic processor is further configured to switch the mode of the port to the second mode according to the negotiation response message. The method and the device for switching the ports of the equipment at the two ends of the link have the advantages that the states to be switched are set, and the ports of the equipment at the two ends of the link can be switched when the equipment at the two ends are ready to switch the port modes, so that the time for avoiding link faults caused by different port modes at the two ends of the link during switching is reduced in the switching process.
In one possible design, in a first implementation manner of the fifth aspect of the embodiment of the present application, before the logic processor switches the mode of the port to the second mode, the logic processor negotiates, through the transmitter and the receiver, configuration parameters for the second mode with the second device. In the implementation mode, the two devices can negotiate the configuration parameters before switching, so that the problem that the configuration parameters of the devices at two ends need to be manually set when the port mode from the ETH mode to the Flexe mode is switched is solved, the deployment process is simplified, the processing efficiency is improved, and the link fault caused by manual configuration omission or manual configuration inconsistency is avoided.
In a possible design, in a second implementation manner of the fifth aspect of this embodiment of the present application, the negotiating, by the logic processor, configuration parameters for the second mode includes: the transmitter transmits a first configuration parameter to the second device, wherein the first configuration parameter is a configuration parameter which is not used in the first device; the receiver receives a first negotiation result sent by the second device, wherein the first negotiation result indicates whether the second device has configuration parameters which are consistent with the first configuration parameters and are not used; when there is a configuration parameter that is consistent with the first configuration parameter and that is not used, the logical processor sets the first configuration parameter to the configuration parameter for the second mode. In this implementation manner, a specific manner of negotiating configuration parameters between two devices is introduced, where a sender of the configuration parameters is a first device, and automation of a negotiation process is implemented, so that the embodiment of the present application has higher operability.
In a possible design, in a third implementation manner of the fifth aspect of the embodiment of the present application, the transmitter is further configured to: when the configuration parameters which are consistent with the first configuration parameters and are not used do not exist, sending second configuration parameters to the second equipment, wherein the second configuration parameters are the unused configuration parameters except the first configuration parameters in the first equipment. In this implementation manner, when the second device does not have the configuration parameter that is consistent with the first configuration parameter and is not used, the first device sends another unused configuration parameter to the second device, so that automation of the negotiation process is implemented, and implementation means of the embodiment are enriched.
In a possible design, in a fourth implementation manner of the fifth aspect of the embodiment of the present application, the negotiating configuration parameters for the second mode includes: the receiver receives a third configuration parameter sent by the second device, wherein the third configuration parameter is a configuration parameter which is not used in the second device; the logic processor judges whether a configuration parameter which is consistent with the third configuration parameter and is not used exists in the first equipment; when the configuration parameters which are consistent with the third configuration parameters and are not used exist, the logic processor sets the third configuration parameters as the configuration parameters for the second mode, and the transmitter transmits a second negotiation result to the second device, wherein the second negotiation result indicates that the first device has the configuration parameters which are consistent with the third configuration parameters and are not used. In the implementation mode, another specific mode of negotiating the configuration parameters between the two devices is introduced, the sender of the configuration parameters is the second device, the automation of the negotiation process is realized, and specific implementation means are enriched.
In a possible design, in a fifth implementation manner of the fifth aspect of the embodiment of the present application, the transmitter is further configured to: when the configuration parameters which are consistent with the third configuration parameters and are not used do not exist, sending a third negotiation result to the second equipment, wherein the third negotiation result indicates that the first equipment does not have the configuration parameters which are consistent with the third configuration parameters and are not used. In this implementation manner, when the first device does not have the configuration parameter that is consistent with the third configuration parameter and is not used, the first device sends the negotiation result used for representing the above-mentioned condition to the second device, and the second device performs corresponding adjustment according to the negotiation result, so as to implement automation of the negotiation process, and make the scheme more implementable.
In a possible design, in a sixth implementation manner of the fifth aspect of the embodiment of the present application, the transmitter is configured to transmit the priority of the first device to the second device; the receiver is configured to receive a second device priority sent by the second device; the logic processor is configured to determine that the first device priority is higher than the second device priority. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in a seventh implementation manner of the fifth aspect of the embodiment of the present application, the transmitter is configured to transmit the priority of the first device to the second device; the receiver is configured to receive a second device priority sent by the second device; the logic processor is configured to determine that the priority of the first device is not higher than the priority of the second device. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in an eighth implementation manner of the fifth aspect of the embodiment of the present application, the configuration parameters include: FlexE Group Number and FlexE physical connection Number PHY Number. In the implementation manner, the specific type of the configuration parameter is specifically introduced, so that the scheme is more operable.
A sixth aspect of embodiments of the present application provides an apparatus, which is a second apparatus, the first apparatus comprising a logical processor, a receiver, and a transmitter: the receiver is configured to receive a negotiation request message sent by a first device, where the negotiation request message includes first state information, where the first state information indicates that a port state of the first device is a first port state, and the first port state is a state in which a first mode is to be switched to a second mode; the logic processor is configured to determine whether the first port state is consistent with a second port state, where the second port state is a state of a port of the second device marked by the second device; the transmitter is configured to send a negotiation response message to the first device when the first port state is consistent with the second port state, where the negotiation response message indicates that the port state of the second device is the first port state, and the logic processor is configured to switch the port mode of the second device to the second mode. The method and the device for switching the ports of the equipment at the two ends of the link have the advantages that the states to be switched are set, and the ports of the equipment at the two ends of the link can be switched when the equipment at the two ends are ready to switch the port modes, so that the time for avoiding link faults caused by different port modes at the two ends of the link during switching is reduced in the switching process.
In one possible design, in a first implementation manner of the sixth aspect of the embodiment of the present application, before the logic processor switches the mode of the port to the second mode, the logic processor, through the transmitter and the receiver: negotiating configuration parameters for the second mode with the first device. In the implementation mode, the two devices can negotiate the configuration parameters before switching, so that the problem that the configuration parameters of the devices at two ends need to be manually set when the port mode from the ETH mode to the Flexe mode is switched is solved, the deployment process is simplified, the processing efficiency is improved, and the link fault caused by manual configuration omission or manual configuration inconsistency is avoided.
In a possible design, in a second implementation manner of the sixth aspect of this embodiment of the present application, the negotiating configuration parameters for the second mode includes: the receiver receives a first configuration parameter sent by the first device, wherein the first configuration parameter is a configuration parameter which is not used in the first device; the logic processor judges whether a configuration parameter which is consistent with the first configuration parameter and is not used exists in the second equipment; the transmitter transmits a first negotiation result to the first device, wherein the first negotiation result indicates whether the second device has the configuration parameters which are consistent with the first configuration parameters and are not used; when there is a configuration parameter that is consistent with the first configuration parameter and that is not used, the logical processor sets the first configuration parameter to the configuration parameter for the second mode. In this implementation manner, a specific manner of negotiating configuration parameters between two devices is introduced, where a sender of the configuration parameters is a first device, and automation of a negotiation process is implemented, so that the embodiment of the present application has higher operability.
In a possible design, in a third implementation manner of the sixth aspect of the embodiment of the present application, the negotiating configuration parameters for the second mode includes: the transmitter transmits a second configuration parameter to the first device, wherein the second configuration parameter is a configuration parameter which is not used in the second device; the receiver receives a second negotiation result sent by the first device, wherein the second negotiation result indicates that the configuration parameters which are consistent with the second configuration parameters and are not used exist in the first device; the logical processor sets the second configuration parameter to the configuration parameter for the second mode. In the implementation mode, another specific mode of negotiating the configuration parameters between the two devices is introduced, the sender of the configuration parameters is the second device, the automation of the negotiation process is realized, and specific implementation means are enriched.
In a possible design, in a fourth implementation manner of the sixth aspect of the embodiment of the present application, the negotiating configuration parameters for the second mode includes: the transmitter transmits a third configuration parameter to the first device, wherein the third configuration parameter is a configuration parameter which is not used in the second device; the receiver receives a third negotiation result sent by the first device, wherein the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first device; the transmitter transmits a fourth configuration parameter to the first device, where the fourth configuration parameter is an unused configuration parameter in the second device except for the third configuration parameter. In this implementation manner, when the first device does not have the configuration parameter that is consistent with the third configuration parameter and is not used, the first device sends the negotiation result used for representing the above-mentioned condition to the second device, and the second device performs corresponding adjustment according to the negotiation result, so as to implement automation of the negotiation process, and make the scheme more implementable.
In one possible design, in a fifth implementation manner of the sixth aspect of the embodiment of the present application, the transmitter is configured to transmit a second device priority to the first device; the receiver is used for receiving the first equipment priority sent by the first equipment; the logic processor is configured to determine that the first device priority is higher than the second device priority. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in a sixth implementation manner of the sixth aspect of the embodiment of the present application, the transmitter is configured to transmit a second device priority to the first device; the receiver is used for receiving the first equipment priority sent by the first equipment; the logic processor is configured to determine that the priority of the first device is not higher than the priority of the second device. In the implementation mode, before the configuration parameters are sent, the priority of the equipment is determined, and the party with the higher priority is used as the sender of the configuration parameters, so that the negotiation process is flexible and controllable, and the flexibility and controllability of the scheme are improved.
In a possible design, in a seventh implementation manner of the sixth aspect of the embodiment of the present application, the configuration parameters include: FlexE Group Number and FlexE physical connection Number PHY Number. In the implementation manner, the specific type of the configuration parameter is specifically introduced, so that the scheme is more operable.
According to the technical scheme, the embodiment of the application has the following advantages: the method comprises the steps that first equipment marks the state of a port of the first equipment as a first port state, wherein the first port state is a state in which a first mode is to be switched into a second mode; then the first device sends a negotiation request message to the second device, wherein the negotiation request message contains first state information, and the first state information indicates that the state of the port of the first device is a first port state; then the first device receives a negotiation response message sent by the second device, wherein the negotiation response message indicates that the state of the port of the second device is the first port state; and finally, the first equipment switches the mode of the port into a second mode according to the negotiation response message. Due to the fact that the to-be-switched state is set, the port modes of the devices at the two ends of the link can be switched when the devices at the two ends are ready to switch the port modes, and therefore the time of link failure caused by the fact that the port modes at the two ends of the link are different in the switching process is shortened.
Drawings
Fig. 1 is a schematic view of an application scenario of a method for switching a port mode according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a port mode switching method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram illustrating a format of an overhead frame of a port mode switching method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a first apparatus provided in an embodiment of the present application;
fig. 5 is another schematic structural diagram of a first device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a second apparatus provided in an embodiment of the present application;
fig. 7 is another schematic structural diagram of a second apparatus provided in an embodiment of the present application;
fig. 8 is another schematic structural diagram of a first device according to an embodiment of the present disclosure;
fig. 9 is another schematic structural diagram of a second device according to an embodiment of the present disclosure.
Detailed Description
The embodiment of the application provides a port mode switching method and related equipment thereof, which are used for switching the port modes of equipment at two ends of a link when the equipment at two ends is ready to switch the port modes, so that the time of link failure caused by different port modes at two ends of the link during switching is reduced in the switching process.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method and the device are mainly applied to a scene that an ETH mode and a FlexE mode of a device port are mutually switched. Referring to fig. 1, fig. 1 is a schematic view of an application scenario of a real-time example of the present application, when ports of devices (a first device and a second device) at two ends of a link need to be switched to a state to be activated (i.e., a first port state in this embodiment, at this time, a device port does not yet really switch a mode, and the port still maintains an original mode), and when it is detected that port states of the ports at the two ends of the device are consistent and a negotiation is successful, the device ports at the two ends of the link switch a mode again, so that a link failure caused by the fact that the port modes at the two ends of the link are different in a switching process can be avoided. It should be noted that, the port mentioned in this embodiment is a port through which the first device and the second device perform communication link.
Referring to fig. 2, an embodiment of a method for switching a port mode in an embodiment of the present application includes:
201. the first device receives a handover instruction.
In this embodiment, if the current port mode of the first device is the first mode and needs to be switched to the second mode, the first device receives a switching instruction, where the switching instruction instructs the port mode of one port in the first device to be switched from the first mode to the second mode, where the switching instruction may be manually input on the first device, may also be sent to the first device by another device, may also be automatically generated by the first device at a predetermined time, and a specific sending manner is not limited here.
In the present application, the first mode is an ETH mode, the second mode is a FlexE mode, or the first mode is a FlexE mode, the second mode is an ETH mode, and specific modes of the first mode and the second mode are not limited herein.
202. The first device marks the state of the port of the first device as a first port state.
In this embodiment, after the first device receives the switching instruction, the first device may mark the state of the port corresponding to the switching instruction as a first port state, and record a state bit, where the first port state indicates that the first device is in a state in which the first mode is to be switched to the second mode.
In this embodiment, the status bit is recorded by, for example, 3 bits (bits), and in the first bit, a status bit "0" indicates a port status of the port mode to be switched from the first mode to the second mode; the status bit "1" represents a port status in which the port mode is to be switched from the second mode to the first mode; in the second and third bits, the status bit "00" represents the to-be-activated state (in this embodiment, the to-be-activated state is the first port state, and in other embodiments, the to-be-activated state may also be other port states, for example, a port state to be switched from the second mode to the first mode); the status bit "01" indicates that the second device has switched to the to-be-activated state (the first port state), but has not negotiated configuration parameters with the second device; the status bit "10" indicates that the second device has switched to the state to be activated (the first port state), but when the second device performs configuration parameter negotiation, the negotiation fails; the status bit "11" indicates that the second device has switched to the standby state and the negotiation is successful when performing the configuration parameter negotiation with the second device.
203. The first device sends a negotiation request message to the second device.
In this embodiment, after the first device marks the state of the port as the first port state, the first device sends a negotiation request message to the second device. In this embodiment, various messages used in communication between the first device and the second device are, for example, in a format of a FlexE Overhead Frame (Overhead Frame), or in an ethernet message format, and a specific format is not limited here. The status bit may be inserted into the message, for example, the status bit may be inserted into a FlexE overhead frame, the format of the overhead frame may be as shown in fig. 3, a part of bits in a Reserved (Reserved) bit segment of the overhead frame may be used as the status bit (for example, a second Reserved bit segment, which takes 3 bits), and the format of the FlexE overhead frame may refer to descriptions of an Optical Internet Forum (OIF) about a FlexE overhead frame and a multiframe (multiframe). The negotiation request message includes first status information (in this embodiment, the first status information may have a status bit of "000"), where the first status information indicates that the status of the port of the first device is the first port status, and the second device is a device in communication link with the first device.
204. The second device determines whether the first port state is consistent with the second port state, if so, step 205 is executed, and if not, the processing is stopped or a negotiation failure message is returned to the first device.
In this embodiment, after the second device receives the negotiation request message sent by the first device, the first port state information in the negotiation request message may be obtained, so as to determine whether the first port state indicated by the first state information is consistent with the state of the port of the second device marked by the second device (i.e., the second port state), which may specifically be: it is determined whether the status bit in the negotiation request is consistent with the status bit marked in the second device, both being "000".
If the first port state is judged to be inconsistent with the second port state of the second device, the second device may not return any message, keeps the original port state, and also returns a message of state negotiation failure, and after receiving the negotiation failure message, the first device may start negotiation again in a subsequent fixed period; and if the first port state is consistent with the second port state, the second equipment returns a negotiation response message to the first equipment. The negotiation response message indicates that the state of the port of the second device is the first port state, and the negotiation response message may include the same state bit as that in the negotiation request message so as to indicate that the state of the port of the second device is also the first port state. The negotiation response message may also comprise an indication field indicating that the status of the port of said second device is the same as the status of the first port, but not comprising the status bit itself.
205. The second device returns a negotiation response message to the first device.
In this embodiment, when the first port state is consistent with the second port state, a negotiation response message is returned to the first device, where the corresponding message indicates that the port state of the second device is also the first port state (that is, the second port state is consistent with the first port state), and then the second device may change the second and third bit state bits of the state bit marked on the self device from "00" to "01", and when the first device receives the negotiation response message, the second and third bit state bits of the state bit marked on the self device may also be changed from "00" to "01".
It should be noted that the case of switching from FlexE to ETH does not involve negotiation between the FlexE Group Number and the FlexE physical connection Number (PHY Number), i.e. steps 206 to 212 do not need to be executed, step 213 is directly executed, i.e. when the first port status is consistent with the second port status and the second device returns a negotiation response message to the first device, i.e. it indicates that the port switching of the first device and the second device has been successfully negotiated, at this time, the first device and the second device may directly change the status bits of the second and third bits of the marked status bits from "00" to "11", and at the same time, may switch the port mode from FlexE to ETH.
206. The first device sends the first device priority to the second device.
In this embodiment, when the first device learns that the state of the port of the first device is consistent with the state of the port of the second device, the first device sends a first device priority to the second device, where the first device priority may be a MAC address (which may be a multiplexed port MAC address) of the port of the first device or a device priority defined by a user or a device, and a specific form of the first device priority is not limited here.
The priority of the first device may be sent in a FlexE overhead frame format, or in a customized ethernet format, and the specific sending format is not limited here.
207. The second device sends the second device priority to the first device.
In this embodiment, after the second device returns the negotiation response message to the first device, the second device priority is sent to the first device, where the second device priority may be a MAC address of a port of the second device (may multiplex the port MAC address), or may be a device priority customized by a user or a device, and a specific form of the second device priority is not limited here.
The priority of the second device may be sent in a FLexE overhead frame format, or may be sent in a self-defined message conforming to an ethernet format, and the specific sending format is not limited here.
208. The first device sends the first configuration parameters to the second device.
It should be noted that, when both the first device and the second device send their own priorities to the opposite end, both ends may determine the priorities of the first device and the second device, where the one end with the higher priority is used as a sender (active end) of the configuration parameter, and the other end is a receiver (passive end) of the configuration parameter.
It should be noted that step 206 and step 207 may be omitted, that is, the first device and the second device do not perform the interaction of the priority related information, and directly perform the negotiation of the configuration parameters. For example, the first device does not determine the priority, and directly sends the configuration parameters to the second device to start negotiation, and the second device automatically completes negotiation as a passive party after receiving the configuration parameters.
It should be noted that the configuration parameters, the first configuration parameters, and the second configuration parameters mentioned in the embodiments of the present application include: FlexE Group Number and FlexE PHY Number.
209. The second device determines whether there is a configuration parameter that is consistent with the first configuration parameter and is not used in the second device, if not, step 210 is executed, and if so, step 212 is executed.
For example, the first device sends parameters with a FlexE Group Number of 3 and a FlexE PHY Number of 9, the second device determines whether the configuration parameters with the FlexE Group Number of 3 and the FlexE PHY Number of 9 on the second device have been used, that is, the second device determines whether the physical connection with the Group Number of 3 and the PHY Number of 9 on the second device has been used.
210. The second device sends a negotiation failure message to the first device.
In this embodiment, when the configuration parameter that is consistent with the first configuration parameter and is not used does not exist in the second device, the second device may feed back a negotiation failure message to the first device. The second and third bit status bits in the negotiation failure message may be "10" to indicate that the FlexE Group Number and PHY Number negotiation failed. The second device may change the second and third bit status bits of the self-flagged status bit from "01" to "10".
211. And the first equipment sends the second configuration parameters to the second equipment.
In this embodiment, after the first device receives the negotiation failure message sent by the second device, the second and third bit status bits of the status bit marked by the first device may also be changed from "01" to "10", and a second configuration parameter is sent to the second device, where the second configuration parameter is an unused configuration parameter in the first device except for a configuration parameter (first configuration parameter) already sent.
It should be noted that, after the second device receives the second configuration parameter, it is determined whether a configuration parameter that is consistent with the second configuration parameter and is not used exists in the second device, and if the configuration parameter does not exist, a negotiation failure message is sent to the first device. After the first device receives the negotiation failure message, it reselects the unused configuration parameters that have not been sent to the second device until the second device finds the configuration parameters that are consistent with the configuration parameters of the first device, and then performs step 212. If the second device does not find the configuration parameters consistent with the configuration parameters of the first device after the first device polls all the unused configuration parameters, the negotiation may be stopped at this time.
212. The second device sends a negotiation success message to the first device.
In this embodiment, when the second device has the configuration parameter that is consistent with the first configuration parameter or the second configuration parameter and is not used, a negotiation success message may be sent to the first device, and the status bits of the second and third bits in the negotiation success message may be "11" to indicate that the FlexE Group Number and the PHY Number negotiate successfully. The second device may change the state bits of the second and third bits of the state bit from "01" to "11", and after receiving the negotiation success message, the first device may also change the state bits of the second and third bits of the self-marked state bit from "01" to "11".
It should be noted that, when the configuration parameters are not successfully negotiated in the first round, the status bits of the second and third bits of the status bits marked by the first device and the second device themselves are changed from "10" to "11".
213. The first device and the second device switch from the first mode to the second mode.
In this embodiment, when the first device and the second device are both in the first port state and the negotiation of the configuration parameters of the first device and the second device is successful, the first device and the second device are switched from the first mode to the second mode.
It should be noted that, in this embodiment, after the first device and the second device are switched to the second mode, the first device and the second device set the configuration parameters negotiated according to steps 206 to 212 as the configuration parameters of the ports of the first device and the second device. For example, when the port of the first device and the port of the second device are switched from the ETH mode to the FlexE mode, the negotiated FlexE Group Number and PHY Number may be used to perform FlexE communication, which solves the problem that the FlexE Group numbers and PHY numbers of the devices at both ends need to be manually set when the port mode is switched from the ETH mode to the FlexE mode, simplifies the deployment process, improves the processing efficiency, and helps to avoid link failure caused by manual configuration omission or manual configuration inconsistency.
It should be noted that steps 206 to 212 may be omitted, that is, when the first port status and the second port status are consistent, the first device and the second device communicate with each other using the pre-agreed configuration parameters, and when the second mode is the FlexE mode, the configuration parameters, such as the FlexE Group Number and the PHY Number to be used, need to be set in advance on the first device and the second device, respectively, so that the communication in the FlexE mode can be started quickly without performing priority determination and configuration parameter negotiation.
In the embodiment of the application, the first device marks the state of the port of the first device as a first port state, wherein the first port state is a state in which a first mode is to be switched to a second mode; then the first device sends a negotiation request message to the second device, wherein the negotiation request message contains first state information, and the first state information indicates that the state of the port of the first device is a first port state; then the first device receives a negotiation response message sent by the second device, wherein the negotiation response message indicates that the state of the port of the second device is the first port state; and finally, the first equipment switches the mode of the port into a second mode according to the negotiation response message. Due to the fact that the to-be-switched state is set, the port modes of the devices at the two ends of the link can be switched simultaneously when the devices at the two ends are ready to switch the port modes, and therefore the time of link failure caused by the fact that the port modes at the two ends of the link are different in the switching process is shortened.
With reference to fig. 4, the above describes a method for switching port modes in an embodiment of the present application, and a first device and a second device in the embodiment of the present application are described below, where an embodiment of the first device in the embodiment of the present application includes:
a marking unit 401, configured to mark a state of a port of the first device as a first port state, where the first port state is a state in which a first mode is to be switched to a second mode;
a sending unit 402, configured to send a negotiation request message to a second device, where the negotiation request message includes first state information, and the first state information indicates that a state of a port of the first device is a first port state;
wherein, the sending unit 402 is further configured to:
sending the first device priority to the second device;
a receiving unit 403, configured to receive a negotiation response message sent by the second device, where the negotiation response message indicates that a port of the second device is in a first port state;
wherein, the receiving unit 403 is further configured to:
receiving a second device priority sent by a second device;
a switching unit 404, configured to switch the mode of the port to the second mode according to the negotiation response message.
Referring to fig. 5, another embodiment of the first apparatus in the embodiment of the present application includes:
a marking unit 501, configured to mark a state of a port of a first device as a first port state, where the first port state is a state in which a first mode is to be switched to a second mode;
a sending unit 502, configured to send a negotiation request message to a second device, where the negotiation request message includes first state information, and the first state information indicates that a state of a port of the first device is a first port state;
wherein, the sending unit 502 may further be configured to:
sending the first device priority to the second device;
and/or the presence of a gas in the gas,
and when the configuration parameters which are consistent with the first configuration parameters and are not used do not exist, sending second configuration parameters to the second equipment, wherein the second configuration parameters are the unused configuration parameters except the first configuration parameters in the first equipment.
And/or the presence of a gas in the gas,
and when the configuration parameters which are consistent with the third configuration parameters and are not used do not exist, sending a third negotiation result to the second equipment, wherein the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first equipment.
A receiving unit 503, configured to receive a negotiation response message sent by the second device, where the negotiation response message indicates that the port of the second device is in the first port state;
wherein, the receiving unit 503 may be further configured to:
receiving a second device priority sent by a second device;
a negotiation unit 504 for negotiating configuration parameters for the second mode with the second device.
Wherein, the negotiation unit 504 is further specifically configured to:
sending a first configuration parameter to the second device, wherein the first configuration parameter is an unused configuration parameter in the first device;
receiving a first negotiation result sent by second equipment, wherein the first negotiation result indicates whether the second equipment has configuration parameters which are consistent with the first configuration parameters and are not used;
when there is a configuration parameter that is consistent with the first configuration parameter and is not used, the first configuration parameter is set as a configuration parameter for the second mode.
Or the like, or, alternatively,
receiving a third configuration parameter sent by the second device, wherein the third configuration parameter is an unused configuration parameter in the second device;
judging whether the first equipment has configuration parameters which are consistent with the third configuration parameters and are not used;
and when the configuration parameters which are consistent with the third configuration parameters and are not used exist, setting the third configuration parameters as the configuration parameters for the second mode, and sending a second negotiation result to the second equipment, wherein the second negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used exist in the first equipment.
A determining unit 505, configured to determine that the first device priority is higher than the second device priority.
The determining unit 505 may be further configured to:
and judging that the priority of the first device is not higher than the priority of the second device. When the determining unit 505 determines that the first device priority is higher than the second device priority, the negotiating unit 504 may transmit the first configuration parameter to the second device.
A switching unit 506, configured to switch the mode of the port to the second mode according to the negotiation response message.
Referring to fig. 6, an embodiment of a second apparatus in an embodiment of the present application includes:
a receiving unit 601, configured to receive a negotiation request message sent by a first device, where the negotiation request message includes first state information, the first state information indicates that a port state of the first device is a first port state, and the first port state is a state in which a first mode is to be switched to a second mode;
a determining unit 602, configured to determine whether a first port state is consistent with a second port state, where the second port state is a state of a port of a second device marked by the second device;
the processing unit 603 is configured to send a negotiation response message to the first device when the first port state is consistent with the second port state, and switch the mode of the port of the second device to the second mode, where the negotiation response message indicates that the state of the port of the second device is the first port state.
Referring to fig. 7, another embodiment of the second apparatus in the embodiment of the present application includes:
a receiving unit 701, configured to receive a negotiation request message sent by a first device, where the negotiation request message includes first state information, the first state information indicates that a port state of the first device is a first port state, and the first port state is a state in which a first mode is to be switched to a second mode;
wherein, the receiving unit 701 may further be configured to:
receiving a first device priority sent by a first device;
a determining unit 702, configured to determine whether a first port state is consistent with a second port state, where the second port state is a state of a port of a second device marked by the second device;
the determining unit 702 may further be configured to:
judging that the priority of the first equipment is higher than that of the second equipment;
or the like, or, alternatively,
and judging that the priority of the first device is not higher than the priority of the second device. When the determining unit 702 determines that the priority of the first device is not higher than the priority of the second device, the negotiating unit 703 may send the second configuration parameter to the first device.
A negotiating unit 703 for negotiating configuration parameters for the second mode with the first device.
The negotiation unit 703 is specifically configured to:
receiving a first configuration parameter sent by first equipment, wherein the first configuration parameter is an unused configuration parameter in the first equipment;
judging whether the second equipment has configuration parameters which are consistent with the first configuration parameters and are not used;
sending a first negotiation result to the first equipment, wherein the first negotiation result indicates whether the second equipment has the configuration parameters which are consistent with the first configuration parameters and are not used;
when there are configuration parameters that are consistent with the first configuration parameters and are not used, the second device sets the first configuration parameters to the configuration parameters for the second mode.
Or the like, or, alternatively,
sending a second configuration parameter to the first device, wherein the second configuration parameter is an unused configuration parameter in the second device;
receiving a second negotiation result sent by the first equipment, wherein the second negotiation result indicates that the configuration parameters which are consistent with the second configuration parameters and are not used exist in the first equipment;
the second configuration parameter is set to the configuration parameter for the second mode.
Or the like, or, alternatively,
sending a third configuration parameter to the first device, wherein the third configuration parameter is an unused configuration parameter in the second device;
receiving a third negotiation result sent by the first device, wherein the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first device;
and sending a fourth configuration parameter to the first device, wherein the fourth configuration parameter is an unused configuration parameter except the third configuration parameter in the second device.
A sending unit 704, configured to send the second device priority to the first device;
the processing unit 705 is configured to send a negotiation response message to the first device when the first port state is consistent with the second port state, and switch the mode of the port of the second device to the second mode, where the negotiation response message indicates that the state of the port of the second device is the first port state.
Fig. 4 to 7 respectively describe the first device and the second device in the embodiment of the present application from the perspective of the modular functional entity, and the first device and the second device in the embodiment of the present application are described in detail from the perspective of hardware processing below.
As shown in fig. 8, another embodiment of the first device in the embodiment of the present application includes: a logical processor 802, a network interface 803, and a network interface 804. The logic processor 802 may be a Field Programmable Gate Array (FPGA) or an application-specific integrated circuit (ASIC), and the methods mentioned in this application may be executed by the logic processor 802. The first device may further include a processor 801, and the processor 801 may be a Network Processor (NP) for message forwarding processing. The first device shown in fig. 8 may perform the functions of the first device in the method shown in fig. 2.
One of the network interface 803 and the network interface 804 is a receiver, and the other is a transmitter, which can be connected to a port. Alternatively, the transmitter and receiver may be the same component, i.e. a transceiver, which may perform both receiving and transmitting functions, which may be connected to or comprise a port. The receiver, transmitter and transceiver are for example hardware implementing physical layer functions.
The logic processor 802 in this embodiment of the application is configured to mark a state of a port of a first device as a first port state, where the first port state is a state in which a first mode is to be switched to a second mode;
when the network interface 803 is a sender and the network interface 804 is a receiver:
a network interface 803, configured to send a negotiation request message to the second device, where the negotiation request message includes first state information, and the first state information indicates that a state of a port of the first device is a first port state;
the network interface 804 is configured to receive a negotiation response message sent by the second device, where the negotiation response message indicates that the port of the second device is in the first port state;
the logic processor 802 is further configured to switch the mode of the port to the second mode according to the negotiation response message.
Optionally, before the logical processor 802 switches the mode of the port to the second mode, configuration parameters for the second mode are negotiated with the second device through the network interface 803 and the network interface 804.
Optionally, negotiating the configuration parameters for the second mode comprises:
the network interface 803 sends a first configuration parameter to the second device, where the first configuration parameter is a configuration parameter that is not used in the first device;
the network interface 804 receives a first negotiation result sent by the second device, where the first negotiation result indicates whether a configuration parameter that is consistent with the first configuration parameter and is not used exists in the second device;
when there are configuration parameters that are consistent with the first configuration parameters and are unused, the logical processor 802 sets the first configuration parameters to the configuration parameters for the second mode.
Optionally, the network interface 803 is further configured to:
and when the configuration parameters which are consistent with the first configuration parameters and are not used do not exist, sending second configuration parameters to the second equipment, wherein the second configuration parameters are the unused configuration parameters except the first configuration parameters in the first equipment.
Optionally, negotiating the configuration parameters for the second mode further comprises:
the network interface 804 receives a third configuration parameter sent by the second device, where the third configuration parameter is an unused configuration parameter in the second device;
the logic processor 802 determines whether a configuration parameter that is consistent with the third configuration parameter and is not used exists in the first device;
when there is a configuration parameter that is consistent with the third configuration parameter and is not used, the logic processor 802 sets the third configuration parameter as the configuration parameter for the second mode, and the network interface 803 sends a second negotiation result to the second device, where the second negotiation result indicates that there is a configuration parameter that is consistent with the third configuration parameter and is not used by the first device.
Optionally, the network interface 803 is further configured to:
and when the configuration parameters which are consistent with the third configuration parameters and are not used do not exist, sending a third negotiation result to the second equipment, wherein the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first equipment.
Optionally, a network interface 803, configured to send the first device priority to the second device;
a network interface 804, configured to receive a second device priority sent by a second device;
a logic processor 802 configured to determine that the first device priority is higher than the second device priority.
Optionally, the logic processor 802 is further configured to determine that the first device priority is not higher than the second device priority.
Optionally, the configuration parameters in this application include: FlexE Group Number and FlexE PHY Number.
In this embodiment of the present application, after the mode of the port of the first device is switched, the logic processor 802 in the first device may operate in the switched mode. For example, after the port of the first device is switched from the ETH mode to the FLexE mode, the logical processor 802 in the first device may recognize that the FLexE frame received from the network interface 804 is processed for communication, and a message generated after being processed by the logical processor 802 may be continuously sent to the processor 801 for processing; the logic processor 802 may further receive the message sent by the processor 801, process the message, generate a FlexE frame, and send the FlexE frame to the network interface 803, where the FlexE frame is sent to the second device through the network interface 803. For example, after the port of the first device is switched from the FLexE mode to the ETH mode, the logical processor 802 in the first device may recognize that the ETH frame received from the network interface 804 is processed for communication, and a message generated after being processed by the logical processor 802 may be continuously sent to the processor 801 for processing; the logic processor 802 may further receive the message sent by the processor 801, process the message, generate an ETH frame, and send the ETH frame to the network interface 803, where the ETH frame is sent to the second device through the network interface 803.
As shown in fig. 9, another embodiment of the second apparatus in the embodiment of the present application includes: a logical processor 902, a network interface 903, and a network interface 904. The logic processor 902 may be a Field Programmable Gate Array (FPGA) or an application-specific integrated circuit (ASIC), and the methods mentioned in this application may be executed by the logic processor 902. The second device may further include a processor 901, and the processor 901 may be a Network Processor (NP) for message forwarding processing. The second device shown in fig. 9 may perform the functions of the second device in the method shown in fig. 2.
One of the network interface 903 and the network interface 904 is a receiver, and the other is a transmitter, and the receiver and the transmitter can be connected to a port. Alternatively, the transmitter and receiver may be the same component, i.e. a transceiver, which may perform both receiving and transmitting functions, which may be connected to or comprise a port. The receiver, transmitter and transceiver are for example hardware implementing physical layer functions.
In this embodiment, when the network interface 903 is a transmitter and the network interface 904 is a receiver:
a network interface 904, configured to receive a negotiation request message sent by a first device, where the negotiation request message includes first state information, the first state information indicates that a state of a port of the first device is a first port state, and the first port state is a state in which a first mode is to be switched to a second mode;
the logic processor 902 is configured to determine whether the first port state is consistent with a second port state, where the second port state is a state of a port of the second device marked by the second device;
the network interface 903 is configured to send a negotiation response message to the first device when the first port state is consistent with the second port state, where the negotiation response message indicates that the state of the port of the second device is the first port state;
a logic processor 902 for switching the mode of the port of the second device to the second mode.
Optionally, before the logical processor 902 switches the mode of the port to the second mode, configuration parameters for the second mode are negotiated with the first device through the network interface 903 and the network interface 904.
Optionally, negotiating the configuration parameters for the second mode comprises:
the network interface 904 receives a first configuration parameter sent by the first device, where the first configuration parameter is an unused configuration parameter in the first device;
the logic processor 902 determines whether there is a configuration parameter in the second device that is consistent with the first configuration parameter and is not used;
the network interface 903 sends a first negotiation result to the first device, where the first negotiation result indicates whether a configuration parameter that is consistent with the first configuration parameter and is not used exists in the second device;
when there are configuration parameters that are consistent with the first configuration parameters and are unused, the logical processor 902 sets the first configuration parameters to the configuration parameters for the second mode.
Optionally, negotiating the configuration parameters for the second mode comprises:
the network interface 903 sends a second configuration parameter to the first device, where the second configuration parameter is an unused configuration parameter in the second device;
the network interface 904 receives a second negotiation result sent by the first device, where the second negotiation result indicates that a configuration parameter that is consistent with the second configuration parameter and is not used exists in the first device;
the logical processor 902 sets the second configuration parameter to the configuration parameter for the second mode.
Optionally, negotiating the configuration parameters for the second mode comprises:
the network interface 903 sends a third configuration parameter to the first device, where the third configuration parameter is an unused configuration parameter in the second device;
the network interface 904 receives a third negotiation result sent by the first device, where the third negotiation result indicates that the configuration parameter that is consistent with the third configuration parameter and is not used does not exist in the first device;
the network interface 903 sends a fourth configuration parameter to the first device, where the fourth configuration parameter is an unused configuration parameter in the second device except for the third configuration parameter.
Optionally, the network interface 903 is configured to send the second device priority to the first device;
a network interface 904, configured to receive a first device priority sent by a first device;
a logic processor 902 configured to determine that the first device priority is higher than the second device priority.
Optionally, the logic processor 902 is further configured to determine that the first device priority is not higher than the second device priority.
Optionally, the configuration parameters in this application include: FlexE Group Number and FlexE PHY Number. After the mode of the port of the second device is switched in this embodiment of the application, the logic processor 902 in the second device may operate in the switched mode. The logical processor 902, the processor 901, the network interface 903 and the network interface 904 in the second device may have similar functions to the logical processor 802, the processor 801, the network interface 803 and the network interface 804 in the first device, and are not described herein again.
The network interface 803 of the first device may be connected to the network interface 904 of the second device, for example, the network interface 803 of the first device is connected to a port of the first device, the port of the first device is connected to a port of the second device through an optical fiber, and the port of the second device is connected to the network interface 904 of the second device. Also for example, the network interface 803 of the first device and the network interface 904 of the second device each include a port, and the port of the network interface 803 of the first device is connected to the port of the network interface 904 of the second device by an optical fiber. Similarly, the network interface 804 of the first device may be connected with the network interface 903 of the second device in the above manner, which is not described herein again. In the embodiment of the present application, a system may include the first device shown in fig. 8 and the second device shown in fig. 9, where the first device in the system may implement the function of the first device in the method shown in fig. 2, and the second device in the system may implement the function of the second device in the method shown in fig. 2.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (34)

1. A method for switching port modes, comprising:
the method comprises the steps that first equipment marks the state of a port of the first equipment as a first port state, and the first port state is a state in which a first mode is to be switched into a second mode;
the first device sends a negotiation request message to a second device, wherein the negotiation request message contains first state information, and the first state information indicates that the state of a port of the first device is the first port state;
the first device receives a negotiation response message sent by the second device, wherein the negotiation response message indicates that the state of the port of the second device is the first port state;
the first equipment switches the mode of the port into a second mode according to the negotiation response message;
the first mode is a variable rate ethernet FlexE mode and the second mode is an ethernet ETH mode, or the first mode is an ETH mode and the second mode is a FlexE mode.
2. The method of claim 1, wherein before the first device switches the mode of the port to the second mode according to the negotiation response message, the method further comprises:
the first device negotiates configuration parameters for the second mode with the second device.
3. The method of claim 2, wherein negotiating, by the first device and the second device, configuration parameters for the second mode comprises:
the first equipment sends a first configuration parameter to the second equipment, wherein the first configuration parameter is an unused configuration parameter in the first equipment;
the first device receives a first negotiation result sent by the second device, wherein the first negotiation result indicates whether the second device has configuration parameters which are consistent with the first configuration parameters and are not used;
when there is a configuration parameter that is consistent with the first configuration parameter and is not used, the first device sets the first configuration parameter as the configuration parameter for the second mode.
4. The method of claim 3, further comprising:
when the configuration parameters which are consistent with the first configuration parameters and are not used do not exist, the first device sends second configuration parameters to the second device, wherein the second configuration parameters are the unused configuration parameters except the first configuration parameters in the first device.
5. The method of claim 2, wherein negotiating, by the first device and the second device, configuration parameters for the second mode comprises:
the first device receives a third configuration parameter sent by the second device, wherein the third configuration parameter is an unused configuration parameter in the second device;
the first equipment judges whether the first equipment has configuration parameters which are consistent with the third configuration parameters and are not used;
when the configuration parameters which are consistent with the third configuration parameters and are not used exist, the first device sets the third configuration parameters as the configuration parameters for the second mode, and sends a second negotiation result to the second device, wherein the second negotiation result indicates that the first device has the configuration parameters which are consistent with the third configuration parameters and are not used.
6. The method of claim 5, further comprising:
when the configuration parameters which are consistent with the third configuration parameters and are not used do not exist, the first device sends a third negotiation result to the second device, and the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first device.
7. The method of any of claims 3 or 4, wherein prior to the first device negotiating configuration parameters for the second mode with the second device, the method further comprises:
the first device sends a first device priority to the second device;
the first equipment receives a second equipment priority sent by the second equipment;
and the first equipment judges that the priority of the first equipment is higher than that of the second equipment.
8. The method of any of claims 5 or 6, wherein prior to the first device negotiating configuration parameters for the second mode with the second device, the method further comprises:
the first device sends a first device priority to the second device;
the first equipment receives a second equipment priority sent by the second equipment;
and the first equipment judges that the priority of the first equipment is not higher than the priority of the second equipment.
9. The method of any of claims 2 to 6, wherein the configuration parameters comprise: FlexE Group Number and FlexE physical connection Number PHY Number.
10. A method for switching port modes, comprising:
the method comprises the steps that a second device receives a negotiation request message sent by a first device, wherein the negotiation request message contains first state information, the first state information indicates that the state of a port of the first device is a first port state, and the first port state is a state of a first mode to be switched into a second mode;
the second device judges whether the first port state is consistent with a second port state, wherein the second port state is the state of the port of the second device marked by the second device;
when the first port state is consistent with the second port state, the second device sends a negotiation response message to the first device, the second device switches the mode of the port of the second device to a second mode, and the negotiation response message indicates that the state of the port of the second device is the first port state;
the first mode is a variable rate ethernet FlexE mode and the second mode is an ethernet ETH mode, or the first mode is an ETH mode and the second mode is a FlexE mode.
11. The method of claim 10, wherein before the second device switches the mode of the port of the second device to the second mode, the method further comprises:
the second device negotiates configuration parameters for the second mode with the first device.
12. The method of claim 11, wherein the second device negotiating configuration parameters for the second mode with the first device comprises:
the second equipment receives a first configuration parameter sent by the first equipment, wherein the first configuration parameter is an unused configuration parameter in the first equipment;
the second equipment judges whether the second equipment has configuration parameters which are consistent with the first configuration parameters and are not used;
the second equipment sends a first negotiation result to the first equipment, wherein the first negotiation result indicates whether the second equipment has configuration parameters which are consistent with the first configuration parameters and are not used;
when there is a configuration parameter that is consistent with the first configuration parameter and is not used, then the second device sets the first configuration parameter as the configuration parameter for the second mode.
13. The method of claim 11, wherein the second device negotiating configuration parameters for the second mode with the first device comprises:
the second device sends a second configuration parameter to the first device, wherein the second configuration parameter is a configuration parameter which is not used in the second device;
the second device receives a second negotiation result sent by the first device, wherein the second negotiation result indicates that the configuration parameters which are consistent with the second configuration parameters and are not used exist in the first device;
the second device sets the second configuration parameter to the configuration parameter for the second mode.
14. The method of claim 11, wherein the second device negotiating configuration parameters for the second mode with the first device comprises:
the second device sends a third configuration parameter to the first device, wherein the third configuration parameter is a configuration parameter which is not used in the second device;
the second device receives a third negotiation result sent by the first device, wherein the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first device;
the second device sends a fourth configuration parameter to the first device, where the fourth configuration parameter is an unused configuration parameter in the second device except for the third configuration parameter.
15. The method of claim 12, wherein before the second device negotiates configuration parameters for the second mode with the first device, the method further comprises:
the second device sending a second device priority to the first device;
the second equipment receives the first equipment priority sent by the first equipment;
and the second equipment judges that the priority of the first equipment is higher than that of the second equipment.
16. The method of claim 13 or 14, wherein before the second device negotiates configuration parameters for the second mode with the first device, the method further comprises:
the second device sending a second device priority to the first device;
the second equipment receives the first equipment priority sent by the first equipment;
and the second equipment judges that the priority of the first equipment is not higher than the priority of the second equipment.
17. The method according to any of claims 11 to 15, wherein the configuration parameters comprise: FlexE Group Number and FlexE physical connection Number PHY Number.
18. A communication device, wherein the communication device is a first device comprising a logical processor, a receiver, and a transmitter:
the logic processor is configured to mark a state of a port of the first device as a first port state, where the first port state is a state in which a first mode is to be switched to a second mode;
the transmitter is configured to send a negotiation request message to a second device, where the negotiation request message includes first state information, and the first state information indicates that a state of a port of the first device is the first port state;
the receiver is configured to receive a negotiation response message sent by the second device, where the negotiation response message indicates that a port state of the second device is the first port state;
the logic processor is further configured to switch the mode of the port to a second mode according to the negotiation response message;
the first mode is a Flexe mode and the second mode is an ETH mode, or the first mode is an ETH mode and the second mode is a Flexe mode.
19. The communications device of claim 18, wherein the logic processor negotiates configuration parameters for the second mode with the second device via the transmitter and the receiver prior to switching the mode of the port to the second mode.
20. The communications device of claim 19, wherein negotiating the configuration parameters for the second mode comprises:
the transmitter transmits a first configuration parameter to the second device, wherein the first configuration parameter is a configuration parameter which is not used in the first device;
the receiver receives a first negotiation result sent by the second device, wherein the first negotiation result indicates whether the second device has configuration parameters which are consistent with the first configuration parameters and are not used;
when there is a configuration parameter that is consistent with the first configuration parameter and that is not used, the logical processor sets the first configuration parameter to the configuration parameter for the second mode.
21. The communications device of claim 20, wherein the transmitter is further configured to:
when the configuration parameters which are consistent with the first configuration parameters and are not used do not exist, sending second configuration parameters to the second equipment, wherein the second configuration parameters are the unused configuration parameters except the first configuration parameters in the first equipment.
22. The communications device of claim 19, wherein negotiating the configuration parameters for the second mode comprises:
the receiver receives a third configuration parameter sent by the second device, wherein the third configuration parameter is a configuration parameter which is not used in the second device;
the logic processor judges whether a configuration parameter which is consistent with the third configuration parameter and is not used exists in the first equipment;
when the configuration parameters which are consistent with the third configuration parameters and are not used exist, the logic processor sets the third configuration parameters as the configuration parameters for the second mode, and the transmitter transmits a second negotiation result to the second device, wherein the second negotiation result indicates that the first device has the configuration parameters which are consistent with the third configuration parameters and are not used.
23. The communications device of claim 22, wherein the transmitter is further configured to:
when the configuration parameters which are consistent with the third configuration parameters and are not used do not exist, sending a third negotiation result to the second equipment, wherein the third negotiation result indicates that the first equipment does not have the configuration parameters which are consistent with the third configuration parameters and are not used.
24. The communication device according to any of claims 20 or 21, wherein:
the transmitter is configured to transmit the first device priority to the second device;
the receiver is configured to receive a second device priority sent by the second device;
the logic processor is configured to determine that the first device priority is higher than the second device priority.
25. The communication device according to any of claims 22 or 23, wherein:
the transmitter is configured to transmit the first device priority to the second device;
the receiver is configured to receive a second device priority sent by the second device;
the logic processor is configured to determine that the priority of the first device is not higher than the priority of the second device.
26. The communication device of any of claims 19 to 23, wherein the configuration parameters comprise: FlexE Group Number and FlexE physical connection Number PHY Number.
27. A communication device, wherein the communication device is a second device comprising a logical processor, a receiver, and a transmitter:
the receiver is configured to receive a negotiation request message sent by a first device, where the negotiation request message includes first state information, where the first state information indicates that a port state of the first device is a first port state, and the first port state is a state in which a first mode is to be switched to a second mode;
the logic processor is configured to determine whether the first port state is consistent with a second port state, where the second port state is a state of a port of the second device marked by the second device;
the transmitter is configured to send a negotiation response message to the first device when the first port state is consistent with the second port state, where the negotiation response message indicates that the port state of the second device is the first port state;
the logic processor is configured to switch a mode of a port of the second device to a second mode;
the first mode is a Flexe mode and the second mode is an ETH mode, or the first mode is an ETH mode and the second mode is a Flexe mode.
28. The communications device of claim 27, wherein the logic processor negotiates configuration parameters for the second mode with the first device via the transmitter and the receiver prior to switching the mode of the port to the second mode.
29. The communications device of claim 28, wherein negotiating the configuration parameters for the second mode comprises:
the receiver receives a first configuration parameter sent by the first device, wherein the first configuration parameter is a configuration parameter which is not used in the first device;
the logic processor judges whether a configuration parameter which is consistent with the first configuration parameter and is not used exists in the second equipment;
the transmitter transmits a first negotiation result to the first device, wherein the first negotiation result indicates whether the second device has the configuration parameters which are consistent with the first configuration parameters and are not used;
when there is a configuration parameter that is consistent with the first configuration parameter and that is not used, the logical processor sets the first configuration parameter to the configuration parameter for the second mode.
30. The communications device of claim 28, wherein negotiating the configuration parameters for the second mode comprises:
the transmitter transmits a second configuration parameter to the first device, wherein the second configuration parameter is a configuration parameter which is not used in the second device;
the receiver receives a second negotiation result sent by the first device, wherein the second negotiation result indicates that the configuration parameters which are consistent with the second configuration parameters and are not used exist in the first device;
the logical processor sets the second configuration parameter to the configuration parameter for the second mode.
31. The communications device of claim 28, wherein negotiating the configuration parameters for the second mode comprises:
the transmitter transmits a third configuration parameter to the first device, wherein the third configuration parameter is a configuration parameter which is not used in the second device;
the receiver receives a third negotiation result sent by the first device, wherein the third negotiation result indicates that the configuration parameters which are consistent with the third configuration parameters and are not used do not exist in the first device;
the transmitter transmits a fourth configuration parameter to the first device, where the fourth configuration parameter is an unused configuration parameter in the second device except for the third configuration parameter.
32. The communications device of claim 29, wherein:
the transmitter is used for transmitting the priority of the second device to the first device;
the receiver is used for receiving the first equipment priority sent by the first equipment;
the logic processor is configured to determine that the first device priority is higher than the second device priority.
33. The communication device of claim 30 or 31, wherein:
the transmitter is used for transmitting the priority of the second device to the first device;
the receiver is used for receiving the first equipment priority sent by the first equipment;
the logic processor is configured to determine that the priority of the first device is not higher than the priority of the second device.
34. The communications device of any one of claims 28 to 32, wherein the configuration parameters comprise: FlexE Group Number and FlexE physical connection Number PHY Number.
CN201810228514.0A 2018-03-19 2018-03-19 Port mode switching method and related equipment thereof Active CN110289978B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810228514.0A CN110289978B (en) 2018-03-19 2018-03-19 Port mode switching method and related equipment thereof
PCT/CN2019/078393 WO2019179376A1 (en) 2018-03-19 2019-03-16 Switch method for port mode and related devices thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810228514.0A CN110289978B (en) 2018-03-19 2018-03-19 Port mode switching method and related equipment thereof

Publications (2)

Publication Number Publication Date
CN110289978A CN110289978A (en) 2019-09-27
CN110289978B true CN110289978B (en) 2021-05-04

Family

ID=67986688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810228514.0A Active CN110289978B (en) 2018-03-19 2018-03-19 Port mode switching method and related equipment thereof

Country Status (2)

Country Link
CN (1) CN110289978B (en)
WO (1) WO2019179376A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595751A (en) * 2020-04-30 2021-11-02 中兴通讯股份有限公司 Flexe group creation method, device, equipment and medium
CN113923276A (en) * 2020-06-22 2022-01-11 中兴通讯股份有限公司 Flexe port communication method, communication equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101345754A (en) * 2008-08-20 2009-01-14 北京星网锐捷网络技术有限公司 Duplexing pattern matching method and apparatus, communication system
CN103684857A (en) * 2013-12-02 2014-03-26 杭州华三通信技术有限公司 Method and device for setting working modes of member ports of stacking ports of switchboards
CN104796306A (en) * 2015-03-26 2015-07-22 杭州华三通信技术有限公司 Port mode negotiation method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795518B (en) * 2012-10-31 2017-04-05 杭州华三通信技术有限公司 A kind of equipment room port mode synchronous method, equipment and system
WO2014082261A1 (en) * 2012-11-29 2014-06-05 华为技术有限公司 Ethernet port auto-negotiation method and communication device
US9105178B2 (en) * 2012-12-03 2015-08-11 Sony Computer Entertainment Inc. Remote dynamic configuration of telemetry reporting through regular expressions

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101345754A (en) * 2008-08-20 2009-01-14 北京星网锐捷网络技术有限公司 Duplexing pattern matching method and apparatus, communication system
CN103684857A (en) * 2013-12-02 2014-03-26 杭州华三通信技术有限公司 Method and device for setting working modes of member ports of stacking ports of switchboards
CN104796306A (en) * 2015-03-26 2015-07-22 杭州华三通信技术有限公司 Port mode negotiation method and device

Also Published As

Publication number Publication date
WO2019179376A1 (en) 2019-09-26
CN110289978A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
EP3425955B1 (en) Tunnel bonding-based communications method and network device
US11134029B2 (en) Communication method, communications device, and storage medium
CN113328894B (en) Method and equipment for hot standby of dual computers based on CU separation
CN110383767B (en) Topology switching method, device and system based on synchronous link and storage medium
JP7146922B2 (en) Method and device for notifying execution of PDCP data recovery
JP6048995B2 (en) Method, computer program, information storage means and system for setting node device of mesh communication network
US9661677B2 (en) Wireless communication apparatus, wireless communication method, and computer-readable storage medium
EP3223459A1 (en) Method and device for detecting connectivity
EP3370387B1 (en) Two-sided acceleration transmission method and system for wireless network
EP4024987B1 (en) Timeslot negotiation method and device
CN109150659B (en) Processor and BFD message transmission method
CN110289978B (en) Port mode switching method and related equipment thereof
CN109691031B (en) Service message transmission method and node equipment
CN114786241B (en) Network selection method, related device, network equipment and storage medium
KR101946173B1 (en) Communication device, communication system and communication method
CN108667640B (en) Communication method and device, and network access system
EP2571321A1 (en) Method and device for controlling channel transmission
CN111654390B (en) Data transmission method, device, terminal equipment and storage medium
CN104270307A (en) Establishing method and device for BGP neighborhood
CN112838982B (en) Message transmission path switching method, device and system
CN114079583A (en) Method for sending multicast message, method and device for obtaining forwarding table item
CN105991448B (en) Neighbor discovery method and device
CN114374643B (en) Communication method and device
JP5760729B2 (en) COMMUNICATION DEVICE, NETWORK, AND COMMUNICATION METHOD USED FOR THEM
EP3979570A1 (en) Method for achieving network communication based on neighbor negotiation and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant