Routing — Static, RIP, OSPF

Glitch
5 min readJan 5, 2023

--

It’s so fascinating to understand that when we type google.com how the packets are fetched and the data is loaded. Routing is the concept where we will learn how these packets are routed from one router to another .so let's explore...

What is routing?

In networking, routing is the process of forwarding data packets between computer networks. Routing is performed by a device, often called a router, which determines the next network point to which a data packet should be sent based on its destination address and a routing table. The routing table is a database that contains information about the paths that data can take to reach its destination. When a data packet is sent from one network to another, the routing device looks up the destination address in its routing table and determines the best path to use to reach the destination. It then forwards the data packet to the next network point along that path.

Static Routing

Static routing is a type of routing that is performed manually by a network administrator. In a network using static routing, the network administrator must manually configure each router with the specific routes that it should use to forward data packets. This is in contrast to dynamic routing, where routers communicate with each other and automatically learn about new routes that are available.

There are a few advantages to using static routing. One advantage is that it can be more secure since the routes are manually configured and are not learned from other routers. This means that an attacker would have to specifically target the router’s configuration in order to disrupt the network’s routing. Additionally, static routing can be simpler to set up and manage in small networks where the number of possible routes is limited.

However, static routing can be less flexible and efficient than dynamic routing in larger networks, as it requires manual configuration of every route and does not adapt to changes in the network automatically. It can also be more time-consuming for a network administrator to manage, as they must manually update the routing table whenever there are changes to the network.

RIP

RIP, which stands for Routing Information Protocol, is a distance-vector routing protocol that is used to exchange routing information between routers in a computer network. It is used to build and maintain routing tables that list the available routes to different destinations in a network.

RIP operates by sending periodic updates to its neighbors about the routes that it knows about. Each router maintains a routing table that lists the available routes to different destinations and the number of “hops,” or intermediate routers that must be passed through, required to reach each destination. When a router receives an update from a neighbor, it compares the routes in the update to the routes in its own routing table. If the update contains a route to a destination that is not in the router’s table, or if the update contains a route to a destination that has fewer hops than the route in the router’s table, the router will add the new route to its table.

RIP is a relatively simple and widely used protocol, but it has some limitations. For example, it can only handle networks with a maximum of 15 hops between any two routers, and it does not scale well to large or complex networks. In addition, it does not support variable-length subnet masks (VLSM), which means that it cannot support networks with different subnet sizes.

OSPF

OSPF, which stands for Open Shortest Path First, is a link-state routing protocol that is used to exchange routing information between routers in a computer network. It is used to build and maintain routing tables that list the available routes to different destinations in a network.

Unlike distance-vector protocols, which send their entire routing table to their neighbors at regular intervals, OSPF routers exchange information about the state of their own links with all other routers in the network. This information is used to build a database of all the links in the network, called the link-state database. Each router uses this database to build a complete map of the network and to determine the shortest path to each destination.

OSPF is a widely used protocol that is particularly well-suited to large and complex networks. It is efficient and scalable, and it supports variable-length subnet masks (VLSM), which means that it can support networks with different subnet sizes. In addition, OSPF is a classless routing protocol, which means that it can carry information about the subnet mask in its routing updates. This allows it to support discontiguous networks, where subnets are not all part of the same network address.

example…

Network Configuration

OSPF Commands

Check your network works by ping from 1 pc to another like

Ta-da !! now you can explore by sending your own packets in a network. Enjoy

--

--

No responses yet