A Client Server Transaction 15 213 Most network applications are based on the clientclient server model The course that gives CMU its Zip Internetworking November 9 2007 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 Topics 1 Client sends request Client server programming model Networks Internetworks Global IP Internet Client process 4 Client handles response z IP addresses z Domain names z Connections Server process Resource 2 Server handles request 3 Server sends response Note clients and servers are processes running on hosts can be the same or different hosts 15 213 F 07 2 lecture 21 ppt Computer Networks Lowest Level Ethernet Segment A network is a hierarchical system of boxes and wires organized by geographical proximity Ethernet segment consists of a collection of hosts connected by wires twisted pairs to a hub hub Spans room or floor in a building SAN System Area Network spans cluster or machine room Switched Ethernet Quadrics QSW LAN local area network spans a building or campus host Ethernet is most prominent example host 100 Mb s WAN wide area network spans country or world host 100 Mb s hub Typically high speed point to point phone lines ports An internetwork internet internet is an interconnected set of networks Operation The Gobal IP Internet uppercase I is the most famous example of an internet lowercase i Every host sees every bit Let Let s see how we would build an internet from the ground up Note Hubs are on their way out Bridges switches routers became cheap enough to replace them means no more broadcasting 15 213 F 07 3 Conceptual View of LANs Spans building or campus For simplicity hubs bridges and wires are often shown as a collection of hosts attached to a single wire Bridges cleverly learn which hosts are reachable from which ports ports and then selectively copy frames from port to port A B host host host host X bridge hub 100 Mb s host host 100 Mb s host host host hub 100 Mb s 1 Gb s hub 15 213 F 07 4 Next Level Bridged Ethernet Segment host Each Ethernet adapter has a unique 48 bit address Hosts send bits to any other host in chunks called frames Hub slavishly copies each bit from each port to every other port bridge Y 100 Mb s host host host hub host host C 5 15 213 F 07 6 Page 1 15 213 F 07 Logical structure of an internet Next Level internets Multiple incompatible LANs can be physically connected by specialized computers called routers routers host router The connected networks are called an internet internet router host router router host host host host host router host LAN 1 router LAN 2 router WAN router router WAN Ad hoc interconnection of networks z No particular topology z Vastly different router link capacities LAN 1 and LAN 2 might be completely different totally incompatible LANs e g Ethernet and Wifi 802 11 T1 links DSL Send packets from source to destination by hopping through networks z Router forms bridge from one network to another z Different packets may take different routes 15 213 F 07 7 15 213 F 07 8 The Notion of an internet Protocol What Does an internet Protocol Do How is it possible to send bits across incompatible LANs and WANs 1 Provides a naming scheme Solution protocol software running on each host and router smooths out the differences between the different networks 2 Provides a delivery mechanism destination addresses z Payload contains data bits sent from source host TCP IP is the protocol for the global IP Internet 15 213 F 07 9 Host A Host B client server protocol software protocol software LAN1 adapter LAN2 adapter data internet packet 2 data PH FH1 LAN1 frame 3 data PH FH1 LAN1 data 7 data PH FH2 6 data PH FH2 LAN2 adapter LAN2 frame 4 11 Router LAN1 adapter 8 data PH FH1 data protocol software 15 213 F 07 10 MCI WorldCom UUNET Global Backbone Transferring Data Over an internet 1 An internet protocol defines a standard transfer unit packet Packet consists of header and payload z Header contains info such as packet size source and Implements an internet protocol i e set of rules that governs how hosts and routers should cooperate when they transfer data from network to network 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 LAN2 PH FH2 5 Source Boardwatch com 15 213 F 07 12 Page 2 15 213 F 07 Other Issues Global IP Internet We are glossing over a number of important questions Most famous example of an internet What if different networks have different maximum frame sizes segmentation How do routers know where to forward frames Based on the TCP IP protocol family z Provides basic naming scheme and unreliable delivery capability of packets datagrams from host to host How are routers informed when the network topology changes What if packets get lost TCP Transmission Control Protocol z 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 interface interface 15 213 F 07 14 Naming and Communicating on the Global IP Internet Hardware and Software Org of an Internet Application Client UDP Unreliable Datagram Protocol to process 15 213 F 07 Internet client host z Uses IP to provide unreliable datagram delivery from process These and other questions are addressed by the area of systems known as computer networking 13 Original Idea Every node on Internet would have unique IP address No secrecy or authentication Internet server host User code IP Internet protocol z Everyone would be able to talk directly to everyone Server z Messages visible to routers and hosts on same LAN Sockets interface system calls z Possible to forge source field in packet header TCP IP Kernel code TCP IP Doesn Doesn t always work that way Hardware interface interrupts Network adapter Hardware and firmware We ll talk about some evolution later today Network adapter Global IP Internet 15 213 F 07 15 15 213 F 07 16 A Programmer s View of the Internet 1 IP Addresses 1 Hosts are mapped to a set of 3232 bit IP addresses addresses 3232 bit IP addresses are stored in an IP address struct 128 2 203 179 2 The set of IP addresses is mapped to a set of identifiers called Internet domain names names z E g the port numbers used in identifying an Internet connection 128 2 203 179 is mapped to www cs cmu
View Full Document