Commands For Black Hole Routing

8.7 Commands for Black Hole Routing

8.7.1 ip route null0

Command: ip route {<ip-prefix> <mask>|<ip-prefix/prefix-length>} null0 [<distance>] no ip route {<ip-prefix> <mask>|<ip-prefix/prefix-length>} null0
Function: Configure the routing destination of a specified network to the interface of null0.
Parameters:

  • <ip-prefix> and <mask>: IP address and network address mask of the destination, both in dotted decimal A.B.C.D format.
  • <ip-prefix/prefix-length>: the IP address of the destination and the prefix length in A.B.C.D/M format.
  • null0: output interface for the black hole routing.
  • <distance>: management distance of the routing entry. The valid value is between 1 and 255.

Command mode: Global Configuration Mode
Default: None.
Usage guide: Null0 should be used as the output interface for IPv4 Black Hole Routing.
Example: Configure the routing of 192.168.188.0/24 as a Black Hole Routing.

active500EM(config)#ip route 192.168.188.0/24 null0 20

 

8.7.2 ipv6 route null0

Command: ipv6 route <ipv6-prefix/prefix-length> null0 [<precedence>] no ipv6 route <ipv6-prefix/prefix-length> null0
Function: Configure the routing destination of the specified network to the interface of null0.
Parameters:

  • <ipv6-prefix/prefix-length>: IPv6 network static route address of the destination and the length of the prefix. The valid format is dotted decimal X:X::X:X/M.
  • null0: output interface for the black hole routing.
  • <precedence>: route weight. The valid range is between 1 and 255. The default is 1.

Command mode: Global Configuration Mode
Default: None.
Usage guide: IPv6 Black Hole Routing configuration is similar to configuring normal static routing. However with IPv6 Black Hole Routing configuration, null0 is used as the output interface.
Example: Configure the route 2001:2:3:4::/64 as a Black Hole Routing.

active500EM(config)#ipv6 route 2001:2:3:4::/64 null0

 


Return to Controller Wired CLI Table of Contents