Hello,
@Beeelzebub wrote:
Looking at the network drawing I made, there is a possibility that the VLAN from the last-mile provider enters our network on two different physical ports. The VLAN is put in the same EVPN instance.
The last-mile provider uses this so that we as the ISP are in control of migrating from one physical port to the other.
I'm wondering if this setup creates a loop, since an EVPN instance is sort of the same as a L2 switch.
There is a L2 loop possibility, no doubt about it.
@Beeelzebub wrote:
does EVPN have some sort of loop prevention built in?
Yes, of course,
If You are using EVPN Single-Active a.k.a. Active/Standby (A/S), then one of JUNOS PEs (the non-DF PE) will block its CE-facing port/VLAN - more specifically, the CE-facing port or VLAN on non-DF PE will be in "CCC-Down" state.
If You are using EVPN All-Active a.k.a A/A then You must configure both CE-facing ports in the same LAG - this is RFC 7432 section https://tools.ietf.org/html/rfc7432#section-8.5
If a bridged network is multihomed to more than one PE in an EVPN
network via switches, then the support of All-Active redundancy mode
requires the bridged network to be connected to two or more PEs using a LAG.
Kind of MCLAG but no ICCP and no ICL - all You need is to use same LAG system-id and same ESI for these 2 CE-facing ports on both PEs.
Finally, if You are using CE-facing ports on both PE as EVPN Single Homed (SH) then You shall make Your own loop prevention measures - run STP through EVPN, use Split Horizon on last-mile switch (if supported), etc
HTH
Thx
Alex