VPLS
CLI reference:/interface/vpls/routing/bgp/vpls
A Virtual Private LAN Service (VPLS) interface is a tunnel interface, like an EoIP interface, that forwards a transparent Ethernet segment between customer sites over an MPLS network. Each VPLS interface is one pseudowire to one remote router. A bridge on each provider edge (PE) router connects the customer port with the pseudowires to the other sites.
The two endpoints of a pseudowire exchange the labels they use for it with LDP or with MP-BGP. A packet in the pseudowire carries two labels: the transport label, which delivers the packet to the other endpoint, and the pseudowire label, which tells the remote router which VPLS interface the packet belongs to.
RouterOS implements these VPLS features:
- VPLS LDP signaling (RFC 4762).
- Cisco-style static VPLS pseudowires (RFC 4447 FEC type 0x80).
- VPLS pseudowire fragmentation and reassembly (RFC 4623), see Control word.
- VPLS MP-BGP autodiscovery and signaling (RFC 4761).
- Cisco VPLS BGP-based autodiscovery (draft-ietf-l2vpn-signaling-08).
- Several import and export route targets for BGP-based VPLS (RFC 4761 and draft-ietf-l2vpn-signaling-08).
Prerequisites
To carry VPLS traffic, the backbone runs a label distribution method: LDP, RSVP-TE or static label bindings. A VPLS interface is running only when the router has a label for the transport address of the remote router. See the prerequisites for LDP (loopback addresses and IP routing) and for traffic engineering.
If you use BGP for VPLS discovery and signaling, the PE routers run iBGP between their loopback addresses, preferably with route reflectors.
Example setup
The example uses the LDP network from the LDP example: four routers in a chain, loopback addresses 10.255.255.1 to 10.255.255.4, and LDP on the links between the routers. The advertise filters of that example can stay: the pseudowires use the loopback addresses.
R2, R3 and R4 connect to sites of customer A on ether5. R2 and R4 also connect to sites of customer B on
ether6. Each customer needs transparent Layer 2 connectivity between its sites.
LDP-signalled VPLS
Each pseudowire has a VPLS interface on both of its routers, with the remote router's loopback address as the
peer and the same vpls-id on both ends. Use one vpls-id per customer. The VPLS interfaces join the
customer's bridge directly with the bridge parameter.
Customer A has three sites, so each of its PE routers has a pseudowire to the two others (a full mesh). The
same bridge-horizon value on the pseudowires stops the bridge from forwarding frames from one pseudowire to
another, which prevents loops between the three sites. See
bridge split horizon.
R2:
/interface/bridge
add name=customer-a protocol-mode=none
add name=customer-b protocol-mode=none
/interface/bridge/port
add bridge=customer-a interface=ether5
add bridge=customer-b interface=ether6
/interface/vpls
add name=a-r3 peer=10.255.255.3 vpls-id=65000:10 bridge=customer-a \
bridge-horizon=1
add name=a-r4 peer=10.255.255.4 vpls-id=65000:10 bridge=customer-a \
bridge-horizon=1
add name=b-r4 peer=10.255.255.4 vpls-id=65000:20 bridge=customer-b
R3:
/interface/bridge
add name=customer-a protocol-mode=none
/interface/bridge/port
add bridge=customer-a interface=ether5
/interface/vpls
add name=a-r2 peer=10.255.255.2 vpls-id=65000:10 bridge=customer-a \
bridge-horizon=1
add name=a-r4 peer=10.255.255.4 vpls-id=65000:10 bridge=customer-a \
bridge-horizon=1
R4:
/interface/bridge
add name=customer-a protocol-mode=none
add name=customer-b protocol-mode=none
/interface/bridge/port
add bridge=customer-a interface=ether5
add bridge=customer-b interface=ether6
/interface/vpls
add name=a-r2 peer=10.255.255.2 vpls-id=65000:10 bridge=customer-a \
bridge-horizon=1
add name=a-r3 peer=10.255.255.3 vpls-id=65000:10 bridge=customer-a \
bridge-horizon=1
add name=b-r2 peer=10.255.255.2 vpls-id=65000:20 bridge=customer-b
Check the pseudowires
The R flag shows the running VPLS interfaces. On R2:
[admin@MikroTik] > /interface/vpls/print
Flags: R - RUNNING
Columns: NAME, PEER, VPLS-ID
# NAME PEER VPLS-ID
0 R a-r3 10.255.255.3 65000:10
1 R a-r4 10.255.255.4 65000:10
2 R b-r4 10.255.255.4 65000:20
monitor shows the labels of a pseudowire. local-label is the pseudowire label that this router assigned,
remote-label the one that the remote router assigned and this router adds to the packets. The transport
label to the remote router is in nexthops:
[admin@MikroTik] > /interface/vpls/monitor a-r4 once
remote-label: 19
local-label: 20
remote-status:
nexthops: { label=18; nh=10.0.23.2%ether3; interface=ether3 }
R2 and R4 are not direct LDP neighbors. For a pseudowire to such a router, LDP sends targeted hellos to
the peer's loopback address and sets up a targeted session: in /mpls/ldp/neighbor, the t flag marks
neighbors that get targeted hellos, and the v flag the neighbors that LDP-signalled VPLS uses. LDP uses UDP
port 646 for hellos and TCP port 646 for sessions (RFC 5036). If
the routers filter input traffic, accept both from the other LDP routers: without UDP port 646 the neighbor
disappears, and without TCP port 646 on the router with the lower transport address the session does not
come up.
RFC 4447 expects both ends of a pseudowire to signal the same PW
type and MTU. When the remote PE router is from another vendor, set pw-type and pw-l2mtu to match it.
The pseudowire labels are in the forwarding table with the V flag:
[admin@MikroTik] > /mpls/forwarding-table/print where vpls
Flags: V - VPLS
Columns: LABEL, VPLS
# LABEL VPLS
4 V 19 a-r3
5 V 20 a-r4
6 V 21 b-r4
To test the Layer 2 connection from the PE routers, add a temporary address from a free subnet to the customer bridge on two or more PE routers, ping between them, and remove the addresses afterwards. On R2, R3 and R4:
/ip/address
add address=192.168.10.2/24 interface=customer-a
/ip/address
add address=192.168.10.3/24 interface=customer-a
/ip/address
add address=192.168.10.4/24 interface=customer-a
From R2:
[admin@MikroTik] > /ping 192.168.10.4 count=3
SEQ HOST SIZE TTL TIME STATUS
0 192.168.10.4 56 64 1ms449us
1 192.168.10.4 56 64 815us
2 192.168.10.4 56 64 835us
sent=3 received=3 packet-loss=0% min-rtt=815us avg-rtt=1ms33us
max-rtt=1ms449us
The control word page continues with these addresses.
BGP-signalled VPLS
With BGP signaling, the PE routers find each other: each router advertises its VPLS instance with a route
target, and creates a dynamic VPLS interface for each remote router that advertises a matching route target.
Each PE router of the VPLS has its own site-id. The rd (route distinguisher) separates the
advertisements of different VPLS instances: use a unique one for each VPLS. See
route distinguisher and route target.
The following configuration replaces the LDP-signalled pseudowires of customer A. First remove them on R2, R3 and R4:
/interface/vpls/remove [find name~"^a-"]
The iBGP sessions use the loopback addresses as local.address and carry the l2vpn address family. In a
larger network, use route reflectors instead of a full mesh of sessions.
R2:
/routing/bgp/instance
add name=bgp1 as=65000 router-id=10.255.255.2
/routing/bgp/connection
add name=to-r3 instance=bgp1 remote.address=10.255.255.3 \
local.address=10.255.255.2 local.role=ibgp afi=l2vpn
add name=to-r4 instance=bgp1 remote.address=10.255.255.4 \
local.address=10.255.255.2 local.role=ibgp afi=l2vpn
/routing/bgp/vpls
add name=customer-a site-id=2 rd=65000:10 \
import-route-targets=65000:10 export-route-targets=65000:10 \
bridge=customer-a bridge-horizon=1
R3:
/routing/bgp/instance
add name=bgp1 as=65000 router-id=10.255.255.3
/routing/bgp/connection
add name=to-r2 instance=bgp1 remote.address=10.255.255.2 \
local.address=10.255.255.3 local.role=ibgp afi=l2vpn
add name=to-r4 instance=bgp1 remote.address=10.255.255.4 \
local.address=10.255.255.3 local.role=ibgp afi=l2vpn
/routing/bgp/vpls
add name=customer-a site-id=3 rd=65000:10 \
import-route-targets=65000:10 export-route-targets=65000:10 \
bridge=customer-a bridge-horizon=1
R4:
/routing/bgp/instance
add name=bgp1 as=65000 router-id=10.255.255.4
/routing/bgp/connection
add name=to-r2 instance=bgp1 remote.address=10.255.255.2 \
local.address=10.255.255.4 local.role=ibgp afi=l2vpn
add name=to-r3 instance=bgp1 remote.address=10.255.255.3 \
local.address=10.255.255.4 local.role=ibgp afi=l2vpn
/routing/bgp/vpls
add name=customer-a site-id=4 rd=65000:10 \
import-route-targets=65000:10 export-route-targets=65000:10 \
bridge=customer-a bridge-horizon=1
The BGP sessions on R2:
[admin@MikroTik] > /routing/bgp/session/print
Flags: E - ESTABLISHED
0 E name="to-r3-1" instance=bgp1 remote.address=10.255.255.3 .as=65000
.id=10.255.255.3 .capabilities=mp,rr,enhe,gr,as4 .afi=l2vpn,l2vpn-cisco
.messages=2 .bytes=109 .eor="" local.role=ibgp .address=10.255.255.2
.as=65000 .id=10.255.255.2 .cluster-id=10.255.255.2
.capabilities=mp,rr,enhe,gr,as4 .afi=l2vpn .messages=2 .bytes=109 .eor=""
output.procid=20 input.procid=20 ibgp multihop=yes hold-time=3m
keepalive-time=1m uptime=25s640ms last-started=2026-12-02 07:02:40
prefix-count=1
1 E name="to-r4-1" instance=bgp1 remote.address=10.255.255.4 .as=65000
.id=10.255.255.4 .capabilities=mp,rr,enhe,gr,as4 .afi=l2vpn,l2vpn-cisco
.messages=2 .bytes=109 .eor="" local.role=ibgp .address=10.255.255.2
.as=65000 .id=10.255.255.2 .cluster-id=10.255.255.2
.capabilities=mp,rr,enhe,gr,as4 .afi=l2vpn .messages=2 .bytes=109 .eor=""
output.procid=21 input.procid=21 ibgp multihop=yes hold-time=3m
keepalive-time=1m uptime=24s720ms last-started=2026-12-02 07:02:41
prefix-count=1
The dynamic VPLS interfaces have the D flag and show the BGP VPLS instance that created them. RouterOS adds
them to the bridge set in bridge, with the horizon set in bridge-horizon. The LDP-signalled pseudowire of
customer B stays:
[admin@MikroTik] > /interface/vpls/print
Flags: R - RUNNING; D - DYNAMIC
Columns: NAME, PEER, VPLS-ID, BGP-VPLS
# NAME PEER VPLS-ID BGP-VPLS
0 R b-r4 10.255.255.4 65000:20
1 RD vpls1 10.255.255.3 customer-a
2 RD vpls2 10.255.255.4 customer-a
All VPLS parameters are described in the CLI reference for
/interface/vpls and
/routing/bgp/vpls.
Control word
The VPLS control word in RouterOS: the 4-byte header that lets a pseudowire fragment and reassemble Ethernet frames that do not fit the MPLS MTU of the path, its fields, the pw-control-word setting and an example with a 1500-byte MPLS MTU.