Routing decisions are made on a step-by-step basis as packets pass from one host to another; each routing decision can be based entirely on locally-available information about connected networks
The route table previously described is sorted in a most-specific to least-specific order, and usually ends with a special default route that specifies another host to pass packets to for further routing
Given a packet with a specified destination IP (dest_IP), its routing proceeds like this:
A host usually has a routing table entry that corresponds to the local network, assuming that another host will see the packet if it is sent out the corresponding network interface; such entries usually are indicated by a gateway of 0.0.0.0
Usually the final entry in a routing table has a route_dest of 0.0.0.0 and a netmask of 0.0.0.0, and matches all possible IPs; then the packet is forwarded to the indicated gateway, which then applies its own routing table to forward the packet to some other network
Packets may be routed dozens of times before reaching their destination
Dynamic routing uses other protocols (like OSPF or BGP) to update routing tables on-the-fly to adjust for varying availability of network links or to balance usage of multiple network links