Routing is the process of selecting best paths in a network which means if you have different paths to reach particular destination, so what/how would you choose the particular path. Routing in network terminology is moving data from source to destination by selecting the efficient route by router considering the metric value (Minimum cost, distance, time, etc).
Routing occurs at layer 3(Network layer) where IP travels from one router to another hop by hop according to the routing table. The network layer provides best-effort end-to-end packet delivery across interconnected networks. The network layer uses the IP routing table to send packets from the source network to the destination network. After the router determines which path to use, it proceeds with forwarding the packet. The router forwards the packet that it accepted on one interface to another interface or port that reflects the best path to the packet’s destination.
For example Pc1 wants to send packet to Pc2. when packet reach to R2 from Pc1, router will check/examine the routing table according to the destination network and find the best route to reach particular destination. Now router will also check for outgoing interface and forward the packet to the next router according to the mentioned details. Now packet will flow flow from one router to another router HOP by HOP until packet reach the destination network i.e Pc1->R2->R3->Pc2.
Types of Routing:
- Static Routing: Routes which are configured manually by network administrator (predefined path).
- Dynamic Routing: Routes which are automatically selected by routing protocols these are (OSPF, EIGRP, RIPv1, RIPv2, BGP, IS-IS).
Routed and Routing protocols:
Routed protocols: A routed protocol is a protocol by which data can be routed. Routed protocols are IP, AppleTalk, and IPX. In this kind of protocols we require an addressing scheme and sub netting. Addressing scheme will be used to determine the network to which a host belongs and to identifying that host on that particular network. All hosts on an internetwork are using the services of a routed protocol. That means routers, servers, and workstations to. The only two routed protocols that are in use today are IP and IPX but IPX is dropped from Cisco in exams and is not in use much these days. If you are studying routed protocols the best advice is to focus on IP routed protocol.
Routing protocols: Protocol that supports a routed protocol by providing mechanisms for sharing routing information. Routing protocol messages move between the routers. A routing protocol allows the routers to communicate with other routers to update and maintain tables. TCP/IP examples of routing protocols are listed here: —Routing Information Protocol (RIP) —Interior Gateway Routing Protocol (IGRP) —Enhanced Interior Gateway Routing Protocol (EIGRP) —Open Shortest Path First (OSPF)