The inconvenient with Type 2 is the fact that it is taking into account just the distance between the IR to the ABR, but is ignoring the distance towards the ASBR.
So this case proposes the usage of external type 1.
In order to route traffic properly, router rely on the preference and the cost of the routes in the routing table according to the different protocols and criteria that these take to define a cost per each route. The costs then will, therefore, rely on the robustness and accuracy with which the cost is calculated and added to the routing table.
This scenario is meant to evidence the difference of the metric when using the 2 different kinds of imported routes advertising on OSPF.
In particular, I have used IPv6 and hence, OSPFv3, however, the same behavior can be accurately replicated with IPv4/OSPFv2.
I would like to emphasize in the importance of this matter.
When a new expansion is to be done on a network that is using a different routing protocol, it is very common to find another routing protocol already working on the network previously, so sometimes the fastest option is to just import the other routing protocol routing rather than setting it all up again on the new OSPF. (This may also be done with OSPF different processes, but thas goes beyond the scope of this case).
The following is a basic scenario in which the Router 1, will import the F800::0/7 loopback network and advertise it into the R3:
Loopback addressing and import into OSPFv3 on R1:
The importe-route direct, will advertise by default the external type 2.
The inconvenient with Type 2 is the fact that it is taking into account just the distance between the IR to the ABR, but is ignoring the distance towards the ASBR, so it is not the complete path, as can be seen below:
OSPFv3 LSDB analysis:
Received information on Router 3, there are 3 things I will
Route is being learned by R3 as LSA Type 5, for
External, since it was imported on R1
Route is being learned by R3 External Type 2 (as
Route is being learned by R3 with Cost of 1
Replacing the External type, we can see a better cost
accuracy, now taking into account the whole path (IR, ABR and ASBR):
1)Importing directly connected route as Type 1
2) Receiving it on R3:
It is still receiving it by LSA Type 5, but since the type 1
does take into account the whole part, it reflects the cost now as 3.
This scenario might work well in either ways, but in bigger
topologies, this suggestion may improve routing accuracy.