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

    discard

    Syntax

    discard;

    Hierarchy Level

    [edit logical-systems logical-system-name routing-instances routing-instance-name routing-options (aggregate | generate) (defaults | route)],[edit logical-systems logical-system-name routing-instances routing-instance-name routing-options rib routing-table-name (aggregate | generate) (defaults | route)],[edit logical-systems logical-system-name routing-options (aggregate | generate) (defaults | route)],[edit logical-systems logical-system-name routing-options rib routing-table-name (aggregate | generate) (defaults | route)],[edit routing-instances routing-instance-name routing-options (aggregate | generate) (defaults | route)],[edit routing-instances routing-instance-name routing-options rib routing-table-name (aggregate | generate) (defaults | route)],[edit routing-options (aggregate | generate) (defaults | route)],[edit routing-options rib routing-table-name (aggregate | generate) (defaults | route)]

    Release Information

    Statement introduced before Junos OS Release 7.4.

    Statement introduced in Junos OS Release 9.0 for EX Series switches.

    Statement introduced in Junos OS Release 11.3 for the QFX Series.

    Statement introduced in Junos OS Release 12.3 for ACX Series routers.

    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.

    Published: 2013-08-15