Routing Protocol
Routing Protocol
Routing comes from the term “route” which means the path to transport data packets in
computer networks. Routing is a process of moving data from one network to another
choosing the best path for transport. Routing Protocols are set of rules and algorithms
used to select the best path for transport for example, BGP, RIP, etc.
Working Process:
Neighbor Discovery:
o Sends a “Hello” packet to directly connected routers.
o Forms R-R relationship with adjacent routers to exchange information.
LSA Exchange:
o Each router gathers info about directly connected links (bandwidth,
status, and cost). The routers exchange Link-State Advertisements
(LSAs).
o LSAs contain link cost and topology information, which routers use to
calculate the best path.
o Only changes in the LSA is shared, not the entire database.
o Stored in the common Link-State Database where, each router have
a copy and is synchronized across all routers.
Route Calculation:
o Each router runs Dijkstra’s Algorithm to calculate best path to every
destination.
o Best path is stored in the OSPF routing table.
Packet Forwarding:
o After the completion of the routing table, data packets are forwarded
through the most efficient path.
o If network changes occur, only the affected routers send updates,
making the overall process efficient.
Areas:
Backbone Area (Area 0):
o Main Highway
o Responsible for interconnecting other areas.
o All non-backbone areas must connect to this area for proper routing.
Regular or Standard Area:
o Contains internal routers and networks that exchange routing
information.
o Receives summarized routes from other areas via Area 0.
ii. IS-IS - Intermediate System to Intermediate System:
Primarily used and preferred by larger enterprises and ISPs.
Uses Dijkstra’s Algorithm.
Doesn’t require backbone Area 0.
Working Process:
Neighbor Discovery:
o Routers exchange “Hello” packets and form adjacencies when
settings match.
LSP Exchange:
o Similar to LSA but the structure is different.
o Each router creates a Link-State PDU (LSP) containing link
information.
o LSPs are flooded to all routers within the same area (Level 1) or
between areas (Level 2)
LSDB Synchronization:
o Same as OSPF, a common synchronized database maintained
across routers.
Path Calculations:
o Best routes are stored in the Forwarding Table (FIB).
Packet Forwarding:
o If network change occurs, IS-IS updates only the affected LSPs.
Process Involved:
Initialization:
o Each router starts by discovering directly connected networks
o Creates an initial routing table using:
Directly connected network
Next-hop router
Cost for each route
Sharing Updates:
o Sends entire routing table to directly connected neighbors at
regular intervals.
Update Routing Table:
o Updates are propagated hop-to-hop.
o When a router receives an update:
New route- It adds it to the routing table
Better route - Updates existing routing table
Same route - Ignore
o If Link fails:
Marks the route as unreachable (metric = infinity)
Update is sent to all neighboring routers
Loop prevention mechanism activates.
i. Routing Implementation Protocol (RIP):
Introduction:
Determines best path using hop count.
Maximum hop limit = 15.
Sends routing table every 30 seconds.
Working Process:
Router builds its routing table with directly connected devices
Every 30 seconds, router broadcasts its routing table to neighbors
RIP chooses route with lowest hop count.
o If multiple route has same hop count, it uses equal-cost load
balancing.
Updates are shared hop-by-hop.
If router detects an error:
o Sends “Unreachable” = if hop count = 16
o Uses UDP port 520 for communication.
Versions:
RIP v1:
o Original version of RIP
o Viable for small networks
o Doesn’t support CIDR (Classless Inter-Domain Routing):
Only works with Class A, B or C networks
o Sends update to all routers causing increase in traffic.
o This doesn’t support authentication, vulnerable to spoofing attacks.
RIP v2:
o Supports both CIDR and variable-length subnet mask (VLSM).
o Only broadcasts to RIP enabled routers.
o Uses MD5 authentication to avoid fake injection of routes to its routing
table.
ii. Interior Gateway Routing Protocol (IGRP):
Introduction:
Best path found using composite metric: Bandwidth, Delay, Load and
Reliability.
Max hop count = 255.
Updates after every 90 seconds.
Uses UDP port 9 for communication.
Unsupported in non-cisco devices.
Working Process:
Builds an initial routing table.
Updates after every 90 seconds to its neighbors.
If better metric is discovered, neighbors update their routing table.
Best route is selected.
If route fails, IGRP marks it as “Unreachable”.
Introduction:
Improvement over IGRP.
fast convergence, low bandwidth consumption, and advanced metric
calculations.
Uses DUAL Algorithm.
Supports Classless Routing (CIDR & VLSM).
Allows backup route in case of route failure.
Supports both IPv4 and IPv6.
Working Process:
Step 1:
o Discover neighbors by sending Hello Packets.
o Routers store neighbor’s details in the Neighbor Table.
Step 2:
o Exchange routing information via Update Packets.
o Routers store data in Topology Table.
Step 3:
o Uses DUAL Algorithm to find the best path.
o The route with the lowest feasible distance (FD) is selected as the
Successor.
o If an alternative path exists with a feasible condition (reported
distance < FD), it is stored as a Feasible Successor.
Step 4:
o Best route is installed into the routing table.
o If successor fails, switches to the backup path.
o If no Feasible Successor is available, EIGRP enters Active Mode
and queries neighbors for a new path.
Step 5:
o Continuously monitors the network using periodic “Hello Packets”.
o If a route fails, the router checks the Feasible Successor List for an
alternate path.
o If no alternate path exists, the router queries its neighbors and waits
for replies.
2. Exterior Gateway Protocol (EGP):
Introduction:
Exchange routing information between different Autonomous Systems (AS)
in the internet.
Used by ISPs and large networks to exchange routes.
Based on Path-Vector Routing.
Maintains AS Path information to prevent loops.
Type of EGP: BGP or Border Gateway Protocol
Working Process:
Two routers in different AS establish a connection.
o They exchange hello messages.
Routers periodically send “Keep Alive” messages.
o If no response is received, the router is deemed unreachable.
Protocol selects the best path on the basis of policies.
My Logic:
Following after the logic of NAT where, modified package is received by the ISP.
The ISP uses routing protocol to direct or route the package to its destination.
BGP is used to find the best route for data transfer from one network to another.
It does this by enabling connection between two Autonomous Systems (AS)
where, AS is the collection of networks (routers and their connected devices)
under control of a single organization or administrative authority which follows a
unified routing policy.
Key Points:
Inter-network connection
Finds best route for data share
Can re-route in case one path fails
Runs over TCP
Working Process:
Advertising routes: Each AS shares the IP range to its neighbors.
Path Selection: BGP selects the best path on the basis of path length,
speed and reliability, which may not always be the shortest path, but best
according to the policies.
Routing Updates: Updates route only when its necessary. For example,
Router addition, removal, etc.