The term routing encapsulates two tasks―deciding the paths for data transferred, and sending the packets on these paths. Routing is a function carried out at the 3rd layer of the OSI reference model. A routing algorithm decides the output line to transfer the incoming packets; algorithms are based on the routing protocol, that uses metrics―bandwidth, delay, and reliability-to assess whether a particular path is the optimal path available for transfer of the data packets.