* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Document
Point-to-Point Protocol over Ethernet wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Internet protocol suite wikipedia , lookup
Network tap wikipedia , lookup
Serial digital interface wikipedia , lookup
Backpressure routing wikipedia , lookup
TCP congestion control wikipedia , lookup
Computer network wikipedia , lookup
Airborne Networking wikipedia , lookup
Distributed firewall wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Packet switching wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Network Layer Provides for the transparent transfer of data between transport entities. Responsible for: – Establishing, – Maintaining, – Terminating connections Across the intervening communication facility. – Routing packets within subnet, – Congestion and deadlock problems, – Subnet-host interface? 1 Network Layer (cont.) Service Provided: Issue Initial setup Destination address Packet sequencing Error control Connectionoriented Required Only needed during setup Guaranteed Connectionless Done by network layer (e.g., subnet) Done by transport layer (e.g., hosts) Not possible Needed on every packet Not guaranteed 2 Network Layer (cont.) Issue Flow control Is option negotiation possible? Are connection identifiers used? Connectionoriented Provided by network layer Connectionless Not provided by network layer Yes No Yes No Summary of the major differences between connection-oriented and connectionless service. 3 E-mail FTP … TCP IP ATM Data link Physical Running TCP/IP over an ATM subnet 4 Virtual Circuits vs Datagrams • Trade-off between IMP memory, space and bandwidth • Virtual circuits (used in SNA) – Attractive for interactive terminal environment – Packet contains circuit # vs full destination address – Problem: If IMP fails and loses its memory, then every thing is lost. – Error control and sequence control (handled by data link layer) 5 Virtual Circuits vs Datagrams (cont.) • Datagrams (used in DECNET, ARPANET) – Allow IMPs to balance load – Host (transport layer) inserts error control and sequence control. 6 Comparison of datagram and virtual circuit subnets Connectionless Circuit setup Addressing State information Not possible Each packet contains the full source and destination address Subnet does not hold state information Each packet is routed independently Routing Effect of node failures Congestion control Complexity Suited for None, except for packets lost during the crash Difficult In the transport layer Connection-oriented and connectionless service Connection-oriented Required Each packet contains a short vc number Each established vc requires subnet table space Route chosen when vc is setup; all packets follow this route All vcs that passed through the failed equipment are terminated Easy if enough buffers can be allocated in advance for each vc set up In the network layer Connection-oriented service 7 Virtual Circuit Subnet H Host H B 8 Simplex virtual circuits H C A D H E H F IMP (a) Example subnet H Originating at A 0 - ABCD 1 - AEFD 2 - ABFD 3 - AEC 4 - AECDFB Originating at B 0 - BCD 1 - BAE 2 - BF (b) Eight virtual circuits through the subnet 8 Virtual Circuit Subnet (cont.) (c) IMP tables for the virtual circuits in (b) 9 Virtual Circuit Subnet (cont.) Virtual circuit field Line packet H to A 4 A to E 3 E to C 1 C to D 2 D to F 0 F to B 0 B to H 0 (d) The virtual circuit changes as a packet progresses 10 Routing Algorithms • Concern: – Correctness – Robustness – Simplicity – Fairness – Stability – Optimality Note: Trade-off between fairness and optimality. 11 Routing Algorithms (cont.) • 2 classes of routing algorithm – Nonadaptive – Adaptive • Centralized • Isolated • Distributed 12 Example packet-switched network 5 To node 2 3 3 5 2 1 2 3 6 1 2 1 4 1 5 1 2 From 3 Node 4 5 6 1 = 1 5 1 4 5 2 2 = 2 2 4 5 3 4 3 = 5 3 5 4 4 4 5 = 4 5 5 4 4 5 5 = 5 6 4 4 5 5 6 = Central Routing Directory 13 Example packet-switched network: Fixed routing Node 1 Directory Node 2 Directory Node 3 Directory Dest. 2 3 4 5 6 Next node 2 4 4 4 4 Node 4 Directory Dest. Next node 1 1 2 2 3 5 5 5 6 5 Dest. 1 3 4 5 6 Next node 1 3 4 4 4 Node 5 Directory Dest. Next node 1 4 2 4 3 3 4 4 6 6 Dest. 1 2 4 5 6 Next node 5 2 5 5 5 Node 6 Directory Dest. Next node 1 5 2 5 3 5 4 5 5 5 14 Dijkstra's Algorithm B 2 A 2 6 C 7 E 2 F 1 3 3 D 2 2 4 G H B (2,A) 2 A 2 6 C (-) 7 E (-) 2 F (-) 1 3 2 4 G (6,A) 3 2 D (-) H (-) Shortest path from A to D 15 Dijkstra's Algorithm (cont.) B (2,A) 2 A 2 6 C (9B) 7 E (4B) 2 F (-) 1 3 2 4 G (6,A) B (2,A) 2 A 2 6 3 2 D (-) H (-) C (9B) 7 E (4B) 2 F (6E) 1 3 2 4 G (5,E) 3 2 D (-) H (-) Shortest path from A to D 16 Dijkstra's Algorithm (cont.) B (2,A) 2 A 2 6 C (9B) 7 E (4B) 2 F (6E) 1 3 2 4 G (5,E) B (2,A) 2 A 2 6 3 2 D (-) H (9,G) C (9B) 7 E (4B) 2 F (6E) 1 3 2 4 G (5,E) 3 2 D (-) H (8,F) Shortest path from A to D 17 Dijkstra's Algorithm (cont.) B (2,A) 2 A E (4B) 2 2 6 C (9B) 7 F (6E) 1 3 2 4 G (5,E) 3 D(10H) 2 H (8,F) Shortest path from A to D 18 Multipath Routing Advantage over shortest path routing: Possibility of sending different classes of traffic over different paths. e.g., Short packets routed via terrestrial lines, whereas a long file routed via satellite. Note: Disjoint paths improve reliability and performance. 19 Multipath Routing (cont.) A B E C G F I J D K H L Dest A B C D E F G H I K L First Choice A 0.63 A 0.46 A 0.34 H 0.50 A 0.40 A 0.34 H 0.46 H 0.63 I 0.65 Second Choice I 0.21 H 0.31 I 0.33 A 0.25 I 0.40 H 0.33 A 0.31 K 0.21 A 0.22 Third Choice H 0.16 I 0.23 H 0.33 I 0.25 H 0.20 I 0.33 K 0.23 A 0.16 H 0.13 K 0.67 K 0.42 H 0.22 H 0.42 A 0.11 A 0.16 Routing Table for Node J 20 Centralized Routing • Adaptive routing scheme based on routing control center (RCC). • Use global information to optimize individual IMPs. • Lots of overhead. • Vulnerable to failure of RCC. • Timing problem during update. • Heavy traffic through RCC. • Advantage; Bursty traffic. 21 Centralized Routing 22 Isolated Routing • Adaptive, but fewer vulnerability problems than centralized routing. • Routing information is not passed among IMPs, but IMPs ``learn'' from past I/O schemes. • Hot potato -- IMP tries to get rid of packet quickly, by putting it on shortest output Q. • Backward learning -- use frame headers to pass information among IMP about history of packet. 23 Isolated Routing (cont.) • Delta routing -- hybrid between isolated and centralized. • Each IMP measures the cost of each line (i.e., some function of delay, Q length, utilization, etc) and periodically send a packet to the RCC giving these values. To A To H To I To K Queueing within the IMP 24 Flooding Every incoming packet is sent out on all outgoing lines except the one it arrived on. Note: Not practical in most applications. However, flooding produces shortest delay (if overhead is ignored) – Selective flooding – Random walk Static routing fixed tables. Each possible route is weighted 25 Flooding example (hop count=3) Assume that a packet is to be sent from node 1 to node 6. 26 Distance Vector Routing • Each IMP exchanges information with its neighbors. • Routing table in each IMP contains Destination Best line Distance or time to destination All IMPs in network 27 Distance Vector Routing (cont’d) A B E C G F I J D K (a) Subnet H L A B C D E F G H I J K L A 0 12 25 40 14 23 18 17 21 9 24 29 JA delay = 8 I 24 36 18 27 7 20 31 20 0 11 22 33 H 20 31 19 8 30 19 6 0 14 7 22 9 10 12 K 21 28 36 24 22 40 31 19 22 10 0 9 New estimated delay from J 8 20 28 20 17 30 18 12 10 0 6 15 Line A A I H I I H H I K K 6 (b) Input from A,I,H,K and the new routing table for J 28 Link State Routing • 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 • Compute the shortest path to every other router 29 Learning about the Neighbors •Send a special HELLO packet on each point -to point line •Two or more routers are connected by a LAN Routers H B D E D G A C I F B E H G C A F I N LAN (a) Nine routers and a LAN (b) A graph model of (a) 30 Measuring Line Cost • Estimate delay of neighbors – Send special ECHO over line – Measure the roundtrip time and divide by 2 – Load consider? 31 Building Link State Packets 2 B C 4 3 A 1 D 6 5 7 E 8 A Seq. Age B 4 E 5 B Seq. Age A 4 C 2 F 6 C Seq. Age B 2 D 3 E 1 D Seq. Age C 3 F 7 E Seq. Age A 5 C 1 F 8 F Seq. Age B 6 D 7 E 8 F (a) A subnet (b) The link state packets for this subnet 32 Distributing the Link State Packets •Use flooding Send flags Source Seq. Age A A F E C D 21 21 21 20 21 60 60 59 60 59 0 1 0 1 1 ACK flags C F A C F 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 0 0 1 1 Data 0 1 1 0 1 The packet buffer for router B 33 Computing the Routes • Use Dijkstra’s Algorithm • OSPF Protocol (used in Internet) 34 Optimal Routing (a) A subnet (b) The sink tree for IMP B,using number of hops as metric 35 Flow-Based Routing Basic Idea: For a given line, if the capacity and average flow are known, it is possible to compute the mean packet delay on that line from queueing theory. The routing then reduces to finding the routing algorithm that produces the minimum average delay for the network. 36 Flow-Based Routing (cont.) Destination A A B 20 Source C 20 B 10 20 A D 20 20 E 50 10 F (a) A network with line capacity shown in Kbps C D E F B E C D 9 7 4 1 AB ABC ABFD AE 9 2 8 3 BA BC BFD BFE 4 8 3 3 CBA CB CD CE 1 3 3 3 DFBA DFB DC DCE 7 2 3 3 EA EFB EC ECD 4 4 5 2 4 FEA FB FEC FD FE F 4 AEF 4 BF 2 CEF 4 DF 5 EF (b) The traffic in packets/sec and the routing matrix 37 Flow-Based Routing (cont.) i 1 2 3 4 5 6 7 8 l Line (pkts/sec) AB 14 BC 12 CD 6 AE 11 EF 13 FD 8 BF 10 EC 8 C mC (kbps) (pkts/sec) 20 25 20 25 10 12.5 20 25 50 62.5 10 12.5 20 25 20 25 T (ms) 91 77 154 71 20 222 67 59 Analysis of the above network using a mean packet size of 800 bits. The reverse traffic (BA, CB, etc) is the same as the forward traffic 38 Hierarchical Routing Dest. Line hops Dest. Line Region 1 Region 2 1B 1A 2A 2B 1C 2D 2C 5B 4A 5C 3B 3A 4B 4C 5A 5D 5E Region 3 Region 4 Region 5 1A 1B 1C 2A 2B 2C 2D 3A 3B 4A 4B 4C 5A 5B 5C 5D 5E 1B 1C 1B 1B 1B 1B 1C 1C 1C 1C 1C 1C 1C 1B 1C 1C hops 1A 1 1B 1B 1 1 1C 1C 1 2 2 1B 2 3 3 1C 2 3 4 1C 3 4 5 1C 4 3 Hierarchical 2 Table 3 For 1A 4 4 4 5 5 6 Full Table 5 For 1A 39 Routing For Mobile Hosts Wireless cell Home agent Mobile host Home LAN Foreign LAN WAN MAN A WAN to which LANs, MANs, and wireless cells are attached 40 Routing For Mobile Hosts (cont.) The registration procedure for mobile hosts: 1. Periodically, each foreign agent broadcast a packet announcing its existance and address. A newly arrived mobile host may wait for one of these messages, but if none arrives quickly enough, the mobile host can broadcast a packet saying: “Are there any foreign agents around?” 2. The mobile host registers with the foreign agent, giving its home address, current data link layer address, and some security information. 41 Routing For Mobile Hosts (cont.) 3. The foreign agent contacts the mobile host’s home agent and says: “One of your hosts is over here.” The message from the foreign agent to the home agent contains the foreign agent’s network address. It also includes the security information, to convince the home agent that the mobile host is really there. 4. The home agent examines the security information which contains a timestamp, to prove that it was generated within the past few seconds. If it is happy, it tells the foreign agent to proceed. 42 Routing For Mobile Hosts (cont.) 5. When the foreign agent gets the acknowledgement from the home agent, it makes an entry in its table and informs the mobile host that it is now registered. 43 Routing For Mobile Hosts (cont.) 1. Packet is sent to the mobile host’s home address 4. Subsequent packets are tunneled to the foreign agent 3. Sender is given foreign agent’s address 2. Packet is tunneled to the foreign agent Packet routing for mobile users 44 Broadcast Routing 45 Broadcast Routing (cont.) • Source to send a packet to each destination. • Flooding. • Multidestination routing -- each packet contains a list of destinations. • Spanning tree -- copy an incoming packet onto all the spanning tree lines except the one it arrived on. 46 Traffic Control • Flow control e.g., Sliding window technique • Congestion control e.g., Managing input and output buffers at IMPs. – Packets may be discarded or – A choke packet sent. • Deadlocks e.g., No buffers are available. 47 Traffic Control (cont.) To 2 To 3 To 1 Node 4 Output Buffer To 5 Intput Buffer Input and Output Queues at node 4 To host 48 Traffic Control (cont.) 2 3 1 6 4 5 Host The interaction of queues in a packet-switching network 49 The effects of congestion throughput (packets delivered) (a) Throughput 50 The effects of congestion (cont) Average Packet Delay (b) Delay 51 Congestion Prevention Policies Layer Transport Network Data Link Policies Retransmission policy Out-of-order caching policy Acknowledgement policy Flow control policy Timeout determination Virtual circuits versus datagram inside the subnet Packet queueing and service policy Packet discard policy Routing Algorithm Packet lifetime management Retransmission policy Out-of-order caching policy Acknowledgement policy Flow control policy Policies that affect congestion 52 Traffic Shaping • Regulating the average rate (and burstiness) of data transmission • monitoring a traffic flow is reffered as traffic policing • Example: The leaky bucket algorithm used in ATM networks (Turner 1986) • In contrast, sliding window protocols limit the amount of data in transmission 53 Traffic Shaping (cont.) Host Computer Packet Interface containing a leaky bucket Unregulated flow The bucket holds packets Regulated flow Network A leaky bucket with water A leaky bucket with packet 54 Types of deadlock (a) Direct store-and-forward deadlock 55 Types of deadlock (cont.) (b) Indirect storeandforward deadlock 56 Types of deadlock (c) Reassembly deadlock 57 Structured buffer pool for deadlock avoidance. Class N Class K Class 2 Class 1 Buffer space for packets that have traveled k hops. Command pool (Class 0) 58