Configure a Black Hole Static Route
About this task
Configure a black hole static route to the destination a router advertises to avoid routing loops after the router aggregates or injects routes to other routers.
If a black hole route is enabled, you must first delete or disable it before you can add a regular static route to that destination.

Note
Only black hole routes that belong to the static type protocol are supported. An inter-VRF black hole route is not installed in the routing table of the destination VRF on the same switch.
Procedure
Example
Create a black hole static route and enable the black hole static route.
Switch:1>enable Switch:1#configure terminal Switch:1(config)#ip route 192.0.2.0 255.255.0.0 255.255.255.255 weight 200 Switch:1(config)#ip route 192.0.2.0 255.255.0.0 255.255.255.255 enable
Variable Definitions
The following table defines parameters for the ip route command.
| Variable | Value | 
|---|---|
| <A.B.C.D> | The first and second <A.B.C.D> specify the IP address and mask for the route destination. 255.255.255.255 is the destination of the black hole route. | 
| enable | Adds a static route to the router or VRF. | 
| local-next-hop enable | Enables the local next hop for this static route. | 
| next-hop-vrf WORD<1-16> | Specifies the next-hop VRF instance by name. | 
| weight <1-65535> | Specifies the static route cost. Note: 
                                     Do not configure a static interface subnet route with a weight of 1. | 
| preference <1-255> | Specifies the route preference. | 




