Remove non-private AS from incoming prefix or the the outgoing peer

Hi All

I’m not sure how to handle this… we have 2 ASNs… both public… ASN-A and ASN-B that are on different networks and Mikrotik Routers. Both advertise some prefixes to the internet. They also advertise their prefixes between each other over a local bilateral peering session.

The Mikrotik with ASN-B has a connection to a local IX and is advertising prefixes to that IX over BGP. We want to also pass the prefixes received from ASN-A to the IX…

The problem: obviously when we receive the prefixes from ASN-A is has the AS in the AS-PATH. When we pass those prefixes up to the IX, it is passed with the original AS in the path. THe IX filters these out as we’re only able to use our own ASN (its filtered based on ASN, not prefixes).

Is there any way to:

  1. ** preferably ** remove the public AS of a prefix before we send it out to the IX
  2. remove the public AS of the prefix when we receive it

I haven’t managed to find a solution to this so we’ve had the IX accept the additional ASN in the bgp path… they weren’t happy about it.

I’m sure I must be missing some simple setting that will make this work the way I want?

In general (not ros specific), I think the AS path can only be appended too, I don’t think any device can remove from the AS path.

Yeap, that’s my understanding of BGP as well.

Though you could remove your own AS from the AS Path by doing a prepend of zero. At least MikroTik support this. I don’t know about other vendors.
But I think that won’t help in this case.

Ugly but: Shouldn’t an export to an ospf instance of just the other as routes and then importing them making them IGP originated be sufficent? Just a thougt test in a lab before doing bad stuff in production.