11-29-2016 03:23 PM - edited 03-05-2019 07:34 AM
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
12-01-2016 10:34 AM
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
06-22-2017 08:29 AM
could you find out what was the issue/glitch ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide