Hello,
I’m receiving some mis-configured routes on IXes with AS-PATH containing private ASes (64512-65534).
Thoses routes should be cleared on level higher that me in a perfect world but we’re in the real world.
I would like to NOT reannounce those routes with such AS-PATH.
Is there a way with routeuros to remove those ASes from the AS-PATH ?
I tried to set remove-private-as to on for a few peers but I’m still getting the private ASes and re-announcing them.
Yes there is an option who removes the private AS:
remove-private-as (yes | no; Default: no) If set, then BGP AS-PATH attribute is removed before sending out route update if attribute contains only private AS numbers.
removal process happens before routing filters are applied and before local AS
number is prepended to the AS path. Option is available starting from v4.3. Currently works only with 16-bit ASNs.
Thanks for the idea but : “if attribute contains only private AS numbers”
This is not the case here : AS-PATH contains private ASes but there’s public AS before and/or after.
I think this is why my routes aren’t ‘sanitized’.
Finally, I think I’ll just drop those routes instead of trying to remove the private AS from the AS-PATH. They can be considered as bogons and it seems to be a common good practices. (see http://as2914.net/bogon_asns/configuration_examples.txt from Job Snijders - NTT).
Now, I have to find howto filter a route containing a range of AS (64496-64511 for example) without having to specify each AS in the regex.
The following conditions apply for remove-private-as:
You can only use this solution with external BGP (eBGP) peers.
If the update has only private AS numbers in the AS_PATH,
BGP removes these numbers.
If the AS_PATH includes both private and public AS numbers,
BGP doesn’t remove the private AS numbers. This situation is
considered a configuration error.
If the AS_PATH contains the AS number of the eBGP neighbor,
BGP does not remove the private AS number.
If the AS_PATH contains confederations, BGP removes the private
AS numbers only if they come after the confederation portion of
the AS_PATH.
This will create a bogons-asn filter that could be used with upsteams and peers to filter those buggy routes (a few Tier1 already filter those routes, you can safely consider them as buggy).