Routing Protocols
Routing Protocols
Routing Protocols
Routing protocols
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.
When a router receives a packet, it forwards the packet through only one of its
ports as defined in routing table
3
Interior Vs. Exterior Routing
4
Metrics
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)
Metric
• Administrator can assign the cost to each route based on type of service (minimum delay,
maximum throughput)
• 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.
26
Class Practice Solutions
Sol 1:
• User exec mode
• Privileged mode
• Global Configuration mode
• Specific Configuration mode
Sol 2:
27