cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
936
Views
0
Helpful
4
Replies

BGP to OSPF

baxta2712
Level 1
Level 1

Hi

Could anyone help me?

My simplified scenario is:

I have two iBGP neighbor

neighbor X.X.X.X

and

neighbor Y.Y.Y.Y

I am redistributing BGP into OSPF

and I need neighbor X.X.X.X to have lower metric than Y.Y.Y.Y in OSPF domain

how can I solve this?

thank you in advance

1 Accepted Solution

Accepted Solutions

Hello Giorgi,

you can use an ACL to define BGP next-hop(s) to be matched

access-list 11 permit host A.B.C:D

route-map BGP-to-OSPF permit 10

match ip next-hop 11

set metric-type type-1

set metric 10

see match ip next-hop in command reference

http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_pi/command/iri-cr-a1.html#GUID-8E887F08-155C-4D90-876D-F3F591BBDC6A

I have used this successfully in the past

Hope to help

Giuseppe

View solution in original post

4 Replies 4

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Giorgi,

you can use a route-map where you will set the seed metric

route-map BGP-to-OSPF permit 10

! match conditions here as needed

set metric-type type-1

set metric 10

on second router you set an higher seed metric like 100, with two ASBR nodes the use of O E1 metric-type type-1 is recommended

router ospf 10

redistribute bgp route-map BGP-to-OSPF subnets

The subnets keyword is also important to avoid automatic summarization during redistribution

You may need a specifc command under router bgp to allow redistribution of iBGP into OSPF

router bgp

bgp redistribute-internal

see

http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_bgp/command/bgp-a1.html#GUID-840E8371-2A6D-4B23-ADEA-4CAB4634C07E

Hope to help

Giuseppe

     I want to match only routes from certain neighbors, this routes may change and because of this I can not define routes in access-list.

Hello Giorgi,

you can use an ACL to define BGP next-hop(s) to be matched

access-list 11 permit host A.B.C:D

route-map BGP-to-OSPF permit 10

match ip next-hop 11

set metric-type type-1

set metric 10

see match ip next-hop in command reference

http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_pi/command/iri-cr-a1.html#GUID-8E887F08-155C-4D90-876D-F3F591BBDC6A

I have used this successfully in the past

Hope to help

Giuseppe

thank you

Review Cisco Networking products for a $25 gift card