A few years back, when a client called our team at Routers for Juniper panicking because their MPLS core was dropping connectivity between 12 remote retail locations, we didn’t just sell them hardware—we walked them through setting up a VPLS to fix their layer 2 connectivity gaps. That call stuck with me, not because the problem was unique, but because so many small and medium businesses (SMBs) still see VPLS as a black box reserved for big telecoms. As someone who’s spent 10 years working with Juniper devices, from basic branch routers to core T Series routers, I’m here to break down how to configure a VPLS on Juniper routers step by step, with real-world tweaks that make the difference between a working VPLS and one that keeps your IT team up at 2 a.m. Routers for Juniper

First, let’s get the basics right. VPLS (Virtual Private LAN Service) is a layer 2 VPN that lets multiple sites act like they’re on the same physical LAN, even if they’re hundreds of miles apart. It’s perfect for businesses that need to run layer 2 applications—like legacy point-of-sale systems, VDI, or live virtual machine migrations—without investing in a dedicated fiber mesh. Juniper makes this straightforward, but only if you follow the right order. I’ve seen teams skip small steps, like setting up a stable IGP, and end up with VPLS flaps every time the network load spikes. Let’s start with prerequisites, because skipping them is where most people mess up.
Before you touch any VPLS config, your Juniper core and PE (Provider Edge) routers need a stable underlay network. The underlay is the IP network that carries MPLS labels between PEs, and it has to be consistent. We use Juniper’s MPLS LDP (Label Distribution Protocol) for this 9 times out of 10, because it’s simpler than RSVP-TE for most SMB and mid-market networks. Wait—there’s a caveat here: you need to enable LDP on all core interfaces, including loopbacks, because LDP uses loopbacks for peerings. Let’s say we have two PE routers: PE1 (loopback 10.255.0.1) and PE2 (loopback 10.255.0.2). First, log into each PE via CLI—we use Junos OS, so the command line is your best friend (GUI tools work, but they hide critical error logs). On PE1, start with:
edit protocols ospf area 0.0.0.0
set interface lo0.0
set interface ge-0/0/0.0 # This is the core-facing interface connecting to P router
set interface ge-0/0/1.0 # Another core interface for redundancy
edit protocols ldp
set interface lo0.0
set interface ge-0/0/0.0
set interface ge-0/0/1.0
commit
Do the same on PE2, swapping the loopback and interface names. The key here is to test connectivity between the loopbacks first: ping 10.255.0.2 from PE1. If that works, LDP will form a session between the two PEs automatically. If not, double-check firewall rules (we see this all the time—teams forget that LDP uses UDP port 646 for discovery and TCP port 646 for sessions, so those need to be allowed on core firewalls). I once had a client whose network team blocked port 646 to prevent peer-to-peer attacks, and they spent 3 days troubleshooting why LDP wouldn’t come up before we pointed out the rule. Don’t be that client.
Next, we need to set up the layer 2 routing instances, which is where VPLS lives in Junos. Junos uses logical routing instances to separate different VPN services, and for VPLS, we set up an instance of type “vpls”. Let’s say our customer is a retail chain with 4 sites: Site A (connects to PE1), Site B (Site B) connects to PE1, Site C connects to PE2, and Site D connects to PE2. The VPLS instance will be named something meaningful, like retail_vpls, not just “vpls1” — trust me, you’ll thank yourself later when you have 10 different VPLS services running.
On PE1, we enter the instance configuration:
edit routing-instances retail_vpls
instance-type vpls
interface ge-0/2/0.0 # This is the customer-facing interface for Site A
interface ge-0/2/1.0 # Customer-facing for Site B
vpn-tunnel-id 100 # Unique ID for the VPLS domain, must match on all PEs
routing-instance-import "vpls-import" # We’ll set this policy next
routing-instance-export "vpls-export"
Now, the policy part. Junos requires import and export policies for VPLS to control how layer 2 routes are advertised between PEs. The policies here are simple, but they need to reference the LDP and MPLS layers. We set up the policies in edit policy-options:
edit policy-options
policy-statement vpls-import
term 1
from protocol bgp
then accept
term 2
then reject
policy-statement vpls-export
term 1
from protocol bgp
then accept
term 2
then reject
Wait—why BGP? VPLS uses BGP to advertise the PE’s layer 2 VPN routes, right? Oh, right, I skipped that step. After setting up the routing instance, we need to enable BGP for VPLS signaling. On Juniper, this is done under the protocols l2vpn hierarchy. Go back to the edit protocols level on both PEs:
edit protocols l2vpn
vpls
instance retail_vpls
neighbor 10.255.0.2 # This is the loopback of PE2, our remote PE
site site_a_pegw # Unique site identifier for Site A
interface ge-0/2/0.0.100 # The .100 here is the VLAN tag if we’re using 802.1Q for customer VLANs
site site_b_pegw
interface ge-0/2/1.0.100
Do the same on PE2, adding its customer sites: Site C and Site D, with their respective interfaces. The neighbor command here is critical—if you put the wrong loopback, BGP won’t peer between PEs, and the VPLS won’t build. I had a small business client once that mixed up their PE2 loopback with a P router’s loopback, and their VPLS would work for 5 minutes then drop, because BGP was flapping. Always double-check that neighbor IPs are the loopbacks of the remote PEs, not core interfaces.
Now, the customer-facing interfaces. This is where mistakes happen a lot, because teams either leave them as layer 3 or don’t set them to trunk mode. The customer-facing interfaces on PEs must be layer 2 interfaces, part of the VPLS routing instance. For example, Site A’s interface on PE1 is ge-0/2/0.0, and we need to set it to family ethernet-switching, then assign it to the VPLS instance. Wait—no, wait: in newer Junos versions, you can assign a physical interface directly to a VPLS instance, but if the customer is using VLANs (which almost all do), you need to set up VLAN-aware bridging. Let’s configure Site A’s interface correctly:
edit interfaces ge-0/2/0
unit 0
family ethernet-switching
vlan members retail_vlan # Name of the customer’s VLAN, matches across all sites
Wait, maybe a better way to avoid confusion is to use VLAN IDs instead of names, especially for small networks. If the customer is using VLAN 10 for all their retail traffic, then on PE1’s customer interfaces:
set interfaces ge-0/2/0 unit 0 family ethernet-switching vlan members 10
set interfaces ge-0/2/1 unit 0 family ethernet-switching vlan members 10
On PE2:
set interfaces ge-0/3/0 unit 0 family ethernet-switching vlan members 10
set interfaces ge-0/3/1 unit 0 family ethernet-switching vlan members 10
That’s simpler for small teams to track, and avoids name conflicts across different customers. Now, let’s test what we have so far. On PE1, run show l2vpn vpls extensive. You should see the neighbor PE2, and the site interfaces listed as up. If you don’t, run show l2vpn connections to spot where the flap is. Common issues here are mismatched vpn-tunnel-ids between PEs, or a firewall blocking BGP port 179 between the loopbacks. Another test: plug a laptop into Site A’s port, assign it an IP in the customer’s subnet, and ping a laptop at Site C. If that works, your VPLS is up. If not, check the MPLS labels: run show mpls ldp bindings to make sure labels are being advertised between PEs.
Now, real-world tweaks that we’ve learned from working with hundreds of clients. First, enable VPLS redundancy if you have two PEs for redundancy. We use MC-LAG (Multichassis Link Aggregation Group) for customer-facing links, so if one PE drops, the customer’s traffic shifts to the other PE without downtime. To set up MC-LAG for your VPLS, add this to the routing instance on both PEs:
set routing-instances retail_vpls redundancy-group 1
set redundancy-group 1 peer-address 10.255.0.2
That way, if PE1 goes down, PE2 takes over all the customer’s VPLS sessions automatically. We had a restaurant chain client that had a PE router fail during a Saturday lunch rush, and without redundancy, they would have lost their POS system for 2 hours. With MC-LAG, the failover took 3 seconds, and they never noticed.
Another tweak: enable BFD (Bidirectional Forwarding Detection) for LDP and BGP to speed up failure detection. By default, LDP takes 30 seconds to detect a peer failure, which is too slow for real-time applications like VoIP or POS. Adding BFD makes it detect failures in 1 second. To enable BFD on LDP:
edit protocols ldp
set interface lo0.0 bfd-liveness-detection minimum-interval 100 multiplier 3
set interface ge-0/0/0.0 bfd-liveness-detection minimum-interval 100 multiplier 3
Do the same for BGP under protocols bgp, adding bfd-liveness-detection minimum-interval 100 multiplier 3 to the neighbor PE2. That’s saved dozens of clients from lost sales when a core link drops suddenly.
Now, common pitfalls to avoid. First, don’t use the same vpn-tunnel-id for multiple VPLS instances. We once had a client that set up two VPLS services with the same tunnel ID, and their retail traffic ended up in their guest WiFi VPLS, exposing customer data. Second, always test the underlay network before configuring VPLS. If your OSPF or LDP is unstable, VPLS will be too, no matter how perfect your layer 2 config is. Third, don’t forget to allow layer 2 traffic on customer-facing interfaces. I’ve seen teams set the interface to family ethernet-switching but forget to enable the VLAN, or put it in the wrong routing instance. A quick show interfaces ge-0/2/0 extensive will show if the family is set correctly.

Once your VPLS is configured, monitor it like you would any other network service. We recommend setting up Junos Space or Juniper Mist to alert you to VPLS flaps or LDP session drops. For small clients, even setting up a simple SNMP trap to your monitoring system works. We also do quarterly health checks for all our clients’ VPLS setups, because networks change over time—interfaces get reconfigured, firewalls get updated, and those small changes can break VPLS without you noticing until someone calls.
Firewalls for Aruba At Routers for Juniper, we don’t just sell you a router and walk away. For every VPLS config, we provide a 30-day support window to help you troubleshoot any issues, and we’re available to walk you through scaling your VPLS as your business grows. Whether you’re adding new retail sites, expanding to remote offices, or needing to support new layer 2 applications, we have the Juniper hardware and expertise to make your VPLS work reliably. If you’re looking to set up a VPLS on your Juniper routers, or need help optimizing your existing setup, our team is ready to discuss your specific needs.
References
- Juniper Networks. (2024). VPLS Configuration Guide for Junos OS. Juniper Networks Technical Documentation.
- Juniper Networks. (2023). MPLS and LDP Implementation Guide. Juniper Networks Developer Network.
- RFC 4761. (2007). Virtual Private LAN Service (VPLS) Using BGP for Control Plane. Internet Engineering Task Force.
- Juniper Networks. (2024). MC-LAG Configuration for VPLS. Juniper Customer Support Knowledge Base.
AITI Tech Limited
AITI Tech Limited is one of the most professional routers for juniper manufacturers and suppliers in China for over 20 years, featured by quality products and low price. Welcome to buy bulk discount routers for juniper in stock here from our factory. If you have any enquiry about pricelist, please feel free to email us.
Address: 6F, Haogong Building, Yannan Road, Futian District, Shenzhen, China
E-mail: kelly@hkaiti.com
WebSite: https://www.hkaiti.com/