SRX Services Gateway
Highlighted
SRX Services Gateway

Redistribute OSPF E2 as E1 to modify cost

‎08-12-2014 08:07 AM

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?

 

Thanks

2 REPLIES 2
Highlighted
SRX Services Gateway

Re: Redistribute OSPF E2 as E1 to modify cost

‎08-12-2014 12:02 PM

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..]
Highlighted
SRX Services Gateway

Re: Redistribute OSPF E2 as E1 to modify cost

‎08-12-2014 07:01 PM

Hi,

 

In the policy options statement that you are using for redistribute, while applying at the export , you can modify the metric and add cost to the  route.

 

Regards,

c_r

Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too

Feedback