Skip to main content
robdog
New Member
October 5, 2017
Question

Redistributing specific AWS BGP routes into OSPF

  • October 5, 2017
  • 2 replies
  • 4305 views

Hi All,

 

I want to redistribute a specific route from bgp to ospf, i've done the following and would like some input as to wether it will work as i don't like to test code in production ;)

 

get router info routing-table bgp B 192.168.20.0/22 [20/100] via x.x.x.x, awsvpn, 04:40:40

config router access-list

edit "wanted-bgp-routes"

config rule edit 1 set prefix 192.168.20.0 255.255.252.0 set exact-match enable next

 

config router route-map edit "bgp-to-ospf" config rule edit 1 set match-ip-address "wanted-bgp-route" next

config router ospf

config redistribute bgp

set status enable set routemap bgp-to-ospf

 

Kudos for any input :)

    2 replies

    MikePruett
    New Member
    October 5, 2017

    That's how I would do it...it looks right. Don't take my word for it though, lets get some more confirmations to make sure I'm not missing something simple.

    robdog
    robdogAuthor
    New Member
    October 5, 2017

    Thanks Mike for the quick response, my sentiments exactly but i dont mess around with bgp to ospf too offten.

     

    I've done this in my lab and got positive results on my simulated core.

     

    Core#sh ip route 192.168.20.0 longer-prefixes Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP a - application route + - replicated route, % - next hop override

    Gateway of last resort is 1.1.1.1 to network 0.0.0.0

    O E2 192.168.20.0/22 [110/10] via 1.1.1.1, 00:16:59, Vlan100