780 likes | 1.05k Views
Computer Networks Chapter 5 The Network Layer. College of software,Zhejiang University of Technology. Chapter 5 : The Network Layer. 5.1 Network Layer Design Issues 5.2 Routing Algorithms 5.3 Congestion Control Algorithms 5.4 Quality of service 5.5 Internetworking
E N D
Computer Networks Chapter 5 The Network Layer College of software,Zhejiang University of Technology
Chapter 5 :The Network Layer 5.1 Network Layer Design Issues 5.2 Routing Algorithms 5.3 Congestion Control Algorithms 5.4 Quality of service 5.5 Internetworking 5.6 The Network Layer in the Internet Summary
5.1 Network Layer Design Isues • 5.1.1 Store-and-Forward Packet Switching • 5.1.2 Services Provided to the Transport Layer • 5.1.3 Implementation of Connectionless Service • 5.1.4 Implementation of Connection-Oriented Service • 5.1.5 Comparison of Virtual-Circuit and Datagram Subnets
5.1.1 Store-and-Forward Packet Switching The environment of the network layer protocols. fig 5-1
5.1.2 Services Provided to the Transport Layer • The service should be independent of the router technology • The transport layer should be shielded from number,type,and topology of the routers present • The network addresses made available to the transport layer should use a uniform numbering plan • One camp: unreliable subnet, connectionless • The other camp:reliable subnet, connection-oriented
5.1.3 Implementation of Connectionless Service Routing within a diagram subnet.
5.1.4 Implementation of Connection-Oriented Service Routing within a virtual-circuit subnet.
5.1.5 Comparison of Virtual-Circuit and Datagram Subnets 5-4
5.2 Routing Algorithms • 5.2.1 The Optimality Principle • 5.2.2 Shortest Path Routing • 5.2.3 Flooding • 5.2.4 Distance Vector Routing • 5.2.5 Link State Routing • 5.2.6 Hierarchical Routing • 5.2.7 Broadcast Routing • 5.2.8 Multicast Routing
Properties desirable for a routing algorithms: Correctness Simplicity Robustness Stability Fairness Optimality Two major classes of routing algorithms Noadaptive algorithms: Adaptive algorithms Routing Algorithms (1)
Routing Algorithms (2) Conflict between fairness and optimality.
5.2.1 The Optimality Principle (a) A subnet. (b) A sink tree for router B.
Shortest Path Routing The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node. Static routing algorithm
Shortest Path Routing (ctd.) Dijkstra's algorithm to compute the shortest path through a graph. 5-8 top
Shortest Path Routing(ctd.) Dijkstra's algorithm to compute the shortest path through a graph. 5-8 bottom
5.2.3 Flooding • Static routing algorithm • principle • Every incoming packet is sent out on every outgoing line except the one it arrived on • Generates vast numbers of duplicate packets。 • solutions • Hop counter; • Keep track of flooded packets • (selective flooding) • Approximately right direction
5.2.4 Distance Vector Routing dynamic routing algorithms (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
Distance Vector Routing (2) The count-to-infinity problem. converges slowly
5.2.5 Link State Routing Each router must do the following: • Discover its neighbors, learn their network address. • Measure the delay or cost to each of its neighbors. • Construct a packet telling all it has just learned. • Send this packet to all other routers. • Compute the shortest path to every other router.
Learning about the Neighbors (a) Nine routers and a LAN. (b) A graph model of (a).
Measuring Line Cost routing osilations A subnet in which the East and West parts are connected by two lines.
Building Link State Packets (a) A subnet. (b) The link state packets for this subnet.
Distributing the Link State Packets The packet buffer for router B in the previous slide (Fig. 5-13). • From E,EAB,EFB; • From D,DCB,DFB;
5.2.6 Hierarchical Routing Hierarchical routing.
5.2.7 Broadcast Routing Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by reverse path forwarding.
5.2.8 Multicast 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.
5.3 Congestion Control Algorithms • 5.3.1 General Principles of Congestion Control • 5.3.2 Congestion Prevention Policies • 5.3.3 Congestion Control in Virtual-Circuit Subnets • 5.3.4 Congestion Control in Datagram Subnets
Congestion When too much traffic is offered, congestion sets in and performance degrades sharply.
Congestion(ctd.) • Factors: • Insufficient memory • Slow processor • Difference between flow control and congestion control • Congestion control:subnet,global issue • Flow control: point-to-point traffic
Closed loop Monitor the system . detect when and where congestion occurs. Pass information to where action can be taken. Adjust system operation to correct the problem. Method: Congestion Control dynamically Open loop Solve the problem by good design to make sure congestion does not occur in the first place Method: Congestion Prevention policies 5.3.1 General Principles of Congestion Control Method for both
5.3.1 General Principles of Congestion Control • Metrics used to monitor congestion • Router detect congestion • Send probe packets out to explicitly ask about congestion
5.3.2 Congestion Prevention Policies Policies that affect congestion. 5-26 open loop
5.3.3 Congestion Control in Virtual-Circuit Subnets (a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B. Close loop
5.3.4 Hop-by-Hop Choke Packets (a) A choke packet that affects only the source. (b) A choke packet that affects each hop it passes through. Both world
5.4 Quality of Service • 5.4.1 Requirements • 5.4.2 Techniques for Achieving Good Quality of Service • 5.4.3 Integrated Services • 5.4.4 Differentiated Services • 5.4.5 Label Switching and MPLS
Requirements How stringent the quality-of-service requirements are. 5-30
Buffering Smoothing the output stream by buffering packets.
The Leaky Bucket Algorithm (a) A leaky bucket with water. (b) a leaky bucket with packets.
The Leaky Bucket Algorithm (a) Input to a leaky bucket. (b) Output from a leaky bucket. Output from a token bucket with capacities of (c) 250 KB, (d) 500 KB, (e) 750 KB, (f) Output from a 500KB token bucket feeding a 10-MB/sec leaky bucket.
The Token Bucket Algorithm (a) Before. (b) After. 5-34
Label Switching and MPLS Transmitting a TCP segment using IP, MPLS, and PPP.
5.5 Internetworking • 5.5.1 How Networks Differ • 5.5.2 How Networks Can Be Connected • 5.5.3 Concatenated Virtual Circuits • 5.5.4 Connectionless Internetworking • 5.5.5 Tunneling • 5.5.6 Internetwork Routing • 5.5.7 Fragmentation
Connecting Networks A collection of interconnected networks.
How Networks Differ Some of the many ways networks can differ. 5-43
5.5.2 How Networks Can Be Connected (a) Two Ethernets connected by a switch. (b) Two Ethernets connected by routers.
5.5.3 Concatenated Virtual Circuits Internetworking using concatenated virtual circuits.
5.5.4 Connectionless Internetworking A connectionless internet.
5.5.5 Tunneling Tunneling a packet from Paris to London.
Tunneling (2) Tunneling a car from France to England.
5.5.6 Internetwork Routing (a) An internetwork. (b) A graph of the internetwork.