Ok, I'll try to explain it in real life terms.
I want to connect to an IX which is a shared L2 Domain with a Router Server (running bird: https://bird.network.cz/
) and a dozen of other peers each one with their own AS.
The direct BGP session will be established with the Router Server (RS) and not with the other peers.
The Route Server will advertise prefixes for the other peers (each peer with have a BGP session with the Route Server). However, in order to facilitate direct traffic exchange between peers (not via the route server), the Route Server will strip its own AS from the AS_PATH attribute and set the next-hop parameter to that of the relevant peer's. This will look like this:
1) R1 (AS1000) establishes a BGP session with the RS (AS 500) and advertises 192.0.2.0/24 to the RS.
2) R2 (AS2000) establishes a BGP session with the RS (AS 500) and receives 192.0.2.0/24 from the RS. Normally it would receive it with AS_PATH as "AS500, AS1000" and the RS' next-hop. So when sending traffic to 192.0.2.0/24, R2 will send it to the RS.
HOWEVER this is where things get tricky. The RS does a little magic to the prefix: it removes its own AS from the AS_PATH and sets the next-hop to that of R1, so R2 receives the prefix as AS_PATH: AS1000 and R1 as the next-hop. So when R2 sends traffic to 192.0.2.0/24, it will send it towards R1 and not RS.
Now some vensors (i.e. Cisco) by default won't accept a prefix from RS where the first AS in AS_PATH is not AS500 (RS'). By setting "no enforce-first-as" we tell Cisco to accept such routes.
Juniper by default accepts such routes.
How do I make Mikrotik accept such routes?