BGP <--> OSPF sample config

Unanswered Question
Nov 11th, 2009
User Badges:

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
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Giuseppe Larosa Wed, 11/11/2009 - 05:17
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

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




Actions

This Discussion