A Conceptual Introduction to Static Routing, RIP & OSPF

In large networks, Layer-3 Switches/ Routers are important and inevitable. They help contain the broadcast domain by sub-dividing the network in to various segments. But once a network is segmented, you need to route packets between the various sub-networks. Routing protocols / methodologies like Static Routing, RIP (Routing Information Protocol) & OSPF (Open Shortest Path First) help you to do just that.

Introduction:

Wouldn’t it be a simpler world if a whole campus could be put on a single network? It would, but it would be a very congested network too! So, when you are planning a network for an enterprise company (or) a huge campus it is a good practice to segment the network into multiple sub-networks.

Layer-2 Network Switches are enough to communicate within a network (sub-network) but they cannot pass on packets to other networks. That’s where you need Routers / Layer-3 Switches (L3 Switches with routing capabilities are used more these days).

If there are only two networks and one path between them, it is easy to specify the routing table to the L3 Switch/ Router – Just forward all packets with a certain destination IP address range to the other L3 Switch/ Router. That’s it! But practically, there are multiple sub-networks within a campus and multiple links to (and from) each sub-network. Multiple links are required for both reaching destination networks faster and also for redundancy in links (in case of primary link failure).

That’s why we need Routing Methodologies & Routing Protocols. L3 Switches/ Routers form something called as Routing Tables where they store information on the various nodes in the network and the best path to reach each node. These Routing Tables can be formed manually (for small networks) using Static Routing (or) can be formed automatically (for larger networks) by using dynamic routing protocols like RIP, OSPF, BGP, etc.

Another important function of the Dynamic Routing Tables is to automatically adapt to the change in network topologies (like link/ device failures, addition/ deletion of nodes, etc) by first identifying that change quickly and using alternate routes (links) / devices to reach the destinations.

Static Routing:

The process of specifying the routing tables for every router manually by a network administrator (in a small network) is called Static Routing. Basically, if there are only a couple of Layer3 Switches in the network, it is easy to specify the routes for packets to be delivered to the other network manually.

Static Routing is simple to implement and is fast as it doesn’t require any extra processing capacity / additional bandwidth. But it does not route packets around failed links/ devices and hence does not account for redundancy. So, a small network without any need for redundant links might find Static Routing useful.

Distance Vector Routing (Vs) Link State Routing:

Dynamic Routing is divided into two major categories – Distance Vector Routing & Link State Routing.

In Distance Vector Routing, each L3 Switch/ Router maintains a table of distances/ hops to every node from its perspective of the network and the least cost route between any two nodes is (mostly) the route with the minimum distance or minimum hops. In Distance Vector Routing, each node shares its table with its immediate neighbor more frequently (like every 30 seconds) and when there is a change in the network topology. Example: RIP

In Link State Routing, each L3 Switch/ Router maintains a complete network map of the local area that it is present in, with all the routers maintaining an identical database. The least cost route between any two nodes is calculated using many factors including maximum bandwidth, minimum delay, maximum throughput, etc. In Link State Routing, only the topology updates are exchanged between the routers when there is a change in network topology (or) every 30 minutes (less frequently). Example: OSPF

RIP (Routing Information Protocol):

* RIP is a open standards based distance vector routing protocol.

* RIP is an Intra-domain routing protocol used within an autonomous system – AS (where all routers are controlled by the same entity).

* In RIP, all the routers / L3 switches create a unique routing table with information like –  lowest cost links to each router in its network, next hop router(s), etc.

* RIP uses hop count/ distance as its link cost metric.

* RIP allows for convergence around failed links/ network topology changes, but recovery is in the order of minutes.

* Total number of nodes (Routers/ L3 Switches) supported by RIP is limited due to finite hop count restrictions in the protocol.

* Periodic updates of Routing Tables (every 30 seconds for example) happens even when there are no changes in the network topology.

OSPF (Open Shortest Path First):

* OSPF is an open and standards based routing protocol.

* OSPF is an Intra-domain routing protocol based on link state routing.

* In OSPF, the entire network is called an Autonomous System (as it is maintained by one entity). The Autonomous System is divided into different areas (sub-networks).

* In OSPF, there are some special types of routers based on their function – Area border routers connect two or more areas, Autonomous System boundary routers connect two or more Autonomous Systems, etc.

* The Router/ Layer 3 switch maintains the complete network map of all the nodes in the area that it is present in. The routing table is the same for all the routers in a given area.

* Link State Advertisements are exchanged between all the routers in an area – Every router receives the LSA’s of every other router within an area.

* OSPF updates the routing tables of all the routers in an area immediately when there is a change in the network topology – which is faster than RIP, and also periodically (every 30 minutes for example) – which is less frequent than RIP.

* OSPF calculates the link cost in terms of minimum delay, maximum throughput, maximum bandwidth etc. So, it is not strictly based on the hop count and OSPF gives higher priority for faster links (for example).

* OSPF supports Variable Length Subnet Masks (VLSM), which gives it the ability to work with different subnets and hence conserve IP addresses.

* OSPF provides for authentication of messages between the Routers/ L3 Switches (through MD5).

* QoS (Quality of Service) metrics can be applied to OSPF based on bandwidth calculations (for example), to avoid high latency paths.

excITingIP.com

You could stay up to date on the various computer networking/ related IT technologies by subscribing to this blog with your email address in the sidebar box that says, ‘Get email updates when new articles are published’




Comments are closed