02-24-2010 10:28 PM
hello all- I have two Ex4200 switches connected to each other and running ospf. I would like to change metric on few routes when sent from switch1 to switch2 and while keeping default metrics on all other routes. I tired export policy from the advertising switch but it did not work..then i tried import policy on the receiveing switch..which also did not work. How can i accomplish this. I tried the following policy
policy-statement test-subnets {
term test-subnets {
from {
route-filter 10.1.0.0/23 exact;
route-filter 10.1.16.0/23 exact;
}
then {
metric 5;
accept;
}
}
then accept;
}
applied it as export and then also tried it as import on the receving switch...TIA
02-25-2010 12:15 AM
Hi,
you must not alter OSPF metrics with the help of policies because that would break the SPF algorithm. The metric is calculated based on the costs of a specific interface by dividing the reference bandwidth (100 MBit) by the interface bandwidth with always rouding up to 1. So Gigabit interfaces get a cost of 1.
In case that these two /23 routes come from directly connected interfaces, you can modify the interface cost (metric) by using this command:
set protocols ospf area x interface ge-a/b/c.0 metric y
You can also modify the reference bandwidth by "set protocols ospf reference-bandwidth".
Regards,
Dominik
02-26-2010 09:41 AM
Hi Dominik , but what if he wanted to chage the metric for specific routes ? your method will change metric for all routes
02-26-2010 11:56 AM
Hi,
this came also to my mind, but after submitting my post.
As he also posted the question under the Routing topic I did not supplement a clarification.
Regards,
Dominik