I have a challenging situation. I have two routers, in VIRL, sharing routes via BGP and OSPF I am attempting to remove the "network area 0" from my OSPF process. I have tried to replace it with a route map:

ip access-list standard CONNECTED-NETWORKS     

 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 with a floating route and matching any 32 bit prefix in a route-map:

ip route Null0 250 tag 9999

and redistributing that in BGP.

My new route-map that redistribute the network via OSPF should work fine, and it indeed does, but only after I add and remove the "network area 0" a couple of times.

Odd behavior. When I first remove that statement form my OSPF process, the BGP route-map blackholes the 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

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.

  • 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 with network, 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
    – Shōgun8
    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.