Background
EAPS (Ethernet Automatic Protection Switching) is an Ethernet Automatic Protection Switching scheme with a large impact released by IEEE in 2003, but the Protection domain of EAPS is limited to the scope of a ring network. The working principle of the technology is as follows: the EAPS ring consists of a main node and a plurality of transmission nodes; as shown in fig. 1: the ring network control is mainly completed by a main node, and the main node is an initiator of ring network state polling and also a decision maker for executing operation after the network topology state is changed; the transmission node is responsible for monitoring the state change of a link directly connected with the transmission node, and if a fault occurs, the state change is reported to the main node.
As shown in fig. 1, a typical EAPS ring is equivalent to a physical ring topology for the working principle of EAPS. The switch nodes R1 ', R2', R3 'and R4' form an ethernet ring network, wherein R1 'is a master node, the rest nodes are transmission nodes, the M interface of R1' is a master interface, and the S interface is a secondary interface. In Complete state, the master node R1' logically opens the master interface M, blocks the slave interface S, and does not allow the slave interface S to forward messages, thereby ensuring logical link failure in the ring network and avoiding service loops. When the link fails, the S interface of R1' is released, informing other nodes to update the MAC address table.
However, in an actual networking, there may be a plurality of loops, the current EAPS protocol cannot handle the case where there are a plurality of physical loops, and the EAPS protocol is relatively single in use and cannot be used in an environment of a plurality of actual loops.
Disclosure of Invention
The invention provides a method for switching Ethernet multiple networks, which avoids the outgoing of multiple ring networks and improves the protection capability of the ring networks by the Ethernet ring network switching method.
In order to achieve the above object, the present invention provides a method for ethernet multi-network handover, which is characterized in that the method comprises:
a main node in an Ethernet loop is configured with a plurality of Ethernet automatic protection switching examples of the ring network;
the main node sends a detection message with an instance ID to an intermediate node at the downstream of the loop, and the intermediate node transmits the detection message according to the loop sequence;
when a certain intermediate node detects that a service link is abnormal or the link bandwidth exceeds a preset threshold value, the intermediate node reports an abnormal message to a main node or a sink node; the abnormal message comprises an instance ID and an interface with abnormality;
and the main node or the sink node performs ring network switching.
And when the master node completes the configuration of the example, the home of the node is configured at the same time.
In the attribution of the configuration node, one main interface only belongs to one example, and one standby interface belongs to one or a plurality of examples.
And the main node periodically sends a detection message.
The intermediate node periodically transmits the detection message.
The standard of the service link abnormity is link transmission failure.
And when the service link is normal or the link bandwidth is lower than a preset threshold value, the intermediate node continues to periodically transmit the detection message.
When reporting the abnormal message, every time reporting to an intermediate node, whether the intermediate node belongs to the sink node is detected, if so, ring network switching is carried out, and if not, the abnormal message is continuously reported.
The sink node belongs to the type that the input interfaces of the abnormal messages are different and the output interfaces of the abnormal messages are the same; when the sink node receives the abnormal message, the access interface is closed, the abnormal message is reported to the main node, and the main node opens the standby interface.
The sink nodes belong to the types that the input interfaces of the abnormal messages are the same and the output interfaces are different; when the sink node receives the abnormal message, the sink node continues to report the abnormal message to the main node;
the main node checks whether the plurality of instances multiplex the standby interface according to the instance ID; if yes, sharing a certain section of link in the middle of the loop by the multiple instances to the main node, and opening the standby interface by the main node; if not, the multiple instances have abnormity in a certain section of link shared among the loops, and the main node opens the standby interface.
Compared with the Ethernet ring network control in the prior art, the Ethernet multi-network switching method has the advantages that the Ethernet ring network switching method is adopted based on the example concept of Ethernet automatic protection switching, and under the condition that two ring networks or even multiple ring networks appear, the Ethernet ring network switching method is adopted, the multiple ring networks are avoided, and the protection capability of the ring networks is improved.
Detailed Description
The following further describes specific embodiments of the present invention with reference to the drawings.
As shown in fig. 2, the ethernet ring network may have a plurality of physical loops, which are respectively: a first loop circuit: node R1 to node R2 to node R3 to node R4; a second loop circuit: node R1 to node R2 to node R3 to node R1. Each node is a router in the ring network. Current EAPS cannot do loop protection when the actual situation exists with a topology as shown in fig. 2.
In order to realize the loop protection of the topology of fig. 2, the invention discloses a method for switching multiple networks of an ethernet network, which comprises the following steps:
first, an example concept based on EAPS is proposed, each interface of each node can belong to multiple examples, but if the interface is used as a master interface of a master node, the interface can only belong to one example. Any node will carry instance ID when sending detection message, and when detecting fault, the sent fault message also carries instance ID.
EAPS instance ID of the first loop (R1-R2-R3-R1) is 1; example ID of the second loop (R1-R2-R3-R4-R1) is 2; when the interface S5 on the node R3 is assumed to have a fault, the node R3 sends a fault message to the node R1, carrying the instance ID2 to the node R1. Node R1 opens alternate interface S2 according to the instance ID, keeping the link clear, and may reach node R4.
Fig. 3 shows an embodiment of a method for ethernet multi-network switching suitable for multiple physical loops shown in fig. 2, the method comprising the following steps:
step 1, under the condition that a plurality of ring networks (two ring networks) exist, a user can configure EAPS instances of the plurality of ring networks by a master node. And when the master node completes the configuration of the instance, the home of the node is configured at the same time. In the attribution of the configuration node, one main interface only belongs to one example, and one standby interface belongs to one or a plurality of examples.
And step 2, the main node periodically sends a detection message with the instance ID to an intermediate node at the downstream of the loop. And the intermediate node periodically transmits the detection message according to the loop sequence.
Step 3, judging whether a certain intermediate node detection message finds that a service link is abnormal or the link bandwidth exceeds a preset link bandwidth use threshold, if so, reporting the abnormal message to a main node or a sink node by the intermediate node; the abnormal message contains the instance ID and the interface with the abnormality, and the step 4 is skipped; if not, the service link is normal or the link bandwidth is lower than the preset threshold, the step 2 is skipped, and the intermediate node continues to periodically transmit the detection message.
The standard of the service link abnormity is that the link sends a fault.
And 4, performing ring network switching by the main node or the sink node (namely the sink point of the plurality of interfaces).
And 4.1, when reporting the abnormal message, detecting whether the intermediate node belongs to the sink node or not every time when reporting the abnormal message to the intermediate node, if so, performing ring network switching, skipping to the step 4.2, if not, continuing to report the abnormal message, and skipping back to the step 4.1 to continuously detect whether the intermediate node belongs to the sink node or not.
Step 4.2, the sink nodes are classified into A, B types: the type A is the type that the input interfaces of the abnormal messages are different and the output interfaces are the same; the type B is the type that the input interfaces of the abnormal messages are the same and the output interfaces are different.
When the sink node receives the abnormal message, namely the switching of the ring network is performed on the sink node, the sink node closes the two different input interfaces, reports the abnormal message to the main node, and the main node opens the standby interface.
Under the condition that the sink node belongs to a B type (the two input interfaces of the abnormal message are the same, and the output interfaces of the abnormal message are different), when the sink node receives the abnormal message, the sink node continues to report the abnormal message to the main node, and the main node checks whether the two instances multiplex the standby interface or not according to the instance ID; if yes, sharing a certain section of link in the middle of the loop by the two examples to the last main node, and opening a standby interface by the main node; if not, the two instances have abnormity in a certain section of link shared by the loop, and the main node opens the standby interface.
As shown in fig. 4, the present invention also discloses an ethernet multi-network switching system, which mainly comprises: an EAPS instance configuration module, a service detection module, a link resource detection module and a link switching module.
The EAPS instance configuration module is used for distinguishing different loops; the module is mainly used for configuring EAPS instances on a main node, and when one interface is a main interface, the EAPS instances can only belong to one instance; but it may belong to multiple EAPS instances when one interface is a backup interface.
The service detection module is used for detecting whether the service is normal or not; the module is mainly used for each router node, periodically and downwards sends a message for detecting whether a service link is normal, and reports a fault message and carries an EAPS instance ID if the abnormal service is detected; and when the service is normal, continuously and periodically sending the detection message.
The link resource detection module is used for detecting the resource occupation condition of the link; the module is mainly used for periodically sending detection messages to detect whether the use condition of the link bandwidth exceeds a preset link bandwidth use threshold value.
And the link switching module is used for closing the standby port or opening the standby port according to the EAPS instance ID after receiving the fault reporting message. And when the main node receives the message with abnormal service or resource, the module performs switching operation on the standby interface according to the instance ID.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.