06-03-2013 03:31 AM - edited 03-04-2019 08:05 PM
Hi,
Solved! Go to Solution.
06-03-2013 03:40 AM
Hi,
By default, when you redistribute into OSPF, default metric type is E2 and the metric is 20.
It doesn't affect the metric within the OSPF domain of any link, and if you look at any route in the OSPF domain you will see same metric at all times.
If you change it to E1, then teh cost gets added along the path and is always the total cost path from originating router to the destination. At any time, no two routers will have same metric to the destination (unless cost to reach ASBR is same).
E1 route is preferred over E2 routes.
06-03-2013 05:58 AM
Metric plays role when you have two or more OSPF routes from same OSPF process and same route type.
- When there are multiple routes available to the same network with different route types, routers use this order of preference (from highest to lowest):
1. Intra-area routes.
2. Inter-area routes.
3. External Type-1 routes.
4. External Type-2 routes.
- If there are multiple routes to a network with the same route type, the OSPF metric calculated as cost based on the bandwidth is used for selecting the best route. The route with the lowest value for cost is chosen as the best route.
E1 route gives more accurate information about metric that is why E1 gets preferred over E2 routes.
06-03-2013 03:40 AM
Hi,
By default, when you redistribute into OSPF, default metric type is E2 and the metric is 20.
It doesn't affect the metric within the OSPF domain of any link, and if you look at any route in the OSPF domain you will see same metric at all times.
If you change it to E1, then teh cost gets added along the path and is always the total cost path from originating router to the destination. At any time, no two routers will have same metric to the destination (unless cost to reach ASBR is same).
E1 route is preferred over E2 routes.
06-03-2013 03:52 AM
Hello,
The E1 takes into account the internal cost to reach the ASBR which is injecting the external LSA and the ASBR advertised cost. However, E2 metric is just the ASBR advertised cost, regardless of the cost to reach the ASBR.
E1s are used to choose the closest exit point, and they are also preferred than E2 in OSPF route table lookups.
Hope this helps,
Jose.
06-03-2013 04:01 AM
Hi,
I agree with Vivek but would like to add few point to this.
- though OSPF metric for E2 route is always constant (default 20) within ospf domain after redistribution but router takes both the redistributed cost and the cost to the ASBR into account even for E2 routes.
- But E1 routes are always preferred over E2 routes irrespective of OSPF metric.
- If you have two or more E2 routes with equal redistributed cost then cost to the ASBR comes into picture otherwise lower redistributed cost is always preferred irrespective of cost to the ASBR.
- If redistributed cost is equal, route having lower cost to the ASBR will be preferred.
- If redistributed cost and cost to the ASBR is equal , both routes can be installed in to the routing table
You can see in below output , OSPF metric is 20 and forward metric to ASBR is 10
R1#sh ip route 22.22.22.22
Routing entry for 22.22.22.22/32
Known via "ospf 100", distance 110, metric 20, type extern 2, forward metric 10 <<<<<<<<<<
Last update from 172.31.12.2 on Ethernet0/0, 00:00:02 ago
Routing Descriptor Blocks:
* 172.31.12.2, from 2.2.2.2, 00:00:02 ago, via Ethernet0/0
Route metric is 20, traffic share count is 1
R1#
06-03-2013 05:05 AM
i try to change the metric cost from E2 to E1 as you said the cost is increased from 20 to 22 but don't understand why you said that E1 route is preferred over E2 routes. In ospf the band to up the cost go down, E2 have cost 20 and E1 have cost 22. So the by changing to E1 the bandwidth will increase ?
E2 200.10.10.0/24 [110/20] via 192.168.200.2, 00:25:29, FastEthernet0/1
E1 200.10.10.0/24 [110/22] via 192.168.200.2, 00:00:04, FastEthernet0/1
06-03-2013 05:26 AM
Hi
Now if you check in routing table you will see the route with E1 metric.
They are preferred because it gives you the complete cost to the destination.
Sent from Cisco Technical Support Android App
06-03-2013 05:44 AM
R3#sh ip route ospf
O 192.168.150.0/24 [110/2] via 192.168.200.2, 07:41:11, FastEthernet0/1
[110/2] via 192.168.100.2, 07:41:11, FastEthernet0/0
172.16.0.0/24 is subnetted, 1 subnets
O IA 172.16.1.0 [110/2] via 192.168.200.2, 07:41:11, FastEthernet0/1
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.10.1.0 [110/2] via 192.168.200.2, 07:41:11, FastEthernet0/1
O E1 200.10.10.0/24 [110/22] via 192.168.200.2, 00:43:41, FastEthernet0/1
If you see the diagram R3-->R1--->R2-->Destination (R6 Eigrp). so each router take 1 cost to reach other destination if so it should be 23 in route tabe (110/ 23)
E1 cost 22 it mean router 3 cost 1 to reach router 1, Router 1 take cost 1 to reach router 2 finally router 2 take 1 cost to reach destination .
06-03-2013 05:58 AM
Metric plays role when you have two or more OSPF routes from same OSPF process and same route type.
- When there are multiple routes available to the same network with different route types, routers use this order of preference (from highest to lowest):
1. Intra-area routes.
2. Inter-area routes.
3. External Type-1 routes.
4. External Type-2 routes.
- If there are multiple routes to a network with the same route type, the OSPF metric calculated as cost based on the bandwidth is used for selecting the best route. The route with the lowest value for cost is chosen as the best route.
E1 route gives more accurate information about metric that is why E1 gets preferred over E2 routes.
06-03-2013 05:59 AM
Hi,
OSPF cost to the destination from R3 will be 22 only, see below explanation
E1 metric = redistributed cost (20)+ cost to the ASBR (2).
= 22
Here cost to the ASBR(R1) is 2 from R3, and redistributed cost is 20 (by default)
Regards,
Akash
06-03-2013 06:06 AM
Understood !! This is my first question in ccna forum got fast reply with various type of answers. Thanks for your helpful reply guys.
06-03-2013 06:07 AM
06-03-2013 06:11 AM
Good point Akash, rate as deserved!
06-03-2013 06:14 AM
Thanks Jose
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