Carnegie MellonIntroduction to Computer Systems15‐213, fall 200920thLecture, Nov. 4thInstructors:Majd Sakr and Khaled HarrasCarnegie MellonToday Internetworking Networks Global IP InternetCarnegie MellonA Client‐Server TransactionClientprocessServerprocess1. Client sends request2. Server handlesrequest3. Server sends response4. Client handlesresponseResource Most network applications are based on the client‐server model: A server process and one or more client processes Server manages some resource Server provides service by manipulating resource for clients Server activated by request from client (vending machine analogy)Note: clients and servers are processes running on hosts (can be the same or different hosts)Carnegie MellonHardware Organization of a Network HostmainmemoryI/O bridgeMIALUregister fileCPU chipsystem busmemory busdisk controllergraphicsadapterUSBcontrollermouse keyboard monitordiskI/O busExpansion slotsnetworkadapternetworkCarnegie MellonComputer Networks A network is a hierarchical system of boxes and wires organized by geographical proximity SAN (System Area Network) spans cluster or machine room Switched Ethernet, Quadrics QSW, … LAN (Local Area Network) spans a building or campus Ethernet is most prominent example WAN (Wide Area Network) spans country or world Typically high‐speed point‐to‐point phone lines An internetwork (internet) is an interconnected set of networks The Global IP Internet (uppercase “I”) is the most famous example of an internet (lowercase “i”) Let’s see how an internet is built from the ground upCarnegie MellonLowest Level: Ethernet Segment Ethernet segment consists of a collection of hosts connected by wires (twisted pairs) to a hub Spans room or floor in a building Operation Each Ethernet adapter has a unique 48‐bit address (MAC address) Hosts send bits to any other host in chunks called framesHub slavishly copies each bit from each port to every other port Every host sees every bit Note: Hubs are on their way out. Bridges (switches, routers) became cheap enough to replace them (means no more broadcasting)host host hosthub100 Mb/s100 Mb/sportCarnegie MellonNext Level: Bridged Ethernet Segment Spans building or campus Bridges cleverly learn which hosts are reachable from which ports and then selectively copy frames from port to porthosthost host host hosthub hubbridge100 Mb/s 100 Mb/shosthosthub100 Mb/s 100 Mb/s1 Gb/shosthost hostbridgehosthosthubABCXYCarnegie MellonConceptual View of LANs For simplicity, hubs, bridges, and wires are often shown as a collection of hosts attached to a single wire:host host host...Carnegie MellonNext Level: internets Multiple incompatible LANs can be physically connected by specialized computers called routers The connected networks are called an internethost host host...host host host...WAN WANLAN 1 and LAN 2 might be completely different, totally incompatible (e.g., Ethernet and Wifi, 802.11*, T1‐links, DSL, …)router router routerLANLANCarnegie MellonLogical Structure of an internet Ad hoc interconnection of networks No particular topology Vastly different router & link capacities Send packets from source to destination by hopping through networks Router forms bridge from one network to another Different packets may take different routesrouterrouterrouterrouterrouterrouterhosthostCarnegie MellonThe Notion of an internet Protocol How is it possible to send bits across incompatible LANs and WANs? Solution: protocol software running on each host and router smooths out the differences between the different networks Implements an internet protocol (i.e., set of rules) governs how hosts and routers should cooperate when they transfer data from network to network TCP/IP is the protocol for the global IP InternetCarnegie MellonWhat Does an internet Protocol Do? Provides a naming scheme An internet protocol defines a uniform format for host addresses Each host (and router) is assigned at least one of these internet addresses that uniquely identifies it Provides a delivery mechanism An internet protocol defines a standard transfer unit (packet) Packet consists of header and payload Header: contains info such as packet size, source and destination addresses Payload: contains data bits sent from source hostCarnegie MellonLAN2Transferring Data Over an internetprotocolsoftwareclientLAN1adapterHost ALAN1data(1)data PH FH1(4)data PH FH2(6)data(8)data PH FH2 (5)LAN2 frameprotocolsoftwareLAN1adapterLAN2adapterRouterdata PH(3) FH1data PH FH1(2)internet packetLAN1 frame(7)data PH FH2protocolsoftwareserverLAN2adapterHost BPH: Internet packet headerFH: LAN frame headerCarnegie MellonOther Issues We are glossing over a number of important questions: What if different networks have different maximum frame sizes? (segmentation) How do routers know where to forward frames? How are routers informed when the network topology changes? What if packets get lost? These (and other) questions are addressed by the area of systems known as computer networkingCarnegie MellonToday Internetworking Networks Global IP InternetCarnegie MellonGlobal IP Internet Most famous example of an internet Based on the TCP/IP protocol family IP (Internet protocol) : Provides basic naming scheme and unreliable delivery capabilityof packets (datagrams) from host‐to‐host UDP (Unreliable Datagram Protocol) Uses IP to provide unreliable datagram delivery from process‐to‐process TCP (Transmission Control Protocol) Uses IP to provide reliable byte streams from process‐to‐process over connections Accessed via a mix of Unix file I/O and functions from the sockets interfaceCarnegie MellonHardware and Software Organization of an Internet ApplicationTCP/IPClientNetworkadapterGlobal IP InternetTCP/IPServerNetworkadapterInternet client host Internet server hostSockets interface(system calls)Hardware interface(interrupts)User codeKernel codeHardwareand firmwareCarnegie MellonBasic Internet Components Internet backbone: collection of routers (nationwide or worldwide) connected by high‐speed point‐to‐point networks Network Access Point (NAP): router that connects multiple backbones (often referred to as peers) Regional networks: smaller backbones that cover smaller geographical areas (e.g.,
View Full Document