Re: OSPF Filtering question

From: Petr Lapukhov (petr@internetworkexpert.com)
Date: Wed Jul 05 2006 - 03:02:42 ART


A little proff here:

R3, R4, R5 share NBMA segment:

149.1.254.0/24

Rack1R5#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
150.1.3.3 0 FULL/ - 00:01:42 149.1.254.3 Serial0/0
150.1.4.4 0 FULL/ - 00:01:58 149.1.254.4 Serial0/0

Step 1:

Advertising Lo0 from R3, verifying that R5 sees it as intra-area route:

Rack1R5#sh ip route ospf
     149.1.0.0/16 is variably subnetted, 8 subnets, 2 masks
O 149.1.254.3/32 [110/64] via 149.1.254.3, 00:00:03, Serial0/0
O 149.1.254.4/32 [110/64] via 149.1.254.4, 00:00:03, Serial0/0
O 149.1.44.0/24 [110/74] via 149.1.254.4, 00:00:03, Serial0/0
     150.1.0.0/16 is variably subnetted, 2 subnets, 2 masks
O 150.1.3.3/32 [110/65] via 149.1.254.3, 00:00:03, Serial0/0

Step2:

Creating route-map to filter on next-hop:

access-list 1 permit 149.1.254.3
!
route-map TEST deny 10
 match ip next-hop 1
!
route-map TEST permit 20

Step3:

Applying route-map and testing:

conf t
router ospf 1
distribute-list route-map TEST in
end

clear ip route *

Rack1R5#sh ip route ospf
     149.1.0.0/16 is variably subnetted, 7 subnets, 2 masks
O 149.1.254.4/32 [110/64] via 149.1.254.4, 00:00:03, Serial0/0
O 149.1.44.0/24 [110/74] via 149.1.254.4, 00:00:03, Serial0/0

HTH

2006/7/4, Narbik Kocharians <narbikk@gmail.com>:
>
> Unbelievable
>
> On 7/4/06, Petr Lapukhov <petr@internetworkexpert.com> wrote:
> >
> > Forgot to mention,
> >
> > this feature is particularly useful in case where you have
> > shared interface with multiple neighbors. In other cases
> > you may stick with basic distribute-list functionality.
> >
> > HTH
> >
> > 2006/7/4, Petr Lapukhov <petr@internetworkexpert.com>:
> > >
> > > Just a quick note here,
> > >
> > > you may also opt to use "distribute-list with route-map" at R3,
> > > to filter inbound routes based on next-hop value (or output
> interface),
> > > directly at "receiving" router.
> > >
> > >
> >
> http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120limit/120s/120s24/routmap.htm
> > >
> > >
> > > filtering with distance won't work here, since external routes all
> have
> > > the same
> > > advertising RID (route-source).
> > >
> > > Everything else should probably use "database-filter" or cost
> > manipulation
> > > in some
> > > way (max-metric falls under that category too), to adjust
> > forward-metric.
> > >
> > > HTH
> > >
> > > --
> > > Petr Lapukhov, CCIE #16379
> > > petr@internetworkexpert.com
> > >
> > > Internetwork Expert, Inc.
> > > http://www.InternetworkExpert.com
> > > Toll Free: 877-224-8987
> > > Outside US: 775-826-4344
> > >
> > > 2006/7/4, D.H. Williams <draythw@gmail.com>:
> > >
> > > > Hey fellows,
> > > >
> > > > All right, was tinkering with OSPF filtering last night, and got a
> few
> > > > questions and what have not I wanted to ask, to see what everyone
> has
> > to
> > > > say. Consider the following situation:
> > > >
> > > > R5 with two point-to-point subinterfaces going to R1 and R2.
> > > >
> > > > R1 and R2 have hdlc connections up to R3.
> > > >
> > > > All of the above links are running OSPF; backend of R5 is running
> > RIP;
> > > > Mutual Redistribution on R5.
> > > >
> > > > Now, let's say I want the following scenerio, I want R3 to get to
> all
> > > > the
> > > > RIP routes (E2) via R1. I tried the distribute-list statement on R2
> > > > using
> > > > teh route-map, but this just affects the route table, not the ospf
> > > > database,
> > > > so r2 still advertise the E2 routes up to R3, even though they
> aren't
> > in
> > > > his
> > > > routing table.
> > > >
> > > > My question, how can I affect R3 to where it prefers R1, including
> not
> > > > seeing anything advertise from R2 in the routing table? I'd also
> like
> > > > R2 to
> > > > route through R3 to get to Rip routes. And i'm looking for a
> solution
> > > > that
> > > > doesn't use cost or bandwidth (too easy and obvious, you know).
> > > >
> > > > Thanks in advance!
> > > > D
> > > >
> > > >
> > _______________________________________________________________________
> > > > Subscription information may be found at:
> > > > http://www.groupstudy.com/list/CCIELab.html
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Petr Lapukhov, CCIE #16379
> > petr@internetworkexpert.com
> >
> > Internetwork Expert, Inc.
> > http://www.InternetworkExpert.com
> > Toll Free: 877-224-8987
> > Outside US: 775-826-4344
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>

-- 
Petr Lapukhov, CCIE #16379
petr@internetworkexpert.com

Internetwork Expert, Inc. http://www.InternetworkExpert.com Toll Free: 877-224-8987 Outside US: 775-826-4344



This archive was generated by hypermail 2.1.4 : Tue Aug 01 2006 - 07:13:46 ART