Topology change source determination method and apparatus, and communication system

By carrying source information in the topology change messages of the ERPS network, the problem of not being able to accurately locate the source of topology change in the existing technology is solved, and the accurate location of the source of topology change in the ERPS network and the rapid response of network devices are realized.

WO2026157213A1PCT designated stage Publication Date: 2026-07-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-08-22
Publication Date
2026-07-30

AI Technical Summary

Technical Problem

The existing ERPS protocol cannot accurately identify the source of topology changes, causing network devices in ERPS networks to be unable to accurately identify the root cause of topology changes.

Method used

The topology change messages in the ERPS network carry traceability information, enabling network devices to determine the source of the topology change based on the traceability information, including port identifiers, network device identifiers, and ERPS ring identifiers.

Benefits of technology

It enables accurate location of topology change sources in ERPS networks, improving the topology change response efficiency of network devices and the stability of network communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025116332_30072026_PF_FP_ABST
    Figure CN2025116332_30072026_PF_FP_ABST
Patent Text Reader

Abstract

A topology change source determination method and apparatus, and a communication system, relating to the technical field of networks. A first network device in an Ethernet ring protection switching (ERPS) network receives a topology change message sent by a second network device in the ERPS network, and then determines a topology change source on the basis of source tracing information carried in the topology change message. The present application can implement rapid tracing of a topology change source.
Need to check novelty before this filing date? Find Prior Art

Description

Methods and apparatus for determining topology change sources, and communication systems.

[0001] This application claims priority to Chinese Patent Application No. 202510124327.8, filed on January 24, 2025, entitled “Method and Apparatus for Determining Topological Change Sources and Communication System”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of network technology, and in particular to a method and apparatus for determining a source of topology change, and a communication system. Background Technology

[0003] Ethernet Ring Protection Switching (ERPS) is a standard ring network protocol specifically designed for the Ethernet link layer. An ERPS network consists of at least one ERPS ring, each composed of multiple interconnected network devices configured with the same control virtual local area network (VLAN). Each ERPS ring includes a ring protection link (RPL) owner port. To prevent loops within the ERPS ring, a loop-breaking mechanism can be initiated by blocking the RPL owner port. When the ERPS ring is functioning normally, the RPL owner port on that ERPS ring is blocked. After a link failure occurs in the ERPS ring, the RPL owner port on that ERPS ring is quickly opened to perform link protection switching, restoring communication between the network devices on the ERPS ring.

[0004] In an ERPS network comprising multiple ERPS rings, these rings can be deployed across multiple network layers. The network device connecting any two ERPS rings is the intersecting device between those two ERPS rings. After the topology of any ERPS ring changes, the intersecting device between that ERPS ring and its upper-layer ring sends a topology change message to the upper-layer ring, causing the network devices on that upper-layer ring to refresh their forwarding database (FDB) tables. Furthermore, the intersecting device between the upper-layer ring and its upper-layer ring sends a topology change message to the upper-layer ring, causing the network devices on that upper-layer ring to refresh their FDB tables. This process continues until all network devices on all ERPS rings have refreshed their FDB tables. Each ERPS ring and its upper-layer ring are deployed in two adjacent network layers, and the network layer containing the upper-layer ring is located above the network layer containing the ERPS ring. For example, the multiple network layers include an access layer, a convergence layer, and a core layer, and the multiple ERPS rings include an ERPS ring deployed in the access layer (also known as an access ring), an ERPS ring deployed in the convergence layer (also known as a convergence ring), and an ERPS ring deployed in the core layer (also known as a core ring). The convergence ring is the ring above the access ring, and the core ring is the ring above the convergence ring.

[0005] According to the current ERPS protocol, the topology change message sent by the intersecting device to the upper ring only includes the identifier of the upper ring and the MAC address of the intersecting device, which makes it impossible for the network devices on the upper ring to determine the source of the topology change (i.e., the root cause of the topology change). Summary of the Invention

[0006] This application provides a method, apparatus, and communication system for determining topology change sources. The technical solution of this application is as follows.

[0007] In a first aspect, a method for determining the source of a topology change is provided. The method includes: a first network device in an Ethernet ring protection switching (ERPS) network receiving a topology change message sent by a second network device in the ERPS network, the topology change message carrying source information used to determine the source of the topology change in the ERPS network; and the first network device determining the source of the topology change in the ERPS network based on the source information.

[0008] The technical solution provided in this application carries source information in the topology change message that announces a change in the topology of the ERPS network, so that network devices in the ERPS network can determine the source of the topology change in the ERPS network based on the source information, thereby realizing the source tracing of the topology change.

[0009] Optionally, the ERPS network includes a first ERPS ring and a second ERPS ring; a second network device is located in the first ERPS ring and the second ERPS ring, and a first network device is located in the second ERPS ring; or, a second network device is located in the first ERPS ring, and a first network device is located in the first ERPS ring and the second ERPS ring.

[0010] In this configuration, the second network device is located at the intersection of the first and second ERPS rings, meaning it is the device where the first and second ERPS rings intersect. With the second network device located at both the first and second ERPS rings, and the first network device located at the second ERPS ring, this application enables the intersecting device of the first and second ERPS rings to send a topology change message carrying traceability information to the second ERPS ring. This allows the first network device located at the second ERPS ring to determine the source of the topology change in the ERPS network based on this traceability information.

[0011] In this configuration, the first network device is located in both the first and second ERPS rings, meaning it is the intersecting device of the first and second ERPS rings. With both the second and first network devices located in the first and second ERPS rings, this application enables the second network device to send a topology change message carrying traceability information to the first ERPS ring. This allows the intersecting device of the first and second ERPS rings to determine the source of the topology change in the ERPS network based on this traceability information.

[0012] Optionally, the first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer; or, the first ERPS ring is deployed at the aggregation layer, and the second ERPS ring is deployed at the core layer. The ERPS ring deployed at the access layer is also called the access ring, the ERPS ring deployed at the aggregation layer is also called the aggregation ring, and the ERPS ring deployed at the core layer is also called the core ring. Therefore, in the technical solution provided in this application, the first ERPS ring is the access ring, and the second ERPS ring is the aggregation ring; or, the first ERPS ring is the aggregation ring, and the second ERPS ring is the core ring.

[0013] Optionally, the first ERPS ring is deployed at the access layer, the second ERPS ring is deployed at the aggregation layer, and the ERPS network further includes a third ERPS ring deployed at the core layer. A second network device is located on both the first and second ERPS rings, and a first network device is located on both the second and third ERPS rings. The method further includes: the first network device sending the tracing information to the third ERPS ring. For example, the first network device sends a topology change message carrying the tracing information to the third ERPS ring to send the tracing information.

[0014] In this application, the second network device is located at the intersection of the first and second ERPS rings, meaning it is the device where the first and second ERPS rings intersect. Similarly, the first network device is located at the intersection of the second and third ERPS rings, meaning it is the device where the second and third ERPS rings intersect. In the technical solution provided by this application, after receiving a topology change message carrying traceability information from the intersection of the first and second ERPS rings (e.g., the first network device), the network device at the intersection of the second and third ERPS rings sends this traceability information to the third ERPS ring. This facilitates the network device located in the third ERPS ring in determining the source of topology changes in the ERPS network.

[0015] Optionally, the second network device is located in the first ERPS ring, and the first network device is located in both the first and second ERPS rings. The method further includes: the first network device sending the tracing information to the second ERPS ring. For example, the first network device sends a topology change message carrying the tracing information to the second ERPS ring to send the tracing information to the second ERPS ring.

[0016] In this application, the first network device is located at the intersection of the first and second ERPS rings, meaning it is the device where the first and second ERPS rings intersect. In the technical solution provided, after receiving a topology change message carrying source information from the second network device located in the first ERPS ring, the intersecting device (e.g., the first network device) sends the source information to the second ERPS ring, which facilitates the network device located in the second ERPS ring in determining the source of topology changes in the ERPS network.

[0017] Optionally, the tracing information includes one or more of the following: the identifier of the port corresponding to the topology change source; the identifier of the network device corresponding to the topology change source; the identifier of the ERPS ring where the topology change source is located; and the identifier of the control virtual local area network (VLAN) of the ERPS ring where the topology change source is located. The topology change source can be a port or a link. When the topology change source is a port, the port corresponding to the topology change source is the topology change source itself, the network device corresponding to the topology change source is the network device where the topology change source (i.e., the port) is located, and the ERPS ring where the topology change source is located is the ERPS ring where the topology change source (i.e., the port) is located. When the topology change source is a link, the port corresponding to the topology change source is the directly connected port of the link, the network device corresponding to the topology change source is the network device where the directly connected port of the link is located, and the ERPS ring where the topology change source is located is the ERPS ring where the directly connected port of the link is located.

[0018] Optionally, the ERPS network includes a first ERPS ring, which is deployed at the access layer or aggregation layer, and a second network device is located on the first ERPS ring. The traceability information includes the identifier of the second network device and the identifier of the first ERPS ring; or, the traceability information includes the identifier of a third network device located on the first ERPS ring and the identifier of the first ERPS ring.

[0019] In cases where the tracing information includes the identifier of the second network device and the identifier of the first ERPS ring, the second network device is the network device corresponding to the topology change source, and the first ERPS ring is the ERPS ring where the topology change source is located. The topology change source can be a port of the second network device located within the first ERPS ring (or a port of the second network device belonging to the first ERPS ring). The tracing information may also include the identifier of that port of the second network device (i.e., the port corresponding to the topology change source) and the control VLAN identifier of the first ERPS ring. Alternatively, the topology change source can be a link located within the first ERPS ring, and a directly connected port of that link is a port of the second network device. The tracing information may also include the identifier of that port of the second network device (i.e., the port corresponding to the topology change source) and the control VLAN identifier of the first ERPS ring.

[0020] In this context, where the tracing information includes the identifier of a third network device located in the first ERPS ring and the identifier of the first ERPS ring, the third network device is the network device corresponding to the topology change source, and the first ERPS ring is the ERPS ring where the topology change source is located. The topology change source can be a port of the third network device located in the first ERPS ring (or a port of the third network device belonging to the first ERPS ring). The tracing information can also include the identifier of that port of the third network device (i.e., the port corresponding to the topology change source) and the control VLAN identifier of the first ERPS ring. Alternatively, the topology change source can be a link located in the first ERPS ring, and a directly connected port of that link is a port of the third network device. The tracing information can also include the identifier of that port of the third network device (i.e., the port corresponding to the topology change source) and the control VLAN identifier of the first ERPS ring.

[0021] Optionally, the topology change message is a ring auto protection switching (R-APS) message, which includes a topology change type length value (TLV) field, which is used to carry traceability information.

[0022] Optionally, topology change messages include any of the following: signal fail (SF) message; no request, RPL blocked (NRRB) message; forced switch (FS) message; manual switch (MS) message; event message. RPL stands for ring protection link.

[0023] Secondly, an apparatus for determining a source of topology change is provided, applied to a first network device in an ERPS network. The apparatus includes at least one functional module for performing the method provided by the first aspect or any alternative method thereof. The at least one functional module can be implemented in software, hardware, or a combination of both, and can be arbitrarily combined or divided based on a specific implementation.

[0024] Thirdly, an apparatus for determining a source of topological change is provided, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory so that the determining apparatus performs the method provided as described in the first aspect or any alternative to the first aspect.

[0025] Fourthly, an apparatus for determining a source of topology change is provided, comprising a main control board and an interface board, the main control board and the interface board being used to implement the method provided as described in the first aspect or any alternative method of the first aspect.

[0026] Fifthly, a communication system is provided, including a first network device in an ERPS network and a second network device in the ERPS network, wherein the first network device includes means for determining a source of topology change as provided in the second, third, or fourth aspects above.

[0027] In a sixth aspect, a computer-readable storage medium is provided, wherein a computer program is stored therein, which, when executed, implements the method provided as described in the first aspect or any alternative method of the first aspect.

[0028] In a seventh aspect, a computer program product is provided, comprising a program or code that, when executed, implements the method provided as described in the first aspect or any alternative method of the first aspect.

[0029] Eighthly, a chip is provided, including programmable logic circuitry and / or program instructions, which, when operated, are used to implement the methods provided as described in the first aspect or any alternative to the first aspect.

[0030] The technical effects of the second to eighth aspects mentioned above can be referred to the technical effects of the first aspect and its optional implementation methods, and will not be elaborated here. Attached Figure Description

[0031] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this application;

[0032] Figure 2 is a schematic diagram of the transmission of service messages in the application scenario shown in Figure 1;

[0033] Figure 3 is another schematic diagram of the transmission of service messages in the application scenario shown in Figure 1;

[0034] Figure 4 is a flowchart of a method for determining a topological change source provided in an embodiment of this application;

[0035] Figure 5 is a schematic diagram of a ring auto protection switching (R-APS) message provided in an embodiment of this application;

[0036] Figure 6 is a schematic diagram of a topology change type length value (TLV) field provided in an embodiment of this application;

[0037] Figure 7 is a schematic diagram of a device for determining a topological change source provided in an embodiment of this application;

[0038] Figure 8 is a schematic diagram of another device for determining a topological change source provided in an embodiment of this application;

[0039] Figure 9 is a schematic diagram of another device for determining a topological change source provided in an embodiment of this application. Detailed Implementation

[0040] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.

[0041] First, the application scenarios of the embodiments of this application will be introduced.

[0042] The application scenario of this application involves Ethernet ring protection switching (ERPS) networks. An ERPS network is a network running the ERPS protocol. The ERPS protocol is a standard ring network protocol specifically designed for the Ethernet link layer, and its basic unit is the ERPS ring. ERPS networks can be used for packet forwarding between user equipment to enable communication between different user equipment.

[0043] An ERPS network comprises at least one ERPS ring. Each ERPS ring consists of multiple interconnected network devices configured with the same control virtual local area network (VLAN). One ERPS ring physically corresponds to a ring Ethernet topology, and different ERPS rings have different control VLANs. When an ERPS network includes multiple ERPS rings, these rings can include a main ring and sub-rings. The main ring is typically a closed ring, and the sub-rings are typically open rings. The physical ring Ethernet topology corresponding to the main ring is usually a closed ring Ethernet topology, while the physical ring Ethernet topology corresponding to the sub-rings is usually an open ring Ethernet topology.

[0044] In an ERPS network, each network device can have a maximum of two ports connected to the same ERPS ring. Each ERPS ring includes a ring protection link (RPL), an RPL owner port, and an RPL neighbor port. The RPL owner port and RPL neighbor port are directly connected to the RPL. The network device containing the RPL owner port is called the RPL device, owner device, or master device, and the network device containing the RPL neighbor port is called the neighbor device. That is, the RPL connects between the owner device's RPL owner port and the neighbor device's RPL neighbor port. On each ERPS ring, the owner device controls whether the RPL is in a blocked or forwarding state by blocking or opening the RPL owner port. When the RPL owner port is blocked, the RPL is in a blocked state and is used to block the transmission of service packets. When the RPL owner port is open, the RPL is in a forwarding state and is used to transmit service packets. Typically, there can only be one RPL owner port on an ERPS ring, and therefore, only one owner device on an ERPS ring. The RPL owner port is determined by user configuration. On each ERPS ring, ports other than the RPL owner port and RPL neighbor port are ordinary ports. Ordinary ports are responsible for monitoring the link status of their directly connected links and promptly notifying other ports on their ERPS ring of any changes in link status.

[0045] To prevent loops in the ERPS ring, a loop-breaking mechanism can be activated to block the RPL owner port. When the ERPS ring is in normal operation, the owner device on the ERPS ring blocks the RPL owner port, and the RPL on the ERPS ring is in a blocked state to block service packet transmission. After a link failure occurs in the ERPS ring, the network device containing the directly connected port of the failed link blocks that directly connected port. The owner device on the ERPS ring quickly releases the RPL owner port, and the RPL on the ERPS ring switches to forwarding state to transmit service packets, thereby achieving link protection switching and restoring communication between network devices on the ERPS ring. The blocked port (i.e., the port in a blocked state, including but not limited to the RPL owner port) is also called the blocked port.

[0046] The following uses an ERPS network comprising multiple ERPS rings as an example to illustrate the application scenarios of this application's embodiments, in conjunction with the accompanying drawings.

[0047] Please refer to Figure 1, which illustrates an application scenario provided by an embodiment of this application. This application scenario includes an ERPS network and user equipment 201-202 connected to the ERPS network. The ERPS network is used for packet forwarding between user equipment 201 and user equipment 202 to enable communication between them. The ERPS network includes multiple network devices and multiple ERPS rings. These network devices run the ERPS protocol. Each ERPS ring consists of multiple interconnected network devices configured with the same control VLAN. Each ERPS ring physically corresponds to a ring Ethernet topology, and the control VLANs of different ERPS rings are different.

[0048] Figure 1 illustrates the multiple network devices as network devices 101-107, and the multiple ERPS rings as ERPS rings 1-3. Network devices 101-107 run the ERPS protocol. User equipment 201 is connected to network device 101, and user equipment 202 is connected to network device 107. ERPS ring 1 is composed of network devices 101-104 configured with the same control VLAN (e.g., referred to as control VLAN 1). ERPS ring 1 physically corresponds to the ring Ethernet topology formed by the connection of network devices 101-104 (e.g., referred to as ring Ethernet topology 1). ERPS ring 2 is composed of network devices 103-106 configured with the same control VLAN (e.g., referred to as control VLAN 2). ERPS ring 2 physically corresponds to the ring Ethernet topology formed by the connection of network devices 103-106 (e.g., referred to as ring Ethernet topology 2). ERPS ring 3 consists of network devices 105-107 configured with the same control VLAN (e.g., control VLAN 3). Physically, ERPS ring 3 corresponds to the ring Ethernet topology formed by connecting network devices 105-107 (e.g., referred to as ring Ethernet topology 3). It can be understood that network devices 103-104 are located in both ERPS ring 1 and ERPS ring 2, and are the intersecting devices of ERPS ring 1 and ERPS ring 2. Network devices 105-106 are located in both ERPS ring 2 and ERPS ring 3, and are the intersecting devices of ERPS ring 2 and ERPS ring 3.

[0049] For example, ERPS ring 3 is the main ring, and ERPS ring 1 and ERPS ring 2 are both sub-rings. As shown in Figure 1, user equipment 201 is connected to port P13 of network device 101, and user equipment 202 is connected to port P73 of network device 107. Port P53 of network device 105 is connected to port P63 of network device 106, port P62 of network device 106 is connected to port P72 of network device 107, and port P71 of network device 107 is connected to port P52 of network device 105, forming ring Ethernet topology 3, which is a closed ring Ethernet topology. Port P51 of network device 105 is connected to port P32 of network device 103, port P33 of network device 103 is connected to port P43 of network device 104, and port P42 of network device 104 is connected to port P61 of network device 106, forming ring Ethernet topology 2, which is an open ring Ethernet topology. Port P31 of network device 103 is connected to port P11 of network device 101, port P12 of network device 101 is connected to port P22 of network device 102, and port P21 of network device 102 is connected to port P41 of network device 104, forming a ring Ethernet topology 1, which is an open ring Ethernet topology.

[0050] Ports P52 and P53 of network device 105, P62 and P63 of network device 106, P71 and P72 of network device 107 all belong to ERPS ring 3. Ports P32 and P33 of network device 103, P42 and P43 of network device 104, P51 of network device 105, and P61 of network device 106 all belong to ERPS ring 2. Ports P11 and P12 of network device 101, P21 and P22 of network device 102, P31 of network device 103, and P41 of network device 104 all belong to ERPS ring 1. For example, port P11 of network device 101 is the RPL owner port on ERPS ring 1; port P31 of network device 103 is the RPL neighbor port on ERPS ring 1; ports P12 of network device 101, P21 and P22 of network device 102, and port P41 of network device 104 are all ordinary ports on ERPS ring 1; network device 101 is the owner device on ERPS ring 1; network device 103 is the neighbor device on ERPS ring 1; the link between port P11 of network device 101 and port P31 of network device 103 is the RPL on ERPS ring 1. Port P43 of network device 104 is the RPL owner port on ERPS ring 2; port P33 of network device 103 is the RPL neighbor port on ERPS ring 2; ports P32 of network device 103, P42 of network device 104, P51 of network device 105, and P61 of network device 106 are all ordinary ports on ERPS ring 2; network device 104 is the owner device on ERPS ring 2; network device 103 is the neighbor device on ERPS ring 2; the link between port P43 of network device 104 and port P33 of network device 103 is the RPL on ERPS ring 2. Port P63 of network device 106 is the RPL owner port on ERPS ring 3; port P53 of network device 105 is the RPL neighbor port on ERPS ring 3; ports P52 of network device 105, P62 of network device 106, P71 of network device 107, and P72 of network device 107 are all ordinary ports on ERPS ring 3; network device 106 is the owner device on ERPS ring 3; network device 105 is the neighbor device on ERPS ring 3; the link between port P63 of network device 106 and port P53 of network device 105 is the RPL on ERPS ring 3.It should be noted that in the embodiments of this application, "port belongs to ERPS ring" means that the port is located in ERPS ring, and the meanings of "port belongs to ERPS ring", "port is located in ERPS ring" and "port is located on ERPS ring" are the same.

[0051] When all ERPS rings 1-3 are functioning normally (e.g., no link failures occur on ERPS rings 1-3, and no ports are forcibly or manually blocked on ERPS rings 1-3), network device 101 blocks the RPL owner port (i.e., port P11) on ERPS ring 1, network device 104 blocks the RPL owner port (i.e., port P43) on ERPS ring 2, and network device 106 blocks the RPL owner port (i.e., port P63) on ERPS ring 3. The RPLs on ERPS ring 1, ERPS ring 2, and ERPS ring 3 are all in a blocked state to block service packet transmission. Service packets sent from user equipment 201 to user equipment 202 are transmitted according to the transmission path S1 shown in Figure 2. Transmission path S1 is: Network device 101 -> Network device 102 -> Network device 104 -> Network device 106 -> Network device 107.

[0052] After a link failure occurs on any of the ERPS rings 1-3, the network device containing the directly connected port of the failed link blocks that directly connected port. The owner device on that ERPS ring quickly releases the RPL owner port on that ERPS ring, and the RPL on that ERPS ring switches to forwarding state to transmit service packets, thereby achieving link protection switching. Refer to Figure 3, which illustrates a link failure between port P12 of network device 101 and port P22 of network device 102 as an example. For simplicity, the link between port P12 of network device 101 and port P22 of network device 102 is referred to as link L. P12-P22 Link L P12-P22 It is a link on ERPS ring 1, link L P12- P22 The directly connected ports are port P12 and port P22. On link L... P12-P22After a failure occurs, network device 101 blocks port P12, and network device 102 blocks port P22. Simultaneously, network device 101 quickly releases port P11 (i.e., the RPL owner port on ERPS ring 1). The RPL on ERPS ring 1 switches to forwarding mode to transmit service packets, thus achieving link protection switching. After the RPL on ERPS ring 1 switches to forwarding mode, service packets from user equipment 201 to user equipment 202 are transmitted according to the transmission path S2 shown in Figure 3. The transmission path S2 is: Network device 101 -> Network device 103 -> Network device 105 -> Network device 107. It should be noted that, taking a link failure as an example, if a port on any of the ERPS rings 1 to 3 is forcibly or manually blocked, the owner device on that ERPS ring will quickly release the RPL owner port on that ERPS ring, so that the RPL on that ERPS ring switches to forwarding state to transmit service packets. This application embodiment does not limit this.

[0053] In an ERPS network comprising multiple ERPS rings, after the topology of any of these ERPS rings changes, the network devices on that ERPS ring refresh the forwarding database (FDB) table. Furthermore, devices intersecting the ERPS ring with its intersecting ring send (e.g., broadcast) a topology change message to the intersecting ring, causing the network devices on that intersecting ring to refresh their FDB tables. Similarly, devices intersecting the intersecting ring with its intersecting ring (i.e., the ERPS ring intersecting with the intersecting ring) send (e.g., broadcast) a topology change message to the intersecting ring of the intersecting ring, causing the network devices on that intersecting ring to refresh their FDB tables. This process continues until all network devices on all the ERPS rings have refreshed their FDB tables. For example, the multiple ERPS rings are deployed across multiple network layers. ERPS rings deployed in adjacent network layers intersect, and the intersecting ring of any ERPS ring includes the upper-layer ring of that ERPS ring. Any ERPS ring and its upper-layer ring are deployed in two adjacent network layers, and the network layer where the upper-layer ring of any ERPS ring is located is above the network layer where the ERPS ring is located. For instance, the multiple network layers include an access layer, a aggregation layer, and a core layer. The aggregation layer is adjacent to the access layer, and the aggregation layer is adjacent to the core layer. The multiple ERPS rings include an ERPS ring deployed in the access layer (also called an access ring), an ERPS ring deployed in the aggregation layer (also called an aggregation ring), and an ERPS ring deployed in the core layer (also called a core ring). The aggregation ring is the upper-layer ring of the access ring, and the core ring is the upper-layer ring of the aggregation ring. When multiple ERPS rings are deployed across multiple network layers, after the topology of any of the ERPS rings changes, the network devices on that ERPS ring refresh their FDB tables. Furthermore, devices intersecting with the upper-layer ring of that ERPS ring send (e.g., broadcast) topology change messages to the upper-layer ring, causing the network devices on that upper-layer ring to refresh their FDB tables. Similarly, devices intersecting with the upper-layer ring of that upper-layer ring send (e.g., broadcast) topology change messages to the upper-layer ring of that upper-layer ring, causing the network devices on that upper-layer ring to refresh their FDB tables. This process continues until all network devices on all the ERPS rings have refreshed their FDB tables.

[0054] However, according to the current ERPS protocol, the topology change message sent by intersecting devices to the upper ring only includes the identifier of the upper ring and the MAC address of the intersecting device, making it impossible for network devices on the upper ring to determine the source of the topology change (i.e., the root cause of the topology change). This application provides a technical solution that includes source information for determining the source of the topology change in the topology change message announcing a topology change in the ERPS network. This allows network devices in the ERPS network to determine the source of the topology change based on the source information carried in the received topology change message, thus achieving source tracing of the topology change.

[0055] In this embodiment, the topology change message can be a ring auto protection switching (R-APS) message. Furthermore, the R-APS message serving as the topology change message can be a signal fail (SF) message, a no-request, RPL blocked (NRRB) message, an event message, a forced switch (FS) message, or a manual switch (MS) message. The type of R-APS message serving as the topology change message can differ in different scenarios.

[0056] In this application embodiment, the causes of topology changes include, but are not limited to: link failure, link failure recovery, manually blocking a port (i.e., manually blocking a port of a network device), manually releasing a blocked port (i.e., a blocked port, a port in a blocked state), forcibly blocking a port (i.e., forcibly blocking a port of a network device), or forcibly releasing a blocked port. Link failures manifest as failures of directly connected ports of the link, and link failure recovery manifests as recovery from a direct-connected port failure. Port failures include port down, and port failure recovery includes port up. Based on this, it can be understood that the source of topology changes in the ERPS network can be a link in the ERPS network or a port in the ERPS network (i.e., an interface of a network device in the ERPS network). In optional embodiments, the tracing information used to determine the source of topology changes includes one or more of the following: the identifier of the port corresponding to the topology change source; the identifier (ID) of the network device corresponding to the topology change source; the ID of the ERPS ring where the topology change source is located; and the control VLAN ID of the ERPS ring where the topology change source is located. In the case where the source of topology change in an ERPS network is a port within that ERPS network, the port corresponding to the source of topology change is that specific port (i.e., the source of topology change itself), the network device corresponding to the source of topology change is the network device containing that specific port, and the ERPS ring containing the source of topology change is the ERPS ring containing that specific port. For example, when the source of topology change in an ERPS network is a port, the tracing information used to determine the source of topology change includes one or more of the following: the identifier of the specific port, the identifier of the network device containing that specific port, the ID of the ERPS ring containing that specific port, and the control VLAN ID of the ERPS ring containing that specific port. In the case where the source of topology change in an ERPS network is a link within that ERPS network, the port corresponding to the source of topology change is the directly connected port of that specific link, the network device corresponding to the source of topology change is the network device containing the directly connected port of that specific link, and the ERPS ring containing the source of topology change is the ERPS ring containing the directly connected port of that specific link. For example, if the source of a topology change in an ERPS network is a link within that ERPS network, the source information used to determine the source of the topology change includes one or more of the following: the identifier of the directly connected port of that link, the identifier of the network device to which the directly connected port resides, the ID of the ERPS ring to which the directly connected port resides, and the control VLAN ID of the ERPS ring to which the directly connected port resides. The control VLAN ID of any ERPS ring is the ID of the control VLAN of that ERPS ring; the identifier of any network device can be the MAC address of that network device; and the identifier of any port can be the name or port number of that port.The ERPS ring where the topology change source is located is the same as the ERPS ring to which the topology change source belongs; the two have the same meaning. Similarly, the ERPS ring where a port is located is the same as the ERPS ring to which the port belongs; the two have the same meaning. The ERPS ring where a network device is located is the same as the ERPS ring to which the network device belongs; the two have the same meaning.

[0057] Regardless of the cause of a topology change in the ERPS network, topology diffusion is required within the ERPS network. The following section describes the current ERPS protocol-defined topology diffusion scheme and the topology diffusion scheme of this application embodiment, using the application scenario shown in Figure 1 as an example. In the following description, we will use an example of ERPS ring 1 deployed at the access layer, ERPS ring 2 deployed at the aggregation layer, and ERPS ring 3 deployed at the core layer. It is assumed that network devices 103 and 104 are both configured to notify ERPS ring 2 of topology changes in ERPS ring 1, and network devices 105 and 106 are both configured to notify ERPS ring 3 of topology changes in ERPS ring 2.

[0058] First, a topology diffusion scheme for link failure scenarios.

[0059] With link L P12-P22 Let's take a failure as an example. Link L P12-P22 A failure will cause a change in the topology of ERPS ring 1, which in turn will cause a change in the topology of the aforementioned ERPS network. Link L P12-P22 It is the source of topology changes in the ERPS network.

[0060] In link L P12-P22 After a failure occurs, both network device 101 and network device 102 can detect the link L. P12-P22 Fault (e.g., network device 101 detects port P12 offline, network device 102 detects port P22 offline).

[0061] According to the current ERPS protocol, network device 101 detects link L P12-P22 After the failure, network device 101 blocks port P12, opens the RPL owner port (i.e., port P11) on ERPS ring 1, refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P11 and P12), and sends (e.g., broadcasts) an SF message to ERPS ring 1, for example, calling this SF message SF message A1, which includes the MAC address of network device 101. Network device 102 detects link L. P12-P22After the failure, network device 102 blocks port P22 of network device 102, refreshes the FDB table of network device 102 (for example, clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22) in network device 102), and sends (e.g., broadcasts) an SF message to ERPS ring 1, for example, calling the SF message SF message A2, which includes the MAC address of network device 102. After receiving the SF message A1, network device 103 refreshes its FDB table according to the SF message A1 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P31) and ports belonging to ERPS ring 2 (i.e., ports P32 and P33)). Then, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message EVENT message A3. The EVENT message A3 includes the identifier of ERPS ring 2 and the MAC address of network device 103. After receiving the SF message A2, network device 104 refreshes its FDB table according to the SF message A2 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P41) and ports belonging to ERPS ring 2 (i.e., ports P42 and P43)). Then, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message EVENT message A4. The EVENT message A4 includes the identifier of ERPS ring 2 and the MAC address of network device 104. After receiving the EVENT message A3, network device 105 refreshes its FDB table based on the EVENT message A3 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P51) and ports belonging to ERPS ring 3 (i.e., ports P52 and P53)). Then, network device 105 sends (e.g., broadcasts) the EVENT message to ERPS ring 3, for example, calling the EVENT message EVENT message A5. The EVENT message A5 includes the identifier of ERPS ring 3 and the MAC address of network device 105.After receiving the EVENT message A4, network device 106 refreshes its FDB table based on the EVENT message A4 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P61) and ports belonging to ERPS ring 3 (i.e., ports P62 and P63)). Then, network device 106 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message A6. EVENT message A6 includes the identifier of ERPS ring 3 and the MAC address of network device 106. After receiving EVENT message A5 and / or EVENT message A6, network device 107 refreshes its FDB table based on EVENT message A5 and / or EVENT message A6 (e.g., clearing the FDB table of ports belonging to ERPS ring 3 (i.e., ports P71 and P72) in network device 107). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT message A5 and EVENT message A6. For example, if network device 107 receives EVENT message A5 first and then EVENT message A6, network device 107 refreshes its FDB table based on EVENT message A5, but does not refresh its FDB table after receiving EVENT message A6.

[0062] It should be noted that network device 104 may also receive EVENT message A3. After receiving EVENT message A3, network device 104 checks whether the FDB table for ports belonging to ERPS ring 2 in network device 104 has been updated. If it has not been updated, network device 104 updates the FDB table for ports belonging to ERPS ring 2 in network device 104 according to EVENT message A3; if it has been updated, network device 104 does not update the FDB table for ports belonging to ERPS ring 2 in network device 104. Similarly, network device 103 may also receive EVENT message A4. After receiving EVENT message A4, network device 103 checks whether the FDB table for ports belonging to ERPS ring 2 in network device 103 has been updated. If it has not been updated, network device 103 updates the FDB table for ports belonging to ERPS ring 2 in network device 103 according to EVENT message A4; if it has been updated, network device 103 does not update the FDB table for ports belonging to ERPS ring 2 in network device 103. Network device 106 may also receive EVENT message A5. After receiving EVENT message A5, network device 106 checks whether the FDB table of ports belonging to ERPS ring 3 in network device 106 has been updated. If it has not been updated, network device 106 updates the FDB table of ports belonging to ERPS ring 3 in network device 106 according to EVENT message A5. If it has been updated, network device 106 does not update the FDB table of ports belonging to ERPS ring 3 in network device 106. Network device 105 may also receive EVENT message A6. After receiving EVENT message A6, network device 105 checks whether the FDB table of ports belonging to ERPS ring 3 in network device 105 has been updated. If it has not been updated, network device 105 updates the FDB table of ports belonging to ERPS ring 3 in network device 105 according to EVENT message A6. If it has been updated, network device 105 does not update the FDB table of ports belonging to ERPS ring 3 in network device 105.

[0063] The aforementioned SF messages A1-A2 and EVENT messages A3-A6 are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether its relevant FDB table has been updated. If not, it updates it.

[0064] Based on the above description, it can be seen that according to the current ERPS protocol, in link L... P12-P22After a failure occurs, each network device in network devices 103-104 sends a topology change message to ERPS ring 2 containing only the identifier of ERPS ring 2 and its own MAC address. Similarly, each network device in network devices 105-106 sends a topology change message to ERPS ring 3 containing only the identifier of ERPS ring 3 and its own MAC address. In other words, the topology change message sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) contains only the identifier of that upper ring and the MAC address of the intersecting device. Likewise, the topology change message sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) contains only the identifier of that upper ring and the MAC address of the intersecting device. This results in the network devices (e.g., network devices 105-107) on ERPS ring 2 and ERPS ring 3 being unable to determine the source of the topology change.

[0065] In the technical solution provided in the embodiments of this application, in link L P12-P22 After a failure occurs, by including source information in the topology change message to identify the source of the topology change, network devices on the upper-layer ring can determine the source of the topology change based on this source information. For example, the source information for identifying the source of the topology change includes the identifier of the port corresponding to the source, the identifier of the network device corresponding to the source, the ID of the ERPS ring where the source of the topology change resides, and the control VLAN ID of the ERPS ring where the source of the topology change resides. When the source of the topology change is link L... P12-P22 In this case, the source information used to determine the source of the topology change specifically includes link L P12-P22 The identifier of the directly connected port, link L P12-P22 The identifier of the network device where the direct connection port is located, and the link L P12-P22 The ERPS ring (i.e., link L) where the direct connection port is located P12-P22 ID of the ERPS ring to which the direct-connect port belongs, link L P12-P22 The control VLAN ID of the ERPS ring where the direct-connect port is located.

[0066] In the technical solution provided in this application embodiment, network device 101 senses link L P12-P22After the failure, network device 101 blocks port P12, opens the RPL owner port (i.e., port P11) on ERPS ring 1, refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P11 and P12), and sends (e.g., broadcasts) an SF message to ERPS ring 1, referred to as SF message F1. SF message F1 carries source information X1 (SF message F1 may also include the MAC address of network device 101). Source information X1 includes: the identifier of port P12 (i.e., link L). P12-P22 The identifier of the directly connected port P12), and the identifier of network device 101 (i.e., link L). P12-P22 The identifier of the network device where the direct-connect port P12 is located), and the ID of ERPS ring 1 (i.e., link L). P12-P22 The ID of the ERPS ring where the direct-connect port P12 is located) and the control VLAN ID of ERPS ring 1 (i.e., link L) P12-P22 (The control VLAN ID of the ERPS ring where the directly connected port P12 is located). Network device 102 senses link L. P12-P22 Following the failure, network device 102 blocks port P22. Network device 102 refreshes its FDB table (e.g., clearing the FDB table for ports belonging to ERPS ring 1 (i.e., ports P21 and P22)). Furthermore, network device 102 sends (e.g., broadcasts) an SF message to ERPS ring 1, referred to as SF message F2. SF message F2 carries source information X2 (SF message F2 may also include the MAC address of network device 102). Source information X2 includes: the identifier of port P22 (i.e., link L). P12-P22 The identifier of the direct-connect port P22), and the identifier of network device 102 (i.e., link L). P12-P22 The identifier of the network device where the direct-connect port P22 is located), and the ID of ERPS ring 1 (i.e., link L). P12-P22 The ID of the ERPS ring where the direct-connect port P22 is located) and the control VLAN ID of ERPS ring 1 (i.e., link L) P12-P22The control VLAN ID of the ERPS ring where the directly connected port P22 is located. After receiving the SF message F1, network device 103 determines the source of the topology change, including port P12 in network device 101 belonging to ERPS ring 1, based on the source information X1 carried in the SF message F1. Network device 103 refreshes its FDB table based on the SF message F1 (for example, clearing the FDB table of ports in network device 103 belonging to ERPS ring 1 (i.e., port P31), and clearing the FDB table of ports in network device 103 belonging to ERPS ring 2 (i.e., ports P32 and P33). Network device 103 then sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message F3. EVENT message F3 carries the source information X1 (EVENT message F3 may also include the identifier of ERPS ring 2 and the MAC address of network device 103). After receiving the SF message F2, network device 104 determines the source of the topology change, including port P22 belonging to ERPS ring 1 in network device 102, based on the source information X2 carried in the SF message F2. Network device 104 refreshes its FDB table based on the SF message F2 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P41) in network device 104, and clearing the FDB table of ports belonging to ERPS ring 2 (i.e., ports P42 and P43) in network device 104). Network device 104 then sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message F4. EVENT message F4 carries the source information X2 (EVENT message F4 may also include the identifier of ERPS ring 2 and the MAC address of network device 104). After receiving the EVENT message F3, network device 105 determines the source of the topology change, including port P12 belonging to ERPS ring 1 in network device 101, based on the source information X1 carried in the EVENT message F3. Network device 105 refreshes its FDB table based on the EVENT message F3 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P51) in network device 105, and clearing the FDB table of ports belonging to ERPS ring 3 (i.e., ports P52 and P53) in network device 105), and sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message F5. EVENT message F5 carries the source information X1 (EVENT message F5 may also include the identifier of ERPS ring 3 and the MAC address of network device 105).After receiving the EVENT message F4, network device 106 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information X2 carried in the EVENT message F4. Network device 106 refreshes its FDB table based on the EVENT message F4 (for example, clearing the FDB table of ports in network device 106 belonging to ERPS ring 2 (i.e., port P61), and clearing the FDB table of ports in network device 106 belonging to ERPS ring 3 (i.e., ports P62 and P63). Network device 106 then sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message F6. EVENT message F6 carries the source information X2 (EVENT message F6 may also include the identifier of ERPS ring 3 and the MAC address of network device 106). After receiving the EVENT message F5, network device 107 determines, based on the source information X1 carried in the EVENT message F5, that the source of the topology change includes port P12 of network device 101 belonging to ERPS ring 1; after receiving the EVENT message F6, network device 107 determines, based on the source information X2 carried in the EVENT message F6, that the source of the topology change includes port P22 of network device 102 belonging to ERPS ring 1; furthermore, network device 107, in conjunction with the topology of the ERPS network, determines that the source of the topology change is the link L between port P12 of network device 101 and port P22 of network device 102. P12-P22 And determine link L P12-P22 This belongs to ERPS ring 1. After receiving EVENT message F5 and / or EVENT message F6, network device 107 also refreshes its FDB table based on EVENT message F5 and / or EVENT message F6 (for example, clearing the FDB table of ports belonging to ERPS ring 3 (i.e., ports P71 and P72) in network device 107). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT message F5 and EVENT message F6. For example, if network device 107 receives EVENT message F5 first and then EVENT message F6, network device 107 refreshes its FDB table after receiving EVENT message F5, but does not refresh its FDB table after receiving EVENT message F6.

[0067] It should be noted that network device 104 may also receive EVENT message F3. After receiving EVENT message F3, network device 104 determines, based on the source information X1 carried in EVENT message F3, that the source of the topology change includes port P12 in network device 101 belonging to ERPS ring 1. Furthermore, network device 104 checks whether the FDB table of ports in network device 104 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 104 updates the FDB table of ports in network device 104 belonging to ERPS ring 2 based on EVENT message F3. If it has been updated, network device 104 does not update the FDB table of ports in network device 104 belonging to ERPS ring 2. Network device 103 may also receive an EVENT message F4. After receiving the EVENT message F4, network device 103 determines, based on the source information X2 carried in the EVENT message F4, that the source of the topology change includes port P22 in network device 102 belonging to ERPS ring 1. Furthermore, network device 103 checks whether the FDB table of ports in network device 103 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 103 updates the FDB table of ports in network device 103 belonging to ERPS ring 2 based on the EVENT message F4. If it has been updated, network device 103 does not update the FDB table of ports in network device 103 belonging to ERPS ring 2. Network device 106 may also receive an EVENT message F5. After receiving the EVENT message F5, network device 106 determines, based on the source information X1 carried in the EVENT message F5, that the source of the topology change includes port P12 in network device 101 belonging to ERPS ring 1. Furthermore, network device 106 checks whether the FDB table of ports in network device 106 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 106 updates the FDB table of ports in network device 106 belonging to ERPS ring 3 according to the EVENT message F5. If it has been updated, network device 106 does not update the FDB table of ports in network device 106 belonging to ERPS ring 3. Network device 105 may also receive an EVENT message F6. After receiving the EVENT message F6, network device 105 determines, based on the source information X2 carried in the EVENT message F6, that the source of the topology change includes port P22 in network device 102 belonging to ERPS ring 1. Furthermore, network device 105 checks whether the FDB table of the ports in network device 105 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 105 updates the FDB table of the ports in network device 105 belonging to ERPS ring 3 based on the EVENT message F6. If it has been updated, network device 105 does not update the FDB table of the ports in network device 105 belonging to ERPS ring 3.

[0068] Based on the above description, each of network devices 103-106 can determine that the source of topology change includes port P12 of network device 101 belonging to ERPS ring 1 and port P22 of network device 102 belonging to ERPS ring 1. Furthermore, each of network devices 103-106 can, in conjunction with the topology of the ERPS network, determine that the source of topology change is the link L between port P12 of network device 101 and port P22 of network device 102. P12-P22 And determine link L P12-P22 It belongs to ERPS ring 1.

[0069] The aforementioned SF messages F1-F2 and EVENT messages F3-F6 are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether its relevant FDB table has been updated. If not, it updates it.

[0070] Based on the above description, in this embodiment of the application, in link L P12-P22 After a failure occurs, each network device in network devices 103-104 sends a topology change message to ERPS ring 2 carrying source information, and each network device in network devices 105-106 sends a topology change message to ERPS ring 3 carrying source information. That is, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) carry source information. Similarly, the topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) carry source information. This allows network devices on both ERPS ring 2 and ERPS ring 3 to determine the source of the topology change based on the source information carried in the topology change messages.

[0071] Second, topology diffusion schemes in link failure recovery scenarios.

[0072] With link L P12-P22 Let's take recovery after a failure as an example. As mentioned earlier, in link L... P12-P22 After the failure occurred, network devices 101-107 all refreshed their FDB tables. Furthermore, on link L... P12-P22 Before the fault is recovered, network devices 101-107 can build an FDB table through MAC learning to forward service packets based on the newly built FDB table. On link L... P12-P22After the fault is recovered, the network device containing the RPL owner port on ERPS ring 1 needs to re-block that RPL owner port. This will cause a change in the topology of ERPS ring 1, and consequently, a change in the topology of the ERPS network. In this case, the RPL owner port on ERPS ring 1 is the source of topology change in the ERPS network.

[0073] In link L P12-P22 After the fault is recovered, both network device 101 and network device 102 can detect link L. P12-P22 Fault recovery (e.g., network device 101 detects port P12 is online, and network device 102 detects port P22 is online).

[0074] According to the current ERPS protocol, network device 101 (i.e., link L) P12-P22 The network device where the direct-connect port P12 is located senses link L P12-P22 After the fault is recovered, network device 101 opens port P12, refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P11 and P12), and sends (e.g., broadcasts) a no-request (NR) message to ERPS ring 1. This NR message is referred to as NR message B1, and includes the MAC address of network device 101. Network device 102 (i.e., link L...) P12-P22 The network device where the directly connected port P22 is located senses the link L. P12-P22 After the fault is recovered, network device 102 opens port P22, refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22), and sends (e.g., broadcasts) an NR message to ERPS ring 1, for example, calling this NR message NR message B2, which includes the MAC address of network device 102. The network device (i.e., network device 101) where the RPL owner port (i.e., port P11) on ERPS ring 1 is located detects link L. P12-P22After the fault is recovered (e.g., after network device 101 detects that port P12 is online or receives NR packet B2), network device 101 starts a wait-to-restore (WTR) timer. After the WTR timer expires, network device 101 blocks the RPL owner port (i.e., port P11) on ERPS ring 1 and sends (e.g., broadcasts) an NRRB packet to ERPS ring 1. This NRRB packet is referred to as NRRB packet B1, and NRRB packet B1 includes the MAC address of network device 101. After receiving NRRB packet B1, network device 102 continues to send (e.g., broadcasts) NRRB packet B1 to ERPS ring 1. (Since network device 102 has already updated the FDB table, it only needs to send NRRB packet B1 here. If network device 102 has not yet updated the FDB table, it will need to update the FDB table after receiving NRRB packet B1.) After receiving the NRRB message B1, network device 103 refreshes its FDB table according to the NRRB message B1 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P31) and ports belonging to ERPS ring 2 (i.e., ports P32 and P33)). Then, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message B3. The EVENT message B3 includes the identifier of ERPS ring 2 and the MAC address of network device 103. After receiving the NRRB message B1, network device 104 refreshes its FDB table based on the NRRB message B1 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P41) and ports belonging to ERPS ring 2 (i.e., ports P42 and P43)). Then, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message B4. The EVENT message B4 includes the identifier of ERPS ring 2 and the MAC address of network device 104.After receiving the EVENT message B3, network device 105 refreshes its FDB table based on the EVENT message B3 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P51) and ports belonging to ERPS ring 3 (i.e., ports P52 and P53)). Then, network device 105 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message B5. EVENT message B5 includes the identifier of ERPS ring 3 and the MAC address of network device 105. After receiving the EVENT message B4, network device 106 refreshes its FDB table based on the EVENT message B4 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P61) and ports belonging to ERPS ring 3 (i.e., ports P62 and P63)). Then, network device 106 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message B6. EVENT message B6 includes the identifier of ERPS ring 3 and the MAC address of network device 106. After receiving EVENT message B5 and / or EVENT message B6, network device 107 refreshes its FDB table based on EVENT message B5 and / or EVENT message B6 (e.g., clearing the FDB table of ports belonging to ERPS ring 3 (i.e., ports P71 and P72) in network device 107). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT message B5 and EVENT message B6. For example, if network device 107 receives EVENT message B5 first and then EVENT message B6, network device 107 refreshes its FDB table after receiving EVENT message B5, but does not refresh its FDB table after receiving EVENT message B6.

[0075] It should be noted that network device 104 may also receive EVENT message B3. After receiving EVENT message B3, network device 104 checks whether the FDB table for ports belonging to ERPS ring 2 in network device 104 has been updated. If it has not been updated, network device 104 updates the FDB table for ports belonging to ERPS ring 2 in network device 104 according to EVENT message B3; if it has been updated, network device 104 does not update the FDB table for ports belonging to ERPS ring 2 in network device 104. Similarly, network device 103 may also receive EVENT message B4. After receiving EVENT message B4, network device 103 checks whether the FDB table for ports belonging to ERPS ring 2 in network device 103 has been updated. If it has not been updated, network device 103 updates the FDB table for ports belonging to ERPS ring 2 in network device 103 according to EVENT message B4; if it has been updated, network device 103 does not update the FDB table for ports belonging to ERPS ring 2 in network device 103. Network device 106 may also receive EVENT message B5. After receiving EVENT message B5, network device 106 checks whether the FDB table for ports belonging to ERPS ring 3 in network device 106 has been updated. If it has not been updated, network device 106 updates the FDB table for ports belonging to ERPS ring 3 in network device 106 according to EVENT message B5; if it has been updated, network device 106 does not update the FDB table for ports belonging to ERPS ring 3 in network device 106. Network device 105 may also receive EVENT message B6. After receiving EVENT message B6, network device 105 checks whether the FDB table for ports belonging to ERPS ring 3 in network device 105 has been updated. If it has not been updated, network device 105 updates the FDB table for ports belonging to ERPS ring 3 in network device 105 according to EVENT message B6; if it has been updated, network device 105 does not update the FDB table for ports belonging to ERPS ring 3 in network device 105. In addition, the network device where the RPL owner port is located usually refreshes the FDB table after the WTR timer expires. In this example, due to link L... P12-P22 The network device where the directly connected port P12 is located and the network device where the RPL owner port on ERPS ring 1 is located are both network device 101. Network device 101 detects link L P12-P22 The FDB table has been refreshed after the fault was recovered. Therefore, the above does not describe the content of the FDB table refreshed by the network device where the RPL owner port is located after the WTR timer expires.

[0076] The aforementioned NRRB message B1 and EVENT messages B3-B6 are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether its relevant FDB table has been refreshed; if not, it refreshes it.

[0077] Based on the above description, it can be seen that according to the current ERPS protocol, in link L... P12-P22 After the fault is recovered, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 (i.e., network devices 103-104) to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) only include the identifier of the upper ring and the MAC address of the intersecting device. Similarly, the topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 (i.e., network devices 105-106) to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) only include the identifier of the upper ring and the MAC address of the intersecting device. This results in the network devices (e.g., network devices 105-107) on ERPS ring 2 and ERPS ring 3 being unable to determine the source of the topology change.

[0078] In the technical solution provided in the embodiments of this application, in link L P12-P22 After fault recovery, by including source information in the topology change message to identify the source of the topology change, network devices on the upper-layer ring can determine the source of the topology change based on the source information carried in the topology change message. For example, the source information for identifying the source of the topology change includes the identifier of the port corresponding to the source, the identifier of the network device corresponding to the source, the ID of the ERPS ring where the source of the topology change resides, and the control VLAN ID of the ERPS ring where the source of the topology change resides. When the source of the topology change is the RPL owner port (i.e., port P11) on ERPS ring 1, the source information specifically includes the identifier of port P11 (i.e., the RPL owner port on ERPS ring 1), the identifier of network device 101 (i.e., the network device where the RPL owner port on ERPS ring 1 resides), the ID of ERPS ring 1 (i.e., the ERPS ring where the RPL owner port on ERPS ring 1 resides), and the control VLAN ID of ERPS ring 1 (i.e., the ERPS ring where the RPL owner port on ERPS ring 1 resides).

[0079] In the technical solution provided in this application embodiment, network device 101 (i.e., link L) P12-P22 The network device where the direct-connect port P12 is located senses link L P12-P22After the fault is recovered, network device 101 opens port P12, refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P11 and P12), and sends (e.g., broadcasts) an NR message to ERPS ring 1, for example, calling this NR message NR message G1, which includes the MAC address of network device 101. Network device 102 (i.e., link L) P12-P22 The network device where the directly connected port P22 is located senses the link L. P12-P22 After the fault is recovered, network device 102 opens port P22, refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22), and sends (e.g., broadcasts) an NR message to ERPS ring 1, named NR message G2, which includes the MAC address of network device 102. The network device (i.e., network device 101) where the RPL owner port (i.e., port P11) on ERPS ring 1 is located detects link L. P12-P22After the fault is recovered (e.g., after network device 101 detects that port P12 is online or receives NR message G2), network device 101 starts a WTR timer. After the WTR timer expires, network device 101 blocks the RPL owner port (i.e., port P11) on ERPS ring 1, and sends (e.g., broadcasts) an NRRB message to ERPS ring 1, for example, calling this NRRB message G1. NRRB message G1 carries traceability information Y (NRRB message G1 may also include the MAC address of network device 101). Traceability information Y includes: the identifier of port P11 (i.e., the identifier of the RPL owner port on ERPS ring 1), the identifier of network device 101 (i.e., the identifier of the network device to which the RPL owner port on ERPS ring 1 is located), the ID of ERPS ring 1 (i.e., the ID of the ERPS ring to which the RPL owner port on ERPS ring 1 is located), and the control VLAN ID of ERPS ring 1 (i.e., the control VLAN ID of the ERPS ring to which the RPL owner port on ERPS ring 1 is located). After receiving the NRRB message G1, network device 102 determines the source of the topology change based on the source information Y carried in the NRRB message G1, including port P11 in network device 101 belonging to ERPS ring 1. Network device 102 continues to send (e.g., broadcast) the NRRB message G1 to ERPS ring 1. (Since network device 102 has already updated the FDB table, here network device 102 only needs to determine the source of the topology change and send the NRRB message G1. If network device 102 has not yet updated the FDB table, network device 102 will need to update the FDB table after receiving the NRRB message G1.) After receiving the NRRB message G1, network device 103 determines the source of the topology change, including port P11 belonging to ERPS ring 1 in network device 103, based on the source information Y carried in the NRRB message G1. Network device 103 refreshes its FDB table based on the NRRB message G1 (e.g., clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P31) in network device 103, and clearing the FDB table of ports belonging to ERPS ring 2 (i.e., ports P32 and P33) in network device 103). Furthermore, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message G3. The EVENT message G3 carries the source information Y (the EVENT message G3 may also include the identifier of ERPS ring 2 and the MAC address of network device 103).After receiving the NRRB message G1, network device 104 determines the source of the topology change, including port P11 belonging to ERPS ring 1 in network device 101, based on the source information Y carried in the NRRB message G1. Network device 104 refreshes its FDB table based on the NRRB message G1 (e.g., clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P41) in network device 104, and clearing the FDB table of ports belonging to ERPS ring 2 (i.e., ports P42 and P43) in network device 104). Furthermore, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message G4. The EVENT message G4 carries the source information Y (the EVENT message G4 may also include the identifier of ERPS ring 2 and the MAC address of network device 104). After receiving the EVENT message G3, network device 105 determines the source of the topology change, including port P11 in network device 101 belonging to ERPS ring 1, based on the source information Y carried in the EVENT message G3. Network device 105 refreshes its FDB table based on the EVENT message G3 (e.g., clearing the FDB table of ports in network device 105 belonging to ERPS ring 2 (i.e., port P51), and clearing the FDB table of ports in network device 105 belonging to ERPS ring 3 (i.e., ports P52 and P53)). Furthermore, network device 105 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message G5. The EVENT message G5 carries the source information Y (the EVENT message G5 may also include the identifier of ERPS ring 3 and the MAC address of network device 105). After receiving the EVENT message G4, network device 106 determines the source of the topology change, including port P11 in network device 101 belonging to ERPS ring 1, based on the source information Y carried in the EVENT message G4. Network device 106 refreshes its FDB table based on the EVENT message G4 (e.g., clearing the FDB table of ports in network device 106 belonging to ERPS ring 2 (i.e., port P61), and clearing the FDB table of ports in network device 106 belonging to ERPS ring 3 (i.e., ports P62 and P63)). Furthermore, network device 106 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message G6. The EVENT message G6 carries the source information Y (the EVENT message G6 may also include the identifier of ERPS ring 3 and the MAC address of network device 106).After receiving EVENT messages G5 and / or G6, network device 107 determines, based on the source information Y carried in EVENT messages G5 and / or G6, that the source of the topology change includes port P11 in network device 101 belonging to ERPS ring 1. Furthermore, network device 107 refreshes its FDB table based on EVENT messages G5 and / or G6 (e.g., clearing the FDB table for ports in network device 107 belonging to ERPS ring 3 (i.e., ports P71 and P72)). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT messages G5 and G6. For example, network device 107 first receives EVENT message G5, and then receives EVENT message G6. After receiving EVENT message G5, network device 107 refreshes its FDB table based on EVENT message G5. After receiving EVENT message G6, network device 107 does not refresh its FDB table.

[0080] It should be noted that network device 104 may also receive EVENT message G3. After receiving EVENT message G3, network device 104 determines the source of the topology change based on the source information Y carried in EVENT message G3, including port P11 in network device 101 belonging to ERPS ring 1. Furthermore, network device 104 checks whether the FDB table of ports in network device 104 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 104 updates the FDB table of ports in network device 104 belonging to ERPS ring 2 based on EVENT message G3. If it has been updated, network device 104 does not update the FDB table of ports in network device 104 belonging to ERPS ring 2. Network device 103 may also receive an EVENT message G4. After receiving the EVENT message G4, network device 103 determines, based on the source information Y carried in the EVENT message G4, that the source of the topology change includes port P11 in network device 101 belonging to ERPS ring 1. Furthermore, network device 103 checks whether the FDB table of ports in network device 103 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 103 updates the FDB table of ports in network device 103 belonging to ERPS ring 2 based on the EVENT message G4. If it has been updated, network device 103 does not update the FDB table of ports in network device 103 belonging to ERPS ring 2. Network device 106 may also receive an EVENT message G5. After receiving the EVENT message G5, network device 106 determines, based on the source information Y carried in the EVENT message G5, that the source of the topology change includes port P11 in network device 101 belonging to ERPS ring 1. Furthermore, network device 106 checks whether the FDB table of ports in network device 106 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 106 updates the FDB table of ports in network device 106 belonging to ERPS ring 3 according to the EVENT message G5. If it has been updated, network device 106 does not update the FDB table of ports in network device 106 belonging to ERPS ring 3. Network device 105 may also receive an EVENT message G6. After receiving the EVENT message G6, network device 105 determines, based on the source information Y carried in the EVENT message G6, that the source of the topology change includes port P11 in network device 101 belonging to ERPS ring 1. Furthermore, network device 105 checks whether the FDB table of ports in network device 105 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 105 updates the FDB table of ports in network device 105 belonging to ERPS ring 3 based on the EVENT message G6. If it has been updated, network device 105 does not update the FDB table of ports in network device 105 belonging to ERPS ring 3.In addition, the network device where the RPL owner port is located usually refreshes the FDB table after the WTR timer expires. In this example, this is due to link L. P12-P22 The network device where the directly connected port P12 is located and the network device where the RPL owner port on ERPS ring 1 is located are both network device 101. Network device 101 detects link L P12-P22 The FDB table has been refreshed after the fault was recovered. Therefore, the above does not describe the content of the FDB table refreshed by the network device where the RPL owner port is located after the WTR timer expires.

[0081] The aforementioned NRRB message G1 and EVENT messages G3-G6 are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether its relevant FDB table has been refreshed; if not, it refreshes it.

[0082] Based on the above description, in this embodiment of the application, in link L P12-P22 After the fault is recovered, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 (i.e., network devices 103-104) to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) carry source information. Similarly, the topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 (i.e., network devices 105-106) to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) carry source information. This allows network devices on both ERPS ring 2 and ERPS ring 3 to determine the source of the topology change based on the source information carried in the topology change messages.

[0083] Third, a topology diffusion scheme for scenarios where ports in the ERPS network (ports of network devices in the ERPS network) are manually blocked.

[0084] Let's take manually blocking port P22 of network device 102 as an example. Network device 102 can block port P22 based on a manual blocking command. For example, a user configures port blocking on the network controller, the network controller generates a manual blocking command based on the user's configuration, and sends the command to network device 102. Network device 102 then blocks port P22 based on the command sent by the network controller. Alternatively, network device 102 can block port P22 based on a manual blocking command entered by the user. Blocking port P22 of network device 102 will cause a change in the topology of ERPS ring 1, and consequently, a change in the topology of the aforementioned ERPS network. Port P22 is the source of topology change in this ERPS network.

[0085] According to the current ERPS protocol, after manually blocking port P22 of network device 102, network device 102 refreshes its FDB table (e.g., clearing the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22) in network device 102), and then sends (e.g., broadcasts) an MS message to ERPS ring 1, for example, calling this MS message MS message C2. MS message C2 includes the MAC address of network device 102. After receiving MS message C2, network device 101 opens the RPL owner port (i.e., port P11) on ERPS ring 1. Network device 101 refreshes its FDB table according to MS message C2 (e.g., clearing the FDB table of ports belonging to ERPS ring 1 (i.e., ports P11 and P12) in network device 101), and then continues to send (e.g., broadcasts) MS message C2 to ERPS ring 1. After receiving the MS message C2, network device 103 refreshes its FDB table according to the MS message C2 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P31) and ports belonging to ERPS ring 2 (i.e., ports P32 and P33)). Then, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message C3. The EVENT message C3 includes the identifier of ERPS ring 2 and the MAC address of network device 103. After receiving the MS message C2, network device 104 refreshes its FDB table according to the MS message C2 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P41) and ports belonging to ERPS ring 2 (i.e., ports P42 and P43)). Then, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message C4. The EVENT message C4 includes the identifier of ERPS ring 2 and the MAC address of network device 104.After receiving the EVENT message C3, network device 105 refreshes its FDB table based on the EVENT message C3 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P51) and ports belonging to ERPS ring 3 (i.e., ports P52 and P53)). Then, network device 105 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message C5. EVENT message C5 includes the identifier of ERPS ring 3 and the MAC address of network device 105. After receiving the EVENT message C4, network device 106 refreshes its FDB table based on the EVENT message C4 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P61) and ports belonging to ERPS ring 3 (i.e., ports P62 and P63)). Then, network device 106 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message C6. EVENT message C6 includes the identifier of ERPS ring 3 and the MAC address of network device 106. After receiving EVENT message C5 and / or EVENT message C6, network device 107 refreshes its FDB table based on EVENT message C5 and / or EVENT message C6 (e.g., clearing the FDB table of ports belonging to ERPS ring 3 (i.e., ports P71 and P72) in network device 107). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT message C5 and EVENT message C6. For example, if network device 107 receives EVENT message C5 first and then EVENT message C6, network device 107 refreshes its FDB table based on EVENT message C5, but does not refresh its FDB table after receiving EVENT message C6.

[0086] It should be noted that network device 104 may also receive EVENT message C3. After receiving EVENT message C3, network device 104 checks whether the FDB table for ports belonging to ERPS ring 2 in network device 104 has been updated. If it has not been updated, network device 104 updates the FDB table for ports belonging to ERPS ring 2 in network device 104 according to EVENT message C3; if it has been updated, network device 104 does not update the FDB table for ports belonging to ERPS ring 2 in network device 104. Similarly, network device 103 may also receive EVENT message C4. After receiving EVENT message C4, network device 103 checks whether the FDB table for ports belonging to ERPS ring 2 in network device 103 has been updated. If it has not been updated, network device 103 updates the FDB table for ports belonging to ERPS ring 2 in network device 103 according to EVENT message C4; if it has been updated, network device 103 does not update the FDB table for ports belonging to ERPS ring 2 in network device 103. Network device 106 may also receive an EVENT message C5. After receiving the EVENT message C5, network device 106 checks whether the FDB table for ports belonging to ERPS ring 3 in network device 106 has been updated. If it has not been updated, network device 106 updates the FDB table for ports belonging to ERPS ring 3 in network device 106 according to the EVENT message C5. If it has been updated, network device 106 does not update the FDB table for ports belonging to ERPS ring 3 in network device 106. Network device 105 may also receive an EVENT message C6. After receiving the EVENT message C6, network device 105 checks whether the FDB table for ports belonging to ERPS ring 3 in network device 105 has been updated. If it has not been updated, network device 105 updates the FDB table for ports belonging to ERPS ring 3 in network device 105 according to the EVENT message C6. If it has been updated, network device 105 does not update the FDB table for ports belonging to ERPS ring 3 in network device 105.

[0087] The MS message C2 and EVENT messages C3-C6 mentioned above are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether the relevant FDB table of its network device has been refreshed. If it has not been refreshed, it will refresh it.

[0088] Based on the above description, according to the current ERPS protocol, after manually blocking port P22 of network device 102, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 (i.e., network devices 103-104) to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) only include the identifier of the upper ring and the MAC address of the intersecting device. Similarly, the topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 (i.e., network devices 105-106) to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) only include the identifier of the upper ring and the MAC address of the intersecting device. This results in the network devices (e.g., network devices 105-107) on ERPS ring 2 and ERPS ring 3 being unable to determine the source of the topology change.

[0089] In the technical solution provided in this application embodiment, after manually blocking port P22 of network device 102, by carrying traceability information for determining the source of the topology change in the topology change message, the network devices on the upper-layer ring can determine the source of the topology change based on the traceability information carried in the topology change message. For example, the traceability information for determining the source of the topology change includes the identifier of the port corresponding to the topology change source, the identifier of the network device corresponding to the topology change source, the ID of the ERPS ring where the topology change source is located, and the control VLAN ID of the ERPS ring where the topology change source is located. When the source of the topology change is the manually blocked port P22, the traceability information for determining the source of the topology change specifically includes the identifier of the manually blocked port P22, the identifier of the network device (i.e., network device 102) where the manually blocked port P22 is located, the ID of the ERPS ring (i.e., ERPS ring 1) where the manually blocked port P22 is located, and the control VLAN ID of the ERPS ring where the manually blocked port P22 is located.

[0090] In the technical solution provided in this application embodiment, after manually blocking port P22 of network device 102, network device 102 refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22) in network device 102), and network device 102 sends (e.g., broadcasts) an MS message to ERPS ring 1, for example, referring to this MS message as MS message J2. MS message J2 carries traceability information Z (MS message J2 may also include the MAC address of network device 102). The traceability information Z includes: the identifier of port P22 (i.e., the identifier of the manually blocked port P22), the identifier of network device 102 (i.e., the identifier of the network device where the manually blocked port P22 is located), the ID of ERPS ring 1 (i.e., the ID of the ERPS ring where the manually blocked port P22 is located), and the control VLAN ID of ERPS ring 1 (i.e., the control VLAN ID of the ERPS ring where the manually blocked port P22 is located). After receiving the MS message J2, network device 101 determines the source of the topology change, including port P22 belonging to ERPS ring 1 in network device 102, based on the source information Z carried in the MS message J2. Network device 101 opens the RPL owner port (i.e., port P11) on ERPS ring 1. Network device 101 refreshes its FDB table according to the MS message J2 (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P11 and P12) in network device 101). Furthermore, network device 101 continues to send (e.g., broadcast) MS messages J2 to ERPS ring 1. After receiving the MS message J2, network device 103 determines the source of the topology change, including port P22 belonging to ERPS ring 1 in network device 102, based on the source information Z carried in the MS message J2. Network device 103 refreshes its FDB table based on the MS message J2 (e.g., clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P31) in network device 103, and clearing the FDB table of ports belonging to ERPS ring 2 (i.e., ports P32 and P33) in network device 103). Furthermore, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message J3. EVENT message J3 carries the source information Z (EVENT message J3 may also include the identifier of ERPS ring 2 and the MAC address of network device 103).After receiving the MS message J2, network device 104 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information Z carried in the MS message J2. Network device 104 refreshes its FDB table based on the MS message J2 (e.g., clearing the FDB table of ports in network device 104 belonging to ERPS ring 1 (i.e., port P41), and clearing the FDB table of ports in network device 104 belonging to ERPS ring 2 (i.e., ports P42 and P43). Furthermore, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message J4. The EVENT message J4 carries the source information Z (the EVENT message J4 may also include the identifier of ERPS ring 2 and the MAC address of network device 104). After receiving the EVENT message J3, network device 105 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information Z carried in the EVENT message J3. Network device 105 refreshes its FDB table based on the EVENT message J3 (e.g., clearing the FDB table of ports in network device 105 belonging to ERPS ring 2 (i.e., port P51), and clearing the FDB table of ports in network device 105 belonging to ERPS ring 3 (i.e., ports P52 and P53). Furthermore, network device 105 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message J5. The EVENT message J5 carries the source information Z (the EVENT message J5 may also include the identifier of ERPS ring 3 and the MAC address of network device 105). After receiving the EVENT message J4, network device 106 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information Z carried in the EVENT message J4. Network device 106 refreshes its FDB table based on the EVENT message J4 (e.g., clearing the FDB table of ports in network device 106 belonging to ERPS ring 2 (i.e., port P61), and clearing the FDB table of ports in network device 106 belonging to ERPS ring 3 (i.e., ports P62 and P63)). Network device 106 then sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message J6. The EVENT message J6 carries the source information Z (the EVENT message J6 may also include the identifier of ERPS ring 3 and the MAC address of network device 106).After receiving EVENT messages J5 and / or J6, network device 107 determines, based on the source information Z carried in EVENT messages J5 and / or J6, that the source of the topology change includes port P22 in network device 102 belonging to ERPS ring 1. Furthermore, network device 107 refreshes its FDB table based on EVENT messages J5 and / or J6 (e.g., clearing the FDB table for ports in network device 107 belonging to ERPS ring 3 (i.e., ports P71 and P72)). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT messages J5 and J6. For example, network device 107 first receives EVENT message J5, and then receives EVENT message J6. After receiving EVENT message J5, network device 107 refreshes its FDB table based on EVENT message J5. After receiving EVENT message J6, network device 107 does not refresh its FDB table.

[0091] It should be noted that network device 104 may also receive EVENT message J3. After receiving EVENT message J3, network device 104 determines the source of topology change, including port P22 of network device 102 belonging to ERPS ring 1, based on the source information Z carried in EVENT message J3. Furthermore, network device 104 checks whether the FDB table of ports belonging to ERPS ring 2 in network device 104 has been updated. If it has not been updated, network device 104 updates the FDB table of ports belonging to ERPS ring 2 in network device 104 based on EVENT message J3. If it has been updated, network device 104 does not update the FDB table of ports belonging to ERPS ring 2 in network device 104. Network device 103 may also receive an EVENT message J4. After receiving the EVENT message J4, network device 103 determines, based on the source information Z carried in the EVENT message J4, that the source of the topology change includes port P22 in network device 102 belonging to ERPS ring 1. Furthermore, network device 103 checks whether the FDB table of the ports in network device 103 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 103 updates the FDB table of the ports in network device 103 belonging to ERPS ring 2 based on the EVENT message J4. If it has been updated, network device 103 does not update the FDB table of the ports in network device 103 belonging to ERPS ring 2. Network device 106 may also receive an EVENT message J5. After receiving the EVENT message J5, network device 106 determines, based on the source information Z carried in the EVENT message J5, that the source of the topology change includes port P22 in network device 102 belonging to ERPS ring 1. Furthermore, network device 106 checks whether the FDB table of ports in network device 106 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 106 updates the FDB table of ports in network device 106 belonging to ERPS ring 3 based on the EVENT message J5. If it has been updated, network device 106 does not update the FDB table of ports in network device 106 belonging to ERPS ring 3. Network device 105 may also receive an EVENT message J6. After receiving the EVENT message J6, network device 105 determines, based on the source information Z carried in the EVENT message J6, that the source of the topology change includes port P22 in network device 102 belonging to ERPS ring 1. Furthermore, network device 105 checks whether the FDB table of the ports in network device 105 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 105 updates the FDB table of the ports in network device 105 belonging to ERPS ring 3 based on the EVENT message J6. If it has been updated, network device 105 does not update the FDB table of the ports in network device 105 belonging to ERPS ring 3.

[0092] The MS message J2 and EVENT messages J3-J6 mentioned above are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether the relevant FDB table of its network device has been refreshed. If it has not been refreshed, it will refresh it.

[0093] Based on the above description, in this embodiment, after manually blocking port P22 of network device 102, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 (i.e., network devices 103-104) to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) carry source information. The topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 (i.e., network devices 105-106) to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) also carry source information. This allows network devices on both ERPS ring 2 and ERPS ring 3 to determine the source of the topology change based on the source information carried in the topology change messages.

[0094] Fourth, a topology diffusion scheme for scenarios where blocked ports are manually unblocked.

[0095] The following example illustrates how to manually block port P22 of network device 102 and then manually open port P22 of network device 102. Network device 102 can open port P22 based on a manually opened command. For example, a user configures port opening on the network controller, the network controller generates a manually opened command based on the user's configuration, and sends this command to network device 102. Network device 102 then opens port P22 based on this command. Alternatively, network device 102 can open port P22 based on a manually opened command entered by the user on network device 102. As mentioned earlier, after manually blocking port P22 of network device 102, network devices 101-107 all refresh their FDB tables. Furthermore, before network device 102 opens port P22, network devices 101-107 can build their FDB tables through MAC learning to forward service packets based on the newly built FDB tables. After network device 102 opens port P22, the network device containing the RPL owner port on ERPS ring 1 needs to re-block that RPL owner port. This will cause a change in the topology of ERPS ring 1, and consequently, a change in the topology of the ERPS network. In this case, the RPL owner port on ERPS ring 1 is the source of topology change in the ERPS network.

[0096] According to the current ERPS protocol, after manually opening port 22 of network device 102, network device 102 refreshes its FDB table (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22) in network device 102), and then network device 102 sends (for example, broadcasts) an NR message to ERPS ring 1, for example, calling the NR message NR message D2, which includes the MAC address of network device 102. After receiving NR message D2, the network device (i.e., network device 101) where the RPL owner port (i.e., port P11) on ERPS ring 1 is located starts a WTR timer. After the WTR timer expires, network device 101 blocks the RPL owner port (i.e., port P11) on ERPS ring 1, refreshes the FDB table of network device 101 (e.g., clears the FDB table of ports (i.e., ports P11 and P12) belonging to ERPS ring 1 in network device 101), and sends (e.g., broadcasts) an NRRB message to ERPS ring 1. For example, this NRRB message is called NRRB message D1. NRRB message D1 includes the MAC address of network device 101. After receiving the NRRB message D1, network device 102 continues to send (e.g., broadcast) the NRRB message D1 to ERPS ring 1. (Since network device 102 has already refreshed the FDB table, it only needs to send the NRRB message D1 here. If network device 102 has not yet refreshed the FDB table, it will need to refresh the FDB table after receiving the NRRB message D1). After receiving the NRRB message D1, network device 103 refreshes its FDB table according to the NRRB message D1 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P31) and ports belonging to ERPS ring 2 (i.e., ports P32 and P33)). Then, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message D3. The EVENT message D3 includes the identifier of ERPS ring 2 and the MAC address of network device 103.After receiving the NRRB message D1, network device 104 refreshes its FDB table according to the NRRB message D1 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P41) and ports belonging to ERPS ring 2 (i.e., ports P42 and P43)). Then, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message D4. The EVENT message D4 includes the identifier of ERPS ring 2 and the MAC address of network device 104. After receiving the EVENT message D3, network device 105 refreshes its FDB table based on the EVENT message D3 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P51) and ports belonging to ERPS ring 3 (i.e., ports P52 and P53)). Then, network device 105 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message D5. EVENT message D5 includes the identifier of ERPS ring 3 and the MAC address of network device 105. After receiving the EVENT message D4, network device 106 refreshes its FDB table based on the EVENT message D4 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P61) and ports belonging to ERPS ring 3 (i.e., ports P62 and P63)). Then, network device 106 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message D6. EVENT message D6 includes the identifier of ERPS ring 3 and the MAC address of network device 106. After receiving EVENT message D5 and / or EVENT message D6, network device 107 refreshes its FDB table based on EVENT message D5 and / or EVENT message D6 (e.g., clearing the FDB table of ports belonging to ERPS ring 3 (i.e., ports P71 and P72) in network device 107). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT message D5 and EVENT message D6. For example, if network device 107 receives EVENT message D5 first and then EVENT message D6, network device 107 refreshes its FDB table based on EVENT message D5, but does not refresh its FDB table after receiving EVENT message D6.

[0097] It should be noted that network device 104 may also receive EVENT message D3. After receiving EVENT message D3, network device 104 checks whether the FDB table of ports belonging to ERPS ring 2 in network device 104 has been updated. If it has not been updated, network device 104 updates the FDB table of ports belonging to ERPS ring 2 in network device 104 according to EVENT message D3; if it has been updated, network device 104 does not update the FDB table of ports belonging to ERPS ring 2 in network device 104. Similarly, network device 103 may also receive EVENT message D4. After receiving EVENT message D4, network device 103 checks whether the FDB table of ports belonging to ERPS ring 2 in network device 103 has been updated. If it has not been updated, network device 103 updates the FDB table of ports belonging to ERPS ring 2 in network device 103 according to EVENT message D4; if it has been updated, network device 103 does not update the FDB table of ports belonging to ERPS ring 2 in network device 103. Network device 106 may also receive EVENT message D5. After receiving EVENT message D5, network device 106 checks whether the FDB table of ports belonging to ERPS ring 3 in network device 106 has been updated. If it has not been updated, network device 106 updates the FDB table of ports belonging to ERPS ring 3 in network device 106 according to EVENT message D5; if it has been updated, network device 106 does not update the FDB table of ports belonging to ERPS ring 3 in network device 106. Network device 105 may also receive EVENT message D6. After receiving EVENT message D6, network device 105 checks whether the FDB table of ports belonging to ERPS ring 3 in network device 105 has been updated. If it has not been updated, network device 105 updates the FDB table of ports belonging to ERPS ring 3 in network device 105 according to EVENT message D6; if it has been updated, network device 105 does not update the FDB table of ports belonging to ERPS ring 3 in network device 105.

[0098] The aforementioned NRRB message D1 and EVENT messages D3-D6 are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether its relevant FDB table has been refreshed; if not, it refreshes it.

[0099] Based on the above description, according to the current ERPS protocol, after manually opening port P22 of network device 102, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 (i.e., network devices 103-104) to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) only include the identifier of the upper ring and the MAC address of the intersecting device. Similarly, the topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 (i.e., network devices 105-106) to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) only include the identifier of the upper ring and the MAC address of the intersecting device. This results in the network devices (e.g., network devices 105-107) on ERPS ring 2 and ERPS ring 3 being unable to determine the source of the topology change.

[0100] In the technical solution provided in this application embodiment, after manually opening port P22 of network device 102, by carrying traceability information for determining the source of the topology change in the topology change message, the network device on the upper ring can determine the source of the topology change based on the traceability information carried in the topology change message. Taking the traceability information for determining the source of the topology change as including the identifier of the port corresponding to the topology change source, the identifier of the network device corresponding to the topology change source, the ID of the ERPS ring where the topology change source is located, and the control VLAN ID of the ERPS ring where the topology change source is located as an example. When the source of the topology change is the RPL owner port (i.e., port P11) on ERPS ring 1, the traceability information specifically includes the identifier of port P11 (i.e., the RPL owner port on ERPS ring 1), the identifier of network device 101 (i.e., the network device where the RPL owner port on ERPS ring 1 is located), the ID of ERPS ring 1 (i.e., the ERPS ring where the RPL owner port on ERPS ring 1 is located), and the control VLAN ID of ERPS ring 1 (i.e., the ERPS ring where the RPL owner port on ERPS ring 1 is located).

[0101] In the technical solution provided in this application embodiment, after manually opening port 22 of network device 102, network device 102 refreshes its FDB table (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22) in network device 102), and network device 102 sends (for example, broadcasts) an NR message to ERPS ring 1, for example, calling the NR message NR message Q2, which includes the MAC address of network device 102. After receiving NR message Q2, the network device (i.e., network device 101) where the RPL owner port (i.e., port P11) on ERPS ring 1 is located starts a WTR timer. After the WTR timer expires, network device 101 blocks the RPL owner port (i.e., port P11) on ERPS ring 1, refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P11 and P12) in network device 101), and sends (e.g., broadcasts) an NRRB message to ERPS ring 1. For example, this NRRB message is called NRRB message Q1. NRRB message Q1 carries source information U (NRRB message Q1 may also include the MAC address of network device 101). The traceability information U includes: the identifier of port P11 (i.e., the identifier of the RPL owner port on ERPS ring 1), the identifier of network device 101 (i.e., the identifier of the network device where the RPL owner port on ERPS ring 1 is located), the ID of ERPS ring 1 (i.e., the ID of the ERPS ring where the RPL owner port on ERPS ring 1 is located), and the control VLAN ID of ERPS ring 1 (i.e., the control VLAN ID of the ERPS ring where the RPL owner port on ERPS ring 1 is located). After receiving the NRRB message Q1, network device 102 determines the source of the topology change based on the source information U carried in the NRRB message Q1, including port P11 in network device 101 belonging to ERPS ring 1. Network device 102 continues to send (e.g., broadcast) the NRRB message Q1 to ERPS ring 1. (Since network device 102 has already updated the FDB table, here network device 102 only needs to determine the source of the topology change and send the NRRB message Q1. If network device 102 has not yet updated the FDB table, network device 102 will need to update the FDB table after receiving the NRRB message Q1.)After receiving the NRRB message Q1, network device 103 determines the source of the topology change, including port P11 belonging to ERPS ring 1 in network device 103, based on the source information U carried in the NRRB message Q1. Network device 103 refreshes its FDB table based on the NRRB message Q1 (e.g., clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P31) in network device 103, and clearing the FDB table of ports belonging to ERPS ring 2 (i.e., ports P32 and P33) in network device 103). Furthermore, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message Q3. EVENT message Q3 carries the source information U (EVENT message Q3 may also include the identifier of ERPS ring 2 and the MAC address of network device 103). After receiving the NRRB message Q1, network device 104 determines the source of the topology change, including port P11 belonging to ERPS ring 1 in network device 101, based on the source information U carried in the NRRB message Q1. Network device 104 then refreshes its FDB table based on the NRRB message Q1 (e.g., clearing the FDB table for ports belonging to ERPS ring 1 (i.e., port P41), and clearing the FDB table for ports belonging to ERPS ring 2 (i.e., ports P42 and P43)). Furthermore, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, referring to this EVENT message as EVENT message Q4. EVENT message Q4 carries the source information U (EVENT message Q4 may also include the identifier of ERPS ring 2 and the MAC address of network device 104). After receiving the EVENT message Q3, network device 105 determines the source of the topology change, including port P11 in network device 101 belonging to ERPS ring 1, based on the source information U carried in EVENT message Q3. Network device 105 refreshes its FDB table based on EVENT message Q3 (e.g., clearing the FDB table of ports in network device 105 belonging to ERPS ring 2 (i.e., port P51), and clearing the FDB table of ports in network device 105 belonging to ERPS ring 3 (i.e., ports P52 and P53)). Furthermore, network device 105 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message Q5. EVENT message Q5 carries the source information U (EVENT message Q5 may also include the identifier of ERPS ring 3 and the MAC address of network device 105).After receiving the EVENT message Q4, network device 106 determines the source of the topology change, including port P11 in network device 101 belonging to ERPS ring 1, based on the source information U carried in EVENT message Q4. Network device 106 refreshes its FDB table based on EVENT message Q4 (e.g., clearing the FDB table of ports in network device 106 belonging to ERPS ring 2 (i.e., port P61), and clearing the FDB table of ports in network device 106 belonging to ERPS ring 3 (i.e., ports P62 and P63)). Network device 106 then sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message Q6. EVENT message Q6 carries the source information U (EVENT message Q6 may also include the identifier of ERPS ring 3 and the MAC address of network device 106). After receiving EVENT messages Q5 and / or Q6, network device 107 determines the source of the topology change, including port P11 in network device 101 belonging to ERPS ring 1, based on the source information U carried in EVENT messages Q5 and / or Q6. Network device 107 then refreshes its FDB table based on EVENT messages Q5 and / or Q6 (e.g., clearing the FDB table for ports in network device 107 belonging to ERPS ring 3 (i.e., ports P71 and P72)). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT messages Q5 and Q6. For example, network device 107 first receives EVENT message Q5, and then receives EVENT message Q6. After receiving EVENT message Q5, network device 107 refreshes its FDB table according to EVENT message Q5. After receiving EVENT message Q6, network device 107 does not refresh its FDB table.

[0102] It should be noted that network device 104 may also receive EVENT message Q3. After receiving EVENT message Q3, network device 104 determines the source of topology change based on the source information U carried in EVENT message Q3, including port P11 in network device 101 belonging to ERPS ring 1. Furthermore, network device 104 checks whether the FDB table of ports in network device 104 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 104 updates the FDB table of ports in network device 104 belonging to ERPS ring 2 based on EVENT message Q3. If it has been updated, network device 104 does not update the FDB table of ports in network device 104 belonging to ERPS ring 2. Network device 103 may also receive an EVENT message Q4. After receiving the EVENT message Q4, network device 103 determines the source of the topology change, including port P11 in network device 101 belonging to ERPS ring 1, based on the source information U carried in the EVENT message Q4. Furthermore, network device 103 checks whether the FDB table of the ports in network device 103 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 103 updates the FDB table of the ports in network device 103 belonging to ERPS ring 2 based on the EVENT message Q4. If it has been updated, network device 103 does not update the FDB table of the ports in network device 103 belonging to ERPS ring 2. Network device 106 may also receive an EVENT message Q5. After receiving the EVENT message Q5, network device 106 determines the source of the topology change, including port P11 in network device 101 belonging to ERPS ring 1, based on the source information U carried in the EVENT message Q5. Furthermore, network device 106 checks whether the FDB table of ports in network device 106 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 106 updates the FDB table of ports in network device 106 belonging to ERPS ring 3 based on the EVENT message Q5. If it has been updated, network device 106 does not update the FDB table of ports in network device 106 belonging to ERPS ring 3. Network device 105 may also receive an EVENT message Q6. After receiving the EVENT message Q6, network device 105 determines the source of the topology change based on the source information U carried in the EVENT message Q6, including port P11 in network device 101 belonging to ERPS ring 1. Furthermore, network device 105 checks whether the FDB table of the ports in network device 105 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 105 updates the FDB table of the ports in network device 105 belonging to ERPS ring 3 according to the EVENT message Q6. If it has been updated, network device 105 does not update the FDB table of the ports in network device 105 belonging to ERPS ring 3.

[0103] The NRRB message Q1 and EVENT messages Q3-Q6 mentioned above are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether its relevant FDB table has been refreshed. If not, it refreshes it.

[0104] Based on the above description, in this embodiment, after manually opening port P22 of network device 102, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 (i.e., network devices 103-104) to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) carry source information. Similarly, the topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 (i.e., network devices 105-106) to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) carry source information. This allows network devices on both ERPS ring 2 and ERPS ring 3 to determine the source of the topology change based on the source information carried in the topology change messages.

[0105] Fifth, a topology diffusion scheme for scenarios where ports in the ERPS network (ports of network devices in the ERPS network) are forcibly blocked.

[0106] Let's take the forced blocking of port P22 of network device 102 as an example. Network device 102 can block port P22 based on a forced blocking command. For example, a user configures port blocking on the network controller, the network controller generates a forced blocking command based on the user's configuration, and sends the forced blocking command to network device 102. Network device 102 then blocks port P22 based on the forced blocking command sent by the network controller. Alternatively, network device 102 can block port P22 based on a forced blocking command entered by the user on network device 102. Blocking port P22 of network device 102 will cause a change in the topology of ERPS ring 1, and thus cause a change in the topology of the aforementioned ERPS network. Port P22 is the source of topology change in this ERPS network.

[0107] According to the current ERPS protocol, after forcibly blocking port P22 of network device 102, network device 102 refreshes its FDB table (e.g., clearing the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22) in network device 102), and sends (e.g., broadcasts) an FS message to ERPS ring 1, for example, calling this FS message E2, which includes the MAC address of network device 102. After receiving the FS message E2, network device 101 opens the RPL owner port (i.e., port P11) on ERPS ring 1, refreshes its FDB table according to the FS message E2 (e.g., clearing the FDB table of ports belonging to ERPS ring 1 (i.e., ports P11 and P12) in network device 101), and continues to send (e.g., broadcasts) FS messages E2 to ERPS ring 1. After receiving the FS message E2, network device 103 refreshes its FDB table according to the FS message E2 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P31) and ports belonging to ERPS ring 2 (i.e., ports P32 and P33)). Then, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message E3. The EVENT message E3 includes the identifier of ERPS ring 2 and the MAC address of network device 103. After receiving the FS message E2, network device 104 refreshes its FDB table according to the FS message E2 (for example, clearing the FDB table of ports belonging to ERPS ring 1 (i.e., port P41) and ports belonging to ERPS ring 2 (i.e., ports P42 and P43)). Then, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling the EVENT message E4. The EVENT message E4 includes the identifier of ERPS ring 2 and the MAC address of network device 104.After receiving the EVENT message E3, network device 105 refreshes its FDB table based on the EVENT message E3 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P51) and ports belonging to ERPS ring 3 (i.e., ports P52 and P53)). Then, network device 105 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message E5. The EVENT message E5 includes the identifier of ERPS ring 3 and the MAC address of network device 105. After receiving the EVENT message E4, network device 106 refreshes its FDB table based on the EVENT message E4 (for example, clearing the FDB table of ports belonging to ERPS ring 2 (i.e., port P61) and ports belonging to ERPS ring 3 (i.e., ports P62 and P63)). Then, network device 106 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message E6. EVENT message E6 includes the identifier of ERPS ring 3 and the MAC address of network device 106. After receiving EVENT message E5 and / or EVENT message E6, network device 107 refreshes its FDB table based on EVENT message E5 and / or EVENT message E6 (e.g., clearing the FDB table of ports belonging to ERPS ring 3 (i.e., ports P71 and P72) in network device 107). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT message E5 and EVENT message E6. For example, if network device 107 receives EVENT message E5 first and then EVENT message E6, network device 107 refreshes its FDB table based on EVENT message E5, but does not refresh its FDB table after receiving EVENT message E6.

[0108] It should be noted that network device 104 may also receive EVENT message E3. After receiving EVENT message E3, network device 104 checks whether the FDB table for ports belonging to ERPS ring 2 in network device 104 has been updated. If it has not been updated, network device 104 updates the FDB table for ports belonging to ERPS ring 2 in network device 104 according to EVENT message E3; if it has been updated, network device 104 does not update the FDB table for ports belonging to ERPS ring 2 in network device 104. Network device 103 may also receive EVENT message E4. After receiving EVENT message E4, network device 103 checks whether the FDB table for ports belonging to ERPS ring 2 in network device 103 has been updated. If it has not been updated, network device 103 updates the FDB table for ports belonging to ERPS ring 2 in network device 103 according to EVENT message E4; if it has been updated, network device 103 does not update the FDB table for ports belonging to ERPS ring 2 in network device 103. Network device 106 may also receive an EVENT message E5. After receiving the EVENT message E5, network device 106 checks whether the FDB table for ports belonging to ERPS ring 3 in network device 106 has been updated. If it has not been updated, network device 106 updates the FDB table for ports belonging to ERPS ring 3 in network device 106 according to the EVENT message E5. If it has been updated, network device 106 does not update the FDB table for ports belonging to ERPS ring 3 in network device 106. Network device 105 may also receive an EVENT message E6. After receiving the EVENT message E6, network device 105 checks whether the FDB table for ports belonging to ERPS ring 3 in network device 105 has been updated. If it has not been updated, network device 105 updates the FDB table for ports belonging to ERPS ring 3 in network device 105 according to the EVENT message E6. If it has been updated, network device 105 does not update the FDB table for ports belonging to ERPS ring 3 in network device 105.

[0109] The aforementioned FS message E2 and EVENT messages E3-E6 are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether its relevant FDB table has been refreshed; if not, it refreshes it.

[0110] Based on the above description, according to the current ERPS protocol, after forcibly blocking port P22 of network device 102, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 (i.e., network devices 103-104) to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) only include the identifier of the upper ring and the MAC address of the intersecting device. Similarly, the topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 (i.e., network devices 105-106) to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) only include the identifier of the upper ring and the MAC address of the intersecting device. This results in the network devices (e.g., network devices 105-107) on ERPS ring 2 and ERPS ring 3 being unable to determine the source of the topology change.

[0111] In the technical solution provided in this application embodiment, after forcibly blocking port P22 of network device 102, by carrying traceability information for determining the source of the topology change in the topology change message, the network device on the upper-layer ring can determine the source of the topology change based on the traceability information carried in the topology change message. For example, the traceability information for determining the source of the topology change includes the identifier of the port corresponding to the topology change source, the identifier of the network device corresponding to the topology change source, the ID of the ERPS ring where the topology change source is located, and the control VLAN ID of the ERPS ring where the topology change source is located. When the source of the topology change is the forcibly blocked port P22, the traceability information for determining the source of the topology change specifically includes the identifier of the forcibly blocked port P22, the identifier of the network device (i.e., network device 102) where the forcibly blocked port P22 is located, the ID of the ERPS ring (i.e., ERPS ring 1) where the forcibly blocked port P22 is located, and the control VLAN ID of the ERPS ring where the forcibly blocked port P22 is located.

[0112] In the technical solution provided in this application embodiment, after forcibly blocking port P22 of network device 102, network device 102 refreshes its FDB table (e.g., clears the FDB table of ports belonging to ERPS ring 1 (i.e., ports P21 and P22) in network device 102), and network device 102 sends (e.g., broadcasts) an FS message to ERPS ring 1, for example, referring to this FS message as FS message R2. FS message R2 carries traceability information V (FS message R2 may also include the MAC address of network device 102). The traceability information V includes: the identifier of port P22 (i.e., the identifier of the forcibly blocked port P22), the identifier of network device 102 (i.e., the identifier of the network device where the forcibly blocked port P22 is located), the ID of ERPS ring 1 (i.e., the ID of the ERPS ring where the forcibly blocked port P22 is located), and the control VLAN ID of ERPS ring 1 (i.e., the control VLAN ID of the ERPS ring where the forcibly blocked port P22 is located). After receiving the FS message R2, network device 101 determines the source of the topology change based on the source information V carried in the FS message R2, including port P22 in network device 102 belonging to ERPS ring 1. Network device 101 opens the RPL owner port (i.e., port P11) on ERPS ring 1. Network device 101 refreshes its FDB table based on the FS message R2 (e.g., clears the FDB table of ports in network device 101 belonging to ERPS ring 1 (i.e., ports P11 and P12)). Network device 101 continues to send (e.g., broadcast) the FS message R2 to ERPS ring 1. After receiving the FS message R2, network device 103 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in the FS message R2. Network device 103 refreshes its FDB table based on the FS message R2 (e.g., clearing the FDB table of ports in network device 103 belonging to ERPS ring 1 (i.e., port P31), and clearing the FDB table of ports in network device 103 belonging to ERPS ring 2 (i.e., ports P32 and P33). Furthermore, network device 103 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message R3. The EVENT message R3 carries the source information V (the EVENT message R3 may also include the identifier of ERPS ring 2 and the MAC address of network device 103).After receiving the FS message R2, network device 104 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in the FS message R2. Network device 104 refreshes its FDB table based on the FS message R2 (e.g., clearing the FDB table of ports in network device 104 belonging to ERPS ring 1 (i.e., port P41), and clearing the FDB table of ports in network device 104 belonging to ERPS ring 2 (i.e., ports P42 and P43). Furthermore, network device 104 sends (e.g., broadcasts) an EVENT message to ERPS ring 2, for example, calling this EVENT message R4. The EVENT message R4 carries the source information V (the EVENT message R4 may also include the identifier of ERPS ring 2 and the MAC address of network device 104). After receiving the EVENT message R3, network device 105 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in the EVENT message R3. Network device 105 refreshes its FDB table based on the EVENT message R3 (e.g., clearing the FDB table of ports in network device 105 belonging to ERPS ring 2 (i.e., port P51), and clearing the FDB table of ports in network device 105 belonging to ERPS ring 3 (i.e., ports P52 and P53). Furthermore, network device 105 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message R5. The EVENT message R5 carries the source information V (the EVENT message R5 may also include the identifier of ERPS ring 3 and the MAC address of network device 105). After receiving the EVENT message R4, network device 106 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in the EVENT message R4. Network device 106 refreshes its FDB table based on the EVENT message R4 (e.g., clearing the FDB table of ports in network device 106 belonging to ERPS ring 2 (i.e., port P61), and clearing the FDB table of ports in network device 106 belonging to ERPS ring 3 (i.e., ports P62 and P63)). Furthermore, network device 106 sends (e.g., broadcasts) an EVENT message to ERPS ring 3, for example, calling this EVENT message R6. The EVENT message R6 carries the source information V (the EVENT message R6 may also include the identifier of ERPS ring 3 and the MAC address of network device 106).After receiving EVENT messages R5 and / or R6, network device 107 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in EVENT messages R5 and / or R6. Network device 107 then refreshes its FDB table based on EVENT messages R5 and / or R6 (e.g., clearing the FDB table for ports in network device 107 belonging to ERPS ring 3 (i.e., ports P71 and P72)). Specifically, network device 107 refreshes its FDB table based on the first EVENT message received between EVENT messages R5 and R6. For example, network device 107 first receives EVENT message R5, and then receives EVENT message R6. After receiving EVENT message R5, network device 107 refreshes its FDB table according to EVENT message R5. After receiving EVENT message R6, network device 107 does not refresh its FDB table.

[0113] It should be noted that network device 104 may also receive EVENT message R3. After receiving EVENT message R3, network device 104 determines the source of topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in EVENT message R3. Furthermore, network device 104 checks whether the FDB table of ports in network device 104 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 104 updates the FDB table of ports in network device 104 belonging to ERPS ring 2 based on EVENT message R3. If it has been updated, network device 104 does not update the FDB table of ports in network device 104 belonging to ERPS ring 2. Network device 103 may also receive an EVENT message R4. After receiving the EVENT message R4, network device 103 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in the EVENT message R4. Furthermore, network device 103 checks whether the FDB table of the ports in network device 103 belonging to ERPS ring 2 has been updated. If it has not been updated, network device 103 updates the FDB table of the ports in network device 103 belonging to ERPS ring 2 based on the EVENT message R4. If it has been updated, network device 103 does not update the FDB table of the ports in network device 103 belonging to ERPS ring 2. Network device 106 may also receive an EVENT message R5. After receiving the EVENT message R5, network device 106 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in the EVENT message R5. Furthermore, network device 106 checks whether the FDB table of ports in network device 106 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 106 updates the FDB table of ports in network device 106 belonging to ERPS ring 3 based on the EVENT message R5. If it has been updated, network device 106 does not update the FDB table of ports in network device 106 belonging to ERPS ring 3. Network device 105 may also receive an EVENT message R6. After receiving the EVENT message R6, network device 105 determines the source of the topology change, including port P22 in network device 102 belonging to ERPS ring 1, based on the source information V carried in the EVENT message R6. Furthermore, network device 105 checks whether the FDB table of the ports in network device 105 belonging to ERPS ring 3 has been updated. If it has not been updated, network device 105 updates the FDB table of the ports in network device 105 belonging to ERPS ring 3 based on the EVENT message R6. If it has been updated, network device 105 does not update the FDB table of the ports in network device 105 belonging to ERPS ring 3.

[0114] The aforementioned FS message R2 and EVENT messages R3-J6 are all topology change messages. In fact, whenever any network device receives a topology change message, it checks whether its relevant FDB table has been refreshed; if not, it refreshes it.

[0115] Based on the above description, in this embodiment, after forcibly blocking port P22 of network device 102, the topology change messages sent by the intersecting devices of ERPS ring 1 and ERPS ring 2 (i.e., network devices 103-104) to the upper ring of ERPS ring 1 (i.e., ERPS ring 2) carry source information. The topology change messages sent by the intersecting devices of ERPS ring 2 and ERPS ring 3 (i.e., network devices 105-106) to the upper ring of ERPS ring 2 (i.e., ERPS ring 3) also carry source information. This allows network devices on both ERPS ring 2 and ERPS ring 3 to determine the source of the topology change based on the source information carried in the topology change messages.

[0116] Sixth, topology diffusion schemes in scenarios where blocked ports are forcibly opened.

[0117] The topology diffusion scheme in the scenario of forcibly opening blocked ports is similar to the topology diffusion scheme in the scenario of manually opening blocked ports, and will not be elaborated here.

[0118] The topology diffusion schemes for the six scenarios described above are introduced with reference to Figure 1. Those skilled in the art will understand that the causes of topology changes may also include other reasons (such as network device failure), and the technical solutions of this application are not limited to the six scenarios described above. The technical solutions of this application are still used in other scenarios. That is, in other scenarios, source information can also be carried in the topology change message so that network devices in the ERPS network can determine the source of the topology change in the ERPS network. Furthermore, the above description of refreshing the FDB table is only an example; for the specific content of refreshing the FDB table, please refer to the T-REC-G.8032 standard. The T-REC-G.8032 standard is a standard developed by the Telecommunication Standardization Department of the International Telecommunication Union (ITU).

[0119] The network devices mentioned above include Layer 2 network switching devices such as switches, routers, or Access Transmission Network (ATN) devices. Routers may include access routers (AR). Network devices are also referred to as network nodes, forwarding devices, forwarding nodes, switching devices, switching nodes, routing devices, or routing nodes. The user equipment mentioned above includes mobile phones, tablets, laptops, desktop computers, smart TVs, Internet of Things (IoT) devices, or industrial equipment.

[0120] Those skilled in the art will understand that the application scenario shown in Figure 1 is merely an example and is not intended to limit the technical solutions of the embodiments of this application. The number of network devices in the ERPS network, the number of ERPS rings, the number of user devices connected to the ERPS network, the connection relationships between network devices, the connection relationships between ERPS rings, and the connection relationships between user devices and the ERPS network can all be adjusted according to actual circumstances. Furthermore, the application scenario of the embodiments of this application may also include other devices. For example, the application scenario of the embodiments of this application may also include servers connected to the ERPS network, network controllers for controlling the ERPS network, etc., and the embodiments of this application do not limit these.

[0121] The above describes the application scenarios of the embodiments of this application. The method embodiments of this application are described below.

[0122] Please refer to Figure 4, which shows a flowchart of a method for determining a topology change source according to an embodiment of this application. This method is applied to an ERPS network, such as the ERPS network shown in Figure 1. The method includes the following steps S401 to S402.

[0123] S401. The first network device in the ERPS network receives a topology change message M1 sent by the second network device in the ERPS network. The topology change message M1 carries source information W, which is used to determine the source of the topology change in the ERPS network.

[0124] The ERPS network includes at least one ERPS ring, and each ERPS ring includes multiple network devices. The first network device and the second network device can be two network devices on the same ERPS ring. The second network device broadcasts a topology change message M1 to the ERPS ring where the second network device is located, and the first network device receives the topology change message M1 broadcast by the second network device.

[0125] In one embodiment, the ERPS network includes multiple ERPS rings, including a first ERPS ring and a second ERPS ring. A second network device is located on both the first and second ERPS rings (i.e., the second network device is an intersecting device of the first and second ERPS rings), and a first network device is located on the second ERPS ring. Therefore, both the first and second network devices are on the second ERPS ring. The second network device broadcasts a topology change message M1 to the second ERPS ring, and the first network device receives the topology change message M1 broadcast by the second network device.

[0126] In another embodiment, the ERPS network includes multiple ERPS rings, including a first ERPS ring and a second ERPS ring. A second network device is located on the first ERPS ring, and a first network device is located on both the first and second ERPS rings (i.e., the first network device is an intersecting device of the first and second ERPS rings). Both the first and second network devices are on the first ERPS ring. The second network device broadcasts a topology change message M1 to the first ERPS ring, and the first network device receives the topology change message M1 broadcast by the second network device.

[0127] In optional embodiments, the aforementioned multiple ERPS rings are deployed across multiple network layers, including an access layer, a aggregation layer, and a core layer. A first ERPS ring is deployed at the access layer, and a second ERPS ring is deployed at the aggregation layer. Alternatively, a first ERPS ring is deployed at the aggregation layer, and a second ERPS ring is deployed at the core layer. An ERPS ring deployed at the access layer is also called an access ring, an ERPS ring deployed at the aggregation layer is also called an aggregation ring, and an ERPS ring deployed at the core layer is also called a core ring. As an example, the ERPS network is shown in Figure 1. The multiple ERPS rings include ERPS ring 1, ERPS ring 2, and ERPS ring 3. ERPS ring 1 is deployed at the access layer, ERPS ring 2 is deployed at the aggregation layer, and ERPS ring 3 is deployed at the core layer. The first ERPS ring is ERPS ring 1, and the second ERPS ring is ERPS ring 2. Alternatively, the first ERPS ring is ERPS ring 2, and the second ERPS ring is ERPS ring 3.

[0128] The following description, in conjunction with Figure 1, will illustrate the first ERPS ring, the second ERPS ring, the first network device, and the second network device in four different scenarios.

[0129] The first scenario involves a second network device located in both the first and second ERPS rings, and a first network device located in the second ERPS ring. The first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer. For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106.

[0130] The second scenario: The second network device is located in both the first and second ERPS rings, while the first network device is located in the second ERPS ring. The first ERPS ring is deployed at the aggregation layer, and the second ERPS ring is deployed at the core layer. For example, as shown in Figure 1, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 105 or network device 106, and the first network device is network device 107.

[0131] The third scenario: The second network device is located in the first ERPS ring, and the first network device is located in both the first and second ERPS rings. The first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer. For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 101 or network device 102, and the first network device is network device 103 or network device 104.

[0132] The fourth scenario: The second network device is located in the first ERPS ring, and the first network device is located in both the first and second ERPS rings. The first ERPS ring is deployed at the aggregation layer, and the second ERPS ring is deployed at the core layer. For example, as shown in Figure 1, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106.

[0133] Based on the above four scenarios, it can be seen that in this embodiment, the second network device can be any of network devices 101 to 106, and the first network device can be any of network devices 103 to 107. In fact, the first network device can also be network device 101 or network device 102. For example, if the second network device is not network device 101, the first network device can be network device 101; if the second network device is not network device 102, the first network device can be network device 102. Therefore, the first network device can be any of network devices 101 to 107, and any of network devices 101 to 107 can execute the method embodiment shown in Figure 3.

[0134] As mentioned earlier, the causes of topology changes include, but are not limited to: link failure, link failure recovery, manually blocking a port, manually releasing a blocked port, forcibly blocking a port, or forcibly releasing a blocked port. The source of a topology change in an ERPS network can be a port in the ERPS network (e.g., the RPL owner port, a forcibly blocked port, or a manually blocked port) or a link in the ERPS network (e.g., a failed link). The source information W can be information about that port or that link. The topology change message M1 can be an R-APS message, and specifically includes any of the following: SF message, NRRB message, FS message, MS message, or EVENT message. SF messages, NRRB messages, FS messages, MS messages, and EVENT messages are different types of R-APS messages.

[0135] In optional embodiments, the tracing information W used to determine the source of a topology change includes one or more of the following: the identifier of the port corresponding to the topology change source; the identifier of the network device corresponding to the topology change source; the ID of the ERPS ring where the topology change source is located; and the control VLAN ID of the ERPS ring where the topology change source is located. Wherein, if the source of a topology change in the ERPS network is a port in the ERPS network, the port corresponding to the topology change source is that port (i.e., the topology change source itself), the network device corresponding to the topology change source is the network device where that port is located, and the ERPS ring where the topology change source is located is the ERPS ring where that port is located. For example, if the source of a topology change in the ERPS network is a port in the ERPS network, the tracing information used to determine the source of the topology change includes one or more of the following: the identifier of the port, the identifier of the network device where the port is located, the ID of the ERPS ring where the port is located, and the control VLAN ID of the ERPS ring where the port is located. In the case where the source of topology change in an ERPS network is a link within that ERPS network, the port corresponding to the source of topology change is the directly connected port of that link, the network device corresponding to the source of topology change is the network device where the directly connected port of that link resides, and the ERPS ring where the source of topology change resides is the ERPS ring where the directly connected port of that link resides. For example, when the source of topology change in an ERPS network is a link within that ERPS network, the tracing information used to determine the source of topology change includes one or more of the following: the identifier of the directly connected port of that link, the identifier of the network device where the directly connected port resides, the ID of the ERPS ring where the directly connected port resides, and the control VLAN ID of the ERPS ring where the directly connected port resides.

[0136] In an optional embodiment, the ERPS network includes a first ERPS ring deployed at the access layer or aggregation layer, and a second network device located within the first ERPS ring. The source information W for determining the source of the topology change includes the identifier of the second network device and the identifier of the first ERPS ring; alternatively, the source information W for determining the source of the topology change includes the identifier of a third network device located within the first ERPS ring and the identifier of the first ERPS ring.

[0137] When the tracing information W includes the identifier of the second network device and the identifier of the first ERPS ring, the second network device is the network device corresponding to the topology change source, and the first ERPS ring is the ERPS ring where the topology change source is located. The topology change source can be a port of the second network device located in the first ERPS ring (or a port of the second network device belonging to the first ERPS ring). The tracing information W may also include the identifier of that port of the second network device (i.e., the port corresponding to the topology change source) and the control VLAN identifier of the first ERPS ring. Alternatively, the topology change source can be a link located in the first ERPS ring, and a directly connected port of that link is a port of the second network device. The tracing information W may also include the identifier of that port of the second network device (i.e., the port corresponding to the topology change source) and the control VLAN identifier of the first ERPS ring.

[0138] When the tracing information W includes the identifier of a third network device located in the first ERPS ring and the identifier of the first ERPS ring, the third network device is the network device corresponding to the topology change source, and the first ERPS ring is the ERPS ring where the topology change source is located. The topology change source can be a port of the third network device located in the first ERPS ring (or a port of the third network device belonging to the first ERPS ring). The tracing information W can also include the identifier of that port of the third network device (i.e., the port corresponding to the topology change source) and the control VLAN identifier of the first ERPS ring. Alternatively, the topology change source can be a link located in the first ERPS ring, and a directly connected port of that link is a port of the third network device. The tracing information W can also include the identifier of that port of the third network device (i.e., the port corresponding to the topology change source) and the control VLAN identifier of the first ERPS ring.

[0139] In one embodiment, the second network device is located on the first ERPS ring, and the first network device is located on both the first and second ERPS rings (both the first and second network devices are on the first ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 101 or network device 102, and the first network device is network device 103 or network device 104. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. A failure of a port in the second network device belonging to the first ERPS ring causes a change in the topology of the first ERPS ring, which in turn causes a change in the topology of the ERPS network. The source of the topology change in the ERPS network is that port in the second network device belonging to the first ERPS ring. After the second network device detects a port failure, it broadcasts a topology change message M1 to the first ERPS ring. The topology change message M1 is an SF message, and the first network device receives the topology change message M1 broadcast by the second network device. The topology change message M1 carries traceability information W, which includes one or more of the following: the identifier of the port that failed in the second network device, the identifier of the second network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring.

[0140] In another embodiment, the second network device is located on the first ERPS ring, and the first network device is located on both the first and second ERPS rings (both the first and second network devices are on the first ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 101 or network device 102, and the first network device is network device 103 or network device 104. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. A failure of a link on the first ERPS ring causes a change in the topology of the first ERPS ring, which in turn causes a change in the topology of the ERPS network. The source of the topology change in the ERPS network is this link on the first ERPS ring. The second network device includes a directly connected port of this link. After the second network device detects a link failure, it broadcasts a topology change message M1 to the first ERPS ring. The topology change message M1 is an SF message, and the first network device receives the topology change message M1 broadcast by the second network device. The topology change message M1 carries traceability information W, which includes one or more of the following: the identifier of the directly connected port of the second network device belonging to the link, the identifier of the second network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring.

[0141] In another embodiment, the second network device is located on the first ERPS ring, and the first network device is located on both the first and second ERPS rings (both the first and second network devices are on the first ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 101 or network device 102, and the first network device is network device 103 or network device 104. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. The second network device is the network device where the RPL owner port on the first ERPS ring is located. After receiving an NR message broadcast by another network device on the first ERPS ring, the second network device starts a WTR timer. After the WTR timer expires, the second network device blocks the RPL owner port on the first ERPS ring. The second network device blocks the RPL owner port on the first ERPS ring, causing a topology change in the first ERPS ring, which in turn leads to a topology change in the ERPS network. The source of the topology change in the ERPS network is the RPL owner port on the first ERPS ring. After blocking the RPL owner port on the first ERPS ring, the second network device broadcasts a topology change message M1 to the first ERPS ring. The topology change message M1 is an NRRB message, and the first network device receives the topology change message M1 broadcast by the second network device. The topology change message M1 carries traceability information W, which includes one or more of the following: the identifier of the RPL owner port, the identifier of the second network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring.

[0142] In another embodiment, the second network device is located in the first ERPS ring, and the first network device is located in both the first and second ERPS rings (both the first and second network devices are on the first ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 101 or network device 102, and the first network device is network device 103 or network device 104. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. The second network device blocks a port belonging to the first ERPS ring based on a forced blocking command, causing a change in the topology of the first ERPS ring, and consequently a change in the topology of the ERPS network. The source of the topology change in the ERPS network is this port in the second network device. After the second network device blocks a certain port, it broadcasts a topology change message M1 to the first ERPS ring. The topology change message M1 is an FS message, and the first network device receives the topology change message M1 broadcast by the second network device. The topology change message M1 carries traceability information W, which includes one or more of the following: the identifier of the port that was forcibly blocked in the second network device, the identifier of the second network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring.

[0143] In another embodiment, the second network device is located in the first ERPS ring, and the first network device is located in both the first and second ERPS rings (both the first and second network devices are on the first ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 101 or network device 102, and the first network device is network device 103 or network device 104. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. The second network device blocks a port belonging to the first ERPS ring based on a manual blocking command, causing a change in the topology of the first ERPS ring, and consequently a change in the topology of the ERPS network. The source of the topology change in the ERPS network is this port in the second network device. After the second network device blocks a certain port, it broadcasts a topology change message M1 to the first ERPS ring. The topology change message M1 is an MS message, and the first network device receives the topology change message M1 broadcast by the second network device. The topology change message M1 carries traceability information W, which includes one or more of the following: the identifier of the port that was manually blocked in the second network device, the identifier of the second network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring.

[0144] In another embodiment, the second network device is located in both the first and second ERPS rings, and the first network device is located in the second ERPS ring (both the first and second network devices are on the second ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 105 or network device 106, and the first network device is network device 107. The third network device is located in the first ERPS ring, and the third network device is not the same network device as the second network device. A failure of a port in the third network device belonging to the first ERPS ring causes a change in the topology of the first ERPS ring, which in turn causes a change in the topology of the ERPS network. The source of the topology change in the ERPS network is that port in the third network device belonging to the first ERPS ring. After the third network device detects a port failure, it broadcasts an SF message to the first ERPS ring. The second network device receives the SF message broadcast by the third network device. The SF message carries traceability information W, which includes one or more of the following: the identifier of the port that failed in the third network device, the identifier of the third network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring. After receiving the SF message, the second network device broadcasts a topology change message M1 to the second ERPS ring. The topology change message M1 is an EVENT message and carries the traceability information W. The first network device receives the topology change message M1 broadcast by the second network device.

[0145] In another embodiment, the second network device is located in both the first and second ERPS rings, and the first network device is located in the second ERPS ring (both the first and second network devices are on the second ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 105 or network device 106, and the first network device is network device 107. The third network device is located in the first ERPS ring, and the third network device is not the same network device as the second network device. A failure of a link on the first ERPS ring causes a change in the topology of the first ERPS ring, which in turn causes a change in the topology of the ERPS network. The source of the topology change in the ERPS network is the link on the first ERPS ring. The third network device includes the directly connected port of the link, while the second network device does not include the directly connected port of the link. After the third network device detects a link failure, it sends an SF message to the first ERPS ring. The second network device receives the SF message broadcast by the third network device. The SF message carries source information W, which includes one or more of the following: the identifier of the directly connected port of the third network device belonging to the link, the identifier of the third network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring. Upon receiving the SF message, the second network device broadcasts a topology change message M1 to the second ERPS ring. The topology change message M1 is an EVENT message and carries the source information W. The first network device receives the topology change message M1 broadcast by the second network device.

[0146] In another embodiment, the second network device is located in both the first and second ERPS rings, and the first network device is located in the second ERPS ring (both the first and second network devices are on the second ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 105 or network device 106, and the first network device is network device 107. The third network device is located in the first ERPS ring, and the third network device is not the same network device as the second network device. The third network device is the network device where the RPL owner port on the first ERPS ring is located. After receiving an NR message broadcast by another network device on the first ERPS ring, the third network device starts a WTR timer. After the WTR timer expires, the third network device blocks the RPL owner port on the first ERPS ring. A third network device blocks the RPL owner port on the first ERPS ring, causing a topology change in the first ERPS ring, which in turn leads to a topology change in the ERPS network. The source of the topology change in the ERPS network is the RPL owner port on the first ERPS ring. After blocking the RPL owner port, the third network device broadcasts an NRRB message to the first ERPS ring. This NRRB message carries source information W, which includes one or more of the following: the identifier of the RPL owner port, the identifier of the third network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring. After receiving this NRRB message, the second network device broadcasts a topology change message M1 to the second ERPS ring. The topology change message M1 is an EVENT message and carries the source information W. The first network device receives the topology change message M1 broadcast by the second network device.

[0147] In another embodiment, the second network device is located in both the first and second ERPS rings, and the first network device is located in the second ERPS ring (both the first and second network devices are on the second ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 105 or network device 106, and the first network device is network device 107. The third network device is located in the first ERPS ring, and the third network device is not the same network device as the second network device. The third network device blocks a port belonging to the first ERPS ring based on a forced blocking command, causing a change in the topology of the first ERPS ring, and consequently a change in the topology of the ERPS network. The source of the topology change in the ERPS network is this port in the third network device. After the third network device blocks a port, it broadcasts an FS message to the first ERPS ring. This FS message carries source information W, which includes one or more of the following: the identifier of the port forcibly blocked in the third network device, the identifier of the third network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring. Upon receiving this FS message, the second network device broadcasts a topology change message M1 to the second ERPS ring. The topology change message M1 is an EVENT message and carries the source information W. The first network device receives the topology change message M1 broadcast by the second network device.

[0148] In another embodiment, the second network device is located in both the first and second ERPS rings, and the first network device is located in the second ERPS ring (both the first and second network devices are on the second ERPS ring). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 105 or network device 106, and the first network device is network device 107. The third network device is located in the first ERPS ring, and the third network device is not the same network device as the second network device. The third network device blocks a port belonging to the first ERPS ring based on a manual blocking command, causing a change in the topology of the first ERPS ring, and consequently a change in the topology of the ERPS network. The source of the topology change in the ERPS network is this port in the third network device. After the third network device blocks a port, it broadcasts an MS message to the first ERPS ring. This MS message carries source information W, which includes one or more of the following: the identifier of the manually blocked port in the third network device, the identifier of the third network device, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring. Upon receiving this MS message, the second network device broadcasts a topology change message M1 to the second ERPS ring. The topology change message M1 is an EVENT message and carries the source information W. The first network device receives the topology change message M1 broadcast by the second network device.

[0149] In an optional embodiment, the topology change message M1 is an R-APS message, which includes a topology change type length value (TLV) field. This TLV field carries traceability information W. The R-APS message belongs to the Connectivity Fault Management (CFM) protocol family. Please refer to Figure 5, which shows a schematic diagram of an R-APS message provided in an embodiment of this application. The R-APS message includes: a maintenance entity group level (MEL) field, a version field, an opcode field, a flags field, a TLV offset field, an R-APS specific information field, an optional TLV field, and an end TLV field. The MEL field is 3 bits long and is used to carry the MEL information. The version field is 5 bits long and is used to carry the protocol version of the R-APS message (the version of the ERPS protocol). The opcode field is 8 bits (1 byte) long and carries the message type of the R-APS message. R-APS message types include SF, NR, NRRB, FS, MS, and EVENT messages. SF, NRRB, FS, MS, and EVENT messages can all be used as topology change messages in this embodiment. The flag field is 1 byte long, and the median value depends on the message type. The TLV offset field is 1 byte long and carries the offset of the first TLV field in the R-APS-specific information field relative to this TLV offset field. The value of the TLV offset field is related to the message type; when the value of the TLV offset field is 0, it indicates the first byte after the TLV offset field. The R-APS-specific information field carries R-APS-specific information. The option TLV field is an expandable field, and there is at least one option TLV field. In SF, NRRB, FS, MS, or EVENT messages that are topology change messages, the at least one option TLV field includes a topology change TLV field, which is used to carry source information (e.g., source information W).

[0150] Please refer to Figure 6, which illustrates a schematic diagram of a topology change TLV field provided in an embodiment of this application. The topology change TLV field includes: a type subfield, a length subfield, and a value subfield. The type subfield is 2 bytes long and its value can be 0xFFF1; this type subfield indicates the type of the topology change TLV field. The length subfield is 2 bytes long and indicates the length of the value subfield. The value subfield is 74 bytes long and carries traceability information. Specifically, the value subfield includes: a ring ID subfield, a control VLAN ID subfield, a reserved subfield, a device ID subfield, and a port ID subfield. The ring ID subfield is 1 byte long and carries the ID of the ERPS ring where the topology change source is located. The control VLAN ID subfield is 2 bytes long and carries the control VLAN ID of the ERPS ring where the topology change source is located. The reserved subfield is 1 byte long. The Device ID subfield is 6 bytes long and is used to carry the identifier of the network device corresponding to the topology change source (e.g., the MAC address of the network device). The Port ID subfield is 64 bytes long and is used to identify the port corresponding to the topology change source (e.g., the port name or port number).

[0151] In optional embodiments, the tracing information W is any one of the tracing information X1-X2, tracing information Y, tracing information Z, tracing information U, or tracing information V in the aforementioned embodiments. The topology change message M1 is any one of the SF messages F1-F2, EVENT messages F3-F6, NRRB messages G1, EVENT messages G3-G6, MS messages J2, EVENT messages J3-J6, NRRB messages Q1, and EVENT messages Q3-Q6 in the aforementioned embodiments. When the tracing information W is the tracing information X1 in the aforementioned embodiments, the topology change message M1 is the SF message F1, EVENT message F3, or EVENT message F5 in the aforementioned embodiments. When the tracing information W is the tracing information X2 in the aforementioned embodiments, the topology change message M1 is the SF message F2, EVENT message F4, or EVENT message F6 in the aforementioned embodiments. When the tracing information W is the tracing information Y in the aforementioned embodiments, the topology change message M1 is any one of the NRRB message G1 or EVENT messages G3 to G6 in the aforementioned embodiments. When the tracing information W is the tracing information Z in the aforementioned embodiments, the topology change message M1 is any one of the MS message J2 or EVENT messages J3 to J6 in the aforementioned embodiments. When the tracing information W is the tracing information U in the aforementioned embodiments, the topology change message M1 is any one of the NRRB message Q1 or EVENT messages Q3 to Q6 in the aforementioned embodiments. When the tracing information W is the tracing information V in the aforementioned embodiments, the topology change message M1 is any one of the FS message R2 or EVENT messages R3 to R6 in the aforementioned embodiments.

[0152] S402. The first network device determines the source of topology change in the ERPS network based on the traceability information W.

[0153] After receiving the topology change message M1, the first network device obtains the source information W carried by the topology change message M1. Then, the first network device determines the source of the topology change in the ERPS network based on the source information W.

[0154] As previously mentioned, the tracing information W includes one or more of the following: the identifier of the port corresponding to the topology change source; the identifier of the network device corresponding to the topology change source; the ID of the ERPS ring where the topology change source is located; and the control VLAN ID of the ERPS ring where the topology change source is located. Therefore, the first network device determines one or more of the following based on the tracing information W: the port corresponding to the topology change source, the network device corresponding to the topology change source, the ERPS ring where the topology change source is located, and the control VLAN ID of the ERPS ring where the topology change source is located. For example, if the tracing information W includes the identifier of the port corresponding to the topology change source, the identifier of the network device corresponding to the topology change source, the ID of the ERPS ring where the topology change source is located, and the control VLAN ID of the ERPS ring where the topology change source is located, the first network device determines that the topology change source includes the port belonging to the ERPS ring within that network device, and the first network device can determine the control VLAN ID of the ERPS ring.

[0155] In one example, the topology change message M1 is the SF message F1, EVENT message F3, or EVENT message F5 in the aforementioned embodiments, the tracing information W is the tracing information X1 in the aforementioned embodiments, and the first network device is any one of network devices 103-107 in Figure 1. The first network device determines the source of the topology change based on the tracing information W carried in the topology change message M1, including port P12 of network device 101 belonging to ERPS ring 1. In another example, the topology change message M1 is the SF message F2, EVENT message F4, or EVENT message F6 in the aforementioned embodiments, the tracing information W is the tracing information X2 in the aforementioned embodiments, and the first network device is any one of network devices 103-107 in Figure 1. The first network device determines the source of the topology change based on the tracing information W carried in the topology change message M1, including port P22 of network device 102 belonging to ERPS ring 1. Both port P12 and port P22 are links L. P12-P22 The direct connection port.

[0156] In another example, the topology change message M1 is any one of the MS message J2 and EVENT messages J3 to J6 in the aforementioned embodiments, the source information W is the source information Z in the aforementioned embodiments, the first network device is any one of network device 101 or network device 103 to 107 in Figure 1, and the first network device determines the source of the topology change according to the source information W carried by the topology change message M1, including port P22 of network device 102 belonging to ERPS ring 1.

[0157] In another example, the topology change message M1 is any one of the NRRB message Q1 and EVENT messages Q3 to Q6 in the aforementioned embodiments, the source information W is the source information U in the aforementioned embodiments, the first network device is any one of the network devices 102 to 107 in Figure 1, and the first network device determines the source of the topology change based on the source information U carried by the topology change message M1, including port P11 of network device 101 belonging to ERPS ring 1.

[0158] In another example, the topology change message M1 is any one of the FS message R2 and EVENT messages R3 to R6 in the aforementioned embodiments, the source information W is the source information V in the aforementioned embodiments, the first network device is any one of network devices 101 or 103 to 107 in Figure 1, and the first network device determines the source of the topology change based on the source information W carried by the topology change message M1, including port P22 in network device 102 that belongs to ERPS ring 1.

[0159] It should be noted that in an ERPS network, each network device typically broadcasts topology change messages to the ERPS ring it resides in. Therefore, each network device may receive topology change messages that it itself generates and broadcasts. Upon receiving any topology change message, each network device determines whether the source MAC address of the message is its own MAC address. If the source MAC address is its own, the network device determines that the message was generated by itself and discards it. If the source MAC address is not its own, the network device performs relevant processing based on the message (e.g., refreshing the FDB table). In this embodiment, the topology change message carries source information. After receiving any topology change message, if the source MAC address is not its own, the network device further determines the source of the topology change based on the source information carried in the message. For example, after receiving topology change message M1, the first network device determines whether the source MAC address of message M1 is its own MAC address. If the source MAC address of topology change message M1 is the MAC address of the first network device, the first network device determines that topology change message M1 was generated by the first network device and discards topology change message M1. If the source MAC address of topology change message M1 is not the MAC address of the first network device, the first network device determines that topology change message M1 was not generated by the first network device, the first network device obtains the source information W carried by topology change message M1, and determines the source of the topology change in the ERPS network based on the source information W. In an optional embodiment, topology change message M1 is an R-APS message, and topology change message M1 includes a topology change TLV field, which is used to carry source information W. If the source MAC address of topology change message M1 is not the MAC address of the first network device, the first network device performs a validity check on the topology change TLV field in topology change message M1. For example, the first network device performs a validity check on the topology change TLV field according to the type subfield and length subfield of the topology change TLV field. After the topology change TLV field passes the check, the first network device obtains the source information W carried by the topology change TLV field.

[0160] In an optional embodiment, after the first network device obtains the tracing information W carried by the topology change message M1, the first network device stores the tracing information W. For example, the first network device receives the topology change message M1 through a first port, and the first network device stores the tracing information W carried by the topology change message M1 in the memory corresponding to the first port. That is, the network device stores the tracing information carried by the topology change message in the memory corresponding to the port that receives the topology change message, and this embodiment of the application does not limit this.

[0161] In an optional embodiment, after receiving the topology change message M1, the first network device refreshes its relevant FDB table according to the topology change message M1. Specifically, in another embodiment, the first network device checks whether its relevant FDB table has been refreshed; if it has not, it refreshes the relevant FDB table according to the topology change message M1; if it has already been refreshed, it does not refresh the relevant FDB table.

[0162] In summary, the technical solution provided in this application, by carrying source information in the topology change message announcing a change in the ERPS network topology, enables network devices in the ERPS network to determine the source of the topology change based on the source information carried in the received topology change message, thus achieving source tracing of the topology change. Furthermore, since network devices can directly determine the source of the topology change based on the source information carried in the topology change message, the determination of the source of the topology change is fast and efficient, enabling rapid source tracing of the topology change.

[0163] In one optional embodiment, the ERPS network includes a first ERPS ring and a second ERPS ring, with a second network device located on the first ERPS ring. The first network device is both the first and second ERPS rings. The first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer (the third case in S401). Alternatively, the first ERPS ring is deployed at the aggregation layer, and the second ERPS ring is deployed at the core layer (the fourth case in S401). For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 101 or network device 102, and the first network device is network device 103 or network device 104. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. After receiving the topology change message M1, for example, after the first network device obtains the source information W carried by the topology change message M1, or after the first network device determines the source of the topology change in the ERPS network based on the source information W carried by the topology change message M1, the first network device sends the source information W to the second ERPS ring.

[0164] In a specific embodiment, the first network device generates a topology change message M2 based on the traceability information W, and then sends the topology change message M2 to the second ERPS ring to transmit the traceability information W to the second ERPS ring. For example, the first network device broadcasts the topology change message M2 to the second ERPS ring. The topology change message M2 is an R-APS message, and specifically, it can be an EVENT message.

[0165] In an optional embodiment, the first network device includes two ports belonging to the first ERPS ring. Both ports of the first network device can receive topology change messages broadcast by network devices on the first ERPS ring. The topology change messages received by both ports of the first network device can carry source information, and the source information carried by the topology change messages received by the two ports of the first network device can be the same or different. For example, if the source of the topology change is a port on the first ERPS ring, the topology change messages received by both ports of the first network device will carry source information. Furthermore, the source information carried by the topology change messages received by the two ports of the first network device will include the identifier of the port, the identifier of the network device to which the port belongs, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring. Therefore, the source information carried by the topology change messages received by the two ports of the first network device will be the same. For example, if the source of the topology change is a link on the first ERPS ring, the topology change messages received by both ports of the first network device carry source information. Furthermore, the source information carried in the topology change message received by one of the two ports of the first network device includes the identifier of a directly connected port of that link, the identifier of the network device to which that directly connected port is located, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring. The source information carried in the topology change message received by the other port of the first network device includes the identifier of another directly connected port of that link, the identifier of the network device to which that other directly connected port is located, the ID of the first ERPS ring, and the control VLAN ID of the first ERPS ring. Therefore, the source information carried in the topology change messages received by the two ports of the first network device is different. The first network device preferentially generates an EVENT message carrying traceability information for broadcast to the second ERPS ring based on the traceability information carried in the topology change message received by the first of its two ports. If the first port does not receive a topology change message, or if the first port receives a topology change message but the received topology change message does not carry traceability information, the first network device generates an EVENT message carrying traceability information for broadcast to the second ERPS ring based on the traceability information carried in the topology change message received by the second of its two ports. For example, if the first port receives a topology change message carrying traceability information T1, the first network device generates an EVENT message carrying traceability information T1 for broadcast to the second ERPS ring based on the traceability information T1.If the first port does not receive a topology change message, or if the first port receives a topology change message but the received message does not carry source information, assuming the second port receives the topology change message and the received message carries source information T2, the first network device generates an EVENT message carrying source information T2 for broadcast to the second ERPS ring. In an optional embodiment, if at least one of the two ports of the first network device receives a topology change message, and the message does not carry source information, the first network device generates an EVENT message without source information for broadcast to the second ERPS ring. The first and second ports are determined based on configuration. The topology change message M1 can be either the topology change message received by the first port or the topology change message received by the second port.

[0166] In this embodiment, the first network device sends traceability information W to the second ERPS ring, which facilitates the network devices on the second ERPS ring to determine the source of topology change in the ERPS network based on the traceability information W. The implementation method for the network devices on the second ERPS ring to determine the source of topology change in the ERPS network based on the traceability information W can be referred to in S402, and will not be elaborated here.

[0167] In another optional embodiment, the ERPS network includes a first ERPS ring and a second ERPS ring, with a second network device located in both the first and second ERPS rings, and a first network device located in the second ERPS ring. The first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer (the first case in S401). The ERPS network also includes a third ERPS ring deployed at the core layer, with the first network device also located in the third ERPS ring. For example, as shown in Figure 1, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, and the third ERPS ring is ERPS ring 3. The second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. After receiving the topology change message M1, for example, after the first network device obtains the source information W carried by the topology change message M1, or after the first network device determines the source of the topology change in the ERPS network based on the source information W carried by the topology change message M1, the first network device sends the source information W to the third ERPS ring. The implementation method of the first network device sending traceability information W to the third ERPS ring can refer to the implementation method of the first network device sending traceability information W to the second ERPS ring described above, and will not be repeated here.

[0168] In this embodiment, the first network device sends traceability information W to the third ERPS ring, which facilitates the network devices on the third ERPS ring to determine the source of topology change in the ERPS network based on the traceability information W. The implementation method for the network devices on the third ERPS ring to determine the source of topology change in the ERPS network based on the traceability information W can be found in S402, and will not be elaborated here.

[0169] The above is a description of the method embodiments of this application. The following describes the apparatus embodiments of this application, which are used to execute the method of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments of this application.

[0170] This application provides an apparatus for determining a topology change source, which is applied to a first network device in an ERPS network. The apparatus includes at least one functional module for performing the method for determining a topology change source as described in the above-described method embodiments. This at least one functional module can be implemented using software, hardware, or a combination of both, and can be arbitrarily combined or divided based on specific implementations.

[0171] As an example, please refer to Figure 7, which shows a schematic diagram of a topology change source determination device 700 provided in an embodiment of this application. The determination device 700 may be a first network device in an ERPS network or a functional component of a first network device. The first network device may be any network device in the application scenario shown in Figure 1. For example, the first network device is any of network devices 103 to 107.

[0172] As shown in Figure 7, the determining device 700 includes a receiving module 710 and a processing module 720. The receiving module 710 receives a topology change message sent by a second network device in the ERPS network. This topology change message carries source information, which is used to determine the source of the topology change in the ERPS network. The processing module 720 determines the source of the topology change in the ERPS network based on the source information. The functional implementation of the receiving module 710 can be referred to the relevant description in S401 above, and the functional implementation of the processing module 720 can be referred to the relevant description in S402 above.

[0173] In an optional embodiment, the ERPS network includes a first ERPS ring and a second ERPS ring; a second network device is located in the first ERPS ring and the second ERPS ring, and a first network device is located in the second ERPS ring; or, a second network device is located in the first ERPS ring, and a first network device is located in the first ERPS ring and the second ERPS ring.

[0174] In an optional embodiment, the first ERPS ring is deployed at the access layer and the second ERPS ring is deployed at the aggregation layer; or, the first ERPS ring is deployed at the aggregation layer and the second ERPS ring is deployed at the core layer.

[0175] In an optional embodiment, the first ERPS ring is deployed at the access layer, the second ERPS ring is deployed at the aggregation layer, the ERPS network also includes a third ERPS ring deployed at the core layer, the second network device is located at the first ERPS ring and the second ERPS ring, the first network device is located at the second ERPS ring and the third ERPS ring, and the determining device 700 further includes: a sending module 730, used to send the traceability information to the third ERPS ring.

[0176] In an optional embodiment, the second network device is located in the first ERPS ring, and the first network device is located in the first ERPS ring and the second ERPS ring. The determining device 700 further includes a sending module 730, used to send the traceability information to the second ERPS ring.

[0177] In an optional embodiment, the tracing information includes one or more of the following: the identifier of the port corresponding to the topology change source; the identifier of the network device corresponding to the topology change source; the identifier of the ERPS ring where the topology change source is located; and the VLAN identifier of the control virtual local area network of the ERPS ring where the topology change source is located.

[0178] In an optional embodiment, the ERPS network includes a first ERPS ring deployed at the access layer or aggregation layer, a second network device located at the first ERPS ring, and the traceability information includes the identifier of the second network device and the identifier of the first ERPS ring; or, the traceability information includes the identifier of a third network device located at the first ERPS ring and the identifier of the first ERPS ring.

[0179] In an optional embodiment, the topology change message is an R-APS message, which includes a topology change TLV field, which is used to carry traceability information.

[0180] In optional embodiments, the topology change message includes any one of the following: SF message; NRRB message; FS message; MS message; EVENT message.

[0181] In summary, the technical solution provided in this application, by carrying source information in the topology change message announcing a change in the ERPS network topology, enables network devices in the ERPS network to determine the source of the topology change based on the source information carried in the received topology change message, thus achieving source tracing of the topology change. Since network devices can directly determine the source of the topology change based on the source information carried in the topology change message, the determination of the topology change source is fast and efficient, enabling rapid source tracing of the topology change.

[0182] It should be understood that the topology change source determination device provided in the embodiments of this application can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The topology change source determination method provided in the above method embodiments can also be implemented in software. When the topology change source determination method provided in the above method embodiments is implemented in software, each module in the topology change source determination device can also be a software module.

[0183] This application provides an apparatus for determining a topology change source. The apparatus includes a main control board and an interface board, which implement all or part of the steps of the method for determining a topology change source as provided in the above-described method embodiments. The apparatus can be a network device or a functional component within a network device. The network device can be any of the network devices shown in the application scenario of Figure 1.

[0184] As an example, please refer to Figure 8, which shows a schematic diagram of a topology change source determination device 800 provided in an embodiment of this application. The determination device 800 can be a network device or a functional component of a network device. The network device can be the first network device in the foregoing embodiments. The first network device can be any network device in the application scenario shown in Figure 1. For example, the first network device is any of the network devices 103 to 107 in the application scenario shown in Figure 1. The determination device 800 can be used to perform all or part of the steps of the method for determining the topology change source provided in the above-described method embodiments (e.g., the method embodiment shown in Figure 4). As shown in Figure 8, the determination device 800 includes: a main control board 810, an interface board 830, and an interface board 840. In the case of multiple interface boards, it also includes a switching network board (not shown in Figure 8), which is used to complete data exchange between the interface boards (interface boards are also called line cards or service boards).

[0185] The main control board 810 is used to perform functions such as system management, equipment maintenance, and protocol processing. Interface boards 830 and 840 provide various service interfaces and implement message forwarding; these service interfaces include POS interfaces, Gigabit Ethernet (GE) interfaces, and Asynchronous Transfer Mode (ATM) interfaces. The main control board 810 mainly has three types of functional units: a system management control unit, a system clock unit, and a system maintenance unit. The main control board 810, interface boards 830, and interface boards 840 communicate with each other via a system bus connected to the system backplane. Interface board 830 includes one or more processors 831. Processors 831 control and manage interface board 830 and communicate with the central processing unit 812 on the main control board 810. The memory 832 on interface board 830 stores various possible information required to execute the method for determining the source of topology changes, such as storing routing tables and tracing information. Interface board 830 includes one or more network interfaces 833 for receiving and sending messages. The specific implementation details are not elaborated here. The main control board 810 also includes a memory 814, which is used to store system management information, protocols, etc., and this embodiment does not limit the scope of the application.

[0186] As shown in Figure 8, this embodiment includes multiple interface boards and employs a distributed forwarding mechanism. Under this mechanism, the operation on interface board 840 is basically similar to that on interface board 830. For example, interface board 840 includes one or more network interfaces 843 for receiving and sending messages, interface board 840 includes a memory 842 for storing various possible information required to perform the above-described method for determining the source of topology change, and interface board 840 includes a processor 841 for controlling and managing interface board 840 and communicating with the central processing unit 812 on the main control board 810. For simplicity, interface board 840 will not be described in detail here.

[0187] The processor 831 in interface board 830 and / or the processor 841 in interface board 840 in Figure 8 can be dedicated hardware or chips, such as a network processor (NP) or application-specific integrated circuit (ASIC), to implement the above functions. This implementation method is commonly referred to as using dedicated hardware or chips for the forwarding plane. In another embodiment, the processor 831 in interface board 830 and / or the processor 841 in interface board 840 can also be a general-purpose processor, such as a central processing unit (CPU).

[0188] It should be noted that there may be one or more main control boards, including a primary and a backup main control board. Similarly, there may be one or more interface boards; the more powerful the network device's data processing capabilities, the more interface boards it provides. With multiple interface boards, they can communicate through one or more switching network boards, enabling load sharing and redundancy. In a centralized forwarding architecture, network devices may not require a switching network board; the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, network devices include multiple interface boards, which can exchange data through a switching network board, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of distributed architecture network devices are greater than those of centralized architecture network devices. The specific architecture adopted depends on the network deployment scenario and is not limited here.

[0189] In optional embodiments, memory 832 and / or memory 842 may be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions. It may also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 832 may exist independently and be connected to processor 831 via a communication bus, or memory 832 may be integrated with processor 831. Memory 842 may exist independently and be connected to processor 841 via a communication bus, or memory 842 may be integrated with processor 841.

[0190] Memory 832 is used to store program code, which is executed under the control of processor 831 to implement some or all of the steps of the method for determining the topology change source provided in the above embodiments. Processor 831 is used to execute the program code stored in memory 832. The program code may include one or more software modules. These one or more software modules include the processing module provided in the embodiment shown in FIG. 7. Memory 842 may also be used to store program code, which is executed under the control of processor 841 to perform some or all of the steps of the method for determining the topology change source provided in the above embodiments. Similarly, memory 814 may also be used to store program code, which is executed under the control of central processing unit 812 to perform some or all of the steps of the method for determining the topology change source provided in the above embodiments.

[0191] In optional implementations, network interfaces 833 and 843 can be any transceiver-like device used to communicate with other devices or communication networks. For example, the communication network can be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. Network interfaces can also be referred to as ports or network ports, etc. For example, a network interface can be the port described in the above method embodiments, and this application does not limit this.

[0192] This application provides an apparatus for determining a source of topology change, comprising a memory and a processor. The memory stores a computer program. The processor executes the computer program stored in the memory, causing the apparatus to perform all or part of the steps of the method for determining a source of topology change as provided in the above-described method embodiments (e.g., the method embodiment shown in FIG. 4). The apparatus may be a network device or a functional component within a network device. The network device may be any of the network devices in the application scenario shown in FIG. 1.

[0193] As an example, please refer to Figure 9, which shows a schematic diagram of a topology change source determination device 900 provided in an embodiment of this application. The determination device 900 can be a network device or a functional component of a network device. The network device can be the first network device in the foregoing embodiments. The first network device can be any network device in the application scenario shown in Figure 1. For example, the first network device is any of the network devices 103 to 107 in the application scenario shown in Figure 1. The determination device 900 can be used to perform all or part of the steps of the topology change source determination method provided in the above method embodiments (e.g., the method embodiment shown in Figure 4). Referring to Figure 9, the determination device 900 includes a processor 902, a memory 904, a communication interface 906, and a bus 908. The processor 902, memory 904, and communication interface 906 are communicatively connected through the bus 908. The connection method between the processor 902, memory 904, and communication interface 906 shown in Figure 9 is only an example. The processor 902, memory 904, and communication interface 906 can also be connected in a way other than the bus 908.

[0194] The memory 904 stores the computer program 9042, which may include instructions and data. The memory 904 can be various types of storage media, such as RAM, ROM, non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical storage, and registers.

[0195] The processor 902 can be a general-purpose processor, which can be a processor that performs specific steps and / or operations by reading and executing a computer program (e.g., computer program 9042) stored in a memory (e.g., memory 904). The general-purpose processor may use data stored in the memory (e.g., memory 904) during the execution of the aforementioned steps and / or operations. The stored computer program can be executed, for example, to implement the relevant functions of the aforementioned processing module 720. The general-purpose processor can be a CPU. The processor 902 can also be a dedicated processor, which is a processor specifically designed to perform specific steps and / or operations. A dedicated processor can be a digital signal processor (DSP), NP, ASIC, or FPGA, etc. The processor 902 can also be a combination of multiple processors, such as a multi-core processor. The processor 902 includes at least one circuit to perform all or part of the steps of the method for determining the topology change source in the above embodiments.

[0196] The communication interface 906 may include input / output (I / O) interfaces, physical interfaces, and logical interfaces for interconnecting devices within the determining device 900, as well as interfaces for interconnecting the determining device 900 with other devices (e.g., network devices). The physical interface may be a gigabit Ethernet (GE) interface, used for interconnecting the determining device 900 with other devices. The logical interface is an internal interface of the determining device 900, used for interconnecting devices within the determining device 900. It is readily understood that the communication interface 906 can be used for communication between the determining device 900 and other devices. For example, the communication interface 906 is used for sending and receiving messages between the determining device 900 and other devices. The communication interface 906 can implement the related functions of the aforementioned receiving module 710 and sending module 730. The communication interface can also be referred to as a port or communication port; for example, the physical interface is the port described in the foregoing embodiments.

[0197] Bus 908 can be of any type, used to interconnect processor 902, memory 904, and communication interface 906. For example, bus 908 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. Bus 908 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in Figure 9, but this does not mean that there is only one bus or one type of bus.

[0198] The devices in the determining device 900 can be disposed on separate chips, or at least partially or entirely on the same chip. Whether to dispose of the devices independently on different chips or integrate them on one or more chips often depends on the needs of the product design. This application does not limit the specific implementation of the devices described above.

[0199] The determining device 900 shown in Figure 9 is merely exemplary. In implementation, the determining device 900 may also include other components, which will not be listed here. The determining device 900 shown in Figure 9 determines the topology change source in the ERPS network by executing all or part of the steps of the method for determining the topology change source provided in the above embodiments, so as to achieve the tracing of the topology change source.

[0200] Based on the same inventive concept, embodiments of this application provide a communication system, which includes a first network device in an ERPS network and a second network device in the ERPS network. The first network device includes a topology change source determination device as shown in Figures 7 to 9.

[0201] In one embodiment, the ERPS network includes a first ERPS ring and a second ERPS ring, with a second network device located on both the first and second ERPS rings, and a first network device located on the second ERPS ring. The first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer; or, the first ERPS ring is deployed at the aggregation layer, and the second ERPS ring is deployed at the core layer. For example, the communication system is shown in Figure 1. The first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 105 or network device 106, and the first network device is network device 107.

[0202] In another embodiment, the ERPS network includes a first ERPS ring and a second ERPS ring, with a second network device located on the first ERPS ring and a first network device located on both the first and second ERPS rings. The first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer; or, the first ERPS ring is deployed at the aggregation layer, and the second ERPS ring is deployed at the core layer. For example, the first ERPS ring is ERPS ring 1, the second ERPS ring is ERPS ring 2, the second network device is network device 101 or network device 102, and the first network device is network device 103 or network device 104. Alternatively, the first ERPS ring is ERPS ring 2, the second ERPS ring is ERPS ring 3, the second network device is network device 103 or network device 104, and the first network device is network device 105 or network device 106.

[0203] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed (e.g., by a network device, a determining device, one or more processors, etc.), implements all or part of the steps of the method for determining the source of topology change provided in the above-described method embodiments (e.g., the method embodiment shown in FIG4).

[0204] Based on the same inventive concept, embodiments of this application provide a computer program product, which includes a program or code. When the program or code is executed (e.g., executed by a network device, a determining device, one or more processors, etc.), it implements all or part of the steps of the method for determining the source of topology change provided in the above-described method embodiments (e.g., the method embodiment shown in FIG4).

[0205] Based on the same inventive concept, embodiments of this application provide a chip including programmable logic circuitry and / or program instructions. When the chip operates, it implements all or part of the steps of the method for determining the source of topological change as provided in the above-described method embodiments (e.g., the method embodiment shown in FIG. 4). Optionally, the chip is a processor chip, specifically an NP chip.

[0206] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented entirely or partially as a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., solid-state drive), etc.

[0207] It should be understood that the term "at least one" in this application refers to one or more, and "multiple" refers to two or more. In this application, unless otherwise stated, the symbol " / " generally means "or," for example, A / B can mean A or B. The term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, for clarity, this application uses terms such as "first," "second," and "third" to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," and "third" do not limit the quantity or order of execution.

[0208] The different types of embodiments, such as the method embodiments and device embodiments provided in this application, can be referenced to each other. The order of operations in the method embodiments can be adjusted appropriately, and operations can be added or removed as appropriate. Any variations that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application, and therefore will not be elaborated further.

[0209] In the corresponding embodiments provided in this application, it should be understood that the disclosed devices, etc., can be implemented through other configurations. For example, the device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed between devices or modules may be through some interfaces, or indirect coupling or communication connection between devices or modules, which may be electrical or other forms. Modules described as separate components may or may not be physically separate, and components described as modules may or may not be physical modules; they may be located in one place or distributed across multiple network nodes. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0210] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any equivalent modifications or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for determining a source of topological change, characterized in that, The method includes: The first network device in the Ethernet ring protection switching ERPS network receives a topology change message sent by the second network device in the ERPS network. The topology change message carries source information, which is used to determine the source of the topology change in the ERPS network. The first network device determines the source of topology change in the ERPS network based on the source tracing information.

2. The method according to claim 1, characterized in that, The ERPS network includes a first ERPS ring and a second ERPS ring; the second network device is located in the first ERPS ring and the second ERPS ring, and the first network device is located in the second ERPS ring; or, the second network device is located in the first ERPS ring, and the first network device is located in the first ERPS ring and the second ERPS ring.

3. The method according to claim 2, characterized in that, The first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer; or, the first ERPS ring is deployed at the aggregation layer, and the second ERPS ring is deployed at the core layer.

4. The method according to claim 3, characterized in that, The first ERPS ring is deployed at the access layer, the second ERPS ring is deployed at the aggregation layer, the ERPS network further includes a third ERPS ring deployed at the core layer, the second network device is located at the first ERPS ring and the second ERPS ring, and the first network device is located at the second ERPS ring and the third ERPS ring. The method further includes: The first network device sends the traceability information to the third ERPS ring.

5. The method according to claim 3, characterized in that, The second network device is located in the first ERPS ring, and the first network device is located in both the first ERPS ring and the second ERPS ring. The method further includes: The first network device sends the traceability information to the second ERPS ring.

6. The method according to any one of claims 1 to 5, characterized in that, The traceability information includes one or more of the following: The identifier of the port corresponding to the topology change source; The identifier of the network device corresponding to the source of the topology change; The identifier of the ERPS ring where the topology change source is located; The VLAN identifier of the control virtual local area network of the ERPS ring where the topology change source is located.

7. The method according to claim 6, characterized in that, The ERPS network includes a first ERPS ring, which is deployed at the access layer or aggregation layer, and the second network device is located on the first ERPS ring. The traceability information includes the identifier of the second network device and the identifier of the first ERPS ring; or, The traceability information includes the identifier of the third network device located in the first ERPS ring and the identifier of the first ERPS ring.

8. The method according to any one of claims 1 to 7, characterized in that, The topology change message is a Ring Automatic Protection Switching (R-APS) message, which includes a Topology Change Type Length Value (TLV) field. The TLV field is used to carry the tracing information.

9. The method according to claim 8, characterized in that, The topology change message includes any of the following: signal failure (SF) message; fault-free and ring-protected link blockage (NRRB) message; forced handover (FS) message; manual handover (MS) message; event message.

10. A device for determining a source of topological change, characterized in that, A first network device applied in an Ethernet ring protection switching ERPS network, the determining device comprising: The receiving module is configured to receive a topology change message sent by a second network device in the ERPS network. The topology change message carries source information, which is used to determine the source of the topology change in the ERPS network. The processing module is used to determine the source of topology change in the ERPS network based on the source tracing information.

11. The determining device according to claim 10, characterized in that, The ERPS network includes a first ERPS ring and a second ERPS ring; the second network device is located in the first ERPS ring and the second ERPS ring, and the first network device is located in the second ERPS ring; or, the second network device is located in the first ERPS ring, and the first network device is located in the first ERPS ring and the second ERPS ring.

12. The determining device according to claim 11, characterized in that, The first ERPS ring is deployed at the access layer, and the second ERPS ring is deployed at the aggregation layer; or, the first ERPS ring is deployed at the aggregation layer, and the second ERPS ring is deployed at the core layer.

13. The determining device according to claim 12, characterized in that, The first ERPS ring is deployed at the access layer, the second ERPS ring is deployed at the aggregation layer, and the ERPS network also includes a third ERPS ring deployed at the core layer. The second network device is located in both the first and second ERPS rings, and the first network device is located in both the second and third ERPS rings. The determining device further includes a sending module, used to send the traceability information to the third ERPS ring.

14. The determining device according to claim 12, characterized in that, The second network device is located in the first ERPS ring, and the first network device is located in both the first ERPS ring and the second ERPS ring. The determining device further includes a sending module, used to send the traceability information to the second ERPS ring.

15. The determining device according to any one of claims 10 to 14, characterized in that, The traceability information includes one or more of the following: The identifier of the port corresponding to the topology change source; The identifier of the network device corresponding to the source of the topology change; The identifier of the ERPS ring where the topology change source is located; The VLAN identifier of the control virtual local area network of the ERPS ring where the topology change source is located.

16. The determining device according to claim 15, characterized in that, The ERPS network includes a first ERPS ring, which is deployed at the access layer or aggregation layer, and the second network device is located on the first ERPS ring. The traceability information includes the identifier of the second network device and the identifier of the first ERPS ring; or, The traceability information includes the identifier of the third network device located in the first ERPS ring and the identifier of the first ERPS ring.

17. The determining device according to any one of claims 10 to 16, characterized in that, The topology change message is a Ring Automatic Protection Switching (R-APS) message, which includes a Topology Change Type Length Value (TLV) field. The TLV field is used to carry the tracing information.

18. The determining device according to claim 17, characterized in that, The topology change message includes any of the following: signal failure (SF) message; fault-free and ring-protected link blockage (NRRB) message; forced handover (FS) message; manual handover (MS) message; event message.