0% found this document useful (0 votes)
30 views27 pages

16 Routing Protocols RIP OSPF BGP 10122024 123352pm

Uploaded by

m85007755
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views27 pages

16 Routing Protocols RIP OSPF BGP 10122024 123352pm

Uploaded by

m85007755
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Routing Protocols

A routing protocol is a set of rules and procedures used by


routers to determine the best path for forwarding data
packets across a network. These protocols enable routers to
communicate with each other to exchange information
about network topology, which helps them make informed
decisions about how to route data.
There are two main categories of routing protocols:

1. Interior Gateway Protocols (IGP)


2. Exterior Gateway Protocols (EGP)
Routing Protocols

• Interior Gateway Protocols (IGP): These are used within


a single autonomous system (AS), which is typically a
network or a group of networks under a common
administration.
– Examples:
• RIP (Routing Information Protocol): A distance-vector protocol
that uses hop count as a metric for path selection. It is simple but less
scalable for larger networks.
• OSPF (Open Shortest Path First): A link-state protocol that uses a
more complex algorithm to find the shortest path based on various
factors like bandwidth, delay, etc. It is scalable and more efficient
than RIP.
• EIGRP (Enhanced Interior Gateway Routing Protocol): A hybrid
protocol (combining distance-vector and link-state features)
developed by Cisco. It is more efficient than RIP but simpler than
OSPF.
Routing Protocols
• Exterior Gateway Protocols (EGP): These are used
between different autonomous systems, typically on the
internet.
– Example:
• BGP (Border Gateway Protocol): The most widely used EGP for
inter-domain routing on the internet. BGP determines the best routes
based on various attributes, such as path, policy, and network
reachability.
Routing Protocols
• Key Functions of Routing Protocols:
• Path Discovery: Finding all available routes to a destination.
• Path Selection: Choosing the best route based on criteria like
distance, load, or reliability.
• Route Maintenance: Updating and maintaining routing tables to
reflect changes in the network topology.
• Convergence: The process by which all routers in a network agree on
the current network topology.
• Routing protocols play a crucial role in maintaining efficient and
reliable communication within and between networks.
Routing Information Protocol

• Routing Information Protocol (RIP) is a dynamic routing protocol that uses


hop count as a routing metric to find the best path between the source and the
destination network.
• Hop Count
• Hop count is the number of routers occurring in between the source and
destination network. The path with the lowest hop count is considered as the
best route to reach a network and therefore placed in the routing table. RIP
prevents routing loops by limiting the number of hops allowed in a path from
source and destination. The maximum hop count allowed for RIP is 15 and a
hop count of 16 is considered as network unreachable.
Routing Information Protocol RFC 1058
• Receive a RIP message (a response)
• Add one hop for each advertised dest
• Repeat
• If (dest not in routing table)
• Add the advertised info to the
table
• Else
• If (next-hop is the same)
• Replace with the
advertised one
• Else
• If (advertised hop count <
one in the table)
• Replace entry in the
routing table
• Return
• Distance vector algorithm (Bellman-Ford)
– Sharing knowledge about the entire AS
– Shares only with neighbors
– Shares at regular intervals (different from DVA)
Initializing and Updating Routing Table

• Destination Metric Gateway


• Dest D G

• Rule to implement RIP based in DVA


• If Information is not from G
– Update to reflect minimum cost
• If Information is from G
– Always update
RIP message format
• RIP messages uses UDP datagrams on port 520
• Size of datagram limited to 512 bytes (allow advertisement of 25 routes.

• Version: 1 or 2
• Family: of protocol used for TCP/IP it is 2
• Network address : 32 bytes
• Distance: hop count from the advertising router to the destination network
RIP timers

• Periodic timer: control advertising of regular update messages (25-35 sec)


• Expiration timer: governs the validity of a route (180 sec)
– Every time an update (on a 30 sec average) is received the timer is reset
– If no update received within this timer the metric is set to 16
• Garbage timer: 120 sec
– A route can be advertised with a 16 metric for 120 sec before it get purged
Border Gateway Protocol

What is BGP?
• Border Gateway Protocol (BGP) is the postal service of the Internet. When
someone drops a letter into a mailbox, the Postal Service processes that piece
of mail and chooses a fast, efficient route to deliver that letter to its recipient.
Similarly, when someone submits data via the Internet, BGP is responsible for
looking at all of the available paths that data could travel and picking the best
route, which usually means hopping between autonomous systems.

• BGP is the protocol that makes the Internet work by enabling data routing.
When a user in Singapore loads a website with origin servers in Argentina,
BGP is the protocol that enables that communication to happen quickly and
efficiently.
Border Gateway Protocol

• What is an autonomous system?


• The Internet is a network of networks. It is broken up into
hundreds of thousands of smaller networks known as
autonomous system .Each of these networks is essentially
a large pool of routers run by a single organization.
Border Gateway Protocol (RFC 1771)
• Based on the path vector routing.
• Distance-vector protocol not preferred for inter-AS routing (exterior routing
protocol)
– Assumes all routers have a common distance metrics to judge route preferences.
• If routers have different meanings of a metric, it may not be possible to create stable, loop
free routes.
– A given AS may have different priorities from another AS.
– Gives no information about the ASs that will be visited.
• Link-state routing protocol
– Different metrics.
– Flooding is not realistic.
• Path vector routing
– No metrics,
– Information about which networks can be reached by a given router and ASs to be
crossed.
• Differs from DVA
– Path vector approach does not include a distance or cost estimate
– Lists all of the ASs visited to reach destination network.
BGP (continued)

• Messages are sent over TCP connections on port 179.


• Functional procedures
– Neighbor acquisition (open message, acceptance through Keepalive message)
– Neighbor reachability (periodic Keepalive messages)
– Network reachability (broadcast an update message)
• Each routers maintains a database of networks that can be reached
• + preferred route to this network.
• RFC does not address
• How a router knows the address of another router.
• Up to network admin.
The diagram above illustrates a simplified version of BGP. In this version there are only six ASes on
the Internet. If AS1 needs to route a packet to AS3, it has two different options:
Hopping to AS2 and then to AS3:
AS2 → AS3
Or hopping to AS6, then to AS5, AS4, and finally to AS3:
AS6 → AS5 → AS4 → AS3
In this simplified model, the decision seems straightforward. The AS2 route requires fewer hops than
the AS6 route, and therefore it is the quickest, most efficient route. Now imagine that there are
hundreds of thousands of ASes and that hop count is only one part of a complex route selection
algorithm. That is the reality of BGP routing on the Internet.
Open Shortest Path First (RFC 1247)
• Uses IP, has a value in the IP Header (8 bit protocol field)
• Interior routing protocol, its domain is also an autonomous system
• Special routers (autonomous system boundary routers) or backbone routers
responsible to dissipate information about other AS into the current system.
• Divides an AS into areas
• Metric based on type of service
– Minimum delay (rtt), maximum throughput, reliability, etc..
OSPF (type of links)
OSPF (link state advertisement)

Network Link
Router Link
OSPF (link state advertisement)
Router Link Advertisement
This is a Type-1 LSA exchanged by the routers which belongs to a
same area. The router contains status of link, Router I’d, IP
information and current interface state. If a router is connected to
multiple areas then separate Type 1 LSA is exchanged.

Network Link Advertisement


This is a Type-2 LSA which is send by DR (Designed Router) only to
all the other routers present in the same area (broadcast or multi-
access network) . These contain the DR and BDR IP information and
also the state of other routers that are part of same network.
Remember DR is responsible for distributing routing information to
all other routers present in same broadcast area.
OSPF (link state advertisement)
Summary LSA
This is a Type-3 LSA which are generated by ABRs(Area Boundary
Router ) to areas other than in which it resides. The topological database
which ABR receives from other areas are injected into the backbone area.
This includes the IP information and Router I’d of ABR that is advertising
these LSA.

Summary ASBR (Area Summary Border Router) LSA


ABR send these Type 4 LSA towards the area other than the
area in which they are generated. These LSAs are generated by
ABR to tell others the route to ASBR.

AS external link advertisement


These LSAs are generated by ASBR to advertise routes of
other Autonomous System than OSPF.
OSPF (LSA cont.)

Summary link to Network

Summary link to AS boundary router

External Link
Types of OSPF packets and header format
Types of OSPF packets and header format

Hello packet:
It is the type 1 packet. The hello message will perform 4 major
functions such as:

• It discovers the other OSPF speaking routers on the common


subnets.
• Verify the bidirectional visibility between the routers
• Check for the agreement on a particular configuration parameter
• Monitor the neighbour's health to react suppose the neighbour
fails.
Types of OSPF packets and header format

Database descriptor packet:

For the link state routing protocols, it is essential that the link
state database for all the routers remain synchronized. This
synchronization will begin as soon as an adjacency formed
between the neighbours. The OSPF uses the DBD - database
descriptor packets for that purpose. The database can be
described by using the multiple packets.
Types of OSPF packets and header format

Link state request packet:


After all the LSA header exchanged using the DD (Database
Description) packets, each neighbouring router has the list of the
LSA known by a neighbour. Using this knowledge, the router
need to request the full copy of the each LSA, which is missing
from the own LSDB. To determine whether the neighbour has
the most recent copy of the certain LSA, the router looks at a
sequence number of an LSA in the LSDB and also compares
with the sequence number of that of the same LSA learned from
a DD packet. Each LSA sequence number is increased each time
the LSA re-originated or changes. The Routers will use the link
state packets to request 1 or more LSA from the neighbor.
Types of OSPF packets and header format

Link state request packet:


After all the LSA header exchanged using the DD packets, each
neighbouring router has the list of the LSA known by a
neighbour. Using this knowledge, the router need to request the
full copy of the each LSA, which is missing from the own
LSDB. To determine whether the neighbour has the most recent
copy of the certain LSA, the router looks at a sequence number
of an LSA in the LSDB and also compares with the sequence
number of that of the same LSA learned from a DD packet. Each
LSA sequence number is increased each time the LSA re-
originated or changes. The Routers will use the link state packets
to request 1 or more LSA from the neighbor.
Types of OSPF packets and header format

Link state update packet:

This packet implements the LSA flooding. Every LSA


comprises the metric, topology information and routing to
describe the OSPF network portion. A local router will
advertise the LSA within the LSU packet to the
neighboring router. Additionally, a local router advertises
an LSU packet with the information in response to the
LSR packet.
Types of OSPF packets and header format
Link state acknowledgement packet:

The OSPF needs acknowledgement for a receipt of the each


LSA. The multiple LSA may be acknowledged in the single
LSAck packet. The LSR/LSA process will use the reliable
protocol, which has 2 options, in that link state
acknowledgement is among them. The LSU can be
acknowledged by a receiver of an LSU simply repeating a
same LSU back to the sender. Alternatively, the router will
send back the LSAck packet to acknowledge the packets that
contain the acknowledged LSA header list. As s result, the
LSDB must be identical. The reliability of the flooding link
state advertisements is made by explicitly acknowledging the
flooded advertisements.

You might also like