Internet Routing Protocols
Photo by Compare Fibre on Unsplash

The internet is an enormous network of innumerable devices all connected which are constantly sending and receiving data everywhere, the data ranging from a simple request to another device to multimedia documents and more, but there is a certain limit of the amount of data that can be sent at once which depend upon the physical limitations of the network. This limitation introduces the need to split the data into sizable chunks or ‘packets’. This is where the Internet Protocol (IP) comes into the picture, these are a set of rules which guide the routing and addressing of packets of data making sure that the data packets are delivered to the proper destination in the most optimum way.

This brings ahead the concept of IP and router.

Internet Protocol: This is a way to uniquely identify each device connected to the internet, the ‘IP address, this makes it possible to specify the destination of the message, it is a connectionless service, and works with TCP i.e the Transmission control protocol, as TCP/IP or UDP i.e. User Datagram Protocol.

Router: A router is a device that connects two or more packet-switched networks or subnetworks. It serves two primary functions: managing traffic between these networks by forwarding data packets to their intended IP addresses and allowing multiple devices to use the same Internet connection.

The IP packets contain headers(20 or 24 bytes long) and data which can vary in size. The header contains the IP address of the source and the destination, and other requisite information, while the data is part of the content being sent.

Wikipedia defines a routing protocol as:

A routing protocol specifies how routers communicate with each other to distribute information that enables them to select routes between nodes on a computer network. Routers perform the traffic directing functions on the Internet; data packets are forwarded through the networks of the internet from router to router until they reach their destination computer. Routing algorithms determine the specific choice of route. Each router has a prior knowledge only of networks attached to it directly. A routing protocol shares this information first among immediate neighbors, and then throughout the network. This way, routers gain knowledge of the topology of the network. The ability to route protocols to dynamically adjust to changing conditions such as disabled connections and components and route data around obstructions is what gives the Internet its fault tolerance and high availability.

Protocols vary according to the way they avoid routing loops, and how they select preferred routes, the use of hop costs and the time required for routing convergence, scalability of it, and other factors.

Laptop connecting to a server for sharing packets, through a network of several routers.

The process of transferring packets happens in several steps, which are as follows:

Step 1: Send packet to router

The laptop/device sends the first packet to the router which is closest to it, as seen in the diagram.

Computers send the first packet to the nearest router.

Diagram with a laptop on left and router on right. Arrow goes from laptop to router, with the message “TO: 91.198.174.192” and “FROM: 216.3.192.1”.

Step 2: Router receives a packet

When the router receives a packet, it looks at its IP header. The most important field is the destination IP address, which tells the router where the packet wants to end up.

Step 3: Router forwards packet

The router has multiple paths it could send a packet along, and its goal is to send the packet to a router that’s closer to its final destination.

Diagram with the router on the left and 3 routers on right. The left router has a line going to each of the right routers, and the lines are labeled 1, 2, and 3. A question mark is shown above each line.

How does it decide? The router has a forwarding table that helps it pick the next path based on the destination IP address. That table does not have a row for every possible IP address; there are 2^{32}2322, start superscript, 32, end superscript possible IP addresses, and that’s far too much to store. Instead, the table has rows for IP address prefixes.

IP addresses are hierarchical. When two IP addresses start with the same prefix, that often means they’re on the same large network, like the Comcast SF network. Router forwarding tables take advantage of that fact so that they can store far less information.

Once the router locates the most specific row in the table for the destination IP address, it sends the packet along that path.

Diagram with the router on the left and 3 routers on right. The left router has a line going to each of the right routers, and the lines are labeled 1, 2, and 3. The second line, labeled 2, is highlighted with green arrows going from left to right and shows a packet above it.

Step 4: Final router forwards the message

If all goes well, the packet should eventually arrive at a router that knows exactly where to send it.

The router can now send the message to the destination IP address, which may be a personal computer or a server.

Diagram with the router on the left side and laptop on the right side. Arrow goes from router to laptop with packet displayed above it.
['Aditya J.']
['Network', 'Internet', 'Computers', 'Router', 'Communication']