From the topological database generated from LSAs, each router calculates a shortest-path tree, with itself as root. The shortest-path tree, in turn, yields a routing table. That's great if you've got all of the networks in existence in every routing table. With everything that we know up to know, it'll send that packet to its default router and hope that it knows what to do with it. Using one big tree would be incredibly inefficient.
Routers actually communicate to each other how to get to certain networks.
1.98 ms 3 hut-engr. 2.17 ms 2.14 ms 2.20 ms 4 cuatm-gw. BGP is the protocol that enables all of the routers in this path to know how to get to the destination. As with any routing protocol, BGP maintains routing tables, transmits routing updates, and bases routing decisions on routing metrics. The primary function of a BGP system is to exchange network-reachability information, including information about the list of autonomous system paths, with other BGP systems.