Filtering routes OSPF inter-area

brewoz40brewoz40 Member Posts: 57 ■■□□□□□□□□
I'm having issues grassping this, I'm playing around with prefix list, route-maps, etc to practice filtering routes. What I can't figure it is this secnario;
3 routers:
R1----R2----R3
R1 is in area 0
R2 is the abr in area 0 and 20
R3 is in area 20
I have a few loopbacks configured on R3, 10.20.0.1 - 10.20.3.1 /24, configured as ospf point to point.
I'm trying to filter those routes from being advertised out area 20 to R1 by R2 by using a prefix list along with the area filter list command. Here is what i have for the prefix list and filter list on R2:
ip prefix-list FILTER_ROUTES deny 10.20.0.0/24 le 32
That should match the first 24 bits, 10.20.0 and then block anything up to 32 bit in lenght correct? I know i'm missing something as it's not working. Here is the filter list on R2 under ospf:
area 20 filter-list prefix FILTER_ROUTES out

Comments

  • wrwarwickwrwarwick Member Posts: 104
    If you do a sh ip route on R3 do the loopbacks show as /32 or /24?
  • brewoz40brewoz40 Member Posts: 57 ■■□□□□□□□□
    they show as /24
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Looks like it should work to me. Have you tried waiting for the LSA to time out or restarting the OSPF process?

    You might also want a permit in that prefix-list to allow everything else.
    An expert is a man who has made all the mistakes which can be made.
  • wrwarwickwrwarwick Member Posts: 104
    brewoz40 wrote: »
    area 20 filter-list prefix FILTER_ROUTES out

    Actually, try area 0 filter-list prefix FILTER_ROUTES in
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Also on your prefix-list, 10.20.0.0/24 le 32 is only going to match on the one /24. You can do multiple lines for what you want to accomplish or do a 10.20.0.0/16 le 24 to get rid of all the /24 in the 10.20.0.0/16 range.
    An expert is a man who has made all the mistakes which can be made.
  • brewoz40brewoz40 Member Posts: 57 ■■□□□□□□□□
    Sweet!! thanks wrwarwick and networker, it's working now. understand now you can't filter ospf outbound using a prefix list as ospf uses lsa's, still working on grassping the le ge in prefix list, not sure why i'm struggleing with the syntax so much!! thanks to you both!!
  • networker050184networker050184 Mod Posts: 11,962 Mod
    brewoz40 wrote: »
    Sweet!! thanks wrwarwick and networker, it's working now. understand now you can't filter ospf outbound using a prefix list as ospf uses lsa's, still working on grassping the le ge in prefix list, not sure why i'm struggleing with the syntax so much!! thanks to you both!!

    You can filter outbound with a prefix-list as far as I know. OSPF uses LSAs regardless if you are filtering in or out.
    An expert is a man who has made all the mistakes which can be made.
  • vinbuckvinbuck Member Posts: 785
    Here is a nice little write up on OSPF filtering

    Filtering OSPF Areas in OSPF

    Inter-area (at the ABR) - inbound/outbound
    Intra-area - inbound only

    As networker said, the LSDB will still know about the routes within an area, but the routing table will not
    Cisco was my first networking love, but my "other" router is a Mikrotik...
  • brewoz40brewoz40 Member Posts: 57 ■■□□□□□□□□
    once again i stand corrected, thanks! re-read a bunch of stuff, to much info trying to soak in!
  • brewoz40brewoz40 Member Posts: 57 ■■□□□□□□□□
    Thanks for the resource!
Sign In or Register to comment.