CN115695082A - Vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and storage medium - Google Patents

Vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115695082A
CN115695082A CN202211342224.1A CN202211342224A CN115695082A CN 115695082 A CN115695082 A CN 115695082A CN 202211342224 A CN202211342224 A CN 202211342224A CN 115695082 A CN115695082 A CN 115695082A
Authority
CN
China
Prior art keywords
link
node
ethernet ring
vehicle
fault
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211342224.1A
Other languages
Chinese (zh)
Other versions
CN115695082B (en
Inventor
陈德芮
黄杰
侯亚飞
邓志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202211342224.1A priority Critical patent/CN115695082B/en
Publication of CN115695082A publication Critical patent/CN115695082A/en
Application granted granted Critical
Publication of CN115695082B publication Critical patent/CN115695082B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention provides a vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and a storage medium, wherein the vehicle-mounted Ethernet ring protection switching method comprises the steps of dividing each node of an Ethernet ring into a main node and a plurality of slave nodes; the port of each node is configured to be blocked based on the incoming direction of the VLAN, and the port of each node is in an open state for the VLAN where the link detection message is located; when the link is normal, all nodes mutually send a link detection message to detect the link state; when a link fault is detected, the ports at the two ends of the fault link are blocked, a link abnormity notification message is sent to the outside, the ports at the two ends are opened after the host node and the first slave node receive the link abnormity message, the nodes at the two ends of the fault link mutually send link detection messages, the ring network storm is inhibited under the condition of unidirectional blocking, the link recovery can be rapidly completed, and the compatibility of a protocol to a system is improved.

Description

Vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of network communication, in particular to a vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and a storage medium.
Background
Ethernet is being gradually applied as a vehicle-mounted communication backbone network by virtue of advantages such as high bandwidth, protocol diversity, application maturity, and the like, and vehicle-mounted ethernet communication has a high requirement on reliability due to the particularity of vehicle-mounted applications. With the continuous improvement of the computing power of a vehicle-mounted control chip, the electronic and electrical architecture of the whole vehicle is developing towards a central + regional architecture, a large amount of sensing data are collected by a regional controller and transmitted to the central controller through the Ethernet for calculation, in order to improve the reliability of data transmission, the central + regional architecture based on the Ethernet ring network is provided in the industry, data transmission Ethernet links in the architecture can be redundant, and under the condition that a certain Ethernet link is abnormal, data can be switched to an adjacent Ethernet link for transmission, so that the reliability of Ethernet communication is improved.
For multi-node ring network communication application, related technologies mostly utilize an ERPS (ethernet multi-ring protection technology) ring network protection switching protocol to ensure the reliability of a communication link, and such a protocol can realize link switching within a specific time to recover link communication when a link is abnormal. The implementation of the protection switching of the Ethernet ring network in the vehicle mainly needs to solve three problems of ring network storm suppression, link abnormal protection switching and link recovery so as to achieve the purpose of link redundancy. The ERPS protocol defines that a bidirectional blocking mode based on port incoming and outgoing is adopted to avoid network storms, and because the number of vehicle-end subsystems is large and heterogeneous systems exist among the systems, not all the systems can be configured to be bidirectional blocking in practical application. In the related art, under the condition of unidirectional blocking, the timeliness of link abnormity detection and recovery can not be guaranteed while network storm inhibition is not performed.
Disclosure of Invention
In view of the above technical shortcomings, the present invention provides a method, an apparatus, an electronic device and a storage medium for switching over ethernet ring network protection, so as to solve the technical problem of ensuring timeliness of link anomaly detection and recovery while performing network storm suppression under unidirectional blocking.
The invention provides a vehicle-mounted Ethernet ring network protection switching method, which comprises the following steps: dividing the vehicle-mounted Ethernet ring into a main node and a plurality of slave nodes, wherein the blocking mode of each node port of the vehicle-mounted Ethernet ring is configured to be VLAN-based incoming direction blocking; when the link is normal, the ports at two ends of the main node and a first slave node link are blocked, and the first slave node is an adjacent node of the main node; each node mutually sends a link detection message to detect the link state, and each node port of the vehicle-mounted Ethernet ring is in an open state for the VLAN where the link detection message is located; when a link is detected to have a fault, blocking ports at two ends of the fault link, and sending a link abnormity notification message to the outside by the nodes at two ends of the fault link; after receiving the link abnormity notification message, the master node and the first slave node open the ports at the two ends of the link of the master node and the first slave node; and the nodes at the two ends of the fault link mutually send link detection messages so that the vehicle-mounted Ethernet ring network completes protection switching when the link fails.
In an embodiment of the present invention, after the nodes at two ends of the failed link send the link detection packet, the method further includes: when the fault link is detected to be recovered to be normal, the two end nodes of the fault link send out a link recovery notification message; after receiving the link recovery notification message, the master node blocks a port connected with the master node and a first slave node, and the master node transmits a link recovery switching instruction to the outside; after the first slave node receives the link recovery switching instruction, blocking a port connected with the master node and the first slave node; and after the nodes at the two ends of the fault link receive the link recovery switching instruction, the ports at the two ends of the fault link are opened.
In an embodiment of the present invention, after the master node receives the link recovery notification packet, the method further includes: starting timing on the main node; if the host node does not receive the link abnormity notification message before the preset time is exceeded, blocking a port connected with the host node and a first slave node, and sending a link recovery switching instruction to the outside by the host node; after the first slave node receives the link recovery switching instruction, blocking a port connected with the master node and the first slave node; and after the nodes at the two ends of the fault link receive the link recovery switching instruction, opening the ports at the two ends of the fault link.
In an embodiment of the present invention, the sending of the link detection packet by the nodes at both ends of the failed link includes: the nodes at the two ends of the fault link periodically send the link detection message to each other within a preset time interval; and the link detection message is sent based on a unicast mode.
In an embodiment of the present invention, when each node performs an operation of blocking or opening a port, the node performs an operation of refreshing an address table.
In an embodiment of the present invention, a link between the master node and the first slave node is a ring protection link; the main node is a main control node in a ring network link.
The invention also provides a vehicle-mounted Ethernet ring network protection switching device, which comprises: the system configuration module is used for dividing the vehicle-mounted Ethernet ring into a main node and a plurality of slave nodes, and the blocking mode of each node port of the vehicle-mounted Ethernet ring is configured to be VLAN-based access blocking; a normal blocking module, configured to block ports at two ends of a link between the master node and a first slave node when the link is normal, where the first slave node is an adjacent node to the master node; the link detection module is used for controlling each node to mutually send a link detection message to detect the link state, and each node port of the vehicle-mounted Ethernet ring is in an open state for the VLAN where the link detection message is located; the abnormal blocking module is used for blocking ports at two ends of a fault link when the fault of the link is detected, and the nodes at two ends of the fault link externally send a link abnormal notification message; an exception receiving module, configured to open ports at two ends of a link between the master node and the first slave node after the master node and the first slave node receive the link exception notification packet; and the abnormity detection module is used for controlling the nodes at the two ends of the fault link to mutually send link detection messages so as to ensure that the vehicle-mounted Ethernet ring network completes protection switching when the link fails.
The invention also provides a master node, which is applied to a vehicle-mounted Ethernet protection switching loop, wherein the loop comprises the master node and a plurality of slave nodes, and the master node comprises: a processor, a memory, and a transceiver, wherein: the processor, the memory and the transceiver are connected with each other, the memory is used for storing a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the vehicle-mounted ethernet ring protection switching method according to any one of the above embodiments.
The invention further provides a readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for switching over the protection of the vehicular ethernet ring network according to any of the above embodiments is implemented.
The present invention also provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement the in-vehicle ethernet ring protection switching method according to any of the above embodiments.
The invention has the beneficial effects that: the invention provides a vehicle-mounted Ethernet ring protection switching method, a device, electronic equipment and a storage medium, wherein each node of the Ethernet ring is divided into a main node and a plurality of slave nodes; the port of each node is configured to be blocked based on the incoming direction of the VLAN, and the port of each node is in an open state for the VLAN where the link detection message is located; when the link is normal, all nodes mutually send a link detection message to detect the link state; when a link fault is detected, the ports at the two ends of the fault link are blocked, a link abnormity notification message is sent to the outside, the ports at the two ends are opened after the host node and the first slave node receive the link abnormity notification message, and the nodes at the two ends of the fault link mutually send link detection messages. According to the scheme, the port blocking modes of all nodes of the vehicle-mounted Ethernet ring network are entrance-to-blocking based on the VLAN, the formation of network storms is restrained by the entrance-to-blocking mode of the vehicle-mounted Ethernet port, meanwhile, the method can be suitable for protection switching of the ring network in a system which cannot be configured to be bidirectional blocking, and the compatibility of ring network protection switching to the system is improved. In the invention, each node port of the vehicle-mounted Ethernet ring is in an open state for the VLAN where the link detection message is located, and the nodes at two ends of the fault link still send the link detection message to each other, so that the link state can be detected in time by sending the link detection message, and the link can be switched and recovered quickly.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 is a schematic diagram of a vehicular ethernet ring system according to an exemplary embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for switching over protection of a vehicle-mounted ethernet ring according to an exemplary embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for switching link recovery of a vehicle-mounted ethernet ring according to an exemplary embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a vehicular ethernet ring protection switching flow according to an exemplary embodiment of the present invention;
fig. 5 is a block diagram of a vehicle-mounted ethernet ring protection switching device according to an exemplary embodiment of the present invention;
FIG. 6 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the disclosure herein, wherein the embodiments of the present invention are described in detail with reference to the accompanying drawings and preferred embodiments. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be understood that the preferred embodiments are illustrative of the invention only and are not limiting upon the scope of the invention.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
In the following description, numerous details are set forth to provide a more thorough explanation of embodiments of the present invention, however, it will be apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details, and in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring embodiments of the present invention.
It should be noted that, the vehicle-mounted ethernet ring network system mainly comprises three parts, namely a terminal node, a vehicle-mounted ethernet switch, and a ring network protection switching protocol stack.
In the vehicle-mounted Ethernet ring network system, a terminal node is provided with a ring network protection switching protocol, is responsible for detecting a link state, externally providing link state information and controlling link switching, and is a control main body for ring network protection switching; the ring network protection switching protocol is mainly based on an ERPS (Ethernet multi-ring protection technology) protocol vehicle-mounted Ethernet ring network system, a vehicle-mounted Ethernet switch receives the control of a terminal node and is mainly responsible for executing the static configuration of a communication port FDB (Forwarding Data Base) address table, message routing and receiving a terminal node control instruction to execute the brushing of the FDB address table so as to realize link switching, physical connection state detection and notification.
Referring to fig. 1, fig. 1 is a schematic diagram of a vehicle-mounted ethernet ring system according to an exemplary embodiment of the present invention. In an embodiment of the invention, the vehicle-mounted Ethernet ring network system is composed of four terminal nodes, the terminal nodes are respectively connected with corresponding switches, and the four switches in the system form an Ethernet ring network link in a hand-in-hand connection mode. The terminal nodes are all provided with a ring network protection switching protocol, and the protocol is adaptively modified based on an ERPS protocol. Under normal conditions, a terminal node A as a master node (RPL Owner node) in a ring network link has a main control right of ring network protection switching, an Ethernet link between a switch A and a switch D is a ring protection link (RPL link), a port of the switch A and a port of the switch D which are connected with the link are both configured to be in-direction blocking, and the system communication direction is A- > B- > C- > D or D- > C- > B- > A.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a method for switching protection of a vehicle-mounted ethernet ring according to an exemplary embodiment of the present invention. In an exemplary embodiment, the vehicular ethernet ring network protection switching method at least includes steps S210 to S260, which are described in detail as follows:
step S210, the vehicle-mounted ethernet ring network is divided into a master node and a plurality of slave nodes, and the port blocking manner of each node is configured as VLAN (virtual local area network) -based access blocking.
The main node is a main control node in a ring network link, and the main node and a plurality of slave nodes form an Ethernet ring network together. The port blocking mode of all nodes in the ring network is the incoming direction blocking based on the virtual local area network, and the incoming direction blocking in this embodiment is that the blocked port cannot receive the control message or the data message with the relevant VLAN.
Step S220, when the link is normal, the ports at both ends of the link between the master node and the first slave node are blocked,
the first slave node is a neighboring node of the master node, and a link between the master node and the first slave node is a ring protection link. When a fault link is not detected in the link, the ports at the two ends of the link of the master node and the first slave node are kept in a state of long-term VLAN-based incoming blocking, namely, a control message or a data message with a relevant VLAN cannot be transmitted on the environment-friendly protection link, and the ports at the two ends of the link of the master node and the first slave node are blocked, so that the storm of the ring network can be inhibited from the clockwise direction and the anticlockwise direction of the ring network.
In step S230, the nodes send link detection messages to each other to detect the link status, and the port of each node is open for the VLAN where the link detection message is located.
In an embodiment of the present invention, the link detection packet is sent in a unicast manner through an independent VLAN, and is sent between nodes, and the blocking port does not block the VLAN where the link detection packet is located.
Step S240, when the link is detected to have a fault, the ports at the two ends of the fault link are blocked, and the two ends of the fault link externally send a link abnormity notification message.
In this embodiment, the failed link is a link in which a signal detected by the link detection message cannot be normally transmitted. When the fault exists in the link, the ports at the two ends of the fault link are blocked and the FDB address table is refreshed, the fault two-end node externally sends a link abnormal state notification message, and the message is sent in a multicast mode.
The switch receives Media Access Control (MAC) address information from all its ports, forms a MAC address table and maintains it. When a switch receives a frame of data, it will decide whether to filter or forward the frame of data based on its own MAC address table. At this time, the maintained MAC table is the FDB address table.
Step S250, after the master node and the first slave node receive the link exception notification packet, the master node and the first slave node open the ports at the two ends of the link.
After receiving the link abnormal state notification message, the master node and the first slave node open the blocking port and refresh the FDB address table, so that normal communication can be performed between the nodes in the whole Ethernet ring network system under the condition of failure link interruption.
Step S260, the nodes at both ends of the failed link send link detection messages to each other.
In this embodiment, because the blocking port does not block the link detection packet, the link detection packet can still be sent to the blocking port between the failed links, and after the link is recovered, the link conduction state can be detected in time and the link recovery switching can be executed.
In an embodiment of the present invention, the two ends of the failed link send a link detection packet in a unicast manner every 5s to detect the link state in time, where 5s in this embodiment is only an example, and may also be cycle time defined by other persons skilled in the art, and this embodiment does not limit cycle interval time.
Referring to fig. 3, fig. 3 is a schematic flow chart illustrating a method for resuming and switching a link of a vehicle-mounted ethernet ring according to an exemplary embodiment of the present invention. In an exemplary embodiment, after step S260, the method for switching over the link recovery of the vehicular ethernet ring network at least includes step S310 to step S340, which are described in detail as follows:
step S310, when the fault link is detected to be recovered to normal, the two end nodes of the fault link send out a link recovery notification message.
When the ports at the two ends of the fault link detect that the link is recovered to be normal, the link recovery notification messages are respectively sent, the link recovery notification messages are sent in a multicast mode, and at the moment, the nodes at the two ends of the fault link temporarily do not cancel the blockage of the ports, so that instant ring formation is prevented in the link recovery switching process.
Step S320, after receiving the link recovery notification message, the master node blocks the port connected to the master node and the first slave node, and the master node sends a link recovery switching instruction to the outside.
In an embodiment of the present invention, after receiving a link recovery notification message, a master node starts a timer, and sends a link recovery switching instruction if no other link abnormality notification message is received within a timing time, and simultaneously executes blocking of an environment-friendly link port and sends the link recovery switching instruction to the outside in a multicast manner, and then refreshes an FDB address table.
Step S330, after receiving the link recovery switching instruction, the first slave node blocks the port where the first slave node is connected to the master node.
In an embodiment of the present invention, after receiving the link recovery switching instruction, the first slave node recovers blocking of the port corresponding to the ring protection link and refreshes the FDB address table.
Step S340, after the nodes at the two ends of the failed link receive the link switching instruction, the ports at the two ends of the failed link are opened.
In an embodiment of the present invention, after the two end nodes of the failed link receive the link recovery switching instruction, the blocking of the port is cancelled and the FDB address table is refreshed. Therefore, the link completes the recovery switching and returns to the normal state.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a vehicular ethernet ring protection switching process according to an exemplary embodiment of the present invention. In an exemplary embodiment, taking the link disconnection between switch B and switch C as an example, the flow from the link disconnection to the completion of the link protection switching and the link failure removal to the link recovery communication at least includes steps S410 to S460, which are described in detail as follows:
in this embodiment, the vehicle-mounted ethernet ring network system is composed of four terminal nodes, the terminal nodes are respectively connected to corresponding switches, the four switches in the system form an ethernet ring network link in a manner of hand-in-hand connection, and the four terminal nodes are respectively a node a, a node B, a node C, and a node D. The port blocking modes of the four terminal nodes are all VLAN-based incoming direction blocking.
Step S410, when the link is normal, the ports at the two ends of the link A-D are blocked.
The terminal node A controls and blocks the port of the switch A connected with the switch D, the node D controls and blocks the port of the switch D connected with the switch A, both are incoming direction blocking, and the blocking mode is based on VLAN blocking, namely, a control message or a data message with a relevant VLAN cannot be transmitted to the node A or the node D on an A-D link, so that the ring network storm can be inhibited from the clockwise direction and the anticlockwise direction of the ring network; meanwhile, link detection messages are mutually transmitted among nodes A-B, A-D, B-C and B-D in a unicast message mode through an independent VLAN, and a blocking port does not block the VLAN where the detection messages are located;
step S420, when the B-C link failure is detected, the ports at the two ends of the B-C link are blocked and a link abnormal state notification message is sent.
When the terminal node B and the terminal node C detect the interruption of the B-C link, the node B controls and blocks the port of the switch B connected with the switch C, and the node C controls and blocks the port of the switch C connected with the switch B, and the two are both incoming direction blocking. Then, both the node B and the node C send out a SF message for notifying the link abnormal state, and the message is sent in a multicast mode. In the invention, because the blocking port does not block the link detection message, under the condition that a B-C link is abnormal, the link detection message can still be sent to the blocking port between the terminal nodes B and C, and the link conduction state can be detected in time and the link recovery switching can be executed after the link is recovered;
step S430, after the node A and the node D receive the link abnormity notification message, the blockage of the ports at the two ends of the A-D link is opened.
After receiving the link abnormal state notification message, the terminal node A and the terminal node D open a blocking port of a corresponding switch and refresh an FDB address table of the switch, so that normal communication can be performed between the terminal nodes in the whole Ethernet ring network system under the condition that a B-C link is interrupted;
step S440, when detecting that the B-C link is recovered to normal, the node B and the node C respectively send a link recovery notification message.
When the terminal node B and the terminal node C detect that the B-C link is recovered to be normal, respectively sending a link recovery notification message, wherein the message is sent in a multicast mode; here, after the terminal node B and the terminal node C send the link recovery notification message, the blocking of the port is not cancelled temporarily, so as to prevent instantaneous ring formation in the link recovery switching process;
step S450, after receiving the link recovery notification message, the node A blocks the port again and sends a link recovery switching instruction.
After receiving the link recovery notification message, the terminal node A starts a timer, if the other link abnormity notification messages are not received within the timing time, a link recovery switching instruction is sent, meanwhile, the RPL link port is blocked, the link recovery switching instruction is sent to the outside in a multicast mode, and then an FDB address table is refreshed;
step S460, after receiving the link recovery switching command, the node D blocks the port again and refreshes the FDB address table, and after receiving the link recovery switching command, the nodes B and C open the port and refresh the FDB address table.
After receiving the link recovery switching instruction, the node terminal node D controls the switch to recover the blockage of the port corresponding to the RPL link and refreshes an FDB address table; after the terminal node B and the terminal node C receive the link recovery switching instruction, the control switch cancels the blockage of the corresponding port of the original abnormal link and refreshes an FDB address table; therefore, the link is restored to a normal state, and the system communication direction is restored to A- > B- > C- > D or D- > C- > B- > A. Here, the FDB address table needs to be refreshed after the link recovery switching instruction is received by the terminal nodes B, C, and D, so as to avoid the situation of instantaneous ring formation.
The port blocking modes of each node of the vehicle-mounted Ethernet ring network in the embodiment of the invention are VLAN-based incoming blocking, the formation of network storm is inhibited by carrying out incoming blocking on the port of the vehicle-mounted Ethernet, meanwhile, the method is also suitable for protection switching of the ring network in a system which cannot be configured to bidirectional blocking, and the compatibility of ring network protection switching on the system is improved.
In the embodiment of the invention, each node port of the vehicle-mounted Ethernet ring is in an open state for the VLAN where the link detection message is positioned, and the nodes at two ends of the fault link still send the link detection message to each other, so that the link state can be detected in time by sending the link detection message, and the link can be switched and recovered quickly.
In the embodiment of the invention, when the link recovery is detected, the ports at the two ends of the fault link are not opened immediately, the ports at the two ends of the fault link send the link recovery notification message, and the ports are opened only after the main node sends the link recovery switching instruction, so that the network storm is prevented from being formed by ring formation at the moment when the ports at the two ends of the fault link are opened.
In the embodiment of the invention, the timer is started for the main node after the main node receives the link recovery notification message, thereby further effectively inhibiting the formation of network storm.
The link detection message in the embodiment of the invention is periodically sent based on a unicast mode, so that the link condition can be quickly detected and timely reacted.
After the port state of each node is changed, the address tables are refreshed simultaneously, and abnormal link information transmission is prevented.
Referring to fig. 5, fig. 5 is a block diagram of a vehicle-mounted ethernet ring protection switching device according to an exemplary embodiment of the present application, where the vehicle-mounted ethernet ring protection switching device includes: a system configuration module 501, a normal blocking module 502, a link detection module 503, an abnormal blocking module 504, an abnormal reception module 505, and an abnormal detection module 506.
A system configuration module 501, configured to divide the vehicle-mounted ethernet ring into a master node and a plurality of slave nodes, where a blocking manner of each node port of the vehicle-mounted ethernet ring is configured as an incoming direction blocking based on a VLAN; a normal blocking module 502, configured to block ports at two ends of a link between the master node and a first slave node when the link is normal, where the first slave node is an adjacent node to the master node; a link detection module 503, configured to control each node to send a link detection packet to each other to detect a link state, where each node port of the vehicle-mounted ethernet ring is in an open state with respect to a VLAN in which the link detection packet is located; an abnormal blocking module 504, configured to block ports at two ends of a failed link when a link is detected to have a fault, where the node at two ends of the failed link sends a link abnormal notification message to the outside; an exception receiving module 505, configured to open ports at two ends of a link between the master node and the first slave node after the master node and the first slave node receive the link exception notification packet; an anomaly detection module 506, configured to control the two end nodes of the failed link to send link detection messages to each other, so that the vehicular ethernet ring network completes protection switching when the link fails.
In an embodiment of the present invention, the vehicular ethernet ring protection switching device may further control the nodes at both ends of the failed link to send out a link recovery notification message after detecting that the failed link recovers to normal; after receiving the link recovery notification message, the master node blocks a port connected with the master node and the first slave node, and sends a link recovery switching instruction to the outside; after receiving the link recovery switching instruction, the first slave node blocks a port connected with the master node; and after the fault link two-end node receives the link recovery switching instruction, opening the fault link two-end port.
In an embodiment of the invention, after the host node receives the link recovery notification message, the vehicle-mounted Ethernet ring protection switching device starts a timer, if the host node does not receive the link abnormity notification message before the timer is overtime, a port connected with the host node and a first slave node is blocked, and the host node externally sends a link recovery switching instruction; after the first slave node receives the link recovery switching instruction, blocking a port connected with the first slave node and the main node; and after the nodes at the two ends of the fault link receive the link recovery switching instruction, the ports at the two ends of the fault link are opened.
It should be noted that the on-board ethernet ring protection switching device provided in the foregoing embodiment and the on-board ethernet ring protection switching method provided in the foregoing embodiment belong to the same concept, and specific ways of executing operations by each module and unit have been described in detail in the method embodiment, and are not described herein again. In practical applications, the vehicle-mounted ethernet ring protection switching device provided in the above embodiment may distribute the above functions through different functional modules as required, that is, divide the internal structure of the device into different functional modules to complete all or part of the above described functions, which is not limited herein.
An embodiment of the present application further provides an electronic device, including: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic equipment is enabled to implement the vehicle-mounted ethernet ring protection switching method provided in each embodiment.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating a computer system suitable for implementing an electronic device according to an embodiment of the present application. It should be noted that the computer system 600 of the electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 602 or a program loaded from a storage portion 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for system operation are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An Input/Output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output section 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that the computer program read out therefrom is installed into the storage section 608 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. When the computer program is executed by a Central Processing Unit (CPU) 601, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may comprise a propagated data signal with a computer-readable computer program embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Another aspect of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor of a computer, causes the computer to execute the vehicular ethernet ring protection switching method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer readable storage medium, and the processor executes the computer instruction, so that the computer device executes the vehicle-mounted ethernet ring protection switching method provided in the above embodiments.
The foregoing embodiments are merely illustrative of the principles of the present invention and its efficacy, and are not to be construed as limiting the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (10)

1. A vehicle-mounted Ethernet ring protection switching method is characterized by comprising the following steps:
dividing the vehicle-mounted Ethernet ring into a main node and a plurality of slave nodes, wherein the blocking mode of each node port of the vehicle-mounted Ethernet ring is configured to be VLAN-based incoming direction blocking;
when the link is normal, the ports at two ends of the main node and a first slave node link are blocked, and the first slave node is an adjacent node of the main node;
each node mutually sends a link detection message to detect the link state, and each node port of the vehicle-mounted Ethernet ring is in an open state for the VLAN where the link detection message is located;
when a link is detected to have a fault, blocking ports at two ends of the fault link, and sending a link abnormity notification message to the outside by the nodes at two ends of the fault link;
after the host node and the first slave node receive the link abnormity notification message, opening ports at two ends of a link of the host node and the first slave node;
and the nodes at the two ends of the fault link mutually send link detection messages so that the vehicle-mounted Ethernet ring network completes protection switching when the link fails.
2. The vehicular ethernet ring network protection switching method according to claim 1, wherein after the nodes at both ends of the failed link send the link detection packet, the vehicular ethernet ring network protection switching method further comprises:
when the fault link is detected to be recovered to normal, the node at the two ends of the fault link sends a link recovery notification message to the outside;
after receiving the link recovery notification message, the master node blocks a port connected with the master node and a first slave node, and the master node externally sends a link recovery switching instruction;
after the first slave node receives the link recovery switching instruction, blocking a port connected with the master node and the first slave node;
and after the nodes at the two ends of the fault link receive the link recovery switching instruction, the ports at the two ends of the fault link are opened.
3. The vehicular ethernet ring protection switching method according to claim 2, wherein after the host node receives the link recovery notification packet, the vehicular ethernet ring protection switching method further comprises:
starting timing on the main node;
if the host node does not receive the link abnormity notification message before the preset time is exceeded, blocking a port connected with the host node and a first slave node, and externally sending a link recovery switching instruction by the host node;
after the first slave node receives the link recovery switching instruction, blocking a port connected with the master node and the first slave node;
and after the nodes at the two ends of the fault link receive the link recovery switching instruction, opening the ports at the two ends of the fault link.
4. The vehicular ethernet ring network protection switching method according to any of claims 1 to 3, wherein the sending of the link detection message by the two end nodes of the failed link comprises:
the nodes at two ends of the fault link periodically send the link detection messages to each other within a preset time interval;
and the link detection message is sent based on a unicast mode.
5. The vehicular ethernet ring network protection switching method according to any of claims 1 to 3, wherein each node performs an operation of refreshing the address table when performing an operation of blocking or opening a port.
6. The vehicular ethernet ring network protection switching method according to any of the claims 1 to 3, wherein the link between the master node and the first slave node is a ring protection link; the main node is a main control node in a ring network link.
7. The utility model provides a vehicle-mounted ethernet ring protection switching device which characterized in that, vehicle-mounted ethernet ring protection switching device includes:
the system configuration module is used for dividing the vehicle-mounted Ethernet ring into a main node and a plurality of slave nodes, and the blocking mode of each node port of the vehicle-mounted Ethernet ring is configured into an incoming direction blocking based on VLAN;
a normal blocking module, configured to block ports at two ends of a link between the master node and a first slave node when the link is normal, where the first slave node is an adjacent node to the master node;
the link detection module is used for controlling each node to mutually send a link detection message to detect the link state, and each node port of the vehicle-mounted Ethernet ring network is in an open state for the VLAN where the link detection message is located;
the abnormal blocking module is used for blocking ports at two ends of a fault link when a fault is detected in the link, and the nodes at two ends of the fault link externally send a link abnormal notification message;
an exception receiving module, configured to open ports at two ends of a link between the master node and the first slave node after the master node and the first slave node receive the link exception notification packet;
and the abnormity detection module is used for controlling the nodes at the two ends of the fault link to mutually send link detection messages so as to ensure that the vehicle-mounted Ethernet ring network finishes protection switching when the link fails.
8. A master node, applied to an in-vehicle ethernet protection switching loop, where the loop includes the master node and multiple slave nodes, and the master node includes: a processor, a memory, and a transceiver, wherein:
the processor, the memory and the transceiver are connected with each other, the memory is used for storing a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the vehicular ethernet ring protection switching method according to any one of claims 1 to 6.
9. A readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the vehicular ethernet ring protection switching method according to any one of claims 1 to 6.
10. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the vehicular ethernet ring protection switching method according to any one of claims 1 to 6.
CN202211342224.1A 2022-10-30 2022-10-30 Vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and storage medium Active CN115695082B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211342224.1A CN115695082B (en) 2022-10-30 2022-10-30 Vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211342224.1A CN115695082B (en) 2022-10-30 2022-10-30 Vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115695082A true CN115695082A (en) 2023-02-03
CN115695082B CN115695082B (en) 2024-06-21

Family

ID=85046653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211342224.1A Active CN115695082B (en) 2022-10-30 2022-10-30 Vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115695082B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1812361A (en) * 2006-01-23 2006-08-02 杭州华为三康技术有限公司 Fast ring network protecting method and system
US20060245351A1 (en) * 2005-05-02 2006-11-02 Moni Pande Method, apparatus, and system for improving ethernet ring convergence time
US20090316571A1 (en) * 2008-06-20 2009-12-24 Alcatel Lucent Loop Prevention Mechanism for Ethernet Ring Protection
CN101656664A (en) * 2009-09-09 2010-02-24 杭州华三通信技术有限公司 Ethernet ring network system and border node thereof and Ethernet ring network realization method
US20100135154A1 (en) * 2008-12-02 2010-06-03 Electronics And Telecommunications Research Institute Method and system for protection switching in ethernet ring
CN102035710A (en) * 2009-09-24 2011-04-27 中兴通讯股份有限公司 Method and system for updating blocked port information
CN102170384A (en) * 2011-04-15 2011-08-31 杭州华三通信技术有限公司 Method for processing faults of intersected Ethernet ring and nodes
EP2503737A2 (en) * 2011-03-23 2012-09-26 Ciena Corporation Systems and methods for scaling performance of ethernet ring protection protocol
CN104702444A (en) * 2015-03-27 2015-06-10 杭州华三通信技术有限公司 Method and device for handling ERPS (Ethernet Ring Protection Switching) protocol message
CN108900403A (en) * 2018-06-12 2018-11-27 瑞斯康达科技发展股份有限公司 A kind of method and apparatus of Ethernet ring protection configuration
CN111092800A (en) * 2019-11-20 2020-05-01 浪潮思科网络科技有限公司 EAPS distributed Ethernet ring protection switching method, equipment and medium
CN114500161A (en) * 2022-02-27 2022-05-13 重庆长安汽车股份有限公司 Redundant link switching method based on vehicle-mounted Ethernet ring network and readable storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060245351A1 (en) * 2005-05-02 2006-11-02 Moni Pande Method, apparatus, and system for improving ethernet ring convergence time
WO2007024298A2 (en) * 2005-05-02 2007-03-01 Cisco Technology, Inc. Method, apparatus, and system for improving ethernet ring convergence time
CN1812361A (en) * 2006-01-23 2006-08-02 杭州华为三康技术有限公司 Fast ring network protecting method and system
US20090316571A1 (en) * 2008-06-20 2009-12-24 Alcatel Lucent Loop Prevention Mechanism for Ethernet Ring Protection
US20100135154A1 (en) * 2008-12-02 2010-06-03 Electronics And Telecommunications Research Institute Method and system for protection switching in ethernet ring
CN101656664A (en) * 2009-09-09 2010-02-24 杭州华三通信技术有限公司 Ethernet ring network system and border node thereof and Ethernet ring network realization method
CN102035710A (en) * 2009-09-24 2011-04-27 中兴通讯股份有限公司 Method and system for updating blocked port information
EP2503737A2 (en) * 2011-03-23 2012-09-26 Ciena Corporation Systems and methods for scaling performance of ethernet ring protection protocol
US20120243405A1 (en) * 2011-03-23 2012-09-27 Marc Holness Systems and methods for scaling performance of ethernet ring protection protocol
CN102170384A (en) * 2011-04-15 2011-08-31 杭州华三通信技术有限公司 Method for processing faults of intersected Ethernet ring and nodes
CN104702444A (en) * 2015-03-27 2015-06-10 杭州华三通信技术有限公司 Method and device for handling ERPS (Ethernet Ring Protection Switching) protocol message
CN108900403A (en) * 2018-06-12 2018-11-27 瑞斯康达科技发展股份有限公司 A kind of method and apparatus of Ethernet ring protection configuration
CN111092800A (en) * 2019-11-20 2020-05-01 浪潮思科网络科技有限公司 EAPS distributed Ethernet ring protection switching method, equipment and medium
CN114500161A (en) * 2022-02-27 2022-05-13 重庆长安汽车股份有限公司 Redundant link switching method based on vehicle-mounted Ethernet ring network and readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MOHAMMAD NURUJJAMAN 等: "《Efficient selection of optimally designed ethernet ring instances》", 《IEEE》, 31 December 2014 (2014-12-31) *
候建栋: "《基于G.8032的以太环网保护系统设计与实现》", 《中国优秀硕士学位论文全文数据库》, 31 December 2011 (2011-12-31) *
刘莎: "《以太环网保护技术研究》", 《中国优秀硕士学位论文全文数据库》, 15 February 2017 (2017-02-15) *

Also Published As

Publication number Publication date
CN115695082B (en) 2024-06-21

Similar Documents

Publication Publication Date Title
RU2606053C2 (en) Method of controlling change in state interconnection node
CN100409634C (en) Fast ring network protecting method and system
CN101662421B (en) Method and device for transmitting control message based on ethernet multi-ring network
JPH02283142A (en) Control method in distributed processor system
CN103428060A (en) Seamless redundancy realization method of loop network
KR100595984B1 (en) Transceiver Frame Structure for Control Communication Network of Distributed Control System
CN103607317A (en) Two-layer loop detection method, two-layer loop detection device and communication system
CN102223312B (en) Flow control method and equipment based on link status
CN103107940A (en) Redundant gateway system for device level ring networks
JP5491623B2 (en) Address refresh method and system
CN110535715B (en) Linux-based port state real-time detection method, circuit and switch
EP2533470B1 (en) Method and equipment for preventing repeated refreshing of ethernet ring node address table
CN100550812C (en) Improve method, system and the node device of dependability of fast looped network
CN115695082B (en) Vehicle-mounted Ethernet ring protection switching method and device, electronic equipment and storage medium
CN101136838A (en) Bridge mode elastic grouping ring transannular bridge equipment redundancy protecting method
CN113709068B (en) Switch system and execution processing method of switch
CN111464436B (en) Method for solving single-port loop of RSTP (remote station transfer protocol)
CN107360076B (en) VLAN (virtual local area network) attribute registration method and device
CN104579736A (en) Loop circuit data transmission method and node equipment
JP5402035B2 (en) Network configuration change detection / recovery method
JP3268460B2 (en) Transmission line switching control method and device
JP4579242B2 (en) Apparatus and method for connecting processing nodes in a distributed system
JP3784199B2 (en) Transmission path redundancy method and system using the method
CN113518024B (en) Method, device, terminal and storage medium for refreshing address table of node
JP3691679B2 (en) Network with dual transmission path

Legal Events

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