-
Notifications
You must be signed in to change notification settings - Fork 461
VPLS Overview
VPLS (Virtual Private LAN Service) is a BGP-based Layer 2 VPN technology that provides multipoint-to-multipoint Ethernet connectivity over IP/MPLS networks. Defined in RFC 4761 (BGP-based autodiscovery) and RFC 4762 (LDP signaling), VPLS enables service providers to deliver transparent LAN services across WAN infrastructure.
ExaBGP provides BGP-based VPLS support per RFC 4761, allowing applications to programmatically announce and receive VPLS routes for automated L2VPN provisioning, service provider networks, and Layer 2 data center interconnect.
- What is VPLS?
- Why Use VPLS?
- ExaBGP VPLS Capabilities
- VPLS vs EVPN
- Key Concepts
- Configuration Examples
- API Examples
- Use Cases
- Common Errors and Solutions
- Important Considerations
- See Also
- References
VPLS (Virtual Private LAN Service) is a Layer 2 VPN service that emulates a LAN across a WAN. It creates a virtual bridge that connects multiple sites, making them appear as if they're on the same local Ethernet segment, regardless of physical distance.
[VPLS Architecture]
Customer Site A Customer Site B
LAN: 10.1.0.0/24 LAN: 10.1.0.0/24
VLAN: 100 VLAN: 100
│ │
│ │
┌──▼──┐ ┌──▼──┐
│ CE │ │ CE │
└──┬──┘ └──┬──┘
│ │
┌──▼──────┐ MPLS Core Network ┌──────▼──┐
│ PE1 │◄──────────────────────────────────│ PE2 │
│ VPLS-A │ BGP Autodiscovery │ VPLS-A │
│ │ Pseudowire Mesh │ │
└─────────┘ └─────────┘
│ │
│ ┌──────────┐ │
└──────────────┤ PE3 │────────────────────┘
│ VPLS-A │
└────┬─────┘
│
┌──▼──┐
│ CE │
└─────┘
Customer Site C
LAN: 10.1.0.0/24
VLAN: 100
Process:
- VPLS Instance Creation: PE routers create VPLS instance (virtual bridge)
- BGP Autodiscovery: PEs announce VPLS membership via BGP (RFC 4761)
- Pseudowire Setup: Full mesh or hub-and-spoke pseudowires established (using LDP or BGP signaling)
- Label Block Allocation: Each PE advertises MPLS label block for incoming traffic
- MAC Learning: PEs learn MAC addresses from local CEs and remote PEs
- Forwarding: Ethernet frames encapsulated in MPLS and forwarded through pseudowires
Key Components:
- PE (Provider Edge): Router connected to customer, maintains VPLS instance
- CE (Customer Edge): Customer Ethernet switch/router, unaware of MPLS
- VPLS Instance: Virtual bridge (broadcast domain) on PE
- Pseudowire: Point-to-point tunnel between two PEs for a VPLS instance
- MP-BGP: Autodiscovery mechanism for VPLS membership (RFC 4761)
- Label Block: Range of MPLS labels for demultiplexing pseudowires
| Feature | VPLS | Traditional L2 (VPWS, L2TP) | EVPN |
|---|---|---|---|
| Topology | Multipoint-to-multipoint | Point-to-point | Multipoint-to-multipoint |
| Scalability | Moderate (hundreds of sites) | Limited (manual config) | High (thousands of sites) |
| MAC Learning | Data plane flooding | N/A | Control plane (BGP) |
| Autodiscovery | Yes (BGP-based) | No | Yes (BGP-based) |
| Provisioning | Automated (BGP) | Manual | Automated (BGP) |
| Multi-homing | Basic | No | Advanced (active-active) |
| Protocol | RFC 4761/4762 | RFC 4447, L2TP | RFC 7432 |
- Enterprise WAN: Connect multiple branch offices as single LAN
- Data Center Interconnect: Layer 2 stretch between data centers
- Service Provider L2VPN: Carrier Ethernet services (E-LAN)
- Legacy Application Support: Applications requiring Layer 2 adjacency
- Disaster Recovery: Active-standby sites with Layer 2 replication
ExaBGP provides RFC 4761 BGP-based VPLS autodiscovery implementation:
✅ VPLS NLRI (Network Layer Reachability Information):
- Route Distinguisher (RD) for uniqueness
- VPLS Endpoint ID (VE-ID)
- Label Block (base, offset, size)
- BGP-based VPLS autodiscovery
✅ Route Target Extended Communities:
- Import RT: Controls VPLS instance route import
- Export RT: Attached to VPLS routes
- Layer 2 Info extended community (encapsulation, MTU)
✅ Label Block Signaling:
- Base label (starting label in block)
- Block offset (position within block)
- Block size (number of labels)
- Automatic label allocation signaling
✅ Standard BGP Attributes:
- AS-PATH, MED, LOCAL_PREF, COMMUNITIES
- All standard attributes apply to VPLS routes
Implementation:
-
src/exabgp/bgp/message/update/nlri/vpls.py(VPLS NLRI encoding/decoding) -
src/exabgp/configuration/l2vpn/vpls.py(VPLS configuration parsing)
- RFC 4761: Virtual Private LAN Service (VPLS) Using BGP for Auto-Discovery and Signaling - Fully Implemented
- RFC 4762: Virtual Private LAN Service (VPLS) Using LDP Signaling (BGP autodiscovery portion)
- RFC 4360: BGP Extended Communities Attribute - Fully Implemented
- RFC 4664: Framework for Layer 2 Virtual Private Networks (L2VPNs) - Context
VPLS is the predecessor to EVPN. While both provide Layer 2 VPN services, EVPN offers significant improvements.
| Feature | VPLS (RFC 4761/4762) | EVPN (RFC 7432) |
|---|---|---|
| MAC Learning | Data plane (flooding) | Control plane (BGP) |
| BUM Traffic | Flooding required | Optimized (Route Type 3) |
| Multi-homing | Active-standby | Active-active (ESI) |
| Scalability | Moderate (flooding limits) | High (BGP MAC learning) |
| ARP Suppression | No | Yes (built-in) |
| Integrated L3 | No (separate protocol) | Yes (Route Type 5) |
| Use Case Focus | Service provider L2VPN | Data center fabrics, VXLAN |
| Maturity | Legacy (2007) | Modern (2015+) |
Migration Path: Many deployments are migrating from VPLS to EVPN for improved scalability and features. ExaBGP supports both for transitional architectures.
When to Use VPLS:
- Legacy networks with existing VPLS infrastructure
- Service provider Carrier Ethernet services (where EVPN not yet deployed)
- Interoperability with older PE routers lacking EVPN support
When to Use EVPN:
- New deployments (greenfield)
- Data center fabrics with VXLAN
- High-scale environments (10,000+ MACs)
- Multi-homing requirements
The Route Distinguisher makes each VPLS instance unique in the BGP routing table, allowing multiple customers to use overlapping Ethernet addresses (same MAC addresses in different VPNs).
Format: ASN:Value or IP:Value
Types:
-
Type 0:
65000:100(2-byte AS : 4-byte value) -
Type 1:
192.0.2.1:100(IPv4 address : 2-byte value) -
Type 2:
4200000000:100(4-byte AS : 2-byte value)
Purpose: Uniqueness in BGP table (does NOT control import/export - that's RT's job).
Example:
Customer A VPLS: RD 65001:100
Customer B VPLS: RD 65002:100
BGP Table:
65001:100:VPLS-Route → Customer A
65002:100:VPLS-Route → Customer B
The Route Target extended community controls which VPLS instances import which routes.
Format: target:ASN:Value
Example:
PE1 VPLS-A:
Route Distinguisher: 65001:100
Export RT: target:65001:100
Import RT: target:65001:100
PE2 VPLS-A:
Route Distinguisher: 65002:100
Export RT: target:65001:100 ← Exports with same RT
Import RT: target:65001:100 ← Imports routes with this RT
Result: PE1 and PE2 establish pseudowire for VPLS-A
The VPLS NLRI advertised via BGP contains:
- Route Distinguisher (RD): Makes route unique
- VE-ID (VPLS Edge Identifier): Endpoint identifier (0-65535)
-
Label Block:
- Base Label: Starting MPLS label value
- Offset: Position within label block
- Size: Number of labels in block
Example VPLS NLRI:
RD: 65001:100
VE-ID: 10
Base Label: 10000
Offset: 0
Size: 10
Result: PE allocates labels 10000-10009 for this VPLS instance
The Label Block is a range of MPLS labels advertised by each PE for a VPLS instance. Remote PEs use labels from this block to forward traffic to the advertising PE.
How Label Blocks Work:
PE1 advertises:
VE-ID: 10
Base: 10000, Offset: 0, Size: 10
→ Labels 10000-10009 available
PE2 advertises:
VE-ID: 20
Base: 20000, Offset: 0, Size: 10
→ Labels 20000-20009 available
PE3 advertises:
VE-ID: 30
Base: 30000, Offset: 0, Size: 10
→ Labels 30000-30009 available
Pseudowire Establishment:
PE1 → PE2: PE1 uses label 20000 (PE2's base label)
PE1 → PE3: PE1 uses label 30000 (PE3's base label)
PE2 → PE1: PE2 uses label 10000 (PE1's base label)
PE2 → PE3: PE2 uses label 30000 (PE3's base label)
PE3 → PE1: PE3 uses label 10000 (PE1's base label)
PE3 → PE2: PE3 uses label 20000 (PE2's base label)
Label Selection Formula:
Label = Base + (Remote_VE_ID - Offset) % Size
Note: The label block mechanism allows efficient full-mesh pseudowire setup without per-peer signaling.
# /etc/exabgp/vpls.conf
neighbor 192.0.2.1 {
router-id 192.0.2.2;
local-address 192.0.2.2;
local-as 65001;
peer-as 65000;
# Enable L2VPN VPLS address family
family {
l2vpn vpls;
}
# API process for dynamic VPLS announcements
api {
processes [ vpls-controller ];
}
}
process vpls-controller {
run python3 /etc/exabgp/vpls-announce.py;
encoder text;
}# /etc/exabgp/vpls-static.conf
neighbor 192.0.2.1 {
router-id 192.0.2.2;
local-address 192.0.2.2;
local-as 65001;
peer-as 65000;
family {
l2vpn vpls;
}
# Static VPLS route
l2vpn {
vpls customer-a {
endpoint 10; # VE-ID
base 10000; # Base label
offset 0; # Block offset
size 10; # Block size (10 labels)
rd 65001:100; # Route Distinguisher
next-hop 192.0.2.2; # Next-hop (this PE)
# Route Target for import/export
extended-community [ target:65001:100 ];
# Optional: Layer 2 Info
# l2info:<encapsulation>:<control>:<MTU>:<reserved>
extended-community [ l2info:19:0:1500:0 ];
}
}
}Encapsulation Types (l2info):
-
19: Ethernet (most common) -
10: Frame Relay -
11: ATM
Basic VPLS announcement:
#!/usr/bin/env python3
# /etc/exabgp/vpls-announce.py
import sys
import time
def announce_vpls(ve_id, base, offset, size, rd, rt, nexthop="self"):
"""Announce VPLS route"""
print(f"announce vpls "
f"route-distinguisher {rd} "
f"endpoint {ve_id} "
f"base {base} "
f"offset {offset} "
f"size {size} "
f"next-hop {nexthop} "
f"extended-community [ target:{rt} l2info:19:0:1500:0 ]")
sys.stdout.flush()
def withdraw_vpls(ve_id, base, offset, size, rd, rt, nexthop="self"):
"""Withdraw VPLS route"""
print(f"withdraw vpls "
f"route-distinguisher {rd} "
f"endpoint {ve_id} "
f"base {base} "
f"offset {offset} "
f"size {size} "
f"next-hop {nexthop} "
f"extended-community [ target:{rt} l2info:19:0:1500:0 ]")
sys.stdout.flush()
# Announce VPLS instance
announce_vpls(
ve_id=10, # This PE's VE-ID
base=10000, # Base label
offset=0, # Label block offset
size=10, # 10 labels (10000-10009)
rd="65001:100", # Route Distinguisher
rt="65001:100" # Route Target
)
# Keep process running
while True:
time.sleep(60)Announce VPLS route:
print("announce vpls "
"route-distinguisher 65001:100 "
"endpoint 10 "
"base 10000 "
"offset 0 "
"size 10 "
"next-hop self "
"extended-community [ target:65001:100 l2info:19:0:1500:0 ]")
sys.stdout.flush()Withdraw VPLS route:
print("withdraw vpls "
"route-distinguisher 65001:100 "
"endpoint 10 "
"base 10000 "
"offset 0 "
"size 10 "
"next-hop self "
"extended-community [ target:65001:100 l2info:19:0:1500:0 ]")
sys.stdout.flush()Received VPLS route (JSON format from ExaBGP):
{
"exabgp": "5.0",
"type": "update",
"neighbor": {
"address": {"local": "192.0.2.2", "peer": "192.0.2.1"},
"message": {
"update": {
"announce": {
"l2vpn vpls": {
"65001:100": {
"endpoint": 20,
"base": 20000,
"offset": 0,
"size": 10,
"attributes": {
"next-hop": "192.0.2.1",
"extended-community": [
"target:65001:100",
"l2info:19:0:1500:0"
]
}
}
}
}
}
}
}
}Scenario: Enterprise with 50 branch offices requiring transparent LAN connectivity (same broadcast domain).
How VPLS Helps:
- All sites appear on same Ethernet segment
- Any-to-any connectivity without complex VPN mesh
- Transparent to end devices (plug-and-play)
- Support for non-IP protocols (NetBIOS, IPX, etc.)
ExaBGP Role:
- Automate VPLS instance provisioning
- Announce VPLS routes for each PE
- Integrate with orchestration for dynamic branch addition
- Programmatic VE-ID and label block management
Example Topology:
Branch 1 ──┐
Branch 2 ──┤
Branch 3 ──┼─── [MPLS Core + ExaBGP VPLS] ─── All branches in single
Branch 4 ──┤ Layer 2 broadcast domain
Branch 5 ──┘
Scenario: Two data centers requiring Layer 2 connectivity for VM mobility and shared VLANs.
How VPLS Helps:
- Stretch VLANs across data centers
- VM migration without IP address changes
- Shared storage traffic (iSCSI, NFS)
- Disaster recovery with Layer 2 replication
ExaBGP Role:
- Announce VPLS routes for DCI links
- Health-check-based route withdrawal (failover)
- Integration with data center orchestration
- Dynamic VPLS instance creation per tenant
Scenario: Service provider offering Ethernet multipoint services to enterprise customers.
How VPLS Helps:
- Deliver multipoint Ethernet service (E-LAN)
- Each customer gets isolated VPLS instance
- SLA enforcement (bandwidth, latency)
- Scalable service provisioning
ExaBGP Role:
- Automate customer VPLS provisioning via API
- Integrate with OSS/BSS systems
- Programmatic VE-ID allocation
- Policy-based RT assignment
Scenario: Applications requiring Layer 2 adjacency (NetBIOS, legacy clustering, proprietary protocols).
How VPLS Helps:
- Maintain Layer 2 adjacency over Layer 3 WAN
- Support non-IP protocols
- Broadcast/multicast support
- Transparent to legacy applications
ExaBGP Role:
- Dynamic VPLS provisioning for legacy apps
- Integration with application lifecycle management
- Automated setup/teardown of VPLS instances
Scenario: Trading applications requiring low-latency Layer 2 connectivity between trading engines and exchanges.
How VPLS Helps:
- Direct Layer 2 connectivity (minimal latency)
- Multicast support for market data
- Deterministic forwarding
- No routing overhead
ExaBGP Role:
- Rapid VPLS failover (withdraw routes on link failure)
- Integration with market data feeds
- Monitoring and alerting via API
Cause: VE-ID (endpoint) not specified in VPLS announcement.
Solution: Always specify endpoint parameter.
# Incorrect
print("announce vpls route-distinguisher 65001:100 base 10000 offset 0 size 10")
# Correct
print("announce vpls "
"route-distinguisher 65001:100 "
"endpoint 10 " # Required
"base 10000 offset 0 size 10 "
"next-hop self")Cause: Base label not specified.
Solution: Include base, offset, and size parameters.
print("announce vpls "
"route-distinguisher 65001:100 "
"endpoint 10 "
"base 10000 " # Required
"offset 0 " # Required
"size 10 " # Required
"next-hop self")Cause: Base label + size exceeds maximum MPLS label value (2^20 - 1 = 1048575).
Solution: Use valid label ranges. Maximum label is 1048575.
# Invalid: 1048570 + 10 = 1048580 > 1048575
base 1048570
size 10
# Valid
base 10000
size 100Cause: VPLS routes must include a Route Distinguisher.
Solution: Always specify route-distinguisher.
print("announce vpls "
"route-distinguisher 65001:100 " # Required
"endpoint 10 base 10000 offset 0 size 10 "
"next-hop self")Cause: Without Route Target, VPLS routes won't be imported into VPLS instances.
Solution: Include at least one Route Target.
print("announce vpls "
"route-distinguisher 65001:100 "
"endpoint 10 base 10000 offset 0 size 10 "
"next-hop self "
"extended-community [ target:65001:100 ]") # RequiredCause: ExaBGP announces VPLS routes via BGP but does NOT establish pseudowires. The PE router must create pseudowires.
Solution: ExaBGP provides autodiscovery (BGP signaling). The PE router must:
- Have VPLS instance configured with matching RD/RT
- Establish pseudowires using signaled label blocks
- Configure LDP or BGP signaling for pseudowire setup
Remember: ExaBGP announces VPLS membership via BGP but does NOT create pseudowires or forward Ethernet frames.
Cause: Remote router doesn't have L2VPN VPLS address family configured.
Solution: Enable L2VPN VPLS on both ExaBGP and the peer router.
Cisco IOS-XR:
router bgp 65000
neighbor 192.0.2.2
address-family l2vpn vpls-vpws ← Enable L2VPN
!
!
!
Juniper Junos:
protocols {
bgp {
group exabgp {
family l2vpn { ← Enable L2VPN
signaling;
}
}
}
}
- Create VPLS instances on routers
- Establish pseudowires between PEs
- Create Ethernet bridges
- Forward Layer 2 frames
- Install VPLS routes in FIB
What ExaBGP DOES:
- ✅ Send/receive VPLS routes via BGP (RFC 4761 autodiscovery)
- ✅ Encode VPLS NLRIs with RD, VE-ID, label blocks
- ✅ Provide API for applications to control VPLS routes
- ✅ Handle BGP session management
External Infrastructure Required:
- PE Routers: Cisco, Juniper, Nokia, Arista routers with VPLS support
- MPLS Network: LDP or RSVP-TE for transport labels
- VPLS Instance Configuration: VPLS instances must be pre-configured on PE routers
- Pseudowire Signaling: LDP or BGP signaling for pseudowire establishment
Typical Architecture:
[Your Application]
│
├─→ [ExaBGP] ─── BGP VPLS ───→ [PE Routers]
│ (Autodiscovery) │
│ ├─ VPLS Instance Creation
│ ├─ Pseudowire Setup (LDP/BGP)
│ └─ Ethernet Bridging
│
└─→ [Orchestration] ───NETCONF───→ [PE Routers]
(VPLS Provisioning)
Important: The label block values in ExaBGP announcements signal to remote PEs which labels to use. The PE router must:
- Allocate labels from its label space
- Map labels to VPLS instance and pseudowires
- Program MPLS forwarding for incoming labeled traffic
Best Practice:
- Use consistent VE-ID allocation scheme (unique per PE)
- Coordinate label blocks to avoid conflicts
- Reserve label ranges per VPLS instance
Data Plane Flooding:
- VPLS uses data plane MAC learning (flood-and-learn)
- Broadcast, Unknown unicast, Multicast (BUM) traffic flooded to all PEs
- High BUM traffic can cause scaling issues
Full Mesh Pseudowires:
- Each PE requires pseudowire to every other PE in VPLS instance
- N PEs = N*(N-1)/2 pseudowires
- Large deployments (100+ PEs) can be challenging
MAC Table Size:
- PEs must learn MACs from all sites
- Hardware limits on MAC table size
Migration to EVPN: For large-scale deployments (1000+ MACs, 50+ sites), consider migrating to EVPN which addresses these limitations with control-plane MAC learning and optimized BUM handling.
- Pseudowire Scale: Typically 100-1000 pseudowires per PE (hardware-dependent)
- MAC Scale: 10,000-100,000 MACs per VPLS instance (hardware-dependent)
- BGP Convergence: VPLS autodiscovery convergence typically 1-5 seconds
- Data Plane: Line-rate MPLS forwarding (hardware-dependent)
Best Practices:
- Use Route Reflectors for large deployments (avoid full mesh BGP)
- Implement split horizon to prevent loops
- Configure MAC aging timers appropriately
- Monitor pseudowire status and BUM traffic levels
- BGP Authentication: Use MD5 or TCP-AO for BGP sessions
- Route Filtering: Import/Export policies on PE routers
- Label Spoofing: Ensure labels are not leaked between VPLS instances
- Access Control: Restrict who can inject VPLS routes via ExaBGP API
- VPLS Configuration - Detailed VPLS configuration syntax
- Text API Reference - Text API commands for VPLS
- JSON API Reference - JSON message format
- EVPN Overview - Modern alternative to VPLS
- L3VPN Overview - Layer 3 VPN comparison
- Data Center Interconnect - L2 stretch use cases
- Service Provider L2VPN - Carrier Ethernet services
- Debugging - Troubleshooting VPLS issues
- Monitoring - Monitoring VPLS routes
- First BGP Session - Basic BGP setup
- Quick Start - 5-minute tutorial
-
RFC 4761: Virtual Private LAN Service (VPLS) Using BGP for Auto-Discovery and Signaling
- BGP-based VPLS autodiscovery
- Label block signaling mechanism
- VE-ID and pseudowire establishment
- https://datatracker.ietf.org/doc/html/rfc4761
-
RFC 4762: Virtual Private LAN Service (VPLS) Using Label Distribution Protocol (LDP) Signaling
- LDP-based VPLS signaling (complementary to RFC 4761)
- Pseudowire setup via LDP
- https://datatracker.ietf.org/doc/html/rfc4762
-
RFC 4360: BGP Extended Communities Attribute
- Route Target and Layer 2 Info extended community format
- https://datatracker.ietf.org/doc/html/rfc4360
-
RFC 4664: Framework for Layer 2 Virtual Private Networks (L2VPNs)
- Architectural framework for L2VPNs including VPLS
- https://datatracker.ietf.org/doc/html/rfc4664
-
RFC 4447: Pseudowire Setup and Maintenance Using the Label Distribution Protocol (LDP)
- Pseudowire encapsulation and signaling
- https://datatracker.ietf.org/doc/html/rfc4447
- ExaBGP GitHub: https://github.com/Exa-Networks/exabgp
- RFC Implementation: RFC-Information.md
-
Source Code:
src/exabgp/bgp/message/update/nlri/vpls.py(VPLS NLRI implementation)
- Cisco VPLS Configuration: VPLS configuration guides for IOS, IOS-XE, IOS-XR
- Juniper VPLS: Junos VPLS routing instances and BGP autodiscovery
- Nokia SR OS: VPLS service configuration
- MPLS and VPN Architectures (Ivan Pepelnjak, Jim Guichard) - Comprehensive L2VPN/VPLS guide
- Deploying IP and MPLS QoS for Multiservice Networks (John Evans, Clarence Filsfils) - VPLS QoS considerations
- RFC 7432: BGP MPLS-Based Ethernet VPN (EVPN) - Modern alternative to VPLS
- EVPN Migration Guides: Strategies for migrating VPLS to EVPN
Getting Started
Configuration
- Configuration Syntax
- Neighbor Configuration
- Directives A-Z
- Templates
- Environment Variables
- Process Configuration
API
- API Overview
- Text API Reference
- JSON API Reference
- API Commands
- Writing API Programs
- Error Handling
- Production Best Practices
Address Families
- Overview
- IPv4 Unicast
- IPv6 Unicast
- FlowSpec
- EVPN
- L3VPN
- BGP-LS
- VPLS
- SRv6 / MUP
- Multicast
- RT Constraint
Features
Use Cases
Tools
Operations
Reference
- Architecture
- Design
- Attribute Reference
- Command Reference
- BGP State Machine
- Capabilities
- Communities
- Examples Index
- Glossary
- RFC Support
Integration
Migration
Community
External