CFM supports continuity check (CC), loopback (LB), and linktrace (LT) functions.
CC monitors the connectivity of links between MEPs. A MEP periodically sends multicast continuity check messages (CCMs) to an RMEP in the same MA. If an RMEP does not receive a CCM within a period 3.5 times the interval at which CCMs are sent, the RMEP considers the path between itself and the MEP faulty.
CCM generation
A MEP generates and sends CCMs. MEP1, MEP2, and MEP3 are in the same MA on the network shown in Figure 1 and are enabled to send CCMs to one another at the same interval.
Each CCM carries a level equal to the MEP level.
MEP database establishment
Every Ethernet CFM-enabled device has a MEP database. A MEP database records information about the local MEP and RMEPs in the same MA. The local MEP and RMEPs are manually configured, and their information is automatically recorded in the MEP database.
Fault identification
If a MEP does not receive CCMs from its RMEP within a period 3.5 times the interval at which CCMs are sent, the MEP considers the path between itself and the RMEP faulty. A log is generated to provide information for fault diagnosis. A user can implement loopback or linktrace to locate the fault. MEPs in an MA exchange CCMs to monitor links, implementing multipoint to multipoint (MP2MP) detection.
CCM processing
If a MEP receives a CCM carrying a level higher than the local level, it forwards this CCM. If a MEP receives a CCM carrying a level lower than the local level, it does not forward this CCM. This process prevents a lower level CCM from being sent to a higher level MD.
Loopback is also called 802.1ag MAC ping. Similar to IP ping, loopback monitors the connectivity of a path between a local MEP and an RMEP.
A MEP initiates an 802.1ag MAC ping test to monitor the reachability of an RMEP or MIP destination address. The MEP, MIP, and RMEP have the same level and they can share an MA or be in different MAs. The MEP sends Loopback messages (LBMs) to the RMEP or MIP. After receiving the messages, the RMEP or MIP replies with loopback replies (LBRs). Loopback helps locate a faulty node because a faulty node cannot send an LBR in response to an LBM. LBMs and LBRs are unicast packets.
The following example illustrates the implementation of loopback on the network shown in Figure 2.
CFM is configured to monitor a path between PE1 (MEP1) and PE4 (MEP2). The MD level of these MEPs is 6. A MIP with a level of 6 is configured on PE2 and PE3. If a fault is detected in a link between PE1 and PE4, loopback can be used to locate the fault. Figure 3 illustrates the loopback process.
MEP1 can measure the network delay based on 802.1ag MAC ping results or the frame loss ratio based on the difference between the number of LBMs and the number of LBRs.
Linktrace is also called 802.1ag MAC trace. Similar to IP traceroute, linktrace identifies a path between two MEPs.
A MEP initiates an 802.1ag MAC trace test to monitor a path to an RMEP or MIP destination address. The MEP, MIP, and RMEP have the same level and they can share an MA or be in different MAs. A source MEP constructs and sends a Linktrace message (LTM) to a destination MEP. After receiving this message, each MIP forwards it and replies with a linktrace reply (LTR). Upon receipt, the destination MEP replies with an LTR and does not forward the LTM. The source MEP obtains topology information about each hop on the path based on the LTRs. LTMs are multicast packets and LTRs are unicast packets.
The following example illustrates the implementation of linktrace on the network shown in Figure 4.
MEP1 sends MEP2 an LTM carrying a time to live (TTL) value and the MAC address of the destination MEP2.
After the LTM arrives at MIP1, MIP1 reduces the TTL value in the LTM by 1 and forwards the LTM if the TTL is not zero. MIP1 then replies with an LTR to MEP1. The LTR carries forwarding information and the TTL value carried by the LTM when MIP1 received it.
After the LTM reaches MIP2 and MEP2, the process described above for MIP1 is repeated for MIP2 and MEP2. In addition, MEP2 determines that its MAC address is the destination address carried in the LTM and therefore does not forward the LTM.
The LTRs from MIP1, MIP2, and MEP2 provide MEP1 with information about the forwarding path between MEP1 and MEP2.
If a fault occurs on the path between MEP1 and MEP2, MEP2 or a MIP cannot receive the LTM or reply with an LTR. MEP1 can locate the faulty node based on such a response failure. For example, if the link between MEP1 and MIP2 works properly but the link between MIP2 and MEP2 fails, MEP1 can receive LTRs from MIP1 and MIP2 but fails to receive a reply from MEP2. MEP1 then considers the path between MIP2 and MEP2 faulty.