Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

discard (routing-options)

Syntax

Hierarchy Level

Description

Do not forward packets addressed to this destination. Instead, drop the packets, do not send ICMP unreachable messages to the packets’ originators, and install a reject route for this destination into the routing table.

To propagate static routes into the routing protocols, include the discard statement when you define the route, along with a routing policy.

Note:

In other vendors’ software, a common way to propagate static routes into routing protocols is to configure the routes so that the next-hop routing device is the loopback address (commonly, 127.0.0.1). However, configuring static routes in this way (by including a statement such as route address/mask-length next-hop 127.0.0.1) does not propagate the static routes, because the forwarding table ignores static routes whose next-hop routing device is the loopback address.

Default

When an aggregate route becomes active, it is installed in the routing table with a reject next hop, which means that ICMP unreachable messages are sent.

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.