0

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?

  • Please edit your question to include enough information to answer the question. For example, the full router configurations, the routing tables, the routing protocol tables, etc. You can refer to the Network Engineering Question Checklist for guidance, then edit your question. – Ron Maupin Feb 23 '19 at 0:05
2

The network statement functions differently in OSPF and BGP.

In BGP, the network statement specifies which networks in the routing table will be advertised to BGP peers.

In contrast, in OSPF the network statement specifies which router interfaces are included in the OSPF domain (and in which area).

It would be helpful to see your full configurations (and a simple diagram) in order to give you a more complete answer.

| improve this answer | |
  • 1
    "In BGP, the network statement specifies which networks in the routing table will be advertised to BGP peers." The caveat to that is the BGP match must be exact, unlike the OSPF network statements that do not need to be an exact match to include interfaces. – Ron Maupin Feb 22 '19 at 20:58
  • well if i replace the netowrk 0.0.0.0.0 255.255.255.255 with network 8.8.8.0 0.0.0.255, it doesnt blackhole it. But it seems that those are actually the only two ways to keep the route form getting blackholed. So it SHOULD work the same if i just put that address in a route-map, then call that route-map from the OSPF process, but it doesnt work – Octavian Feb 22 '19 at 21:16
  • 1
    @octavian Without the configurations we really can’t answer your question. – Ron Trunk Feb 22 '19 at 23:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.