We advertise a /22 to our bgp upstream. however if a person tries to access any unused /32 IP on our network it causes a network loop between our edge and our upstream router until the TTL is reached.
Is there a way I can blackhole any unused IP’s? Can it be dynamic - as all unused IP’s are not contiguous.
ok, so just
/ip route add dst-address=x.x.x.x/22 type=blackhole
This will not block legitimate routes as there will be more specific routes in the routing table anyway correct?
Just the /22 should be adequate, if you are using routing bgp network option instead of redistributing active routes. (I personally prefer to not use the network tab in bgp, and have blackhole route with distance 250 to supply an active route to redistribute).