Routing (in TCP/IP Networks)

Routing in computer networking is a fundamental process crucial for ensuring that data packets find their way to the correct destination across diverse and complex internetworks. At its core, routing involves selecting the most efficient path through a network and leveraging routers to guide these packets from source to destination.

routing process in computer networking

This process is integral to maintaining the flow of information in a network. It utilizes protocols like TCP/IP to make real-time decisions, ensuring that data travels across networks swiftly and efficiently. Routers, the workhorses of this process, examine data packets, decide the optimal pathway based on pre-determined criteria such as cost or speed, and propel them towards their final destination. This not only keeps the network efficient but also optimizes the use of available network resources.

Our exploration will delve into how routing works, the role of routers, and the strategic importance of routing tables in managing network traffic. Understanding these components is key to grasping how vast amounts of data navigate the expansive networks of our digital world, ensuring that every piece of information finds its right place.

What is Routing (in computer networking)?

So let’s define this concept. ROUTING is the process of selecting a path through an internetwork over which to transmit packets to a destination host or hosts and then having devices called routers forward the packets to those hosts. For routing to occur, a routable protocol such as TCP/IP or IPX/SPX must be used.

How ROUTING Works?

Routing takes place at the network layer (layer 3) of the Open Systems Interconnection (OSI) reference model. On a TCP/IP internetwork, this means that routing involves delivering packets to destination IP addresses on the internetwork.

The first and main part of the routing process consists of determining the path over which packets will travel from the sending, or original, host to the receiving, or destination, host. The second part of the process involves having routers switch packets from one successive segment, or “hop,” of the path to the next until the packets arrive at their destination.

Routers are devices that join subnets, which are separate and distinct networks that make up an internetwork. The routers maintain internal tables called routing tables, which contain information describing the potential paths that data can take to travel through the internetwork. Between any two subnets on the internetwork, there can be more than one path or route by which packets can travel. The routing information stored in the routing tables describes the metric or cost value for each possible route between different subnets. When packets need to be sent to a host or hosts on another network, they are forwarded to a router that is connected to the local network, which then checks its routing tables to determine which path the packets should take. Packets are usually sent along the path with the lowest cost value or metric. If two paths to the same destination have the same metric, packets can be load-balanced between the two routes.

Route from source to destination

The value of the metric for a specific path depends on several factors. For example, the metric might be proportional to the number of routers that the packet stream must be switched through (the number of hops traversed) in order to reach the end of the path. The metric might also depend on other factors such as the delay or latency of packets when they are processed by each router, the amount of traffic congestion (load) at the router, available bandwidth, and the relative reliability of the routers. Network administrators can manually specify metrics for each path and enter them into routing tables by using static routers, or they can use dynamic routers, which use a routing algorithm to automatically calculate metrics for each possible path. Dynamic routers automatically calculate metrics by communicating with each other using special protocols called routing protocols. Examples of routing protocols include Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) Protocol.

Once the routing table of a router has been configured (or once the tables of all dynamic routers have “converged” and stabilized), the router carries out its switching function. This switching function is essentially independent of the particular routing protocol being used. It works like this: If a host on the local network needs to send a packet to a host on a remote network, it checks its own internal routing table to determine which router to contact and then uses Address Resolution Protocol (ARP) to obtain the MAC address of the local router interface that connects the local network to the remote network. The host then sends the packet directly to the local router interface. The network layer header of the packet contains the logical network address (the IP address on a TCP/IP internetwork) of the destination host that the packet needs to be delivered to. The router receives the packet, inspects the network-layer destination address in the packet’s header, and compares the address to the route information stored in the router’s internal routing table in order to determine what to do with the packet. If the router cannot determine what to do with the packet, it simply drops the packet. Otherwise, it forwards the packet to another router, which forwards it again until the packet finally reaches its destination network. As the packet is switched from router to router, its network layer destination address remains the same, but its MAC address keeps changing to that of the next router interface along the path.

NOTE


Although routing is normally considered the exclusive job of routers, routing actually occurs in two places on a network such as a TCP/IP internetwork:

  • At the host itself (host routing). Each host on the internetwork normally maintains its own internal routing table. This table is used to determine whether to send a packet to the local network, to a specific router interface, or to the default gateway address.
  • At the routers that connect the various subnets (router routing).

Routing in a network can suffer from a number of problems. One problem is the existence of routing loops, which occur when a packet passes through the same router more than once on a given trip. The result is that the packet loops until its lifetime decreases to zero and a router discards it. The originating host usually never knows that the packet was dropped and did not reach its destination. Routing loops occur most often in networks that use incorrectly configured static routers. Routing algorithms for dynamic routers can usually detect loops and reconfigure routing tables to eliminate them.

Another problem is convergence. In a large internetwork using dynamic routers, it might take some time for a change in one router’s tables to propagate to all other routers in the internetwork. In the meantime, temporary routing loops can occur and less efficient network paths might be chosen, resulting in more traffic congestion.

Routing Table


To view the internal routing table of a computer running Microsoft Windows Server, type route print at the command prompt.

See also:

Search