L2VPN VPLS putting double vlan tags on outgoing packets

Hello

Im running RouterOS 6.46. I have configured VPLS cisco-style betwen PE2 and PE3 as such

CE2 (tag 1003)----[PE2 mikrotik]------[P]------[PE3 juniper]----(tag 1003)CE3

The VPLS is up but the problem is when I ping from CE2 to CE3 and vice versa the ping fails.

After packet capture analysis when ping from CE2 to CE3 I have seen:

  1. Packets from CE2 towards PE2 are tagged with 1003 (this is expected)
  2. Packets from PE3 towards CE3 are sent out with no vlan tags (this is not expected)

After packet capture analysis when ping from CE3 to CE2 I have seen:

  1. Packets from CE3 towards PE3 are tagged with 1003 (this is expected)
  2. Packets from PE2 towards CE2 are having double tags of 1003

Kindly review and advise what can be done to fix this

Configuration on PE2

/interface bridge
add name=VPWS-1003

/interface vlan
add name="VPWS-1003 SERVICE END TO CE2" interface=ether2 vlan-id=1003

/interface vpls
add name="VPWS-1003 ENDOINT JUNIPER PE3" cisco-style=yes cisco-style-id=1003 pw-type=tagged-ethernet remote-peer=10.10.10.3 disabled=no

/interface bridge port
add bridge=VPWS-1003 interface="VPWS-1003 SERVICE END TO CE2"
add bridge=VPWS-1003 interface="VPWS-1003 ENDOINT JUNIPER PE3"

Since the frames from CE2 arrive to PE2 already tagged, there is no need to insert the /interface vlan name=“VPWS-1003 SERVICE END TO CE2” between ether2 and /interface bridge name=“VPWS-1003”; instead, you make ether2 directly a member (slave) port of that bridge. If you need to ensure that only frames tagged with VID 1003 will be forwarded fro CE2 to the VPLS tunnel, you need to set vlan-filtering=yes on the bridge and define the membership of the two ports in the VLAN. So the whole modification to your current setup would be the following:

/interface bridge port remove [find interface=“VPWS-1003 SERVICE END TO CE2”]
/interface vlan remove “VPWS-1003 SERVICE END TO CE2”
/interface bridge port add bridge=VPWS-1003 interface=ether2
/interface bridge vlan add bridge=VPWS-1003 vlan-ids=1003 tagged=ether2,“VPWS-1003 ENDOINT JUNIPER PE3”
/interface bridge set VPWS-1003 vlan-filtering=yes

EDIT: fixed the last line as per the post below

Hello

Thank you for the input

the last line is actually

/interface bridge set VPWS-1003 vlan-filtering=yes

This configuration works, but the problem is here

/interface bridge port add bridge=VPWS-1003 interface=ether2

we are assigning the entire interface to a single bridge which means it can not be re used again

My setup will involve adding multiple customers to ether2 with different vlan tags as ether2 will be connecting to a switch. I have tried adding the ether2 interface to another bridge for another customer and it throws an error

[admin@mkTik-c6r1] > interface bridge port add bridge=VPWS-1002 interface=ether2

failure: device already added as bridge port

The whole idea of vlan-filtering=yes is that you use the same bridge for several VLANs, and you permit each of them only on the necessary member ports of that bridge. So if the other customer uses e.g. VLAN 2005, you add his VPLS tunnel as another member port to the same bridge, but you add it to the tagged list only at the vlan-ids=2005 row in /interface bridge vlan, along with ether2 again.

So it will look as follows:
br-all-vlans
||
|| VLAN 1003
||=========== vpls1003
VLAN 1003 ||
ether2 ===========||
VLAN 2005 || VLAN 2005
||=========== vpls2005
||The corresponding setup is the following:

/interface bridge add name=br-all-vlans vlan-filtering=yes ...
/interface bridge port
add bridge=br-all-vlans interface=ether2
add bridge=br-all-vlans interface=vpls1003
add bridge=br-all-vlans interface=vpls2005
/interface bridge vlan
add bridge=br-all-vlans vlan-ids=1003 tagged=ether2,vpls1003
add bridge=br-all-vlans vlan-ids=2005 tagged=ether2,vpls2005

However, I would personally prefer to send no tags inside the VPLS tunnels if each tunnel only transports a single VLAN, to save 4 bytes of the tag per frame for the payload. At Mikrotik side, this can be done simply by making the tunnels access ports to the individual VLANs on the bridge, but I don’t know whether you can do the same at the Juniper end. If you can, then your original concept with several /interface vlan attached to ether2 and a dedicated bridge for each VLAN and VPLS tunnel can also be used, but as you’ve asked for a solution at Mikrotik side, I’ve concluded that Juniper cannot provide the tagging/untagging on the path between the Ethernet interface and the VPLS tunnel.

Below is the setup for the variant with vlan-filtering=yes and VPLS tunnels as access ports:

/interface bridge add name=br-all-vlans vlan-filtering=yes ...
/interface bridge port
add bridge=br-all-vlans interface=ether2
add bridge=br-all-vlans interface=vpls1003 pvid=1003
add bridge=br-all-vlans interface=vpls2005 pvid=2005
/interface bridge vlan
add bridge=br-all-vlans vlan-ids=1003,2005 tagged=ether2

Hello

Thank you for the very useful insight. I have been able to get it working as you suggested, however having the vpls interface untagged, does not work as both Juniper and Cisco (these are device on remote ends) expect tagged traffic as the encapsulation on those ends is vlan-ccc and eth-vlan respectively.

/interface bridge
add name=vpws-services vlan-filtering=yes

/interface vpls
add cisco-style=yes cisco-style-id=1001 disabled=no name=vpws-1001-to-pe3 pw-type=tagged-ethernet remote-peer=10.10.10.1
add cisco-style=yes cisco-style-id=1002 disabled=no name=vpws-1002-to-pe3 pw-type=tagged-ethernet remote-peer=10.10.10.1

/interface bridge port
add bridge=vpws-services interface=ether2
add bridge=vpws-services interface=vpws-1001-to-pe3
add bridge=vpws-services interface=vpws-1002-to-pe3

/interface bridge vlan
add bridge=vpws-services tagged=ether2,vpws-1001-to-pe3 vlan-ids=1001
add bridge=vpws-services tagged=ether2,vpws-1002-to-pe3 vlan-ids=1002

What I had originally intended is to add customers to the bridge with their respective vlan interfaces. I have been able to achieve this as well, the key is to add the vlan interface to the bridge as an access port, this solves the double tagging issues on outgoing packets

/interface bridge
add name=loopback0
add name=vpws-1003 vlan-filtering=yes
add name=vpws-1002 vlan-filtering=yes

/interface vpls
add name=vpws-1002-to-pe3 cisco-style=yes cisco-style-id=1002 pw-type=tagged-ethernet remote-peer=10.10.10.1 disabled=no
add name=vpws-1003-to-pe3 cisco-style=yes cisco-style-id=1003 pw-type=tagged-ethernet remote-peer=10.10.10.1 disabled=no

/interface vlan
add name=vlan-1002-to-ce2 vlan-id=1002 interface=ether2
add name=vlan-1003-to-ce2 vlan-id=1003 interface=ether2

/interface bridge port
add bridge=vpws-1002 interface=vpws-1002-to-pe3
add bridge=vpws-1002 interface=vlan-1002-to-ce2 pvid=1002
add bridge=vpws-1003 interface=vpws-1003-to-pe3
add bridge=vpws-1003 interface=vlan-1003-to-ce2 pvid=1003

/interface bridge vlan
add bridge=vpws-1002 tagged=vpws-1002-to-pe3 vlan-ids=1002
add bridge=vpws-1003 tagged=vpws-1003-to-pe3 vlan-ids=1003