I'm having a strange problem redistributing iBGP routes to OSPF on Nexus 9000. Initially I had an open prefix list to get things working. Some of the routes weren't being redistributed to OSPF and I found this article which helped which said you need to 'match route-type internal'
https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/nx-os-software/200185-Configure-Redistribution-of-iBGP-Routes.html
Now everything is working I am trying to lock down the prefix list but it seems to completely ignore the prefix list. Even if I only have a statement of deny 0.0.0.0/0 it still redistributes everything
ip prefix-list permit-bgp-to-ospf seq 10 permit 10.0.10.0/24
ip prefix-list permit-bgp-to-ospf seq 10 permit 10.0.20.0/24
route-map redistribute-bgp-ospf permit 10
match ip address permit-bgp-to-ospf
match route-type internal
route-map redistribute-bgp-ospf permit 20
match ip address permit-bgp-to-ospf
For the permit 10 statement my understanding is it's a logical AND statement (it needs to match the prefix list as well as be type internal)
The reason I had the permit 20 statement is because some of the routes are not type 'internal' and I only want one prefix list to maintain.
I know the route-map is being referenced correctly because if I put a deny 5 statement then all the routes disappear.
Anybody seen this before?
Thanks