ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011TheNetworkLayerChapter5ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011NetworkLayerDesignIssues•Store-and-forwardpacketswitching•Servicesprovidedtotransportlayer•Implementationofconnectionlessservice•Implementationofconnection-orientedservice•Comparisonofvirtual-circuitanddatagramnetworksComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011Store-and-ForwardPacketSwitchingTheenvironmentofthenetworklayerprotocols.ISP’sequipmentComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011ServicesProvidedtotheTransportLayer1.Servicesindependentofroutertechnology.2.Transportlayershieldedfromnumber,type,topologyofrouters.3.Networkaddressesavailabletotransportlayeruseuniformnumberingplan–evenacrossLANsandWANsComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011ImplementationofConnectionlessServiceRoutingwithinadatagramnetworkISP’sequipmentA’stable(initially)A’stable(later)C’sTableE’sTableComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011ImplementationofConnection-OrientedServiceRoutingwithinavirtual-circuitnetworkISP’sequipmentA’stableC’sTableE’sTableComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011ComparisonofVirtual-CircuitandDatagramNetworksComparisonofdatagramandvirtual-circuitnetworksComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011RoutingAlgorithms(1)•Optimalityprinciple•Shortestpathalgorithm•Flooding•Distancevectorrouting•Linkstaterouting•RoutinginadhocnetworksComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011RoutingAlgorithms(2)•Broadcastrouting•Multicastrouting•Anycastrouting•Routingformobilehosts•RoutinginadhocnetworksComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011Fairnessvs.EfficiencyNetworkwithaconflictbetweenfairnessandefficiency.ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011TheOptimalityPrinciple(a)Anetwork.(b)AsinktreeforrouterB.ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011ShortestPathAlgorithm(1)ThefirstfivestepsusedincomputingtheshortestpathfromAtoD.ThearrowsindicatetheworkingnodeComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011ShortestPathAlgorithm(2)Dijkstra’salgorithmtocomputetheshortestpaththroughagraph....ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011ShortestPathAlgorithm(3)Dijkstra’salgorithmtocomputetheshortestpaththroughagraph.......ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011ShortestPathAlgorithm(4)Dijkstra’salgorithmtocomputetheshortestpaththroughagraph....ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011(a)Anetwork.(b)InputfromA,I,H,K,andthenewroutingtableforJ.DistanceVectorRoutingComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011TheCount-to-InfinityProblemThecount-to-infinityproblemComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011LinkStateRouting1.Discoverneighbors,learnnetworkaddresses.2.Setdistance/costmetrictoeachneighbor.3.Constructpackettellingalllearned.4.Sendpacketto,receivepacketsfromotherrouters.5.Computeshortestpathtoeveryotherrouter.ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011LearningabouttheNeighbors(1)NineroutersandabroadcastLAN.ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011LearningabouttheNeighbors(2)Agraphmodelofpreviousslide.ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011BuildingLinkStatePackets(a)Anetwork.(b)Thelinkstatepacketsforthisnetwork.ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011DistributingtheLinkStatePacketsThepacketbufferforrouterBinpreviousslideComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011HierarchicalRoutingHierarchicalrouting.ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011BroadcastRoutingReversepathforwarding.(a)Anetwork.(b)Asinktree.(c)Thetreebuiltbyreversepathforwarding.ComputerNetworks,FifthEditionbyAndrewTanenbaumandDavidWetherall,©PearsonEducation-PrenticeHall,2011MulticastRouting(1)(a)Anetwork.(b)Aspanningtreefortheleftmostrouter.(c)Amulticasttreeforgroup1.(d)Amulticasttreeforgroup2.ComputerNetworks,FifthEdition