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

Redistributing EBGP to OSPF and Setting Metric

epancer-fhlbc
Level 1
Level 1

I'm trying to redistribute a handful of routes learned from EBGP to OSPF and set the metric accordingly to be higher (due to this being a backup site). Should I set the metric in the route-map in the core (as the route is learned from BGP), or is there a configuration issue below that may be causing problems?

Thanks in advance.

EBGP Peer

router bgp 65300

 no sync

 no auto

 neighbor 10.10.10.10 remote-as 65200

 neighbor 10.10.10.10 route-map EBGP-TO-CORE-OUT out

!

route-map EBGP-TO-CORE-OUT permit 10

 match ip address prefix-list REMOTE_ADDR

 set metric 313

!

ip prefix-list REMOTE_ADDR seq 10 permit 192.168.0.0/16

Core (running EBGP and OSPF)

router bgp 65200

 no sync

 no auto

 neighbor 20.20.20.20 remote-as 65300

 neighbor 20.20.20.20 route-map EBGP-TO-CORE-IN in

!

route-map EBGP-TO-CORE-IN permit 10

 match ip address prefix-list REMOTE_ADDR

!

ip prefix-list REMOTE_ADDR seq 10 permit 192.168.0.0/16

!

router ospf 700

redistribute bgp 65200 metric-type 1 subnets tag 65200 route-map EBGP-TO-CORE-IN
network 10.10.0.0 0.0.255.255 area 0
!

Now when I look at my route I do see 192.168.0.0/16 redistributed into OSPF, but without the metric.

R1#show ip route 192.168.0.0

Routing entry for 192.168.0.0/16
Known via "ospf 250", distance 110, metric 101
Tag 65200, type extern 1
Last update from 10.10.10.10 on FastEthernet0/0, 00:13:34 ago
Routing Descriptor Blocks:
* 10.10.10.10, from 10.10.63.227, 00:13:34 ago, via FastEthernet0/0
Route metric is 101, traffic share count is 1
Route tag 65200

R1# show ip route ospf | inc 192.168.0.0

O E1 192.168.0.0/16 [110/101] via 10.10.63.179, 00:19:59, FastEthernet0/0

2 Replies 2

Richard Burts
Hall of Fame
Hall of Fame

I find it odd to use the same route map both to control the BGP inbound advertisement and to control the redistribution into OSPF. I believe that it would be better if there were separate route maps for BGP advertisement and for OSPF redistribution.

When you redistribute from BGP into OSPF there is not anything to set the metric other than setting the type to 1 which indicates to use local metrics. If you want the redistributed routes to have a higher metric then you need to set that metric as the route is redistributed.

HTH

Rick

HTH

Rick

could you find out what was the issue/glitch ? 

Review Cisco Networking products for a $25 gift card