The MPLS Topology Server maps the Forwarders, ForwarderEndpoints, and PseudoWires of an L2VPN to the appropriate LSPs, and then creates a LayeredOver relationship from the Forwarders, ForwarderEndpoints, and PseudoWires to the LSPs.
A ForwarderEndpoint and a peer ForwarderEndpoint are layered over an LSP if:
The PE device that is hosted by the ForwarderEndpoint is the source device for the LSP.
The PE device that is hosted by the peer ForwarderEndpoint is the destination device for the LSP.
If multiple LSPs exist between the two PEs, the ForwarderEndpoint and the peer are layered over the first found LSP that matches the criteria. This algorithm results in the layering of both the ForwarderEndpoint and the peer over a pair of LSPs, where the one LSP is incoming and the other is outgoing.
The PseudoWire that is terminated by the ForwarderEndpoint and its peer, in addition to the Forwarders to which the ForwarderEndpoint and its peer belong, are also layered over the pair of LSPs.
To compute Forwarder, ForwarderEndpoint, and PseudoWire LayeredOver relationships to LSPs, the MPLS Topology Server:
Traverses ForwarderEndpoint Peer, HostedBy, Terminates, and PartOf (inverse of ComposedOf) relationships.
Traverses LSP Source relationships.
Compares LSP identifiers (LSP IDs) with PE addresses.