Scenario 1
Let's say router A needs to send a packet to the destination 192.168.23.2 (router B in the B-C subnet)
It routes the packet through C (at a cost of 10, next hop being 192.168.13.1), even though it has a direct connection to B (cost 5) right? Since its routing table does not contain anything to link router B with the specified address, and logically the two IPs of B are two separate devices to these two networks?
Let's say router A needs to send a packet to the destination 192.168.23.2 (router B in the B-C subnet)
It routes the packet through C (at a cost of 10, next hop being 192.168.13.1), even though it has a direct connection to B (cost 5) right? Since its routing table does not contain anything to link router B with the specified address, and logically the two IPs of B are two separate devices to these two networks?
Scenario 2
- The scenario is the same, A needs to send a packet to 192.168.23.2.
- Let us now assume that the cost of A - C link is 100.
- In my simulation, the shortest path to 192.168.23.2 is now 15. A -> B -> C -> B (Next hop from A is calculated as 192.168.12.1). Is this correct? Does this happen in the real world? Is there a solution to this small looping issue? Does B auto-detect that the destination is one of its own IP interfaces when it first receives the packet? If B has this capability, won't the path in the first scenario (A - C - B) technically not be the shortest one and hence would be wrong?
