12-01-2008 10:15 AM - edited 03-04-2019 12:33 AM
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
12-01-2008 10:22 AM
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
12-01-2008 10:28 AM
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
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