[Prev][Next][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 114 lists route list match types.

Table 114: Route List Match Types

Match Type

Match Conditions

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, you can create a policy named rejectpolicy1 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 to accept routes less than 8 bits in length.

To create rejectpolicy1:

  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 115.
  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 115: Creating a Policy to Reject Known Invalid Routes

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Policy statement level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Policy options, click Configure or Edit.
  3. Next to Policy statement, click Add new entry.

From the [edit] hierarchy level, enter

edit policy-options policy-statement

Create a rejection policy and term—for example, rejectpolicy1 and rejectterm1.

  1. In the Policy name box, type rejectpolicy1.
  2. Next to Term, click Add new entry.
  3. In the Term name box, type rejectterm1.

Enter

set rejectpolicy1 term rejectterm1

Specify the routes to accept—for example, routes with a mask of 0/0 up to /7.

  1. Next to From, click Configure.
  2. Next to Route filter, click Add new entry.
  3. In the Address box, type 0/0.
  4. From the Modifier list, select Upto.
  5. In the Upto box, type /7.
  6. From the Accept reject list, select accept.
  7. Click OK.

Accept routes less than 8 bits in length:

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

Specify the routes to reject—for example, routes with a mask of /8 or greater.

  1. Next to Route filter, click Add new entry.
  2. In the Address box, type /8.
  3. From the Modifier list, select Orlonger.
  4. From the Accept reject list, select 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


[Prev][Next][Report an Error]