background image
Creating BGP Policies
325
of the router. Let's look at an example of an access list that allows routes
from network 172.16.0.0.
RouterA(config)#access-list 105 permit ip 172.16.0.0
0.0.255.255 host 255.255.0.0
There is always an implicit deny all at the end of the access list that can't
be seen. We're permitting only network 172.16.0.0 in this access list. How-
ever, although the access list has been created, we need to filter all of the BGP
traffic coming in. Let's take a look at how to do this:
RouterA(config)#router bgp 31400
RouterA(config-router)#neighbor 172.16.11.254 remote-as
31400
RouterA(config-router)#neighbor 172.16.12.254 remote-as
31400
RouterA(config-router)#neighbor 172.16.11.254 distribute-
list 105 in
Prefix Lists
Prefix lists are actually new and have been added to version 12.0 and later
of the Cisco IOS. You can use a prefix list as an alternative to the access lists
used in many of the BGP route-filtering commands. There are many advan-
tages to using prefix lists. Prefix lists don't tax the processor as much as
access lists, which can improve the router's performance.
With a prefix list, you need to make configuration modifications to each
router, but you can do this incrementally just as you can with route reflec-
tors. This means that you can implement prefix lists on just a few routers in
your network at a time instead of all at once.
The biggest advantage of prefix lists over distribute lists is that prefix lists
have much greater flexibility and are considerably easier to configure. If you
make a mistake with an access list, you must start over because access lists
are read in the order you type them in, making them hard to modify. Prefix
lists allow you to add and delete lines without starting over.
Prefix lists use the same line-by-line read rule as access lists, which says
that as soon as I have a match in my list to the data I receive, I start process-
ing. You need to also remember that, just as in access lists, the same implicit
Copyright ©2001 SYBEX , Inc., Alameda, CA
www.sybex.com