I have a challenging situation. I have two routers, in VIRL, sharing routes via BGP and OSPF I am attempting to remove the "network 0.0.0.0 255.255.255.255 area 0" from my OSPF process. I have tried to replace it with a route map:
ip access-list standard CONNECTED-NETWORKS
permit 8.8.8.0 0.0.0.255
route-map REDISTRIBUTE-CONNECTED-NETWORKS permit 10
match ip address CONNECTED-NETWORKS
set metric 0
!
router ospf 12345
redistribute connected subnets route-map REDISTRIBUTE-CONNECTED-NETWORKS
But for my BGP advertisements, I am black-holing any routes that are more specific than 8.8.8.0 with a floating route and matching any 32 bit prefix in a route-map:
ip route 8.8.8.0 255.255.255.0 Null0 250 tag 9999
and redistributing that in BGP.
My new route-map that redistribute the 8.8.8.0 network via OSPF should work fine, and it indeed does, but only after I add and remove the "network 0.0.0.0 255.255.255.255 area 0" a couple of times.
Odd behavior. When I first remove that statement form my OSPF process, the BGP route-map blackholes the 8.8.8.0 network. But after I add it again then remove it, the route no longer gets blackholed. Why is this? Is it a bug in VIRL?