Network establishment method, Ethernet system, and vehicle
The network establishment method addresses Layer 2 loop issues in automotive Ethernet systems by employing backbone nodes with rapid link failure detection and switching, ensuring high-speed network reconfiguration and communication reliability.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- YINWANG INTELLIGENT TECHNOLOGIES CO LTD
- Filing Date
- 2022-04-15
- Publication Date
- 2026-05-01
AI Technical Summary
Conventional network topologies like ring networks in automotive Ethernet systems face issues with Layer 2 loops, leading to network broadcast storms and unavailable MAC address entries due to limitations in convergence algorithms of protocols like STP, RSTP, and MSTP, which cannot meet the requirements of automotive applications in terms of network topology configuration time.
A network establishment method that involves backbone nodes with specific port configurations and failure detection mechanisms, allowing for rapid switching between active and standby links to reconfigure the network into a linear communication mode upon link failure, using BPDU packets for notification and differential signal diagnosis to identify and address link failures.
This method reduces response time for network reconfiguration, enabling high-speed network reconstruction and meeting the requirements of in-vehicle applications by minimizing downtime and maintaining communication integrity.
Smart Images

Figure 0007854252000001 
Figure 0007854252000002 
Figure 0007854252000003
Abstract
Description
Technical Field
[0002] , , ,
[0005] , ,
[0004] , , , , , , , , ,
[0003] , , ,
[0006] ,
[0001] [Cross - Reference to Related Applications] This application claims priority to Chinese Patent Application No. 202110415169.3, titled "NETWORK ESTABLISHING METHOD AND APPARATUS", filed on April 17, 2021, and incorporates its entire content by reference.
[0002] This application claims priority to Chinese Patent Application No. 202110861508.0, titled "NETWORK ESTABLISHING METHOD, ETHERNET SYSTEM, AND VEHICLE", filed on July 29, 2021, and incorporates its entire content by reference.
[0003] [Technical Field] This application relates to the field of Ethernet, and more specifically, to network establishment methods, Ethernet systems, and vehicles.
Background Art
[0004] To improve the communication security and reliability of vehicle systems, usually, redundant networks are involved in the application process of automotive Ethernet to perform data - link backup. Typical network topologies include T - type networks, dual - linear networks, and ring topologies. Among these network topologies, ring networks are widely used in many application scenarios because of their lowest cost.
[0005] Ring networks inevitably generate layer 2 loops within the layer 2 network. If no measures are taken to eliminate the loops, a series of problems may be caused, such as network broadcast storms and unavailable MAC address entries due to media access control (MAC) address table shocks.
[0006] To eliminate Layer 2 loops, conventional network technologies such as the Spanning Tree Protocol (STP), Rapid Spanning Tree Protocol (RSTP), and Multiple Spanning Tree Protocol (MSTP) are used to perform link pruning and loop elimination actions through node selection. However, due to limitations in the convergence algorithms and mechanisms of protocols like STP, RSTP, and MSTP, the network topology configuration time cannot meet the requirements of automotive applications. [Overview of the Initiative]
[0007] This application provides a network establishment method, an Ethernet system, and a vehicle that reduce the response time for switching between active and standby links, enable high-speed network reconstruction, and meet the requirements of in-vehicle applications.
[0008] According to the first embodiment, a method for establishing a network is provided. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include the first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The method includes the following: The first backbone node obtains link failure information of the ring network. Based on the link failure information, the first backbone node switches its second backbone port to a forwarding state.
[0009] In this application, a first backbone node may acquire link failure information of the ring network. The link failure information is used as an event trigger source. When the first backbone node acquires the information, it switches the blocked port to a forwarding state, enabling the standby link on which the originally blocked port is located. After the port state has been switched, the ring network can be reconfigured into a linear communication network for communication in the event of a link failure. In the prior art, when a link fails, all nodes become silent, and then a new round of node selection and link pruning is performed to re-establish communication connectivity between the remaining links. Compared to the prior art, this application enables a shorter response time for switching between active and standby links, enables faster network reconfiguration, and can meet the requirements of automotive applications.
[0010] Referring to the first embodiment, in some implementations of the first embodiment, the acquisition of link failure information of a ring network by a first backbone node includes the following: The first backbone node receives an advising packet through its first backbone port. The advising packet is used to indicate that a first link has failed. The first link is the link on which the first backbone port of a second backbone node is located.
[0011] Referring to the first embodiment, in some implementations of the first embodiment, the notification packet is a Bridge Protocol Data Unit (BPDU) packet.
[0012] Referring to the first embodiment, in some implementations of the first embodiment, the acquisition of link failure information of the ring network by the first backbone node includes the following: The first backbone node determines that a second link has failed. The second link is the link on which the first backbone port of the first backbone node is located.
[0013] Referring to the first embodiment, some implementations of the first embodiment further include: The first backbone node switches the first backbone port of the first backbone node to a blocked state.
[0014] Referring to the first embodiment, in some implementations of the first embodiment, how the first backbone node determines that the second link has failed includes: The first backbone node determines that the second link has failed through differential signal diagnosis.
[0015] Referring to the first embodiment, in some implementations of the first embodiment, each of the M backbone nodes includes a first identifier. The first identifier is used to identify the backbone nodes in the network.
[0016] Referring to the first embodiment, some implementations of the first embodiment include the following: The first backbone node discovers a first identifier. Based on the first identifier, the first backbone node determines that it is a backbone node in the network.
[0017] According to a second embodiment, a method for establishing a network is provided. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include the first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes excluding the first backbone node. The method includes the following: The second backbone node determines that the first link has failed. The first link is the link on which the first backbone port of the second backbone node is located. The second backbone node sends an alert packet through its second backbone port. The alert packet is used to indicate that the first link has failed.
[0018] In this application, when a first link is determined to have failed, the second backbone node sends a notification packet so that the first backbone node can acquire link failure information for the ring network. The link failure information is used as an event trigger source. When the first backbone node acquires the information, it switches the blocked port to a forwarding state, enabling the standby link on which the originally blocked port is located. After the port state has been switched, the ring network can be reconfigured into a linear communication network for communication in the event of a link failure. In the prior art, when a link fails, all nodes become silent, and then a new round of node selection and link pruning is performed to re-establish communication connectivity between the remaining links. Compared to the prior art, this application can reduce the response time for switching between active and standby links, enable faster network reconfiguration, and meet the requirements of automotive applications.
[0019] Referring to the second embodiment, some implementations of the second embodiment include the following: The second backbone node switches the first backbone port of the second backbone node to a blocked state.
[0020] Referring to the second aspect, in some implementations of the second aspect, the first backbone port of the second backbone node is a master port, and the second backbone port of the second backbone node is a slave port.
[0021] Referring to the second aspect, in some implementations of the second aspect, how the second backbone node determines that the first link has failed includes: The second backbone node determines that the first link has failed through differential signal diagnosis.
[0022] Referring to the second aspect, in some implementations of the second aspect, each of the M backbone nodes includes a first identifier. The first identifier is used to identify the backbone node in the network.
[0023] Referring to the second aspect, some implementations of the second aspect further include: the second backbone node discovers a first identifier; the second backbone node determines, based on the first identifier, that the second backbone node is a backbone node in the network.
[0024] Referring to the second aspect, in some implementations of the second aspect, the notification packet is a Bridge Protocol Data Unit (BPDU) packet.
[0025] According to a third embodiment, a method for establishing a network is provided. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The network further includes terminal nodes. Each terminal node includes a first terminal port and a second terminal port. The first terminal port is in a forwarding state. The second terminal port is in a blocking state. At least two of the M backbone nodes further include a third terminal port. The first and second terminal ports are connected to a third terminal port of at least two backbone nodes. The method includes the following: A terminal node determines that the third link has failed. The third link is the link on which the first terminal port is located. The terminal node switches the second terminal port to forwarding mode.
[0026] In this application, the terminal node may acquire link failure information of the active link and standby link of the terminal node. The link failure information is used as an event trigger source. When the terminal node acquires the information, the terminal node switches the port in the blocked state to the transfer state, enabling the standby link where the port originally in the blocked state is located. Compared with the prior art, in this application, devices other than the terminal node do not need to be involved in control and processing, and the high-speed switching between the active link and the standby link is completed under the configuration logic within the terminal node. Therefore, the response time for switching between the active link and the standby link can be shortened, high-speed network reconstruction can be realized, and the requirements of in-vehicle applications can be satisfied.
[0027] Referring to the third aspect, in some implementation manners of the third aspect, the method includes the following. The terminal node switches the first terminal port to the blocked state.
[0028] Referring to the third aspect, in some implementation manners of the third aspect, how the terminal node determines that the third link has failed includes the following. The terminal node determines that the third link has failed through differential signal diagnosis.
[0029] Referring to the third aspect, in some implementation manners of the third aspect, the terminal node includes a second identifier. The second identifier is used to identify the terminal node within the network.
[0030] Referring to the third aspect, in some implementation manners of the third aspect, the method includes the following. The terminal node detects the second identifier. The terminal node determines, based on the second identifier, that the terminal node is a terminal node within the network.
[0031] According to a fourth embodiment, a network establishment device is provided. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes excluding the first backbone node. The device includes a transceiver unit and a processing unit. Optionally, the device is the first backbone node. The transceiver unit is configured to acquire link failure information of the ring network. The processing unit is configured to switch the second backbone port of the first backbone node to a forwarding state based on link failure information.
[0032] Referring to the fourth aspect, in some implementations of the fourth aspect, the transceiver unit is specifically configured to receive an advising packet through the first backbone port of the first backbone node. The advising packet is used to indicate that the first link has failed. The first link is the link on which the first backbone port of the second backbone node is located.
[0033] Referring to the fourth aspect, in some implementations of the fourth aspect, the notification packet is a Bridge Protocol Data Unit (BPDU) packet.
[0034] Referring to the fourth aspect, in some implementations of the fourth aspect, the processing unit is further configured to determine that a second link has failed. The second link is the link on which the first backbone port of the first backbone node is located.
[0035] Referring to the fourth aspect, in some implementations of the fourth aspect, the processing unit is further configured to switch the first backbone port of the first backbone node to a blocked state.
[0036] Referring to the fourth aspect, in some implementations of the fourth aspect, the processing unit is specifically configured to determine, through differential signal diagnosis, that the second link has failed.
[0037] Referring to the fourth aspect, in some implementations of the fourth aspect, each of the M backbone nodes includes a first identifier. The first identifier is used to identify the backbone node in the network.
[0038] Referring to the fourth aspect, in some implementations of the fourth aspect, the processing unit is further configured to detect a first identifier and determine, based on the first identifier, that the processing unit is a backbone node in the network.
[0039] According to a fifth aspect, a network establishment device is provided. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first and second backbone ports of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes excluding the first backbone node. The device includes a transceiver unit and a processing unit. Optionally, the device is the second backbone node. The processing unit is configured to determine that the first link has failed. The first link is the link on which the first backbone port of the second backbone node is located. The transceiver unit is configured to send an advising packet through the second backbone port of the second backbone node. The advising packet is used to indicate that the first link has failed.
[0040] Referring to the fifth aspect, in some implementations of the fifth aspect, the processing unit is further configured to switch the first backbone port of the second backbone node to a blocked state.
[0041] Referring to the fifth aspect, in some implementations of the fifth aspect, the first backbone port of the second backbone node is a master port, and the second backbone port of the second backbone node is a slave port.
[0042] Referring to the fifth aspect, in some implementations of the fifth aspect, the processing unit is specifically configured to determine, through differential signal diagnosis, that the first link has failed.
[0043] Referring to the fifth aspect, in some implementations of the fifth aspect, each of the M backbone nodes includes a first identifier. The first identifier is used to identify the backbone node in the network.
[0044] Referring to the fifth aspect, in some implementations of the fifth aspect, the processing unit is further configured to detect a first identifier and, based on the first identifier, determine that the processing unit is a backbone node in the network.
[0045] Referring to the fifth aspect, in some implementations of the fifth aspect, the notification packet is a bridge protocol data unit BPDU packet.
[0046] According to the sixth aspect, a network establishment device is provided. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The network further includes terminal nodes. Each terminal node includes a first terminal port and a second terminal port. The first terminal port is in a forwarding state. The second terminal port is in a blocking state. At least two of the M backbone nodes each further include a third terminal port. The first and second terminal ports are connected to a third terminal port of at least two backbone nodes. The device includes a processing unit. Optionally, the device is a terminal node. The processing unit is configured to determine that the third link has failed. The third link is the link on which the first terminal port is located. The processing unit is further configured to switch the second terminal port to a forwarding state.
[0047] Referring to the sixth aspect, in some implementations of the sixth aspect, the processing unit is further configured to switch the first terminal port to a blocked state.
[0048] Referring to the sixth aspect, in some implementations of the sixth aspect, the processing unit is specifically configured to determine, through differential signal diagnosis, that the third link has failed.
[0049] Referring to the sixth aspect, in some implementations of the sixth aspect, a terminal node includes a second identifier. The second identifier is used to identify a terminal node in the network.
[0050] Referring to the sixth aspect, in some implementations of the sixth aspect, the processing unit is further configured to detect a second identifier and determine, based on the second identifier, that the processing unit is a terminal node in the network.
[0051] According to the seventh aspect, a network establishment device is provided. The device includes a memory configured to store a computer program, and a processor configured to execute the computer program stored in the memory, thereby causing the device to perform a method in any possible implementation of the first aspect, or a method in any possible implementation of the second aspect, or a method in any possible implementation of the third aspect.
[0052] According to the eighth aspect, a chip system is provided. The chip system includes a processor configured to call a computer program from memory and execute the computer program, thereby causing a device on which the chip system is installed to perform a method in any possible implementation of the first aspect, or a method in any possible implementation of the second aspect, or a method in any possible implementation of the third aspect.
[0053] According to the ninth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer becomes capable of performing a method in any possible implementation of the first aspect, or a method in any possible implementation of the second aspect, or a method in any possible implementation of the third aspect.
[0054] According to the tenth embodiment, an Ethernet system including M backbone nodes is provided. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes other than the first backbone node.
[0055] The first backbone node is configured to acquire link failure information for the ring network and, based on the link failure information, switch the second backbone port of the first backbone node to a forwarding state.
[0056] Referring to the tenth aspect, in some implementations of the tenth aspect, a second backbone node is configured to determine that a first link has failed, the first link being the link on which the first backbone port of the second backbone node is located, and is configured to send an announcement packet through the second backbone port of the second backbone node. The announcement packet is used to indicate that the first link has failed.
[0057] The first backbone node is specifically configured to receive notification packets through the first backbone port of the first backbone node.
[0058] Referring to the tenth embodiment, in some implementations of the tenth embodiment, the second backbone node is further configured to switch the first backbone port of the second backbone node to a blocked state.
[0059] Referring to the tenth aspect, in some implementations of the tenth aspect, the first backbone port of the second backbone node is a master port, and the second backbone port of the second backbone node is a slave port.
[0060] Referring to the tenth embodiment, in some implementations of the tenth embodiment, the second backbone node is specifically configured to determine that the first link has failed through differential signal diagnosis.
[0061] Referring to the tenth aspect, in some implementations of the tenth aspect, the notification packet is a bridge protocol data unit BPDU packet.
[0062] Referring to the tenth aspect, in some implementations of the tenth aspect, the first backbone node is specifically configured to determine that a second link has failed. The second link is the link on which the first backbone port of the first backbone node is located.
[0063] Referring to the tenth embodiment, in some implementations of the tenth embodiment, the first backbone node is further configured to switch the first backbone port of the first backbone node to a blocked state.
[0064] Referring to the tenth aspect, in some implementations of the tenth aspect, the first backbone node is specifically configured to determine, through differential signal diagnosis, that the second link has failed.
[0065] Referring to the tenth aspect, in some implementations of the tenth aspect, each of the M backbone nodes includes a first identifier. The first identifier is used to identify the backbone node in the Ethernet system.
[0066] Referring to the 10th aspect, in some implementations of the 10th aspect, the Ethernet system further includes terminal nodes. A terminal node includes a first terminal port and a second terminal port. The first terminal port is in a forwarding state. The second terminal port is in a blocking state. At least two of the M backbone nodes each further include a third terminal port. The first terminal port and the second terminal port are connected to the third terminal port of at least two backbone nodes. A terminal node is configured to determine that a third link has failed, the third link being the link on which the first terminal port is located, and is configured to switch the second terminal port to a forwarding state.
[0067] Referring to the tenth embodiment, in some implementations of the tenth embodiment, the terminal node is further configured to switch the first terminal port to a blocked state.
[0068] Referring to the tenth embodiment, in some implementations of the tenth embodiment, the terminal node is specifically configured to determine, through differential signal diagnosis, that the third link has failed.
[0069] Referring to the tenth aspect, in some implementations of the tenth aspect, a terminal node includes a second identifier. The second identifier is used to identify a terminal node in an Ethernet system.
[0070] According to the eleventh aspect, a vehicle is provided that includes an Ethernet system according to either the tenth aspect or one of possible implementations of the tenth aspect. [Brief explanation of the drawing]
[0071] [Figure 1]This is a schematic diagram of an application scenario according to the embodiment of this application. [Figure 2] This is a schematic block diagram of a network establishment method according to an embodiment of this application. [Figure 3] This is a schematic block diagram of an Ethernet system according to an embodiment of this application. [Figure 4] This is a schematic flowchart of the network establishment method according to the embodiment of this application. [Figure 5] This is a schematic block diagram of an Ethernet system according to an embodiment of this application. [Figure 6] This is a schematic diagram of the structure of a network establishment device according to an embodiment of this application. [Figure 7] This is a schematic diagram of the structure of a network establishment device according to an embodiment of this application. [Figure 8] This is a schematic diagram of the structure of a network establishment device according to an embodiment of this application. [Figure 9] This is a schematic diagram of the structure of a network establishment device according to an embodiment of this application. [Figure 10] This is a schematic diagram of the execution logic of the backbone node according to the embodiment of this application. [Figure 11] This is a schematic diagram of the network architecture 1100 according to an embodiment of this application. [Figure 12] This is a schematic diagram of port state switching when a link fails, according to an embodiment of this application. [Figure 13] This is a schematic diagram of port state switching when a backbone node fails, according to an embodiment of this application. [Figure 14] This is a schematic diagram of the transmission path of BPDU packets when a link fails, according to an embodiment of this application. [Figure 15] This is a schematic diagram of the transmission path of BPDU packets on a backbone node according to an embodiment of this application. [Figure 16] This is a schematic diagram of port state switching when a link fails, according to an embodiment of this application. [Modes for carrying out the invention]
[0072] The technical solution of this application will be described below with reference to the attached drawings.
[0073] Figure 1 is a schematic diagram of an application scenario according to an embodiment of this application. As shown in Figure 1, the method provided in this embodiment of this application may be applied to an Ethernet system 100. The Ethernet system 100 may include a domain controller (DC) 110, a vehicle integrated / integration unit (VIU) 120, and vehicle components 130. The DC 110, VIU 120, and vehicle components 130 communicate with each other using Ethernet technology.
[0074] In Figure 1, DC110 includes multiple DCs. Each DC is configured to manage a functional domain within the vehicle; that is, the DC communicates with multiple vehicle components located within the functional domain. DC110 is configured to control vehicle components within a corresponding functional domain, or to provide data processing functions for vehicle components within a corresponding functional domain.
[0075] For example, a DC within a vehicle may include an autonomous driving domain controller, a cockpit domain controller (CDC), a vehicle domain controller (VDC), etc. The autonomous driving domain controller may provide services for vehicle components that enable autonomous driving functions. Vehicle components that enable autonomous driving functions include monocular cameras, binocular cameras, millimeter-wave radar, laser radar, ultrasonic radar, etc. The CDC may provide services for vehicle components within the cockpit domain. Vehicle components within the cockpit domain include head-up displays, instrument displays, radios, navigation systems, cameras, etc. The VDC may provide services for vehicle components within the body domain and vehicle components within the chassis domain. Vehicle components within the body domain include door / window lift controllers, power rearview mirrors, air conditioners, center door locks, etc. Vehicle components within the chassis domain include vehicle components within the braking system, vehicle components within the steering system, and vehicle components such as throttles within the accelerator system.
[0076] Vehicle component 130 includes an execution element. The execution element is configured to perform a specific function, and the execution element may be, for example, a sensor 133 or an actuator 132 in the vehicle. Optionally, vehicle component 130 may further include an electronic control unit (ECU) 131. Vehicle component 130 may include one or more of the following vehicle components: vehicle components having some or all ECU functions, and vehicle components not having electronic control functions. Vehicle component 130 having all electronic control functions may be understood as being able to perform all electronic control functions required by vehicle component 130 by using the ECU 131 of vehicle component 130. Vehicle component 130 having some electronic control functions may be understood as some electronic control functions required by vehicle component 130 being performed by the ECU in vehicle component 130, and other electronic control functions required by vehicle component 130 being performed by the VIU 120. A vehicle component 130 that does not have electronic control functions may be understood as not having an electronic control unit (ECU) for realizing electronic control functions, and all electronic control functions required by the vehicle component 130 being realized by the VIU. The ECU 131 is located inside the vehicle component and is configured to provide electronic control functions for the vehicle component. The ECU 131 is, for example, an electronic control unit in a rain wiper, an electronic control unit located in a vehicle door, etc.
[0077] VIU120 communicates with vehicle component 130 and DC110 within the vehicle. For example, in Figure 1, VIU1 communicates with vehicle component 1, vehicle component 2, and vehicle component 3, and VIU1 communicates with DC1 and DC2. Optionally, VIU120 may also communicate with DCs within DC110. For example, as shown in Figure 1, VIUb communicates with DCn. VIU120 may further communicate with multiple DCs within DC110. For example, as shown in Figure 1, VIU1 may communicate with DC1 and DC2.
[0078] For example, VIU120 transmits control information acquired from DC110 to the corresponding component in vehicle component 130, and controls the component in vehicle component 130 to perform an operation based on the acquired control information, for example, controlling the operation of a rain wiper based on the control information, or in another example, controlling the on / off state of a vehicle door lock based on the control information. VIU120 may also process data to be processed within vehicle component 130, for example, by performing data processing on rainfall information collected using a rain wiper sensing element to determine the operating state of the rain wiper. The operating state includes the frequency of operation or the on / off state of the rain wiper. In another example, VIU120 may perform data processing on fingerprint information on a vehicle door acquired using a door lock sensing element to determine the on / off state information of the vehicle door. VIU120 may further transmit the data processing results to DC110, which generates corresponding control information based on the operating state in the area.
[0079] Currently, ring networks are widely used in automotive Ethernet systems due to their low cost. For example, in system 100, the VIUs may be connected via wired connections to form a ring network. The ring network may also be called a backbone network. Each VIU functions as a backbone node in the ring network. Furthermore, electronic devices within the vehicle (e.g., DC110 and vehicle component 130 in Figure 1) may be connected to the ring network, thereby enabling communication between the electronic devices within the vehicle and the ring network. Devices accessing the ring network may be called terminal nodes.
[0080] Using a ring network inevitably creates Layer 2 loops within the Layer 2 network. Typically, to eliminate Layer 2 loops, protocols such as the spanning tree protocol (STP), rapid spanning tree protocol (RSTP), and multiple spanning tree protocol (MSTP) may be used to perform link pruning and loop elimination through node selection. However, due to limitations in the convergence algorithms and mechanisms of protocols like STP, RSTP, and MSTP, the network topology configuration time cannot meet the requirements of automotive applications.
[0081] With this in mind, this application provides a network establishment method, an Ethernet system, and a vehicle that reduce the response time for switching between active and standby links, enable high-speed network reconstruction, and meet the requirements of in-vehicle applications.
[0082] Figure 2 is a schematic block diagram of a network establishment method 200 according to an embodiment of this application. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. The ring network may also be called a backbone network. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes other than the first backbone node.
[0083] In this application, the network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port, where M is an integer greater than 2. Within the ring network, the second backbone port of the first backbone node may be set to a blocked state, and both the first and second backbone ports of any of the M backbone nodes other than the first backbone node are in a forwarding state to avoid a Layer 2 loop. In this case, the link on which the blocked port is located may also be called a standby link. Two pairs of these forwarding ports are connected to each other to form an active link. The network establishment method 200 includes the following steps:
[0084] S210: The first backbone node obtains link failure information for the ring network.
[0085] In this application, a link failure includes, but is not limited to, the following possibilities: a link failure caused by a loose backbone port of a backbone node; a link failure caused by a power failure of any connected backbone node on the link; or a link failure caused by a short circuit, open circuit or disconnection of a communication cable on the link.
[0086] In this application, it should be understood that a backbone port is a port used to form a ring network and located within a port of a backbone node. A single backbone node may include two backbone ports, each of which is connected to a single backbone node.
[0087] In possible implementations, link failure information includes the failure of the first link. The first link is the link on which the first backbone port of the second backbone node is located. In S210, the acquisition of link failure information of the ring network by the first backbone node includes the following:
[0088] The second backbone node determines that the first link has failed. The second backbone node sends an announcement packet through its second backbone port. The announcement packet is used to indicate that the first link has failed. Correspondingly, the first backbone node may receive the announcement packet through its first backbone port.
[0089] In other words, when a second backbone node detects that the first link has failed, the failure information may trigger the second backbone node to send a notification packet. The notification packet is used to indicate the link failure information. The second backbone node may send the notification packet through its second backbone port. The notification packet may be forwarded by each backbone node in the ring network. The first backbone node receives the notification packet through its first backbone port and obtains the link failure information for the ring network based on the notification packet.
[0090] In this application, failure of the first link includes, but is not limited to, the following possibilities: a link failure caused by a loose first backbone port of a second backbone node; a link failure caused by a power failure at one port of a connected backbone node on the first link; or a link failure caused by a short circuit, open circuit or break of a communication cable on the first link.
[0091] It should be noted that when a link or node in a ring network fails, link failure information can be detected by two connected backbone nodes on the failed link, or by two backbone nodes connected to the failed node. The failure information is used as a trigger source for an announcement packet. Therefore, each of the two second backbone nodes forwards the announcement packet through a port within the two second backbone nodes that is capable of normal communication. In other words, since there are two second backbone nodes in the ring network that perform the step of sending an announcement packet separately, there are two announcement packets in the ring network. The announcement packets are transmitted in opposite directions within the ring network. One announcement packet arrives at the second backbone port of the first backbone node, but is discarded at the port because the port is in a blocked state. The other announcement packet arrives at the first backbone port of the first backbone node. Since the first backbone port of the first backbone node is in a forwarding state, the first backbone node may receive the announcement packet through the port. When the first backbone node receives a notification packet, it learns that a link has failed within the ring network. In other words, the first backbone node obtains link failure information based on the notification packet.
[0092] It should be understood that the notification packet in this application is a notification packet that occurs when a link fails. A link failure triggers the transmission of a notification packet. When the link is not failing, the transmission of a notification packet is not triggered. Therefore, when a first backbone node receives a notification packet, it is assumed that a link in the ring network has failed. When no packet is received, the link is assumed to be normal. Certain information contained in the notification packet may or may not carry specific information about the failed link, i.e., information indicating a specific failed link. This is not limited to this application.
[0093] In possible implementations, link failure information includes the failure of a second link. The second link is the link on which the first backbone port of the first backbone node is located. In S210, the acquisition of link failure information for the ring network by the first backbone node includes the following: The first backbone node determines that the second link has failed.
[0094] In this application, the first backbone node may obtain fault information for the link on which the first backbone port of the first backbone node is located. In other words, if a second link in the ring network fails, the first backbone node may obtain fault information for the first backbone port based on the port performance of the first backbone node. In this case, the second backbone port of the first backbone node cannot communicate with the outside, and the first backbone port of the first backbone node is in a blocked state. Therefore, no notification packets are received.
[0095] In this application, if a first link in the ring network fails, the first backbone node may obtain link failure information by receiving a notification packet through the first backbone port of the first backbone node. If a second link fails, the first backbone node may obtain link failure information directly.
[0096] In this application, failure of the second link includes, but is not limited to, the following possibilities: a link failure caused by a loose first backbone port of a first backbone node; a link failure caused by a power failure at one port of a connected backbone node on the second link; or a link failure caused by a short circuit, open circuit or break of a communication cable on the second link.
[0097] S220: Based on link failure information, the first backbone node switches the second backbone port of the first backbone node to forwarding mode.
[0098] When link failure information is received, the first backbone node switches the blocked second backbone port to a forwarding state. In other words, the first backbone node, based on the link failure information, learns that a link has failed within the current ring network and therefore may immediately switch the originally blocked second backbone port to a forwarding state to enable the standby link within the ring network. In this case, all healthy nodes may continue to perform normal communication through the linear communication network formed by the standby link and the non-failed link, and may complete communication in the failed state. This ensures the communication security of the Ethernet system.
[0099] In this application, a first backbone node may acquire link failure information of the ring network. The link failure information is used as an event trigger source. When the first backbone node acquires the information, it switches the blocked port to a forwarding state, enabling the standby link on which the originally blocked port is located. After the port state has been switched, the ring network can be reconfigured into a linear communication network for communication in the event of a link failure. In the prior art, when a link fails, all nodes become silent, and then a new round of node selection and link pruning is performed to re-establish communication connectivity between the remaining links. Compared to the prior art, this application enables a shorter response time for switching between active and standby links, enables faster network reconfiguration, and can meet the requirements of automotive applications.
[0100] In this application, it should be noted that the forward state of a port means that the port can transmit physical layer signals or packets at Layer 2 and higher layers. The block state of a port means that the port can transmit physical layer signals but cannot transmit packets at Layer 2 and higher layers. Packets at Layer 2 and higher layers are discarded when passing through the port.
[0101] In this application, the link is a linear link between two nodes; in other words, it should be understood that there are no other nodes between the two nodes.
[0102] Optionally, if the first link fails, the method further includes the following: S230-a: The second backbone node switches the first backbone port of the second backbone node to a blocked state.
[0103] In this application, after the first link fails, the second backbone node may switch the first backbone port of the second backbone node to a blocked state. In this way, after the first link is successfully restored, one port remains blocked within the ring network. This avoids the formation of a network storm.
[0104] It should be noted that if the first link fails, the two second backbone nodes on the ring network will each perform the step of sending notification packets separately. However, only one of the two second backbone nodes will switch its first backbone port to a blocked state.
[0105] In this application, it should be understood that the second backbone node transmits a notification packet and the first backbone node receives a notification packet. It is not limited whether the notification packet is forwarded by other backbone nodes in the transmission process. Specifically, the second backbone node may transmit the notification packet directly to the first backbone node through the link between the first and second backbone nodes. Alternatively, the second backbone node may first transmit the notification packet to a backbone node connected to the second backbone node, and the notification packet arrives at the first backbone node after being forwarded once or more times.
[0106] Optionally, before S220, the second backbone node switches its first backbone port to a blocked state.
[0107] In other words, before sending notification packets, the second backbone node switches its first backbone port to a blocked state. Thus, before the first backbone port of the second backbone node is switched to a blocked state, the second backbone port of the first backbone node is not switched to a forwarding state, and the first link is not restored properly. This helps to ensure network security.
[0108] Optionally, the first backbone port of the second backbone node is the master port, and the second backbone port of the second backbone node is the slave port.
[0109] In peer-to-peer (P2P) communication, two connected ports in a link are configured as a master port and a slave port, respectively. Furthermore, within a ring network, any link is always connected by using a master port and a slave port in pairs. Communication fails if two master ports or two slave ports are directly connected. In a link formed by connecting a master port and a slave port in pairs, the master port actively sends a handshake signal to the slave port to establish a communication connection with the slave port.
[0110] In this application, two second backbone nodes that send notification packets after a first link fails may detect whether the first backbone port of the two second backbone nodes is a master port. When the first backbone port of the two second backbone nodes is a master port, the second backbone node switches the first backbone port of the second backbone node to a blocked state. In other words, after a link fails, the connected master port in the failed link is set to a blocked state. Thus, after the failed link is successfully restored, the master port in the link remains in a blocked state. This can reduce communication overhead by avoiding handshake signals on the link.
[0111] Optionally, in the solution of this application, the first backbone port of the second backbone node may alternatively be a master port, and the second backbone port of the second backbone node may be a slave port. In other words, a connected slave port in a faulty link may be switched to a blocked state. This is not limited to this application.
[0112] In other words, when the node switching logic is configured, if a link fails, the second backbone node may detect whether its second backbone port is a master port. If the second backbone port is a master port, the second backbone node switches its second backbone port to a blocked state. Alternatively, the configuration may be as follows: The second backbone node detects whether its second backbone port is a slave port. If the second backbone port is a slave port, the second backbone node switches its second backbone port to a blocked state. Regardless of the above configuration, it should be understood that the switching logic configured on each backbone node should be the same to avoid switching confusion.
[0113] It should be understood that both the first and second backbone ports of the second backbone node are in a forwarding state. In possible implementations, the first link may alternatively be the link on which the second backbone port of the second backbone node is located, thereby allowing the port transmitting the notice packet to alternatively be the first backbone port of the second backbone node. This is not limited to this application.
[0114] In possible implementations, notification packets are bridge protocol data unit (BPDU) packets.
[0115] This application allows the use of BPDU packets in existing STP / RSTP protocols, with modified trigger conditions for BPDU packets to achieve faster network reconstruction, better compatibility with existing protocols, and reduced excessive configuration operations. Therefore, BPDU packets are simple and easy to implement.
[0116] Optionally, notification packets may also be Internet Group Management Protocol (IGMP) broadcast packets, meaning link failure information is transmitted via broadcast. Alternatively, notification packets may be directed multicast packets. All backbone nodes form multicast groups and send multicast packets to notify. Alternatively, notification packets may be media access control (MAC) multicast packets. Link failure information is notified using MAC layer multicast packets. Optionally, notification packets may also be directional unicast packets, which are transmitted directionally by backbone nodes.
[0117] In this application, it should be understood that notification packets may be generated by the backbone node before the backbone node detects a link failure, i.e., link failure information is used only as a trigger source for the backbone node to send notification packets. Alternatively, after detecting a link failure, the backbone node may generate and then send notification packets. This is not limited to this application.
[0118] It should be understood that the specific types of notification packets described above are merely illustrative examples. The format and naming of notification packets are not limited in this application, provided that they achieve similar functionality as those described herein, namely, notification packets that are sent when a link fails, or notification packets that enable a port in a ring network that was originally blocked to switch to a forwarding state, all of which fall within the scope of protection of this application.
[0119] Optionally, if the second link fails, the method further includes the following: S230-b: The first backbone node switches the first backbone port of the first backbone node to a blocked state.
[0120] When the first backbone node determines that the second link has failed, it switches its first backbone port to a blocked state. Thus, when the second link is successfully restored, one port in the ring network remains blocked. This prevents network storms and ensures communication security.
[0121] Optionally, the first backbone node executes S230-b before S220, that is, the first backbone node first switches its first backbone port to a blocking state before switching its second backbone port to a forwarding state.
[0122] It should be understood that the first backbone port of the first backbone node may be either a master port or a slave port. Correspondingly, the second backbone node of the first backbone node may be either a slave port or a master port. That is, in the initial state, any block-state port in the ring network may be either a master port or a slave port. This is not limited to this application.
[0123] It should be further understood in this application that while the physical hardware of the master port and the physical hardware of the slave port are the same, their port configurations are different. For example, different identifiers may be configured for the two ports to distinguish between the master port and the slave port.
[0124] In possible implementations, the fourth link may be the link on which the second backbone port of the first backbone node is located, and the second backbone port of the first backbone node is directly connected to the first backbone port of the second backbone node. That is, the fourth link and the first link may be the same link. When the first link (fourth link) fails, the first backbone node may detect that the link on which the second backbone port of the first backbone node is located has failed. Furthermore, the second backbone node may send an alert packet through its second backbone node so that the first backbone node may receive the alert packet through its first backbone port. When the first backbone node detects that the link on which the second backbone port of the first backbone node is located has failed, or when it receives an alert packet, it may switch the second backbone port of the first backbone node to a forwarding state. Optionally, the first backbone node may further determine its second backbone port as a master port (or slave port) and further switch its second backbone port back to a blocked state. Alternatively, the second backbone node may further determine its first backbone port as a master port (or slave port) and further switch its first backbone port back to a blocked state.
[0125] Optionally, when the first backbone node detects that the fourth link has failed, it confirms that the standby link in the ring network has failed. Therefore, even if a notification packet is received, the port state does not need to be switched.
[0126] In possible implementations, how the second backbone node determines that the first link has failed includes the following: The second backbone node determines that the first link has failed through differential signal diagnostics.
[0127] Differential signal diagnostics is a link diagnostic technique at the Ethernet physical layer. Specifically, a node may detect the voltage difference and carrier waveform transmitted over a twisted pair connected to the node's port. If the transmitted voltage difference and / or carrier waveform are abnormal, a link failure may be determined.
[0128] Therefore, in this application, link failures are detected through differential signal diagnostics, thereby enabling rapid detection of link failures. Furthermore, the response time for switching between active and standby links is reduced, enabling high-speed network reconstruction and ensuring the requirements of automotive applications.
[0129] Optionally, in this application, how the second backbone node determines that the first link has failed may be as follows: The second backbone node determines that the first link has failed by using a connection check packet.
[0130] Specifically, the second backbone node may periodically send connectivity check packets on the first backbone port of the second backbone node. The second backbone node determines whether the first link is functioning correctly by determining whether response packets from other connected ports in the first link have been received within the valid time.
[0131] It should be understood that the above-described fault diagnosis and detection methods are merely examples and do not constitute a limitation to this application. Those skilled in the art may also detect link faults in other ways. For example, the link-up status can be detected through link heartbeats.
[0132] Similarly, how the first backbone node determines that the second link has failed includes the following: The first backbone node determines that the second link has failed through differential signal diagnostics. Alternatively, the first backbone node determines that the second link has failed by using connection check packets. Alternatively, other methods may be used.
[0133] In a possible implementation, each of the M backbone nodes contains a first identifier. This first identifier is used to identify the backbone nodes within the network.
[0134] In this application, the first identifier is configured for backbone nodes in a ring network, so that a backbone node having the first identifier either transmits an alert packet based on the link state, or, upon receiving an alert packet, switches a blocked port to a forwarding state. Alternatively, upon receiving an alert packet, the backbone node continues to forward the alert packet within the ring network to enable switching between active and standby links and network reconfiguration. Nodes that do not have the first identifier do not belong to the backbone nodes in the ring network and do not transmit or identify alert packets. In other words, backbone nodes in a network may be distinguished by using the first identifier.
[0135] The above method is merely an example for illustrative purposes. Alternatively, backbone nodes may be identified by using other nodes in the network to distinguish backbone nodes from non-backbone nodes. This is not limited to this application.
[0136] Optionally, method 200 further includes S240. The first backbone node discovers a first identifier. Based on the first identifier, the first backbone node determines that it is a backbone node in the network.
[0137] Similarly, method 200 further includes S250. The second backbone node detects the first identifier. Based on the first identifier, the second backbone node determines that it is a backbone node in the network.
[0138] In possible implementations, the first identifier may be a value written to a register and is used to identify the backbone node. The backbone node is determined by powering on the node and reading the value in the register. Furthermore, backbone node switching logic is executed. For example, if the link on which a forwarding backbone port is located fails, the notification packet is sent through another forwarding backbone port. Alternatively, if a port on a backbone node is in a blocked state, the backbone node may switch the blocked port to a forwarding state upon receiving a notification packet. Alternatively, if two backbone ports on a backbone node are in a forwarding state and the backbone node receives a notification packet, the backbone node continues to forward the notification packet within the ring network.
[0139] The following describes the backbone node configuration process and the power-on detection process.
[0140] Step 1: Configure the network access device as a backbone node, for example by using a first identifier to identify the backbone node, and configure the two backbone ports of the backbone node.
[0141] Step 2: Configure port familiarity for all backbone ports on all backbone nodes, identify the state of the backbone ports, and specify that one port on each backbone node should be in a blocked state and all other ports should be in a forwarding state. Configure the execution logic for each backbone node.
[0142] Step 3: Configure the power-on networking time jitter difference register to configure the power-on startup time jitter difference and eliminate network switching flapping caused by the power-on jitter difference.
[0143] Step 4: Power on the backbone node to activate its operating state and execution logic. The execution logic of the backbone node is the network establishment method 200 described above.
[0144] Step 5: If the running logic includes a backbone node switching limit, when any port on the backbone node reaches its switching limit, the port stops switching states, retains its current last configured state, and sends a network link exception notification and limit exceeded port switching information. After a restart or software clear, the state alarm is cleared and functionality is restored.
[0145] The above method 200 is described below with reference to an example in Figure 3. Figure 3 is a schematic block diagram of an Ethernet system 300 according to an embodiment of this application.
[0146] As shown in Figure 3, the Ethernet system 300 includes four backbone nodes, namely node 310, node 320, node 330, and node 340, i.e., M=4. Each of nodes 310, 320, 330, and 340 includes two backbone ports P1 and P2. Ports P1 and P2 are connected in pairs to form a ring network. For ease of explanation, the link connecting port P2 of node 310 to port P1 of node 340 is called link L1. L1 may also be called the link where port P2 of node 310 is located, or the link where port P1 of node 340 is located. Similarly, L4 is the link where port P2 of node 320 is located, or the link where port P1 of node 310 is located. L2 is the link where port P2 of node 330 is located, or the link where port P1 of node 320 is located. L3 is the link where port P2 of node 340 is located, or the link where port P1 of node 330 is located. Port P1 of node 310 (the first backbone node) (one side of the first backbone port) is in a forwarding state. Port P2 of node 310 (one side of the second backbone port) is in a blocked state. Ports P1 and P2 of any node other than node 310, namely nodes 320, 330, and 340, are in a forwarding state. This avoids a Layer 2 loop. In this case, L1 is a standby link, and L2, L3, and L4 form active links.
[0147] It should be understood that since port P2 of node 310 is in a blocked state, Layer 2 and higher layer packets cannot be forwarded as they pass through the port, but the L1 link is functioning normally. Specifically, Layer 2 and higher layer packets sent by node 340 through port P1 may be transmitted through link L1 to port P2 of node 310, but they will not be forwarded when they arrive at port P2 of node 310.
[0148] When link L2 (one side of the first link) fails at some point, node 320 (one side of the second backbone node) may detect that the link on which node 320's port P1 (one side of the second backbone port) is located has failed. The failure information is used as a trigger source. Node 320 sends a BPDU packet (one side of the notification packet) through node 320's port P2. The BPDU packet travels through link L4. Node 310 receives the BPDU packet through node 310's port P1. Upon receiving the BPDU packet, node 310 learns that a link has failed in the ring network. Therefore, node 310 immediately switches node 310's port P2 to forwarding mode, thereby enabling standby link L1.
[0149] When link L2 fails, node 330 also detects that the link on which node 330's port P2 (one side of the second backbone port) is located has failed. The failure information is used as a trigger source. Node 330 also sends a BPDU packet, and node 330 sends the BPDU packet through node 330's port P1. The BPDU packet travels through link L3. Node 340 receives the BPDU packet through node 340's port P2. Node 340 determines that node 340's port P1 is in a forwarding state and therefore forwards the BPDU packet through node 340's port P1. However, because node 310's port P2 is in a blocked state, node 310 cannot receive the BPDU packet through node 310's port P2.
[0150] From the above, it can be seen that when link L2 fails, node 310 learns that a link has failed in the ring network, triggered by a notification packet, and therefore immediately switches port P2 of node 310 to forwarding mode, thereby enabling standby link L1. Furthermore, the new linear link formed by links L4, L1, and L3 may still be used for normal communication between nodes 310, 320, 330, and 340. Compared to methods such as a new round of node selection in the present invention, this invention can reduce the response time for switching between active and standby links, enable high-speed network reconstruction, and satisfy the requirements of automotive applications.
[0151] Optionally, node 330 further blocks port P2 of node 330, or node 320 further blocks port P1 of node 320.
[0152] Optionally, the method further includes restoring L2 to normal operation and using L2 to restore the physical connection between node 320 and node 330. One of port P1 on node 320 and port P2 on node 330 is blocked and cannot transfer data. In this case, the ring network is restored to its initial state, and L2 becomes the new standby link in the ring network.
[0153] Optionally, before node 330 sends a BPDU packet, node 330 switches port P2 of node 330 to a blocked state. Alternatively, before node 320 sends a BPDU packet, node 320 switches port P1 of node 320 to a blocked state.
[0154] In a possible implementation, all ports P1 in Figure 3 are configured as master ports, and all ports P2 are configured as slave ports. When port switching is performed, the connected master ports in the faulty link may be switched to a blocked state by default. Specifically, port P1 on node 320 is set to a blocked state, and port P2 on node 330 remains in a forwarding state.
[0155] Optionally, when port switching is performed, connected slave ports in the faulty link may be switched to a blocked state by default. Specifically, port P2 on node 330 is set to a blocked state, while the state of port P1 on node 320 remains unchanged and is still in a forwarding state.
[0156] Optionally, when link L2 fails, this could also be a failure of node 330 (e.g., a power failure). As a result, links L2 and L3 fail simultaneously. In this case, node 340 detects that the link on which node 340's port P2 is located has failed and therefore sends a BPDU packet through node 340's port P1. Node 320 detects that the link on which node 320's port P1 is located has failed and therefore sends a BPDU packet through node 320's port P2. For the execution logic of node 340, refer to node 330 above. The execution logic of node 320 is the same as that of node 320 above. Details will not be explained again here.
[0157] Optionally, if link L4 (one side of the second link) fails within the ring network shown in Figure 3, node 310 may determine that the link on which node 310's port P1 is located has failed. Based on the link failure information, node 310 switches port P2 of node 310 to forwarding mode, thereby enabling standby link L1.
[0158] Optionally, if link L4 fails, node 310 may further switch its port P1 to a blocked state.
[0159] For example, in the ring network shown in Figure 3, if link L1 (one side of the fourth link) fails, node 310 detects that the link on which node 310's port P2 is located has failed, and node 340 (one side of the second backbone node) also detects that the link on which node 340's port P1 is located has failed. Therefore, a BPDU packet is sent through node 340's port P2. The BPDU packet is used to notify of a link failure within the ring network. The BPDU packet is forwarded by nodes 330 and 320, and node 310 receives the BPDU packet through node P1 of node 310. Optionally, when node 310 detects that the link on which node 310's port P2 is located has failed, or when it receives a BPDU packet, node 310 may learn that a link has failed within the ring network and switch node 310's port P2 to forwarding mode.
[0160] Optionally, in Figure 3, all ports P1 are configured as master ports and all ports P2 are configured as slave ports. When a port switchover is performed, the master port connected to the faulty link may be switched to a blocked state by default. Specifically, when L1 fails, node 340 may switch port P1 of node 340 to a blocked state, while the state of port P2 of node 310 remains unchanged and is still in a forwarding state. Alternatively, when a port switchover is performed, the slave ports connected to the faulty link may be switched to a blocked state by default. Specifically, when L1 fails, node 310 may switch port P2 of node 310 to a blocked state, while the state of port P1 of node 340 remains unchanged and is still in a forwarding state. In other words, there may be two cases after a state switchover. 1. Port P2 on node 310 is in forwarding state, and port P1 on node 340 is in blocking state, or 2. Port P2 on node 310 remains blocked, and port P1 on node 340 remains forwarding.
[0161] Optionally, if link L1 fails, node 310 may determine that the link on which node 310's port P2 is located has failed and that node 310's port P2 is in a blocked state. In other words, node 310 may determine that the standby link in the ring network has failed. Therefore, when a BPDU packet is received, a state switch does not necessarily have to be performed.
[0162] In Figure 3, each of nodes 310, 320, 330, and 340 includes identifier a. To perform method 200 described above, the backbone node is determined by powering on the node and reading the value a in the register.
[0163] In Figure 3, the method for determining link failures by nodes 310, 320, 330, and 340 is described above. Further details will not be explained here.
[0164] It should be understood that in Figure 3, an example is used for illustrative purposes in which only four backbone nodes are connected to form a ring network. The number of backbone nodes forming the ring network may be, alternatively, 3, 5, 128, etc. This is not limited to this application.
[0165] Figure 4 is a schematic flowchart of the network establishment method 400 according to an embodiment of this application. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes excluding the first backbone node. The network further includes terminal nodes. Each terminal node includes a first terminal port and a second terminal port. The first terminal port is in a forwarding state. The second terminal port is in a blocking state. Of the M backbone nodes, at least two backbone nodes each further include a third terminal port. The first terminal port and the second terminal port are connected to the third terminal ports of at least two backbone nodes.
[0166] In this application, the ring network may have access to one or more additional terminal nodes. The terminal nodes are connected to two backbone nodes in the ring network by using a first terminal port and a second terminal port of the terminal node. The first terminal port of the terminal node may be set to a forwarding state, and the second terminal port may be set to a blocking state. That is, the link on which the first terminal port is located is an active link, and the link on which the second terminal port is located is a secondary link, thereby providing redundant access for the terminal nodes. As shown in Figure 4, Method 400 includes the following steps.
[0167] S410: The terminal node determines that the third link has failed. The third link is the link on which the first terminal port is located.
[0168] In this application, failure of the third link includes, but is not limited to, the following possibilities: a link failure caused by a loosened first terminal port of a terminal node; a link failure caused by a power failure of a backbone node of another connected port in the third link; or a link failure caused by a short circuit, open circuit, or break of a communication cable on the third link.
[0169] S420: The terminal node switches the second terminal port to forwarding mode.
[0170] In other words, when a terminal node determines that the third link has failed, it may switch the second terminal port from a blocked state to a forwarding state, thereby enabling the standby link on which the blocked port is located. This ensures communication security.
[0171] In this application, a terminal node may acquire link failure information for its active and standby links. This link failure information is used as an event trigger source. When the terminal node acquires this information, it switches the blocked port to a forwarding state, thereby enabling the standby link on which the originally blocked port is located. Compared to the prior art, in this application, devices other than the terminal node do not need to be involved in control and processing, and the high-speed switching between the active and standby links is completed under configuration logic within the terminal node. Therefore, the response time for switching between the active and standby links can be reduced, enabling high-speed network reconstruction and meeting the requirements of automotive applications.
[0172] Optionally, before the terminal node switches the second terminal port to forwarding state, method 400 further includes S430: The terminal node switches the first terminal port to blocking state.
[0173] In other words, a terminal node may switch the connected second terminal port in the first link to a blocked state, thereby making the first link a standby link and the link where the first terminal port is located an active link. In this way, accessing the terminal node after the third link has been successfully restored does not create a new ring network topology and a complex network with multiple nested rings. This ensures the reliability of the communication system.
[0174] Furthermore, after the third link has been successfully restored, there are still two links on which the terminal node accesses the ring network: one active link and one standby link. In this way, it may be possible to prevent both links on the terminal node from communicating with the ring network. This solves the problem that a complex network topology can be constructed due to redundant access from terminal nodes and improves the reliability of redundant access from critical terminal nodes.
[0175] In possible implementations, how the terminal node determines that the third link has failed in S410 includes the following: The terminal node determines that the third link has failed through differential signal diagnostics.
[0176] For a detailed explanation of differential signal diagnosis, please refer to Method 200 above. Further details will not be explained here.
[0177] In this application, link failures are detected through differential signal diagnostics, thereby enabling rapid detection of link failures. Furthermore, response times for switching between active and standby links are reduced, enabling high-speed network reconstruction and ensuring the requirements of automotive applications.
[0178] In other words, this application enables switching between the active and standby links to be achieved at the physical layer, thereby increasing efficiency.
[0179] Optionally, in this application, how the terminal node determines that the third link has failed in S410 may be as follows: The terminal node uses a connection check packet, Third It is determined that the link has failed.
[0180] It should be understood that the above-described fault diagnosis and detection methods are merely examples and do not constitute a limitation to this application. Those skilled in the art may also detect link faults in other ways. For example, the link-up status can be detected through link heartbeats.
[0181] It should be understood that in this application, link failures include, but are not limited to, link failures caused by a loose port, link failures caused by a power failure in a backbone node, or link failures caused by a short circuit or open circuit in a communication cable on the link.
[0182] Optionally, in method 400, the terminal node includes a second identifier. The second identifier is used to identify the terminal node in the Ethernet system.
[0183] In this application, the second identifier is configured for terminal nodes in an Ethernet system, thereby ensuring that terminal nodes having the second identifier do not identify or forward notification packets within the Ethernet system, nor do they switch port states under the influence of notification packets. In other words, terminal nodes having the second identifier only monitor the status of the terminal node's active and standby links and do not participate in the switching logic of the backbone network.
[0184] The above method is merely an example for illustrative purposes. Alternatively, terminal nodes may be identified by using other nodes in the Ethernet system to distinguish between terminal nodes and non-terminal nodes.
[0185] Optionally, method 400 further includes: S440: The terminal node discovers a second identifier. Based on the second identifier, the terminal node determines that it is a terminal node in the network.
[0186] In possible implementations, the second identifier may be a value written to a register and is used to identify the terminal node. The terminal node is determined by powering it on and reading the value in the register. Furthermore, the terminal node switching logic is executed. Specifically, if the link on which the terminal port is located fails, the standby link is enabled to complete the switch between the active and standby links. This ensures communication security.
[0187] In this application, it should be understood that when a terminal node determines that the link on which the second terminal port is located has failed, the terminal node does not need to perform any action. When the link on which the second terminal port is located is restored successfully, the second terminal port remains in a blocked state, and the link on which the second terminal port is located remains a standby link.
[0188] Therefore, in this application, a first identifier and a second identifier are used so that the switching logic of the terminal nodes and the switching logic of the backbone nodes are independent of each other and do not interfere with each other. This helps to improve the reliability and simplicity of the Ethernet system.
[0189] The following describes the configuration process and power-on detection process for terminal nodes.
[0190] Step 1: Configure the network access device as a terminal node, identify the terminal node by using a second identifier, for example, and configure two terminal ports on the terminal node.
[0191] Step 2: Set one of the terminal node's two terminal ports to a blocked state and the other to a forwarding state, configure the terminal node's execution logic, and connect the terminal node to the backbone node of the ring network.
[0192] Step 3: Configure the power-on networking time jitter difference register to configure the power-on startup time jitter difference and eliminate network switching flapping caused by the power-on jitter difference.
[0193] Step 4: Power on the terminal node to activate its operating state and execution logic. The execution logic of the terminal node is the network establishment method 400 described above.
[0194] Step 5: If the execution logic includes terminal node switching limits, when a terminal node meets the configured limits, the terminal node is either disabled, re-enabled until the signal quality of the active and standby links is restored, enabled after the next reboot and power-up, or the management device configures subsequent actions. If no switching limits are configured, terminal devices perform free-form diagnostics and switching based on link signal quality and configuration.
[0195] The above method 400 is described below with reference to the example shown in Figure 5. Figure 5 is a schematic block diagram of an Ethernet system 500 according to an embodiment of this application.
[0196] As shown in Figure 5, the Ethernet system 500 includes four backbone nodes, namely node 310, node 320, node 330, and node 340, i.e., M=4. Each of nodes 310, 320, 330, and 340 includes two backbone ports P1 and P2. Ports P1 and P2 are connected in pairs to form a ring network. The Ethernet system 500 further includes a terminal node, namely node 510. Node 510 includes port P1 (one side of the first terminal port) and port P2 (one side of the second terminal port). Port P1 of node 510 is in forwarding state. Port P2 of node 510 is in blocking state. Each of nodes 310 and 330 further includes port P3 (one side of the third terminal port). Port P3 of node 310 is connected to port P1 of node 510 to form link L5. Port P3 of node 330 is connected to port P2 of node 510, forming link L6.
[0197] In Figure 5, node 510 accesses the ring network through port P3 of node 310 (one side of the third terminal port) and port P3 of node 330 (one side of at least two backbone nodes) to achieve redundant access. If any terminal port of node 510, for example port P2, is set to a blocked state, link L6 can transmit only physical layer signals but not data. Therefore, L6 is a standby link. Furthermore, port P1 of node 510 is in a forwarding state, i.e., link L5 is an active link. Node 510 may also communicate with the ring network through L5.
[0198] When L5 (one side of the third link) fails, node 510 detects that the link on which node 510's port P2 is located has failed. The failure information is used as an event trigger source, which allows node 510 to switch node 510's port P2 to a forwarding state, i.e., the standby link is enabled, thereby allowing node 510 to communicate with the ring network through L6. Thus, this invention can reduce the response time for switching between the active and standby links, enable high-speed network reconstruction, and satisfy the requirements of automotive applications.
[0199] Optionally, L5 may further block port P1 of L5 to prevent both links of the terminal node from communicating with the ring network. This solves the problem of complex network topologies that can be constructed due to redundant access of terminal nodes and improves the reliability of redundant access for critical terminal nodes.
[0200] For example, an L5 failure could be caused by a failure of node 310, a failure caused by an abnormal port P3 of node 310, or a failure caused by an abnormal L5 cable.
[0201] Optionally, node 510 determines that L5 has failed through differential signal diagnostics.
[0202] Optionally, node 510 includes identifier b. After power-up, node 510 determines that it is a backbone node by reading the value b in the register and performs method 400 above.
[0203] Optionally, method 400 further includes restoring L5 and using L5 to restore the physical connection between node 510 and node 310. Port P1 of node 510 is in a blocked state and cannot transfer data. In this case, L5 becomes the new standby link for node 510.
[0204] It should be understood that in Figure 5, an example is used for illustrative purposes in which only four backbone nodes are connected to form a ring network. The number of backbone nodes forming the ring network may be 3, 5, 128, etc., as is not limited in this application. Furthermore, in Figure 5, the backbone nodes connected to node 510 may be any two of the backbone nodes among nodes 310, 320, 330, and 340. Furthermore, two or more terminal nodes may be accessed within the ring network, and the backbone nodes connected to multiple terminal nodes may be the same or different, as is not limited in this application.
[0205] In possible implementations, methods 200 and 400 may be combined to form other network establishment methods. For example, the network includes M backbone nodes and at least one terminal node. The procedure in method 200 is used to switch between active and standby links in the backbone network. The procedure in method 400 is used to switch between active and standby links in the terminal node. For specific procedures, refer to the descriptions of methods 200 and 400. Further details are not provided here.
[0206] The method for establishing a network in this application has been described above with reference to Figures 1 to 5. The apparatus in the embodiment of this application will now be described with reference to Figures 6 to 8. It should be understood that the apparatus shown in Figures 6 to 8 may implement the steps in the method described above. For brevity, further details will not be explained here.
[0207] Figure 6 is a schematic diagram of the structure of a network establishment device according to an embodiment of this application. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes excluding the first backbone node.
[0208] As shown in Figure 6, the device 600 may include a transceiver unit 610 and a processing unit 620. Optionally, the device is a first backbone node. The transceiver unit 610 is configured to acquire link failure information of the ring network. The processing unit 620 is configured to switch the second backbone port of the first backbone node to a forwarding state based on the link failure information.
[0209] Optionally, the transceiver unit 610 is specifically configured to receive notification packets through the first backbone port of the first backbone node. The notification packets are used to indicate that the first link has failed. The first link is the link on which the first backbone port of the second backbone node is located.
[0210] Optionally, notification packets are Bridge Protocol Data Unit (BPDU) packets.
[0211] Optionally, the processing unit 620 is further configured to determine that a second link has failed. The second link is the link on which the first backbone port of the first backbone node is located.
[0212] Optionally, the processing unit 620 is further configured to switch the first backbone port of the first backbone node to a blocked state.
[0213] Optionally, the processing unit 620 is specifically configured to determine, through differential signal diagnosis, that the second link has failed.
[0214] Optionally, each of the M backbone nodes contains a first identifier. This first identifier is used to identify the backbone nodes within the network.
[0215] Optionally, the processing unit 620 is further configured to detect a first identifier and, based on the first identifier, determine that the processing unit 620 is a backbone node in the network.
[0216] Figure 7 is a schematic diagram of the structure of a network establishment device according to an embodiment of this application. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes excluding the first backbone node.
[0217] As shown in Figure 7, the device 700 includes a transceiver unit 710 and a processing unit 720. Optionally, the device is a second backbone node. The processing unit 720 is configured to determine that the first link has failed. The first link is the link on which the first backbone port of the second backbone node is located. The transceiver unit 710 is configured to send an alert packet through the second backbone port of the second backbone node. The alert packet is used to indicate that the first link has failed.
[0218] Optionally, the processing unit 720 may be further configured to switch the first backbone port of the second backbone node to a blocked state.
[0219] Optionally, the first backbone port of the second backbone node is the master port, and the second backbone port of the second backbone node is the slave port.
[0220] Optionally, the processing unit 720 is specifically configured to determine, through differential signal diagnosis, that the first link has failed.
[0221] Optionally, each of the M backbone nodes contains a first identifier. This first identifier is used to identify the backbone nodes within the network.
[0222] Optionally, the processing unit 720 is further configured to detect a first identifier and, based on the first identifier, determine that the processing unit 720 is a backbone node in the network.
[0223] Optionally, notification packets are Bridge Protocol Data Unit (BPDU) packets.
[0224] Figure 8 is a schematic diagram of the structure of a network establishment device according to an embodiment of this application. The network includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The network further includes terminal nodes. Each terminal node includes a first terminal port and a second terminal port. The first terminal port is in a forwarding state. The second terminal port is in a blocking state. At least two of the M backbone nodes further include a third terminal port. The first and second terminal ports are connected to the third terminal ports of at least two backbone nodes.
[0225] As shown in Figure 8, the device 800 includes a processing unit 810. Optionally, the device is a terminal node. The processing unit 819 is configured to determine that a third link has failed. The third link is the link on which the first terminal port is located. The processing unit 810 is further configured to switch the second terminal port to a forwarding state.
[0226] Optionally, the processing unit 810 is further configured to switch the first terminal port to a blocked state.
[0227] Optionally, the processing unit 810 is specifically configured to determine, through differential signal diagnosis, that the third link has failed.
[0228] Optionally, terminal nodes include a second identifier. This second identifier is used to identify terminal nodes within the network.
[0229] Optionally, the processing unit 810 is further configured to detect a second identifier and determine, based on the second identifier, that the processing unit 810 is a terminal node in the network.
[0230] Optionally, the device 800 may further include a transceiver unit 820 configured to transmit and receive data.
[0231] Figure 9 is a schematic diagram of the structure of a network establishment device 900 according to an embodiment of this application. The device 900 includes at least one memory 910 and at least one processor 920. At least one memory 910 is configured to store a program, and at least one processor 920 is configured to execute a program and implement the technical solution of this application.
[0232] It should be understood that the processor in the embodiments of this application may be a central processing unit (CPU). Furthermore, the processor may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.
[0233] It can be understood that the memory in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. Rather than being limited, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchlink dynamic random access memory (synchlink DRAM, SLDRAM), and direct rambus dynamic random access memory (DR RAM).
[0234] Optionally, the device 900 may further include a transceiver 930 configured to perform data reception and transmission functions.
[0235] Specifically, the apparatus 900 may correspond to a first backbone node in methods 200 and 400 according to embodiments of this application. The apparatus 900 may include a unit for a method performed by the first backbone node in method 200 or 400. Alternatively, the apparatus 900 may correspond to a second backbone node in methods 200 or 400 according to embodiments of this application. The apparatus 900 may include a unit for a method performed by the second backbone node in methods 200 and 400. Alternatively, the apparatus 900 may correspond to a terminal node in method 400 according to embodiments of this application. The apparatus 900 may include a unit for a method performed by the terminal node in method 400. It should be understood that the specific process by which the unit performs the corresponding steps described above is described in detail in embodiments of the above methods. For brevity, the details are not described here.
[0236] Figure 10 is a schematic diagram of the execution logic of a backbone node according to an embodiment of this application. As shown in Figure 10, the switching logic includes the following steps.
[0237] S1001: Load configuration.
[0238] Specifically, after the current node is powered on and enabled, its configuration information is loaded. As described above, the node is configured as a backbone node, and the port state is configured for the backbone node.
[0239] S1002: Waiting for networking.
[0240] Specifically, this may involve implementing a countdown to wait during network startup to prevent errors or false failure reports resulting from unexpected network switching caused by inconsistent startup times of nodes or devices.
[0241] S1003: Determine whether the networking wait time has been met.
[0242] Specifically, if the networking wait time is not met, or if the networking countdown is not zero, the networking wait continues. If the networking wait time is met, i.e., if the countdown is zero, status monitoring begins.
[0243] S1004: Status monitoring.
[0244] Specifically, a backbone node may monitor the status of its ports, the status of the links connected by the backbone node, and notification packets.
[0245] S1005: Determine whether the switching conditions are met.
[0246] Specifically, whether or not the failover conditions are met is determined based on the status of the backbone node's ports and the status of the links connected by the backbone node. If the failover conditions are not met, status monitoring continues. If the failover conditions are met, restriction checks are initiated. The failover conditions may also be the reception of a notification packet or a failure in the links connected by the backbone node.
[0247] S1006: Determine whether the reset conditions have been met.
[0248] Specifically, one example is that the reset condition is to clear the accumulated number of switches after stable communication for a predetermined duration. When the reset condition is met, S1001 is executed again.
[0249] S1007: Determines whether the number of switching cycles has exceeded the limit.
[0250] Specifically, a limit on the number of failovers may be set to avoid frequent failovers. If the number of failovers exceeds the limit, the backbone node may send an error alarm.
[0251] The reset conditions and the number of failovers may each be considered a type of limit check. Limit checks are used for security purposes to prevent network problems caused by frequent failover. In addition, the network is monitored. Network exceptions may directly trigger a reset of the node's network state to correct critical errors.
[0252] S1008: Sends an error alarm.
[0253] Specifically, alarms are primarily used to notify administrators or external devices that a node has failed, either when the number of failovers exceeds the limit or when a node has an internal error.
[0254] S1009: Inspect blocked ports.
[0255] Specifically, the system primarily checks whether the blocked port is functioning correctly and whether the activation conditions have been met. If the activation conditions are not met, an error alarm is generated, and the port status is monitored for exception handling.
[0256] S1010: Switches a blocked port to forwarding mode.
[0257] Specifically, the following port switching operation is performed: The blocked port is allowed to enter a forwarding state, and the forwarding entry is updated.
[0258] S1011: Reset command.
[0259] The reset command is an external input command. It is used to perform detailed state management on the current node during network management and to restart the node network at any time. The restart takes effect after the new configuration policy has been loaded.
[0260] It should be understood that the execution logic shown in Figure 10 is merely an example. In this embodiment of the application, the execution logic of the backbone node is not necessarily limited to the procedure shown in Figure 10.
[0261] Methods 200 and 400 in the embodiments of this application will be described below with reference to Figures 11 to 17.
[0262] Figure 11 is a schematic diagram of a network architecture 1100 according to an embodiment of this application. As shown in Figure 11, in the network architecture 1100, LSW1, LSW2, LSW3, and LSW4 are backbone nodes, and LSW5 and LSW6 are terminal nodes. Port P0 of LSW1, LSW2, LSW3, LSW4, and LSW5 is connected to the MCU, and port P0 of LSW6 is connected to the MPU. For the backbone nodes in Figure 11, all port P1 is configured as a master port, and all port P2 is configured as a slave port. In the network architecture 1100, port P2 of LSW1 is in a blocked state, port P2 of LSW5 is in a blocked state, port P1 of LSW6 is in a blocked state, and the other ports are in a forwarding state.
[0263] Figure 12 is a schematic diagram of port state switching when a link fails, according to an embodiment of this application.
[0264] Assume that link L3 in network architecture 1100 has failed. Port P1 on LSW2 and port P2 on LSW3 trigger a link down state in the port state register. Since port P1 on LSW2 is the master port, LSW2 switches port P1 to the block state. Furthermore, the link down state is used as an event trigger source. LSW2 and LSW3 send BPDU packets separately. LSW3 sends a BPDU packet to LSW4 through port P1, and the BPDU packet is forwarded by LSW4 to port P2 on LSW1. However, port P2 on LSW1 is initially blocked and cannot receive the BPDU packet from port P2 on LSW4. LSW2 sends a BPDU packet to LSW1 through port P2 on LSW2. After LSW1 receives the BPDU packet from port P1 on LSW1, LSW1 switches port P2, which was originally set to the block state, to the forward state. The final formed network architecture is shown in Figure 12. The network architecture 1200 shown in Figure 12 can still perform normal communication.
[0265] Figure 13 is a schematic diagram of port state switching when a backbone node fails, according to an embodiment of this application.
[0266] Assume that in network architecture 1100, backbone node LSW3 is powered off and out of networking, and that events trigger link L2 and L3 down. Link down information on port P2 of LSW4 triggers LSW4 to send a BPDU packet to LSW1 through port P1 of LSW4. However, port P2 of LSW1 is initially blocked and cannot receive the BPDU packet from port P2 of LSW4. Since port P1 on LSW2 is the master port, LSW2 switches port P1 to a blocked state. Furthermore, link down information on port P1 of LSW2 triggers LSW2 to send a BPDU packet to LSW1 through port P2 of LSW2. After LSW1 receives the BPDU packet from port P1 of LSW1, LSW1 switches port P2, which was originally set to a blocked state, to a forwarding state.
[0267] Furthermore, LSW5 and LSW6 are connected to LSW3. If LSW3 is powered off, the active and standby links of LSW5 and LSW6 are switched. Specifically, a power failure in LSW3 brings down L6. Since port P2 of LSW5 is in a blocked state, communication on LSW5 remains unchanged. However, the active link of LSW6, i.e., L7, is connected to LSW3. A power failure in LSW3 triggers the downing of L7. In this case, LSW6 performs a switch between the active and standby links; that is, LSW6 switches port P1 from a blocked state to a forwarding state and blocks port P2.
[0268] The final network architecture is shown in Figure 13. The network architecture 1300 shown in Figure 13 is still capable of performing normal communication.
[0269] Figure 14 is a schematic diagram of the transmission path of BPDU packets when a link fails, according to an embodiment of this application.
[0270] Assume that link L3 in network architecture 1100 has failed. Port P2 of LSW2 and port P1 of LSW3 trigger a link down state in the port status register. The link down state is used as the event trigger source. LSW2 and LSW3 send BPDU packets separately. Figure 14 shows the process of sending BPDU packets.
[0271] Figure 15 is a schematic diagram of the transmission path of BPDU packets on a backbone node according to an embodiment of the present invention.
[0272] In network architecture 1100, LSW3 is assumed to be powered off and exiting the network. Port P2 of LSW2 and port P1 of LSW4 trigger a link down state in the port state register. The link down state is used as an event trigger source. LSW2 and LSW4 send BPDU packets separately. Figure 15 shows the process of sending BPDU packets.
[0273] Figure 16 is a schematic diagram of port state switching when a terminal node link fails, according to an embodiment of this application.
[0274] Assume that L5 in network architecture 1100 has failed. The link-down state in the LSW5 port status register triggers the link switching logic of LSW5. Specifically, when port P2 of LSW5 satisfies the link-up state, LSW5 enables port P2 and sets port P2 to the forward state, thereby allowing port P2 to take over data exchange for LSW5. Furthermore, LSW5 changes port P1 of LSW5 to the block state. When the link is restored, the link is enabled. However, while port P1 is in the block state, port P1 does not forward data packets to the network to prevent data loops on the network. The finally formed network architecture is shown in Figure 16. The network architecture 1600 shown in Figure 16 can still perform normal communication.
[0275] Embodiments of this application further provide a computer-readable storage medium having program instructions. When the program instructions are executed directly or indirectly, the technical solution of this application is implemented.
[0276] Embodiments of this application further provide a computer program product including instructions. When the computer program product is executed on a computing device, the computing device becomes capable of performing the technical solutions of this application, or the computing device becomes capable of realizing the functions of the controller described above.
[0277] Embodiments of this application further provide a chip comprising at least one processor and an interface circuit. The interface circuit is configured to provide program instructions or data to at least one processor. The at least one processor is configured to execute program instructions to realize the technical solution of this application.
[0278] When devices 600, 700, 800, and 900 are chips or chip systems, it should be understood that the transceivers or transceiver units of the devices may also be input / output interfaces. Receivers or receiving units may be understood as input interfaces, and transmitters or transmitting units may be understood as output interfaces.
[0279] The Ethernet system in the embodiment of this application is described below.
[0280] Embodiments of this application provide an Ethernet system. The Ethernet system includes M backbone nodes. Each of the M backbone nodes includes a first backbone port and a second backbone port. The M backbone nodes form a ring network by using the first backbone port and the second backbone port. M is an integer greater than 2. The M backbone nodes include a first backbone node. The first backbone port of the first backbone node is in a forwarding state, and the second backbone port of the first backbone node is in a blocking state. Both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state. The second backbone node is one of the M backbone nodes other than the first backbone node.
[0281] The first backbone node is configured to acquire link failure information for the ring network and, based on the link failure information, switch the second backbone port of the first backbone node to a forwarding state.
[0282] Optionally, the second backbone node is configured to determine that the first link has failed. The first link is the link where the first backbone port of the second backbone node is located, and is configured to send a notification packet through the second backbone port of the second backbone node. The notification packet is used to indicate that the first link has failed.
[0283] The first backbone node is specifically configured to receive a notification packet through the first backbone port of the first backbone node.
[0284] Optionally, the second backbone node is further configured to switch the first backbone port of the second backbone node to a blocked state.
[0285] Optionally, the first backbone port of the second backbone node is a master port, and the second backbone port of the second backbone node is a slave port.
[0286] Optionally, the second backbone node is specifically configured to determine that the first link has failed through differential signal diagnosis.
[0287] Optionally, the notification packet is a Bridge Protocol Data Unit BPDU packet.
[0288] Optionally, the first backbone node is specifically configured to determine that the second link has failed. The second link is the link where the first backbone port of the first backbone node is located.
[0289] Optionally, the first backbone node is further configured to switch the first backbone port of the first backbone node to a blocked state.
[0290] Optionally, the first backbone node is specifically configured to determine, through differential signal diagnostics, that the second link has failed.
[0291] Optionally, each of the M backbone nodes includes a first identifier. This first identifier is used to identify the backbone nodes within the Ethernet system.
[0292] Optionally, the Ethernet system further includes terminal nodes. Each terminal node includes a first terminal port and a second terminal port. The first terminal port is in a forwarding state. The second terminal port is in a blocking state. At least two of the M backbone nodes each further include a third terminal port. The first and second terminal ports are connected to the third terminal ports of at least two backbone nodes.
[0293] The terminal node is configured to determine that a third link has failed, the third link being the link on which the first terminal port is located, and to switch the second terminal port to a forwarding state.
[0294] Optionally, the terminal node may be further configured to switch the first terminal port to a blocked state.
[0295] Optionally, the terminal node is specifically configured to determine, through differential signal diagnostics, that the third link has failed.
[0296] Optionally, terminal nodes include a second identifier. This second identifier is used to identify terminal nodes within the Ethernet system.
[0297] Optionally, the first backbone node is further configured to detect a first identifier and, based on the first identifier, determine that the first backbone node is a backbone node in the network.
[0298] Optionally, a second backbone node is further configured to detect the first identifier and, based on the first identifier, determine that the second backbone node is a backbone node in the network.
[0299] Embodiments of this application further provide a vehicle comprising any one of the above-described Ethernet systems provided in embodiments of this application.
[0300] It should be noted that the vehicles may include intelligent vehicles, new energy vehicles, conventional vehicles, etc. This is not limited to this application. New energy vehicles include pure electric vehicles, extended-range electric vehicles, hybrid electric vehicles, fuel cell vehicles, and other new energy vehicles. Conventional vehicles include gasoline vehicles and crude oil vehicles.
[0301] For example, the above Ethernet system may be used in a vehicle, with the backbone node being a VIU and the terminal node being a domain controller DC, such as a CDC or VDC.
[0302] Optionally, in this application, both terminal nodes and backbone nodes may be line switches (LSWs) and may have the same hardware structure. Terminal nodes and backbone nodes are distinguished by using a first identifier and a second identifier, thereby reducing the complexity of configuring the line switch by allowing the nodes to perform different switching logic based on different identifiers.
[0303] It should be understood in this application that each backbone node or terminal node may have one or more other ports, such as non-backbone ports or non-terminal ports. These ports may be connected to other devices, such as microprocessor units (MPUs), microcontroller units (MCUs), input / output interfaces (I / O interfaces), etc. This is not limited to this application.
[0304] Figure 1 is merely a schematic diagram of application scenarios of this application, and it should be further understood that application scenarios of this application are not limited thereto. For example, the solution of this application may also be used in conventional Ethernet. The backbone node may be a router or a switch, and the terminal node may also be a router or a switch.
[0305] Furthermore, in embodiments of this application, terms such as “for example” and “such as” are used to indicate that examples, illustrations, or explanations are being given. No embodiment or design described as “example” in this application should be described as being preferable to or having more advantages than other embodiments or design designs. Strictly speaking, the word “example” is used to present a concept in a specific manner.
[0306] In embodiments of this application, "corresponding, relevant" and "corresponding" may be used interchangeably in some cases. It should be noted that the meanings expressed by the terms are consistent when differences are not emphasized.
[0307] The network architectures and service scenarios described in the embodiments of this application are intended to more clearly illustrate the technical solutions in the embodiments of this application, but do not constitute a limitation on the technical solutions provided in the embodiments of this application. Those skilled in the art can learn that the technical solutions provided in the embodiments of this application are also applicable to similar technical problems as the network architecture evolves and new service scenarios emerge.
[0308] References to "embodiment", "some embodiments", etc. described in this specification indicate that one or more embodiments of this application include the specific features, structures, or characteristics described with reference to the embodiment. Therefore, descriptions such as "in an embodiment", "in some embodiments", "in some other embodiments", and "in other embodiments" that appear in different parts of this specification do not necessarily refer to the same embodiment. Rather, unless otherwise emphasized, they mean "one or more but not all of the embodiments". The terms "include", "comprise", "have" and their variants all mean "include but not limited to" unless otherwise emphasized.
[0309] In this application, "at least one" means one or more, and "plurality" means two or more. The term "and / or" describes the association relationship between related objects and indicates that three relationships may exist. For example, A and / or B may represent the following three cases: namely, only A exists, both A and B exist, and only B exists. A and B may be in singular or plural form.
[0310] It should be understood that the sequence numbers of the above processes do not mean the execution order in the embodiments of this application. The execution order of the process should be determined based on the function and internal logic of the process and should not constitute any limitation on the implementation process of the embodiments of this application.
[0311] It should be understood that the “first,” “second,” and various sequence numbers in the embodiments of this application are used merely to facilitate explanation, for example, to distinguish between bandwidths under different conditions, and are not intended to limit the scope of the embodiments of this application.
[0312] Those skilled in the art will recognize that the units and algorithmic steps described with reference to the examples in the embodiments disclosed in this specification may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the functions described for each specific application, but the implementation methods should not be considered to exceed the scope of this application.
[0313] For the purpose of a convenient and concise explanation, it will be readily apparent to those skilled in the art that the detailed operating processes of the above systems, apparatuses, and units will not be described further here, but will be referred to by the corresponding processes in the embodiments of the above methods.
[0314] In some embodiments provided in this application, it should be understood that the systems, apparatuses, and methods disclosed may be implemented in other ways. For example, the embodiments of the apparatus described are merely examples. For example, the unit division is merely a logical functional division, and other divisions may be used in actual implementations. For example, multiple units or components may be combined or integrated into other systems, or some features may be ignored or not performed. Furthermore, the mutual coupling, direct coupling, or communication connection indicated or discussed may be implemented by using some interfaces. Indirect coupling or communication connection between apparatuses or units may be implemented electronically, mechanically, or in other forms.
[0315] Units described as separate parts may or may not be physically separate, and parts shown as units may or may not be physical units, may be located in one place, or may be distributed across multiple network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solution of the embodiment.
[0316] Furthermore, the functional units in the embodiments of this application may be integrated into a single processing unit, each unit may exist physically independently, or two or more units may be integrated into a single unit.
[0317] When a function is implemented in the form of a software function unit and sold or used as an independent product, the function may be stored on a computer-readable storage medium. Based on this understanding, the technical solution of this application may be implemented in the form of a software product, either essentially or in part with respect to the prior art or in part with respect to the technical solution. A computer software product is stored on a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, server, network device, etc.) to perform all or part of the steps of the method described in embodiments of this application. The storage medium includes any medium capable of storing program code, such as a USB flash drive, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0318] The above description is merely a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modification or substitution that is readily conceivable to a person skilled in the art within the scope of the art disclosed in this application shall fall within the scope of protection of this application. Accordingly, the scope of protection of this application shall be subject to the scope of protection of the claims.
Claims
1. A method for establishing a network for an in-vehicle Ethernet system, The network includes M backbone nodes, each of the M backbone nodes includes a first backbone port and a second backbone port, the M backbone nodes form a ring network using the first backbone port and the second backbone port, where M is an integer greater than 2, the M backbone nodes include a first backbone node, the first backbone port of the first backbone node is in a forwarding state, the second backbone port of the first backbone node is in a blocking state, both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state, and the second backbone node is one of the M backbone nodes excluding the first backbone node. This method is The first backbone node acquires link failure information of the ring network, The first backbone node, based on the link failure information, switches the second backbone port of the first backbone node to a forwarding state. Includes, The step of obtaining link failure information of the ring network using the first backbone node is: The first backbone node receives a notification packet through the first backbone port of the first backbone node, and when the link failure information is detected by the second backbone node, the link failure information triggers the second backbone port to transmit the notification packet, the notification packet is used to indicate that the first link has failed, and the first link is the link on which the first backbone port of the second backbone node is located. The first backbone node determines, through differential signal diagnosis, that a second link has failed, wherein the second link is the link on which the first backbone port of the first backbone node is located. Methods that include...
2. This method is The method according to claim 1, further comprising the step of switching the first backbone port of the first backbone node to a blocked state using the first backbone node.
3. The method according to claim 1 or 2, wherein each of the M backbone nodes includes a first identifier, the first identifier being used to identify a backbone node in the network.
4. This method is The first backbone node detects the first identifier, The first backbone node determines, based on the first identifier, that the first backbone node is a backbone node in the network. The method according to claim 3, further comprising:
5. An Ethernet system for vehicles, comprising M backbone nodes, Each of the M backbone nodes includes a first backbone port and a second backbone port, and the M backbone nodes form a ring network using the first backbone port and the second backbone port, where M is an integer greater than 2, and the M backbone nodes include a first backbone node, the first backbone port of the first backbone node is in a forwarding state, the second backbone port of the first backbone node is in a blocking state, both the first backbone port and the second backbone port of any of the M backbone nodes other than the first backbone node are in a forwarding state, and the second backbone node is one of the M backbone nodes excluding the first backbone node. The aforementioned first backbone node is The link failure information of the aforementioned ring network is acquired, Based on the link failure information, the system is configured to switch the second backbone port of the first backbone node to a forwarding state. The aforementioned second backbone node is It is configured to determine that a first link has failed, and the first link is the link on which the first backbone port of the second backbone node is located. The system is configured to send notification packets through the second backbone port of the second backbone node, and when the link failure information is detected by the second backbone node, the link failure information triggers the second backbone port to send the notification packet, which is used to indicate that the first link has failed. The aforementioned first backbone node is The notification packet is received through the first backbone port of the first backbone node. It is configured to determine that the second link has failed through differential signal diagnosis. An Ethernet system in which the second link is the link on which the first backbone port of the first backbone node is located.
6. The aforementioned second backbone node is The Ethernet system according to claim 5, further configured to switch the first backbone port of the second backbone node to a blocked state.
7. The Ethernet system according to claim 6, wherein the first backbone port of the second backbone node is a master port, and the second backbone port of the second backbone node is a slave port.
8. The aforementioned first backbone node is The Ethernet system according to claim 5, configured to switch the first backbone port of the first backbone node to a blocked state.
9. The Ethernet system according to claim 5, wherein each of the M backbone nodes includes a first identifier, the first identifier being used to identify a backbone node in the Ethernet system.
10. The Ethernet system further includes terminal nodes, The terminal node includes a first terminal port and a second terminal port, wherein the first terminal port is in a forwarding state and the second terminal port is in a blocking state. At least two of the M backbone nodes further include a third terminal port, and the first terminal port and the second terminal port are connected to the third terminal port of the at least two backbone nodes. The aforementioned terminal node is It is configured to determine that a third link has failed, and the third link is the link on which the first terminal port is located. The second terminal port is configured to switch to a forwarding state, The Ethernet system according to claim 5, configured to switch the first terminal port to a blocked state.
11. The Ethernet system according to claim 10, wherein the terminal node includes a second identifier, the second identifier being used to identify the terminal node in the Ethernet system.
12. A vehicle comprising the Ethernet system according to any one of claims 5 to 11.
Citation Information
Patent Citations
Ring switching method
JP2004147172A
Communication apparatus, communication system, and communication method
JP2011193200A
Ring-type network system
JP2013085055A
Communication system and communication system processing method
JP2014057168A
Relay system and switch device
JP2015211402A