VPLS implementation
Creating a PW
PEs use PWs to forward packets among VPN sites. PWs include static PWs, LDP PWs, BGP PWs, and BGP auto-discovery LDP PWs.
Static PW
To create a static PW, specify the address of the remote PE, the incoming label, and the outgoing label.
LDP PW
To create an LDP PW, specify the address of the remote PE, and use LDP to advertise the PW-label binding to the remote PE. After the two PEs receive the PW-label binding from each other, they establish an LDP PW. The FEC type in the LDP message is PWid FEC Element that includes the PW ID field (FEC 128). The PW ID identifies the PW bound to the PW label.
BGP PW
To create a BGP PW, BGP advertises label block information to the remote PE. After the two PEs receive label block information from each other, they use the label block information to calculate the incoming and outgoing labels and create the BGP PW. A PE also uses the received label block information to automatically find the remote PE.
BGP auto-discovery LDP PW
To create a BGP auto-discovery LDP PW, a PE uses BGP to automatically find the remote PE, and uses LDP to advertise the PW-label binding to the remote PE. After the two PEs receive the PW-label binding from each other, they establish a BGP auto-discovery LDP PW.
The information advertised by BGP includes the ID (for example, LSR ID) and VPLS ID of the advertising PE. The receiving PE compares the received VPLS ID with its own VPLS ID. If the two VPLS IDs are identical, the two PEs use LDP to establish a PW. If not, the PEs do not establish a PW. The FEC type in the LDP message is Generalized PWid FEC Element (FEC 129), which contains the VPLS ID, Source Attachment Individual Identifier (SAII), and Target Attachment Individual Identifier (TAII). The SAII is the LSR ID of the advertising PE. The TAII identifies the remote PE and is advertised by the remote PE. VPLS ID+SAII+TAII uniquely identifies a PW in a VPLS instance.
MAC address learning, aging, and withdrawal
VPLS provides reachability through source MAC learning. A PE maintains a MAC address table for each VSI.
As shown in Figure 80, a PE learns source MAC addresses in the following ways:
Learning the source MAC addresses of directly connected sites:
If the source MAC address of a packet from a CE does not exist in the MAC address table, the PE learns the source MAC address on the AC connected to the CE.
Learning the source MAC addresses of remote sites connected through PWs:
A VSI regards a PW as a logical Ethernet interface. If the source MAC address of a packet received from a PW does not exist in the MAC address table, the PE learns the source MAC address on the PW of the VSI.
Figure 80: Source MAC address learning on a PE
If no packet is received from a MAC address before the aging timer expires, VPLS deletes the MAC address to save MAC address table resources.
When an AC or a PW goes down, the PE deletes MAC addresses on the AC or PW and sends an LDP address withdrawal message to notify all other PEs in the VPLS instance to delete those MAC addresses.
Traffic forwarding and flooding
Unicast traffic forwarding and flooding:
After a PE receives a unicast packet from an AC, the PE searches the MAC address table of the VSI bound to the AC to determine how to forward this packet.
If a match is found, the PE forwards the packet according to the matching entry. If the outgoing interface in the entry is a PW, the PE inserts the PW label to the packet, adds the public tunnel header to the packet, and then forwards the packet to the remote PE over the PW. If the outgoing interface in the entry is a local interface, the PE directly forwards the packet to the local interface.
If no match is found, the PE floods the packet to all other ACs and PWs in the VSI.
After a PE receives a unicast packet from a PW, the PE searches the MAC address table of the VSI bound to the PW to determine how to forward this packet.
If a match is found, the PE forwards the packet through the egress interface in the matching entry.
If no match is found, the PE floods the packet to all ACs in the VSI.
Multicast and broadcast traffic forwarding and flooding:
After a PE receives a multicast or broadcast packet from an AC, the PE floods the packet to all other ACs and the PWs in the VSI bound to the AC.
After a PE receives a multicast or broadcast packet from a PW, the PE floods the packet to all ACs in the VSI bound to the PW.
PW full mesh and split horizon
A loop prevention protocol such as STP is required in a Layer 2 network to avoid loops. However, deploying a loop prevention protocol on PEs brings management and maintenance difficulties. Therefore, VPLS uses the following methods to prevent loops:
Full mesh—Every two PEs in a VPLS instance must establish a PW to create a full mesh of PWs among PEs in the VPLS instance.
Split horizon—A PE does not forward packets received from a PW to any other PW in the same VSI but only forwards those packets to ACs.