04-02-2010 05:01 AM - edited 03-04-2019 08:00 AM
If I apply the following configuration 10.1.0.0/17 is correctly filtered (not shown in the BGP table):
ip prefix-list FILTER deny 10.1.0.0/17
ip prefix-list FILTER permit 0.0.0.0/0 le 32
router eigrp 100
distribute-list prefix FILTER out eigrp 100
router bgp 100
redistribute eigrp 100
If I follow the same approach with OSPF it doesn't work (I see no matches against the prefix-list and 10.1.0.0/17 is in the BGP table). I tried the following two ways:
router ospf 1
distribute-list prefix FILTER out bgp 100
distribute-list prefix FILTER out ospf 1
Whereas if I apply a distribute list in BGP the OSPF filtering does work:
ip prefix-list FILTER deny 10.1.0.0/17
ip prefix-list FILTER permit 0.0.0.0/0 le 32
router bgp 100
redistribute ospf 1 metric 50 match external 2
distribute-list prefix FILTER out ospf 1
These discrepancies frustrate me! Can anyone please explain why this is? Thanks.
Solved! Go to Solution.
04-02-2010 05:57 AM
Hello Richard,
if you are redistributing into BGP the right place to implement route filtering is the BGP process the line red OSPF allows for invoking a route-map
What you see with EIGRP is the effect of
distribute-list prefix FILTER out
this has a direct effect on EIGRP domain: the filtered prefix is not sent out by this node in EIGRP updates
this can be seen as a side effect of this command
For OSPF only meaningful cases are:
distribute-list in
or
distribute-list out xx
that is it applies for routes redistributed from source-protocol into OSPF not the opposite
hint:
the filtered prefix is still sent out in OSPF updates
for this reason the commands are ineffective for redistribution of OSPF into BGP
see
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800943c5.shtml
Hope to help
Giuseppe
04-02-2010 05:14 AM
Hello Richard,
OSPF is link state EIGRP is distance vector
so the use of distribute-list with OSPF provides different effects
An OSPF router is constrained in having an OSPF database in sync with the OSPF peers in same area
distribute-list in can be used to avoid to install an OSPFroute in the IP routing table but does not change the DB content (no filter in DB)
distribute-list out can work in conjunction of routes being redistributed into OSPF
so if you have
router ospf 10
red bgp 100
distribute-list out prefix FILTER out
that is the command distribute is not effective alone and applies to routes coming from BGP in deciding what OSPF LSA 5 external routes to inject in OSPF domain.
when performing redistribution you add a point where route filtering is possible and BGP again has DV properties
Hope to help
Giuseppe
04-02-2010 05:29 AM
Hi Giuseppe,
In this scenario I'm trying to filter routes as they leave the IGP. With EIGRP an outbound distribute-list affects the routes redistributed, or received into BGP. When I try a similar configuration with OSPF it doesn't work - it does work when I use a distribute-list in BGP.
When redistributing routes out of EIGRP or OSPF into BGP would the behavior not be similar as it's just prefixes and metrics that are being passed on?
Thanks,
Richard
04-02-2010 05:57 AM
Hello Richard,
if you are redistributing into BGP the right place to implement route filtering is the BGP process the line red OSPF allows for invoking a route-map
What you see with EIGRP is the effect of
distribute-list prefix FILTER out
this has a direct effect on EIGRP domain: the filtered prefix is not sent out by this node in EIGRP updates
this can be seen as a side effect of this command
For OSPF only meaningful cases are:
distribute-list in
or
distribute-list out xx
that is it applies for routes redistributed from source-protocol into OSPF not the opposite
hint:
the filtered prefix is still sent out in OSPF updates
for this reason the commands are ineffective for redistribution of OSPF into BGP
see
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800943c5.shtml
Hope to help
Giuseppe
04-02-2010 06:52 AM
Thanks Giuseppe - I'm studying towards my R&S lab which is why I'm trying to think of lots of ways of doing things...!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide