Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Enabling or Disabling the Transmission of ICMP Unreachable Messages for Static Routes on Null Interfaces

    You can configure a static route using the ip route command and direct traffic to the null interface by specifying the null 0 keyword with this command, instead of a next-hop or destination address.

    To configure an IP static route with a null 0 interface as the next-hop:

    • Issue the ip route command with the null 0 keyword in Global Configuration mode.
      host1(config)#ip route 192.168.10.0/24 null0

      The default behavior for packets reaching null 0 interfaces with static routes takes effect, which is to discard the received packets and not send ICMP unreachable messages to the originator.

    To enable the transmission of ICMP unreachable messages for IPv4 packets that reach the static route configured on the null 0 interface and are discarded:

    • Issue the ip route command with the null 0 and reject keywords in Global Configuration mode.
      host1(config)#ip route 192.168.10.0/24 null0 reject

    To disable the transmission of ICMP unreachable messages for IPv4 packets that reach the static route configured on the null 0 interface and are discarded:

    • Issue the ip route command with the null 0 and discard keywords in Global Configuration mode.
      host1(config)#ip route 192.168.10.0/24 null0 discard

    Use the no version to remove a static route from the routing table.

    Published: 2014-08-13