Priyanshu Pandey

What is IP Routing?

IP routing, or Internet Protocol routing, is the process of determining the optimal path for data packets to travel from the source to their destination over an IP-based network. This network could be a local network or the worldwide Internet. IP routing involves using routing algorithms and protocols to decide how to forward data packets based on the destination IP address included within the packets.

IP Routing

IP routing (Internet Routing Protocol) is the process of defining the shortest path through which data travels from its source to its destination. It finds the shortest route for sending data from one computer to another in the same or distinct network. Routing utilizes different protocols for different networks to determine the path that data takes and it also enables efficient data transmission across complex networks.

IP routing operates by a network of routers that communicate with one another using routing protocols. These protocols allow routers to exchange information about network topology and the status of various paths. RIP (Routing Information Protocol), OSPF (Open Shortest Path First), and BGP (Border Gateway Protocol) are some common IP routing protocols.

Let’s take an example to understand how IP routing works:

ip routing

Suppose the source machine in network 1 wants to communicate with the destination machine but is on another network. The source machine is configured to send all packets destined for the destination machine on network 2 to router R1. After that, router R1 receives these packets, examines the destination IP address from the packet header, and forwards these packets to the next router R2. This process is continued until the destination machine receives the data packet by following the given path.

Default Gateway

A default gateway is a router used by hosts to communicate with hosts on other networks. A default gateway is utilized when a host does not have a route entry for a certain distant network and does not know how to reach that network. Hosts can be configured to route all packets destined for remote networks to the default gateway, which has a route to that network.

Routing Table

Each router maintains and keeps a routing table in RAM. Routers employ a routing table to identify the most optimal path to the destination network.

routing table

A routing table comprises entries that outline the paths and next-hop destinations for data packets to take to reach certain destinations on a computer network. Each entry generally includes:

  1. Destination Network/IP: The network or IP address to which the route applies.
  2. Subnet Mask: Defines the range of IP addresses within the destination network.
  3. Next Hop: The IP address of the next router or gateway to forward the packet to reach the destination network.
  4. Interface: The network interface through which the packet should be sent to reach the next hop.
  5. Metric/Cost: A value indicating the cost or preference of the route. Lower values are preferred.

How Does IP Routing Work?

During the journey of data transmission from source to destination, the source employs TCP and other protocols to construct an IP packet, which is dispatched into the network. As this IP packet commences its path through the network, it must navigate through several routers en route to its destination.

Within the network, each router examines the packet’s destination address and consults its routing table, which contains vital details about subsequent routers, associated costs, and essential particulars. This routing table enables the router to make informed routing decisions. By leveraging routing protocols and the routing table, the router identifies the next router to which the data packet should be directed, aiming to establish the optimal pathway towards the destination.

The paths taken by different packets may differ, yet they all eventually arrive at their intended destinations. When the packets reach their destination, they are handed over to TCP for further processing and handling.

The TCP protocol guarantees data delivery by ensuring a congestion-free, reliable connection between sender and receiver. The packet loss is minimal, and TCP also provides retransmission of lost data packets during transmission.

Types of Routing

Generally, there are three types of routing protocols in routing, and these are as follows:

Static Routing

When the router learns from the admin, it is called static Routing. Static Routing is the process of manually adding routes to the routing table using a configuration file that is loaded when the router boots up. All modifications in static Routing are made manually with the assistance of the system administrator. The system administrator manually adds all network locations in static Routing.

Static routing can be used in small networks, network isolation, testing, legacy equipment integration, backups, and specialized setups for controlled and predictable routing paths.

Dynamic Routing

Dynamic routing protocols enable routers to learn information about other routers dynamically and automatically add that information to the router table. The routing protocol identifies the optimum path to the network and adds it to the routing table.

Dynamic routing protocols serve the following primary functions:

  1. They identify distant networks and ensure routing details are updated timely.
  2. They autonomously select the optimal route to the target network and can adapt by selecting an alternative path if the current route becomes inaccessible.

Dynamic routing can be used in large networks, ISPs, data centers, clouds, mobile networks, and scenarios with changing topology or high traffic. It adapts to changes for efficient routing.

Default Routing

Default routing forwards packets without specifying the next hop’s address. The default route uses another router’s address. If the address on the packet matches the route, the packet is forwarded; otherwise, it is forwarded through the router’s default route. The packet can be routed through any router that has default routing configured.

Default routing can be used in small networks, as an internet gateway, for backup links, and in temporary setups. It simplifies routing by directing unmatched traffic to a designated destination.

Main Routing Protocols

Interdomain Routing Protocols and Intradomain Routing Protocols are two types of routing protocols used in computer networks to facilitate data packet routing. Let’s discuss them in detail.

main routing protocols

Interdomain Routing Protocols

Interdomain routing protocols, also known as exterior gateway protocols, are intended to deal with data packet routing between multiple autonomous systems (ASes) or networks owned by different organizations or entities. These protocols define data pathways over the Internet, ensuring that data reaches its destination even when it crosses multiple administrative domains. This is usually done using the Border Gateway Protocol (BGP). It is utilized in Path Vector Routing to achieve interdomain routing. Path vector routing relies on analyzing the path between nodes in the present domain and nodes in the other domain rather than the distance between nodes.

Intradomain Routing Protocols

Intradomain routing protocols are used to regulate routing within a single autonomous system or network. They are also known as interior gateway protocols. These protocols are concerned with establishing the optimum paths for data packets to go within the boundaries of a particular network to ensure efficient communication between devices on the same network. Several intradomain routing protocols are suited to different network architectures and requirements.

Conclusion

  • IP routing (Internet Routing Protocol) is the process of defining the shortest path through which data travels from its source to its destination.
  • IP routing finds the shortest route for sending data from one computer to another in the same or distinct network.
  • A default gateway is a router used by hosts to communicate with hosts on other networks.
  • The three types of routing protocols in routing are:
    • Static Routing
    • Dynamic Routing
    • Default Routing
  • Interdomain routing protocols are intended to deal with data packet routing between multiple autonomous systems (ASes) or networks owned by different organizations or entities.
  • Intradomain routing protocols are used to regulate routing within a single autonomous system or network.

Author