WO2021008484A1 - 一种端口模式自适应的方法及装置 - Google Patents

一种端口模式自适应的方法及装置 Download PDF

Info

Publication number
WO2021008484A1
WO2021008484A1 PCT/CN2020/101624 CN2020101624W WO2021008484A1 WO 2021008484 A1 WO2021008484 A1 WO 2021008484A1 CN 2020101624 W CN2020101624 W CN 2020101624W WO 2021008484 A1 WO2021008484 A1 WO 2021008484A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
network device
mode
flexe
state
Prior art date
Application number
PCT/CN2020/101624
Other languages
English (en)
French (fr)
Inventor
胡永健
向艳稳
薛伟
易科
魏家道
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to MX2021014520A priority Critical patent/MX2021014520A/es
Priority to EP20840310.5A priority patent/EP3902203B1/en
Publication of WO2021008484A1 publication Critical patent/WO2021008484A1/zh
Priority to US17/474,678 priority patent/US11855764B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/351Switches specially adapted for specific applications for local area network [LAN], e.g. Ethernet switches
    • 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/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • 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]
    • 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/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports

Definitions

  • This application relates to the field of communication technology, and in particular to a method and device for port mode adaptation.
  • a network device when deployed in the network, it needs to be able to automatically communicate with other network devices, so that the network device can be automatically identified by the network management center after it is installed and powered on, so that the network management center can manage the network device.
  • the ordinary Ethernet English: Ethernet
  • OIF Optical Internetworking Forum
  • FlexE flexible Ethernet
  • communication between the two network devices cannot be performed.
  • the embodiments of the present application provide a method and device for port mode adaptation, so that the port of a network device can adaptively adopt the same mode as the port that is connected, so that the network device can automatically realize the same mode as other network devices. Communicate between.
  • an embodiment of the present application provides a method for port mode adaptation.
  • the process of implementing port mode adaptation according to the method may specifically include: the network device determines the state of the port on the network device, and the port state may include: the port mode, and the port Whether the flexible Ethernet layer (English: Flexible Ethernet shim, abbreviated: FlexE shim) has a link; the network device determines whether the state of the port meets the first condition, and if it meets the first condition, the port mode is set to the Ethernet Ethernet interface;
  • the first condition includes: the port mode is a flexible Ethernet (English: Flexible Ethernet, referred to as: FlexE) interface, and the flexible Ethernet layer (English: Flexible Ethernet shim, referred to as: FlexE shim) of the port has no link .
  • the network device when the network device recognizes that the mode of its port is the FlexE interface and the FlexE shim of the port is not connected, it can be determined that the mode of the port that is connected to the port is not the FlexE interface.
  • the network device can be adaptive Set the mode of the port to the Ethernet interface to ensure that the port of the network device can use the same mode as the port it is connected to, so that two adjacent network devices can automatically communicate with each other, that is, the two Each network device can communicate with itself. If the opposite end is a network management device, the network management device can automatically identify and manage the network device that communicates with itself. Therefore, the port adaptation method provided in the embodiments of the present application ensures that the network device is automatically connected. It makes it possible for the network management equipment to automatically identify and manage the network equipment.
  • the first condition may further include: a link has been established on the PCS of the physical coding sublayer of the port.
  • the network device can further determine that the port is connected to other network devices and the port that is connected to the port is in Ethernet interface mode by comparing the detected port status with the first condition, that is, port B is using the Ethernet interface with port A.
  • the port mode is adaptively adjusted to the Ethernet interface, so that the port mode adaptive method provided in the embodiment of the present application is more accurate.
  • the method may further include: if the status of the port meets the second condition, the network device switches the mode of the port from the Ethernet interface to the FlexE interface; wherein, the second condition includes: port The mode is Ethernet interface, and there is no link on the PCS of this port.
  • the network device can set the port mode to Ethernet interface based on the state of the port, and continue to determine whether the port is connected to other network devices through the state of the port.
  • set the port mode Adaptively switch back to the default mode, that is, the FlexE interface, to achieve flexible adaptive adjustment of the port mode of the network device.
  • the first condition may further include: the port is in an adaptive state; the second condition may also include: the port is in an adaptive state.
  • the adaptive state of the port refers to the state in which the network device can adaptively adjust the mode of the port.
  • the method may further include: the network device receives the first configuration instruction, and according to the first configuration instruction, sets the port to an adaptive state.
  • the method may further include that the network device locks the port mode to a certain fixed mode according to other configuration instructions.
  • the method may further include: the network device receives a second configuration instruction , And set the port to the first locked state according to the second configuration instruction; when the port is in the first locked state, the network device locks the mode of the port to the FlexE interface.
  • the method may further include: the network device receives a third configuration instruction, and according to the third configuration instruction, sets the port to the second locked state; when the port is in the second locked state, the network device sets the port The mode is locked to the Ethernet interface.
  • the first locked state may refer to a state where the network device locks the port mode to the FlexE interface and cannot be adaptively adjusted;
  • the second locked state may refer to the network device locks the port mode to Ethernet The state of the interface that cannot be adaptively adjusted.
  • the method provided in the embodiment of the present application can also lock the port mode to the port mode corresponding to its locked state through configuration instructions, so as to lock the port mode to the FlexE interface or the Ethernet interface.
  • the method may further include the network device setting the port mode to a mode according to the mandatory configuration of the technician.
  • the method may further include: the network device receives the fourth configuration instruction, and sets the mode of the port to the Ethernet interface according to the fourth configuration instruction.
  • the method may further include: the network device receives a fifth configuration instruction, and sets the mode of the port to the FlexE interface according to the fifth configuration instruction. In this way, the method provided in the embodiment of the present application can also set the port mode to the FlexE interface or the Ethernet interface through mandatory configuration by a technician.
  • an embodiment of the present application also provides a device for port mode adaptation.
  • the device includes a determining unit and a first setting unit.
  • the determining unit is used to determine the state of the port on the network device;
  • the first setting unit is used to set the mode of the port to an Ethernet interface if the state of the port meets the first condition; wherein, the first setting unit One condition includes: the mode of the port is a flexible Ethernet FlexE interface, and the flexible Ethernet layer FlexE shim of the port has no link.
  • the first condition further includes: a link has been established on the PCS of the physical coding sublayer of the port.
  • the device further includes: a switching unit.
  • the switching unit is configured to switch the mode of the port from the Ethernet interface to the FlexE interface if the state of the port meets the second condition; wherein, the second condition includes: the mode of the port is all The Ethernet interface, and there is no link on the PCS of the port.
  • the first condition further includes: the port is in an adaptive state; and the second condition further includes: the port is in an adaptive state.
  • the device further includes a first receiving unit and a second setting unit.
  • the first receiving unit is used to receive a first configuration instruction; the second setting unit is used to set the port to an adaptive state according to the first configuration instruction.
  • the device further includes a second receiving unit, a third setting unit, and a first locking unit.
  • the second receiving unit is used for receiving the second configuration instruction;
  • the third setting unit is used for setting the port to the first locked state according to the second configuration instruction;
  • the first locking unit is used for when the port is in the In the first locked state, the mode of the port is locked to the FlexE interface.
  • the device further includes: a third receiving unit, a fourth setting unit, and a second locking unit.
  • the third receiving unit is used for receiving the third configuration instruction;
  • the fourth setting unit is used for setting the port to the second locked state according to the third configuration instruction;
  • the second locking unit is used for when the port is in the In the second locked state, the mode of the port is locked to the Ethernet interface.
  • the device 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 according to the fourth configuration instruction.
  • the device 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 according to the fifth configuration instruction.
  • the device provided in the second aspect corresponds to the method provided in the first aspect. Therefore, the various possible implementation modes and technical effects of the device provided in the second aspect can be referred to the method provided in the first aspect. Introduction.
  • the embodiments of the present application also provide a network device, which includes a memory and a processor; wherein the memory is used to store program code; and the processing is used to run instructions in the program code to make the network
  • the device executes any of the aforementioned methods.
  • the embodiments of the present application also provide a computer program product, which when running on a computer, causes the computer to execute any of the foregoing methods.
  • the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when it runs on a computer or a processor, the computer or the processor executes the foregoing Any method.
  • FIG. 1 is a schematic diagram of the framework of the corresponding interfaces of the two port modes involved in the embodiments of this application;
  • Figure 2 is a schematic diagram of a network structure in an application scenario in an embodiment of the application
  • FIG. 3 is a schematic flowchart of a method for port mode adaptation in an embodiment of this application.
  • FIG. 4 is a schematic flowchart of another method for port mode adaptation in an embodiment of this application.
  • FIG. 6 is a schematic diagram of an example of a method for port mode adaptation in an embodiment of the application.
  • FIG. 7 is a schematic diagram of another example of a method for port mode adaptation in an embodiment of the application.
  • FIG. 8 is a schematic diagram of another example of the method for port mode adaptation in an embodiment of this application.
  • FIG. 9 is a schematic diagram of another example of a method for port mode adaptation in an embodiment of the application.
  • FIG. 10 is a schematic diagram of another example of a method for port mode adaptation in an embodiment of this application.
  • FIG. 11 is a schematic diagram of another example of a method for port mode adaptation in an embodiment of this application.
  • FIG. 12 is a schematic structural diagram of a device for port mode adaptation in an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of a network device in an embodiment of this application.
  • the network equipment can support the ordinary Ethernet Ethernet interface defined by the IEEE802.3 standard and the FlexE interface defined by the OIF FlexE 1.0 or 2.0 standard of the Optical Internet Forum.
  • the FlexE interface is an interface type that extends FlexE interface channelization function, bandwidth binding function, or unique sub-rate function based on the IEEE802.3 standard.
  • the network equipment of the product line such as packet transport network (English: packet transport network, abbreviated as: PTN) and Internet Protocol Radio Access Network (English: Internet Protocol radio access network, abbreviated as: IP RAN) have already supported the FlexE interface mode.
  • the network devices mentioned in the embodiments of this application are all regarded as network devices supporting the FlexE interface mode.
  • the peer network device can be a network device that supports the FlexE interface mode or a network device that supports the ordinary Ethernet interface mode.
  • the network device may include one or more Ethernet interfaces.
  • a certain FlexE-supporting port on the network device is used as an example for description.
  • the FlexE-supporting port can be adaptive Adjust the interface mode.
  • one or more of the other ports that support FlexE may also support the adaptive adjustment interface mode.
  • one or more of the other ports that support FlexE may not support the adaptive adjustment interface mode.
  • FlexE refers to an interface technology for the bearer network to implement service isolation, bearer and network fragmentation. FlexE fragmentation is based on time slot scheduling to divide a physical Ethernet port into multiple Ethernet flexible hard pipes, making the network similar to time division multiplexing Use (English: time division multiplexing, abbreviation: TDM) exclusive time slot, good isolation characteristics, but also with the characteristics of Ethernet statistical multiplexing and high network efficiency, to achieve business statistical multiplexing within the same slice, between slices Services do not affect each other.
  • TDM time division multiplexing
  • TDM time division multiplexing
  • TDM time division multiplexing, abbreviation: TDM
  • FlexE Client (English: FlexE Client), used to indicate service customers carried by the FlexE network.
  • the current OIF FlexE 1.0 or 2.0 standard is defined as Ethernet packet service flow, which can be extended to support TDM and common public radio interface (English: Common Public Radio Interface) , Referred to as: CPRI) and other business types.
  • the flexible Ethernet layer (English: FlexE shim) refers to the service layer that maps or demaps the FlexE Client.
  • the FlexE Client is carried by the FlexE Shim, and the FlexE Shim is transmitted through the FlexE group (English: FlexE Group).
  • FlexE Group refers to a FlexE protocol group composed of one or more PHYs with the same group number, which provides a unified underlying service for FlexE Shim.
  • FIG 1 is a schematic diagram of the architecture of the Ethernet interface and the FlexE interface.
  • the Ethernet interface includes a media access control (English: Media Access Control, abbreviated: MAC) layer and a physical layer (English: physical layer, abbreviated: PHY).
  • the MAC layer includes: adaptation sublayer (English: reconciliation sublayer, referred to as RS layer) and MAC sublayer;
  • PHY layer includes: physical code sublayer (English: Physical Code Sublayer, referred to as PCS), physical media access Sublayer (English: Physical Medium Attachment sublayer, referred to as PMA) and physical media related sublayer (English: Physical Medium Dependent sublayer, referred to as PMD).
  • PCS Physical Code Sublayer
  • PMA Physical Medium Attachment sublayer
  • PMD Physical Medium Dependent sublayer
  • the FlexE interface technology is to insert FlexE Shim between the PHY layer and the MAC layer of the Ethernet interface to implement related functions of the FlexE interface.
  • each network device When network devices are deployed in the network, each network device needs to be able to realize data communication network (English: data communication network, abbreviation: DCN) self-communication to ensure that each network device can be automatically identified by the network management center after it is installed and powered on , So that the network management center can manage each network device.
  • DCN data communication network
  • the realization of DCN self-communication by the network equipment means that the network equipment can automatically communicate with the adjacent network equipment in DCN messages.
  • the network device supports both the Ethernet interface and the FlexE interface, see Figure 1. Since the Ethernet interface does not have FlexE shim, the mode of the docking port is the Ethernet interface and the FlexE interface for two network devices, above the PHY layer. It cannot communicate with each other.
  • the ports of the two network devices are connected in the same mode. It is an Ethernet interface, or the mode of the ports where two network devices are connected is FlexE interface.
  • the network includes: a controller 201, a network device 202, and a network device 203, where the controller 201 may be a device with a network management function.
  • the controller 201 is connected to the port 2 of the network device 202 through its port 1, and the network device 202 is connected to the port 4 of the network device 203 through its port 3.
  • the controller 201 may also be other devices with a network management function, such as a network management device.
  • the switching process may include: S11, the technician manually determines that the current network device 202 and the network device 203 are connected to port 3 and port 4, respectively.
  • ports 3 and port 4 are Ethernet interfaces; S12, according to the network structure, the technicians determine that the network device 202 is the upstream network element and the network device 203 is the downstream network element in the network; S13, in order to make the network device The docking ports of 202 and network device 203 are switched to FlexE interfaces. The technician needs to configure a strategy on the controller 201 to switch the port of the downstream network element first and then switch the port of the upstream network element.
  • This strategy is used to instruct the network device 203 to switch first Port 4 of the network device 202 is switched to port 3, so that when the NCE first instructs the downstream network element (network device 203 in Figure 2) to switch port 4 to the FlexE interface, although the downstream network element (network device 203 in Figure 2) 203) Because the docking port 3 with the upstream network element (such as the network device 202 in Figure 2) adopts a different mode, it cannot communicate with the controller, but the upstream network element (such as the network device 202 in Figure 2) can also communicate with the network.
  • the controller can instruct the upstream network element (such as the network device 202 in Figure 2) to switch port 3 to the FlexE interface; S14, the controller 201 sends instruction 1 to the network device 203 through the network device 202, indicating The network device 203 switches the mode of port 4 to the FlexE interface; S15, the controller 201 sends instruction 2 to the network device 202 to instruct the network device 202 to switch the mode of port 3 to the FlexE interface. In this way, the docking port mode of the network device 202 and the network device 203 whose port modes are both Ethernet interfaces is switched to the FlexE interface, so that the network device 202 and the network device 203 can communicate with each other.
  • the upstream network element such as the network device 202 in Figure 2
  • the controller 201 sends instruction 1 to the network device 203 through the network device 202, indicating The network device 203 switches the mode of port 4 to the FlexE interface
  • S15 the controller 201 sends instruction 2 to the network device 202 to instruct the network device 202 to switch the mode
  • the port mode of the network equipment one by one to ensure the self-communication mode of the network equipment, it is necessary to manually determine the currently connected port and the mode of the port, manually determine the upstream and downstream relationship of the network element, and manually configure the switch port mode
  • the strategy to the network management center will not only cause a large amount of network operation and maintenance, but also a large number of manual judgments and configuration operations, resulting in a greater probability of error.
  • the upstream and downstream network elements are judged incorrectly, the error will be addressed to the upstream network first. If the mode of the downstream port of the element is switched, the downstream network element will not be able to receive the instruction to switch the mode of its upstream port and cannot realize self-communication.
  • the embodiment of the present application provides a port mode self-adaptation method.
  • the network device recognizes that the port mode is a FlexE interface, and the FlexE shim of the port is not connected, it determines the port that is connected to the port. It is not a FlexE interface.
  • the network device can automatically set the port mode to the Ethernet interface to ensure that the port of the network device can use the same mode as the port that is connected to it, so that the two networks
  • the devices can automatically communicate with other network devices, that is, both network devices can realize self-communication, so that the network management center can automatically identify and manage the network devices.
  • network device 2 can detect the status of port 3, namely The port mode is the FlexE interface and the port 3 does not have a FlexE shim link. At this time, the network device 202 can determine that the port 4 on the network device 203 that is connected to the port 3 does not use the FlexE interface, so that the network device 202 can automatically connect The mode of its port 3 is set to the Ethernet interface to ensure that the same port mode is maintained between its adjacent network devices 203.
  • FIG. 3 is a schematic flowchart of a method for port mode adaptation in an embodiment of this application. It should be noted that the embodiment shown in FIG. 3 may be applied to the network architecture shown in FIG. 2, and the network device 202 and the network device 203 shown in FIG. 2 respectively execute the steps in the method shown in FIG. 3. It is understandable that since the port mode of the network device is the Ethernet interface, there is no FlexE shim, so the network device cannot detect whether the FlexE shim of the port is connected, and thus cannot determine whether the mode of the docking port is the FlexE interface; When the port mode is a FlexE interface, you can detect whether its FlexE Shim has a link, so as to determine whether the mode of the docking port is an Ethernet interface. Therefore, in order to effectively implement port mode adaptation, the network device in this embodiment of the application can set its default port mode to FlexE interface, so that it can automatically determine the mode of the docking port and perform effective port mode adjustment. Adaptive switching.
  • the method may include, for example:
  • Step 301 The network device determines the status of port A on the network device.
  • the network device can detect the status of its port A.
  • the status of the port A may at least include: the current mode of the port A and whether the port A has a link on the FlexE shim.
  • Port A can default its mode to FlexE interface.
  • the network device can determine whether port A of the network device has a link on the FlexE shim through detection. If so, the status of the port on the network device determined by the network device can include: there is a FlexE shim link; if No, the status of the port on the network device determined by the network device can include: no FlexE shim link.
  • Step 302 If the state of the port meets the first condition, the network device sets the mode of the port A to an Ethernet Ethernet interface; wherein, the first condition includes: the mode of the port A is a flexible Ethernet FlexE interface, and, The flexible Ethernet layer FlexE shim of port A has no link.
  • the network device may preset the mode of port A on the network device to instruct port A of the network device to perform mode adaptive adjustment.
  • the network device determines that there is no need to change the mode of port A on it. If the status of the port A determined in step 301 includes: no FlexE shim link, then it can be determined that the port B docking 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.
  • the network device can adaptively set the mode of its port A to the Ethernet interface, so that the network device can realize self-communication.
  • the network device can determine whether the port A has a FlexE shim link by whether the FlexE shim of the port A receives the signal sent by the other party.
  • the network device receives the signal from port B that is connected to port A through the FlexE shim of port A, the network device can determine that port A has a FlexE shim link.
  • the network device cannot receive the signal sent by the port B connected to the port A through the FlexE shim of the port A, the network device can determine that the port A has no FlexE shim link.
  • the status of the port A determined in step 301 may also include: whether the port A has established a link on the PCS, then the first condition may also include: the physical coding sublayer of the port A has established a link on the PCS .
  • the determined status of port A includes: no FlexE shim link and PCS link, then it can be determined that port A has a network device connected to it and is connected to port A Port B is in the Ethernet interface mode, that is, port B is communicating with port A through the Ethernet interface, that is, it is determined that the mode of port B that is connected to port A is not a FlexE interface.
  • the network device can automatically connect its port A The mode is set to Ethernet interface.
  • port A if the status of port A includes: no FlexE shim link and no PCS link, then it can be determined that port A is not connected to other network devices. At this time, the network device can automatically connect its port A to port A. The mode of the port is set to the Ethernet interface, and the mode of the port A may not be changed.
  • the network device can determine whether the port A has established a link on the PCS by determining whether the PCS of the port A receives the capability negotiation signal sent by the opposite end. When the PCS of the port A receives the capability negotiation signal sent by the port B that is connected to the port A, the network device can determine that the port A has established a link with the port B on the PCS. If the PCS of the port A of the network device does not receive the capability negotiation signal sent by the opposite port, the network device can determine that the port A has no PCS link.
  • the network device can determine that the mode of its port A is the FlexE interface, and the FlexE shim of the port A has no link, determine that the port B connected to the port A adopts Is not the FlexE interface.
  • the network device automatically sets the mode of port A to the Ethernet interface to ensure that the port A of the network device can use the same mode as the port B that is connected to it, so that The network device can realize self-communication with other devices.
  • the peer device is a network management device
  • the network management device can automatically recognize and manage the network devices in the network.
  • the status of the port A determined in step 301 includes: the current mode of the port A, whether the port A has a link on the FlexE shim, and whether the port A has a link on the PCS.
  • the embodiments of the present application may specifically include:
  • Step 401 The network device determines the status of port A on the network device.
  • Step 402 If the status of the port A satisfies the first condition, the network device sets the mode of the port A to an Ethernet interface; wherein, the first condition includes: the mode of the port A is a FlexE interface, and the port A The FlexE shim has no link and a link has been established on the PCS of port A.
  • Step 403 If the state of the port A satisfies the second condition, the network device switches the mode of the port A from the Ethernet interface to the FlexE interface; wherein, the second condition includes: the mode of the port A is the Ethernet interface, and the port No link is established on A's PCS.
  • step 401 to step 402 For the specific implementation manners and achieved effects of step 401 to step 402, refer to the related description of step 301 to step 302 in the embodiment shown in FIG. 3 above.
  • the mode of port A can be preset on the network device, which is used to instruct the port of the network device to adjust the mode adaptively. Specifically, it can be used as the port of the network device from Ethernet The interface is adjusted to the conditions of the FlexE interface.
  • the network device can also determine whether the state of the port A meets the second condition. In one case, if the status of port A includes: no PCS link, it can be determined that port A is not connected to other network devices. At this time, the network device can automatically switch its port A mode back to the default Port mode, that is, FlexE interface.
  • the network device can identify its port A in the mode of FlexE interface, and when the port A has a link on the PCS and no link on the FlexE shim, it is determined to be connected to the port Port B connected to A does not use the FlexE interface. At this time, the network device automatically sets the mode of port A to the Ethernet interface. When the port mode of the network device is the Ethernet interface, and it is detected that the port A is not connected to the PCS, it is determined that the port A is not connected to other network devices, and the mode of the port A is automatically switched back to the default mode—— FlexE interface.
  • the port mode of the network device can be adjusted flexibly and adaptively to ensure that the port A of the network device can adopt the same mode as the port B that is connected to it, so that the network device can communicate with other network devices automatically.
  • the peer device is a network management device
  • the network management device can automatically identify and manage the network devices in the network.
  • the port A of the network device can also be set to an adaptive state, a first locked state, and a second locked state through configuration.
  • the adaptive state of port A refers to the state in which the network device can adaptively adjust the mode of port A
  • the first locked state refers to the state that the network device locks the mode of port A to the FlexE interface and cannot perform adaptive The state of adjustment
  • the second locked state refers to the state where the network device locks the mode of port A to the Ethernet interface and cannot perform adaptive adjustment.
  • the three states can be switched by configuration commands.
  • the state of port A determined by the network device may also include whether the port A is in an adaptive state.
  • the first condition further includes: the port A is in an adaptive state; the second condition further includes: the port A is in an adaptive state. That is, the above-mentioned embodiments shown in FIG. 3 and FIG. 4 are all the process of performing adaptive adjustment of the port mode when the port A of the network device is in the adaptive state.
  • the network device can set its upper port A to one of an adaptive state, a first locked state, and a second locked state according to the received configuration instruction.
  • the embodiment of the present application may further include: S21, the network device receives a first configuration instruction; S22, the network device sets the port A to an adaptive state according to the first configuration instruction.
  • the process of FIG. 3 or FIG. 4 can be performed to perform adaptive adjustment of the port mode.
  • the embodiment of the present application may further include: S31, the network device receives a second configuration instruction; S32, the network device sets the port A to the first locked state according to the second configuration instruction; S33, when the port A is in the first locked state, and the network device locks the mode of the port A as the FlexE interface. At this time, the network device cannot perform the process of FIG. 3 or FIG. 4 to perform adaptive adjustment of the port mode.
  • the embodiment of the present application may further include: S41, the network device receives a third configuration instruction; S42, the network device sets the port A to the second locked state according to the third configuration instruction; S43, when the port A is in the second locked state, and the network device locks the mode of the port A as the Ethernet interface. In the same way, the network device at this time cannot perform the process of FIG. 3 or FIG. 4 to perform adaptive adjustment of the port mode.
  • the first configuration instruction, the second configuration instruction, and the third configuration instruction can be configured by a technician directly on the network device through command lines, or other devices, such as a network management device, sent to the network device
  • This instruction is used to instruct the network device to set its port A to one of the adaptive state, the first locked state, and the second locked state.
  • the embodiment of the present application may also include switching the mode of port A according to a configuration instruction set by a technician on the network device through a command line or the like.
  • the embodiment of the present application may further include: S51, the network device receives a fourth configuration instruction; S52, the network device sets the mode of port A to the Ethernet interface according to the fourth configuration instruction.
  • the embodiment of the present application may further include: S61, the network device receives a fifth configuration instruction; S62, the network device sets the mode of port A to the FlexE interface according to the fifth configuration instruction.
  • the fourth configuration instruction and the fifth configuration instruction may be directly configured by a technician on the network device through command lines or other methods, or may be sent to the network device by other devices, such as network management devices;
  • the instruction is used to instruct the network device to forcibly configure its port A to a certain port mode.
  • three state machines can be set for the adaptive process of port A mode, namely: FlexE interface adaptive state (hereinafter referred to as state 1), FlexE interface adaptive state (hereinafter referred to as state 2) And Ethernet interface status (hereinafter referred to as status 3).
  • the configuration state and forwarding state are configured on each state machine. Among them, the configuration state is the state set by the technician. If the configuration state of port A is FlexE, the network device can use the corresponding embodiment in Figure 3 or Figure 4 to The mode is adaptive and the forwarding state of port A is determined.
  • the forwarding state is FlexE, which means that the mode of port A is FlexE interface, and the forwarding state is Ethernet, which means the mode of port A is Ethernet interface; if the configuration state of port A If it is Ethernet, the forwarding status of port A can be locked to Ethernet, that is, the mode of port A of the network device will be forcibly set to the Ethernet interface, and the mode of port A cannot be set through the corresponding embodiment in Figure 3 or Figure 4. Perform adaptive.
  • state 1 is also recorded as the initial state or default state of port A, which refers to the state that port A is in by default after the network device is powered on.
  • the configuration state and forwarding state corresponding to this state 1 are both FlexE by default.
  • port A is in state 1, intercommunication and packet services can be configured based on the FlexE interface mode and the connected FlexE interface mode port.
  • port A When port A is in state 1, when the network device detects that a link has been established on the PCS and the FlexE shim has no link, the network device automatically adjusts the mode of port A to the Ethernet interface, and the state of port A is switched to state at this time 2.
  • the configuration state corresponding to this state 2 is FlexE, and the forwarding state is Ethernet.
  • port A When port A is in state 2, intercommunication and packet services can be configured based on the Ethernet interface mode and the port in the docked Ethernet interface mode.
  • State 3 can refer to the normal Ethernet interface mode.
  • the technician can manually switch the configuration state to Ethernet through the fourth configuration instruction. At this time, the forwarding state is locked to Ethernet.
  • the technician can manually switch both the configuration state and the forwarding state to FlexE through the fifth configuration instruction, so that the port A is switched to the state 1. It should be noted that when port A is in state 3, the network device does not support self-adapting to the mode of port A according to the embodiment shown in FIG. 3 or FIG. 4.
  • a certain port of the network device such as port A, transitions from stateless to state 1.
  • For the source state is state 1, in the first case, when the PCS of port A on the network device has not established a link, or the time for the PCS and FlexE shim to establish a link exceeds the preset time (for example: 5 seconds), then the port A Keep state 1.
  • the preset time for example: 5 seconds
  • the port A Keep state 1.
  • the network device is based on S31-S33, and its upper port A is set to the first locked state, then the port A is locked as a FlexE interface and no longer checks whether there is a link at each layer, that is, no longer pay attention to The mode of port B to which port A is connected.
  • the network device can be based on steps 301 to 302 (or step 401 to step 402), set the forwarding state of port A to Ethernet, and switch to state 2.
  • the network device locks its upper port A to the second locked state based on S41 ⁇ S43, and its mode is forced to switch to the Ethernet interface (that is, the switch forwarding state is Ethernet), then the port A is in the state 2. It no longer detects whether each layer has a link, that is, no longer pays attention to the mode of port B that is connected to port A.
  • the network device is based on S51 and S52, the upper port A is forced to switch to state 3.
  • the source state as state 2 in the first case, when the PCS of port A on the network device has not established a link for more than a preset time (for example: 3 seconds), it will be regarded as port B connected to port A is interrupted. For example, if a fiber break occurs, the network device can restore the forwarding state of the port A to FlexE based on step 403, that is, switch back to state 1.
  • the network device sets its upper port A to the first locked state based on S31 ⁇ S33, and its mode is forced to switch to the FlexE interface, then the port A is in state 1, and no longer checks whether each layer has Link, that is, the mode of port B that is connected to port A is no longer concerned.
  • the port A will be locked as the Ethernet interface, and it will no longer detect whether the PCS or FlexE shim layer is connected, that is, no Then pay attention to the mode of port B that is connected to port A.
  • the network device is based on S51 and S52, and its port A is forcibly configured to state 3. In this case, it is required that the FlexE interface of port A on the network device is not configured with packet services.
  • the network device can forcibly configure port A on it to state 1 based on S61 and S62.
  • the premise of this mandatory configuration is that the Ethernet interface of port A on the network device is not configured with packet services.
  • the port A mode can be adapted to ensure that the port A of the network device can use the same mode as the port B that is connected to it, so that the network device can achieve Self-communication of other network devices.
  • the peer device is a network management device
  • the network management device can automatically identify and manage the network devices in the network.
  • network devices 1 and 2 both detect that the PCS has established a link within the preset time, and FlexE The shim also establishes a link. Then, after network device 1 and network device 2 perform port mode adaptation, the states of the interconnected ports all maintain state 1, that is, the configuration state and the forwarding state are both FlexE.
  • network device 1 sets its port forwarding state to Ethernet according to steps 301 to 302, that is , The port of the network device 1 is set to state 2.
  • network device 2 can detect that the PCS has established a link within the preset time, and the FlexE shim has also established a link, then After network device 2 performs port mode adaptation, its port maintains state 1, that is, both the configuration state and the forwarding state are FlexE.
  • network device 2 can detect that the PCS has established a link within the preset time, but the FlexE shim has not established a link, then, After network device 2 performs port mode adaptation, its port mode is switched to the Ethernet interface, so that the port of the network device is switched to state 2, that is, the configuration state is FlexE and the forwarding state is Ethernet.
  • network device 1 and network device 2 are It can communicate through the port whose docking port mode is the Ethernet interface.
  • FIG. 12 is a schematic structural diagram of an apparatus 1200 for port mode adaptation according to an embodiment of the application.
  • the apparatus 1200 includes a determining unit 1201 and a first setting unit 1202. Wherein, the determining unit 1201 is used to determine the status of the port on the network device; the first setting unit 1202 is used to set the mode of the port to the Ethernet interface if the status of the port meets the first condition; wherein The first condition includes: the mode of the port is a flexible Ethernet FlexE interface, and the flexible Ethernet layer FlexE shim of the port has no link.
  • the first condition further includes: a link has been established on the PCS of the physical coding sublayer of the port.
  • the device 1200 further includes: a switching unit.
  • the switching unit is configured to switch the mode of the port from the Ethernet interface to the FlexE interface if the state of the port meets the second condition; wherein, the second condition includes: the mode of the port is all The Ethernet interface, and there is no link on the PCS of the port.
  • the first condition further includes: the port is in an adaptive state; the second condition further includes: the port is in an adaptive state.
  • the device 1200 further includes a first receiving unit and a second setting unit.
  • the first receiving unit is used to receive a first configuration instruction; the second setting unit is used to set the port to an adaptive state according to the first configuration instruction.
  • the device 1200 further includes a second receiving unit, a third setting unit, and a first locking unit.
  • the second receiving unit is used for receiving the second configuration instruction;
  • the third setting unit is used for setting the port to the first locked state according to the second configuration instruction;
  • the first locking unit is used for when the port is in the In the first locked state, the mode of the port is locked to the FlexE interface.
  • the device 1200 further includes: a third receiving unit, a fourth setting unit, and a second locking unit.
  • the third receiving unit is used for receiving the third configuration instruction;
  • the fourth setting unit is used for setting the port to the second locked state according to the third configuration instruction;
  • the second locking unit is used for when the port is in the In the second locked state, the mode of the port is locked to the Ethernet interface.
  • the device 1200 further includes: a fourth receiving unit and a first configuration unit.
  • the fourth receiving unit is used to receive a fourth configuration instruction; the first configuration unit is used to set the mode of the port to the Ethernet interface according to the fourth configuration instruction.
  • the device 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 according to the fifth configuration instruction.
  • an embodiment of the present application also provides a network device.
  • the network device 1300 includes a memory 1301 and a processor 1302; wherein the memory 1301 is used to store program codes; and the processing 1302 is used to run the The instructions in the program code cause the network device 1300 to execute the port mode adaptation method described in any one of the aforementioned methods shown in FIG. 3 and FIG. 4.
  • embodiments of the present application also provide a computer program product, which when it runs on a computer, causes the computer to execute the port mode self-adapting described in any one of the methods shown in FIGS. 3 and 4 above. method.
  • the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, and when it runs on a computer or a processor, the computer or the processor executes the foregoing FIGS. 3 and Any one of the methods shown in FIG. 4 implements the port mode adaptation method described in the manner.
  • the computer software product can be stored in a storage medium, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, An optical disc, etc., includes a number of instructions to enable a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the method described in each embodiment of the application or some parts of the embodiment.
  • a computer device which may be a personal computer, a server, or a network communication device such as a router
  • the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
  • the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
  • the above-described device and device embodiments are only illustrative.
  • the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement it without creative work.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Automation & Control Theory (AREA)
  • Communication Control (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请公开了一种端口模式自适应的方法和装置。该方法包括:网络设备确定网络设备上端口的状态;若确定端口的状态满足第一条件,则将端口的模式设置成Ethernet接口;其中,该第一条件包括:端口的模式为FlexE接口,以及,该端口的FlexE shim无链接。这样,网络设备可以在识别其端口的模式为FlexE接口,且该端口的FlexE shim无链接时,确定与该端口对接的端口采用的模式不是该FlexE接口,此时,该网络设备可以自适应的将该端口的模式设置为Ethernet接口,以确保该网络设备的该端口可以和与之对接的端口采用相同的模式,从而使该网络设备能够自通,网管中心也可对该网络设备进行识别和管理。

Description

一种端口模式自适应的方法及装置
本申请要求于2019年07月12日提交国家知识产权局、申请号为201910631755.4、申请名称为“一种端口模式自适应的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,特别是涉及一种端口模式自适应的方法及装置。
背景技术
通常,当网络设备被部署到网络中时需要能够自动实现与其他网络设备之间进行通信,这样网络设备安装并上电之后能够自动被网管中心识别,从而网管中心就可以对网络设备进行管理。但是,若两个网络设备相互对接的端口采用不同的模式,如一个网络设备上的IEEE802.3标准定义的普通以太网(英文:Ethernet)接口与另一个网络设备上的光互联网论坛(英文:Optical Internetworking Forum,简称:OIF)灵活以太网(英文:flexible Ethernet,简称:FlexE)1.0或2.0标准定义的FlexE接口对接,则这两个网络设备之间无法进行通信。
发明内容
基于此,本申请实施例提供了一种端口模式自适应的方法及装置,以使得网络设备的端口能够自适应地与对接的端口采用相同的模式,从而使得网络设备能够自动实现与其他网络设备之间进行通信。
第一方面,本申请实施例提供了一种端口模式自适应的方法。当网络设备被部署到网络中时,根据该方法实现端口模式自适应的过程具体可以包括:网络设备确定该网络设备上端口的状态,该端口的状态可以包括:端口的模式,以及,该端口的灵活以太网层(英文:Flexible Ethernet shim,简称:FlexE shim)是否有链接;该网络设备判断该端口的状态是否满足第一条件,若满足,则将端口的模式设置成以太网Ethernet接口;其中,该第一条件包括:端口的模式为灵活以太网(英文:Flexible Ethernet,简称:FlexE)接口,以及,该端口的灵活以太网层(英文:Flexible Ethernet shim,简称:FlexE shim)无链接。这样,网络设备可以在识别其端口的模式为FlexE接口,且该端口的FlexE shim无链接时,确定与该端口对接的端口采用的模式不是该FlexE接口,此时,该网络设备可以自适应的将该端口的模式设置为Ethernet接口,以确保该网络设备的该端口可以和与之对接的端口采用相同的模式,从而使得两个相邻的网络设备之间可以自动实现通信,即,这两个网络设备均能够自通,如果对端是网管设备,网管设备对自通的网络设备可以实现自动的识别和管理,故,本申请实施例提供的端口自适应的方法,确保了网络设备自通,使得网管设备对网络设备的自动识别和管理成为了可能。
结合第一方面的一些具体实施例,该第一条件还可以包括:端口的物理编码子层PCS上已建立链接。这样,网络设备可以通过检测到的端口状态和第一条件的对比,进一步确定出该端口连接到其他网络设备且与该端口对接的端口处于Ethernet接口模式,即端口B正在以Ethernet接口与端口A通信,从而将端口模式自适应地调整为Ethernet接口,使得本申请实施例提供的端口模式自适应的方法更加精准。
结合第一方面的另一些具体实施例,该方法还可以包括:若该端口的状态满足第二条件,网络设备将端口的模式从Ethernet接口切换成FlexE接口;其中,该第二条件包括:端口的模式为Ethernet接口,以及,该端口的PCS上无链接。这样,网络设备可以在基于端口的状态将端口模式设置为Ethernet接口后,通过该端口的状态继续确定出该端口是否连接到其他网络设备,在该端口未连接到其他网络设备时,将端口模式自适应地切换回默认模式,即,FlexE接口,实现灵活的对网络设备的端口模式进行自适应调整。
可以理解的是,该第一条件还可以包括:端口处于自适应状态;第二条件还可以包括:端口处于自适应状态。其中,端口的自适应状态,是指网络设备可以对该端口的模式进行自适应调整的状态。作为一个示例,该方法还可以包括:网络设备接收第一配置指令,并按照该第一配置指令,将端口设置为自适应状态。
结合第一方面的再一些具体实施例,该方法还可以包括网络设备根据其他配置指令,将端口模式锁定到某种固定模式,作为一个示例,该方法还可以包括:网络设备接收第二配置指令,并按照第二配置指令,将端口设置为第一锁定状态;当该端口处于第一锁定状态,网络设备将该端口的模式锁定为FlexE接口。作为另一个示例,该方法还可以包括:网络设备接收第三配置指令,并按照该第三配置指令,将端口设置为第二锁定状态;当该端口处于第二锁定状态,网络设备将端口的模式锁定为Ethernet接口。可以理解的是,该第一锁定状态,可以是指网络设备将端口的模式锁定为FlexE接口,不能进行自适应调整的状态;第二锁定状态,可以是指网络设备将端口的模式锁定为Ethernet接口,不能进行自适应调整的状态。这样,本申请实施例提供方法还可以通过配置指令,将端口模式锁定为其锁定状态对应的端口模式,实现将端口模式锁定为FlexE接口或Ethernet接口。
结合第一方面的又一些具体实施例,该方法还可以包括网络设备根据技术人员的强制配置将端口模式置为一种模式。作为一个示例,该方法还可以包括:网络设备接收第四配置指令,并按照第四配置指令将该端口的模式置为Ethernet接口。作为另一个示例,该方法还可以包括:网络设备接收第五配置指令,并按照该第五配置指令将端口的模式置为FlexE接口。这样,本申请实施例提供方法还可以通过技术人员的强制配置,将端口模式置为FlexE接口或Ethernet接口。
第二方面,本申请实施例还提供了一种端口模式自适应的装置,根据该方案,该装置包括确定单元和第一设置单元。确定单元用于确定所述网络设备上端口的状态;第一设置单元,用于若所述端口的状态满足第一条件,将所述端口的模式设置成以太网Ethernet接口;其中,所述第一条件包括:所述端口的模式为灵活以太网FlexE接口,以及,所述端口的灵活以太网层FlexE shim无链接。
结合第二方面的一些具体实施例,该第一条件还包括:端口的物理编码子层PCS上已建立链接。
结合第二方面的另一些具体实施例,该装置还包括:切换单元。该切换单元用于若所 述端口的状态满足第二条件,将所述端口的模式从所述Ethernet接口切换成所述FlexE接口;其中,所述第二条件包括:所述端口的模式为所述Ethernet接口,以及,所述端口的PCS上无链接。
结合第二方面的又一些具体实施例,该第一条件还包括:端口处于自适应状态;第二条件还包括:所述端口处于自适应状态。
结合第二方面的再一些具体实施例,该装置还包括第一接收单元和第二设置单元。第一接收单元用于接收第一配置指令;第二设置单元用于按照所述第一配置指令,将所述端口设置为自适应状态。
结合第二方面的另一些具体实施例,该装置还包括第二接收单元、第三设置单元和第一锁定单元。第二接收单元用于接收第二配置指令;第三设置单元用于按照所述第二配置指令,将所述端口设置为第一锁定状态;第一锁定单元用于当所述端口处于所述第一锁定状态,将所述端口的模式锁定为所述FlexE接口。
结合第二方面的又一些具体实施例,该装置还包括:第三接收单元、第四设置单元和第二锁定单元。第三接收单元用于接收第三配置指令;第四设置单元用于按照所述第三配置指令,将所述端口设置为第二锁定状态;第二锁定单元用于当所述端口处于所述第二锁定状态,将所述端口的模式锁定为所述Ethernet接口。
结合第二方面的另一些具体实施例,该装置还包括:第四接收单元和第一配置单元。第四接收单元用于接收第四配置指令;第一配置单元用于按照所述第四配置指令将所述端口的模式置为所述Ethernet接口。
结合第二方面的再一些具体实施例,该装置还包括:第五接收单元和第二配置单元。第五接收单元用于接收第五配置指令;第二配置单元用于按照所述第五配置指令将所述端口的模式置为所述FlexE接口。
需要说明的是,第二方面提供的装置,对应于第一方面提供的方法,故第二方面提供的装置的各种可能的实现方式以及达到的技术效果,可以参照前述第一方面提供的方法的介绍。
第三方面,本申请实施例还提供了一种网络设备,该网络设备包括存储器和处理器;其中,存储器用于存储程序代码;处理,用于运行所述程序代码中的指令,使得该网络设备执行前述中任一方法。
第四方面,本申请实施例还提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行前述中任一方法。
第五方面,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得该计算机或处理器执行前述中任一方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1为本申请实施例中所涉及的两种端口模式的对应接口的框架示意图;
图2为本申请实施例中一应用场景下网络的结构示意图;
图3为本申请实施例中一种端口模式自适应的方法的流程示意图;
图4为本申请实施例中另一种端口模式自适应的方法的流程示意图;
图5为本申请实施例中设置的3种状态机的状态迁移示意图;
图6为本申请实施例中端口模式自适应的方法的一实例的示意图;
图7为本申请实施例中端口模式自适应的方法的另一实例的示意图;
图8为本申请实施例中端口模式自适应的方法的再一实例的示意图;
图9为本申请实施例中端口模式自适应的方法的又一实例的示意图;
图10为本申请实施例中端口模式自适应的方法的另一实例的示意图;
图11为本申请实施例中端口模式自适应的方法的又一实例的示意图;
图12为本申请实施例中一种端口模式自适应的装置的结构示意图;
图13为本申请实施例中一种网络设备的结构示意图。
具体实施方式
目前,网络设备上可以支持IEEE802.3标准定义的普通以太网Ethernet接口和光互联网论坛OIF FlexE 1.0或2.0标准定义的FlexE接口。其中,该FlexE接口,是在IEEE802.3标准的基础上,扩展的支持FlexE接口通道化功能、带宽绑定功能或子速率独特功能等FlexE相关功能的一种接口类型。目前分组传送网(英文:packet transport network,简称:PTN)以及互联网协议化无线接入网(英文:Internet Protocol radio access network,简称:IP RAN)等产品线的网络设备已支持FlexE接口模式。本申请实施例中提及的网络设备,均视作支持FlexE接口模式的网络设备。对端网络设备可以是支持FlexE接口模式的网络设备或支持普通以太网接口模式的网络设备。
本申请中,网络设备可以包括一个或多个以太接口,以下实施例中,如非特别指出,均以网络设备上的某个支持FlexE的端口为例进行说明,该支持FlexE的端口可以自适应调整接口模式。在一些实施例中,其他支持FlexE的端口中的一个或多个也可以支持该自适应调整接口模式。在一些实施例中,其他支持FlexE的端口中的一个或多个也可以不支持该自适应调整接口模式。
可以理解的是,对于FlexE接口中的相关概念介绍如下:
FlexE是指承载网实现业务隔离承载和网络分片的一种接口技术,FlexE分片是基于时隙调度将一个物理以太网端口划分为多个以太网弹性硬管道,使得网络具备类似于时分复用(英文:time division multiplexing,简称:TDM)独占时隙、隔离性好的特性,又具备以太网统计复用和网络效率高的特点,实现同一分片内业务统计复用,分片之间业务互不影响,相对于通过虚拟专用网(英文:virtual private network,简称:VPN),实现的分片隔离性更好,为第五代(英文:5 th Generation,简称:5G)网络分片提供更多选择。
FlexE客户端(英文:FlexE Client),用于指示FlexE网络承载的服务客户,目前OIF FlexE 1.0或2.0标准定义为以太分组业务流,可扩展支持TDM、通用公共无线接口(英文:Common Public Radio Interface,简称:CPRI)等业务类型。
灵活以太网层(英文:FlexE shim),是指对FlexE Client进行映射或解映射的服务层,该FlexE Client通过FlexE Shim承载,FlexE Shim通过FlexE组(英文:FlexE Group)进行传送。
FlexE Group,是指一个或多个具备相同组编号的PHY组成的一个FlexE协议组,为FlexE Shim提供统一的底层服务。
图1为Ethernet接口和FlexE接口的架构示意图。参见图1,Ethernet接口包括媒体接入控制(英文:Media Access Control,简称:MAC)层和物理层(英文:physical layer,简称:PHY)。其中,MAC层包括:适配子层(英文:reconciliation sublayer,简称:RS layer)和MAC子层;PHY层包括:物理编码子层(英文:Physical Code Sublayer,简称:PCS)、物理媒体接入子层(英文:Physical Medium Attachment sublayer,简称:PMA)和物理媒体相关子层(英文:Physical Medium Dependent sublayer,简称:PMD)。参见图1,FlexE接口技术,是在Ethernet接口的PHY层和MAC层之间,插入FlexE Shim,用于实现FlexE接口相关功能。
当网络设备被部署到网络中时,需要各网络设备可以实现数据通信网(英文:data communication network,简称:DCN)自通,以确保各网络设备安装并上电之后,能够自动被网管中心识别,以便该网管中心可以对各网络设备进行管理。其中,网络设备实现DCN自通,是指该网络设备可以和相邻的网络设备自动进行DCN报文的通信。而在网络设备上同时支持Ethernet接口和FlexE接口的情况下,参见图1,由于Ethernet接口不具有FlexE shim,故,对接端口的模式分别为Ethernet接口和FlexE接口的两个网络设备,PHY层以上无法自通,所以,要使得这两个网络设备均可以自动的和其他网络设备进行通信,需要该两个网络设备进行对接的端口采用相同的模式,如两个网络设备对接的端口的模式均为Ethernet接口,或两个网络设备对接的端口的模式均为FlexE接口。
但是,随着网络中部署的网络设备的增多,无法确保各网络设备的端口模式可以自动保持一致,为了避免网络设备的端口与对接端口的模式不一致导致该网络无法正常运行的问题,往往需要技术人员对网络设备的端口模式进行逐台设置,使得各网络设备的端口与对接端口的模式均一致,以确保各网络设备自通,从而确保该网络的正常运行,如此,需要耗费大量的人力、物力以及时间成本。
举例来说,参见图2所示的网络架构示意图。该网络中包括:控制器201、网络设备202和网络设备203,其中,控制器201可以为具有网管功能的设备。控制器201通过其端口1连接网络设备202的端口2,网络设备202通过其端口3连接网络设备203的端口4。控制器201也可以是其他具有网管功能的设备,比如网管设备。
以图2所示的场景为例,介绍逐台网络设备设置其端口模式的过程。假设当前端口3和端口4的模式均为Ethernet接口,由于该网络设备202和网络设备203均可以支持FlexE接口,那么,为了可以实现FlexE接口的相关功能(如:要求该网络可以实现分组业务),需要将网络设备202和网络设备203的端口模式切换为FlexE接口,切换的过程可以包括:S11,技术人员对人工确定当前网络设备202和网络设备203对接的端口分别为端口3和端口4,以及端口3和端口4处于的模式均为Ethernet接口;S12,技术人员根据该网络的结构,确定该网络中网络设备202为上游网元、网络设备203为下游网元;S13,为了使得网络设备202和网络设备203的对接端口都切换成FlexE接口,技术人员需要在控制器201上配置先切换下游网元的端口再切换上游网元的端口的策略,该策略用于指示先切换网络设备203的端口4再切换网络设备202的端口3,这样,当NCE先指示下游网元(如图2的网络设备203)将端口4切换成FlexE接口之后,虽然下游网元(如图2的网络设 备203)因与上游网元(如图2的网络设备202)的对接端口3采用不同的模式而无法与控制器进行通信,但上游网元(如图2的网络设备202)还可以与网络中的其他设备通信,因此,控制器可以再指示上游网元(如图2的网络设备202)将端口3切换成FlexE接口;S14,控制器201通过网络设备202向网络设备203发送指令1,指示该网络设备203将端口4的模式切换为FlexE接口;S15,控制器201向网络设备202发送指令2,指示该网络设备202将端口3的模式切换为FlexE接口。如此,实现了将端口模式均为Ethernet接口的网络设备202和网络设备203的对接端口模式切换为FlexE接口,使得网络设备202和网络设备203自通。
但是,通过该对网络设备的端口模式进行逐台设置以确保网络设备的自通方式,需要人工判断当前对接的端口及端口处于的模式、人工判断网元的上下游关系以及人工配置切换端口模式的策略到网管中心,不仅会造成该网络运维工作量大的问题,而且大量的人工判断和配置等操作,导致出错概率较大,而一旦对上下游网元判断错误,错误先对上游网元下行端口的模式进行了切换,将导致下游网元无法接收到其上行端口模式切换的指令,无法实现自通。
基于此,本申请实施例提供了一种端口模式自适应的方法,网络设备可以在识别其端口的模式为FlexE接口,且该端口的FlexE shim无链接时,确定与该端口对接的端口采用的不是FlexE接口,此时,该网络设备可以自适应的将该端口的模式设置为Ethernet接口,以确保该网络设备的该端口可以和与之对接的端口采用相同的模式,从而使得这两个网络设备均可以自动的和其他网络设备进行通信,即,两个网络设备均能够实现自通,从而网管中心能够对该网络设备实现自动的识别和管理。
例如:仍以图2所示的网络为例,假设端口3的模式为FlexE接口,而端口4的模式为Ethernet接口,那么,基于本申请实施例,网络设备2可以检测端口3的状态,即端口模式为FlexE接口且该端口3无FlexE shim链接,此时,该网络设备202可以确定与该端口3对接的网络设备203上的端口4未采用FlexE接口,从而,该网络设备202可以自动将其端口3的模式设置为Ethernet接口,确保与其相邻的网络设备203之间保持相同的端口模式。
下面结合附图,通过实施例来详细说明本申请实施例中一种端口模式自适应的方法和装置的具体实现方式。
图3为本申请实施例中一种端口模式自适应的方法的流程示意图。需要说明的是,该图3所示的实施例可以应用于图2所示的网络架构中,由图2所示的网络设备202和网络设备203分别执行图3所示方法中的各步骤。可以理解的是,由于网络设备的端口模式为Ethernet接口时无FlexE shim,故,网络设备无法检测该端口的FlexE shim是否有链接,从而无法确定对接端口的模式是否为FlexE接口;但网络设备的端口模式为FlexE接口时,则可以检测其FlexE Shim是否有链接,从而可以判断出对接端口的模式是否为Ethernet接口。所以,为了可以有效的实现端口模式的自适应,本申请实施例中的网络设备,可以设置其默认的端口模式为FlexE接口,以使得其可以自动判断对接端口的模式并进行有效的端口模式的自适应切换。
具体实现时,该方法例如可以包括:
步骤301,网络设备确定该网络设备上端口A的状态。
假定网络设备包含支持FlexE的端口,比如端口A,网络设备可以检测到其端口A的状态。该端口A的状态,至少可以包括:该端口A当前处于的模式和该端口A是否在FlexE shim上有链接。端口A可以默认其模式为FlexE接口。
作为一个示例,该网络设备可以通过检测,确定该网络设备的端口A是否在FlexE shim上有链接,若有,该网络设备确定的该网络设备上端口的状态可以包括:有FlexE shim链接;若没有,该网络设备确定的该网络设备上端口的状态可以包括:无FlexE shim链接。
步骤302,若该端口的状态满足第一条件,该网络设备将该端口A的模式设置成以太网Ethernet接口;其中,该第一条件包括:端口A的模式为灵活以太网FlexE接口,以及,端口A的灵活以太网层FlexE shim无链接。
可以理解的是,第一条件中,该网络设备将该端口A的模式可以是在网络设备上预设的,用于指示网络设备的端口A进行模式自适应调整的条件之一,具体可以作为网络设备的端口从FlexE接口调整为Ethernet接口的条件。
具体实现时,若通过步骤301确定的该端口A的状态包括:有FlexE shim链接,则,可以确定与该端口A对接的端口B也包括FlexE shim,即,确定对接的端口B的模式也为FlexE接口,此时,该网络设备确定无需改变其上端口A的模式。若通过步骤301确定的该端口A的状态包括:无FlexE shim链接,则,可以确定与该端口A对接的端口B处于Ethernet接口模式,即端口B正在以Ethernet接口与端口A通信,此时,该网络设备可以自适应的将其端口A的模式设置为Ethernet接口,以便该网络设备可以实现自通。
在该端口A的模式为FlexE接口的情况下,网络设备可以通过该端口A的FlexE shim是否收到对方发送的信号的方式来确定该端口A是否有FlexE shim链接。在网络设备通过该端口A的FlexE shim收到了与端口A对接的端口B发送的信号,则网络设备可以确定该端口A有FlexE shim链接。在网络设备通过该端口A的FlexE shim收不到与端口A对接的端口B发送的信号,则网络设备可以确定该端口A无FlexE shim链接。
作为一个示例,通过步骤301确定的该端口A的状态还可以包括:该端口A是否在PCS上已建立链接,那么,第一条件还可以包括:端口A的物理编码子层PCS上已建立链接。该示例中,一种情况下,若所确定的端口A的状态包括:无FlexE shim链接和有PCS链接,则,可以确定该端口A有与之连接的网络设备,且与该端口A对接的端口B处于Ethernet接口模式,即端口B正在以Ethernet接口与端口A通信,即,确定与端口A对接的端口B的模式不是FlexE接口,此时,该网络设备可以自适应的将其端口A的模式设置为Ethernet接口。另一种情况下,若端口A的状态包括:无FlexE shim链接和无PCS链接,则,可以确定该端口A未连接到其他网络设备,此时,该网络设备可以自适应的将其端口A的模式设置为Ethernet接口,也可以不改变该端口A的模式。
网络设备可以通过确定该端口A的PCS是否收到对端发送的能力协商信号的方式来确定该端口A是否在PCS上建立了链接。在网络设备在该端口A的PCS收到与端口A对接的端口B发送的能力协商信号时,则网络设备可以确定该端口A在PCS上已与端口B建立了链接。如果网络设备该端口A的PCS没有收到对端端口发送的能力协商信号,则网络设备可以确定该端口A无PCS链接。可见,本申请实施例提供的端口模式自适应的方法,网络设备可以在确定其端口A的模式为FlexE接口,且该端口A的FlexE shim无链 接时,确定与该端口A对接的端口B采用的不是该FlexE接口,此时,该网络设备自适应的将该端口A的模式设置为Ethernet接口,以确保该网络设备的该端口A可以和与之对接的端口B采用相同的模式,从而使得该网络设备能够实现与其他设备的自通,当对端设备为网管设备时,网管设备能够对网络中的网络设备实现自动的识别和管理。
在一些具体的实现方式中,当通过步骤301确定的该端口A的状态包括:该端口A当前处于的模式、该端口A是否在FlexE shim上有链接和该端口A是否在PCS上有链接。具体实现时,如图4所示,本申请实施例具体可以包括:
步骤401,网络设备确定所述网络设备上的端口A的状态。
步骤402,若该端口A的状态满足第一条件,该网络设备将该端口A的模式设置成以太网Ethernet接口;其中,该第一条件包括:端口A的模式为FlexE接口,以及,端口A的FlexE shim无链接且该端口A的PCS上已建立链接。
步骤403,若该端口A的状态满足第二条件,该网络设备将该端口A的模式从Ethernet接口切换成FlexE接口;其中,该第二条件包括:端口A的模式为Ethernet接口,以及,端口A的PCS上未建立链接。
其中,步骤401~步骤402的具体的实现方式和达到的效果,可以参见上述图3所示实施例中对步骤301~步骤302的相关描述。
可以理解的是,第二条件中,端口A的模式可以是在网络设备上预设的,用于指示网络设备的端口进行模式自适应调整的条件之一,具体可以作为网络设备的端口从Ethernet接口调整为FlexE接口的条件。
具体实现时,当网络设备通过步骤401~步骤402,将其上端口A的模式设置为Ethernet接口后,该网络设备还可以判断该端口A的状态是否满足第二条件。一种情况下,若端口A的状态包括:无PCS链接,则,可以确定通过该端口A未连接到其他网络设备,此时,该网络设备可以自适应的将其端口A模式切换回默认的端口模式,即,FlexE接口。
可见,本申请实施例提供的端口模式自适应的方法,网络设备可以在识别其端口A的模式为FlexE接口,该端口A在PCS上有链接且在FlexE shim上无链接时,确定与该端口A对接的端口B采用的不是该FlexE接口,此时,该网络设备自适应的将该端口A的模式设置为Ethernet接口。当该网络设备的端口模式为Ethernet接口,检测到该端口A在PCS上的链接无存在时,确定未通过该端口A链接到其他网络设备,将该端口A的模式自动切换回默认模式——FlexE接口。如此,可以灵活的自适应调整网络设备的端口模式,确保该网络设备的端口A可以和与之对接的端口B采用相同的模式,从而使得该网络设备能够实现与其他网络设备的自通,当对端设备为网管设备时,网管设备能够对网络中的网络设备实现自动的识别和管理。
在又一些具体的实现方式中,本申请实施例中还可以通过配置,将网络设备的端口A设置为:自适应状态、第一锁定状态和第二锁定状态。其中,端口A的自适应状态,是指网络设备可以对该端口A的模式进行自适应调整的状态;第一锁定状态,是指网络设备将端口A的模式锁定为FlexE接口,不能进行自适应调整的状态;第二锁定状态,是指网络设备将端口A的模式锁定为Ethernet接口,不能进行自适应调整的状态。三种状态之间可 以通过配置指令转换。
上述图3以及图4所示的实施例中,网络设备确定的端口A的状态,还可以包括该端口A是否处于自适应状态。第一条件还包括:该端口A处于自适应状态;第二条件还包括:所述端口A处于自适应状态。即,上述图3和图4所示的实施例,均是在该网络设备的端口A处于自适应状态时,进行端口模式的自适应调整的过程。
具体实现时,网络设备可以按照所接收到的配置指令,设置其上端口A为自适应状态、第一锁定状态和第二锁定状态中的一种。作为一个示例,本申请实施例还可以包括:S21,网络设备接收第一配置指令;S22,该网络设备按照该第一配置指令,将端口A设置为自适应状态。此时,即可进行图3或图4的过程,进行端口模式的自适应调整。作为另一个示例,本申请实施例还可以包括:S31,网络设备接收第二配置指令;S32,网络设备按照该第二配置指令,将该端口A设置为第一锁定状态;S33,当该端口A处于第一锁定状态,该网络设备将该端口A的模式锁定为FlexE接口。此时,该网络设备无法执行图3或图4的过程,进行端口模式的自适应调整。作为再一个示例,本申请实施例还可以包括:S41,网络设备接收第三配置指令;S42,网络设备按照该第三配置指令,将该端口A设置为第二锁定状态;S43,当该端口A处于第二锁定状态,该网络设备将该端口A的模式锁定为Ethernet接口。同理,此时的该网络设备无法执行图3或图4的过程,进行端口模式的自适应调整。
其中,第一配置指令、第二配置指令和第三配置指令,可以是技术人员直接在该网络设备上通过命令行等方式配置的,也可以是其他设备,比如网管设备,发送给该网络设备上的指令;该指令用于指示该网络设备将其端口A设置为自适应状态、第一锁定状态和第二锁定状态三者中的一种状态。
此外,本申请实施例还可以包括根据技术人员通过命令行等方式在网络设备上设置的配置指令,对端口A的模式进行切换。作为一个示例,本申请实施例还可以包括:S51,网络设备接收第四配置指令;S52,该网络设备按照第四配置指令将端口A的模式置为Ethernet接口。同理,作为另一个示例,本申请实施例还可以包括:S61,网络设备接收第五配置指令;S62,该网络设备按照第五配置指令将端口A的模式置为FlexE接口。
其中,第四配置指令和第五配置指令,可以是技术人员直接在该网络设备上通过命令行或其他方式配置的,也可以是其他设备,比如网管设备,发送给该网络设备上的;该指令用于指示该网络设备将其端口A强制配置到某一种端口模式。
举例来说:如图5所示,可以为端口A的模式的自适应过程设置3种状态机,分别为:FlexE接口自适应状态(下称状态1)、FlexE接口自适应状态(下称状态2)和Ethernet接口状态(下称状态3)。每种状态机上配置配置状态和转发状态,其中,配置状态为技术人员设置的状态,若端口A的配置状态为FlexE,则,该网络设备可以通过上述图3或图4对应实施例对端口A的模式进行自适应并确定端口A的转发状态,此时,转发状态为FlexE表示该端口A的模式为FlexE接口,转发状态为Ethernet表示该端口A的模式为Ethernet接口;若端口A的配置状态为Ethernet,则,端口A的转发状态可以被锁定成Ethernet,即该网络设备的端口A的模式将被强制设定为Ethernet接口,无法通过上述图3或图4对应实施例对端口A的模式进行自适应。
其中,状态1也记作端口A的初始状态或默认状态,是指网络设备上电后端口A为默 认处于的状态。该状态1对应的配置状态和转发状态,均默认为FlexE,端口A处于状态1时可以基于FlexE接口模式与对接的FlexE接口模式的端口实现互通和配置分组业务。
在端口A处于状态1的情况下,当网络设备检测到PCS上已建立链路且FlexE shim无链接,网络设备将端口A的模式自适应调整为Ethernet接口,此时端口A的状态切换成状态2。该状态2对应的配置状态为FlexE、转发状态为Ethernet,端口A处于状态2时可以基于Ethernet接口模式与对接的Ethernet接口模式的端口实现互通和配置分组业务。
状态3可以是指普通Ethernet接口模式,技术人员可以在端口A处于状态1或状态2时,通过第四配置指令手动将配置状态切换至Ethernet,此时,转发状态被锁定为Ethernet。
此外,技术人员也可以在端口A处于状态3时,通过第五配置指令手动将配置状态和转发状态均切换至FlexE,从而使得端口A切换成状态1。需要说明的是,在端口A处于状态3时,网络设备不支持按照图3或图4所示的实施例对端口A的模式进行自适应。
作为一个实例,对于上述3种状态机,其状态转移过程可以参见下表:
Figure PCTCN2020101624-appb-000001
其中,当网络设备安装并上电后,该网络设备的某个端口,比如端口A,从无状态迁移到状态1。
对于源状态为状态1,第一种情况,当网络设备上端口A的PCS未建立链接,或者,PCS和FlexE shim建立链接的时间超过预设时间(如:5秒),则,该端口A保持状态1。第二种情况,当网络设备基于S31~S33,将其上端口A设置为第一锁定状态,则,该端口 A锁定为FlexE接口,不再检测各层是否有链接,即,不再关注与该端口A对接的端口B的模式。第三种情况,当网络设备上端口A的PCS已建立链接,但FlexE shim无链接,则,确定与该端口A对接的端口B的模式为Ethernet接口,那么,网络设备可以基于步骤301~步骤302(或步骤401~步骤402),将该端口A的转发状态设置为Ethernet,切换到状态2。第四种情况,当网络设备基于S41~S43,将其上端口A锁定为第二锁定状态,其模式被强制切换为Ethernet接口(即,切换转发状态为Ethernet),则,该端口A处于状态2,不再检测各层是否有链接,即,不再关注与该端口A对接的端口B的模式。第五种情况,当网络设备基于S51和S52,将其上端口A强制切换到状态3。
对于源状态为状态2,第一种情况,当网络设备上端口A的PCS未建立链接的时间超过预设时间(如:3秒),则,视作与该端口A对接的端口B中断,例如:发生断纤等情况,那么,网络设备可以基于步骤403,将该端口A的转发状态恢复设置为FlexE,即,切换回状态1。第二种情况,当网络设备基于S31~S33,将其上端口A设置为第一锁定状态,其模式被强制切换为FlexE接口,则,该端口A处于状态1,不再检测各层是否有链接,即,不再关注与该端口A对接的端口B的模式。第三种情况,当网络设备基于S41~S43,将其上端口A设置为第二锁定状态,则,该端口A锁定为Ethernet接口,不再检测PCS或FlexE shim层是否有链接,即,不再关注与该端口A对接的端口B的模式。第四种情况,当网络设备基于S51和S52,将其上端口A强制配置到状态3,该情况下,需要该网络设备上端口A的FlexE接口未配置分组业务。
对于源状态为状态3,网络设备可以基于S61和S62,将其上端口A强制配置到状态1,该强制配置的前提为:该网络设备上端口A的Ethernet接口未配置分组业务。
可见,网络设备上通过设置上述3种状态机,可以实现端口A模式的自适应,确保该网络设备的端口A可以和与之对接的端口B采用相同的模式,从而使得该网络设备能够实现与其他网络设备的自通,当对端设备为网管设备时,网管设备能够对网络中的网络设备实现自动的识别和管理。
为了使得本申请实施例提供的端口模式的自适应方法更加清楚,下面结合附图,以直连的网络设备1和网络设备2之间进行端口模式自适应调整过程为例,对本申请实施例对应的一些实例进行介绍。
参见图6,若当前网络设备1和网络设备2的端口均为自适应状态,且均为默认的状态1,那么,网络设备1和2均检测到预设时间内PCS已建立链接,且FlexE shim也建立链接,那么,网络设备1和网络设备2进行端口模式自适应后,相互对接的端口的状态均保持状态1,即,配置状态和转发状态均为FlexE。
参见图7,若当前网络设备1的端口处于自适应状态和状态1,网络设备2的端口处于状态3,那么,网络设备1根据步骤301~步骤302,将其端口转发状态设置为Ethernet,即,该网络设备1的端口设置为状态2。
参见图8,若当前网络设备1端口处于第一锁定状态,网络设备2的端口处于状态1,那么,网络设备2可以检测到预设时间内PCS已建立链接,且FlexE shim也建立链接,那么,网络设备2进行端口模式自适应后,其端口保持状态1,即,配置状态和转发状态均为FlexE。
参见图9,若当前网络设备1的端口处于第一锁定状态,网络设备2的端口处于状态3,那么,网络设备1和网络设备2均无需检测和关注对方端口的模式,因为该场景下,网络设备1和网络设备2均无法实现端口模式的自适应。
参见图10,若当前网络设备1的端口处于状态3,网络设备2的端口处于状态1,那么,网络设备2可以检测到预设时间内PCS已建立链接,但FlexE shim未建立链接,那么,网络设备2进行端口模式自适应后,将其端口模式切换到Ethernet接口,从而使得网络设备的端口被切换成状态2,即配置状态为FlexE,转发状态为Ethernet。
参见图11,若当前网络设备1和网络设备2的端口均处于状态3,那么,网络设备1和网络设备2无法也无需进行端口模式的自适应,从而,该网络设备1和网络设备2即可通过其对接端口模式为Ethernet接口的端口进行通信。
需要说明的是,上述实例,仅是在某些场景下对本申请实施例提供的端口模式的自适应方法的说明,本申请实施例适用于包括但不限定上述场景。
图12为本申请实施例提供的一种端口模式自适应的装置1200的结构示意图,该装置1200包括确定单元1201和第一设置单元1202。其中,确定单元1201用于确定所述网络设备上端口的状态;第一设置单元1202,用于若所述端口的状态满足第一条件,将所述端口的模式设置成以太网Ethernet接口;其中,所述第一条件包括:所述端口的模式为灵活以太网FlexE接口,以及,所述端口的灵活以太网层FlexE shim无链接。
在一些实施例中,该第一条件还包括:端口的物理编码子层PCS上已建立链接。
在另一些实施例中,该装置1200还包括:切换单元。该切换单元用于若所述端口的状态满足第二条件,将所述端口的模式从所述Ethernet接口切换成所述FlexE接口;其中,所述第二条件包括:所述端口的模式为所述Ethernet接口,以及,所述端口的PCS上无链接。
在又一些实施例中,该第一条件还包括:端口处于自适应状态;第二条件还包括:所述端口处于自适应状态。
在再一些实施例中,该装置1200还包括第一接收单元和第二设置单元。第一接收单元用于接收第一配置指令;第二设置单元用于按照所述第一配置指令,将所述端口设置为自适应状态。
在另一些实施例中,该装置1200还包括第二接收单元、第三设置单元和第一锁定单元。第二接收单元用于接收第二配置指令;第三设置单元用于按照所述第二配置指令,将所述端口设置为第一锁定状态;第一锁定单元用于当所述端口处于所述第一锁定状态,将所述端口的模式锁定为所述FlexE接口。
在又一些实施例中,该装置1200还包括:第三接收单元、第四设置单元和第二锁定单元。第三接收单元用于接收第三配置指令;第四设置单元用于按照所述第三配置指令,将所述端口设置为第二锁定状态;第二锁定单元用于当所述端口处于所述第二锁定状态,将所述端口的模式锁定为所述Ethernet接口。
在另一些实施例中,该装置1200还包括:第四接收单元和第一配置单元。第四接收单元用于接收第四配置指令;第一配置单元用于按照所述第四配置指令将所述端口的模式置为所述Ethernet接口。
在再一些实施例中,该装置1200还包括:第五接收单元和第二配置单元。第五接收单元用于接收第五配置指令;第二配置单元用于按照所述第五配置指令将所述端口的模式置为所述FlexE接口。
可以理解的是,图12所示的装置1200的各种具体实施例方式,可以参见图3及图4所示的实施例的介绍,本实施例不再赘述。
此外,本申请实施例还提供了一种网络设备,如图13所示,该网络设备1300包括存储器1301和处理器1302;其中,存储器1301用于存储程序代码;处理1302,用于运行所述程序代码中的指令,使得该网络设备1300执行前述图3及图4所示的方法中任意一种实现方式所述的端口模式自适应的方法。
此外,本申请实施例还提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行前述图3及图4所示的方法中任意一种实现方式所述的端口模式自适应的方法。
此外,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得该计算机或处理器执行前述图3及图4所示的方法中任意一种实现方式所述的端口模式自适应的方法。
本申请实施例中提到的“第一配置指令”、“第一条件”等名称中的“第一”只是用来做名字标识,并不代表顺序上的第一。该规则同样适用于“第二”等。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到上述实施例方法中的全部或部分步骤可借助软件加通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如只读存储器(英文:read-only memory,ROM)/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者诸如路由器等网络通信设备)执行本申请各个实施例或者实施例的某些部分所述的方法。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例和设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及装置实施例仅仅是示意性的,其中作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种端口模式自适应的方法,其特征在于,包括:
    网络设备确定所述网络设备上端口的状态;
    若所述端口的状态满足第一条件,所述网络设备将所述端口的模式设置成以太网Ethernet接口;
    其中,所述第一条件包括:所述端口的模式为灵活以太网FlexE接口,以及,所述端口的灵活以太网层FlexE shim无链接。
  2. 根据权利要求1所述的方法,其特征在于,所述第一条件还包括:所述端口的物理编码子层PCS上已建立链接。
  3. 根据权利要求2所述的方法,其特征在于,还包括:
    若所述端口的状态满足第二条件,所述网络设备将所述端口的模式从所述Ethernet接口切换成所述FlexE接口;
    其中,所述第二条件包括:所述端口的模式为所述Ethernet接口,以及,所述端口的PCS上无链接。
  4. 根据权利要求3所述的方法,其特征在于,所述第一条件还包括:所述端口处于自适应状态;所述第二条件还包括:所述端口处于所述自适应状态。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    所述网络设备接收第一配置指令;
    所述网络设备按照所述第一配置指令,将所述端口设置为自适应状态。
  6. 根据权利要求4或5所述的方法,其特征在于,还包括:
    所述网络设备接收第二配置指令;
    所述网络设备按照所述第二配置指令,将所述端口设置为第一锁定状态;
    当所述端口处于所述第一锁定状态,所述网络设备将所述端口的模式锁定为所述FlexE接口。
  7. 根据权利要求4至6任意一项所述的方法,其特征在于,还包括:
    所述网络设备接收第三配置指令;
    所述网络设备按照所述第三配置指令,将所述端口设置为第二锁定状态;
    当所述端口处于所述第二锁定状态,所述网络设备将所述端口的模式锁定为所述Ethernet接口。
  8. 根据权利要求1至7任意一项所述的方法,其特征在于,还包括:
    所述网络设备接收第四配置指令;
    所述网络设备按照所述第四配置指令将所述端口的模式置为所述Ethernet接口。
  9. 根据权利要求1至8任意一项所述的方法,其特征在于,还包括:
    所述网络设备接收第五配置指令;
    所述网络设备按照所述第五配置指令将所述端口的模式置为所述FlexE接口。
  10. 一种端口模式自适应的装置,其特征在于,用于:
    确定所述网络设备上端口的状态;
    若所述端口的状态满足第一条件,将所述端口的模式设置成以太网Ethernet接口;
    其中,所述第一条件包括:所述端口的模式为灵活以太网FlexE接口,以及,所述端 口的灵活以太网层FlexE shim无链接。
  11. 根据权利要求10所述的装置,其特征在于,所述第一条件还包括:所述端口的物理编码子层PCS上已建立链接。
  12. 根据权利要求11所述的装置,其特征在于,还用于:
    若所述端口的状态满足第二条件,将所述端口的模式从所述Ethernet接口切换成所述FlexE接口;
    其中,所述第二条件包括:所述端口的模式为所述Ethernet接口,以及,所述端口的PCS上无链接。
  13. 根据权利要求12所述的装置,其特征在于,所述第一条件还包括:所述端口处于自适应状态;所述第二条件还包括:所述端口处于所述自适应状态。
  14. 根据权利要求13所述的装置,其特征在于,还用于:
    接收第一配置指令;
    按照所述第一配置指令,将所述端口设置为自适应状态。
  15. 根据权利要求13或14所述的装置,其特征在于,还用于:
    接收第二配置指令;
    按照所述第二配置指令,将所述端口设置为第一锁定状态;
    当所述端口处于所述第一锁定状态,将所述端口的模式锁定为所述FlexE接口。
  16. 根据权利要求13至15任意一项所述的装置,其特征在于,还用于:
    接收第三配置指令;
    按照所述第三配置指令,将所述端口设置为第二锁定状态;
    当所述端口处于所述第二锁定状态,将所述端口的模式锁定为所述Ethernet接口。
  17. 根据权利要求10至16任意一项所述的装置,其特征在于,还用于:
    接收第四配置指令;
    按照所述第四配置指令将所述端口的模式置为所述Ethernet接口。
  18. 根据权利要求10至17任意一项所述的装置,其特征在于,还用于:
    接收第五配置指令;
    按照所述第五配置指令将所述端口的模式置为所述FlexE接口。
  19. 一种网络设备,其特征在于,所述网络设备包括存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,用于运行所述程序代码中的指令,使得所述网络设备执行以上权利要求1~9任一项所述的端口模式自适应的方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上权利要求1~9任一项所述的端口模式自适应的方法。
PCT/CN2020/101624 2019-07-12 2020-07-13 一种端口模式自适应的方法及装置 WO2021008484A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
MX2021014520A MX2021014520A (es) 2019-07-12 2020-07-13 Metodo y aparato de adaptacion de modo de puerto.
EP20840310.5A EP3902203B1 (en) 2019-07-12 2020-07-13 Port mode self-adaptive method and apparatus
US17/474,678 US11855764B2 (en) 2019-07-12 2021-09-14 Port mode adaptation method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910631755.4A CN112217661B (zh) 2019-07-12 2019-07-12 一种端口模式自适应的方法及装置
CN201910631755.4 2019-07-12

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/474,678 Continuation US11855764B2 (en) 2019-07-12 2021-09-14 Port mode adaptation method and apparatus

Publications (1)

Publication Number Publication Date
WO2021008484A1 true WO2021008484A1 (zh) 2021-01-21

Family

ID=74047217

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/101624 WO2021008484A1 (zh) 2019-07-12 2020-07-13 一种端口模式自适应的方法及装置

Country Status (5)

Country Link
US (1) US11855764B2 (zh)
EP (1) EP3902203B1 (zh)
CN (1) CN112217661B (zh)
MX (1) MX2021014520A (zh)
WO (1) WO2021008484A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115733780B (zh) * 2022-11-28 2023-05-12 中国电力科学研究院有限公司 基于柔性以太网的动态自适应方法、系统、设备及介质
CN117349217A (zh) * 2023-09-28 2024-01-05 无锡芯光互连技术研究院有限公司 Pcie扩展设备及子卡自适应选择方法、扩展系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350823A (zh) * 2008-08-21 2009-01-21 中兴通讯股份有限公司 以太网端口链路连接的协商方法及装置
CN103222251A (zh) * 2012-11-29 2013-07-24 华为技术有限公司 一种以太端口自协商的方法及通信设备
US20180013511A1 (en) * 2016-07-07 2018-01-11 Infinera Corp. Flexe gmpls signaling extensions
CN109302372A (zh) * 2017-07-24 2019-02-01 华为技术有限公司 一种通信方法、设备及存储介质
CN109672513A (zh) * 2017-10-16 2019-04-23 华为技术有限公司 传输路径配置方法、装置及设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9571610B2 (en) * 2013-03-15 2017-02-14 International Business Machines Corporation Dynamic port type detection
WO2019119388A1 (en) * 2017-12-22 2019-06-27 Telefonaktiebolaget Lm Ericsson (Publ) Methods and apparatus for configuring a flex ethernet node
CN110875862B (zh) * 2018-08-31 2022-07-19 中兴通讯股份有限公司 一种报文传输方法及装置、计算机存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350823A (zh) * 2008-08-21 2009-01-21 中兴通讯股份有限公司 以太网端口链路连接的协商方法及装置
CN103222251A (zh) * 2012-11-29 2013-07-24 华为技术有限公司 一种以太端口自协商的方法及通信设备
US20180013511A1 (en) * 2016-07-07 2018-01-11 Infinera Corp. Flexe gmpls signaling extensions
CN109302372A (zh) * 2017-07-24 2019-02-01 华为技术有限公司 一种通信方法、设备及存储介质
CN109672513A (zh) * 2017-10-16 2019-04-23 华为技术有限公司 传输路径配置方法、装置及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3902203A4

Also Published As

Publication number Publication date
CN112217661B (zh) 2024-02-02
MX2021014520A (es) 2022-01-06
EP3902203A1 (en) 2021-10-27
US20210409236A1 (en) 2021-12-30
CN112217661A (zh) 2021-01-12
EP3902203A4 (en) 2022-04-20
US11855764B2 (en) 2023-12-26
EP3902203B1 (en) 2023-11-22

Similar Documents

Publication Publication Date Title
JP4918138B2 (ja) 通信ネットワーク要素を自動的に構成する手法
US9705735B2 (en) System and method using RSVP hello suppression for graceful restart capable neighbors
US8638692B2 (en) System and method for end-to-end automatic configuration of network elements using a link-level protocol
EP1665652B1 (en) Virtual switch for providing a single point of management
US7499395B2 (en) BFD rate-limiting and automatic session activation
US20050222815A1 (en) System and method for testing and certifying products
US11362935B2 (en) Automatic multi-chassis link aggregation configuration with link layer discovery
WO2015101153A1 (zh) 一种sdn控制器、数据中心系统和路由连接方法
US20080253280A1 (en) Redundant Wireless Base Station
WO2021008484A1 (zh) 一种端口模式自适应的方法及装置
EP1868322B1 (en) A method for implementing network protection combining the network element double-adscription and the ringnet protection
US8520509B2 (en) System and a method for routing data traffic
EP2451207A1 (en) Method for bandwidth information notification, method for service processing, network node and communication system
EP2677702A2 (en) A method and apparatus for load balance
WO2021042674A1 (zh) 一种端口状态的配置方法及网络设备
US20090245102A1 (en) Network backup system and method
EP2547041B1 (en) Multicast implementation method, access layer equipment and system under ring network architecture
CN108337162B (zh) 一种支持双归属保护的系统及方法
US8098688B1 (en) Methods and apparatus for optimizing network management traffic using dynamic SNMP packet resizing
US20220294734A1 (en) Method for Configuring Media Access Control Address Aging Time and Apparatus
CN112995004B (zh) 接口协商方法、处理器、网络设备和网络系统
Cisco DSC_REDUNDANCY through ENT_API
US11245644B2 (en) Automatic multi-chassis link aggregation configuration
CN110995581A (zh) 一种防止路由黑洞的方法、装置、电子设备及存储介质
WO2005106732A1 (en) System and method for testing and certifying products

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20840310

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020840310

Country of ref document: EP

Effective date: 20210721

NENP Non-entry into the national phase

Ref country code: DE