Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CS490 Chapter 7b, Leon-Garcia Packet Switching Networks Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Today’s Outline • 7.3 Datagrams vs. Virtual Circuits (a little more) • Plus Definition of ATM • 7.4 Routing in Packet Networks – Distance Vector, Link State, Flooding, Deflection Routing, Source Routing • 7.5 Shortest Path Algorithms – Bellman Ford Algorithm – Construction of Routing Table and Updates – (On the blackboard) – We will not cover Dijkstra's algorithm in detail Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Messages Messages Segments Transport layer Transport layer Network service Network service Network layer Network layer Network layer End system Data link layer a Data link layer Data link layer Data link End system layer b Physical layer Physical layer Physical layer Physical layer Network layer Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.2 C 1 2 3 2 1 End system b End system a 4 3 2 1 1 2 3 2 1 1 2 3 B 2 1 2 1 1 2 3 4 Medium A Network 1 Physical layer entity 3 2 Network layer entity 4 Transport layer entity Network layer entity Data link layer entity Copyright ©2000 The McGraw Hill Companies 3 Leon-Garcia & Widjaja: Communication Networks Figure 7.3 Comparison of Virtual Circuit and Datagram Subnets Issue Datagram Subnet VC Subnet Addressing Each packet has source and dest address Subnet does not hold state info Packets routed independently State Info Packets contain short VC number Each VC requires subnet table space Routing Route chosen on set up. All packets follow this route Effect of Router None, except All VCs that pass Crashes packets lost during through this router crash are terminated Congestion Control Difficult Easy if enough buffers can be allocated for each VC Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks IP Internet Protocol (Network Layer) • Actually most information on IP is in Chapter 8 on TCP/IP • Here we should just know that IP is a datagram service, packets are routed independently of one another • It is not connection-oriented at the network layer, but can be at the transport layer above • The IP packet has a header of 20-60 bytes including source and destination addresses, CRC, and various option and control fields. Details in 8.2. • The total length of a packet, including info, can be up to 65K bytes, but transit of Ethernet LANs often limits to 1500 bytes Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Asynchronous Transfer Mode Definition • We will skip 7.6 as far as the exam is concerned, but here is a concise definition of ATM (p 483) • Connection oriented in network layer • Short (48 info bytes) fixed length packets called “cells” • Cells contain short (5 byte) headers that point to connections • ATM uses fast hardware switches up to 10,000 ports with up to 150Mbps each • ATM has some of the best features of circuit switching and packet switching. Asychronous = no master clock Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Combinations of Service and Subnet Structure Upper Layer (Transport Layer) Type of Subnet (Network Layer) Datagram Virtual Circuit Connectionless UDP over IP UDP over IP over ATM ConnectionOriented TCP over IP ATM AAL1 over ATM Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks 7.4 Routing in Packet Switched Networks • Net = Routers (or Switches) and links • Routing involves – Setting up routing tables – Forwarding packets • Routing Algorithm tries to set up “best” routes – minimize hops or – minimize delay or – maximize bandwidth or ... • The Routing Algorithm needs global info about net Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Goals of Routing Algorithm • • • • • Rapid and Accurate Delivery of Packets Adapt to Failure of Node or Link Adapt to Change in Traffic Loads Determine Connectivity of Network Low Overhead Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Classification of Routing Algorithms • Static vs. Dynamic (Adaptive) • Centralized vs. Distributed • Decisions for each Packet vs. at Connection Time Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Example of a Packet-Switched Network: Topology for Example 1 3 6 A 4 B Host 2 Copyright ©2000 The McGraw Hill Companies 5 Switch or router Leon-Garcia & Widjaja: Communication Networks Figure 7.23 Virtual Circuit Packet Switching 1 A 1 2 3 5 7 3 1 4 8 6 B 5 2 4 3 C 2 6 5 5 2 D Note: VC numbers change at each router. Route on top (thin line) changes from 1 to 2 to 7 to 8. Next slide has routing tables. Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.24 Follow that circuit from A via VC Nos. 1, 2, 7,8 to B in Routers 1, 3, and 6. Node 3 Node 1 Incoming node VC A 1 A 5 3 2 3 3 Outgoing node VC 3 2 3 3 A 1 A 5 Incoming node VC 1 2 1 3 4 2 6 7 6 1 4 4 Outgoing node VC 6 7 4 4 6 1 1 2 4 2 1 3 Node 6 Incoming node VC 3 7 3 1 B 5 B 8 Outgoing node VC B 8 B 5 3 1 3 7 Node 4 Node 2 Incoming node VC C 6 4 3 Outgoing node VC 4 3 C 6 Copyright ©2000 The McGraw Hill Companies Incoming node VC 2 3 3 4 3 2 5 5 Outgoing node VC 3 2 5 5 2 3 3 4 Leon-Garcia & Widjaja: Communication Networks Node 5 Incoming node VC 4 5 D 2 Outgoing node VC D 2 4 5 Figure 7.25 Routing Tables for a Datagram Network. Same Topology. Node 1 Destination Next node 2 2 3 3 4 4 5 2 6 3 Node 2 Destination Next node 1 1 3 1 4 4 5 5 6 5 Copyright ©2000 The McGraw Hill Companies Node 3 Destination Next node 1 2 4 5 6 1 4 4 6 6 Destination 1 2 3 5 6 Node 6 Destination Next node 1 3 2 5 3 3 4 3 5 5 Node 4 Next node 1 2 3 5 3 Leon-Garcia & Widjaja: Communication Networks Destination 1 2 3 4 6 Node 5 Next node 4 2 4 4 6 Figure 7.26 Hierarchical Addresses in the Internet • Actually the book covers TCP/IP together in Chapter 8 • Here (p 488) it points out that routing is simplified if hosts within a domain have the same prefix (network address). • Then routers outside the domain only have to examine (and store) the prefix • Thus IP addresses are always divided into a network address and a host address. (Usually there are three levels, often: network address, LAN address, host address) • See Fig 7.27 Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks (a) Fig. 7.27 Advantage of Hierarchical Routing 0000 0001 0010 0011 1 0100 0101 0110 0111 4 3 a. Hierarchical - R2 R1 5 2 1000 1001 1010 1011 00 01 10 11 1 3 2 3 00 01 10 11 1100 1101 1110 1111 3 4 3 5 (b) 0000 0111 1010 1101 1 0001 0100 1011 1110 4 3 b. Non - Hier. R2 R1 5 2 0011 0110 1001 1100 Copyright ©2000 The McGraw Hill Companies 0000 0111 1010 … 1 1 1 … 0001 0100 1011 … 4 4 4 … Leon-Garcia & Widjaja: Communication Networks 0011 0101 1000 1111 Figure 7.27 Fig. 7.28 Sample net with costs. We will use this net for a detailed example on the blackboard 1 2 1 3 6 5 2 3 4 1 2 3 2 4 5 But, first let's finish talking about different types of routing. Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.28 Results of Bellman-Ford Algorithm: Shortest path tree for this network. 1 2 1 3 6 2 1 2 4 2 5 Our bird's eye view of the net allows us to easily see that this is the lowest cost solution, but it's not so easy for the routers to do this automatically. They only have information measured by other routers to use. Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.29 Shortest Path Routing Approaches • Distance Vector (original Internet approach, uses only one metric, often hops, uses Bellman-Ford, has count-toinfinity problem, RIP still used in internets) • Link State (now most common in Internet, uses Dijkstra,can use multiple cost functions, avoids count-toinfinity) Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Other Routing Approaches • Flooding • Deflection Routing • Source Routing Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Flooding Routing Algorithm (a) 1 3 6 4 2 5 Send incoming packets on all output ports, except the one it came in on. First step. Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.33 - Part 1 of 3 Second Step of Flooding (b) 1 3 6 4 2 5 Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.33 - Part 2 of 3 Third step of Flooding. Need control to prevent saturation of network. Use "time-to-live" field (c) 1 3 6 4 2 5 Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.33 - Part 3 of 3 Hot Potato or Deflection Routing 0,0 0,1 0,2 0,3 1,0 1,1 1,2 1,3 2,0 2,1 2,2 2,3 3,0 3,1 3,2 3,3 Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.34 Routers can do without buffers. Pure switch can be used. busy 0,0 0,1 0,2 0,3 1,0 1,1 1,2 1,3 2,0 2,1 2,2 2,3 3,0 3,1 3,2 3,3 (0,2) wants to send to (1,0), but (0,1) is busy. Deflect to right. Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.35 Source Routing 3,6,B 6,B 1,3,6,B 1 3 6 B A 4 B Source host 2 Copyright ©2000 The McGraw Hill Companies 5 Destination host Leon-Garcia & Widjaja: Communication Networks Figure 7.36 Congestion 3 6 1 4 8 2 5 Copyright ©2000 The McGraw Hill Companies 7 Leon-Garcia & Widjaja: Communication Networks Figure 7.50 Throughput Controlled Uncontrolled Offered load Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.51 Bits per second Peak rate Average rate Time Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.52 Water poured irregularly Leaky bucket Water drains at a constant rate Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.53 Arrival of a packet at time ta X’ = X - (ta - LCT) X’ < 0? No Nonconforming packet Yes Yes X’ = 0 X’ > L? No X = X’ + I LCT = ta conforming packet Copyright ©2000 The McGraw Hill Companies X = value of the leaky bucket counter X’ = auxiliary variable LCT = last conformance time Leon-Garcia & Widjaja: Communication Networks Figure 7.54 Nonconforming Packet arrival Time L+I Bucket content I * * * Copyright ©2000 The McGraw Hill Companies * * ** * Leon-Garcia & Widjaja: Communication Networks * Time Figure 7.55 MBS T Copyright ©2000 The McGraw Hill Companies L I Leon-Garcia & Widjaja: Communication Networks Time Figure 7.56 Incoming traffic Leaky bucket 1 PCR and CDVT Tagged or dropped Untagged traffic Leaky bucket 2 SCR and MBS Tagged or dropped Untagged traffic Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.57 10 Kbps (a) 0 1 2 3 Time 1 2 3 Time 1 2 3 Time 50 Kbps (b) 0 100 Kbps (c) 0 Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.58 Incoming traffic Shaped traffic Size N Server Packet Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.59 Tokens arrive periodically Size K Token Incoming traffic Shaped traffic Size N Server Packet Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.60 b bytes instantly r bytes per second t Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.61 (a) A(t) = b+rt No backlog of packets R(t) (b) R(t) b R-r Buffer occupancy @1 0 Copyright ©2000 The McGraw Hill Companies b R empty t Leon-Garcia & Widjaja: Communication Networks t Figure 7.62 20 Congestion avoidance Congestion occurs 15 Congestion window Threshold 10 5 Slow start 0 Round-trip times Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 7.63 C 1 2 3 2 1 End system b End system a 4 3 2 1 1 2 3 2 1 1 2 3 B 2 1 2 1 1 2 3 4 Medium A Network 1 Physical layer entity 3 2 Network layer entity 4 Transport layer entity Network layer entity Data link layer entity Copyright ©2000 The McGraw Hill Companies 3 Leon-Garcia & Widjaja: Communication Networks Figure 7.3