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

Chapter 4 - Routing and Routing Protocols

Routing protocols allow routers to communicate with each other to distribute routing information and select optimal paths between nodes. There are two main types of routing protocols - static and dynamic. Static routing requires manual configuration and maintenance of routing tables, while dynamic routing uses routing protocols to automatically share and update routing information between routers. Dynamic routing protocols fall into two categories - distance vector protocols which share full routing tables, and link state protocols which share link status information.
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)
62 views

Chapter 4 - Routing and Routing Protocols

Routing protocols allow routers to communicate with each other to distribute routing information and select optimal paths between nodes. There are two main types of routing protocols - static and dynamic. Static routing requires manual configuration and maintenance of routing tables, while dynamic routing uses routing protocols to automatically share and update routing information between routers. Dynamic routing protocols fall into two categories - distance vector protocols which share full routing tables, and link state protocols which share link status information.
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/ 41

Chapter Five

Routing and Routing Protocol


Concept of routing
• A routing protocol specifies how routers communicate
with each other, distributing information that enables them
to select routes between any two nodes on a computer
network
• Routers perform the "traffic directing" functions on the
Internet;
– data packets are forwarded through the networks of the
internet from router to router until they reach their
destination computer.
• Routing algorithms determine the specific choice of route.
• Each router has a prior knowledge only of networks
attached to it directly.
• A routing protocol shares this information first among
immediate neighbors, and then throughout the network.
Concept of routing (cont …)
• This way, routers gain knowledge of the topology of the network.
• The ability of routing protocols to dynamically adjust to changing
conditions gives the Internet its survivability and reliability.
– disabled data lines
– Disabled computers and route data around obstructions is what
• The specific characteristics of routing protocols include
– avoid routing loops
– select preferred routes
– use information about hop costs
– the time they require to reach routing convergence
– Their scalability
• There are two basic methods of building a routing table:
– Static Routing
– Dynamic Routing
Static Routing
• A static routing table is created, maintained, and updated by a
network administrator, manually.
• A static route to every network must be configured on every
router for full connectivity.
• This provides a granular level of control over routing, but
quickly becomes impractical on large networks.
• Routers will not share static routes with each other, thus
reducing CPU/RAM overhead and saving bandwidth.
• However, static routing is not fault-tolerant, as any change to the
routing infrastructure (such as a link going down, or a new
network added) requires manual intervention.
• Routers operating in a purely static environment cannot
seamlessly choose a better route if a link becomes unavailable.
Dynamic Routing
• A dynamic routing table is created, maintained, and updated by a
routing protocol running on the router.
• Examples of dynamic routing protocols include
– RIP (Routing Information Protocol),
– EIGRP (Enhanced Interior Gateway Routing Protocol), and
– OSPF (Open Shortest Path First).
• Routers do share dynamic routing information with each other,
which increases CPU, RAM, and bandwidth usage.
• However, routing protocols are capable of dynamically choosing
a different (or better) path when there is a change to the routing
infrastructure.
• Disadvantage : The choice of the “best route” is in the hands of
the routing protocol, and not the network administrator
Dynamic Routing
• There are two distinct categories of dynamic routing protocols:
– Distance-vector protocols
• Examples of distance-vector protocols include RIP and
IGRP.
– Link-state protocols
• Examples of link-state protocols include OSPF and IS-IS.
• EIGRP exhibits both distance-vector and link-state
characteristics, and is considered a hybrid protocol.
Distance Vector Routing
Protocol
Overview
• Distance vector
– Assume each router knows its own address and cost
to reach each of its directly connected neighbors
• Bellman-Ford algorithm
– Distributed route computation using only neighbor’s
info
• Mitigating loops
– Split horizon and poison reverse
Bellman-Ford Algorithm
• Define distances at each node X
– dx(y) = cost of least-cost path from X to Y
• Update distances based on neighbors
– dx(y) = min {c(x,v) + dv(y)} over all neighbors V
Distance Vector Algorithm
• Iterative, asynchronous: each
local iteration caused by:
– Local link cost change
– Distance vector update
message from neighbor
• Distributed:
– Each node notifies
neighbors only when its
DV changes
– Neighbors then notify
their neighbors if
necessary
Step by Step
• c(x,v) = cost for direct link from x to v
– Node x maintains costs of direct links c(x,v)
• Dx(y) = estimate of least cost from x to y
– Node x maintains distance vector Dx = [Dx(y): y є N ]
• Node x maintains its neighborsʼ distance vectors
– For each neighbor v, x maintains Dv = [Dv(y): y є N ]
• Each node v periodically sends Dv to its neighbors
– And neighbors update their own distance vectors
– Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N
Example : Distance Vector
D sends vector to E
B sends vector to A
E sends vector to A
…until Convergence
Node Bʼs distance vectors
Handling Link Failure
Counting to Infinity
Why so High?
• Updates donʼt contain enough information
• Canʼt totally order bad news above good news
• B accepts Aʼs path to C that is implicitly through B!
• Aside: this also causes delays in convergence even
when it doesn't count to infinity
Mitigation Strategies
• Hold downs
– As metric increases, delay propagating information
– Limitation: Delays convergence
• Loop avoidance
– Full path information in route advertisement
– Explicit queries for loops (e.g. DUAL)
• Split horizon
– Never advertise a destination through its next hop » A doesn't
advertise C to B
– Poison reverse: Send negative information when advertising
a destination through its next hop
• A advertises C to B with a metric of ∞
• Limitation: Only works for “loop”s of size 2
Split Horizon Limitations
Example 2 : Distance Vector

Green : shortest path


Yellow : a new shortest path
Grey: nodes that are not neighbors of the current node
Red : invalid (distances from a node to itself, or via itself.
Example : Distance Vector (cont …)
Example : Distance Vector
Example : Distance Vector
Link State Routing Protocol
Link State Routing protocol
• Link state routing is a technique in which each router shares
the knowledge of its neighborhood with every other router in
the internetwork.
• The three keys to understand the Link State Routing
algorithm:
– Knowledge about the neighborhood: Instead of sending its routing
table, a router sends the information about its neighborhood only. A
router broadcast its identities and cost of the directly attached links
to other routers.
– Flooding: Each router sends the information to every other router on
the internetwork except its neighbors. This process is known as
Flooding. Every router that receives the packet sends the copies to
all its neighbors. Finally, each and every router receives a copy of
the same information.
– Information sharing: A router sends the information to every other
Link-State Routing protocol (cont …)
• Link State Routing has two phases:
• Phase One : Reliable Flooding
– Initial state: Each node knows the cost of its neighbors.
– Final state: Each node knows the entire graph.
• Phase Two : Route Calculation
– Each node uses Dijkstra's algorithm on the graph to calculate the
optimal routes to all nodes.
– The Link state routing algorithm is also known as Dijkstra's
algorithm which is used to find the shortest path from one node to
every other node in the network.
– The Dijkstra's algorithm is an iterative, and it has the property that
after kth iteration of the algorithm, the least cost paths are well
known for k destination nodes.
Link State Routing protocol (cont …)
• Each router will adjust its topology table accordingly, and will
calculate a new best route if required.
• By maintaining a consistent topology table among all routers
within an area, link-state protocols can converge very quickly
and are immune to routing loops.
• Additionally, because updates are sent only during a link-state
change, and contain only the change (and not the full table),
link-state protocols are less bandwidth intensive than distance-
vector protocols.
• However, the three link-state tables utilize more RAM and CPU
on the router itself.
• Link-state protocols utilize some form of cost, usually based on
bandwidth, to calculate a route’s metric.
• The Dijkstra Algorithm is used to determine the shortest path.
Link State Routing protocol (cont …)
• Let's describe some notations:
– c( i , j): Link cost from node i to node j. If i and j nodes are not
directly linked, then c(i , j) = ∞.
– D(v): It defines the cost of the path from source code to
destination v that has the least cost currently.
– P(v): It defines the previous node (neighbor of v) along with
current least cost path from source to v.
– N: It is the total number of nodes available in the network.
Link State Routing protocol (cont …)
• Algorithm
Example
Example (cont …)
• Step 1:
– The first step is an initialization step.
– The currently known least cost path from A to its directly attached
neighbors, B, C, D are 2,5,1 respectively.
– The cost from A to B is set to 2, from A to D is set to 1 and from A
to C is set to 5.
– The cost from A to E and F are set to infinity as they are not
directly linked to A.
Example (cont …)
• Step 2:
– In the above table, we observe that vertex D contains the
least cost path in step 1.
– Therefore, it is added in N. Now, we need to determine a
least-cost path through D vertex.
Example (cont …)
• Step 3:
– In the above table, we observe that both E and B have the least
cost path in step 2. Let's consider the E vertex.
– Now, we determine the least cost path of remaining vertices
through E.
Example (cont …)
• Step 4:
– In the above table, we observe that B vertex has the least
cost path in step 3.
– Therefore, it is added in N. Now, we determine the least
cost path of remaining vertices through B.
Example (cont …)
• Step 5:
– In the above table, we observe that C vertex has the least
cost path in step 4.
– Therefore, it is added in N. Now, we determine the least
cost path of remaining vertices through C.
Example (cont …)
Link State Routing protocol (cont …)
• Disadvantage
• Heavy traffic is created in Line state routing due to
Flooding. Flooding can cause an infinite looping, this
problem can be solved by using Time-to-leave field
Comparison of LS and DV algorithms
Message complexity Robustness: what happens if router
malfunctions?
• LS: with n nodes, E links, O(nE) msgs
LS:
sent
– node can advertise
• DV: exchange between neighbors only incorrect link cost
– convergence time varies – each node computes
Speed of Convergence
only its own table
DV:
• LS: O(n2) algorithm requires O(n) msgs
– DV node can advertise
– may have oscillations incorrect path cost
• DV: convergence time varies – each node’s table used
– may be routing loops by others (error propagate
thru network)
– count-to-infinity problem

You might also like