cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
866
Views
0
Helpful
3
Replies

ospf-bgp repair

followurself
Level 1
Level 1

Hello

can someone suggest on the design. we had some issues recently

Customer site A
ISP-WAN-R1,ISP-WAN-R2, CUSt-WAN-R1 and CUSt-WAN-R2 run ospf and have their own area , area 0

CUST-WAN-R1, CUST-WAN-R2, CUST-LAN-6509A and CUST-LAN-6509B run ospf and have their own area , area 0

6509A and 6509B have networks 10.1.0.0 and 191.1.0.0. they are annouced using ospf by them
CUST-WAN-R1 and CUST-WAN-R2 learn about these networks
CUST-WAN-R1 and CUST-WAN-R2 with thier OSPF  running send infor about network 10.1.0.0 and 191.1.0.0 to  ISP-WAN-R1 and ISP-WAN-R2

ISP-WAN-R1 and ISP-WAN-R2 have EBGP configured and they send these routes into MPLS cloud to reach customer site b and customer site c
ISP-WAN-R1 and ISP-WAN-R2 should send routes of customer site b and c to

At customer site B and customer site C, there is similar  set up to Customer site A

what is requried is no load balancing but have a primary path as shown in the attachment and have a backup path

how should OSPF be configured at all customer sites?
how should BGP be configured on ISP WAN routers at all sites?
there was issue recently when both CUST-WAN-R1 and CUST-WAN-R2 stopped sending traffic to 10.1.0.0 and 191.1.0.0
both these routers were not learning them from CUSt-WAN-R1 and CUSt-WAN-R2 via ospf but in thier routing table there was EBGP with AD 20/0 for 10.1.0.0 and 191.1.0.0

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Followyourself,

>> how should OSPF be configured at all customer sites?
how should BGP be configured on ISP WAN routers at all sites?

BGP routes should be redistributed into OSPF using OSPF O E1 external route type with an higher seed metric on less preferred path.

router ospf 10

redistribute bgp 10 subnets type 1 route-map setmetric

route-map setmetric

set metric 50

on second router:

router ospf 10

redistribute bgp 10 subnets type 1 route-map setmetric2

route-map setmetric2

set metric 5000

My guess is that your recent issue was caused by mutual redistribution between OSPF and BGP done on border routers.

This should be avoided or handled in the correct way: having two border routers you would have two different ASBR.

BGP allows to advertise networks with network command if they are known in the IP routing table by any mean including OSPF

under router bgp:

remove redistribute OSPF if present and use

network commands, match some component routes exactly including their actual subnet mask

example if there is a 10.1.15.16/28 prefix in IP routing table to match it you should use:

network 10.1.15.16 mask 255.255.255.240

you can create aggregate prefixes if desired with  aggregate-address only command:

aggregate-address 10.1.0.0 255.255.0.0 summary-only

the component route above is not sent to eBGP neighbor only the aggregate 10.1.0.0/16.

if all component routes of net 10.1.0.0/16 disappear from IP routing  table and then from BGP table the router will withdraw the advertisement of the aggregate address.

Doing this in all sites should avoid undesired re-injection from MPLS cloud of local networks on eBGP sessions.

Hope to help

Giuseppe

View solution in original post

3 Replies 3

johnnylingo
Level 5
Level 5

The part you're describing in the last semtence is very common in BGP / OSPF MPLS environments.   eBGP routes have an AD of 20, OSPF routes have an AD of 110.  Therefore, eBGP routes are preferred and the traffic gets routed back to the MPLS cloud rather than taking OSPF.

The easy way to fix this is "BGP backdoor", which will change the AD to 200.   OSPF routes will then be preferred. 

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Followyourself,

>> how should OSPF be configured at all customer sites?
how should BGP be configured on ISP WAN routers at all sites?

BGP routes should be redistributed into OSPF using OSPF O E1 external route type with an higher seed metric on less preferred path.

router ospf 10

redistribute bgp 10 subnets type 1 route-map setmetric

route-map setmetric

set metric 50

on second router:

router ospf 10

redistribute bgp 10 subnets type 1 route-map setmetric2

route-map setmetric2

set metric 5000

My guess is that your recent issue was caused by mutual redistribution between OSPF and BGP done on border routers.

This should be avoided or handled in the correct way: having two border routers you would have two different ASBR.

BGP allows to advertise networks with network command if they are known in the IP routing table by any mean including OSPF

under router bgp:

remove redistribute OSPF if present and use

network commands, match some component routes exactly including their actual subnet mask

example if there is a 10.1.15.16/28 prefix in IP routing table to match it you should use:

network 10.1.15.16 mask 255.255.255.240

you can create aggregate prefixes if desired with  aggregate-address only command:

aggregate-address 10.1.0.0 255.255.0.0 summary-only

the component route above is not sent to eBGP neighbor only the aggregate 10.1.0.0/16.

if all component routes of net 10.1.0.0/16 disappear from IP routing  table and then from BGP table the router will withdraw the advertisement of the aggregate address.

Doing this in all sites should avoid undesired re-injection from MPLS cloud of local networks on eBGP sessions.

Hope to help

Giuseppe

thanks for the reply and explanation

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco