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.
Configuration Example 1
Consider the network structure in Figure 3 on page 23.
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.
Figure 3: Filtering with AS-Path Access Lists
The following commands configure router London to apply filters based on 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
host1(config-router)#
neighbor 10.2.9.2 filter-list 1 in
host1(config-router)#
neighbor 10.2.8.2 remote-as 11
host1(config-router)#
neighbor 10.2.8.2 filter-list 2 in
host1(config-router)#
neighbor 10.2.7.2 remote-as 435
host1(config-router)#
neighbor 10.2.7.2 filter-list 3 out
host1(config-router)#
exit
host1(config)#
ip as-path access-list 1 deny ^11
host1(config)#
ip as-path access-list 1 permit .*
host1(config)#
ip as-path access-list 2 deny ^621
23
Copyright © 2010, Juniper Networks, Inc.
Chapter 1: Configuring Routing Policy
Содержание JUNOSE 11.2.X IP SERVICES
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 8: ...Copyright 2010 Juniper Networks Inc viii JunosE 11 2 x IP Services Configuration Guide...
Страница 18: ...Copyright 2010 Juniper Networks Inc xviii JunosE 11 2 x IP Services Configuration Guide...
Страница 22: ...Copyright 2010 Juniper Networks Inc xxii JunosE 11 2 x IP Services Configuration Guide...
Страница 28: ...Copyright 2010 Juniper Networks Inc 2 JunosE 11 2 x IP Services Configuration Guide...
Страница 116: ...Copyright 2010 Juniper Networks Inc 90 JunosE 11 2 x IP Services Configuration Guide...
Страница 144: ...Copyright 2010 Juniper Networks Inc 118 JunosE 11 2 x IP Services Configuration Guide...
Страница 230: ...Copyright 2010 Juniper Networks Inc 204 JunosE 11 2 x IP Services Configuration Guide...
Страница 262: ...Copyright 2010 Juniper Networks Inc 236 JunosE 11 2 x IP Services Configuration Guide...
Страница 294: ...Copyright 2010 Juniper Networks Inc 268 JunosE 11 2 x IP Services Configuration Guide...
Страница 328: ...Copyright 2010 Juniper Networks Inc 302 JunosE 11 2 x IP Services Configuration Guide...
Страница 345: ...PART 2 Index Index on page 321 319 Copyright 2010 Juniper Networks Inc...
Страница 346: ...Copyright 2010 Juniper Networks Inc 320 JunosE 11 2 x IP Services Configuration Guide...
Страница 356: ...Copyright 2010 Juniper Networks Inc 330 JunosE 11 2 x IP Services Configuration Guide...