I would like to create blackhole routes that will send back the user an ICMP network-unreachable answer instead of an actual blackhole. With the following filter I’ve got it working. Well, sort if.
if (bgp-communities includes blackhole) {
if (afi ipv4) {
set gw 0.0.0.0;
} else {
if (afi ipv6) {
set gw ::;
} else {
set blackhole yes;
}
}
accept;
}
Routes are installed just right, but it actually works only for IPv4 routes. Both families have the gw attribute set right (0.0.0.0 and :: ), both are marked as UNREACHABLE but ICMP packets get sent back only for IPv4 packets. IPv6 UNREACHABLE routes are simply ignored, they get sent to the default route’s gateway. IPv6 actual blackhole flagged routes (by replacing set gw :: with set blackhole) work.
So I suspect this is actually a RouterOS limitation and of BGP or filters. Any idea how can I achieve this behavior for IPv6 routes?