ip route

Within the config context:

Syntax

ip route <IP-ADDR/MASK-LENGTH> blackhole logging
      
ipv6 route <IPV6-ADDR/MASK-LENGTH> blackhole logging
      

Description

Configures the debug logging for a static blackhole route for either IPv4 or IPv6.

Options

logging

Allows the packets received on the blackhole route to be logged. When logging is enabled on the switch for blackhole routes, the debug logs are sent to the configured destination. The destination can be a logging server, a buffer, or even the switch itself.

Usage

no ip route <IP-ADDR/MASK-LENGTH> blackhole
      
no ipv6 route <IP-ADDR/MASK-LENGTH> blackhole
      

Disables the logging facility for the configured blackhole routes.

The form of the command does not have the logging option.

Debug Logs

The following debug message will be logged after a blackhole route logging is enabled.

Packet destined blackhole route with Source Ip =<IP ADDRESS>, 
Destination IP=<DESTINATION IP>, VLAN Interface = <VLAN INTERFACE>, Lport = <PORT ID>

No debug messages for blackhole route will be logged after a blackhole route logging is disabled.

ip route 20.20.20.2/32 blackhole logging

Enable debug logging for a blackhole route with destination IP address.

Switch(config)# ip route 20.20.20.2/32 blackhole logging

ipv6 route 2001::2/128 blackhole logging

Enable debug logging for a blackhole route with destination IPv6 address.

switch(config)# ipv6 route 2001::2/128 blackhole logging

no ip route 20.20.20.2/32 blackhole

Disable debug logging for the blackhole route with destination IP address 20.20.20.2.

switch(config)# no ip route 20.20.20.2/32 blackhole

no ipv6 route 2001::2/128 blackhole

Disable debug logging for the blackhole route with destination IPv6 address

switch(config)#no ipv6 route 2001::2/128 blackhole

ip route 20.20.20.0/24 blackhole logging

Enable debug logging for IPv4 blackhole route 20.20.20.0

Switch(config)# ip route 20.20.20.0/24 blackhole logging

ipv6 route 2001::/64 blackhole logging

Enable debug logging for IPv6 blackhole route.

switch(config)#ipv6 route 2001::/64 blackhole logging