I have an srx240 running 2 routing instances with OSPF. I'm importing the OSPF routes learned from the trust VR into the untrust VR and advertising them out. However, they are coming out as E2 routes and I'm told I need to change the cost of one of the routes. I believe the only way to do this is to import the route as an E1 so that I can change the cost when I advertise it. Is that true? If so, does anyone know how to change the route when I import it?
When OSPF exports route information from external autonomous systems (ASs), it includes a cost, or external metric, in the route. There are two types of external metrics: Type 1 and Type 2. The difference between the two metrics is how OSPF calculates the cost of the route. Type 1 external metrics are equivalent to the link-state metric, where the cost is equal to the sum of the internal costs plus the external cost. Type 2 external metrics use only the external cost assigned by the AS boundary router. By default, OSPF uses the Type 2 external metric. On the redistribution policy, you just need to add another line "then metric-type 1" Post the policy you are using for redistribution.
[KUDOS PLEASE! If you think I earned it! If this solution worked for you please flag my post as an "Accepted Solution" so others can benefit..]