[Contents] [Prev] [Next] [Index] [Report an Error]

Rejecting Known Invalid Routes (Optional)

You can specify known invalid (“bad”) routes to ignore by specifying matches on destination prefixes. When specifying a destination prefix, you can specify an exact match with a specific route, or a less precise match by using match types. You can configure either a common reject action that applies to the entire list, or an action associated with each prefix. Table 131 lists route list match types.

Table 131: Route List Match Types

exact

The route shares the same most-significant bits (described by prefix-length), and prefix-length is equal to the route's prefix length.

longer

The route shares the same most-significant bits (described by prefix-length), and prefix-length is greater than the route's prefix length.

orlonger

The route shares the same most-significant bits (described by prefix-length), and prefix-length is equal to or greater than the route's prefix length.

prefix-length-range prefix-length2-prefix-length3

The route shares the same most-significant bits (described by prefix-length), and the route's prefix length falls between prefix-length2 and prefix-length3, inclusive.

through destination-prefix

All the following are true:

  • The route shares the same most-significant bits (described by prefix-length) of the first destination prefix.
  • The route shares the same most-significant bits (described by prefix-length) of the second destination prefix for the number of bits in the prefix length.
  • The number of bits in the route's prefix length is less than or equal to the number of bits in the second prefix.

You do not use the through match type in most routing policy configurations. For more information, see the JUNOS Policy Framework Configuration Guide.

upto prefix-length2

The route shares the same most-significant bits (described by prefix-length) and the route's prefix length falls between prefix-length and prefix-length2.

For example, to reject routes with a mask of /8 and greater (/8, /9, /10, and so on) that have the first 8 bits set to 0 and accept routes less than 8 bits in length:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 132.
  3. If you are finished configuring the router, commit the configuration.
  4. To configure additional routing policy features, go on to one of the following procedures:

Table 132: Creating a Policy to Reject Known Invalid Routes

Navigate to the Term level in the configuration hierarchy.

In the J-Web configuration editor hierarchy, select Policy options>Policy statement>Term.

From the top of the CLI configuration hierarchy, enter

edit policy-options policy-statement rejectpolicy1 term rejectterm1

Specify the routes to accept.

  1. In the From option, click Configure.
  2. In the Route filter box, click Add new entry.
  3. In the Address box, enter the prefix of the routes.
  4. Click OK.

Accept routes less than 8 bits in length:

set from route-filter 0/0 up to /7 accept

Accept these routes.

  1. In the Then option, click Configure.
  2. In the Accept option, select the Yes check box.
  3. Click OK.

Specify the routes to reject.

  1. In the configuration editor hierarchy, select Policy options>Policy statement>Term.
  2. In the From option, click Configure.
  3. In the Route filter box, click Add new entry.
  4. In the Value box, enter the prefix of the routes to reject.
  5. Click OK.
  1. Specify routes less than 8 bits in length:

    set from route-filter /8 orlonger

  2. Reject these routes:

    set then reject

Reject these routes.

  1. In the Then option, click Configure.
  2. In the Reject option, select the Yes check box.
  3. Click OK.

[Contents] [Prev] [Next] [Index] [Report an Error]