Routing Algorithms: Network Layer
Routing Algorithms: Network Layer
NETWORK LAYER
ROUTING ALGORITHMS
ICTS 420 - Computer Networks #3
Wantanee Viriyasitavat
Assadarat Khurat
Thitinan Tantidham
*Some slides are borrowed from Aj. Boonsits, Stefan Savages and Peter Steenkistes lectures
Destination
Next hop
Cost
Routing protocols
Routing
Protocols
Unicast
Interior
RIP
OSPF
Exterior
BGP
Multicast
Interior
RIP
OSPF
Exterior
BGP
Interior vs Exterior
3
D
C
D
Count
4
E
Next hop
D
E
F
G
Properties:
Some of the shortest paths form a tree = Least-cost tree
Solutions may not be unique
A least-cost tree is a tree with the source router as the
root that spans the whole graph (visits all other nodes).
The path between the root and any other node is the shortest.
Least-Cost Trees
10
Distance-vector method
Idea:
Initially, a node only has entries for
directly-connected nodes
Dst
3
D
4
E
D
F
Next hop
Count
11
12
Min(2,2+0)
Min(0,2+2)
Min(5,2+--)
Min(--,2+3)
Min(4,2+--)
Min(--,2+--)
Min(--,2+--)
13
Min(2,4+--)
Min(0,4+4)
Min(5,4+--)
Min(5,4+5)
Min(4,4+0)
Min(--,4+2)
Min(--,4+--)
14
Bellman-Ford Algorithm
Current
path
New path if go
through w
15
Until converge
16
17
A updates B.
A will think that it can reach X via B!!!
18
19
20
A routes through B to C
so A tells B that it is very
far from C
21
Three-Node Instability
Split Horizon and Poison Reverse can be used to solve
22
In practice
RIP: Routing Information Protocol
DV protocol with hop count as metric
Infinity value is 16 hops; limits network size
Includes split horizon with poison reverse
Routers send vectors every 30 seconds
With triggered updates for link failures
Time-out in 180 seconds to detect failures
Rarely used today
23
24
25
26
Routing protocols
Routing
Protocols
Unicast
Interior
Exterior
RIP
OSPF
Distancevector
Linkstate
BGP
Multicast
Interior
RIP
OSPF
Exterior
BGP
27
Distance-vector vs Link-state
Distance-vector routing
Tell only neighbors its distance vector
Link-state routing
Tell every node its neighbor table (link state)
So each node has a complete map of network
28
Link-State Flooding
Each node can send its neighbor table (i.e., local map) to
29
30
Motivation
Global information allows optimal route computation
31
Dijkstras Algorithm
32
33
34
Speed of convergence
Number of message
exchanges
Robustness
Implementation and
maintenance
Scalability
Resource requirement
Distance-vector
Link-state
35
EXTERIOR ROUTING
PROTOCOL
Or Inter-domain routing
36
Routing protocols
Routing
Protocols
Unicast
Interior
Multicast
Exterior
RIP
OSPF
Distancevector
Linkstate
BGP
Pathvector
Interior
RIP
OSPF
Exterior
BGP
37
Interior vs Exterior
38
39
A Solution!!
Separate routing inside a domain from routing between
domains
Inside a domain use a traditional interior protocols (RIP, OSPF)
Between domains use exterior gateway protocols
40
41
AS Numbers (ASNs)
ASN are 16-bit values and over 15,000 are in use
42
Inter-domain routing
Border routers summarize and
of default routes
Routers must have a route to
all networks in the world
But what routing protocol?
43
flooded
High bandwidth and storage
overhead
Forces nodes to disseminate
sensitive information
Entire path computed
Distance-vector
Hides details of the network
topology good
Nodes determine only next
counting-to-infinity problem
a large network
Works only if policy is
44
Path-Vector Routing
Extension of distance-vector routing
Support flexible routing policies
Avoid count-to-infinity problem
Key idea: advertise the entire path
Distance vector: send distance metric per destination
Path vector: send the entire path for each destination
45
46
Path-Vectors Propagation
47
Policy Support
Each node can apply local policies
Path selection: Which path to use?
Path export: Which paths to advertise?
Examples
Node 2 may prefer the path 2, 3, 1 over 2, 1
Node 1 may not let node 3 hear the path 1, 2
48
routing
A node learns multiple routes
to a destination
Store all of the routes and select
Incremental updates
Announcement of a new route
Withdrawal of a stale route
49
AS path
Next-hop ip address
50
51
52
Inter-domain routing
remains a big issue
53
Routing
DistanceVector
Link-state
Inter-domain
routing
complete map
Transient periods of inconsistency across routers
Exchange reachability information (plus hints)
BGP is based on path vector routing
Traffic exchange policies are a big issue $$$
54
MULTICAST ROUTING
55
https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&docid=IjCOA3i3100CyM&tbnid=ngbkf7AolNpfiM:&ved=0CAUQjRw&url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Flearnthat.com%2F2008%2F07%2Fnetwork-2008tutorial%2F7%2F&ei=ZDkMUsHhEMH_rQeN8oHgCQ&bvm=bv.50768961,d.bmk&psig=AFQjCNFgeIqGPpIFDeKz6mxgCm_pDB7pdA&ust=1376619050690431
56
57
Multicasting Applications
Access to Distributed Databases
User accesses databases spread out all over the Internet. The
user does not know the exact addresses of databases.
Information dissemination
A business needs to send information to a group of users.
Teleconferencing
All individuals in a conference needs to receive the same
information at the same time.
Distance Learning
One professor can teach many students at the same time.
58
Multicast Group
All users in a multicast group must register to a group
59
60
61
62
63
each source-group
Source = Root
Group-shared
Create one tree for all
group
Router = root
Groups = Leaves
(# groups)
Packets are first sent to
the router (via unicast
tunneling)
tree
(# sources) x (# groups)
Multicast Open Shortest Path
First (MOSPF)
64
65
3-Step set up
Reverse Path Forwarding (RPF)
Router accepts multicast packets from the multicast source only at
the interface that is on the shortest path.
Reverse Path Broadcasting (RPB)
The router creates a broadcast (spanning) tree to make sure that
each network in the AS receives only one copy of the multicast
packet.
Reverse Path Multicasting (RPM)
The router deletes (make inactive) the interfaces that do not reach
members of the multicast group
66
67
68
69
70
PIM-DM
PIM-DM operates similarly to DVMRP but without RPB.
3.
71
Example: PIM-DM
72
PIM-SM
Based on group-shared tree. A core router called
2.
73
Example: PIM-SM
74