IP routing refers to procedures for switching IP datagrams over IP networks on the network layer of the OSI reference model. The switching takes place between sender and receiver in unicast, in case of multiple receivers in IP multicast or broadcast. IP routing is based on the routing-enabled IP protocol and uses well-known routing procedures in the form of IP-based routing protocols to forward datagrams.
If an IP datagram is transmitted between terminals that are located in two different networks, then a router takes over the forwarding. If, as shown in the example, terminal "A" has the IP address 184.108.40.206, the router 220.127.116.11 and terminal "B" 18.104.22.168, then terminal "A" sends the IP packet to the router, which uses the routing table to determine the IP address of the next router or of terminal "B" if it is located in its subnet. It then sends the datagram to the IP address 22.214.171.124 of terminal "B".
The routing protocols differ in their algorithms, metrics, exchange mechanisms, and convergence. They use the distance- vector algorithm, which determines the shortest route with the fewest hops through the network, the dynamic link-state algorithm whose routing table is calculated according to the topology, and the path-vector protocol, which covers autonomous systems.
The well-known IP routing protocols include Gateway to Gateway Protocol( GGP), Routing Information Protocol( RIP), Intermediate System to Intermediate System Protocol( IS-IS), and Open Shortest Path First( OSPF), in addition to Border Gateway Protocol( BGP) and Interdomain Routing Protocol ( IDRP).