




已阅读5页,还剩9页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
精品文档 1欢迎下载 ReviewReview QuestionsQuestions SectionSection 2 12 1 1 1 ListList fivefive non non proprietaryproprietary 非专有的 非专有的 InternetInternet applicationsapplications andand thethe application application layerlayer protocolsprotocols thatthat theythey use use 列举五种非专用的英特网应用以及它们所使用的应用层协议 列举五种非专用的英特网应用以及它们所使用的应用层协议 applicationsapplicationsprotocolsprotocols e maile mail SMTPSMTP WEBWEBHTTPHTTP streamingstreaming multimediamultimediaHTTPHTTP RTP RTP filefile transfertransfer FTPFTP remoteremote terminalterminal accessaccess TelnetTelnet 2 2 ForFor a a communicationcommunication session session 会议会议 betweenbetween twotwo hosts hosts whichwhich hosthost isis thethe clientclient andand whichwhich isis thethe server server 对俩主机之间的通信会话 哪个主机是客户机 哪个主机是服务器 对俩主机之间的通信会话 哪个主机是客户机 哪个主机是服务器 TheThe processprocess whichwhich initiatesinitiates 发起 发起 thethe communicationcommunication isis thethe client client thethe processprocess thatthat waitswaits toto bebe contactedcontacted isis thethe server server 3 3 WhatWhat informationinformation isis usedused byby a a processprocess runningrunning onon oneone hosthost toto identifyidentify a a processprocess runningrunning onon anotheranother host host 运行在一台主机上的进程使用什么信息标识运行在另一台主机上的进程 运行在一台主机上的进程使用什么信息标识运行在另一台主机上的进程 The IP address of the destination host and the port number of the destination socket 精品文档 2欢迎下载 3 3 ListList thethe variousvarious network applicationnetwork application useruser agentsagents thatthat youyou useuse onon a a dailydaily basis basis 列举你每天都会使用的网络应用程序用户代理 列举你每天都会使用的网络应用程序用户代理 Web browser E mail application user agent File Transfer user agent P2p user agent audio video user agent 5 5 ReferringReferring toto FigureFigure 2 1 2 2 1 2 wewe seesee thatthat notnot nonenone ofof applicationsapplications listedlisted inin thethe tabletable requirerequire bothboth no no datadata loss loss andand timing timing CanCan youyou conceiveconceive ofof anan applicationapplication thatthat requiresrequires nono datadata lossloss andand thatthat isis alsoalso highlyhighly timetime sensitive sensitive 参见图参见图 2 1 22 1 2 我们可以看到表中所列举的应用没有一个既要求没有数据丢失又要求定时 你能设想 我们可以看到表中所列举的应用没有一个既要求没有数据丢失又要求定时 你能设想 出一个应用 既既要求没有数据丢失又要求定时吗 出一个应用 既既要求没有数据丢失又要求定时吗 ThereThere areare nono goodgood examplesexamples ofof anan applicationapplication thatthat requiresrequires nono datadata lossloss andand timing timing SectionsSections 2 2 2 52 2 2 5 6 6 WhatWhat isis meantmeant byby a a handshakinghandshaking protocol protocol 握手协议的意义 握手协议的意义 A A protocolprotocol usesuses handshakinghandshaking ifif thethe twotwo communicatingcommunicating entitiesentities firstfirst exchangeexchange controlcontrol packetspackets beforebefore sendingsending datadata toto eacheach other other SMTPSMTP usesuses handshakinghandshaking atat thethe applicationapplication layerlayer whereaswhereas HTTPHTTP doesdoes not not 7 7 WhyWhy dodo HTTP HTTP FTP FTP SMTP SMTP POP3POP3 andand IMAPIMAP runrun onon toptop ofof TCPTCP ratherrather thanthan UDP UDP 为什么为什么 HTTPHTTP FTPFTP SMTPSMTP POP3POP3 和和 IMAPIMAP 都运行在都运行在 TCPTCP 协议而不是协议而不是 UDPUDP 协议上 协议上 TheThe applicationsapplications associatedassociated withwith thosethose protocolsprotocols requirerequire thatthat allall applicationapplication datadata bebe receivedreceived inin thethe correctcorrect orderorder andand withoutwithout gaps gaps TCPTCP providesprovides thisthis serviceservice whereaswhereas UDPUDP doesdoes not not 精品文档 3欢迎下载 8 8 ConsiderConsider anan e commercee commerce sitesite thatthat wantswants toto keepkeep a a purchasepurchase recordrecord forfor eacheach ofof itsits customers customers DescribeDescribe howhow thisthis cancan bebe donedone withwith HTTPHTTP authentication authentication 认证 认证 DescribeDescribe howhow thisthis cancan bebe donedone withwith cookies cookies 考虑一个电子商务网站需要保留每一个客户的购买记录 描述如何使用考虑一个电子商务网站需要保留每一个客户的购买记录 描述如何使用 HTTPHTTP 认证 描述这是如何用认证 描述这是如何用 cookiescookies 来实现的 来实现的 WhenWhen thethe useruser firstfirst visitsvisits thethe site site thethe sitesite returnsreturns a a cookiecookie number number ThisThis cookiecookie numbernumber isis storedstored onon thethe useruser s s hosthost andand isis managedmanaged byby thethe browser browser DuringDuring eacheach subsequentsubsequent visitvisit and and purchase purchase thethe browserbrowser sendssends thethe cookiecookie numbernumber backback toto thethe site site ThusThus thethe sitesite knowsknows whenwhen thisthis useruser more more precisely precisely thisthis browser browser isis visitingvisiting thethe site site 9 9 WhatWhat isis thethe differencedifference betweenbetween persistentpersistent HTTPHTTP withwith pipeliningpipelining 持久 持久 HTTPHTTP 流水线 流水线 andand persistentpersistent HTTPHTTP withoutwithout pipeliningpipelining 没有流水线的持久 没有流水线的持久 HTTPHTTP 连接 连接 WhichWhich ofof thethe twotwo isis usedused byby HTTP 1 1 HTTP 1 1 In persistent HTTP without pipelining the browser first waits to receive a HTTP response from the server before issuing a new HTTP request In persistent HTTP with pipelining the browser issues requests as soon as it has a need to do so without waiting for response messages from the server persistentpersistent HTTPHTTP withwith pipeliningpipelining isis usedused byby HTTP 1 1HTTP 1 1 10 10 TelnetTelnet intointo a a WebWeb serverserver andand sendsend a a muli linemuli line requestrequest message message IncludeInclude inin thethe requestrequest messagemessage thethe If modified since If modified since headerheader lineline toto forceforce a a responseresponse messagemessage withwith thethe 304304 NotNot ModifiedModified statusstatus code code 用用 TelnetTelnet 向向 webweb 服务器发送一条多行的请求报文 在该请求报文中包含服务器发送一条多行的请求报文 在该请求报文中包含 If modified since If modified since 首部首部 行 迫使响应报文中出现行 迫使响应报文中出现 304304 NotNot ModifiedModified 状态码 状态码 精品文档 4欢迎下载 11 11 WhyWhy isis itit saidsaid thatthat FTPFTP sendssends controlcontrol informationinformation out out ofof band band 频带外的 为什么说为什么说 FTPFTP 在在 带外带外 发送控制信息 发送控制信息 FTPFTP usesuses twotwo parallelparallel 平行的 平行的 TCPTCP connections connections oneone connectionconnection forfor sendingsending controlcontrol informationinformation such such asas a a requestrequest toto transfertransfer a a file file andand anotheranother connectionconnection forfor actuallyactually transferringtransferring thethe file file BecauseBecause thethe controlcontrol informationinformation isis notnot sentsent overover thethe samesame connectionconnection thatthat thethe filefile isis sentsent over over FTPFTP sendssends controlcontrol informationinformation outout ofof band band 12 12 SupposeSuppose AliceAlice withwith a a Web basedWeb based e maile mail accountaccount such such asas Yahoo Yahoo mailmail oror Hotmail Hotmail sendssends a a messagemessage toto Bob Bob whowho accessesaccesses hishis mailmail fromfrom hishis mailmail serverserver usingusing POP3 POP3 DiscussDiscuss howhow thethe messagemessage getsgets fromfrom Alice sAlice s hosthost toto Bob sBob s host host BeBe suresure toto listlist thethe seriesseries ofof application application layerlayer protocolsprotocols thatthat areare usedused toto movemove thethe messagemessage betweenbetween thethe twotwo hosts hosts 假设假设 AliceAlice 使用一个基于使用一个基于 webweb 的电子邮件账户向的电子邮件账户向 BobBob 发送邮件 而发送邮件 而 BobBob 使用使用 POP3POP3 协议访问他的邮件协议访问他的邮件 服务器来获取邮件 讨论信息是如何从服务器来获取邮件 讨论信息是如何从 AliceAlice 的主机到的主机到 BobBob 的主机的 一定要列出在两台主机间移的主机的 一定要列出在两台主机间移 动信息所用的应用层协议 动信息所用的应用层协议 MessageMessage isis sentsent fromfrom AliceAlice s s hosthost toto herher mailmail serverserver overover HTTP HTTP AliceAlice s s mailmail serverserver thenthen sendssends thethe messagemessage toto BobBob s s mailmail serverserver overover SMTP SMTP BobBob thenthen transferstransfers thethe messagemessage fromfrom hishis mailmail serverserver toto hishis hosthost overover POP3 POP3 13 13 SupposeSuppose thatthat youyou sendsend anan e maile mail messagemessage whosewhose onlyonly datadata isis a a MicrosoftMicrosoft ExcelExcel attachment attachment WhatWhat mightmight thethe headerheader lineslines including including MIMEMIME lines lines looklook like like 假定你发送一封电子邮件 唯一的数据就是一个表格附件 可能的首部行 包含假定你发送一封电子邮件 唯一的数据就是一个表格附件 可能的首部行 包含 MIMEMIME 行 是什么样行 是什么样 的 的 From 123 To 456 精品文档 5欢迎下载 Subject hello MIME Version 1 0 Content Transfer Encoding base64 Content Type Application MS Excel 14 14 PrintPrint outout thethe headerheader ofof a a messagemessage thatthat youyou havehave recentlyrecently received received HowHow manymany Recieved Recieved headerheader lineslines areare there there AnalyzeAnalyze eacheach ofof thethe headerheader lineslines inin thethe message message 打印出你最近收到的报文的首部 在打印出你最近收到的报文的首部 在 ReceivedReceived 中 首部行有多少行 分析该报文首部行的每一行 中 首部行有多少行 分析该报文首部行的每一行 15 15 FromFrom a a user suser s perspective perspective whatwhat isis thethe differencedifference betweenbetween thethe download and deletedownload and delete modemode andand thethe download and keepdownload and keep modemode inin POP3 POP3 从用户的观点来看 从用户的观点来看 POP3POP3 中中 下载并删除下载并删除 模式和模式和 下载并保留下载并保留 模式有什么区别 模式有什么区别 WithWith downloaddownload andand delete delete afterafter a a useruser retrievesretrieves 取回 取回 itsits messagesmessages fromfrom a a POPPOP server server thethe messagesmessages areare deleted deleted ThisThis posesposes a a problemproblem forfor thethe nomadicnomadic 游动的 游动的 user user whowho maymay wantwant toto accessaccess thethe messagesmessages fromfrom manymany differentdifferent machinesmachines office office PC PC homehome PC PC etc etc InIn thethe downloaddownload andand keepkeep configurationconfiguration 配置 配置 messagesmessages areare notnot deleteddeleted afterafter thethe useruser retrievesretrieves thethe messages messages ThisThis cancan alsoalso bebe inconvenient inconvenient asas eacheach timetime thethe useruser retrievesretrieves thethe storedstored messagesmessages fromfrom a a newnew machine machine allall ofof non deletednon deleted messagesmessages willwill bebe transferredtransferred toto thethe newnew machinemachine including including veryvery oldold messages messages 16 16 RedrawRedraw FigureFigure 2 5 42 5 4 forfor whenwhen allall queriesqueries fromfrom thethe locallocal nameservernameserver areare iterative iterative 重绘时 从本地域名服务器所有查询迭代图重绘时 从本地域名服务器所有查询迭代图 2 5 42 5 4 17 17 EachEach InternetInternet hosthost willwill havehave atat leastleast oneone locallocal namename serverserver andand oneone authoratativeauthoratative namename server server WhatWhat rolerole doesdoes eacheach ofof thesethese serversservers havehave inin DNS DNS 每一台英特网主机都至少有一个本地域名服务器和一个权威域名服务器 这两种服务器在域名解析中每一台英特网主机都至少有一个本地域名服务器和一个权威域名服务器 这两种服务器在域名解析中 起什么作用 起什么作用 A host authoritative name server provides the official translation of a hostname to an IP address among other things A host local name server is a proxy 代理服务器 精品文档 6欢迎下载 to the DNS system the host first queries its local name server for a mapping the local name server then obtains the mapping on the behalf of 代表 the querying host 18 18 IsIs itit possiblepossible thatthat anan organization sorganization s WebWeb serverserver andand mailmail serverserver havehave exactlyexactly thethe samesame aliasalias 别名 别名 forfor a a hostnamehostname e g e g WhatWhat wouldwould bebe thethe type type forfor thethe RRRR thatthat containscontains thethe hostnamehostname ofof thethe mailmail server server 一个机构的一个机构的 webweb 服务器和邮件服务器可以有有完全相同的主机别名吗 包含了邮件服务器的主机名服务器和邮件服务器可以有有完全相同的主机别名吗 包含了邮件服务器的主机名 的的 RRRR 有什么样的类型 有什么样的类型 Yes An organization mail server and Web server can have the same alias for a host name The MX record is used to map the mail server host name to its IP address 19 19 UseUse nslookupnslookup toto findfind a a WebWeb serverserver thatthat hashas multiplemultiple IPIP addresses addresses DoesDoes thethe WebWeb serverserver ofof youryour institutioninstitution school school company company etc etc havehave multiplemultiple IPIP addresses addresses 使用使用 nslookupnslookup 找到一个找到一个 WebWeb 服务器有多个服务器有多个 IPIP 地址 贵机构的地址 贵机构的 WebWeb 服务器 如学校 公司 等 是否服务器 如学校 公司 等 是否 有多有多个个 IPIP 地址 地址 精品文档 7欢迎下载 MyMy insititutioninsititution doesndoesn t t havehave multiplemultiple IPIP address address SectionsSections 2 6 2 92 6 2 9 20 20 TheThe UDPUDP serverserver describeddescribed inin SectionSection 2 72 7 onlyonly neededneeded oneone socket socket whereaswhereas thethe TCPTCP serverserver describeddescribed inin SectionSection 2 62 6 neededneeded twotwo sockets sockets Why Why IfIf thethe TCPTCP serverserver werewere toto supportsupport n n simultaneoussimultaneous 同时发生的 同时发生的 connections connections eacheach fromfrom a a differentdifferent clientclient host host howhow manymany socketssockets wouldwould thethe TCPTCP serverserver need need 精品文档 8欢迎下载 2 72 7 节描述的节描述的 UDPUDP 服务器仅需要一个套接字 而服务器仅需要一个套接字 而 2 62 6 节描述的节描述的 TCPTCP 服务器则需要两个套接字 为什么 服务器则需要两个套接字 为什么 如果如果 TCPTCP 服务器要支持服务器要支持 n n 个并行连接 且每个连接都来自不同的客户机主机 那么个并行连接 且每个连接都来自不同的客户机主机 那么 TCPTCP 服务器需要多服务器需要多 少个套接字 少个套接字 WithWith thethe UDPUDP server server therethere isis nono welcomingwelcoming socket socket andand allall datadata fromfrom differentdifferent clientsclients entersenters thethe serverserver throughthrough thisthis oneone socket socket WithWith thethe TCPTCP server server therethere isis a a welcomingwelcoming socket socket andand eacheach timetime a a clientclient initiatesinitiates 发起 发起 a a connectionconnection toto thethe server server a a newnew socketsocket isis created created Thus Thus toto supportsupport n n simultaneoussimultaneous connections connections thethe serverserver wouldwould needneed n 1n 1 sockets sockets 21 21 ForFor thethe client serverclient server applicationapplication overover TCPTCP describeddescribed inin SectionSection 2 6 2 6 whywhy mustmust thethe serverserver programprogram bebe executedexecuted beforebefore thethe clientclient program program ForFor thethe client serverclient server applicationapplication overover UDPUDP describeddescribed inin SectionSection 2 7 2 7 whywhy maymay thethe clientclient programprogram bebe executedexecuted beforebefore thethe serverserver program program 在在 2 62 6 节所描述的运行于节所描述的运行于 TCPTCP 上的客户机上的客户机 服务器应用程序 为什么服务器程序要先于客户机程序运服务器应用程序 为什么服务器程序要先于客户机程序运 行 在行 在 2 72 7 节描述的运行于节描述的运行于 UDPUDP 上的客户机上的客户机 服务器应用程序 为什么客户机程序要先于服务器程序服务器应用程序 为什么客户机程序要先于服务器程序 运行 运行 For the TCP application as soon as the client is executed it attempts to initiate a TCP connection with the server If the TCP server is not running then the client will fail to make a connection ForFor thethe UDPUDP application application thethe clientclient doesdoes notnot initiateinitiate connectionsconnections or or attemptattempt toto communicatecommunicate withwith thethe UDPUDP server server immediatelyimmediately uponupon executionexecution PROBLEMSPROBLEMS 1 1 TrueTrue oror false false a a SupposeSuppose a a useruser requestsrequests a a WebWeb pagepage thatthat consistsconsists ofof somesome texttext andand twotwo images images ForFor thisthis pagepage thethe clientclient willwill sendsend oneone requestrequest messagemessage andand recieverecieve threethree responseresponse 精品文档 9欢迎下载 messages messages 假设一个用户请求一个网页 包含一些文本和两个图像 这个页面的客户端将发送假设一个用户请求一个网页 包含一些文本和两个图像 这个页面的客户端将发送 一个请求消息和接收三个响应消息 一个请求消息和接收三个响应消息 F F b b TrueTrue oror false false TwoTwo distinctdistinct WebWeb pagespages e g e g www mit edu research htmlwww mit edu research html andand www mit edu students html www mit edu students html cancan bebe sentsent overover thethe samesame persistentpersistent connection connection 真真 或假 两种截然不同的网页 例如 或假 两种截然不同的网页 例如 www mit eduwww mit edu research htmlresearch html 和和 www mit eduwww mit edu students htmlstudents html 可发送相同的持久连接 可发送相同的持久连接 T T c c WithWith non persistentnon persistent connectionsconnections betweenbetween browserbrowser andand originorigin server server itit isis possiblepossible forfor a a singlesingle TCPTCP segmentsegment toto carrycarry twotwo distinctdistinct HTTPHTTP requestrequest messages messages 浏览器和源服务器之间的非持久连接 它有可能为一个单一的浏览器和源服务器之间的非持久连接 它有可能为一个单一的 TCPTCP 段进行两个不同的段进行两个不同的 HTTPHTTP 请求消息 请求消息 F F d d TheThe Date Date headerheader inin thethe HTTPHTTP responseresponse messagemessage indicatesindicates whenwhen thethe objectobject inin thethe responseresponse waswas lastlast modified modified 日期 日期 在在 HTTPHTTP 响应消息头指示的最后修订在响应对响应消息头指示的最后修订在响应对 象时 象时 F F 2 2 ReadRead RFCRFC 959959 forfor FTP FTP ListList allall ofof thethe clientclient commandscommands thatthat areare supportedsupported byby thethe RFC RFC FTPFTP 阅读阅读 RFCRFC 959959 列出所有的客户端支持的命令是由 列出所有的客户端支持的命令是由 RFCRFC Access control commands USER USER PASS PASS ACT ACT CWD CWD CDUP CDUP SMNT SMNT REIN REIN QUITQUIT Transfer parameter 参数 commands PORT PORT PASV PASV TYPETYPE STRU STRU MODEMODE Service commands RETR RETR STOR STOR STOU STOU APPE APPE ALLO ALLO REST REST RNFR RNFR RNTO RNTO ABOR ABOR DELE DELE RMD RMD MRD MRD PWD PWD LIST LIST NLST NLST SITE SITE SYST SYST STAT STAT HELP HELP NOOPNOOP 3 3 ReadRead RFCRFC 1700 1700 WhatWhat areare thethe well knownwell known portport numbersnumbers forfor thethe simple simple filefile transfertransfer protocol protocol sftp sftp ForFor thethe network network newsnews transfoertransfoer protocol protocol nntp nntp 阅读阅读 RFCRFC 17001700 中 什么是中 什么是 简单文件传输协议简单文件传输协议 SFTPSFTP 众所周知的端口号 对于 众所周知的端口号 对于 新闻联播新闻联播 transfoertransfoer 协议协议 NNTPNNTP 4 4 SupposeSuppose withinwithin youryour webweb browserbrowser youyou clickclick onon a a linklink toto obtainobtain a a webweb page page SupposeSuppose thatthat thethe IPIP addressaddress forfor thethe associatedassociated URLURL isis notnot cachedcached 缓存 缓存 inin youryour locallocal host host soso 精品文档 10欢迎下载 thatthat a a DNSDNS looklook upup isis necessarynecessary toto obtainobtain thethe IPIP address address SupposeSuppose thatthat n n DNSDNS serversservers areare visitedvisited beforebefore youryour hosthost receivesreceives thethe IPIP addressaddress fromfrom DNS DNS thethe successivesuccessive visitsvisits incurincur 产生 产生 a a RTTRTT ofof RTTRTT1 1 RTTRTTn n FurtherFurther supposesuppose thatthat webweb pagepage associatedassociated withwith thethe linklink containscontains exactlyexactly oneone object object
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 河北省唐海县2025年上半年公开招聘城市协管员试题含答案分析
- 河北省黄骅市2025年上半年公开招聘辅警试题含答案分析
- 2025年户外照明灯具研发生产与市场推广合作协议
- 2025版企业搬迁过程中员工培训与服务合同
- 2025岑瑾与配偶共同债务处理及财产分配离婚协议
- 2025年智能房产租赁居间服务合作协议
- 2025年新型环保材料边坡支护及护壁桩工程合同
- 2025年二手房购房合同房屋产权归属与登记手续
- 2025年度房地产居间代理服务合同
- 2025版水泥产品定制化生产购销合同模板
- 飞机上通用应急设备-安全设备
- 复旦研究生入学教育考试
- 2023-2024学年九年级道德与法治上册 同步备课系列 教学设计教案(全册)
- 成熟生产线评价报告
- “高效的课件制作技巧及展示技能培训”
- 输电线路工程项目划分表
- 沪教版八年级生物第一册全册完整课件
- 第06章设计美学程能林第4版《工业设计概论》课课件
- 中行bfw框架开发和测试资料课件
- 医疗CT中碲锌镉CZT探测器的工作原理
- 食材配送应急保障配合措施方案
评论
0/150
提交评论