Chapter 6 Computer Networks
OBJECTIVES After reading this chapter, the reader should be able to: Understand the rationale for the existence of networks. Distinguish between the three types of networks: LANs, MANs, and WANs. Understand the OSI model and TCP/IP. List different connecting devices and the OSI layers in which each device operates. Understand client-server models.
Contents 6.1 Networks, Large and Small 6.2 OSI Model 6.3 categories of networks 6.4 Connecting Devices 6.5 The Internet and TCP/IP Summary
NETWORKS, LARGE AND SMALL 6.1 NETWORKS, LARGE AND SMALL
NETWORKS, LARGE AND SMALL Computer Network---a combination of systems(e.g., a computer) connected through transmission media(e.g.,a wire,a cable, or air). 计算机网络:通过不同的传输介质(如电线、电缆等)连接起来的组合。 Three types of networks LAN(local area network):局域网。 MAN(metropolitan area network):城域网。 WAN(wide area network):广域网。 Model(模型) --- the specification set by a standards organization as a guideline for designing networks. (OSI model) 由标准化组织制定的用于网络设计的规范。 Protocol(协议) --- a set of rules that controls the interaction of different devices in a network or an internetwork. (TCP/IP) 用于控制网络间不同设备间交互的一套规则。 TCP/IP ---the official protocol suite of the Internet.
6.2 OSI MODEL
OSI MODEL OSI (Open Systems Interconnection)--- OSI模型有7层--- It’s designed by the International Organization for Standardization (ISO). The model theoretically allows any two different systems (e.g., computers) to communicate regardless of their underlying architecture. 开放系统互联模型---由国际标准化组织(ISO)设计的一个模型,理论上允许两个不同系统相互通信而不需要考虑它们的底层体系结构。 OSI模型有7层--- Application (应用层) Presentation (表示层) Session (会话层) Transport (传输层) Network (网络层) Data link (数据链路层) Physical (物理层)
Note: The OSI model is a theoretical model that shows how any two different systems can communicate with each other.
Figure 6-1 The OSI model
Flow of data in the OSI model Figure 6-2 Flow of data in the OSI model
OSI MODEL---Functons of the layers Physical layer---1 Bit: It’s responsible for transmitting a bit stream over a physical medium. (物理层):负责在物理介质中传输位流。 Data-Link layer---2 Frame: organizes bits into logical units(header+data+trailer) called frames. It’s responsible only for node-to-node delivery of the frame. Addressing information is added to the data. physical address---source address, destination address. It’s responsible for error handling between two adjacent stations by adding redundant data to trailer to either correct or detect errors. (数据链路层):将位组成叫做帧(frame)的逻辑单元。在两个邻近站点之间进行点对点的帧传输。
OSI MODEL---Functons of the layers Network layer---3 Packet: the data unit handled by the network layer. It’s responsible for delivery of a packet between the original source and final destination, end-to-end delivering one packet. Addressing information is added to data. Logical address, IP address. Physical address(layer 2) change from station to station, but the logical address (layer 3) remains unchanged from source to the destination. (网络层):在两个源站点和目的站点之间点对点的数据包(packet)传输。 Transport layer---4 Message: A message can be made of one or more packets. It’s responsible for end-to-end delivery of the whole message(many packets). (传输层):在源站点和目的站点之间整个消息的传输。(消息由一个或多个包构成)
OSI MODEL---Functons of the layers Session layer---5 It controls the dialog between users. It establishes, maintains, and synchronizes the dialog between communicating systems. Synchronization points. It’s usually included in the application layer. (会话层):控制用户间的会话。当今大多数网络实现不使用单独的会话层,通常把它们包括在应用层中。 Presentation layer---6 It’s concerned with the syntax(format) and semantics(meaning)of the information exchanged between two systems. (表示层):该层关心两个系统间所交换的信息的语法(格式)和语义(意义)。在表示层对数据进行压缩(compress)和解压缩(decompress)、加密(encrypt)和解密(decrypt)。 Application layer---7 It’s enables the user, whether human or sofeware, to access the network. (应用层):使用户(人或软件)都可以访问网络。(如通过应用层访问网络、使用邮件服务和目录服务)
6.3 CATEGORIES OF NETWORKS
Categories of networks Figure 6-3 Categories of networks
LAN LAN(local area network): It’s designed to allow resource sharing(hardware,software,and data)between computers. A LAN can be simply defined as a combination of computers and peripheral devices connected through a transmission medium. 局域网:通过传输介质连接起来的计算机及其外围设备的组合。 Bus Topology(总线拓扑):用总线来连接计算机。(需要电缆终结器cable terminator) Star Topology(星形拓扑):通过集线器(hub)或交换机(switch)来连接计算机。 Ring Topology(环形拓扑):环状连接计算机。 Mesh Topology(网形拔掉):网状连接计算机
Topology of LAN Figure 6-4
MAN MAN(metropolitan area network):城域网。通常使用公用通信公司提供的服务,如电话公司。覆盖镇或城市,并向个人用户或组织提供服务。 Figure 6-5
WAN WAN(wide area network):广域网。覆盖大范围内(州、国家和世界)的个人计算机或局域网的连接。由公用通讯公司安装和运营。 Figure 6-6
6.4 CONNECTING DEVICES
Figure 6-7 Connecting Devices
Connecting Devices Connecting devices:连接设备。 连接设备的类型:中继器(repeater)、网桥(bridge)、路由器(router)、网关(gateway)。 Repeater(中继器):使数据信号再生(regenerate)的设备。运行在物理层。(从一个网络段接收信号并将其放大,再传送到另一个网络段。) Bridge(网桥):通信控制器。工作在物理层和数据链路层。(用来分割信息流segment traffic) Router(路由器):根据数据包的逻辑(网络层)地址为其选择路由(route)。运行在OSI模型的前3层。 router可以连接两个独立的网络而形成交互式网络(如互联网)。 Gateway(网关):充当协议转换器。允许不同(协议)的网络交换信息。工作在OSI模型的所有层上。
Repeater Repeater---中继器 It’s an electronic device that regenerates data. It extends the physical length of a network. Figure 6-8
Repeaters operate at the first layer of the OSI model. Note: Repeaters operate at the first layer of the OSI model.
Bridge Bridge—网桥 It’s a traffic controller. It can divide a long bus into smaller segments so that each segment is independent trafficwise. It can pass or block frames based on destination address(physical address) in the frame. Figure 6-9
Bridges operate at the first two layers of the OSI model. Note: Bridges operate at the first two layers of the OSI model.
Bridge ---- second-layer Switch Figure 6-10 Bridge ---- second-layer Switch
Router Router—路由器 Routers in an internet Figure 6-11 Router Router—路由器 Routers connect LANs,MANs,and WANs. It routes a packet based on the logical address of the packet. Routers in an internet
Routers operate at the first three layers of the OSI model. Note: Routers operate at the first three layers of the OSI model.
Gateway gateway—网关 It acts as a protocol converter. It connects two networks, each with a different set of protocols for all seven OSI layers, to be connected to each other and communicate.
Connecting devices and the OSI model Figure 6-12
6.5 THE INTERNET AND TCP/IP
TCP/IP ---Transmisstion Control Protocol/Internet Protocol TCP/IP is a suite of a stack of protocols that officially controls the Internet. TCP/IP and OSI Model Figure 6-13
TCP/IP ---Physical and Data-Link Layers TCP/IP does not define any specific protocol. It’s supports all of the standard and proprietary protocols.
TCP/IP ---Network Layer TCP/IP defines the Internet Protocol (IP) at this layer. IP is an unreliable protocol and a best effort delivery service. The data unit (packet) of this layer called IP Datagram. IP Datagram travel along different routes based on the IP address (logical address), arriving the end computer, or losing.
TCP/IP ---Network Layer ---IP address IP addresses in dotted-decimal notation Figure 6-14
TCP/IP ---Transport Layer TCP/IP defines two protocols:Transmission Control Protocol(TCP) and Datagram Protocol (UDP) at this layer. TCP is reliable for message sending. Message divided into a sequence of segments with sequential number. UDP is unreliable for message sending. Figure 6-14
TCP/IP ---Application Layer The combination of session, presentation, and application of OSI model. Figure 6-14
TCP/IP ---Application Layer Figure 6-15 TCP/IP ---Application Layer Client-server model
TCP/IP ---Application Layer Figure 6-16 TCP/IP ---Application Layer FTP(File Transfer Protocol)
TCP/IP ---Application Layer Figure 6-17 TCP/IP ---Application Layer SMTP(Simple Mail Transfer Protocol) POP(Post Office Protocol):
Figure 6-18 Email address jsjdl@163.net
TCP/IP ---Application Layer Figure 6-19 TCP/IP ---Application Layer TELNET(TErminaL NETwork)
TCP/IP ---Application Layer Figure 6-20 URL(Uniform Resource Locator) http://hi.baidu.com/hyper99/home/index.htm http://hiphotos.baidu.com/hyper99/pic/item/44c0ce1300439a31dd5401ff.jpg Method:用来传输文档的客户-服务器程序 Host:存储信息的计算机。 Port:定义了服务器的端口数量,是可选的。 Path:存储信息的文件的路径。
Figure 6-21 Browser Nescape IE Firefox Opera …
Categories of Web documents Figure 6-22 Categories of Web documents Applet, ActiveX Javascript,vbscript, Actionscript(flash) CGI, JSP/Servelet ASP ActiveScript(PHP) html,htm
用于规定任意两个不同系统之间如何通信的一种理论模型 Summary 计算机网络是什么? 使用传输介质连接的设备组合 OSI模型是什么? 用于规定任意两个不同系统之间如何通信的一种理论模型 OSI模型的7层分别是什么? 物理层、数据链路层、网络层、传输层、会话层、表示层、应用层
用来再生信号并延伸网络的物理距离的连接设备 Summary LAN的拓扑结构有哪几种? 总线型、环型、星型 中继器(repeater)是什么? 用来再生信号并延伸网络的物理距离的连接设备 网桥(bridge)是什么? 用来过滤通信流量的连接设备(分割信息流)
允许两个使用完全不同协议的网络之间互相通信(作为协议转换器的设备) Summary 路由器(router)是什么? (根据网络层地址)为数据包选择路由的连接设备 网关(gateway)的作用是什么? 允许两个使用完全不同协议的网络之间互相通信(作为协议转换器的设备) 什么是交互式网络(Internetwork)? 两个或两个以上的局域网、城域网或广域网
用户数据报协议(UDP)和传输控制协议(TCP)是什么? Summary TCP/IP是什么? 是互联网使用的一组协议(一套规则) IP地址的作用是什么? 标识连接在互联网上的每台计算机 用户数据报协议(UDP)和传输控制协议(TCP)是什么? 是TCP/IP在传输层的协议
用于从一个主机向另一个主机复制文件的TCP/IP客户-服务器应用程序 Summary 文件传输协议(FTP)的作用是什么? 用于从一个主机向另一个主机复制文件的TCP/IP客户-服务器应用程序 在互联网上支持电子邮件的协议是SMTP(简单邮件传输协议) TELNET(终端网络)是一种客户-服务器应用程序,它允许用户登录到远程计算机并可访问远程系统
URL(统一资源定位器)是在互联网上用于指定信息的标准标识符 Summary HTTP(超文本传输协议)是在万维网上访问和传输文档的客户-服务器程序 URL(统一资源定位器)是在互联网上用于指定信息的标准标识符 在万维网上需要用浏览器来访问网页 万维网上的文档可以分为静态的、动态的或活动的
Key terms Internetwork(交互式网络):连接独立的局域网、城域网、广域网而形成的网络。 TCP/IP(Transmission Control Protocol/Internet protocol,传输控制协议/网际协议):互联网上正式使用的协议组。 TCP/IP协议中的层:物理层、数据链路层、网络层、传输层、应用层(应用层、表示层、会话层)。
Key terms 物理层和数据链路层:TCP/IP没有定义特殊的协议,支持所有标准和专有的协议。 网络层:支持IP协议。 IP datagram(IP数据报):在IP层的数据单元。 IP address(IP地址):互联网上每台计算机拥有的唯一的国际地址。 Dotted-decimal notation(带点的十进制标记法):如129.10.7.30
Key terms Email address(邮件地址):local part(本地部分)@domain name(域名) TELNET(TErminaL NETwork):互联网上允许远程登录的一个通用的客户-服务器程序。 HTTP(Hypertext Transfer Protocol):用来在万维网上访问和传输文档的协议。 URL(Uniform resource Locator):统一资源定位器。是互联网上用于指定任何一种信息的标准。是一个特殊地址。
Key terms 传输层:TCP/IP定义了两种协议,TCP和UDP。 TCP(Transmission Control Protocol):传输控制协议 UDP (User Datagram Protocol):用户数据报协议。是一个端到端的传输层协议,传输时只提供端到端发送的基本传输需要。
Key terms 应用层: Client-server model(客户-服务器模型):客户(本地计算机上运行的应用程序),服务器(远程计算机上运行的应用程序) FTP(File Transfer Protocol):互联网上用于从一台机器向另一台机器传送文件的标准协议。 SMTP(Simple Mail Transfer Protocol):简单邮件传输协议,用来传输邮件。 POP(Post Office Protocol):邮局协议。 UA(user agent):用户接口。
Key terms WWW(World Wide Web):万维网。 Hypertext(超文本):指包含特殊的文本、字和短语的文档,通过它们可以创建到其他文档(包含文本、图像、音频、视频)的链接。 Home Page(主页):个人或组织的主网页。 Browser(浏览器):用来访问WWW上的网页的特殊程序。
Key terms Document Types(文档类型) Static document(静态文档):有固定的内容,在服务器端生成,且只能被复制。 Dynamic document(动态文档):驻留在服务器端的程序,当浏览器发送请求,服务器就运行该程序,并将结果返回给浏览器。 Active document(活动文档):不能在服务器端运行的程序。需要先将程序发送到浏览器端,然后再运行。