计算机网络(自顶向下)Chapter2

合集下载

最新计算机网络自顶向下方法(第四版)-中文版课件-第二章

最新计算机网络自顶向下方法(第四版)-中文版课件-第二章
是用户与网络应用程序之间的接口。 如: ✓ Web应用的用户代理:是一些浏览器软件。 一个通过套接字收发报文,并提供用户接口的进程。 ✓ 电子邮件应用程序用户代理:是“邮件阅读器”。
允许用户进行邮件的撰写和阅读。
19
2.1.3 应用层协议
定义了运行在不同端系统上的应用程序进程间传递 报文的格式和方式。 具体内容: ✓ 交换的报文类型:如请求报文和响应报文; ✓ 各种报文类型的语法:报文中的各个字段及描述; ✓ 字段的语义:字段包含信息的含义; ✓ 进程何时、如何发送报文及对报文进行响应的规则。
20
说明
公共领域协议:由标准文档RFC定义,如HTTP。 专用层协议:如P2P使用的协议。
应用层协议是网络应用的一部分。 如Web应用,客户机从Web服务器获得“文档”。
✓ 组成:HTML、Web浏览器、Web服务器程序,以及 一个应用层协议HTTP(超文本传输协议)等。
✓ HTTP定义了在浏览器程序和Web服务器程序间传输的 报文格式和序列。
✓ 应用程序开发者选择了一 个运输层协议,则应用程 序就建立在由该协议提供 的运输层服务之上。如 TCP协议。
主机或服务器
主机或服务器
进程
套接字
具有缓 存、变 量的 TCP
由应用研发者控制
进程
因特网
套接字
具有缓 存、变 量的TCP
由操作系统控制
16
3、进程寻址
✓ 主机上的进程可以有多个。
如何识别 进程?
即时讯息: P2P:两个用户直接聊天 服务器检测/定位: • 用户在线时,向中心服务器注册其IP地址 • 用户联系中心服务器以找到聊天伙伴的IP地址
10
2.1.2 进程通信
进程 (process):在主机上运行的程序。 进程通信: ✓ 同一主机中两个进程间的通信:由操作系统控制; ✓ 不同主机中进程间的通信:通过网络交换报文进行。

计算机网络自顶向下第二章

计算机网络自顶向下第二章
数据丢失(data loss) 某些应用(如音频)能够容 忍某些丢失 其他应用(如文件传输, Telnet)要求100%可靠数据 传输 定时(timing) 某些应用(如因特网电 话、交互式游戏)要求 “有效的”低时延 带宽(bandwidth) 某些应用(如多媒体)要 求“有效的”最小量的带 宽 其他应用(”弹性应用 “)充分利用它们获得的 所有带宽
18
Operation as needed
Client running Explorer
Web Server
Web application includes client and server
19
Web和HTTP
某些术语 Web页由对象(object)组成 对象可以是HTML文件,JPEG图片,Java小程序,音 频文件,… Web页由基本的HTML文件组成 ,基本的HTML文件 包括了几个引用对象 每个对象可由URL寻址 URL的例子: /someDept/pic.gif
远程终端访问
Web 文件传输
Telnet [RFC 854]
TCP TCP
TCP
HTTP [RFC 2616] FTP [RFC 959]
远程文件服务器
流媒体
NFS [McKusik 1996]
UDP或TCP
通常专用(如Real Networks) UDP或TCP 典型用UDP
因特网电话 通常专用(如Net2phone)
2. HTTP客户机发送 HTTP 请求报
文 (包含URL)进TCP 连接套接字.
报文指示客户机要对象 someDepartment/home.index
的HTTP服务器在80端口 等待TCP连接“接受” 连接,通知客户机

计算机网络自顶向下方法第二章讲义

计算机网络自顶向下方法第二章讲义
HTTP安全协议(HTTPS),借助身份验证和加密来保 护数据,使数据可以安全的在客户端和服务器之间 传输。
注:因为要对数据加密和解密,HTTPS协议会产生额外 的负载和响应时间。
第2章 应用层
34
2.1 应用层协议原理 2.2 Web应用和HTTP协议 2.3 文件传输协议:FTP 2.4 电子邮件 2.5 域名系统DNS 2.6 P2P 应用
37
通过操作命令实现远程交互式 访问 登录,用户名,密码 浏览文件 选择文件,下载第2章 应用层38
FTP命令, 响应
命令示例:
经控制信道以ASCII 文本发送 USER username PASS password LIST返回当前目录中的文件列
表 RETR filename获取(get) 文
掉请求的对象 PUT:很少用,向URL字段中定义的路径,上载在
实体主体中文件 DELETE,很少用,删除在URL字段中定义的文件
第2章 应用层
28
HTTP响应报文
观察HTTP响应报文例子
状态行 (协议状态码状态短语)
首部行
HTTP/1.1 200 OK Connection close Date: Thu, 06 Aug 1998 12:00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html
第2章 应用层
21
HTTP概述 (续)
使用TCP:
客户机向服务器发起TCP连接(产生套接字) ,端口80 服务器从客户机接受TCP连接 在浏览器(HTTP客户机)和Web服务器(HTPP服务器)之

计算机网络自顶向下第4版课件--Chapter2

计算机网络自顶向下第4版课件--Chapter2
Note: applications with
P2P architectures have client processes & server processes
2: Application Layer 11
Sockets
process sends/receives
messages to/from its socket socket analogous to door
application transport network data link physical
2: Application Layer
5
Chapter 2: Application layer
2.1 Principles of
network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail
2: Application Layer
12
Addressing processes
to receive messages,
process must have
identifier
host device has unique
32-bit IP address Q: does IP address of host suffice for identifying the process?
Computer Networking: A Top Down Approach,
4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
2: Application Layer

计算机网络自顶向下方法(第四版)第2章PPT课件

计算机网络自顶向下方法(第四版)第2章PPT课件

主机或服务器
主机或服务器
ቤተ መጻሕፍቲ ባይዱ
应用层 运输层
进程
套接字
具有缓存 、变量的 TCP
由应用研发者控制 因特网
进程
套接字
具有缓 存、变量 的TCP
由操作系统控制
14
进程与套接字关系
✓ 进程类似房子,套接字是进程的门。 ✓ 进程通过套接字在网络上发送和接收报文。
✓发送进程:把报文推 出门(套接字)。
✓传送报文:通过下面 网络把报文传送到目 的进程门口。
2.10 小结
3
流行的网络应用程序
E-mail
Web 即时讯息 远程注册 P2P文件共享 多用户网络游戏 流式存储视频片段
因特网电话 实时视频会议 大规模并行计算
编制应用程 序
4
网络应用程序的研发要点
写出能够分别在不同端系统运行,并通过网络相互通信 的程序。 如Web应用程序,由两个可以相互通信的程序组成
发送进程:产生报文并向网络发送; 接收进程:接收报文,并回送报文。 如图2-1。
11
1、客户机和服务器进程
网络应用程序由成对的进程组成,并通过网络相互发 送报文。如图2-1
根据功能分别标示为客户机和服务器 ✓ 客户机进程:发起通信的进程。 ✓ 服务器进程:等待其他进程联系的进程。
如Web应用程序中,一个客户机浏览器进程向某 个Web服务器进程发起联系,交换报文。
✓ 应用程序开发者选择了一 个运输层协议,则应用程 序就建立在由该协议提供 的运输层服务之上。如 TCP协议。
主机或服务器
主机或服务器
进程
套接字
具有缓 存、变 量的 TCP
由应用研发者控制
进程
因特网

计算机网络自顶向下方法第二章讲义

计算机网络自顶向下方法第二章讲义

进程通信
进程:运行在端系统中 的程序。
➢ 在同一台主机中:两 个进程使用进程间通 信IPC(由操作系统定 义)通信.
➢ 在不同的主机中:进 程通过交换报文通信
客户机进程: 发起通信的进 程
服务器进程:等待联系的 进程
注意:具有P2P体系结构 的应用程序具有客户机进 程和服务器进程
寻址进程
一个主机中可能同时运行有多个进程,接收端 从网络收到消息后要交给哪个进程?
➢ 对于接收报文的进程,必 须具有一个标识
➢ 一台主机具有一个独特的 32比特的IP地址
➢ 问题:在主机的IP地址足 以标识该进程?
➢ 答案: 在同一台主机上能 够运行许多进程
➢ 标示符包括IP地址和与 主机上该进程相关的端 口号.
➢ 端口号例子:
HTTP 服务器: 80 电子邮件服务器: 25
如何创建一个网络应用程序
编写程序能够
能够在不同端系统上运行
应用层 运输层层 网络层 链路层 物理层
能够通过网络通信
如Web: Web服务器软件与 浏览器软件通信
非网络核心设备的程序
应用层
三层协议软件(路由器)
运输层层 网络层
链路层
二层协议软件(交换机、路
物理层
应用层 运输层层 网络层 链路层 物理层
西南科技大学学校简介/s/2/t/851/p/11/c/832/d/842/list.htm
使用telnet工具进行HTTP实验
➢ 文件传输时间
RTT
接收的 文件
总响应= 2RTT+传输时间
时间
传输文件 的时间
时间
持久HTTP
非持久HTTP缺点: ➢ 串行访问时间长 ➢ 并行访问资源占用多

(完整版)计算机网络教程自顶向下方法选择题及答案Chapt2ApplicationLayer-QUIZZ

(完整版)计算机网络教程自顶向下方法选择题及答案Chapt2ApplicationLayer-QUIZZ

Chapter 2 Application Layer1.In a client-server paradigm, a _______ program provides services to a (another) _______ program.A) client; clientB) client; serverC) server; clientD) server; server2.In a client-server paradigmA) both the server and the client must be running all the time.B) both the server and the client need to be running only when they are needed.C) the server must be running all the time but the client needs to be running only when it is needed.D) the client must be running all the time but the server needs to be running only when it is needed3.The first section of a URL identifier is the __________.A) protocolB) pathC) hostD) port4.A _______ document is a fixed-content document that is created and stored in a server. The client can get a copy of the document only.A) staticB) dynamicC) activeD) None of the choices are correct5._____________ is a language for creating a static document.A) Extensible Style Language (XSL)B) Hypertext Markup Language (HTML)C) Extensible Markup Language (XML)D) All choices are correct6.A _______ document is created by a Web server whenever a browser requests the document.A) staticB) dynamicC) activeD) None of the choices are correct7.For many applications, we need a program or a script to be run at the client site. These are called_______________ documents.A) staticB) dynamicC) activeD) None of the choices are correct8.HTTP uses the services of _________.A) UDPB) IPC) TCPD) DNS9.In HTTP, the first line in a request message is called a _______ line; the first line in the response message is called the ________ line.A) request; responseB) status; responseC) status; statusD) None of the choices are correct10.In a ___________ connection, one TCP connection is made for each request/response.A) persistentB) nonpersistentC) persistent or a nonpersistentD) None of the choices are correct11.In a ___________ connection, the server leaves the connection open for more requests after sending a response.A) persistentB) nonpersistentC) persistent or nonpersistentD) None of the choices are correct12.In HTTP, _______ server is a computer that keeps copies of responses to recent requests.A) a regularB) a proxyC) an auxiliaryD) a remote13.An HTTP request message always contains _______.A) a header line and a bodyB) a request line and a header lineC) a request line, a header line, and a bodyD) a request line, a header line, a blank line, and a bodyWhich of the following is present in both an HTTP request line and a status line?A) version numberB) URLC) status codeD) method15.FTP uses the services of ________.A) UDPB) IPC) TCPD) none of the choices are correct16.In FTP, _________ well-known port(s) is (are) used.A) oneB) twoC) threeD) four17.During an FTP session the control connection is opened _______.A) onceB) twiceC) many timesD) none of the choices are correct18.During an FTP session the data connection may be opened _______.A) only onceB) only two timesC) as many times as neededD) none of the choices are correct19.In FTP, a file can be organized into records, pages, or a stream of bytes. These are types of an attribute called _______.A) file typesB) data structuresC) transmission modesD) none of the choices are correct20.In FTP, there are three types of _______: stream, block, and compressed.A) file typesB) data typesC) transmission modesD) none of the choices are correctIn FTP, ASCII, EBCDIC, and image define an attribute called _______.A) file typeB) data structureC) transmission modeD) none of the choices are correct22.In FTP, when we _______, it is copied from the client to the server.A) retrieve a fileB) store a fileC) open a fileD) none of the choices are correct23.In the common scenario, the electronic mail system needs _________________________.A) two UAs, two MTAs and one MAAB) two UAs, two MTAs and two MAAsC) two UAs, two pairs of MTAs and a pair of MAAsD) two UAs, two pairs of MTAs and a two pairs of MAAs24.________ provides service to the user to make the process of sending or receiving a message easier.A) An MTAB) An MAAC) A UAD) None of the choices are correct25.An e-mail message contains the ________ and the __________.A) header; envelopB) header; bodyC) envelop; bodyD) None of the choices are correct26.In the Internet, an e-mail address consists of two parts: a _______ and a _______.A) local part; domain nameB) global part; domain nameC) label; domain nameD) local part; label27._________ is a supplementary protocol that allows non-ASCII data to be sent through e-mail.A) SMPTB) MPEGC) MIMED) POP28.The formal protocol that defines the MTA client and server in the Internet is called ___________.A) SMTPB) SNMPC) TELNETD) SSH29.SMTP is a __________ protocol.A) pullB) pushC) push and pullD) None of the choices are correct30.The message access protocol is a ________ protocol.A) pullB) pushC) push and pullD) None of the choices are correct31.In the _______ encoding scheme, each 24 bits become four 6-bit chunks, and eventually are sent as32 bits.A) 8bitB) binaryC) base64D) quoted-printable32.In the _______ encoding scheme, a non-ASCII character is sent as 3 characters.A) 8bitB) base64C) quoted-printableD) binary33.TELNET is an abbreviation for ____________.A) terminal networkB) telephone networkC) telecommunication networkD) None of the choices are correct34.When a user logs into a local time-sharing system, it is called ________ login.A) localB) remoteC) local or remoteD) None of the choices are correct35.When a user wants to access an application program or utility located on a remote machine, he or she performs ___________ login.A) localB) remoteC) local or remoteD) None of the choices are correct36.Network Virtual Terminal (NVT) uses two sets of characters, one for _____ and one for __________.A) sending; receivingB) request; replyC) data; controlD) None of the choices are correct37.For data, NVT uses US ASCII characters with the highest order bit set to ______.A) 1B) 0C) 1 or 0D) None of the choices are correct38.For control, NVT uses US ASCII characters with the highest order bit set to ______.A) 1B) 0C) 1 or 0D) None of the choices are correct39.The _______ translates local characters into NVT characters.A) terminal driverB) TELNET clientC) TELNET serverD) pseudoterminal driver40.The _______ translates NVT characters into a form acceptable by the remote operating system.A) terminal driverB) TELNET clientC) TELNET serverD) pseudoterminal driver41.The _________ component in the SSH provides confidentiality, integrity, authentication and compression.A) SSH ApplicationB) SSH-AUTHC) SSH-CONND) SSH-TRANPort forwarding is ____________________________.A) a protocol used to forward messages from one port to another portB) a procedure for changing an ephemeral port to a well-known portC) a service, provided by SSH, that creates a secure channel for applications that do not have security services.D) None of the choices are correct43.In a _______ name space, a name is a sequence of characters without structure.A) linearB) flatC) hierarchicalD) organized44.In a _________ name space, each name is made of several parts.A) linearB) flatC) hierarchicalD) organized45.In the DNS, the names are defined in ___________ structure.A) a linear listB) an inverted-treeC) a three-dimensionalD) None of the choices are correct46.The root of the DNS tree is _______.A) a string of 127 charactersB) a string of 63 charactersC) a string of 15 charactersD) an empty string47.In the domain name space, a full domain name is a sequence of labels separated by ________.A) colonsB) semicolonsC) dotsD) commas48.In the domain name space, if a label is terminated by a null string, it is called a __________.A) PQDNB) CQDNC) SQDND) None of the choices are correctIn the domain name space, if a label is not terminated by a null string, it is called a __________.A) FQDNB) PQDNC) SQDND) None of the choices are correct50.In the domain name space, a _________ is a subtree of the domain name space.A) labelB) nameC) domainD) None of the choices are correct51.In the domain name space, what a server is responsible for or has authority over is called a _________.A) domainB) labelC) zoneD) None of the choices are correct52.A _______ server is a computer whose zone system consists of the whole tree.A) domainB) zoneC) rootD) primary53.A ________ server is a computer that stores a file about the zone for which it has an authority.A) primaryB) secondaryC) zoneD) root54.A ________ server is a computer that transfers the complete information about a zone from another server.A) primaryB) secondaryC) zoneD) root55.In the Internet, the country domain section uses ___________ country abbreviations.A) two-characterB) three-characterC) four-characterD) None of the choices are correct56.In __________ resolution, the resolver expects the server to supply the final answer.A) iterativeB) recursiveC) straightD) None of the choices are correct57.In __________ resolution, the server returns the IP address of the server that it thinks can resolve the query.A) iterativeB) recursiveC) straightD) None of the choices are correct58.DNS can use the services of ________.A) UDPB) TCPC) either UDP or TCPD) None of the choices are correct59.A registrar, a commercial entity accredited by ________ is responsible for adding new domains to DNS data baseA) NICB) ICANNC) ISOCD) IEFE60.In a centralized P2P network, the directory system uses the ________ paradigm; the storing and downloading of the files are done using __________ paradigm.A) client-server; client-serverB) peer-to-peer; client-serverC) client-server; peer-to-peerD) peer-to-peer; peer-to-peer61.Napster is an example of a ____________ peer-to-peer networkA) centralizedB) structured-decentralizedC) unstructured-decentralizedD) None of the choices are correct62.Gnutella is an example of a ____________ peer-to-peer networkA) centralizedB) structured-decentralizedC) unstructured-decentralizedD) None of the choices are correct63.BitTorrent is an example of a ____________ peer-to-peer networkA) centralizedB) structured-decentralizedC) unstructured-decentralizedD) None of the choices are correct64.In a structured-decentralized P2P network, ________________.A) the directory system is kept in a centerB) a query to find a file must be flooded through the networkC) a pre-defined set of rules is used to link nodes so that a query can be effectively and efficiently resolvedD) None of the choices are correct65.In a DHT-based network, each peerA) has a partial knowledge about the whole network.B) has a complete knowledge about the whole network.C) only has a knowledge about its successor.D) None of the choices are correct66.The finger table is the routing table used in ______________.A) GnutellaB) PastryC) KademliaD) None of the choices are correct67.Which of the following is not a Chord interface.A) LookupB) Fix nodeC) StabilizeD) Join68.In __________ a key is stored in a node whose identifier is numerically closest to the key.A) ChordB) PastryC) KademliaD) None of the choices are correct69.To resolve a query, _________ uses two entities: a routing table and a leaf set.A) ChordB) PastryC) KademliaD) None of the choices are correct70.In Kademlia, the distance between the two identifiers (nodes or keys) are measured as the bitwise-___________ between them.A) ANDB) NORC) ORD) None of the choices are correct71.In ________, nodes and data items are m-bit identifiers that create an identifier space of 2m points distributed at the leaves of a binary treeA) ChordB) PastryC) KademliaD) None of the choices are correct72.In Kademlia, each node in the network divides the binary tree into m subtrees that.A) include the node itselfB) do not include the node itselfC) include the node itself and the successor nodeD) None of the choices are correct73.Trackerless BitTorrent uses __________ DHT to do the job of tracking.A) ChordB) PastryC) KademliaD) None of the choices are correctCCAAD BCCDB ABBAC BACBC ABCCB ACABA CCAAB CBABC DCBCB CCDBC CCABA BACBC ACBCA DBBBD CBC。

《计算机网络自顶向下》课后习题答案(第二章中文版)

《计算机网络自顶向下》课后习题答案(第二章中文版)

《计算机网络自顶向下》课后习题答案(第二章中文版)2复习题1.The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; email: SMTP.2.P51 网络体系结构是指以分层的方式来描述通信过程的组织体系。

(例如五层网络结构)另一方面,应用体系结构是由应用程序的研发者设计,并规定应用程序的主要结构(例如客户机/服务器或P2P)从应用程序研发者的角度看,网络体系结构是固定的,并为应用程序提供了特定的服务集合。

3.P52 在即时讯息中,发起人连接到中心服务器,查找接收方的IP地址是典型的客户机/服务器模式。

在这之后,即时信息可以在相互通信的双方进行直接的端到端通信。

不需要总是打开的中间服务器。

4.P53 发起通信的进程为客户机,等待联系的进程是服务器。

5.No. As stated in the text, all communication sessions havea client side and a server side. In a P2P file-sharingapplication, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the server.6.P54 目的主机的IP地址和目的套接字的端口号。

7.在日常生活中你或许会使用Web浏览器和邮件阅读器。

你或许还会用到FTP用户代理,Telnet用户代理,音频/视频播放器用户代理(比如Real Networks player),即时信息代理,P2P文件共享代理。

8.There are no good examples of an application that requires no data loss and timing. If you know of one, send an e-mail to the authors.9.当两个通信实体在相互发送数据前第一次交换控制分组信息时使用握手协议。

《计算机网络自顶向下》课后习题答案(第二章中文版)

《计算机网络自顶向下》课后习题答案(第二章中文版)

2复习题1.The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; email: SMTP.2.P51 网络体系结构是指以分层的方式来描述通信过程的组织体系。

(例如五层网络结构)另一方面,应用体系结构是由应用程序的研发者设计,并规定应用程序的主要结构(例如客户机/服务器或P2P)从应用程序研发者的角度看,网络体系结构是固定的,并为应用程序提供了特定的服务集合。

3.P52 在即时讯息中,发起人连接到中心服务器,查找接收方的IP地址是典型的客户机/服务器模式。

在这之后,即时信息可以在相互通信的双方进行直接的端到端通信。

不需要总是打开的中间服务器。

4.P53 发起通信的进程为客户机,等待联系的进程是服务器。

5.No. As stated in the text, all communication sessions have a client side and a server side. In a P2P file-sharingapplication, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the server.6.P54 目的主机的IP地址和目的套接字的端口号。

7.在日常生活中你或许会使用Web浏览器和邮件阅读器。

你或许还会用到FTP用户代理,Telnet用户代理,音频/视频播放器用户代理(比如Real Networks player),即时信息代理,P2P文件共享代理。

8.There are no good examples of an application that requires no data loss and timing. If you know of one, send an e-mailto the authors.9.当两个通信实体在相互发送数据前第一次交换控制分组信息时使用握手协议。

计算机网络教程自顶向下方法选择题及答案 Chapt 2 Application Layer-QUIZZ

计算机网络教程自顶向下方法选择题及答案 Chapt 2 Application Layer-QUIZZ

Chapter 2 Application Layer1.In a client-server paradigm, a _______ program provides services to a (another) _______ program.A) client; clientB) client; serverC) server; clientD) server; server2.In a client-server paradigmA) both the server and the client must be running all the time.B) both the server and the client need to be running only when they are needed.C) the server must be running all the time but the client needs to be running only when it is needed.D) the client must be running all the time but the server needs to be running only when it is needed3.The first section of a URL identifier is the __________.A) protocolB) pathC) hostD) port4.A _______ document is a fixed-content document that is created and stored in a server. The client can get a copy of the document only.A) staticB) dynamicC) activeD) None of the choices are correct5._____________ is a language for creating a static document.A) Extensible Style Language (XSL)B) Hypertext Markup Language (HTML)C) Extensible Markup Language (XML)D) All choices are correct6.A _______ document is created by a Web server whenever a browser requests the document.A) staticB) dynamicC) activeD) None of the choices are correct7.For many applications, we need a program or a script to be run at the client site. These are called_______________ documents.A) staticB) dynamicC) activeD) None of the choices are correct8.HTTP uses the services of _________.A) UDPB) IPC) TCPD) DNS9.In HTTP, the first line in a request message is called a _______ line; the first line in the response message is called the ________ line.A) request; responseB) status; responseC) status; statusD) None of the choices are correct10.In a ___________ connection, one TCP connection is made for each request/response.A) persistentB) nonpersistentC) persistent or a nonpersistentD) None of the choices are correct11.In a ___________ connection, the server leaves the connection open for more requests after sending a response.A) persistentB) nonpersistentC) persistent or nonpersistentD) None of the choices are correct12.In HTTP, _______ server is a computer that keeps copies of responses to recent requests.A) a regularB) a proxyC) an auxiliaryD) a remote13.An HTTP request message always contains _______.A) a header line and a bodyB) a request line and a header lineC) a request line, a header line, and a bodyD) a request line, a header line, a blank line, and a bodyWhich of the following is present in both an HTTP request line and a status line?A) version numberB) URLC) status codeD) method15.FTP uses the services of ________.A) UDPB) IPC) TCPD) none of the choices are correct16.In FTP, _________ well-known port(s) is (are) used.A) oneB) twoC) threeD) four17.During an FTP session the control connection is opened _______.A) onceB) twiceC) many timesD) none of the choices are correct18.During an FTP session the data connection may be opened _______.A) only onceB) only two timesC) as many times as neededD) none of the choices are correct19.In FTP, a file can be organized into records, pages, or a stream of bytes. These are types of an attribute called _______.A) file typesB) data structuresC) transmission modesD) none of the choices are correct20.In FTP, there are three types of _______: stream, block, and compressed.A) file typesB) data typesC) transmission modesD) none of the choices are correctIn FTP, ASCII, EBCDIC, and image define an attribute called _______.A) file typeB) data structureC) transmission modeD) none of the choices are correct22.In FTP, when we _______, it is copied from the client to the server.A) retrieve a fileB) store a fileC) open a fileD) none of the choices are correct23.In the common scenario, the electronic mail system needs _________________________.A) two UAs, two MTAs and one MAAB) two UAs, two MTAs and two MAAsC) two UAs, two pairs of MTAs and a pair of MAAsD) two UAs, two pairs of MTAs and a two pairs of MAAs24.________ provides service to the user to make the process of sending or receiving a message easier.A) An MTAB) An MAAC) A UAD) None of the choices are correct25.An e-mail message contains the ________ and the __________.A) header; envelopB) header; bodyC) envelop; bodyD) None of the choices are correct26.In the Internet, an e-mail address consists of two parts: a _______ and a _______.A) local part; domain nameB) global part; domain nameC) label; domain nameD) local part; label27._________ is a supplementary protocol that allows non-ASCII data to be sent through e-mail.A) SMPTB) MPEGC) MIMED) POP28.The formal protocol that defines the MTA client and server in the Internet is called ___________.A) SMTPB) SNMPC) TELNETD) SSH29.SMTP is a __________ protocol.A) pullB) pushC) push and pullD) None of the choices are correct30.The message access protocol is a ________ protocol.A) pullB) pushC) push and pullD) None of the choices are correct31.In the _______ encoding scheme, each 24 bits become four 6-bit chunks, and eventually are sent as32 bits.A) 8bitB) binaryC) base64D) quoted-printable32.In the _______ encoding scheme, a non-ASCII character is sent as 3 characters.A) 8bitB) base64C) quoted-printableD) binary33.TELNET is an abbreviation for ____________.A) terminal networkB) telephone networkC) telecommunication networkD) None of the choices are correct34.When a user logs into a local time-sharing system, it is called ________ login.A) localB) remoteC) local or remoteD) None of the choices are correct35.When a user wants to access an application program or utility located on a remote machine, he or she performs ___________ login.A) localB) remoteC) local or remoteD) None of the choices are correct36.Network Virtual Terminal (NVT) uses two sets of characters, one for _____ and one for __________.A) sending; receivingB) request; replyC) data; controlD) None of the choices are correct37.For data, NVT uses US ASCII characters with the highest order bit set to ______.A) 1B) 0C) 1 or 0D) None of the choices are correct38.For control, NVT uses US ASCII characters with the highest order bit set to ______.A) 1B) 0C) 1 or 0D) None of the choices are correct39.The _______ translates local characters into NVT characters.A) terminal driverB) TELNET clientC) TELNET serverD) pseudoterminal driver40.The _______ translates NVT characters into a form acceptable by the remote operating system.A) terminal driverB) TELNET clientC) TELNET serverD) pseudoterminal driver41.The _________ component in the SSH provides confidentiality, integrity, authentication and compression.A) SSH ApplicationB) SSH-AUTHC) SSH-CONND) SSH-TRANPort forwarding is ____________________________.A) a protocol used to forward messages from one port to another portB) a procedure for changing an ephemeral port to a well-known portC) a service, provided by SSH, that creates a secure channel for applications that do not have security services.D) None of the choices are correct43.In a _______ name space, a name is a sequence of characters without structure.A) linearB) flatC) hierarchicalD) organized44.In a _________ name space, each name is made of several parts.A) linearB) flatC) hierarchicalD) organized45.In the DNS, the names are defined in ___________ structure.A) a linear listB) an inverted-treeC) a three-dimensionalD) None of the choices are correct46.The root of the DNS tree is _______.A) a string of 127 charactersB) a string of 63 charactersC) a string of 15 charactersD) an empty string47.In the domain name space, a full domain name is a sequence of labels separated by ________.A) colonsB) semicolonsC) dotsD) commas48.In the domain name space, if a label is terminated by a null string, it is called a __________.A) PQDNB) CQDNC) SQDND) None of the choices are correctIn the domain name space, if a label is not terminated by a null string, it is called a __________.A) FQDNB) PQDNC) SQDND) None of the choices are correct50.In the domain name space, a _________ is a subtree of the domain name space.A) labelB) nameC) domainD) None of the choices are correct51.In the domain name space, what a server is responsible for or has authority over is called a _________.A) domainB) labelC) zoneD) None of the choices are correct52.A _______ server is a computer whose zone system consists of the whole tree.A) domainB) zoneC) rootD) primary53.A ________ server is a computer that stores a file about the zone for which it has an authority.A) primaryB) secondaryC) zoneD) root54.A ________ server is a computer that transfers the complete information about a zone from another server.A) primaryB) secondaryC) zoneD) root55.In the Internet, the country domain section uses ___________ country abbreviations.A) two-characterB) three-characterC) four-characterD) None of the choices are correct56.In __________ resolution, the resolver expects the server to supply the final answer.A) iterativeB) recursiveC) straightD) None of the choices are correct57.In __________ resolution, the server returns the IP address of the server that it thinks can resolve the query.A) iterativeB) recursiveC) straightD) None of the choices are correct58.DNS can use the services of ________.A) UDPB) TCPC) either UDP or TCPD) None of the choices are correct59.A registrar, a commercial entity accredited by ________ is responsible for adding new domains to DNS data baseA) NICB) ICANNC) ISOCD) IEFE60.In a centralized P2P network, the directory system uses the ________ paradigm; the storing and downloading of the files are done using __________ paradigm.A) client-server; client-serverB) peer-to-peer; client-serverC) client-server; peer-to-peerD) peer-to-peer; peer-to-peer61.Napster is an example of a ____________ peer-to-peer networkA) centralizedB) structured-decentralizedC) unstructured-decentralizedD) None of the choices are correct62.Gnutella is an example of a ____________ peer-to-peer networkA) centralizedB) structured-decentralizedC) unstructured-decentralizedD) None of the choices are correct63.BitTorrent is an example of a ____________ peer-to-peer networkA) centralizedB) structured-decentralizedC) unstructured-decentralizedD) None of the choices are correct64.In a structured-decentralized P2P network, ________________.A) the directory system is kept in a centerB) a query to find a file must be flooded through the networkC) a pre-defined set of rules is used to link nodes so that a query can be effectively and efficiently resolvedD) None of the choices are correct65.In a DHT-based network, each peerA) has a partial knowledge about the whole network.B) has a complete knowledge about the whole network.C) only has a knowledge about its successor.D) None of the choices are correct66.The finger table is the routing table used in ______________.A) GnutellaB) PastryC) KademliaD) None of the choices are correct67.Which of the following is not a Chord interface.A) LookupB) Fix nodeC) StabilizeD) Join68.In __________ a key is stored in a node whose identifier is numerically closest to the key.A) ChordB) PastryC) KademliaD) None of the choices are correct69.To resolve a query, _________ uses two entities: a routing table and a leaf set.A) ChordB) PastryC) KademliaD) None of the choices are correct70.In Kademlia, the distance between the two identifiers (nodes or keys) are measured as the bitwise-___________ between them.A) ANDB) NORC) ORD) None of the choices are correct71.In ________, nodes and data items are m-bit identifiers that create an identifier space of 2m points distributed at the leaves of a binary treeA) ChordB) PastryC) KademliaD) None of the choices are correct72.In Kademlia, each node in the network divides the binary tree into m subtrees that.A) include the node itselfB) do not include the node itselfC) include the node itself and the successor nodeD) None of the choices are correct73.Trackerless BitTorrent uses __________ DHT to do the job of tracking.A) ChordB) PastryC) KademliaD) None of the choices are correctCCAAD BCCDB ABBAC BACBC ABCCB ACABA CCAAB CBABC DCBCB CCDBC CCABA BACBC ACBCA DBBBD CBC。

计算机网络自顶向下方法(第四版)-中文版课件-第二章汇编

计算机网络自顶向下方法(第四版)-中文版课件-第二章汇编
28
拥塞控制
当发送方和接收方之间的网络出现拥塞时,会抑 制发送进程速率。
对整个网络有益。
29
未提供的服务
✓ 不确保最小传输速率:发送进程受拥塞控制机制制约; ✓ 不提供时延保证:数据传输的时间不确定。
TCP协议能保证交付所有的数据,但并不保证这些 数据传输的速率以及期待的传输时延。
TCP协议不适合实时应用。
30
2、UDP服务
提供最小服务模式运行。 ✓ 无连接:两个进程通信前没有握手过程; ✓ 不可靠数据传输:不保证报文能够被接收,或收到的
报文是乱序到达。 ✓ 没有拥塞控制机制:发送进程可以任何速率发送数据 ✓ 不提供时延保证: 适于实时应用。
31
因特网应用、应用协议与运输协议
应用 应用层协议
电子邮件
8
2、纯P2P体系结构(peer-to-peer)
无(最少)打开的服务器 任意端系统(对等方)可以
直接通信 对等方间歇地连接,IP地址
不固定 例:文件分发、因特网电话
等。
可扩展度高、难以管理
9
3、客户机/服务器与P2P的混合
Napster:MP3文件共享应用程序。 P2P:对等方直接交换MP3文件 服务器注册/定位: • 对等方在中心服务器上注册内容 • 对等方查询相同的中心服务器以定位内容
进程的标识:主机中的哪一个进程。 因特网中,采用端口号标识(port number)。
✓ 常用的应用程序被指派固定的端口号(周知端口)。
如,Web服务进程(HTTP协议):80 邮件服务进程(SMTP协议):25
✓ 创建一个新的网络应用程序时,必须分配一个新的端 口号。不重复。
18
4、用户代理(user agent)

Chapter_2_V6.2

Chapter_2_V6.2
Application Layer 2-7
clients:

client/server



P2P architecture



no always-on server arbitrary end systems directly communicate peers request service from other peers, provide service in return to other peers self scalability – new peers bring new service capacity, as well as new service demands peers are intermittently connected and change IP addresses complex management

always-on host permanent IP address data centers for scaling communicate with server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other
Application architectures
possible structure of applications: client-server peer-to-peer (P2P)
Application Layer 2-6
Client-server architecture
server:
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

the IP address and port numbers associated with the process on the host. Example port numbers:
r r
HTTP server: 80 Mail server: 25
to send HTTP message to
2.1 Principles of
network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail
r
SMTP, POP3, IMAP
2.5 DNS 2.6 P2P file sharing
2: Application Layer
Internet
TCP with buffers, variables
controlled by OS
API: (1) choice of transport protocol; (2) ability to fix
a few parameters (lots more on this later)
r
host or server controlled by app developer
host or server
process socket TCP with buffers, variables
process socket
r
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
network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail
r
SMTP, POP3, IMAP
2.5 DNS 2.6 P2P file sharing
2: Application Layer
6
Application architectures
Chapter 2 Application Layer
A note on the use of these ppt slides:
We're making these slides freely available to all (faculty, students, readers). They're in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we'd like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2004 J.F Kurose and K.W. Ross, All Rights Reserved
r
learn about protocols
by examining popular application-level protocols
r r rቤተ መጻሕፍቲ ባይዱr
HTTP FTP SMTP / POP3 / IMAP DNS
programming network
peer-to-peer paradigm
Note: applications with
P2P architectures have client processes & server processes
2: Application Layer 11
Sockets
process sends/receives
messages to/from its socket socket analogous to door
application transport network data link physical
little software written for devices in network core
r
r
Network core devices do not function at app layer This design allows for rapid app development
Computer Networking: A Top Down Approach Featuring the Internet,
3rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004.
2: Application Layer
1
Chapter 2: Application layer
2
Chapter 2: Application Layer
Our goals: conceptual, implementation aspects of network application protocols r transport-layer service models r client-server paradigm
client/server
r r
r
r
communicate with server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other
2: Application Layer 8
application transport network data link physical
application transport network data link physical
2: Application Layer
5
Chapter 2: Application layer
2.1 Principles of
2: Application Layer 12
Addressing processes
For a process to
Identifier includes both
receive messages, it must have an identifier A host has a unique32bit IP address Q: does the IP address of the host on which the process runs suffice for identifying the process? Answer: No, many processes can be running on same host
2: Application Layer
9
Hybrid of client-server and P2P
Napster
File transfer P2P r File search centralized:
r
Peers register content at central server Peers query same central server to locate content
web server:
r r
IP address: 128.119.245.12 Port number: 80
More on this later
2: Application Layer
13
App-layer protocol defines
conference grid computing
games Streaming stored video clips
2: Application Layer
4
Creating a network app
Write programs that
r
r
r
run on different end systems and communicate over a network. e.g., Web: Web server software communicates with browser software
applications
r
socket API
2: Application Layer
3
Some network apps
E-mail Web Instant messaging Remote login P2P file sharing Multi-user network voice over IP Real-time video
相关文档
最新文档