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

Defining Route Lists

To specify a route list, include one or more route-filter or source-address-filter options in the from statement of the policy-statement at the [edit policy-options policy-statement policy-name term term-name] hierarchy level:

[edit policy-options policy-statement policy-name term term-name]
from {
route-filter prefix match-type <actions>;
source-address-filter source-prefix match-type <actions>;
}
then actions;

The route-filter option is typically used to match prefixes of any type except for unicast source addresses.

The source-address-filter option is typically used to match unicast source addresses in multiprotocol BGP (MBGP) and Multicast Source Discovery Protocol (MSDP) environments.

source-prefix is the IPv4 or IPv6 prefix specified as prefix/prefix-length. If you omit prefix-length for an IPv4 prefix, the default is /32. If you omit prefix-length for an IPv6 prefix, the default is /128. Prefixes specified in a from statement must be either all IPv4 addresses or all IPv6 addresses.

match-type is the type of match to apply to the destination prefix. It can be one of the match types listed in Table 25. For examples of the match types and the results when presented with various routes, see Table 26.

actions is the action to take if the destination prefix matches. It can be one or more of the actions listed in Table 15 and Table 16.

In route lists, you can specify actions in two ways:

The upto and prefix-length-range match types are similar in that both specify the most-signifcant bits and provide a range of prefix lengths that can match. The difference is that upto allows you to specify an upper limit only for the prefix length range, whereas prefix-length-range allows you to specify both lower and upper limits.

For more examples of these route list match types, see Examples: Configuring Route Lists.

Table 25: Route List Match Types for a Prefix List

Match Type

Match Condition

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-length2prefix-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 an example, see Examples: Configuring Route Lists.)

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.

Table 26: Match Type Examples

Prefix

192.168/16 exact

192.168/16 longer

192.168/16 orlonger

192.168/16 upto /24

192.168/16 through 192.168.16/20

192.168/16 prefix length range /18–/20

10.0.0.0/8

192.168.0.0/16

Match

Match

Match

Match

192.168.0.0/17

Match

Match

Match

Match

192.168.0.0/18

Match

Match

Match

Match

Match

192.168.0.0/19

Match

Match

Match

Match

Match

192.168.4.0/24

Match

Match

Match

192.168.5.4/30

Match

Match

192.168.12.4/30

Match

Match

192.168.12.128/32

Match

Match

192.168.16.0/20

Match

Match

Match

Match

Match

192.168.192.0/18

Match

Match

Match

Match

192.168.224.0/19

Match

Match

Match

Match

10.169.1.0/24

10.170.0.0/16


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