Figure 23: Filtering With As-Path Access Lists - Juniper JUNOSE 11.2.X BGP AND MPLS Configuration Manual

For e series broadband services routers - bgp and mpls configuration
Table of Contents

Advertisement

JunosE 11.2.x BGP and MPLS Configuration Guide
Example 1

Figure 23: Filtering with AS-Path Access Lists

86
number to the AS-path attribute. The AS-path attribute is the list of ASs that a route has
passed through to reach a destination.
To filter routes based on the AS-path, define the access list with the ip as-path access-list
command, and apply the list to routes received from or passed to a neighbor with the
neighbor filter-list command. AS-path access lists use regular expressions to describe
the AS path to be matched. A regular expression uses special characters—often referred
to as metacharacters—to define a pattern that is compared with an input string. For a
full discussion of regular expressions, with examples on how to use them, see JunosE IP
Services Configuration Guide.
The router compares each route's AS path against the conditions in the access list one
by one. If the first match is for a permit condition, the route is accepted or passed. If the
first match is for a deny condition, the route is rejected or blocked. The order of conditions
is critical because testing stops with the first match. If no conditions match, the router
rejects or blocks the route; that is, the last action of any list is an implicit deny condition
for all routes.
You cannot selectively place conditions in or remove conditions from an AS-path access
list. You can insert a new condition only at the end of an AS-path access list.
Consider the network structure in Figure 23 on page 86.
Suppose you want router London to behave in the following way:
Accept routes originated in AS 621 only if they pass directly to router London
Accept routes originated in AS 11 only if they pass directly to router London
Forward routes from AS 282 to AS 435 only if they pass through either AS 621 or AS 11,
but not both AS 621 and AS 11
The following commands configure router London to apply filters based on the AS path
to routes received from router Berlin and router Paris and to routes forwarded to router
Madrid.
host1(config)#router bgp 47
host1(config-router)#neighbor 10.2.9.2 remote-as 621
Copyright © 2010, Juniper Networks, Inc.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junose 11.2.x

Table of Contents