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

chane ospf metric

mohamed.taher
Level 1
Level 1

can i change ospf update metric using route map? note i have one ospf instance.

the configuration:

router ospf 1

log-adjacency-changes

network 10.1.1.0 0.0.0.255 area 0

network 33.33.33.33 0.0.0.0 area 0

distribute-list route-map cisco in

route-map cisco permit 10

match ip route-source 2 10

set metric -20

access-list 2 permit 22.22.22.22

access-list 2 permit 10.1.1.2

access-list 10 permit 22.22.22.22 0.0.0.0

2 Replies 2

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Mohamed,

OSPF is link state so I don't think your configuration can work and also setting a negative metric is not allowed (probably can only be used with MPLS TE tunnels) in normal IPv4 routing.

You can influence the router to use or not to use the link state information received by modifying the ospf cost of the link to router with OSPF router-id 22.22.22.22.

Hope to help

Giuseppe

hi mohamed,

I think ,It's not going to work. Because a "distribute-list in" command lets the router to put OSPF routes into the RIB as allowed by a distribute-list command. It already passed the process of SPF to calculate the metric. You can modify the bandwidth or cost on the interface to accomplish this!!!

Toshi

Review Cisco Networking products for a $25 gift card