Professional Documents
Culture Documents
Module 5
Routing Algorithms
Mr. A. Swaminathan
Routing
▪ Network Layers
▪ Routing
▪ Congestion control
▪ Internetworking
▪ The process of forwarding the packets in a network to reach its
intended destination.
Goals of routing
▪ Correctness
▪ Simplicity
▪ Robust
▪ Stability
▪ Fairness
▪ Optimality
Routing Classification
▪ Adaptive / Dynamic ▪ Non-Adaptive (Static)
▪ Gathers information at run ▪ Route is predetermined offline
time locally from neighbour and downloaded to the
routers
routers when the network is
▪ Changes routes periodically booted
▪ For every t seconds
▪ load changes
▪ Topology changes
Mr. A. Swaminathan VIT Chennai
6
Routing Types
▪ Distance Vector routing ▪ Shortest path routing
▪ Routing information Protocol ▪ Flooding
▪ Link state routing
▪ Flow based routing
▪ Open Shortest Path First OSPF
Routing types
▪ Hierarchical routing
▪ Routing for mobile host
A B C D E F G H
A 0
B 0
C 0
D 0
E 0
F 0
G 0
H 0
Mr. A. Swaminathan VIT Chennai
10
A B C D E F G H
A 0 2 ꝏ ꝏ ꝏ ꝏ 6 ꝏ
B 2 0 7 ꝏ 2 ꝏ ꝏ ꝏ
C ꝏ 7 0 3 ꝏ 3 ꝏ ꝏ
D ꝏ ꝏ 3 0 ꝏ ꝏ ꝏ 2
E ꝏ 2 ꝏ ꝏ 0 2 1 ꝏ
F ꝏ ꝏ 3 ꝏ ꝏ 0 ꝏ 2
G 6 ꝏ ꝏ ꝏ 1 ꝏ 0 4
H ꝏ ꝏ ꝏ 2 ꝏ 2 4 0
A B C D E F G H
A 0 2 6
B 2 0 7 2
C 7 0 3 3
D 3 0 2
E 2 0 2 1
F 3 0 2
G 6 1 0 4
H 2 2 4 0
Mr. A. Swaminathan VIT Chennai
Flooding 15
B A B C D E F G
C
A
A 0 1 1 ∞ 1 1 ∞
D
B 1 0 1 ∞ ∞ ∞ ∞
E
C 1 1 0 1 ∞ ∞ ∞
F G
• Internal Information
D ∞ ∞ 1 0 ∞ ∞ 1
at each node -----> E 1 ∞ ∞ ∞ 0 ∞ ∞
F 1 ∞ ∞ ∞ ∞ 0 1
G ∞ ∞ ∞ 1 ∞ 1 0
Mr. A. Swaminathan VIT Chennai
Routing Tables 22
B
Cost Next
Hop
C
A
D
E B 1 B
F G C 1 C
▪ With this D ∞ -
information, routing E 1 E
table at A is --> F 1 F
G ∞ -
C
E 1 E
A
D F 1 F
E
G 2 F
F G
B A B C D E F G
C
A
A 0 1 1 2 1 1 2
D
B 1 0 1 2 2 2 3
E
C 1 1 0 1 2 2 2
F G
D 2 2 1 0 3 2 1
E 1 2 2 3 0 2 3
F 1 2 2 2 2 0 1
G 2 3 2 1 3 1 0
Mr. A. Swaminathan VIT Chennai
25
Convergence
▪ In the absence of topological changes -- few exchanges between
neighbors before complete routing table is formed.
▪ This table is consistent.
▪ Convergence is achieved.
▪ Notice -- no centralized authority
Link/Node Failures
▪ Nodes that first notice send new lists of distances to neighbors.
▪ How do they detect failures ?
▪ Route updates don’t arrive
▪ Probing with test packets.
F G
An Example of RIP
▪ Metric : hop count
▪ Rumors based protocol 1 4
▪ Loop issue – star hybrid
▪ Routers advertise the cost of A B
reaching networks. 2 5
▪ In this example, C’s update to A
would indicate that C can reach C D
Networks 2 and 3 with cost 0, 3 6
Networks 5 and 6 with cost 1 and
Network 4 with cost 2.
RIP implementation
▪ RIP packets are sent using UDP.
▪ Typically, there is a routing daemon (routed) that is an
application layer process that provides access to routing tables.
▪ Allows for the access of the tables.
▪ Use “netstat -rn” to view routing table at host.
An Example
▪ X receives LSP from some node Y.
▪ X checks to see if it already has an
update from Y. If it does, it compares
the sequence number in the new LSP X A X A
(c) (d)
Dissemination of LSPs
▪ LSPs are sent periodically (upon the expiry of a timer) or may be triggered
due to a change in topology (as in RIP).
▪ The only topology change that triggers the creation of a new LSP is a
change to one of the directly connected links.
▪ Failures detected by link layer protocol by using what are known as “HELLO”
packets -- probes to determine if neighbor is alive.
▪ To minimize overhead, LPSs are not created unless needed --periodicity is
of the order of hours.
▪ Sequence numbers help in identifying new info and TTL helps in ensuring
that packets don’t stay in the network indefinitely.
B
5 3
10 C
A
11
2
D
Mr. A. Swaminathan VIT Chennai
Steps for building routing table of node D 41
} for
reliability
Mr. A. Swaminathan VIT Chennai
Open Shortest Path First 44
▪ Advantages
▪ decrease routing overhead and flow of updates
▪ limit network problems such as instability to an area
▪ Speed up convergence
▪ disadvantages
▪ planning and Configuration is difficult
References
▪ CISCO Packet Magazine, 2nd Quarter 2002
http://www.cisco.com/en/US/about/ac123/ac114/ac173/ac168/ab
out_cisco_packet_issue_home.html
▪ 3Com University – Wireless LANs A Technology Overview
www.3com.com/3comu
▪ National Institute of Standards and Technology Wireless Network
Security http://csrc.nist.gov/publications/drafts/draft-sp800-
48.pdf
Mr.A.Swaminathan VIT Chennai