* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Limitations of Layer2 switching
Point-to-Point Protocol over Ethernet wikipedia , lookup
Distributed firewall wikipedia , lookup
TCP congestion control wikipedia , lookup
Network tap wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Internet protocol suite wikipedia , lookup
Deep packet inspection wikipedia , lookup
Computer network wikipedia , lookup
Airborne Networking wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Packet switching wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Layer 3 The Network Layer Slides adapted from Tanenbaum Purpose of Internetworking • As we have seen, Layer 1 and Layer 2 networks are satisfactory for LAN level networks – – Bridges (layer2 switches) are used to match different Layer 2 protocols Bridges can also create Virtual LANs (VLANS) by grouping Hosts on different LAN segments through MAC level addressing. Limitations of Layer2 switching • Even with complex bridges, NIC cards (hosts) never know the MAC address of all their possible destinations. – – • • Frames get broadcast to everyone on the segment Bridges filter somewhat, but may not know the exact host that should receive the Ethernet Frame (ends up wasting lots of bandwidth) Layer 2 “Virtual LANs” (VLANs) only partially solve this. Layer 2 networks don’t scale. – Complexity increases faster than number of nodes There’s got to be a better way. Network Layer Design Issues • • • • • 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 The environment of the network layer protocols. fig 5-1 Implementation of Connectionless Service Routing within a diagram subnet. Key point: Packet’s destination address is used to determine the required output port. Routing tables can change over time and packets can take different routes between the same two routers. Implementation of Connection-Oriented Service Routing within a virtual-circuit subnet. Each switch looks at VCI and input port to determine the output port. Does not look at destination. This is like X.25, Frame and ATM VC switching that we saw before. 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) Conflict between fairness and optimality. If traffic flows between A and A’, B and B’, and C and C’, the utilization of the network will be good, but flow between X and X’ will be severely restricted. Fairness must often be imposed at the expense of overall utilization. Optimality Principle Optimality principle: – This means: – Given the final destination, routers only need to know the optimal route to the next router. This entails a lookup-table correlating destination address and output port. – 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. The following figure: – – – Shows the sink tree for destination “B” There would be different sink trees for each final destination. Note there are no loops in this tree. The Optimality Principle (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. Shortest path routing Algorithms that efficiently compute the shortest path – – Dijkstra Bellman Another approach -- flooding may be used to send packets to all adjacent routers. – Packets that arrive at desired destination first are considered to have taken the “best”route. (this route is then chosen for subsequent packets.) Distance Vector Routing In a network of routers, the trick is to Adapt these algorithms to run in a distributed fashion. – – Each router only needs to know who it’s connected to. Doesn’t know the complete topology of the entire network. Defining the “cost” of each link is an important consideration – – – – Delay?? Bandwidth?? Real-cost?? Queue-depth at input port of next router?? Distance Vector Routing Each node builds up route tables with best output port and cost for all destinations of the network – – Looks at each possible route to every destination and selects lowest Creates and stores the table locally The “Count to Infinity” problem exists with distance vector routing – In following slide J receives vectors from each neighbor Also receives cost to those immediate neighbors Each node is slow to realize a node has failed. Split-horizon is a modification to alleviate this problem – Still doesn’t work perfectly RIP is an example of Distance Vector Routing Protocol 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, these vectors are the hops to A In (a), the router A has just come up, B learns then C, etc. (b) Shows what happens when A fails, each node is very slow to realize the cost to A is INFINITY. Link State Routing Each router must do the following: Discover its neighbors, learn their network address. 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. Learning about the Neighbors (a) Nine routers and a LAN. (b) A graph model of (a). Measuring Line Cost A subnet in which the East and West parts are connected by two lines. If link status is reported based congestion and distance, oscillations can occur. CF may be the best route so all traffic is moved over there. Then EI becomes a much better route, etc., etc., etc. Building Link State Packets With link-state routing, packets are created by each node that describe its adjacent links. – – The AGE of the update and the sequence number are also included. This allows changes in the network to be considered. (a) A subnet. (b) The link state packets for this subnet. Distributing the Link State Packets The packet buffer for router B in the previous slide Flooding is used to distribute link-state packets. As the linkstate packets are flowing around the network, they must be managed. New ones are used to update and also sent on to adjacent nodes. Old ones are ignored and not forwarded. Using both Age and Sequence # prevents problems when routers reboot and lose sequence. Hierarchical Routing Hierarchical routing. This type of architecture allows the routing protocols to scale. For example, all the flooded Link-state messages don’t have to propagate outside the areas. 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 Basic Queuing Theory Arrivals Servicing In a queue, things stack up as they are waiting to be serviced – – Infinite length queues where the service rate is greater than the arrival rate produce a stable system. The average waiting time for a M/M/1 queue is well known In reality, things are different – Arrivals are not exponentially distributed • – Data tends to be more bursty and “self-similar” (what is this?) Real Queues can’t hold infinite number of messages (not enough memory, too much delay) Multiple queues and priorities are implemented for QoS Congestion When queues in the Routers begin to be congested, measures must be taken to manage this. Why not just let the queues overflow?? – – – – Often this makes the problem worse Flow control algorithms will try to resend further compounding the problem Delay in the network would be maximum Longer queues introduce more chance for Jitter Lots of work has been done on congestion management Congestion When too much traffic is offered, congestion sets in and performance degrades sharply. General Principles of Congestion Control Monitor the system . – detect when and where congestion occurs. Pass information to where action can be taken. Adjust system operation to correct the problem. Congestion Prevention Policies Policies that affect congestion. 5-26 From “Congestion control in Computer Networks, Issues and Trends”, Raj Jain, IEEE Network Magazine May/June 1990. Congestion prevention policies Layers 2-4 are all involved in congestion control and prevention – – Bits errors at layer 1 can even become an issue Interaction between the layers can be a problem Data Link Layer – – – Can request info too quick Can send too many (or not enough) ACKs Etc. Network Layer – – Responsible for Queueing and routing the data through large network Lots of potential to introduce delay Transport Layer – – TCP Window size can be important Flow Control Congestion Control in Virtual-Circuit Subnets (a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B. With VC based networks, it may be possible to dynamically set up a new VC that takes an uncongested route. Hop-by-Hop Choke Packets Choke packets are send in the reverse direction to slow down the transmitter (a) A choke packet that affects only the source. (b) A choke packet that affects each hop it passes through. Jitter Control (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 How stringent the quality-of-service requirements are. 5-30 Different applications need different QoS characteristics to function well. Buffering Smoothing the output stream by buffering packets. A major factor in packet networks is variance in the time each packet takes to traverse the network. This jitter can be removed by playout buffers but they introduce additional delay. The Leaky Bucket Algorithm (a) A leaky bucket with water. (b) a leaky bucket with packets. Variants of the the leaky bucket are used in protocols besides Frame Relay – Often combined with the TOKEN BUCKET 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. Admission Control An example of flow specification. 5-34 Packet Scheduling Fair queuing is used so that longer frames don’t take an unfair amount of capacity. Here, A is 6 units long and Frame C is only 2 units long. C should get completely sent first. (a) A router with five packets queued for line O. (b) Finishing times for the five packets. Reserving capacity in Layer 3 networks For real-time streaming media applications, the required bandwidth can be significant Packet networks may eventually be used to distribute movies and things cable is providing today Lots of these applications are Multicasting – There are sources sending the same content to many receivers RSVP, Resource reSerVation Protocol is a well-known protocol for this scenario – – – RSVP support the ability to RESERVE bandwidth in a packet network It’s important that the network have a way to enforce that reservation How does know whether it can Admit the request? (Admission Control?) RSVP-The ReSerVation Protocol (a) A network, (b) The multicast spanning tree for host 1. (c) The multicast spanning tree for host 2. RSVP Note that when two sources subscribe to the same source, links that they share in common don’t need to reserve 2X the amount of bandwidth. RSVP has evolved into a popular mechanism for receivers to request resources in a network. It is an entire Protocol and will be discussed in more detail later during the MPLS discussion. 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. Expedited Forwarding is a concept where Packet networks can achieve very high performance because the network is lightly loaded. This can be accomplished by building a separate network or carving a “virtually” separate network within existing switches Just like the HOV lane on 635 Assured Forwarding A possible implementation of the data flow for assured forwarding. Often, different applications are classified before they enter the network. An edge router than breaks them out to separate queuing systems based on their class. It may also shape the traffic to reduce congestion VOIP may get high priority Email could get the lowest 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 Some of the many ways networks can differ. 5-43 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. Here, the internetworking is done by just forwarding Datagrams. Packets might take different routes. Tunneling Tunneling a packet from Paris to London. Tunneling makes the network seem to be all one Layer 3 cloud. The Multiprotocol routers likely have either Frame or ATM interfaces Tunneling (2) Tunneling a car from France to England. Internetwork Routing (a) An internetwork. (b) A graph of the internetwork. Note that 1,2,3,4 and 5 are actually networks themselves Internetwork routing (cont) Note in previous slide This is a hierarchical network i.e. – Within the subnetworks there is separate routing occurring An ‘exterior’ routing protocol is used at the coarse level. Within each subnetwork, an ‘interior’ routing protocol is used. (RIP-- distance vector or OSFP-- link-state) – These subnetworks could be service providers, enterprises, or regions. Essentially, this can be considered a rough model of the Internet. – – The internet is a loose coalition of several different networks. Not really any centralized control Typical Internet node Layer3 Layer 2 Layer 1 or 2 Layer 2 Frame Relay or ATM connections to POPs or large customers Layer 3 Layer 2 ATM switch Layer 1 Backbon e Router Layer 0 SONET LTE OXC WDM transponder ATM switch Backbon e Router Backbon e Router FDDI ring Backbon e Router ATM switch Frame Relay or ATM connections to POPs or large customers Source: RHK 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. 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 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. The IP Protocol (2) Some of the IP options. 5-54 IP Addresses IP address formats. IP Addresses (2) Special IP addresses. Subnets A campus network consisting of LANs for various departments. Subnets (2) A class B network subnetted into 64 subnets. CDR – Classless InterDomain Routing A set of IP address assignments. 5-59 NAT – Network Address Translation Placement and operation of a NAT box. Internet Control Message Protocol The principal ICMP message types. 5-61 ARP– The Address Resolution Protocol Three interconnected /24 networks: two Ethernets and an FDDI ring. Dynamic Host Configuration Protocol Operation of DHCP. OSPF – The Interior Gateway Routing Protocol (a) An autonomous system. (b) A graph representation of (a). OSPF (2) The relation between ASes, backbones, and areas in OSPF. OSPF (3) The five types of OSPF messages. 5-66 Problems with Distance-Vector and Link-State Routing Neither distance-vector (RIP) nor link state (OSPF) protocols effective for exterior routing Distance vector and link state protocols assume all routers share common metric Priorities and restrictions may differ between ASs Flooding of link state information may become unmanageable Path Vector Routing Dispense with routing metrics Provide information about: – Which networks can be reached by given router – Which ASs must be crossed to get there No distance or cost element Routing information includes all Ass visited to reach destination – Allows policy routing BGP – The Exterior Gateway Routing Protocol (a) A set of BGP routers. (b) Information sent to F. Boarder Gateway Protocol (BGP) Allows routers (gateways) in different ASs to exchange routing information Messages sent over TCP – See next slide Three functional procedures – – – Neighbor acquisition Neighbor reachability Network reachability BGP v4 Messages Open – Start neighbor relationship with another router Update – Transmit information about single route – List multiple routes to be withdrawn Keepalive – Acknowledge open message – Periodically confirm neighbor relationship Notification – Send when error condition detected Neighbor Acquisition Neighbors attach to same subnetwork If in different ASs routers may wish to exchange information Neighbor acquisitionis when two neighboring routers agree to exchange routing information regularly – Needed because one router may not wish to take part One router sends request, the other acknowledges – Knowledge of existence of other routers and need to exchange information established at configuration time or by active intervention Neighbor Reachability Periodic issue of keepalive messages Between all routers that are neighbors Network Reachability Each router keeps database of subnetworks it can reach and preferred route When change made, router issues update message All BGP routers build up and maintain routing information BGP Message Formats Marker: – Reserved for authentication Length: – In octets Type: – Open, Update, Keepalive, Notification Neighbor Acquisition Detail Router opens TCP connection with neighbor Sends open message – Identifies sender’s AS and gives IP address – Includes Hold Time • As proposed by sender If recipient prepared to open neighbor relationship – Calculate hold time • min [own hold time, received hold time] • Max time between keepalive/update messages – Reply with keepalive Keepalive Detail Header only Often enough to prevent hold time expiring Update Detail Information about single route through internet – Information to be added to database of any recipient router – Network layer reachability information (NLRI) • List of network portions of IP addresses of subnets reached by this route – Total path attributes length field – Path attributes field (next slide) List of previously advertised routes being withdrawn May contain both Path Attributes Field Origin – Interior (e.g. OSPF) or exterior (BGP) protocol AS_Path – ASs traversed for this route Next_Hop – IP address of boarder router for next hop Multi_Exit_disc – Information about routers internal to AS Local_Pref – Tell other routers within AS degree of preference Atomic_Aggregate, Aggregator – Uses subnet addresses in tree view of network to reduce information needed in NLRI Withdrawal of Route(s) Route identified by IP address of destination subnetwork(s) Notification Message Error notification Message header error – Includes authentication and syntax errors Open message error – Syntax errors and option not recognised – Proposed hold time unacceptable Update message error – Syntax and validity errors Hold time expired Finite state machine error Cease – Close connection in absence of any other error Diagram for BGP Routing Information Exchange BGP Routing Information Exchange R1 constructs routing table for AS1 using OSPF R1 issues update message to R5 (in AS2) – AS_Path: identity of AS1 – Next_Hop: IP address of R1 – NLRI: List of all subnets in AS1 Suppose R5 has neighbor relationship with R9 in AS3 R9 forwards information from R1 to R9 in update message – AS_Path: list of ids {AS2,AS1} – Next_Hop: IP address of R5 – NLRI: All subnets in AS1 R9 decides if this is prefered route and forwards to neighbors The Main IPv6 Header The IPv6 fixed header (required).