Each router in the routing area uses the link-state database and SPF algorithm to construct the SPF tree.
For example, using the link-state information from all other routers, R1 can now begin to construct an SPF tree of the network. To begin, the SPF algorithm interprets each router’s LSP to identify networks and associated costs.