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

Metamaterials & Adv Ant Theory

by: Shyanne Lubowitz

Metamaterials & Adv Ant Theory ECE 6962

Shyanne Lubowitz
The U
GPA 3.85


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

Class Notes
25 ?




Popular in Course


This 127 page Class Notes was uploaded by Shyanne Lubowitz on Monday October 26, 2015. The Class Notes belongs to ECE 6962 at University of Utah taught by Staff in Fall. Since its upload, it has received 51 views. For similar materials see /class/230011/ece-6962-university-of-utah in ELECTRICAL AND COMPUTER ENGINEERING at University of Utah.

Similar to ECE 6962 at The U



Reviews for Metamaterials & Adv Ant Theory


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: 10/26/15
ECE 6962003 Fundamentals of Wireless Ne rworking Spring 2007 Ins rruc rors Roland Kemp rer and RongRong Chen Grader Hong Wan Roland Kemp rer Office MEB 3252 Phone 801 581 3380 Email kempferen9ufahedu Office Hours Tuesday af rer class and Fridays 12001300 PM or by appoin rmen r Rang Rang Chen Office MEB 3106 Phone 801 585 7367 Email rcheneceu rahedu Office Hours Tuesdays and Thursdays 10001100 AM or by appoin rmen r Hong Wan Email wanen9u rahedu Course Information Classes TH 340 PM500 PM in EMCB 114 Class WWW site wwweceutaheduece6962003 Most of the material will be posted there syllabus TA info class notes power39point pdf assignments Course Information more Cour39se materials Text Computer Networking A Top Down Approach Featuring the Internet 3quotquot Edition Jim Kur39ose amp Keith Ross Addison Wesley 2004 Special Topicsquot mater39ial readings Class notes modified version of slides provided by Jim Kurose d Keith Ross Course Information more Classes are mostly lecture presentation based with demos whenever feasible Class attendance is mandatory If you have to miss a class please contact us in advance Course Information Who is this course for MSPhD students Prerequisites any one 39 ECE 5520 Digita Communication Systems 39 ECE 6962 Advanced Topics in Communication 39 ECE 5325 Wireess Communication Systems 39 ECE 5510 Random Processes 39 ECE 55306530 Digita Signa Processing 39 ECE 696 Software Radio Special permission may be given talk to us Course Information more Grading written homeworks approx 68 15 midterm 1 25 midterm 2 25 final project 30 class participation 5 Final grading will be on a curve with the average at B Course Information more Two Midterm exams closed book Calculators laptop computers tables of integrals etc are not permitted one sheet of notes both sides for the first midterm exam two sheets for the second midterm exam No make up exam will be given unless permission is granted in advance by the instructor Course Information more Final project work in groups of two select three papers from an area in wireless networking to be announced From those we will select one paper per group Summarize the paper in a four page report double spaced and give a 25 minute presentation in class Course Information more Homework policyprocedure Consultation with other students on the homework is permitted however each student must write and submit independent solutions Course Informcn ion more Chea ring is a serious problem and we will no r rolera re if If you use rhird par ryquot ma rerial for your homework you have To reference if properly Example 1 You find a hin r on The in rerne r in a book sees if on TV You read if you reexpress rhe solu rion in your homework and you reference your source properly quoth r rpquot Result You ge r full credi r Course Informcn ion more Example 2 While working on a homework problem you find hin rs for a problem on The in rerne r in a book sees if on TV You copy if verba rim and you do no r reference your source Result you will ge r zero credi r for your assignmen r and we reques r you explain yourself Course Information more Example 3 You collaborate with another students on a homework problem and your writeups are identical Result In case submitted homework that belongs to different students is identical all students will get zero credit for their assignment and we request you explain yourselves to us We ask you to bring up any problems you might have in class so that we can all learn from each other Course Information more inclass style interaction questions please you are not expected to read class notes in advance but you should prmt them before the class Questions comments How does ECE 6962003 fit in ECE comms CS networking claSSes claSSes Assumption the interface is clean ie no information about the channel required Does not work w wireless lossy channels leads to performance degradation What is this course about TopDown introduction to computer networks with an emphasis on wireless networking learn principles of computer networking learn methods to cope with the wireless channel from a networking perspective Internet architectureprotocols as case study Goas learn a lot not Just factoids but principles and practice have fun well it should be interesting at least How do we approaching the challenge Networking Principles of Netwdrking r how it werks x A topdown approach We39ll cover endsystem applications endend transport network core routing hooking nets together Wireless linklevel protocols eg IEEE 80211 ECE 6962003 Networked Systems Cellular Public Switched Access Network Telephone Netrk Wireless LAN W VJ DF Mobile 7 39 Adhoc E Network C lnternet Network9 Course Overview Part 1 Introduction text Chapter I What is the Internet what is a protocol Network edge network core network access Delay loss in packetswitched networks Protocol layers service models Course Overview Part 2 Application Layer text Ch 2 Principles of network applications Web amp HTTP File transfer FTP Electronic mail in the Internet The Internet39s directory service DNS Course Overview Part 3 Transport Layer text Ch 3 d handouts Transportlayer services and principles Multiplexing and demultiplexing applications Connectionless transport UDP Principles of reliable data transfer Principles of congestion control TCP congestion control TCP over lossy wireless links part 1 Course Overview Part 4 Network Layer text Ch 4 d handouts Network service model Routing principles Hierarchical routing IP the Internet Protocol Routing in the Internet What39s inside a router MIDTERM 1 EXAM Course Overview Part 5 2 classes text Ch 5 and handout gt Overview of issues in physical layer gt Link Layer DIntroduction El Error detection and correction techniques in link layer parity check checksum cyclic redundancy check CRC Course Overview Part 6 Distributed MAC in wireless networks 3 classes text Ch 5 S 6 amp handout gt slotted accessunslotted access gt ALOHA slotted ALOHA gt slot size selection syncunsync slots gt physical carrier sensing CS impact of CS threshold gt hidden terminal and exposed terminal gt collision detection and avoidance gt reliability ACK retransmission RTSCTS Course Overview Part 7 Imgroving Wireless MAC 2 classes text Ch 5 d d handout gt Overcome hidden terminals busy tone amp virtual carrier sensing gt Reduce collision probability ppersistent protocols amp backoff intervals Course Overview Part 8 Wireless and Mobile Networks 2 classes text Ch 6 amp handout gt Wireless LAN 80211b El physical layer El architecture El MAC protocol Distributed Coordination Function DCF CSMACA collision avoidance RTS CTS El 80211 frame gt Wireless LAN 80216 physical Layer MAC gt BlueTooth Course Overview Part 9 To ics in Wireless MAC 2 classes text Ch 6 amp andout gt Priority scheduling gt Fairness gt Distributed fair scheduling gt Rate control gt Power control gt Joint power and carrier sense threshold control Course Overview Part 10 Selected Topics handout gt exploiting antenna capability in wireless networks TCP over39 wireless part 2 gt Additional topics Chap rer39 5 Link Layer and LANs James F Kurose Keith W Ross A Top Down Approach Feafurng f1e In femef 3rd edition Jim Kur39ose Kei l h Ross AddisonWesley July 2004 5 DataLink Layer 51 Chap rer 5 The Da ra Link Layer Our goals CI unders rand principles behind da ra link layer services 0 error de rec rion correc rion 0 sharing a broadcas r channel mul riple access 0 link layer addressing o reliable da ra Transfer flow con rrol done CI ins ran ria rion and implemen ra rion of various link layer Technologies 5 DataLink Layer 52 Link Layer CI 51 In rr oduc rion and CI 56 Hubs and swi rches services CI 52 Error de rec rion and correction CI 53Mul riple access pr o rocols CI 54 LinkLayer Addressing CI 55 Ethernet 5 DataLink Layer 53 Link Layer In rroduc rion Some Terminology CI hos rs and rou rers are nodes CI communica rion channels Tha r connec r adjacen r nodes along communica rion pa rh are links 0 wired links 0 wireless links 0 LANs CI layer2 packe r is a frame encapsula res da ragram datalink layer has responsibility of Transferring da ragram from one node To adjacen r node over a link 5 DataLink Layer 54 Link layer confex r CI Da ragram Transferred by differen r link profocols over differen r links 0 eg thernef on firsf link frame relay on infermediafe links 80211 on lasf link CI Each ink profocol provides differen r services 0 eg may or may nof provide rdf over link franspor ra rion analogy CI Trip from Prince ron ro Lausanne o limo Princefon To JFK 0 plane JFK To Geneva 0 Train Geneva To Lausanne CI fouris r da ragram CI rranspor r segmen r communica rion link CI franspor ra rion mode link layer pro rocol CI Travel agen r rou ring algori rhm 5 DataLink Layer 55 Link Layer Services CI Framing link access 0 encapsulafe dafagram info frame adding header Trailer 0 channel access if shared medium 0 quotMACquot addresses used in frame headers To idenfify source desf differenf from IP address CI Reliable delivery be rween adjacen r nodes 0 we learned how To do This already chapfer 3 o seldom used on low bif error link fiber some fwisfed pair 0 wireless links high error rafes Q why bofh linklevel and endend reliabilify 5 DataLink Layer 56 Link Layer Services more CI Flow Control 0 pacing between adjacent sending and receiving nodes CI Error De feeton 0 errors caused by signal attenuation noise 0 receiver detects presence of errors signals sender for retransmission or drops frame CI Error Correction 0 receiver identifies and corrects bit errors without resorting to retransmission CI Halfduplex and fullduplex o with half duplex nodes at both ends of link can transmit but not at same time 5 DataLink Layer 57 Adop rors Communico ring doTogr om link layer pr39oTocol r39CV39 9 sending node k A Ode odopTer odopTer III link layer implemen red in CI receiving side odop ror aka NIC 0 looks for39 errors r39d r flow 0 E rher ne r cor39d PCMCI coerII 3 cor39d 80211 cord 0 ex rr39oc rs do rogr om posses CI sending side To r39cving node 0 encop5ulo res do rogr39om in D adapfer is Semiquot a frame ou ronomous 0 adds error checking bi rs 3 link amp physical layer3 r39d r flow con rr39ol e rc 5 DataLink Layer 58 Link Layer CI 51 In rr oduc rion and ser39VIces CI 52 Error de rec rion and correction CI 53Mul riple access pr o rocols CI 54 LinkLayer Addressing CI 55 E rher39ne r CI 56 Hubs and swi rches CI 57 PPP CI 58 Link Vir rualiza rion ATM 5 DataLink Layer 59 Er39r39or39 De rec rion EDC Er39r39or39 De l ecfion and Correction bi l39s redundancy D Data protected by error checking may include header fields Er39r39or39 de l39ec139ion no139 100 reliable profocol may miss some errors bu l39 r39ar39ely lar39ger39 EDC field yields be H39er39 defection and correction Catagram Y gt detected error lt d data bits h D EDC I D39 EDC39I biterror prone link 5 DataLink Layer 5 10 Pari ry Checking 5mge Bit Purim Two Dimensional Bi r Pari ry Defecf sinQIe 1 errors Defect and carrecf single bit errors I39OW parity parity d data bits Di bit 0111000110101011 column parity 1 O 1 O 1 1 1 1 O 1 1 parity 111100 1110 mmr 011101 011101 001010 0 1010 no errors Parity error correctable single bit error 5 DataLink Layer 511 In rerne r checksum Goal de rec r errors eg flipped bi rs in Transmi r red segmen r no re used a r rranspor r layer only Sender CI rrea r segmen r con ren rs as sequence of 16bi r integers CI check5um addi rion 139s complemen r Sum of segmen r con ren rs CI sender pu rs check5um value in ro UDP check5um field Receiver CI compuTe checksum of received segmenT CI check if compuTed checksum equals checksum field value 0 NO error deTecTed 0 YES no error deTecTed Buf maybe errors none fheess More laTer 5 DataLink Layer 512 Checksumming Cyclic Redundancy Check CI view data bits D as a binary number CI choose r1 bit pattern generator 6 CI goal choose r CRC bits R such That 0 ltDRgt exactly divisible by G modulo 2 0 receiver knows G divides ltDRgt by G If nonzero remainder error detected 0 can detect all burs r errors less Than r1 bi rs CI widely used in practice ATM HDLC 4 Cl bits gtlt rbits P bit I Ddata bits to be sentl RCRC bits pattern r mathematical D 2 XOR R formula 5 DataLink Layer 513 CRC Example Mkmt D2r XORRnG 101011 100 01110000 eqUIvaenfy G II1I Ill I D 1001 D Zr n6 101 equivaen y 3 8 S 0 if we divide 32quot by 1 001 l l O G wan l39 remainder R 000 1100 1001 1010 l O O l R remainder O l Rlt39 39 5 DataLink Layer 514 DZquot 6 Link Layer CI 51 In rr oduc rion and ser39VIces CI 52 Error de rec rion and correction CI 53Mul riple access pr o rocols CI 54 LinkLayer Addressing CI 55 E rher39ne r CI 56 Hubs and swi rches CI 57 PPP CI 58 Link Vir rualiza rion ATM 5 DataLink Layer 5 15 Multiple Access Links and Protocols Two types of quotlinksquot CI pointTopoint o PPP for39 dialup access 0 pointtopoin t link between Ethernet switch and host CI broadcast shared wire or39 medium 0 Oldfashioned Ethernet 0 upstream HFC 0 80211 wireless LAN Blah blah blah ZZZZZZZZZZZZZ shared wire shared wireless satellite cocktail party eg Ethernet eg Wavelan 5 DataLink Layer 516 MulTiple Access proTocols CI single shared broadcasT channel CI Two or more simulTaneous Transmissions by nodes inTerference O collision if node receives Two or more signals aT The same Time mufpe access pro focal CI disTribuTed algoriThm ThaT deTermines how nodes share channel ie deTermine when node can TransmiT CI communicaTion abouT channel sharing musT use channel iTselfl o no ouTofband channel for coordinaTion 5 DataLink Layer 517 Ideal Mul riple Access Pro rocol Broadcas r channel of rate R bps 1 When only one node wan rs ro rr39ansmi r if can send a r r39a re R 2 When M nodes wan r ro rr39ansmi r each can send a r average rate R M 3 Fully decen rr39alized o no special node To coordinate Transmissions 0 no synchroniza rion of clocks slo rs 4 Simple 5 DataLink Layer 518 MAC Pro rocols a Taxonomy Three broad classes CI Channel Par ri rioning o divide channel in ro smaller quotpiecesquot Time slo rs frequency code 0 alloca re piece To node for exclusive use CI Random Access 0 channel no r divided allow collisions 0 quotrecoverquot from collisions CI Taking Turnsquot 0 Nodes Take Turns bu r nodes wi rh more To send can Take longer Turns 5 DataLink Layer 519 Channel ParTiTioninq MAC proTocols TDMA TDMA 139ime division multiple access CI access To channel in quotroundsquot CI each sfa rion ge rs fixed leng rl i slo r leng rl i pk r Trans Time in each r oun CI unused slo rs go idle CI example 6S la rion LAN 134 have pk r slo rs 256 idle 5 DataLlnk Layer 520 Channel Parfifioning MAC profocols FDMA FDMA frequency division mulfiple access CI channel spec rrum divided info frequency bands CI each s ra rion assigned fixed frequency band CI unused Transmission Time in frequency bands 90 idle CI example 6sfa rion LAN 134 have pk r frequency bands 256 idle Time V ll o E U 0 gt U lgt E m 3 l U39 m L H 5 DataLink Layer 521 Random Access Pro rocols CI When node has packe r To send 0 rr39ansmi r a r full channel da ra rate R o no a pn39orcoor39dina rion among nodes CI Two or39 more rr39ansmi r ring nodes collision CI random access MAC protocol specifies 0 how To de rec r collisions 0 how To recover from collisions eg via delayed r39e rr39ansmissions CI Examples of random access MAC pr39o rocols O slo r red ALOHA o ALOHA O CSMA CSMACD CSMACA 5 DataLink Layer 522 Slotted ALOHA Assumptions Operation CI all frames same size III when node obtains fresh 3 Time is divided into frame it transmits in next equal size slots time to 5l l transmit 1 frame III no collision node can send CI nodes start to transmit new frame in he 5l l frames only at El if collision node beginning of slots retransmits frame in each CI nodes are synchronized SUbsequenl 5l l Willi Pr39Ob CI if 2 or more nodes p unl39l Success transmit in slot all nodes detect collision 5 DataLink Layer 523 Slo r red ALOHA node1 nadaE III we I I I I I I I I I I I I I lm i E C S E C E S 8 Pros m g singe ac ve node can CI collisions wos ring slo rs con rinuously rr39onsmi r CI idle slo rs of full rate of channel CI nodes may be able ro CI highly decen l39r39alized de rec r collision in less on 5o5 in nodes rhon Time To rr39onsmi r y pocke r need To be in sync CI clock synchroniza rion CI simple 5 DataLink Layer 524 SloTTed Aloha efficiency Efficiency is The longrun fracTion of successful soTs when There are many nodes each wiTh many frames To send CI For max efficiency wiTh N nodes find p ThaT maximizes Np1pquotquot1 CI For many nodes Take limiT CI Suppose N nodes Wi l39h of Np1pquotquot1 as N goes many frames To send To infiniTy gives 1e 37 each TransmiTs in soT wiTh probabiliTy p CI prob ThaT node 1 has AT besf channel success in a soT used for useful P1Pquotquot1 Transmissions 37 CI prob ThaT any node has of Time a success Np1pN1 5 DataLink Layer 525 Pure unslo r red ALOHA CI unsloTTed Aloha simpler no synchronization CI when frame firsT arrives o Transmi r immedia lely CI collision probabiliTy increases 0 frame sent at T0 collides wi lh o lher frames sent in To1o1 willoverlap will overlap with startof withendof i s frame i s frame 5 DataLink Layer 526 Pur39e Aloha efficiency P3uccess by given node Pnode Transmi rs Pno other node Transmi rs in ToLTD Pno other node Transmi rs in T0 r01 P 110 1 110 1 p imam1 choosing op rimum p and Then Ie r ring n gt inny Even worse 126 3918 5 DataLink Layer 527 CSMA Car39r39ier39 Sense Mul riple Access CSMA Iis ren before rr39ansmi r If channel sensed idle rr39ansmi r en rir39e fr39ame CI If channel sensed busy defer39 Transmission CI Human analogy don39T in rer39r39up r others 5 DataLink Layer 528 CSMA collisions spaTial layouT of nodes lt space gt collisions can sTi occur39 propagaTion delay means Two nodes may noT hear39 each oTher39s Transmission collision enTir39e packeT Transmission Time wasTed noTe role of disTance amp propagaTion delay in deTer39mining collision pr39obabiliTy 5 DataLink Layer 529 CSMACD Collision DeTecTion CSMACD carrier sensing deferral as in CSMA O collisions defecfea wiThin shorT Time 0 colliding Transmissions aborTed reducing channel wasTage CI collision deTecTion 0 easy in wired LANs measure signal sTrengThs compare TransmiTTed received signals 0 difficulT in wireless LANs receiver shuT off while TransmiTTing CI human analogy The poIiTe conversaTionaIisT 5 DataLink Layer 530 CSMACD collision defec rion lt time collision detectabort time 5 DataLink Layer 531 Taking Turnsquot MAC profocols channel par fi rioning MAC pr39o rocols 0 share channel efficien rly and fairly a r high load 0 inefficien r a r low load delay in channel access 1N bandwid rh alloca red even if only 1 ac rive node Random access MAC pr39o rocols 0 efficien r a r low load single node can fully u rilize channel 0 high load collision over39head faking rur39nsquot pr39o rocols look for39 bes r of bo rh worlds 5 DataLink Layer 532 Taking Turnsquot MAC pro rocols Polling El masTer node inviTes slave nodes To Transmit in Turn Cl COI lCCr l lS O polling overhead 0 la rency 0 single poin r of failure mas rer Token passing El confrol Token passed from one node To nexT sequenTially CI Token message El concerns 0 Taken overhead 0 la rency 0 single poin r of failure Token 6 f 5 DataLink Layer 533 Summary of MAC pro rocols CI Wha r do you do wi rh a shared media 0 Channel Par ri rioning by Time frequency or code Time Division Frequency Division 0 Random par ri rioning dynamic ALOHA SALOHA CSMA CSMACD carrier sensing easy in some Technologies wire hard in o rhers wireless CSMACD used in E rherne r CSMACA used in 80211 0 Taking Turns polling from a cen rral si re Token passing 5 DataLink Layer 534 LAN Technologies Do ro link layer39 so for 0 services er39r39or39 de rec rioncor r ec rion mul riple access Nex r LAN Technologies 0 addressing 0 E rher ne r 0 hubs swi rches o PPP 5 DataLink Layer 535 Link Layer CI 51 In rr oduc rion and ser39VIces CI 52 Error de rec rion and correction CI 53Mul riple access pr o rocols CI 54 LinkLayer Addressing CI 55 E rher39ne r CI 56 Hubs and swi rches CI 57 PPP CI 58 Link Vir rualiza rion ATM 5 DataLink Layer 5 36 MAC Addresses and ARP D32 bi r IP address 0 nefworklayer address 0 used To ge r da ragram ro des rina rion IP subne r CIMAC or LAN or physical or E rherne r address 0 used To ge r frame from one in rerface To ano rher physicallyconnec red i n rerface same ne rwork 0 48 bi r MAC address for mos r LANs burned in The adap rer ROM 5 DataLink Layer 537 LAN Addresses and ARP Each adap rer on LAN has unique LAN address 1A2FBB7609AD BroadcasT address FFFFFFFFFFFF I adapTer 7165F7ZB0853 5 DataLink Layer 538 LAN Address more CI MAC address alloca rion adminis rered by IEEE CI manufac rurer buys por rion of MAC address space To assure uniqueness CI Analogy a MAC address like Social Securi ry Number b IP address like pos ral address CI MAC fla r address por rabili ry 0 can move LAN card from one LAN To ano rher CI IP hierarchical address NOT por rable 0 depends on IP Subne r To which node is a r rached 5 DataLink Layer 539 ARP Address Resolu rion Pro rocol Ques rion how To de rermine El EGCh IP quotOde HOST MAC address of B Rou rer on LAN has knowing B39s IP address ARP Table CI ARP Table IPMAC address mappings for 1A2FBB7609AD Same nodes 137196723 137196114 lt IP address MAC address TTLgt o TTL Time To Live Time af rer which address 7165F7ZB0853 5823D7FA20BO mapping will be forgo r ren Typically 20 min 137196778 5 DataLink Layer 540 ARP proTocol Same LAN neTwork CI A wanTs To send daTagram To B and B39s MAC address noT in A39s ARP Table CI A broadcasTs ARP query packeT conTaining B39s IP address 0 DesT MAC address FFFFFFFFFFFF 0 all machines on LAN receive ARP query CI B receives ARP packeT replies To A wiTh iTs B39s MAC address 0 frame senT To A39s MAC address unicasT CI A caches saves IPTo MAC address pair in iTs ARP Table unTil informaTion becomes old Times OUT 0 sofT sTaTe informaTion ThaT Times ouT goes away unless refreshed CI ARP is plugandplayquot 0 nodes creaTe Their ARP Tables wiThouT inTervenTion from neT adminisTraTor 5 DataLink Layer 541 Rou ring To ano rher39 LAN walk rhr39ough send da ragr39am from A To B via R assume A knows B39s IP address 42QQCEBFF 55 BSB22F541A DF E EQUD1TBB4EI 391A 23FQ CDEIE 222222222221 222222222222 2222222222 111111111110 R 4QBDD2C552A B CC4QDEDCIAEIT D CI Two ARP Tables in r ou rer R one for39 each IP network LAN 5 DataLink Layer 542 EDD EDD D A creates datagram with source A destination B A uses ARP to get R39s MAC address for 111111111110 A creates linklayer frame with R39s MAC address as dest frame contains AtoB IP datagram A39s adapter sends frame R39s adapter receives frame R removes IP datagram from Ethernet frame sees its destined to B R uses ARP to get B39s MAC address R creates frame containing AtoB IP datagram sends to B NVZWCVEWME 225227514 t EarEgruurwraaroB ArzarFsrcDruar 222222222221 222 222 222 222 We wraorozrcr arzA R2222222222 w w w MEI 5743 ccrerErDurAEJD ayev DHCP Dynamic Hos r Configuration Pro rocol Goal allow hos r ro dynamI39calyob rain i rs IP address from ne rwork server when if joins ne rwork Can renew i rs lease on address in use Allows reuse of addresses only hold address while connec red an on Suppor r for mobile users who wan r To join ne rwork more shor rly DHCP overview O hos r broadcas rs DHCP discoverquot msg o DHCP server responds wi rh DHCP offerquot msg o hos r reques rs IP address DHCP reques rquot msg 0 DHCP server sends address DHCP ackquot msg 5 DataLink Layer 544 DHCP clien r ser39ver39 scenario arriving DHCP Client needs address in this network 5 DataLink Layer 545 DHCP client server scenario DHCP Server 223125 I39i me d Lifetime 3600 secs DHCP discover arriving client src 0000 68 dest 25525525525567 yiaddr 0000 transaction ID 654 2 DHCP offer src 2231 25 67 dest 255255255255 68 yiaddrr 2231 24 transaction ID 654 Lifetime 3600 secs DHCP request src 0000 68 dest 255255255255 67 yiaddrr 2231 24 transaction ID 655 DHCP ACK src 2231 25 67 dest 255255255255 68 yiaddrr 2231 24 transaction ID 655 Lifetime 3600 secs Layer 546 Link Layer CI 51 In rr oduc rion and ser39VIces CI 52 Error de rec rion and correction CI 53Mul riple access pr o rocols CI 54 LinkLayer Addressing CI 55 E rher39ne r CI 56 Hubs and swi rches CI 57 PPP CI 58 Link Vir rualiza rion ATM 5 DataLink Layer 547 ETherneT dominant wir39ed LAN Technology CI cheap 20 for39 lOOMbs CI first widely used LAN Technology CI Simpler cheaper rhon Token LANs and ATM CI Kep r up wi rh speed race 10 Mbps 10 Gbps MeTcolfe39s ETher neT skeTch 5 DataLink Layer 548 STor Topology CI Bus Topology popular Through mid 90s CI Now sTor Topology prevails CI ConnecTion choices hub or swiTch more loTer hub or 5 DataLink Layer 549 E rherne r Frame S rruc rure Sending adap rer encapsula res IP da ragram or other network layer protocol packe r in E H lerne r frame Preamble CI 7 bytes wi rh pa Hern 10101010 followed by one by re wi rh pa Hern 10101011 Cl used To synchronize receiver sender clock ra res 5 DataLmk Layer 550 therne r Frame Sfruc rure more CI Addresses 6 by res des r address and 6 by res source address 0 if adapfer receives frame wifh mafching desfinafion address or wifh broadcasf address eg ARP packef if passes dafa in frame To nefIayer profocol o ofherwise adapfer discards frame CI Type 2 by res indica res The higher layer pro rocol mos rly IP bu r o rhers may be suppor red such as Novell IPX and AppIeTaIk CI CRC 4 b ryes checked a r receiver if error is de rec red The frame is simply dropped 551 E rherne r Frame S rruc rure m CI Da ra 46 To 1500 by res CI Minimum frame size 8 preamble 6 des r Add 6 source add 2 Type 46 da ra 4 CR6 72 by res 64 by res 512 bi rs excluding 8 by res preamble CI Maximum frame size 1500 da ra 26 1526 byTes 552 Unreliable connec rionless service CI Connec rionless No handshaking be rween sending and receiving adap rer39 CI Unreliable receiving adap rer39 doesn39T send acks or39 nacks ro sending adapter 0 stream of da ragr39ams passed To ne rwor39k layer39 can have 90P5 o gaps will be filled if app is using TCP o o rher39wise app will see The gaps 5 DataLink Layer 553 Ethernet uses CSMACD CI No slots CI Before attempting a CI adapter doesn39t Transmit r39e39fmnsmiSSion if iT senses ThaT some GdGP fer waits a other adapter is random time That is Transmitting that is random access carrier sense CI Transmitting adapter aborts when it senses That another adapter is transmitting that is collision detection 5 DataLink Layer 554 E rherne r CSMACD algori rhm 1 Adap ror receives da ragram 4 If adap rer de rec rs from ne r layer amp crea res ano rher Transmission while frame rransmi r ring abor rs and 2 If adap rer senses channel sends 4845 Jam Signal idle for 96 bi r rimes if 5 Af rer abor ring adap rer s rar rs ro rransmi r frame If en rers exponential i r senses channel busy wai rs backoff af rer rhe nTh un ril channel idle for 96 bi r collision adap rer chooses Times and Then rransmi rs a K a r random from 3 If adap rer rransmi rs en rire 0122m391 Where frame wi rhou r de rec ring mminn10 Adqp rer ano rher rransmission rhe WG39lS K512 bl f Tlmes Ghd adap rer is done wi rh frame quotalums 0 5 P 2 5 DataLink Layer 555 ETher39neT39s CSMACD more Jam Signal make sure all oTher39 Tr39ansmiTTer39s are aware of collision 48 biTs BiT Time 1 micr39osec for39 10 Mbps ETher39neT for39 K1023 waiT Time is abouT 50 msec SeeinTer39acT wiTh Java appleT on AWL Web siTe highly recommended ExponenTial Backoff CI 60615 adapT r39eTr39ansmission aTTemst To esTimaTed currenTload 0 heavy load r39andom waiT will be longer CI fir39sT collision choose K from 01 delay is K 512 biT Transmission Times CI afTer39 second collision choose K from 0123 El afTer39 Ten collisions choose K from O12341023 5 DataLink Layer 556 CSMACD efficiency CI Tplop max pr39op be rween 2 nodes in LAN CI rmns Time To rrcmsmi r maxsize frame 1 ef mency 1 5t t prop trans CI Efficiency goes To 1 as fpmp goes To 0 CI Goes To 1 as rmns goes To infini ry CI Much be r rer39 Than ALOHA bu r s rill decen rr39alized simple and cheap 5 DataLink Layer 557 PropagaTion delay lt3 frame size 0 Suppose A sends a packeT aT Time 0 And B sees an idle channel jusT before T T prop so B happily sTar39Ts TransmiTTing a frame 398 deTecTs a collision buT A doesn39T see collision Till T2 T prop 0A needs To waiT for39 Time 2 TProp To deTecT collision So A should keep Tr39ansmITTing dur39ing This period and keep an eye ouT for39 a possible collision 5 DataLink Layer 558 Propaga rion delay lt3 frame size Pr39opaga rion delay de rer39mines min frame size To pr39even r undeTec red collisions CI Tr39ans Time of minimum fr39ame gt 2 r CI Moder39n 10Mb E rher39ne r 0 Minimum frame size calcula rion 500m maximum segmen r leng rh Can add r epea rer39s up To a maximum 5 segmen rs 2500m c in cable 60 c in vacuum 2 18 x10 8 ms 125us oneway delay Add r39epea rer39 and Transceiver delay To be safe IEEE specifies a 512 bi r rime slo r for39 E rher ne r 512us 512 bi rs 64 by res da ra payload 46 by res3 DataLink Layer 559 Prop IOBaseT and IOOBaseT CI 10100 Mbps r a re Ia r rer39 called fas r e rher ne rquot CI T s rands for39 Twis red Pair39 CI Nodes connec r To a hub s rar39 Topologyquot 100 m max distance be rween nodes and hub 5 DataLink Layer 560 Hubs Hubs are essen riolly physicallayer repea rers O bi rs coming from one link go ou r all o rher links 0 of The same ro re o no frame buffering 0 no CSMACD o r hub odop rers de rec r collisions 0 provides ne r monogemen r func rionoli ry Twi Ted pair l j I 5 DataLink Layer 561 Monches rer encoding Manchester Encoding Bil steam U Binary Emailg CI Used in lOBoseT CI Each bi r has 0 Transition CI Allows clocks in sending and receiving nodes ro synchronize To each other 0 no need for39 a cen rr alized global clock among nodes CI Hey This is physicallayer s ruff 5 DataLink Layer 562 Gbi r E rherne r CI uses s randard E rherne r frame forma r CI allows for poin r ropoin r links and shared broadcas r channels CI in shared mode CSMACD is used shor r dis rances be rween nodes required for efficiency CI uses hubs called here Buffered Dis rribu rorsquot CI FullDuplex at 1 Gbps for poin r ropoin r links CI 10 Gbps now 5 DataLink Layer 563 Link Layer CI 51 In rr oduc rion and ser39VIces CI 52 Error de rec rion and correction CI 53Mul riple access pr o rocols CI 54 LinkLayer Addressing CI 55 E rher39ne r CI 56 In rerconnec rions Hubs and swi rches CI 57 PPP CI 58 Link Vir rualiza rion ATM 5 DataLink Layer 5 64 In rerconnec ring wi rh hubs CI Backbone hub in rer39connec rs LAN segmen rs CI Ex rends max dis rance be rween nodes CI Bu r individual segmen r collision domains become one large collision domain CI Can39T in rer39connec r IOBaseT amp IOOBaseT hub 5 DataLink Layer 565 Swifch CI Link layer device 0 s rores and forwards E rherne r frames 0 examines frame header and seecfivey forwards frame based on MAC des r address 0 when frame is To be forwarded on segmen r uses CSMACD To access segmen r CI fransparen r O hos rs are unaware of presence of swi rches CI plugandplay selflearning O swi rches do no r need To be configured 5 DataLink Layer 566 Forwarding x swiTch hub How do de rermine on ro which LAN segmen r ro forward frame Looks like a rou ring problem 5 DataLink Layer 567 Self learning CI A swi rch has a swi rch rable CI en rry in swi rch Table 0 MAC Address In rerface Time S ramp 0 s rale en rries in Table dropped TTL can be 60 min CI swi rch learns which hos rs can be reached Through which in rerfaces 0 when frame received swi rch quotlearnsquot loca rion of sender incoming LAN segmen r 0 records senderIoca rion pair in swi rch Table 5 DataLink Layer 568 FilTeringForwarding When swiTch receives a frame index swiTch Table using MAC desT address if enTry found for desTinaTion Then if desT on segmenT from which frame arrived Then drop The frame else forward The frame on inTerface indicaTed else flood forward 07 a bur The in ferface 07 which The frame arrived 5 DataLink Layer 569 Swi rch example Suppose C sends frame ro D address inferface x swifch CI Swi rch receives frame from from C o enfry in swifch fable fhaf C is on inferface 1 0 because D is nof in Table swifch forwards frame info inferfaces 2 and 3 CI frame received by D 5 DataLink Layer 570 Swi rch example Suppose D replies back wi rh frame To C address inferface X swn ch I wNI H CI Swi rch receives frame from from D o En rry in swifch fable says fha r D is on inferface 2 0 because C is in Table swifch forwards frame only To inferface 1 CI frame received by C 5 DataLink Layer 571 Swifch Traffic isolafion CI swi rch ins ralla rion breaks subne r info LAN segmen rs CI swi rch filfers packest 0 sameLANsegmen r frames no r usually forwarded on ro o rher LAN segmen rs 0 segmen rs become separa re collision domains q x coIIISIon domam collision domain 5DataLinkLayer 5 72 Swi rches dedica red access CI Swi rch wi rh many i n rer faces CI Hos rs have direct connec rion ro swi rch CI No collisions full duplex Switching AToA39 and B roB39 simultaneously no collisions 5 DataLink Layer 573 More on Swi rches CI cuf fhrough swi rching frame forwarded from inpu r To ou rpu r por r wi rhou r firs r collec ring en rire frame osligh r reduc rion in Ia rency CI combina rions of shareddedica red 10 100 1000 Mbps inferfaces 5 DataLink Layer 574 Ins ri ru rional ne rwork mail server To exTernal neTwork rower web server X swiTch IP subne r hub 5 DataLink Layer 575 Swi rches vs Rou rer39s CI bo rh s roreandforward devices 0 rou rers ne rwork layer devices examine ne rwork layer headers O swi rches are link layer devices CI rou rers main rain rou ring Tables implemen r rou ring algori rhms CI swi rches main rain swi rch Tables implemen r fil rering learning algori rhms H051 Bridge Router H051 5 DataLlnk Layer 5776 Swi rches vs Rou rers more CI swi rches 0 Pros plugandplay rela rively high packe r fil rering and forwarding ra res o Cons ropology res rric red To a spanning Tree large swi rched ne rworks require large ARP Tables no pro rec rion agains r broadcas r s rorms CI Rou rers 0 Pros No spanning rree res rric rion in relligen r rou ring firewall pro rec rion agains r broadcas r s rorms o Cons no r plugandplay larger perpacke r processing Time 5 DataLink Layer 577 Summary comparison hubs rouTers smnTches Traffic no yes yes isolo rion plug amp ploy yes no yes opfnnol no yes no r39ou ring cuT yes no yes Through 5 DataLink Layer 578 ChapTer39 2 Applica rion Layer39 1 39 Ross Compufer Nefworking A Top Down Approach Feafuring fhe Infernef 3rd edi rion Jim Kur39ose Kei rh Ross AddisonWesley July 2004 2 Application Layer 1 Chapter 2 Applica rion layer39 CI 21 Principles of CI 26 P2P file sharing neTwor39k applicaTions CI 22 Web and HTTP CI 23 FTP CI 24 ElecTr39onic Mail SMTP POP3 IMAP CI 25 DNS 2 Application Layer 2 Chap rer 2 Applica rion Layer M CI concep rual implemen ra rion aspec rs of ne rwork applica rion pro rocols ozo Transpor rIayer service models 4 ozo clien rserver 1 paradigm peerfopeer paradigm CI learn abou r pro rocols by examining popular applica rionlevel pro rocols SMTP POP3 IMAP 2 Application Layer 3 Some ne rwork apps Cl Email CI In rerne r Telephone Cl Web CI RealTime Video El Ins ran r messaging conference I Remote login CI Massive parallel compu ring Cl P2P file sharing Cl Mul riuser ne rwork games Cl S rreaming s rored video clips 2 Application Layer 4 Creatinq a network app Write programs that run on different end systems and communicate over a network eg Web Web server software communicates with browser software little software written for devices in network core network core devices do not run user application ode application on end systems a lows for rapid app development propagation 2 Application Layer 5 Chapter 2 Application layer CI 21 Principles of network applications CI 22 Web and HTTP CI 23 FTP CI 24 Electronic Mail SMTP POP3 IMAP CI 25 DNS CI 26 P2P file sharing 2 Application Layer 6 Applica rion archi rec rures CI CIien rserver CI PeerTopeer P2P CI Hybrid of clien rserver and P2P 2 Application Layer 7 CIien rserver archi rec rure SCF VCIquot alwayson hos r permanen r IP address server farms for scaling clien rs communicafe wifh server may be infermi 39enfly connec re may have dynamic IP addresses do no communica re direcfly wifh each ofher 2 Application Layer 8 Pure P2P archi rec rure CI no alwayson server CI arbi rrary end sys rems direc rly communica re CI peers are in rermi r ren rly connec red and change IP addresses CI example Gnu rella Highly scalable bu r difficul r To manage 2 Application Layer 9 Hybrid of clien rserver and P2P Skype Inferne r Telephony app Finding address of remo re par ry cenfralized servers Clien rclien r connec rion is direci no r Through server Ins ran r messaging Cha ing be rween rwo users is P2P Presence defec rionlocafion cen rralized User regisTers iTs IP address wi rh cen rral server when if comes online User con rac rs cenTral server To find IP addresses of buddies 2 Application Layer 10 Processes communicating Process program running within a host Cl within same host two processes communicate using interprocess communication defined by 05 Cl processes in different hosts communicate by exchanging messages Client process process that initiates communication Server process process that waits to be contacted CI Note applications with P2P architectures have client processes Si server processes 2 Application Layer 11 Sockets CI process sendsreceives messages tofrom its socket CI socket analogous to door sending process shoves message out door sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process host or host or server server controlled by app developer controlled by OS 2 Application Layer 12 Addressing processes CI To receive messages process mus r have iden fier hos r device has unique32bi r IP address Q does IP address of hos r on which process runs suffice for iden rifying The process D D 2 Application Layer 13 Addressing processes CI To receive messages process mus r have iden fier hos r device has unique32bi r IP address Q does IP address of hos r on which process runs suffice for iden rifying The process Answer NO ma processes can be running on same hos D D CI idenfifier includes bo rh IP address and por r numbers associa red wi rh process on hos r CI Example por r numbers HTTP server 80 Mail server 25 CI To send HTTP message To gaiacsumassedu web server IP address 12811924512 Porf number 80 CI more shor rly 2 Application Layer 14 Applayer proTocol defines CI Types of messages exchanged eg requesT response CI Message synTax whaT fields in messages amp how fields are delineaTed Cl Message semanTics meaning of informaTion in fields CI Rules for when and how processes send Si respond To messages Publicdomain proTocols CI defined in RFCs CI allows for inTeroperabiliTy CI eg HTTP SMTP ProprieTary proTocols CI eg KaZaA 2 Application Layer 15 WhaT TransporT service does an app need DaTa loss CI some apps eg audio can ToleraTe some loss CI oTher apps eg file Transfer TelneT require 100 reliable daTa Transfer Timing CI some apps eg InTerneT Telephony inTeracTive games require low delay To be effecTive BandwidTh CI some apps eg mulTimedia require minimum amounT of bandwidTh To be effecTive CI oTher apps elasTic appsquot make use of whaTever bandwidTh They geT 2 ApplicaTion Layer 16 TFGHSQOY39T SCY VlCC requirements of common ODDS Application Data oss Bandwidth Time Sensitive file transfer no loss elastic 0 email no loss elastic 0 Web documents no loss elastic 0 realtime audiovideo losstolerant audio 5kbps1Mbps Yes 100 S 1590 video10kbps5Mbps stored audiovideo loss tolerant same as above Vest feW SECS interactive games losstolerant few kbps up Yes 100 S 1590 instant messaging no loss mastic yes and no 2 Application Layer 17 Internet transport protocols services TCP service El connectionoriented setup required between client and server processes reliable transport between sending and receiving process flow control sender won39t overwhelm receiver congestion control throttle sender when network overloaded does not provide timing minimum bandwidth guarantees D D El D UDP service El unreliable data transfer between sending and receiving process does not provide connection setup reliability flow control congestion control timing or bandwidth guarantee CI at why bother Why is there a UDP 2 Application Layer 18 Internet apps application transport protocols Application Underlying Application layer protocol transport protocol email SMTP RFC 2821 TCP remote terminal access Telnet RFC 854 TCP Web HTTP RFC 2616 TCP file transfer FTP RFC 959 Top streaming multimedia proprietary TCP or UDP eg RealNetworks Internet telephony proprieta eg VonageDiapad typically UDP 2 Application Layer 19 Chapter 2 Application layer CI 21 Principles of CI 26 P2P file sharing network applications app architectures app requirements CI 22 Web and HTTP CI 24 Electronic Mail SMTP POP3 IMAP CI 25 DNS 2 Application Layer 20 Web and HTTP Firs r some 39argon CI Web page consis rs of objec rs CI Objec r can be HTML file JPEG image Java apple r audio file CI Web page consis rs of base HTMLfile which includes several referenced objec rs CI Each objec r is addressable by a URL CI Example URL WWWsomeschooledusomeDeptpicgif hos r name pa rh name 2 Application Layer 21 HTTP overview HTTP hyper rex r Transfer pro rocol El Web39s applica rion layer profocol El clienTserver model c enfbrowserfhaf reques rs receives displays Web objects server Web server sends objects in response To requests D HTTP10RFCl945 D HTTP11RFC2068 H7770 IV PC running H77 67 I Y Phespo r 391 e Mac rLI nni ng Safari 2 Application Layer 22 HTTP overview confinued Uses TCP El clien r ini ria res TCP connec rion crea res socke r To server por139 80 server accep rs TCP connec rion from clien r HTTP messages application layer profocol messages exchanged be rween browser HTTP clien r and Web server HTTP server El TCP connec rion closed D D HTTP is s ra reless El server main rains no informa rion abou r pas r clien139 reques rs aside Profocols Thaf main rain sfafe are complex El pas r his rory s ra re mus r be main raine El if Serverclien r crashes Their views of sfafe may be inconsis ren r mus r be reconciled 2 Application Layer 23 HTTP connec rions Nonpersis ren r HTTP Cl A r mos r one objec r is sen r over a TCP connec rion Cl HTTP10 uses nonpersis ren r HTTP Persis ren r HTTP CI Mul riple objec rs can be sen r over single TCP connec rion be rween clien r and server CI HTTP11 uses persis ren r connec rions in defaul r mode 2 Application Layer 24 Nonpersisfem HTTP contains text Suppose user en rers URL references to 10 WWW someSchool edu someDepartmenthome index jpeg images la HTTP clien r iniTia res TCP connecTion To HTTP server 1b HTTP server GT hosf mgaegchool edu on on 80 wwwsomeSchooledu wai ring 39 39 p for TCP connecTion a r por r 80 accep rsquot connec rion no rifying clien r 2 HTTP clien r sends HTTP requesf message conTaining URL in ro TCP connecTion sockeT Message indica res Tha r clien r wanTs objec r someDepar tmeanhomeindex 3 HTTP server receives reques r message forms response message con raining reques red objec r and sends message in ro iTs socke r Time 2 Application Layer 25 Nonpersisfem HTTP cont 4 HTTP server closes TCP connec rion 5 HTTP clien r receives response message con raining h rml file displays hTml Parsing h rml file finds 10 referenced J39peg objec rs me 6 STeps 1 5 repea red for each of 10 J39peg objec rs 2 Application Layer 26 NonPersisTenT HTTP Response Time DefiniTion of RTT Time To send a small packeT To Travel from clienT To server and back initiate TCP connection Response Time RTT CI one RTT To iniTiaTe TCP request connecTion le mum RTT a one RTT for HTTP gfgsmn le requesT and firsT few byTes of HTTP response received V To reTurn time 1 Cl file Transmission Time ToTal 2RTTTransmiT Time 2 ApplicaTion Layer 27 PersisTenT HTTP NonpersisTenT HTTP issues PersisTenT wifhauf pipelining El requires 2 RTTs per objecT CI clienT issues new requesT El 05 overhead for each TCP only When PrquotquotVl 3939S comedian response has been received El browsers ofTen open parallel B one RTT for 55h TCP connecTions To feTch referenced obJeCT referenced objecTs I p PersisTenT wifh pipelining PersisTenT HTTP El defaulT in HTTP11 El server leaves connecTion D clienT sends requesTs as open afTer sending response soon as H encounTers a CI subsequenT HTTP messages referenced bJquotch beTween same clienTserver as le as one RTT for all senT over open connecTion The referenced objecTs D 2 ApplicaTion Layer 28 HTTP requesT message CI Two Types of HTTP messages request response CI HTTP requesT message ASCII humanreadable formaT requesT line GET POST GE39I39 somedirpage html HTTP1 1 HEAD commands Host www someschool edu User agent Mozilla4 0 he fdequot Connection close quot65 Accept language fr carTilzgigzzuwTextra carriage return line feed indicaTes end of message 2 Application Layer 29 Tr in ouT HTTP clienT side for ourself 1 TelneT To your favoriTe Web server unforTunaTer CADE lab machines do noT allow TelneT telnet cispolyedu 80 Opens TCP connecTion To porT 80 defaulT HTTP server porT aT cispoyedu AnyThing Typed in senT To porT 80 aT cispoyedu 2 Type in a GET HTTP requesT GET pross HTTPL1 By Typing This in hiT carriage Host cis polyedu re mr n TWiceL You sen This minimal buT compleTe GET requesT To HTTP server 3 Look aT response message senT by HTTP server 2 ApplicaTion Layer 30 ChapTer 2 ApplicaTion layer CI 21 Principles of CI 26 P2P file sharing neTwork applicaTions CI 22 Web and HTTP CI 23 FTP CI 24 ElecTronic Mail 0 SMTPPOP3IMAP CI 25 DNS 2 Appliccmun Layer 3 FTP The file Transfer proTocol DD D remote file Transfer file Tofrom remoTe hosT clienTserver mo el 0 client side ThaT iniTiaTes Transfer eiTher Tofrom remoTe 0 server remoTe hosT ftp RFC 959 ftp server porT 21 2 Appliccmun Layer 2 FTP separaie conirol daia conneciions D D D D D FTP clien r con raci s FTP server a r por r 21 specifying TCP as Transpori39 pro rocol Clien r ob rains au rhorizai ion over con rrol connec rion Clien r browses remo re direc rory by sending commands over con rrol conneci39ion When server receives file Transfer command server opens 2quotd TCP connec rion for file To clien r Affer Transferring one file server closes da139a conneci39ion TCP control connection TCP data conneciion FTP port 20 FTP clien r server El Server opens anoi39her TCP da139a connec rion To Transfer anoi39her file Cl Confrol conneci39ion OUT of bandquot El FTP server main rains s ra re curreni39 direci39ory earlier au rheni icai ion 2 Application Layer 33 FTP commands responses Sample commands CI DD D sen139 as ASCII Tex over con rrol channel USER username PASS password LIST refurn sf of file in curreni39 direc rory RETR filename re rrieves gefs file S39I39OR filename s rores pufs file on139o remo re os r Sample re rurn codes CI El D CI CI s ra rus code and phrase as inldTTP 331 Username OK password required 125 data connection already open transfer starting 425 Can t open data connection 452 Error writing file 2 Application Layer 34 Chap rer 2 Applica rion layer CI 21 Principles of CI 26 P2P file sharing ne rwork applica rions CI 22 Web and HTTP CI 23 FTP CI 24 Elec rronic Mail SMTP POP3 IMAP CI 25 DNS 2 Application Layer 35 message queue i user mailbox Three major componen rs El user agen rs mail servers El simple mail Transfer profocol SMTP D User Agen r El aka mail readerquot El composing edifing reading mail messages El eg Eudora Ou rlook elm Ne l scape Messenger El ou rgoing incoming messages sfored on server 2 Application Layer 36 ElecTronic Mail mail servers Mail Servers El mailbox conTains incoming messages for user message queue of ouTgoing To be senT mail messages SMTP proTocol beTween mail servers To send emai messages clienT sending mail server D D server receiving mail server 2 Application Layer 37 ElecTronic Mail SMTP RFC 2821 D uses TCP To reliably Transfer email message from clienT To server porT 25 D direcT Transfer sending server To receiving server Three phases of Transfer handshaking greeTing Transfer of messages closure commandresponse inTeracTion commands ASCII TexT response sTaTus code and phrase CI messages musT be in 7biT ASCII D D 2 ApplicaTion Layer 38 Scenario Alice sends to Bob 1 Alice uses UA to compose message and to bobsomeschool edu 2 Alice39s UA sends message to her mail server message placed in message queue 3 Client side of SMTP opens CP connection with Bob39s mail server in 54 4 SMTP client sends Alice39s message over the TCP connection 5 Bob39s mail server places the message in Bob39s mailbox 6 Bob invokes his user agent to read message 2 Application Layer 9 SMTP final words El SMTP uses persistent connections El SMTP requires message header 61 body to be in 7 D SMTP server uses RLF CRLF to determine end of message Comparison with HTTP El HTTP pull El SMTP push El both have ASCII commandresponse interaction status codes HTTP each object encapsulated in its own response msg SMTP multiple objects sent in multipar39t msg 2 Application Layer 40 Mail access profocols I k SMT sender 3 mail server m access Us C proTocol agequot f D SMTP deliverystorage To receiver39s server El Mail access profocol refrieval from server 0 Posf Office Profocol RFC 1939 aufhorizafion agenf ltgtserver and download 0 IMAPIn1 erne139 Mail Access Protocol RFC 1730 more feafures more complex manipulation of sfored msgs on server 0 HTTP Hofmail Yahoo Mail e139c 2 ApplicaliunLayer 41 POPS and IMAP POP3 IMAP El Bob cannoT reread 6 El Keep all messages in mail if he changes one place The server clien i El Allows user To organize messages in folders El Downloadandkeepquot copies of messages on different clienTs El POP3 is sTaTeless El IMAP keeps user sTaTe across sessions UCF OSS SESSIOHS 0 names of folders and mappings befween message IDs and folder name 2 ApplicaliunLayer 42 Chap rer 2 Applica rion layer CI 21 Principles of CI 26 P2P file sharing ne rwork applica rions CI 22 Web and HTTP CI 23 FTP CI 24 Elec rronic Mail SMTP POP3 IMAP CI 25 DNS 2 Application Layer 43 DNS Domain Name SysTem People many iden rifiers Domain Name Sys rem SSN name passpor r CI dism39bufed dafabase implemen red in hierarchy of In rerne r hos rs rou rers many name servers IP address 32 bi r used for addressing El appIcafon layer profoco hos r rou rers name servers To da ragrams u quot communicafe To resolve names name 39e39g addressname Translafion wwyahoocom used by h no re core Inferne r umans funcflon Implemen red as g map belween IP applicafion layer profocol addresses and name complexity at network39s e equot 2 Application Layer 44 22 DNS DNS services Why no r cen rr alize DNS g Hosmame 10 IP CI single poin r of failure address rr ansla rion CI Traffic volume CI Hos r aliasing CI dis ran r cen rr alized Canonical and alias da rabase names CI main renance CI Mail server aliasing CI Load dis rr ibu rion Replicafed Web servers se r of IP addresses for one canonical name doesn39f scale 2 Application Layer 45 DisTr39ibuTed Hierarchical DaTabase Root DNS Sewers com DNS servers org DNS servers edu DNS servers olyedu umassedu Yahoo00m amazoncom prorg p DNs servers DNS servers DNs servers DNS serversDNS servers Clien r wan rs IP for wwwamazoncom 13 approx CI Clien r quer ies a roof server To find com DNS server39 CI Clien r quer ies com DNS server To ge r amazoncom DNS server CI Clien r quer ies amazoncom DNS server To ge r IP address for wwwamazoncom 2 Application Layer 46 23 DNS Root name servers CI contacted by local name server that can not resolve name CI root name server contacts authoritative name server if name mapping not known gets mapping returns mapping to local name server a Verisign Dulles VA c Cogent Herndon VA also Los Angeles d U Maryland College Park MD k RIPE London also Amsterdam 9 US DoD Vienna VA Frankfurt h ARL Aberdeen MD i Autonomica Stockholm plus 3 i Vensign 11 locations otherlocations m WIDE Tokyo e NASA Mt View CA f Internet So ware C Palo39Ait CAarid 17 other 0 13 root name servers worldwide b USCISI Marina del Rey CA ICANN Los Angeles CA 2 Application Layer 47 TLD and Authoritative Servers CI Toplevel domain TLD servers responsible for com org net edu etc and all toplevel country domains uk fr ca jp z Network solutions maintains servers for com TLD z Educause for edu TLD CI Authoritative DNS servers organization39s DNS servers providing authoritative hostname to IP mappings for organization39s servers eg Web and mail z Can be maintained by organization or service provider 2 Application Layer 48 24 Local Name Server CI Does no r s rric rly belong ro hierarchy CI Each ISP residen rial ISP company universi ry has one ozo Also called defaul r name serverquot CI When a hos r makes a DNS query query is sen r ro i rs local DNS server ozo Ac rs as a proxy forwards query in ro hierarchy 2 Application Layer 49 roo r DNS server 2 3 TLD DNS server 4 5 4 local DNS serve dnspolyedu Egtltamioe CI Hos r a r cispoyedu wan rs IP address for gaiacsumassedu l 8 Li aufhorifhe DNS server dnscsumassedu requesTing hos r cis polyedu gaia cs umass edu 2 Application Layer 50 25 Recursive ueries roo r DNS server recursive guery El pufs burden of name resolufion on confacfed name TLD DNS server server El heavy load local DNS server i rera red guery dnsPc lyed 4 El confacfed server 1 8 replies wi rh name of server To confacf El I don39f know This name buf ask This serverquot u l aufhoriffive DNS server dns cs umass edu requesTIng hos r cis polyedu gaia cs umass edu 2 Application Layer 51 DNS cachinq and updaTinq records CI once any name server learns mapping i r caches mapping ozo cache en rries Timeou r disappear offer some rime ozo TLD servers Typically cached in local name servers Thus roof name servers nof offen visifed CI upda reno rify mechanisms under design by IETF RFC 2136 do hTTpwwwieTforgh rmlchar rersdnsind char rerhTml 2 Application Layer 52 26 DNS records DNS diS iribu red db S ioring resource records RR formal name value type ttl CI TypeA CI TypeCNAME 00 name is hOSTname oz name is alias name for some quotcanonicalquot The real name D www ibm com is really servereast backup2 ibm com oz value is IP address oz name is domain eg 2 value Is canonical name foocom oz value is hos rname of g TypeMX au rhori rafi e name V oz value Is name of mallserver server for This domaIn associafed Wifh n 2 Applicafion Layer 53 DNS profo col messages DNS profocol query and repy messages bO l39l l Wl l39l l same message farmaf msg header quot mm T minimal annualmu alumniIvar aim mu El identification 16 bit for query reply To query quotWWWw n mrcwirw mm W mar1 uses same 39 flags oz query or reply oz recursion desired oz recursion available oz reply is au rhori ral ive D 27 DNS proTocol messages Name Type fields for a query RRS in response To query records for auThoriTaTive servers addiTionaI quothelpfulquot info ThaT may be used 2 ApplicaTion Layer 55 InserTing records inTo DNS CI Example jusT creaTed sTarTup NeTwork UTopiaquot CI RegisTer name neTworku Topiacom aT a regisTrar eg NeTwork SoluTionsS oz Need To provide regisTrar wiTh names and IP addresses of your auThoriTaTive name server primary and secondary oz RegisTrar inserTs Two RRS inTo The com TLD Server networkutopiacom dnslnetworkutopiacom NS dnslnetworkutopiacom 212212212l A El PuT in auThoriTaTive server Type A record for wwwneTworkupTopiacom and ype MX record for neTworkuTopiacom CI How do people geT The IP address of your Web siTe 2 ApplicaTion Layer 56 28 Chap rer 2 Applica rion layer CI 21 Principles of CI 26 P2P file sharing ne rwork applica rions app architectures app requiremen rs CI 22 Web and HTTP CI 24 Elec rronic Mail SMTP POP3 IMAP CI 25 DNS 2 Application Layer 57 P2P file sharing CI Alice chooses one of The peers Bob Example Cl Alice runs P2P clien r D F39le 395 Cop39ed from Bob39s PC To Alice39s no rebook HTTP CI While Alice downloads o rher users uploading applica rion on her no rebook compu rer Cl In rermi r ren rly connec rs ro In rerne r ge rs new IP address fr39f m Allce39 I for each connection CI Alice39s peer Is bo rh a Cl Asks for Hey Judequot Web Chem and 3 Transien r Web server All peers are servers 2 highly scalable CI Applica rion displays o rher peers rha r have copy of Hey Jude 2 Application Layer 58 29 P2P cen rr alized direc ror x original Napsfer design 1 when peer connecfs if informs central server 0 IP address 0 confenf 2 Alice queries for Hey Judequot 3 Alice requesfs file from Bob cemralized direclury server 2 Applicaliun Layer 59 P2P problems wi rh cen rr alized direcfor y CI Single point of failure CI Performance boffleneck CI Copyrighf infringemenf file Transfer is decenfralized bLl l39 locafing content is highly cenfralized 2 Applicaliun Layer so Query floodinq GnuTella CI fully dis rribu red overlay ne rwork graph no cen rral server 3 edge between peer X CI public domain pro rocol and Y if rhere s a TCP Cl many Gnu rella clien rs anneal implemen ring pro rocol CI all ac rive peers and edges is overlay ne r CI Edge is no r a physical link CI Given peer will Typically be connec red wi rh lt 10 overlay neighbors 2 Application Layer 61 Gnu rella pro rocol CI Query message sen r over exis ring TCP connec rions CI peers forward Query message CI QueryHi r sen r over reverse paih File Transfer HTTP Scalabili ry limi red scope flooding 2 Application Layer 62 31 Gnu rella Peer joininq 1 Joining peer X mus r find some o rher peer in Gnu rella ne rwork use lis r of candida re peers 2 X sequen rially a r remp rs To make TCP wi rh peers on lis r un ril connec rion se rup wi rh Y 3 X sends Ping message To Y Y forwards Ping message 4 All peers receiving Ping message respond wi rh Pong message 5 X receives many Pong messages IT can Then se rup addi rional TCP connec rions 2 Application Layer 63 ExploiTinq heTerogeneiTy KaZaA Cl Each peer is ei rher a group leader or assigned To a group leader TCP connec rion be rween peer and i rs group leader TCP connec rions be rween some pairs of group leaders I CI Group leader Tracks The con ren r in all i rs children uvdmavypeev gvuuprleadev my neighuvmg velaliunships m uvevlay nemmk 2 Application Layer 64 32 KaZaA uer in CI Each file has a hash and a descriptor CI Client sends keyword query to its group leader CI Group leader responds with matches ozo For each match metadata hash IP address CI If group leader forwards query to other group leaders they respond with matches CI Client then selects files for downloading ozo HTTP requests using hash as identifier sent to peers holding desired file 2 Application Layer 65 KaZaA tricks CI Limitations on simultaneous uploads CI Request queuing CI Incentive priorities CI Parallel downloading 2 Application Layer 66 33 Chapter 2 Summary Our s rudy of ne rwork apps now comple rel CI Applica rion archi rec rures Cl specific pr o rocols clien rserver 1 HTTP P2P 2 FTP hybrid 1 SMTP POP IMAP CI applica rion service quot DNS requiremen rs reliabili rybandwid1 h delay CI In rerne r Transpor r service model connec rionorien red reliable TCP unreliable dafagrams UDP 2 Application Layer 67 Chapler 2 Summary Mos r importantly learned abou r profocos CI Typical reques rreply message exchange clien r requesi s info or Ser VlCe server responds wifh D confrol vs da139a msgs inband ouTofband ceni ralized vs deceni ralized s ra reless vs s ra reful DD data status code El reliable vs unreliable msg Transfer CI message forma rs El complexn39y a139 ne rwork headers fields gIVIng edgequot info abou r da139a da ra info being communica red 2 Application Layer 68 34


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

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."

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I 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."

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.