IP Routing
The routing protocols in use today are based on one of two algorithms: Distance Vector or Link State. Distance Vector algorithms broadcast routing information to all neighboring routers. Link State routing protocols build a topographical map of the entire network based on updates from neighbor routers, and then use the Dijkstra algorithm to compute the shortest path to each destination. Metrics used are based on the number of hops, delay, throughput, traffic, and reliability.
Distance Vector
RIP uses number of hops, or gateways traversed, as its metric.
IGRP uses bandwidth, delay, hop count, link reliability, load, and MTU.
EIGRP uses the (DUAL) Diffusing Update Algorithm.
BGP uses the Distance Vector algorithm
Link State
OSPF uses the Dijkstra algorithm.
Read more about this topic: Heuristic Routing