Configuring a null route

Note

Note

You cannot add a null or interface-based static route to a network if there is already a static route of any type with the same metric you specify for the null or interface-based route.
The following figure depicts how a null static route works with a standard route to the same destination.
Click to expand in new window
Null route and standard route to same destination

The following procedure creates a preferred route and a null route to the same destination. The null route drops packets when the preferred route is not available.

  1. Enter global configuration mode.
    device# configure terminal
    
  2. Configure the preferred route to a destination.
    device(config)# ipv6 route 2001:DB8::0/64 fe80::1 ve 3
    
    This example creates a static route to IPv6 2001 : DB8 : : 0/64 destination addresses. These destinations are routed through link-local address fe80::1 and the next hop gateway virtual interface (ve) 3. The route uses the default cost metric of 1.
  3. Configure the null route to the same destination with a higher metric.
    device(config)# ipv6 route 2001:DB8::0/64 null 0 2
    
    This example creates a null static route to the same destination. The metric is set higher so that the preferred route is used if it is available.

The following example creates a primary route to all 2001 : DB8 : : 0/64 destinations through virtual interface (ve) 3. It creates an alternative null route to drop the packets when the primary route is not available.

device# configure terminal
device(config)# ipv6 route 2001 : DB8 : : 0/64 fe80::1 ve 3
device(config)# ipv6 route 2001 : DB8 : : 0/64 null 0 2