SlideShare ist ein Scribd-Unternehmen logo
1 von 54
CS 408
Computer Networks
Chapter 11: Routing in IP
Introduction
• Routers forward IP datagrams from one router
to another on the path from source towards
destination
• Routing protocols
—To decide on routes to be taken
• Routers must have idea of topology of internet
in order to pick best route to take
—Decisions based on some least cost criteria
—May depend on the current conditions
A Sample Configuration of
Routers and Networks
• Link costs are
at the output of
the links
• There is no
cost of getting
data from the
network
• For example,
the cost of the
path X-A-F-Y
is 1+1+4=6
Routing Table
• One routing table is needed for each router
• One entry for each destination network
—Not for each destination host
—Once datagram reaches router attached to destination network,
that router can deliver to host
• Each entry shows next node on the route to destination
—Not whole route
• Routing tables may also exist in hosts
—If multiple routers attached to network, host needs table saying
which to use
—If the attached network has single router, then not needed
• All traffic must go through that router (called the gateway)
Example Routing Tables
Fixed Routing
• Single permanent route configured for each
source-destination pair
—Routes are fixed
—May change when topology changes (not so often)
• No dynamic updates
Adaptive Routing
• As conditions on internetwork change, routes
may change
—Failure
• of routers or networks
—Congestion
• If a particular section of the network is heavily congested, it
is better not to use that part and change the route
Adaptive Routing - Challenges
• Complex routing decisions
—Router processing increases
• Depends on information collected in one place
but used in another
—More information exchanged improves routing
decisions but increases overhead
• May react too fast
—causing congestion through oscillation (fluttering)
• May react too slow
—By the time routing decision changes, the network
conditions may be much more different
Adaptive Routing - Challenges
• Looping
—Packet forwarded by a router eventually returns to
that router
—May occur when changes in connectivity not
propagated fast enough to all other routers
—An important pathology that must be prevented in
routing algorithms
• Despite all challenges, adaptive routing prevails
due to its flexibility
Classification of Adaptive
Routing Strategies
• Based on information sources
—Local
• E.g. route each datagram to network with shortest queue
– Balance loads on outgoing networks
– May not be heading in correct direction
• Rarely used
—Adjacent nodes
• Delay and outage info from adjacent nodes
• Distance vector algorithms
– Discussed later
—All nodes
• Link-state algorithms
– Discussed later
Flooding
• No network info required
• Packet sent by node to every neighbor
• Incoming packets retransmitted on every link
except incoming link
• Eventually a number of copies will arrive at
destination
• Each packet is uniquely numbered so duplicates
can be discarded at destination
Flooding
Example
Flooding
• Precautions against unlimited grow in circulation
—Nodes can remember packets already forwarded to
keep network load in bounds
• called "Restricted Flooding"
—Include a hop count in packets.
• Set to a maximum value
• Decrease one at each hop
• Discard when 0
Properties of Flooding
• All possible routes are tried
—very robust
—can be used for emergency messaging
• At least one packet will use minimum hop count
route
—Can be used once to set up a route
• All nodes are visited
—Useful to distribute information (e.g. routing info)
Random Routing
• Node selects one outgoing path for
retransmission of incoming packet
• Selection is at random
—equally likely
• all outgoing links are utilized equally in the long-run
—can select outgoing path based on a probability
• e.g. probability based on data rate
– good traffic distribution
• No network info needed
• Route is typically neither least cost nor minimum
hop
Autonomous Systems (AS)
• An important concept for TCP/IP routing in IP
layer
• AS is defined as set of routers and networks
managed by single organization (e.g. an ISP)
—Exchange routing information in itself
—Common routing protocol
• An AS must be connected in itself
—There is at least one route between any pair of nodes
Interior Routing Protocol (IRP)
Exterior Routing Protocol (ERP)
• (not actually protocols, just concepts)
• IRP passes routing information between routers
within AS
—Need exchange of info among the routers only in AS
—Different autonomous systems may have different
IRP mechanisms
• Autonomous systems need to talk to each other
—Need minimum information from other connected AS
—A few routers in each AS must talk
—Use Exterior Routing Protocol (ERP)
• Again, a concept
—ERP does not deal with details within source and
target AS
Application of Exterior and Interior
Routing Protocols
Approaches to Routing –
Distance-vector
• Each router exchange information with neighboring routers
—Definition: Two nodes are said to be neighbors if both are directly
connected to the same network
• Each node keeps
—distance vector and next-hop vector (Routing table)
• One entry for each destination network
—a vector of link costs for each directly attached network
• First generation routing algorithm for ARPANET
• Used by Routing Information Protocol (RIP)
—will discuss later
• Requires transmission of information by each router to all
neighbors
—Distance vector that contain estimated path costs for all destination
networks
—Changes may take long time to propagate
Approaches to Routing –
Link-state
• Designed to overcome drawbacks of distance-vector
• When router initialized, it determines link cost on each interface
• Advertises set of link costs to all other routers in topology
— Not just neighboring routers
• After that, each router monitors its link costs
— If significant change, router advertises new set of link costs
• In this way, each router builds up a picture of the entire topology
— Can calculate shortest path to each destination
— Use an algorithm to determine shortest paths
• In practice, Dijkstra's algorithm
• Router constructs routing table, listing first hop to each destination
• Second generation routing algorithm for ARPANET
• Open shortest path first (OSPF) protocol uses link-state routing.
Distance-vector and Link State
• Both of them is suitable for IRP, not ERP
• Several reasons. Some of them:
—Both require homogenous metrics that may be the
case within an AS, but we cannot assume then same
for several AS systems
—Flooding the link state information across multiple AS
systems is not scalable
Approaches to Routing –
Path-vector
• Suitable approach for Exterior Router Protocols
• Provide information about which networks can
be reached by a given router and Autonomous
Systems crossed to get there
—Does not include distance or cost estimate
• BGP (Border Gateway Protocol) is an example
to path-vector routing protocol
Least Cost Algorithms
• Routing decision is based on some least-cost criteria
(minimization problem)
—If minimize number of hops, link cost is 1
—Link cost may be inversely proportional to capacity, proportional
to current load (queue length), or some combination
—May be different in two directions (e.g. if cost is queue length)
• More formal problem definition
—For each pair of nodes,
find the least cost path
—Cost of path between two nodes
is sum of costs of links traversed 
• Dijkstra's algorithm
• Bellman-Ford algorithm
Dijkstra's Algorithm
• Find shortest paths from a given node to all
other nodes, by developing paths in the order of
increasing path length (cost)
• Proceeds in stages
—At each stage shortest path from source to one node
is determined
—The nodes for which shortest path determined are
kept in a set called T
—At each iteration, node not in T but has the shortest
path from source added to T
—As each node added to T, path from source to the
nodes not in T are checked to see whether there is a
better path through this newly added node
Dijkstra's Algorithm –
Formal (1)
• N = set of nodes in the network
• s = source node
• T = set of nodes so far incorporated (shortest path
found)
• w(i, j) = link cost from node i to node j
w(i, i) = 0
w(i, j) = ∞ if nodes not directly connected
w(i, j) ≥ 0 if nodes are directly connected
• L(n) = cost of current least-cost path from s to n
—At the end of algorithm (actually as soon as n is added to T),
L(n) is the cost of least-cost path from s to n
[Initialization]
T = {s}
i.e. set of nodes so far incorporated consists of only source node
L(n) = w(s, n) for all n ≠ s
i.e. initial path costs to neighboring nodes are link costs
Dijkstra's Algorithm –
Formal (2)
Repeat
[Get Next Node]
Find neighboring node not in T with least-cost path from s
Find x ∉ T such that
Add x to T. L(x) is the shortest path from s to x.
[Update Least-Cost Paths]
L(n) = min[L(n), L(x) + w(x, n)] for all n ∉ T
If the latter term is the minimum, the path from s to n is now
the path from s to x concatenated with the edge from x to n.
Until all nodes are in T
Dijkstra's Algorithm –
Formal (3)
Lx( )=
min
j∉T
L j()
Dijkstra’s Algorithm – Example
See Table 11.1a for the Trace
Bellman-Ford Algorithm
• Iterative
1.find the shortest paths from a source to all possible
destinations using only one link
2.then using max. two links by adding appropriate links
to the paths of step 1
3.then using max. 3 links on top of paths with two links
4.so on .. until no improvement is gained by adding
more links
Bellman-Ford Algorithm –
Formal (1)
• s = source node
• w(i, j) = link cost from node i to node j
w(i, i) = 0
w(i, j) = ∞ if nodes are directly connected
w(i, j) ≥ 0 if nodes directly connected
• h = maximum number of links in path at
current stage
• Lh(n) =cost of least-cost path from s to n such
that path contains no more than h links
Bellman-Ford Algorithm –
Formal (2)
[Initialization]
L0(n) = ∞, for all n ≠ s
h=0
Bellman-Ford Algorithm –
Formal (3)
[Update]
Loop until no more improvements
For each n ≠ s, compute
If s-to-n cost reduced, then path also
changes to s -…- j - n
h=h+1
Lh+1 n( )=
min
j
Lh j( )+ w j, n( )[ ]
Bellman-Ford Algorithm – Example
See Table 11.1b for the Trace
RIP (Routing Information
Protocol)
• Uses Distance Vector Routing approach
—Each node exchanges information with neighbors
—Directly connected by same network
• Each node maintains three vectors
—Link cost
• One entry for each network it attaches
—Distance vector (metric column in the next slide)
• Current cost of route from the node to each destination network in the
configuration
—Next hop vector (Next router column in the next slide)
• The next router for each destination network in the configuration
• Every 30 seconds, exchange distance vector with neighbors
• Use distance vectors received from neighbors to update
distance and next hop vector
—Similar to Bellman-Ford algorithm.
Routingtable
Distance Vector Algorithm Applied
to Figure 11.1
RIP Details –
Incremental Update
• Previous algorithm implies that all distance
vector updates arrive within a small window of
time
—Not correct, because (i) no synchronization, (ii) RIP
uses UDP that means no reliability.
• Actually RIP is designed to operate
incrementally. Tables are updated after receipt
of individual distance vector
RIP Details –
Topology Change
• If no updates are received from a router within
180 seconds, mark the connection as invalid
—Assumes router crash or network connection
unstable
—Set distance value to infinity
• Actually 16. Why? See next.
Counting to Infinity Problem (1)
• A problem of RIP is slow convergence to a change in topology
• Consider the example network below with all link costs 1
— The distance of B to network 5 is 2, next hop is D
— A and C have distances of 3 and next hop is B
Counting to Infinity Problem (2)
• Suppose router D fails:
—B determines network 5 no longer reachable via D
• Sets distance to 4 based on report from A or C
—At next update, B tells A and C this new distance to network 5
—A and C receive this and increment their network 5 distance to 5
• 4 from B, plus 1 to reach B
—B receives distance count 5 and assumes network 5 is 6 unit
cost away
—Repeat until reach infinity (16)
—Update interval is 30 seconds, so reaching 16 takes several
minutes. If infinity is larger, then convergence would take longer.
Split Horizon Rule
• Counting to infinity problem is caused by
misunderstanding between B and A, and
between B and C
—Each thinks it can reach network 5 via the other
• Split Horizon rule says “do not send information
about a route back in the direction it came from”
—Router sending information is nearer to the destination
than you are
—Don't teach your grandma how to suck eggs! 
• Erroneous route now eliminated within time out
period (180 seconds)
Read from book (page 404 –
405)
• RIP Packet Format
• RIP limitations
Open Shortest Path First
(OSPF)
• RIP is limited in large internets
• OSPF is preferred interior routing protocol for
TCP/IP based internets
• Link state routing used
Link State Routing
• When initialized, router determines link cost on
each interface
• Router advertises these costs to all other
routers in topology
• Router monitors its costs
—When changes occur, costs are re-advertised
• Each router constructs topology and calculates
shortest path to each destination network
—Can use any algorithm, but in practice Dijkstra is
used
OSPF Overview
• Router maintains the state of local links
• Transmits updated state information to all
routers in AS or in area (see later)
• Router receiving update must acknowledge
• Each router maintains a database that reflects
the topology
—Directed graph
—And then generates a spanning tree and routing table
Router Database Graph
• Vertices (nodes)
—Routers
—Networks
• Edges
—Connecting two routers
—Connecting router to network
Sample Autonomous System
Directed Graph of Sample
Autonomous System
Each router
applies
Dijkstra
algorithm on
this graph to
find out
minimum
path to each
destination
network
Example: The Spanning Tree for
Router R6
Link Costs
• Cost of each hop in each direction is called routing metric
• OSPF provides flexible metric scheme based on type of
service
—Normal
• Default metric assigned by administrators
• Typically 1 for minimum hop routing
—Monetary cost
—Reliability
• E.g. based on recent history of outages
—Throughput
• Inversely proportional to data rate
—Delay
• Based on propagation and queueing delays for each interface of the
routers
• Each router generates 5 spanning trees and 5 routing tables
Areas
• Make large autonomous systems more
manageable
• Configured as a backbone and multiple areas
• Area – Collection of contiguous networks and
hosts plus routers connected them
—Not so different from AS, but smaller
• Backbone – networks and routers that connect
multiple areas as a central hub
—Like a star topology
Operation of Areas
• Each area runs a separate copy of the link state
algorithm
—Topological database and graph of just that area
—Link state information broadcast to other routers in
area
—Reduces traffic
—Intra-area routing relies solely on local link state
information
Inter-Area Routing
• Path consists of three legs
—Within source area
• Intra-area
• Delivers to the backbone
—Through backbone
• Has properties of an area
• Uses link state routing algorithm
• Delivers to the destination area
—Within destination area
• Intra-area
• Delivers to recipient
OSPF Packet Format
• Read from book (pages 412 – 413)
Border Gateway Protocol (BGP)
• For use with TCP/IP internets
• Preferred ERP of the Internet
• Allows routers (gateways) in different
Autonomous Systems to exchange routing
information
• Current version is BGP-4
—RFC 4271
• No time to cover
—See the book for details (in Chapter 12)
—Not responsible

Weitere ähnliche Inhalte

Was ist angesagt?

Routing table and routing algorithms
Routing table and routing algorithmsRouting table and routing algorithms
Routing table and routing algorithmslavanyapathy
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithmsBhatt Aadil
 
Introduction to backwards learning algorithm
Introduction to backwards learning algorithmIntroduction to backwards learning algorithm
Introduction to backwards learning algorithmRoshan Karunarathna
 
Computer networks network layer,routing
Computer networks network layer,routingComputer networks network layer,routing
Computer networks network layer,routingDeepak John
 
Network Routing | Computer Science
Network Routing | Computer ScienceNetwork Routing | Computer Science
Network Routing | Computer ScienceTransweb Global Inc
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmBushra M
 
Routing algorithm network layer
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layersambhenilesh
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layerNitesh Singh
 
Routing, Different types of forwarding technique
Routing, Different types of forwarding techniqueRouting, Different types of forwarding technique
Routing, Different types of forwarding techniquerajib_
 
Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routingphanleson
 
Day 8 2 distance vector routing
Day 8 2 distance vector routingDay 8 2 distance vector routing
Day 8 2 distance vector routingCYBERINTELLIGENTS
 
Rajesh basics of networking and routing
Rajesh basics of networking and routingRajesh basics of networking and routing
Rajesh basics of networking and routingr123027
 
Distance vector and link state routing protocol
Distance vector and link state routing protocolDistance vector and link state routing protocol
Distance vector and link state routing protocolCCNAStudyGuide
 
Sept 2017 dynamic routing
Sept 2017   dynamic routingSept 2017   dynamic routing
Sept 2017 dynamic routingshahin raj
 

Was ist angesagt? (20)

Routing table and routing algorithms
Routing table and routing algorithmsRouting table and routing algorithms
Routing table and routing algorithms
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithms
 
Introduction to backwards learning algorithm
Introduction to backwards learning algorithmIntroduction to backwards learning algorithm
Introduction to backwards learning algorithm
 
Routing
RoutingRouting
Routing
 
Routing
RoutingRouting
Routing
 
Computer networks network layer,routing
Computer networks network layer,routingComputer networks network layer,routing
Computer networks network layer,routing
 
Routing
RoutingRouting
Routing
 
Routing Protocols
Routing ProtocolsRouting Protocols
Routing Protocols
 
Network Routing | Computer Science
Network Routing | Computer ScienceNetwork Routing | Computer Science
Network Routing | Computer Science
 
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Routing algorithm network layer
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layer
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layer
 
Routing, Different types of forwarding technique
Routing, Different types of forwarding techniqueRouting, Different types of forwarding technique
Routing, Different types of forwarding technique
 
Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routing
 
Day 8 2 distance vector routing
Day 8 2 distance vector routingDay 8 2 distance vector routing
Day 8 2 distance vector routing
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Rajesh basics of networking and routing
Rajesh basics of networking and routingRajesh basics of networking and routing
Rajesh basics of networking and routing
 
Distance vector and link state routing protocol
Distance vector and link state routing protocolDistance vector and link state routing protocol
Distance vector and link state routing protocol
 
Sept 2017 dynamic routing
Sept 2017   dynamic routingSept 2017   dynamic routing
Sept 2017 dynamic routing
 

Andere mochten auch

Bellman Ford's Algorithm
Bellman Ford's AlgorithmBellman Ford's Algorithm
Bellman Ford's AlgorithmTanmay Baranwal
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmfarimoin
 
Cdp secugenius harksh_mikemclain
Cdp secugenius harksh_mikemclainCdp secugenius harksh_mikemclain
Cdp secugenius harksh_mikemclainMike McLain
 
A study on performance comparison of dymo with aodv and dsr
A study on performance comparison of dymo with aodv and dsrA study on performance comparison of dymo with aodv and dsr
A study on performance comparison of dymo with aodv and dsrIAEME Publication
 
Network Lifetime Analysis of Routing Protocols of Short Network in Qualnet
Network Lifetime Analysis of Routing Protocols of Short Network in QualnetNetwork Lifetime Analysis of Routing Protocols of Short Network in Qualnet
Network Lifetime Analysis of Routing Protocols of Short Network in QualnetIOSR Journals
 
Bellman ford (part-ii)
Bellman ford (part-ii)Bellman ford (part-ii)
Bellman ford (part-ii)Zain Zahid
 
Bellman ford (part-i)
Bellman ford (part-i)Bellman ford (part-i)
Bellman ford (part-i)Zain Zahid
 
ARF foq2 Day Router Presentation
ARF foq2 Day Router Presentation ARF foq2 Day Router Presentation
ARF foq2 Day Router Presentation Federated Sample
 
Ccna PPT2
Ccna PPT2Ccna PPT2
Ccna PPT2AIRTEL
 
Switch and Router Security Testing
Switch and Router Security TestingSwitch and Router Security Testing
Switch and Router Security TestingConferencias FIST
 
Zaharaddeen karami lawal distance vector routing
Zaharaddeen karami lawal distance vector routingZaharaddeen karami lawal distance vector routing
Zaharaddeen karami lawal distance vector routingKlawal13
 
Simulation & comparison of aodv & dsr protocol
Simulation & comparison of aodv & dsr protocolSimulation & comparison of aodv & dsr protocol
Simulation & comparison of aodv & dsr protocolPrafull Johri
 
Bellman ford Algorithm
Bellman ford AlgorithmBellman ford Algorithm
Bellman ford Algorithmtaimurkhan803
 

Andere mochten auch (20)

Bellman Ford's Algorithm
Bellman Ford's AlgorithmBellman Ford's Algorithm
Bellman Ford's Algorithm
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
Cdp secugenius harksh_mikemclain
Cdp secugenius harksh_mikemclainCdp secugenius harksh_mikemclain
Cdp secugenius harksh_mikemclain
 
Qo s redes inalambricas
Qo s redes inalambricasQo s redes inalambricas
Qo s redes inalambricas
 
A study on performance comparison of dymo with aodv and dsr
A study on performance comparison of dymo with aodv and dsrA study on performance comparison of dymo with aodv and dsr
A study on performance comparison of dymo with aodv and dsr
 
Network Lifetime Analysis of Routing Protocols of Short Network in Qualnet
Network Lifetime Analysis of Routing Protocols of Short Network in QualnetNetwork Lifetime Analysis of Routing Protocols of Short Network in Qualnet
Network Lifetime Analysis of Routing Protocols of Short Network in Qualnet
 
Routing
RoutingRouting
Routing
 
Bellman ford (part-ii)
Bellman ford (part-ii)Bellman ford (part-ii)
Bellman ford (part-ii)
 
Bellman ford (part-i)
Bellman ford (part-i)Bellman ford (part-i)
Bellman ford (part-i)
 
Day 10 loops+ rip+ igrp
Day 10 loops+  rip+ igrpDay 10 loops+  rip+ igrp
Day 10 loops+ rip+ igrp
 
ARF foq2 Day Router Presentation
ARF foq2 Day Router Presentation ARF foq2 Day Router Presentation
ARF foq2 Day Router Presentation
 
Bellmanford
BellmanfordBellmanford
Bellmanford
 
Ccna PPT2
Ccna PPT2Ccna PPT2
Ccna PPT2
 
Switch and Router Security Testing
Switch and Router Security TestingSwitch and Router Security Testing
Switch and Router Security Testing
 
Zaharaddeen karami lawal distance vector routing
Zaharaddeen karami lawal distance vector routingZaharaddeen karami lawal distance vector routing
Zaharaddeen karami lawal distance vector routing
 
Simulation & comparison of aodv & dsr protocol
Simulation & comparison of aodv & dsr protocolSimulation & comparison of aodv & dsr protocol
Simulation & comparison of aodv & dsr protocol
 
Bellman ford Algorithm
Bellman ford AlgorithmBellman ford Algorithm
Bellman ford Algorithm
 
Bellman ford 1
Bellman ford 1Bellman ford 1
Bellman ford 1
 
AODV routing protocol
AODV routing protocolAODV routing protocol
AODV routing protocol
 

Ähnlich wie 11 routing

Routing and IP in Advance Computer Network,Vikram Snehi
Routing and IP in Advance Computer Network,Vikram  SnehiRouting and IP in Advance Computer Network,Vikram  Snehi
Routing and IP in Advance Computer Network,Vikram SnehiMR. VIKRAM SNEHI
 
routing 23.pptx
routing 23.pptxrouting 23.pptx
routing 23.pptxzulhelmanz
 
Unit 4_Network Layer_Part II.pptx
Unit 4_Network Layer_Part II.pptxUnit 4_Network Layer_Part II.pptx
Unit 4_Network Layer_Part II.pptxHODElex
 
Unit 3_Network Layer_Part II.pptx
Unit 3_Network Layer_Part II.pptxUnit 3_Network Layer_Part II.pptx
Unit 3_Network Layer_Part II.pptxHODElex
 
Dc ch11 : routing in switched networks
Dc ch11 : routing in switched networksDc ch11 : routing in switched networks
Dc ch11 : routing in switched networksSyaiful Ahdan
 
Module 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 pptModule 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 pptanushaj46
 
NetworkAlgorithms.ppt
NetworkAlgorithms.pptNetworkAlgorithms.ppt
NetworkAlgorithms.ppt21121A0594
 
Unit-3-Part-1 [Autosaved].ppt
Unit-3-Part-1 [Autosaved].pptUnit-3-Part-1 [Autosaved].ppt
Unit-3-Part-1 [Autosaved].pptRamya Nellutla
 
Routing algorithms mehodology materials doc1
Routing algorithms mehodology materials doc1Routing algorithms mehodology materials doc1
Routing algorithms mehodology materials doc1Mugabo4
 
Computer networks unit iii
Computer networks    unit iiiComputer networks    unit iii
Computer networks unit iiiJAIGANESH SEKAR
 
MOBILE COMPUTING Unit 4.pptx
 MOBILE COMPUTING Unit 4.pptx MOBILE COMPUTING Unit 4.pptx
MOBILE COMPUTING Unit 4.pptxkarthiksmart21
 
computer Netwoks - network layer
computer Netwoks - network layercomputer Netwoks - network layer
computer Netwoks - network layerSendhil Kumar
 
Network layer Part 7
Network layer Part 7Network layer Part 7
Network layer Part 7Tutun Juhana
 
Presentation 2
Presentation 2Presentation 2
Presentation 2Haripritha
 
Lecture number 5 Theory.pdf(machine learning)
Lecture  number  5 Theory.pdf(machine learning)Lecture  number  5 Theory.pdf(machine learning)
Lecture number 5 Theory.pdf(machine learning)ZainabShahzad9
 
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1aishwaryaarrao3
 
Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)Tutun Juhana
 

Ähnlich wie 11 routing (20)

Routing and IP in Advance Computer Network,Vikram Snehi
Routing and IP in Advance Computer Network,Vikram  SnehiRouting and IP in Advance Computer Network,Vikram  Snehi
Routing and IP in Advance Computer Network,Vikram Snehi
 
routing 23.pptx
routing 23.pptxrouting 23.pptx
routing 23.pptx
 
Unit 4_Network Layer_Part II.pptx
Unit 4_Network Layer_Part II.pptxUnit 4_Network Layer_Part II.pptx
Unit 4_Network Layer_Part II.pptx
 
Unit 3_Network Layer_Part II.pptx
Unit 3_Network Layer_Part II.pptxUnit 3_Network Layer_Part II.pptx
Unit 3_Network Layer_Part II.pptx
 
Dc ch11 : routing in switched networks
Dc ch11 : routing in switched networksDc ch11 : routing in switched networks
Dc ch11 : routing in switched networks
 
12 routing
12 routing12 routing
12 routing
 
Module 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 pptModule 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 ppt
 
NetworkAlgorithms.ppt
NetworkAlgorithms.pptNetworkAlgorithms.ppt
NetworkAlgorithms.ppt
 
Unit-3-Part-1 [Autosaved].ppt
Unit-3-Part-1 [Autosaved].pptUnit-3-Part-1 [Autosaved].ppt
Unit-3-Part-1 [Autosaved].ppt
 
Routing algorithms mehodology materials doc1
Routing algorithms mehodology materials doc1Routing algorithms mehodology materials doc1
Routing algorithms mehodology materials doc1
 
Computer networks unit iii
Computer networks    unit iiiComputer networks    unit iii
Computer networks unit iii
 
MOBILE COMPUTING Unit 4.pptx
 MOBILE COMPUTING Unit 4.pptx MOBILE COMPUTING Unit 4.pptx
MOBILE COMPUTING Unit 4.pptx
 
computer Netwoks - network layer
computer Netwoks - network layercomputer Netwoks - network layer
computer Netwoks - network layer
 
Network layer Part 7
Network layer Part 7Network layer Part 7
Network layer Part 7
 
Presentation 2
Presentation 2Presentation 2
Presentation 2
 
Lecture number 5 Theory.pdf(machine learning)
Lecture  number  5 Theory.pdf(machine learning)Lecture  number  5 Theory.pdf(machine learning)
Lecture number 5 Theory.pdf(machine learning)
 
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
 
routing
routingrouting
routing
 
Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)
 
Network layer
Network layerNetwork layer
Network layer
 

Mehr von shefali84

100 short moral stories
100 short moral stories100 short moral stories
100 short moral storiesshefali84
 
Mbti for mana 5338 abbrev. 06232010
Mbti for mana 5338 abbrev. 06232010Mbti for mana 5338 abbrev. 06232010
Mbti for mana 5338 abbrev. 06232010shefali84
 
Leadershipppt 090414175137-phpapp01
Leadershipppt 090414175137-phpapp01Leadershipppt 090414175137-phpapp01
Leadershipppt 090414175137-phpapp01shefali84
 
Strategic management
Strategic managementStrategic management
Strategic managementshefali84
 
Reliability & validity
Reliability & validityReliability & validity
Reliability & validityshefali84
 
Basic concepts of measurement
Basic concepts of measurementBasic concepts of measurement
Basic concepts of measurementshefali84
 

Mehr von shefali84 (7)

100 short moral stories
100 short moral stories100 short moral stories
100 short moral stories
 
Doc1
Doc1Doc1
Doc1
 
Mbti for mana 5338 abbrev. 06232010
Mbti for mana 5338 abbrev. 06232010Mbti for mana 5338 abbrev. 06232010
Mbti for mana 5338 abbrev. 06232010
 
Leadershipppt 090414175137-phpapp01
Leadershipppt 090414175137-phpapp01Leadershipppt 090414175137-phpapp01
Leadershipppt 090414175137-phpapp01
 
Strategic management
Strategic managementStrategic management
Strategic management
 
Reliability & validity
Reliability & validityReliability & validity
Reliability & validity
 
Basic concepts of measurement
Basic concepts of measurementBasic concepts of measurement
Basic concepts of measurement
 

Kürzlich hochgeladen

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Kürzlich hochgeladen (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

11 routing

  • 2. Introduction • Routers forward IP datagrams from one router to another on the path from source towards destination • Routing protocols —To decide on routes to be taken • Routers must have idea of topology of internet in order to pick best route to take —Decisions based on some least cost criteria —May depend on the current conditions
  • 3. A Sample Configuration of Routers and Networks • Link costs are at the output of the links • There is no cost of getting data from the network • For example, the cost of the path X-A-F-Y is 1+1+4=6
  • 4. Routing Table • One routing table is needed for each router • One entry for each destination network —Not for each destination host —Once datagram reaches router attached to destination network, that router can deliver to host • Each entry shows next node on the route to destination —Not whole route • Routing tables may also exist in hosts —If multiple routers attached to network, host needs table saying which to use —If the attached network has single router, then not needed • All traffic must go through that router (called the gateway)
  • 6. Fixed Routing • Single permanent route configured for each source-destination pair —Routes are fixed —May change when topology changes (not so often) • No dynamic updates
  • 7. Adaptive Routing • As conditions on internetwork change, routes may change —Failure • of routers or networks —Congestion • If a particular section of the network is heavily congested, it is better not to use that part and change the route
  • 8. Adaptive Routing - Challenges • Complex routing decisions —Router processing increases • Depends on information collected in one place but used in another —More information exchanged improves routing decisions but increases overhead • May react too fast —causing congestion through oscillation (fluttering) • May react too slow —By the time routing decision changes, the network conditions may be much more different
  • 9. Adaptive Routing - Challenges • Looping —Packet forwarded by a router eventually returns to that router —May occur when changes in connectivity not propagated fast enough to all other routers —An important pathology that must be prevented in routing algorithms • Despite all challenges, adaptive routing prevails due to its flexibility
  • 10. Classification of Adaptive Routing Strategies • Based on information sources —Local • E.g. route each datagram to network with shortest queue – Balance loads on outgoing networks – May not be heading in correct direction • Rarely used —Adjacent nodes • Delay and outage info from adjacent nodes • Distance vector algorithms – Discussed later —All nodes • Link-state algorithms – Discussed later
  • 11. Flooding • No network info required • Packet sent by node to every neighbor • Incoming packets retransmitted on every link except incoming link • Eventually a number of copies will arrive at destination • Each packet is uniquely numbered so duplicates can be discarded at destination
  • 13. Flooding • Precautions against unlimited grow in circulation —Nodes can remember packets already forwarded to keep network load in bounds • called "Restricted Flooding" —Include a hop count in packets. • Set to a maximum value • Decrease one at each hop • Discard when 0
  • 14. Properties of Flooding • All possible routes are tried —very robust —can be used for emergency messaging • At least one packet will use minimum hop count route —Can be used once to set up a route • All nodes are visited —Useful to distribute information (e.g. routing info)
  • 15. Random Routing • Node selects one outgoing path for retransmission of incoming packet • Selection is at random —equally likely • all outgoing links are utilized equally in the long-run —can select outgoing path based on a probability • e.g. probability based on data rate – good traffic distribution • No network info needed • Route is typically neither least cost nor minimum hop
  • 16. Autonomous Systems (AS) • An important concept for TCP/IP routing in IP layer • AS is defined as set of routers and networks managed by single organization (e.g. an ISP) —Exchange routing information in itself —Common routing protocol • An AS must be connected in itself —There is at least one route between any pair of nodes
  • 17. Interior Routing Protocol (IRP) Exterior Routing Protocol (ERP) • (not actually protocols, just concepts) • IRP passes routing information between routers within AS —Need exchange of info among the routers only in AS —Different autonomous systems may have different IRP mechanisms • Autonomous systems need to talk to each other —Need minimum information from other connected AS —A few routers in each AS must talk —Use Exterior Routing Protocol (ERP) • Again, a concept —ERP does not deal with details within source and target AS
  • 18. Application of Exterior and Interior Routing Protocols
  • 19. Approaches to Routing – Distance-vector • Each router exchange information with neighboring routers —Definition: Two nodes are said to be neighbors if both are directly connected to the same network • Each node keeps —distance vector and next-hop vector (Routing table) • One entry for each destination network —a vector of link costs for each directly attached network • First generation routing algorithm for ARPANET • Used by Routing Information Protocol (RIP) —will discuss later • Requires transmission of information by each router to all neighbors —Distance vector that contain estimated path costs for all destination networks —Changes may take long time to propagate
  • 20. Approaches to Routing – Link-state • Designed to overcome drawbacks of distance-vector • When router initialized, it determines link cost on each interface • Advertises set of link costs to all other routers in topology — Not just neighboring routers • After that, each router monitors its link costs — If significant change, router advertises new set of link costs • In this way, each router builds up a picture of the entire topology — Can calculate shortest path to each destination — Use an algorithm to determine shortest paths • In practice, Dijkstra's algorithm • Router constructs routing table, listing first hop to each destination • Second generation routing algorithm for ARPANET • Open shortest path first (OSPF) protocol uses link-state routing.
  • 21. Distance-vector and Link State • Both of them is suitable for IRP, not ERP • Several reasons. Some of them: —Both require homogenous metrics that may be the case within an AS, but we cannot assume then same for several AS systems —Flooding the link state information across multiple AS systems is not scalable
  • 22. Approaches to Routing – Path-vector • Suitable approach for Exterior Router Protocols • Provide information about which networks can be reached by a given router and Autonomous Systems crossed to get there —Does not include distance or cost estimate • BGP (Border Gateway Protocol) is an example to path-vector routing protocol
  • 23. Least Cost Algorithms • Routing decision is based on some least-cost criteria (minimization problem) —If minimize number of hops, link cost is 1 —Link cost may be inversely proportional to capacity, proportional to current load (queue length), or some combination —May be different in two directions (e.g. if cost is queue length) • More formal problem definition —For each pair of nodes, find the least cost path —Cost of path between two nodes is sum of costs of links traversed  • Dijkstra's algorithm • Bellman-Ford algorithm
  • 24. Dijkstra's Algorithm • Find shortest paths from a given node to all other nodes, by developing paths in the order of increasing path length (cost) • Proceeds in stages —At each stage shortest path from source to one node is determined —The nodes for which shortest path determined are kept in a set called T —At each iteration, node not in T but has the shortest path from source added to T —As each node added to T, path from source to the nodes not in T are checked to see whether there is a better path through this newly added node
  • 25. Dijkstra's Algorithm – Formal (1) • N = set of nodes in the network • s = source node • T = set of nodes so far incorporated (shortest path found) • w(i, j) = link cost from node i to node j w(i, i) = 0 w(i, j) = ∞ if nodes not directly connected w(i, j) ≥ 0 if nodes are directly connected • L(n) = cost of current least-cost path from s to n —At the end of algorithm (actually as soon as n is added to T), L(n) is the cost of least-cost path from s to n
  • 26. [Initialization] T = {s} i.e. set of nodes so far incorporated consists of only source node L(n) = w(s, n) for all n ≠ s i.e. initial path costs to neighboring nodes are link costs Dijkstra's Algorithm – Formal (2)
  • 27. Repeat [Get Next Node] Find neighboring node not in T with least-cost path from s Find x ∉ T such that Add x to T. L(x) is the shortest path from s to x. [Update Least-Cost Paths] L(n) = min[L(n), L(x) + w(x, n)] for all n ∉ T If the latter term is the minimum, the path from s to n is now the path from s to x concatenated with the edge from x to n. Until all nodes are in T Dijkstra's Algorithm – Formal (3) Lx( )= min j∉T L j()
  • 28. Dijkstra’s Algorithm – Example See Table 11.1a for the Trace
  • 29. Bellman-Ford Algorithm • Iterative 1.find the shortest paths from a source to all possible destinations using only one link 2.then using max. two links by adding appropriate links to the paths of step 1 3.then using max. 3 links on top of paths with two links 4.so on .. until no improvement is gained by adding more links
  • 30. Bellman-Ford Algorithm – Formal (1) • s = source node • w(i, j) = link cost from node i to node j w(i, i) = 0 w(i, j) = ∞ if nodes are directly connected w(i, j) ≥ 0 if nodes directly connected • h = maximum number of links in path at current stage • Lh(n) =cost of least-cost path from s to n such that path contains no more than h links
  • 31. Bellman-Ford Algorithm – Formal (2) [Initialization] L0(n) = ∞, for all n ≠ s h=0
  • 32. Bellman-Ford Algorithm – Formal (3) [Update] Loop until no more improvements For each n ≠ s, compute If s-to-n cost reduced, then path also changes to s -…- j - n h=h+1 Lh+1 n( )= min j Lh j( )+ w j, n( )[ ]
  • 33. Bellman-Ford Algorithm – Example See Table 11.1b for the Trace
  • 34. RIP (Routing Information Protocol) • Uses Distance Vector Routing approach —Each node exchanges information with neighbors —Directly connected by same network • Each node maintains three vectors —Link cost • One entry for each network it attaches —Distance vector (metric column in the next slide) • Current cost of route from the node to each destination network in the configuration —Next hop vector (Next router column in the next slide) • The next router for each destination network in the configuration • Every 30 seconds, exchange distance vector with neighbors • Use distance vectors received from neighbors to update distance and next hop vector —Similar to Bellman-Ford algorithm. Routingtable
  • 35. Distance Vector Algorithm Applied to Figure 11.1
  • 36. RIP Details – Incremental Update • Previous algorithm implies that all distance vector updates arrive within a small window of time —Not correct, because (i) no synchronization, (ii) RIP uses UDP that means no reliability. • Actually RIP is designed to operate incrementally. Tables are updated after receipt of individual distance vector
  • 37. RIP Details – Topology Change • If no updates are received from a router within 180 seconds, mark the connection as invalid —Assumes router crash or network connection unstable —Set distance value to infinity • Actually 16. Why? See next.
  • 38. Counting to Infinity Problem (1) • A problem of RIP is slow convergence to a change in topology • Consider the example network below with all link costs 1 — The distance of B to network 5 is 2, next hop is D — A and C have distances of 3 and next hop is B
  • 39. Counting to Infinity Problem (2) • Suppose router D fails: —B determines network 5 no longer reachable via D • Sets distance to 4 based on report from A or C —At next update, B tells A and C this new distance to network 5 —A and C receive this and increment their network 5 distance to 5 • 4 from B, plus 1 to reach B —B receives distance count 5 and assumes network 5 is 6 unit cost away —Repeat until reach infinity (16) —Update interval is 30 seconds, so reaching 16 takes several minutes. If infinity is larger, then convergence would take longer.
  • 40. Split Horizon Rule • Counting to infinity problem is caused by misunderstanding between B and A, and between B and C —Each thinks it can reach network 5 via the other • Split Horizon rule says “do not send information about a route back in the direction it came from” —Router sending information is nearer to the destination than you are —Don't teach your grandma how to suck eggs!  • Erroneous route now eliminated within time out period (180 seconds)
  • 41. Read from book (page 404 – 405) • RIP Packet Format • RIP limitations
  • 42. Open Shortest Path First (OSPF) • RIP is limited in large internets • OSPF is preferred interior routing protocol for TCP/IP based internets • Link state routing used
  • 43. Link State Routing • When initialized, router determines link cost on each interface • Router advertises these costs to all other routers in topology • Router monitors its costs —When changes occur, costs are re-advertised • Each router constructs topology and calculates shortest path to each destination network —Can use any algorithm, but in practice Dijkstra is used
  • 44. OSPF Overview • Router maintains the state of local links • Transmits updated state information to all routers in AS or in area (see later) • Router receiving update must acknowledge • Each router maintains a database that reflects the topology —Directed graph —And then generates a spanning tree and routing table
  • 45. Router Database Graph • Vertices (nodes) —Routers —Networks • Edges —Connecting two routers —Connecting router to network
  • 47. Directed Graph of Sample Autonomous System Each router applies Dijkstra algorithm on this graph to find out minimum path to each destination network
  • 48. Example: The Spanning Tree for Router R6
  • 49. Link Costs • Cost of each hop in each direction is called routing metric • OSPF provides flexible metric scheme based on type of service —Normal • Default metric assigned by administrators • Typically 1 for minimum hop routing —Monetary cost —Reliability • E.g. based on recent history of outages —Throughput • Inversely proportional to data rate —Delay • Based on propagation and queueing delays for each interface of the routers • Each router generates 5 spanning trees and 5 routing tables
  • 50. Areas • Make large autonomous systems more manageable • Configured as a backbone and multiple areas • Area – Collection of contiguous networks and hosts plus routers connected them —Not so different from AS, but smaller • Backbone – networks and routers that connect multiple areas as a central hub —Like a star topology
  • 51. Operation of Areas • Each area runs a separate copy of the link state algorithm —Topological database and graph of just that area —Link state information broadcast to other routers in area —Reduces traffic —Intra-area routing relies solely on local link state information
  • 52. Inter-Area Routing • Path consists of three legs —Within source area • Intra-area • Delivers to the backbone —Through backbone • Has properties of an area • Uses link state routing algorithm • Delivers to the destination area —Within destination area • Intra-area • Delivers to recipient
  • 53. OSPF Packet Format • Read from book (pages 412 – 413)
  • 54. Border Gateway Protocol (BGP) • For use with TCP/IP internets • Preferred ERP of the Internet • Allows routers (gateways) in different Autonomous Systems to exchange routing information • Current version is BGP-4 —RFC 4271 • No time to cover —See the book for details (in Chapter 12) —Not responsible