The Network Layer
Chapter 5
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Routing Algorithms (2)
• Broadcast routing
• Multicast routing
• Anycast routing
• Routing for mobile hosts
• Routing in ad hoc networks
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Fairness vs. Efficiency
Network with a conflict between fairness and efficiency.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Optimality Principle
(a) A network. (b) A sink tree for router B.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Shortest Path Algorithm (1)
The first five steps used in computing the shortest path from A
to D. The arrows indicate the working node
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Shortest Path Algorithm (2)
...
Dijkstra’s algorithm to compute the shortest path through a graph.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Shortest Path Algorithm (3)
...
...
Dijkstra’s algorithm to compute the shortest path through a graph.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Shortest Path Algorithm (4)
...
Dijkstra’s algorithm to compute the shortest path through a graph.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Distance Vector Routing
(a) A network.
(b) Input from A, I, H, K, and the new routing table for J.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
The Count-to-Infinity Problem
The count-to-infinity problem
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Link State Routing
1. Discover neighbors, learn network addresses.
2. Set distance/cost metric to each neighbor.
3. Construct packet telling all learned.
4. Send packet to, receive packets from other routers.
5. Compute shortest path to every other router.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Learning about the Neighbors (1)
Nine routers and a broadcast LAN.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Learning about the Neighbors (2)
A graph model of previous slide.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Building Link State Packets
(a) A network. (b) The link state packets for this network.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Distributing the Link State Packets
The packet buffer for router B in previous slide
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Hierarchical Routing
Hierarchical routing.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
• When networks grow in size the router routing table grow
proportionally.
• More CPU time is needed to scan them.
• Every router must have entry to other routers so these nodes
are designed in hierarchical structure.
• In this method router are divided into what we call as regions.
• Each router knows all details about how to route packets to
destinations within its own region and knows nothing about
the structure of other regions.
• When different networks are used free routers to know
topological structure of other ones.
• For huge networks, it is necessary to group the regions into
clusters, the clusters into zones, zones into groups etc...
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
• Fig. 5-15 gives two level hierarchy with 5 regions.
• Full routing table for router 1A has 17 entries.
• This routing reduced the table from 17 to 7 entries.
• All traffic for region 2 goes via the 1B – 2A line and rest of the
remote traffic goes via 1C-3B line.
• Example : best route from 1A to 5C is via region 2 all routing
goes via region 3.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Broadcast Routing
Reverse path forwarding. (a) A network. (b) A sink tree.
(c) The tree built by reverse path forwarding.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
• Host sends messages to many or all other nodes.
• Example : stock report, weather report, radio telecast
• Sending a packet to all destinations simultaneously is called
broadcasting.
• Various methods have been proposed for doing it
a. Broadcasting method that doesn’t need special method.
Subnet sends distinct packet to each destination. It wastes
bandwidth and requires source to have complete list of
destinations.
b. Flooding – can be used for broadcasting though failed in point
to point networks. It generates too many packets and
consumes too many bandwidth.
c. Multi destination routing – each packet contains list of
destinations or a bit map indicating the desired destinations.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
• When packet arrives at a router, the router checks all the
destinations to determine set of output lines that will be
needed.
• The router generates a new copy of packet for each output
line to be used.
d. Spanning tree
• Sink tree to initiate routing.
• It is a subnet of the subnet contains all routers but with no
loops.
• Copies its incoming broadcast packet on to the spanning tree
lines except one arrived on.
• The problem is that each router must have knowledge about
the spanning tree method
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
e. Reverse path forwarding
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Multicast Routing (1)
(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.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Multicast Routing (2)
(a) Core-based tree for group 1.
(b) Sending to group 1.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Anycast Routing
(a) Anycast routes to group 1.
(b) Topology seen by the routing protocol.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Congestion Control Algorithms (1)
• Approaches to congestion control
• Traffic-aware routing
• Admission control
• Traffic throttling
• Load shedding
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Congestion Control Algorithms (2)
When too much traffic is offered, congestion sets in and
performance degrades sharply.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Approaches to Congestion Control
Timescales of approaches to congestion control
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic-Aware Routing
A network in which the East and West parts
are connected by two links.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic Throttling (1)
(a) A congested network. (b) The portion of the network that is
not congested. A virtual circuit from A to B is also shown.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Traffic Throttling (2)
Explicit congestion notification
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Load Shedding (1)
A choke packet that affects only the source..
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Load Shedding (2)
A choke packet that affects each hop it passes through.
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:
1. No commercial traffic for educat. network
2. Never put Iraq on route starting at Pentagon
3. Choose cheaper network
4. Choose better performing network
5. Don’t go from Apple to Google to Apple
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
BGP—The Exterior Gateway
Routing Protocol (2)
Routing policies between four Autonomous Systems
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
BGP—The Exterior Gateway
Routing Protocol (3)
Propagation of BGP route advertisements
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
End
Chapter 5
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011