cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
466
Views
0
Helpful
2
Replies

BGP and OSPF

cisconoobie
Level 2
Level 2

If I'm using OSPF as my IGP routing between the internal networks and I have 2 different BGP default routes. How do i setup OSPF to be able to use either one of the routes or both?

2 Replies 2

bvsnarayana03
Level 5
Level 5

The way I see the solution, redistribute BGP in to OSPF with metric-type E1. This way, it would calculate the metric to reach destination as aggregate of metric used for redistribution + metric before redistribution.

however, you may use route-maps to prevent BGP from flooding the routing table & redistribute only default-routes.

What if I use this, will it cause a loop?

ISP-R1: 10.0.0.1

ISP-R2: 20.0.0.1

Customer-R3: 10.0.0.2 30.0.0.1/24

Customer-R4: 20.0.0.2 30.0.0.2/24

Customer-R3:

router bgp 100

neighbor 10.0.0.1 remote-as 200

neighbor 20.0.0.2 remote-as 100

neighbor 20.0.0.2 next-hop-self

bgp redistribute-internal

router ospf 10

redistribute bgp 100 route-map mydef

ip prefix-list def-route seq 5 permit 0.0.0.0/0

route-map mydef permit 10

match ip address prefix-list def-route

Customer-R4:

router bgp 100

neighbor 20.0.0.1 remote-as 200

neighbor 10.0.0.2 remote-as 100

neighbor 10.0.0.2 next-hop-self

bgp redistribute-internal

router ospf 10

redistribute bgp 100 route-map mydef

ip prefix-list def-route seq 5 permit 0.0.0.0/0

route-map mydef permit 10

match ip address prefix-list def-route

If I have a 3rd router running ospf, would this create 2 default route entries? Can I get a loop somehow?

Review Cisco Networking for a $25 gift card