This application relates to the field of communications technologies, and in particular, to a port mode adaptation method and apparatus.
When a network device is deployed in a network, it is usually required that the network device should be capable of automatically communicating with another network device. In this case, after being installed and powered on, the network device can be automatically identified by a network management center, so that the network management center can manage the network device. However, if interconnected ports on two network devices use different modes, for example, if a common Ethernet interface that is on one network device and that is defined in the IEEE 802.3 standard interconnects with a Flexible Ethernet (FlexE) interface that is on the other network device and that is defined in the Optical Internetworking Forum (OIF) FlexE 1.0 or 2.0 standard, the two network devices cannot communicate with each other.
In view of this, embodiments of this application provide a port mode adaptation method and apparatus, so that a port on a network device can adaptively use a same mode as an interconnected port, and therefore the network device can automatically communicate with another network device.
According to a first aspect, an embodiment of this application provides a port mode adaptation method. When a network device is deployed in a network, a process of implementing port mode adaptation by using the method may specifically include: A network device determines a status of a port on the network device. The status of the port may include: a mode of the port, and whether there is a link at a FlexE shim of the port. The network device determines whether the status of the port satisfies a first condition; and sets the mode of the port to an Ethernet interface mode if the status of the port satisfies the first condition. The first condition includes: the mode of the port is a FlexE interface mode, and there is no link at the FlexE shim of the port. In this way, when the network device identifies the mode of the port on the network device as the FlexE interface mode, and determines that there is no link at the FlexE shim of the port, the network device may determine that a mode used by a port interconnected with the port is not a FlexE interface mode. In this case, the network device may adaptively set the mode of the port to the Ethernet interface mode, to ensure that the port on the network device can use a same mode as another port interconnected with the port, so that two adjacent network devices can automatically communicate with each other, that is, both the two network devices can implement automatic communication. If a peer end is a network management device, the network management device can automatically identify and manage the network device that can implement automatic communication. Therefore, the port mode adaptation method provided in this embodiment of this application ensures that the network device can implement automatic communication, so that the network management device can automatically identify and manage the network device.
With reference to some specific embodiments of the first aspect, the first condition may further include: a link has been established at a physical coding sublayer (PCS) of the port. In this way, the network device can contrast the detected status of the port with the first condition, to further determine that the port is connected to another network device and that the port interconnected with the port is in the Ethernet interface mode, that is, a port B is communicating with a port A through an Ethernet interface. In this case, the mode of the port is adaptively adjusted to the Ethernet interface mode. Therefore, the port mode adaptation method provided in this embodiment of this application is more accurate.
With reference to some other specific embodiments of the first aspect, the method may further include: The network device switches the mode of the port from the Ethernet interface mode to the FlexE interface mode if the status of the port satisfies a second condition. The second condition includes: the mode of the port is the Ethernet interface mode, and there is no link at the PCS of the port. In this way, after setting the mode of the port to the Ethernet interface mode based on the status of the port, the network device may continue to determine, based on the status of the port, whether the port is connected to another network device; and when the port is not connected to another network device, adaptively switch the mode of the port back to a default mode, that is, the FlexE interface mode. This adaptively adjusts the mode of the port on the network device flexibly.
It can be understood that the first condition may further include: the port is in an adaptive state, and the second condition may further include: the port is in the adaptive state. The adaptive state of the port is a state in which the network device can adaptively adjust the mode of the port. In one example, the method may further include: The network device receives a first configuration instruction, and sets the status of the port to the adaptive state according to the first configuration instruction.
With reference to still some other specific embodiments, the method may further include: The network device locks the mode of the port to a fixed mode according to another configuration instruction. In one example, the method may further include: The network device receives a second configuration instruction, sets the status of the port to a first locked state according to the second configuration instruction, and locks the mode of the port to the FlexE interface mode when the port is in the first locked state. In another example, the method may further include: The network device receives a third configuration instruction, sets the status of the port to a second locked state according to the third configuration instruction, and locks the mode of the port to the Ethernet interface mode when the port is in the second locked state. It can be understood that the first locked state may be a state in which the network device locks the mode of the port to the FlexE interface mode and cannot perform adaptive adjustment, and the second locked state may be a state in which the network device locks the mode of the port to the Ethernet interface mode and cannot perform adaptive adjustment. In this way, according to the method provided in this embodiment of this application, the mode of the port can further be locked, according to a configuration instruction, to a port mode corresponding to a locked state of the port, to lock the mode of the port to the FlexE interface mode or the Ethernet interface mode.
With reference to yet some other specific embodiments of the first aspect, the method may further include: The network device sets the mode of the port to a specific mode by using a forced configuration performed by technical personnel. In one example, the method may further include: The network device receives a fourth configuration instruction, and sets the mode of the port to the Ethernet interface mode according to the fourth configuration instruction. In another example, the method may further include: The network device receives a fifth configuration instruction, and sets the mode of the port to the FlexE interface mode according to the fifth configuration instruction. In this way, according to the method provided in this embodiment of this application, the mode of the port can further be set to the FlexE interface mode or the Ethernet interface mode by using the forced configuration performed by the technical personnel.
According to a second aspect, an embodiment of this application further provides a port mode adaptation apparatus. In this solution, the apparatus includes a determining unit and a first setting unit. The determining unit is configured to determine a status of a port on the network device. The first setting unit is configured to set a mode of the port to an Ethernet interface mode if the status of the port satisfies a first condition. The first condition includes: the mode of the port is a Flexible Ethernet FlexE interface mode, and there is no link at a FlexE shim of the port.
With reference to some specific embodiments of the second aspect, the first condition further includes: a link has been established at a PCS of the port.
With reference to some other specific embodiments of the second aspect, the apparatus further includes a switching unit. The switching unit is configured to switch the mode of the port from the Ethernet interface mode to the FlexE interface mode if the status of the port satisfies a second condition. The second condition includes: the mode of the port is the Ethernet interface mode, and there is no link at the PCS of the port.
With reference to still some other specific embodiments of the second aspect, the first condition further includes: the port is in an adaptive state, and the second condition further includes: the port is in the adaptive state.
With reference to yet some other specific embodiments of the second aspect, the apparatus further includes a first receiving unit and a second setting unit. The first receiving unit is configured to receive a first configuration instruction. The second setting unit is configured to set the status of the port to the adaptive state according to the first configuration instruction.
With reference to some other specific embodiments of the second aspect, the apparatus further includes a second receiving unit, a third setting unit, and a first locking unit. The second receiving unit is configured to receive a second configuration instruction. The third setting unit is configured to set the status of the port to a first locked state according to the second configuration instruction. The first locking unit is configured to lock the mode of the port to the FlexE interface mode when the port is in the first locked state.
With reference to some other specific embodiments of the second aspect, the apparatus further includes a third receiving unit, a fourth setting unit, and a second locking unit. The third receiving unit is configured to receive a third configuration instruction. The fourth setting unit is configured to set the status of the port to a second locked state according to the third configuration instruction. The second locking unit is configured to lock the mode of the port to the Ethernet interface mode when the port is in the second locked state.
With reference to some other specific embodiments of the second aspect, the apparatus further includes a fourth receiving unit and a first configuration unit. The fourth receiving unit is configured to receive a fourth configuration instruction. The first configuration unit is configured to set the mode of the port to the Ethernet interface mode according to the fourth configuration instruction.
With reference to some other specific embodiments of the second aspect, the apparatus further includes a fifth receiving unit and a second configuration unit. The fifth receiving unit is configured to receive a fifth configuration instruction. The second configuration unit is configured to set the mode of the port to the FlexE interface mode according to the fifth configuration instruction.
It should be noted that the apparatus provided in the second aspect is corresponding to the method provided in the first aspect. Therefore, for the possible implementations and technical effects of the apparatus provided in the second aspect, refer to the description of the method provided in the first aspect.
According to a third aspect, an embodiment of this application further provides a network device. The network device includes a memory and a processor. The memory is configured to store program code. The processor is configured to run instructions in the program code, to enable the network device to perform any one of the foregoing methods.
According to a fourth aspect, an embodiment of this application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to perform any one of the foregoing methods.
According to a fifth aspect, an embodiment of this application further provides a computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are run on a computer or a processor, the computer or the processor is enabled to perform any one of the foregoing methods.
To describe technical solutions in the embodiments of this application more clearly, the following briefly describes the accompanying drawings. The accompanying drawings in the following descriptions show merely some embodiments of this application, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings.
At present, a network device can support a common Ethernet interface defined in the IEEE 802.3 standard and a FlexE interface defined in the Optical Internet Forum OIF FlexE 1.0 or 2.0 standard. The FlexE interface is an interface type that is extended based on the IEEE 802.3 standard and that supports a FlexE-related function such as a FlexE interface channelization function, a bandwidth binding function, or a sub-rate unique function. Currently, network devices corresponding to product lines such as a packet transport network (PTN) and an Internet Protocol radio access network (IP RAN) support a FlexE interface mode. Network devices mentioned in the embodiments of this application are all considered as network devices supporting the FlexE interface mode. A peer network device may be a network device supporting the FlexE interface mode or a network device supporting a common Ethernet interface mode.
In this application, the network device may include one or more Ethernet interfaces. In the following embodiments, unless otherwise specified particularly, a FlexE-capable port on the network device is used as an example for description. The FlexE-capable port can support interface mode adaptive adjustment. In some embodiments, one or more of the other FlexE-capable ports may also support interface mode adaptive adjustment. In some embodiments, one or more of the other FlexE-capable ports may alternatively not support interface mode adaptive adjustment.
It can be understood that related concepts of the FlexE interface are described as follows.
FlexE is an interface technology for implementing service bearer isolation and network slicing in a bearer network. FlexE slicing is used to divide a physical Ethernet interface into a plurality of Ethernet elastic hard pipes based on timeslot scheduling, so that the network features exclusive timeslots and desirable isolation that are similar to those of time-division multiplexing (TDM), and also features Ethernet statistical multiplexing and high network efficiency. In this way, statistical multiplexing of services in a same slice is implemented, and services between slices do not affect each other. Compared with a virtual private network (VPN), such a network implements better slice isolation, and provides more options for 5th generation (5G) network slicing.
A FlexE client is used to indicate a service customer borne by a FlexE network. Currently, the FlexE client is defined as an Ethernet packet service flow in the OIF FlexE 1.0 or 2.0 standard, and can be extended to support service types such as a TDM service and a Common Public Radio Interface (CPRI) service.
A FlexE shim is a service layer at which mapping or demapping is performed for a FlexE client. The FlexE client is borne by the FlexE shim, and the FlexE shim performs transmission by using a FlexE group.
A FlexE group is a FlexE protocol group including one PHY or a plurality of PHYs with a same group number, and provides a uniform underlying service for the FlexE shim.
When a network device is deployed in a network, it is required that each network device should be capable of going online by using automatically available data communications network (DCN). In this case, after being installed and powered on, each network device can be automatically identified by a network management center, so that the network management center can manage each network device. That the network device goes online by using automatically available DCN means that the network device can automatically perform DCN packet communication with an adjacent network device. However, when network devices respectively support the Ethernet interface and the FlexE interface, referring to
However, as more network devices are deployed in the network, it cannot be ensured that port modes of the network devices can automatically keep consistent. To avoid a problem that the network cannot normally run because a mode of a port on a network device is inconsistent with a mode of an interconnected port, technical personnel usually need to set the port modes of the network devices one by one, so that a mode of a port on each network device is consistent with a mode of an interconnected port, to ensure that each network device can implement automatic communication, thereby ensuring normal running of the network. As a result, a large quantity of manpower, material resources, and time costs need to be consumed.
For example, referring to a schematic architectural diagram of a network shown in
A scenario shown in
However, in the manner in which port modes of network devices are set one by one to ensure that the network devices can implement automatic communication, it is necessary to manually determine current interconnected ports and modes of the ports, manually determine an upstream-downstream relationship between network elements, and manually configure, on a network management center, a policy for switching port modes. This causes heavy network operation and maintenance workloads, and also requires a large quantity of operations such as manual judgments and configurations. Consequently, an error probability is relatively high. Once upstream and downstream network elements are incorrectly determined, a mode of a downstream port on the upstream network element is switched by mistake. As a result, the downstream network element cannot receive an instruction for switching a mode of an upstream port on the downstream network element and cannot implement automatic communication.
In view of this, an embodiment of this application provides a port mode adaptation method. When a network device identifies a mode of a port on the network device as a FlexE interface mode, and determines that there is no link at a FlexE shim of the port, the network device may determine that a mode used by a port interconnected with the port is not a FlexE interface mode. In this case, the network device may adaptively set the mode of the port to an Ethernet interface mode, to ensure that the port on the network device can use a same mode as another port interconnected with the port, so that both of two network devices can automatically communicate with another network device, that is, both the two network devices can implement automatic communication. Therefore, a network management center can automatically identify and manage the network device.
The network shown in
The following details specific implementations of port mode adaptation methods and apparatuses in the embodiments of this application with reference to the accompanying drawings by using embodiments.
During specific implementation, the method may include, for example, the following steps.
Step 301: A network device determines a status of a port A on the network device.
Assuming that the network device includes a FlexE-capable port such as a port A, the network device may detect a status of the port A on the network device. The status of the port A may include at least: a current mode of the port A, and whether there is a link at a FlexE shim of the port A. The port A may consider by default that the mode of the port A is a FlexE interface mode.
In one example, the network device may perform detection to determine whether there is a link at the FlexE shim of the port A on the network device. If there is a link at the FlexE shim of the port A, the status that is of the port A on the network device and that is determined by the network device may include: there is a link at the FlexE shim. If there is no link at the FlexE shim of the port A, the status that is of the port on the network device and that is determined by the network device may include: there is no link at the FlexE shim.
Step 302: If the status of the port A satisfies a first condition, the network device sets the mode of the port A to an Ethernet interface mode, where the first condition includes: the mode of the port A is the Flexible Ethernet FlexE interface mode, and there is no link at the FlexE shim of the port A.
It can be understood that in the first condition, the mode of the port A may be preset on the network device. The first condition is one of conditions used for indicating to perform mode adaptive adjustment on the port A on the network device, and may specifically be used as a condition for adjusting the mode of the port on the network device from the FlexE interface mode to the Ethernet interface mode.
During specific implementation, if the status that is of the port A and that is determined in step 301 includes: there is a link at the FlexE shim, it may be determined that a port B interconnected with the port A also includes a FlexE shim, that is, it may be determined that a mode of the interconnected port B is also a FlexE interface mode. In this case, the network device determines the mode of the port A on the network device does not need to be changed. If the status that is of the port A and that is determined in step 301 includes: there is no link at the FlexE shim, it may be determined that a port B interconnected with the port A is in an Ethernet interface mode, that is, the port B is communicating with the port A through an Ethernet interface. In this case, the network device may adaptively set the mode of the port A on the network device to the Ethernet interface mode, so that the network device can implement automatic communication.
When the mode of the port A is the FlexE interface mode, the network device may determine, based on whether a signal sent by the port B is received at the FlexE shim of the port A, whether there is a link at the FlexE shim of the port A. If the network device receives, at the FlexE shim of the port A, the signal sent by the port B interconnected with the port A, the network device may determine that there is a link at the FlexE shim of the port A. If the network device does not receive, at the FlexE shim of the port A, the signal sent by the port B interconnected with the port A, the network device may determine that there is no link at the FlexE shim of the port A.
In one example, the status that is of the port A and that is determined in step 301 may further include: whether a link has been established at a PCS of the port A; in this case, the first condition may further include: the link has been established at the PCS of the port A. In this example, in one case, if the determined status of the port A includes: there is no link at the FlexE shim and there is a link at the PCS, it may be determined that there is a network device connected to the port A and that the port B interconnected with the port A is in the Ethernet interface mode, that is, the port B is communicating with the port A through the Ethernet interface. In other words, it is determined that the mode of the port B interconnected with the port A is not the FlexE interface mode. In this case, the network device may adaptively set the mode of the port A on the network device to the Ethernet interface mode. In another case, if the status of the port A includes: there is no link at the FlexE shim and there is no link at the PCS, it may be determined that the port A is not connected to another network device. In this case, the network device may adaptively set the mode of the port A on the network device to the Ethernet interface mode, or may not change the mode of the port A.
The network device may determine, by determining whether a capability negotiation signal sent by the peer end is received at the PCS of the port A, whether a link has been established at the PCS of the port A. When the network device receives, at the PCS of the port A, the capability negotiation signal sent by the port B interconnected with the port A, the network device may determine that a link has been established with the port B at the PCS of the port A. If the network device does not receive, at the PCS of the port A, the capability negotiation signal sent by the peer port, the network device may determine that there is no link at the PCS of the port A. It can be learnt that, according to the port mode adaptation method provided in this embodiment of this application, when the network device determines that the mode of the port A on the network device is the FlexE interface mode, and determines that there is no link at the FlexE shim of the port A, the network device may determine that the mode used by the port B interconnected with the port A is not the FlexE interface mode. In this case, the network device adaptively sets the mode of the port A to the Ethernet interface mode, to ensure that the port A on the network device can use a same mode as the port B interconnected with the port A, so that the network device can automatically communicate with another device. When a peer device is a network management device, the network management device can automatically identify and manage the network device in a network.
In some specific specifications, the status that is of the port A and that is determined in step 301 includes: the current mode of the port A, whether there is a link at the FlexE shim of the port A, and whether there is a link at the PCS of the port A. In this case, during specific implementation, as shown in
Step 401: A network device determines a status of a port A on the network device.
Step 402: If the status of the port A satisfies a first condition, the network device sets a mode of the port A to an Ethernet interface mode, where the first condition includes: the mode of the port A is a FlexE interface mode, there is no link at a FlexE shim of the port A, and a link has been established at a PCS of the port A.
Step 403: If the status of the port A satisfies a second condition, the network device switches the mode of the port A from the Ethernet interface mode to the FlexE interface mode, where the second condition includes: the mode of the port A is the Ethernet interface mode, and no link has been established at the PCS of the port A.
For specific implementations of step 401 and step 402 and effects thereof, refer to related descriptions of step 301 and step 302 in the embodiment shown in
It can be understood that in the second condition, the mode of the port A may be preset on the network device. The second condition is one of conditions used for indicating to perform mode adaptive adjustment on the port on the network device, and may specifically be used as a condition for adjusting the mode of the port on the network device from the Ethernet interface mode to the FlexE interface mode.
During specific implementation, after setting the mode of the port A on the network device to the Ethernet interface mode by using step 401 and step 402, the network device may further determine whether the status of the port A satisfies the second condition. In one case, if the status of the port A includes: there is no link at the PCS, it may be determined that the port A is not connected to another network device. In this case, the network device may adaptively switch the mode of the port A on the network device back to a default port mode, that is, the FlexE interface mode.
It can be learnt that, according to the port mode adaptation method provided in this embodiment of this application, when the network device identifies the mode of the port A on the network device as the FlexE interface mode, and determines that there is a link at the PCS of the port A and there is no link at the FlexE shim of the port A, the network device may determine that a mode used by a port B interconnected with the port A is not a FlexE interface mode. In this case, the network device adaptively sets the mode of the port A to the Ethernet interface mode. When the mode of the port on the network device is the Ethernet interface mode, and the network device detects that there is no link at the PCS of the port A, the network device determines that the network device is not connected to another network device through the port A, and then automatically switches the mode of the port A back to the default mode, that is, the FlexE interface mode. In this way, the mode of the port on the network device can be adaptively adjusted flexibly, to ensure that the port A on the network device can use a same mode as the port B interconnected with the port A, so that the network device can automatically communicate with another network device. When a peer device is a network management device, the network management device can automatically identify and manage the network device in a network.
In some other specific implementations, in this embodiment of this application, the status of the port A on the network device may further be set to an adaptive state, a first locked state, or a second locked state through configuration. The adaptive state of the port A is a state in which the network device can adaptively adjust the mode of the port A. The first locked state is a state in which the network device locks the mode of the port A to the FlexE interface mode and cannot perform adaptive adjustment. The second locked state is a state in which the network device locks the mode of the port A to the Ethernet interface mode and cannot perform adaptive adjustment. The three states can be switched by using a configuration instruction.
In the embodiments shown in
During specific implementation, the network device may set the status of the port A on the network device to one of the adaptive state, the first locked state, and the second locked state according to the received configuration instruction. In one example, this embodiment of this application may further include: S21. The network device receives a first configuration instruction. S22. The network device sets the status of the port A to the adaptive state according to the first configuration instruction. In this case, the network device can perform the process shown in
The first configuration instruction, the second configuration instruction, and the third configuration instruction may be directly configured by technical personnel on the network device by using a command line or in another manner, or may be instructions sent to the network device by another device such as the network management device. The instructions are used to instruct the network device to set the port A on the network device to the adaptive state, the first locked state, and the second locked state, respectively.
In addition, in this embodiment of this application, the mode of the port A may further be switched according to configuration instructions configured by the technical personnel on the network device by using a command line or in another manner. In one example, this embodiment of this application may further include: S51. The network device receives a fourth configuration instruction. S52. The network device sets the mode of the port A to the Ethernet interface mode according to the fourth configuration instruction. Likewise, in another example, this embodiment of this application may further include: S61. The network device receives a fifth configuration instruction. S62. The network device sets the mode of the port A to the FlexE interface mode according to the fifth configuration instruction.
The fourth configuration instruction and the fifth configuration instruction may be directly configured by the technical personnel on the network device by using a command line or in another manner, or may be sent to the network device by another device such as the network management device. Either of the instructions is used to instruct the network device to forcedly configure the mode of the port A on the network device to a specific port mode.
For example, as shown in
The state 1 is also denoted as an initial state or a default state of the port A, and is a default state of the port A after the network device is powered on. Both a configuration state and a forwarding state that are corresponding to the state 1 are “FlexE” by default. When the port A is in the state 1, the port A may implement, based on a FlexE interface mode, interworking with an interconnected port that is in a FlexE interface mode, and implement packet service configuration.
If the port A is in the state 1, when the network device detects that the link has been established at the PCS and that there is no link at the FlexE shim, the network device adaptively adjusts the mode of the port A to an Ethernet interface mode. In this case, the status of the port A is switched to the state 2. A configuration state corresponding to the state 2 is “FlexE” and a forwarding state corresponding to the state 2 is “Ethernet”. When the port A is in the state 2, the port A may implement, based on an Ethernet interface mode, interworking with an interconnected port that is in an Ethernet interface mode, and implement packet service configuration.
The state 3 may be a state corresponding to a common Ethernet interface mode. When the port A is in the state 1 or the state 2, the technical personnel may manually switch the configuration state to “Ethernet” according to the fourth configuration instruction. In this case, the forwarding state is locked to “Ethernet”.
Moreover, when the port A is in the state 3, the technical personnel may manually switch both the configuration state and the forwarding state to “FlexE” according to the fifth configuration instruction. In this case, the status of the port A is switched to the state 1. It should be noted that, when the port A is in the state 3, the network device does not support adaptation performed on the mode of the port A by using the embodiment shown in
In one example, for a state transition process of the foregoing three types of states, refer to the following table:
After the network device is installed and powered on, a port on the network device, for example, the port A, is switched from “stateless” to the state 1.
For the source status being the state 1, in a first case, when no link has been established at the PCS of the port A on the network device, or when a link has been established at the PCS but a time for establishing a link at the FlexE shim exceeds a preset time (for example, 5 seconds), the port A remains in the state 1. In a second case, when the network device sets the status of the port A on the network device to the first locked state by using S31 to S33, the network device locks the mode of the port A to the FlexE interface mode, and no longer detects whether there is a link at each layer, that is, no longer concerns about the mode of the port B interconnected with the port A. In a third case, when the link has been established at the PCS of the port A on the network device but there is no link at the FlexE shim of the port A on the network device, the network device determines that the mode of the port B interconnected with the port A is the Ethernet interface mode. Then, the network device may set the forwarding state of the port A to “Ethernet” by using step 301 and step 302 (or step 401 and step 402), that is, switch the status of the port A to the state 2. In a fourth case, when the network device locks the status of the port A on the network device to the second locked state by using S41 to S43, the network device forcedly switches the mode of the port A to the Ethernet interface mode (that is, switches the forwarding state of the port A to “Ethernet”). In this case, the port A is in the state 2, and the network device no longer detects whether there is a link at each layer, that is, no longer concerns about the mode of the port B interconnected with the port A. In a fifth case, the network device forcedly switches the status of the port A on the network device to the state 3 by using S51 and S52.
For the source status being the state 2, in a first case, when a time during which no link has been established at the PCS of the port A on the network device exceeds a preset time (for example, 3 seconds), it is considered that the port B interconnected with the port A is disconnected, for example, a fiber cut occurs. Then, the network device may restore the forwarding state of the port A to “FlexE” by using step 403, that is, switch the status of the port A back to the state 1. In a second case, when the network device sets the status of the port A on the network device to the first locked state by using S31 to S33, the network device forcedly switches the mode of the port A to the FlexE interface mode. In this case, the port A is in the state 1, and the network device no longer detects whether there is a link at each layer, that is, no longer concerns about the mode of the port B interconnected with the port A. In a third case, when the network device sets the status of the port A on the network device to the second locked state by using S41 to S43, the network device locks the mode of the port A to the Ethernet interface mode, and no longer detects whether there is a link at the PCS or at the FlexE shim, that is, no longer concerns about the mode of the port B interconnected with the port A. In a fourth case, the network device forcedly configures the status of the port A on the network device to the state 3 by using S51 and S52, when no packet service is configured on a FlexE interface of the port A on the network device.
For the source status being the state 3, the network device may forcedly configure the status of the port A on the network device to the state 1 by using S61 and S62. A premise of the forced configuration is that no packet service is configured on an Ethernet interface of the port A on the network device.
In can be learnt that, mode adaptation of the port A can be implemented by setting the foregoing three types of states on the network device, to ensure that the port A on the network device can use a same mode as the port B interconnected with the port A, so that the network device can automatically communicate with another network device. When the peer device is the network management device, the network management device can automatically identify and manage the network device in the network.
To make the port mode adaptation method provided in this embodiment of this application clearer, with reference to the accompanying drawings, the following describes some corresponding examples in the embodiments of this application by using a process of performing port mode adaptation adjustment between a network device 1 and a network device 2 that are directly connected to each other as an example.
Referring to
Referring to
Referring to
Referring to
Referring to
Referring to
It should be noted that the foregoing examples are merely used to describe, in some scenarios, the port mode adaptation methods provided in the embodiments of this application, and the embodiments of this application are applicable to scenarios including but not limited to the foregoing scenarios.
In some embodiments, the first condition further includes: a link has been established at a PCS of the port.
In some other embodiments, the apparatus 1200 further includes a switching unit. The switching unit is configured to switch the mode of the port from the Ethernet interface mode to the FlexE interface mode if the status of the port satisfies a second condition. The second condition includes: the mode of the port is the Ethernet interface mode, and there is no link at the PCS of the port.
In still some other embodiments, the first condition further includes: the port is in an adaptive state, and the second condition further includes: the port is in the adaptive state.
In yet some other embodiments, the apparatus 1200 further includes a first receiving unit and a second setting unit. The first receiving unit is configured to receive a first configuration instruction. The second setting unit is configured to set the status of the port to the adaptive state according to the first configuration instruction.
In some other embodiments, the apparatus 1200 further includes a second receiving unit, a third setting unit, and a first locking unit. The second receiving unit is configured to receive a second configuration instruction. The third setting unit is configured to set the status of the port to a first locked state according to the second configuration instruction. The first locking unit is configured to lock the mode of the port to the FlexE interface mode when the port is in the first locked state.
In some other embodiments, the apparatus 1200 further includes a third receiving unit, a fourth setting unit, and a second locking unit. The third receiving unit is configured to receive a third configuration instruction. The fourth setting unit is configured to set the status of the port to a second locked state according to the third configuration instruction. The second locking unit is configured to lock the mode of the port to the Ethernet interface mode when the port is in the second locked state.
In some other embodiments, the apparatus 1200 further includes a fourth receiving unit and a first configuration unit. The fourth receiving unit is configured to receive a fourth configuration instruction. The first configuration unit is configured to set the mode of the port to the Ethernet interface mode according to the fourth configuration instruction.
In some other embodiments, the apparatus 1200 further includes a fifth receiving unit and a second configuration unit. The fifth receiving unit is configured to receive a fifth configuration instruction. The second configuration unit is configured to set the mode of the port to the FlexE interface mode according to the fifth configuration instruction.
It can be understood that, for specific implementations of the apparatus 1200 shown in
In addition, an embodiment of this application further provides a network device. As shown in
Moreover, an embodiment of this application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to perform the port mode adaptation method in any one of the implementations in the methods shown in
Further, an embodiment of this application further provides a computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are run on a computer or a processor, the computer or the processor is enabled to perform the port mode adaptation method in any one of the implementations in the methods shown in
“First” in terms such as “first configuration instruction” and “first condition” mentioned in the embodiments of this application is merely used to identify names, but is not used to indicate the first one in terms of sequences. The rule is also applicable to “second” and so on.
From the foregoing descriptions of the implementations, a person skilled in the art can clearly understand that all or some steps of the methods in the embodiments can be implemented by software in addition to a general hardware platform. Based on such an understanding, the technical solutions in this application may be implemented in a form of a software product. The software product may be stored in a storage medium, such as a read-only memory (ROM)/random-access memory (RAM), a magnetic disk, or an optical disc, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network communications device such as a router) to perform the methods described in the embodiments or some parts of the embodiments of this application.
The embodiments in this specification are all described in a progressive manner. For same or similar parts in the embodiments, refer to these embodiments, and each embodiment focuses on a difference from other embodiments. In particular, because the apparatus embodiment and the device embodiment are basically similar to the method embodiments, the apparatus embodiment and the device embodiment are described relatively simply, and for related parts of the apparatus embodiment and the device embodiment, reference is made to a part of the descriptions of the method embodiments. The device embodiment and the apparatus embodiment that are described above are merely examples. The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one position, or may be distributed on a plurality of network units. Some or all of the modules may be selected depending on actual requirements to achieve the objectives of the solutions in the embodiments. A person of ordinary skill in the art can understand and implement the embodiments without creative efforts.
The foregoing descriptions are merely specific implementations of the present application, but are not intended to limit the protection scope of the present application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present application shall fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Number | Date | Country | Kind |
---|---|---|---|
201910631755.4 | Jul 2019 | CN | national |
This application is a continuation of International Patent Application No. PCT/CN2020/101624 filed on Jul. 13, 2020, which claims priority to Chinese Patent Application No. 201910631755.4 filed on Jul. 12, 2019. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Name | Date | Kind |
---|---|---|---|
20140280791 | Casimer et al. | Sep 2014 | A1 |
20180013511 | Hussain | Jan 2018 | A1 |
20200162586 | Li et al. | May 2020 | A1 |
20210091871 | Deng | Mar 2021 | A1 |
20210320819 | Chen | Oct 2021 | A1 |
Number | Date | Country |
---|---|---|
101350823 | Jan 2009 | CN |
103222251 | Jul 2013 | CN |
109302372 | Feb 2019 | CN |
109672513 | Apr 2019 | CN |
Entry |
---|
Katsalis, K., “Towards Slicing for Transport Networks: The Case of Flex-Ethernet in 5G,” IEEE Conference on Standards for Communications and Networking (CSCN), Oct. 29, 2018, 8 pages, XP033480448. |
IEEE Std 802.3TM, “IEEE Standard for Ethernet,” LAN/MAN Standards Committee of the, IEEE Computer Society, 2015, 5600 pages. |
“Flex Ethernet Implementation Agreement,” IA OIF-FLEXE-01.0, Mar. 2016, 31 pages. |
“Flex Ethernet 2.0 Implementation Agreement,” IA OIF-FLEXE-02.0, Jun. 22, 2018, 51 pages. |
Number | Date | Country | |
---|---|---|---|
20210409236 A1 | Dec 2021 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2020/101624 | Jul 2020 | US |
Child | 17474678 | US |