CN Unit 3
CN Unit 3
CN Unit 3
UNIT - III
Network Layer: Design issues, Routing algorithms: shortest path routing,
Flooding, Hierarchical routing, Broadcast, Multicast, distance vector routing,
Congestion Control Algorithms, Quality of Service, Internetworking, The
Network layer in the internet.
1
UNIT - III
ISP’s equipment
A’s table (initially) A’s table (later) C’s Table E’s Table
ISP’s equipment
• On the basis of scope of information used in the algorithm, Routing Algorithms are classified into
three types:
• Centralized Routing: The global algorithm uses information collected from the entire
subnet in an attempt to make optimal decision.
• Isolated Routing: The local algorithm runs separately on each IMP(Interface Message
Processor) and uses information only available there e.g., queue length.
• DistributedRouting: These use information availablelocally as well as information
available at their neighbors.
Routing Algorithms
Properties of the R.A.
Correctness: The algorithm should clearly say about the start and end of the route searching.
Robustness: The algorithms should either be capable of correcting smaller mistakes or displaying
message to the user to correct errors (Detection and Corrections)
Stability: In the event of failure of one or few IMPs, the total system should not be crashed or down.
Fairness: Nothing should be ambiguous, everything should be stated clearly and the algorithms should
not lead to congestion.
Optimality: The algorithms should ensure to minimize the mean packet delay time as well as maximize
the total throughput of the network (maximum number if message transmission with minimum delay).
Routing Algorithms
• If Path from A to B is Optimal then, If any Router exist between A & B i.e C
then path from A to C and C to B will be Optimal
Optimal Path
A B
A C B
The Optimality Principle
• The goal of routing algorithms is to discover and use the sink trees for all routers.
• Communication cost
• Number of hops • bandwidth
• Distance • Geographical distance
• Avg. traffic • Mean queuing delay, etc.,.
In general, the labels of the arcs can be function of distance, bandwidth, average traffic,
communication cost, mean queuing delay or transmission delay. Many algorithms may be designed
using these parameters.
One such algorithms is designed by Dijkstra (1959) to determine the shortest path between two
nodes.
Shortest Path Algorithm (1)
Steps of Dijkstra’s SPA algorithm to determine the shortest path between two nodes:
1. Initially, no path is known. So all the nodes are labeled as at an infinite distance from source
node.
2. As the algorithm proceeds, the labels of the nodes changes accordingly reflecting a better path
from the given source to the given sink.
3. Start from a node, and examine all adjacent node(s) to it. If the sum of labels of nodes and
distance from working node to the node being examined is less than the label on that node, then
we have a shortest path, and the node is re-labeled. In a similar fashion, all the adjacent nodes to
the working node are inspected and the tentative labels are changed. If possible the entire
graph is searched for tentatively labeled nodes with the smallest value, the node is made the
permanent node. With the progress of the algorithm, all permanent nodes are encircled, so the
shortest path could be reconstructed.
Shortest Path Algorithm (1)
The first five steps used in computing the shortest path from A to
D. The arrows indicate the working node
Shortest Path Algorithm (2)
...
Dijkstra’s algorithm to compute the shortest path through a graph.
Shortest Path Algorithm (3)
...
...
Solution:
To overcome these problems, a new algorithm
called Multipath Algorithm, was designed by
Evan (1975).
Other Routing Algorithms
a) Baran’s Hot Potato Algorithm (1964): Isolated routing, also called as Shortest
Queue Algorithm. As soon as a node receives a packet, it tries to get rid of it by
putting/forwarding it to the line having shortest queue.
b) Flooding: Each incoming packet is forwarded to every outgoing line, thereby
ensuring shortest path and shortest transmission delay. But, operative for very
low traffic condition.
c) Centralized Routing using RCC: All IMPs in the network periodically sends
information to Routing Control Centre (RCC), regarding their queue length,
delay offered, list of
(a) A network.
(b) Input from A, I, H, K, and the new routing table for J.
1. The Count-to-Infinity Problems
2. Delay metric was queue length, it did not take line bandwidth into account,
when choosing routes. Initially all the lines were 50 kbps, and hence no
problem, but later some were upgraded to 230 kbps, and others to 1.544 Mbps.
Link State Routing (IS-IS, OSPF)
1. Discover neighbors, learn network addresses (Hello).
2. Set/Measure distance/cost metric to each neighbor (Echo).
3. Construct packet telling all it has learned.
4. Send packet to, receive packets from other routers (trickiest
part, flooding(to check flooding, packet seq. no. and age are
used)).
5. Compute shortest path to every other router (Dijkstra’s
Algorithm).
Learning about the Neighbors (1)
(a) A network. (b) The link state packets for this network.
Distributing the Link State Packets
Hierarchical routing.
Broadcast Routing
(a) A network. (b) A spanning tree for the leftmost router. (c) A
multicast tree for group 1. (d) A multicast tree for group 2.
Multicast Routing (2)
• Application requirements
• Traffic shaping
• Packet scheduling
• Admission control
• Integrated services
• Differentiated services
Application Requirements (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Categories of QoS and Examples
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic Shaping (2)
Token bucket level for shaping with rate 200 Mbps and capacity
(d) 16000 KB, (e) 9600 KB, and (f) 0KB..
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Scheduling (1)
1. Bandwidth.
2. Buffer space.
3. CPU cycles.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Scheduling (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Scheduling (3)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Admission Control (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Integrated Services (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Differentiated Services (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Internetworking
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
How Networks Differ
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
How Networks Can Be Connected
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Tunneling (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Fragmentation (1)
Packet size issues:
1. Hardware
2. Operating system
3. Protocols
4. Compliance with (inter)national standard.
5. Reduce error-induced retransmissions
6. Prevent packet occupying channel too long.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Packet Fragmentation (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Network Layer Principles (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Network Layer Principles (2)
...
6. Avoid static options and parameters
7. Look for good design (not perfect)
8. Strict sending, tolerant receiving
9. Think about scalability
10. Consider performance and cost
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Network Layer in the Internet (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The IP Version 4 Protocol (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The IP Version 4 Protocol (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (1)
An IP prefix.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (3)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (4)
Aggregation of IP prefixes
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (5)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (6)
IP address formats
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (7)
Special IP addresses
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Addresses (8)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Version 6 Goals
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Version 6 (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
IP Version 6 (3)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Internet Control Protocols (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Internet Control Protocols (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Label Switching and MPLS (1)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Label Switching and MPLS (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
OSPF—An Interior Gateway
Routing Protocol (1)
An autonomous system
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
OSPF—An Interior Gateway
Routing Protocol (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
OSPF—An Interior Gateway
Routing Protocol (3)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
OSPF—An Interior Gateway
Routing Protocol (4)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
BGP—The Exterior Gateway
Routing Protocol (1)
Examples of routing constraints:
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
BGP—The Exterior Gateway
Routing Protocol (2)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
BGP—The Exterior Gateway
Routing Protocol (3)
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Mobile IP
Goals
1. Mobile host use home IP address anywhere.
2. No software changes to fixed hosts
3. No changes to router software, tables
4. Packets for mobile hosts – restrict detours
5. No overhead for mobile host at home.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011