* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download The Network Layer
Network tap wikipedia , lookup
Backpressure routing wikipedia , lookup
Point-to-Point Protocol over Ethernet wikipedia , lookup
Distributed firewall wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Airborne Networking wikipedia , lookup
Internet protocol suite wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Computer network wikipedia , lookup
TCP congestion control wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Deep packet inspection wikipedia , lookup
Packet switching wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Chapter 5 The Network Layer Network Layer Design Isues • • • • • 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 Store-and-Forward Packet Switching fig 5-1 The environment of the network layer protocols. Services Provided to the Transport Layer 1. 2. 3. 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 Internet – Connection Less ATM – Connection-oriented. Implementation of Connectionless Service Routing within a diagram subnet. Implementation of Connection-Oriented Service Routing within a virtual-circuit subnet. Comparison of Virtual-Circuit and Datagram Subnets 5-4 Routing Algorithms • • • • • • • • • • The Optimality Principle Shortest Path Routing Flooding Distance Vector Routing Link State Routing Hierarchical Routing Broadcast Routing Multicast Routing Routing for Mobile Hosts Routing in Ad Hoc Networks Routing Algorithms (2) A – A’, B – B’, C – C’, can fill the channel, then X-X’ doesn’t get a chance Conflict between fairness and optimality. 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. (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. Dijkstra 5-8 top Dijkstra's algorithm to compute the shortest path through a graph. Dijkstra 5-8 bottom Dijkstra's algorithm to compute the shortest path through a graph. Flooding Robust but costly. a) b) c) d) Used military application Wireless Networks Distributed Database Metrics against which other routing algorithms are compared. Distance Vector Routing (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. Hierarchical Routing Hierarchical routing. Problems – optimal paths are sacrificed Hierarchical Routing How many levels of hierarchy 720 routers 720 routers in 24 regions Three levels of hierarchy – 8 clusters each containing 9 regions of 10 clusters Link State Routing Each router must do the following: 1. Discover its neighbors, learn their network address. 2. Measure the delay or cost to each of its neighbors. 3. Construct a packet telling all it has just learned. 4. Send this packet to all other routers. 5. Compute the shortest path to every other router. Learning about the Neighbors (a) Nine routers and a LAN. (b) A graph model of (a). Setting Link Cost a) b) Bandwidth Delay – measured by sending special ECHO Measuring Line Cost A subnet in which the East and West parts are connected by two lines. Including queueing delay may lead to a lot of oscillation Load spread over both lines Building Link State Packets (a) A subnet. (b) The link state packets for this subnet. Few Problems Algorithm – Sequence number less means obsolete a)If sequence numbers wrap around, confusion will reign b)Router crashes, sequence number is lost c)Sequence number gets corrupted Aging and then dropping the packet When a link-state packet comes in to router it is not queued immediately rather wait if any other packets arrive Distributing the Link State Packets The packet buffer for router B in the previous slide (Fig. 5-13). E has arrived twice. Cs copy arrive from F, then F will be ack not send OSPF (Open Shortest Path First) a) Refreshed every 60 seconds. b) Hardware Problem router getting corrupt etc. Broadcast Routing Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by reverse path forwarding. Broadcast Routing Multidimensional Routing – each packet contains either a list of destinations. When the packet comes, checks the set of destinations needed Spanning Tree – Reverse Path Forwarding – Broadcast. Checks if the packet has arrived following the correct hop or not. If correct hop then rebroadcast. 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. Routing for Mobile Hosts A WAN to which LANs, MANs, and wireless cells are attached. Routing for Mobile Hosts (2) Packet routing for mobile users. Routing in Ad Hoc Networks Possibilities when the routers are mobile: 1. Military vehicles on battlefield. – No infrastructure. 2. A fleet of ships at sea. – All moving all the time 3. Emergency works at earthquake . – The infrastructure destroyed. 4. A gathering of people with notebook computers. – In an area lacking 802.11. Route Discovery a) (a) Range of A's broadcast. b) (b) After B and D have received A's broadcast. c) (c) After C, F, and G have received A's broadcast. d) (d) After E, H, and I have received A's broadcast. Shaded nodes are new recipients. Arrows show possible reverse routes. Route Discovery (2) Format of a ROUTE REQUEST packet. Route Discovery (2) The (Source Address, Request ID) pair is looked up in a local history table Receiver looks up the destination in its route table. If a fresh route is known, then a ROUTE REPLY is sent. Destination sequence number is higher than the Destination sequence in the Route Discovery Packet Increments Hop count and rebroadcasts ROUTE REPLY Stores the data in a new entry in its reverse route table. Route Discovery (3) Format of a ROUTE REPLY packet. Route Discovery (3) IN response – Source addr, destination addr and Hop Count copied but Dest seq number taken from its counter Hopcount is set to 0, Lifetime field controls how long the route is valid. At each intermediate node 1.No route to I is known, 2.Sequence number of I in the ROUTE REPLY packet is greater than the value in the routing table 3.The sequence numbers are equal but the new route is shorter 4.Hop Count incremented 5.In large network Discovery increases with Time to Live incrementally being increased from 1, 2, 3 Route Maintenance Active Neigbors that have fed in those destinations to A in last t seconds (a) D's routing table before G goes down. (b) The graph after G has gone down. Node Lookup in Peer-to-Peer Networks (a) A set of 32 node identifiers arranged in a circle. The shaded ones correspond to actual machines. The arcs show the fingers from nodes 1, 4, and 12. The labels on the arcs are the table indices. (b) Examples of the finger tables. a) CASE STUDY – Key = 3, Key = 14, Key = 16 Congestion Control Algorithms • • • • • • General Principles of Congestion Control Congestion Prevention Policies Congestion Control in Virtual-Circuit Subnets Congestion Control in Datagram Subnets Load Shedding Jitter Control Congestion When too much traffic is offered, congestion sets in and performance degrades sharply. General Principles of Congestion Control 1. Monitor the system . – detect when and where congestion occurs. 2. Pass information to where action can be taken. 3. Adjust system operation to correct the problem. Congestion Prevention Policies 5-26 Policies that affect congestion. Congestion Control in Virtual-Circuit Subnets (a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B. (b) Problem is in virtual circuits there may be provisioning but not real usage. Congestion Control in Datagram Subnets u_new = au_old + (1 – a)f – instant line utilization where the constant a determines how fast the router forgets the history. If u_new is above a threshold action is taken. Warning Bit Went to destination and then source Every router along the path set the warning bit, traffic increased only when no router is in trouble. Congestion Control in Datagram Subnets Choke Packets In this approach the router sends a choke packet back to the source The source on receiving the choke packets, reduce the traffic by X% Wait for the next choke packet 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. Sending choke packets to the source may be costly. Load Shedding/ Random Early Detection a) Which packets to discard may depend on application Multimedia – old packets Text – Recent Packets Packets importance can be marked in the beginning (application layer), then which packets to discard can be taken. RED ---- Discard selected packets and not report, source knows when not getting acknowledgement and reduces the Jitter Control Schedule Delay according to Deadline Miss (a) High jitter. (b) Low jitter. Quality of Service • • • • • Requirements Techniques for Achieving Good Quality of Service Integrated Services Differentiated Services Label Switching and MPLS Requirements 5-30 How stringent the quality-of-service requirements are. 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 5-34 (a) Before. (b) After. If we call the burst length S sec, the token bucket capacity C bytes, the token arrival rate \rho bytes/sec and the maximum output rate M bytes/sec, we see an output burst contains a maximum of C + \rho . S bytes. We also know that the number of bytes in a maximum –speed burst of length S seconds is MS. ============================ Resource reservation – 1. Bandwidth, 2. Buffer Space, 3. CPU cycles T = 1/\mu x 1/(1- \lambda/\mu) \lambda/\mu – CPU utilization \mu = 1,000,000 packets/sec, \lambda = 950,000 packets/sec Admission Control (RFC 2210, 2211) 5-34 Token Bucket Rate is 1 Mbps and Token Bucket Size is 500 KB, the bucket can fill continuously for 4 sec Peak data rate – Maximum tolerable rate Smallest Packet which can be handled An example of flow specification. Packet Scheduling (a) A router with five packets queued for line O. (b) Finishing times for the five packets. The Network Layer in the Internet • • • • • • • • The IP Protocol IP Addresses Internet Control Protocols OSPF – The Interior Gateway Routing Protocol BGP – The Exterior Gateway Routing Protocol Internet Multicasting Mobile IP IPv6 Design Principles for Internet 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Make sure it works. Keep it simple. Make clear choices. Exploit modularity. Expect heterogeneity. Avoid static options and parameters. Look for a good design; it need not be perfect. Be strict when sending and tolerant when receiving. Think about scalability. Consider performance and cost. Collection of Subnetworks The Internet is an interconnected collection of many networks. The IP Protocol The IPv4 (Internet Protocol) header. Version – IPV4/IPV6 IHL – how long the header is – in 32 bit word, minimum is 5, maximum is 15 (60 bytes) Type of Service – (6 bits) – four queuing priority, three discard probabilities and the historical class Total Length – header + data, maximum is 65,535 Identification Field – fragments of a datagram have same Identification value DF – Don’t Fragment (may mean moving through sub-optimal route, MF- More Fragments. (all except the last fragment set ) Fragment Offset – 8192 fragments per datagram (multiple of 8 bytes) Time to Live – Protocol – TCP, UDP Header Checksum - verified The IP Protocol (2) 5-54 Some of the IP options. Addressing Scheme for IPV4 a) Network Number --- Host number IP Addresses IP address formats. IP Addresses (2) Special IP addresses. First Octet Rule for Class Determination a) A (1-126), B – (126 – 191), C – (192-223) D -- (224 – 239) Subnets A campus network consisting of LANs for various departments. Subnets (2) A class B network subnetted into 64 subnets. <net-id> <all-is> Directed broadcast <all – 1s><all 1s> Local broadcast within the network <all 0s> <all 0s> ‘This network’ , ‘This host’ <all 0s> <host-id> A host on this network <127> <any> -- loopback address CDR – Classless InterDomain Routing 5-59 A set of IP address assignments. Address Moving in CIDR a) A packet comes in .addressed 194.24.17.4 –compare it with each mask…. Largest Suffix match Aggregated entry of the three – 194.24.0.0/19 Omaha Minneapolis, New York, Dallas, Denver 194.24.12.0/22 NAT – Network Address Translation Placement and operation of a NAT box. NAT a) While leaving – ip, port are put in table, checksum is calculated and inserted into the packets. b) While coming back – ip, port, checksum of ip and port checksum c) Three ranges of ip addresses as private – – – 10.0.0.0 172.16 ---- 172.31 192.168 NAT – criticism a) b) c) d) e) Architectural model of IP where each IP is identified by a single machine Internet from connection-less to connection-oriented NAT violates the most fundamental rule of protocol layering Processes on the Internet are not required to use TCP or UDP Some application insert IP address in their body – (FTP) – NAT doesn’t know about it. Internet Control Message Protocol 5-61 The principal ICMP message types. (encapsulated in an IP packet) ARP– The Address Resolution Protocol Three interconnected /24 networks: two Ethernets and an FDDI ring. Optimization on ARP a) b) c) Caching Braodcast the mapping when booting Send it to router if not local Dynamic Host Configuration Protocol Operation of DHCP. DHCP Relay, Broadcasts a DISCOVER, Leasing of IP, if not renewed it is taken back. OSPF – (Open Shortest Path First) The Interior Gateway Routing Protocol (a) An autonomous system. (b) A graph representation of (a). Salient Features a)O – open source b)Support variety of distant metrics c)Dynamic algorithm – have to adapt d)Load balancing and not the best path e)Hierarchical systems f)Security is needed OSPF supports connection – point-to-point/multiaccess with broadcast OSPF (2) The relation between ASes, backbones, and areas in OSPF, every router has . OSPF (3) 5-66 The five types of OSPF messeges. BGP – The Exterior Gateway Routing Protocol No transit through particular AS etc.. (a) A set of BGP routers. (b) Information sent to F. END HERE The Main IPv6 Header The IPv6 fixed header (required). Extension Headers 5-69 IPv6 extension headers. Extension Headers (2) The hop-by-hop extension header for large datagrams (jumbograms). Extension Headers (3) The extension header for routing. RSVP-The ReSerVation Protocol (a) A network, (b) The multicast spanning tree for host 1. (c) The multicast spanning tree for host 2. RSVP-The ReSerVation Protocol (2) (a) Host 3 requests a channel to host 1. (b) Host 3 then requests a second channel, to host 2. (c) Host 5 requests a channel to host 1. Expedited Forwarding Expedited packets experience a traffic-free network. Assured Forwarding A possible implementation of the data flow for assured forwarding. Label Switching and MPLS Transmitting a TCP segment using IP, MPLS, and PPP. Internetworking • • • • • • • How Networks Differ How Networks Can Be Connected Concatenated Virtual Circuits Connectionless Internetworking Tunneling Internetwork Routing Fragmentation Connecting Networks A collection of interconnected networks. How Networks Differ 5-43 Some of the many ways networks can differ. How Networks Can Be Connected (a) Two Ethernets connected by a switch. (b) Two Ethernets connected by routers. Concatenated Virtual Circuits Internetworking using concatenated virtual circuits. Connectionless Internetworking A connectionless internet. Tunneling Tunneling a packet from Paris to London. Tunneling (2) Tunneling a car from France to England. Internetwork Routing (a) An internetwork. (b) A graph of the internetwork. Fragmentation (a) Transparent fragmentation. (b) Nontransparent fragmentation. Fragmentation (2) Fragmentation when the elementary data size is 1 byte. (a) Original packet, containing 10 data bytes. (b) Fragments after passing through a network with maximum packet size of 8 payload bytes plus header. (c) Fragments after passing through a size 5 gateway.