Overview of Computer Science CSC 101 — Summer 2011 LANs I t Internetworking t ki Lecture 20 — August 2, 2011 Announcements • Final Exam next Tuesday (8/9/11). – This Room – 2pm – 5pm • • • • Final Review on Mondayy – 8/8/11 Quiz #3 on Friday Lab #7 Today WA#7 due Today 2 Objectives • • • • • Classifying networks by switching LAN Topologies Methods for controlling LAN communications How LANs are extended and interconnected Internetworking 3 1 Networks Classified by Switching • Nodes communicate with each other through a network using shared, common paths – Messages pass through intermediate nodes between the sender and receiver – Messages must follow a correct route to reach the destination • The method used for routing is called switching • There are two major switching techniques – Circuit switching – Packet switching 4 Circuit Switching • In circuit switching, a continuous connection or circuit is created between sender and receiver • Ordinary telephone connections are made by circuit switching sender receiver 5 Packet Switching • In packet switching, the message is broken up into separate data packets, each addressed to the destination • Each packet travels separately over any available connection to the destination (different packets may take different routes) • The receiving node reassembles the message at the destination 6 2 LAN Topologies • Topology – The layout of a network • Logical and geometric interconnections between nodes • Potential paths of communication between nodes – Many topologies possible, with pros and cons • • • • Point-to-point Star Bus Ring 7 Point--to Point to--Point Topology • Point-to-point is the simplest topology – Each node connected to some of its neighbors – Needs a control mechanism • The Internet uses TCP/IP (More on that later) – While this works for the Internet, it requires too much overhead for a successful LAN (small scale) implementation 8 Point--to Point to--Point Topology 9 3 Point--to Point to--Point Topology • The “One Laptop Per Child” program (www.laptop.org) is using a point-to-point topology they call “mesh networking” – Each laptop wirelessly connects with others in range – If one laptop is connected to the Internet, there is a pathway for Internet traffic to all laptops in the mesh 10 Star Topology • All nodes are connected to a single hub HUB 11 Star Topology • Advantages • Disadvantages – Simple to implement – Easy to add new nodes – Not subject to failure due to a single node or cable failure – Network can expand by ‘daisy-chaining’ hubs HUB – Number of nodes limited to size of hub – Cabling must all feed back to the hub – Hub failure is catastrophic – Hub can be a bottleneck for data throughput HUB 12 4 Bus Topology • Single transmission medium (‘bus’ or ‘backbone’) • Nodes connected to the bus by ‘taps’ 13 Bus Topology • Advantages – – – – • Disadvantages Simple to implement Shorter cabling Easy to add new nodes Not subject to failure due to a single node failure – Length of backbone limited – Failure of the backbone cable is catastrophic – Cannot expand network through daisy-chaining 14 Ring Topology • All nodes connected in a ring (‘token ring’) – Nodes have a specified order on the ring • Once very common for LANs, now not used as much 1 6 2 5 3 4 15 5 Ring Topology • Advantages • Disadvantages – Originally higher speed than possible with other yp types • First network type to reach 10 Mbps – Exactly predictable delay rate • Good for high-speed, demanding requirements – Size of ring limited – Cannot expand network through daisy daisy-chaining chaining – Failure of the backbone cable is catastrophic – Failure of any single node is also catastrophic • Adding or removing nodes is difficult 16 Media Access Control (MAC) • Determines how nodes make use of the underlying medium • Not all nodes can talk at once! A protocol is needed d d tto actt as the th ‘traffic ‘t ffi cop’’ • Two MAC protocols are in common use in LANs – Ethernet MAC – Token passing MAC • These are both packet-switching protocols – Data is broken into discrete packets which are sent individually and reassembled at the destination 17 Ethernet MAC • Commonly used in star and bus topologies • Much like a conversation at a dinner table – – – – Not everyone can talk at once If someone is talking, politely wait until they’re done When there is a lull in the conversation, you can speak If two people happen to try to talk at the exact same time (a ‘collision’), both stop and wait a moment to see if they can talk (‘random backoff’) – You address you comments to one person, even though everyone can hear you • Ethernet follows this paradigm • Leads to ‘orderly chaos’ – very efficient for low to medium load networks 18 6 Token Passing MAC • Typically used in a ring topology • Very methodical protocol – A ‘token’ (a small data packet) is passed around the ring i continuously ti l (like (lik a baton b t in i a relay l race)) – When a node receives the token, it can attach some data to the token, then passes it to the next node – When a node receives the token, it looks to see if any attached data is addressed to it; if so, it keeps it – Any attached data addressed to someone else is simply passed on with the token to the next node – And so on, ad infinitum 19 MACs Compared • Ethernet and Token Passing MACs are both packet-switched – Messages are broken into packets which travel independently • Ethernet packets are broadcast onto the LAN – Every node on the LAN sees every packet – Nodes N d iignore packets k t nott addressed dd d to t them th – When two nodes send packets simultaneously they interfere with each other – called a collision • The packets don’t actually “collide” or “cross” each other; rather they overlap like two people talking simultaneously • Token passing MAC avoids collisions, but has more overhead • Token passing MAC delivers packets within a known delay time, while Ethernet’s delivery delay is random – Token passing MAC is thus better for time-critical uses such as high traffic volume between connected servers 20 Extending LANs • LANs are great for small, local networks • Need to be able to tie these local networks together into larger groupings – Larger L LANs, LAN MAN MANs, WANs WAN • Interconnecting LANs (possibly of different types) is called internetworking • Local networks are usually part of larger networks – An internet – The Internet • How do we interconnect these local networks? 21 7 Interconnecting LANs • A LAN can sometimes be extended by simply daisy-chaining hubs together – Only works for star-topology (hub-based) LANs – Hubs must be physically close together • When that is not possible, various devices are available for connecting LANs together – – – – Repeaters Bridges Routers Gateways 22 Repeater • Useful for: – Linking together hubs that are in different locations – Extending a LAN beyond the maximum cable length • All data is passed ((“repeated”) repeated ) between the two LANs – The extended LAN acts identically to a single LAN HUB REPEATER HUB 23 23 Bridge • Connects two LANs of compatible type – Only data for the ‘other’ LAN crosses the bridge – Lets LANs act together like a larger LAN while still maintaining some individual character HUB BRIDGE HUB 24 24 8 Switch • Can connect several LANs of compatible type – Switch only sends data to the correct destination LAN HUB SWITCH HUB HUB 25 25 Router • Can connect compatible or incompatible LANs – Translates packets between incompatible network types – Knows the best route to send packets to the right destination HUB Access Point ROUTER HUB 26 26 Gateway • Used to connect LANs to WANs and the Internet – Very effective at routing traffic between internets Access Point HUB ROUTER ROUTER ROUTER HUB BRIDGE HUB SWITCH HUB ROUTER HUB The Internet HUB BRIDGE HUB GATEWAY 27 27 9 Firewalls • Works together with a gateway to protect a network by filtering data traffic – Access control policies determine what is permitted or denied through the gateway 28 28 WFU Network • The campus network infrastructure was completely upgraded in 2003-2004 • The campus network as of Spring 2003 – Single gateway to the Internet – Five main switches – lack of redundancy • The “Next Generation Network” as of Fall 2004 – Dual Internet gateways – Extensive redundancy – Complete campus wireless coverage included 29 Internetworking • LANs are great for covering small areas • But, in the world there are – – – – Manyy types yp of LANs and WANs Many types of hardware and software Many languages Large distances • How can all these separate networks be connected effectively, efficiently, seamlessly, transparently? 30 10 Internetworking • Internetworking enables seamless communication across disparate networks by using six special techniques: 11. Packet-switched Packet switched data transport system 2. Special protocols • TCP – transmission control protocol • IP – internet protocol 3. Dedicated internet routers send packets in the right directions 4. DNS – the domain name system 5. Client/server model allows asynchronous transactions 6. A layered architecture 31 31 Packet Switching and Datagrams • Data is broken up into packets (datagrams) • Each packet travels via whichever path is best at the time – Packets from the same message probably travel different paths • Receiver reassembles the message from packets received FINISH START THE INTERNET 32 Packet Switching and Datagrams • Data is broken up into packets (datagrams) • Each packet travels via whichever path is best at the time – Packets from the same message probably travel different paths • Receiver reassembles the message from packets received 33 11 Packet Switching and Datagrams • Two processes are necessary to ensure that this works 1. Managing the process of breaking the data into packets and reassembling them at the destination 2. Addressing and routing the packets through an internet • TCP (the Transmission Control Protocol) – • – • • Manages creating and reassembling packets IP (the Internet Protocol) Manages the addressing and routing These are usually referred-to together as TCP/IP They work independently from the underlying network technologies (hardware) 34 TCP – Transmission Control Protocol • Each packet includes sender’s and receiver’s IP address • Each packet also includes a sequence number so that packets can be reassembled the in the correct order – Packets travel different paths so often arrive out out-of-order of order – Receiver sends back an ACK (acknowledgement) for each packet correctly received – Receiver sends back an NAK (negative acknowledgement, or resend request) for each packet received damaged • Sender re-sends that packet – If packet is lost, sender notices that it doesn’t get either an ACK or a NAK before some timeout period • Sender resends that packet • TCP simulator (today’s lab) demonstrates this procedure35 IP – Internet Protocol • Every node on every network of the Internet is assigned a unique IP address – Four 3-digit numbers separated by periods • E.g. 18.7.22.69 – Our laptops are assigned temporary IP addresses each time we boot • DHCP (Dynamic Host Configuration Protocol) • whoami • IP not only specifies IP addresses, but also the routing of data from one IP address to another 36 12 Routing • Internet routers are specialized gateways that pass data between the various networks that make up the Internet • Routers R t maintain i t i routing ti tables t bl that th t help h l them th decide the best direction to send data to get it to its destination • These routing tables are constantly updated between the routers to reflect changing network conditions 37 DNS – Domain Name System • Hierarchical IP address numbers are very efficient for computers to use… • …But, they’re difficult for humans to use – Hard to remember p – Error prone – Non-intuitive • The Domain Name System (DNS) translates between IP numbers and domain names – Examples: www.wfu.edu Ù 152.17.48.77 www.amazon.com Ù 72.21.206.5 • Domain name servers keep track of this info • Can find out information about a domain name from a whois server such as whois.net or arin.net/whois 38 Client/Server Model • Most internet traffic uses a client/server model – Client nodes request a resource – Server nodes provide resources • Allows for asynchronous communication – Not everything needs to happen in real time • What would happen if a large number of users clicked the ‘Buy It!’ button simultaneously? – Requests can be processed in the order received • Analogies: Telephone call – synchronous communication IM – asynchronous communication 39 13 Risks of Digital Information • “In this age of advanced technology, thick walls and locked doors cannot guard our privacy or safeguard our personal freedom.” – Former F P President id L Lyndon d B. B Johnson, J h F b 77, 1968 Feb. • “The American government can stop me from going to the US, but they can’t stop my virus.” – An anonymous virus creator • “Every system has vulnerabilities. Every system can be compromised.” – Peter G. Neumann, author 40 14