MPLS · Topic 5 of 7

BGP Based VPLS

Learn how BGP based VPLS finds peers and signals pseudowires automatically using route distinguishers, route targets and site IDs, versus LDP based VPLS.

  • 4 min
In a nutshell
  • BGP based VPLS discovers peers automatically, so no per peer VPLS interface is needed.
  • BGP carries the information in the L2VPN address family.
  • The peer needs address-families=l2vpn on RouterOS v6.

What it is

BGP based VPLS uses BGP to discover the other routers in a VPLS service and to exchange the labels for the tunnels.

In LDP based VPLS, you create one VPLS interface for every remote peer. With many sites, that is a lot of manual work, and every new site means touching every existing router.

With BGP based VPLS, each router announces its membership once. The others learn it, and the pseudowires appear automatically.

PE1site 1BGP update, route target 65000:100Route reflectorreflects to membersBGP updatePE2site 2PE1site 1pseudowire built automaticallyPE2site 2

How it works

BGP carries the VPLS information in a special address family, and route targets decide who joins the service.

What BGP carries

The BGP sessions between the PE routers exchange VPLS information in the L2VPN address family. Each update includes the router and its site, plus the label block that other sites should use to reach it.

The sessions are iBGP sessions between PE loopbacks. In a larger network, a route reflector is used to avoid the full iBGP mesh, so the discovery scales.

BGP is used only for discovery and label exchange. The packets still cross the core inside MPLS, so the transport labels from LDP are still needed.

The identifiers

ItemPurpose
Route distinguisherMakes the announcement unique, so that services do not clash
Route targetTag that says which service the announcement belongs to
Site IDA number that is unique for each PE in the service

Routers import the announcements whose route target matches an import rule, and they add their own export route target on what they send. All members of one VPLS use the same route target. The site ID must be different on every PE.

RouterOS configuration

On RouterOS v6 a BGP peer must carry the L2VPN address family, and a BGP VPLS entry ties the service to a bridge.

/routing bgp peer add name=pe2 remote-address=10.255.255.2 remote-as=65000 update-source=lo address-families=l2vpn
/interface bridge add name=br-cust
/interface vpls bgp-vpls add bridge=br-cust bridge-horizon=1 route-distinguisher=65000:100 site-id=1 import-route-targets=65000:100 export-route-targets=65000:100
/interface bridge port add bridge=br-cust interface=ether3
  • address-families=l2vpn lets the peer carry VPLS information.
  • bridge is the bridge that joins the pseudowires and the customer port.
  • bridge-horizon sets the split horizon value on the pseudowires that BGP creates.
  • site-id must be unique for each router in the service.
  • import-route-targets and export-route-targets decide who joins.

RouterOS v7 uses a different BGP configuration, and the address family is a setting on the BGP connection. The ideas about route targets and site IDs stay the same.

How the pieces fit

The pseudowires created by BGP appear as dynamic VPLS interfaces. You do not configure them one by one. The bridge horizon prevents loops between them, as in the LDP version.

PE1site ID 1iBGP, L2VPN familyPE2site ID 2iBGP, L2VPN familyPE3site ID 3PE1site ID 1dynamic pseudowiresPE3site ID 3

Comparing the two methods

PointLDP based VPLSBGP based VPLS
Peer discoveryManual, one entry per peerAutomatic through BGP
SignallingLDP between each pairBGP with a label block
Adding a siteEdit every routerConfigure the new router only
Scaling aidNoneRoute reflector
Exam tip

The checklist is the same for any BGP VPLS fault. Check the L2VPN family on the peer, then the route targets, then the site IDs, then the bridge.

What to remember for the exam

Seven facts cover most questions here.

  • BGP based VPLS discovers peers automatically, so no per peer VPLS interface is needed.
  • BGP carries the information in the L2VPN address family.
  • The peer needs address-families=l2vpn on RouterOS v6.
  • Route targets decide which routers belong to the same service.
  • Every PE needs a unique site ID.
  • The pseudowires are created dynamically and still need MPLS transport.
  • Route reflectors can be used to avoid a full iBGP mesh.
Watch out

Two PE routers with the same site ID in one service will disturb the pseudowires between them.

Common mistakes

These four errors are common.

Forgetting the address family. The BGP session is up, but no VPLS information is exchanged.

Using the same site ID twice. Each PE must be unique in the service.

Mismatched route targets. The announcements are ignored, so the sites never join.

Assuming BGP replaces LDP. BGP discovers peers, while the core still needs MPLS transport labels.

Check yourself

Work through these three questions.

  • What advantage does BGP based VPLS have over LDP based VPLS?

    Peers are discovered automatically, so a new site needs configuration only on the new router. No VPLS interface is needed for each peer.

  • Which setting lets a RouterOS v6 BGP peer carry VPLS information?

    address-families=l2vpn on the peer.

  • What must be unique for each PE in a BGP VPLS service?

    The site ID must be different on every PE in the service.

Topic 5 of 7 in MPLS

Test yourself on MPLS

The full MikroTik MTCINE question bank has 475 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by MikroTik. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.