New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Brennan Schmeler


Brennan Schmeler
GPA 3.93

David McDonald

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

David McDonald
Class Notes
25 ?




Popular in Course

Popular in Informatics

This 127 page Class Notes was uploaded by Brennan Schmeler on Wednesday September 9, 2015. The Class Notes belongs to INFO 341 at University of Washington taught by David McDonald in Fall. Since its upload, it has received 46 views. For similar materials see /class/192211/info-341-university-of-washington in Informatics at University of Washington.


Reviews for COMP NET & DIST APP


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/09/15
Packets amp Routers January 14 2003 341 Intro Objectives Sharing the Network vgag gacg mork reqmred everythmg to be sent as V maammwm Lama 5m DVD WM mm Wm M WWW Whamme asummeamtsew What Where a an ermr m the mudte Mme transmtssmr packets a of data What is a packet I Packets are chunks of data Consider a long letter to a friend Packets are binary data on a network Boundaries are arti cial Data often written in hexadecimal I Packets faCiIitate sharing the network I We ll use the term packet for as the most general way of describing data on a network Packets payload overhead I Payload the data itself I Each deVice that communicates on a network needs an address Media Access Cantrui address Other networks iike Token Ring also have MAC addresses Envelopes I Network hardware packet The hardware type defines what the native packet format what goes where and size will be we ll see Ethernet later In the case of Ethernet the basic Ethernet packet is called an Ethernet Frame I Sometimes the data in a packet is itselfa packet r Eg inside an Ethernet frame could be a TCPIP packet or an IPX packet Each of those higher level protocols may have their own overhead destination address source address payload error checking Looking inside envelopes I It is possible to look at packets using a category of software known as a packet snifferquot or packet analyzeiquot Rather than the NIC only grabbing data off the wire that is intended for it the software tells the NIC to run in promiscuous mode looking at all packets the w re I The software then takes the packets decodes them so they are easier to read than binary values and displays them Examples I Etherealtcpdump Brp s we age Npte prie wep page required many packets I Look at packets in tcpdump From these examples we see that network applications use the network differentl With a Wep page we pasieally retrieve all the data for that page at price arid then stpp ttPi ngn I One simple network application is called ping I ping sends a packet to a speci ed computer and waits for a response i The destinatipri epmpuier is speemed uslng an address like pc24lschoolmashlnglomedu pr 12820310024 Most versions of ping display the round tripquot time of the packe In ms Ping is a useful tool to determine if basic network connectivity is available although some hosts do not respond to ping requests due to denial of service issues Trying out ping Get to a command prompt Start Run type CMD then try ping wwwischdulmashinglumedu ping 4 wwwischudlmashinglumedu In caniinupusiy ping ping 7110000 wwwischuulwashinglunedu to specify a packet Size in Unix it is ping is to specify a packet Size I Notice that ping can also show if there was any pac e 055 Controlling Transmission Error I When sending packets no transmission mechanism is perfect I Signal attenuation I Interference Error Detection Methods EvenOdd Parity single bit Checksums crec l I Parity for Error Detection 39 Add an bit for every octet sent 01001101X aquot Odd Parity gt odd number of is 01001101 1 0 Even Parity gt even number of 15 010011010 I Commonly used in analog modems Checksum I Sum over the packet Suppose our packet was 77 6F 61 68 ltt Sum the hex digits and the carry 775Fai 681AF AFCarry AFM BO ti Packet with single byte checksum 77 6F 61 68 Mi Common for higher level transmission protocols eg ftp file transfers Cyclic Redundancy Check l CRC is amazingly easy to implement in hardware Almost all networks use CRC for error detection at the network level Ethernet It is often done bit serially in hardware Based on exclusive or xor operator Ethernet Frames Packets on specific hardware physicai iayer are Yrames in some networks all irarnes are the same size ATM Other networks use fixed siot transmission times Ethernet Frames however are variable in size Preamble a octets Header 6 nest 6 source 2 typeiength i4 octets ninnn 1 mm Payload 45 7 i500 octets CRC 4 octets c umn102030405nsmtnamsmAmEmC2723292A252C2D2E n Ethernet Frames I Frame size Minimum Size 652464 64 t Maxrmum Size 55215004 1518 Preambie a octets Header 6 dest 6 source 2 typetengtn 14 octets nun1nnnnnn nuninnnnnnm Payioad 4 6 e 150 n octets CRC 4 octets E n An Frame Type I Ethernet frames have space to specify a type The type indicates the content m the packet Common types inc ude nsnn IPv4 813937 813938 Noveii IPX BD39DS IBM SNA 3095 AppieTaiK 653959 Frame Reiay 0305 x 25 Eumpe Special Destination Addresses l Ethernet has special addresses destination addresses specificfunctiunaiily I MultiCast it The ieasl significant bit 01 the first byte set 101 r oomnzraoacareguraraddress mmnzrsoaca muiticast address I Broadcast rt FFFFFFFFFFFF Multicast I A multicast is a group address that multiple interfaces can be con gured with software to receive Often used with video applications disk cloning software Any aooiication that may use a s oandWidth and rnuitioie deVices ignificant portion ot ed to re at the same time he ceive the data Where a unicast to each deVice separately wouid oe too oandWidth intensive Broadcast I Variation on the Multicast concept every device r ceives these pac ets sed oy sorrie aooiications tor resource discovery or identitication Apple falk example s y r r address ARP 7 Address Resoiution Protodol which we will discuss in more detaii later o Bridges and sWitches isoiate norrnai trattic to indiViduai segments however they pass aii oroadcast packets iviuitipie LANs mnnected togetherWith b 01 a multiple miiision domains but asingie broadcast domain BroadcastMulticast How Where tha I Broadcast and Multicast are so important tthe concept eXists at multiple layers in the network Hardware in Ethernet and other networks 0 Software in TCP as we ll see 0 ApplicationProtocol speci c The ch0ice of where and how is a software architecture ch0ice that can be faCiIitated With hardware support How do we hook up a bunch of machines I Maybe we could just use switches What if it got really big I What are the limits of this design Problems with huge switched networks I Physically this looks to be hierarchical but it is not Lugicaiiy tne tuiiy sWitcned design is a al addressing space I Every switch needs to Know exactly what addresses eXisI on each D Limitation is memory 7 tnetaoiesget too big The broadcast domain may be tau large 7 tau many broadcasts an the network cause poor performance Easy to inadvertentiy setup loops that cause broadcast storms that cumpieteiy saturate the network Sorn e sWitcn es su pport tne span ning tree aigoritnm tnat uses a m uiticast ad dress between sWitcnes so tnat tne sWitcnes tn emseiyes can snut on ports tnat oouio cause a loop Routers Routers are special equipment helps traffic control tne whote wortd rs not Etnernet Routers often store and forward packets Routers MrmmaHy routers nave two Nlos wmcn are usuaHy oaHed mterfaoesquot mstaHed Eacn mterfaoe connects to a drtterent network or LAN Routers can rnterconnect drtterent types ot networks tor exampte a amt a FDDI rntertace 3H m tne same router Routers examme pockets 7 Tney determrne wnat packets shoum stay tocat to a panrcutar network segment and wmcn need to cross s ma k e data rnto druerent tram r exa e Token ang trames can be up to 4500 bytes Etnemet rrames 1500 b tes e a router must but tne dorrect envetopes around tne data so rt can be moved between druerent network types 7 Broadcasts DO NOT pass tn rougn routers 7 c g2 lt lt E m a w a 8 8 Routers and large networks Whtte rt rs posstbte to buttd targe networks usrngyustswrtcnes tradmonatt aurrrty to oetter Contrut tramc auu tnerr ne work tyoes Routers noweyer are mucn more expensrye Routers nave to understand tne mgner tevet rotomts tn ey don t Just use MAC addresses so tney must nave ast CPUs Even tne rastest router may not be as last as a LAN swrtcn srnce tne swrtcnes job rs mucn stmpter so a router based network mum potentrauy be stowermarv aswrtcned b ed network Distinction I SWitched LAN vs Packet SWitched Network Previously we talked about LAN switches and how they can help with congestion LAN switches level 2 devices Now we re talking about packet switching in general routers perform packet switching Routers level 3 devices The term switched means different things in different contexts The Role of Routers l The role of routers in a network 5 Traffic cop Connect different types of networks I How is this done 4 First a simple packet sWitching network A Small Abstract Network SANet I SANet is not a real network just a small example to faCiIitate some networking ncepts I SANet is composed of computers and routers I SANet has packet structure and numerous possible interconnection topologies SANet Packets SANex has a ame smmmre composed 01 Checksum Address Smmmre R omer 1 max Mach1ne1ome0pon 1 omex macmneD Pacm Svumure D 1 Source Pay1oau1somexs 0 0101 0401 0101 0401 0402 0403 SANet RouterPacket Switch M 2 n M Swnch 02 Rome mm and each pen Pacm Bu er can smre a law packem p01 p02 p00 004 Finding a path 0101 0401 0101 0401 0402 0403 Routing Packets SANet I SANet addressmg is an example of hierarchical addressm N The address tells you something about the struc ure of the network I Next Hop 39 Examine the rst part of the address Table lookup determines where the packet is en I But how is a route determinedfound Graph Theory Networks as Graph Theory l Networks are a concrete representation of mathematical graph theow I In graph theory a graph is I nodes N n1n2n3n4 nquot I edges E e1 e2 e3 e4 e I a function determining edge incidence Graphs I A graph of the SANet architecture nodes N 1234 edges E e1 e2 e3 eA Weighted Graphs I A weighted graph is one where the edges have some weight or value associated with them I Networks have various edge weights r TransmiSSion speed i TransmiSSion latency is Link live Network Graph Algorithms I Given aweighted graph Minimum Spanning Tree MST Eiirninate Cycies in a graph Used in inteiiigent sWitenes and routers Reiated Distributed Spanning Tree DST I Shortest path Used in ruuters to deterrnine the shortest ruute tar deiivenng a packet A Basic Problem I Loops in a network can be problematic nSider a small SWitched network connected like this Why might you want to connect switches together like this7 What do you think could go wrong with croadcast tra c 7 Good and Bad Looos in networks can oe good things in that they allow tor redundancy Bot due to the possibility ot oroadcast storms they are a orooiem SDluIanquot Provid a mechanism that allows switches to adapt to network topology changes so they can learn the state or the network remove any loops that are present and then change on the ny or adapt it needed Noettervtaster connemtm may become available A link could go dwm Cables could be rewnnemed in different ways changing the topology Minimum Spanning Tree MST I A minimum spanning tree is used to eliminate cycles I In graph theory a tree is a graph where evew pair of nodes is connected by a unique path no cycles MST Algorithm I Algorithm Definitions Tree nodes neueSiiimeuee Fringe nodes m iii the Iree buiadiauenne a node iii the Iree es wiiie there are hi nodes seiemanedge of minimum weight between atree node and a hinge e add he seemed edge and node m the MST nd MST Example I Tree Nodes A I Fringe Nodes B F G MST Example I Tree Nodes A B I Fringe Nodes C F G MST Example I Tree Nodes A B C I Fringe Nodes D F G H MST Example I Tree Nodes A B C D I Fringe Nodes E F G H MST Example I Tree Nodes A B C D E l Fringe Nodes F G H MST Example I Tree Nodes A B C D EY H I Fringe Nodes F G MST Example I Tree Nodes A B C D E HI I Fringe Nodes F MST Example I Tree Nodes A B C D E H IY F I Fringe Nodes G MST Example Tree Nodes A B c D E H I F G I Fringe Nodes When done I Cycles are removed no loops MST in practice I The MST algorithm determines the most ef cient tree that enables communication between all the switches Withou any loops t I Given the restriction that there be no loops you may have two nodes that do not have the most direct connection Overall however the edge welghts tor cohhedlohs between all re lhlmum swltehes a at a m I Some switches implement MST and others do not y each other uslng the soahhlhg Tree Protocol STF IEEE 802 id standard Brief Graph Theory I Networks are a concrete representation of mathematical graph I In graph theory a graph is I a function determining edge incidence Graphs I A simple graph nodes N 1234 I edges E e1 e2 e3 eA e1 13 e2 23 53 314 54 214 Weighted Graphs I A weighted graph is one where the edges have some weight or value associated with them I Networks have various edge weights Transmissmn speed Transmissmn latency 2 Lan live Network Graph Algorithms I Given aweighted graph Shortest path used in routers to determine the shorlest route tor dehvenng a pac e I This is often used in routers to determine a route for packets Graphs in routers I There may be scenarios where it is not clear how to route a packe Routers can have multiple interfaces connected to di erent networks Routers may have multiple paths to provide redundancy The path a packet needs to take may vary due to failure or poor pertorrnance otsorne segment Routers need to be able to adapt and learn about these changes in the network and act accordingly Option 1 manual intervention Routers can be setup with routing tables statically t A path o In Windows some versions of Unix route epnnr or netstat 4 to display the routes route add destination mask gateway metric Inte ace Fine for a small network or when routes are not likely to change often but not good for larger networks where routes can change dynamically based on netwo conditions 20 Option 2 Automatic I Let routers themselves discover the topology of the network I Let them use an algorithm to compute the shortest path between nodes I Provide a protocol so they can exchange information Shortest Path Algorithm I Algorithm Definitions i Treemades nodesi hetree Fringe nodes net in tiie tree tidtadiacentte a node in tiie tree Meennodes allothernodes Candidate edge node Shortest Path Algorithm pick a start node wniietnere are innge nodes i ilttne candidate edgetnat increases tnetotai distance between riy tree node and a innge node tne ieast add tnat innge node to tne tree update candidate edges to re ect tne snortest Known patn nd 21 Shortest Path Example I Find the shortest path from A to all other nodes I Tree Nodes I Fringe Nodes B F G Shortest Path Example I A B I Fringe Nodes C F G mu Find the shortest path from A to all other nodes I Tree No Shortest Path Example Find the shortest path from A to all other nodes I Tree No I Fringe Nodes C F Hl 22 Shortest Path Example I Find the shortest path from A to all other nodes I Tree N0desA G C I Fringe Nodes D F Hl Shortest Path Example I Tree Nodes G Cl I Find the shortest path from A to all other nodes Fringe Nodes D E F H Shortest Path Example Find the shortest path from A to all other nodes Tree Nodes B G C D Fringe Nodes E F H 23 Shortest Path Example Find the shortest path from A to all other nodes F I Tree Nodes G C I Fringe Nodes E H mm Shortest Path Example I Find the shortest path from A to all other nodes I Tree Nodes G C F E l y I D l Fringe Nodes H mm Shortest Path Example Find the shortest path from A to all other nodes H I Tree Nodes G C D F EY Fringe Nodes mu Building a Route Table I Routers build a table in a distributed fashion using two steps Exchange data aoout immediate heighoors to discover a graph and edge weights Calculate a shortest path using the diseovered graoh ome route aigorithms exoiieitiy exchange the route ihtormatioh out someone has to calculate that Graph Discovery Protocols I These Will be covered later when we talk about TC Pl P I Routing Information Protocol RIP I Open Shortest Paths First OSPF em in I BorderG t Network Edge Weighting t Distance Vector Routing I Metric time in ms in Link State Routing I Metric link live 25 Summary Data on a network rs oroken mm oreees caHed oaekets or trarnes A oaeket eonsrsts ot data and overnead A network anatyzer trame anatyzer network murmur e m otner oaekets re a TOPIF oaeket rnay oe rnsrde an Etnernet trarne e envetooes rnsrde envetooes Error cunlrm lechmques rnay oe used to ensure data rs reeerved eorreett Prng can be used to eneek oasre network eonneetrvrty m TOPIF oased networks Rooters are used to mlercunned drtterent network types and to act as trame eoosquot Keepmg data on tne network segment rt snootd oe on and curmung bmadcasls Drstrnetron oetween LAN swrtenrng and packet swrtenrng Ruulmg oasrs m graon tneory Mrnrrnorn Spanmng Tree MST amp snortest Patn atgontnrns 39u m n x E m n m z e 26 Intro to C nix sockets INFO 341 January 30 2002 Objectives HOW to logm to a remote system mmahds tor a an system What are some commonlext editors c Programmmg Cohoeots r at rat a alumll data types What is the common programmatic rorm tor a client A semen O o 3 o 2 o o What are the common netWork APl fu ctlons What is the hame orthe structure forspecliylng mtemet addresses What do the mhotrohs Send and rem0 do What are their parameters Digression We ve been talking clientserver You are going to work on a clientserver project Many students have little experience with nix command line systems and text editing A small digression LinuxUnixXenixAlXHPUX Using all of these systems generally begins with some kind of login 0 Graphical login user environment launches windows o Terminal login user environment looks Ike text 0 UW Systems HomerVirgil Mead Terminal Session l A standard terminal session starts by running a program for you e user This special program allows you to issue commands to the computer The shell the outsides ofthe OS are a number of different shells users can y 39ke 399 2 30 m o a Shell Functions I Shells provide access to essential aspects of the Operating System process control run terminate basic lO le and directory manipulation The shell takes your text and interprets the text as a command Basic nix Commands process control Process Control ltcommandgt run command ltcommandgtamp run command in background ltctr1gtz suspend process ltctrlgtc kill process bg put suspended process in the background fg foreground suspended process a o m E m g 2 m 0 039 Q 1 o o m m m m kill send kill signal to indicated process which nd a command command existence Basic nix Commands files l File System cd change directory ls list directory les wd print working directory cp copy a le rm remove le delete le mkdir make direc o rmdir removedelete directory chmod change permissions cat list the contents of a le moreless list the contents pagingscrolling Basic nix Commands Misc whofinger who is on this machine whoami which user you are env list the environment variables talk talk to someone on the same machine groups the groups you are in l man the unix manual help Basic nix Commands Editing Eventually sometime in your life you ll feel the need to editmodify the contents of a file I Common text editors sed stream editor vi simple visual editor emacs mother of all editors r pico UW thing Essential C Data Types Simple Operators Flow Control Simple lO Some C Libraries Data Types Atomlc J int lung shun char J fluat double Compound Arra y chavbu evHDUL mmgnsilnl Operators I Assignment r x x1 Comparisons YllY ltY gtY Y Arithmetic Y I Y Grouping y Flow Control Conditionai n condition siaiemenis Eise siaiemenis Whiie undmun siaiemenii mm m sandman increment inmaiizauu siaiemenis Simple IO Much ofC i5 ii i LibrarieS inoiude ltStdi0 hgt StreamFiiebasedmomoutput STDiN STDOUT STDERR Formatted string 0 formaiisiring itemsvariables mm FILE formaiismn itemsvariables scam format string iiemsvariabes rscam FILE formaiisiring iiemsvariabes oter o putnar int Some C Libraries lnclude ltStdl0 hgt 1 2 g z 1 a A i I v lnclude ltStdllb hgt include yasocket hgt include yatypes hgt include ltnetinemn hgt include ltnetdb hgt Return to clientserver Time for some examples in C Pick up where we left off last time with clientserver ClientServer Dimension nely peempeer 533339 Consider the ClientServer Dimension Somewhere in the middle is what is called peertopeer o More detail about these kinds of network software architectures after our midterm Software Makesthe Difference I Claim 0 What ultimately makes the difference is software as much the hardware How do we write software clients and servers Programming Network Applications Networking in software Application Program Interface API l wellde ned set of routines that provide access to network Jnctions 0 API Library Native API provided at the OS level sometimes run in OS in the kernel code I NonNative Translate the native OS API to anotherAPl the nonnative part often runs in the application co e 0 The TCPIP API l TCPIP API was de ned and written in C soclltets Came from BSD Unlx BSD Was tne nrst lrnplernentatlpn ufTCPlF39 epuple uftlmes lvlarlv vendors now supply a socket stvle lnterrace to tnelr networkan APl e regardless ofwhether lt ls tne natlve networkan APl soclltets are based on a generlc lO rnodel We have mentlpned BSD a The Generic lO style Generic lO inputoutput Associate a hen e With some ob ect Use the handle to readWrite the object Semantically the programmerjust reads or writes tofrom the han le 0 Hides the complexity of the object from the programmer I It is up to the read or write Jnctions to do the correct thing o Generic lO Objects Keyboard sequential read unly character at a time Files sequential er randurn read urvvrite character er black Network sequential read urvvrite character er black M mo 7 Display The Essential Socket API socket clients amp sewers connect clients ind servers listen servers accepto servers send clients amp servers recv clients amp servers sendto clients amp servers recvfrom clients amp servers Generic client sockeupxococoliiam h me p ddress gen retain x clos lsockl 0 more detail later Generic server ockeupxococoliiam h type Protocol 1 margeu amalgam magsu miiexleny lags closelsemgm o more detail later The Layered Model Again Emit What layer do the routines expose w quotmm Access Physcal lmemet Relevenue Model Consider socket pmmmljamlly type prutucul cunnemsucket machineiaddress mailen The Layered Model Again pmmmljamlly type protocol quotmmk protocol famll y uelmk meg a cunslanl lhal dellneslhe lype u pvuluculJuv Physcil TCPlP ll l5 PFJNET lm m v we quot jm 39em We lype ulcunnecllun deslvedJuvTCPlP SOCKSTR EAM m SOCKiDGR AM protocol any speeme pvulucul m We pmmeuuamlwm CPlP Wls lSU The Layered Model Again Apnllclllnn eunneeusuekel machmeiaddvess mailen Ik suckel We l glcal canneder mvlhe 0 a handle to We abled used m m machmeiaddvess a vepvesemmmn allhe nelvvuvk eeeyess a slvuduve unmn lemme vepvesems nelvwfx Spec n espees m the canneder lmemel Relevenue Model mailen the slze Mme addvess vecmd TCP Client almost em c when emerged mm hascem mp m each m pm 567 char mum char muemm sock ockeklyfimm39 sacxismAM u up gELhosLbynamel ww Aschoowa hxlghmem ll ewexiaddrjxniiam y 7min eeneeieeemeuee Lwnsmoxcl server when addr iaddr e nwnl lllung lhpcniaddrn emeeueeek server we eueeneeneeeeeme clos lsockl TCP Sample Client almost small details I Set up the socket TCP Sample Client almost small details Get remote host address mm mm mp up gemsmmeumascm gnawew TCP Sample Client almost small details Specifying the network address o TCP Sample Client almost small details Connect to server and process mnemsock smegd r meonsmegmm 5m miiex meonmzen n l TCP Server almost mm Enema m mm mm magma n m warm char mzexum gem sock sockeuvfim39r sacxismAM n Munllmmm um magma mm sendrcnmgsock mi Ewetram n closq clxmgsocul closelsemgm Summary Basic nix Intro toC Network programming 0 Generic HO 0 Socket API 0 Basic clientserverforms Home and Wireless Networking INFO 341 January 23 2003 Objectives What makes a name n21er dmerem rem an emee LAN7 What are same wmmnn Mme mam Dunnede um unsv Hm does an Merna ommemmn umer rem an emema mummy What 5 mm What are same name LAN uplmmv What d eremxales 302 1 1a e 97 Mhpsv What 5 wspv Home Networks Many homes require a nelwork lorlhe same reason we use nelworks in olher organizalions To share Mes To share devmes hKe pmers 0 To get access to the Internet from mmtrpxe maemmes Formnr to p ay games Home v3 Larger Office Several things differentiate home use from larger organization Amount of equipment i Number diversity of users in Reasonable expectations of physical security Connecting to the outside Consumers typically connect to the internet using one of the following approaches Dialrup thmu h a modem Slow 56K but inexpensive 9 25month Uses ur regular pnone line can t talk on tne pnone and usetne modem attne same irne lSDN service fairly rare but possible Around Mice tne speed ota modern but expensive stunmontn Uses an dditional line to tne home DSL Digital Subscriber Line Service Man options and speedsr typically 512k or 765K down125ilt or256K up and tne ban Wl tn is all yours Moderately expensive ssuimontn Can use your existing pnone line can talk and sun at tne same tirne Can use external DSL bridge connected to an Etnernet card or an internal DSL card intne PC Cable Modem Service Uses tne same cable tnat your cabieteievlslon signal is received on Cost 40 50rnontn snared bandwidth Can use an external Cable modem tnat connects to an Etnernet card or USE port or an internal cable modem card in tne PC Dialup DSL or ISBN dedicated bandwidth Dialup ISP r 4 9 i Cable modem shared bandwidth Internal vs external devices internai rThe lSP provides a PClNlC type card that is installed inside your computer External rThe lSP provides a small router39 that you plug your ehine into it may be easier to share an internet connection if that oonneetion is through some type or external box 3 You can then potentially connect other devices to that connections hubs switches routers and share it i however your internet eonnedion is through an internal card that is installed in your PC then your PC is going to have to do some type of routing function in order for multiple devioes to Share that Connec 39Dn The single IP address problem I Much of the focus in home networks is also related to sharing a single IP address among multiple I Many lSPs provide a single IP address as part of their monthly fee If you desire additional addresses you pay ex ra I A great deal of work is done in home networking hardware and software to gure out ways around this problem External DSL Modem example lP ZUMEUZUSCM Detautt gateway 2m tau 2D51 lP zmtauzusaz Detautt gateway 2m tau 2D51 lP zmtauzusaa Detautt gateway 2m tau 2D51 Equipment amp Addressing O en you have lntle or no choice in terms of equipment r Each provider typically has standard equipment that they use with all customers and you must use that Andjust because you can physically connect more than one device doesn39t mean that they will all be able to get an lP address While we can connect a small LAN at homeiust like we can in an of ce the provider may only give you a single address or ask tor additional per address This varies by the lSP I But every lnternet device must have an lP address I Network address translation lt Allows a single IP address to be shared Uses those nonroutable IP addresses like lOxxx or 192168xx it Many home network products have a built in DHCP serverthat provides nonroutable address for each device on the local n The local devices plug into ports built into this box The connection to the lnternet plugs in as well The box acts as a router between the local network and the NAT using a hardware device The earhes pe oims HAT in name halw en the cunt HAT Intsnaae and the inside Ml menace NAT Pool20 157 1 24524 lnlemer amvoul i mm 102 w in ma Han 1 2 212157 l 1 ensue m we um 39 inside m ian quotam 1010103 m 1010254 NAT in software Also can implement NAT in software using software like WinRoute In a PC you d need 2 Nle one to connect to your local LAN another to connect to the Internet through your DSLCable Modem 4 Wm s uan we E NAr You got internet now what I Home networks are not that much different from regular LANs There are the same issues in terms of Wiring or wireless Selecting a type of network Ethernet Token Ring others Selecting network hardware NICs hubs switches Installing the hardware Con guring the network software on your device assigning your machine an address etc Home LAN Differences Consumer focus a large selection of products are targeted exclusively to the homeSOHO Small Of ce ome ice ma e an these products are no designed for use in larger organizations Huo switches routers orwireless devices that leave ou t orgam aliuil out teatures that home users can omoaoiy get oy without Networks that run over exrstrhg wiring in your home phone or electric Desire to get good results with minimal exoehse And to do it notlust cheaply out simply Home Network Options I Ethernet I Power Line Networks I Phone Networks I Wireless Ethernet I Ethernet like we have discussed t Good I Widely deployed lots of hardware available same technology that is used in mos corporate settings 100Mbps speed is possible at reasonablalow cost I Installing Cat5 wiring may be an obstacle Powerline Networking I Use the electrical wiring in your house to carry your data I A couple o tions Older lnlelogis Passport system Newer lnlellon PowerPackel system endorsed by the r 1 HomePlug Alliancequot ham Up to 14 Mbps l I Fairly inexpensive kits that connects 2 computers and a printer for 60 I Connects to your PC or printer using a parallel port 7 I Note parallelfort requirement ma not work on Mac 7 also need a evice driver for ou S r at this time this i is pretty much a Windows on y option I Signal may quotbleedquot onto neighbors Home Phone Networks I Uses the existing telephone wire in the home at a different frequency I A standard exists called HPNA Home Phone Networking Alliance so products from multiple vendors should be interoperab e I HPNA 10 is capable of only leps HPNA 20 is capable of 10 Mbps I Supports up to 25 devices I Kits that include 2 HPNA network cards and software are available for 100 125 I Almost guaranteed to interfere with DSL Wireless WiFi Widely used in both commercial settings and by I home users I Use radio frequencies to transmit and receive data I Standards 3 8023le widely deployed l leps network that uses the 24Ghz spectrum v 02 l la supports data rates up to 54 Mbps and operates in the SGhz spectrum 802119 100Mbps 24Ghz on the horizon I Nonstandard 802 l lb turbo 22Mbps 24Ghz not interoperable 80211b I 11 Mbps in perfect conditions typically 36 Mbps in practice I Uses the same spectrum 24Ghz as some cordless phones and microwave ovens I Typical max range is 100 meters I Hardware includes the Wireless Nle most frequently installed in laptops or PDAs but also options for desktop PCs I Access Points provide the connection between the local network and the wireless users I Access Points start at 150 and up Wireless PCMCIA cards around 60 and up 80211b Wireless hardware 80211b Details I 13 channels are available in the 2 4Ghz spectrum Devices that want to talk mus b1e get1t1o the same channel In practice only 3 channels are typically I An SSID Service Set ID identifies the name of each wireless network Devices associate with only one SSID network at a time I While capable of 11Mbps in theory this bandwidth is shared between all wireless users much like bandwidth is shared when using Ethernet hubs I Because it s radio and because the Access Point AP controls all communication among the clients think half duplex I In a shared network it is possible to use a wireless packet analyzer to see other user s data on the network and that data may or may not be encrypted I Security is a potential problem especially given that people could potentially access your network from another building 80211b Security WEP gWrred Eouryarent Pnyaoy rs an argontnrn thatwas desrgned mm the 302 1 standard to en crypt data It rs usuaHy turned on by delauk as rt reduces perrorrnanoe by 20 or more WEP rs a shared secret rorrn olseeunty everyone usrng the network needs to know the WEP key WEP can be easHy exprorteo wrth 10w oost hardware and sonware M ppon MACbas u r na nMr n MAC Gr nmduets 802113 Next en eratronquot wrreress teonnorogy agam operates at up to 54 Mbps an Mbps rs rnore reanstro Max range a M ress omy 70 meters un ortunater oornpretery m erent hardware than 302 11b so rlyou buy an 302 1bAeeess Form or NIC you haveto buy agarn a not backwards oornpaubre Has rnanry onne sarne seeunty rssues as 802111 A new seeunty protooor or wrreress rs m the worksquot but not out yet 20037 Reeermy February 2002 Mroroson and DeH sat down wrtn the 302 11a standards group and oeorareo that they woum not support nor sBeDuZany 302 11a equrpment that was not 39baokwaro oornpatrbre wrtn b Home side of the network wrap I All these optrons Ethernet Power Lrne HPNA and Wrreless are possrbrlrtres on the home srde of the network I Reeommendatrons Ethernet rs great rfyou can run wrre Wrreless rs great rf you know how to keep your network secure A note on wireless in business It s NOT a decwsxon to use a wxred network or a wxreless network BOTH have thew place BOTH have advantages and dxsadvantages Today most orgamzatxons plan to use both where appropna e Summary Introduction to TCPlP INFO 341 January 21 2003 Objectives What was the nngtnat name Mthe ntemew Whn hum the ntemew at are the eyere Mthe tntemet Retereme Meaem hat are the mam tntemet address etaeseev n 7 hat re eupernenrngr EooTP e DHCP are Mn examp es amnaw dn 7 Internet amp TCPIP I Transmission Control Protocoltheme Protocol c Devetapment began m the Barty 1570 s r Largety landed by the devense department tnmugn the Advanced Researcn and Prerect Agency ARPA as ARPANet Mamamen was m mterounnectdt erent cemputers tacated an ar erent pnysrcat networks tacated ever a targe geagrapmcat area hke the entrre us Researcherswrkmg at near umversmes an aerenee research wens need tn wHabwrale and he ahte tn share msstn nnarn rannee share 25 etc The Original ARPANet MAP 4 September 1971 Additional Design Considerations I Wanted the network to be able to scale well to potentially connect a very large number of nodes and different network types Wanted the network to be able to continue functioning even if a particular segment failed or there was unreliable communications 0 Consider again this is being funded by defense department a segment could fail not just because equipment failed but they wanted to consider the possibly of a military action taking out a city or region TCPIP Protocol Suite What is a protocol An endtoend agreement about how to communicate TCPIP is not the only protocol used on LANs Others include IPX Netbios DecNet AppleTalk others Multiple protocols can exist at the same time on a LAN although some Network Administrators only allow TCPIP C TCPIP is called a suite of protocols because it includes many different protocols at different layers The OSI 7 layer model was actually developed before TCPIP o TCPIP was designed with a 5 Layer Internet Reference Model TCPIP Layering Model Physical basic network hardware Network lnterface how to organize data in frames and how frames are transmitted lnternet the format of packets sent across Millquot 5 an lnternet and how packets are forwarded through routers Mn 4 4 mmc 4 Transport lnsure reliable delivery TCP much 3 Application mlm l level protocols each defines how that application use There may be many application Telnet FTP HTTP SMTP are all apollcatlon level protocols These Wlll be the locus o the 2quot6 hall olthls class Ethernet hardware and layers Repeaters simple hubs a Layer 1 devices l lff i lLI391l Bndges SWItChes WW Layer 2 devices I t mm 2 l Pluyslcal Mlllt39 l Routers Layer 3quot Switches t Layer 3 devices Encapsulation envelopes Elllama lrallcr e a s 9 a IP Internet Protocol Addressing I Each hos or device must have a unique IP Address In the current version of IP IPv4 these addresses are 4 octets long or 32 bits To make them easy for humans to remember they are represented by4 octets of decimal numbers sepa b a quot I For example 152 2 81 1 or128 95 220 25 dotted quadquot address Back to Binary Again Cohsiderthe roiiowmg possible IP address39 10000000 11010000 I 1100100 I 1100111 I 128 l 208 100 103 Which is written as39128208100103 Given this lormat39 Thesmallest value 01 any octet could be 00000000 or 0 decimal The largest value or any octet muld be 11111111 or255 SpeCIal addresses I 0 and 255 have special meanings in IP addresses 0 and 255 are reserved for special purposes Example 128208100255 is a broadcast address forthe 128208100x network I Devices have addresses from 1254 Address Classes Each 32 bit address is actually divided into 2 different fields The NetlD portion of the address identifies the network that a host is connected to The HostlD portion of the address gives each node on a given network a unique identifier When the addressing scheme was devised it was assumed that there would be a few networks with a very large number of hosts a moderate number of networks with an intermediate number of hosts and a large number of networks with a small number of hosts l Different address classes were designated for these scenarios Address Classes A B C Class A addresses support 16 million hosts on each of 127 networks Class B addresses support 0 65000 hosts on each of 16000 networks Class C addresses support 3 254 hosts on each of 2 million networks IP Address Classes u a 15 24 1 Class A u ncnd hasud ncnd hasud 1 u ncnd hasud Class D 1 1 1 u muluuslgmuplD CIaSSA 127 0 01 and below Class B 127 01 010191 255 255 255 Class C 192 0 1 0 to 223 255 255 255 Class D Not used for networks multicast Class E 240 0 0 0 and above not used Reserved IP Addresses l 12700 l loopback39thelocal machine lOxxx class A private networks I l721600 172131255255 classBprivate networks 192168xx class C private networks These special addresses can be used for testing under mal circums anoes routers will not pass packets with these addresses Note in Lab 1 we assigned each Linux machine a lOxxx address now you know why How are IP numbers assigned lfyou want to setup a private TCPlP network not connected to the global internet you can use what you want a best to use one of private network numbers when you do it however lfyou want to connect to the internet your organization must be assigned an address space that is unique to use Private lSPs internet Service Providers coordinate with lANA internet Assigned Numbers Authority to provide organizations with lP addresses lfyou are in a large organization or university it is likely that your organization already has an address space assigned and your ad ress will tall within that range s Vou may have to work With yourorganization s central networking group to obtain a network address lor your department or division UW Example The University of Washington has been assigned the following Class B network addresses 123 now 123 95xx The uw can manage those addresses itself and allocate subhets in that pool to various departments 128208100 X has been allocated to me lSchool We can allocate the 254 possible addresses to hosts in the iSchool Assigning Numbers to Machines Once you have a range of numbers you can use an administrator decides how to allocate addresses on the local network is c n be done statical quot where one machine is assigned a certain number to use all e time or ynamicallyquot where each machine uu as an lr auu a pool of shared addresses when they boot up Each timethey startthey may get a differenth address in Windows and Macintosh the actual assignment of the address is done in the Network Control Panel unfortunately you must be Administrator to seethis in Windows ZOOOXP ln Unix these values are typically entered in configuration files and of course you have to be root to change those values Static Assignments I Always used with servers or computers that other people need to connect to on a recurring basis v Why I Until relatively recently most computers connected to the Internet had static assignments people worrying about running out of IP numbers for each device Dynamic Assignments Two Mechanisms I BOOTP Bootstrap Protocol I DHCP Dynamic Host Configuration Protocol BOOTP I The Bootstrap Protocol On bootrupthe machine broadcasts a request for an lP address it if a BOOTP server is listening on that network itwill look up in its database the MAC address of the machine making a request and assign it an lP address I Note39 this requires a database to be maintained or MAC addresses and IP addresses I So while we say BOOTP is a dynamic address assignment protocol is it reaiiy 7 it BOOTP was also used to boot a diskless client completely oif the network from a network image DHCP I DHCP Dynamic Host Con guration Protocol 0 Similar to BOOTP and actually an extension to the BOOTP protocol v On bootrup the machine broadcasts a request for an lF address 0 lf a DHCP server is listening on that network it will assign an lF address DHCP can be configured to just give an address at random from a pool of available addresses or it can be setup to suppl the same address all the time a particular MA address like BOOTP Additional DHCP info I DHCP uses the concept of a lease that can e renewed or a can timeout after a specified time period DHCP is the dominant protocol used today for dynamic assignment of addresses it won BO 39 rarely use today DHCP does not require a static list of MAC addresses Most commercial ISP39s use DHCP for address assignment You typically have to pay extra for a static address Advantages of DHCP DHCP allows many more devices to Connect to the Internetwithout each device redurrrrrg it s owrr IP address For rrsrarrde a wmmemial servrde pmvider like Earmiinlg can have a poet or IP addresses rerau their users Theyoniy rreed one address rer each modem in the dial in peer ratherthan erre address rerevery subscnberto theirservioe Th5 advantage star39s tn go away hmveverwhen you corwder always onquot useri like DS or table modem users thatdon t powerde mer mad mes DHCP makes it easierto setup your machine rryou move rrorn place to place In a static assignment your address is very much tied to the physical topology or your network ggrgoat uw the School networkwas assigned the address Etbox 123951x Checking your IP Setup I In Win9598 and Win2kXP if you have permission open the Network Control Panel r Or in Win2KXP at a command prompt type ipconfig a What we saw The machines in this room get their IP address via DHCP In addition to the IP address for that machine ipcon g displayed a number of other IP addresses including fault gatew y e mu m r 3 et mask Prlmary Name server a Secondary Name server We will discuss each a bit later today Delivering packets on a local Ethernet I We have an lF address for each device on our LAN also had said that each device has a MAC address that hiduely identi es the MC in that device lfwe want to deliver a packet from one device on our LAN to another and we specify an lP address how does that packet that was addressed using an lP address get delivered to the proper Ethernet MAC ad ress7 Exampie39 ping izszns ion 55 How does the Ethernet card know where to deliver that packet 7 I Recall that Ethernet frames use MAC addresses not IP addresses lso recall that the IP address on any panicdlar NIC can change an administrator can change a static add ress or it can change by itselr irtne address is dynamic ARP Address Resolution Protocol ARP provides a mechanism for one device to discover the MAC address of another device given an ress I We saw ARP last week I Suppose we want tocping a device on another network such as a P on the UW Computer Science network L Assume that PC asaan address 128 95 i 56 Do weiust sent out an ARP broadcast looking for the device ARP isn t the answer I ARP doesn t work because the PC we want is not on our local netvvo I How do we know what addresses are on our local network and which are no Recall that we said IP address are 32 bits long and that they are divided into 2 pieces The NetlD that identifies the network The HostlD that identilies the host Two pieces really wnen we wrote an address we wrote rt lrke 123203100103 5 Usrng that notation how can you tell mat part or that add ress rs the network and pan denotes the keep No Today on tne Internet we use sornetnrng called sucnet addressrng as away to easrly rdentrry To use sucnet addressrng eacn network devrce rs mnl lgured wrtn not only wrtn an IP address but also wrtn a sucnet maskquot The sucnet rnask rs a 32 mt value rn wnrcn 1 s represent tne network portron 01 tne address and 0 s represent tne nost pomorr arnpr 255 255 255 n wnrcn part onhe address rs Iortne network and wnrcn part rs or tne nost Subnet mask example Consider the iSohool network We have been assigned the 128 208100 X network Hosts on our network have addresses in the range 123 20310017123203100 254 The rst 3 octets represent tne network tne last octet represents a nost We sard we use 1 s to re resenttne network nd 13 s to representtne ost so we nave a sudnet rnask tnat looks like39 11111111 11111111 11111111 00000000 or rn decrrnal 255 255255 0 Using subnet masks randquot mask to determine what network they are on Example My address 128 208 100 103 subnet mask 255 255 255 0 Address 1000000011010000 01100100 01100111 Mask 11111111111111111111111100000000 And result 1000000011010000 01100100 00000000 128 208 100 0 We have computed that we are on the 128 208100 X network Destination addresses I Similarly nodes perform an and operation on destination host addresses and the subnet mas to determine if that destination is on their network or another network Consider the destination address 128 208 95 56 ddxess 00000 11010000 01011111 00111000 Subnet Mask 11111111 11111111 11111111 00000000 not xesult 10000000 11010000 01011111 00000000 1 0 Tnis destination is on tne 123 203 95x network I arn on tne 123 203 mm x network tnese are di erent networks Intuitiver obvious At first gianoe you rnignt tnink tne and operation is a iot orwork in tnat intuitiyeiy you can easiiy teii wnat network you are on True wnen tne subriet masks raii on tne octet boundaries but tnis is not aiways tne ease Consider asrnaii oomgariy tnat nas been given a Ciass c subriet address ori5n 1991 x t rney have A diinsioris in tneir wmpanythatare in A dirtererit physical iouatiors Routers Donnell the A dirtererit networks togetner 0 r they used tne standard 255 255 255 D sutmet masktney could oniy have one network with up 25A nosts on that one network whatdo theydo t Subnetting I In this case we need to represent 4 different networks all in the 15019910x space How many binary digits does it take to represent 4 possibilities 2 digiterO Oi 10 ii So our subnet mask needs to be 2 bits longer like this 11111111 11111111 11111111 iiOOOOOOor 255 255 255 192 Subnetting continued We knmvaii the addresses will start out with 159 199 19 Let s oorsiderthat lastoctet when using a 255 255 255192 subnet mask The tirst2 brLs ottne last octetare partot tne networkso 99 999999 99111111 are on one network IP addresses on this network range trom 9 53 butagaln all 0 tortne nost have a special meaning and all 1 s are broadcast so on this networksegmertttne broadcastaddress is 159 199 19 53 Hosts would be assigned addressestrom159199191 1591991952 91 999999 91 111111 are on the seoond network IP addresses on this network range trom 5A 27 in ne 5 are special and all 1 s are broadcastso tne broadcastaddress tor this segment is 159 199 19 127 Hosts would be assigned addresses trom 1591991955 15919919125 19 999999 19111111 are on the third network IP address on ths network range trom129 191 Emadt as t torthis segment is 159 199 19 191 Hosts would be assigned address trom15919919129 15919919199 11999999 11 111111 are on the tourth network IP address on ths network range trom 192 255 Emadt as t torthis segment is 159 199 19 255 Hosts would be assigned addressestrom15919919193 15919919254 It can work the other way too What ityou are a medium size company and you have a single network in your or anization that is connected to the internet via a router You have 99 network devices on that segment I Wagon used a standard class Cquot type address you could only have 2 devices on the same network segment 5 One solution get aseoond class c address and add an additional interlace to your router Another option eget a class B address That would allow you to have up to 19999 diuerent networks and 95999 hosts But ctass a networkaddresses are hard to getand ityou did that you would be wasting a lot or addresses 7 Another option uoerneuing Supernetting ti Ratherthan using 8 bits to identify each host like u would on a stan ard cass ne 9 wi h a 2552552550 subnet mask what if you used 9 bits instead That would allow you to support 511 hosts Rather than the subnet mask looking like 11111111 11111111 11111111 EIEIEIEIEIEIEIEI ltwould look like 11111111 11111111 lllllll EIEIEIEIEIEIEIEI 0r255 255 254 0 Supernet example addresses If you had two Class C addresses 1501996x and 1501997x by using a 2552552540 subnet mask you create a single network with valid addresses for hosts from 1509961 150997254 As expected 1509960 can not be used as it is reserved and 150997255 is broadcast Generally speaking I While it is possible to use unusu quot subnet masks network managers generally avoid them because they add complexity to the addressing These unusual subnet masks implement what is called classless addressing Most subnet masks fall on the boundaries so you will most frequently see 2552552550 or 25525500 as subnet mask values Subnet mask summary allows a ne ork evice to now i a pac e i destined for the local network or if it has to go to a different network via a router I The subnet mask in conjunction with an IP address s I Back to pinging a CS machine again We usethet 39 39 umieima mu know that this address is not on our network Hence we do not arp for it packet to our default routelquot Default Router Gateway thenever you see the word gateway when TCPIF39 rs being drsoussed tnrnk outer The DefaultRouter or uetauhuat a aresent Recall thata router rs used to rnteroonneetdrrerent network The Default Gateway rs the router that rs connecting your networkto other network Routers rrsure that traffic rndudrng broadcast that rs between devroes on your network stays on you r network Routers only pass data along when t needs to go another network The derauit router IP address rs oonngu red again in the Network Control Panel in Windows and Mac or in a ronnguratron tie on Unix Ira mac what the IP address or the detauit gateway rs when t address Routers themselves have default routers Example packet arrives at the router and the routerseys 123 951 56 is the 123 95 l x network connected to one orrny local r rlaces 7 r so we will send it to that network it not the router tnes to deterrnrne r rtaiready knows a route to get to that destrnatron Routers run sotware to deterrnrne optrnai routes and they exrhane gigs routes wrtn other routers usrng routrng protocols irke RIP as r or r the muterdoesn t know the route the auket s sent to the routers detauit gateway another router up in the ieramhy tor t to ngure out The prooess repeats To get rrorn one network to another a packet may traverse rnuitrpie routers Traceroute Traceroute is a simple ut ity that can be used to showt e rou ers that a packet traverses to get to a particular destination The route may change from time to time Why ln Unix use the command e traceroute ipaddress In Windows at a Command prompt r treeettipeddress In the lab you can try I Start Run CMD to get to Command prompt s tracertwww ischool Washington edu tracertwww cs Washington e u tracert www Washington edu Dld you all see tne same routes 7 What does this tell L157 tracert ils unc edu a machine at the Univ of NC Notlcethe word abllerle 7 That sthe academlclnternetz network r tracertwww cnn com e what happens7 P Names and Numbers in several of our demos we have used addresses like www Washington edu rather than numbers like 140 142 3 7 From an end user39s perspective lr names are used Instead wny are names prelerable to numbers 7 ways Oorll lguratlon les on each machlne llKeetdhosts ln unlx tnat have an IP number name palr The devlce mnsults tnls tablewhenever a n ls used to determlne tne address otnnouslytnls metnod does mtscale welll Eutstlll useful oucaslonally e In Lam you were able to plng uslng a name ratnertnan a number because tne names and address were pre entered lnto a local table Use 01a dlstrlbuted system called DNS tne Domaln Name Sel39llce More on DNS Domains are hierarchical Top level domains 0 com edu org what else Some new top level domains have recently been announcedlike info museum From the top level we may see a hierarchy like washingtonedu or isohoolwashingtonedu or p03ischoolwashingtonedu Important Note Domain names imply a logical hierarchy of addresses but that hierarchy does not necessarily apply to the physical numerical For example lcould have names like pc1demostorecom and po2oemostoreoom p81 could have an lP address of128208100150 and ch could be 15063202 Just because the IP name suggests that these hosts are on the same network does not mean that they reall are In fact it is important that the names NOT map directly into e IP numbers Why Consider a business With multiple networks or a company With multiple physical locations The logical hierarchy There is a reason for the hierarchy DNS is a distributed system it allows management to be delegated as nee individual organizations oan run their own DNS servers and ohange names as needed a there is no oentrai authority that they must inform to make ohanges DNS consists of root servers at the top of the hierarchy that do not know all the names but who to ask for each name Each top level DNS server ie edu com knows which DNS server in that domain to ask for an nameIP num er Portion of the DNS Hierarchy Getting a name I Just like with numbers names have to be unique and they must be registered Note that names don39t haveto have 4 parts like an lP address does e g cnn com is a valid DNS name I Currently Network Solutions isone of the companies responsible for assigning com org and net addresses 39u lVLMl lieryurimsiiluunris com t Note the ability to register a name for a fee also note the Whoisquot database lookup feature and check Washington edu and uw edu lnterestingl Registration Issues Can you register any name7 a all I issues with NSl itself n a possible monopoly organization now tn are are multiple registrars not just one I Recently efforts have been made to make the new top level domains accurately reflect those organizations that are part of it for example museum 0 rnu aurn narna Trying out DNS I Normally your machine queries the DNS sewer automatically you don t even know it is happening I In Unix and Win2KXP there is a tool called nslookup that you can use to manually query a DNS serverfor an IP address nslookup Sample Ata command prompt First do ipmnfig aii again and note wnat it says is our DNS servers address Note tnere is a primary and seoondary 7wny do we nave two397 Now type memo and tnen try argo isohwl Washington edu men iunk semi Washington edu Try128208100103 Trywa as Washington edu Trymnmtingto ii usingtM iP numbnrinyourweb browser www onn Com Very interesting wnai s inis owner can n wartime oinerwan can an quotamine have more than one namequot lcrmx iesm school Washington oau and mail iscnoni Washington eaul wny mignttns be useiui r DNSSummaw The domain name service is designed to take an an internet name thatyou enter like www rnn com and return to you the iP the number ers are distributed throu hout the internet Many organizations maintain their own NS servers and these servers exchange their records with others on a periodic basis Witn static IP assignments a network administrator in your organization enters tne inrorrnation into a taoieor dataoasetnat iists tne individual machines and tneir names Without a DNS sewer your machine will not be able to connect to other machines using an lnternet name BUTyou could connect if you knew the lF number Layer 3 I Routers amp Routing are Layer 3 items I Routing Protocols Solve the routing problem by allowing routers to communicate with each other They facilitate the discovery of additional routing connectio Examples I Some TCPIP Routing protocols t Border Gateway Protocol BGP Open Shortest Paths First OSPF Routing Information Protocol RIP Interior amp Exterior Routing I Interior routing is for routes among routers that you control I Exterior routing is for the larger global networks InteriorExterior Diagram Organization A Organization a 20 IGPEGP I The most common EGP BGP Border Gateway Protocol I Speci cally between large systems I Common IGPs OSPF RIP OSPF I OSPF is an open standard IETF Internet Engineering Task Force RFCs Request For Comment 1131 1247 1583 2328 OSPF Mechanics I Hierarchical Assignment Each router is assigned a level in a hierarchy The number ol levels in an organization definetne administrative area responsibility lor each router There must be at least 2 levels in the hierarchy Logloaii this corresponds to the lnternet outside the organization and LAN inside the organization data 21 OSPF Mechanics I Route Determination Routers at the same level in the hierarchy exchange Link State Advertisements LSAs The LSA indicates a link is live after some time without an LSA the link is assumed to be dead39 Routers use the LSAs to build a graph representation of the known networks39 The Shortest Paths algorithm is usedt determine the best route to a known location Why use OSPF l Hierarchical strateg Good for scalability can handle many routers in an org anization L Limits scope of LSAs only high end devices typically support OSPF l Because of the overhead smaller organizations often pick RIP RIP I The most simple of the Interior Gateway Protocols IGP One ofthe first TCPIP routing protocols Originated in BSD Unix routed I Has become a standard overtime two different versions RIF 1 and RIF 2 22 RIP Mechanics Each RIP router periodically broadcasts its whole route table When a RIP message is received the router compares its intemal table with the route table it received If the router that sent the RIP message knows a shorter path to a network accounting for the cost of sending to that router then the new route replaces the o d route Any route longer than 16 hops on the network is considered unreachable Why use RIP I Quick implementation just tum it on I Simple to run but r No security broadcasts go to everyone have a large number of routers running RIP the RIP messages get to be large and it can use a lot of broadcast RIP doesn39t support variable length subnet masksl rlr r linhiIit nr delay rjust number of hops Summary I Brief history of the Internet origins of TCPIP I TCPIP Layering model I Supernetting amp Subnetting I IP Names DNS I Routing basics EGP IGP 23 SN M P Remote Access INFO 341 Februan 18 2002 Objectives I What IS SNMP I What ports are used In SNMP I What IS Telnet I What Is one problem ofTelnet I What IS SSH Discussion to date Network hardware and tow tevet pmtowts Dtstnbuted aremteetures frameworks tor thtnkmg about network apphcattons Rest ot quarter we wm focus on apphcd on tayer pmtowts hardware and apphcd on tayer SNMP Network Management As networks get larger there is increasing need for the ability to view the network topology obtain status information from devices set thresholds that might be indicative of error conditions receive notification of critical events or conditions be able to take corrective action manually or automatically based on rules Network Management Software I Equipment vendors offer Network Management software like HP OpenView CA Unicenter Cabletron Spectrum IBM Tivoli Netview I These are applications built on the Simple Network Management Protocol SNMP I The definition of management is very closely tied to lowlevel hardware monitoring What they look like Wm fm rim 39u l l l ski l E A mmla m A WZIEE IE A WHBME autumn l3 g maunmi in ui M r Ad f Lowend SNMP tools Often bundled Wlth hubs sztches Allow you to see the status of the deVlce May allow you to set traps or alerts May allow you to update deVlce flrmware Typlcally vendor speclflc can only manage that vendor s hardware usan that software SNMP makes this possible slmole Network Management Protocol Provldes tne meonanlsm tor tne Network Manag er sonware to obtaln lnrormatlon rrom a network Agenr o The agent ls tne sonware runnlng on a deylbetnat oollebts tne data ll The manager sonware ban retbn or store data on tne agent ll Data to be retbn ed or stored mlg nt be a oounter tnat keeps track or say errors or packets or many otner tnlngs The bollebtlon or all oblects tnat you can access on tnat deylbe ls called a lVllEl Management lnrormatlon Base Slnbe dluerent deylbes ban naye dluerent lVllEls unless you naye a lVllEl ror tne deylbe you want to manage you may not be able to rlnd out mubn about lt ne ortne reasons tnat lowend products only work wltnln a glyen vendor s product llne More SNMP Multiple versions SNMP l and SNMP 2 Uses ports 161 requests responses and 162 notifications Uses the concept of community stringsquot as a type of password to control access to info read write none By detault tne eommunlty strlng publlc ls tyoleally used and publlc glves read only access to all data to anyone Note tnat tne oassword ls uneneryoted ln SNMP 1 so lt ls not secure Network ManagementSNMP Wrap Newark Managemenxscmwae Iendsm he used on larger mm m NemrkDpezmn nemeswnm mmmuweeaeu depanmema mm mm emewammeeemmmngaeme memngmmgee mame meemmee apnoea m mmmeune mmm Camemm summauca t mm VlaHupmdale kmwwgmeanDmewks m wme m 12 2 men n geneaxed weacm amaveana en Ame samename s Lenaasmax m dewoes mm on menepgewwmenunJueneeanweeani eeememe V maymenymmeee devmshave WehaeweshmhwmIMVasveH ea m can do em mamhvvg maxwav vmead Remote access Telnet A chemrserver apphcamon One 01072 eamest notthe earhest apphcamm on the Memet De ned by RFC 354 V DD yuu remember we RFCs are Telnet I Used to establish a dumb terminalquot session to another computer on the Internet 3 Similar in concept to dialing in to another host using HyperTerminal in Windows Kermit Procomm Anyone recall the old days ii whe y m long distance if 1 phone calls to dialin to remote 7 machines Connecting I i Hosts are assumed to be on ttie network all tne time dialing a pnone number Fa allwa laminar telnet1289522038 V or telnet myboxcom 1289522038 The ClientServerProtocol Relationship Client Server Waits amp ss Initiates a Connection Responds to Incoming Connections m E l39P Addr 123535220103 P Addr 1289522038 Telnet Priiluwl Client Application gt Server Application ngmmrunnm I o ammnnmg on ths machine on ths machine The Telnet Server Typicall a larger host such as a mainframe computer or worksta ion but also may use telnet to connect to a network device like a hub or s 39 Typically running a multiuser multitasking operating system like Unix but Also widely used on PC based servers if that PC is nning Linux and Typically runs on port 23 do you remember ports What do you get I May provide dumb terminal access to A lioiary OPAc or intormation systemoulletin board A tor comoutation Dialog LEXlS OCLC Asetuo or contiguiation system tor a piece ot hardware I Or may just be a host on which users can do their own work using a shell accountquot or time sharingquot account The Telnet Client I The software that initiates a telnet connection I Provides the interface and a set of features for the end user All clients oroVide a dumo terminal caoaoility What exactly is a dumb termlnal 7 Some allow userto use custom tontsc l i Some suooort ditterent tyoes ot te We ll talk more about that in a bit Some allow scnoting or logging ot data I Software may be commercial or shareware such as Windows Telnet CRT TeraTerm or NCSA Telnet UNIX achines have commandlinequottelne o ors rminal emulation Terminal Emulation l A Telnet eiiem turns your PCIvlac irito a dumb terminal Within that session I What happens to your mouse on a dumb terminal 7 a in m m paiimaimaim imiiiai Most popular type I5 VT ion Othertypes VT 20 VT 320 VT 420 Each terminal has capabilities that It provides and command sequences It understands o edtnmatchupyourtemiinalemulationwithvmatme hestyourare wrmeming m requires Al m y need to setup certain optiw furyour host like ESDEL key amine er 9 screen Example Telnet Clients I Microsoft Telnet Comes With Win9598NT00XP r In lab to run do START Run telnet hostnamedomain 5 Try connecting to the UW Library OPAC so telnet catalog lilwmaslwiiigton edu I Things to note a Windows 2KXP telnet VERY basic The Protocol Underneath I ATELNET client and server have an agreed language for communicating a protocol I In this case the protocol is called the same thing as the client and the server all are called Telnet but with other Internet applications that is not always t e case I Telnet is a protocol that runs on top of TCPIP hence it is called an application level protocol I The Telnet protocol uses the conce tof a Network Virtual Terminalquot and each end hot the client and the server in ircan Analyzing a telnet session I If you looked at a telnet session usin a packet sniffer you would see the negotiation of capabili ies at the beginning of the sess39on Each time you press a key once the session has been established that letter is sent in a packet all by itself from the clien o the server an en echoed back again this is e default operation I In the telnet protocol everythin is sent in free textquot or in the cleaiquot so if you had a packe sniffer you could see each letter that was being pressed as it was being typed A big problem I Given that telnet passes data in free textquot and given t at telnet is so frequently used to connect to remote machines that request passwords telnet is a clear security danger I As a result many organizations have tried to move away from using telnet UW for example stopped allowmg in regular telnet December 2001 They turned off theirtelnet seners An alternative to Telnet SSH Secure Shell provides another mechanism to login to a remote host or copy data between remote hos s in a secure fashion by encrypting the data Originall conceived as an alternative to the Unix rsh rcp ype commands Developed originally by Secure Communications Security a commercial com any and there are two versions of the protocol SS 1 and SSHZ SSHZ being the newer an recommended protocol SSHZ currently going through the standards process SSH Sewers and Clients SSH is not the same as Telnet but it can provide similar functionality with the advantage of encrypted a In realit SSH is a completely different Brotocol a comple ely different server and what a out the client It de ends Some clients implement SSH and Telnet in the same client Other telnet clients don t implement SSH at all SSH servers and clients typically run over port 22 regular telnet was port 23 Summary SNMP Telnet SSH Web Systems extending the basic system Info 341 Februan 27 2002 Quick Questions Whal is a proxy Whyare proXies usem Whal is a proxy cachev i a waxy cache usemw By Ihe slarl loe web boom circa 1994 w a waslhe mosl popu ar serve7 0 Who wrdte that senEH Objectives What are ways d ex end me web systemv What is WeDDAV7 What are sdme imanM eeidres d1 WeDDAV What is Tst Haw ddes n5 es39zhiish a secure mimede What s 513w Haw does a server wmmumcale wnn CGi eddev What aresume mums dvc w What are Wm methods d1 resuiwg umwzim M Dew What is ASP and Wm iarguage is embedded m ASP D39957 The Web System I Protocols amp Standards URL URI URN HTML xHTML DHTML css I Software w Web servers Apache IIS Senenema mus eel F39HF39 JSF39 ASP Apache modules Web clients IE Netscape Mozilla Opera Clientsme code JavaScnpt DHTML How do we extend the Web system I What do we do to support new capabilities new functionality How do we extend the Web system I What do we do to support new capabilities new functionality Extend the protocols m Extend the type of content Examples of extension I Consider two examples 7 Extend the protocos WebDAV I Transport Layer Security TLS Extend the type of content I CGI I PHP ASP JSP Protocol Extension I Two examples I Extending Up L WebDAV takes HTTP and adds functionality through additional commands I Extending Down TLS SSL takes insecure connections and de nes a mechanism for creating secure connections This is really done by creating a Transport Layer protocol but the result is to solve a problem at the Application Layer WebDAV I Web based Distributed Authoring and Versioning WebDAV I rfc2518 February 1999 Goland Whitehead FaiZi Carter Jensen HTTP Extensions for Distributed Authoring I Really only WebDA v Versioning had to be dropped out because it is such a complex problem Why does WebDAV matter I Solves critical problems with web based collaboration I Microsoft adopted WebDAV for all their applications Important Issues I Distributed asynchronous authoring I Collections I Locking shared resources I Properties metadata I WebDAV adopts XML for protocol Distributed Authoring I A problem with the original Web 0 Bemer Lee s original browser could both edit and View pages I What happens when many people are reading and writing the same file at the same time Collections I SpeCification for interpreting a URL as groups of files collections I hi39lp Moo comtiles ll A th v 39iim m L hullloo coml C Collections can be thought of as similar to a directory but they do not have to be file system dependent they could come from a database Locking I What is a lock Locking I What is a lock 0 A way of enforCing long term mutual exclusion p A way of resolvmg race conditions when two people want to edit and save the same file Locking I What is a lock 9 A way of enforclng long term mutual excluslon A way of resolvmg race condltlons when two people want to edlt and save the same flle I In WebDAV a lock is implemented as a special property of a resource Locking in WebDAV I Two types of locks Exclusive The aoility to write the resource is granted excluslvely o the loo owner Shared Allows multiple people to have a lock on the resource People with the appropriate level ottmst can write the source as neeessa The intent is to make it clear who else is working on the given resooree sorne otherrneans phone ehat systerri Properties I WebDAV recognized the need for attaching properties to web resources Propertles was just the term to lndlcate the use of metadata I Why attach properties to the resource Properties I Why attach properties to the resource I Where are properties currently stored in the web model 2 Where do you store metadata when you write a web page I Why is this a problem WebDAV Properties creation date to m a n was supported lock WebDAV relied on the work in the Dublin Core metadata model or picking what would bethe delaultset or properties WebDAV an HTTP Extension I Supporting distributed authoring 0 One option would have been to write a completely new protocol Another option is to extend an eXisting protocol I What are the problems with extending an existing protocol Extending HTTP I WebDAV further specifies 390 O n l Extending HTTP I Why is there a problem for o GET HEAD POST DELETE PUT Extending HTTP I Why is there a problem for 395 GET HEAD POST DELETE PUT 9 How do these HTTP methods handle collections lg How do these HTTP methods handle properties WebDAV Existing Method Clarification I GET i Er is weii detined in http tne spec notes tnat wnere get is appiied to a coiiection tne server mignt or mignt not return sometning tnat is human readaeie I HEAD i7 Head is aiso weii defined since it is defined in terms of GET I POST Tne semantics torPOST are a pmbiem POST is otten server dependent In WebDAV tney do not define it turtner WebDAV Existing Method Clarification I DELETE DELETE for noncoiiections g iy ame asin H P Lar e tne DELETE for Coiiediuns Most deietetne coiiection and aii tne coiiection memoers recursive deiete I PUT PUT for noncoiiections Largeiythe same as in HTFP PUT for coiiections PUT can potentiaiiy resoit in tne creation or deietion amp eati ta ooiiection In tnese cases PUT shouid iaii wnen PUT creates a nonemiiemion entity as a member in a ooiiection tnan aii ancestors must exist prior to tne PUT or tne PUT shouid iaii WebDAV Adds Methods I PROPFIND I PROPPATCH MKCOL COPY I MOVE LOCK I UNLOCK WebDAV HTTP Extensions I PROPFIND Retrieve the properties stored for the indicated RequestURI Can be used to find a specific property value Can use propname to nd names of existing properties or llprop to nd all names and values I PROPPATCH L Set or remove properties stored for the specified RequestURI WebDAV HTTP Extensions I MKCOL Create tne coiiection soecitied oy tne RequestURI ii All ancestors in tne RequestURI rnost eXist onorto creation or tne request must taii I COPY ii oreat complete copy ottne URI soecitied in tne RequestURI at tne soecmed Destination ii Tne Destination neader element rnost oe included in tne request neader COPY on properties must create an exact copy of all iive orooerties tortner soecmed oy cooy de nition WebDAV HTTP Extensions I MOVE For noncollections MOVE is the equivalent of a COPY followed by a DELETE on the same Request RI MOVE for properties must implement the same semantics for the COPY operation For collections MOVE must copy the entire collection recursive y WebDAV HTTP Extensions I LOCK Requests a lock on the RequestURI Locks are granted for specific entities andor collec ions When a lock is granted it applies to the entity and all of the properties of that entity Locks include a timeout a time when the lock will I UNLOCK r Releases the lock on the speci ed RequestURI Additional WebDAV Issues I What happens when a person already has a lock and another look is requested I WebDAV specifies several new response codes Transport Layer Security TLS I The TLS Protocol 10 I Designed based on SSL 30 o SSL 30 is owned by Netscape and is patented I rchZ46 January 1999 Dierks ampAen The TLS Protocol Version 10 Why does TLS matter I Internet amp TCP connections are inherently insecure I Transport Layer Security facilitates open generalized security for ecommerce on the Internet TLS Basics I Two key parts c TLS Record Protocol I Used to encapsulate other protocols I Reliable amp private message delivery a TLS Handshake Protocol Establish peer identity authentication I Negotiate a shared secret that will be used to encrypt a connection TLS Record Protocol I Messages may include elds for length description and content I Sender accepts message from higher level tragmerits message into blocks cpmpresses each block i encrypts and transmits the result I Receiver decrypts verifies decpmpresses ii reassemples Delivers message to higherlevel TLS Handshake Protocol The TLS Handshake Protocol lnvolves the followmg steps Exchange heho messages lo agree on algomhrns exchange an om ad c esslon resdrnp o Exch ange rh e necessary oryplographl c param elers lo ahow rh e chem and sener lo agree on a prern asler sacral cl rem an d sener lo amh ermoale lhemselves Generals a masler sacral rrorn me premasler sacral and exchanged randorn values 7 Provlde secdmy paramelers lo we record layer Allow me chem and server lo venry mar lhelr peer has oaloulaled me sarne secdmy paramelers and max me handshake occurred whhom lampermg by an anacker How does this really work egular TCP Type Connechon How does this really work TLS Handshake chem heho i 4 server heho In me heho sequence may exchange a shared sacral mar lamhlales encryphng me oonnechon Mdsr agree on oom key sh ared sacral l omhrn How does this really work Quick Overview I Historical background I Web as a system I Protocols v HTTP Software that implements the protocol browsers ers rum 5 web crawlers pruXies v WebDAV STL I E ensiuns to the protocol I Extensions through active content 39i CGI CGI Common Gateway Interface I CGI was a specific feature ofthe NCSA web server I The CERN server did not originally support it I CGI is not an RFC CGI can be implemented differently on different sewers What does CGI do What does CGI do l CGI is a mechanism that allows a web server to create dynamic content by using code a The Request URI ls treated as code How does it know that the RequestURI should be executed What does CGI do I How does it know that the RequestURI should be executed Put the scrlptcode ln a speClaI place so that the lncomlng Request URI can be ldentlfled c SpeClal place Icgl bln CGI APIs I CGI is not a Standard There is no RFC but there have been attempts CGI can be impiemented differentiy on di erent servers Different environment variabies can be exposed 9 E m a a m n I m E m a m 2 i e i 2 a 3 m n e a m a I There are several different ways to make CGI work NSAFI Netscape ServerAF l ISAFI Internet ServerAF l Microsoft SAFI Spygiass Server ache AFI CGI Assumptions I Original Assumptions CodingScripting is somewhat specialized and probably not something every user Webmasters will have control over the code Security can be maintained by the Webmaster Server is running on a Unix OS CGI getting information into the script or code I Making CGI work Communication to the CGI code is performed through environment variables What are environment vanabiesquot CGI getting information into the script or code I Making CGI work r Communication to the CGI code is performed through environment variables What are environment vanabiesquot o These are arameters or characteristics orme sheiimmmand iirie environment Standard input Request message oody w Standard output Response oody or header and oody in many cases CGI environment variables SERVER SOFTWARE SCRIPT NAME S GATEWAY INTERFACE mm mm aux ltlt rrirri aux 111 oz mo i i O o O REQUEST METHOD PATH INFO PATH TRANSLATED nuna gt c CONTENT LENGTH Configuring CGI in Apache Example 0 Configuring httpdconf I ScriptAlias Directory gt Setting up scripts chmod ax ltscriptnamegt z The Request URI the URL CGI Limitations I CGI is good but it has some limitations i Must generate a full page each execution CGI code executes in the same us r space as the web sener security issues No easy general solution if all users want to write I C CGI Limitations I Attempts to fix some CGI limitations Apache can use URL mod rewrite matching to allow each user to have a cgibin directory I Administrative headaches i Special script CGIWrap that wrappers a CGI call so that users writing their own CGI code only get limite perm39 sions Dittereht administrative headaches I None of these solve some basic problems With CGI G Partial Dynamic Content I Basic idea ii ost dynamic pages are a bunch of static content formatting that surrounds some dynamic dat Instead of embedding the page into the code like CGI embed the code into the page Interpret these pages that have special name extensions ones that are notjust html or htm Embedded Scripting Languages I ServerSide scripting languages 7 ASP Active Server Pages JSP Java Sewer Pages 9 PHP Perl Helper Pages AS P I Microsoft s embedded scripting approach I Embed Visual Basic programming constructs in HTML pages I Tightly integrated with IIS I Easy to get going quite robust JSP 1 I Sun Microsystem s embedded scripting approach I Embed Java code in the HTML page I Multiple implementations r Tomcat seems to be Winning 39 Reasonable integration With Apache I More complex to set up PHP Perl Helper Pages The Perl community s embedded scripting approach nto I Perl and Perl like commands are embedded HTML pages Reasonable integration with both IIS and Apache Many many external sources for help and code Thousands of diehard programmers work on PHP and Perl I Very robust system multiplatform 20 Routing WANS Protocol Layenng January 16 2003 341 Intro Objectives waseww WmtemmmemmmonWAN inteimmednm s E 5 E a What 5 a 5mm mm WhatsARV mmm piwmlma Building ever larger networks Routers facilitate traf c control Routers use multiple interfaces NICs to connect different types of netwo k Routers allow for the scalable construction of ever larger networks I Which gets us to WANS What is a WAN I Wide Area Network WAN 4 Extend the reach of a LAN Connect remote offrces wrthrn a crty or cross coun It rs the routers that have to be connected There are drfferent types of connectrons wrth drfferent charactenstrcs A Basic WAN Headquarters LAN Remote LAN Long Drstance Commumcatron Mema WANRouter Connections I Commercial T1T30C10CS ISDN I Frame Relay ATM I Consumer I Cable I DSL T Carrier Lines I Often used for PBX phone systems I Deployed as pointtopoint connections Between business and phone company Between remote business locations I T1 amp T3 are common T1 15 Mbps T3 44Mbps I Related are the Optical Carrier lines 00 1 001 51 Mbps 003 155Mbps I A DSUCSU is required on each end Data Service UnitChannel Service Unit to translate the signaling used by the phone company to the local network signaling CSUDSU 39 l R1455 mac Din15 lmulcl 7 to T l llne 7 T Carrier cost a large factor While a T1 is a slow link at 15Mbps compared to a local Ethernet running 10 or 100Mbps costs for such connections are VERY expensive 800 1200 per month are typical again the cost will vary with distance Phone com anies often price based on voice traffic that they are familiar with not data tra fic Since a T1 is the equivalent of 24 voice lines we should of course charge the same as 24 individual voice lines Or a T3 is equivalent to 672 voice lines so it should be 672 times as much as a single voice line rig I 20month voice line quot 672 13440 per month Some companies now will give you a base amount of bandwidth you can use and if you have more traffic charge you extra I Typically see 4000month type costs wth this type of service for T3 High Capacity Circuits S Synchronous Transport Signal also commonly called 00 Optical Carrier circuits as they require optical ber STSl or OCl 5184 Mops OS 48 248832 Mops ISDN Integrated SeNlces Digital Network ISDN Innlally planned as aservlue thatwould extend to indivrddals and srnall business Typlcally SAKbps perdara channel Baslcservlue provldes 2 data ahannels and l sentrel ahannel of l Kbps rain ldr hml ml Ln 1mln per channel Net that fast by today s standards Mahyluke that ISDN stands for It still Does Nothing Frame Relay I Designed to connect LAN segments across wide areas I Can operate at various data rates from 1 100Mbps In pradlCE usually o ered at 15Mhps rates i Usually priced much less than Tl I Supports Virtual Circuits for dedicated connections among several sites Pvc s Private Virtual Connedlons that are always setup SVC S Swltched Vlrlual the call Sample Frame Relay Cloud Frame Remj rmm Frame Relay Advantages Abrhty tn easrr add addrtrdhar mmmts Itydu have murtrpre rdeatrdhs unhKE 71 where ydu wuurd have td mstaH a dedreated whheetdh between each srte m a mesh wrth Frame Reray eaeh srte edhheets tn the etudd ahd thrdugh the deed td ahy uthersrte Large pdtehtrar Gustsavmgs as a reset cdhheetrdh drrehted guararteed dehvery at packets Suppurts speemeatrdh at Quahty at Senme st Asynchronous Transfer Mode ATM I So d as the next generation network SmaH xed srzed trarhes eaHed GEMS 5 detets header 48 detets payrdad r attrerhery tast swrtchmg at news reduce transmrssrdh deray reduceptter vded tra AN A r pterhehtatrdns r u tragrgabrt trahsrhrssrdh speeds Cable Modem I Cable company has reserved 1 3 channels for data I Symmetric or Asymmetric senice depends on the sWitches at the cable company I Speeds are typically 3 50Mbps I SerVice is shared in a bus Digital Subscriber Line DSL I Digital Subscriber Line I Uses standard phone lines I Symmetric and Asymmetric senice I DSL Modem splits the line into multiple digital channels CSUDSU I Senice is sWitched single line per subscriber WAN Characteristics 39 Connection Model 5 Connection Type 39 Ownership gt Performance Connection Model I Circuit is a dedicated connection between locations Old telephony model Resource intensive possibly 0n2 wires to connect all nodes I Virtual Circuits 39ve the perception of dedicated wire by multiplexingsharing a single 39 Works because often there are big gaps where no data is sent bursty traf c Connection Types l Connection Oriented i Guarantee delivery of packets PrOVide reliable communication Q08 l Connectionless No guarantee of delivery Assumed unreliable communication I Public Ownership I Private the oetuoi WAN connection A packets right to passquot is otten restricted All packets have a right to passquot through the network I Virtual Private Network VPN oeeioi equipment on eoe oto WAN connection validates packets often through eneryotion ow this can o en be done in software Network Performance I Bandwtdth capactty The theoretical speed of transmission frequency measured in Hertz I Throughput capaClty volume of data per unit time accounting for the handling of the data I Delay r How long data stays in a network Making the Hardware Useful Winn Transmission Packets Hubs Swttches Routers LANs WANs I Hinted at the need for software to make it all work to make it useful Networking A Logical Model I How do applications use the network I How do endpoints communicate I A logical model forthe network is defined by protocols protocol stacks and layers Protocols I Protocol an agreement about how endpoints will communicate Protocols are an end to end concept I Protocol Suite a set of protocols that handle a full range of communication details and error handling also stack Layering I Layers a logical separation of concerns among the parts of a protocol stack is A layer often defines an interface API for the functions that compose that protocol level ISO 7 Layer Model Appllcatlnn Application Physical Other Layered Models Function Management Data Flow Appllcatlnn i em i Wink ewarmnegs Physlcal Physlcal IBM SNA DECnet Internet Reference Model What happens in a layer Network Access I Consider the Internet Reference Model I Network Access The functions of this layer are largely hidden from the user Often tied to the speci c network hardware eg Ethernet Token R39ng etc The Address Resolution Protocol ARP exists here to map physical addresses to intemet addresses What happens in a layer lnternetwork lnternetwork Facilitates delivery of intemet packetsn This is often considered the lntemet Protocol IP layer 7 Defines the basic datagram packet Facilitates fragmentation amp reassembly x Defines the addressing scheme Facilitates routing to remote machines a t What happens in a layer HosttoHost Transport I HosttoHost Transport gt User Datagram Protocol UDP I Unreliable packet delivery I No builtin acknowledgement of packet I Very low overhead from the network v Transmission Control Protocol TCP Reliable connectionoriented service Attempt to guarantee delivery packets are acknowledged additional overhead I Byte stream like reading files What happens in a layer Application I Application File Transfer Protocol FTP cl Telnet Simple Mail Transfer Protocol SMTP a Domain Name Senice DNS t Network File Senice NFS Problems for protocols I As you can see protocols at different levels must handle different problems Out of order delivery Too many packets delivered at once Packets lost in transmission Sliding Window 0 A common packet transmission and acknowledgement technique that facilitates solutions to all of these problems Our first protocol ARP ARP solves the problem of assoclatlng p yslcal MAC addresses Wlth Internet Protocol IP addresses I ARP ls a Network Access layer protocol just above the Physlcal layer I We ve not really lntroduced and dlscussed IP addresslng that Wlll happen later ARP Address Resolution Protocol ARP provides a mechanism for one device to discover the MAC address of another device when a you know is an IP a I ARP works by sending a broadcast packet I Every NIC receives that packet and the Network Access layer processes It and checks it if is this eVIce I If it is this device responds witha packet giving the requesting machine this devices MAC address ARP tables ch deViee maintains an ARP table tnat lists MAc addresses and IF address tnat it nas recently used to control tne number at broadcasts required You can use tne arp aquot command to dlsplay tne arp table Let s try r Flrsttl39y arp ea Now plrlg lzs 203 mm mm i Now arp ea again to see the new table ii Now plrlg lzs 203 mm mm again 7 did we haveto ARP again to dellver the packet 7 Let s luullt wlthtcpdump Delivering packets to a different network We want to find a device on another network such as a PC on the UW Computer Science network That PC has an IP address 12895156 i Du we iust sent out an ARF broadcast looking fur the devicequot I Recaii tnat cinerent networks are connected to eacn otn er using routers Recaii tnat routers do not pass broadcast tra ic ARP is croaocastso ARP will not pa tnroiinn a router tne le on tne PC in Computer Science will nevei p PC on our network and be acieto res no wnat it routers oio pass broadcast would tnis be good 7 Nol Every cornputero nei ernet would get an ARP croaocast paciltet eve time an Etnernet device needed to use ARP Tnat would be a LOT o croaocast tra icl So rnucn tnat tne Internet would raii to pieces Solution I Next week we ll discuss this as we get into TCPIP Summary I WAN construction characteristics I Connection types I Layered models I Protocols protocol suites Distributed Architectures Info 341 Februaiy 13 2003 Objectives What are basil aspects of an operating system is a system amhiteetuiev What are some characteristics ofdistnbuted What are the tiers m a 3 tier modem What is the resource discovery problem V Slight Digression I Before we can really talk about distributed architectures and distributed systems Operating systems manage machinesystem resources and me iate between the hardware and the applications Basic OS Concepts JobsProcess onitor Multiprogramming l0 Protection Memory Protection CPU Protection lllllllll l E m m r m 2 z m OS Organization I 08 SeNices File System Manipulation Error Detection I Sewices prowded through 08 system calls OS Design I Much like networking rely on a layered model at Some terms procedure call parameter passlng process thread aemon mutual excluslon semap ore IIIIll o Conceptual Background I What is a process Conceptual Background I What is a process A process ls a program that ls runnlng What ls necessary for a process Conceptual Background I What is a process A process is a program that is running What is necessary for a process w The state of execution of a program I Program Counter PC Register Values Stack Memory Page Set Underlying Assumption I The assumption underlying the entire discussion for today is the presence of a low latency high bandwidth network I Originally this could only be through a LAN but now the concepts apply to the Internet in general What is an architecture I System Architecture 4 A description of the components and the relations among them Hardware Software both In a distributed system you have to have both The architectural views I Take three Views of distributed systems I Low level Distributed function calls RPC I Medium Distributed system services I High level i Applications as Multitiermode Feer toF eer service 5 Factors to consider I Three factors to consider among others I Transparency i Does the system support seamless use of resources from the users perspective I Consistency Does the system maintain consistent operation I Scalabilit oes the system support small as well as large con gurations system components users Distributed Functions I Remote Procedure Calls RPC i Designed to facilitate writing clientserver are Generalization many clientserver applications have a similar s ruc ure Abstraction a procedure call to another machine i Quite low level at the level of a function call I Implementations i Sun ONC Open Network Computin OSF DCE Distributed Computing Environment Microsoft Object RPC amp COMDOOM General RPC Approach I Programmer designs software as normal I Considers the relation among the software components I Determines which components are best organized remotely Software component relation I Software has many possible relations I Two critical relations Procedural the ow of control Data the ow of data I Simple architectural descriptions are often called box and line quot Procedure Call Graph I Example box and line architecture I Also known as a uses hierarchy or uses graph Partition the application I Which parts of the application belong where I Which parts are client and which are server How does this work lient machine Server machine Procedures still pass data I How is data passed between the client and server Procedures still pass data I How is data passed between the client and sewer I XDR eXternal Data Representation htons htonl ntohs ntohl is the concept but mplex Imagine doing this for all possible data representa ions Writing the data out on the network and reading it back in is called marshalling Considering RPC I Transparency For the user quite transparent you don39t know where the server is For the programmer not transparent at all I Consistenc High level of consistency Semantics are of a procedure call very clear I Scalability Not very scalable mostlyjust a single client and single server anything more gets unwieldy Distributed system services I Level up from functional distribution SerVice distribution I The goal is to seamlessly share a large number of services 0 Many processors look like one a Share high performance print serVices Share speCial peripherals Three models I WorkstationSewer model This should be familiar to you much like our labs I Processor pool model i Terminals connect to a collection of processors that look a single machine I Integrated Mixture of workstations and terminals where a processor pool handles larger tasks WorkstationServer Model Each user prOVided With a workstation Processes run locally Generally for GUI tasks Highend peripherals are managed by remote dedicated seners ners manage serVices for the workstations I Similar to the labs in the iSchool Considering the Workstation Model I Transparency Nothing is transparent you have to keep track of everything eg are your les on this machine I Consistenc Low level of consistency software will not always run on each machine I Scalabilit i Scalability is dependent on the servers Processor Pool Model I Users access the system through terminals Processes are run remotely through a processor senice Heterogeneous equipment processors can be easily accommodated I Execution can be load balanced Highend peripherals are still managed by a specific sener Considering the Processor Pool Model I Transparency High process transparency I Consistency High level of consistency I Scalability Very scalable I Why didn t this Win Not at all good for GUI applications Integrated model Machines are independent Global naming scheme Shared directory senice file senice LoadLogin balancing Process migration Highend peripherals can be connected to a single machine and are seamlessly shared I Similar to meadvergil Considering the Integrated Model I Transparency High transparency for processes i Low transparency for services I Conslstenc High level of consistency I Scalablllt i Very scalable but you need many workstations Application Services I As network technology 39mproves Transmission latency decreases Rellablllly improves I Things that could only be done in a LAN environment are now being done on the lntemet at I This was the hopapromise of the Application ervice Provider SP dot com movement An ASP was like an ISP but betterbigger MultiTier Models I Commonly we speak of clientserver models Cllent consumes some senlce Sewer prOVldes a seerce What happens when a sener consumes a senlce Threetier Model Traditional mm The logic of the application is spread across multiple sewers Client handles user interaction tween client and backend is known as the application server it han es the business logic The backend server is often a relational database Considering MultiTier Models Transparency Low transparency for users need to know where Low transparency for application Conststenc High level of consistency Scalability Very scalable as one tier becomes loaded add another server at that tier PeertoPeer Model In the basic peertopeer model evew machine is both a client and a server Each peer can both produce and consume a senice Gnutella Freenet Mixmaster remailers But this is not without problems PeertoPeer Services r I How do peers find the services I How do we make sure that one peer is not overwhelmed PeertoPeer problems I Resource Discovew SerVices data I Load Balancing Make sure a peer node is not overloaded I Architecture configuration of peers How to organize peers effiCiently adhoc I Security Hybrid PeertoPeer Model I One attempt at solving the resource discovery problem I In a hybrid peertopeer model Well Know sewers super nodes resolve the resource discovery problem for peers Peers connect to well Known servers then to each other PeertoPeer Super Nodes I The super nodes are well know I Super nodes provide directory service Allow peer nodes to register available services and look up needed services Considering PeertoPeer Models I Transparency Low transparency for services resource discovery a problem in pure mode High transparency in the hybrid model I Consrstency Low consistency I Scalabilit Exceedingly scalable


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.