This post continues what was published in Synchronization of SEP Link Status Database and Display of the Topology
Only interfaces that are configured as no-neighbor edge interfaces, primary edge interfaces and secondary edge interfaces have rights to participate in the election of a primary edge interface.
If only one interface on a node is enabled with SEP, the corresponding command must be run to set the role of the interface to edge so that it can function as an edge interface.
As shown in Figure 1, if there is no faulty link on the network and SEP is enabled on interfaces, the following situations occur:
Common interfaces do not participate in the election of the primary edge interface. Only P1 on LSW1 and P1 on LSW5 participate in the election of the primary edge interface.
If P1 on LSW1 and P1 on LSW5 have the same role, the interface that has a higher MAC address is elected as the primary edge interface.
After the primary edge interface is selected, it begins sending primary edge interface-election packets periodically without waiting for the success of neighbor negotiations. A primary edge interface-election packet contains information about the interface role (primary edge interface, secondary edge interface, or common interface), bridge MAC address of the interface, interface ID, and status of the topology database.
Figure 1 Networking diagram for electing a primary edge interface

As shown in Figure 1, if a link fault occurs in the SEP segment, P1 on LSW1 and P1 on LSW5 receive fault notification packets, or P1 on LSW5 does not receive any primary edge interface-election packets before a timeout occurs, P1 on LSW1 becomes the secondary edge interface. Therefore, two secondary edge interfaces exist on the SEP segment and send edge interface-election packets periodically.
After the last link fault in the SEP segment is rectified, both secondary edge interfaces can receive edge interface-election packets from each other and a new primary edge interface is elected.