0% found this document useful (0 votes)
6 views

Routing Protocols

Uploaded by

microrew6000
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Routing Protocols

Uploaded by

microrew6000
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Computer Network

Routing Protocols
Routing protocols

Routing Table Types

Packets go
from source Static Routing Dynamic Routing
to destination
via routers.
• non-adaptive, • adaptive,
The router • don’t consider • consider
consults the
routing congestion congestion,
table
• don’t • incorporate
Routing protocols are
needed to create the
incorporate topological
routing tables
dynamically
topological changes
changes

2
Unicast Routing

A routing protocol is a combination of rules that lets routers inform one another of changes.

Only one source and only one destination.

When a router receives a packet, it forwards the packet through only one of its
ports as defined in routing table

It discards the packet, if there is no route.

3
Interior Vs. Exterior Routing

Autonomous System: Group of Routing


networks and routers under the protocols
authority of a single
administration.
Interior Exterior
Routers inside an autonomous
system is referred to as interior
routing.
RIP OSPF BGP
Routing between autonomous
systems is referred to as exterior
routing

4
Metrics

Metric is the cost assigned for passing through a network.


• A router chooses the route with smallest metric.
RIP (Routing Information Protocol): Cost of passing each network is same; one hop count.
• If a packet passes through 10 networks to reach the destination, the total cost is 10
hop counts.
OSPF (Open Shortest Path First): Administrator assign cost based on type of service
required.
• Maximum throughput, Minimum delay

BGP (Border Gateway Protocol): Criterion is the policy, which is set by the administrator

5
Routing Information Protocol (RIP)
RIP is based on Distance vector routing.
Distance vector routing
Each router periodically shares its knowledge about the entire AS.
Sharing only with neighbors.
Sharing at regular intervals: 30 seconds.
Simple to understand and implement
Each router construct its own routing table based on routing information
Exchanged between neighbors
Used mainly for homogeneous networks
Distance Vector Routing Table

Routing table
Has one entry for each destination network of which the router is aware.
Each entry has
destination network address,
the shortest distance to reach the destination in hop count, and
next router to which the packet should be delivered to reach its final destination.
Hop count is the number of networks that a packet encounters to reach its final destination.

7
RIP Updating Algorithm
Receive: a response RIP message
1. Add one hop to the hop count for each advertised destination.
2. Repeat the following steps for each advertised destination:
• If (destination not in the routing table)
• Add the advertised information to the table.
Else
• If (next-hop field is the same)
• Replace entry in the table with the advertised one.
Else
• If (advertised hop count smaller than one in the table)
• Replace entry in the routing table.
3. Return.
Example of updating a routing table
OSPF (Open Shortest Path First)

• OSPF divides an autonomous system into areas.


• All areas must be connected to special area called backbone.
• Routers in this area are called
as backbone routers.
• This area identification no. is 0.

• Router inside the area flood area with routing info.


• At border, boundary router summarize info. about area and send to other areas.
OSPF

Metric
• Administrator can assign the cost to each route based on type of service (minimum delay,
maximum throughput)

Link State Routing


• Sharing knowledge about the neighborhood.
• Sharing with every other router in this area.
• Each neighbor sends the packet to all its neighbors, and so on.
Every router that receives the packet sends copies to each of its neighbors.
Eventually, every router has received a copy of the same information.
• Sharing when there is a change
Types of Link- Point-to-Point Link

• Connects two routers without any other router or host in between.


• Directly connected routers.
• Only one neighbour.
Transient link

• Several connected routers


• Data can enter and leave through any of the routers
Stub Link

• A network that is connected to only one router.


• The data packets enter the network through this single router and leave the
network through this same router.
Virtual Link
• When the link between two routers is broken, the administration may create
a virtual link between them, using a longer path that probably goes through
several routers.
Dijkstra Algorithm
Dijkstra algorithm
— Calculates the shortest path between two points on a network, using a
graph made up of nodes and edges.
— Algorithm divides the nodes into two sets: tentative and permanent. It
chooses nodes, makes them tentative, examines them, and if they pass the
criteria, makes them permanent.
Dijkstra Algorithm
1. Start with the local node (router): the root of the tree.
2. Assign a cost of 0 to this node and make it the first permanent node.
3. Examine each neighbor node of the node.
4. Assign a cumulative cost to each node and make it tentative.
5. Among the list of tentative nodes
1. Find the node with the smallest cumulative cost and make it permanent.
2. If a node can be reached from more than one direction
1. Select the direction with the shortest cumulative cost.
6. Repeat steps 3 to 5 until every node becomes permanent.
19
BGP
• Border Gateway Protocol
• Inter-autonomous system routing protocol.
• BGP is based on a routing method called path vector routing.
Why D.V. and L.S. are not good enough?
• Distance Vector routing
— Sometimes we don’t want the route with smallest hop count as the preferred route [like,
avoiding non-secure routes].
— D.V routing information provides only the hop count and not the path that leads to that destination.

• Link State routing


— Internet is too big for this routing method
— Whole internet would require each router to have a huge link state database.
— It would also take a long time for each router to calculate its routing table using the Dijkstra algorithm

• Path Vector routing


— Each entry in the routing table contains the destination network, the next router, and the path to reach
the destination.
— The path is usually defined as an ordered list of autonomous systems that a packet should travel to reach
the destination.
Path Vector Messages

• Autonomous boundary routers advertise the reachability of the networks in their


own autonomous systems to neighbor autonomous boundary routers.
Path Vector Messages
• Each router that receives a path vector message verifies that the advertised path is in
agreement with its policy. If it is, the router updates its routing table and modifies the
message before sending it to the next neighbour.

• The modification consists of adding its AS number to the path and replacing the next
router entry with its own identification.

• Loop prevention: Path vector avoids this problem by checking the path to see if its own AS
is in the list.

• Policy Routing: Check the AS in the path list against a policy. If it is against the policy, the
router can ignore that path and that destination.
Types of BGP Messages
Types of BGP Messages
• Open: To create a neighborhood relationship. If the neighbor accepts the neighborhood
relationship, it responds with a keep-alive message, which means that a relationship has been
established between two routers

• Update message is used by router to withdraw destinations that have been advertised
previously, announce a router to a new destination, or do both.

• Keep-alive: Routers exchange this message regularly (before their hold time expires) to tell each
other that they are alive.

• Notification: Sent by a router whenever an error condition is detected or a router wants to


close the connection.
Class Practice Questions
• What are the different modes in the router?
• List the advantages and limitations of static Routing

26
Class Practice Solutions
Sol 1:
• User exec mode
• Privileged mode
• Global Configuration mode
• Specific Configuration mode
Sol 2:

27

You might also like