Routing Protocols Demystified: A Closer Look at RIP- OSPF- EIGRP

Routing Protocols Demystified: A Closer Look at RIP- OSPF- EIGRP

Routing Protocol :: It is a language between routers to exchange their network information. Modern routing protocols also establish neighborhood (a special relationship) between routers. Types of routing protocols are--

On the basis of Autonomous System>

IGP – Interior Gateway Protocol. It can route only inside a particular autonomous system. Example – rip v1/v2, ospf, eigrp, isis

EGP – Exterior Gateway Protocol. It can route between different autonomous system. Example – bgp. Autonomous System is a collection of routers and their networks under a common management

On the basis of Routing Logic>

Distance Vector – routing based on hop counts, example – rip v1/v2

Link State – routing based on path cost, example - ospf

Hybrid – routing based on several factors such as least bandwidth of the entire path, total delay of entire path, etc example - eigrp

Path Vector – routing based on AS hop count, example – bgp

On the basis of Subnet Mask>

Class full – does not advertise subnet mask, can only work with FLSM(Fixed-Length Subnet Masking), will always auto summarize subnets, example – ripv1

Classless – always advertise subnet mask, can work with both FLSM and VLSM, no auto summarize, example – ripv2, ospf, eigrp, bgp.

Dynamic Routing

In this case the network admin doesn’t specify any route for the different remote network. Routing protocol is used and routers using the same routing protocol and connected to the to the same network segment exchange their own network information with each other.

As a result the router come to know about the different remote networks and there necessary next hop. This network exchange is called exchanging routing updates and there are certain methods of routing updates exchange.

1. Periodic update In this case routers periodically exchange their routing updates after a fixed time interval even if the network remains same.

2. Triggered update In this case the routers exchange their routing updates only when there is a network change. It can be again 2 types

i) Flooding triggered update > in this case the triggered update is sent to all the possible neighbor.

ii) Bounded triggered update > in this case the triggered update is sent only to the relevant neighbor.

Routing updates can be exchanged as a whole or partially (incrementally)

How the router decides best route ??

For any particular destination if there are multiple best routes then the best route selection uses the following logic -- -- --

If the routes are different types then compare their AD value and go for the route having lowest Preference.

If the routes are same type then compare their costs and go for the route having lowest cost.

If the routes are same type and same cost then compare their subnet masks and go for the route having longest subnet mask.

If the different routes are same in all aspects then consider them to be equally good and go for load balancing, that is distribute the payload equally among all these best routes.

Preference - This is a predefined value that decides the believability of a route. Lower values are preferred. It is used to compare between dissimilar routes.

Cost - This is the labor of using a particular route. Different routing protocols have different logic to calculate the route cost. Lower values are preferred. It is used to compare between same type of routes.


Understanding RIP (Routing Information Protocol)

Intro:

Distance Vector

Uses Bellman-Ford algorithm

Open standard

Uses Hop Counts (maximum 15)

Uses full periodic update every 30 seconds

Uses split horizon and Poison Reverse to prevent loops

Uses UDP port 520

Slow convergence speed

Can operate on low end routers

Configuration is simple

Version 1 is always class full, version 2 is by default class full but can be configured as classless.

Version 1 uses broadcast updates at 255.255.255.255, version 2 uses multicast updates at 224.0.0.9.

Has only routing table.

RIP Route Cost = total number of intermediate hop counts.

RIP Key Point:

Update: this is how often we send routing updates, the default is 30 seconds.

Invalid: the number of seconds since we received the last valid update, once this timer expires the route goes into hold down, the default is 180 seconds.

Hold down: the number of seconds that we wait before we accept any new updates for the route that is in hold down, the default is 180 seconds,

Flush: how many seconds since we received the last valid update until.

Split Horizon > A router will never advertise back any update through that interface where that update is received.

Route Poisoning > Whenever a network goes down advertising router will send update for that network with infinite metric.

Poison Reverse> Upon receiving a poisoned route the receiving router also advertises back that same network with infinite cost.


Unveiling OSPF (Open Shortest Path First)

Intro:

Link State

Uses Dijkstra algorithm

Open standard

Calculates link cost on the basis of link bandwidth, total cost is summation of all intermediate link costs

Pure classless protocol

Uses IP port 89

Uses multicast updates at 224.0.0.5 and 224.0.0.6

Uses flooding triggered full update

Does not exchange routes directly, actually exchange LSA (link state advertisement)

Uses hello message to establish neighborhood and uses periodic hello message to maintain neighborhood

Performs better if the routing domain is partitioned into areas

Very high speed convergence

Configuration is complex

May not operate in low end routers

Has routing table, neighbor table and link state database

OSPF Link Cost = 108 / Link Bandwidth (bps)(108 is called reference-bandwidth, which can be modified if needed)

OSPF Route Cost = sum total of all link costs


What is Shortest Path First ??

Shortest Path is lowest cost path. OSPF routers at first collect LSA from its neighbors and builds a LSDB (Link State Data Base). Then it uses Dijkstra algorithm on this LSDB to establish SPF tree which is a collection of all possible paths to a destination from the present router. Finally from this SPF tree it selects the path with the least cost, which goes in the routing table.

OSPF Neighborhood

Develops through the following stages – Down, Init, (Attempt only for NBMA), 2Way, Exstart, Exchange, Loading, Full. OSPF routers can be stable as 2Way or Full – in 2Way neighborhood 2 OSPF routers exchange only hello, but no routing information, in Full neighborhood 2 OSPF neighbors exchange Hello and LSA. OSPF routers will become neighbor if the following parameters match - hello time, dead time, nw with sm, nw type, area number, authentication

OSPF Area

Logical bounded space where all routers have same LSDB (Link State Data Base – collection of all generated and received LSA). Area is necessary to confine the flooding triggered update. Each area is identified by an unique number (0 to 4294967295) called area id. Area can be of following types –

Backbone Area – Also called Transit Area, only area 0, connects other areas as well as with other routing domains, has all types of OSPF routes, only area which can do lsa filtering, route summarization, default route

Standard Area – Any other area which has all types of OSPF routes

Stub Area – Area which will not have OSPF External routes

Total Stub Area – Area which will not have OSPF Inter Area route and External route

NSSA – Not So Stub Area, area which will receive OSPF External routes directly from external domain

Total NSSA – Same as NSSA and will not receive any OSPF Inter Area routes

Virtual Link – Any standard area that can be used to connect fragmented area 0.

OSPF Router ID> Unique identification of an OSPF router in the domain. Manual configuration is most preferred, next preference goes to highest loop back address, last preference goes to highest interface address

OSPF Interface Priority> Unique value in a OSPF interface, value ranges from 0 to 255, higher values preferred


OSPF Routers in a Multi Access Network

When two or more OSPF routers are present in a multi access switched network then routers will select any particular router as the Designated Router (DR) for that network, another router is selected as the Backup Designated Router (BDR) and the rest of the router are DROthers.

In fact these designations are actually for the interface connected to the multi access network. If the present DR fails then the BDR becomes the next DR and another suitable DROthers will become the next BDR. The DR/BDR selections first considers OSPF interface priority. . If all the OSPF routers have the same priority then router having highest router ID is DR, next highest router ID is the BDR. The DROthers will create complete neighborhoods only with the DR and BDR.

So, during any flooding triggered updates the DROthers sends there LSA information to the DR and BDR. DROthers form 2 Way neighborhood between themselves , so they exchange only hello and no LSA. The DR represents the multi-access network as a pseudo node.

OSPF Router Types

Internal Router (IR) – Router whose all interfaces belong to same area

Backbone Router (BBR) – IR for area 0

Area Border Router (ABR) - router which connects any other area to the backbone area

Autonomous System Boundary Router (ASBR) - Router which connects the OSPF routing domain to some other external domain


OSPF Routes

Intra Area Route – Route of same area, marked by O

Inter Area Route – Route coming from other OSPF area, marked by OIA

External Route – Route coming from external routing domain, can be Type 1 (route cost increases as the route moves inside the domain, marked by OE1) or Type 2 (route cost remains same, marked by OE2)

NSSA Route – External route directly injected from outside, can be Type 1 (route cost increases as the route moves inside the domain, marked by ON1) or Type 2 (route cost remains same, marked by ON2)


OSPF Timers

Hello - Time for periodic hello message, default 10s

Dead - Time to wait for outstanding hello messages from neighbor, default 40s

Inf-trans Delay - LSA age increment time by the exit int, default 1s

Wait - Time to wait for DR/BDR, default 40s

Rx-mt Interval - Retransmission interval for unacknowledged LSA, default 5s

Poll interval - Interval for sending hello if NBMA neighbor is down, default 60s

Inactivity Timer - Time equaling dead time, reset every time a hello is received, if expired then neighbor is down

LSA Group Pacing Interval - Time to refresh more than 1 LSA at a time, default 240s.


OSPF Interface States

Down, P2P, Waiting, DR, BDR, DROthers, Loop back


OSPF Packet Types

Hello - Periodic message to create and maintain neighbor

Database Description (DD or DBD) – LSDB SUMMARY

Link State Request (LSR) - Request for LSDB

Link State Update (LSU) – Full LSDB as a reply of LSR

ACK - Acknowledgement for every OSPF message.


LSA important parameters

Sequence number - Serial number of lsa, min 0x80000001 max 0x7fffffff, new instance incremented by 1, if max value is reached then age is set to max age and lsa is flooded and finally flushed out, then that lsa is regenerated with the min value.

Checksum - Uses Fletcher algo and is calculated over the entire lsa except age

Age - 0 to 3600 sec, gets incremented by InfTransDelay and while inside LSDB, if max value is reached lsa is flooded and flushed out.

Max Age - 3600 sec

LS Refresh - Every 30 mins LSDB is refreshed, actually done to refresh corrupted lsa and to prevent lsa from reaching max age so that it is not flushed out.

Preference of LSA

When multiple instance of same LSA is received the preference logic is as follows

highest seq no

highest checksum

lsa having higher age or lsa having lower age if their ages differ by 15 mins (MaxAgeDiff)

Prefer all

Preference of Routes

When multiple same cost routes to same destination is present preference logic is as follows

longest sm

intra area

inter area

OE1

OE2

By default 4 equal cost paths maximum 6 equal cost paths.


Exploring EIGRP(Enhanced Interior Gateway Routing Protocol) :

Intro:

Hybrid or Advanced Distance Vector

Uses Diffusing Update Algorithm (DUAL)

Has characteristics of both distance vector and link state

Cisco Proprietary

Very fast convergence

Uses bounded triggered partial update

Multicast updates at 224.0.0.10

Uses hello message to establish neighborhood and uses periodic hello message to maintain neighborhood

AD value 90

Uses IP port 88

By default class full, can be configured as classless

Can use bandwidth, delay, reliability, load and mtu for route cost, but by default uses bandwidth and delay. Bandwidth is the lowest bandwidth (choke bandwidth) of the entire path and delay specifies the total delay of the entire path.

Can support unequal cost load balancing

Has routing table, neighbor table, topology table

Always tries to maintain a ready backup route

Configuration is complex

May not operate in low end router

EIGRP route cost = (10 7 / choke bandwidth (kbps) + total delay (micro secs) /10 ) x 256.

How EIGRP maintains a ready backup route

EIGRP considers 2 types of route cost for any particular destination. The route cost from the router itself is called feasible distance (FD) and the route cost from the next hop is called advertised distance (AD) or, reported distance(RD). EIGRP can also maintain backup routes for the main route or primary route.

The primary route for the destination is the route having smallest FD and it is called successor route. If EIGRP finds any route whose RD is less than the FD of the successor route then, that route is called feasible successor route or backup route. This logic ensures a loop free topology. If the primary route fails immediately the backup route is used.


EIGRP route types

Internal Routes – routes of the same EIGRP domain, marked by D

External Routes – routes coming from external routing domain, marked by DEX

Passive Route – stable route, marked by P in topology table, in both routing table and topology table

Active Route – route under processing, marked by A in topology table, only in topology table

Successor Route – route having lowest cost (FD), present in routing table and topology table

Non successor Route – route having FD higher than successor FD, only seen in topology table

Feasible successor Route – a special non successor whose RD is less than successor FD, by default only seen in topology table.


How EIGRP can do unequal cost load balancing

All routing protocols can do load balancing only using equal cost paths. EIGRP is exceptional as it can do load balancing using unequal cost paths. EIGRP supports a property called variance. It’s value ranges from 1 to 128.

If there is any feasible successor route whose cost is less than or equal to the product of variance and cost of successor route then that feasible successor can be used for load balancing along with the successor route.

If cost(FS) <= variance X cost(S), then that FS is used for load balancing

EIGRP Router ID> Unique identification of an EIGRP router in the domain. Manual configuration is most preferred, next preference goes to highest loop back address, last preference goes to highest interface address.


EIGRP Packet types

Hello - message to establish and maintain neighborhood

Query - query for any particular route

Reply - response for query

Update - route updates

ACK - acknowledgement

EIGRP Timers

Hello time - Periodic interval between consecutive hello

Hold time - Period to tolerate outstanding hello from a neighbor

Active time - Time up to which a route can stay in active state, default 180s

Multicast flow timer - Time for transition from multicast transmission to uni cast transmission, based on SRTT

RTO - Retransmission time out, time between consecutive uni cast transmission, based on SRTT

SRTT - Smooth round trip time, average time in ms between transmission of a packet to a neighbor and receiving ack from it.

---------------------------------------------------------------

A strong foundation in routing protocols is essential for building robust and efficient networks. Stay tuned for more networking-related content in the future, where we will explore additional protocols, advancements, and best practices...

#networking #routingprotocols #rip #ospf #eigrp #networkinfrastructure #itinfrastructure #routing #skills

要查看或添加评论,请登录

社区洞察

其他会员也浏览了