I am new to networking so this probably a naive question. I've been reading up on the spanning tree protocol and understand why it's necessary in a network (it prevents loops) and I understand that this is not the most optimal way to route traffic in some cases. But the question is: why do we not find and use the optimal route from network to network? It seems fairly easy to do, even algorithmically, and it would decrease the number of bridges that traffic needs to go through. Is it too much computation per packet? Is it because we don't store state of the previous bridge - and why don't we?
As an example, if I wanted to route traffic from network d
to network b
I would need to go through network a
instead of routing directly to network b
: