A network device negotiation method, apparatus, and related device
By automatically switching network modes and increasing the waiting time, the problem of link failure caused by inconsistent modes during network device negotiation was solved, thus improving the negotiation success rate and data transmission stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING HUAWEI DIGITAL TECH
- Filing Date
- 2021-12-25
- Publication Date
- 2026-08-04
AI Technical Summary
During the negotiation process, network devices may fail to establish links due to inconsistencies in network modes. Existing technologies struggle to efficiently negotiate Ethernet and FlexE modes, impacting data transmission.
By automatically switching network modes, including FlexE's padding enabled and disabled modes as well as Eth mode, until successful negotiation with the peer network device is achieved, and by increasing the waiting time after multiple negotiation failures, network mode mismatch is prevented.
It increases the probability of successful negotiation between network devices and peer devices, prevents data loss caused by link interruptions, and ensures the stability of data transmission.
Smart Images

Figure CN116346599B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communications, and more particularly to a network device negotiation method, apparatus, and related equipment. Background Technology
[0002] Network devices distribute code blocks across multiple PCS channels at the Physical Coding Sublayer (PCS), and the peer network device's PCS then reconstructs the code blocks. The network device's PCS also inserts alignment markers (AMs) into each channel to prevent code block corruption at the receiving end due to time delays in some PCS channels. However, the frequency of AM insertion in 100G Flexible Ethernet (FlexE) differs from that in 50G, 200G, and 400G FlexE. To compensate for the difference in AM insertion frequency across different FlexE rates, some network devices supporting FlexE also insert pads (i.e., padding enabled) into the code block stream.
[0003] Therefore, in addition to traditional Ethernet mode and FlexE mode, network modes can also be divided into padding-enabled mode and padding-disabled mode. Before establishing a connection with a peer network device, the network mode needs to be negotiated; if the network modes are different, a connection cannot be established.
[0004] Therefore, improving the negotiation efficiency between network devices and peer network devices is an urgent problem to be solved. Summary of the Invention
[0005] This application provides a network device negotiation method, apparatus, and related equipment, which automatically switches between different network modes until successful negotiation with the peer network device, enabling the network device to adapt to peer devices in different network modes.
[0006] In a first aspect, a network device negotiation method is provided, comprising: obtaining the network mode of a first network device; and negotiating with a second network device according to the network mode, wherein the network mode includes Ethernet (Eth) mode, Flexible Ethernet (FlexE) padding enabled mode, and FlexE padding disabled mode, wherein FlexE padding enabled means using FlexE technology and inserting padding blocks after a preset number of code blocks, and FlexE padding disabled means using FlexE technology but not inserting padding blocks in the code blocks.
[0007] In the above scheme, network devices can switch their own network modes to adapt to the network modes of peer network devices. This allows network devices to adapt to peer devices with different network modes, increasing the probability of successful link connection.
[0008] In conjunction with the first aspect, in some implementations, when the network mode is FlexE padding enabled mode or FlexE padding disabled mode, negotiation is conducted with the second network device according to the network mode, including: entering the FlexE negotiation state and waiting according to the network mode, wherein the duration of the FlexE negotiation state is equal to a preset duration T0, the FlexE negotiation state is used for the first network device to negotiate with the second network device using FlexE padding enabled mode and FlexE padding disabled mode, and T0 is a positive number; if the negotiation is successful, the device enters the FlexE waiting state from the FlexE negotiation state, the FlexE waiting state is used to confirm whether the link with the second network device is in a connected state.
[0009] In the above scheme, the network device will negotiate with the peer network device using both FlexE's padding enabled mode and FlexE's padding disabled mode. The maximum waiting time for negotiation in FlexE's padding enabled mode is T6, and the maximum waiting time for negotiation in FlexE's padding disabled mode is T7. After either FlexE mode negotiation is successful, the network device will wait for a period of time to ensure that the link remains stable during this period, preventing data loss due to link interruptions.
[0010] In conjunction with the first aspect, in some implementations, if the negotiation fails, the system transitions from the FlexE negotiation state to the Eth negotiation state. The Eth negotiation state is used by the first network device to negotiate with the second network device using the Eth mode.
[0011] In the above scheme, after the network device fails to negotiate with the peer network device using FlexE's padding enabled mode and FlexE's padding disabled mode respectively, it switches to Eth mode to negotiate with the peer network device. This can adapt to the possible network modes of the peer network device as much as possible and improve the probability of successful link connection.
[0012] In conjunction with the first aspect, in some implementations, if the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number, the system waits for a preset duration T1, where T1 is a positive number; after waiting for T1, the system then enters the FlexE negotiation state.
[0013] In the above scheme, if the network device fails to negotiate after multiple attempts to switch network modes, it will wait for a period of time before switching network modes again to attempt negotiation. This prevents situations where the other end is also switching network modes, resulting in both sides having the same network modes being consistently misaligned.
[0014] In conjunction with the first aspect, in some implementations, during the preset duration T2 of the FlexE waiting state, the link between the device and the second network device remains connected, and data communication with the second network device is performed, where T2 is a positive number.
[0015] In the above scheme, after successful negotiation between network devices, if the link can maintain a stable connection for a period of time, data transmission can be carried out with the peer network device. This prevents data loss caused by a brief link failure after successful negotiation.
[0016] In conjunction with the first aspect, in some implementations, when the network mode is Eth mode, negotiation is performed with the second network device according to the network mode, including: entering the Eth negotiation state and waiting according to the network mode, wherein the duration of the Eth negotiation state is equal to a preset duration T3, where T3 is a positive number; if the negotiation is successful, the process moves from the Eth negotiation state to the Eth waiting state, which is used to confirm whether the link connection between the first network device and the second network device is stable.
[0017] In the above scheme, the network device can first attempt to negotiate with the peer network device in Eth mode. After successful negotiation, it enters a waiting period. If the link can maintain a stable connection for a period of time, data transmission with the peer network device can then commence. This prevents data loss caused by a brief link failure after successful negotiation.
[0018] In conjunction with the first aspect, in some implementations, if negotiation fails, the process transitions from the Eth negotiation state to the FlexE negotiation state.
[0019] In the above scheme, the network device first attempts to negotiate with the peer network device in Eth mode. If the negotiation fails, it then switches to FlexE-related mode for negotiation. This approach can adapt to the possible network modes of the peer network device as much as possible, thereby increasing the probability of successful link connection.
[0020] In conjunction with the first aspect, in some implementations, if the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number, the system waits for a preset duration T1; after waiting for the preset duration T1, it then enters the FlexE negotiation state.
[0021] In the above scheme, if the network device fails to negotiate after multiple attempts to switch network modes, it will wait for a period of time before switching network modes again to attempt negotiation. This prevents situations where the other end is also switching network modes, resulting in both sides having the same network modes being consistently misaligned.
[0022] In conjunction with the first aspect, in some implementations, data communication with the second network device occurs while the link between the two devices remains connected during the Eth waiting state.
[0023] In the above scheme, after successful negotiation between network devices, if the link can maintain a stable connection for a period of time, data transmission can be carried out with the peer network device. This prevents data loss caused by a brief link failure after successful negotiation.
[0024] Secondly, this application provides a network device negotiation apparatus, including an acquisition unit and a negotiation unit: the acquisition unit is used to acquire the network mode of a first network device; the negotiation unit is used to negotiate with a second network device according to the network mode, wherein the network mode includes Ethernet Eth mode, Flexible Ethernet FlexE padding enabled mode and FlexE padding disabled mode, wherein FlexE padding enabled means using FlexE technology and inserting padding blocks after a preset number of code blocks, and FlexE padding disabled means using FlexE technology but not inserting padding blocks in the code blocks.
[0025] In conjunction with the second aspect, in some implementations, the device further includes a processing unit. When the network mode is FlexE padding enabled mode or FlexE padding disabled mode, the processing unit is used to enter the FlexE negotiation state and wait according to the network mode. The duration of the FlexE negotiation state is equal to a preset duration T0. The FlexE negotiation state is used for the first network device to negotiate with the second network device using FlexE padding enabled mode and FlexE padding disabled mode, and T0 is a positive number. If the negotiation is successful, the processing unit is used to enter the FlexE waiting state from the FlexE negotiation state and confirm whether the link with the second network device is in a connected state.
[0026] In conjunction with the second aspect, in some implementations, the processing unit is also used to transition from the FlexE negotiation state to the Eth negotiation state when the negotiation fails. The Eth negotiation state is used by the first network device to negotiate with the second network device using the Eth mode.
[0027] In conjunction with the second aspect, in some implementations, the processing unit is also used to wait for a preset duration T1, where T1 is a positive number, when the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number; the processing unit is also used to wait for the preset duration T1 before entering the FlexE negotiation state.
[0028] In conjunction with the second aspect, in some implementations, the processing unit maintains a connection with the second network device throughout the preset duration T2 of the FlexE waiting state, and performs data communication with the second network device, where T2 is a positive number.
[0029] In conjunction with the second aspect, in some implementations, the processing unit is also used to enter the Eth negotiation state and wait when the network mode is Eth mode, wherein the duration of the Eth negotiation state is equal to a preset duration T3, and T3 is a positive number; the processing unit is also used to enter the Eth waiting state from the Eth negotiation state when the negotiation is successful, and the Eth waiting state is used to confirm whether the link connection between the first network device and the second network device is stable.
[0030] In conjunction with the second aspect, in some implementations, the processing unit is also used to transition from the Eth negotiation state to the FlexE negotiation state if the negotiation fails.
[0031] In conjunction with the second aspect, in some implementations, the processing unit is also used to wait for a preset duration T1 when the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number; the processing unit is also used to wait for the preset duration T1 before entering the FlexE negotiation state.
[0032] In conjunction with the second aspect, in some implementations, the processing unit is also used to perform data communication with the second network device while the link between the two devices remains connected during the Eth waiting state.
[0033] Thirdly, this application provides a computing device, characterized in that it includes a processor and a memory, the memory being used to store instructions, and the processor being used to execute the instructions, wherein when the processor executes the instructions, it performs the method as described in the first aspect.
[0034] Fourthly, this application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores instructions that, when executed on a computing device, perform the method described in the first aspect.
[0035] Fifthly, this application provides a computer program product, characterized in that the computer program product includes computer instructions, which, when executed by a computing device, cause the computing device to perform the method described in the first aspect.
[0036] In summary, the network device negotiation method, apparatus, and related equipment provided in this application can automatically switch between different network modes until a successful negotiation with the peer network device is achieved, enabling the network device to adapt to peer devices with different network modes. Furthermore, the waiting time varies when attempting each network mode, and the waiting time is increased after multiple negotiation failures. This prevents the peer network device from also switching network modes, thus avoiding situations where the same network modes on both ends are consistently misaligned, thereby increasing the probability of successful negotiation. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below.
[0038] Figure 1 This is a schematic diagram of a PTN network application scenario provided in an embodiment of this application;
[0039] Figure 2 This is a schematic diagram of a DCN system structure provided in an embodiment of this application;
[0040] Figure 3 This is a schematic diagram of a physical layer architecture provided in an embodiment of this application;
[0041] Figure 4 This is a schematic diagram of a code block distribution process provided in an embodiment of this application;
[0042] Figure 5 This is a schematic diagram of a code block recovery process provided in an embodiment of this application;
[0043] Figure 6 This is a schematic diagram illustrating a situation where errors occur during code block recovery, as provided in an embodiment of this application.
[0044] Figure 7 This is a schematic diagram of inserting the word AM according to an embodiment of this application;
[0045] Figure 8 This is a schematic diagram of a pad insertion method provided in an embodiment of this application;
[0046] Figure 9 This is a schematic diagram of a network mode state transition provided in an embodiment of this application;
[0047] Figure 10 This is a flowchart illustrating a network device negotiation method provided in an embodiment of this application;
[0048] Figure 11 This is a schematic diagram of state transition for another network mode provided in an embodiment of this application;
[0049] Figure 12This is a flowchart illustrating another network device negotiation method provided in an embodiment of this application;
[0050] Figure 13 This is a flowchart illustrating a first network device negotiation method provided in an embodiment of this application;
[0051] Figure 14 This is a schematic diagram of the structure of a network device negotiation device provided in an embodiment of this application;
[0052] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0053] First, a brief introduction to the application scenarios of the embodiments of this application will be given.
[0054] See Figure 1 , Figure 1 This is a schematic diagram illustrating one application scenario covered in this application. For example... Figure 1 As shown, the application scenario of this application can be a Packet Transport Network (PTN) scenario, which can include an access layer, an aggregation layer, and a core layer.
[0055] The core layer is the high-speed switching backbone of the network, playing a crucial role in the connectivity of the entire network. Since the primary purpose of the core layer is to provide an optimized and reliable backbone transmission structure through high-speed communication forwarding, core layer network equipment possesses high reliability and high throughput. Typically, the core layer employs high-bandwidth network equipment.
[0056] The aggregation layer is located between the access layer and the core layer. It is responsible for handling all traffic from the access layer and providing the link between the access layer and the core layer.
[0057] The access layer is the part that directly faces the user's connection or access to the network, and its purpose is to allow user terminals to connect to the network.
[0058] exist Figure 1 The transmission network shown contains multiple network devices. These network devices can be understood as interface devices that support either Flexible Ethernet (FlexE) or traditional Ethernet technology. Through forwarding operations between these network devices, data exchange can be achieved between user terminals and the backbone network, or between user terminals themselves.
[0059] exist Figure 1The transport network shown includes network devices in the following layers: The core layer network devices can be provider devices (P devices), which have powerful switching capabilities and can be used for high-speed data flow switching; the aggregation layer network devices can be provider edge (PE) devices, which are used to connect the access layer and the core layer and are the most important network nodes. Data flows into the access layer or the core layer through PE devices; the access layer network devices can be customer edge (CE) devices, which provide access services to user terminals.
[0060] In addition, Figure 1 In the PTN scenario shown, the interfaces between network devices can be divided into two categories: network to network interface (NNI) and user network interface (UNI). An NNI can be an interface between a PE device and a P device, or between two P devices; a UNI interface can be an interface between a user terminal and a CE device.
[0061] As mentioned earlier, data exchange between user terminals and the backbone network, or between user terminals themselves, can be achieved through the forwarding operations of multiple network devices. In other words, in... Figure 1 In the PTN scenario shown, each network device is used for packet forwarding. The data flow of the user terminal can be forwarded to the backbone network through CE device → PE device → P device, and the data flow of the backbone network can also be forwarded to the user terminal through P device → PE device → CE device.
[0062] To enable remote deployment of network devices, a Data Communication Network (DCN) system is also used to provide network devices with management access and communication functions for management and control information. This allows remote deployment and management of each device to be completed through a network management server.
[0063] The DCN system network consists of a network management server, gateway network elements, and non-gateway network elements, as well as the connecting lines or networks between them. The network management server is connected to the gateway network elements and can directly access each other. The gateway network element and multiple non-gateway network elements that are directly or indirectly connected to it constitute a management domain. The gateway network elements and multiple non-gateway network elements within the management domain can directly access each other.
[0064] For example, such as Figure 2As shown, the network management server 110 is directly connected to the network devices in the aggregation layer. Therefore, network devices 111, 112, 113, and 114 are gateway network elements, while network devices 121, 122, and 123 in the access layer are non-gateway network elements.
[0065] Data transmission between network devices can be either Ethernet or FlexE.
[0066] The following is a detailed description of the differences between FlexE and Ethernet technologies. FlexE technology inserts a Shim sublayer between the physical layer and the data link layer; specifically, it inserts a Shim sublayer before the Physical Coding Sublayer (PCS) in the physical layer. The basic functionality of FlexE technology is implemented by the Shim sublayer. Here, the basic function of FlexE technology is to map K FlexE service flows (clients) to a FlexE group consisting of L physical layer (PHY) links according to the time division multiplexing (TDM) mechanism of Shim. K and L are both positive integers. The service flow rate of K FlexE can be an integer multiple of 10Gb / s, 40Gb / s, and 25Gb / s, etc. After the service flow is mapped to each PHY, the information transmitted on each PHY is called an instance. FlexE technology includes two types of instances: 50G and 100G. Among them, 50G instances are only carried out on the 50G link physical layer, 100G links can carry one 100G instance, 200G links can carry two 100G FlexE instances, and 400G links can carry four 100G FlexE instances.
[0067] like Figure 3 As shown, at the sending end, the service flow (client) sequentially passes through the Shim sublayer, PCS sublayer, Physical Media Attachment (PMA), and Physical Media Dependent (PMD) sublayer. The PCS primarily handles 64B / 66B encoding and scrambling, the PMA performs multiplexing, and the PMD sublayer converts the encoded data, transforming the 64B / 66B data in the PCS into a transmission signal suitable for the specific medium. Conversely, at the receiving end, after receiving the transmission signal, it sequentially passes through the PMD, PMA, PCS, and FlexE Shim sublayer. The PMD first restores the transmission signal to 64B / 66B data, then the PMA sublayer performs collision detection, clock recovery, and demultiplexing operations, and finally the PCS layer performs descrambling and decoding.
[0068] However, if a single channel processes 64B / 66B code blocks at a bit rate of 100Gb / s, the circuit clock frequency would need to be as high as 1.5GHz. In practice, it is difficult to design circuits to achieve a clock frequency of 1.5GHz. Therefore, the PCS sublayer at the transmitting end is also used for block distribution, distributing code blocks to various PCS channels so that the code blocks can be processed in parallel. For example, if 10 channels are used to process 64B / 66B code blocks in parallel, a clock frequency of around 151MHz is sufficient.
[0069] The process of block distribution in the PCS sublayer is as follows: Figure 4 As shown, the PCS sublayer combines 64 bits of data and a 2-bit synchronization header (SYNC) into a single block. This 64-bit data can also be called the block payload. The PCS sublayer then distributes the block sequentially to each channel, using a round-robin system from the least significant channel to the most significant channel. That is, when the number of PSC channels is N (a positive integer), block 0 is sent to channel 0, block 1 to channel 1, and so on. Block n-1 is sent to channel n-1, then block n is sent to channel 0, block n+1 to channel 1, and so on.
[0070] Then, at the PCS sublayer at the receiving end, the code blocks of each channel are restored to a serial code block stream. For example... Figure 5 As shown, taking a 4-channel PCS system as an example, blocks 0-11 of the 4 channels are read out sequentially and finally restored to the following state: Figure 5 The right side shows a serial code block stream. However, there may be a delay in the arrival of blocks from each channel at the receiver, which can cause the channel code block order to become disordered. For example... Figure 6 As shown, there is a time delay in the transmission of the code blocks of PCS channel 1 and PCS channel 3. As a result, when the PCS sublayer recovers, it will read block 0 of PCS channel 0, block 2 of PCS channel 2, block 4 of PCS channel 0, block 6 of PCS channel 2, block 3 of PCS channel 3, and so on.
[0071] In order for the receiver to correctly recover the code block, in the PCS sublayer at the transmitter, such as Figure 7As shown, alignment markers (AMs) will be inserted at equal intervals in each PCS channel. In the PCS sublayer at the receiving end, when a PCS channel receives an AM, that PCS channel will be locked first. The next code block will be received only after all PCS channels have received AMs. In this way, PCS channels can align code blocks using AMs, thereby solving the problem of code block misalignment caused by channel delay.
[0072] According to IEEE 802.3, for 100G FlexE, an AM word is inserted after every 16383 (16K) blocks on each PCS channel. However, for 50G, 200G, and 400G FlexE, an AM word is inserted after every 20479 (20K) blocks on each PCS channel.
[0073] Therefore, the frequency of AM word insertion varies when transmitting over networks with different speeds. To address this issue, some network devices insert pads into the code block stream, providing padding functionality. These pads, like blocks, are 66 bits long and are used to compensate for differences in alignment marks between 100G Flex and 50G FlexE, 200G Flex, and 400G FlexE. For example... Figure 8 As shown in (A), to ensure that the bit rate of a 50G instance is exactly half that of a 100G instance, two pads are inserted after 163830 (denoted as 160K) blocks for the 50G instance. It should be understood that in 160K blocks, the PCS layer inserts 8 AM words for 50GFlexE, but in 1600K blocks, the PCS layer inserts 10 AM words; therefore, 50GFlexE requires two additional pads. Similarly, to ensure that 100G instances carried on 200G and 400G links have the same size as those carried on 100G links, such as... Figure 8 As shown in (B), for a 200G link, four pads are inserted after every 2*160K blocks; as... Figure 8 As shown in (C), for a 400G link, 8 pads are inserted after every 4*160K blocks.
[0074] Therefore, the network mode of a network device can be any one of the following: Eth mode, FlexE padding enabled mode, or FlexE padding disabled mode. Eth mode indicates that the network device supports Ethernet technology; FlexE padding enabled mode indicates that the network device supports FlexE technology and has padding functionality; FlexE padding disabled mode indicates that the network device supports FlexE technology but does not have padding functionality. It should be understood that because Ethernet technology does not include a Shim layer, the time slots allocated for data transmission in Eth mode and FlexE mode are different; furthermore, FlexE padding enabled requires several more pads in the transmitted code blocks compared to padding disabled. Therefore, these three modes are different, and the network device and the peer network device cannot use different network modes to transmit data.
[0075] When a network device establishes a link connection with a peer network device, they negotiate by exchanging code streams. These code streams confirm whether the network modes of the two devices are consistent. If the network modes are inconsistent, a network connection cannot be established. Consequently, service data cannot be transmitted between the network devices, and the DCN link is interrupted. For example, if... Figure 2 If network device 111 is in FlexE padding enabled mode and network device 121 is in FlexE padding disabled mode, then the link between network device 111 and network device 121 cannot be connected, which will prevent the transmission of service data. At the same time, as a non-gateway network element, network device 121 cannot receive data from network management server 110, which puts network device 121 in a managed state.
[0076] To address the issue of link establishment failure due to inconsistent network modes among network devices, this application provides a network device negotiation method, which can be applied to, for example... Figure 1 The network devices in the transmission network shown Figure 9 An example illustrates the state changes during network device negotiation, such as... Figure 9 As shown, the states of network devices during negotiation can be divided into port initialization state, port waiting state, FlexE mode state, and Eth mode state. The FlexE mode state specifically includes: FlexE negotiation state, FlexE waiting state, FlexE locked state, FlexE hold state, and FlexE unlock state; the Eth mode state specifically includes: Eth negotiation state, Eth waiting state, and Eth locked state.
[0077] The port initialization state involves initializing the network device's ports, including Spanning Tree Protocol (STP) initialization, Port Aggregation Protocol (PAP) initialization, etc. STP is used to avoid broadcast storms caused by ring links in the transmission network, and PAP is used to aggregate multiple network channels. It should be understood that this application does not specifically limit the port initialization process. After the network device's port initialization is complete, the network device will enter the FlexE negotiation state.
[0078] The FlexE negotiation state is the state in which a network device uses FlexE mode to negotiate with the peer network device. The timeout period of this state is T0, which includes the FlexE padding enabled mode and the FlexE padding disabled mode. The timeout period for the FlexE padding enabled mode is T6, and the timeout period for the FlexE padding disabled mode is T7.
[0079] Specifically, after entering the FlexE negotiation state, the network device will negotiate with the peer network device using the FlexE padding enabled mode and wait for a response from the peer network device within time T6. If the response from the peer network device indicates that it is not in the FlexE padding enabled mode, or if no response is received from the peer network device within time T6, the negotiation has failed. The network device will then negotiate with the peer network device using the FlexE padding disabled mode and wait for time T7. If the network device successfully negotiates with the peer network device in the FlexE negotiation state, it will enter the FlexE waiting state; if the network device fails to negotiate with the peer network device in either of the two network modes in the FlexE negotiation state, the network device will enter the Eth negotiation state. If the physical layer connection is lost during the negotiation process between the network device and the peer network device using the FlexE mode, the network device will return to the port initialization state.
[0080] In some embodiments, after a network device enters the FlexE negotiation state, it may first use the FlexE padding-disabled mode to negotiate with the peer network device and wait for the peer network device's response for a maximum of T7 time. If the network device fails to negotiate, it may then use the FlexE padding-enabled mode to negotiate with the peer network device and wait for the peer network device's response for a maximum of T6 time.
[0081] The FlexE wait state is the state a network device enters after successfully negotiating FlexE mode with its peer. This state is used to determine whether the link is stable. It should be understood that in the FlexE negotiation state, after successful negotiation, the network device may receive a "PCS DOWN" signal, for example, due to a physical layer connection failure; or, the network device may receive a "SHIM DOWN" signal, for example, when the Shim layer configuration is inconsistent with that of the peer. Both physical layer and Shim layer connection failures will prevent data transmission.
[0082] Therefore, after successful negotiation, the network device will not immediately enter the data transmission state, but will wait in the FlexE waiting state for a period of time T2. If the physical layer and Shim layer are connected normally within the FlexE waiting state for T2, the network device will enter the FlexE locked state. If the connection between the network device and the peer network device fails at either the physical layer or the Shim layer within T2, that is, if the network device receives a "PCSDOWN" or "SHIM DOWN" signal, the network device will enter the FlexE hold state.
[0083] The FlexE hold state is a state entered after successful negotiation, but where the physical layer or Shim layer connection fails. If the network device remains in this state for more than time T4, it will return to the FlexE negotiation state. If, within time T4, the physical layer and Shim layer connections between the network device and the peer network device are restored—that is, upon receiving the "PCS UP" and "SHIM UP" signals—the network device will return to the FlexE wait state.
[0084] The FlexE locked state is a state that a network device maintains for an extended period after successfully establishing a connection with a peer network device and during data transmission using FlexE. In this state, if the connection between the network device and the peer network device at either the physical layer or the Shim layer is lost—that is, if the network device receives a "PCS DOWN" or "SHIM DOWN" signal—the network device will enter the FlexE unlocked state.
[0085] The FlexE unlocked state is used to prevent temporary link disconnections that would necessitate renegotiation. When a network device is in the FlexE locked state, and either the physical layer or the Shim layer connection is lost, the network device will enter the FlexE unlocked state. If, while in the FlexE unlocked state, the physical layer and Shim layer connections are restored within time T5 (i.e., upon receiving the "PCS UP" and "SHIM UP" signals), the network device will return to the FlexE locked state. If, after time T5, the physical layer and Shim layer connections have not been restored, the network device will return to the FlexE negotiation state.
[0086] The Eth negotiation state is the state in which a network device negotiates with a peer network device using Eth mode. In this state, the network device will negotiate with the peer network device using Eth mode and wait for a response from the peer network device for a maximum of T3 hours. If the Eth mode negotiation with the peer network device is successful, the device enters the Eth waiting state. If the negotiation with the peer network device fails after T3 hours, the device returns to the FlexE negotiation state and increments the Eth negotiation failure count by one in the port waiting state.
[0087] The Eth waiting state is the state a network device enters after successfully negotiating Eth mode with the peer network device. This state is used to determine whether the link is stable. It should be understood that Eth mode does not require a Shim layer; therefore, in the Eth waiting state, it is necessary to ensure that the physical layer connection is successful while the Shim layer connection is broken. When the Shim layer connection is broken and the physical layer connection is successful, the network device will enter the Eth locked state from the Eth waiting state; if the physical layer connection is broken, the network device will return to the FlexE negotiation state from the Eth waiting state.
[0088] The Eth locked state is a state that a network device maintains for an extended period after successfully establishing a connection with the peer network device and during data transmission using Eth mode. If the physical layer connection is lost in this state, the device will return to the FlexE negotiation state.
[0089] The port wait state is used to count the number of negotiation failures. When the number of Eth negotiation failures exceeds i (where i is a positive integer), the network device will enter this state. In this state, the network device will wait for T1 time. After T1 time, it will enter the FlexE negotiation state to negotiate with the peer network device. The port wait state prevents the peer network device from also constantly switching network modes to negotiate with this network device, thus avoiding a situation where the two network devices are constantly switching network modes, causing the same network mode to be consistently misaligned.
[0090] The following is combined with Figure 9 Examples are given to illustrate the changes in the state of network devices under different network connection conditions.
[0091] When both the network device and the peer network device are in Flex padding enabled mode or FlexE padding disabled mode, and the physical layer and Shim layer are in a successfully connected state for a long time (greater than T0+T2), the state change of the network device is: port initialization state → FlexE negotiation state → FlexE waiting state → FlexE locked state. At this time, if the physical layer connection between the network device and the peer network device is broken and the connection is not restored for a long time (greater than T5), the state change of the network device is: FlexE locked state → FlexE unlocked state → FlexE negotiation state → port initialization state.
[0092] When both the network device and the peer network device are in Eth mode, and the physical layer remains in a successfully connected state for an extended period while the Shim layer remains in a disconnected state for an extended period, the state changes of the network device are as follows: port initialization state → FlexE negotiation state → Eth negotiation state → Eth waiting state → Eth locked state.
[0093] When a network device and its peer network device are in different network modes, the network device's state changes as follows: port initialization state → FlexE negotiation state → Eth negotiation state → FlexE negotiation state. After repeating the FlexE negotiation state → Eth negotiation state loop i times, it enters the port waiting state and then returns to the FlexE negotiation state → Eth negotiation state loop until the negotiation is successful or the negotiation process is interrupted by external factors.
[0094] In summary, when negotiating with a peer network device, the network device first enters the FlexE negotiation state, negotiating with the peer network device using both padding-enabled and FlexE padding-disabled modes. If the negotiation fails, it then enters the Eth negotiation state, negotiating with the peer network device using Eth mode, and so on, until one network mode is successfully negotiated. This allows the network device to automatically switch between different network modes when negotiating with the peer network device, enabling it to adapt to peer devices with different network modes. Simultaneously, the port wait state records the number of Eth negotiation failures. When the number of Eth negotiation failures exceeds a preset number, the network device enters the port wait state, waits for a preset time, and then re-enters the FlexE negotiation state. This also prevents the peer network device from also switching network modes, ensuring that the same network modes on both ends are consistently misaligned, thus increasing the probability of successful negotiation.
[0095] To address the issue of link establishment failure due to inconsistent network modes among network devices, this application provides a network device negotiation method, such as... Figure 10 The diagram shown is a flowchart illustrating a network device negotiation method provided in this application. In this method, the state transitions of the network device can be referenced as described above. Figure 9And related descriptions. The following is a detailed introduction to the steps of this network device negotiation method.
[0096] S1010. The network device uses the padding enabled mode of FlexE to negotiate with the peer network device. If the negotiation is successful, proceed to step S1040; if the negotiation fails, proceed to step S1020.
[0097] After port initialization, the network device will enter the FlexE negotiation state and first negotiate with the peer network device to enable the FlexE padding network mode.
[0098] Specifically, this includes: the network device using FlexE padding enabled mode to negotiate with the peer network device. The negotiation process involves sending a FlexE padding enabled mode related bitstream to the peer network device to confirm whether the peer network device is also in FlexE padding enabled mode, and waiting for the peer network device's response within T6 time.
[0099] If, within time T6, the network device receives a bitstream from the peer network device indicating that the peer network device is also in FlexE padding enabled mode, then the network device and the peer network device have successfully negotiated, and step S1040 is executed; if the peer network device's reply indicates that the peer network device is not in FlexE padding enabled mode, or if no reply is received from the peer network device within time T6, then the negotiation has failed, and step S1020 is executed.
[0100] S1020. The network device uses FlexE's padding disabled mode to negotiate with the peer network device. If the negotiation is successful, proceed to step S1040; if the negotiation fails, proceed to step S1030.
[0101] The network device negotiates with the peer network device using FlexE padding disabled mode. The negotiation process involves sending a FlexE padding disabled mode related bitstream to the peer network device to confirm whether the peer network device is also in FlexE padding disabled mode, and waiting for the peer network device's response within T7 time.
[0102] If, within time T7, the network device receives a bitstream from the peer network device indicating that the peer network device is also in FlexE padding disabled mode, then the network device and the peer network device have successfully negotiated and proceed to step S1040; if the peer network device's reply indicates that the peer network device is not in FlexE padding disabled mode, or if no reply is received from the peer network device within time T7, then the network device and the peer network device have failed to negotiate and proceed to step S1030.
[0103] S1030. The network device uses Eth mode to negotiate with the peer network device. If the negotiation is successful, proceed to step S1040; if the negotiation fails, proceed to step S1050.
[0104] If the network device fails to negotiate with the peer network device using both FlexE padding enabled mode and FlexE padding disabled mode, the network device will use Eth mode to negotiate with the peer network device and wait for a maximum of T3 time for the peer network device to respond.
[0105] If, within time T3, the network device receives a bitstream from the peer network device indicating that the peer network device is also in Eth mode, then the network device and the peer network device have successfully negotiated and proceed to step S1040; if, within time T3, the peer network device replies indicating that the peer network device is not in Eth mode, then the network device and the peer network device have failed to negotiate and proceed to step S1050.
[0106] S1040. The network device establishes a connection with the peer network device.
[0107] Once a network device successfully negotiates with its peer network device, it will establish a link connection. This link includes FlexE padding enabled mode, FlexE padding disabled mode, and Eth mode. It should be understood that the link connection between the network device and the peer network device is based on the negotiation result; that is, the link is established using the network mode successfully negotiated with the peer network device. The state transitions of the network device after successful negotiation can be found in [reference needed]. Figure 9 The details and related descriptions will not be repeated here.
[0108] S1050, Network device reports a negotiation failure alarm.
[0109] When a network device fails to negotiate successfully with a peer network device using any network mode, the network device will report a negotiation failure alarm. It should be understood that this alarm can be sent by the network device to its own host or to a network management server, allowing the network device administrator or a user of the network management server to modify the network configuration parameters of the network device, thereby enabling the network device to successfully negotiate with the peer network device.
[0110] In some embodiments, the network device will execute the above steps S1010-S1030 i times, where i is a positive integer. That is, the network device uses each network mode to negotiate with the peer network device, which is counted as one round-robin. After i rounds, if the network device and the peer network device still fail to negotiate successfully, the network device will report a negotiation failure alarm to the network management server.
[0111] In some embodiments, after polling i times, the network device will enter a port wait state, where it will wait for T1 time. After T1 time, it will enter the FlexE negotiation state to negotiate with the peer network device. This prevents the peer network device from constantly switching network modes to negotiate with the local network device, thus avoiding a situation where the same network modes are constantly being misaligned due to the continuous switching between the two network devices.
[0112] In summary, the network device negotiation method provided in this application can automatically switch between different network modes until a successful negotiation with the peer network device is achieved, enabling the network device to adapt to peer devices with different network modes. Furthermore, the network device negotiation method provided in this application employs different waiting times when attempting each network mode and increases the waiting time after multiple negotiation failures. This prevents the peer network device from also switching network modes, thus avoiding situations where the same network modes on both ends are consistently misaligned, thereby increasing the probability of successful negotiation.
[0113] To address the issue of link establishment failure due to inconsistent network modes among network devices, this application also provides an alternative network device negotiation method, which can be applied to, for example... Figure 1 The network devices in the transmission network shown Figure 11 An example illustrates the state changes during network device negotiation. For instance... Figure 11 As shown, the states of network devices during negotiation can be divided into port initialization state, port waiting state, FlexE mode state, and Eth mode state. The FlexE mode state specifically includes: FlexE negotiation state, FlexE waiting state, FlexE locked state, FlexE hold state, and FlexE unlock state; the Eth mode state specifically includes: Eth negotiation state, Eth waiting state, and Eth locked state.
[0114] After completing port initialization in the port initialization state, the network device will enter the Eth negotiation state. If the network device successfully negotiates Eth mode with the peer network device, it will enter the Eth waiting state. If the negotiation fails after time T3, it will enter the FlexE negotiation state. In the FlexE negotiation state, the network device will negotiate with the peer network device using both FlexE padding enabled and FlexE padding disabled modes. If the negotiation succeeds, it will enter the FlexE waiting state; if the negotiation fails, it will increment the FlexE negotiation failure count in the port waiting state and return to the Eth negotiation state. For details and the functions of the other states, please refer to the above. Figure 9 And related descriptions, which will not be repeated here.
[0115] The following is combined with Figure 11 Examples are given to illustrate the changes in the state of network devices under different network connection conditions.
[0116] When both the network device and the peer network device are in Eth mode, and the physical layer remains in a successfully connected state for an extended period while the Shim layer remains in a disconnected state for an extended period, the state changes of the network device are as follows: port initialization state → Eth negotiation state → Eth waiting state → Eth locked state.
[0117] When both the network device and the peer network device are in Flex padding enabled mode or FlexE padding disabled mode, and the physical layer and Shim layer are in a successfully connected state for a long time (greater than T0+T2), the state change of the network device is: port initialization state → Eth negotiation state → FlexE negotiation state → FlexE waiting state → FlexE locked state. At this time, if the physical layer connection between the network device and the peer network device is broken and the connection is not restored for a long time (greater than T5), the state change of the network device is: FlexE locked state → FlexE unlocked state → FlexE negotiation state → port initialization state.
[0118] When a network device and its peer network device are in different network modes, the network device's state changes as follows: port initialization state → Eth negotiation state → FlexE negotiation state → Eth negotiation state. After repeating the Eth negotiation state → FlexE negotiation state loop i times, it enters the port waiting state and then returns to the Eth negotiation state → FlexE negotiation state loop until the negotiation is successful or the negotiation process is interrupted by external factors.
[0119] To address the issue of link establishment failure due to inconsistent network modes among network devices, this application provides a network device negotiation method, such as... Figure 12 The diagram shown is a flowchart illustrating a network device negotiation method provided in this application. In this method, the state transitions of the network device can be referenced as described above. Figure 11 And related descriptions. The following is a detailed introduction to the steps of this network device negotiation method.
[0120] S1210. The network device uses Eth mode to negotiate with the peer network device. If the negotiation is successful, proceed to step S1240; if the negotiation fails, proceed to step S1220.
[0121] After port initialization, the network device will use Eth mode to negotiate with the peer network device and wait for a maximum of T6 time for the peer network device to respond.
[0122] If, within time T3, the network device receives a bitstream from the peer network device indicating that the peer network device is also in Eth mode, then the network device and the peer network device have successfully negotiated and proceed to step S1240; if, within time T3, the peer network device replies indicating that the peer network device is not in Eth mode, then the network device and the peer network device have failed to negotiate and proceed to step S1250.
[0123] S1220. The network device uses FlexE's padding enabled mode to negotiate with the peer network device. If the negotiation is successful, proceed to step S1240; if the negotiation fails, proceed to step S1230.
[0124] The network device negotiates with the peer network device using FlexE's padding enabled mode and waits for a response from the peer network device within time T1. If, within time T6, the network device receives a bitstream from the peer network device indicating that the peer network device is also in FlexE padding enabled mode, then the negotiation between the network device and the peer network device is successful, and step S1240 is executed; if the response from the peer network device indicates that the peer network device is not in FlexE padding enabled mode, or if no response is received from the peer network device within time T6, then the negotiation is unsuccessful, and step S1230 is executed.
[0125] S1230. The network device uses FlexE's padding disabled mode to negotiate with the peer network device. If the negotiation is successful, proceed to step S1240; if the negotiation fails, proceed to step S1250.
[0126] The network device negotiates with the peer network device using FlexE padding disabled mode and waits for a response from the peer network device within time T7. If, within time T7, the network device receives a bitstream from the peer network device indicating that the peer network device is also in FlexE padding disabled mode, then the negotiation between the network device and the peer network device is successful, and step S1240 is executed; if the response from the peer network device indicates that the peer network device is not in FlexE padding disabled mode, or if no response is received from the peer network device within time T7, then the negotiation between the network device and the peer network device is unsuccessful, and step S1250 is executed.
[0127] S1240. The network device establishes a connection with the peer network device.
[0128] Once the network device successfully negotiates with the peer network device, it will establish a link connection with the peer network device. This link includes FlexE padding enabled mode, FlexE padding disabled mode, and Eth mode. For details, please refer to step S1040 and its related description above, which will not be repeated here.
[0129] S1250, Network device reports a negotiation failure alarm.
[0130] If a network device fails to negotiate successfully with the peer network device using each network mode, the network device will report a negotiation failure alarm. For details, please refer to step S1050 and its related description above; they will not be repeated here.
[0131] In some embodiments, the network device will execute the above steps S1010-S1030 j times, where j is a positive integer. That is, the network device uses each network mode to negotiate with the peer network device, which is counted as one round-robin. After j rounds of round-robin, the network device and the peer network device still fail to negotiate successfully, and then the network device reports a negotiation failure alarm to the network management server.
[0132] In some embodiments, after polling j times, the network device will enter a port wait state, where it will wait for time T1. After time T1, it will enter the Eth negotiation state to negotiate with the peer network device. This prevents the peer network device from also constantly switching network modes to negotiate with the local network device, thus avoiding a situation where the two network devices are constantly switching network modes and the same network mode is always misaligned.
[0133] In some embodiments, the network device first negotiates with the peer network device using FlexE's padding disabled mode; if the negotiation fails, the network device then negotiates with the peer network device using FlexE's padding enabled mode; if the negotiation still fails, the network device then negotiates with the peer network device using Eth mode. Alternatively, the network device first negotiates with the peer network device using FlexE's padding disabled mode; if the negotiation fails, the network device then negotiates with the peer network device using Eth mode; if the negotiation still fails, the network device then negotiates with the peer network device using FlexE's padding enabled mode. Alternatively, after Eth mode negotiation fails, the network device may first negotiate with the peer network device using FlexE's padding disabled mode; if the negotiation fails, the network device then negotiates with the peer network device using FlexE's padding enabled mode. Alternatively, after FlexE's padding enabled mode negotiation fails, the network device may first negotiate with the peer network device using Eth mode; if the negotiation still fails, the network device then negotiates with the peer network device using FlexE's padding disabled mode. In other words, this application does not restrict the order of the negotiated network modes used by network devices.
[0134] In summary, the network device negotiation method provided in this application can automatically switch between different network modes until a successful negotiation with the peer network device is achieved, enabling the network device to adapt to peer devices with different network modes. Furthermore, the network device negotiation method provided in this application employs different waiting times when attempting each network mode and increases the waiting time after multiple negotiation failures. This prevents the peer network device from also switching network modes, thus avoiding situations where the same network modes on both ends are consistently misaligned, thereby increasing the probability of successful negotiation.
[0135] In some embodiments, this application also provides a network device negotiation method, which is described below in conjunction with... Figure 13 The steps of the network device negotiation method are described in detail.
[0136] S1310. Obtain the network mode of the first network device.
[0137] The first network device obtains the current network mode from its own memory or processor. The network mode includes Ethernet (Eth) mode, FlexE padding enabled mode, and FlexE padding disabled mode. FlexE padding enabled means using FlexE technology and inserting pads after a preset number of code blocks. FlexE padding disabled means using FlexE technology but not inserting pads in the code blocks.
[0138] S1320. Negotiate with the second network device according to the network mode.
[0139] When the network mode is either the FlexE padding enabled mode or the FlexE padding disabled mode, negotiation is conducted with the second network device according to the network mode. The network mode enters the FlexE negotiation state and waits. The duration of the FlexE negotiation state is equal to a preset duration T0. The FlexE negotiation state is used by the first network device to negotiate with the second network device using the FlexE padding enabled mode and the FlexE padding disabled mode. T0 is a positive number. If the negotiation is successful, the system transitions from the FlexE negotiation state to the FlexE waiting state. The FlexE waiting state is used to confirm whether the link with the second network device is in a connected state. For details, please refer to steps S1010 and S1020 above, which will not be repeated here.
[0140] In some embodiments, if negotiation fails, the system transitions from the FlexE negotiation state to the Eth negotiation state. The Eth negotiation state is used by the first network device to negotiate with the second network device using Eth mode. For details, please refer to step S1030 above; it will not be repeated here.
[0141] In some embodiments, if the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number, a preset duration T1 is waited (T1 is a positive number); after waiting for T1, the FlexE negotiation state is entered again. See details in [reference needed]. Figure 9 The description of the waiting state in the middle port will not be repeated here.
[0142] In some embodiments, if the link between the FlexE waiting state and the second network device remains connected for a preset duration T2, data communication with the second network device is performed, where T2 is a positive number. See details for further information. Figure 9 The relevant descriptions of the FlexE wait state will not be repeated here.
[0143] In some embodiments, when the network mode is Eth mode, negotiation with the second network device is performed according to the network mode, including: entering an Eth negotiation state and waiting, wherein the duration of the Eth negotiation state is equal to a preset duration T3, where T3 is a positive number; if the negotiation is successful, entering an Eth waiting state from the Eth negotiation state, the Eth waiting state is used to confirm whether the link connection between the first network device and the second network device is stable. For details, please refer to step S1210 above, which will not be repeated here.
[0144] In some embodiments, if negotiation fails, the process transitions from the Eth negotiation state to the FlexE negotiation state. For details, please refer to steps S1220 and S1230 above; they will not be repeated here.
[0145] In some embodiments, if the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number, the system waits for a preset duration T1; after waiting for the preset duration T1, it then enters the FlexE negotiation state. For details, please refer to [link / reference]. Figure 11 The description of the waiting state in the middle port will not be repeated here.
[0146] In some embodiments, while in the Eth waiting state, if the link with the second network device remains connected, data communication is performed with the second network device. See details for further information. Figure 11 The relevant descriptions of the Eth wait state will not be repeated here.
[0147] In summary, the network device negotiation method provided in this application can automatically switch between different network modes until a successful negotiation with the peer network device is achieved, enabling the network device to adapt to peer devices with different network modes. Furthermore, the network device negotiation method provided in this application employs different waiting times when attempting each network mode and increases the waiting time after multiple negotiation failures. This prevents the peer network device from also switching network modes, thus avoiding situations where the same network modes on both ends are consistently misaligned, thereby increasing the probability of successful negotiation.
[0148] To address the aforementioned problem of inconsistent network modes between network devices leading to link failure, this application provides a network device negotiation apparatus 1400. For example... Figure 14 As shown, the network device negotiation apparatus 1400 may include an acquisition unit 1410, a negotiation unit 1420, and a processing unit 1430.
[0149] The acquisition unit 1410 is used to acquire the network mode of the first network device; the negotiation unit 1420 is used to negotiate with the second network device according to the network mode, wherein the network mode includes Ethernet Eth mode, Flexible Ethernet FlexE padding enabled mode and FlexE padding disabled mode, wherein FlexE padding enabled means using FlexE technology and inserting padding blocks after a preset number of code blocks, and FlexE padding disabled means using FlexE technology but not inserting padding blocks in the code blocks.
[0150] In some embodiments, the apparatus further includes a processing unit 1430. When the network mode is FlexE padding enabled mode or FlexE padding disabled mode, the processing unit is configured to enter a FlexE negotiation state and wait according to the network mode. The duration of the FlexE negotiation state is equal to T1 + T2. The FlexE negotiation state is used for the first network device to negotiate with the second network device using FlexE padding enabled mode and FlexE padding disabled mode. T1 and T2 are positive numbers. If the negotiation is successful, the processing unit 1430 is configured to enter a FlexE waiting state from the FlexE negotiation state and confirm whether the link with the second network device is in a connected state.
[0151] In some embodiments, the processing unit 1430 is further configured to switch from the FlexE negotiation state to the Eth negotiation state if the negotiation fails. The Eth negotiation state is used by the first network device to negotiate with the second network device using the Eth mode.
[0152] In some embodiments, the processing unit 1430 is further configured to wait for a time T7, where T7 is a positive number, if the number of unsuccessful negotiations in the Eth negotiation state reaches i times; the processing unit is further configured to wait for a time T7 before entering the FlexE negotiation state.
[0153] In some embodiments, during the T3 time period of the FlexE waiting state, the processing unit 1430 communicates with the second network device while the link between them remains connected. T3 is a positive number.
[0154] In some embodiments, the processing unit 1430 is further configured to enter the Eth negotiation state and wait when the network mode is Eth mode, wherein the duration of the Eth negotiation state is equal to T6; the processing unit is further configured to enter the Eth waiting state from the Eth negotiation state when the negotiation is successful, wherein the Eth waiting state is used to confirm whether the link connection between the first network device and the second network device is stable.
[0155] In some embodiments, the processing unit 1430 is further configured to switch from the Eth negotiation state to the FlexE negotiation state if the negotiation fails.
[0156] In some embodiments, the processing unit 1430 is further configured to wait for time T7 if the number of unsuccessful negotiations in the Eth negotiation state reaches i times; the processing unit is further configured to wait for time T7 before entering the FlexE negotiation state.
[0157] In some embodiments, the processing unit 1430 is further configured to perform data communication with the second network device while the link between the two network devices remains connected during the Eth waiting state.
[0158] In summary, the network device negotiation apparatus 1400 provided in this application can automatically switch between different network modes until a successful negotiation with the peer network device is achieved, enabling the network device to adapt to peer devices with different network modes. Furthermore, the network device negotiation method provided in this application has different waiting times when attempting each network mode, and increases the waiting time after multiple negotiation failures. This prevents the peer network device from also switching network modes, thus avoiding situations where the same network modes on both ends are consistently misaligned, thereby increasing the probability of successful negotiation.
[0159] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above-described solutions of the embodiments of this application, relevant equipment for cooperating in implementing the above solutions is also provided below.
[0160] Figure 15 This is a schematic diagram of the structure of a computing device 1500 provided in this application. The computing device 1500 may be the network device negotiation device 1400 mentioned above. Figure 15 As shown, the computing device 1500 includes a processor 1510, a communication interface 1520, and a memory 1530. The processor 1510, communication interface 1520, and memory 1530 can be interconnected via an internal bus 1540, or they can communicate via wireless transmission or other means. This embodiment uses a connection via bus 1540 as an example. Bus 1540 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc. Bus 1540 can be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, bus 1540 can also include a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus 1540 in the figure.
[0161] Processor 1510 may consist of at least one general-purpose processor, such as a central processing unit (CPU), or a combination of a CPU and hardware chips. The hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The PLDs may be complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof. Processor 1510 executes various types of digital storage instructions, such as software or firmware programs stored in memory 1530, enabling computing device 1500 to provide a variety of services.
[0162] The memory 1530 stores program code, which is executed under the control of the processor 1510 to perform the processing steps of the network device negotiation method in the above embodiments. The program code may include one or more software modules, which can be... Figure 14 The software modules provided in the embodiment, such as the acquisition unit, negotiation unit, and processing unit, are as follows: The acquisition unit is used to acquire the network mode of the first network device; the negotiation unit is used to negotiate with the second network device according to the network mode, wherein the network mode includes Ethernet (Eth) mode, Flexible Ethernet (FlexE) padding enabled mode, and FlexE padding disabled mode; the processing unit is used to enter the FlexE negotiation state and wait according to the network mode, and, if the negotiation is successful, to enter the FlexE waiting state from the FlexE negotiation state and confirm whether the link with the second network device is in a connected state, etc. For details, please refer to... Figure 14 The details and related descriptions will not be repeated here.
[0163] It should be noted that this embodiment can be implemented using a general-purpose physical server, such as an ARM server or an x86 server, or it can be implemented using a virtual machine based on a general-purpose physical server combined with NFV technology. A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. This application does not make any specific limitations.
[0164] Memory 1530 may include volatile memory, such as random access memory (RAM); memory 1530 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 1530 may also include combinations of the above types. Memory 1530 may store program code and has executable functionality. Figure 10 Steps S1010-S1050 and their optional steps in the embodiments, and Figure 12 The steps S1210-S1250 and their optional steps in the embodiments will not be described in detail here.
[0165] The communication interface 1520 can be a wired interface (e.g., an Ethernet interface), an internal interface (e.g., a Peripheral Component Interconnect express (PCIe) bus interface), a wired interface (e.g., an Ethernet interface), or a wireless interface (e.g., a cellular network interface or a wireless LAN interface), for communicating with other devices or modules.
[0166] It needs to be explained that, Figure 15 This is merely one possible implementation of an embodiment of this application. In practical applications, the computing device 1500 may include more or fewer components, and this is not a limitation. For content not shown or described in the embodiments of this application, please refer to the foregoing. Figure 10 or Figure 12 The relevant descriptions in the embodiments will not be repeated here.
[0167] It should be understood that Figure 15 The computing device shown can also be a computer cluster consisting of at least one server, which is not specifically limited in this application.
[0168] This application also provides a computer-readable storage medium storing instructions that, when executed on a processor. Figure 10 or Figure 12 The method flow shown is thus implemented.
[0169] This application also provides a computer program product that, when run on a processor, provides a solution for... Figure 10 or Figure 12 The method flow shown is thus implemented.
[0170] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more sets of available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs, DVDs), or semiconductor media. Semiconductor media can be SSDs.
[0171] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A network device negotiation method, characterized by, include: Obtain the network mode of the first network device; Negotiate with the second network device according to the network mode, wherein the network mode includes Ethernet Eth mode, Flexible Ethernet FlexE padding enabled mode and FlexE padding disabled mode, wherein FlexE padding enabled means using FlexE technology and inserting pads after a preset number of code blocks, and FlexE padding disabled means using FlexE technology but not inserting pads in the code blocks.
2. The method of claim 1, wherein, When the network mode is either the padding enabled mode of the FlexE or the padding disabled mode of the FlexE, negotiation is performed with the second network device according to the network mode, including: According to the network mode, the device enters the FlexE negotiation state and waits. The duration of the FlexE negotiation state is equal to a preset duration T0. The FlexE negotiation state is used for the first network device to negotiate with the second network device using the FlexE padding enabled mode and the FlexE padding disabled mode. T0 is a positive number. If the negotiation is successful, the system transitions from the FlexE negotiation state to the FlexE waiting state, which is used to confirm whether the link with the second network device is in a connected state.
3. The method of claim 2, wherein, If the negotiation fails, the system transitions from the FlexE negotiation state to the Eth negotiation state, which is used by the first network device to negotiate with the second network device using Eth mode.
4. The method according to claim 3, characterized in that, If the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number, wait for a preset time T1, where T1 is a positive number; After waiting for a preset time T1, the FlexE negotiation state is entered.
5. The method of claim 4, wherein, During the preset duration T2 of the FlexE waiting state, if the link between the device and the second network device remains connected, data communication is performed with the second network device. T2 is a positive number.
6. The method of claim 3, wherein, When the network mode is Eth mode, negotiation is performed with the second network device according to the network mode, including: According to the network mode, the network enters the Eth negotiation state and waits, wherein the duration of the Eth negotiation state is equal to the preset duration T3, and T3 is a positive number; If the negotiation is successful, the system transitions from the Eth negotiation state to the Eth waiting state, which is used to confirm whether the link connection between the first network device and the second network device is stable.
7. The method according to claim 6, characterized in that, If the negotiation fails, the process transitions from the Eth negotiation state to the FlexE negotiation state.
8. The method according to claim 7, characterized in that, If the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number, wait for a preset time T1; After waiting for a preset time T1, the FlexE negotiation state is entered.
9. The method according to claim 8, characterized in that, During the Eth waiting state, while the link between the device and the second network device remains connected, data communication is performed with the second network device.
10. A network device negotiation apparatus, characterized in that, Includes acquisition unit and negotiation unit: The acquisition unit is used to acquire the network mode of the first network device; The negotiation unit is used to negotiate with the second network device according to the network mode, wherein the network mode includes Ethernet Eth mode, Flexible Ethernet FlexE padding enabled mode and FlexE padding disabled mode, wherein FlexE padding enabled means using FlexE technology and inserting pads after a preset number of code blocks, and FlexE padding disabled means using FlexE technology but not inserting pads in the code blocks.
11. The apparatus according to claim 10, characterized in that, The device further includes a processing unit that, when the network mode is either the FlexE padding enabled mode or the FlexE padding disabled mode, The processing unit is used to enter the FlexE negotiation state and wait according to the network mode. The duration of the FlexE negotiation state is equal to a preset duration T0. The FlexE negotiation state is used for the first network device to negotiate with the second network device using the FlexE padding enabled mode and the FlexE padding disabled mode. T0 is a positive number. The processing unit is used to enter the FlexE waiting state from the FlexE negotiation state when the negotiation is successful, and to confirm whether the link with the second network device is in a connected state.
12. The apparatus according to claim 11, characterized in that, The processing unit is also configured to switch from the FlexE negotiation state to the Eth negotiation state if the negotiation fails. The Eth negotiation state is used by the first network device to negotiate with the second network device using the Eth mode.
13. The apparatus according to claim 12, characterized in that, The processing unit is also used to wait for a preset time T1, where T1 is a positive number, if the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number. The processing unit is also used to wait for a preset time T1 before entering the FlexE negotiation state.
14. The apparatus according to claim 13, characterized in that, During the preset duration T2 of the FlexE waiting state, the processing unit communicates with the second network device while the link between them remains connected. T2 is a positive number.
15. The apparatus according to claim 12, characterized in that, The processing unit is further configured to enter the Eth negotiation state and wait when the network mode is Eth mode, wherein the duration of the Eth negotiation state is equal to a preset duration T3, and T3 is a positive number; The processing unit is also configured to, upon successful negotiation, transition from the Eth negotiation state to the Eth waiting state, wherein the Eth waiting state is used to confirm whether the link connection between the first network device and the second network device is stable.
16. The apparatus according to claim 15, characterized in that, The processing unit is also used to transition from the Eth negotiation state to the FlexE negotiation state if the negotiation fails.
17. The apparatus according to claim 16, characterized in that, The processing unit is also used to wait for a preset time T1 when the number of unsuccessful negotiations in the Eth negotiation state reaches a preset number. The processing unit is also used to wait for a preset time T1 before entering the FlexE negotiation state.
18. The apparatus according to claim 17, characterized in that, The processing unit is also used to perform data communication with the second network device while the link between the two network devices remains connected during the Eth waiting state.
19. A computing system, characterized in that, It includes a processor and a memory, the memory being used to store instructions, the processor being used to execute the instructions, and when the processor executes the instructions, performing the method as described in any one of claims 1 to 9.
20. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a computing device, enable the computing device to perform the method as described in any one of claims 1 to 9.