1 / 105

CEN 4500 Data Communications

CEN 4500 Data Communications. Chapter 5: The Network Layer. Instructor: S. Masoud Sadjadi http://www.cs.fiu.edu/~sadjadi/Teaching/ sadjadi At cs Dot fiu Dot edu. Recap: Network Layer.

cohend
Download Presentation

CEN 4500 Data Communications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CEN 4500 Data Communications Chapter 5: The Network Layer Instructor: S. Masoud Sadjadi http://www.cs.fiu.edu/~sadjadi/Teaching/ sadjadi At cs Dot fiu Dot edu

  2. Recap: Network Layer • Network layer is the lowest layer that deals with end-to-end communications in the hierarchy of the hybrid reference model. • It is concerned with getting packets from the source all the way to the destination, which may require many hops at intermediate routers along the way. • In contrast, the data link layer is concerned with moving frames from one end of a wire to the other. CEN 4500, S. Masoud Sadjadi

  3. Recap: Network Layer • To achieve its goals, network layer • must know about the topology of the communication subnet (i.e., the set of all routers) • choose appropriate paths through the subnet • avoid overloading some of the communication lines and routers while leaving others idle • handle the problems that might occur as a result of source and destination being in different networks. CEN 4500, S. Masoud Sadjadi

  4. Agenda • Design Issues • Routing Algorithms • Congestion Control Algorithms • Quality of Service • Internetworking • The Network Layer in the Internet • Summary CEN 4500, S. Masoud Sadjadi

  5. Network Layer Design Issues • The service provided to the transport layer • Internal design of the subnet • We will discuss • Store-and-Forward Packet Switching • Services Provided to the Transport Layer • Implementation of Connectionless Service • Implementation of Connection-Oriented Service • Comparison of Virtual-Circuit and Datagram Subnets CEN 4500, S. Masoud Sadjadi

  6. Store-and-Forward Packet Switching • In the store-and-forward mechanism, the equipment is used as follows • A host with a packet to send transmits it to the nearest router • Either on its own LAN • Or over a point-to-point link to the carrier • The packet is stored there until it has fully arrived so the checksum can be verified. • Then it is forwarded to the next router along the path until it reaches the destination host, where it is delivered CEN 4500, S. Masoud Sadjadi

  7. Store-and-Forward Packet Switching • The major component of the system • Routers • Transmission lines Leased line Leased line The environment of the network layer protocols. CEN 4500, S. Masoud Sadjadi

  8. Services Provided to the Transport Layer • Design Goals for Network Layer Services • The services should be independent of the router technology. • The transport layer should be shielded from the number, type and topology of the routers present. • The network addresses made available to the transport layer should use a uniform numbering plan, even across LANs and WANs. • A lot of freedom in writing detailed specifications of the services! • Connectionless OR Connection-Oriented? CEN 4500, S. Masoud Sadjadi

  9. Services Provided to the Transport Layer • Internet Community Camp (30 years old) • The routers’ job is moving packets around. • The subnet is inherently unreliable, no matter how it is designed, therefore, the hosts should accept the fact that the network is unreliable. • Therefore, the network layer should be connectionless • with primitives like SEND PACKET and RECEIVE PACKET • No packet ordering and flow control. • Each packet must be independent and must carry the full destination address. CEN 4500, S. Masoud Sadjadi

  10. Services Provided to the Transport Layer • Telephone Companies Camp (100 years old) • The subnet should provide a reliable, connection-oriented service. • 100 years of successful experience with worldwide telephone system is an excellent guide. • Quality of service is the dominant factor, and without connections in the subnet, quality of service is very difficult to achieve, especially for real-time traffic such as voice and video. CEN 4500, S. Masoud Sadjadi

  11. Connectionless & Connection-Oriented Service • Connectionless service • Packets are injected into the subnet individually and routed independently of each other • No advance setup is needed. • The packets are frequently called datagrams, in analogy with telegrams • The subnet is called a datagram subnet. • Connection-oriented service • A path from the source to the destination router must be established before any data packets can be sent. • This connection is called a VC (Virtual Circuit), in analogy with the physical circuits set up by the telephone systems • The subnet is called a virtual circuit subnet. CEN 4500, S. Masoud Sadjadi

  12. Implementation of Connectionless Service • How the datagram subnet works? • Suppose that a process P1 on host H1 has a long message for P2 on host H2. • P1 hands the message to its transport layer with instructions to deliver it to P2 on host H2. • The transport layer, probably running as part of the operating system, adds a header to the message and hands the result to the network layer, which might be just another procedure within the operating system. • Let’s assume that the message is 4 times longer than the maximum packet size, so the network layer has to break it into 4 packets. CEN 4500, S. Masoud Sadjadi

  13. Implementation of Connectionless Service Routing within a datagram subnet. CEN 4500, S. Masoud Sadjadi

  14. Implementation of Connectionless Service • How the datagram subnet works (cont.)? • Packets 1, 2, 3, and 4 are sent in turn to router A using some point to point data link protocol. • At this point the carrier takes over. • Every router has an internal table telling it where to send packets for each possible destination. • Each table entry is a pair consisting of a destination and the outgoing line to use for that destination. • Only directly connected lines can be used. • As the packets arrive at A, they briefly stored (to verify the checksum) and then forwarded to C • Packet 4 however, is forwarded to B for some reason … CEN 4500, S. Masoud Sadjadi

  15. Implementation of Connectionless Service • Reasons for different routing of packets • A may have learned about a traffic jam along ACE. • A may have learned about a network outage. • A is trying to provide a load balancing • … • Routing Algorithm • The algorithm that manages the tables and makes the routing decisions CEN 4500, S. Masoud Sadjadi

  16. Implementation of Connection-Oriented Service • For connection-oriented service, we need a virtual-circuit subnet. • The idea behind VC is to avoid having to choose a new route for every packet sent. • Instead, when a connection is established, a route from the source machine to the destination machine is chosen as part of the connection setup and stored in tables inside the routers. • That route is used for all traffic flowing over the connection, exactly the same way that the telephone system works. • When the connection is released, the vc is terminated. • Note that each packet carries a vc identifier. CEN 4500, S. Masoud Sadjadi

  17. Implementation of Connection-Oriented Service • To avoid conflicts, routers need the ability to replace connection identifiers in outgoing packets Routing within a virtual-circuit subnet. CEN 4500, S. Masoud Sadjadi

  18. Comparison of Virtual-Circuit and Datagram Subnets 5-4 CEN 4500, S. Masoud Sadjadi

  19. Agenda • Design Issues • Routing Algorithms • Congestion Control Algorithms • Quality of Service • Internetworking • The Network Layer in the Internet • Summary CEN 4500, S. Masoud Sadjadi

  20. Routing Algorithms • The main function of the network layer is routing packets from the source machine to the destination machine. • In most subnets, packets will require multiple hops to make the journey. • The algorithm that choose the routes and the data structures that they use are a major are of network layer design. • The Routing Algorithm is that part of network layer software responsible for deciding which output line an incoming packet should be transmitted on. • For datagram subnets, this decision is make for every packet • For vc subnets, this decision is made only when a new vc is being set up. CEN 4500, S. Masoud Sadjadi

  21. Routing Algorithms • A router has two processes • Routing • Making the decision on which route to use. • Updates the routing tables. • Forwarding • What happens when a packet arrives. • Uses the routing tables. • Desirable properties of routing algorithms • Correctness, simplicity, robustness, stability, fairness, and optimality. CEN 4500, S. Masoud Sadjadi

  22. Routing Algorithms: Trade-Offs • Suppose that there are enough traffic between (A, A’), (B, B’), and (C, C’) to saturate the horizontal links. • To maximize the throughput, it is better to shut down the traffic between (X, X’)! Conflict between fairness and optimality. CEN 4500, S. Masoud Sadjadi

  23. Agenda • Design Issues • Routing Algorithms • The Optimality Principle • Shortest Path Routing • Flooding • Distance Vector Routing • Link State Routing • Congestion Control Algorithms • Quality of Service • Internetworking • The Network Layer in the Internet • Summary CEN 4500, S. Masoud Sadjadi

  24. A subnet. A sink tree for router B. The Optimality Principle • Optimality Principle: If router J is on the optimal path from router I to router K, then the optimal path from J to K also falls along the same route! • Sink Tree: The set of optimal routes from all sources to a given destination form a tree (called sink tree) rooted at the destinations. CEN 4500, S. Masoud Sadjadi

  25. The Optimality Principle • A sink tree is not unique! • The goal of all routing algorithms is to discover and use the sink trees for all routers. • Sink tree does not contain any loops (because in fact it is a tree), so each packet will be delivered within a finite and bounded number of hops. • Note that links and routers can go down, so each router may have a different ideas about the current topology. • So, different routing algorithms may perform differently with respect to how they address these problems and how they acquire the required information. • The optimality principle and the sink tree provide a benchmark against which other routing algorithms can be measured. CEN 4500, S. Masoud Sadjadi

  26. Agenda • Design Issues • Routing Algorithms • The Optimality Principle • Shortest Path Routing • Flooding • Distance Vector Routing • Link State Routing • Congestion Control Algorithms • Quality of Service • Internetworking • The Network Layer in the Internet • Summary CEN 4500, S. Masoud Sadjadi

  27. Shortest Path Routing • We start the study of feasible routing algorithms with a widely used technique. • The idea is to find the shortest path between two routers in the graph. • Path length can be measured by • number of hops • geographical distance • mean queuing and transmission delay • This is a static algorithm due to Dijkstra (1959). CEN 4500, S. Masoud Sadjadi

  28. Shortest Path Routing • How the algorithm works? • Each node is labeled with its distance from the source node along the best known path. • Initially, no paths are known, so all nodes are labeled with infinity. • As the algorithm proceeds and paths are found, the labels may change, reflecting better paths. • A label may be either tentative or permanent. • When it is discovered that a label represents the shortest possible path from the source to that node, it is made permanent. CEN 4500, S. Masoud Sadjadi

  29. Shortest Path Routing • The first 5 steps used in computing the shortest path from A to D. The arrows indicate the working node. CEN 4500, S. Masoud Sadjadi

  30. Shortest Path Routing • Dijkstra's algorithm to compute the shortest path through a graph. 5-8 top CEN 4500, S. Masoud Sadjadi

  31. Shortest Path Routing 5-8 bottom CEN 4500, S. Masoud Sadjadi

  32. Agenda • Design Issues • Routing Algorithms • The Optimality Principle • Shortest Path Routing • Flooding • Distance Vector Routing • Link State Routing • Congestion Control Algorithms • Quality of Service • Internetworking • The Network Layer in the Internet • Summary CEN 4500, S. Masoud Sadjadi

  33. Flooding • Another static algorithm, in which every incoming packet is sent out on every outgoing line except the one it arrived on. • It generates many duplicate packets. • Hop counter contained in the header • Keeping track of which packets have been flooded • Selective Flooding is a variation of flooding that is slightly more practical. • The routers send the packets only on those lines that they think are in the right direction. CEN 4500, S. Masoud Sadjadi

  34. Flooding Applications • In military applications, the tremendous robustness of flooding is highly desirable. • In distributed database applications, it is sometimes necessary to update all the databases concurrently. • In wireless networks, all messages transmitted by a station can be received by all other stations within its radio range. • As a metric against which other routing algorithms can be compared. CEN 4500, S. Masoud Sadjadi

  35. Agenda • Design Issues • Routing Algorithms • The Optimality Principle • Shortest Path Routing • Flooding • Distance Vector Routing • Link State Routing • Congestion Control Algorithms • Quality of Service • Internetworking • The Network Layer in the Internet • Summary CEN 4500, S. Masoud Sadjadi

  36. Distance Vector Routing • As the static algorithms do not take into account the current state of the network, modern computer networks use a dynamic algorithm instead. • The most popular dynamic algorithms • Distance Vector Routing • Algorithms operate by having each router maintain a table (i.e., a vector) giving the best known distance to each destination and which line to use to get there. • The original ARPANET routing algorithm and was also used in the Internet under the name RIP. • Link State Routing CEN 4500, S. Masoud Sadjadi

  37. Distance Vector Routing • How the algorithm works? • The routers are assumed to know their distance from their neighbors. • Once every T msec each router sends to each neighbor a list of its estimated delays to each destination. • Each router uses the new information to update its table/vector. CEN 4500, S. Masoud Sadjadi

  38. Distance Vector Routing (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J. CEN 4500, S. Masoud Sadjadi

  39. Distance Vector Routing • This algorithm converges to the correct answer, but it may do so slowly. • It reacts quickly to good news, but leisurely to bad news! Good news! A was down and is now up. The count-to-infinity problem. Bad news! A was up and is now down. CEN 4500, S. Masoud Sadjadi

  40. Agenda • Design Issues • Routing Algorithms • The Optimality Principle • Shortest Path Routing • Flooding • Distance Vector Routing • Link State Routing • Congestion Control Algorithms • Quality of Service • Internetworking • The Network Layer in the Internet • Summary CEN 4500, S. Masoud Sadjadi

  41. Link State Routing • Distance vector routing was used in the ARPANET until 1979, when it was replaced by link state routing. • The delay metric was queue length, it did not take link bandwidth into account when choosing routes. • The algorithm often took too long to converge (the count-to-infinity problem). • It was replaced by an entirely new algorithm, Link State Algorithm • Variants of this algorithm are now widely used. CEN 4500, S. Masoud Sadjadi

  42. Link State Routing • Each router must do the following • Discover its neighbors and learn their network addresses. • 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 • Computer the shortest path to every other router. • In effect, the complete topology and all delays are experimentally measured and distributed to every router. • Then Dijkstra’s algorithm can be used to find the shortest path to every other router. CEN 4500, S. Masoud Sadjadi

  43. Learning about the Neighbors • When a router is booted, its first task is to learn who its neighbors are. • Its sends a special HELLO packet on each of its point-to-point lines. • The router on the other end is expected to send back a reply telling who it is. (b) A graph model of (a). (a) Nine routers and a LAN. CEN 4500, S. Masoud Sadjadi

  44. Measuring Line Cost • By measuring the round-trip time and dividing it by two. • If we also consider the load, then the below network will oscillate wildly (choosing between CF and EI)! A subnet in which the East and West parts are connected by two lines. CEN 4500, S. Masoud Sadjadi

  45. Building Link State Packets • Once the information needed for the exchange has been collected, the next step is for each router to build a packet containing all the data. • Building the packets is easy, the had part is when to build them • Periodically or When some significant event happens (a) A subnet. (b) The link state packets for this subnet. CEN 4500, S. Masoud Sadjadi

  46. Distributing the Link State Packets • The trickiest part of the algorithm is distributing the link state packets reliably. • The fundamental idea is to use flooding • To keep the flood in check, each packet contains a sequence number • Each row corresponds to a recently-arrived, but not fully processed, link state packet. • Where the packet originated, its sequence number and age, and the data. must be acknowledged here The packet must be sent The packet buffer for router B in the previous slide CEN 4500, S. Masoud Sadjadi

  47. Computing the New Routes • Once a router has accumulated a full set of link state packets, it can construct the entire subnet graph because every link is represented. • Now, Dijkstra’s algorithm can be run locally to construct the shortest path to all possible destinations. • The results of this calculation can be installed in the routing tables, and normal operation resumed. • The OSPF, which is widely used in the Internet, uses a link state algorithm. CEN 4500, S. Masoud Sadjadi

  48. Agenda • Design Issues • Routing Algorithms • Congestion Control Algorithms • Quality of Service • Internetworking • The Network Layer in the Internet • Summary CEN 4500, S. Masoud Sadjadi

  49. Congestion Control • Congestion • When too many packets are present in (a part of) the subnet, performance degrades. • Consequence • As traffic increases too far, the routers are no longer able to cope and they begin losing packets. • This tends to make the matters worse. • At very high traffic, performance collapses completely and almost no packets are delivered. CEN 4500, S. Masoud Sadjadi

  50. Congestion When too much traffic is offered, congestion sets in and performance degrades sharply. CEN 4500, S. Masoud Sadjadi

More Related