Applicat ions and applicat ion-layer prot ocols Applicat ion: communicat ing, applicat ion t r anspor t dist ribut ed processes net work dat a link ❍ running in net work host s in physical “user space” ❍ exchange messages t o implement app ❍ e.g., email, f ile t r ansf er, t he Web Applicat ion-layer prot ocols applicat ion ❍ one “piece” of an app applicat ion t r anspor t t r anspor t net work net work ❍ def ine messages dat a link dat a link physical physical exchanged by apps and act ions t aken ❍ user services provided by lower layer prot ocols 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 1 What t ransport service does an app need? Dat a loss ❒ some apps (e.g., audio) can t oler at e some loss ❒ ot her apps (e.g., f ile t ransf er, t elnet ) requir e Timing 100% r eliable dat a t ransf er ❒ some apps (e.g., I nt ernet t elephony, int eract ive Bandwidt h games) require low delay t o ❒ some apps (e.g., mult imedia) be “ef f ect ive” requir e minimum amount of bandwidt h t o be “ef f ect ive” ❒ ot her apps (“elast ic apps”) make use of what ever bandwidt h t hey get 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 2 Transport service requirement s of common apps Application Data loss Bandwidth Time Sensitive no file transfer no loss elastic e-mail no loss elastic no Web documents loss-tolerant elastic no yes, 100’s msec real-time audio/video loss-tolerant audio: 5Kb-1Mb video:10Kb-5Mb yes, few secs stored audio/video loss-tolerant same as above yes, 100’s msec interactive games loss-tolerant few Kbps up financial apps no loss elastic yes and no 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 3 1
I nt ernet apps: t heir prot ocols and t ransport prot ocols Application Underlying Application layer protocol transport protocol e-mail smtp [RFC 821] TCP remote terminal access telnet [RFC 854] TCP Web http [RFC 2068] TCP file transfer ftp [RFC 959] TCP proprietary streaming multimedia TCP or UDP (e.g. RealNetworks) remote file server NSF TCP or UDP Internet telephony proprietary typically UDP (e.g., Vocaltec) 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 4 Transport Layer 1 Lect ur e Over view: Lect ur e goals: ❒ t ransport layer services ❒ underst and some of t he ❒ mult iplexing/ demult iplexing pr inciples behind ❒ connect ionless t ransport : UDP t ransport layer services: ❍ mult iplexing/ demult iplex ❒ pr inciples of reliable dat a t ransf er ing ❍ r eliable dat a t r ansf er ❒ Next lect ur e ❒ inst ant iat ion and implement at ion of UDP in ❍ connect ion-or ient ed t r anspor t : TCP t he I nt ernet • r eliable t r ansf er ❒ More next t ime… • f low cont r ol • connect ion management ❍ pr inciples of congest ion cont r ol ❍ TCP congest ion cont r ol 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 5 Transport services and prot ocols ❒ provide logical communicat ion applicat ion t r anspor t bet ween app’ processes net work dat a link running on dif f erent host s net work physical dat a link l o g net work physical ❒ t ransport prot ocols run in i dat a link c a physical l end syst ems e n net work d - dat a link e ❒ t ransport vs net work layer n physical net work d dat a link t services: r physical a n s p net work ❒ net work layer : dat a t r ansf er o r dat a link t physical bet ween end syst ems ❒ t ransport layer : dat a applicat ion t r anspor t t ransf er bet ween processes net work dat a link physical ❍ r elies on, enhances, net wor k layer ser vices 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 6 2
Transport -layer prot ocols I nt ernet t ransport services: Application ❒ reliable, in-order unicast delivery (TCP) ❍ congest ion UDP TCP ❍ f low cont r ol ❍ connect ion set up IP ❒ unreliable (“best -ef f ort ”), unordered unicast or mult icast delivery: UDP Link ❒ services not available: ❍ r eal-t ime ❍ bandwidt h guar ant ees Physical ❍ r eliable mult icast 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 7 End-t o-end pr ot ocol Two f orces shapes t he end-t o-end prot ocol ❒ Applicat ions has demands on t he supplied service ❒ Underlying net work prot ocol has limit at ions 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 8 Mult iplexing/ demult iplexing Recall: segment - unit of dat a Demult iplexing: deliver ing exchanged bet ween received segment s t o t ransport layer ent it ies cor rect app layer processes ❍ aka TPDU: t ransport prot ocol dat a unit r eceiver P3 P4 applicat ion-layer M M dat a applicat ion segment P1 P2 t r anspor t M header net wor k M applicat ion applicat ion segment t ransport Ht t r anspor t M net work segment net wor k Hn 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 9 3
Mult iplexing/ demult iplexing Mult iplexing: gat her ing dat a f rom mult iple 32 bit s app processes, enveloping sour ce por t # dest por t # dat a wit h header (lat er used f or demult iplexing) ot her header f ields mult iplexing/ demult iplexing: ❒ based on sender, receiver port numbers, I P addresses applicat ion ❍ source, dest port # s in dat a each segment (message) ❍ recall: well-known port numbers f or specif ic applicat ions TCP/ UDP segment f ormat 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 10 Port s ❒ 0 – 65535 ❒ Reser ved, well-known, RFC 1700: 0 - 1023 emil ~>ypcat services | more kip 2112/tcp # IP over kerberos acmaint_transd 901/udp kerberos_master 751/udp # Kerberos authentication kerberos-iv 750/udp kerberos kdc # Kerberos authentication--udp new-rwho 550/udp new-who # experimental kshell 544/tcp krcmd # and remote shell talk 517/udp netbios-ns 137/udp nntp 119/tcp usenet # Network News Transfer pop 110/tcp pop3 pop-3 # Post Office V.3 - RFC 1081 hostnames 101/tcp hostname # usually to sri-nic link 87/tcp ttylink http 80/tcp httpd telnet 23/tcp ftp 21/tcp echo 7/udp echo 4/ddp # AppleTalk Echo Protocol … 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 11 Mult iplexing/ demult iplexing: examples sour ce por t : x Web client host A server B dest . por t : 23 host C sour ce por t :23 dest . por t : x Sour ce I P: C Sour ce I P: C Dest I P: B Dest I P: B sour ce por t : y sour ce por t : x port use: simple t elnet app dest . por t : 80 dest . por t : 80 Sour ce I P: A Web Dest I P: B Web client sour ce por t : x server B dest . por t : 80 host A port use: Web server 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 12 4
UDP: User Dat agr am Pr ot ocol [RFC 768] ❒ “no f r ills,” “bare bones” I nt ernet t ransport Why use UDP inst ead of prot ocol TCP ? ❒ “best ef f ort ” service, UDP segment s may be: ❒ no connect ion est ablishment (which can ❍ lost add delay) ❍ delivered out of order t o app ❒ simple: no connect ion st at e ❒ connect ionless: at sender, receiver ❍ no handshaking bet ween ❒ small segment header UDP sender , receiver ❒ no congest ion cont rol: UDP ❍ each UDP segment can blast away as f ast as handled independent ly desired of ot hers 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 13 UDP: mor e ❒ of t en used f or 32 bit s st r eaming mult imedia sour ce por t # dest por t # apps Lengt h, in byt es of UDP lengt h checksum ❍ loss t olerant segment , ❍ r at e sensit ive including header ❒ ot her UDP uses (why?): Applicat ion dat a ❍ DNS (message) ❍ SNMP UDP segment f ormat 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 14 Reliable t ransf er over UDP ❒ add reliabilit y at applicat ion layer ❍ applicat ion-specif ic er ror recover! ❒ applicat ion using UDP is responsible f or handling of : ❍ lost messages ❍ duplicat e messages ❍ delays ❍ unor der ed deliver y ❍ lost cont act 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 15 5
UDP checksum (RFC 1071) Goal: det ect “er rors” (e.g., f lipped bit s) in t r ansmit t ed segment Receiver: Sender: ❒ comput e checksum of ❒ t reat segment cont ent s received segment as sequence of 16-bit ❒ check if comput ed checksum, int egers including checksum f ield, ❒ checksum: addit ion (1’s equals all 1´ s: complement sum) of ❍ NO - error det ect ed segment cont ent s ❍ YES - no er ror det ect ed. ❒ sender put s checksum But maybe errors value int o UDP checksum nonet hless? More lat er … . f ield 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 16 UDP checksum (more) ❒ t he checksum is comput ed over ❍ UDP header 0 16 31 ❍ payload Source IP Address Destination IP Address ❍ pseudo header 0 Protocol UDP Length • used t o ver if y endconnect ions ❒ why cont rol errors in several layers? 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 17 Pr inciples of Reliable dat a t r ansf er ❒ import ant in app., t r ansport , link layers ❒ t op-10 list of import ant net working t opics! ❒ charact erist ics of unr eliable channel will det ermine complexit y of reliable dat a t ransf er prot ocol (rdt ) 18 September 2001 Data Communications, Jonny Pettersson, UmU Transport 1 18 6
Recommend
More recommend