Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

BGP <--> OSPF sample config

Hi,

Later today I need to configure an MPLS router running BGP to send advertisements to my LAN switch running OSPF and I need my LAN switch to send the LAN subnets into BGP.

Can anyone provide a sample config please? I'm assuming this can all be done on the BGP router and nothing would be needed on my LAN switch, but please advise.

Example network info:

BGP (BR) IP 10.8.0.3

OSPF (LAN) IP 10.8.0.10

Inside networks:

10.8.0.0/24

10.8.10.0/24

10.10.0.0/16

10.15.0.0/16

10.8.4.0 and 10.8.24.0 exists in another MPLS site so I can't collapse the 10.0.0.0 network at this time.

Regards

Jeff

1 REPLY
Hall of Fame Super Silver

Re: BGP <--> OSPF sample config

Hello Jeff,

in BGP you can advertise a prefix known in the IP routing table by any means with:

router bgp xx

network 10.8.0.0 mask 255.255.255.0

network 10.8.10.0 mask 255.255.255.0

network 10.10.0.0 mask 255.255.0.0

network 10.15.0.0 mask 255.255.0.0

if the MPLS link is the exit point towards everything you can have the router running BGP and OSPF to inject a default route in OSPF

router ospf 10

default-information originate

without always option the default route is injected only if a default route is present in the router IP routing table by any means, static route or BGP route.

if only some prefixes have to learned you need to redistribute BGP into OSPF

router ospf 10

red bgp xx subnets

! the subnets keyword is very important to correctly inject routes into OSPF

Hope to help

Giuseppe

327
Views
5
Helpful
1
Replies
CreatePlease login to create content