What’s the difference between ICMP prohibited ICMP unreachable

iproute2local-area-networknetworkingroute

If I want to forbid a route to response a network, should I use
ip route add unreachable 209.10.26.51 or ip route add prohibit 209.10.26.51?

Best Answer

The router will legitimately give back UNREACHABLE whenever it doesn't have a route to the destination.

PROHIBITED is probably the better practice to go with. If you get into the habit of setting unreachable, it may cause confusion down the line when you're troubleshooting why your router is giving back responses saying it can't route the packet, when it really should be saying it won't route the packet.