RouterOS v7 Allow-AS-in

Hi All,

I have a scenario where we have remote POP’s that have their own transit. We also have backup paths to them via L2 tunnels to our main POP. What we want to do though, is at our main POP - learn the prefixes via transit where applicable and fallback to L2 backup path when transit goes down.

Previously we achieved this with allow-as-in - I have set this on the connection in routerosv7 and confirmed it is present on the session, but when we add a filter to allow the prefix in we never learn it, even though it exists in the global route table.

I can’t find any documentation on how to do this for v7 - and chatgpt and others are hallucinating suggestions. Has anyone been able to achieve this properly in v7?

Example of our filters so far, with allow-as-in set to 1

if (dst == 0.0.0.0/0) { accept } // Accept default route
if (dst == 1.2.3.0/24) { accept } // Our own prefix we expect to learn from global
if (dst in 0.0.0.0/0) { reject } // Reject global route table

We specifically reject the full table, we successfully learn the default route, but never see our own route shared with us.

What is the magic sauce to get us to accept this route?

Thanks.

This is what you need to set on the BGP connection.

routing/bgp/connection/set input.allow-as=1

Where the integer 1 represents the number of times your ASN shows up in the path of the received route. You can set up to 10.

Looks like the UI already handles this with Allow AS IN setting input.allow-as=3 in my case (since i set it to 3).

If you are confident that is the only thing requiring it to work, then I will go talk to my provider(s) to see why we are not receiving it.

Thanks.

You can view all routes (including those that have been filtered) by looking at

/routing/route/print