Filtering As Paths; Figure 2: Filtering With Access Lists - Juniper IP SERVICES - CONFIGURATION GUIDE V 11.1.X Configuration Manual

Ip services configuration guide
Table of Contents

Advertisement

Figure 2: Filtering with Access Lists

The following commands configure router Boston to apply access list reject1 to routes
inbound from router SanJose. Access list reject1 rejects routes matching
172.24.160.0/19.

Filtering AS Paths

You can use a filter list to filter incoming and outgoing routes based on the value of
the AS-path attribute. Whenever a BGP route passes through an AS, BGP prepends
its AS 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 of
how to use them, see "Using Regular Expressions" on page 44.
The router compares each route's AS path with each condition in the access list. 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.
host1(config)#router bgp 17
host1(config-router)#neighbor 10.5.5.4 remote-as 873
host1(config-router)#neighbor 10.5.5.4 distribute-list reject1 in
host1(config-router)#exit
host1(config)#access-list reject1 permit 172.24.48.0 0.0.255
host1(config)#access-list reject1 deny 172.24.160.0 0.0.0.255
host1(config)#access-list reject1 permit 172.24.24.0 0.0.0.255
Chapter 1: Configuring Routing Policy
Access Lists
23

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junose 11.1.x ip servicesJunose v 11.1

Table of Contents