@Adam-Tyler ,
This is one that you could easily test by running a basic lab setup. I setup a 3 ( R1-----R2----R3) router lab to show. Now I'm using Gig interfaces and loopbacks so the costs are different.
is the result from my R1 (=Router A)
R1(config-router)#do show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 192.168.16.2, 00:05:48, GigabitEthernet0/1
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/3] via 192.168.16.2, 00:04:15, GigabitEthernet0/1
172.31.0.0/24 is subnetted, 1 subnets
O 172.31.16.0 [110/2] via 192.168.16.2, 00:05:22, GigabitEthernet0/1
Here is from my R3:
R3(config-router)#do show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 172.31.16.2, 00:05:28, GigabitEthernet0/0
O 192.168.16.0/24 [110/2] via 172.31.16.2, 00:05:28, GigabitEthernet0/0
I forgot to post the result:
As you can see from R1 to 172.31.16.0...is only two a metric cost of 2...though there is an exiting interface, incoming interface and exiting interface in between. So in a practical sense only count the exiting interface. This seems to have been true also with the virtual loopback int as well (this I didn't remember).
Cordially,
Ronnie Wong
Edutainer Manager, ITProTV
*if the post above has answered the question, please mark as solved.
**All "answers" and responses are offered "as is" and my opinion. There is no implied service, support, or guarantee by ITProTV.