Access Lists
An access list is a sequential collection of permit and deny conditions that you can use
to filter inbound or outbound routes. You can use different kinds of access lists to filter
routes based on either the prefix or the AS path.
Filtering Prefixes
To filter routes based on the prefix, you can do any of the following:
•
Define an access list with the
access list
command and apply the list to routes received
from or passed to a neighbor with the
neighbor distribute-list
command.
•
Define a prefix list with the
ip prefix-list
command and apply the list to routes received
from or passed to a neighbor with the
neighbor prefix-list
command.
•
Define a prefix tree with the
ip prefix-tree
command and apply the list to routes received
from or passed to a neighbor with the
neighbor prefix-tree
command.
The router compares each route’s prefix against the conditions in the list or tree 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 address; that is, the last action of any list is an implicit deny condition
for all routes. The implicit rule is displayed by
show access-list
and
show configuration
commands.
You cannot selectively place conditions in or remove conditions from an access list, prefix,
list, or prefix tree. You can insert a new condition only at the end of a list or tree.
Consider the network structure in Figure 21 on page 82.
Figure 21: 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.
host3(config)#
router bgp 17
host3(config-router)#
neighbor 10.5.5.4 remote-as 873
host3(config-router)#
neighbor 10.5.5.4 distribute-list reject1 in
host3(config-router)#
exit
host3(config)#
access-list reject1 permit 172.24.48.0 0.0.255
Copyright © 2010, Juniper Networks, Inc.
82
JunosE 11.2.x BGP and MPLS Configuration Guide
Содержание JUNOSE 11.2.X BGP AND MPLS
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 8: ...Copyright 2010 Juniper Networks Inc viii JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 38: ...Copyright 2010 Juniper Networks Inc 2 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 192: ...Copyright 2010 Juniper Networks Inc 156 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 242: ...Copyright 2010 Juniper Networks Inc 206 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 244: ...Copyright 2010 Juniper Networks Inc 208 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 310: ...Copyright 2010 Juniper Networks Inc 274 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 356: ...Copyright 2010 Juniper Networks Inc 320 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 418: ...Copyright 2010 Juniper Networks Inc 382 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 524: ...Copyright 2010 Juniper Networks Inc 488 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 544: ...Copyright 2010 Juniper Networks Inc 508 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 608: ...Copyright 2010 Juniper Networks Inc 572 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 672: ...Copyright 2010 Juniper Networks Inc 636 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 674: ...Copyright 2010 Juniper Networks Inc 638 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 716: ...Copyright 2010 Juniper Networks Inc 680 JunosE 11 2 x BGP and MPLS Configuration Guide...
Страница 717: ...PART 6 Index Index on page 683 681 Copyright 2010 Juniper Networks Inc...
Страница 718: ...Copyright 2010 Juniper Networks Inc 682 JunosE 11 2 x BGP and MPLS Configuration Guide...